1import{b as P,g as I}from"./chunk-E66SQ4EU.js";import{i as k}from"./chunk-LZ6CO2NU.js";import{a as n}from"./chunk-LFWUBR3N.js";import{w as b}from"./chunk-DREDQAPP.js";import{T as f,Y as c,y as d,ya as g}from"./chunk-AV53HBUR.js";import{a as u,b as m}from"./chunk-DM275RSA.js";var x="www.";function w(a){if(!a)return a;try{let r=/^[a-z][a-z0-9+.-]*:\/\//i.test(a),s=new URL(a,r?void 0:"https://placeholder.invalid"),e=s.hostname.toLowerCase();e.startsWith(x)&&(e=e.slice(x.length));let t=s.pathname;t.length>1&&t.endsWith("/")&&(t=t.slice(0,-1));let l=s.port?`:${s.port}`:"";return r?`${s.protocol}//${e}${l}${t}`:t||"/"}catch{return a}}var R=(()=>{let r=class r{constructor(e,t,l){this.platformId=e,this.title=t,this.router=l,this.eventName="Button clicked",this.token=n.production?n?.MIXPANEL_ID:"",this.currentPagePath="",this.mixpanelInstance=null,this.mixpanelReady=null,this.trackButtonTrigger=(i,o="",h)=>{if(n.production){let p=h||"Button clicked";this.loadMixpanel().then(v=>v.track(p,{"button text":i,"page title":this.pageTitle,"page url":this.normalizedCurrentUrl,"button ID":o}))}},this.trackPlanTrigger=(i,o="",h="Plan clicked")=>{n.production&&this.loadMixpanel().then(p=>p.track(h,{"plan selected":i,"page title":this.pageTitle,"page url":this.normalizedCurrentUrl,"plan ID":o}))},this.routerEventsSubscription$=this.router.events.pipe(d(i=>i instanceof P)).subscribe(i=>{let o=i;this.currentPagePath=(o.url.split("/").pop()||"").toLowerCase()})}loadMixpanel(){return this.mixpanelReady||(this.mixpanelReady=import("./chunk-5F2J45I2.js").then(e=>(this.mixpanelInstance=e.default,n.production&&this.mixpanelInstance.init(this.token),this.mixpanelInstance))),this.mixpanelReady}ngOnDestroy(){this.routerEventsSubscription$&&this.routerEventsSubscription$.unsubscribe()}get currentUrl(){return b(this.platformId)?window.location.href:""}get normalizedCurrentUrl(){return w(this.currentUrl)}track(e,t,l=!1){if(n.production){let i=l?m(u({},t),{"page title":this.pageTitle,"page url":this.normalizedCurrentUrl}):t;this.loadMixpanel().then(o=>o.track(e,i))}}getInstanceForBeacon(){return this.loadMixpanel()}registerSuperProperties(e){n.production&&this.loadMixpanel().then(t=>t.register(e))}identifyUser(e){n.production&&this.loadMixpanel().then(t=>t.identify(e))}setUserData(e){n.production&&this.loadMixpanel().then(t=>t.people.set(e))}getPageTitle(){setTimeout(()=>{this.pageTitle=this.title.getTitle()},1e3)}trackButtonClickOnPartnersPage(e,t){if(n.production){let i={"implementation-partner":"Implementation Partner form click","white-label-chatbot":"White Label Partner form click","white-label-whatsapp-chatbot":"WhatsApp White Label Partner form click",partners:"Partner form click (homepage)","white-label-instagram-chatbot":"Instagram White Label Button Click","white-label-ai-agents":"White Label AI Agents Button Click","white-label-ai-voice-agents":"White Label AI Voice Agents Button Click","white-label-chatbots":"White Label Demo Ad Page Button Click"}[this.currentPagePath]||"";i&&this.loadMixpanel().then(o=>o.track(i,{"button text":e,"button ID":t}))}}};r.\u0275fac=function(t){return new(t||r)(c(g),c(k),c(I))},r.\u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"});let a=r;return a})();export{w as a,R as b};
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.