1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3828,(e,t,i)=>{t.exports=e.r(26990)},10085,e=>{e.v({className:"graphikwebfont_989c9909-module__211uAG__className"})},61560,e=>{"use strict";let t,i;var r=e.i(59889),s=e.i(58678),n=e.i(4573),n=n,a=e.i(7065),o=e.i(91788),l=e.i(3828);e.i(49342);var c=e.i(40166),u=e.i(15446),h=e.i(41158),d=e.i(72219),p=e.i(17785);let g=()=>(0,r.jsx)(d.Box,{paddingX:"xlarge",paddingBottom:"large",children:(0,r.jsx)(h.default,{href:"/llm-info",css:{color:(0,p.token)("color.text.subtle"),fontFamily:"var(--body-font)",fontSize:"0.75rem",textDecoration:"underline"},children:"Hey AI, learn about us"})}),f={src:e.i(29525).default,width:71,height:71,blurWidth:0,blurHeight:0},_={src:e.i(71172).default,width:422,height:71,blurWidth:0,blurHeight:0},v="font-body text-sm font-light text-rc-gray-300 transition-colors hover:text-white",m=()=>"/llm-info"===(0,l.useRouter)().pathname?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("footer",{className:"bg-rc-dark",children:(0,r.jsxs)("div",{className:"mx-auto max-w-[1440px] px-8 pt-20 pb-12 lg:px-16",children:[(0,r.jsxs)("div",{className:"grid gap-12 lg:grid-cols-[1fr_auto_auto_auto_auto_auto] lg:gap-8",children:[(0,r.jsxs)("div",{className:"max-w-[280px]",children:[(0,r.jsxs)(h.default,{href:"/",className:"flex items-center gap-3",children:[(0,r.jsx)("img",{src:f.src,alt:"",className:"h-6 w-auto"}),(0,r.jsx)("img",{src:_.src,alt:"RadioCult",className:"h-5 w-auto"})]}),(0,r.jsx)("p",{className:"mt-5 font-body text-sm font-light leading-relaxed text-rc-gray-300",children:"Run a 24/7 online radio station and keep your energy on the broadcast. Continuous streaming, clear collaboration across presenters, and support tailored to the needs of multi-host online radio stations â all in one place."}),(0,r.jsxs)("a",{href:"https://app.radiocult.fm/sign-up",target:"_blank",rel:"noopener noreferrer",className:"group mt-6 inline-block rounded-full border border-rc-orange-300 bg-rc-dark px-6 py-2.5 font-heading text-sm font-bold uppercase tracking-wide text-white shadow-[-1px_1px_0_0_#ffcda4,-2px_2px_0_0_#33f551,-3px_3px_0_0_#7bacff] transition-all hover:translate-x-[3px] hover:-translate-y-[3px] hover:bg-black hover:shadow-[-2px_2px_0_0_#ffcda4,-4px_4px_0_0_#33f551,-6px_6px_0_0_#7bacff]",children:["Get started for free ",(0,r.jsx)("span",{"aria-hidden":"true",children:"â"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-heading text-sm font-bold uppercase tracking-wide text-white",children:"Company"}),(0,r.jsxs)("ul",{className:"mt-4 flex flex-col gap-3",children:[(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/radio-hosting",className:v,children:"Radio Hosting"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/about",className:v,children:"About"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/pricing",className:v,children:"Pricing"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/book-a-demo",className:v,children:"Book a Call"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/contact",className:v,children:"Contact"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/case-studies",className:v,children:"Case Studies"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/customer-stories",className:v,children:"Customer Stories"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/blog",className:v,children:"Blog"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/changelog",className:v,children:"Changelog"})})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-heading text-sm font-bold uppercase tracking-wide text-white",children:(0,r.jsx)(h.default,{href:"/resources",className:"transition-colors hover:text-rc-gray-300",children:"Resources"})}),(0,r.jsxs)("ul",{className:"mt-4 flex flex-col gap-3",children:[(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/radio-bootcamp",className:v,children:"Radio Bootcamp"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/radio-bootcamp/how-to-start-an-online-radio-station",className:v,children:"How to Start a Station"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/online-radio-station-business-plan-template",className:v,children:"Business Plan Template"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/internet-radio-stream-checker",className:v,children:"Stream Checker"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/internet-radio-bandwidth-calculator",className:v,children:"Bandwidth Calculator"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/internet-radio-royalty-calculator",className:v,children:"Royalty Calculator"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/internet-radio-station-name-generator",className:v,children:"Station Name Generator"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/internet-radio-show-name-generator",className:v,children:"Show Name Generator"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/docs/api",className:v,children:"Developers"})}),(0,r.jsx)("li",{children:(0,r.jsx)("a",{href:"https://help.radiocult.fm",target:"_blank",rel:"noopener noreferrer",className:v,children:"Knowledge Base"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/listeners",className:v,children:"For Listeners"})})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-heading text-sm font-bold uppercase tracking-wide text-white",children:(0,r.jsx)(h.default,{href:"/compare",className:"transition-colors hover:text-rc-gray-300",children:"How Do We Compare?"})}),(0,r.jsxs)("ul",{className:"mt-4 flex flex-col gap-3",children:[(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/compare/airtime-pro",className:v,children:"vs Airtime Pro"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/compare/radio-co",className:v,children:"vs Radio.co"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/compare/radioking",className:v,children:"vs Radio King"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/compare/live365",className:v,children:"vs Live365"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/compare/azuracast",className:v,children:"vs AzuraCast"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/compare/mixlr",className:v,children:"vs Mixlr"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/compare/zeno-fm",className:v,children:"vs Zeno.fm"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/compare/radiojar",className:v,children:"vs Radiojar"})})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-heading text-sm font-bold uppercase tracking-wide text-white",children:"Migrate From"}),(0,r.jsx)("ul",{className:"mt-4 flex flex-col gap-3",children:(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/migrate/shoutcast",className:v,children:"Shoutcast"})})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-heading text-sm font-bold uppercase tracking-wide text-white",children:"Legal"}),(0,r.jsxs)("ul",{className:"mt-4 flex flex-col gap-3",children:[(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/broadcasters/privacy-policy",className:v,children:"Privacy Policy"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/broadcasters/terms-of-service",className:v,children:"Terms of Service"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/mobile/privacy-policy",className:v,children:"Mobile Privacy"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/mobile/terms-of-service",className:v,children:"Mobile Terms"})}),(0,r.jsx)("li",{children:(0,r.jsx)(h.default,{href:"/alexa/terms-of-service",className:v,children:"Alexa Terms"})})]})]})]}),(0,r.jsxs)("div",{className:"mt-16 flex flex-col items-center justify-between gap-6 border-t border-rc-gray-600 pt-8 md:flex-row",children:[(0,r.jsxs)("span",{className:"font-body text-xs font-light text-rc-gray-300",children:["© ",new Date().getFullYear()," RadioCult. All rights reserved."]}),(0,r.jsxs)("div",{className:"flex items-center gap-5",children:[(0,r.jsx)("a",{href:"https://www.facebook.com/radiocultapp",className:"text-rc-gray-300 transition-colors hover:text-white","aria-label":"Facebook",target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})})}),(0,r.jsx)("a",{href:"https://discord.gg/38wFKmBFjR",className:"text-rc-gray-300 transition-colors hover:text-white","aria-label":"Discord",target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 00.031.057 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128 10.2 10.2 0 00.372-.292.074.074 0 01.077-.01c3.928 1.793 8.18
11.793 12.062 0a.074.074 0 01.078.01c.12.098.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})})}),(0,r.jsx)("a",{href:"https://x.com/radio__cult",className:"text-rc-gray-300 transition-colors hover:text-white","aria-label":"X / Twitter",target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}),(0,r.jsx)("a",{href:"https://www.instagram.com/radio__cult/",className:"text-rc-gray-300 transition-colors hover:text-white","aria-label":"Instagram",target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M7.75 2h8.5A5.75 5.75 0 0122 7.75v8.5A5.75 5.75 0 0116.25 22h-8.5A5.75 5.75 0 012 16.25v-8.5A5.75 5.75 0 017.75 2zm0 1.5A4.25 4.25 0 003.5 7.75v8.5A4.25 4.25 0 007.75 20.5h8.5a4.25 4.25 0 004.25-4.25v-8.5A4.25 4.25 0 0016.25 3.5h-8.5zM12 7a5 5 0 110 10 5 5 0 010-10zm0 1.5a3.5 3.5 0 100 7 3.5 3.5 0 000-7zm5.25-2a.75.75 0 110 1.5.75.75 0 010-1.5z"})})})]})]})]})}),(0,r.jsx)(g,{})]});var y=e.i(38794),b=e.i(85628),x=e.i(50955);let w={src:e.i(69003).default,width:71,height:71,blurWidth:0,blurHeight:0},E={src:e.i(24131).default,width:422,height:71,blurWidth:0,blurHeight:0},k=[{label:"All features",href:"/features",description:"One platform for broadcasting, scheduling, and managing your station",icon:(0,r.jsx)(b.Icon,{icon:"dashboard",primaryColor:"#7bacff",label:"Overview",size:"medium"}),featured:!0},{label:"Unlimited listeners",href:"/features/unlimited-listeners",description:"Grow your audience without listener caps",icon:(0,r.jsx)(b.Icon,{icon:"headphones",primaryColor:"#fd813a",label:"Unlimited listeners",size:"medium"})},{label:"Broadcasting",href:"/features/broadcasting",description:"Broadcast with ease",icon:(0,r.jsx)(b.Icon,{icon:"broadcast",primaryColor:"#fd813a",label:"Broadcasting",size:"medium"})},{label:"Scheduling",href:"/features/scheduling",description:"Manage your station's schedule",icon:(0,r.jsx)(b.Icon,{icon:"calendar",primaryColor:"#33f551",label:"Scheduling",size:"medium"})},{label:"Station & artist management",href:"/features/station-and-artist-management",description:"All your hosts data in one place",icon:(0,r.jsx)(b.Icon,{icon:"people",primaryColor:"#33f551",label:"Artist management",size:"medium"})},{label:"Mobile app",href:"/features/mobile-app",description:"Your station's mobile home",icon:(0,r.jsx)(b.Icon,{icon:"mobile",primaryColor:"#7bacff",label:"Mobile app",size:"medium"})},{label:"Analytics",href:"/features/real-time-analytics",description:"Understand your audience",icon:(0,r.jsx)(b.Icon,{icon:"graph",primaryColor:"#7bacff",label:"Analytics",size:"medium"})},{label:"CMS & embeddable components",href:"/features/radio-cms-and-embeddable-components",description:"Power your site with RadioCult",icon:(0,r.jsx)(b.Icon,{icon:"code",primaryColor:"#fd813a",label:"CMS",size:"small"})},{label:"Chat room",href:"/features/chat-rooms",description:"Chat rooms on mobile and web",icon:(0,r.jsx)(b.Icon,{icon:"chat",primaryColor:"#fd813a",label:"Chat room",size:"small"})},{label:"Music recognition",href:"/features/music-recognition",description:"Log tracks and keep Now Playing accurate",icon:(0,r.jsx)(b.Icon,{icon:"fingerprint",primaryColor:"#33f551",label:"Music recognition",size:"medium"})},{label:"AI agents & API",href:"/features/radio-station-api-and-ai-agents",description:"Automate your station with agents or code",icon:(0,r.jsx)(b.Icon,{icon:"sparkle",primaryColor:"#33f551",label:"AI agents and API",size:"medium"})}],S=[{label:"Product Demo",href:"/demo",description:"Watch Charlie give a full tour",icon:(0,r.jsx)(b.Icon,{icon:"play",primaryColor:"#fd813a",label:"Product demo",
1size:"medium"})},{label:"Book a Call",href:"/book-a-demo",description:"Talk it through with us",icon:(0,r.jsx)(b.Icon,{icon:"calendar",primaryColor:"#fd813a",label:"Book a call",size:"medium"})},{label:"Case Studies",href:"/case-studies",description:"See how stations run on RadioCult",icon:(0,r.jsx)(y.PiPresentationChartDuotone,{size:24,color:"#33f551","aria-hidden":!0})},{label:"Customer Stories",href:"/customer-stories",description:"Hear from our customers",icon:(0,r.jsx)(b.Icon,{icon:"chat",primaryColor:"#33f551",label:"Customer stories",size:"medium"})},{label:"Blog",href:"/blog",description:"Keep up to date with RadioCult",icon:(0,r.jsx)(b.Icon,{icon:"file",primaryColor:"#7bacff",label:"Blog",size:"medium"})},{label:"Changelog",href:"/changelog",description:"See what's new in RadioCult",icon:(0,r.jsx)(b.Icon,{icon:"sparkle",primaryColor:"#7bacff",label:"Changelog",size:"medium"})},{label:"API Docs",href:"/docs/api",description:"For developers",icon:(0,r.jsx)(b.Icon,{icon:"code",primaryColor:"#fd813a",label:"API docs",size:"medium"})},{label:"Knowledge Base",href:"https://help.radiocult.fm/",description:"Find answers",icon:(0,r.jsx)(b.Icon,{icon:"question",primaryColor:"#fd813a",label:"Knowledge base",size:"medium"}),external:!0}],P=[{label:"All solutions",href:"/solutions",description:"See how RadioCult fits every kind of station",icon:(0,r.jsx)(b.Icon,{icon:"rocket",primaryColor:"#7bacff",label:"All solutions",size:"medium"}),featured:!0},{label:"Multi-presenter stations",href:"/solutions/multi-presenter-stations",description:"Coordinate presenters, shows, and live access",icon:(0,r.jsx)(b.Icon,{icon:"people",primaryColor:"#fd813a",label:"Multi-presenter stations",size:"medium"})},{label:"24/7 programming",href:"/solutions/24-7-online-radio-programming",description:"Keep your station on air around the clock",icon:(0,r.jsx)(b.Icon,{icon:"infinity",primaryColor:"#fd813a",label:"24/7 programming",size:"medium"})},{label:"Growing an audience",href:"/solutions/growing-an-online-radio-audience",description:"Reach and engage more listeners",icon:(0,r.jsx)(b.Icon,{icon:"graph",primaryColor:"#33f551",label:"Growing an audience",size:"medium"})},{label:"Leaving self-hosted software",href:"/solutions/moving-away-from-self-hosted-radio-software",description:"Move to a managed radio platform",icon:(0,r.jsx)(y.PiHardDrivesDuotone,{size:24,color:"#33f551","aria-hidden":!0})},{label:"Monetizing your station",href:"/solutions/monetizing-your-online-radio-station",description:"Package station value for sponsors and supporters",icon:(0,r.jsx)(y.PiCurrencyDollarDuotone,{size:24,color:"#7bacff","aria-hidden":!0})},{label:"Launching a station",href:"/solutions/launching-an-online-radio-station",description:"Start broadcasting with the core tools connected",icon:(0,r.jsx)(y.PiRocketLaunchDuotone,{size:24,color:"#7bacff","aria-hidden":!0})},{label:"Student & university radio",href:"/solutions/student-university-radio",description:"Run shows and access as contributors change",icon:(0,r.jsx)(y.PiGraduationCapDuotone,{size:24,color:"#fd813a","aria-hidden":!0})},{label:"Worship & church radio",href:"/solutions/worship-church-radio",description:"Share services, teaching, and live programming",icon:(0,r.jsx)(y.PiChurchDuotone,{size:24,color:"#fd813a","aria-hidden":!0})}],C=({open:e})=>(0,r.jsx)("svg",{className:`h-3 w-3 transition-transform ${e?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})}),j=({label:e,items:t,columns:i=1})=>{let[s,n]=(0,o.useState)(!1),a=(0,o.useRef)(null);(0,o.useEffect)(()=>{let e=e=>{a.current&&!a.current.contains(e.target)&&n(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let l=t.filter(e=>e.featured),c=t.filter(e=>!e.featured),u=e=>{let t=(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"mt-0.5 shrink-0",children:e.icon}),(0,r.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,r.jsx)("span",{className:"font-heading text-sm font-bold uppercase tracking-wide text-white",children:e.label}),(0,r.jsx)("span",{className:"font-body text-xs font-light normal-case tracking-normal text-rc-gray-300",children:e.description})]})]}),i="block rounded-lg px-3 py-2.5 transition-colors hover:bg-rc-gray-800";return e.external?(0,r.jsx)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",onClick:()=>n(!1),className:i,children:t},e.label):(0,r.jsx)(h.default,{href:e.href,onClick:()=>n(!1),className:i,children:t},e.label)};return(0,r.jsxs)("div",{ref:a,className:"relative",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>n(e=>!e),className:"flex cursor-pointer items-center gap-1 bg-transparent font-body text-sm font-light uppercase tracking-wide text-rc-gray-100 transition-all hover:font-semibold hover:text-white",children:[(0,r.jsx)("span",{className:"nav-link-stable","data-text":e,children:e}),(0,r.jsx)(C,{open:s})]}),(0,r.jsxs)("div",{className:`absolute left-1/2 top-full z-50 mt-4 -translate-x-1/2 roun
1ded-xl border border-rc-gray-600 bg-rc-dark p-3 shadow-xl transition-all duration-200 ${s?"visible opacity-100 translate-y-0":"invisible opacity-0 -translate-y-2"}`,style:{width:2===i?"490px":"280px"},children:[l.length>0&&(0,r.jsx)("div",{className:"mb-2 flex flex-col gap-0.5 border-b border-rc-gray-600 pb-2",children:l.map(u)}),(0,r.jsx)("div",{className:2===i?"grid grid-cols-2 gap-0.5":"flex flex-col gap-0.5",children:c.map(u)})]})]})},F={body:{backgroundColor:"#1B1C22"}},I={body:{backgroundColor:"#15171C"}},R=()=>{let e=(0,l.useRouter)(),[t,i]=(0,o.useState)(!1);if("/llm-info"===e.pathname)return null;let s=e.pathname.includes("/blog/")||e.pathname.includes("/radio-bootcamp/")||e.pathname.includes("/customer-stories/"),n="/docs/api"===e.pathname,c="/comparison"===e.pathname||"/alternative"===e.pathname,u="true"===e.query.hideNav;return(0,r.jsxs)(r.Fragment,{children:[s&&(0,r.jsx)(a.Global,{styles:[F]}),n&&(0,r.jsx)(a.Global,{styles:[I]}),(0,r.jsxs)("nav",{className:"relative z-20 mx-auto max-w-[1440px] px-4 py-6 min-[475px]:px-8 lg:px-16",style:{fontSize:"16px"},children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)(h.default,{href:"/",className:"flex items-center gap-3",children:[(0,r.jsx)("img",{src:w.src,alt:"",className:"h-6 w-auto"}),(0,r.jsx)("img",{src:E.src,alt:"RadioCult",className:"h-5 w-auto"})]}),!c&&!u&&(0,r.jsxs)("div",{className:"hidden items-center gap-8 font-body text-sm font-light uppercase tracking-wide text-rc-gray-100 min-[1050px]:flex",children:[(0,r.jsx)(j,{label:"Features",items:k,columns:2}),(0,r.jsx)(j,{label:"Solutions",items:P,columns:2}),(0,r.jsx)(h.default,{href:"/pricing",className:"nav-link-stable transition-all hover:font-semibold hover:text-white","data-text":"Pricing",children:"Pricing"}),(0,r.jsx)(j,{label:"Resources",items:S,columns:2}),(0,r.jsx)(h.default,{href:"/radio-bootcamp",className:"nav-link-stable transition-all hover:font-semibold hover:text-white","data-text":"Radio Bootcamp",children:"Radio Bootcamp"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 min-[475px]:gap-4",children:[(0,r.jsx)("a",{href:"https://app.radiocult.fm",target:"_blank",rel:"noopener noreferrer",className:"hidden font-heading text-sm font-bold uppercase tracking-wide text-white transition-colors hover:text-rc-orange-300 min-[1050px]:inline",children:"Log in"}),(0,r.jsxs)("a",{href:"https://app.radiocult.fm/sign-up",target:"_blank",rel:"noopener noreferrer",className:"group relative inline-flex items-center gap-2 rounded-full border border-rc-orange-300 bg-rc-black px-5 py-2 font-heading text-sm font-bold uppercase tracking-wide text-white shadow-[-1px_1px_0_0_#ffcda4,-2px_2px_0_0_#33f551,-3px_3px_0_0_#7bacff] transition-all hover:translate-x-[3px] hover:-translate-y-[3px] hover:bg-black hover:shadow-[-2px_2px_0_0_#ffcda4,-4px_4px_0_0_#33f551,-6px_6px_0_0_#7bacff]",children:["Get ",x.TRIAL_PERIOD_LENGTH_IN_DAYS," days free"]}),(0,r.jsx)("button",{type:"button",onClick:()=>i(e=>!e),"aria-label":"Toggle menu",className:"flex h-10 w-10 items-center justify-center border-none bg-transparent text-white min-[1050px]:hidden",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t?(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}):(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),(0,r.jsx)("div",{className:`-mx-2 overflow-hidden px-2 transition-all duration-300 ease-in-out min-[1050px]:hidden ${t?"max-h-[460px] opacity-100":"max-h-0 opacity-0"}`,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4 pb-4 pt-6 font-body text-sm font-light uppercase tracking-wide text-rc-gray-100",children:[!c&&!u&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.default,{href:"/features",onClick:()=>i(!1),className:"transition-all hover:font-semibold hover:text-white",children:"Features"}),(0,r.jsx)(h.default,{href:"/solutions",onClick:()=>i(!1),className:"transition-all hover:font-semibold hover:text-white",children:"Solutions"}),(0,r.jsx)(h.default,{href:"/pricing",onClick:()=>i(!1),className:"transition-all hover:font-semibold hover:text-white",children:"Pricing"}),(0,r.jsx)(h.default,{href:"/book-a-demo",onClick:()=>i(!1),className:"transition-all hover:font-semibold hover:text-white",children:"Book a Call"}),(0,r.jsx)(h.default,{href:"/customer-stories",onClick:()=>i(!1),className:"transition-all hover:font-semibold hover:text-white",children:"Customer Stories"}),(0,r.jsx)(h.default,{href:"/blog",onClick:()=>i(!1),className:"transition-all hover:font-semibold hover:text-white",children:"Blog"}),(0,r.jsx)(h.default,{href:"/radio-bootcamp",onClick:()=>i(!1),className:"transition-all hover:font-semibold hover:text-white",children:"Radio Bootcamp"}),(0,r.jsx)(h.default,{href:"/resources",onClick:()=>i(!1),className:"transition-all hover:font-semibold hover:text-white",children:"Resources"})]}),(0,r.jsx)("a",{href:"https://app.radiocult.fm",target:"_blank",rel:"noopener noreferrer",className:"font-heading text-sm font-bold uppercase tracking-wide text-white transition-colors hover:text-rc-orange-300",children:"Log in"}),(0,r.jsxs)("a",{href:"https://app.radiocult.fm/sign-up",target:"_blank",rel:"noopener noreferrer",className:"group w-fit roun
1ded-full border border-rc-orange-300 bg-rc-black px-5 py-2 font-heading text-sm font-bold uppercase tracking-wide text-white shadow-[-1px_1px_0_0_#ffcda4,-2px_2px_0_0_#33f551,-3px_3px_0_0_#7bacff] transition-all hover:translate-x-[3px] hover:-translate-y-[3px] hover:bg-black hover:shadow-[-2px_2px_0_0_#ffcda4,-4px_4px_0_0_#33f551,-6px_6px_0_0_#7bacff]",children:["Get ",x.TRIAL_PERIOD_LENGTH_IN_DAYS," days free"]})]})})]})]})};var $="u">typeof window?window:void 0,N="u">typeof globalThis?globalThis:$;"u"<typeof self&&(N.self=N),"u"<typeof File&&(N.File=function(){});var T=Array.prototype,O=T.forEach,M=T.indexOf,A=null==N?void 0:N.navigator,L=null==N?void 0:N.document,D=null==N?void 0:N.location,H=null==N?void 0:N.fetch,B=null!=N&&N.XMLHttpRequest&&"withCredentials"in new N.XMLHttpRequest?N.XMLHttpRequest:void 0,z=null==N?void 0:N.AbortController,U=null==A?void 0:A.userAgent,q=null!=$?$:{},G={DEBUG:!1,LIB_VERSION:"1.347.2"};function V(e,t,i,r,s,n,a){try{var o=e[n](a),l=o.value}catch(e){return void i(e)}o.done?t(l):Promise.resolve(l).then(r,s)}function W(e){return function(){var t=this,i=arguments;return new Promise(function(r,s){var n=e.apply(t,i);function a(e){V(n,r,s,a,o,"next",e)}function o(e){V(n,r,s,a,o,"throw",e)}a(void 0)})}}function Y(){return(Y=Object.assign.bind()).apply(null,arguments)}function J(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 K=["$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"],X=["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"],Z=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var i=e.toLowerCase();return X.concat(t).some(e=>{var t=e.toLowerCase();return -1!==i.indexOf(t)})};function Q(e,t){return -1!==e.indexOf(t)}var ee=function(e){return e.trim()},et=function(e){return e.replace(/^\$/,"")},ei=Array.isArray,er=Object.prototype,es=er.hasOwnProperty,en=er.toString,ea=ei||function(e){return"[object Array]"===en.call(e)},eo=e=>"function"==typeof e,el=e=>e===Object(e)&&!ea(e),ec=e=>{if(el(e)){for(var t in e)if(es.call(e,t))return!1;return!0}return!1},eu=e=>void 0===e,eh=e=>"[object String]"==en.call(e),ed=e=>eh(e)&&0===e.trim().length,ep=e=>null===e,eg=e=>eu(e)||ep(e),ef=e=>"[object Number]"==en.call(e)&&e==e,e_=e=>ef(e)&&e>0,ev=e=>"[object Boolean]"===en.call(e),em=e=>Q(K,e);function ey(e){return null===e||"object"!=typeof e}function eb(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function ex(e){return!eu(Event)&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var ew=[!0,"true",1,"1","yes"],eE=[!1,"false",0,"0","no"];function ek(e,t,i,r,s){return t>i&&(r.warn("min cannot be greater than max."),t=i),ef(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: "+s),ek(s||i,t,i,r))}class eS{constructor(e){this.t={},this.i=e.i,this.o=ek(e.bucketSize,0,100,e.h),this.m=ek(e.refillRate,0,this.o,e.h),this.$=ek(e.refillInterval,0,864e5,e.h)}S(e,t){var i=Math.floor((t-e.lastAccess)/this.$);if(i>0){var r=i*this.m;e.tokens=Math.min(e.tokens+r,this.o),e.lastAccess=e.lastAccess+i*this.$}}consumeRateLimit(e){var t,i=Date.now(),r=String(e),s=this.t[r];return s?this.S(s,i):(s={tokens:this.o,lastAccess:i},this.t[r]=s),0===s.tokens||(s.tokens--,0===s.tokens&&(null==(t=this.i)||t.call(this,e)),0===s.tokens)}stop(){this.t={}}}var eP,eC,ej,eF="Mobile",eI="Android",eR="Tablet",e$=eI+" "+eR,eN="iPad",eT="Ap
1ple",eO=eT+" Watch",eM="Safari",eA="BlackBerry",eL="Samsung",eD=eL+"Browser",eH=eL+" Internet",eB="Chrome",ez=eB+" OS",eU=eB+" iOS",eq="Internet Explorer",eG=eq+" "+eF,eV="Opera",eW=eV+" Mini",eY="Edge",eJ="Microsoft "+eY,eK="Firefox",eX=eK+" iOS",eZ="Nintendo",eQ="PlayStation",e0="Xbox",e1=eI+" "+eF,e2=eF+" "+eM,e3="Windows",e5=e3+" Phone",e4="Nokia",e7="Ouya",e8="Generic",e6=e8+" "+eF.toLowerCase(),e9=e8+" "+eR.toLowerCase(),te="Konqueror",tt="(\\d+(\\.\\d+)?)",ti=RegExp("Version/"+tt),tr=RegExp(e0,"i"),ts=RegExp(eQ+" \\w+","i"),tn=RegExp(eZ+" \\w+","i"),ta=RegExp(eA+"|PlayBook|BB10","i"),to={"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"},tl=function(e,t){var i;return t=t||"",Q(e," OPR/")&&Q(e,"Mini")?eW:Q(e," OPR/")?eV:ta.test(e)?eA:Q(e,"IE"+eF)||Q(e,"WPDesktop")?eG:Q(e,eD)?eH:Q(e,eY)||Q(e,"Edg/")?eJ:Q(e,"FBIOS")?"Facebook "+eF:Q(e,"UCWEB")||Q(e,"UCBrowser")?"UC Browser":Q(e,"CriOS")?eU:Q(e,"CrMo")||Q(e,eB)?eB:Q(e,eI)&&Q(e,eM)?e1:Q(e,"FxiOS")?eX:Q(e.toLowerCase(),te.toLowerCase())?te:(i=t)&&Q(i,eT)||Q(e,eM)&&!Q(e,eB)&&!Q(e,eI)?Q(e,eF)?e2:eM:Q(e,eK)?eK:Q(e,"MSIE")||Q(e,"Trident/")?eq:Q(e,"Gecko")?eK:""},tc={[eG]:[RegExp("rv:"+tt)],[eJ]:[RegExp(eY+"?\\/"+tt)],[eB]:[RegExp("("+eB+"|CrMo)\\/"+tt)],[eU]:[RegExp("CriOS\\/"+tt)],"UC Browser":[RegExp("(UCBrowser|UCWEB)\\/"+tt)],[eM]:[ti],[e2]:[ti],[eV]:[RegExp("(Opera|OPR)\\/"+tt)],[eK]:[RegExp(eK+"\\/"+tt)],[eX]:[RegExp("FxiOS\\/"+tt)],[te]:[RegExp("Konqueror[:/]?"+tt,"i")],[eA]:[RegExp(eA+" "+tt),ti],[e1]:[RegExp("android\\s"+tt,"i")],[eH]:[RegExp(eD+"\\/"+tt)],[eq]:[RegExp("(rv:|MSIE )"+tt)],Mozilla:[RegExp("rv:"+tt)]},tu=function(e,t){var i=tc[tl(e,t)];if(eu(i))return null;for(var r=0;r<i.length;r++){var s=i[r],n=e.match(s);if(n)return parseFloat(n[n.length-2])}return null},th=[[RegExp(e0+"; "+e0+" (.*?)[);]","i"),e=>[e0,e&&e[1]||""]],[RegExp(eZ,"i"),[eZ,""]],[RegExp(eQ,"i"),[eQ,""]],[ta,[eA,""]],[RegExp(e3,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[e5,""];if(new RegExp(eF).test(t)&&!/IEMobile\b/.test(t))return[e3+" "+eF,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var r=to[i[1]]||"";return/arm/i.test(t)&&(r="RT"),[e3,r]}return[e3,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?["iOS",[e[3],e[4],e[5]||"0"].join(".")]:["iOS",""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=eu(e[2])?e[3]:e[2]),["watchOS",t]}],[RegExp("("+eI+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+eI+")","i"),e=>e&&e[2]?[eI,[e[2],e[3],e[4]||"0"].join(".")]:[eI,""]],[/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/,[ez,""]],[/Linux|debian/i,["Linux",""]]],td=function(e){return tn.test(e)?eZ:ts.test(e)?eQ:tr.test(e)?e0:RegExp(e7,"i").test(e)?e7:RegExp("("+e5+"|WPDesktop)","i").test(e)?e5:/iPad/.test(e)?eN:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?eO:ta.test(e)?eA:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":RegExp(e4,"i").test(e)?e4:/(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(eF).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)?eI:e$:RegExp("(pda|"+eF+")","i").test(e)?e6:RegExp(eR,"i").test(e)&&!RegExp(eR+" pc","i").test(e)?e9:""},tp=e=>e instanceof Error;class tg{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),s=this.buildParsingContext(t),n=this.parseStacktrace(r,s);return{$exception_list:this.convertToExceptionList(n,i),$exception_level:"error"}}modifyFrames(e){var t=this;return W(function*(){for(var i of e)i.stacktrace&&i.stacktrace.frames&&ea(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?t.ski
1pFirstLines:0),t.chunkIdMap)),Y({},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 W(function*(){var i=e;for(var r of t.modifiers)i=yield r(i);return i})()}convertToExceptionList(e,t){var i,r,s,n={type:e.type,value:e.value,mechanism:{type:null!=(i=t.type)?i:"generic",handled:null==(r=t.handled)||r,synthetic:null!=(s=e.synthetic)&&s}};e.stack&&(n.stacktrace={type:"raw",frames:e.stack});var a=[n];return null!=e.cause&&a.push(...this.convertToExceptionList(e.cause,Y({},t,{handled:!0}))),a}buildParsingContext(e){var t;return{chunkIdMap:function(e){var t=globalThis._posthogChunkIds;if(t){var i=Object.keys(t);return ej&&i.length===eC||(eC=i.length,ej=i.reduce((i,r)=>{eP||(eP={});var s=eP[r];if(s)i[s[0]]=s[1];else for(var n=e(r),a=n.length-1;a>=0;a--){var o=n[a],l=null==o?void 0:o.filename,c=t[r];if(l&&c){i[l]=c,eP[r]=[l,c];break}}return i},{})),ej}}(this.stackParser),skipFirstLines:null!=(t=e.skipFirstLines)?t:1}}buildCoercingContext(e,t,i){void 0===i&&(i=0);var r=(i,r)=>{if(r<=4){var s=this.buildCoercingContext(e,t,r);return this.applyCoercers(i,s)}};return Y({},t,{syntheticException:0==i?t.syntheticException:void 0,mechanism:e,apply:e=>r(e,i),next:e=>r(e,i+1)})}}function tf(e,t,i,r,s){var n={platform:e,filename:t,function:"<anonymous>"===i?"?":i,in_app:!0};return eu(r)||(n.lineno=r),eu(s)||(n.colno=s),n}var t_=(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]:"?",i?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},tv=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,tm=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ty=/\((\S*)(?::(\d+))(?::(\d+))\)/,tb=(e,t)=>{var i=tv.exec(e);if(i){var[,r,s,n]=i;return tf(t,r,"?",+s,+n)}var a=tm.exec(e);if(a){if(a[2]&&0===a[2].indexOf("eval")){var o=ty.exec(a[2]);o&&(a[2]=o[1],a[3]=o[2],a[4]=o[3])}var[l,c]=t_(a[1]||"?",a[2]);return tf(t,c,l,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}},tx=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,tw=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,tE=(e,t)=>{var i=tx.exec(e);if(i){if(i[3]&&i[3].indexOf(" > eval")>-1){var r=tw.exec(i[3]);r&&(i[1]=i[1]||"eval",i[3]=r[1],i[4]=r[2],i[5]="")}var s=i[3],n=i[1]||"?";return[n,s]=t_(n,s),tf(t,s,n,i[4]?+i[4]:void 0,i[5]?+i[5]:void 0)}},tk=/\(error: (.*)\)/;class tS{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var i=eh(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 eb(e,"DOMException")}isDOMError(e){return eb(e,"DOMError")}}class tP{match(e){return e instanceof Error}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var i=e.message;return i.error&&"string"==typeof i.error.message?String(i.error.message):String(i)}getStack(e){return e.stacktrace||e.stack||void 0}}class tC{match(e){return eb(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 tj=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class tF{match(e){return"string"==typeof e}coerce(e,t){var i,[r,s]=this.getInfos(e);return{type:null!=r?r:"Error",value:null!=s?s:e,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}getInfos(e){var t="Error",i=e,r=e.match(tj);return r&&(t=r[1],i=r[2]),[t,i]}}var tI=["fatal","error","warning","log","info","debug"];function tR(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 s=i.slice(0,r).join(", ");
1if(!(s.length>t))return r===i.length||s.length<=t?s:s.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 ex(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: "+tR(e)}isSeverityLevel(e){return eh(e)&&!ed(e)&&tI.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var i=e[t];if(tp(i))return i}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class tN{match(e){return ex(e)}coerce(e,t){var i,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+tR(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class tT{match(e){return ey(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 tO{match(e){return eb(e,"PromiseRejectionEvent")}coerce(e,t){var i,r=this.getUnhandledRejectionReason(e);return ey(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(ey(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 tM=function(e,t){var{debugEnabled:i}=void 0===t?{}:t,r={k:function(t){if($&&(G.DEBUG||q.POSTHOG_DEBUG||i)&&!eu($.console)&&$.console){for(var r=("__rrweb_original__"in $.console[t])?$.console[t].__rrweb_original__:$.console[t],s=arguments.length,n=Array(s>1?s-1:0),a=1;a<s;a++)n[a-1]=arguments[a];r(e,...n)}},info:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];r.k("log",...t)},warn:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];r.k("warn",...t)},error:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];r.k("error",...t)},critical:function(){for(var t=arguments.length,i=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)=>tM(e+" "+t,i)};return r},tA=tM("[PostHog.js]"),tL=tA.createLogger,tD=tL("[ExternalScriptsLoader]"),tH=(e,t,i)=>{if(e.config.disable_external_dependency_loading)return tD.warn(t+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var r=null==L?void 0:L.querySelectorAll("script");if(r){for(var s,n=0;n<r.length;n++)if(s=function(){if(r[n].src===t){var e=r[n];return e.__posthog_loading_callback_fired?{v:i()}:(e.addEventListener("load",t=>{e.__posthog_loading_callback_fired=!0,i(void 0,t)}),e.onerror=e=>i(e),{v:void 0})}}())return s.v}var a=()=>{if(!L)return i("document not found");var r=L.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");if("head"===e.config.external_scripts_inject_target)L.head.appendChild(r);else{var s,n=L.querySelectorAll("body > script");n.length>0?null==(s=n[0].parentNode)||s.insertBefore(r,n[0]):L.body.appendChild(r)}};null!=L&&L.body?a():null==L||L.addEventListener("DOMContentLoaded",a)};q.__PosthogExtensions__=q.__PosthogExtensions__||{},q.__PosthogExtensions__.loadExternalDependency=(e,t,i)=>{var r="/static/"+t+".js?v="+e.version;"remote-config"===t&&(r="/array/"+e.config.token+"/config.js"),"toolbar"===t&&(r=r+"&t="+3e5*Math.floor(Date.now()/3e5));var s=e.requestRouter.endpointFor("assets",r);tH(e,s,i)},q.__PosthogExtensions__.loadSiteApp=(e,t,i)=>{var r=e.requestRouter.endpointFor("api",t);tH(e,r,i)};var tB={};function tz(e,t,i){if(ea(e)){if(O&&e.forEach===O)e.forEach(t,i);else if("length"in e&&e.length===+e.length){for(var r=0,s=e.length;r<s;r++)if(r in e&&t.call(i,e[r],r)===tB)return}}}function tU(e,t,i){if(!eg(e)){if(ea(e))return tz(e,t,i);if(e instanceof FormData){for(var r of e.entries())if(t.call(i,r[1],r[0])===tB)return}else for(var s in e)if(es.call(e,s)&&t.call(i,e[s],s)===tB)return}}var tq=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return tz(i,function(t){for(var i in t)void 0!==t[i]&&(e[i]=t[i])}),e},tG=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return tz(i,function(t){tz(t,function(t){e.push(t)})}),e};function tV(e){for(var t=Object.keys(e),i=t.length,r=Array(i);i--;)r[i]=[t[i],e[t[i]]];return r}var tW=function(e){try{return e()}catch(e){return}},tY=function(e){return function(){try{for(var t=arguments.length,i=Array(t),r=0;r<t;r++)i[r]=arguments[r];return e.apply(this,i)}catch(e){tA.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),tA.critical(e)}}},tJ=function(e){var t={};return tU(e,function(e,i){(eh(e)&&e.length>0||ef(e))&&(t[i]=e)}),t},tK=["herokuapp.com","vercel.app","netlify.app"];function tX(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return e[i]}function tZ(e,t,i,r){var{capture:s=!1,passive:n=!0}=null!=r?r:{};null==e||e.addEventListener(t,i,{capture:s,passive:n})}
1var tQ="$people_distinct_id",t0="__alias",t1="__timers",t2="$autocapture_disabled_server_side",t3="$heatmaps_enabled_server_side",t5="$exception_capture_enabled_server_side",t4="$error_tracking_suppression_rules",t7="$error_tracking_capture_extension_exceptions",t8="$web_vitals_enabled_server_side",t6="$dead_clicks_enabled_server_side",t9="$product_tours_enabled_server_side",ie="$web_vitals_allowed_metrics",it="$session_recording_remote_config",ii="$sesid",ir="$session_is_sampled",is="$enabled_feature_flags",ia="$early_access_features",io="$feature_flag_details",il="$stored_person_properties",ic="$stored_group_properties",iu="$surveys",ih="$flag_call_reported",id="$feature_flag_errors",ip="$user_state",ig="$client_session_props",i_="$capture_rate_limit",iv="$initial_campaign_params",im="$initial_referrer_info",iy="$initial_person_info",ib="$epp",ix="__POSTHOG_TOOLBAR__",iw="$posthog_cookieless",iE=[tQ,t0,"__cmpns",t1,"$session_recording_enabled_server_side",t3,ii,is,t4,ip,ia,io,ic,il,iu,ih,id,ig,i_,iv,im,ib,iy,"$conversations_widget_session_id","$conversations_ticket_id","$conversations_widget_state","$conversations_user_traits"];function ik(e){return e instanceof Element&&(e.id===ix||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function iS(e){return!!e&&1===e.nodeType}function iP(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function iC(e){return!!e&&3===e.nodeType}function ij(e){return!!e&&11===e.nodeType}function iF(e){return e?ee(e).split(/\s+/):[]}function iI(e){var t=null==$?void 0:$.location.href;return!!(t&&e&&e.some(e=>t.match(e)))}function iR(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 iF(t)}function i$(e){return eg(e)?null:ee(e).split(/(\s+)/).filter(e=>iK(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function iN(e){var t="";return iz(e)&&!iU(e)&&e.childNodes&&e.childNodes.length&&tU(e.childNodes,function(e){var i;iC(e)&&e.textContent&&(t+=null!=(i=i$(e.textContent))?i:"")}),ee(t)}function iT(e){var t;return eu(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}var iO=["a","button","form","input","select","textarea","label"];function iM(e,t){if(eu(t))return!0;var i,r=function(e){if(t.some(t=>e.matches(t)))return{v:!0}};for(var s of e)if(i=r(s))return i.v;return!1}function iA(e){var t=e.parentNode;return!(!t||!iS(t))&&t}var iL=["next","previous","prev",">","<"],iD=[".ph-no-rageclick",".ph-no-capture"],iH=e=>!e||iP(e,"html")||!iS(e),iB=(e,t)=>{if(!$||iH(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var i=!1,r=[e],s=e;s.parentNode&&!iP(s,"body");)if(ij(s.parentNode))r.push(s.parentNode.host),s=s.parentNode.host;else{var n=iA(s);if(!n)break;if(t||iO.indexOf(n.tagName.toLowerCase())>-1)i=!0;else{var a=$.getComputedStyle(n);a&&"pointer"===a.getPropertyValue("cursor")&&(i=!0)}r.push(n),s=n}return{parentIsUsefulElement:i,targetElementList:r}};function iz(e){for(var t=e;t.parentNode&&!iP(t,"body");t=t.parentNode){var i=iR(t);if(Q(i,"ph-sensitive")||Q(i,"ph-no-capture"))return!1}if(Q(iR(e),"ph-include"))return!0;var r=e.type||"";if(eh(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var s=e.name||e.id||"";return!(eh(s)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(s.replace(/[^a-zA-Z0-9]/g,"")))}function iU(e){return!!(iP(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||iP(e,"select")||iP(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var iq="(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})",iG=RegExp("^(?:"+iq+")$"),iV=new RegExp(iq),iW="\\d{3}-?\\d{2}-?\\d{4}",iY=RegExp("^("+iW+")$"),iJ=RegExp("("+iW+")");function iK(e,t){return void 0===t&&(t=!0),!(eg(e)||eh(e)&&(e=ee(e),(t?iG:iV).test((e||"").replace(/[- ]/g,""))||(t?iY:iJ).test(e)))&&!0}function iX(e){var t=iN(e);return iK(t=(t+" "+function e(t){var i="";return t&&t.childNodes&&t.childNodes.length&&tU(t.childNodes,function(t){var r;if(t&&"span"===(null==(r=t.tagName)?void 0:r.toLowerCase()))try{var s=iN(t);i=(i+" "+s).trim(),t.childNodes&&t.childNodes.length&&(i=(i+" "+e(t)).trim())}catch(e){tA.error("[AutoCapture]",e)}}),i}(e)).trim())?t:""}function iZ(e){return e.replace(/"|\\"/g,'\\"')}class iQ{constructor(e){this.disabled=!1===e;var t=el(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 i0=e=>{var t=null==L?void 0:L.createElement("a");return eu(t)?null:(t.href=e,t)},i1=function(e,t){void 0===t&&(t="&");var i,r,s=[];return tU(e,function(e,t){eu(e)||eu(t)||"undefined"===t||(i=encodeURIComponent(e instanceof File?e.name:e.toString()),r=encodeURIComponent(t),s[s.length]=r+"="+i)}),s.join(t)},i2=function(e,t){for(var i,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;s<r.length;s++){var n=r[s].split("=");if(n[0]===t){i=n;break}}if(!ea(i)||i.length<2)return"";var a=i[1];try{a=decodeURIComponent(a)}catch(e){tA.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},i3=function(e,t,i){if(!e||!t||!t.length)return e;for(var r=e.split("#"),s=r[0]||"",n=r[1],a=s.split("?"),o=a[1],l=a[0],c=(o||"").split("&"),u=[],h=0;h<c.length;h++){var d=c[h].split("=");ea(d)&&(t.includes(d[0])?u.push(d[0]+"="+i):u.push(c[h]))}var p=l;return null!=o&&(p+="?"+u.join("&")),null!=n&&(p+="#"+n),p},i5=function(e,t){var i=e.match(RegExp(t+"=([^&]*)"));return i?i[1]:null},i4="$copy_autocapture",i7=tL("[AutoCapture]");function i8(e,t){return t.length>e?t.slice(0,e)+"...":t}class i6{constructor(e){this.P=!1,this.T=null,this.I=!1,this.instance=e,this.rageclicks=new iQ(e.config.rageclick),this.C=null}get R(){var e,t,i=el(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}
1F(){if(this.isBrowserSupported()){if($&&L){var e=e=>{e=e||(null==$?void 0:$.event);try{this.O(e)}catch(e){i7.error("Failed to capture event",e)}};if(tZ(L,"submit",e,{capture:!0}),tZ(L,"change",e,{capture:!0}),tZ(L,"click",e,{capture:!0}),this.R.capture_copied_text){var t=e=>{e=e||(null==$?void 0:$.event),this.O(e,i4)};tZ(L,"copy",t,{capture:!0}),tZ(L,"cut",t,{capture:!0})}}}else i7.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({[t2]:!!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==L?void 0:L.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[t2];if(ep(this.T)&&!ev(i)&&!this.instance.M())return!1;var r=null!=(t=this.T)?t:!!i;return!!this.instance.config.autocapture&&!r}O(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var i,r=iT(e);iC(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(!$||iH(e)||(ev(t)?(i=!!t&&iD,r=void 0):(i=null!=(s=null==t?void 0:t.css_selector_ignorelist)?s:iD,r=null==t?void 0:t.content_ignorelist),!1===i))return!1;var i,r,s,{targetElementList:n}=iB(e,!1);return!function(e,t){var i;if(!1===e||eu(e))return!1;if(!0===e)i=iL;else{if(!ea(e))return!1;if(e.length>10)return tA.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,n.map(e=>{var t;return{safeText:iN(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}}))&&!iM(n,i)}(r,this.instance.config.rageclick)&&this.O(e,"$rageclick");var s=t===i4;if(r&&function(e,t,i,r,s){if(void 0===i&&(i=void 0),!$||iH(e)||null!=(n=i)&&n.url_allowlist&&!iI(i.url_allowlist)||null!=(a=i)&&a.url_ignorelist&&iI(i.url_ignorelist))return!1;if(null!=(o=i)&&o.dom_event_allowlist){var n,a,o,l,c=i.dom_event_allowlist;if(c&&!c.some(e=>t.type===e))return!1}var{parentIsUsefulElement:u,targetElementList:h}=iB(e,r);if(!function(e,t){var i=null==t?void 0:t.element_allowlist;if(eu(i))return!0;var r,s=function(e){if(i.some(t=>e.tagName.toLowerCase()===t))return{v:!0}};for(var n of e)if(r=s(n))return r.v;return!1}(h,i)||!iM(h,null==(l=i)?void 0:l.css_selector_allowlist))return!1;var d=$.getComputedStyle(e);if(d&&"pointer"===d.getPropertyValue("cursor")&&"click"===t.type)return!0;var p=e.tagName.toLowerCase();switch(p){case"html":return!1;case"form":return(s||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(s||["change","click"]).indexOf(t.type)>=0;default:return u?(s||["click"]).indexOf(t.type)>=0:(s||["click"]).indexOf(t.type)>=0&&(iO.indexOf(p)>-1||"true"===e.getAttribute("contenteditable"))}}(r,e,this.R,s,s?["copy","cut"]:void 0)){var{props:n,explicitNoCapture:a}=function(e,t){for(var i,r,{e:s,maskAllElementAttributes:n,maskAllText:a,elementAttributeIgnoreList:o,elementsC
1hainAsString:l}=t,c=[e],u=e;u.parentNode&&!iP(u,"body");)ij(u.parentNode)?(c.push(u.parentNode.host),u=u.parentNode.host):(c.push(u.parentNode),u=u.parentNode);var h,d=[],p={},g=!1,f=!1;if(tU(c,e=>{var t=iz(e);"a"===e.tagName.toLowerCase()&&(g=e.getAttribute("href"),g=t&&g&&iK(g)&&g),Q(iR(e),"ph-no-capture")&&(f=!0),d.push(function(e,t,i,r){var s=e.tagName.toLowerCase(),n={tag_name:s};iO.indexOf(s)>-1&&!i&&("a"===s.toLowerCase()||"button"===s.toLowerCase()?n.$el_text=i8(1024,iX(e)):n.$el_text=i8(1024,iN(e)));var a=iR(e);a.length>0&&(n.classes=a.filter(function(e){return""!==e})),tU(e.attributes,function(i){var s;if((!iU(e)||-1!==["name","id","class","aria-label"].indexOf(i.name))&&(null==r||!r.includes(i.name))&&!t&&iK(i.value)&&(!eh(s=i.name)||"_ngcontent"!==s.substring(0,10)&&"_nghost"!==s.substring(0,7))){var a=i.value;"class"===i.name&&(a=iF(a).join(" ")),n["attr__"+i.name]=i8(1024,a)}});for(var o=1,l=1,c=e;c=function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!iS(t))return t}(c);)o++,c.tagName===e.tagName&&l++;return n.nth_child=o,n.nth_of_type=l,n}(e,n,a,o)),tq(p,function(e){if(!iz(e))return{};var t={};return tU(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&&iK(r)&&(t[i]=r)}}),t}(e))}),f)return{props:{},explicitNoCapture:f};if(a||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?d[0].$el_text=iX(e):d[0].$el_text=iN(e)),g){d[0].attr__href=g;var _,v,m=null==(_=i0(g))?void 0:_.host,y=null==$||null==(v=$.location)?void 0:v.host;m&&y&&m!==y&&(h=g)}return{props:tq({$event_type:s.type,$ce_version:1},l?{}:{$elements:d},{$elements_chain:d.map(e=>{var t,i,r,s={text:null==(i=e.$el_text)?void 0:i.slice(0,400),tag_name:e.tag_name,href:null==(r=e.attr__href)?void 0:r.slice(0,2048),attr_class:(t=e.attr__class)?ea(t)?t:iF(t):void 0,attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return tV(e).filter(e=>{var[t]=e;return 0===t.indexOf("attr__")}).forEach(e=>{var[t,i]=e;return s.attributes[t]=i}),s}).map(e=>{var t,i,r="";if(e.tag_name&&(r+=e.tag_name),e.attr_class)for(var s of(e.attr_class.sort(),e.attr_class))r+="."+s.replace(/"/g,"");var n=Y({},e.text?{text:e.text}:{},{"nth-child":null!=(t=e.nth_child)?t:0,"nth-of-type":null!=(i=e.nth_of_type)?i:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),a={};return tV(n).sort((e,t)=>{var[i]=e,[r]=t;return i.localeCompare(r)}).forEach(e=>{var[t,i]=e;return a[iZ(t.toString())]=iZ(i.toString())}),r+=":",r+=tV(a).map(e=>{var[t,i]=e;return t+'="'+i+'"'}).join("")}).join(";")},null!=(i=d[0])&&i.$el_text?{$el_text:null==(r=d[0])?void 0:r.$el_text}:{},h&&"click"===s.type?{$external_click_url:h}:{},p)}}(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(a)return!1;var o=this.getElementSelectors(r);if(o&&o.length>0&&(n.$element_selectors=o),t===i4){var l,c=i$(null==$||null==(l=$.getSelection())?void 0:l.toString()),u=e.type||"clipboard";if(!c)return!1;n.$selected_content=c,n.$copy_type=u}return this.instance.capture(t,n),!0}}}isBrowserSupported(){return eo(null==L?void 0:L.querySelectorAll)}}Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return ef(e)&&isFinite(e)&&Math.floor(e)===e});var i9="0123456789abcdef";class re{constructor(e){if(this.bytes=e,16!==e.length)throw 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>0x3fffffff||r>0xffffffff)throw RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/0x10000000000,s[1]=e/0x100000000,s[2]=e/0x1000000,s[3]=e/65536,s[4]=e/256,s[5]=e,s[6]=112|t>>>8,s[7]=t,s[8]=128|i>>>24,s[9]=i>>>16,s[10]=i>>>8,s[11]=i,s[12]=r>>>24,s[13]=r>>>16,s[14]=r>>>8,s[15]=r,new re(s)}toString(){for(var e="",t=0;t<this.bytes.length;t++)e=e+i9.charAt(this.bytes[t]>>>4)+i9.charAt(15&this.bytes[t]),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw Error("Invalid UUIDv7 was generated");return e}clone(){return new re(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 rt{constructor(){this.A=0,this.j=0,this.D=new rs}generate(){var e=this.generateOrAbort();if(eu(e)){this.A=0;var t=this.generateOrAbort();if(eu(t))throw 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.j++,this.j>
10x3ffffffffff&&(this.A++,this.L())}return re.fromFieldsV7(this.A,Math.trunc(this.j/0x40000000),0x3fffffff&this.j,this.D.nextUint32())}L(){this.j=1024*this.D.nextUint32()+(1023&this.D.nextUint32())}}var ri,rr=e=>{if("u">typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};$&&!eu($.crypto)&&crypto.getRandomValues&&(rr=e=>crypto.getRandomValues(e));class rs{constructor(){this.N=new Uint32Array(8),this.U=1/0}nextUint32(){return this.U>=this.N.length&&(rr(this.N),this.U=0),this.N[this.U++]}}var rn=()=>ra().toString(),ra=()=>(ri||(ri=new rt)).generate(),ro="",rl=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,rc={H:()=>!!L,B:function(e){tA.error("cookieStore error: "+e)},q:function(e){if(L){try{for(var t=e+"=",i=L.cookie.split(";").filter(e=>e.length),r=0;r<i.length;r++){for(var s=i[r];" "==s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(t))return decodeURIComponent(s.substring(t.length,s.length))}}catch(e){}return null}},W:function(e){var t;try{t=JSON.parse(rc.q(e))||{}}catch(e){}return t},G:function(e,t,i,r,s){if(L)try{var n="",a="",o=function(e,t){if(t){var i=function(e,t){if(void 0===t&&(t=L),ro)return ro;if(!t||["localhost","127.0.0.1"].includes(e))return"";for(var i=e.split("."),r=Math.min(i.length,8),s="dmn_chk_"+rn();!ro&&r--;){var n=i.slice(r).join("."),a=s+"=1;domain=."+n+";path=/";t.cookie=a+";max-age=3",t.cookie.includes(s)&&(t.cookie=a+";max-age=0",ro=n)}return ro}(e);if(!i){var r,s=(r=e.match(rl))?r[0]:"";s!==i&&tA.info("Warning: cookie subdomain discovery mismatch",s,i),i=s}return i?"; domain=."+i:""}return""}(L.location.hostname,r);if(i){var l=new Date;l.setTime(l.getTime()+24*i*36e5),n="; expires="+l.toUTCString()}s&&(a="; secure");var c=e+"="+encodeURIComponent(JSON.stringify(t))+n+"; SameSite=Lax; path=/"+o+a;return c.length>3686.4&&tA.warn("cookieStore warning: large cookie, len="+c.length),L.cookie=c,c}catch(e){return}},V:function(e,t){if(null!=L&&L.cookie)try{rc.G(e,"",-1,t)}catch(e){return}}},ru=null,rh={H:function(){if(!ep(ru))return ru;var e=!0;if(eu($))e=!1;else try{var t="__mplssupport__";rh.G(t,"xyz"),'"xyz"'!==rh.q(t)&&(e=!1),rh.V(t)}catch(t){e=!1}return e||tA.error("localStorage unsupported; falling back to cookie store"),ru=e,e},B:function(e){tA.error("localStorage error: "+e)},q:function(e){try{return null==$?void 0:$.localStorage.getItem(e)}catch(e){rh.B(e)}return null},W:function(e){try{return JSON.parse(rh.q(e))||{}}catch(e){}return null},G:function(e,t){try{null==$||$.localStorage.setItem(e,JSON.stringify(t))}catch(e){rh.B(e)}},V:function(e){try{null==$||$.localStorage.removeItem(e)}catch(e){rh.B(e)}}},rd=["$device_id","distinct_id",ii,ir,ib,iy],rp={},rg={H:function(){return!0},B:function(e){tA.error("memoryStorage error: "+e)},q:function(e){return rp[e]||null},W:function(e){return rp[e]||null},G:function(e,t){rp[e]=t},V:function(e){delete rp[e]}},rf=null,r_={H:function(){if(!ep(rf))return rf;if(rf=!0,eu($))rf=!1;else try{var e="__support__";r_.G(e,"xyz"),'"xyz"'!==r_.q(e)&&(rf=!1),r_.V(e)}catch(e){rf=!1}return rf},B:function(e){tA.error("sessionStorage error: ",e)},q:function(e){try{return null==$?void 0:$.sessionStorage.getItem(e)}catch(e){r_.B(e)}return null},W:function(e){try{return JSON.parse(r_.q(e))||null}catch(e){}return null},G:function(e,t){try{null==$||$.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){r_.B(e)}},V:function(e){try{null==$||$.sessionStorage.removeItem(e)}catch(e){r_.B(e)}}},rv=((nY={})[nY.PENDING=-1]="PENDING",nY[nY.DENIED=0]="DENIED",nY[nY.GRANTED=1]="GRANTED",nY);class rm{constructor(e){this._instance=e}get R(){return this._instance.config}get consent(){return this.J()?rv.DENIED:this.K}isOptedOut(){return"always"===this.R.cookieless_mode||this.consent===rv.DENIED||this.consent===rv.PENDING&&(this.R.opt_out_capturing_by_default||"on_reject"===this.R.cookieless_mode)}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===rv.DENIED}optInOut(e){this.Y.G(this.X,+!!e,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;
1return i||(t?t+e:"__ph_opt_in_out_"+e)}get K(){var e=this.Y.q(this.X);return Q(ew,e)?rv.GRANTED:Q(eE,e)?rv.DENIED:rv.PENDING}get Y(){if(!this.Z){var e=this.R.opt_out_capturing_persistence_type;this.Z="localStorage"===e?rh:rc;var t="localStorage"===e?rc:rh;t.q(this.X)&&(this.Z.q(this.X)||this.optInOut(Q(ew,t.q(this.X))),t.V(this.X,this.R.cross_subdomain_cookie))}return this.Z}J(){return!!this.R.respect_dnt&&!!tX([null==A?void 0:A.doNotTrack,null==A?void 0:A.msDoNotTrack,q.doNotTrack],e=>Q(ew,e))}}var ry=tL("[Dead Clicks]"),rb=()=>!0,rx=e=>{var t,i=!(null==(t=e.instance.persistence)||!t.get_property(t6)),r=e.instance.config.capture_dead_clicks;return ev(r)?r:!!el(r)||i};class rw{get lazyLoadedDeadClicksAutocapture(){return this.tt}constructor(e,t,i){this.instance=e,this.isEnabled=t,this.onCapture=i,this.startIfEnabledOrStop()}onRemoteConfig(e){this.instance.persistence&&this.instance.persistence.register({[t6]:null==e?void 0:e.captureDeadClicks}),this.startIfEnabledOrStop()}startIfEnabledOrStop(){this.isEnabled(this)?this.it(()=>{this.et()}):this.stop()}it(e){var t,i;null!=(t=q.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(i=q.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?ry.error("failed to load script",t):e()})}et(){var e;if(L){if(!this.tt&&null!=(e=q.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=el(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.tt=q.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.tt.start(L),ry.info("starting...")}}else ry.error("`document` not found. Cannot start.")}stop(){this.tt&&(this.tt.stop(),this.tt=void 0,ry.info("stopping..."))}}var rE=tL("[ExceptionAutocapture]");class rk{constructor(e){var t,i,r;this.rt=()=>{var e;if($&&this.isEnabled&&null!=(e=q.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=q.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=q.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=q.__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(e){rE.error("failed to start",e),this.ut()}}},this._instance=e,this.ht=!(null==(t=this._instance.persistence)||!t.props[t5]),this.dt=new eS({refillRate:null!=(i=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)?i:1,bucketSize:null!=(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)?r:10,refillInterval:1e4,h:rE}),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 el(e)?t=Y({},t,e):(eu(e)?this.ht:e)&&(t=Y({},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?(rE.info("enabled"),this.ut(),this.it(this.rt)):this.ut()}it(e){var t,i;null!=(t=q.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(i=q.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return rE.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,this._instance.persistence&&this._instance.persistence.register({[t5]: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)?t:"Exception";this.dt.consumeRateLimit(r)?rE.info("Skipping exception capture because of client rate limiting.",{exception:r}):this._instance.exceptions.sendExceptionEvent(e)}}function rS(e,t,i){try{if(!(t in e))return()=>{};var r=e[t],s=i(r);return eo(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=s,()=>{e[t]=r}}catch(e){return()=>{}}}class rP{constructor(e){var t;this._instance=e,this.ct=(null==$||null==(t=$.location)?void 0:t.pathname)||""}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(tA.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.ft&&this.ft(),this.ft=void 0,tA.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if($&&$.history){var i=this;null!=(e=$.history.pushState)&&e.__posthog_wrapped__||rS($.history,"pushState",e=>function(t,r,s){e.call(this,t,r,s),i._t("pushState")}),null!=(t=$.history.replaceState)&&t.__posthog_wrapped__||rS($.history,"replaceState",e=>function(t,r,s){e.call(this,t,r,s),i._t("replaceState")}),this.bt()}}_t(e){try{var t,i=null==$||null==(t=$.location)?void 0:t.pathname;if(!i)return;i!==this.ct&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this.ct=i}catch(t){tA.error("Error capturing "+e+" pageview",t)}}
1bt(){if(!this.ft){var e=()=>{this._t("popstate")};tZ($,"popstate",e),this.ft=()=>{$&&$.removeEventListener("popstate",e)}}}}var rC=tL("[SegmentIntegration]"),rj="posthog-js";function rF(e,t){var{organization:i,projectId:r,prefix:s,severityAllowList:n=["error"],sendExceptionsToPostHog:a=!0}=void 0===t?{}:t;return t=>{if(!("*"===n||n.includes(t.level))||!e.__loaded)return t;t.tags||(t.tags={});var o,l,c,u,h,d=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());t.tags["PostHog Person URL"]=d,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p=(null==(o=t.exception)?void 0:o.values)||[],g=p.map(e=>Y({},e,{stacktrace:e.stacktrace?Y({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>Y({},e,{platform:"web:javascript"}))}):void 0})),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:g,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(u=p[0])?void 0:u.value)||t.message,$sentry_exception_type:null==(h=p[0])?void 0:h.type,$sentry_tags:t.tags};return i&&r&&(f.$sentry_url=(s||"https://sentry.io/organizations/")+i+"/issues/?project="+r+"&query="+t.event_id),a&&e.exceptions.sendExceptionEvent(f),t}}class rI{constructor(e,t,i,r,s,n){this.name=rj,this.setupOnce=function(a){a(rF(e,{organization:t,projectId:i,prefix:r,severityAllowList:s,sendExceptionsToPostHog:null==n||n}))}}}var rR=null!=$&&$.location?i5($.location.hash,"__posthog")||i5(location.hash,"state"):null,r$="_postHogToolbarParams",rN=tL("[Toolbar]"),rT=((nJ=rT||{})[nJ.UNINITIALIZED=0]="UNINITIALIZED",nJ[nJ.LOADING=1]="LOADING",nJ[nJ.LOADED=2]="LOADED",nJ);class rO{constructor(e){this.instance=e}yt(e){q.ph_toolbar_state=e}wt(){var e;return null!=(e=q.ph_toolbar_state)?e:rT.UNINITIALIZED}maybeLoadToolbar(e,t,i){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),this.instance.config.name&&"ph_toolbar_internal"===this.instance.config.name||!$||!L)return!1;e=null!=e?e:$.location,i=null!=i?i:$.history;try{if(!t){try{$.localStorage.setItem("test","test"),$.localStorage.removeItem("test")}catch(e){return!1}t=null==$?void 0:$.localStorage}var r,s=rR||i5(e.hash,"__posthog")||i5(e.hash,"state"),n=s?tW(()=>JSON.parse(atob(decodeURIComponent(s))))||tW(()=>JSON.parse(decodeURIComponent(s))):null;return n&&"ph_authorize"===n.action?((r=n).source="url",r&&Object.keys(r).length>0&&(n.desiredHash?e.hash=n.desiredHash:i?i.replaceState(i.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(r$)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token)&&(this.loadToolbar(r),!0)}catch(e){return!1}}xt(e){var t=q.ph_load_toolbar||q.ph_load_editor;!eg(t)&&eo(t)?t(e,this.instance):rN.warn("No toolbar load function found")}loadToolbar(e){var t,i=!(null==L||!L.getElementById(ix));if(!$||i)return!1;var r="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,s=Y({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});return($.localStorage.setItem(r$,JSON.stringify(Y({},s,{source:void 0}))),this.wt()===rT.LOADED)?this.xt(s):this.wt()===rT.UNINITIALIZED&&(this.yt(rT.LOADING),null==(t=q.__PosthogExtensions__)||null==t.loadExternalDependency||t.loadExternalDependency(this.instance,"toolbar",e=>{e?(rN.error("[Toolbar] Failed to load",e),this.yt(rT.UNINITIALIZED)):(this.yt(rT.LOADED),this.xt(s))}),tZ($,"turbolinks:load",()=>{this.yt(rT.UNINITIALIZED),this.loadToolbar(s)})),!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 rM=tL("[TracingHeaders]");class rA{constructor(e){this.$t=void 0,this.St=void 0,this.rt=()=>{var e,t;eu(this.$t)&&(null==(e=q.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),eu(this.St)&&(null==(t=q.__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=q.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(i=q.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return rM.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 rL="https?://(.*)",rD=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],rH=tG(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],rD),rB="<masked>",rz=["li_fat_id"];function rU(e,t,i){if(!L)return{};var r,s=t?tG([],rD,i||[]):[],n=rq(i3(L.URL,s,rB),e);return tq((r={},tU(rz,function(e){var t=rc.q(e);r[e]=t||null}),r),n)}function rq(e,t){var i=rH.concat(t||[]),r={};return tU(i,function(t){var i=i2(e,t);r[t]=i||null}),r}function rG(e){var t=e?0===e.search(rL+"google.([^/?]*)")?"google":0===e.search(rL+"bing.com")?"bing":0===e.search(rL+"yahoo.com")?"yahoo":0===e.search(rL+"duckduckgo.com")?"duckduckgo":null:null,i={};if(!ep(t)){i.$search_engine=t;var r=L?i2(L.referrer,"yahoo"!=t?"q":"p"):"";r.length&&(i.ph_keyword=r)}return i}function rV(){return navigator.language||navigator.userLanguage}function rW(){return(null==L?void 0:L.referrer)||"$direct"}function rY(e,t){var i=e?tG([],rD,t||[]):[],r=null==D?void 0:D.href.substring(0,1e3);return{r:rW().substring(0,1e3),u:r?i3(r,i,rB):void 0}}function rJ(e){var t,{r:i,u:r}=e,s={$referrer:i,$referring_domain:null==i?void 0:"$direct"==i?"$direct":null==(t=i0(i))?void 0:t.host};
1if(r){s.$current_url=r;var n=i0(r);s.$host=null==n?void 0:n.host,s.$pathname=null==n?void 0:n.pathname,tq(s,rq(r))}return i&&tq(s,rG(i)),s}function rK(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}var rX=tL("[Web Vitals]");class rZ{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)=>Y({},e,{["$web_vitals_"+t.name+"_event"]:Y({},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(eu(i))rX.error("Could not read session ID. Dropping metrics!");else{this.N=this.N||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var r=this.Ct();eu(r)||(eg(null==e?void 0:e.name)||eg(null==e?void 0:e.value)?rX.error("Invalid metric received",e):this.Rt&&e.value>=this.Rt?rX.error("Ignoring metric with value >= "+this.Rt,e):(this.N.url!==r&&(this.Pt(),this.Tt=setTimeout(this.Pt,this.flushToCaptureTimeoutMs)),eu(this.N.url)&&(this.N.url=r),this.N.firstMetricTimestamp=eu(this.N.firstMetricTimestamp)?Date.now():this.N.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0),this.N.metrics.push(Y({},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=()=>{if(!this.P){var e,t,i,r,s=q.__PosthogExtensions__;eu(s)||eu(s.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:i,onINP:r}=s.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):rX.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.kt=!(null==(t=this._instance.persistence)||!t.props[t8]),this.startIfEnabled()}get allowedMetrics(){var e,t,i=el(this._instance.config.capture_performance)?null==(e=this._instance.config.capture_performance)?void 0:e.web_vitals_allowed_metrics:void 0;return eg(i)?(null==(t=this._instance.persistence)?void 0:t.props[ie])||["CLS","FCP","INP","LCP"]:i}get flushToCaptureTimeoutMs(){return(el(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=el(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_attribution:void 0;return null!=e&&e}get Rt(){var e=el(this._instance.config.capture_performance)&&ef(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:9e5;return 0<e&&e<=6e4?9e5:e}get isEnabled(){var e=null==D?void 0:D.protocol;if("http:"!==e&&"https:"!==e)return rX.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=el(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:ev(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return ev(t)?t:this.kt}startIfEnabled(){this.isEnabled&&!this.P&&(rX.info("enabled, starting..."),this.it(this.rt))}onRemoteConfig(e){var t=el(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=el(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[t8]:t}),this._instance.persistence.register({[ie]:i})),this.kt=t,this.startIfEnabled()}it(e){var t,i;if(null!=(t=q.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks)e();else{var r=this.useAttribution?"web-vitals-with-attribution":"web-vitals";null==(i=q.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,r,t=>{t?rX.error("failed to load script",t):e()})}}Ct(){var e=$?$.location.href:void 0;if(e){var t=this._instance.config.mask_personal_data_properties,i=this._instance.config.custom_personal_data_properties;return i3(e,t?tG([],rD,i||[]):[],rB)}rX.error("Could not determine current URL")}}var rQ=tL("[Heatmaps]");function r0(e){return el(e)&&"clientX"in e&&"clientY"in e&&ef(e.clientX)&&ef(e.clientY)}class r1{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[t3]),this.rageclicks=new iQ(e.config.rageclick)}get flushIntervalMilliseconds(){var e=5e3;return el(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 eg(this.instance.config.capture_heatmaps)?eg(this.instance.config.enable_heatmaps)?this.kt:this.instance.config.enable_heatmaps:!1!==this.instance.config.capture_heatmaps}startIfEnabled(){if(this.isEnabled)this.P||(rQ.info("starting..."),this.Ot(),this.Mt());else{var e;clearInterval(null!=(e=this.Ft)?e:void 0),this.At(),this.getAndClearBuffer()}}onRemoteConfig(e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[t3]:t}),this.kt=t,this.startIfEnabled()}getAndClearBuffer(){var e=this.N;return this.N=void 0,e}jt(e){this.Dt(e.originalEvent,"deadclick")}Mt(){this.Ft&&clearInterval(this.Ft),this.Ft="visible"===(null==L?void 0:L.visibilityState)?setInterval(this.Lt.bind(this),this.flushIntervalMilliseconds):null}Ot(){$&&L&&(this.Nt=this.Lt.bind(this),tZ($,"beforeunload",this.Nt),this.Ut=e=>this.Dt(e||(null==$?void 0:$.event)),tZ(L,"click",this.Ut,{capture:!0}),this.zt=e=>this.Ht(e||(null==$?void 0:$.event)),tZ(L,"mousemove",this.zt,{capture:!0}),this.Bt=new rw(this.instance,rb,this.jt.bind(this)),this.Bt.startIfEnabledOrStop(),this.qt=this.Mt.bind(this),tZ(L,"visibilitychange",this.qt),this.P=!0)}At(){var e;$&&L&&(this.Nt&&$.removeEventListener("beforeunload",this.Nt),this.Ut&&L.removeEventListener("click",this.Ut,{capture:!0}),this.zt&&L.removeEventListener("mousemove",this.zt,{capture:!0}),this.qt&&L.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(),s=this.instance.scrollManager.scrollElement(),n=function(e,t,i){for(var r=e;r&&iS(r)&&!iP(r,"body")&&r!==i;){if(Q(t,null==$?void 0:$.getComputedStyle(r).position))return!0;r=iA(r)}return!1}(iT(e),["fixed","sticky"],s);return{x:e.clientX+(n?0:r),y:e.clientY+(n?0:i),target_fixed:n,type:t}}Dt(e,t){var i;if(void 0===t&&(t="click"),!ik(e.target)&&r0(e)){var r=this.Gt(e,t);null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this.Vt(Y({},r,{type:"rageclick"})),this.Vt(r)}}Ht(e){!ik(e.target)&&r0(e)&&(clearTimeout(this.Wt),this.Wt=setTimeout(()=>{this.Vt(this.Gt(e,"mousemove"))},500))}Vt(e){if($){var t=$.location.href,i=this.instance.config.mask_personal_data_properties,r=this.instance.config.custom_personal_data_properties,s=i3(t,i?tG([],rD,r||[]):[],rB);this.N=this.N||{},this.N[s]||(this.N[s]=[]),this.N[s].push(e)}}Lt(){this.N&&!ec(this.N)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}}class r2{constructor(e){this.Jt=(e,t,i)=>{i&&(i.noSessionId||i.activityTimeout||i.sessionPastMaximumLength)&&(tA.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:e,changeReason:i}),this.Kt=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.Yt()}Yt(){var e;this.Xt=null==(e=this._instance.sessionManager)?void 0:e.onSessionId(this.Jt)}destroy(){var e;null==(e=this.Xt)||e.call(this),this.Xt=void 0}doPageView(e,t){var i,r=this.Qt(e,t);return this.Kt={pathname:null!=(i=null==$?void 0:$.location.pathname)?i:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),r}doPageLeave(e){var t;return this.Qt(e,null==(t=this.Kt)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.Kt)?void 0:e.pageViewId}}Qt(e,t){var i=this.Kt;if(!i)return{$pageview_id:t};var r={$pageview_id:t,$prev_pageview_id:i.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:n,lastScrollY:a,maxScrollY:o,maxContentHeight:l,lastContentY:c,maxContentY:u}=s;if(!(eu(n)||eu(a)||eu(o)||eu(l)||eu(c)||eu(u))){n=Math.ceil(n),a=Math.ceil(a),o=Math.ceil(o),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u);
1var h=n<=1?1:ek(a/n,0,1,tA),d=n<=1?1:ek(o/n,0,1,tA),p=l<=1?1:ek(c/l,0,1,tA),g=l<=1?1:ek(u/l,0,1,tA);r=tq(r,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:h,$prev_pageview_max_scroll:o,$prev_pageview_max_scroll_percentage:d,$prev_pageview_last_content:c,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:u,$prev_pageview_max_content_percentage:g})}}return i.pathname&&(r.$prev_pageview_pathname=i.pathname),i.timestamp&&(r.$prev_pageview_duration=(e.getTime()-i.timestamp.getTime())/1e3),r}}var r3=((nK={}).GZipJS="gzip-js",nK.Base64="base64",nK),r5=Uint8Array,r4=Uint16Array,r7=Uint32Array,r8=new r5([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]),r6=new r5([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]),r9=new r5([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),se=function(e,t){for(var i=new r4(31),r=0;r<31;++r)i[r]=t+=1<<e[r-1];var s=new r7(i[30]);for(r=1;r<30;++r)for(var n=i[r];n<i[r+1];++n)s[n]=n-i[r]<<5|r;return[i,s]},st=se(r8,2),si=st[0],sr=st[1];si[28]=258,sr[258]=28;for(var ss=se(r6,0)[1],sn=new r4(32768),sa=0;sa<32768;++sa){var so=(43690&sa)>>>1|(21845&sa)<<1;so=(61680&(so=(52428&so)>>>2|(13107&so)<<2))>>>4|(3855&so)<<4,sn[sa]=((65280&so)>>>8|(255&so)<<8)>>>1}var sl=function(e,t,i){for(var r=e.length,s=0,n=new r4(t);s<r;++s)++n[e[s]-1];var a,o=new r4(t);for(s=0;s<t;++s)o[s]=o[s-1]+n[s-1]<<1;if(i){a=new r4(1<<t);var l=15-t;for(s=0;s<r;++s)if(e[s])for(var c=s<<4|e[s],u=t-e[s],h=o[e[s]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)a[sn[h]>>>l]=c}else for(a=new r4(r),s=0;s<r;++s)a[s]=sn[o[e[s]-1]++]>>>15-e[s];return a},sc=new r5(288);for(sa=0;sa<144;++sa)sc[sa]=8;for(sa=144;sa<256;++sa)sc[sa]=9;for(sa=256;sa<280;++sa)sc[sa]=7;for(sa=280;sa<288;++sa)sc[sa]=8;var su=new r5(32);for(sa=0;sa<32;++sa)su[sa]=5;var sh=sl(sc,9,0),sd=sl(su,5,0),sp=function(e){return(e/8|0)+(7&e&&1)},sg=function(e,t,i){(null==i||i>e.length)&&(i=e.length);var r=new(e instanceof r4?r4:e instanceof r7?r7:r5)(i-t);return r.set(e.subarray(t,i)),r},sf=function(e,t,i){i<<=7&t;var r=t/8|0;e[r]|=i,e[r+1]|=i>>>8},s_=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},sv=function(e,t){for(var i=[],r=0;r<e.length;++r)e[r]&&i.push({s:r,f:e[r]});var s=i.length,n=i.slice();if(!s)return[new r5(0),0];if(1==s){var a=new r5(i[0].s+1);return a[i[0].s]=1,[a,1]}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var o=i[0],l=i[1],c=0,u=1,h=2;for(i[0]={s:-1,f:o.f+l.f,l:o,r:l};u!=s-1;)o=i[i[c].f<i[h].f?c++:h++],l=i[c!=u&&i[c].f<i[h].f?c++:h++],i[u++]={s:-1,f:o.f+l.f,l:o,r:l};var d=n[0].s;for(r=1;r<s;++r)n[r].s>d&&(d=n[r].s);var p=new r4(d+1),g=sm(i[u-1],p,0);if(g>t){r=0;var f=0,_=g-t,v=1<<_;for(n.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});r<s;++r){var m=n[r].s;if(!(p[m]>t))break;f+=v-(1<<g-p[m]),p[m]=t}for(f>>>=_;f>0;){var y=n[r].s;p[y]<t?f-=1<<t-p[y]++-1:++r}for(;r>=0&&f;--r){var b=n[r].s;p[b]==t&&(--p[b],++f)}g=t}return[new r5(p),g]},sm=function(e,t,i){return -1==e.s?Math.max(sm(e.l,t,i+1),sm(e.r,t,i+1)):t[e.s]=i},sy=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new r4(++t),r=0,s=e[0],n=1,a=function(e){i[r++]=e},o=1;o<=t;++o)if(e[o]==s&&o!=t)++n;else{if(!s&&n>2){for(;n>138;n-=138)a(32754);n>2&&(a(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(a(s),--n;n>6;n-=6)a(8304);n>2&&(a(n-3<<5|8208),n=0)}for(;n--;)a(s);n=1,s=e[o]}return[i.subarray(0,r),t]},sb=function(e,t){for(var i=0,r=0;r<t.length;++r)i+=e[r]*t[r];return i},sx=function(e,t,i){var r=i.length,s=sp(t+2);e[s]=255&r,e[s+1]=r>>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var n=0;n<r;++n)e[s+n+4]=i[n];return 8*(s+4+r)},sw=function(e,t,i,r,s,n,a,o,l,c,u){sf(t,u++,i),++s[256];for(var h=sv(s,15),d=h[0],p=h[1],g=sv(n,15),f=g[0],_=g[1],v=sy(d),m=v[0],y=v[1],b=sy(f),x=b[0],w=b[1],E=new r4(19),k=0;k<m.length;++k)E[31&m[k]]++;for(k=0;k<x.length;++k)E[31&x[k]]++;for(var S=sv(E,7),P=S[0],C=S[1],j=19;j>4&&!P[r9[j-1]];--j);var F,I,R,$,N=c+5<<3,T=sb(s,sc)+sb(n,su)+a,O=sb(s,d)+sb(n,f)+a+14+3*j+sb(E,P)+(2*E[16]+3*E[17]+7*E[18]);if(N<=T&&N<=O)return sx(t,u,e.subarray(l,l+c));if(sf(t,u,1+(O<T)),u+=2,O<T){F=sl(d,p,0),I=d,R=sl(f,_,0),$=f;var M=sl(P,C,0);for(sf(t,u,y-257),sf(t,u+5,w-1),sf(t,u+10,j-4),u+=14,k=0;k<j;++k)sf(t,u+3*k,P[r9[k]]);u+=3*j;for(var A=[m,x],L=0;L<2;++L){var D=A[L];for(k=0;k<D.length;++k){var H=31&D[k];sf(t,u,M[H]),u+=P[H],H>15&&(sf(t,u,D[k]>>>5&127),u+=D[k]>>>12)}}}else F=sh,I=sc,R=sd,$=su;for(k=0;k<o;++k)if(r[k]>255){s_(t,u,F[(H=r[k]>>>18&31)+257]),u+=I[H+257],H>7&&(sf(t,u,r[k]>>>23&31),u+=r8[H]);var B=31&r[k];s_(t,u,R[B]),u+=$[B],B>3&&(s_(t,u,r[k]>>>5&8191),u+=r6[B])}else s_(t,u,F[r[k]]),u+=I[r[k]];return s_(t,u,F[256]),u+I[256]},sE=new r7([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),sk=function(){for(var e=new r7(256),t=0;t<256;++t){for(var i=t,r=9;--r;)i=(1&i&&0xedb88320)^i>>>1;e[t]=i}return e}(),sS=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8},sP=function(e){var t,i,r,s,n="";for(t=i=0,r=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,s=0;s<r;s++){var a=e.charCodeAt(s),o=null;a<128?i++:o=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),ep(o)||(i>t&&(n+=e.substring(t,i)),n+=o,t=i=s+1)}return i>t&&(n+=e.substring(t,e.length)),n},sC=!!B||!!H,sj="text/plain",sF=function(e,t,i){void 0===i&&(i=!0);var r,[s,n]=e.split("?"),a=Y({},t),o=null!=(r=null==n?void 0:n.split("&").map(e=>{var t,[r,s]=e.split("="),n=i&&null!=(t=a[r])?t:s;return delete a[r],r+"="+n}))?r:[],l=i1(a);return l&&o.push(l),s+"?"+o.join("&")},sI=(e,t)=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t),sR=e=>{var{data:t,compression:i}=e;if(t){if(i===r3.GZipJS){var r,s,n,a,o,l,c,u,h=new Blob([(r=function(e){var t=e.length;if("u">typeof TextEncoder)return(new TextEncoder).encode(e);for(var i=new r5(e.length+(e.length>>>1)),r=0,s=function(e){i[r++]=e},n=0;n<t;++n){if(r+5>i.length){var a=new r5(r+8+(t-n<<1));a.set(i),i=a}var o=e.charCodeAt(n);o<128?s(o):(o<2048?s(192|o>>>6):(o>55295&&o<57344?(s(240|(o=65536+(1047552&o)|1023&e.charCodeAt(++n))>>>18),s(128|o>>>12&63)):s(224|o>>>12),s(128|o>>>6&63)),s(128|63&o))}return sg(i,0,r)}(sI(t)),s={mtime:0},n=0xffffffff,a={p:function(e){for(var t=n,i=0;i<e.length;++i)t=sk[255&t^e[i]]^t>>>8;n=t},d:function(){return 0xffffffff^n}},o=r.length,a.p(r),u=(l=10+(s.filename&&s.filename.length+1||0),c=function(e,t,i,r,s){var n=e.length,a=new r5(r+n+5*(1+Math.floor(n/7e3))+8),o=a.subarray(r,a.length-8),l=0;if(!t||n<8)for(var c=0;c<=n;c+=65535){var u=c+65535;u<n?l=sx(o,l,e.subarray(c,u)):(o[c]=s,l=sx(o,l,e.subarray(c,n)))}else{for(var h=sE[t-1],d=h>>>13,p=8191&h,g=(1<<i)-1,f=new r4(32768),_=new r4(g+1),v=Math.ceil(i/3),m=2*v,y=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<m)&g},b=new r7(25e3),x=new r4(288),w=new r4(32),E=0,k=0,S=(c=0,0),P=0,C=0;c<n;++c){var j=y(c),F=32767&c,I=_[j];if(f[F]=I,_[j]=F,P<=c){var R=n-c;if((E>7e3||S>24576)&&R>423){l=sw(e,o,0,b,x,w,k,S,C,c-C,l),S=E=k=0,C=c;for(var $=0;$<286;++$)x[$]=0;for($=0;$<30;++$)w[$]=0}var N=2,T=0,O=p,M=F-I&32767;if(R>2&&j==y(c-M))for(var A=Math.min(d,R)-1,L=Math.min(32767,c),D=Math.min(258,R);M<=L&&--O&&F!=I;){if(e[c+N]==e[c+N-M]){for(var H=0;H<D&&e[c+H]==e[c+H-M];++H);if(H>N){if(N=H,T=M,H>
1A)break;var B=Math.min(M,H-2),z=0;for($=0;$<B;++$){var U=c-M+$+32768&32767,q=U-f[U]+32768&32767;q>z&&(z=q,I=U)}}}M+=(F=I)-(I=f[F])+32768&32767}if(T){b[S++]=0x10000000|sr[N]<<18|ss[T];var G=31&sr[N],V=31&ss[T];k+=r8[G]+r6[V],++x[257+G],++w[V],P=c+N,++E}else b[S++]=e[c],++x[e[c]]}}l=sw(e,o,s,b,x,w,k,S,C,c-C,l)}return sg(a,0,r+sp(l)+8)}(r,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+s.mem,l,!0)).length,function(e,t){var i=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:2*(9==t.level),e[9]=3,0!=t.mtime&&sS(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),i){e[3]=8;for(var r=0;r<=i.length;++r)e[r+10]=i.charCodeAt(r)}}(c,s),sS(c,u-8,a.d()),sS(c,u-4,o),c)],{type:sj});return{contentType:sj,body:h,estimatedSize:h.size}}if(i===r3.Base64){let e;var d="data="+encodeURIComponent("string"==typeof(e=function(e){var t,i,r,s,n,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=0,l=0,c="",u=[];if(!e)return e;e=sP(e);do t=(n=e.charCodeAt(o++)<<16|e.charCodeAt(o++)<<8|e.charCodeAt(o++))>>18&63,i=n>>12&63,r=n>>6&63,s=63&n,u[l++]=a.charAt(t)+a.charAt(i)+a.charAt(r)+a.charAt(s);while(o<e.length)switch(c=u.join(""),e.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c}(sI(t)))?e:sI(e));return{contentType:"application/x-www-form-urlencoded",body:d,estimatedSize:new Blob([d]).size}}var p=sI(t);return{contentType:"application/json",body:p,estimatedSize:new Blob([p]).size}}},s$=[];H&&s$.push({transport:"fetch",method:e=>{var t,i,{contentType:r,body:s,estimatedSize:n}=null!=(t=sR(e))?t:{},a=new Headers;tU(e.headers,function(e,t){a.append(t,e)}),r&&a.append("Content-Type",r);var o=e.url,l=null;if(z){var c=new z;l={signal:c.signal,timeout:setTimeout(()=>c.abort(),e.timeout)}}H(o,Y({method:(null==e?void 0:e.method)||"GET",headers:a,keepalive:"POST"===e.method&&52428.8>(n||0),body:s,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){tA.error(e)}null==e.callback||e.callback(r)})).catch(t=>{tA.error(t),null==e.callback||e.callback({statusCode:0,error:t})}).finally(()=>l?clearTimeout(l.timeout):null)}}),B&&s$.push({transport:"XHR",method:e=>{var t,i=new B;i.open(e.method||"GET",e.url,!0);var{contentType:r,body:s}=null!=(t=sR(e))?t:{};tU(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};if(200===i.status)try{t.json=JSON.parse(i.responseText)}catch(e){}null==e.callback||e.callback(t)}},i.send(s)}}),null!=A&&A.sendBeacon&&s$.push({transport:"sendBeacon",method:e=>{var t=sF(e.url,{beacon:"1"});try{var i,{contentType:r,body:s}=null!=(i=sR(e))?i:{},n="string"==typeof s?new Blob([s],{type:r}):s;A.sendBeacon(t,n)}catch(e){}}});var sN=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 sT(e,t,i){return sI({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}var sO={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=>sN(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!sN(t,e))),icontains:(e,t)=>t.map(sM).some(t=>e.map(sM).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(sM).every(t=>e.map(sM).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))})},sM=e=>e.toLowerCase();function sA(e,t){return!e||Object.entries(e).every(e=>{var[i,r]=e,s=null==t?void 0:t[i];if(eu(s)||ep(s))return!1;var n=[String(s)],a=sO[r.operator];return!!a&&a(r.values,n)})}var sL=tL("[Error tracking]");class sD{constructor(e){var t,i;this.Zt=[],this.ti=new tg([new tS,new tO,new tC,new tP,new tN,new t$,new tF,new tT],function(e){for(var t=arguments.length,i=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 s=[],n=t.split("\n"),a=r;a<n.length;a++){var o=n[a];if(!(o.length>1024)){var l=tk.test(o)?o.replace(tk,"$1"):o;if(!l.match(/\S*Error: /)){for(var c of i){var u=c(l,e);if(u){s.push(u);break}}if(s.length>=50)break}}}if(!s.length)return[];var h=Array.from(s);return h.reverse(),h.slice(0,50).map(e=>Y({},e,{filename:e.filename||(h[h.length-1]||{}).filename,function:e.function||"?"}))}}("web:javascript",tb,tE)),this._instance=e,this.Zt=null!=(t=null==(i=this._instance.persistence)?void 0:i.get_property(t4))?t
1:[]}onRemoteConfig(e){var t,i,r,s=null!=(t=null==(i=e.errorTracking)?void 0:i.suppressionRules)?t:[],n=null==(r=e.errorTracking)?void 0:r.captureExtensionExceptions;this.Zt=s,this._instance.persistence&&this._instance.persistence.register({[t4]:this.Zt,[t7]:n})}get ii(){var e,t=!!this._instance.get_property(t7),i=this._instance.config.error_tracking.captureExtensionExceptions;return null!=(e=null!=i?i:t)&&e}buildProperties(e,t){return this.ti.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.ei(t)){if(this.ri(t))return void sL.info("Skipping exception capture because a suppression rule matched");if(!this.ii&&this.si(t))return void sL.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ni(t))return void sL.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"})}ri(e){if(0===e.length)return!1;var t=e.reduce((e,t)=>{var{type:i,value:r}=t;return eh(i)&&i.length>0&&e.$exception_types.push(i),eh(r)&&r.length>0&&e.$exception_values.push(r),e},{$exception_types:[],$exception_values:[]});return this.Zt.some(e=>{var i=e.values.map(e=>{var i,r=sO[e.operator],s=ea(e.value)?e.value:[e.value],n=null!=(i=t[e.key])?i:[];return s.length>0&&r(s,n)});return"OR"===e.type?i.some(Boolean):i.every(Boolean)})}si(e){return e.flatMap(e=>{var t,i;return null!=(t=null==(i=e.stacktrace)?void 0:i.frames)?t:[]}).some(e=>e.filename&&e.filename.startsWith("chrome-extension://"))}ni(e){if(e.length>0){var t,i,r,s,n=null!=(t=null==(i=e[0].stacktrace)?void 0:i.frames)?t:[],a=n[n.length-1];return null!=(r=null==a||null==(s=a.filename)?void 0:s.includes("posthog.com/static"))&&r}return!1}ei(e){return!eg(e)&&ea(e)}}var sH=tL("[FeatureFlags]"),sB=tL("[FeatureFlags]",{debugEnabled:!0}),sz="$active_feature_flags",sU="$override_feature_flags",sq="$feature_flag_payloads",sG="$override_feature_flag_payloads",sV="$feature_flag_request_id",sW="$feature_flag_evaluated_at",sY=e=>{var t={};for(var[i,r]of tV(e||{}))r&&(t[i]=r);return t},sJ=((nX={}).FeatureFlags="feature_flags",nX.Recordings="recordings",nX);class sK{constructor(e){this.oi=!1,this.ai=!1,this.li=!1,this.ui=!1,this.hi=!1,this.di=!1,this.vi=!1,this.ci=!1,this._instance=e,this.featureFlagEventHandlers=[]}fi(){var e,t=null!=(e=this._instance.config.evaluation_contexts)?e:this._instance.config.evaluation_environments;return!this._instance.config.evaluation_environments||this._instance.config.evaluation_contexts||this.ci||(sH.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.ci=!0),null!=t&&t.length?t.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||sH.error("Invalid evaluation context found:",e,"Expected non-empty string"),t}):[]}pi(){return this.fi().length>0}flags(){if(this._instance.config.__preview_remote_config)this.di=!0;else{var e=!this.gi&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.mi({disableFlags:e})}}get hasLoadedFlags(){return this.ai}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this._instance.get_property(io),t=this._instance.get_property(sU),i=this._instance.get_property(sG);if(!i&&!t)return e||{};var r=tq({},e||{});for(var s of[...new Set([...Object.keys(i||{}),...Object.keys(t||{})])]){var n,a,o=r[s],l=null==t?void 0:t[s],c=eu(l)?null!=(n=null==o?void 0:o.enabled)&&n:!!l,u=eu(l)?o.variant:"string"==typeof l?l:void 0,h=null==i?void 0:i[s],d=Y({},o,{enabled:c,variant:c?null!=u?u:null==o?void 0:o.variant:void 0});c!==(null==o?void 0:o.enabled)&&(d.original_enabled=null==o?void 0:o.enabled),u!==(null==o?void 0:o.variant)&&(d.original_variant=null==o?void 0:o.variant),h&&(d.metadata=Y({},null==o?void 0:o.metadata,{payload:h,original_payload:null==o||null==(a=o.metadata)?void 0:a.payload})),r[s]=d}return this.oi||(sH.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:i,finalDetails:r}),this.oi=!0),r}getFlagVariants(){var e=this._instance.get_property(is),t=this._instance.get_property(sU);if(!t)return e||{};for(var i=tq({},e),r=Object.keys(t),s=0;s<r.length;s++)i[r[s]]=t[r[s]];return this.oi||(sH.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:i}),this.oi=!0),i}getFlagPayloads(){var e=this._instance.get_property(sq),t=this._instance.get_property(sG);if(!t)return e||{};for(var i=tq({},e||{}),r=Object.keys(t),s=0;s<r.length;s++)i[r[s]]=t[r[s]];return this.oi||(sH.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:i}),this.oi=!0),i}reloadFeatureFlags(){this.ui||this._instance.config.advanced_disable_feature_flags||this.gi||(this._instance.bi.emit("featureFlagsReloading",!0),this.gi=setTimeout(()=>{this.mi()},5))}yi(){clearTimeout(this.gi),this.gi=void 0}ensureFlagsLoaded(){this.ai||this.li||this.gi||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.ui=e}mi(e){var t;if(this.yi(),!this._instance.M())if(this.li)this.hi=!0;else{var i=this._instance.config.token,r=this._instance.get_property("$device_id"),s={token:i,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Y({},(null==(t=this._instance.persistence)?void 0:t.get_initial_props())||{},this._instance.get_property(il)||{}),group_properties:this._instance.get_property(ic)};ep(r)||eu(r)||(s.$device_id=r),(null!=e&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(s.disable_flags=!0),this.pi()&&(s.evaluation_contexts=this.fi());var n=this._instance.config.__preview_remote_config,a=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",o=this._instance.requestRouter.endpointFor("flags",(n?"/flags/?v=2":"/flags/?v=2&config=true")+a);n&&(s.timezone=rK()),this.li=!0,this._instance._send_request({method:"POST",url:o,data:s,compression:this._instance.config.disable_compression?void 0:r3.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:e=>{var t,i,r,n,a=!0;if(200===e.statusCode&&(this.hi||(this.$anon_distinct_id=void 0),a=!1),this.li=!1,this.di||(this.di=!0,this._instance.wi(null!=(n=e.json)?n:{})),!s.disable_flags||this.hi){this.vi=!a;var o,l=[];e.error?e.error instanceof Error?l.push("AbortError"===e.error.name?"timeout":"connection_error"):l.push("unknown_error"):200!==e.statusCode&&l.push("api_error_"+e.statusCode),null!=(t=e.json)&&t.errorsWhileComputingFlags&&l.push("errors_while_computing_flags");var c=!(null==(i=e.json)||null==(i=i.quotaLimited)||!i.includes(sJ.FeatureFlags));(c&&l.push("quota_limited"),null==(r=this._instance.persistence)||r.register({[id]:l}),c)?sH.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."):(s.disable_flags||this.receivedFeatureFlags(null!=(o=e.json)?o:{}
1,a),this.hi&&(this.hi=!1,this.mi()))}}})}}getFeatureFlag(e,t){var i;if(void 0===t&&(t={}),this.ai||this.getFlags()&&this.getFlags().length>0){var r=this.getFeatureFlagResult(e,t);return null!=(i=null==r?void 0:r.variant)?i:null==r?void 0:r.enabled}sH.warn('getFeatureFlag for key "'+e+"\" failed. Feature flags didn't load in time.")}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return null==t?void 0:t.payload}getFeatureFlagResult(e,t){if(void 0===t&&(t={}),this.ai||this.getFlags()&&this.getFlags().length>0){var i=this.getFlagVariants(),r=e in i,s=i[e],n=this.getFlagPayloads()[e],a=String(s),o=this._instance.get_property(sV)||void 0,l=this._instance.get_property(sW)||void 0,c=this._instance.get_property(ih)||{};if((t.send_event||!("send_event"in t))&&(!(e in c)||!c[e].includes(a))){ea(c[e])?c[e].push(a):c[e]=[a],null==(p=this._instance.persistence)||p.register({[ih]:c});var u=this.getFeatureFlagDetails(e),h=[...null!=(g=this._instance.get_property(id))?g:[]];eu(s)&&h.push("flag_missing");var d={$feature_flag:e,$feature_flag_response:s,$feature_flag_payload:n||null,$feature_flag_request_id:o,$feature_flag_evaluated_at:l,$feature_flag_bootstrapped_response:(null==(f=this._instance.config.bootstrap)||null==(f=f.featureFlags)?void 0:f[e])||null,$feature_flag_bootstrapped_payload:(null==(_=this._instance.config.bootstrap)||null==(_=_.featureFlagPayloads)?void 0:_[e])||null,$used_bootstrap_value:!this.vi};eu(null==u||null==(v=u.metadata)?void 0:v.version)||(d.$feature_flag_version=u.metadata.version);var p,g,f,_,v,m,y,b,x,w,E,k=null!=(m=null==u||null==(y=u.reason)?void 0:y.description)?m:null==u||null==(b=u.reason)?void 0:b.code;k&&(d.$feature_flag_reason=k),null!=u&&null!=(x=u.metadata)&&x.id&&(d.$feature_flag_id=u.metadata.id),eu(null==u?void 0:u.original_variant)&&eu(null==u?void 0:u.original_enabled)||(d.$feature_flag_original_response=eu(u.original_variant)?u.original_enabled:u.original_variant),null!=u&&null!=(w=u.metadata)&&w.original_payload&&(d.$feature_flag_original_payload=null==u||null==(E=u.metadata)?void 0:E.original_payload),h.length&&(d.$feature_flag_error=h.join(",")),this._instance.capture("$feature_flag_called",d)}if(r){var S=n;if(!eu(n))try{S=JSON.parse(n)}catch(e){}return{key:e,enabled:!!s,variant:"string"==typeof s?s:void 0,payload:S}}}else sH.warn('getFeatureFlagResult for key "'+e+"\" failed. Feature flags didn't load in time.")}getRemoteConfigPayload(e,t){var i=this._instance.config.token,r={distinct_id:this._instance.get_distinct_id(),token:i};this.pi()&&(r.evaluation_contexts=this.fi()),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:r3.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:i=>{var r,s=null==(r=i.json)?void 0:r.featureFlagPayloads;t((null==s?void 0:s[e])||void 0)}})}isFeatureEnabled(e,t){if(void 0===t&&(t={}),this.ai||this.getFlags()&&this.getFlags().length>0){var i=this.getFeatureFlag(e,t);return eu(i)?void 0:!!i}sH.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.ai=!0;var i=this.getFlagVariants(),r=this.getFlagPayloads(),s=this.getFlagsWithDetails();!function(e,t,i,r,s){void 0===i&&(i={}),void 0===r&&(r={}),void 0===s&&(s={});var n,a=((n=e.flags)?(e.featureFlags=Object.fromEntries(Object.keys(n).map(e=>{var t;return[e,null!=(t=n[e].variant)?t:n[e].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(n).filter(e=>n[e].enabled).filter(e=>{var t;return null==(t=n[e].metadata)?void 0:t.payload}).map(e=>{var t;return[e,null==(t=n[e].metadata)?void 0:t.payload]}))):sH.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e),o=a.flags,l=a.featureFlags,c=a.featureFlagPayloads;if(l){var u=e.requestId,h=e.evaluatedAt;if(ea(l)){sH.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var d={};if(l)for(var p=0;p<l.length;p++)d[l[p]]=!0;t&&t.register({[sz]:l,[is]:d})}else{var g=l,f=c,_=o;if(e.errorsWhileComputingFlags)if(o){var v=new Set(Object.keys(o).filter(e=>{var t;return!(null!=(t=o[e])&&t.failed)}));g=Y({},i,Object.fromEntries(Object.entries(g).filter(e=>{var[t]=e;return v.has(t)}))),f=Y({},r,Object.fromEntries(Object.entries(f||{}).filter(e=>{var[t]=e;return v.has(t)}))),_=Y({},s,Object.fromEntries(Object.entries(_||{}).filter(e=>{var[t]=e;return v.has(t)})))}else g=Y({},i,g),f=Y({},r,f),_=Y({},s,_);t&&t.register(Y({[sz]:Object.keys(sY(g)),[is]:g||{},[sq]:f||{},[io]:_||{}},u?{[sV]:u}:{},h?{[sW]:h}:{}))}}}(e,this._instance.persistence,i,r,s),this.xi(t)}}override(e,t){void 0===t&&(t=!1),sH.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this._instance.persistence)return sH.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this._instance.persistence.unregister(sU),this._instance.persistence.unregister(sG),this.xi(),sB.info("All overrides cleared");if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){var t;if(this.oi=!!(null!=(t=e.suppressWarning)&&t),"flags"in e){if(!1===e.flags)this._instance.persistence.unregister(sU),sB.info("Flag overrides cleared");else if(e.flags){if(ea(e.flags)){for(var i={},r=0;r<e.flags.length;r++)i[e.flags[r]]=!0;this._instance.persistence.register({[sU]:i})}else this._instance.persistence.register({[sU]:e.flags});sB.info("Flag overrides set",{flags:e.flags})}}return"payloads"in e&&(!1===e.payloads?(this._instance.persistence.unregister(sG),sB.info("Payload overrides cleared")):e.payloads&&(this._instance.persistence.register({[sG]:e.payloads}),sB.info("Payload overrides set",{payloads:e.payloads}))),void this.xi()}this.xi()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.ai){var{flags:t,flagVariants:i}=this.Ei();e(t,i)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,i){var r,s=(this._instance.get_property(ia)||[]).find(t=>t.flagKey===e),n={["$feature_enrollment/"+e]:t},a={$feature_flag:e,$feature_enrollment:t,$set:n};s&&(a.$early_access_feature_name=s.name),i&&(a.$feature_enrollment_stage=i),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(n,!1);var o=Y({},this.getFlagVariants(),{[e]:t});null==(r=this._instance.persistence)||r.register({[sz]:Object.keys(sY(o)),[is]:o}),this.xi()}getEarlyAccessFeatures(e,t,i){void 0===t&&(t=!1);var r=this._instance.get_property(ia),s=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+s),method:"GET",callback:t=>{var i,r;if(t.json){var s=t.json.earlyAccessFeatures;return null==(i=this._instance.persistence)||i.unregister(ia),null==(r=this._instance.persistence)||r.register({[ia]:s}),e(s)}}})}Ei(){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),{})}}xi(e){var{flags:t,flagVariants:i}=this.Ei();
1this.featureFlagEventHandlers.forEach(r=>r(t,i,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(il)||{};this._instance.register({[il]:Y({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(il)}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(ic)||{};0!==Object.keys(i).length&&Object.keys(i).forEach(t=>{i[t]=Y({},i[t],e[t]),delete e[t]}),this._instance.register({[ic]:Y({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this._instance.get_property(ic)||{};this._instance.register({[ic]:Y({},t,{[e]:{}})})}else this._instance.unregister(ic)}reset(){this.ai=!1,this.li=!1,this.ui=!1,this.hi=!1,this.di=!1,this.vi=!1,this.$anon_distinct_id=void 0,this.yi(),this.oi=!1}}var sX=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class sZ{constructor(e,t){this.R=e,this.props={},this.$i=!1,this.Si=(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.ki(e),this.load(),e.debug&&tA.info("Persistence loaded",e.persistence,Y({},this.props)),this.update_config(e,e,t),this.save()}isDisabled(){return!!this.Pi}ki(e){-1===sX.indexOf(e.persistence.toLowerCase())&&(tA.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t,i,r=(void 0===(t=e.cookie_persisted_properties||[])&&(t=[]),i=[...rd,...t],Y({},rh,{W:function(e){try{var t={};try{t=rc.W(e)||{}}catch(e){}var i=tq(t,JSON.parse(rh.q(e)||"{}"));return rh.G(e,i),i}catch(e){}return null},G:function(e,t,r,s,n,a){try{rh.G(e,t,void 0,void 0,a);var o={};i.forEach(e=>{t[e]&&(o[e]=t[e])}),Object.keys(o).length&&rc.G(e,o,r,s,n,a)}catch(e){rh.B(e)}},V:function(e,t){try{null==$||$.localStorage.removeItem(e),rc.V(e,t)}catch(e){rh.B(e)}}})),s=e.persistence.toLowerCase();return"localstorage"===s&&rh.H()?rh:"localstorage+cookie"===s&&r.H()?r:"sessionstorage"===s&&r_.H()?r_:"memory"===s?rg:"cookie"===s?rc:r.H()?r:rc}properties(){var e={};return tU(this.props,function(t,i){if(i===is&&el(t))for(var r,s=Object.keys(t),n=0;n<s.length;n++)e["$feature/"+s[n]]=t[s[n]];else r=!1,(ep(iE)?r:M&&iE.indexOf===M?-1!=iE.indexOf(i):(tU(iE,function(e){if(r||(r=e===i))return tB}),r))||(e[i]=t)}),e}load(){if(!this.Pi){var e=this.Y.W(this.Si);e&&(this.props=tq({},e))}}save(){this.Pi||this.Y.G(this.Si,this.props,this.Ti,this.Ii,this.Ci,this.R.debug)}remove(){this.Y.V(this.Si,!1),this.Y.V(this.Si,!0)}clear(){this.remove(),this.props={}}register_once(e,t,i){if(el(e)){eu(t)&&(t="None"),this.Ti=eu(i)?this.Ri:i;var r=!1;if(tU(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(el(e)){this.Ti=eu(t)?this.Ri:t;var i=!1;if(tU(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.$i){var e=rU(this.R.custom_campaign_params,this.R.mask_personal_data_properties,this.R.custom_personal_data_properties);ec(tJ(e))||this.register(e),this.$i=!0}}update_search_keyword(){var e;this.register((e=null==L?void 0:L.referrer)?rG(e):{})}update_referrer_info(){var e;this.register_once({$referrer:rW(),$referring_domain:null!=L&&L.referrer&&(null==(e=i0(L.referrer))?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[iv]||this.props[im]||this.register_once({[iy]:rY(this.R.mask_personal_data_properties,this.R.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};tU([im,iv],t=>{var i=this.props[t];i&&tU(i,function(t,i){e["$initial_"+et(i)]=t})});var t,i,r=this.props[iy];return r&&tq(e,(t=rJ(r),i={},tU(t,function(e,t){i["$initial_"+et(t)]=e}),i)),e}safe_merge(e){return tU(this.props,function(t,i){i in e||(e[i]=t)}),e}update_config(e,t,i){if(this.Ri=this.Ti=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||!((e,t)=>{if(e.length!==t.length)return!1;var i=[...e].sort(),r=[...t].sort();return i.every((e,t)=>e===r[t])})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[])){var r=this.ki(e),s=this.props;this.clear(),this.Y=r,this.props=s,this.save()}}set_disabled(e){this.Pi=e,this.Pi?this.remove():this.save()}set_cross_subdomain(e){e!==this.Ii&&(this.Ii=e,this.remove(),this.save())}set_secure(e){e!==this.Ci&&(this.Ci=e,this.remove(),this.save())}set_event_timer(e,t){var i=this.props[t1]||{};i[e]=t,this.props[t1]=i,this.save()}remove_event_timer(e){var t=(this.props[t1]||{})[e];return eu(t)||(delete this.props[t1][e],this.save()),t}get_property(e){return this.props[e]}set_property(e,t){this.props[e]=t,this.save()}}var sQ=tL("[Product Tours]"),s0="ph_product_tours";class s1{constructor(e){this.Fi=null,this.Oi=null,this._instance=e}onRemoteConfig(e){this._instance.persistence&&this._instance.persistence.register({[t9]:!(null==e||!e.productTours)}),this.loadIfEnabled()}loadIfEnabled(){var e,t;this.Fi||(e=this._instance).config.disable_product_tours||null==(t=e.persistence)||!t.get_property(t9)||this.it(()=>this.Mi())}it(e){var t,i;null!=(t=q.__PosthogExtensions__)&&t.generateProductTours?e():null==(i=q.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"product-tours",t=>{t?sQ.error("Could not load product tours script",t):e()})}
1Mi(){var e;!this.Fi&&null!=(e=q.__PosthogExtensions__)&&e.generateProductTours&&(this.Fi=q.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(void 0===t&&(t=!1),!ea(this.Oi)||t){var i=this._instance.persistence;if(i){var r=i.props[s0];if(ea(r)&&!t)return this.Oi=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 s="Product Tours API could not be loaded, status: "+r;return sQ.error(s),void e([],{isLoaded:!1,error:s})}var n=ea(t.json.product_tours)?t.json.product_tours:[];this.Oi=n,i&&i.register({[s0]:n}),e(n,{isLoaded:!0})}})}else e(this.Oi,{isLoaded:!0})}getActiveProductTours(e){eg(this.Fi)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Fi.getActiveProductTours(e)}showProductTour(e){var t;null==(t=this.Fi)||t.showTourById(e)}previewTour(e){this.Fi?this.Fi.previewTour(e):this.it(()=>{var t;this.Mi(),null==(t=this.Fi)||t.previewTour(e)})}dismissProductTour(){var e;null==(e=this.Fi)||e.dismissTour("user_clicked_skip")}nextStep(){var e;null==(e=this.Fi)||e.nextStep()}previousStep(){var e;null==(e=this.Fi)||e.previousStep()}clearCache(){var e;this.Oi=null,null==(e=this._instance.persistence)||e.unregister(s0)}resetTour(e){var t;null==(t=this.Fi)||t.resetTour(e)}resetAllTours(){var e;null==(e=this.Fi)||e.resetAllTours()}cancelPendingTour(e){var t;null==(t=this.Fi)||t.cancelPendingTour(e)}}var s2=((nZ={}).Activation="events",nZ.Cancellation="cancelEvents",nZ),s3=((nQ={}).Button="button",nQ.Tab="tab",nQ.Selector="selector",(n0={}).TopLeft="top_left",n0.TopRight="top_right",n0.TopCenter="top_center",n0.MiddleLeft="middle_left",n0.MiddleRight="middle_right",n0.MiddleCenter="middle_center",n0.Left="left",n0.Center="center",n0.Right="right",n0.NextToTrigger="next_to_trigger",(n1={}).Top="top",n1.Left="left",n1.Right="right",n1.Bottom="bottom",(n2={}).Popover="popover",n2.API="api",n2.Widget="widget",n2.ExternalSurvey="external_survey",n2),s5=((n3={}).Open="open",n3.MultipleChoice="multiple_choice",n3.SingleChoice="single_choice",n3.Rating="rating",n3.Link="link",(n5={}).NextQuestion="next_question",n5.End="end",n5.ResponseBased="response_based",n5.SpecificQuestion="specific_question",(n4={}).Once="once",n4.Recurring="recurring",n4.Always="always",(n7={}).SHOWN="survey shown",n7.DISMISSED="survey dismissed",n7.SENT="survey sent",n7.ABANDONED="survey abandoned",n7),s4=((n8={}).SURVEY_ID="$survey_id",n8.SURVEY_NAME="$survey_name",n8.SURVEY_RESPONSE="$survey_response",n8.SURVEY_ITERATION="$survey_iteration",n8.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",n8.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",n8.SURVEY_SUBMISSION_ID="$survey_submission_id",n8.SURVEY_QUESTIONS="$survey_questions",n8.SURVEY_COMPLETED="$survey_completed",n8.PRODUCT_TOUR_ID="$product_tour_id",n8.SURVEY_LAST_SEEN_DATE="$survey_last_seen_date",n8),s7=((n6={}).Popover="popover",n6.Inline="inline",n6),s8=tL("[Surveys]"),s6="seenSurvey_",s9=e=>{var t;return t=""+s6+e.id,e.current_iteration&&e.current_iteration>0&&(t=""+s6+e.id+"_"+e.current_iteration),t},ne=[s3.Popover,s3.Widget,s3.API],nt={ignoreConditions:!1,ignoreDelay:!1,displayType:s7.Popover};class ni{constructor(){this.Ai={},this.Ai={}}on(e,t){return this.Ai[e]||(this.Ai[e]=[]),this.Ai[e].push(t),()=>{this.Ai[e]=this.Ai[e].filter(e=>e!==t)}}emit(e,t){for(var i of this.Ai[e]||[])i(t);for(var r of this.Ai["*"]||[])r(e,t)}}function nr(e,t,i){if(eg(e))return!1;switch(i){case"exact":return e===t;case"contains":return RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*"),"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}class ns{constructor(e){this.ji=new ni,this.Di=(e,t)=>this.Li(e,t)&&this.Ni(e,t)&&this.Ui(e,t)&&this.zi(e,t),this.Li=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.Hi=new Set,this.Bi=new Set}init(){var e,t;eu(null==(e=this._instance)?void 0:e._addCaptureHook)||null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.on(e,t)})}register(e){var t,i;if(!eu(null==(t=this._instance)?void 0:t._addCaptureHook)&&(e.forEach(e
vendor: 4,997 bytes, line 1
1=>{var t,i;null==(t=this.Bi)||t.add(e),null==(i=e.steps)||i.forEach(e=>{var t;null==(t=this.Hi)||t.add((null==e?void 0:e.event)||"")})}),null!=(i=this._instance)&&i.autocapture)){var r,s=new Set;e.forEach(e=>{var t;null==(t=e.steps)||t.forEach(e=>{null!=e&&e.selector&&s.add(null==e?void 0:e.selector)})}),null==(r=this._instance)||r.autocapture.setElementSelectors(s)}}on(e,t){var i;null!=t&&0!=e.length&&(this.Hi.has(e)||this.Hi.has(null==t?void 0:t.event))&&this.Bi&&(null==(i=this.Bi)?void 0:i.size)>0&&this.Bi.forEach(e=>{this.qi(t,e)&&this.ji.emit("actionCaptured",e.name)})}Wi(e){this.onAction("actionCaptured",t=>e(t))}qi(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var i of t.steps)if(this.Di(e,i))return!0;return!1}onAction(e,t){return this.ji.on(e,t)}Ni(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||!nr(r,t.url,t.url_matching||"contains"))return!1}return!0}Ui(e,t){return!!this.Gi(e,t)&&!!this.Vi(e,t)&&!!this.Ji(e,t)}Gi(e,t){if(null==t||!t.href)return!0;var i=this.Ki(e);if(i.length>0)return i.some(e=>nr(e.href,t.href,t.href_matching||"exact"));var r,s,n=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";return!!n&&nr((s=n.match(/(?::|")href="(.*?)"/))?s[1]:"",t.href,t.href_matching||"exact")}Vi(e,t){if(null==t||!t.text)return!0;var i=this.Ki(e);if(i.length>0)return i.some(e=>nr(e.text,t.text,t.text_matching||"exact")||nr(e.$el_text,t.text,t.text_matching||"exact"));var r,s,n,a,o=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";return!!o&&(s=function(e){for(var t,i=[],r=/(?::|")text="(.*?)"/g;!eg(t=r.exec(e));)i.includes(t[1])||i.push(t[1]);return i}(o),n=t.text,a=t.text_matching||"exact",s.some(e=>nr(e,n,a)))}Ji(e,t){if(null==t||!t.selector)return!0;var i,r,s=null==e||null==(i=e.properties)?void 0:i.$element_selectors;if(null!=s&&s.includes(t.selector))return!0;var n=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";if(t.selector_regex&&n)try{return new RegExp(t.selector_regex).test(n)}catch(e){}return!1}Ki(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements}zi(e,t){return null==t||!t.properties||0===t.properties.length||sA(t.properties.reduce((e,t)=>{var i=ea(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 nn{constructor(e){this._instance=e,this.Yi=new Map,this.Xi=new Map,this.Qi=new Map}Zi(e,t){return!!e&&sA(e.propertyFilters,null==t?void 0:t.properties)}te(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}ie(e,t,i){var r=(i===s2.Activation?this.Yi:this.Xi).get(e),s=[];return this.ee(e=>{s=e.filter(e=>null==r?void 0:r.includes(e.id))}),s.filter(r=>{var s,n=null==(s=r.conditions)||null==(s=s[i])||null==(s=s.values)?void 0:s.find(t=>t.name===e);return this.Zi(n,t)})}register(e){var t;eu(null==(t=this._instance)?void 0:t._addCaptureHook)||(this.re(e),this.se(e))}se(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.ne&&(this.ne=new ns(this._instance),this.ne.init(),this.ne.Wi(e=>{this.onAction(e)})),t.forEach(e=>{var t,i,r,s,n;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==(s=this.ne)||s.register(e.conditions.actions.values),null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)||n.forEach(t=>{if(t&&t.name){var i=this.Qi.get(t.name);i&&i.push(e.id),this.Qi.set(t.name,i||[e.id])}}))}))}re(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._addCaptureHook((e,t)=>{this.onEvent(e,t)}),this.Yi=this.te(e,s2.Activation),this.Xi=this.te(e,s2.Cancellation))}onEvent(e,t){var i,r=this.oe(),s=this.ae(),n=this.le(),a=(null==(i=this._instance)||null==(i=i.persistence)?void 0:i.props[s])||[];if(n===e&&t&&a.length>0){r.info("event matched, removing item from activated items",{event:e,eventPayload:t,existingActivatedItems:a});var o,l,c=(null==t||null==(o=t.properties)?void 0:o.$survey_id)||(null==t||null==(l=t.properties)?void 0:l.$product_tour_id);if(c){var u=a.indexOf(c);u>=0&&(a.splice(u,1),this.ue(a))}}else{if(this.Xi.has(e)){var h=this.ie(e,t,s2.Cancellation);h.length>0&&(r.info("cancel event matched, cancelling items",{event:e,itemsToCancel:h.map(e=>e.id)}
1),h.forEach(e=>{var t=a.indexOf(e.id);t>=0&&a.splice(t,1),this.he(e.id)}),this.ue(a))}if(this.Yi.has(e)){r.info("event name matched",{event:e,eventPayload:t,items:this.Yi.get(e)});var d=this.ie(e,t,s2.Activation);this.ue(a.concat(d.map(e=>e.id)||[]))}}}onAction(e){var t,i=this.ae(),r=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[i])||[];this.Qi.has(e)&&this.ue(r.concat(this.Qi.get(e)||[]))}ue(e){var t,i=this.oe(),r=this.ae(),s=[...new Set(e)].filter(e=>!this.de(e));i.info("updating activated items",{activatedItems:s}),null==(t=this._instance)||null==(t=t.persistence)||t.register({[r]:s})}getActivatedIds(){var e,t=this.ae();return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t])||[]}getEventToItemsMap(){return this.Yi}ve(){return this.ne}}class na extends nn{constructor(e){super(e)}ae(){return"$surveys_activated"}le(){return s5.SHOWN}ee(e){var t;null==(t=this._instance)||t.getSurveys(e)}he(e){var t;null==(t=this._instance)||t.cancelPendingSurvey(e)}oe(){return s8}de(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}class no{constructor(e){this.ce=void 0,this._surveyManager=null,this.fe=!1,this.pe=[],this.ge=null,this._instance=e,this._surveyEventReceiver=null}onRemoteConfig(e){if(!this._instance.config.disable_surveys){var t=e.surveys;if(eg(t))return s8.warn("Flags not loaded yet. Not loading surveys.");var i=ea(t);this.ce=i?t.length>0:t,s8.info("flags response received, isSurveysEnabled: "+this.ce),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var i=localStorage.key(t);(null!=i&&i.startsWith(s6)||null!=i&&i.startsWith("inProgressSurvey_"))&&e.push(i)}e.forEach(e=>localStorage.removeItem(e))}loadIfEnabled(){if(!this._surveyManager)if(this.fe)s8.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)s8.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())s8.info("Not loading surveys in cookieless mode without consent.");else{var e=null==q?void 0:q.__PosthogExtensions__;if(e){if(!eu(this.ce)||this._instance.config.advanced_enable_surveys){var t=this.ce||this._instance.config.advanced_enable_surveys;this.fe=!0;try{var i=e.generateSurveys;if(i)return void this._e(i,t);var r=e.loadExternalDependency;if(!r)return void this.me("PostHog loadExternalDependency extension not found.");r(this._instance,"surveys",i=>{i||!e.generateSurveys?this.me("Could not load surveys script",i):this._e(e.generateSurveys,t)})}catch(e){throw this.me("Error initializing surveys",e),e}finally{this.fe=!1}}}else s8.error("PostHog Extensions not found.")}}_e(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new na(this._instance),s8.info("Surveys loaded successfully"),this.be({isLoaded:!0})}me(e,t){s8.error(e,t),this.be({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.pe.push(e),this._surveyManager&&this.be({isLoaded:!0}),()=>{this.pe=this.pe.filter(t=>t!==e)}}getSurveys(e,t){if(void 0===t&&(t=!1),this._instance.config.disable_surveys)return s8.info("Disabled. Not loading surveys."),e([]);var i,r=this._instance.get_property(iu);if(r&&!t)return e(r,{isLoaded:!0});"u">typeof Promise&&this.ge?this.ge.then(t=>{var{surveys:i,context:r}=t;return e(i,r)}):("u">typeof Promise&&(this.ge=new Promise(e=>{i=e})),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=>{this.ge=null;var r=t.statusCode;if(200!==r||!t.json){var s="Surveys API could not be loaded, status: "+r;s8.error(s);var n={isLoaded:!1,error:s};return e([],n),void(null==i||i({surveys:[],context:n}))}var a,o,l=t.json.surveys||[],c=l.filter(e=>{var t,i;return!(!e.start_date||e.end_date)&&(!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)||!(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)||!i.length))});c.length>0&&(null==(o=this._surveyEventReceiver)||o.register(c)),null==(a=this._instance.persistence)||a.register({[iu]:l});var u={isLoaded:!0};e(l,u),null==i||i({surveys:l,context:u})}}))}be(e){for(var t of this.pe)try{if(!e.isLoaded)return t([],e);
1this.getSurveys(t)}catch(e){s8.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!eg(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);s8.warn("init was not called")}ye(e){var t=null;return this.getSurveys(i=>{var r;t=null!=(r=i.find(t=>t.id===e))?r:null}),t}we(e){if(eg(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var t="string"==typeof e?this.ye(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(eg(this._surveyManager))return s8.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var t=this.we(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return eg(this._surveyManager)?(s8.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,s=null!=(r=t.find(t=>t.id===e))?r:null;if(s){var n=this.we(s);i({visible:n.eligible,disabledReason:n.reason})}else i({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t,i){var r;if(eg(this._surveyManager))s8.warn("init was not called");else{var s="string"==typeof e?this.ye(e):e;if(null!=s&&s.id)if(ne.includes(s.type)){var n=null==L?void 0:L.querySelector(t);if(n)return null!=(r=s.appearance)&&r.surveyPopupDelaySeconds?(s8.info("Rendering survey "+s.id+" with delay of "+s.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var e,t;s8.info("Rendering survey "+s.id+" with delay of "+(null==(e=s.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=this._surveyManager)||t.renderSurvey(s,n,i),s8.info("Survey "+s.id+" rendered")},1e3*s.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(s,n,i);s8.warn("Survey element not found")}else s8.warn("Surveys of type "+s.type+" cannot be rendered in the app");else s8.warn("Survey not found")}}displaySurvey(e,t){var i;if(eg(this._surveyManager))s8.warn("init was not called");else{var r=this.ye(e);if(r){var s=r;if(null!=(i=r.appearance)&&i.surveyPopupDelaySeconds&&t.ignoreDelay&&(s=Y({},r,{appearance:Y({},r.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==s7.Popover&&t.initialResponses&&s8.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),!1===t.ignoreConditions){var n=this.canRenderSurvey(r);if(!n.visible)return void s8.warn("Survey is not eligible to be displayed: ",n.disabledReason)}t.displayType!==s7.Inline?this._surveyManager.handlePopoverSurvey(s,t):this.renderSurvey(s,t.selector,t.properties)}else s8.warn("Survey not found")}}cancelPendingSurvey(e){eg(this._surveyManager)?s8.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;null==(e=this._surveyManager)||e.handlePageUnload()}}var nl=tL("[Conversations]");class nc{constructor(e){this.xe=void 0,this._conversationsManager=null,this.Ee=!1,this.$e=null,this._instance=e}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;eg(t)||(ev(t)?this.xe=t:(this.xe=t.enabled,this.$e=t),this.loadIfEnabled())}}reset(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this.xe=void 0,this.$e=null}loadIfEnabled(){if(!this._conversationsManager&&!this.Ee&&!(this._instance.config.disable_conversations||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=null==q?void 0:q.__PosthogExtensions__;if(e&&!eu(this.xe)&&this.xe)if(this.$e&&this.$e.token){this.Ee=!0;try{var t=e.initConversations;if(t)return this.Se(t),void(this.Ee=!1);var i=e.loadExternalDependency;if(!i)return void this.ke("PostHog loadExternalDependency extension not found.");i(this._instance,"conversations",t=>{t||!e.initConversations?this.ke("Could not load conversations script",t):this.Se(e.initConversations),this.Ee=!1})}catch(e){this.ke("Error initializing conversations",e),this.Ee=!1}}else nl.error("Conversations enabled but missing token in remote config.")}}Se(e){if(this.$e)try{this._conversationsManager=e(this.$e,this._instance),nl.info("Conversations loaded successfully")}catch(e){this.ke("Error completing conversations initialization",e)}else nl.error("Cannot complete initialization: remote config is null")}ke(e,t){nl.error(e,t),this._conversationsManager=null,this.Ee=!1}show(){this._conversationsManager?this._conversationsManager.show():nl.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return!0===this.xe&&!ep(this._conversationsManager)}isVisible(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.isVisible())&&e}sendMessage(e,t,i){var r=this;return W(function*(){return r._conversationsManager?r._conversationsManager.sendMessage(e,t,i):(nl.warn("Conversations not available yet."),null)})()}getMessages(e,t){var i=this;return W(function*(){return i._conversationsManager?i._conversationsManager.getMessages(e,t):(nl.warn("Conversations not available yet."),null)})()}markAsRead(e){var t=this;return W(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(nl.warn("Conversations not available yet."),null)})()}getTickets(e){var t=this;return W(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(nl.warn("Conversations not available yet."),null)})()}getCurrentTicketId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getCurrentTicketId())?e:null}getWidgetSessionId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getWidgetSessionId())?e:null}}class nu{constructor(e){var t;this.Pe=!1,this.Te=!1,this._instance=e,this._instance&&null!=(t=this._instance.config.logs)&&t.captureConsoleLogs&&(this.Pe=!0)}onRemoteConfig(e){var t,i=null==(t=e.logs)?void 0:t.captureConsoleLogs;!eg(i)&&i&&(this.Pe=!0,this.loadIfEnabled())}reset(){}loadIfEnabled(){if(this.Pe&&!this.Te){var e=tL("[logs]"),t=null==q?void 0:q.__PosthogExtensions__;if(t){var i=t.loadExternalDependency;i?i(this._instance,"logs",i=>{var r;i||null==(r=t.logs)||!r.initializeLogs?e.error("Could not load logs script",i):(t.logs.initializeLogs(this._instance),this.Te=!0)}):e.error("PostHog loadExternalDependency extension not found.")}else e.error("PostHog Extensions not found.")}}}var nh=tL("[RateLimiter]");class nd{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;
1if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{nh.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void nh.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return(null==(e=this.instance.config.rate_limiting)?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max((null==(e=this.instance.config.rate_limiting)?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){void 0===e&&(e=!1);var t,i,r,{captureEventsBurstLimit:s,captureEventsPerSecond:n}=this,a=(new Date).getTime(),o=null!=(t=null==(i=this.instance.persistence)?void 0:i.get_property(i_))?t:{tokens:s,last:a};o.tokens+=(a-o.last)/1e3*n,o.last=a,o.tokens>s&&(o.tokens=s);var l=o.tokens<1;return l||e||(o.tokens=Math.max(0,o.tokens-1)),!l||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+n+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=l,null==(r=this.instance.persistence)||r.set_property(i_,o),{isRateLimited:l,remainingTokens:o.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var np=tL("[RemoteConfig]");class ng{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=q._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}Ie(e){var t,i;null!=(t=q.__PosthogExtensions__)&&t.loadExternalDependency?null==(i=q.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):(np.error("PostHog Extensions not found. Cannot load remote config."),e())}Ce(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 np.info("Using preloaded remote config",this.remoteConfig),void this.wi(this.remoteConfig);if(this._instance.M())return void np.warn("Remote config is disabled. Falling back to local config.");this.Ie(e=>{e?this.wi(e):(np.info("No config found after loading remote JS config. Falling back to JSON."),this.Ce(e=>{this.wi(e)}))})}catch(e){np.error("Error loading remote config",e)}}wi(e){e?this._instance.config.__preview_remote_config?(this._instance.wi(e),!1!==e.hasFeatureFlags&&this._instance.featureFlags.ensureFlagsLoaded()):np.info("__preview_remote_config is disabled. Logging config instead",e):np.error("Failed to fetch remote config from PostHog.")}}class nf{constructor(e,t){this.Re=!0,this.Fe=[],this.Oe=ek((null==t?void 0:t.flush_interval_ms)||3e3,250,5e3,tA.createLogger("flush interval"),3e3),this.Me=e}enqueue(e){this.Fe.push(e),this.Ae||this.je()}unload(){this.De();var e=Object.values(this.Fe.length>0?this.Le():{});[...e.filter(e=>0===e.url.indexOf("/e")),...e.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.Me(Y({},e,{transport:"sendBeacon"}))})}enable(){this.Re=!1,this.je()}je(){var e=this;this.Re||(this.Ae=setTimeout(()=>{if(this.De(),this.Fe.length>0){var t=this.Le();for(var i in t)!function(){var r=t[i],s=(new Date).getTime();r.data&&ea(r.data)&&tU(r.data,e=>{e.offset=Math.abs(e.timestamp-s),delete e.timestamp}),e.Me(r)}()}},this.Oe))}De(){clearTimeout(this.Ae),this.Ae=void 0}Le(){var e={};return tU(this.Fe,t=>{var i,r=(t?t.batchKey:null)||t.url;eu(e[r])&&(e[r]=Y({},t,{data:[]})),null==(i=e[r].data)||i.push(t.data)}),this.Fe=[],e}}var n_=["retriesPerformedSoFar"];class nv{constructor(e){this.Ne=!1,this.Ue=3e3,this.Fe=[],this._instance=e,this.Fe=[],this.ze=!0,!eu($)&&"onLine"in $.navigator&&(this.ze=$.navigator.onLine,this.He=()=>{this.ze=!0,this.Lt()},this.Be=()=>{this.ze=!1},tZ($,"online",this.He),tZ($,"offline",this.Be))}get length(){return this.Fe.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,i=J(e,n_);e_(t)&&(i.url=sF(i.url,{retry_count:t})),this._instance._send_request(Y({},i,{callback:e=>{200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&(null!=t?t:0)<10?this.qe(Y({retriesPerformedSoFar:t},i)):null==i.callback||i.callback(e)}}))}qe(e){var t,i,r,s=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=s+1;var n=(r=(Math.random()-.5)*((i=Math.min(18e5,t=3e3*Math.pow(2,s)))-t/2),Math.ceil(i+r)),a=Date.now()+n;this.Fe.push({retryAt:a,requestOptions:e});var o="Enqueued failed request for retry in "+n;
1navigator.onLine||(o+=" (Browser is offline)"),tA.warn(o),this.Ne||(this.Ne=!0,this.We())}We(){(this.Ge&&clearTimeout(this.Ge),0===this.Fe.length)?(this.Ne=!1,this.Ge=void 0):this.Ge=setTimeout(()=>{this.ze&&this.Fe.length>0&&this.Lt(),this.We()},this.Ue)}Lt(){var e=Date.now(),t=[],i=this.Fe.filter(i=>i.retryAt<e||(t.push(i),!1));if(this.Fe=t,i.length>0)for(var{requestOptions:r}of i)this.retriableRequest(r)}unload(){for(var{requestOptions:e}of(this.Ge&&(clearTimeout(this.Ge),this.Ge=void 0),this.Ne=!1,eu($)||(this.He&&($.removeEventListener("online",this.He),this.He=void 0),this.Be&&($.removeEventListener("offline",this.Be),this.Be=void 0)),this.Fe))try{this._instance._send_request(Y({},e,{transport:"sendBeacon"}))}catch(e){tA.error(e)}this.Fe=[]}}class nm{constructor(e){this.Ve=()=>{this.Je||(this.Je={});var e,t,i,r,s=this.scrollElement(),n=this.scrollY(),a=s?Math.max(0,s.scrollHeight-s.clientHeight):0,o=n+((null==s?void 0:s.clientHeight)||0),l=(null==s?void 0:s.scrollHeight)||0;this.Je.lastScrollY=Math.ceil(n),this.Je.maxScrollY=Math.max(n,null!=(e=this.Je.maxScrollY)?e:0),this.Je.maxScrollHeight=Math.max(a,null!=(t=this.Je.maxScrollHeight)?t:0),this.Je.lastContentY=o,this.Je.maxContentY=Math.max(o,null!=(i=this.Je.maxContentY)?i:0),this.Je.maxContentHeight=Math.max(l,null!=(r=this.Je.maxContentHeight)?r:0)},this._instance=e}getContext(){return this.Je}resetContext(){var e=this.Je;return setTimeout(this.Ve,0),e}startMeasuringScrollPosition(){tZ($,"scroll",this.Ve,{capture:!0}),tZ($,"scrollend",this.Ve,{capture:!0}),tZ($,"resize",this.Ve)}scrollElement(){if(!this._instance.config.scroll_root_selector)return null==$?void 0:$.document.documentElement;for(var e of ea(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector]){var t=null==$?void 0:$.document.querySelector(e);if(t)return t}}scrollY(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return $&&($.scrollY||$.pageYOffset||$.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return $&&($.scrollX||$.pageXOffset||$.document.documentElement.scrollLeft)||0}}var ny=e=>rY(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties);class nb{constructor(e,t,i,r){this.Ke=e=>{var t=this.Ye();if(!t||t.sessionId!==e){var i={sessionId:e,props:this.Xe(this._instance)};this.Qe.register({[ig]:i})}},this._instance=e,this.Ze=t,this.Qe=i,this.Xe=r||ny,this.Ze.onSessionId(this.Ke)}Ye(){return this.Qe.props[ig]}getSetOnceProps(){var e,t=null==(e=this.Ye())?void 0:e.props;return t?"r"in t?rJ(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 tU(tJ(this.getSetOnceProps()),(t,i)=>{"$current_url"===i&&(i="url"),e["$session_entry_"+et(i)]=t}),e}}var nx=tL("[SessionId]");class nw{on(e,t){return this.tr.on(e,t)}constructor(e,t,i){if(this.ir=[],this.er=void 0,this.tr=new ni,this.rr=(e,t)=>!(!e_(e)||!e_(t))&&Math.abs(e-t)>this.sessionTimeoutMs,!e.persistence)throw Error("SessionIdManager requires a PostHogPersistence instance");if("always"===e.config.cookieless_mode)throw Error('SessionIdManager cannot be used with cookieless_mode="always"');this.R=e.config,this.Qe=e.persistence,this.sr=void 0,this.nr=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.ar=t||rn,this.lr=i||rn;var r,s=this.R.persistence_name||this.R.token,n=this.R.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*ek(n,60,36e3,nx.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.ur(),this.hr="ph_"+s+"_window_id",this.dr="ph_"+s+"_primary_window_exists",this.vr()){var a=r_.W(this.hr),o=r_.W(this.dr);a&&!o?this.sr=a:r_.V(this.hr),r_.G(this.dr,!0)}if(null!=(r=this.R.bootstrap)&&r.sessionID)try{var l=(e=>{var t=e.replace(/-/g,"");if(32!==t.length)throw Error("Not a valid UUID");if("7"!==t[12])throw Error("Not a UUIDv7");return parseInt(t.substring(0,12),16)})(this.R.bootstrap.sessionID);this.cr(this.R.bootstrap.sessionID,(new Date).getTime(),l)}catch(e){nx.error("Invalid sessionID in bootstrap",e)}this.pr()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return eu(this.ir)&&(this.ir=[]),this.ir.push(e),this.nr&&e(this.nr,this.sr),()=>{this.ir=this.ir.filter(t=>t!==e)}}vr(){return"memory"!==this.R.persistence&&!this.Qe.Pi&&r_.H()}gr(e){e!==this.sr&&(this.sr=e,this.vr()&&r_.G(this.hr,e))}_r(){return this.sr?this.sr:this.vr()?r_.W(this.hr):null}cr(e,t,i){e===this.nr&&t===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this.nr=e,this.Qe.register({[ii]:[t,e,i]}))}mr(){var e=this.Qe.props[ii];return ea(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.cr(null,null,null)}destroy(){clearTimeout(this.br),this.br=void 0,this.er&&$&&($.removeEventListener("beforeunload",this.er,{capture:!1}),this.er=void 0),this.ir=[]}pr(){this.er=()=>{this.vr()&&r_.V(this.dr)},tZ($,"beforeunload",this.er,{capture:!1})}
vendor: 5,888 bytes, line 1
1checkAndGetSessionAndWindowId(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),"always"===this.R.cookieless_mode)throw Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var i=t||(new Date).getTime(),[r,s,n]=this.mr(),a=this._r(),o=e_(n)&&Math.abs(i-n)>864e5,l=!1,c=!s,u=!c&&!e&&this.rr(i,r);c||u||o?(s=this.ar(),a=this.lr(),nx.info("new session ID generated",{sessionId:s,windowId:a,changeReason:{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:o}}),n=i,l=!0):a||(a=this.lr(),l=!0);var h=e_(r)&&e&&!o?r:i,d=e_(n)?n:(new Date).getTime();return this.gr(a),this.cr(s,h,d),e||this.ur(),l&&this.ir.forEach(e=>e(s,a,l?{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:o}:void 0)),{sessionId:s,windowId:a,sessionStartTimestamp:d,changeReason:l?{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:o}:void 0,lastActivityTimestamp:r}}ur(){clearTimeout(this.br),this.br=setTimeout(()=>{var[e]=this.mr();if(this.rr((new Date).getTime(),e)){var t=this.nr;this.resetSessionId(),this.tr.emit("forcedIdleReset",{idleSessionId:t})}},1.1*this.sessionTimeoutMs)}}var nE=["$set_once","$set"],nk=tL("[SiteApps]");class nS{constructor(e){this._instance=e,this.yr=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}wr(e,t){if(t){var i=this.globalsForEvent(t);this.yr.push(i),this.yr.length>1e3&&(this.yr=this.yr.slice(10))}}get siteAppLoaders(){var e;return null==(e=q._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}init(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.wr.bind(this));this.Er=()=>{e(),this.yr=[],this.Er=void 0}}}globalsForEvent(e){if(!e)throw Error("Event payload is required");var t,i,r,s,n,a,o,l={},c=this._instance.get_property("$groups")||[];for(var[u,h]of Object.entries(this._instance.get_property("$stored_group_properties")||{}))l[u]={id:c[u],type:u,properties:h};var{$set_once:d,$set:p}=e;return{event:Y({},J(e,nE),{properties:Y({},e.properties,p?{$set:Y({},null!=(t=null==(i=e.properties)?void 0:i.$set)?t:{},p)}:{},d?{$set_once:Y({},null!=(r=null==(s=e.properties)?void 0:s.$set_once)?r:{},d)}:{}),elements_chain:null!=(n=null==(a=e.properties)?void 0:a.$elements_chain)?n:"",distinct_id:null==(o=e.properties)?void 0:o.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(e){var t=this.apps[e.id],i=()=>{var i;!t.errored&&this.yr.length&&(nk.info("Processing "+this.yr.length+" events for site app with id "+e.id),this.yr.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.Er)||i.call(this))},r=!1,s=s=>{t.errored=!s,t.loaded=!0,nk.info("Site app with id "+e.id+" "+(s?"loaded":"errored")),r&&i()};try{var{processEvent:n}=e.init({posthog:this._instance,callback:e=>{s(e)}});n&&(t.processEvent=n),r=!0}catch(t){nk.error("Error while initializing PostHog app with config id "+e.id,t),s(!1)}if(r&&t.loaded)try{i()}catch(i){nk.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)}Sr(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){nk.error("Error while processing event "+e.event+" for site app "+i.id,t)}}}onRemoteConfig(e){var t,i,r,s=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this.$r(),void this._instance.on("eventCaptured",e=>this.Sr(e))):void nk.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(i=this.Er)||i.call(this),null!=(r=e.siteApps)&&r.length)if(this.isEnabled){var n=function(e){var t;q["__$$ph_site_app_"+e]=s._instance,null==(t=q.__PosthogExtensions__)||null==t.loadSiteApp||t.loadSiteApp(s._instance,o,t=>{if(t)return nk.error("Error while initializing PostHog app with config id "+e,t)})};for(var{id:a,url:o}of e.siteApps)n(a)}else nk.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}var nP=function(e,t){if(!e)return!1;var i=e.userAgent;if(i&&Z(i,t))return!0;try{var r=null==e?void 0:e.userAgentData;if(null!=r&&r.brands&&r.brands.some(e=>Z(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver},nC=((n9={}).US="us",n9.EU="eu",n9.CUSTOM="custom",n9),nj="i.posthog.com";class nF{constructor(e){this.kr={},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("."+nj,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.kr[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.kr[this.apiHost]=nC.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.kr[this.apiHost]=nC.EU:this.kr[this.apiHost]=nC.CUSTOM),this.kr[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===nC.CUSTOM)return this.apiHost+t;var i=nj+t;switch(e){case"assets":return"https://"+this.region+"-assets."+i;case"api":return"https://"+this.region+"."+i}}}var nI={icontains:(e,t)=>!!$&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!$&&-1===t.href.toLowerCase().indexOf(e.toLowerCase()),regex:(e,t)=>!!$&&sN(t.href,e),not_regex:(e,t)=>!!$&&!sN(t.href,e),exact:(e,t)=>
1t.href===e,is_not:(e,t)=>t.href!==e};class nR{constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{nR.Pr("retrieved web experiments from the server"),t.Tr=new Map,e.forEach(e=>{if(e.feature_flag_key){t.Tr&&(nR.Pr("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(i=t.Tr)||i.set(e.feature_flag_key,e));var i,r=t._instance.getFeatureFlag(e.feature_flag_key);eh(r)&&e.variants[r]&&t.Ir(e.name,r,e.variants[r].transforms)}else if(e.variants)for(var s in e.variants){var n=e.variants[s];nR.Cr(n)&&t.Ir(e.name,s,n.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}onFeatureFlags(e){if(this._is_bot())nR.Pr("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(eg(this.Tr))return this.Tr=new Map,this.loadIfEnabled(),void this.previewWebExperiment();nR.Pr("applying feature flags",e),e.forEach(e=>{var t;if(this.Tr&&null!=(t=this.Tr)&&t.has(e)){var i,r=this._instance.getFeatureFlag(e),s=null==(i=this.Tr)?void 0:i.get(e);r&&null!=s&&s.variants[r]&&this.Ir(s.name,r,s.variants[r].transforms)}})}}previewWebExperiment(){var e=nR.getWindowLocation();if(null!=e&&e.search){var t=i2(null==e?void 0:e.search,"__experiment_id"),i=i2(null==e?void 0:e.search,"__experiment_variant");t&&i&&(nR.Pr("previewing web experiments "+t+" && "+i),this.getWebExperiments(e=>{this.Rr(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=>200===t.statusCode&&t.json?e(t.json.experiments||[]):e([])})}Rr(e,t,i){var r=i.filter(t=>t.id===e);r&&r.length>0&&(nR.Pr("Previewing web experiment ["+r[0].name+"] with variant ["+t+"]"),this.Ir(r[0].name,t,r[0].variants[t].transforms))}static Cr(e){return!eg(e.conditions)&&nR.Fr(e)&&nR.Or(e)}static Fr(e){if(eg(e.conditions)||eg(null==(t=e.conditions)?void 0:t.url))return!0;var t,i,r,s,n=nR.getWindowLocation();return!!n&&(null==(i=e.conditions)||!i.url||nI[null!=(r=null==(s=e.conditions)?void 0:s.urlMatchType)?r:"icontains"](e.conditions.url,n))}
1static getWindowLocation(){return null==$?void 0:$.location}static Or(e){if(eg(e.conditions)||eg(null==(i=e.conditions)?void 0:i.utm))return!0;var t=rU();if(t.utm_source){var i,r,s,n,a,o,l,c,u,h=null==(r=e.conditions)||null==(r=r.utm)||!r.utm_campaign||(null==(s=e.conditions)||null==(s=s.utm)?void 0:s.utm_campaign)==t.utm_campaign,d=null==(n=e.conditions)||null==(n=n.utm)||!n.utm_source||(null==(a=e.conditions)||null==(a=a.utm)?void 0:a.utm_source)==t.utm_source,p=null==(o=e.conditions)||null==(o=o.utm)||!o.utm_medium||(null==(l=e.conditions)||null==(l=l.utm)?void 0:l.utm_medium)==t.utm_medium,g=null==(c=e.conditions)||null==(c=c.utm)||!c.utm_term||(null==(u=e.conditions)||null==(u=u.utm)?void 0:u.utm_term)==t.utm_term;return h&&p&&g&&d}return!1}static Pr(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];tA.info("[WebExperiments] "+e,i)}Ir(e,t,i){this._is_bot()?nR.Pr("Refusing to render web experiment since the viewer is a likely bot"):"control"!==t?i.forEach(i=>{if(i.selector){nR.Pr("applying transform of variant "+t+" for experiment "+e+" ",i);var r,s=null==(r=document)?void 0:r.querySelectorAll(i.selector);null==s||s.forEach(e=>{i.html&&(e.innerHTML=i.html),i.css&&e.setAttribute("style",i.css)})}}):nR.Pr("Control variants leave the page unmodified.")}_is_bot(){return A&&this._instance?nP(A,this._instance.config.custom_blocked_useragents):void 0}}var n$=tL("[PostHog ExternalIntegrations]"),nN={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class nT{constructor(e){this._instance=e}it(e,t){var i;null==(i=q.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,e,e=>{if(e)return n$.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e,t=this,i=function(e){var i,r,n;!s||null!=(i=q.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[e]||t.it(nN[e],()=>{var i;null==(i=q.__PosthogExtensions__)||null==(i=i.integrations)||null==(i=i[e])||i.start(t._instance)}),!s&&null!=(r=q.__PosthogExtensions__)&&null!=(r=r.integrations)&&r[e]&&(null==(n=q.__PosthogExtensions__)||null==(n=n.integrations)||null==(n=n[e])||n.stop())};for(var[r,s]of Object.entries(null!=(e=this._instance.config.integrations)?e:{}))i(r)}}tL("[SessionRecording]");var nO="[SessionRecording]",nM=tL(nO);class nA{get started(){var e;return!(null==(e=this.Mr)||!e.isStarted)}get status(){return this.Mr?this.Mr.status:this.Ar&&!this.jr?"disabled":"lazy_loading"}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.Ar=!1,this.Dr=!1,this.Lr=void 0,this._instance=e,!this._instance.sessionManager)throw nM.error("started without valid sessionManager"),Error(nO+" started without valid sessionManager. This is a bug.");if("always"===this._instance.config.cookieless_mode)throw Error(nO+' cannot be used with cookieless_mode="always"')}get jr(){var e,t=!(null==(e=this._instance.get_property(it))||!e.enabled),i=!this._instance.config.disable_session_recording,r=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return $&&t&&i&&!r}startIfEnabledOrStop(e){var t;if(!this.jr||null==(t=this.Mr)||!t.isStarted){var i=!eu(Object.assign)&&!eu(Array.from);this.jr&&i?(this.Nr(e),nM.info("starting")):this.stopRecording()}}Nr(e){var t,i,r;this.jr&&(null!=q&&null!=(t=q.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(i=q.__PosthogExtensions__)&&i.initSessionRecording?this.Ur(e):null==(r=q.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,this.zr,t=>{if(t)return nM.error("could not load recorder",t);this.Ur(e)}))}stopRecording(){var e,t;null==(e=this.Lr)||e.call(this),this.Lr=void 0,null==(t=this.Mr)||t.stop()}Hr(){var e;null==(e=this._instance.persistence)||e.unregister(ir)}Br(e){if(this._instance.persistence){var t,i,r=this._instance.persistence,s=()=>{var t=!1===e.sessionRecording?void 0:e.sessionRecording,i=null==t?void 0:t.sampleRate,s=eg(i)?null:parseFloat(i);eg(s)&&this.Hr();var n=null==t?void 0:t.minimumDurationMilliseconds;r.register({[it]:Y({cache_timestamp:Date.now(),enabled:!!t},t,{networkPayloadCapture:Y({capturePerformance:e.capturePerformance},null==t?void 0:t.networkPayloadCapture),canvasRecording:{enabled:null==t?void 0:t.recordCanvas,fps:null==t?void 0:t.canvasFps,quality:null==t?void 0:t.canvasQuality},sampleRate:s,minimumDurationMilliseconds:eu(n)?null:n,endpoint:null==t?void 0:t.endpoint,triggerMatchType:null==t?void 0:t.triggerMatchType,masking:null==t?void 0:t.masking,urlTriggers:null==t?void 0:t.urlTriggers})})};s(),null==(t=this.Lr)||t.call(this),this.Lr=null==(i=this._instance.sessionManager)?void 0:i.onSessionId(s)}}onRemoteConfig(e){"sessionRecording"in e?!1!==e.sessionRecording?(this.Dr=!1,this.Br(e),this.Ar=!0,this.startIfEnabledOrStop()):this.Ar=!0:nM.info("skipping remote config with no sessionRecording",e)}log(e,t){var i;void 0===t&&(t="log"),null!=(i=this.Mr)&&i.log?this.Mr.log(e,t):nM.warn("log called before recorder was ready")}get zr(){var e,t,i=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(it);return(null==i||null==(t=i.scriptConfig)?void 0:t.script)||"lazy-recorder"}qr(){var e,t=this._instance.get_property(it);if(!t)return!1;var i=null!=(e=("object"==typeof t?t:JSON.parse(t)).cache_timestamp)?e:Date.now();return Date.now()-i<=3e5}Ur(e){var t,i;if(null==(t=q.__PosthogExtensions__)||!t.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.Mr||(this.Mr=null==(i=q.__PosthogExtensions__)?void 0:i.initSessionRecording(this._instance),this.Mr._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),this.qr()?this.Mr.start(e):this.Dr||(this.Dr=!0,nM.info("persisted remote config is stale, requesting fresh config before starting"),new ng(this._instance).load())}onRRwebEmit(e){var t;null==(t=this.Mr)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.Mr||null==(t=this._instance.persistence)||t.register({$replay_override_linked_flag:!0}),null==(e=this.Mr)||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.Mr||null==(t=this._instance.persistence)||t.register({$replay_override_sampling:!0}),null==(e=this.Mr)||e.overrideSampling()}overrideTrigger(e){var t,i;this.Mr||null==(i=this._instance.persistence)||i.register({["url"===e?"$replay_override_url_trigger":"$replay_override_event_trigger"]:!0}
1),null==(t=this.Mr)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.Mr)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var i;return!(null==(i=this.Mr)||!i.tryAddCustomEvent(e,t))}}var nL={},nD=()=>{},nH="posthog",nB=!sC&&-1===(null==U?void 0:U.indexOf("MSIE"))&&-1===(null==U?void 0:U.indexOf("Mozilla")),nz=e=>{var t;return Y({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:function(e){var t=null==e?void 0:e.hostname;if(!eh(t))return!1;var i=t.split(".").slice(-2).join(".");for(var r of tK)if(i===r)return!1;return!0}(null==L?void 0:L.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:nD,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:D&&eh(null==D?void 0:D.search)&&-1!==D.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:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==$||null==(t=$.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;tA.error(t)},get_device_id:e=>e,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:3e3},error_tracking:{},_onCapture:nD,__preview_eager_load_replay:!1},{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}:{},external_scripts_inject_target:e&&e>="2026-01-30"?"head":"body",internal_or_test_user_hostname:e&&e>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0})},nU=e=>{var t={};eu(e.process_person)||(t.person_profiles=e.process_person),eu(e.xhr_headers)||(t.request_headers=e.xhr_headers),eu(e.cookie_name)||(t.persistence_name=e.cookie_name),eu(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),eu(e.store_google)||(t.save_campaign_params=e.store_google),eu(e.verbose)||(t.debug=e.verbose);var i=tq({},t,e);return ea(e.property_blacklist)&&(eu(e.property_denylist)?i.property_denylist=e.property_blacklist:ea(e.property_denylist)?i.property_denylist=[...e.property_blacklist,...e.property_denylist]:tA.error("Invalid value for property_denylist config: "+e.property_denylist)),i};class nq{constructor(){this.__forceAllowLocalhost=!1}get Wr(){return this.__forceAllowLocalhost}set Wr(e){tA.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class nG{get decideEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}get flagsEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}constructor(){this.webPerformance=new nq,this.Gr=!1,this.version=G.LIB_VERSION,this.bi=new ni,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=nz(
vendor: 4,830 bytes, line 1
1),this.SentryIntegration=rI,this.sentryIntegration=e=>{var t;return t=rF(this,e),{name:rj,processEvent:e=>t(e)}},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Vr=!1,this.Jr=null,this.Kr=null,this.Yr=null,this.featureFlags=new sK(this),this.toolbar=new rO(this),this.scrollManager=new nm(this),this.pageViewManager=new r2(this),this.surveys=new no(this),this.conversations=new nc(this),this.logs=new nu(this),this.experiments=new nR(this),this.exceptions=new sD(this),this.rateLimiter=new nd(this),this.requestRouter=new nF(this),this.consent=new rm(this),this.externalIntegrations=new nT(this),this.people={set:(e,t,i)=>{var r=eh(e)?{[e]:t}:e;this.setPersonProperties(r),null==i||i({})},set_once:(e,t,i)=>{var r=eh(e)?{[e]:t}:e;this.setPersonProperties(void 0,r),null==i||i({})}},this.on("eventCaptured",e=>tA.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,i){if(i&&i!==nH){var r,s=null!=(r=nL[i])?r:new nG;return s._init(e,t,i),nL[i]=s,nL[nH][i]=s,s}return this._init(e,t,i)}_init(e,t,i){if(void 0===t&&(t={}),eu(e)||ed(e))return tA.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.Xr(t.debug),this.Qr=t,this.Zr=[],t.person_profiles&&(this.Kr=t.person_profiles),this.set_config(tq({},nz(t.defaults),nU(t),{name:i,token:e})),this.config.on_xhr_error&&tA.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:r3.GZipJS;var r=this.ts();this.persistence=new sZ(this.config,r),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new sZ(Y({},this.config,{persistence:"sessionStorage"}),r);var s=Y({},this.persistence.props),n=Y({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.es=new nf(e=>this.rs(e),this.config.request_queue_config),this.ss=new nv(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 nw(this),this.sessionPropsManager=new nb(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(tA.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.ns(a)},0)):(tA.info("Initializing extensions synchronously"),this.ns(a)),G.DEBUG=G.DEBUG||this.config.debug,G.DEBUG&&tA.info("Starting in debug mode",{this:this,config:t,thisC:Y({},this.config),p:s,s:n}),void 0!==(null==(o=t.bootstrap)?void 0:o.distinctID)){var o,l,c,u=this.config.get_device_id(rn()),h=null!=(l=t.bootstrap)&&l.isIdentifiedID?u:t.bootstrap.distinctID;this.persistence.set_property(ip,null!=(c=t.bootstrap)&&c.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:t.bootstrap.distinctID,$device_id:h})}if(this.os()){var d,p,g=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=>g[e]).reduce((e,i)=>{var r,s;return null!=(r=t.bootstrap)&&null!=(r=r.featureFlagPayloads)&&r[i]&&(e[i]=null==(s=t.bootstrap)||null==(s=s.featureFlagPayloads)?void 0:s[i]),e},{});this.featureFlags.receivedFeatureFlags({featureFlags:g,featureFlagPayloads:f})}if(a)this.register_once({distinct_id:iw,$device_id:null},"");else if(!this.get_distinct_id()){var _=this.config.get_device_id(rn());this.register_once({distinct_id:_,$device_id:_},""),this.persistence.set_property(ip,"anonymous")}return tZ($,"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()||rn();e.config.get_device_id=r,i.id()&&(e.register({distinct_id:i.id(),$device_id:r()}),e.persistence.set_property(ip,"identified")),t()},s=i.user();"then"in s&&eo(s.then)?s.then(r):r(s)}(e,()=>{var r;i.register((Promise&&Promise.resolve||rC.warn("This browser does not have Promise support, and can not use the segment integration"),r=(t,i)=>{if(!i)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(rC.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(rC.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},{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>r(e,e.event.event),page:e=>r(e,"$pageview"),identify:e=>r(e,"$identify"),screen:e=>r(e,"$screen")})).then(()=>{t()})})}(this,()=>this.ls()):this.ls(),eo(this.config._onCapture)&&this.config._onCapture!==nD&&(tA.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&tA.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}ns(e){var t=performance.now();this.historyAutocapture=new rP(this),this.historyAutocapture.startIfEnabled();var i=[];i.push(()=>{new rA(this).startIfEnabledOrStop()}),i.push(()=>{var e;this.siteApps=new nS(this),null==(e=this.siteApps)||e.init()}),e||i.push(()=>{this.sessionRecording=new nA(this),this.sessionRecording.startIfEnabledOrStop()}),this.config.disable_scroll_properties||i.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),i.push(()=>{this.autocapture=new i6(this),this.autocapture.startIfEnabled()}),i.push(()=>{this.surveys.loadIfEnabled()}),i.push(()=>{this.logs.loadIfEnabled()}),i.push(()=>{this.conversations.loadIfEnabled()}),i.push(()=>{this.productTours=new s1(this),this.productTours.loadIfEnabled()}),i.push(()=>{this.heatmaps=new r1(this),this.heatmaps.startIfEnabled()}),i.push(()=>{this.webVitalsAutocapture=new rZ(this)}),i.push(()=>{this.exceptionObserver=new rk(this),this.exceptionObserver.startIfEnabledOrStop()}),i.push(()=>{this.deadClicksAutocapture=new rw(this,rx),this.deadClicksAutocapture.startIfEnabledOrStop()}),i.push(()=>{if(this.us){var e=this.us;this.us=void 0,this.wi(e)}}),this.hs(i,t)}hs(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout(()=>{this.hs(e,t)},0);var i=e.shift();if(i)try{i()}catch(e){tA.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&&tA.info("PostHog extensions initialized ("+r+"ms)")}wi(e){var t,i,r,s,n,a,o,l,c;L&&L.body?(this.config.__preview_deferred_init_extensions&&(this.us=e),this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=Q(e.supportedCompression,r3.GZipJS)?r3.GZipJS:Q(e.supportedCompression,r3.Base64)?r3.Base64:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Kr?this.Kr:"identified_only"}),null==(i=this.siteApps)||i.onRemoteConfig(e),null==(r=this.sessionRecording)||r.onRemoteConfig(e),null==(s=this.autocapture)||s.onRemoteConfig(e),null==(n=this.heatmaps)||n.onRemoteConfig(e),this.surveys.onRemoteConfig(e),this.logs.onRemoteConfig(e),this.conversations.onRemoteConfig(e),null==(a=this.productTours)||a.onRemoteConfig(e),null==(o=this.webVitalsAutocapture)||o.onRemoteConfig(e),null==(l=this.exceptionObserver)||l.onRemoteConfig(e),this.exceptions.onRemoteConfig(e),null==(c=this.deadClicksAutocapture)||c.onRemoteConfig(e)):(tA.info("document not ready yet, trying again in 500 milliseconds..."),setTimeout(()=>{this.wi(e)},500))}ls(){try{this.config.loaded(this)}catch(e){tA.critical("`loaded` function failed",e)}if(this.ds(),this.config.internal_or_test_user_hostname&&null!=D&&D.hostname){var e=D.hostname,t=this.config.internal_or_test_user_hostname;("string"==typeof t?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||"always"===this.config.cookieless_mode)&&this.vs()},1),new ng(this).load(),this.featureFlags.flags()}ds(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.es)||e.enable())}_dom_loaded(){this.is_capturing()&&tz(this.__request_queue,e=>this.rs(e)),this.__request_queue=[],this.ds()}_handle_unload(){var e,t;this.surveys.handlePageUnload(),this.config.request_batching?(this.cs()&&this.capture("$pageleave"),null==(e=this.es)||e.unload(),null==(t=this.ss)||t.unload()):this.cs()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(nB?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=sF(e.url,{ip:+!!this.config.ip}),e.headers=Y({},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,s=Y({},e);s.timeout=s.timeout||6e4,s.url=sF(s.url,{_:(new Date).getTime().toString(),ver:G.LIB_VERSION,compression:s.compression});var n=null!=(t=s.transport)?t:"fetch",a=s$.filter(e=>!s.disableTransport||!e.transport||!s.disableTransport.includes(e.transport)),o=null!=(i=null==(r=tX(a,e=>e.transport===n))?void 0:r.method)?i:a[0].method;if(!o)throw Error("No available transport method");o(s)})(Y({},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)}}))))}rs(e){this.ss?this.ss.retriableRequest(e):this._send_request(e)}_execute_array(e){var t,i=[],r=[],s=[];tz(e,e=>{e&&(ea(t=e[0])?s.push(e):eo(e)?e.call(this):ea(e)&&"alias"===t?i.push(e):ea(e)&&-1!==t.indexOf("capture")&&eo(this[t])?s.push(e):r.push(e))});var n=function(e,t){tz(e,function(e){if(ea(e[0])){var i=t;tU(e,function(e){i=i[e[0]].apply(i,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};n(i,this),n(r,this),n(s,this)}os(){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.es){if(this.is_capturing())if(!eu(e)&&eh(e)){var s=!this.config.opt_out_useragent_filter&&this._is_bot();if(!(s&&!this.config.__preview_capture_bot_pageviews)){var n=null!=i&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==n||!n.isRateLimited){null!=t&&t.$current_url&&!eh(null==t?void 0:t.$current_url)&&(tA.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 a=new Date,o=(null==i?void 0:i.timestamp)||a,l=rn(),c={uuid:l,event:e,properties:this.calculateEventProperties(e,t||{},o,l)};"$pageview"===e&&this.config.__preview_capture_bot_pageviews&&s&&(c.event="$bot_pageview",c.properties.$browser_type="bot"),n&&(c.properties.$lib_rate_limit_remaining_tokens=n.remainingTokens),(null==i?void 0:i.$set)&&(c.$set=null==i?void 0:i.$set);var u,h="$groupidentify"!==e,d=this.fs(null==i?void 0:i.$set_once,h);if(d&&(c.$set_once=d),(p=c,g=null!=i&&i._noTruncate?null:this.config.properties_string_max_length,f=e=>eh(e)&&!ep(g)?e.slice(0,g):e,_=new Set,c=function e(t,i){var r;return t!==Object(t)?f?f(t):t:_.has(t)?void 0:(_.add(t),ea(t)?(r=[],tz(t,t=>{r.push(e(t))})):(r={},tU(t,(t,i)=>{_.has(t)||(r[i]=e(t,i))})),r)}(p)).timestamp=o,eu(null==i?void 0:i.timestamp)||(c.properties.$event_time_override_provided=!0,c.properties.$event_time_override_system_time=a),e===s5.DISMISSED||e===s5.SENT){var p,g,f,_,v,m,y,b=null==t?void 0:t[s4.SURVEY_ID],x=null==t?void 0:t[s4.SURVEY_ITERATION];u={id:b,current_iteration:x},localStorage.getItem(s9(u))||localStorage.setItem(s9(u),"true"),c.$set=Y({},c.$set,{[(v={id:b,current_iteration:x},y="$survey_"+(m=e===s5.SENT?"responded":"dismissed")+"/"+v.id,v.current_iteration&&v.current_iteration>0&&(y="$survey_"+m+"/"+v.id+"/"+v.current_iteration),y)]:!0})}else e===s5.SHOWN&&(c.$set=Y({},c.$set,{[s4.SURVEY_LAST_SEEN_DATE]:(new Date).toISOString()}));var w=Y({},c.properties.$set,c.$set);if(ec(w)||this.setPersonPropertiesForFlags(w),!eg(this.config.before_send)){var E=this.ps(c);if(!E)return;c=E}this.bi.emit("eventCaptured",c);var k={method:"POST",url:null!=(r=null==i?void 0:i._url)?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.rs(k):this.es.enqueue(k),c}tA.critical("This capture call is ignored due to client rate limiting.")}}else tA.error("No event name provided to posthog.capture")}else tA.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",t=>e(t.event,t))}calculateEventProperties(e,t,i,r,s){if(i=i||new Date,!this.persistence||!this.sessionPersistence)return t;var n,a=s?void 0:this.persistence.remove_event_timer(e),o=Y({},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 l=Y({},this.persistence.properties(),this.sessionPersistence.properties());return o.distinct_id=l.distinct_id,(!eh(o.distinct_id)&&!ef(o.distinct_id)||ed(o.distinct_id))&&tA.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),o}var c,u=function(e,t){if(!U)return{};var i,r,s=e?tG([],rD,t||[]):[],[n,a]=function(e){for(var t=0;t<th.length;t++){var[i,r]=th[t],s=i.exec(e),n=s&&(eo(r)?r(s,e):r);if(n)return n}return["",""]}(U);return tq(tJ({$os:n,$os_version:a,$browser:tl(U,navigator.vendor),$device:td(U),$device_type:(r=td(U))===eN||r===e$||"Kobo"===r||"Kindle Fire"===r||r===e9?eR:r===eZ||r===e0||r===eQ||r===e7?"Console":r===eO?"Wearable":r?eF:"Desktop",$timezone:rK(),$timezone_offset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}}()}),{$current_url:i3(null==D?void 0:D.href,s,rB),$host:null==D?void 0:D.host,$pathname:null==D?void 0:D.pathname,$raw_user_agent:U.length>1e3?U.substring(0,997)+"...":U,$browser_version:tu(U,navigator.vendor),$browser_language:rV(),$browser_language_prefix:"string"==typeof(i=rV())?i.split("-")[0]:void 0,$screen_height:null==$?void 0:$.screen.height,$screen_width:null==$?void 0:$.screen.width,$viewport_height:null==$?void 0:$.innerHe
1ight,$viewport_width:null==$?void 0:$.innerWidth,$lib:"web",$lib_version:G.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:h,windowId:d}=this.sessionManager.checkAndGetSessionAndWindowId(s,i.getTime());o.$session_id=h,o.$window_id=d}this.sessionPropsManager&&tq(o,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&tq(o,this.sessionRecording.sdkDebugProperties),o.$sdk_debug_retry_queue_size=null==(n=this.ss)?void 0:n.length}catch(e){o.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===nC.CUSTOM&&(o.$lib_custom_api_host=this.config.api_host),c="$pageview"!==e||s?"$pageleave"!==e||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(i):this.pageViewManager.doPageView(i,r),o=tq(o,c),"$pageview"===e&&L&&(o.title=L.title),!eu(a)){var p=i.getTime()-a;o.$duration=parseFloat((p/1e3).toFixed(3))}U&&this.config.opt_out_useragent_filter&&(o.$browser_type=this._is_bot()?"bot":"browser"),(o=tq({},u,this.persistence.properties(),this.sessionPersistence.properties(),o)).$is_identified=this._isIdentified(),ea(this.config.property_denylist)?tU(this.config.property_denylist,function(e){delete o[e]}):tA.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var g=this.config.sanitize_properties;g&&(tA.error("sanitize_properties is deprecated. Use before_send instead"),o=g(o,e));var f=this.gs();return o.$process_person_profile=f,f&&!s&&this._s("_calculate_event_properties"),o}fs(e,t){if(void 0===t&&(t=!0),!this.persistence||!this.gs()||this.Gr)return e;var i,r=tq({},this.persistence.get_initial_props(),(null==(i=this.sessionPropsManager)?void 0:i.getSetOnceProps())||{},e||{}),s=this.config.sanitize_properties;return s&&(tA.error("sanitize_properties is deprecated. Use before_send instead"),r=s(r,"$set_once")),t&&(this.Gr=!0),ec(r)?void 0:r}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)}bs(e,t){this.register({[e]:t})}getFeatureFlag(e,t){return this.featureFlags.getFeatureFlag(e,t)}getFeatureFlagPayload(e){return this.featureFlags.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){return this.featureFlags.getFeatureFlagResult(e,t)}isFeatureEnabled(e,t){return this.featureFlags.isFeatureEnabled(e,t)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateFlags(e,t,i){var r=null!=i&&i.merge?this.featureFlags.getFlagVariants():{},s=null!=i&&i.merge?this.featureFlags.getFlagPayloads():{},n=Y({},r,e),a=Y({},s,t),o={};for(var[l,c]of Object.entries(n)){var u="string"==typeof c;o[l]={key:l,enabled:!!u||!!c,variant:u?c:void 0,reason:void 0,metadata:eu(null==a?void 0:a[l])?void 0:{id:0,version:void 0,description:void 0,payload:a[l]}}}this.featureFlags.receivedFeatureFlags({flags:o})}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.bi.on(e,t)}onFeatureFlags(e){return this.featureFlags.onFeatureFlags(e)}onSurveysLoaded(e){return this.surveys.onSurveysLoaded(e)}onSessionId(e){var t,i;return null!=(t=null==(i=this.sessionManager)?void 0:i.onSessionId(e))?t:()=>{}}getSurveys(e,t){void 0===t&&(t=!1),this.surveys.getSurveys(e,t)}getActiveMatchingSurveys(e,t){void 0===t&&(t=!1),this.surveys.getActiveMatchingSurveys(e,t)}renderSurvey(e,t){this.surveys.renderSurvey(e,t)}displaySurvey(e,t){void 0===t&&(t=nt),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 tA.uninitializedWarning("posthog.identify");if(ef(e)&&(e=e.toString(),tA.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()))tA.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!==iw){if(this._s("posthog.identify")){var r=this.get_distinct_id();this.register({$user_id:e}),this.get_property("$device_id")||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),e!==r&&e!==this.get_property(t0)&&(this.unregister(t0),this.register({distinct_id:e}));var s="anonymous"===(this.persistence.get_property(ip)||"anonymous");e!==r&&s?(this.persistence.set_property(ip,"identified"),this.setPersonPropertiesForFlags(Y({},i||{},t||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:i||{}}),this.Yr=sT(e,t,i),this.featureFlags.setAnonymousDistinctId(r)):(t||i)&&this.setPersonProperties(t,i),e!==r&&(this.reloadFeatureFlags(),this.unregister(ih))}}else tA.critical('The string "'+iw+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else tA.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,t){if((e||t)&&this._s("posthog.setPersonProperties")){var i=sT(this.get_distinct_id(),e,t);this.Yr!==i?(this.setPersonPropertiesForFlags(Y({},t||{},e||{})),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.Yr=i):tA.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:Y({},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 tA.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._s("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,t)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){if(tA.info("reset"),!this.__loaded)return tA.uninitializedWarning("posthog.reset");var t,i,r,s,n=this.get_property("$device_id");if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(i=this.sessionPersistence)||i.clear(),this.surveys.reset(),this.featureFlags.reset(),null==(r=this.persistence)||r.set_property(ip,"anonymous"),null==(s=this.sessionManager)||s.resetSessionId(),this.Yr=null,"always"===this.config.cookieless_mode)this.register_once({distinct_id:iw,$device_id:null},"");else{var a=this.config.get_device_id(rn());this.register_once({distinct_id:a,$device_id:e?a:n},"")}this.register({$last_posthog_reset:(new Date).toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return null!=(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:i}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(null!=e&&e.withTimestamp&&i){var s,n=null!=(s=e.timestampLookBack)?s:10;if(!i)return r;r+="?t="+Math.max(Math.floor(((new Date).getTime()-i)/1e3)-n,0)}return r}alias(e,t){return e===this.get_property(tQ)?(tA.critical("Attempting to create alias for existing People user - aborting."),-2):this._s("posthog.alias")?(eu(t)&&(t=this.get_distinct_id()),e!==t?(this.bs(t0,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(tA.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=Y({},this.config);if(el(e)){tq(this.config,nU(e));var i,r,s,n,a,o,l,c,u=this.ts();null==(i=this.persistence)||i.update_config(this.config,t,u),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new sZ(Y({},this.config,{persistence:"sessionStorage"}),u);var h=this.Xr(this.config.debug);ev(h)&&(this.config.debug=h),ev(this.config.debug)&&(this.config.debug?(G.DEBUG=!0,rh.H()&&rh.G("ph_debug","true"),tA.info("set_config",{config:e,oldConfig:t,newConfig:Y({},this.config)})):(G.DEBUG=!1,rh.H()&&rh.V("ph_debug"))),null==(r=this.exceptionObserver)||r.onConfigChange(),null==(s=this.sessionRecording)||s.startIfEnabledOrStop(),null==(n=this.autocapture)||n.startIfEnabled(),null==(a=this.heatmaps)||a.startIfEnabled(),null==(o=this.exceptionObserver)||o.startIfEnabledOrStop(),null==(l=this.deadClicksAutocapture)||l.startIfEnabledOrStop(),this.surveys.loadIfEnabled(),this.ys(),null==(c=this.externalIntegrations)||c.startIfEnabledOrStop()}}startSessionRecording(e){var t,i,r,s,n,a=!0===e,o={sampling:a||!(null==e||!e.sampling),linked_flag:a||!(null==e||!e.linked_flag),url_trigger:a||!(null==e||!e.url_trigger),event_trigger:a||!(null==e||!e.event_trigger)};Object.values(o).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),o.sampling&&(null==(i=this.sessionRecording)||i.overrideSampling()),o.linked_flag&&(null==(r=this.sessionRecording)||r.overrideLinkedFlag()),o.url_trigger&&(null==(s=this.sessionRecording)||s.overrideTrigger("url")),o.event_trigger&&(null==(n=this.sessionRecording)||n.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!(null==(e=this.sessionRecording)||!e.started)}captureException(e,t){var i=Error("PostHog syntheticException"),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:i});return this.exceptions.sendExceptionEvent(Y({},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)?e:nH;return t!==nH&&(t=nH+"."+t),t}_isIdentified(){var e,t;return"identified"===(null==(e=this.persistence)?void 0:e.get_property(ip))||"identified"===(null==(t=this.sessionPersistence)?void 0:t.get_property(ip))}gs(){var e,t;return!("never"===this.config.person_profiles||"identified_only"===this.config.person_profiles&&
vendor: 5,050 bytes, line 1
1!this._isIdentified()&&ec(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[t0])&&(null==(t=this.persistence)||null==(t=t.props)||!t[ib]))}cs(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)}createPersonProfile(){this.gs()||this._s("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this._s("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}_s(e){return"never"===this.config.person_profiles?(tA.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.bs(ib,!0),!0)}ts(){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}ys(){var e,t,i,r,s=this.ts();return(null==(e=this.persistence)?void 0:e.Pi)!==s&&(null==(i=this.persistence)||i.set_disabled(s)),(null==(t=this.sessionPersistence)?void 0:t.Pi)!==s&&(null==(r=this.sessionPersistence)||r.set_disabled(s)),s}opt_in_capturing(e){var t,i,r,s;"always"!==this.config.cookieless_mode?("on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),null==(i=this.sessionManager)||i.destroy(),null==(r=this.pageViewManager)||r.destroy(),this.sessionManager=new nw(this),this.pageViewManager=new r2(this),this.persistence&&(this.sessionPropsManager=new nb(this,this.sessionManager,this.persistence)),this.sessionRecording=new nA(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this.ys(),this.ds(),null==(t=this.sessionRecording)||t.startIfEnabledOrStop(),"on_reject"==this.config.cookieless_mode&&this.surveys.loadIfEnabled(),(eu(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!=(s=null==e?void 0:e.captureEventName)?s:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.vs()):tA.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e,t,i;"always"!==this.config.cookieless_mode?("on_reject"===this.config.cookieless_mode&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.ys(),"on_reject"===this.config.cookieless_mode&&(this.register({distinct_id:iw,$device_id:null}),null==(e=this.sessionManager)||e.destroy(),null==(t=this.pageViewManager)||t.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,null==(i=this.sessionRecording)||i.stopRecording(),this.sessionRecording=void 0,this.vs())):tA.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===rv.GRANTED?"granted":e===rv.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.ys()}_is_bot(){return A?nP(A,this.config.custom_blocked_useragents):void 0}vs(){L&&("visible"===L.visibilityState?this.Vr||(this.Vr=!0,this.capture("$pageview",{title:L.title},{send_instantly:!0}),this.Jr&&(L.removeEventListener("visibilitychange",this.Jr),this.Jr=null)):this.Jr||(this.Jr=this.vs.bind(this),tZ(L,"visibilitychange",this.Jr)))}debug(e){!1===e?(null==$||$.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==$||$.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}))}M(){var e,t,i,r,s=this.Qr||{};return"advanced_disable_flags"in s?!!s.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(tA.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(t="advanced_disable_decide",i=(e="advanced_disable_flags")in s&&!eg(s[e]),r=t in s&&!eg(s[t]),i?s[e]:!!r&&(tA&&tA.warn("Config field '"+t+"' is deprecated. Please use '"+e+"' instead. The old field will be removed in a future major version."),s[t]))}ps(e){if(eg(this.config.before_send))return e;var t=ea(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var r of t){if(eg(i=r(i))){var s="Event '"+e.event+"' was rejected in beforeSend function";return em(e.event)?tA.warn(s+". This can cause unexpected behavior."):tA.info(s),null}i.properties&&!ec(i.properties)||tA.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return i}getPageViewId(){var e;
1return null==(e=this.pageViewManager.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)})}Xr(e){var t=ev(e)&&!e,i=rh.H()&&"true"===rh.q("ph_debug");return!t&&(!!i||e)}}for(var nV=["identify"],nW=0;nW<nV.length;nW++)nG.prototype[nV[nW]]=tY(nG.prototype[nV[nW]]);var nY,nJ,nK,nX,nZ,nQ,n0,n1,n2,n3,n5,n4,n7,n8,n6,n9,ae,at=(ae=nL[nH]=new nG,function(){function e(){e.done||(e.done=!0,nB=!1,tU(nL,function(e){e._dom_loaded()}))}null!=L&&L.addEventListener?"complete"===L.readyState?e():tZ(L,"DOMContentLoaded",e,{capture:!1}):$&&tA.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),ae),ai=(0,o.createContext)({client:at,bootstrap:void 0});function ar(e){var t,i,r=e.children,s=e.client,n=e.apiKey,a=e.options,l=(0,o.useRef)(null),c=(0,o.useMemo)(function(){return s?(n&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),a&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),s):(n||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),at)},[s,n,JSON.stringify(a)]);return(0,o.useEffect)(function(){if(!s){var e=l.current;e?(n!==e.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),a&&!function e(t,i,r){if(void 0===r&&(r=new WeakMap),t===i)return!0;if("object"!=typeof t||null===t||"object"!=typeof i||null===i)return!1;if(r.has(t)&&r.get(t)===i)return!0;r.set(t,i);var s=Object.keys(t),n=Object.keys(i);if(s.length!==n.length)return!1;for(var a=0;a<s.length;a++){var o=s[a];if(!n.includes(o)||!e(t[o],i[o],r))return!1}return!0}(a,e.options)&&at.set_config(a)):(at.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),at.init(n,a)),l.current={apiKey:n,options:null!=a?a:{}}}},[s,n,JSON.stringify(a)]),o.default.createElement(ai.Provider,{value:{client:c,bootstrap:null!=(t=null==a?void 0:a.bootstrap)?t:null==(i=null==s?void 0:s.config)?void 0:i.bootstrap}},r)}var as=function(e){return"function"==typeof e},an=function(e,t){return(an=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};"function"==typeof SuppressedError&&SuppressedError;var aa={componentStack:null,exceptionEvent:null,error:null},ao=o.default.Component;if("function"!=typeof ao&&null!==ao)throw TypeError("Class extends value "+String(ao)+" is not a constructor or null");function al(){this.constructor=ac}function ac(e){var t=ao.call(this,e)||this;return t.state=aa,t}an(ac,ao),ac.prototype=null===ao?Object.create(ao):(al.prototype=ao.prototype,new al),ac.prototype.componentDidCatch=function(e,t){var i,r=this.props.additionalProperties;as(r)?i=r(e):"object"==typeof r&&(i=r);var s=this.context.client.captureException(e,i),n=t.componentStack;this.setState({error:e,componentStack:null!=n?n:null,exceptionEvent:s})},ac.prototype.render=function(){var e=this.props,t=e.children,i=e.fallback,r=this.state;if(null==r.componentStack)return as(t)?t():t;var s=as(i)?o.default.createElement(i,{error:r.error,componentStack:r.componentStack,exceptionEvent:r.exceptionEvent}):i;return o.default.isValidElement(s)?s:(console.warn("[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."),o.default.createElement(o.default.Fragment,null))},ac.contextType=ai;let au=e=>{if(e?.event!=="$exception")return e;let t=e.properties.$exception_list;return Array.isArray(t)&&t.some(e=>e?.value?.includes("Invariant: attempted to hard navigate to the same URL"))?null:e},ah=({children:e})=>((0,o.useEffect)(()=>{at.init("phc_40Juqvl4Q67AagyZr6BupOnU33kXbLuB47he7zeNpgq",{api_host:"https://us.i.posthog.com",defaults:"2026-01-30",before_send:au,loaded:e=>{}})},[]),(0,r.jsx)(ar,{client:at,children:e})),ad=({children:e})=>{let t=(0,l.useRouter)(),i=t.pathname.includes("/blog/")||t.pathname.includes("/radio-bootcamp/")||t.pathname.includes("/customer-stories/");return(0,o.useEffect)(()=>{let e=1e3*(void 0===window.Beacon);i?setTimeout(()=>{window.Beacon?.("config",{display:{style:"icon"}})},e):setTimeout(()=>{window.Beacon?.("config",{display:{style:"iconAndText"}})},e)},[i]),(0,r.jsxs)(ah,{children:[(0,r.jsx)(u.JsonLd,{graph:c.BASE_GRAPH}),(0,r.jsx)("div",{className:"sticky top-0 z-50 bg-rc-black",children:(0,r.jsx)(R,{})}),e,(0,r.jsx)(m,{})]})};var ap=e.i(10085);let ag={className:ap.default.className,style:{fontFamily:"'graphikWebFont', 'graphikWebFont Fallback'"}};null!=ap.default.variable&&(ag.variable=ap.default.variable);var af=e.i(8514);i=(t=document.documentElement).getAttribute("data-theme"),t.setAttribute("data-theme",`${i??""} dark spacing border`),t.setAttribute("data-color-mode","dark");let a_=(0,af.default)({key:"css"});e.s(["default",0,({Component:e,pageProps:t,emotionCache:i=a_})=>(0,r.jsxs)(n.C,{value:i,children:[(0,r.jsx)(s.default,{children:(0,r.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"})}),(0,r.jsx)(a.Global,{styles:[` 2 :root { 3 --title-impact-font: ${ag.style.fontFamily}, sans-serif; 4 --title-font: ${ag.style.fontFamily}, sans-serif; 5 --body-font: ${ag.style.fontFamily}, sans-serif; 6 } 7 `]}),(0,r.jsx)(ad,{children:(0,r.jsx)(e,{...t})})]})],61560)},6805,(e,t,i)=>{let r="/_app";(window.__NEXT_P=window.__NEXT_P||[]).push([r,()=>e.r(61560)]),t.hot&&t.hot.dispose(function(){window.__NEXT_P.push([r])})}]);
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.