"use strict";(self.webpackChunkinitial_setup_wizard=self.webpackChunkinitial_setup_wizard||[]).push([[990],{3990:(S,c,i)=>{i.r(c),i.d(c,{AnalyticsConsentModule:()=>T});var r=i(177),h=i(7901),s=i(4341),u=i(4355),C=i(6381),p=i(8280),d=i(5737),f=i(1413),l=i(6977),g=i(7673),t=i(3953),m=i(949),v=i(6802);let P=(()=>{class e{constructor(n){this.whmapi=n}postAnalyticsConsent(n,a=!1){const o=new m.m(m.R.JsonApi,{method:"personalization_set",arguments:[new v.e("personalization",{analytics:a?"on":"off",personhood:n})],config:{json:!0}});return this.whmapi.post(o)}static#t=this.ɵfac=function(a){return new(a||e)(t.KVO(u.gB))};static#n=this.ɵprov=t.jDH({token:e,factory:e.ɵfac,providedIn:"root"})}return e})();var M=i(3100),y=i(7326);function O(e,$){if(1&e&&(t.j41(0,"div",12),t.nrm(1,"i",13),t.EFF(2),t.k0s()),2&e){const n=t.XpG();t.R7$(2),t.SpI(" ",n.locale.maketext("You must choose an account type to continue.")," ")}}const b=[{path:"",component:(()=>{class e{constructor(n,a,o,k,x,F,w,L){this.router=n,this.locale=a,this.window=o,this.page=k,this._analyticsBuilder=x,this.analyticsConsentService=F,this.utilService=w,this.el=L,this.continueLabel="",this.canContinue=!0,this.loading=!1,this.accountTypes=[{name:this.locale.maketext("This account is for an individual."),value:"individual"},{name:this.locale.maketext("This account is for a business."),value:"business"}],this.selectedItem=null,this.stop$=new f.B,this.buttonState=d.w}ngOnInit(){this.analyticsForm=this._analyticsBuilder.group({accountTypesControl:[this.getAccountType(this.page?.analytics_info?.personhood),[s.k0.required]],analyticsCheckControl:[this.getAnalyticsConsent(this.page?.analytics_info?.analytics)]}),this.analyticsForm.valueChanges.pipe((0,l.Q)(this.stop$)).subscribe((()=>{this.canContinue=this.analyticsForm.valid})),this.nextBtnLabel().pipe((0,l.Q)(this.stop$)).subscribe((n=>{this.continueLabel=n}))}getAccountType(n){return n?this.accountTypes.find((a=>a.value.toLowerCase()===n.toLowerCase())):this.accountTypes[0]}getAnalyticsConsent(n){return"on"===n}triggerConsentSavedEvent(n=!1){const a=new CustomEvent("consentPrivacySaved",{bubbles:!0,detail:{analytics:n}});this.el.nativeElement.dispatchEvent(a)}next(){this.analyticsConsentService.postAnalyticsConsent(this.analyticsForm.controls.accountTypesControl.value?.value,this.analyticsForm.controls.analyticsCheckControl.value).pipe((0,l.Q)(this.stop$)).subscribe((n=>{"on"==n.data?.personalization?.analytics?.value?this.triggerConsentSavedEvent(!0):this.triggerConsentSavedEvent(),this.page.has_completed_analytics=!0,this.router.navigate(["server-setup"])}))}nextBtnLabel(){return(0,g.of)((this.page.has_completed_initial_setup||this.page.is_dnsonly)&&this.page.has_accepted_legal_agreements?"Finish":"Next")}cancel(){this.exit()}exit(){this.window.location.href=p.GH}ngOnDestroy(){this.stop$.next(),this.stop$.complete()}static#t=this.ɵfac=function(a){return new(a||e)(t.rXU(h.Ix),t.rXU(C.h),t.rXU(Window),t.rXU(p.KL),t.rXU(s.ze),t.rXU(P),t.rXU(M.a),t.rXU(t.aKT))};static#n=this.ɵcmp=t.VBU({type:e,selectors:[["isw-analytics-consent"]],decls:14,vars:7,consts:[[1,"initial-setup-content-container","inner-container","container-align"],[1,"form-group","mb-5","col-12"],["id","analyticsForm","name","analyticsForm",3,"formGroup"],[1,"fw-bold"],[3,"innerHTML"],[1,"mb-2"],[1,"col-12","mb-5"],["name","personHoodSelect","placeholder","Select account type","formControlName","accountTypesControl","bindLabel","name",3,"items"],["class","invalid-feedback d-flex",4,"ngIf"],[1,"form-check"],["type","checkbox","formControlName","analyticsCheckControl","name","analyticsCheck","id","analyticsCheck",1,"form-check-input"],["for","analyticsCheck",1,"form-check-label",3,"innerHTML"],[1,"invalid-feedback","d-flex"],["aria-hidden","true",1,"ri-error-warning-line"]],template:function(a,o){1&a&&(t.j41(0,"div",0)(1,"div",1)(2,"form",2)(3,"h5",3),t.EFF(4),t.k0s(),t.nrm(5,"p",4),t.j41(6,"p",5),t.EFF(7),t.k0s(),t.j41(8,"div",6),t.nrm(9,"ng-select",7),t.DNE(10,O,3,1,"div",8),t.k0s(),t.j41(11,"div",9),t.nrm(12,"input",10)(13,"label",11),t.k0s()()()()),2&a&&(t.R7$(2),t.Y8G("formGroup",o.analyticsForm),t.R7$(2),t.SpI(" ",o.locale.maketext("Consent and Privacy[comment,title]")," "),t.R7$(),t.Y8G("innerHTML",o.locale.maketext("WebPros International, LLC d.b.a cPanel is asking for your consent to participate in user activity tracking using third-party software for the purpose of understanding the performance of Webpros products. Information will be used pursuant to the [output,url,_1,cPanel and WHM Privacy Policy,title,cPanel and WHM Privacy Policy,data-testid,_2,target,_3,class,_4] and may be shared internally within the Webpros group. You can update your preferences at any time from the analytics slideout.","https://go.cpanel.net/privacy","privacy-policy","privacy-policy","external-link float-none"),t.npT),t.R7$(2),t.SpI(" ",o.locale.maketext("Select which account type best describes how you will use this product.")," "),t.R7$(2),t.Y8G("items",o.accountTypes),t.R7$(),t.Y8G("ngIf",o.analyticsForm.controls.accountTypesControl.invalid),t.R7$(3),t.Y8G("innerHTML",o.locale.maketext("By checking this box, you agree that we may collect your usage statistics. [output,url,_1,Learn more here.,title,cPanel Analytics Documentation,class,_2,target,_3,id,_4,data-testid,_5]","https://go.cpanel.net/analytics","external-link float-none","analytics","learnLink","learnAnalyticsLink"),t.npT))},dependencies:[r.bT,s.qT,s.Zm,s.BC,s.cb,s.j4,s.JD,y.vr],styles:[".container-align[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:clamp(40%,400px,100%)}html[dir=ltr][_ngcontent-%COMP%] .container-align[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .container-align[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .container-align[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .container-align[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .container-align[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .container-align[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .container-align[_ngcontent-%COMP%]{text-align:left}html[dir=rtl][_ngcontent-%COMP%] .container-align[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .container-align[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .container-align[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .container-align[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .container-align[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .container-align[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .container-align[_ngcontent-%COMP%]{text-align:right}"]})}return e})()}];let T=(()=>{class e{static#t=this.ɵfac=function(a){return new(a||e)};static#n=this.ɵmod=t.$C({type:e});static#e=this.ɵinj=t.G2t({providers:[u.gB],imports:[r.MD,s.X1,h.iI.forChild(b),y.MQ,d.tm,s.YN]})}return e})()}}]);