1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8f45ef0c-41c7-532c-9916-59b8e90a6d02")}catch(e){}}(); 3import{a as f}from"./chunk-L2HLPFHF.js";import{a as W}from"./chunk-5WYEH745.js";import"./chunk-XBDTRTUG.js";import{Kd as J,Ld as se,ae as K,be as oe,ee as Q,fe as ae,ia as T,ja as B,la as ie}from"./chunk-3DSPHW6V.js";import{$ as G,X as M,Y as re,aa as ne}from"./chunk-63QE6F3C.js";import{c as R,d as Z,k as $,n as z,r as te}from"./chunk-J3ZCYF7X.js";import"./chunk-N6HKC5YM.js";import"./chunk-EHPICUXU.js";import"./chunk-NZAURXIC.js";import{D as ee,g as V}from"./chunk-PDBQSBW2.js";import{Ib as H,Ja as b,Jb as t,Lc as F,Nc as U,Va as j,Wa as x,Wb as O,Zd as N,ec as A,fd as D,gd as L,oc as k,tc as S,uc as C,zc as E}from"./chunk-RX45F3VG.js";import"./chunk-XTLLHG7S.js";import"./chunk-3YV6UUBL.js";import"./chunk-JLENAXOB.js";import"./chunk-2QIXGXOC.js";import"./chunk-SNF2N7IK.js";import"./chunk-NM7LVQTP.js";import"./chunk-IK6B3JC3.js";import{m as y}from"./chunk-C6VPWJCA.js";N();Z();ie();N();te();re();oe();ee();ae();se();ne();function ce(s,ue){if(s&1){let i=E();S(0,"congrats",1),F("onRedirect",function(){j(i);let e=U();return x(e.redirectToApp())}),C()}}var Ie=(()=>{class s{constructor(i,r,e,g,o,d,a,h,m){this.route=i,this.adminRequestsService=r,this.planHelperService=e,this.router=g,this.location=o,this.eventsService=d,this.creditsService=a,this.loginHelperService=h,this.offerPostPurchaseService=m,this.showCongrats=O(!1),this.endPurchaseSession=()=>y(this,null,function*(){let n=this.route.snapshot.queryParams.sessionId;if(n)return yield this.adminRequestsService.endStripeSession(n)}),this.replaceUrl=n=>{this.location.replaceState(n)},this.redirectToApp=()=>{this.router.navigate([R.globals.firstAppPage])}}ngOnInit(){return y(this,null,function*(){let i=this.route.snapshot.queryParams,r=this.router.url;if(yield this.offerPostPurchaseService.redirectForProfileCompletion(i,r))return;this.showCongrats.set(!0),this.offerPostPurchaseService.suppressOnboardingForSuperAgent(i);let e=yield this.endPurchaseSession(),g=this.route.snapshot.queryParams.sessionId,o=this.route.snapshot.queryParams.price,d=this.route.snapshot.queryParams.currency,a=this.route.snapshot.queryParams.originalPrice,h=this.route.snapshot.queryParams.originalCurrency,m=this.route.snapshot.queryParams.paywallTrigger,n=this.route.snapshot.queryParams.triggerType||B.upsell,c=this.route.snapshot.queryParams.oneTimePurchases,u=this.route.snapshot.queryParams.pack,X=u?`${u.charAt(0).toUpperCase()+u.slice(1)}_Credits_Pack`:void 0,p=!!u;this.replaceUrl("congrats");let l;this.loginHelperService.isUserLoggedIn()&&(l=yield this.planHelperService.getOrganizationPlansDetails(),this.planHelperService.broadcastOrganizationPlan(e),this.creditsService.refreshCredits());let Y=!p&&!!c,P;try{P=Y&&e.oneTimePurchases.find(v=>v.context?.sessionId===g)?.context?.items[0]?.quantity||void 0}catch(v){console.log(v)}let w=p?X:c||e.name,q=p?u:c?void 0:e.display?.name,I=p?"credits":c?void 0:`${e.display?.duration?.length} ${e.display?.duration?.unit}`,_=p?"credits":"subscription";this.eventsService.log(this.eventsService.events.payment.checkoutCompleted,{paywallTrigger:m||T.offers,triggerType:n,currency:d,plan:l?l.name:void 0,authority:"STRIPE",newPlan:w,newPlanTier:q,newPlanDuration:I,price:o?Number(o):void 0,type:_,quantity:P,originalPrice:a?Number(a):void 0,originalCurrency:h||void 0}),this.eventsService.log(this.eventsService.events.profile.buyPlan,{plan:l?l.name:void 0,authority:"STRIPE",newPlan:w,newPlanTier:q,newPlanDuration:I,currency:d,price:o?Number(o):void 0,paywallTrigger:m||T.offers,triggerType:n,type:_,quantity:P,originalPrice:a?Number(a):void 0,originalCurrency:h||void 0})})}static{this.\u0275fac=function(r){return new(r||s)(t($),t(M),t(K),t(z),t(V),t(Q),t(J),t(G),t(f))}}static{this.\u0275cmp=b({type:s,selectors:[["purchase-congrats"]],standalone:!0,features:[D([f]),L],decls:2,vars:1,consts:[[1,"purchase-congrats-component"],[3,"onRedirect"]],template:function(r,e){r&1&&
3(S(0,"div",0),A(1,ce,1,0,"congrats"),C()),r&2&&(H(),k(1,e.showCongrats()?1:-1))},dependencies:[W]})}}return s})();export{Ie as PurchaseCongratsComponent}; 4/**i18n:e059b5419240afef74436eb5a1887102ff8937e043a8d48b1423a03649476971*/ 5 6//# debugId=8f45ef0c-41c7-532c-9916-59b8e90a6d02
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.