1import{a as xi}from"./chunk-3ITR3TRQ.js";import{a as wi,b as Li,c as Di}from"./chunk-E3ODSFG7.js";import{a as Ai}from"./chunk-D4DYXVUU.js";import{a as at}from"./chunk-Q2KUA2HM.js";import{a as lt}from"./chunk-JPOZLFY4.js";import{a as Bi}from"./chunk-GX4UVFWP.js";import{a as Ri}from"./chunk-ZOXOJ2SW.js";import{a as it,b as Ni}from"./chunk-75FPLXLX.js";import{b as et,d as Ii,i as tt,k as fe,l as Pi,q as nt}from"./chunk-AQBRTEMP.js";import{a as Ci,c as gi,d as vi,f as Si,g as Oi}from"./chunk-N5NDHDLL.js";import{a as st}from"./chunk-VNEWJX7J.js";import{a as Vi}from"./chunk-MQLXRJLY.js";import{a as Ti}from"./chunk-UWTSORKH.js";import{a as ot}from"./chunk-4M3H6OJK.js";import{a as rt}from"./chunk-2NWUFIXC.js";import{a as Mi,b as yi}from"./chunk-ECMF7CC2.js";import{d as Je,e as Oe}from"./chunk-C4XHNRNH.js";import{a as ki}from"./chunk-ZTBOUZVQ.js";import{a as _e,b as ue}from"./chunk-XM23J7BA.js";import{c as bi,d as Ei}from"./chunk-WH6ILIPS.js";import{a as K}from"./chunk-LKIIPTIG.js";import{_ as Xe,b as Jt}from"./chunk-SRUBCUSW.js";import{b as Ye}from"./chunk-MN2F2UI2.js";import{a as _i,b as fi}from"./chunk-KJ3PV2LN.js";import{b as Ze}from"./chunk-23N7CA4O.js";import{a as ui}from"./chunk-SXLHBEO2.js";import{a as $e}from"./chunk-OSVOK6WL.js";import{b as hi}from"./chunk-R2NO6V5K.js";import{Aa as me,E as qe,G as Qe,I as si,c as Z,h as Se,pa as pi,y as li,za as ci}from"./chunk-4U4PLY73.js";import{e as He}from"./chunk-X5ROTD3U.js";import{a as je}from"./chunk-V4NS6LW3.js";import{a as St}from"./chunk-VFTYDXHH.js";import{a as We}from"./chunk-LJSWAOQY.js";import{b as Ke}from"./chunk-TZOYHBJT.js";import{e as di}from"./chunk-34KEMFZC.js";import{j as ri,k as ai}from"./chunk-4BUGZAA4.js";import{p as Ge}from"./chunk-76JNFTGE.js";import{Ac as vt,Ra as Ct,g as ei,i as De,k as ke,nb as ti,ob as gt}from"./chunk-C7VFP4N4.js";import{b as de,c as G,d as j}from"./chunk-CYMQMRSQ.js";import{C as Ue,F as ce,d as N,e as ii,f as pe,g as Be,m as ni,o as Ve,r as oi,s as Fe,v as ze}from"./chunk-SAPP7HDL.js";import{h as Xt,j as Le}from"./chunk-2PJAPLDY.js";import{a as Kt,f as Yt,g as $t,i as Zt,t as we}from"./chunk-3APTCJCW.js";import{a as mi}from"./chunk-EMVJM2S7.js";import{a as U,c as q}from"./chunk-TPWGF6XO.js";import{$a as I,A as ee,Ac as oe,Bb as ht,Bc as re,Cb as a,Dc as V,Fa as At,G as Ee,H as ft,Ia as R,Ic as x,J as xe,Ja as M,Jc as u,Jd as Qt,Kc as H,Kd as S,L as Nt,Lb as wt,Lc as F,Ld as se,N as Rt,Nb as Re,Oa as te,Pb as Lt,Q as Ie,Qa as W,Qc as Bt,Rc as Vt,Sc as Ft,Tb as E,Tc as ye,Uc as zt,Vc as ae,W as Mt,Wc as T,Xa as D,Xc as f,Ya as C,Yb as g,Yc as B,Za as Te,Zc as h,bd as Ut,cd as Gt,dd as jt,eb as Ne,g as Tt,hd as Wt,ia as $,id as le,jd as Ht,kc as Me,kd as qt,lb as ut,lc as d,m as _t,mc as Dt,nc as z,pd as l,qd as s,ra as Pe,rd as Ae,sc as b,sd as y,tc as kt,u as ve,ua as yt,v as J,vc as ie,wc as ne,xa as _,xc as c,yc as m,zc as v}from"./chunk-MH4BPXDL.js";import{a as Q,b as X,l as L}from"./chunk-CU44V7JF.js";function Fi(t){return t==="/"||t==="/login"||t.startsWith("/auth/")||t.startsWith("/login/")||t.startsWith("/cadastro/")}var pn=["https://connectivitycheck.gstatic.com/generate_204","https://www.gstatic.com/generate_204"],cn=5e3,zi=3e3,pt=(()=>{let o=class o{constructor(){if(this.platformId=_(Ne),this.online$=new Tt(!0),!we(this.platformId))return;let e=ft(window,"online").pipe(Mt(()=>xe(cn)),$(()=>this.verifyNetworkStatus())),i=ft(window,"offline").pipe($(()=>this.verifyNetworkStatus()));Nt(e,i,ve(this.checkConnectivity())).subscribe(n=>this.setOnlineStatus(n))}get isOnline$(){return this.online$.asObservable()}checkOnlineStatusAfterDelay(){return xe(1e3).pipe($(()=>this.verifyNetworkStatus()),Ie(()=>J(!1)))}verifyNetworkStatus(){return ve(this.checkConnectivity())}checkConnectivity(){return L(this,null,function*(){for(let e of pn)try{return yield fetch(e,{mode:"no-cors",cache:"no-store"}),!0}catch{}return navigator.onLine})}setOnlineStatus(e){if(this.online$.next(e),e){this.stopOfflineRecheck();return}this.startOfflineRecheck()}startOfflineRecheck(){this.stopOfflineRecheck(),this.offlineRecheckSubscription=xe(zi,zi).pipe($(()=>this.verifyNetworkStatus())).subscribe(e=>{e&&this.setOnlineStatus(!0)})}stopOfflineRecheck(){this.offlineRecheckSubscription?.unsubscribe(),this.offlineRecheckSubscription=void 0}};o.\u0275fac=function(i){return new(i||o)}
1,o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let t=o;return t})();function dn(t,o){if(t&1&&(c(0,"vedius-text",9),f(1),l(2,"translate"),m()),t&2){let r=u();a(),h(" ",s(2,1,r.TranslationKeys.OfflineModalWaiting),"")}}function mn(t,o){if(t&1&&(c(0,"vedius-text",10),f(1),l(2,"translate"),m()),t&2){let r=u();a(),h(" ",s(2,1,r.TranslationKeys.OfflineModalNoConnection),"")}}function _n(t,o){if(t&1){let r=V();c(0,"vedius-button",11),x("onClick",function(){R(r);let i=u();return M(i.reload())}),f(1),l(2,"translate"),m()}if(t&2){let r=u();d("fullSize",!0),a(),h(" ",s(2,2,r.TranslationKeys.OfflineModalReloadPage),"")}}var Ui=(()=>{let o=class o{constructor(){this.destroyRef=_(W),this.authService=_(Xe),this.location=_(Yt),this.networkService=_(pt),this.TranslationKeys=ei,this.isOnline=I(!1),this.isLoading=!1}ngOnInit(){this.networkService.isOnline$.pipe(U(this.destroyRef)).subscribe(e=>{this.isOnline.set(e)})}reload(){return L(this,null,function*(){try{this.reloadPage(),this.modal?.close()}catch{this.authService.logout(),this.modal?.close()}finally{this.isLoading=!1}})}reloadPage(){this.location.go(this.location.path()),window.location.reload()}close(){this.modal?.close()}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=E({type:o,selectors:[["app-offline-modal"]],viewQuery:function(i,n){if(i&1&&Bt(Ke,5),i&2){let p;Vt(p=Ft())&&(n.modal=p.first)}},decls:13,vars:11,consts:[[3,"hideCloseButton"],[1,"user-export-data-modal"],[1,"title-modal"],["variant","text","size","sm",1,"neutral-dark-color"],[1,"button-container"],["class","neutral-dusk-color info-action","variant","text","size","md",4,"ngIf"],["class","neutral-dusk-color info-action disabled","variant","text","size","md",4,"ngIf"],[3,"fullSize","onClick",4,"ngIf"],[3,"active"],["variant","text","size","md",1,"neutral-dusk-color","info-action"],["variant","text","size","md",1,"neutral-dusk-color","info-action","disabled"],[3,"onClick","fullSize"]],template:function(i,n){i&1&&(c(0,"vedius-modal",0)(1,"div",1)(2,"h1",2),f(3),l(4,"translate"),m(),c(5,"vedius-text",3),f(6),l(7,"translate"),m(),c(8,"div",4),g(9,dn,3,3,"vedius-text",5)(10,mn,3,3,"vedius-text",6)(11,_n,3,4,"vedius-button",7),m()(),v(12,"vedius-page-loading",8),m()),i&2&&(d("hideCloseButton",!0),a(3),h(" ",s(4,7,n.TranslationKeys.OfflineModalTitle)," "),a(3),h(" ",s(7,9,n.TranslationKeys.OfflineModalDescription),""),a(3),d("ngIf",!n.isOnline()),a(),d("ngIf",!n.isOnline()),a(),d("ngIf",n.isOnline()),a(),d("active",n.isLoading))},dependencies:[Ke,ri,Zt,ai,ui,j,G],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.user-export-data-modal{display:flex;flex-direction:column;gap:16px}.user-export-data-modal .neutral-darker-color{color:#425168}.user-export-data-modal .neutral-dark-color{color:#6d7a8e}.user-export-data-modal .neutral-dusk-color{color:#192840}.user-export-data-modal .title-modal{color:#192840;font-family:DM Sans;font-size:1.5rem;font-weight:500;line-height:2rem;letter-spacing:-.48px;display:flex;align-items:center;gap:16px;margin:3px 0 0}.user-export-data-modal .button-container{margin-top:24px;width:100%;height:100%;justify-content:flex-end;align-items:flex-start;gap:16px;display:inline-flex}.user-export-data-modal .button-container .info-action{height:48px;flex:1 0 0;justify-content:center;align-items:center;width:100%;display:flex;gap:16px}.user-export-data-modal .button-container .info-action.disabled{border-radius:8px;background:#f5f6f8}.user-export-data-modal .button-container vedius-button{min-width:260px}@media screen and (max-width: 600px){.user-export-data-modal .title-modal{font-size:1.25rem;line-height:1.875rem;margin:12px 0 0}.user-export-data-modal .button-container{flex-direction:column}.user-export-data-modal .button-container .info-action{padding:16px}.user-export-data-modal .button-container vedius-button{min-width:100%;width:100%}} 2`],encapsulation:2});let t=o;return t})();var Gi=(()=>{let o=class o{constructor(){this.injector=_(te),this.swUpdate=_(Ci),this.cacheService=_(gi),this.cookieService=_(Jt),this.firebaseExtended=_(mi),this.versionListenerRetryCount=0,this.MAX_VERSION_LISTENER_RETRIES=3,this.VERSION_LISTENER_RETRY_DELAY_MS=5e3}get newVersionCheckerService(){return this.injector.get(Oi)}get vediusPlatformVersionRepository(){return this.injector.get(vi)}start(){this.runStart()}runStart(){return L(this,null,function*(){console.log("Starting app version update service"),this.initializeServiceWorkerRecovery(),this.initializeVersionCookie(),yield At(this.injector,()=>this.firebaseExtended.ensureInitialized()),this.initializeVersionListener(),console.log("App version update service started")})}stop(){this.versionListenerUnsubscribe&&(this.versionListenerUnsubscribe(),this.versionListenerUnsubscribe=void 0),this.versionListenerRetryCount=0,this.unrecoverableSubscription?.unsubscribe(),this.unrecoverableSubscription=void 0,console.log("App version update service stopped")}checkOnLogin(){return L(this,null,function*(){try{console.log("Checking update on login"),yield this.newVersionCheckerService.checkForUpdate({source:"login"}),console.log("Update checked on login")}catch(e){console.error("[AppVersionUpdateService] Error checking update on login:",e)}})}initializeVersionCookie(){try{let e=this.cookieService.getCookie("vedius_app_version"),i=vt.VERSION;e||this.cookieService.setCookie("vedius_app_version",i)}catch(e){console.error("[AppVersionUpdateService] Error initializing version cookie:",e)}}
2initializeVersionListener(){if(this.swUpdate.isEnabled){this.versionListenerUnsubscribe&&(this.versionListenerUnsubscribe(),this.versionListenerUnsubscribe=void 0),this.versionListenerRetryCount=0;try{this.versionListenerUnsubscribe=this.vediusPlatformVersionRepository.listenWebVersion(e=>{console.log("Firebase version changed:",e);let i=vt.VERSION;console.log("Current app version:",i),Si(e,i)&&(this.swUpdate.checkForUpdate().catch(n=>{console.warn("[AppVersionUpdateService] SW check failed:",n)}),this.newVersionCheckerService.checkForUpdate().catch(n=>{console.error("[AppVersionUpdateService] Error opening update modal from push listener:",n)}))},e=>{if(console.error("[AppVersionUpdateService] Error listening for version changes:",e),this.versionListenerRetryCount<this.MAX_VERSION_LISTENER_RETRIES){this.versionListenerRetryCount++;let i=this.VERSION_LISTENER_RETRY_DELAY_MS*this.versionListenerRetryCount;console.warn(`[AppVersionUpdateService] Retrying listener setup (attempt ${this.versionListenerRetryCount}/${this.MAX_VERSION_LISTENER_RETRIES}) in ${i}ms...`),setTimeout(()=>{this.initializeVersionListener()},i)}else console.error("[AppVersionUpdateService] Max retries reached for version listener.")})}catch(e){if(console.error("[AppVersionUpdateService] Failed to initialize version listener:",e),this.versionListenerRetryCount<this.MAX_VERSION_LISTENER_RETRIES){this.versionListenerRetryCount++;let i=this.VERSION_LISTENER_RETRY_DELAY_MS*this.versionListenerRetryCount;setTimeout(()=>{this.initializeVersionListener()},i)}}}}initializeServiceWorkerRecovery(){this.swUpdate.isEnabled&&(this.unrecoverableSubscription?.unsubscribe(),this.unrecoverableSubscription=this.swUpdate.unrecoverable.subscribe(e=>{console.error("[AppVersionUpdateService] Service worker unrecoverable state:",e.reason),this.cacheService.clearAllCaches(0).then(()=>{document.location.reload()}).catch(i=>{console.error("[AppVersionUpdateService] Error clearing caches:",i),document.location.reload()})}))}};o.\u0275fac=function(i){return new(i||o)},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let t=o;return t})();var fn=[[["","slot","leading"]],[["","slot","badge"]],[["","slot","title"]],[["","slot","description"]]],un=["[slot='leading']","[slot='badge']","[slot='title']","[slot='description']"];function hn(t,o){if(t&1&&f(0),t&2){let r=u();h(" ",r.title()," ")}}function Cn(t,o){t&1&&F(0,2)}function gn(t,o){if(t&1&&(c(0,"p",3),f(1),m()),t&2){let r=u();a(),B(r.description())}}function vn(t,o){t&1&&F(0,3)}function Sn(t,o){t&1&&v(0,"vds-icon",5)}var ji=(()=>{let o=class o{constructor(){this.size=C("lg"),this.title=C(),this.description=C(),this.disabled=C(!1),this.chevron=C(!0),this.contentAlign=C("left"),this.actionClick=D()}onTrigger(e){if(this.disabled()){e.preventDefault(),e.stopPropagation();return}this.actionClick.emit(e)}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=E({type:o,selectors:[["vds-tile-action"]],hostAttrs:["role","button"],hostVars:4,hostBindings:function(i,n){i&1&&x("click",function(O){return n.onTrigger(O)})("keydown.space",function(O){return n.onTrigger(O)})("keydown.enter",function(O){return n.onTrigger(O)}),i&2&&(Me("tabindex",n.disabled()?-1:0)("aria-disabled",n.disabled()),z("vds-tile-action--disabled",n.disabled()))},inputs:{size:[1,"size"],title:[1,"title"],description:[1,"description"],disabled:[1,"disabled"],chevron:[1,"chevron"],contentAlign:[1,"contentAlign"]},outputs:{actionClick:"actionClick"},ngContentSelectors:un,decls:11,vars:6,consts:[["variant","action",3,"size","disabled","contentAlign"],["slot","title"],["slot","description"],[1,"vds-tile-action__description-text"],["slot","trailing",1,"vds-tile-action__chevron"],["name","vds-chevron-right","size","32"]],template:function(i,n){i&1&&(H(fn),c(0,"vds-tile-layout",0),F(1,0,["slot","leading"]),F(2,1,["slot","badge"]),oe(3,1),g(4,hn,1,1)(5,Cn,1,0),re(),oe(6,2),g(7,gn,2,1,"p",3)(8,vn,1,0),re(),c(9,"div",4),g(10,Sn,1,0,"vds-icon",5),m()()),i&2&&(d("size",n.size())("disabled",n.disabled())("contentAlign",n.contentAlign()),a(4),b(n.title()?4:5),a(3),b(n.description()?7:8),a(3),b(n.chevron()?10:-1))},dependencies:[Ai,hi],styles:['@charset "UTF-8";[_ngcontent-%COMP%]:root{--001: #fefefe;--002: #f1f3f5}
2.theme-dark[_ngcontent-%COMP%]{--001: #16191e;--002: #22262e}[_ngcontent-%COMP%]:root{--elevation-low-bottom: 0 8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-above: 0 -8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-left: -8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-low-right: 8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-high-bottom: 0 12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-above: 0 -12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-left: -12px 0 40px 0 rgba(0, 0, 0, .12);--elevation-high-right: 12px 0 40px 0 rgba(0, 0, 0, .12)}[_nghost-%COMP%]{display:block;width:100%;cursor:pointer;outline:none;border-radius:1rem;background-color:#a2acbd1a}.theme-dark[_nghost-%COMP%], .theme-dark [_nghost-%COMP%], .theme-dark [_nghost-%COMP%]{background-color:#a2acbd1a}[_nghost-%COMP%]:hover{background-color:#a2acbd33}[_nghost-%COMP%]:hover.theme-dark, .theme-dark [_nghost-%COMP%]:hover, .theme-dark [_nghost-%COMP%]:hover{background-color:#a2acbd33}.vds-tile-action--disabled[_nghost-%COMP%]{cursor:not-allowed;opacity:.5;pointer-events:none}.vds-tile-action__description-text[_ngcontent-%COMP%]{margin:0}.vds-tile-action__chevron[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;color:#686f7a}'],changeDetection:0});let t=o;return t})();var Wi=(()=>{let o=class o{constructor(){this.stepChange=D()}onIndividual(){this.stepChange.emit("INDIVIDUAL")}onClinic(){this.stepChange.emit("CLINIC")}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=E({type:o,selectors:[["app-choose-work-style-step"]],outputs:{stepChange:"stepChange"},decls:16,vars:19,consts:[["size","lg",3,"titleText","description","showClose"],[1,"choose-work-style-tiles"],["size","lg",3,"actionClick","title","description"],["slot","leading"],["size","md","type","pictogram","iconName","vds-user","color","accent"],["size","md","type","pictogram","iconName","vds-user-group","color","accent"]],template:function(i,n){i&1&&(c(0,"vds-modal"),v(1,"vds-modal-header",0),l(2,"translate"),l(3,"translate"),c(4,"vds-modal-content")(5,"div",1)(6,"vds-tile-action",2),l(7,"translate"),l(8,"translate"),x("actionClick",function(){return n.onIndividual()}),oe(9,3),v(10,"vds-visual",4),re(),m(),c(11,"vds-tile-action",2),l(12,"translate"),l(13,"translate"),x("actionClick",function(){return n.onClinic()}),oe(14,3),v(15,"vds-visual",5),re(),m()()()()),i&2&&(a(),d("titleText",s(2,7,"ONBOARDING.ACCOUNT_TYPE_STEP.TITLE"))("description",s(3,9,"ONBOARDING.ACCOUNT_TYPE_STEP.SUBTITLE"))("showClose",!1),a(5),d("title",s(7,11,"ONBOARDING.ACCOUNT_TYPE_STEP.TILES.INDIVIDUAL.TITLE"))("description",s(8,13,"ONBOARDING.ACCOUNT_TYPE_STEP.TILES.INDIVIDUAL.DESCRIPTION")),a(5),d("title",s(12,15,"ONBOARDING.ACCOUNT_TYPE_STEP.TILES.TEAM.TITLE"))("description",s(13,17,"ONBOARDING.ACCOUNT_TYPE_STEP.TILES.TEAM.DESCRIPTION")))},dependencies:[j,G,_e,fe,ue,ji,tt],styles:['@charset "UTF-8";[_ngcontent-%COMP%]:root{--001: #fefefe;--002: #f1f3f5}.theme-dark[_ngcontent-%COMP%]{--001: #16191e;--002: #22262e}[_ngcontent-%COMP%]:root{--elevation-low-bottom: 0 8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-above: 0 -8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-left: -8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-low-right: 8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-high-bottom: 0 12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-above: 0 -12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-left: -12px 0 40px 0 rgba(0, 0, 0, .12);--elevation-high-right: 12px 0 40px 0 rgba(0, 0, 0, .12)}.choose-work-style-tiles[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1.5rem;margin-bottom:.375rem}@media (max-width: 37.49875em){.choose-work-style-tiles[_ngcontent-%COMP%]{flex-direction:column;padding:0}}'],changeDetection:0});let t=o;return t})();var Ce=new yt("VdsWizardStepContent");var On=["*"],ge=(()=>{let o=class o{constructor(){this.steps=C.required(),this.currentStepIndex=Lt(0),this.hasError=C(!1),this.stepperState=C("enabled"),this.showBackOnFirstStep=C(!1),this.stepChanged=D(),this.finished=D(),this.canceled=D(),this.firstStepBack=D(),this.stepContentQuery=Re(Ce),this.stepContentInjected=_(Ce,{optional:!0}),this.activeStepContent=S(()=>this.stepContentQuery()??this.stepContentInjected)}next(){return L(this,null,function*(){let e=this.activeStepContent();if(e&&!(yield e.validate())){e.markAsTouched();return}this.currentStepIndex()<this.steps().length-1?(this.currentStepIndex.update(i=>i+1),this.stepChanged.emit(this.currentStepIndex())):this.finished.emit()})}back(){this.currentStepIndex()===0?this.showBackOnFirstStep()&&this.firstStepBack.emit():(this.currentStepIndex.update(e=>e-1),this.stepChanged.emit(this.currentStepIndex()))}};o.\u0275fac=function(i){return new(i||o)}
2,o.\u0275cmp=E({type:o,selectors:[["vds-wizard-modal"]],contentQueries:function(i,n,p){i&1&&ye(p,n.stepContentQuery,Ce,5),i&2&&ae()},inputs:{steps:[1,"steps"],currentStepIndex:[1,"currentStepIndex"],hasError:[1,"hasError"],stepperState:[1,"stepperState"],showBackOnFirstStep:[1,"showBackOnFirstStep"]},outputs:{currentStepIndex:"currentStepIndexChange",stepChanged:"stepChanged",finished:"finished",canceled:"canceled",firstStepBack:"firstStepBack"},ngContentSelectors:On,decls:2,vars:0,consts:[[1,"vds-wizard-modal"]],template:function(i,n){i&1&&(H(),c(0,"div",0),F(1),m())},styles:['@charset "UTF-8";[_ngcontent-%COMP%]:root{--001: #fefefe;--002: #f1f3f5}.theme-dark[_ngcontent-%COMP%]{--001: #16191e;--002: #22262e}[_ngcontent-%COMP%]:root{--elevation-low-bottom: 0 8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-above: 0 -8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-left: -8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-low-right: 8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-high-bottom: 0 12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-above: 0 -12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-left: -12px 0 40px 0 rgba(0, 0, 0, .12);--elevation-high-right: 12px 0 40px 0 rgba(0, 0, 0, .12)}[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 1 auto;min-height:0;background-color:#fff;overflow:hidden;animation:vdsModalZoomIn .2s cubic-bezier(0,0,.2,1) forwards;transform-origin:center center;backface-visibility:hidden;filter:blur(0)}.theme-dark[_nghost-%COMP%], .theme-dark [_nghost-%COMP%], .theme-dark [_nghost-%COMP%]{background-color:#161616}.vds-modal-panel--mobile[_nghost-%COMP%], .vds-modal-panel--mobile [_nghost-%COMP%]{border-radius:24px 24px 0 0;box-shadow:var(--elevation-low-above);animation:vdsModalSlideUp .3s cubic-bezier(0,0,.2,1) forwards}.vds-wizard-modal[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}'],changeDetection:0});let t=o;return t})();function bn(t,o){if(t&1){let r=V();c(0,"div",1)(1,"vds-button",5),x("click",function(){R(r);let i=u();return M(i.wizard.canceled.emit())}),f(2),l(3,"translate"),m()()}if(t&2){let r=u();a(),d("fullWidth",r.isMobile()),a(),h(" ",s(3,2,r.effectiveI18n().cancelLabel)," ")}}function En(t,o){if(t&1){let r=V();c(0,"vds-button",4),x("click",function(){R(r);let i=u();return M(i.wizard.back())}),f(1),l(2,"translate"),m()}if(t&2){let r=u();d("variant",r.backVariant())("fullWidth",r.isMobile()),a(),h(" ",s(2,3,r.effectiveI18n().backLabel)," ")}}var Hi={nextLabel:"WIZARD.FOOTER.NEXT",backLabel:"WIZARD.FOOTER.BACK",cancelLabel:"WIZARD.FOOTER.CANCEL",finishLabel:"WIZARD.FOOTER.FINISH"},qi="(max-width: 600px)",Qi=(()=>{let o=class o{constructor(){this.wizard=_(ge),this.breakpointObserver=_(Ge),this.i18n=C(Hi),this.footerI18n=C(void 0),this.showCancel=C(!0),this.backVariant=C("secondary"),this.nextVariant=C("primary"),this.isMobileOverride=C(void 0),this.effectiveI18n=S(()=>{let e=this.footerI18n();return e||(this.i18n()??Hi)}),this.isLastStep=S(()=>this.wizard.currentStepIndex()===this.wizard.steps().length-1),this.breakpointIsMobile=q(this.breakpointObserver.observe(qi).pipe(ee(e=>e.matches)),{initialValue:this.breakpointObserver.isMatched(qi)}),this.isMobile=S(()=>{let e=this.isMobileOverride();return e!==void 0?e:this.breakpointIsMobile()}),this.isSingleButton=S(()=>!this.showCancel()&&this.wizard.currentStepIndex()===0&&!this.wizard.showBackOnFirstStep())}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=E({type:o,selectors:[["vds-wizard-footer-actions-modal"]],inputs:{i18n:[1,"i18n"],footerI18n:[1,"footerI18n"],showCancel:[1,"showCancel"],backVariant:[1,"backVariant"],nextVariant:[1,"nextVariant"],isMobileOverride:[1,"isMobileOverride"]},decls:7,vars:13,consts:[[1,"vds-wizard-footer"],[1,"vds-wizard-footer__leading"],[1,"vds-wizard-footer__trailing"],[3,"variant","fullWidth"],[3,"click","variant","fullWidth"],["variant","tertiary",3,"click","fullWidth"]],template:function(i,n){i&1&&(c(0,"footer",0),g(1,bn,4,4,"div",1),c(2,"div",2),g(3,En,3,5,"vds-button",3),c(4,"vds-button",4),x("click",function(){return n.wizard.next()}),f(5),l(6,"translate"),m()()()),i&2&&(z("vds-wizard-footer--single",n.isSingleButton())("vds-wizard-footer--mobile",n.isMobile()),a(),b(n.showCancel()?1:-1),a(),z("vds-wizard-footer__trailing--full",!n.showCancel()&&(!n.isSingleButton()||n.isMobile())),a(),b(n.wizard.currentStepIndex()>0||n.wizard.showBackOnFirstStep()?3:-1),a(),d("variant",n.nextVariant())("fullWidth",n.isMobile()),a(),h(" ",s(6,11,n.isLastStep()?n.effectiveI18n().finishLabel:n.effectiveI18n().nextLabel)," "))},dependencies:[$e,j,G],styles:['@charset "UTF-8";[_ngcontent-%COMP%]:root{--001: #fefefe;--002: #f1f3f5}
2.theme-dark[_ngcontent-%COMP%]{--001: #16191e;--002: #22262e}[_ngcontent-%COMP%]:root{--elevation-low-bottom: 0 8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-above: 0 -8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-left: -8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-low-right: 8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-high-bottom: 0 12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-above: 0 -12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-left: -12px 0 40px 0 rgba(0, 0, 0, .12);--elevation-high-right: 12px 0 40px 0 rgba(0, 0, 0, .12)}[_nghost-%COMP%]{display:block;width:100%;flex-shrink:0}.vds-wizard-footer[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;flex-shrink:0;position:sticky;bottom:0;z-index:10;padding:1rem 1.25rem 1.25rem;padding:1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom)) 1.25rem;background-color:#fff;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.vds-wizard-footer.theme-dark[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%] .vds-wizard-footer[_ngcontent-%COMP%], .theme-dark [_nghost-%COMP%] .vds-wizard-footer[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%] .vds-wizard-footer[_ngcontent-%COMP%]{background-color:#161616}@supports (scrollbar-gutter: stable){.vds-wizard-footer[_ngcontent-%COMP%]{overflow-y:auto;scrollbar-gutter:stable}}.vds-wizard-footer--single[_ngcontent-%COMP%]{justify-content:flex-end}.vds-wizard-footer--single[_ngcontent-%COMP%] .vds-wizard-footer__leading[_ngcontent-%COMP%]{display:none}.vds-wizard-footer--mobile[_ngcontent-%COMP%]{flex-direction:row;align-items:stretch;gap:.75rem}.vds-wizard-footer--mobile.vds-wizard-footer--single[_ngcontent-%COMP%]{justify-content:stretch}.vds-wizard-footer--mobile[_ngcontent-%COMP%] .vds-wizard-footer__leading[_ngcontent-%COMP%]{width:100%}.vds-wizard-footer--mobile[_ngcontent-%COMP%] .vds-wizard-footer__trailing[_ngcontent-%COMP%]{width:100%;flex-direction:row;align-items:stretch}.vds-wizard-footer__leading[_ngcontent-%COMP%]{display:flex}.vds-wizard-footer__trailing[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;justify-content:flex-end}.vds-wizard-footer__trailing--full[_ngcontent-%COMP%]{width:100%}@media (max-width: 37.49875em){.vds-wizard-footer__trailing--full[_ngcontent-%COMP%]{gap:12px}}'],changeDetection:0});let t=o;return t})();var xn=["*"],Ki=(()=>{let o=class o{};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=E({type:o,selectors:[["vds-wizard-modal-content"]],ngContentSelectors:xn,decls:2,vars:0,consts:[[1,"vds-wizard-content"]],template:function(i,n){i&1&&(H(),c(0,"main",0),F(1),m())},styles:['@charset "UTF-8";[_ngcontent-%COMP%]:root{--001: #fefefe;--002: #f1f3f5}.theme-dark[_ngcontent-%COMP%]{--001: #16191e;--002: #22262e}[_ngcontent-%COMP%]:root{--elevation-low-bottom: 0 8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-above: 0 -8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-left: -8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-low-right: 8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-high-bottom: 0 12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-above: 0 -12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-left: -12px 0 40px 0 rgba(0, 0, 0, .12);--elevation-high-right: 12px 0 40px 0 rgba(0, 0, 0, .12)}[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.vds-wizard-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto;min-height:0;padding:.75rem 1.25rem;scrollbar-gutter:stable}@supports not selector(::-webkit-scrollbar){.vds-wizard-content[_ngcontent-%COMP%]{scrollbar-width:thin;scrollbar-color:#c1c8d3 #f1f3f5}}.vds-wizard-content[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}.vds-wizard-content[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:#f1f3f5;border-radius:624.9375rem}.vds-wizard-content[_ngcontent-%COMP%]::-webkit-scrollbar-track .theme-dark[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%] .vds-wizard-content[_ngcontent-%COMP%]::-webkit-scrollbar-track, .theme-dark [_nghost-%COMP%] .vds-wizard-content[_ngcontent-%COMP%]::-webkit-scrollbar-track, .theme-dark[_ngcontent-%COMP%] .vds-wizard-content[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:#22262e}.vds-wizard-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background-color:#c1c8d3;border-radius:624.9375rem;min-height:200px}.vds-wizard-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb .theme-dark[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%] .vds-wizard-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb, .theme-dark [_nghost-%COMP%] .vds-wizard-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb, .theme-dark[_ngcontent-%COMP%] .vds-wizard-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background-color:#686f7a}@media (min-width: 37.5em) and (max-width: 59.99875em){.vds-wizard-content[_ngcontent-%COMP%]{padding:.75rem 2rem}}@media (max-width: 37.49875em){.vds-wizard-content[_ngcontent-%COMP%]{padding:.75rem 1.25rem}}'],changeDetection:0});let t=o;return t})();var In=(t,o)=>({current:t,total:o}),Pn=(t,o)=>o.index;function Tn(t,o){if(t&1&&(c(0,"div",3),v(1,"vds-visual",9),m()),t&2){let r=u();a(),d("iconName",r.leadingIcon())("size",r.size())}}function Nn(t,o){if(t&1&&(c(0,"vds-text",6),f(1),l(2,"translate"),m()),t&2){let r,e=u();a(),h(" ",s(2,1,(r=e.optionalLabel())!==null&&r!==void 0?r:"")," ")}}function Rn(t,o){if(t&1&&v(0,"div",10),t&2){let r=o.$implicit;Dt("--vds-step-progress",r.progress+"%"),d("ngClass",r.colorClass)}}var Yi={stepCountLabel:"STEPPER.STEP_COUNT"},ct=(()=>{let o=class o{constructor(){this.currentStep=C.required(),this.totalSteps=C.required(),this.title=C.required(),this.optionalLabel=C(),this.size=C("md"),this.state=C("enabled"),this.leadingIcon=C(),this.i18n=C(Yi),this.currentStepProgress=C(0),this.effectiveI18n=S(()=>this.i18n()??Yi),this.titleVariant=S(()=>this.size()==="lg"?"display-md":"heading-md"),this.bars=S(()=>{let e=this.totalSteps(),i=this.currentStep(),n=this.state(),p=this.currentStepProgress();return Array.from({length:e},(O,k)=>{let P=k+1,w="",Y=0;return n==="finished"?(w="vds-stepper__bar--finished",Y=100):P<i?(w="vds-stepper__bar--completed",Y=100):P===i&&(w=n==="danger"?"vds-stepper__bar--current-danger":"vds-stepper__bar--current-enabled",Y=p),{index:P,colorClass:w,progress:Y}})})}};o.\u0275fac=function(i){return new(i||o)}
2,o.\u0275cmp=E({type:o,selectors:[["vds-stepper"]],inputs:{currentStep:[1,"currentStep"],totalSteps:[1,"totalSteps"],title:[1,"title"],optionalLabel:[1,"optionalLabel"],size:[1,"size"],state:[1,"state"],leadingIcon:[1,"leadingIcon"],i18n:[1,"i18n"],currentStepProgress:[1,"currentStepProgress"]},decls:14,vars:14,consts:[[1,"vds-stepper",3,"ngClass"],["variant","body-sm","color","secondary"],[1,"vds-stepper__content"],[1,"vds-stepper__icon"],[1,"vds-stepper__texts"],["color","default",3,"variant"],["variant","body-md","color","secondary"],[1,"vds-stepper__bars"],[1,"vds-stepper__bar",3,"ngClass","--vds-step-progress"],["type","icon",3,"iconName","size"],[1,"vds-stepper__bar",3,"ngClass"]],template:function(i,n){i&1&&(c(0,"div",0)(1,"vds-text",1),f(2),l(3,"translate"),m(),c(4,"div",2),g(5,Tn,2,2,"div",3),c(6,"div",4)(7,"vds-text",5),f(8),l(9,"translate"),m(),g(10,Nn,3,3,"vds-text",6),m()(),c(11,"div",7),ie(12,Rn,1,3,"div",8,Pn),m()()),i&2&&(d("ngClass","vds-stepper--"+n.size()),a(2),h(" ",Ae(3,6,n.effectiveI18n().stepCountLabel,qt(11,In,n.currentStep(),n.totalSteps()))," "),a(3),b(n.leadingIcon()?5:-1),a(2),d("variant",n.titleVariant()),a(),h(" ",s(9,9,n.title())," "),a(2),b(n.optionalLabel()?10:-1),a(2),ne(n.bars()))},dependencies:[$t,j,G,K,tt],styles:['@charset "UTF-8";[_ngcontent-%COMP%]:root{--001: #fefefe;--002: #f1f3f5}.theme-dark[_ngcontent-%COMP%]{--001: #16191e;--002: #22262e}[_ngcontent-%COMP%]:root{--elevation-low-bottom: 0 8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-above: 0 -8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-left: -8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-low-right: 8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-high-bottom: 0 12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-above: 0 -12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-left: -12px 0 40px 0 rgba(0, 0, 0, .12);--elevation-high-right: 12px 0 40px 0 rgba(0, 0, 0, .12)}[_nghost-%COMP%]{display:flex;width:100%}.vds-stepper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;width:100%}.vds-stepper--md[_ngcontent-%COMP%]{gap:.25rem}.vds-stepper--md[_ngcontent-%COMP%] .vds-stepper__content[_ngcontent-%COMP%]{gap:.5rem;margin-bottom:.5rem}.vds-stepper--md[_ngcontent-%COMP%] .vds-stepper__texts[_ngcontent-%COMP%]{gap:0rem}.vds-stepper--lg[_ngcontent-%COMP%]{gap:.5rem}.vds-stepper--lg[_ngcontent-%COMP%] .vds-stepper__content[_ngcontent-%COMP%]{gap:.75rem;margin-bottom:.5rem}.vds-stepper--lg[_ngcontent-%COMP%] .vds-stepper__texts[_ngcontent-%COMP%]{gap:.25rem}.vds-stepper__content[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-start;width:100%}.vds-stepper__icon[_ngcontent-%COMP%]{display:flex;flex-shrink:0}.vds-stepper__texts[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch;flex:1}.vds-stepper__bars[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.625rem;width:100%;align-self:stretch}.vds-stepper__bar[_ngcontent-%COMP%]{position:relative;height:.5rem;flex:1;border-radius:9999px;background:#a2acbd33;overflow:hidden}.vds-stepper__bar[_ngcontent-%COMP%]:before{content:"";position:absolute;top:0;left:0;height:100%;width:0%;border-radius:9999px;transition:width .3s ease-out,background-color .3s ease-out}.vds-stepper__bar--completed[_ngcontent-%COMP%]:before{width:100%;background-color:#0a515c}.vds-stepper__bar--finished[_ngcontent-%COMP%]:before{width:100%;background-color:#15c371}.vds-stepper__bar--current-enabled[_ngcontent-%COMP%]:before{width:var(--vds-step-progress, 0%);background-color:#0a515c}.vds-stepper__bar--current-danger[_ngcontent-%COMP%]:before{width:var(--vds-step-progress, 0%);background-color:#cc2929}'],changeDetection:0});let t=o;return t})();var Mn={stepCountLabel:"STEPPER.STEP_COUNT"},be=(()=>{let o=class o{constructor(){this.formGroup=C.required(),this.steps=C.required(),this.currentStep=C.required(),this.isSubmitted=C(!1),this.mergeDanger=C(!1),this.finished=C(!1),this.size=C("md"),this.leadingIcon=C(void 0),this.i18n=C(void 0),this.formTick=I(0),this.document=_(Kt),this.activeStepConfig=S(()=>{let e=this.steps(),i=this.currentStep()-1;if(!(i<0||i>=e.length))return e[i]}),this.activeControls=S(()=>{let e=this.activeStepConfig()?.controls;if(!e?.length)return[];let i=this.formGroup();return e.map(n=>i.get(n)).filter(n=>n!=null)}),this.computedProgress=S(()=>{this.formTick();let e=this.activeControls();if(e.length===0)return 100;let i=e.filter(n=>{if(n.disabled||n.valid)return!0;let p=n.value;return p!=null&&p!==""&&p!==!1}).length;return Math.round(i/e.length*100)}),this.effectiveStepperState=S(()=>{this.formTick();let e=this.isSubmitted();return this.activeControls().some(n=>Oe(n,e))||this.mergeDanger()?"danger":this.finished()?"finished":"enabled"}),this.effectiveI18n=S(()=>this.i18n()??Mn),se(e=>{let n=this.formGroup().events.subscribe(()=>{this.formTick.update(O=>O+1)}),p=()=>{this.formTick.update(O=>O+1)};this.document.addEventListener("focusout",p),e(()=>{n.unsubscribe(),this.document.removeEventListener("focusout",p)})})}};o.\u0275fac=function(i){return new(i||o)}
2,o.\u0275cmp=E({type:o,selectors:[["vds-smart-form-stepper"]],inputs:{formGroup:[1,"formGroup"],steps:[1,"steps"],currentStep:[1,"currentStep"],isSubmitted:[1,"isSubmitted"],mergeDanger:[1,"mergeDanger"],finished:[1,"finished"],size:[1,"size"],leadingIcon:[1,"leadingIcon"],i18n:[1,"i18n"]},decls:1,vars:9,consts:[[3,"currentStep","totalSteps","title","optionalLabel","state","currentStepProgress","leadingIcon","size","i18n"]],template:function(i,n){if(i&1&&v(0,"vds-stepper",0),i&2){let p,O;d("currentStep",n.currentStep())("totalSteps",n.steps().length)("title",(p=(p=n.activeStepConfig())==null?null:p.title)!==null&&p!==void 0?p:"")("optionalLabel",(O=n.activeStepConfig())==null?null:O.optionalLabel)("state",n.effectiveStepperState())("currentStepProgress",n.computedProgress())("leadingIcon",n.leadingIcon())("size",n.size())("i18n",n.effectiveI18n())}},dependencies:[ct],encapsulation:2,changeDetection:0});let t=o;return t})();var yn=["*"];function An(t,o){t&1&&(c(0,"div",1),F(1),m())}function wn(t,o){if(t&1&&v(0,"vds-stepper",2),t&2){let r=u();d("currentStep",r.currentStep())("totalSteps",r.totalSteps())("title",r.activeStep().title)("optionalLabel",r.activeStep().optionalLabel)("state",r.wizard.hasError()?"danger":r.wizard.stepperState())}}var $i=(()=>{let o=class o{constructor(){this.wizard=_(ge),this.projectedSmartFormStepper=Re(be),this.currentStep=S(()=>this.wizard.currentStepIndex()+1),this.totalSteps=S(()=>this.wizard.steps().length),this.activeStep=S(()=>this.wizard.steps()[this.wizard.currentStepIndex()])}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=E({type:o,selectors:[["vds-wizard-modal-header"]],contentQueries:function(i,n,p){i&1&&ye(p,n.projectedSmartFormStepper,be,5),i&2&&ae()},ngContentSelectors:yn,decls:3,vars:1,consts:[[1,"vds-wizard-header"],[1,"vds-wizard-header__projected"],["size","lg",3,"currentStep","totalSteps","title","optionalLabel","state"]],template:function(i,n){i&1&&(H(),c(0,"header",0),g(1,An,2,0,"div",1)(2,wn,1,5,"vds-stepper",2),m()),i&2&&(a(),b(n.projectedSmartFormStepper()?1:2))},dependencies:[ct],styles:['@charset "UTF-8";[_ngcontent-%COMP%]:root{--001: #fefefe;--002: #f1f3f5}.theme-dark[_ngcontent-%COMP%]{--001: #16191e;--002: #22262e}[_ngcontent-%COMP%]:root{--elevation-low-bottom: 0 8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-above: 0 -8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-left: -8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-low-right: 8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-high-bottom: 0 12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-above: 0 -12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-left: -12px 0 40px 0 rgba(0, 0, 0, .12);--elevation-high-right: 12px 0 40px 0 rgba(0, 0, 0, .12)}[_nghost-%COMP%]{display:block;flex-shrink:0}.vds-wizard-header[_ngcontent-%COMP%]{padding:2rem 1.25rem}@supports (scrollbar-gutter: stable){.vds-wizard-header[_ngcontent-%COMP%]{overflow-y:auto;scrollbar-gutter:stable}}@media (max-width: 768px){.vds-wizard-header[_ngcontent-%COMP%]{padding:1.25rem}}.vds-wizard-header__projected[_ngcontent-%COMP%]:empty{display:none}'],changeDetection:0});let t=o;return t})();function Ot(t){let o=t.value?.replace(/[^\d]/g,"");if(!o)return null;if(o.length!==14)return{invalidCnpj:!0};if(/^(\d)\1+$/.test(o))return{invalidCnpj:!0};let r=0,e=5;for(let n=0;n<12;n++)r+=parseInt(o.charAt(n))*e,e=e===2?9:e-1;let i=11-r%11;if(i>9&&(i=0),parseInt(o.charAt(12))!==i)return{invalidCnpj:!0};r=0,e=6;for(let n=0;n<13;n++)r+=parseInt(o.charAt(n))*e,e=e===2?9:e-1;return i=11-r%11,i>9&&(i=0),parseInt(o.charAt(13))!==i?{invalidCnpj:!0}:null}var Ln=["inviteNgForm"],Dn=()=>["/termos/termos-de-uso"],kn=()=>["/termos/politicas-de-privacidade"],Bn=t=>({count:t});function Vn(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.INDIVIDUAL_STEP.FULL_NAME_ERROR_INVALID")," ")}function Fn(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.INDIVIDUAL_STEP.FULL_NAME_ERROR_REQUIRED")," ")}function zn(t,o){if(t&1&&g(0,Vn,2,3)(1,Fn,2,3),t&2){let r,e=u(3);b((r=e.mainForm.get("fullName"))!=null&&r.hasError("invalidFullName")?0:1)}}function Un(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.INDIVIDUAL_STEP.WHATSAPP_ERROR_INVALID")," ")}function Gn(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.INDIVIDUAL_STEP.WHATSAPP_ERROR_REQUIRED")," ")}function jn(t,o){if(t&1&&g(0,Un,2,3)(1,Gn,2,3),t&2){let r,e=u(3);b((r=e.mainForm.get("phone"))!=null&&r.hasError("invalidPhone")?0:1)}}function Wn(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.CLINIC_STEP.STEP_1.ERRORS.CPF_INVALID")," ")}function Hn(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.CLINIC_STEP.STEP_1.ERRORS.CPF_REQUIRED")," ")}function qn(t,o){if(t&1&&g(0,Wn,2,3)(1,Hn,2,3),t&2){let r,e=u(3);b((r=e.mainForm.get("cpf"))!=null&&r.hasError("invalidCpf")||(r=e.mainForm.get("cpf"))!=null&&r.hasError("invalidCpfLength")||(r=e.mainForm.get("cpf"))!=null&&r.hasError("pattern")?0:1)}}function Qn(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.INDIVIDUAL_STEP.OCCUPATION_ERROR_REQUIRED")," ")}function Kn(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.INDIVIDUAL_STEP.PLATFORM_SOURCE_ERROR_REQUIRED")," ")}function Yn(t,o){t&1&&(c(0,"vds-hint",28),f(1),l(2,"translate"),m()),t&2&&(d("error",!0),a(),h(" ",s(2,2,"ONBOARDING.CLINIC_STEP.ERRORS.TERMS_REQUIRED")," "))}function $n(t,o){if(t&1&&(g(0,zn,2,1,"ng-template",null,0,y),v(2,"vds-full-name-input",18),l(3,"translate"),l(4,"translate"),v(5,"vds-phone-input",19),l(6,"translate"),l(7,"translate"),g(8,jn,2,1,"ng-template",null,1,y)(10,qn,2,1,"ng-template",null,2,y),v(12,"vds-cpf-cnpj-input",20),l(13,"translate"),l(14,"translate"),v(15,"vds-select",21),l(16,"translate"),l(17,"translate"),g(18,Qn,2,3,"ng-template",null,3,y),v(20,"vds-select",22),l(21,"translate"),l(22,"translate"),g(23,Kn,2,3,"ng-template",null,4,y),c(25,"div",23)(26,"div",24),v(27,"vds-checkbox",25),c(28,"vds-text",26),f(29),l(30,"translate"),c(31,"a",27),f(32),l(33,"translate"),m(),f(34),l(35,"translate"),c(36,"a",27),f(37),l(38,"translate"),m()()(),g(39,Yn,3,4,"vds-hint",28),m()),t&2){let r,e=T(1),i=T(9),n=T(11),p=T(19),O=T(24),k=u(2);a(2),d("label",s(3,24,"ONBOARDING.CLINIC_STEP.STEP_1.NAME_LABEL"))("placeholder",s(4,26,"ONBOARDING.CLINIC_STEP.STEP_1.NAME_PLACEHOLDER"))("errorTemplate",e),a(3),d("label",s(6,28,"ONBOARDING.CLINIC_STEP.STEP_1.WHATSAPP_LABEL"))("placeholder",s(7,30,"ONBOARDING.CLINIC_STEP.STEP_1.WHATSAPP_PLACEHOLDER"))("errorTemplate",i
2),a(7),d("label",s(13,32,"ONBOARDING.CLINIC_STEP.STEP_1.CPF_LABEL"))("placeholder",s(14,34,"ONBOARDING.CLINIC_STEP.STEP_1.CPF_PLACEHOLDER"))("errorTemplate",n),a(3),d("label",s(16,36,"ONBOARDING.CLINIC_STEP.STEP_1.OCCUPATION_LABEL"))("placeholder",s(17,38,"ONBOARDING.CLINIC_STEP.STEP_1.OCCUPATION_PLACEHOLDER"))("options",k.occupationOptions())("errorTemplate",p),a(5),d("label",s(21,40,"ONBOARDING.CLINIC_STEP.STEP_1.SOURCE_LABEL"))("placeholder",s(22,42,"ONBOARDING.CLINIC_STEP.STEP_1.SOURCE_PLACEHOLDER"))("options",k.platformOptions())("errorTemplate",O),a(9),h(" ",s(30,44,"ONBOARDING.CLINIC_STEP.STEP_1.TERMS_PREFIX"),""),a(2),d("routerLink",le(52,Dn)),a(),B(s(33,46,"ONBOARDING.CLINIC_STEP.STEP_1.TERMS_LINK")),a(2),B(s(35,48,"ONBOARDING.CLINIC_STEP.STEP_1.TERMS_MIDDLE")),a(2),d("routerLink",le(53,kn)),a(),B(s(38,50,"ONBOARDING.CLINIC_STEP.STEP_1.PRIVACY_LINK")),a(2),b((r=k.mainForm.get("agreeTerms"))!=null&&r.invalid&&((r=k.mainForm.get("agreeTerms"))!=null&&r.dirty||(r=k.mainForm.get("agreeTerms"))!=null&&r.touched)?39:-1)}}function Zn(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.CLINIC_STEP.STEP_2.ERRORS.CLINIC_NAME_REQUIRED")," ")}function Xn(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.CLINIC_STEP.STEP_2.ERRORS.CNPJ_INVALID")," ")}function Jn(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.CLINIC_STEP.STEP_2.ERRORS.CNPJ_REQUIRED")," ")}function eo(t,o){if(t&1&&g(0,Xn,2,3)(1,Jn,2,3),t&2){let r,e=u(3);b((r=e.mainForm.get("cnpj"))!=null&&r.hasError("invalidCnpj")||(r=e.mainForm.get("cnpj"))!=null&&r.hasError("invalidCnpjLength")||(r=e.mainForm.get("cnpj"))!=null&&r.hasError("pattern")?0:1)}}function to(t,o){if(t&1&&(g(0,Zn,2,3,"ng-template",null,5,y),v(2,"vds-text-input",29),l(3,"translate"),l(4,"translate"),g(5,eo,2,1,"ng-template",null,6,y),v(7,"vds-cpf-cnpj-input",30),l(8,"translate"),v(9,"vds-checkbox",31),l(10,"translate")),t&2){let r=T(1),e=T(6);a(2),d("label",s(3,6,"ONBOARDING.CLINIC_STEP.STEP_2.CLINIC_NAME_LABEL"))("placeholder",s(4,8,"ONBOARDING.CLINIC_STEP.STEP_2.CLINIC_NAME_PLACEHOLDER"))("errorTemplate",r),a(5),d("label",s(8,10,"ONBOARDING.CLINIC_STEP.STEP_2.CNPJ_LABEL"))("errorTemplate",e),a(2),d("label",s(10,12,"ONBOARDING.CLINIC_STEP.STEP_2.NO_CNPJ_LABEL"))}}function io(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.CLINIC_STEP.STEP_3.ERRORS.CEP_NOT_FOUND")," ")}function no(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.CLINIC_STEP.STEP_3.ERRORS.CEP_REQUIRED")," ")}function oo(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.CLINIC_STEP.STEP_3.ERRORS.CEP_INVALID")," ")}function ro(t,o){if(t&1&&g(0,io,2,3)(1,no,2,3)(2,oo,2,3),t&2){let r,e=u(3);b((r=e.mainForm.get("cep"))!=null&&r.hasError("customError")?0:(r=e.mainForm.get("cep"))!=null&&r.hasError("required")?1:2)}}function ao(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.CLINIC_STEP.STEP_3.ERRORS.STREET_REQUIRED")," ")}function lo(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.CLINIC_STEP.STEP_3.ERRORS.NEIGHBORHOOD_REQUIRED")," ")}function so(t,o){if(t&1&&(v(0,"div",34)(1,"vds-text-input",35),l(2,"translate"),v(3,"vds-text-input",36),l(4,"translate"),l(5,"translate"),c(6,"div",37),v(7,"vds-text-input",38),l(8,"translate"),l(9,"translate"),v(10,"vds-text-input",39),l(11,"translate"),l(12,"translate"),m(),v(13,"vds-text-input",40),l(14,"translate"),l(15,"translate"),v(16,"vds-text-input",41),l(17,"translate")),t&2){u();let r=T(3),e=T(5);a(),d("label",s(2,12,"ONBOARDING.CLINIC_STEP.STEP_3.CITY_LABEL")),a(2),d("label",s(4,14,"ONBOARDING.CLINIC_STEP.STEP_3.NEIGHBORHOOD_LABEL"))("placeholder",s(5,16,"ONBOARDING.CLINIC_STEP.STEP_3.NEIGHBORHOOD_PLACEHOLDER"))("errorTemplate",e),a(4),d("label",s(8,18,"ONBOARDING.CLINIC_STEP.STEP_3.STREET_LABEL"))("placeholder",s(9,20,"ONBOARDING.CLINIC_STEP.STEP_3.STREET_PLACEHOLDER"))("errorTemplate",r),a(3),d("label",s(11,22,"ONBOARDING.CLINIC_STEP.STEP_3.NUMBER_LABEL"))("placeholder",s(12,24,"ONBOARDING.CLINIC_STEP.STEP_3.NUMBER_PLACEHOLDER")),a(3),d("label",s(14,26,"ONBOARDING.CLINIC_STEP.STEP_3.COMPLEMENT_LABEL"))("placeholder",s(15,28,"ONBOARDING.CLINIC_STEP.STEP_3.COMPLEMENT_PLACEHOLDER")),a(3),d("label",s(17,30,"ONBOARDING.CLINIC_STEP.STEP_3.STATE_LABEL"))}}function po(t,o){if(t&1){let r=V();g(0,ro,3,1,"ng-template",null,7,y)(2,ao,2,3,"ng-template",null,8,y)(4,lo,2,3,"ng-template",null,9,y),c(6,"div",32)(7,"vds-postal-code-input",33),l(8,"translate"),l(9,"translate"),x("postalCodeComplete",function(i){R(r);let n=u(2);return M(n.onPostalCodeComplete(i))}),m(),g(10,so,18,32),m()}if(t&2){let r=T(1),e=u(2);a(7),d("label",s(8,5,"ONBOARDING.CLINIC_STEP.STEP_3.CEP_LABEL"))("placeholder",s(9,7,"ONBOARDING.CLINIC_STEP.STEP_3.CEP_PLACEHOLDER"))("loading",e.isCepLoading())("errorTemplate",r),a(3),b(e.showAddressDetail
2s()?10:-1)}}function co(t,o){if(t&1&&(c(0,"form",15),g(1,$n,40,54)(2,to,11,14)(3,po,11,9),m()),t&2){let r,e=u();d("formGroup",e.mainForm),a(),b((r=e.currentWizardStep())===0?1:r===1?2:r===2?3:-1)}}function mo(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.CLINIC_STEP.STEP_4.ERRORS.INVALID_EMAIL")," ")}function _o(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.CLINIC_STEP.STEP_4.ERRORS.SELF_INVITE")," ")}function fo(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.CLINIC_STEP.STEP_4.ERRORS.DUPLICATE")," ")}function uo(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.CLINIC_STEP.STEP_4.ERRORS.ALREADY_REGISTERED")," ")}function ho(t,o){if(t&1&&g(0,mo,2,3)(1,_o,2,3)(2,fo,2,3)(3,uo,2,3),t&2){let r,e=u(2);b((r=e.inviteForm.get("inviteEmail"))!=null&&r.hasError("invalidEmail")?0:(r=e.inviteForm.get("inviteEmail"))!=null&&r.hasError("selfInvite")?1:(r=e.inviteForm.get("inviteEmail"))!=null&&r.hasError("duplicate")?2:(r=e.inviteForm.get("inviteEmail"))!=null&&r.hasError("emailExists")?3:-1)}}function Co(t,o){if(t&1&&(c(0,"span",52),f(1),m()),t&2){let r=u(),e=r.$implicit,i=r.isSelected;z("is-brand",i&&e.value!==""),a(),B(e.description)}}function go(t,o){if(t&1&&(c(0,"div",49)(1,"span",50),f(2),m(),g(3,Co,2,3,"span",51),m()),t&2){let r=o.$implicit,e=o.isSelected;z("is-selected",e&&r.value!==""),a(),z("is-brand",e&&r.value!==""),a(),h(" ",r.label," "),a(),b(r.description?3:-1)}}function vo(t,o){if(t&1&&(c(0,"vds-text",46),f(1),l(2,"translate"),m()),t&2){let r=u(2);a(),h(" ",Ae(2,1,"ONBOARDING.CLINIC_STEP.STEP_4.INVITES_LIST_TITLE",Ht(4,Bn,r.invites().length))," ")}}function So(t,o){if(t&1){let r=V();c(0,"vds-info-card",48)(1,"vds-info-card-content")(2,"vds-text",53),f(3),m(),c(4,"vds-text",54),f(5),m()(),c(6,"vds-info-card-actions")(7,"vds-button",55),x("click",function(){let i=R(r).$index,n=u(2);return M(n.removeMember(i))}),m()()()}if(t&2){let r=o.$implicit;a(3),B(r.email),a(2),B(r.roleLabel),a(2),d("iconOnly",!0)}}function Oo(t,o){if(t&1){let r=V();c(0,"form",42,10),x("ngSubmit",function(){R(r);let i=u();return M(i.addMember())}),g(2,ho,4,1,"ng-template",null,11,y)(4,go,4,6,"ng-template",null,12,y),v(6,"vds-email-input",43),l(7,"translate"),l(8,"translate"),l(9,"translate"),c(10,"vds-select",44),l(11,"translate"),l(12,"translate"),x("customClick",function(){R(r);let i=u();return M(i.onInviteRoleSelectClick())}),m(),c(13,"vds-button",45),f(14),l(15,"translate"),m()(),g(16,vo,3,6,"vds-text",46),c(17,"div",47),ie(18,So,8,3,"vds-info-card",48,kt),m()}if(t&2){let r=T(3),e=T(5),i=u();d("formGroup",i.inviteForm),a(6),d("label",s(7,15,"ONBOARDING.CLINIC_STEP.STEP_4.EMAIL_LABEL"))("placeholder",s(8,17,"ONBOARDING.CLINIC_STEP.STEP_4.EMAIL_PLACEHOLDER"))("noLeadingIcon",!0)("hint",s(9,19,"ONBOARDING.CLINIC_STEP.STEP_4.EMAIL_HINT"))("errorTemplate",r),a(4),d("label",s(11,21,"ONBOARDING.CLINIC_STEP.STEP_4.ROLE_LABEL"))("placeholder",s(12,23,"ONBOARDING.CLINIC_STEP.STEP_4.ROLE_PLACEHOLDER"))("options",i.roleOptions())("optionTemplate",e)("overrideClick",i.isMobileRoleSelection()),a(3),d("fullWidth",i.isMobile())("disabled",i.isInviteSubmitDisabled()),a(),h(" ",s(15,25,"ONBOARDING.CLINIC_STEP.STEP_4.ADD_MEMBER_BUTTON")," "),a(2),b(i.invites().length>0?16:-1),a(2),ne(i.invites())}}var Xi=(()=>{let o=class o{constructor(){this.fb=_(Ue),this.elementRef=_(Te),this.injector=_(te),this.destroyRef=_(W),this.appContext=_(me),this.zipCodeService=_(Bi),this.clinicUserGroupService=_(ki),this.toastService=_(Ze),this.translate=_(de),this.translationService=_(je),this.userRegisterAnalytics=_(st),this.userService=_(Ye),this.onAction=D(),this.requestMobileRoleSelection=D(),this.isMobile=C(!1),this.isLoading=I(!1),this.isCepLoading=I(!1),this.currentWizardStep=I(0),this.occupationOptions=I([]),this.platformOptions=I([]),this.roleOptions=I([]),this.showAddressDetails=I(!1),this.isMobileRoleSelection=S(()=>this.currentWizardStep()===3&&this.isMobile()),this.invites=I([]),this.inviteSelfInviteValidator=e=>{let i=e.value?.trim().toLowerCase()??"";if(!i)return null;let n=this.appContext.getUserCredential()?.email?.toLowerCase()??"";return i===n?{selfInvite:!0}:null},this.inviteDuplicateValidator=e=>{let i=e.value?.trim().toLowerCase()??"";return i&&this.invites().some(n=>n.email.toLowerCase()===i)?{duplicate:!0}:null},this.inviteEmailExistsAsyncValidator=e=>{let i=e.value?.trim()??"";if(!i)return J(null);let n;try{n=St.fromString(i)}catch{return J(null)}return ve(this.userService.existsByEmail({email:n})).pipe(ee(p=>p?{emailExists:!0}:null),Ie(()=>J(null)))},this.mainForm=this.fb.group({fullName:["",[N.required]],phone:["",[N.required]],cpf:["",[N.required]],occupation:["",[N.required]],platformType:["",[N.required]],agreeTerms:[!1,[N.requiredTrue]],clinicName:["",[N.required]],cnpj:["",[N.required,Ot]],noCnpj:[!1],cep:["",[N.required]],street:["",[N.required]],number:[""],complement:[""],neighborhood:["",[N.required]],city:[{value:"",disabled:!0},[N.required]],state:[{value:"",disabled:!0},[N.required]]}),this.formEvents=q(this.mainForm.events),this.inviteForm=this.fb.group({inviteEmail:["",{validators:[this.inviteSelfInviteValidator,this.inviteDuplicateValidator],asyncValidators:[this.inviteEmailExistsAsyncValidator],updateOn:"blur"}],inviteRole:[""]}),this.inviteFormEvents=q(this.inviteForm.events),this.inviteNgForm=wt("inviteNgForm"),this.isInviteSubmitDisabled=S(()=>{this.inviteFormEvents();let e=(this.inviteForm.get("inviteEmail")?.value??"").trim(),i=this.inviteForm.get("inviteRole")?.value??"";
2return this.inviteForm.invalid||this.inviteForm.pending||!e||!i}),this.stepHasError=S(()=>{this.currentWizardStep(),this.formEvents(),this.inviteFormEvents(),this.inviteNgForm()?.submitted;let e=this.currentWizardStep();if(e===3){let n=this.inviteForm.get("inviteEmail");return Oe(n,this.inviteNgForm()?.submitted??!1)}let i=this.formStepConfigs[e]?.controls;return i?.length?i.some(n=>Oe(this.mainForm.get(n),!1)):!1}),this.formStepConfigs=[{id:"about-you",title:"ONBOARDING.CLINIC_STEP.STEP_1.TITLE",optionalLabel:"ONBOARDING.CLINIC_STEP.STEP_1.DESCRIPTION",controls:["fullName","phone","cpf","occupation","platformType","agreeTerms"]},{id:"about-business",title:"ONBOARDING.CLINIC_STEP.STEP_2.TITLE",optionalLabel:"ONBOARDING.CLINIC_STEP.STEP_2.DESCRIPTION",controls:["clinicName","cnpj"]},{id:"address",title:"ONBOARDING.CLINIC_STEP.STEP_3.TITLE",optionalLabel:"ONBOARDING.CLINIC_STEP.STEP_3.DESCRIPTION",controls:["cep","street","neighborhood","city","state"]},{id:"team",title:"ONBOARDING.CLINIC_STEP.STEP_4.TITLE",optionalLabel:"ONBOARDING.CLINIC_STEP.STEP_4.DESCRIPTION",controls:[]}],this.footerBackVariant=S(()=>this.currentWizardStep()===3?"tertiary":"secondary"),this.footerNextVariant=S(()=>this.currentWizardStep()===3?"secondary":"primary"),this.clinicWizardFooterI18n=S(()=>({nextLabel:"WIZARD.FOOTER.NEXT",backLabel:"WIZARD.FOOTER.BACK",cancelLabel:"WIZARD.FOOTER.CANCEL",finishLabel:this.invites().length>0?"ONBOARDING.CLINIC_STEP.STEP_4.FINISH_BUTTON_WITH_INVITES":"ONBOARDING.CLINIC_STEP.STEP_4.FINISH_BUTTON_EMPTY"}))}ngOnInit(){this.initRoleOptions(),this.mainForm.get("cep")?.valueChanges.pipe(U(this.destroyRef)).subscribe(()=>{let e=this.mainForm.get("cep");if(e?.hasError("customError")){let i=Q({},e.errors);delete i.customError,e.setErrors(Object.keys(i).length?i:null)}}),this.noCnpjControl.valueChanges.pipe(U(this.destroyRef)).subscribe(e=>{let i=this.cnpjControl;e?(i.clearValidators(),i.disable({emitEvent:!1}),i.setValue("",{emitEvent:!1})):(i.enable({emitEvent:!1}),i.setValidators([N.required,Ot])),i.updateValueAndValidity({emitEvent:!1})}),Ee({occupations:ke(this.translationService),platforms:Qe(this.translationService)}).pipe(U(this.destroyRef)).subscribe(e=>{let i=this.translationService.get("ONBOARDING.CLINIC_STEP.STEP_1.OCCUPATION_PLACEHOLDER"),n=this.translationService.get("ONBOARDING.CLINIC_STEP.STEP_1.SOURCE_PLACEHOLDER"),p=this.translate.currentLang??this.translate.defaultLang??"en";this.occupationOptions.set(De(e.occupations,i,p)),this.platformOptions.set(this.recordToSelectOptions(e.platforms,n))})}validate(){return L(this,null,function*(){let e=this.currentWizardStep(),i=this.formStepConfigs[e]?.controls??[];return i.length===0?!0:(i.forEach(n=>this.mainForm.get(n)?.updateValueAndValidity()),e===2?this.isAddressStepValid():i.every(n=>{let p=this.mainForm.get(n);return!!(p&&(p.valid||p.disabled))}))})}markAsTouched(){let e=this.currentWizardStep(),i=this.formStepConfigs[e]?.controls??[];fi(this.mainForm,i),ut(()=>{gt(this.elementRef.nativeElement,this.mainForm,i)},{injector:this.injector})}onPostalCodeComplete(e){this.isCepLoading.set(!0),this.zipCodeService.get({code:e}).then(i=>{if(!i){let w=this.mainForm.get("cep");w&&(w.setErrors(X(Q({},w.errors||{}),{customError:"CEP_NOT_FOUND"})),w.markAsTouched()),this.mainForm.get("neighborhood")?.enable({emitEvent:!1});return}let n=this.mainForm.get("cep");if(n?.hasError("customError")){let w=Q({},n.errors);delete w.customError,n.setErrors(Object.keys(w).length?w:null)}let p=this.mainForm.get("city"),O=this.mainForm.get("state"),k=this.mainForm.get("neighborhood");p?.enable({emitEvent:!1}),O?.enable({emitEvent:!1}),k?.enable({emitEvent:!1}),this.mainForm.patchValue({street:i.street??"",number:i.number!=null&&i.number!==void 0?String(i.number):"",complement:i.complement??"",neighborhood:i.neighborhood??"",city:i.city??"",state:i.state??""}),p?.disable({emitEvent:!1}),O?.disable({emitEvent:!1}),(i.neighborhood??"").trim()&&k?.disable({emitEvent:!1}),this.showAddressDetails.set(!0)}).catch(()=>{let i=this.mainForm.get("cep");i&&(i.setErrors(X(Q({},i.errors||{}),{customError:"CEP_NOT_FOUND"})),i.markAsTouched()),this.mainForm.get("neighborhood")?.enable({emitEvent:!1})}).finally(()=>{this.isCepLoading.set(!1)})}addMember(){let e=this.inviteForm.get("inviteEmail")?.value?.trim(),i=this.inviteForm.get("inviteRole")?.value;
2if(!e||!i||this.inviteForm.invalid||this.inviteForm.pending){this.inviteForm.markAllAsTouched(),ut(()=>{gt(this.elementRef.nativeElement,this.inviteForm,["inviteEmail","inviteRole"])},{injector:this.injector});return}let n=this.roleRegisterLabel(i);this.invites.update(p=>[...p,{email:e,role:i,roleLabel:n}]),this.inviteForm.reset()}applyInviteRoleSelection(e){let i=this.inviteForm.get("inviteRole");i&&(i.setValue(e),i.markAsDirty(),i.markAsTouched(),i.updateValueAndValidity({emitEvent:!1}))}onInviteRoleSelectClick(){let e=this.inviteForm.get("inviteRole")?.value??"";this.requestMobileRoleSelection.emit(e)}removeMember(e){this.invites.update(i=>i.filter((n,p)=>p!==e)),this.inviteForm.get("inviteEmail")?.updateValueAndValidity({emitEvent:!1})}finishOnboarding(){return L(this,null,function*(){let e=this.appContext.getUserCredential()?.userId;if(!e){this.showApiErrorToast();return}this.isLoading.set(!0);try{let i=this.mainForm.get("fullName")?.value?.trim()??"",n=Se.fromFullName(i),p=this.mainForm.get("occupation")?.value,O=qe.create({type:this.mainForm.get("platformType")?.value}),k=We.fromBrazil(this.mainForm.get("phone")?.value),P=this.mainForm.getRawValue(),w=!!P.noCnpj,Y=P.cnpj?.toString().trim()??"",mt=!w&&Y?pi.fromString(Y):null,bt=mt&&mt.value?mt:void 0,rn=P.number,Et=String(rn??"").replace(/[^\d]/g,""),xt=Et===""?0:Number(Et),an=si.create({postalCode:P.cep,street:P.street,number:Number.isNaN(xt)?0:xt,complement:P.complement||void 0,neighborhood:P.neighborhood,city:P.city,state:P.state}),ln=this.invites().map(Pt=>({email:St.fromString(Pt.email),role:Pt.role||Z.COLLABORATOR})),It=this.appContext.getUserCredential()?.userVedius,sn=li.fromString(P.cpf?.trim()??"");yield this.clinicUserGroupService.completeClinicUserProfile({key:He.fromString(e),name:n,clinicName:P.clinicName,companyCode:bt?.value?bt:void 0,address:an,phone:k,collaborators:ln,occupations:[p],platformSource:O,socialNumber:sn}),It?.email&&this.userRegisterAnalytics.onCompleteClinicProfile(It.email),this.onAction.emit("ACCESS")}catch{this.showApiErrorToast()}finally{this.isLoading.set(!1)}})}get cnpjControl(){return this.mainForm.get("cnpj")}get noCnpjControl(){return this.mainForm.get("noCnpj")}isAddressStepValid(){let e=this.mainForm.getRawValue();return!!String(e.cep??"").trim()&&!!String(e.street??"").trim()&&!!String(e.neighborhood??"").trim()&&!!String(e.city??"").trim()&&!!String(e.state??"").trim()}initRoleOptions(){let e=this.translate.instant("ONBOARDING.CLINIC_STEP.STEP_4.ROLE_PLACEHOLDER"),i=O=>this.translate.instant(`ONBOARDING.CLINIC_STEP.STEP_4.ROLE_DESCRIPTIONS.${O}`),n=[Z.OWNER,Z.FULL_COLLABORATOR,Z.COLLABORATOR,Z.FULL_SECRETARY,Z.SECRETARY],p=[{value:"",label:e,disabled:!0},...n.map(O=>({value:O,label:this.roleRegisterLabel(O),description:i(O)}))];this.roleOptions.set(p)}roleRegisterLabel(e){return this.translate.instant(`ONBOARDING.CLINIC_STEP.STEP_4.ROLE_LABELS.${e}`)}recordToSelectOptions(e,i){return[{label:i,value:"",disabled:!0},...Object.keys(e).map(n=>({value:n,label:e[n]}))]}showApiErrorToast(){this.toastService.error(this.translate.instant("ONBOARDING.CLINIC_STEP.ERRORS.API_ERROR_TITLE"),this.translate.instant("ONBOARDING.CLINIC_STEP.ERRORS.API_ERROR_MESSAGE"))}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=E({type:o,selectors:[["app-clinic-profile-step"]],viewQuery:function(i,n){i&1&&zt(n.inviteNgForm,Ln,5),i&2&&ae()},inputs:{isMobile:[1,"isMobile"]},outputs:{onAction:"onAction",requestMobileRoleSelection:"requestMobileRoleSelection"},features:[Wt([{provide:Ce,useExisting:o}])],decls:8,vars:16,consts:[["fullNameErrorTpl",""],["whatsappErrorTpl",""],["cpfErrorTpl",""],["occupationErrorTpl",""],["platformSourceErrorTpl",""],["clinicNameErrorTpl",""],["cnpjErrorTpl",""],["cepErrorTpl",""],["streetErrorTpl",""],["neighborhoodErrorTpl",""],["inviteNgForm","ngForm"],["inviteEmailErrorTpl",""],["roleOptionTpl",""],[3,"currentStepIndexChange","firstStepBack","finished","steps","currentStepIndex","showBackOnFirstStep"],["size","lg",3,"formGroup","steps","currentStep","isSubmitted","mergeDanger","finished"],["novalidate","",3,"formGroup"],[3,"showCancel","footerI18n","backVariant","nextVariant"],["size","md",3,"active"],["formControlName","fullName","autocomplete","nope",3,"label","placeholder","errorTemplate"],["formControlName","phone","autocomplete","nope",3,"label","placeholder","errorTemplate"],["formControlName","cpf","documentType","cpf","autocomplete","nope",3,"label","placeholder","errorTemplate"],["formControlName","occupation",3,"label","placeholder","options","errorTemplate"],["formControlName","platformType",3,"label","placeholder","options","errorTemplate"],[1,"clinic-profile-step__terms-field"],[1,"clinic-profile-step__terms"],["formControlName","agreeTerms"],["variant","functional-md"],["vds-link","","size","sm","target","_blank","rel","noopener noreferrer",3,"routerLink"],[3,"error"],["formControlName","clinicName","autocomplete","nope",3,"label","placeholder","errorTemplate"],["formControlName","cnpj","documentType","cnpj","autocomplete","nope",3,"label","errorTemplate"],["formControlName","noCnpj",1,"clinic-profile-step__no-cnpj-checkbox",3,"label"],[1,"clinic-profile-step__address-container"],["formControlName","cep",3,"postalCodeComplete","label","placeholder","loading","errorTemplate"],[1,"clinic-profile-step__address-div
2ider"],["formControlName","city","autocomplete","nope",3,"label"],["formControlName","neighborhood","autocomplete","nope",3,"label","placeholder","errorTemplate"],[1,"form-row-2"],["formControlName","street","autocomplete","nope",3,"label","placeholder","errorTemplate"],["formControlName","number","autocomplete","nope",3,"label","placeholder"],["formControlName","complement","autocomplete","nope",3,"label","placeholder"],["formControlName","state","autocomplete","nope",3,"label"],[1,"clinic-profile-step__invite-form",3,"ngSubmit","formGroup"],["formControlName","inviteEmail",3,"label","placeholder","noLeadingIcon","hint","errorTemplate"],["formControlName","inviteRole",3,"customClick","label","placeholder","options","optionTemplate","overrideClick"],["variant","primary","type","submit","leadingIcon","vds-user-add-plus",3,"fullWidth","disabled"],["variant","body-md","color","muted",1,"clinic-profile-step__invites-title"],[1,"clinic-profile-step__invites"],["orientation","horizontal","variant","bordered"],[1,"clinic-profile-step__role-option"],[1,"clinic-profile-step__role-title"],[1,"clinic-profile-step__role-desc",3,"is-brand"],[1,"clinic-profile-step__role-desc"],["variant","functional-lg"],["variant","body-md","color","secondary"],["variant","secondary","color","negative","size","sm","trailingIcon","vds-trash","type","button",3,"click","iconOnly"]],template:function(i,n){if(i&1&&(c(0,"vds-wizard-modal",13),jt("currentStepIndexChange",function(O){return Gt(n.currentWizardStep,O)||(n.currentWizardStep=O),O}),x("firstStepBack",function(){return n.onAction.emit("BACK")})("finished",function(){return n.finishOnboarding()}),c(1,"vds-wizard-modal-header"),v(2,"vds-smart-form-stepper",14),m(),c(3,"vds-wizard-modal-content"),g(4,co,4,2,"form",15)(5,Oo,20,27),m(),v(6,"vds-wizard-footer-actions-modal",16)(7,"vds-container-loading",17),m()),i&2){let p;d("steps",n.formStepConfigs),Ut("currentStepIndex",n.currentWizardStep),d("showBackOnFirstStep",!0),a(2),d("formGroup",n.mainForm)("steps",n.formStepConfigs)("currentStep",n.currentWizardStep()+1)("isSubmitted",(p=(p=n.inviteNgForm())==null?null:p.submitted)!==null&&p!==void 0?p:!1)("mergeDanger",n.currentWizardStep()===3&&n.stepHasError())("finished",n.currentWizardStep()===3&&!n.stepHasError()),a(2),b(n.currentWizardStep()<3?4:-1),a(),b(n.currentWizardStep()===3?5:-1),a(),d("showCancel",!1)("footerI18n",n.clinicWizardFooterI18n())("backVariant",n.footerBackVariant())("nextVariant",n.footerNextVariant()),a(),d("active",n.isLoading())}},dependencies:[j,G,ce,Ve,pe,Be,Fe,ze,Le,rt,ge,$i,be,Ki,Qi,ot,at,it,lt,et,K,Je,Pi,Ti,Ni,Ri,$e,wi,Li,Di],styles:['@charset "UTF-8";[_ngcontent-%COMP%]:root{--001: #fefefe;--002: #f1f3f5}.theme-dark[_ngcontent-%COMP%]{--001: #16191e;--002: #22262e}[_ngcontent-%COMP%]:root{--elevation-low-bottom: 0 8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-above: 0 -8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-left: -8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-low-right: 8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-high-bottom: 0 12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-above: 0 -12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-left: -12px 0 40px 0 rgba(0, 0, 0, .12);--elevation-high-right: 12px 0 40px 0 rgba(0, 0, 0, .12)}[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0}form[novalidate][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-top:.5rem}.form-row-2[_ngcontent-%COMP%]{display:grid;gap:1rem;grid-template-columns:minmax(0,3fr) minmax(0,1fr)}@media (max-width: 37.49875em){.form-row-2[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr) 6.5rem}}.clinic-profile-step__terms-field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;margin-top:.5rem}.clinic-profile-step__terms[_ngcontent-%COMP%]{display:flex;gap:.75rem;
2align-items:center}.clinic-profile-step__terms[_ngcontent-%COMP%] vds-checkbox[_ngcontent-%COMP%]{flex-shrink:0}.clinic-profile-step__no-cnpj-checkbox[_ngcontent-%COMP%]{max-width:12.5rem}.clinic-profile-step__address-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;min-height:28.75rem}@media (max-width: 37.49875em){.clinic-profile-step__address-container[_ngcontent-%COMP%]{min-height:auto}}.clinic-profile-step__address-divider[_ngcontent-%COMP%]{width:100%;height:1px;background-color:#dee1e8}.clinic-profile-step__address-divider.theme-dark[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%] .clinic-profile-step__address-divider[_ngcontent-%COMP%], .theme-dark [_nghost-%COMP%] .clinic-profile-step__address-divider[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%] .clinic-profile-step__address-divider[_ngcontent-%COMP%]{background-color:#474b53}.clinic-profile-step__invite-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.clinic-profile-step__role-option[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch;text-align:left;box-sizing:border-box;width:100%;max-width:100%;min-width:0;padding:.5rem .75rem;gap:.25rem;border-radius:.375rem;transition:background-color .2s ease}.clinic-profile-step__role-option.is-selected[_ngcontent-%COMP%], .clinic-profile-step__role-option[_ngcontent-%COMP%]:hover{background-color:#17bbd31a}.clinic-profile-step__role-option.is-selected.theme-dark[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%] .clinic-profile-step__role-option.is-selected[_ngcontent-%COMP%], .theme-dark [_nghost-%COMP%] .clinic-profile-step__role-option.is-selected[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%] .clinic-profile-step__role-option.is-selected[_ngcontent-%COMP%], .clinic-profile-step__role-option[_ngcontent-%COMP%]:hover.theme-dark, .theme-dark[_nghost-%COMP%] .clinic-profile-step__role-option[_ngcontent-%COMP%]:hover, .theme-dark [_nghost-%COMP%] .clinic-profile-step__role-option[_ngcontent-%COMP%]:hover, .theme-dark[_ngcontent-%COMP%] .clinic-profile-step__role-option[_ngcontent-%COMP%]:hover{background-color:#17bbd31a}.clinic-profile-step__role-option.is-selected[_ngcontent-%COMP%] .clinic-profile-step__role-title[_ngcontent-%COMP%], .clinic-profile-step__role-option[_ngcontent-%COMP%]:hover .clinic-profile-step__role-title[_ngcontent-%COMP%]{color:#0a515c}.clinic-profile-step__role-option.is-selected[_ngcontent-%COMP%] .clinic-profile-step__role-title.theme-dark[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%] .clinic-profile-step__role-option.is-selected[_ngcontent-%COMP%] .clinic-profile-step__role-title[_ngcontent-%COMP%], .theme-dark [_nghost-%COMP%] .clinic-profile-step__role-option.is-selected[_ngcontent-%COMP%] .clinic-profile-step__role-title[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%] .clinic-profile-step__role-option.is-selected[_ngcontent-%COMP%] .clinic-profile-step__role-title[_ngcontent-%COMP%], .clinic-profile-step__role-option[_ngcontent-%COMP%]:hover .clinic-profile-step__role-title.theme-dark[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%] .clinic-profile-step__role-option[_ngcontent-%COMP%]:hover .clinic-profile-step__role-title[_ngcontent-%COMP%], .theme-dark [_nghost-%COMP%] .clinic-profile-step__role-option[_ngcontent-%COMP%]:hover .clinic-profile-step__role-title[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%] .clinic-profile-step__role-option[_ngcontent-%COMP%]:hover .clinic-profile-step__role-title[_ngcontent-%COMP%]{color:#b8eaf2}.clinic-profile-step__role-option.is-selected[_ngcontent-%COMP%] .clinic-profile-step__role-desc[_ngcontent-%COMP%], .clinic-profile-step__role-option[_ngcontent-%COMP%]:hover .clinic-profile-step__role-desc[_ngcontent-%COMP%]{color:#0f7888}.clinic-profile-step__role-option.is-selected[_ngcontent-%COMP%] .clinic-profile-step__role-desc.theme-dark[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%] .clinic-profile-step__role-option.is-selected[_ngcontent-%COMP%] .clinic-profile-step__role-desc[_ngcontent-%COMP%], .theme-dark [_nghost-%COMP%] .clinic-profile-step__role-option.is-selected[_ngcontent-%COMP%] .clinic-profile-step__role-desc[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%] .clinic-profile-step__role-option.is-selected[_ngcontent-%COMP%] .clinic-profile-step__role-desc[_ngcontent-%COMP%], .clinic-profile-step__role-option[_ngcontent-%COMP%]:hover .clinic-profile-step__role-desc.theme-dark[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%] .clinic-profile-step__role-option[_ngcontent-%COMP%]:hover .clinic-profile-step__role-desc[_ngcontent-%COMP%], .theme-dark [_nghost-%COMP%] .clinic-profile-step__role-option[_ngcontent-%COMP%]:hover .clinic-profile-step__role-desc[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%] .clinic-profile-step__role-option[_ngcontent-%COMP%]:hover .clinic-profile-step__role-desc[_ngcontent-%COMP%]{color:#71d5e4}.clinic-profile-step__role-title[_ngcontent-%COMP%]{font-family:Inter,DM Sans,-apple-system,BlinkMacSystemFont,sans-serif;font-size:.875rem;line-height:1rem;font-weight:500;letter-spacing:0;color:#474b53}.clinic-profile-step__role-title.theme-dark[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%] .clinic-profile-step__role-title[_ngcontent-%COMP%], .theme-dark [_nghost-%COMP%] .clinic-profile-step__role-title[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%] .clinic-profile-step__role-title[_ngcontent-%COMP%]{color:#dee1e8}.clinic-profile-step__role-title[_ngcontent-%COMP%]:hover{color:#0a515c}.clinic-profile-step__role-title[_ngcontent-%COMP%]:hover.theme-dark, .theme-dark[_nghost-%COMP%] .clinic-profile-step__role-title[_ngcontent-%COMP%]:hover, .theme-dark [_nghost-%COMP%] .clinic-profile-step__role-title[_ngcontent-%COMP%]:hover, .theme-dark[_ngcontent-%COMP%] .clinic-profile-step__role-title[_ngcontent-%COMP%]:hover{color:#b8eaf2}.clinic-profile-step__role-title.is-brand[_ngcontent-%COMP%]{color:#0a515c}.clinic-profile-step__role-title.is-brand.theme-dark[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%] .clinic-profile-step__role-title.is-brand[_ngcontent-%COMP%], .theme-dark [_nghost-%COMP%] .clinic-profile-step__role-title.is-brand[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%] .clinic-profile-step__role-title.is-brand[_ngcontent-%COMP%]{color:#b8eaf2}.clinic-profile-step__role-desc[_ngcontent-%COMP%]{font-family:Inter,DM Sans,-apple-system,BlinkMacSystemFont,sans-serif;font-size:.75rem;line-height:1.125rem;font-weight:400;letter-spacing:0;color:#868f9d;white-space:normal;word-break:break-word}.clinic-profile-step__role-desc.theme-dark[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%] .clinic-profile-step__role-desc[_ngcontent-%COMP%], .theme-dark [_nghost-%COMP%] .clinic-profile-step__role-desc[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%] .clinic-profile-step__role-desc[_ngcontent-%COMP%]{color:#a3acbd}.clinic-profile-step__role-desc.is-brand[_ngcontent-%COMP%]{color:#0f7888}.clinic-profile-step__role-desc.is-brand.theme-dark[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%] .clinic-profile-step__role-desc.is-brand[_ngcontent-%COMP%], .theme-dark [_nghost-%COMP%] .clinic-profile-step__role-desc.is-brand[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%] .clinic-profile-step__role-desc.is-brand[_ngcontent-%COMP%]{color:#71d5e4}.clinic-profile-step__invites-title[_ngcontent-%COMP%]{display:block;margin-top:1.5rem}.clinic-profile-step__invites-title[_ngcontent-%COMP%] + .clinic-profile-step__invites[_ngcontent-%COMP%]{margin-top:1.5rem}.clinic-profile-step__invites[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;margin-top:1.5rem;min-width:0}.clinic-profile-step__invites[_ngcontent-%COMP%] vds-info-card[_ngcontent-%COMP%]{min-width:0}.clinic-profile-step__invites[_ngcontent-%COMP%] vds-info-card-content{min-width:0;flex:1;display:flex;flex-direction:column;gap:.25rem}.clinic-profile-step__invites[_ngcontent-%COMP%] vds-info-card-content .vds-text--body-md{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}'],changeDetection:0});let t=o;return t})();var bo=()=>["/termos/termos-de-uso"],Eo=()=>["/termos/politicas-de-privacidade"];function xo(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.INDIVIDUAL_STEP.FULL_NAME_ERROR_INVALID")," ")}function Io(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.INDIVIDUAL_STEP.FULL_NAME_ERROR_REQUIRED")," ")}function Po(t,o){if(t&1&&g(0,xo,2,3)(1,Io,2,3),t&2){let r,e=u();b((r=e.form.get("fullName"))!=null&&r.hasError("invalidFullName")?0:1)}}function To(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.INDIVIDUAL_STEP.WHATSAPP_ERROR_INVALID")," ")}function No(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.INDIVIDUAL_STEP.WHATSAPP_ERROR_REQUIRED")," ")}function Ro(t,o){if(t&1&&g(0,To,2,3)(1,No,2,3),t&2){let r,e=u();b((r=e.form.get("phone"))!=null&&r.hasError("invalidPhone")?0:1)}}function Mo(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.INDIVIDUAL_STEP.OCCUPATION_ERROR_REQUIRED")," ")}function yo(t,o){t&1&&(f(0),l(1,"translate")),t&2&&h(" ",s(1,1,"ONBOARDING.INDIVIDUAL_STEP.PLATFORM_SOURCE_ERROR_REQUIRED")," ")}function Ao(t,o){t&1&&(c(0,"vds-hint",15),f(1),l(2,"translate"),m()),t&2&&(d("error",!0),a(),h(" ",s(2,2,"ONBOARDING.INDIVIDUAL_STEP.TERMS_ERROR_REQUIRED")," "))}function wo(){return t=>{let o=t.get("fullName")?.value?.trim()??"";if(!o)return null;let r;try{r=Se.fromFullName(o)}catch{return null}let e=r.firstName,i=r.lastName,n={},p=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return e&&i&&e===i&&(n.namesEqual=!0),e&&p.test(e)&&(n.firstNameEmail=!0),i&&p.test(i)&&(n.lastNameEmail=!0),Object.keys(n).length?n:null}}var Ji=(()=>{let o=class o{constructor(){this.fb=_(Ue),this.host=_(Te),this.destroyRef=_(W),this.appContext=_(me),this.userService=_(Ye),this.toastService=_(Ze),this.translate=_(de),this.translationService=_(je),this.userRegisterAnalytics=_(st),this.onAction=D(),this.isMobile=C(!1),this.isLoading=I(!1),this.occupationOptions=I([]),this.platformOptions=I([]),this.form=this.fb.group({fullName:["",[N.required]],phone:["",[N.required]],occupation:["",[N.required]],platformType:["",[N.required]],agreeTerms:[!1,[N.requiredTrue]]},{validators:wo()}),this.footerPrimary=S(()=>{let e={label:this.translate.instant("ONBOARDING.INDIVIDUAL_STEP.ACCESS_BUTTON"),loading:this.isLoading()};return this.isMobile()?X(Q({},e),{fullWidth:!0}):e}),this.footerSecondary=S(()=>{let e={label:this.translate.instant("ONBOARDING.INDIVIDUAL_STEP.BACK_BUTTON"),disabled:this.isLoading()};return this.isMobile()?X(Q({},e),{fullWidth:!0}):e})}ngOnInit(){Ee({occupations:ke(this.translationService),platforms:Qe(this.translationService)}).pipe(U(this.destroyRef)).subscribe(e=>{let i=this.translationService.get("ONBOARDING.INDIVIDUAL_STEP.OCCUPATION_PLACEHOLDER"),n=this.translate.currentLang??this.translate.defaultLang??"en";this.occupationOptions.set(De(e.occupations,i,n)),this.platformOptions.set(this.recordToSelectOptions(e.platforms,i))})}onAccessClick(){return L(this,null,function*(){if(_i(this.form),this.form.updateValueAndValidity(),this.form.invali
2d){queueMicrotask(()=>this.scrollToFirstInvalid());return}let e=this.appContext.getUserCredential()?.userId;if(!e){this.showApiErrorToast();return}this.isLoading.set(!0);try{let i=this.form.get("fullName")?.value?.trim()??"",n=Se.fromFullName(i),p=this.form.get("occupation")?.value,O=qe.create({type:this.form.get("platformType")?.value}),k=We.fromBrazil(this.form.get("phone")?.value);yield this.userService.completeUserProfile({key:He.fromString(e),name:n,occupations:[p],platformSource:O,phone:k});let P=this.appContext.getUserCredential()?.userVedius;P&&this.userRegisterAnalytics.onCompleteIndividualProfile(P.email),this.onAction.emit("ACCESS")}catch{this.showApiErrorToast()}finally{this.isLoading.set(!1)}})}onEscapePressed(){this.isLoading()||this.onBackClick()}onBackClick(){this.onAction.emit("BACK")}handleEnterKeyPress(e){this.isLoading()||Vi(e,()=>void this.onAccessClick())}showApiErrorToast(){this.toastService.error(this.translate.instant("ONBOARDING.INDIVIDUAL_STEP.API_ERROR_TITLE"),this.translate.instant("ONBOARDING.INDIVIDUAL_STEP.API_ERROR_MESSAGE"))}scrollToFirstInvalid(){ti(this.host)}recordToSelectOptions(e,i){return[{label:i,value:"",disabled:!0},...Object.keys(e).map(n=>({value:n,label:e[n]}))]}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=E({type:o,selectors:[["app-individual-profile-step"]],hostBindings:function(i,n){i&1&&x("keydown.escape",function(){return n.onEscapePressed()},!1,ht)("keydown.enter",function(O){return n.handleEnterKeyPress(O)},!1,ht)},inputs:{isMobile:[1,"isMobile"]},outputs:{onAction:"onAction"},decls:42,vars:60,consts:[["fullNameErrorTpl",""],["whatsappErrorTpl",""],["occupationErrorTpl",""],["platformSourceErrorTpl",""],["size","lg",3,"titleText","description","showClose"],[1,"individual-profile-step__content"],["novalidate","",1,"individual-profile-step__form",3,"formGroup"],["formControlName","fullName",3,"label","placeholder","errorTemplate"],["formControlName","phone",3,"label","placeholder","errorTemplate"],["formControlName","occupation",3,"label","placeholder","options","errorTemplate"],["formControlName","platformType",3,"label","placeholder","options","errorTemplate"],[1,"individual-profile-step__terms"],["formControlName","agreeTerms"],["variant","functional-md"],["vds-link","","size","sm","target","_blank","rel","noopener noreferrer",3,"routerLink"],[3,"error"],[3,"secondaryClick","primaryClick","orientation","primary","secondary","sticky"],["size","md",3,"active"]],template:function(i,n){if(i&1){let p=V();c(0,"vds-modal"),v(1,"vds-modal-header",4),l(2,"translate"),l(3,"translate"),c(4,"vds-modal-content",5)(5,"form",6),g(6,Po,2,1,"ng-template",null,0,y),v(8,"vds-full-name-input",7),l(9,"translate"),l(10,"translate"),v(11,"vds-phone-input",8),l(12,"translate"),l(13,"translate"),g(14,Ro,2,1,"ng-template",null,1,y),v(16,"vds-select",9),l(17,"translate"),l(18,"translate"),g(19,Mo,2,3,"ng-template",null,2,y),v(21,"vds-select",10),l(22,"translate"),l(23,"translate"),g(24,yo,2,3,"ng-template",null,3,y),c(26,"div",11),v(27,"vds-checkbox",12),c(28,"vds-text",13),f(29),l(30,"translate"),c(31,"a",14),f(32),l(33,"translate"),m(),f(34),l(35,"translate"),c(36,"a",14),f(37),l(38,"translate"),m()()(),g(39,Ao,3,4,"vds-hint",15),m()(),c(40,"vds-default-footer-actions-modal",16),x("secondaryClick",function(){return R(p),M(n.onBackClick())})("primaryClick",function(){return R(p),M(n.onAccessClick())}),m(),v(41,"vds-container-loading",17),m()}if(i&2){let p,O=T(7),k=T(15),P=T(20),w=T(25);a(),d("titleText",s(2,30,"ONBOARDING.INDIVIDUAL_STEP.TITLE"))("description",s(3,32,"ONBOARDING.INDIVIDUAL_STEP.DESCRIPTION"))("showClose",!1),a(4),d("formGroup",n.form),a(3),d("label",s(9,34,"ONBOARDING.INDIVIDUAL_STEP.FULL_NAME_LABEL"))("placeholder",s(10,36,"ONBOARDING.INDIVIDUAL_STEP.FULL_NAME_PLACEHOLDER"))("errorTemplate",O),a(3),d("label",s(12,38,"ONBOARDING.INDIVIDUAL_STEP.WHATSAPP_LABEL"))("placeholder",s(13,40,"ONBOARDING.INDIVIDUAL_STEP.WHATSAPP_PLACEHOLDER"))("errorTemplate",k),a(5),d("label",s(17,42,"ONBOARDING.INDIVIDUAL_STEP.OCCUPATION_LABEL"))("placeholder",s(18,44,"ONBOARDING.INDIVIDUAL_STEP.OCCUPATION_PLACEHOLDER"))("options",n.occupationOptions())("errorTemplate",P),a(5),d("label",s(22,46,"ONBOARDING.INDIVIDUAL_STEP.PLATFORM_SOURCE_LABEL"))("placeholder",s(23,48,"ONBOARDING.INDIVIDUAL_STEP.PLATFORM_SOURCE_PLACEHOLDER"))("options",n.platformOptions())("errorTemplate",w),a(8),h(" ",s(30,50,"ONBOARDING.INDIVIDUAL_STEP.TERMS_PREFIX"),""),a(2),d("routerLink",le(58,bo)),a(),B(s(33,52,"ONBOARDING.INDIVIDUAL_STEP.TERMS_LINK")),a(2),B(s(35,54,"ONBOARDING.INDIVIDUAL_STEP.TERMS_MI
2DDLE")),a(2),d("routerLink",le(59,Eo)),a(),B(s(38,56,"ONBOARDING.INDIVIDUAL_STEP.PRIVACY_LINK")),a(2),b((p=n.form.get("agreeTerms"))!=null&&p.invalid&&((p=n.form.get("agreeTerms"))!=null&&p.touched)?39:-1),a(),d("orientation","horizontal")("primary",n.footerPrimary())("secondary",n.footerSecondary())("sticky",!0),a(),d("active",n.isLoading())}},dependencies:[ce,Ve,pe,Be,Fe,ze,j,G,Le,et,rt,K,ot,at,it,lt,_e,ue,nt,fe,Je],styles:['@charset "UTF-8";[_ngcontent-%COMP%]:root{--001: #fefefe;--002: #f1f3f5}.theme-dark[_ngcontent-%COMP%]{--001: #16191e;--002: #22262e}[_ngcontent-%COMP%]:root{--elevation-low-bottom: 0 8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-above: 0 -8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-left: -8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-low-right: 8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-high-bottom: 0 12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-above: 0 -12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-left: -12px 0 40px 0 rgba(0, 0, 0, .12);--elevation-high-right: 12px 0 40px 0 rgba(0, 0, 0, .12)}[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;height:100%}.individual-profile-step__content[_ngcontent-%COMP%]{height:100%}.individual-profile-step__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 .75rem}@media (max-width: 37.49875em){.individual-profile-step__form[_ngcontent-%COMP%]{padding:0}}.individual-profile-step__terms[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;margin-top:.25rem}.individual-profile-step__terms[_ngcontent-%COMP%] vds-checkbox[_ngcontent-%COMP%]{flex-shrink:0}'],changeDetection:0});let t=o;return t})();var Lo=["*"],dt=(()=>{let o=class o{constructor(){this.ngControl=_(ii,{optional:!0,self:!0}),this.destroyRef=_(W),this.value=I(null),this.controlTick=I(0),this.isDisabledCva=I(!1),this.isError=S(()=>{this.controlTick();let e=this.ngControl?.control;return e?e.invalid&&(e.touched||e.dirty):!1}),this.onChange=()=>{},this.onTouched=()=>{},this.ngControl&&(this.ngControl.valueAccessor=this)}ngOnInit(){this.ngControl?.control?.events&&this.ngControl.control.events.pipe(U(this.destroyRef)).subscribe(()=>{this.controlTick.update(e=>e+1)})}writeValue(e){this.value.set(e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.isDisabledCva.set(e)}selectValue(e){this.isDisabledCva()||(this.value.set(e),this.onChange(e),this.onTouched())}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=E({type:o,selectors:[["vds-radio-card-group"]],hostAttrs:["role","radiogroup",1,"vds-radio-card-group"],ngContentSelectors:Lo,decls:1,vars:0,template:function(i,n){i&1&&(H(),F(0))},styles:['@charset "UTF-8";[_ngcontent-%COMP%]:root{--001: #fefefe;--002: #f1f3f5}.theme-dark[_ngcontent-%COMP%]{--001: #16191e;--002: #22262e}[_ngcontent-%COMP%]:root{--elevation-low-bottom: 0 8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-above: 0 -8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-left: -8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-low-right: 8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-high-bottom: 0 12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-above: 0 -12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-left: -12px 0 40px 0 rgba(0, 0, 0, .12);--elevation-high-right: 12px 0 40px 0 rgba(0, 0, 0, .12)}[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%}'],changeDetection:0});let t=o;return t})();var Do=["*"];function ko(t,o){if(t&1&&(c(0,"vds-text",3),f(1),m()),t&2){let r=u();a(),B(r.title())}}function Bo(t,o){if(t&1&&(c(0,"vds-text",4),f(1),m()),t&2){let r=u();a(),B(r.description())}}var en=(()=>{let o=class o{constructor(){this.group=_(dt),this.value=C.required(),this.title=C(),this.description=C(),this.isActive=S(()=>this.group.value()===this.value()),this.isError=S(()=>this.group.isError()),this.isDisabled=S(()=>this.group.isDisabledCva()),this.radioState=S(()=>this.isError()?"error":"default")}onCardClick(){this.isDisabled()||this.group.selectValue(this.value())}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=E({type:o,selectors:[["vds-radio-card"]],hostAttrs:["role","radio"],hostVars:2,hostBindings:function(i,n){i&1&&x("click",function(){return n.onCardClick()}),i&2&&Me("aria-checked",n.isActive())("aria-disabled",n.isDisabled())},inputs:{value:[1,"value"],title:[1,"title"],description:[1,"description"]},ngContentSelectors:Do,decls:9,vars:13,consts:[["variant","bordered"],[1,"vds-radio-card-content"],[1,"vds-radio-card-texts"],["variant","heading-sm","color","default"],["variant","body-md","color","muted",1,"vds-radio-card-desc"],[1,"vds-radio-wrapper"],[3,"selectionChange","value","checked","state","disabled","ariaLabel"]],template:function(i,n){i&1&&(H(),c(0,"vds-card",0)(1,"vds-card-content")(2,"div",1)(3,"div",2),g(4,ko,2,1,"vds-text",3)(5,Bo,2,1,"vds-text",4),F(6),m(),c(7,"div",5)(8,"vds-radio-button",6),x("selectionChange",function(){return n.onCardClick()}),m()()()()()),i&2&&(z("vds-radio-card--active",n.isActive())("vds-radio-card--error",n.isError())("vds-radio-card--disabled",n.isDisabled()),a(4),b(n.title()?4:-1),a(),b(n.description()?5:-1),a(3),d("value",n.value(
2))("checked",n.isActive())("state",n.radioState())("disabled",n.isDisabled())("ariaLabel",n.title()||"Radio option"))},dependencies:[Mi,yi,K,Ii],styles:['@charset "UTF-8";[_ngcontent-%COMP%]:root{--001: #fefefe;--002: #f1f3f5}.theme-dark[_ngcontent-%COMP%]{--001: #16191e;--002: #22262e}[_ngcontent-%COMP%]:root{--elevation-low-bottom: 0 8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-above: 0 -8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-left: -8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-low-right: 8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-high-bottom: 0 12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-above: 0 -12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-left: -12px 0 40px 0 rgba(0, 0, 0, .12);--elevation-high-right: 12px 0 40px 0 rgba(0, 0, 0, .12)}[_nghost-%COMP%]{display:block;width:100%;cursor:pointer;outline:none}[aria-disabled=true][_nghost-%COMP%]{cursor:not-allowed;opacity:.6;pointer-events:none}vds-card[_ngcontent-%COMP%]{transition:all .2s ease-in-out;border:1px solid var(--card-high-border-default-rest, #e5e7eb);box-sizing:border-box}vds-card.vds-radio-card--active[_ngcontent-%COMP%]{border-radius:var(--400, 12px);border:2px solid var(--card-high-border-default-active, #0f7888)}vds-card.vds-radio-card--error[_ngcontent-%COMP%]{border-radius:var(--400, 12px);border:2px solid;border-color:#f44}vds-card.vds-radio-card--error.theme-dark[_ngcontent-%COMP%], .theme-dark[_nghost-%COMP%] vds-card.vds-radio-card--error[_ngcontent-%COMP%], .theme-dark [_nghost-%COMP%] vds-card.vds-radio-card--error[_ngcontent-%COMP%], .theme-dark[_ngcontent-%COMP%] vds-card.vds-radio-card--error[_ngcontent-%COMP%]{border-color:#ff8787}.vds-radio-card-content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%}.vds-radio-card-texts[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;flex:1}.vds-radio-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}'],changeDetection:0});let t=o;return t})();var Vo=(t,o)=>o.value;function Fo(t,o){if(t&1&&v(0,"vds-radio-card",3),t&2){let r=o.$implicit;d("value",r.value)("title",r.label)("description",r.description)}}var tn=(()=>{let o=class o{constructor(){this.translate=_(de),this.selectedRole=C(null),this.roleOptions=C([]),this.cancelSelection=D(),this.confirm=D(),this.roleControl=new ni("",{nonNullable:!0}),this.selectedRoleTick=q(this.roleControl.valueChanges,{initialValue:this.roleControl.value}),this.selectableRoleOptions=S(()=>this.roleOptions().filter(e=>e.value!=="")),this.primaryButton=S(()=>(this.selectedRoleTick(),{label:this.translate.instant("ONBOARDING.CLINIC_STEP.STEP_4.SELECT_BUTTON"),disabled:!this.roleControl.value})),se(()=>{let e=this.selectedRole();this.roleControl.setValue(e??"",{emitEvent:!1})})}onConfirm(){let e=this.roleControl.value;e&&this.confirm.emit(e)}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=E({type:o,selectors:[["app-mobile-role-selection"]],inputs:{selectedRole:[1,"selectedRole"],roleOptions:[1,"roleOptions"]},outputs:{cancelSelection:"cancelSelection",confirm:"confirm"},decls:8,vars:8,consts:[[3,"closeClick","titleText","showClose","autoClose"],[1,"mobile-role-selection__content"],[3,"formControl"],[3,"value","title","description"],[3,"primaryClick","primary","sticky"]],template:function(i,n){i&1&&(c(0,"vds-modal")(1,"vds-modal-header",0),l(2,"translate"),x("closeClick",function(){return n.cancelSelection.emit()}),m(),c(3,"vds-modal-content",1)(4,"vds-radio-card-group",2),ie(5,Fo,1,3,"vds-radio-card",3,Vo),m()(),c(7,"vds-default-footer-actions-modal",4),x("primaryClick",function(){return n.onConfirm()}),m()()),i&2&&(a(),d("titleText",s(2,6,"ONBOARDING.CLINIC_STEP.STEP_4.ROLE_LABEL"))("showClose",!0)("autoClose",!1),a(3),d("formControl",n.roleControl),a(),ne(n.selectableRoleOptions()),a(2),d("primary",n.primaryButton())("sticky",!0))},dependencies:[j,G,ce,pe,oi,_e,fe,ue,nt,dt,en],styles:['@charset "UTF-8";[_ngcontent-%COMP%]:root{--001: #fefefe;--002: #f1f3f5}.theme-dark[_ngcontent-%COMP%]{--001: #16191e;--002: #22262e}[_ngcontent-%COMP%]:root{--elevation-low-bottom: 0 8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-above: 0 -8px 12px 0 rgba(0, 0, 0, .08);--elevation-low-left: -8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-low-right: 8px 0 12px 0 rgba(0, 0, 0, .08);--elevation-high-bottom: 0 12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-above: 0 -12px 40px 0 rgba(0, 0, 0, .12);--elevation-high-left: -12px 0 40px 0 rgba(0, 0, 0, .12);--elevation-high-right: 12px 0 40px 0 rgba(0, 0, 0, .12)}[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0}.mobile-role-selection__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}'],changeDetection:0});let t=o;return t})();function zo(t,o){if(t&1){let r=V();
2c(0,"app-choose-work-style-step",2),x("stepChange",function(i){R(r);let n=u();return M(n.onStepChange(i))}),m()}}function Uo(t,o){if(t&1){let r=V();c(0,"app-individual-profile-step",3),x("onAction",function(i){R(r);let n=u();return M(n.onIndividualProfileAction(i))}),m()}if(t&2){let r=u();d("isMobile",r.isMobile())}}function Go(t,o){if(t&1){let r=V();c(0,"app-clinic-profile-step",4,0),x("onAction",function(i){R(r);let n=u();return M(n.onClinicProfileAction(i))})("requestMobileRoleSelection",function(i){R(r);let n=u();return M(n.onClinicRequestMobileRoleSelection(i))}),m(),c(2,"app-mobile-role-selection",5),x("cancelSelection",function(){R(r);let i=u();return M(i.onMobileRoleSelectionCancel())})("confirm",function(i){R(r);let n=T(1),p=u();return M(p.onMobileRoleSelectionConfirm(i,n))}),m()}if(t&2){let r=T(1),e=u();z("d-none",e.isRoleSelectionActive()),d("isMobile",e.isMobile()),a(2),z("d-none",!e.isRoleSelectionActive()),d("selectedRole",e.pendingRoleValue())("roleOptions",r.roleOptions())}}var nn=(()=>{let o=class o{constructor(){this.modalRef=_(bi,{optional:!0}),this.breakpointObserver=_(Ge),this.isMobile=q(this.breakpointObserver.observe(Ct).pipe(ee(e=>e.matches)),{initialValue:this.breakpointObserver.isMatched(Ct)}),this.currentStep=I("CHOOSE"),this.isRoleSelectionActive=I(!1),this.pendingRoleValue=I("")}onStepChange(e){this.closeMobileRoleSelection(),e==="INDIVIDUAL"?this.currentStep.set("INDIVIDUAL"):e==="CLINIC"&&this.currentStep.set("CLINIC")}onClinicProfileAction(e){e==="BACK"?(this.closeMobileRoleSelection(),this.currentStep.set("CHOOSE")):e==="ACCESS"&&(this.closeMobileRoleSelection(),this.modalRef?.close())}onIndividualProfileAction(e){e==="BACK"?this.currentStep.set("CHOOSE"):e==="ACCESS"&&this.modalRef?.close()}onClinicRequestMobileRoleSelection(e){this.pendingRoleValue.set(e),this.isRoleSelectionActive.set(!0)}onMobileRoleSelectionCancel(){this.closeMobileRoleSelection()}onMobileRoleSelectionConfirm(e,i){i.applyInviteRoleSelection(e),this.closeMobileRoleSelection()}closeMobileRoleSelection(){this.isRoleSelectionActive.set(!1),this.pendingRoleValue.set("")}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=E({type:o,selectors:[["app-onboarding-flow-modal"]],decls:3,vars:1,consts:[["clinicStep",""],[3,"isMobile"],[3,"stepChange"],[3,"onAction","isMobile"],[3,"onAction","requestMobileRoleSelection","isMobile"],[3,"cancelSelection","confirm","selectedRole","roleOptions"]],template:function(i,n){if(i&1&&g(0,zo,1,0,"app-choose-work-style-step")(1,Uo,1,1,"app-individual-profile-step",1)(2,Go,3,7),i&2){let p;b((p=n.currentStep())==="CHOOSE"?0:p==="INDIVIDUAL"?1:p==="CLINIC"?2:-1)}},dependencies:[Wi,Xi,Ji,tn],styles:[".d-none[_ngcontent-%COMP%]{display:none!important}"],changeDetection:0});let t=o;return t})();var jo=2500,Wo="profile-onboarding",on=(()=>{let o=class o{constructor(){this.modalService=_(Ei),this.profileOnboarding=_(xi),this.destroyRef=_(W),this.currentModalRef=null,this.hasOpenedOnce=!1,se(e=>{let i=this.profileOnboarding.isProfileIncomplete();Qt(()=>{i?this.openModalIfNeeded():this.currentModalRef&&(this.clearPendingOpen(),this.currentModalRef.close(),this.currentModalRef=null)}),e(()=>{this.clearPendingOpen()})})}openModalIfNeeded(){if(this.currentModalRef||this.pendingOpenTimeoutId!==void 0||!this.profileOnboarding.isProfileIncomplete())return;let e=this.hasOpenedOnce?0:jo;this.pendingOpenTimeoutId=setTimeout(()=>{this.pendingOpenTimeoutId=void 0,!(!this.profileOnboarding.isProfileIncomplete()||this.currentModalRef)&&(this.hasOpenedOnce=!0,this.currentModalRef=this.modalService.open(nn,{disableClose:!0,closeOnNavigation:!1,modalId:Wo,width:"800px"}),this.currentModalRef.afterClosed().pipe(U(this.destroyRef)).subscribe(()=>{this.currentModalRef=null,this.openModalIfNeeded()}))},e)}clearPendingOpen(){this.pendingOpenTimeoutId!==void 0&&(clearTimeout(this.pendingOpenTimeoutId),this.pendingOpenTimeoutId=void 0)}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=E({type:o,selectors:[["app-onboarding-wizard"]],decls:0,vars:0,template:function(i,n){},encapsulation:2,changeDetection:0});let t=o;return t})();var Ho=5e3,Ep=(()=>{let o=class o{constructor(){this.platformId=_(Ne),this.destroyRef=_(W),this.injector=_(te),this.authService=_(Xe),this.appContext=_(me),this.dialog=_(di),this.title="vedius-platform",this.isOnline=!0,this.networkMonitoringStartedAt=0,this.handleStorageEventBound=e=>{this.handleStorageEvent(e)}}get appVersionUpdateService(){return this.injector.get(Gi)}ngOnInit(){if(!we(this.platformId))return;let e=()=>{this.networkMonitoringStartedAt=Date.now(),this.appVersionUpdateService.start();let i=this.injector.get(pt);i.isOnline$.pipe(U(this.destroyRef),$(n=>{let p=this.isOnline!==n;return this.isOnline=n,n||!p?_t:Date.now()-this.networkMonitoringStartedAt<Ho?_t:i.checkOnlineStatusAfterDelay()}),Rt(n=>!n)).subscribe(()=>{this.dialog.openDialogs.length===0&&this.openModal(Ui)})};Fi(window.location.pathname)?"requestIdleCallback"in window?window.requestIdleCallback(e,{timeout:1e4}):setTimeout(e,2e3):e(),window.addEventListener("storage",this.handleStorageEventBound),this.destroyRef.onDestroy(()=>{window.removeEventListener("storage",this.handleStorageEventBound),this.storageEventTimeout&&clearTimeout(this.storageEventTimeout),this.appVersionUpdateService.stop()})}handleStorageEvent(e){return L(this,null,function*(){e.key===ci&&(this.storageEventTimeout&&clearTimeout(this.storageEventTimeout),this.storageEventTimeout=setTimeout(()=>L(this,null,function*(){try{if(yield this.authService.isAuthenticated()){let n=this.appContext.getUserCredentialStorage();(!n||!n.userVedius)&&(console.log("User context removed from localStorage. Logging out..."),yield this.authService.logout())}}catch(i){console.error("Error handling storage event:",i)}}),500))})}openModal(e,i=!0){return this.dialog.open(e,{width:"605px",disableClose:i})}};o.\u0275fac=function(i){return new(i||o)}
2,o.\u0275cmp=E({type:o,selectors:[["app-root"]],decls:2,vars:0,template:function(i,n){i&1&&v(0,"router-outlet")(1,"app-onboarding-wizard")},dependencies:[Xt,on],encapsulation:2});let t=o;return t})();export{Fi as a,Ep 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.