1"use strict";(self.webpackChunkfirst_report=self.webpackChunkfirst_report||[]).push([[180],{91180:(xt,I,o)=>{o.r(I),o.d(I,{AccountPackageSwitchModule:()=>Rt});var s=o(51188),l=o(60177),d=o(9310),y=o(43880),O=o(74255),R=o(1189),t=o(54438),N=o(58532),x=o(28991);let $=(()=>{class a{constructor(){}ngOnInit(){}static{this.\u0275fac=function(n){return new(n||a)}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-account-package-switch"]],decls:4,vars:1,consts:[[3,"HeaderTypeId"],["name","credit"]],template:function(n,i){1&n&&t.nrm(0,"app-header",0)(1,"router-outlet")(2,"router-outlet",1)(3,"app-footer"),2&n&&t.Y8G("HeaderTypeId",2)},dependencies:[s.n3,N.l,x.n],styles:["[_nghost-%COMP%] .section{width:100%;min-height:90vh;background-color:#f2f2f2;text-align:center}[_nghost-%COMP%] div.loading{position:absolute;top:25%;left:calc(50% - 2.84375rem);display:flex;flex-wrap:wrap;justify-content:center;width:8.125rem}[_nghost-%COMP%] div.loading h2{margin-top:8.5rem;flex-basis:100%;font-family:Trebuchet MS,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Tahoma,sans-serif;font-size:1.125rem;color:#403f34;line-height:normal;font-weight:700;text-align:center}@media only screen and (min-width: 48rem){[_nghost-%COMP%] div.loading h2{font-size:1.5rem}}[_nghost-%COMP%] .card{width:100%;border-radius:.5rem;background-color:#fff;box-shadow:0 .125rem .9375rem #e6e5e380;padding:1.5rem;margin-bottom:3.125rem}[_nghost-%COMP%] .header-container{margin-bottom:2rem}[_nghost-%COMP%] .header-container .header{margin-left:1.5%;width:80%}[_nghost-%COMP%] .header-container .header-image{position:relative;top:.25rem;width:2rem}[_nghost-%COMP%] .header-container .text{width:90%;height:1.8125rem;font-family:Trebuchet MS,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Tahoma,sans-serif;font-size:1.125rem;color:#403f34;line-height:normal;font-size:1.5rem;font-weight:700;line-height:1.21;margin-top:.3125rem}@media only screen and (min-width: 48rem){[_nghost-%COMP%] .header-container .text{font-size:1.5rem}}[_nghost-%COMP%] .main-content{margin-bottom:3rem}[_nghost-%COMP%] .btn.btn-primary{margin-left:1.5rem}@media only screen and (max-width: 48rem){[_nghost-%COMP%] .btn.btn-primary{margin-left:0}}"]})}}return a})();var p=o(89417),m=o(89085),F=o(34732),T=function(a){return a.NBC="NBC",a}(T||{}),k=o(59686),D=o(40829),u=o(8147),M=o(42856),L=o(37886),f=o(53638),b=o(11663),U=o(89760),j=o(2082);const H=()=>({lrg:!0}),v=(a,r,e,n,i)=>({state:a,date:r,planName:e,description:n,price:i}),G=a=>({new:a});function X(a,r){1&a&&(t.j41(0,"div",6),t.nrm(1,"loader",7),t.j41(2,"h2"),t.EFF(3),t.nI1(4,"translate"),t.k0s()()),2&a&&(t.R7$(),t.Y8G("when",!0)("config",t.lJ4(5,H)),t.R7$(2),t.JRh(t.bMT(4,3,"EQUIFAX_LOADING_VALUE1")))}function W(a,r){1&a&&t.eu8(0)}function B(a,r){1&a&&t.eu8(0)}function V(a,r){1&a&&(t.EFF(0),t.nI1(1,"translate")),2&a&&t.SpI(" ",t.bMT(1,1,"SWITCH_ACCOUNT_SWITCH_COMPLETION_CURRENT_PLAN")," ")}function Y(a,r){1&a&&(t.EFF(0),t.nI1(1,"translate")),2&a&&t.SpI(" ",t.bMT(1,1,"SWITCH_ACCOUNT_SWITCH_COMPLETION_NEW_PLAN")," ")}function z(a,r){1&a&&(t.EFF(0),t.nI1(1,"translate")),2&a&&t.SpI(" ",t.bMT(1,1,"SWITCH_ACCOUNT_SWITCH_COMPLETION_END")," ")}function J(a,r){1&a&&(t.EFF(0),t.nI1(1,"translate")),2&a&&t.SpI(" ",t.bMT(1,1,"SWITCH_ACCOUNT_SWITCH_COMPLETION_START")," ")}function Q(a,r){if(1&a&&(t.j41(0,"div",46)(1,"div",47)(2,"h4",48),t.DNE(3,V,2,3,"ng-template",5)(4,Y,2,3,"ng-template",null,2,t.C5r),t.k0s(),t.j41(6,"div",49),t.DNE(7,z,2,3,"ng-template",5)(8,J,2,3,"ng-template",null,3,t.C5r),t.EFF(10),t.nI1(11,"dateLocale"),t.k0s()(),t.j41(12,"div",50)(13,"h4",51),t.EFF(14),t.nI1(15,"translate"),t.k0s(),t.j41(16,"div",52),t.EFF(17),t.k0s(),t.j41(18,"div",53)(19,"span",54),t.EFF(20),t.k0s(),t.EFF(21),t.nI1(22,"translate"),t.k0s()()()),2&a){const e=r.state,n=r.date,i=r.planName,c=r.description,C=r.price,h=t.sdS(5),g=t.sdS(9),P=t.XpG(2);t.Y8G("ngClass",t.eq3(19,G,"New"==e)),t.R7$(3),t.Y8G("ngIf","Current"==e)("ngIfElse",h),t.R7$(4),t.Y8G("ngIf","New"!==e)("ngIfElse",g),t.R7$(3),t.SpI(" ",t.brH(11,11,n,P.currentLanguage,"mediumDate")," "),t.R7$(4),t.Lme(" ",i," ",t.bMT(15,15,"
1SWITCH_ACCOUNT_SWITCH_COMPLETION_MONTHLY_SUBSCRIPTION")," "),t.R7$(3),t.SpI(" ",c," "),t.R7$(3),t.SpI(" ",P.formatCurrency(C)," "),t.R7$(),t.SpI(" ",t.bMT(22,17,"SWITCH_ACCOUNT_SWITCH_COMPLETION_TAX_MO")," ")}}function K(a,r){if(1&a&&(t.j41(0,"div",55)(1,"label",56),t.nrm(2,"input",57),t.j41(3,"span",42),t.EFF(4),t.nI1(5,"translateReplacement"),t.k0s()()()),2&a){const e=t.XpG(2);t.R7$(4),t.SpI(" ",t.i5U(5,1,"MARKETING_OPTIN_LABEL",e.merchantTag.MerchantCode)," ")}}function Z(a,r){if(1&a){const e=t.RV6();t.j41(0,"div",8)(1,"div",9),t.nrm(2,"app-back-button",10),t.k0s(),t.j41(3,"div",11)(4,"div",12)(5,"div"),t.nrm(6,"img",13),t.k0s(),t.j41(7,"div",14)(8,"label",15),t.EFF(9),t.nI1(10,"translate"),t.k0s()(),t.j41(11,"div",16),t.EFF(12),t.nI1(13,"translate"),t.k0s()(),t.j41(14,"div",17)(15,"div",18)(16,"div",19),t.DNE(17,W,1,0,"ng-container",20),t.k0s(),t.j41(18,"div",21),t.DNE(19,B,1,0,"ng-container",20),t.k0s(),t.DNE(20,Q,23,21,"ng-template",null,1,t.C5r),t.k0s(),t.nrm(22,"hr"),t.j41(23,"div",22)(24,"h4",23),t.EFF(25),t.nI1(26,"translate"),t.k0s(),t.j41(27,"div",24)(28,"div",25)(29,"div",26),t.EFF(30),t.nI1(31,"translate"),t.k0s(),t.j41(32,"div",27),t.EFF(33),t.j41(34,"button",28),t.nI1(35,"translate"),t.j41(36,"span"),t.EFF(37,"tooltip"),t.k0s()()()(),t.j41(38,"div",29)(39,"div",26),t.EFF(40),t.nI1(41,"translate"),t.k0s(),t.j41(42,"div",27),t.EFF(43),t.k0s()(),t.j41(44,"div",30)(45,"div",26),t.EFF(46),t.nI1(47,"translate"),t.k0s(),t.j41(48,"div",27),t.EFF(49),t.nI1(50,"dateLocale"),t.k0s()()(),t.j41(51,"div",31)(52,"div",32)(53,"div",33),t.nrm(54,"span",34),t.EFF(55),t.nI1(56,"translate"),t.k0s(),t.j41(57,"div",35),t.EFF(58),t.k0s()(),t.j41(59,"div",36)(60,"div",33),t.EFF(61),t.nI1(62,"translate"),t.k0s(),t.j41(63,"div",35),t.EFF(64),t.k0s()(),t.j41(65,"div",37)(66,"div",33),t.EFF(67),t.nI1(68,"translate"),t.k0s(),t.j41(69,"div",35),t.EFF(70),t.k0s()()()(),t.j41(71,"form",38),t.bIt("ngSubmit",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.onSubmit())}),t.j41(72,"div",39)(73,"label",40),t.nrm(74,"input",41),t.j41(75,"span",42),t.EFF(76),t.nI1(77,"translate"),t.k0s()()(),t.DNE(78,K,6,4,"div",43),t.j41(79,"div",44)(80,"button",45),t.EFF(81),t.nI1(82,"translate"),t.k0s()()()()()()}if(2&a){const e=t.sdS(21),n=t.XpG();t.R7$(2),t.Y8G("backToRoute","../plan-selection"),t.R7$(7),t.SpI(" ",t.bMT(10,27,"SWITCH_ACCOUNT_SWITCH_COMPLETION_HEADER")," "),t.R7$(3),t.SpI(" ",t.bMT(13,29,"SWITCH_ACCOUNT_SWITCH_COMPLETION_HEADER_SUB")," "),t.R7$(5),t.Y8G("ngTemplateOutlet",e)("ngTemplateOutletContext",t.s1E(55,v,n.state.currentPlan.state,n.state.currentPlan.date,n.state.currentPlan.name,n.state.currentPlan.description,n.state.currentPlan.price)),t.R7$(2),t.Y8G("ngTemplateOutlet",e)("ngTemplateOutletContext",t.s1E(61,v,n.state.newPlan.state,n.state.newPlan.date,n.state.newPlan.name,n.state.newPlan.description,n.state.newPlan.price)),t.R7$(6),t.SpI(" ",t.bMT(26,31,"SWITCH_ACCOUNT_SWITCH_COMPLETION_BILLING_HEADER")," "),t.R7$(5),t.SpI(" ",t.bMT(31,33,"SWITCH_ACCOUNT_SWITCH_COMPLETION_PRO_RATED")," "),t.R7$(3),t.SpI(" ",n.formatCurrency(n.state.currentPlan.refund)," "),t.R7$(),t.FS9("ngbTooltip",t.bMT(35,35,"SWITCH_ACCOUNT_SWITCH_COMPLETION_REFUND_TOOLTIP")),t.R7$(6),t.SpI(" ",t.bMT(41,37,"SWITCH_ACCOUNT_SWITCH_COMPLETION_STARTED_DATE")," "),t.R7$(3),t.SpI(" ",n.state.newPlan.date," "),t.R7$(3),t.SpI(" ",t.bMT(47,39,"SWITCH_ACCOUNT_SWITCH_COMPLETION_CHARDE_DATE")," "),t.R7$(3),t.SpI(" ",t.brH(50,41,n.state.newPlan.date,n.currentLanguage,"mediumDate")," "),t.R7$(5),t.Y8G("innerHtml",n.state.newPlan.name,t.npT),t.R7$(),t.SpI(" ",t.bMT(56,45,"SWITCH_ACCOUNT_SWITCH_COMPLETION_SUBSCRIPTION_FEE")," "),t.R7$(3),t.SpI(" ",n.formatCurrency(n.state.newPlan.price)," "),t.R7$(3),t.SpI(" ",t.bMT(62,47,"SWITCH_ACCOUNT_SWITCH_COMPLETION_TAXES")," "),t.R7$(3),t.SpI(" ",n.formatCurrency(n.state.newPlan.tax)," "),t.R7$(3),t.SpI(" ",t.bMT(68,49,"SWITCH_ACCOUNT_SWITCH_COMPLETION_GRAND_TOTAL")," "),t.R7$(3),t.SpI(" ",n.formatCurrency(n.state.newPlan.price+n.state.newPlan.tax)," "),t.R7$(),t.Y8G("formGroup",n.state.completeForm),t.R7$(5),t.SpI(" ",t.bMT(77,51,"SWITCH_ACCOUNT_SWITCH_COMPLETION_AGREE_CTA")," "),t.R7$(2),t.Y8G("ngIf",!n.merchantTag.HideMarketingOptIn),t.R7$(2),t.BMQ("disabled",n.state.confirmChecked?null:""),t.R7$(),t.SpI(" ",t.bMT(82,53,"SWITCH_ACCOUNT_SWITCH_COMPLETION_CHANGE_PLAN_CTA")," ")}}let q=(()=>{class a{constructor(e,n,i,c,C,h,g){this._store=e,this._cp=n,this._translate=i,this._accountService=c,this._router=C,this._route=h,this._cancelAccount$=g,this.Subscriptions$=Array(),this.state={dataLoaded:!1,completeForm:null,confirmChecked:!1,taxData:null,currentPlan:{state:"Current",packageCode:"",date:"",name:"",description:"",price:0,refund:0,packagePricingId:0,packagePricingCode:"",orderId:0},newPlan:{state:"New",packageCode:"",date:"",name:"",description:"",price:0,tax:0,packagePricingId:0,packagePricingCode:""}},this.currentLanguage=this._translate.currentLang}ngOnInit(){this.createForm(),this.loadData()}
1ngOnDestroy(){this.Subscriptions$.forEach(e=>e.unsubscribe())}createForm(){this.state.completeForm=new p.J3({confirmCheck:new p.hs(!1),optInCheck:new p.hs(!1)}),this.Subscriptions$.push(this.state.completeForm.valueChanges.subscribe(e=>{this.state.confirmChecked=e.confirmCheck}))}loadData(){this.accountPackageSwitch$=this._store.select("accountPackageSwitch").pipe((0,m.E)("model")),this.accountState$=this._store.select("accountState"),this.Subscriptions$.push(this.accountState$.subscribe(e=>{e&&e.Subscriptions.CurrentSubscription.SubscriptionStartDate&&(this.state.taxData=e.Subscriptions.SubscriptionAccountDetails.TaxRates,this.state.currentPlan.orderId=e.Subscriptions.CurrentSubscription.CurrentBill.OrderId)})),this.Subscriptions$.push(this.accountPackageSwitch$.subscribe(e=>{if(e.SelectedPackageCode||(window.location.href=window.location.href.replace("confirmation","plan-selection")),e.SelectedPackageCode&&e.Packages&&!this.state.dataLoaded){let n=e.Packages.find(i=>i.PackageCode==e.SelectedPackageCode);this.state.newPlan.name=this._translate.instant("PACKAGE_CODE_"+e.SelectedPackageCode),this.state.newPlan.description=this._translate.instant("PACKAGE_CODE_DESCRIPTION_"+e.SelectedPackageCode),this.state.newPlan.packageCode=e.SelectedPackageCode,this.state.newPlan.date=this.getDate(1),this.state.newPlan.price=n.BasePrice,this.state.newPlan.tax=n.BasePrice*(this.state.taxData.GstRate+this.state.taxData.PstRate),this.state.newPlan.packagePricingId=n.PackagePricingId,this.state.newPlan.packagePricingCode=n.PackagePricingCode,this.Subscriptions$.push(this._store.select(F.oX).subscribe(i=>{i&&(this.state.currentPlan.name=this._translate.instant("PACKAGE_CODE_"+i.PackageCode),this.state.currentPlan.description=this._translate.instant("PACKAGE_CODE_DESCRIPTION_"+i.PackageCode),this.state.currentPlan.packageCode=i.PackageCode,this.state.currentPlan.date=this.getDate(),this.state.currentPlan.price=i.BasePrice,this.state.currentPlan.packagePricingId=i.PackagePricingId,this.state.currentPlan.packagePricingCode=i.PackagePricingCode,this.state.dataLoaded=!0)}))}})),this.Subscriptions$.push(this._cancelAccount$.cancellationDetails$.subscribe(e=>{e&&(e.SubscriptionId||this._store.dispatch(new k.kn1),this.state.currentPlan.refund=e.Refund||e.CancellationType!=D.i.Immediate?e.Refund:0)})),this._route.parent.data.subscribe(e=>{e&&e.MerchantTagResolver&&(this.merchantTag=e.MerchantTagResolver)})}getDate(e=0){let n=new Date;n.setDate(n.getDate()+e);let i=n.toDateString();return i.substr(4,i.length)}formatCurrency(e){return this._cp.transform(e,"CAD","symbol-narrow","1.2-2",this._translate.currentLang)}redirect(e){this._router.navigate([e],{relativeTo:this._route})}onSubmit(){this.Subscriptions$.push(this._accountService.PackageSwitchPost({NewPackageCode:this.state.newPlan.packageCode,NewPackagePricingId:this.state.newPlan.packagePricingId,NewPackagePricingCode:this.state.newPlan.packagePricingCode,OptInChecked:this.state.completeForm.value.optInCheck,SocialMonitoringOptInReturnUrl:"",DiscountCode:"",CreditCard:null,IsBypassingNotification:Object.values(T).includes(this.merchantTag.MerchantCode)}).subscribe(e=>{if(e){let n;n=1==e.ErrorMessages.length?"ER_LM_0006"==e.ErrorMessages[0].Code:e.Successful,this._router.navigateByUrl(this._translate.currentLang+"/package-switch/:/complete?success="+n)}}))}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(d.il),t.rXU(l.oe),t.rXU(u.c$),t.rXU(M.Di),t.rXU(s.Ix),t.rXU(s.nX),t.rXU(k.axw))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-account-package-switch-confirmation"]],decls:4,vars:2,consts:[["PageContentTemplate",""],["planTemplate",""],["NewTemplate",""],["StartTemplate",""],[1,"section"],[3,"ngIf","ngIfElse"],[1,"loading"],[3,"when","config"],[1,"container","dynamic-container"],[1,"btn-back"],[3,"backToRoute"],[1,"card"],[1,"row","header-container"],["src","assets/images/receipt-circle.svg","id","imgCancel","alt","plan switch icon",1,"header-image"],[1,"header"],[1,"text"],[1,"sub-header"],[1,"main-content"],[1,"plan-info"],[1,"current-plan-container"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"new-plan-container"],[1,"billing-info","row"],[1,"billing-header","col-md-12","no-padding"],[1,"start-side","col-md-6","col-sm-12","no-padding"],[1,"pro-rated","row"],[1,"col-md-8","no-padding"],[1,"value","col-md-4","no-padding"],["id","plan-tooltip","type","button","placement","right","triggers","hover click:blur",1,"btn-tooltip",3,"ngbTooltip"],[1,"start-date","row"],[1,"date-changed","row"],[1,"end-side","col-md-6","col-sm-12","no-padding"],[1,"fee","row"],[1,"col-md-8"],[3,"innerHtml"],[1,"value","col-md-4"],[1,"tax","row"],[1,"total","row"],[3,"ngSubmit","formGroup"],[1,"confirm","checkbox-container"],["for","account-package-switch-completion-checkbox-confirm",1,"form-check-label"],["type","checkbox","formControlName","confirmCheck","id","account-package-switch-completion-checkbox-confirm",1,"form-check-input"],[1,"alert-notifications-subheader"],["class","opt-in checkbox-container",4,"ngIf"],["id","buttonContainer",1,"action","flex-md-row","flex-column","flex-column-reverse"],["id","account-package-switch-completion-continue","type","submit",1,"btn","btn-primary"],[1,"plan-template-container","row",3,"ngClass"],[1,"start-side","col-md-4","col-sm-12","no-padding"],[1,"state"],[1,"date"],[1,"end-side","col-md-8","col-sm-12","no-padding"],[1,"plan-name"],[1,"description"],[1,"price"],[1,"value"],[1,"opt-in","checkbox-container"],["for","account-package-switch-completion-checkbox-opt-in",1,"form-check-label"],["type","checkbox","formControlName","optInCheck","id","account-package-switch-completion-checkbox-opt-in",1,"form-check-input"]],template:function(n,i){if
1(1&n&&(t.j41(0,"div",4),t.DNE(1,X,5,6,"ng-template",5)(2,Z,83,67,"ng-template",null,0,t.C5r),t.k0s()),2&n){const c=t.sdS(3);t.R7$(),t.Y8G("ngIf",!i.state.dataLoaded)("ngIfElse",c)}},dependencies:[l.YU,l.bT,l.T3,p.qT,p.Zm,p.BC,p.cb,p.j4,p.JD,L.md,f.V,b.X,u.D9,U.d,j.B],styles:[".section[_ngcontent-%COMP%]{padding-bottom:8rem}.container[_ngcontent-%COMP%]{text-align:initial}@media only screen and (max-width: 62rem){.container.btn-back[_ngcontent-%COMP%]{max-width:100%}}.container.dynamic-container[_ngcontent-%COMP%]{width:75rem;max-width:100%;display:inline-block}@media (min-width: 48rem){.card[_ngcontent-%COMP%]{padding:3rem 6rem 0}}.card[_ngcontent-%COMP%] .sub-header[_ngcontent-%COMP%], .card[_ngcontent-%COMP%] .plan-template-container[_ngcontent-%COMP%]{margin-bottom:2rem}.card[_ngcontent-%COMP%] .plan-template-container[_ngcontent-%COMP%] .state[_ngcontent-%COMP%], .card[_ngcontent-%COMP%] .plan-template-container[_ngcontent-%COMP%] .plan-name[_ngcontent-%COMP%]{margin-bottom:.25rem;color:#403f34}.card[_ngcontent-%COMP%] .plan-template-container[_ngcontent-%COMP%] .price[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:Trebuchet MS,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Tahoma,sans-serif;font-size:1rem;color:#403f34;line-height:1.5rem}@media only screen and (min-width: 48rem){.card[_ngcontent-%COMP%] .plan-template-container[_ngcontent-%COMP%] .price[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{line-height:1.875rem;font-size:1.25rem}}.card[_ngcontent-%COMP%] .plan-template-container.new[_ngcontent-%COMP%] .state[_ngcontent-%COMP%], .card[_ngcontent-%COMP%] .plan-template-container.new[_ngcontent-%COMP%] .plan-name[_ngcontent-%COMP%], .card[_ngcontent-%COMP%] .plan-template-container.new[_ngcontent-%COMP%] .price[_ngcontent-%COMP%], .card[_ngcontent-%COMP%] .plan-template-container.new[_ngcontent-%COMP%] .price[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:#279}.card[_ngcontent-%COMP%] .plan-template-container[_ngcontent-%COMP%] .date[_ngcontent-%COMP%], .card[_ngcontent-%COMP%] .plan-template-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{margin-bottom:.4rem;font-size:.75rem}.card[_ngcontent-%COMP%] .billing-info[_ngcontent-%COMP%], .card[_ngcontent-%COMP%] .billing-info[_ngcontent-%COMP%] .billing-header[_ngcontent-%COMP%]{margin-bottom:1rem}.card[_ngcontent-%COMP%] .billing-info[_ngcontent-%COMP%] .start-side[_ngcontent-%COMP%], .card[_ngcontent-%COMP%] .billing-info[_ngcontent-%COMP%] .end-side[_ngcontent-%COMP%]{font-size:.75rem}.card[_ngcontent-%COMP%] .billing-info[_ngcontent-%COMP%] .start-side[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .card[_ngcontent-%COMP%] .billing-info[_ngcontent-%COMP%] .end-side[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{margin-bottom:.5rem}.card[_ngcontent-%COMP%] .billing-info[_ngcontent-%COMP%] .start-side[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .card[_ngcontent-%COMP%] .billing-info[_ngcontent-%COMP%] .start-side[_ngcontent-%COMP%] .total[_ngcontent-%COMP%], .card[_ngcontent-%COMP%] .billing-info[_ngcontent-%COMP%] .end-side[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .card[_ngcontent-%COMP%] .billing-info[_ngcontent-%COMP%] .end-side[_ngcontent-%COMP%] .total[_ngcontent-%COMP%]{font-weight:700}.card[_ngcontent-%COMP%] .billing-info[_ngcontent-%COMP%] .start-side[_ngcontent-%COMP%] .total[_ngcontent-%COMP%], .card[_ngcontent-%COMP%] .billing-info[_ngcontent-%COMP%] .end-side[_ngcontent-%COMP%] .total[_ngcontent-%COMP%]{color:#279}.card[_ngcontent-%COMP%] .billing-info[_ngcontent-%COMP%] .end-side[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{text-align:right}.card[_ngcontent-%COMP%] .checkbox-container[_ngcontent-%COMP%]{font-size:.75rem;margin-bottom:.75rem}.card[_ngcontent-%COMP%] .checkbox-container[_ngcontent-%COMP%] .form-check-label[_ngcontent-%COMP%]{position:relative}.btn-tooltip[_ngcontent-%COMP%]{background-position-y:bottom;background-size:.875rem}"]})}}return a})();var S=o(9438),_=o(44895),tt=o(33957),et=o(522),nt=o(79592),at=o(12347);const it=()=>({lrg:!0}),ot=()=>["/account/account-info-and-billing"];function ct(a,r){1&a&&t.nrm(0,"app-back-button",15),2&a&&t.Y8G("backToRoute","../../../account/account-info-and-billing")}function rt(a,r){1&a&&t.nrm(0,"app-back-button",15),2&a&&t.Y8G("backToRoute","../../../dashboard")}function st(a,r){if(1&a){const e=t.RV6();t.j41(0,"div",16)(1,"button",17),t.nI1(2,"localize"),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"button",18),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.redirect())}),t.EFF(6),t.nI1(7,"translate"),t.k0s()()}if(2&a){const e=t.XpG(2);t.R7$(),t.Y8G("routerLink",t.bMT(2,4,t.lJ4(10,ot))),t.R7$(2),t.SpI(" ",t.bMT(4,6,"SWITCH_ACCOUNT_SWITCH_CANCEL_CTA")," "),t.R7$(2),t.BMQ("disabled",e.state.isCurrentStepDirty?null:""),t.R7$(),t.SpI(" ",t.bMT(7,8,"SWITCH_ACCOUNT_SWITCH_CONTINUE_CTA")," ")}}function lt(a,r){if(1&a){const e=t.RV6();t.j41(0,"div",4)(1,"div",5),t.DNE(2,ct,1,1,"app-back-button",6)(3,rt,1,1,"app-back-button",6),t.k0s(),t.j41(4,"div",7)(5,"div",8)(6,"div"),t.nrm(7,"img",9),t.k0s(),t.j41(8,"div",10)(9,"label",11),t.EFF(10),t.nI1(11,"translate"),t.k0s()(),t.j41(12,"div"),t.EFF(13),t.nI1(14,"translate"),t.k0s()(),t.j41(15,"div",12)(16,"plans-table-v2",13),t.bIt("onLoaded",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.componentLoaded())}),t.k0s()(),t.DNE(17,st,8,11,"div",14),t.k0s(),t.nrm(18,"plans-table-footer"),t.k0s()}if(2&a){const e=t.XpG();t.xc7("display",e.state.componentLoaded?"inline-block":"none"),t.R7$(2),t.Y8G("ngIf","dashboard"!=e.state.route),t.R7$(),t.Y8G("ngIf","dashboard"==e.state.route),t.R7$(7),t.SpI(" ",t.bMT(11,9,"SWITCH_ACCOUNT_SWITCH_PLAN_SELECT_HEADER")," "),t.R7$(3),t.SpI(" ",t.bMT(14,11,"SWITCH_ACCOUNT_SWITCH_PLAN_SELECT_HEADER_SUB")," "),t.R7$(3),t.Y8G("CurrentPackageCode",e.state.currentPackageCode)("DiscountRate",e.state.discountRate),t.R7$(),t.Y8G("ngIf",!e.mobileView())}}let dt=(()=>{class a{mobileView(){return this.mobileHelper.isMobileView}constructor(e,n,i,c,C){this.store=e,this.router=n,this.route=i,this.translate=c,this.mobileHelper=C,this.state={MainSubscription$:null,PaymentDetails$:null,PackageSwitch$:null,Subscriptions$:Array(),currentPackageCode:null,discountRate:null,isCurrentStepDirty:null,SystemDeliveredById:null,needCreditCheck:null,selectedPackageFree:null,loaded:!1,componentLoaded:!1,route:"account",mobile:{enabled:!1}}}ngOnInit(){this.mobileHelper.size="small",this.route.queryParams.subscribe(e=>{e.route&&(this.state.route=e.route)}),this.state.MainSubscription$=this.store.pipe((0,d.Lt)(_.xF)),this.state.Subscriptions$.push(this.state.MainSubscription$.subscribe(e=>{e&&e.CurrentSubscription&&""!=e.CurrentSubscription.SubscriptionId&&(this.state.currentPackageCode=e.CurrentSubscription.Package.PackageCode,this.state.discountRate=e.CurrentSubscription.Discount.Rate,this.state.loaded=!0)})),this.state.PackageSwitch$=this.store.select("accountPackageSwitch").pipe((0,m.E)("model")),this.state.Subscriptions$.push(this.state.PackageSwitch$.subscribe(e=>
1{e&&(this.state.isCurrentStepDirty=!!e.SelectedPackageCode,this.state.needCreditCheck=e.NeedCreditCheck,this.state.selectedPackageFree=e.SelectedPackageFree)})),this.state.PaymentDetails$=this.store.pipe((0,d.Lt)(_.ln)),this.state.Subscriptions$.push(this.state.PaymentDetails$.subscribe(e=>{e&&(e.CardNumber||e.SystemDeliveredById)&&(this.state.SystemDeliveredById=e.SystemDeliveredById)})),this.store.dispatch(new S.a0),this.store.dispatch(new S.u0)}ngOnDestroy(){this.state.Subscriptions$.forEach(e=>e.unsubscribe())}componentLoaded(){this.state.componentLoaded=!0}redirect(){this.state.selectedPackageFree||this.state.SystemDeliveredById!=tt.I.Other?this.state.needCreditCheck?this.router.navigate([{outlets:{credit:["details"]}}],{relativeTo:this.route.parent,queryParams:{isPackageSwitch:!0}}):this.router.navigateByUrl(this.translate.currentLang+"/package-switch/:/confirmation"):this.router.navigateByUrl(this.translate.currentLang+"/package-switch/:/contact")}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(d.il),t.rXU(s.Ix),t.rXU(s.nX),t.rXU(u.c$),t.rXU(et.ef))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-account-package-switch-plan-select"]],decls:7,vars:9,consts:[[1,"section"],[1,"loading"],[3,"when","config"],["class","container dynamic-container",3,"display",4,"ngIf"],[1,"container","dynamic-container"],[1,"btn-back"],[3,"backToRoute",4,"ngIf"],[1,"card"],[1,"header-container","d-flex","align-items-center","gap-2","flex-wrap"],["src","assets/images/paper.svg","id","imgCancel","alt","plan switch icon",1,"header-image"],[1,"header"],[1,"text"],[1,"main-content"],[3,"onLoaded","CurrentPackageCode","DiscountRate"],["id","buttonContainer","class","action flex-md-row flex-column flex-column-reverse",4,"ngIf"],[3,"backToRoute"],["id","buttonContainer",1,"action","flex-md-row","flex-column","flex-column-reverse"],["id","account-package-switch-plan-select-cancel",1,"btn","btn-secondary",3,"routerLink"],["id","account-package-switch-plan-select-continue",1,"btn","btn-primary",3,"click"]],template:function(n,i){1&n&&(t.j41(0,"div",0)(1,"div",1),t.nrm(2,"loader",2),t.j41(3,"h2"),t.EFF(4),t.nI1(5,"translate"),t.k0s()(),t.DNE(6,lt,19,13,"div",3),t.k0s()),2&n&&(t.R7$(),t.xc7("display",i.state.componentLoaded?"none":"inline-block"),t.R7$(),t.Y8G("when",!0)("config",t.lJ4(8,it)),t.R7$(2),t.JRh(t.bMT(5,6,"EQUIFAX_LOADING_VALUE1")),t.R7$(2),t.Y8G("ngIf",i.state.loaded))},dependencies:[l.bT,s.Wk,f.V,b.X,nt.e,at.$,u.D9,O.tl],styles:[".section[_ngcontent-%COMP%]{padding-bottom:1rem}@media (max-width: 480px){.section[_ngcontent-%COMP%]{padding:1rem}}.container[_ngcontent-%COMP%]{text-align:initial}@media only screen and (max-width: 62rem){.container.btn-back[_ngcontent-%COMP%]{max-width:100%}}.container.dynamic-container[_ngcontent-%COMP%]{width:auto!important;display:inline-block}@media only screen and (min-width: 912px){.container.dynamic-container[_ngcontent-%COMP%]{max-width:none!important}}.container[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%]{margin-top:3rem}@media only screen and (min-width: 47.9375rem){button.btn.btn-primary[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 47.9375rem){button.btn.btn-primary[_ngcontent-%COMP%]{margin-left:0}}@media only screen and (min-width: 47.9375rem){button.btn.btn-secondary[_ngcontent-%COMP%]{margin-top:0}}"]})}}return a})();var mt=o(46484),A=o(13670),ut=o(61978),Ct=o(50279);const pt=()=>({lrg:!0});function ht(a,r){1&a&&(t.j41(0,"div",4),t.nrm(1,"loader",5),t.j41(2,"h2"),t.EFF(3),t.nI1(4,"translate"),t.k0s()()),2&a&&(t.R7$(),t.Y8G("when",!0)("config",t.lJ4(5,pt)),t.R7$(2),t.JRh(t.bMT(4,3,"EQUIFAX_LOADING_VALUE1")))}function gt(a,r){if(1&a){const e=t.RV6();t.j41(0,"div",6)(1,"div",7),t.nrm(2,"app-back-button",8),t.k0s(),t.j41(3,"div",9)(4,"div",10)(5,"div"),t.nrm(6,"img",11),t.k0s(),t.j41(7,"div",12)(8,"label",13),t.EFF(9),t.nI1(10,"translate"),t.k0s()(),t.j41(11,"div"),t.EFF(12),t.nI1(13,"translate"),t.k0s()(),t.j41(14,"app-order",14,1),t.bIt("onSaveCard",function(i){t.eBV(e);const c=t.XpG();return t.Njj(c.saveCard(i))})("onOptInChecked",function(i){t.eBV(e);const c=t.XpG();return t.Njj(c.optInChecked(i))})("onSubmit",function(i){t.eBV(e);const c=t.XpG();return t.Njj(c.submit(i))}),t.k0s()()()}if(2&a){const e=t.XpG();t.R7$(2),t.Y8G("backToRoute","../contact"),t.R7$(7),t.SpI(" ",t.bMT(10,5,"SWITCH_ACCOUNT_ORDER_CONFIRMATION_HEADER")," "),t.R7$(3),t.SpI(" ",t.bMT(13,7,"SWITCH_ACCOUNT_ORDER_CONFIRMATION_HEADER_SUB")," "),t.R7$(2),t.Y8G("model",e.model)("status",e.status)}}let _t=(()=>{class a{constructor(e,n,i,c,C,h,g){this._store=e,this._cp=n,this._translate=i,this._accountService=c,this._router=C,this._route=h,this._toFixed=g,this.Subscriptions$=Array(),this.loadList={account:!1,subscription:!1,payment:!1,package:!1},this.state={discountRate:0,taxData:{GstRate:0,PstRate:0}}}ngOnInit(){this.initializeObjects(),this.initializeObservables(),this.loadData()}
1ngOnDestroy(){this.Subscriptions$.forEach(e=>e.unsubscribe())}initializeObjects(){this.status={isPackageSwitch:!0,dataLoaded:!1,processing:!1,edit:!1,messages:[]},this.model={expiry:"",planData:void 0,transactionDetails:null,planAccessCode:{PlanAccessCode:void 0,RemainingReuseCount:0,PlanAccessCodeStatusId:0},CreditCard:null,Account:null,MerchantTag:null},this.packageSwitchRequest={CreditCard:null,DiscountCode:"",NewPackageCode:"",NewPackagePricingCode:"",NewPackagePricingId:0,OptInChecked:!1,SocialMonitoringOptInReturnUrl:"",IsBypassingNotification:!1}}initializeObservables(){this.accountPackageSwitch$=this._store.select("accountPackageSwitch").pipe((0,m.E)("model")),this.SubscriptionAccountDetails$=this._store.select("accountState").pipe((0,m.E)("Subscriptions")).pipe((0,m.E)("SubscriptionAccountDetails")),this.CurrentSubscription$=this._store.select("accountState").pipe((0,m.E)("Subscriptions")).pipe((0,m.E)("CurrentSubscription")),this.PaymentDetails$=this._store.select("accountState").pipe((0,m.E)("PaymentDetails")),this.Account$=this._store.select("accountState").pipe((0,m.E)("Account")),this.merchantTag$=this._store.pipe((0,d.Lt)(_.ow))}loadData(){this.Subscriptions$.push(this.SubscriptionAccountDetails$.subscribe(e=>{e&&(this.state.taxData=e.TaxRates,this.setLoaded("account"))})),this.Subscriptions$.push(this.CurrentSubscription$.subscribe(e=>{e&&e.SubscriptionStartDate&&(this.state.discountRate=e.Discount.Rate,this.setLoaded("subscription"))})),this.Subscriptions$.push(this.PaymentDetails$.subscribe(e=>{e&&e.CardNumber&&(this.model.CreditCard=e)})),this.Subscriptions$.push(this.Account$.subscribe(e=>{e&&(this.model.Account=e)})),this.Subscriptions$.push(this.merchantTag$.subscribe(e=>{e&&(this.model.MerchantTag=e)})),this.Subscriptions$.push(this.accountPackageSwitch$.subscribe(e=>{if(e)if(e.SelectedPackageCode){if(e.Packages&&e.Packages.length>0){let i=e.Packages.find(c=>c.PackageCode==e.SelectedPackageCode);if(i){e.DiscountRate>0&&e.PromoCodeVerified?this.state.discountRate=e.DiscountRate:!e.PromoCodeVerified&&this.loadList.package?this.state.discountRate=0:e.DiscountRate=this.state.discountRate;let C=this._toFixed.transform(this.state.discountRate>0?i.BasePrice*(this.state.discountRate/100):0,2),h=i.BasePrice-C,P=Math.round(h*(this.state.taxData.GstRate+this.state.taxData.PstRate)*100)/100,Nt=h+P;this.model.planData={BasePrice:i.BasePrice,DiscountAmount:C,DiscountRate:e.DiscountRate,Name:this._translate.instant("PACKAGE_CODE_"+i.PackageCode),TaxAmount:P,TotalPrice:Nt,TrialPeriodInDays:i.TrialPeriodInDays,TrialPrice:i.TrialPrice};var n=new Date;n.setDate(n.getDate()+1),this.model.expiry=n.toDateString().substr(4,n.toDateString().length),this.packageSwitchRequest.DiscountCode=e.PromoCode,this.packageSwitchRequest.NewPackageCode=e.SelectedPackageCode,this.packageSwitchRequest.NewPackagePricingCode=i.PackagePricingCode,this.packageSwitchRequest.NewPackagePricingId=i.PackagePricingId,this.packageSwitchRequest.IsBypassingNotification=Object.values(T).includes(this.model.MerchantTag.MerchantCode),this.setLoaded("package")}}}else window.location.href=window.location.href.replace("order-confirmation","plan-selection")}))}setLoaded(e){switch(e){case"account":this.loadList.account=!0;break;case"subscription":this.loadList.subscription=!0;break;case"package":this.loadList.package=!0}this.status.dataLoaded=this.loadList.account&&this.loadList.subscription&&this.loadList.package}formatCurrency(e){return this._cp.transform(e,"CAD","symbol-narrow","1.2-2",this._translate.currentLang)}redirect(e){this._router.navigate([e],{relativeTo:this._route})}saveCard(e){this.model.CreditCard={NameOnCard:e.CardholderName,CardNumber:e.CardNumber,CardExpiryMonth:e.CardExpiry.substring(0,2),CardExpiryYear:e.CardExpiry.substring(2),Cvv:e.CardSecurityCode,CardType:this.model.CreditCard?this.model.CreditCard.CardType:"",AddressLine1:this.model.CreditCard?this.model.CreditCard.AddressLine1:this.model.Account.CurrentAddressStreet,AddressLine2:this.model.CreditCard?this.model.CreditCard.AddressLine2:this.model.Account.CurrentAddressApartmentOrSuite,City:this.model.CreditCard?this.model.CreditCard.City:this.model.Account.CurrentAddressCity,PostalZip:this.model.CreditCard?this.model.CreditCard.PostalZip:this.model.Account.CurrentAddressPostalCode,StateProvince:this.model.CreditCard?this.model.CreditCard.StateProvince:this.model.Account.CurrentAddressProvince,Country:this.model.CreditCard?this.model.CreditCard.Country:this.model.Account.CurrentAddressCountry,SystemDeliveredById:this.model.CreditCard?this.model.CreditCard.SystemDeliveredById:0,IsUpdatable:!!this.model.CreditCard&&this.model.CreditCard.IsUpdatable},this.packageSwitchRequest.CreditCard=Object.assign({},this.packageSwitchRequest.CreditCard,this.model.CreditCard),this.packageSwitchRequest.CreditCard.CardExpiryYear=this.getCardExpiryYear(this.model.CreditCard.CardExpiryYear)}getCardExpiryYear(e){let n=(new Date).getFullYear().toString();return parseInt(n.slice(0,-2)+e)}optInChecked(e){this.packageSwitchRequest.OptInChecked=e}submit(e){this.Subscriptions$.push(this._accountService.PackageSwitchPost(this.packageSwitchRequest).subscribe(n=>{if(n){let i;i=1==n.ErrorMessages.length?"ER_LM_0006"==n.ErrorMessages[0].Code:n.Successful,this._router.navigateByUrl(this._translate.currentLang+`/package-switch/:/complete?success=${i}`)}},n=>{var i=this._translate.currentLang+"/package-switch/:/complete?success=false";n.error&&n.error.ErrorMessages&&n.error.ErrorMessages.length>0&&(i+=`&errorCode=${n.error.ErrorMessages[0].Code}`),this._router.navigateByUrl(i)}))}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(d.il),t.rXU(l.oe),t.rXU(u.c$),t.rXU(M.Di),t.rXU(s.Ix),t.rXU(s.nX),t.rXU(ut.G))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-account-package-switch-order-confirmation"]],decls:4,vars:2,consts:[["PageContentTemplate",""],["order",""],[1,"section"],[3,"ngIf","ngIfElse"],[1,"loading"],[3,"when","config"],[1,"container","dynamic-container"],[1,"btn-back"],[3,"backToRoute"],[1,"card"],[1,"row","header-container"],["src","assets/images/setup-credit-card.svg","id","imgCancel","alt","order confirmation icon",1,"header-image"],[1,"header"],[1,"text"],[3,"onSaveCard","onOptInChecked","onSubmit","model","status"]],template:function(n,i){if
1(1&n&&(t.j41(0,"div",2),t.DNE(1,ht,5,6,"ng-template",3)(2,gt,16,9,"ng-template",null,0,t.C5r),t.k0s()),2&n){const c=t.sdS(3);t.R7$(),t.Y8G("ngIf",!i.status.dataLoaded)("ngIfElse",c)}},dependencies:[l.bT,f.V,b.X,Ct.Y,u.D9],styles:[".section[_ngcontent-%COMP%]{padding-bottom:8rem}.container[_ngcontent-%COMP%]{text-align:initial}@media only screen and (max-width: 62rem){.container.btn-back[_ngcontent-%COMP%]{max-width:100%}}.container.dynamic-container[_ngcontent-%COMP%]{width:auto;max-width:100%;display:inline-block}.card[_ngcontent-%COMP%]{padding-bottom:1.6rem}@media (min-width: 74rem){.card[_ngcontent-%COMP%]{padding:2rem 0rem 1.5rem 3.5rem}}.card[_ngcontent-%COMP%] .sub-header[_ngcontent-%COMP%]{margin-bottom:2rem}"]})}}return a})();var Pt=o(96354),E=o(94007),ft=o(49487);const bt=()=>({lrg:!0});function St(a,r){1&a&&(t.j41(0,"div",3),t.nrm(1,"loader",4),t.j41(2,"h2"),t.EFF(3),t.nI1(4,"translate"),t.k0s()()),2&a&&(t.R7$(),t.Y8G("when",!0)("config",t.lJ4(5,bt)),t.R7$(2),t.JRh(t.bMT(4,3,"EQUIFAX_LOADING_VALUE1")))}function Ot(a,r){if(1&a){const e=t.RV6();t.j41(0,"div",5)(1,"div",6),t.nrm(2,"app-back-button",7),t.k0s(),t.j41(3,"div",8)(4,"div",9)(5,"div"),t.nrm(6,"img",10),t.k0s(),t.j41(7,"div",11)(8,"label",12),t.EFF(9),t.nI1(10,"translate"),t.k0s()(),t.j41(11,"div"),t.EFF(12),t.nI1(13,"translate"),t.k0s()(),t.j41(14,"app-contact-component",13),t.nI1(15,"async"),t.bIt("onSave",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.save())})("onSubmit",function(i){t.eBV(e);const c=t.XpG();return t.Njj(c.submit(i))}),t.k0s()()()}if(2&a){const e=t.XpG();t.R7$(2),t.Y8G("backToRoute","../plan-selection"),t.R7$(7),t.SpI(" ",t.bMT(10,6,"SWITCH_ACCOUNT_CONTACT_HEADER")," "),t.R7$(3),t.SpI(" ",t.bMT(13,8,"SWITCH_ACCOUNT_CONTACT_HEADER_SUB")," "),t.R7$(2),t.Y8G("PersonalInformation",e.state.personalInformation)("UpdateMode",!0)("merchantTag",t.bMT(15,10,e.merchantTag$))}}let Tt=(()=>{class a{constructor(e,n,i,c){this.store=e,this.router=n,this.route=i,this.translate=c,this.state={MainSubscription$:null,PackageSwitch$:null,Subscriptions$:Array(),AccountInfo:null,personalInformation:{FirstName:"",LastName:"",PhoneNumber:"",IsPhoneNumberMobile:!1,PrimaryAddress:{AddressLine1:"",AddressLine2:"",City:"",Province:null,Postal:""}},needCreditCheck:!1,savePersonalInformation:!1,loaded:!1}}ngOnInit(){this.store.dispatch(new S.ii);let e=this.store.pipe((0,d.Lt)(_.VH));this.state.Subscriptions$.push(e.subscribe(n=>{n&&n.FirstName&&(this.state.AccountInfo=n,this.state.personalInformation={FirstName:n.FirstName,LastName:n.LastName,PhoneNumber:n.MobilePhone?n.MobilePhone:n.HomePhone,IsPhoneNumberMobile:!!n.MobilePhone,EmployeeNumber:n.EmployeeNumber,PrimaryAddress:{AddressLine1:n.CurrentAddressStreet,AddressLine2:n.CurrentAddressApartmentOrSuite,City:n.CurrentAddressCity,Province:n.CurrentAddressProvince,Postal:n.CurrentAddressPostalCode}},this.state.loaded=!0)})),this.state.PackageSwitch$=this.store.select("accountPackageSwitch").pipe((0,m.E)("model")),this.state.Subscriptions$.push(this.state.PackageSwitch$.subscribe(n=>{n&&(n.SelectedPackageCode||this.router.navigate(["/plan-selection"],{relativeTo:this.route}),this.state.needCreditCheck=n.NeedCreditCheck)})),this.merchantTag$=this.route.parent.data.pipe((0,Pt.T)(n=>(this.countryCode=n.MerchantTagResolver.CountryCode,this.countryName=E.yV.find(i=>i.CountryCode===this.countryCode)?.CountryName||E.JL.Canada,n.MerchantTagResolver)))}ngOnDestroy(){this.state.Subscriptions$.forEach(e=>e.unsubscribe())}save(){this.state.savePersonalInformation=!0}submit(e){if(this.state.savePersonalInformation){let n=Object.assign({},this.state.AccountInfo);this.store.dispatch({type:S.nm.UpdateAccount,payload:Object.assign(n,{FirstName:e.FirstName,LastName:e.LastName,HomePhone:e.IsPhoneNumberMobile?"":e.PhoneNumber,MobilePhone:e.IsPhoneNumberMobile?e.PhoneNumber:"",EmployeeNumber:e.EmployeeNumber,CurrentAddressStreet:e.PrimaryAddress.AddressLine1,CurrentAddressApartmentOrSuite:e.PrimaryAddress.AddressLine2,CurrentAddressCity:e.PrimaryAddress.City,CurrentAddressProvince:e.PrimaryAddress.Province,CurrentAddressPostalCode:e.PrimaryAddress.Postal,CurrentAddressCountry:this.countryName}),callback:i=>{this.redirect()}})}else this.redirect()}redirect(){this.state.needCreditCheck?this.router.navigate([{outlets:{credit:["details"]}}],{relativeTo:this.route.parent,queryParams:{isPackageSwitch:!0}}):this.router.navigateByUrl(this.translate.currentLang+"/package-switch/:/order-confirmation")}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(d.il),t.rXU(s.Ix),t.rXU(s.nX),t.rXU(u.c$))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-account-package-switch-contact"]],decls:4,vars:2,consts:[["PageContentTemplate",""],[1,"section"],[3,"ngIf","ngIfElse"],[1,"loading"],[3,"when","config"],[1,"container","dynamic-container"],[1,"btn-back"],[3,"backToRoute"],[1,"card"],[1,"header-container","d-flex","flex-wrap"],["src","assets/images/personal-info.svg","id","imgCancel","alt","personal information icon",1,"header-image","header-icon"],[1,"header"],[1,"text"],[3,"onSave","onSubmit","PersonalInformation","UpdateMode","merchantTag"]],template:function(n,i){if
1(1&n&&(t.j41(0,"div",1),t.DNE(1,St,5,6,"ng-template",2)(2,Ot,16,12,"ng-template",null,0,t.C5r),t.k0s()),2&n){const c=t.sdS(3);t.R7$(),t.Y8G("ngIf",!i.state.loaded)("ngIfElse",c)}},dependencies:[l.bT,f.V,b.X,ft.y,l.Jj,u.D9],styles:[".section[_ngcontent-%COMP%]{padding-bottom:8rem}.container[_ngcontent-%COMP%]{text-align:initial}@media only screen and (max-width: 62rem){.container.btn-back[_ngcontent-%COMP%]{max-width:100%}}.container.dynamic-container[_ngcontent-%COMP%]{width:auto;max-width:100%;display:inline-block}@media only screen and (min-width: 74rem){.container.dynamic-container[_ngcontent-%COMP%]{width:72.43rem}}.card[_ngcontent-%COMP%]{padding-bottom:1.6rem}@media (min-width: 74rem){.card[_ngcontent-%COMP%]{padding:2rem 3.5rem 1.5rem}}.card[_ngcontent-%COMP%] .sub-header[_ngcontent-%COMP%]{margin-bottom:2rem}"]})}}return a})();var It=o(78809);function kt(a,r){if(1&a){const e=t.RV6();t.j41(0,"div",1)(1,"div",2)(2,"h2"),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"p"),t.EFF(6),t.nI1(7,"translate"),t.k0s(),t.j41(8,"button",3),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.redirect())}),t.EFF(9),t.nI1(10,"translate"),t.k0s()()()}2&a&&(t.R7$(3),t.JRh(t.bMT(4,3,"SWITCH_ACCOUNT_SUCCESS_SCREEN_HEADER")),t.R7$(3),t.JRh(t.bMT(7,5,"SWITCH_ACCOUNT_SUCCESS_SCREEN_LABEL")),t.R7$(3),t.SpI(" ",t.bMT(10,7,"SWITCH_ACCOUNT_SUCCESS_ACCOUNT_INFO_REDIRECT_CTA")," "))}function Mt(a,r){if(1&a){const e=t.RV6();t.j41(0,"div",1)(1,"div",2)(2,"h2"),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"p"),t.EFF(6),t.nI1(7,"translate"),t.k0s(),t.j41(8,"button",3),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.redirect())}),t.EFF(9),t.nI1(10,"translate"),t.k0s()()()}if(2&a){const e=t.XpG();t.R7$(3),t.JRh(t.bMT(4,3,"SWITCH_ACCOUNT_FAILED_SCREEN_HEADER")),t.R7$(3),t.JRh(t.bMT(7,5,e.errorMessage)),t.R7$(3),t.SpI(" ",t.bMT(10,7,"SWITCH_ACCOUNT_FAILED_ACCOUNT_INFO_REDIRECT_CTA")," ")}}const At=[{path:":",component:$,canActivate:[A.r6,A.kw],children:[{path:"plan-selection",component:dt},{path:"details",outlet:"credit",component:R.mC,children:[{path:"",component:mt.b}]},{path:"contact",component:Tt},{path:"confirmation",component:q},{path:"order-confirmation",component:_t},{path:"complete",component:(()=>{class a{get errorMessage(){var e="SWITCH_ACCOUNT_FAILED_SCREEN_LABEL";if(this.errorCode){var n=`SWITCH_ACCOUNT_FAILED_${this.errorCode.toUpperCase()}`,i=this.translate.instant(n);i!=n&&(e=i)}return e}constructor(e,n,i){this.route=e,this.store=n,this.translate=i}ngOnInit(){this.route.queryParams.subscribe(e=>{this.successful="true"==e.success,this.successful||(this.errorCode=e.errorCode)}),this.store.dispatch(new It.Om({Packages:null,CurrentPackageCode:null,SelectedPackageCode:null,SelectedPackageFree:null,NeedCreditCheck:null,IsCreditServiceAvailable:null,RefundDetailsResponse:null,PromoCode:null,PromoCodeVerified:!1,DiscountRate:null}))}redirect(){window.location.href=window.location.href.replace("package-switch/:/complete","account/account-info-and-billing")}static{this.\u0275fac=function(n){return new(n||a)(t.rXU(s.nX),t.rXU(d.il),t.rXU(u.c$))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["app-account-package-switch-complete"]],decls:2,vars:2,consts:[["class","parent-container",4,"ngIf"],[1,"parent-container"],[1,"child-container"],["id","package-switch-success-redirect",1,"btn","btn-primary",3,"click"]],template:function(n,i){1&n&&t.DNE(0,kt,11,9,"div",0)(1,Mt,11,9,"div",0),2&n&&(t.Y8G("ngIf",i.successful),t.R7$(),t.Y8G("ngIf",!i.successful))},dependencies:[l.bT,u.D9],styles:["div.parent-container[_ngcontent-%COMP%]{padding:11.5rem 1rem 1rem;background-image:url(/../assets/images/welcome.svg);background-repeat:no-repeat;background-position:center 2.5rem;background-size:8rem;display:flex;justify-content:center;margin:auto}@media only screen and (min-width: 48rem){div.parent-container[_ngcontent-%COMP%]{width:44rem;padding:15rem 2.5rem 3rem;background-size:auto;background-position:center 3rem}}div.parent-container[_ngcontent-%COMP%] div.child-container[_ngcontent-%COMP%]{text-align:center;display:flex;flex-wrap:wrap;justify-content:center;width:100%}div.parent-container[_ngcontent-%COMP%] div.child-container[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{flex-basis:100%;font-family:Trebuchet MS,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Tahoma,sans-serif;font-size:1.125rem;color:#403f34;line-height:normal;font-weight:700;margin-bottom:.5rem}@media only screen and (min-width: 48rem){div.parent-container[_ngcontent-%COMP%] div.child-container[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:1.5rem}}div.parent-container[_ngcontent-%COMP%] div.child-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{flex-basis:100%;font-family:Source Sans Pro,Helvetica,Arial,sans-serif;font-size:.875rem;color:#403f34;line-height:1.1875rem}@media only screen and (min-width: 48rem){div.parent-container[_ngcontent-%COMP%] div.child-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:1.5rem;font-size:1rem}}div.parent-container[_ngcontent-%COMP%] div.child-container[_ngcontent-%COMP%] .p-1[_ngcontent-%COMP%]{font-weight:900}@media only screen and (max-width: 62rem){div.parent-container[_ngcontent-%COMP%] .btn-primary[_ngcontent-%COMP%]{margin-left:0}}"]})}}return a})()},{path:"",redirectTo:"/plan-selection",pathMatch:"full"}]}];let Et=(()=>{class a{static{this.\u0275fac=function(n){return new(n||a)}}static{this.\u0275mod=t.$C({type:a})}static{this.\u0275inj=t.G2t({imports:[s.iI.forChild(At),O.XE,s.iI]})}}return a})();var w=o(67139),wt=o(81291),yt=o(30039);let Rt=(()=>{class a{static{this.\u0275fac=function(n){return new(n||a)}}static{this.\u0275mod=t.$C({type:a})}static{this.\u0275inj=t.G2t({providers:[l.oe],imports:[w.U,l.MD,Et,y.Vm.forFeature
1([wt.y,yt.y]),d.md.forFeature("accountState",_.xJ),w.U,O.XE,s.iI]})}}return a})()}}]);
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.