1import{S as Mn,X as On,Y as $i,j as Yt,t as Zi,x as re}from"./chunk-ZAI73KCM.js";import{a as Qt}from"./chunk-4LMFJ3RQ.js";import{a as Ni,b as vn,c as Pn,d as x,e as R,f as zi,g as Ui,h as ji,i as Wi,j as qi,k as Yi,l as Qi,m as Hi,n as Gi,o as We}from"./chunk-JBQ3SQYQ.js";import{a as Ki}from"./chunk-RXSTUEU6.js";import{A as Li,B as ae,b as G,f as Se,g as ke,i as Bi,j as Vi,s as hn,t as Ri,w as qt}from"./chunk-IELZJEER.js";import{$ as vt,A as Ce,Ab as Pi,Ad as $e,Ae as Ii,Bb as In,C as ti,Dc as yi,E as ie,Ec as xi,Ed as fn,F as Nt,Fc as Ee,Gc as D,H as _t,Jc as It,K as oe,Ke as Ai,L as zt,Lb as jt,Lc as Wt,Ld as Si,M as ni,Md as Ke,Me as Ei,N as ii,Nc as Me,Pb as Mi,Pd as wi,Qb as Ne,Qc as bi,Rb as Mt,Rc as gn,Rd as je,Sb as sn,Sc as j,T as ut,Tb as S,Tc as Ue,U as Ct,Ub as Ot,Uc as _n,V as ft,Vb as Oi,W as oi,We as Di,X as ai,Y as ht,Yb as ki,Z as an,af as Fi,bb as pi,bd as un,d as mt,db as di,e as me,eb as mi,ee as Ti,f as T,fb as gi,ga as fe,gb as _i,gd as Cn,ha as ri,hb as ui,i as Le,j as Rt,ja as De,k as Lt,ka as Pt,kb as Ut,l as Ge,ma as ci,n as ei,nb as Ze,oc as kt,pc as ln,qc as pn,rb as Ci,rc as ze,sb as fi,tb as hi,tc as dn,ua as rn,wa as si,wb as vi,x as gt,xc as mn,xd as Pe,ya as li,yb as cn,z as on,zd as A}from"./chunk-G7JQUX5M.js";import{$b as be,$c as d,Ab as Yn,Bb as Qn,Cb as Be,Cc as Ve,D as ye,Da as lt,Db as Hn,Dc as Re,Ea as jn,Ec as Ft,F as xe,Fc as y,Ga as Wn,Gb as o,H as st,Ia as ce,J as ge,Ja as tn,Kc as M,Lb as wt,Ld as dt,Mc as g,Nc as Kn,O as he,Oc as Xe,P as Fn,Pa as h,Qa as v,Qc as le,Rb as _,Rc as pe,Sc as de,Tb as Gn,U as Ae,V as Bn,Wc as U,X as Vn,Xb as b,Xc as ve,Yb as Zn,Yc as E,Zc as nn,_ as _e,a as $t,ad as P,ba as Rn,bc as f,bd as u,cd as He,da as Jt,db as qn,dd as Xn,ed as Bt,fd as F,gb as pt,gd as B,ha as en,hd as V,ia as Ln,ka as Nn,ld as Vt,nc as $n,nd as Jn,oc as H,p as Dn,pc as ee,pd as z,qc as te,qd as W,rc as At,rd as Z,sa as zn,ta as Un,tc as Et,td as p,ua as L,uc as Dt,ud as m,vc as l,vd as ne,wc as s,xa as Q,xc as c,xd as Tt,yc as k,yd as ue,z as Ie}from"./chunk-GRSQHQHU.js";st();var bo=(e,a)=>({"color-grey":e,"color-text":a});function So(e,a){e&1&&(s(0,"div",23),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"Please complete this field")," "))}function wo(e,a){if(e&1&&(s(0,"div",24),d(1," \xA0 "),c()),e&2){let t=g(2);E("error",t.representativeDetailsError&&!t.representativeDetails.relationship)}}function To(e,a){if(e&1&&(s(0,"option",25),p(1,"translate"),d(2),p(3,"translate"),c()),e&2){let t=a.$implicit;l("ngValue",m(1,2,t.title)),o(2),u(" ",m(3,4,t.title)," ")}}function Io(e,a){e&1&&(s(0,"div",23),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"Please complete this field")," "))}function Ao(e,a){if(e&1){let t=y();s(0,"div",15)(1,"div",16)(2,"label")(3,"span"),d(4),p(5,"translate"),c(),s(6,"input",17),V("ngModelChange",function(i){h(t);let r=g();return B(r.representativeDetails.name,i)||(r.representativeDetails.name=i),v(i)}),c(),f(7,So,3,3,"div",13),c()(),s(8,"div",18),f(9,wo,2,2,"div",19),p(10,"async"),s(11,"label")(12,"span"),d(13),p(14,"translate"),c(),s(15,"select",20),V("ngModelChange",function(i){h(t);let r=g();return B(r.representativeDetails.relationship,i)||(r.representativeDetails.relationship=i),v(i)}),s(16,"option",21),d(17),p(18,"translate"),c(),f(19,To,4,6,"option",22),p(20,"async"),c(),f(21,Io,3,3,"div",13),c()()()}if(e&2){let t=g();o(2),E("error",t.representativeDetailsError&&!t.representativeDetails.name),o(2),P(m(5,14,"Name")),o(2),F("ngModel",t.representativeDetails.name),o(),l("ngIf",t.representativeDetailsError&&!t.representativeDetails.name),o(2),l("ngIf",!t.representativeDetails.relationship&&m(10,16,t.isIOSPlatform$)),o(2),E("error",t.representativeDetailsError&&!t.representativeDetails.relationship),o(2),P(m(14,18,"Relationship to patient")),o(2),F("ngModel",t.representativeDetails.relationship),l("ngClass",Z(24,bo,!t.representativeDetails.relationship,t.representativeDetails.relationship)),o(2),u(" ",m(18,20,"Select ")," "),o(2),l("ngForOf",m(20,22,t.representativeRelationshipList$)),o(2),l("ngIf",t.representativeDetailsError&&!t.representativeDetails.relationship
1)}}function Eo(e,a){e&1&&(s(0,"div",23),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"You must agree to our Terms & Conditions before continuing")," "))}var Je,Xi=(Je=class{constructor(a,t,n){this.infoApiService=a,this.errorService=t,this.deviceService=n,this.title="",this.signDocument=new wt,this.isIOSPlatform$=this.deviceService.isIOSPlatform(),this.signatureImage="",this.termError=!1,this.signatureError=!1,this.representativeDetailsError=!1,this.termAgree=!1,this.representativeRelationshipList$=this.infoApiService.getRepresentativeRelationshipList(),this.signer="self",this.isSubmitButtonDisabled=!1,this.representativeDetails={name:"",relationship:null}}ngOnInit(){this.errorService.activeError.pipe(_e(Boolean),ke(this)).subscribe(()=>this.isSubmitButtonDisabled=!1)}onSignatureUpdate(a){this.signatureImage=a.toDataURL()}onSignatureClear(){this.signatureImage=""}completeSignature(){this.termError=!1,this.signatureError=!1,this.representativeDetailsError=this.signer==="representative"&&!(this.representativeDetails.name&&this.representativeDetails.relationship),this.signatureImage&&this.termAgree&&!this.representativeDetailsError&&(this.isSubmitButtonDisabled=!0,this.representativeDetailsError=!1,this.signDocument.emit($t({signature:this.signatureImage},this.representativeDetails?.name?{representative:this.representativeDetails}:null))),this.termAgree||(this.termError=!0),this.signatureImage||(this.signatureError=!0)}},Je.\u0275fac=function(t){return new(t||Je)(_(Ne),_($e),_(Pe))},Je.\u0275cmp=b({type:Je,selectors:[["app-document-sign"]],inputs:{title:"title"},outputs:{signDocument:"signDocument"},standalone:!1,decls:29,vars:21,consts:[[1,"signature-create"],[1,"title"],[1,"signature-wrapper"],[3,"update","clear"],[1,"representative-area"],[1,"sign-person"],["type","radio","name","signer","value","self",3,"ngModelChange","ngModel"],[1,"mark"],[1,"label"],["type","radio","name","signer","value","representative",3,"ngModelChange","ngModel"],["class","representative-additional",4,"ngIf"],[1,"sign-terms"],[3,"ngModelChange","ngModel"],["class","error error-message","role","alert","aria-atomic","true",4,"ngIf"],["libButton","","type","button",1,"sign-button",3,"click","disabled"],[1,"representative-additional"],[1,"representative-name"],["type","text","required","",3,"ngModelChange","ngModel"],[1,"relationship-wrapper"],["class","relationship-placeholder",3,"error",4,"ngIf"],["name","relationship","id","relationship","required","",3,"ngModelChange","ngModel","ngClass"],["value",""],[3,"ngValue",4,"ngFor","ngForOf"],["role","alert","aria-atomic","true",1,"error","error-message"],[1,"relationship-placeholder"],[3,"ngValue"]],template:function(t,n){t&1&&(s(0,"div",0)(1,"h1",1),d(2),c(),s(3,"div",2)(4,"app-signature-input",3),M("update",function(r){return n.onSignatureUpdate(r)})("clear",function(){return n.onSignatureClear()}),c(),s(5,"fieldset",4)(6,"legend"),d(7),p(8,"translate"),c(),s(9,"div",5)(10,"label")(11,"input",6),V("ngModelChange",function(r){return B(n.signer,r)||(n.signer=r),r}),c(),k(12,"span",7),s(13,"strong",8),d(14),p(15,"translate"),c()(),s(16,"label")(17,"input",9),V("ngModelChange",function(r){return B(n.signer,r)||(n.signer=r),r}),c(),k(18,"span",7),s(19,"strong",8),d(20),p(21,"translate"),c()()(),f(22,Ao,22,27,"div",10),c()(),s(23,"div",11)(24,"lib-terms-checkbox",12),V("ngModelChange",function(r){return B(n.termAgree,r)||(n.termAgree=r),r}),c(),f(25,Eo,3,3,"div",13),c(),s(26,"button",14),M("click",function(){return n.completeSignature()}),d(27),p(28,"translate"),c()()),t&2&&(o(2),P(n.title),o(2),E("error",n.signatureError),o(3),P(m(8,13,"Who is signing the document?")),o(4),F("ngModel",n.signer),o(3),P(m(15,15,"Self")),o(3),F("ngModel",n.signer),o(3),P(m(21,17,"Patient Representative")),o(2),l("ngIf",n.signer==="representative"),o(2),F("ngModel",n.termAgree),o(),l("ngIf",n.termError),o(),l("disabled",n.isSubmitButtonDisabled),o(),u(" ",m(28,19,"SUBMIT")," "))},dependencies:[On,Ct,ft,Ce,ut,ii,ie,ht,oe,mt,me,T,Yt,G,S,Lt],styles:['.check-in-flow[_nghost-%COMP%] .signature-create[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .check-in-flow [_nghost-%COMP%] .signature-create[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-top:1.25rem!important}[_nghost-%COMP%]{width:100%;display:block;background:#80808014;min-height:100vh;padding:0 1rem 3.4rem;box-sizing:border-box;height:fit-content}.signature-create[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#064060;text-align:center;font-family:Roboto-bold,sans-serif;margin-top:1.5rem;padding-bottom:1.5rem;font-size:1.125rem;line-height:1.5rem}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%]{background-color:#fff;border-radius:8px;flex-direction:column;box-sizing:border-box;width:100%;padding:1.5rem 1rem}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%]{display:flex;gap:2rem;flex-direction:column;padding:1rem 0}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .sign-person[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .sign-person[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-direction:row;align-items:center;justify-content:flex-start}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .sign-person[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .sign-person[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{position:absolute;height:1.2rem;width:1.2rem;background-color:#fff;border:1px solid #949494;border-radius:50%;display:flex;align-items:center;justify-content:center}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .sign-person[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{margin-left:1.8rem;white-space:nowrap}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .sign-person[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%], .signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .sign-person[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio].chosen[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]{background-color:var(--branding-primary-color);border-color:var(--branding-primary-color)}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .sign-person[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{content:"";display:none}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .sign-person[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%]:after, .signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .sign-person[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=radio].chosen[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]:after{display:block}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .sign-person[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{position:absolute;width:.5rem;height:.5rem;border-radius:50%;background:#fff}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .sign-person[_ngcontent-%COMP%] label[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{white-space:normal}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:.75rem;line-height:1.5rem}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] label.error[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#de000d}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] label.error[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] label.error[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{border-color:#de000d}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;width:100%;appearance:none;min-height:2rem;line-height:initial;color:#505050;border:1px solid #949494;border-radius:8px;box-sizing:border-box;line-height:1.19rem;font-size:1rem}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%]{border-color:#505050}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] .relationship-wrapper[_ngcontent-%COMP%]{position:relative}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] .relationship-wrapper[_ngcontent-%COMP%] .relationship-placeholder[_ngcontent-%COMP%], .signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] .relationship-wrapper[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{appearance:none;width:100%;padding:.5rem;background-color:#fff;border:1px solid #949494;border-radius:8px;box-sizing:border-box;line-height:1.19rem;font-size:1rem;color:#505050}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] .relationship-wrapper[_ngcontent-%COMP%] .relationship-placeholder.ng-dirty[_ngcontent-%COMP%], .signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] .relationship-wrapper[_ngcontent-%COMP%] select.ng-dirty[_ngcontent-%COMP%]{border-color:#505050}.signature-create[_ngcontent-%COMP%] .signature-wrapper[_ngcontent-%COMP%] .representative-area[_ngcontent-%COMP%] .representative-additional[_ngcontent-%COMP%] .relationship-wrapper[_ngcontent-%COMP%] .relationship-placeholder[_ngcontent-%COMP%]{position:absolute;pointer-events:none;top:1.5rem}.signature-create[_ngcontent-%COMP%] .sign-terms[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:2rem 0}.signature-create[_ngcontent-%COMP%] .sign-button[_ngcontent-%COMP%]{width:auto;padding:.75rem 2.5rem;min-width:240px;margin:auto}.signature-create[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{color:#de000d!important;border-color:#de000d!important}.signature-create[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{font-size:.75rem;padding-top:.3rem}@media(min-width:700px){[_nghost-%COMP%]{padding:0 2.5rem 3.4rem}.signature-wrapper[_ngcontent-%COMP%]{padding:2.1rem 2.5rem!important}.representative-additional[_ngcontent-%COMP%]{flex-direction:row!important;justify-content:space-between}.representative-additional[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1}}']}),Je);Xi=ye([Se(),xe("design:paramtypes",[Ne,$e,Pe])],Xi);st();st();st();var Ji=new Wn("VIDEO_REDIRECT");var eo=["*","*","*","*","*","*","*","*"],Do=(e,a)=>({name:e,color:a}),Fo=e=>({name:"video",color:e});function Bo(e,a){if(e&1&&k(0,"lib-svg-icon",9),e&2){let t=g(2);l("params",Z(1,Do,t.iconParams.name,t.iconParams.color))}}function Vo(e,a){if(e&1&&k(0,"lib-svg-icon",9),e&2){let t=g(2);l("params",W(1,Fo,t.appointment.type==="video_call"?"#064060":"#A7A7A7"))}}function Ro(e,a){if(e&1&&(s(0,"span",10),d(1),p(2,"translate"),c()),e&2){let t=g(2);o(),P(m(2,1,t.videoCallText))}}function Lo(e,a){if(e&1&&(s(0,"span",6),f(1,Bo,1,4,"lib-svg-icon",7)(2,Vo,1,3,"ng-template",null,1,ue),c(),f(4,Ro,3,3,"span",8)),e&2){let t=U(3),n=g();o(),l("ngIf",n.iconParams)("ngIfElse",t),o(3),l("ngIf",n.videoCallText)}}function No(e,a){e&1&&Xe(0,0,["*ngTemplateOutlet","videoCallLinkContent"])}function zo(e,a){if(e&1){let t=y();s(0,"button",15),p(1,"translate"),p(2,"translate"),M("click",function(){h(t);let i=g(2);return v(i.convertAppointmentToVideoCall())}),f(3,No,1,0,"ng-content",16),c()}if(e&2){g(2);let t=U(1);l("matTooltip",m(1,3,"Convert Office Visit to Telehealth")),H("aria-label",m(2,5,"Convert Office Visit to Telehealth")),o(3),l("ngTemplateOutlet",t)}}function Uo(e,a){e&1&&Xe(0,1,["*ngTemplateOutlet","videoCallLinkContent"])}function jo(e,a){if(e&1){let t=y();s(0,"button",15),p(1,"translate"),p(2,"translate"),M("click",function(){h(t);let i=g(4);return v(i.starVideoCallForIOSApp())}),f(3,Uo,1,0,"ng-content",16),c()}if(e&2){g(4);let t=U(1);l("matTooltip",m(1,3,"Start Telehealth Call")),H("aria-label",m(2,5,"Start Telehealth Call")),o(3),l("ngTemplateOutlet",t)}}function Wo(e,a){e&1&&Xe(0,2,["*ngTemplateOutlet","videoCallLinkContent"])}function qo(e,a){if(e&1&&(s(0,"a",18),p(1,"translate"),p(2,"translate"),f(3,Wo,1,0,"ng-content",16),c()),e&2){let t=g(2).ngIf,n=g(3),i=U(1);l("href",t,Be)("matTooltip",m(1,5,"Start Telehealth Call"))("target",n.isRolePatient||n.externalUrl?"_blank":"_self"),H("aria-label",m(2,7,"Start Telehealth Call")),o(3),l("ngTemplateOutlet",i)}}function Yo(e,a){e&1&&Xe(0,3,["
1*ngTemplateOutlet","videoCallLinkContent"])}function Qo(e,a){if(e&1&&(s(0,"a",20),p(1,"translate"),p(2,"translate"),f(3,Yo,1,0,"ng-content",16),c()),e&2){let t=g(3).ngIf;g(3);let n=U(1);l("href","#"+t,Be)("matTooltip",m(1,4,"Start Telehealth Call")),H("aria-label",m(2,6,"Start Telehealth Call")),o(3),l("ngTemplateOutlet",n)}}function Ho(e,a){e&1&&Xe(0,4,["*ngTemplateOutlet","videoCallLinkContent"])}function Go(e,a){if(e&1&&(s(0,"a",21),p(1,"translate"),p(2,"translate"),f(3,Ho,1,0,"ng-content",16),c()),e&2){let t=g(3).ngIf;g(3);let n=U(1);l("matTooltip",m(1,4,"Start Telehealth Call"))("routerLink",t),H("aria-label",m(2,6,"Start Telehealth Call")),o(3),l("ngTemplateOutlet",n)}}function Zo(e,a){if(e&1&&f(0,Qo,4,8,"a",19)(1,Go,4,8,"ng-template",null,3,ue),e&2){let t=U(2),n=g(5);l("ngIf",n.isQuicklinkApp||n.isPortalMobileApp)("ngIfElse",t)}}function $o(e,a){if(e&1&&(Ve(0),f(1,qo,4,9,"a",17)(2,Zo,3,2,"ng-template",null,2,ue),Re()),e&2){let t=U(3),n=g(4);o(),l("ngIf",!n.appointment.hasNewVideoLayout||n.externalUrl)("ngIfElse",t)}}function Ko(e,a){e&1&&Xe(0,5,["*ngTemplateOutlet","videoCallLinkContent"])}function Xo(e,a){if(e&1){let t=y();s(0,"button",15),p(1,"translate"),p(2,"translate"),M("click",function(){h(t);let i=g(6);return v(i.starVideoCallForProviderAndroidApp())}),f(3,Ko,1,0,"ng-content",16),c()}if(e&2){g(6);let t=U(1);l("matTooltip",m(1,3,"Start Telehealth Call")),H("aria-label",m(2,5,"Start Telehealth Call")),o(3),l("ngTemplateOutlet",t)}}function Jo(e,a){e&1&&Xe(0,6,["*ngTemplateOutlet","videoCallLinkContent"])}function ea(e,a){if(e&1){let t=y();s(0,"button",15),p(1,"translate"),p(2,"translate"),M("click",function(){h(t);let i=g(6);return v(i.starVideoCallForPatientAndroidApp())}),f(3,Jo,1,0,"ng-content",16),c()}if(e&2){g(6);let t=U(1);l("matTooltip",m(1,3,"Start Telehealth Call")),H("aria-label",m(2,5,"Start Telehealth Call")),o(3),l("ngTemplateOutlet",t)}}function ta(e,a){if(e&1&&(Ve(0),ee(1,Xo,4,7,"button",23)(2,ea,4,7,"button",23),Re()),e&2){let t=g(5);o(),te(t.mobileConfig.type===t.AppTypeEnum.CARE_MANAGER?1:2)}}function na(e,a){e&1&&Xe(0,7,["*ngTemplateOutlet","videoCallLinkContent"])}function ia(e,a){if(e&1&&(s(0,"a",20),p(1,"translate"),p(2,"translate"),f(3,na,1,0,"ng-content",16),c()),e&2){let t=g(2).ngIf;g(3);let n=U(1);l("href",t,Be)("matTooltip",m(1,4,"Start Telehealth Call")),H("aria-label",m(2,6,"Start Telehealth Call")),o(3),l("ngTemplateOutlet",n)}}function oa(e,a){if(e&1&&(Ve(0),f(1,ta,3,1,"ng-container",22)(2,ia,4,8,"ng-template",null,4,ue),Re()),e&2){let t=U(3),n=g(4);o(),l("ngIf",n.appointment.hasNewVideoLayout)("ngIfElse",t)}}function aa(e,a){if(e&1&&(Ve(0),f(1,jo,4,7,"button",13)(2,$o,4,2,"ng-container",14)(3,oa,4,2,"ng-container",14),Re()),e&2){let t=g().ngIf,n=g(2);o(),l("ngIf",t===n.DevicePlatformEnum.iOS),o(),l("ngIf",t===n.DevicePlatformEnum.Browser),o(),l("ngIf",t===n.DevicePlatformEnum.Android)}}function ra(e,a){if(e&1&&(Ve(0),f(1,aa,4,3,"ng-container",14),p(2,"async"),Re()),e&2){let t=g(2);o(),l("ngIf",m(2,1,t.videoCallLink$))}}function ca(e,a){if(e&1&&(s(0,"div",11)(1,"div",12),f(2,zo,4,7,"button",13)(3,ra,3,3,"ng-container",14),p(4,"async"),c()()),e&2){let t,n=g();o(2),l("ngIf",n.appointment.type!=="video_call"&&n.isConvertRequired),o(),l("ngIf",n.appointment.type==="video_call"&&(!n.isRolePatient||n.appointment.allowVideoCall)&&((t=m(4,2,n.device$))==null?null:t.platform))}}var et,Ht=(et=class{constructor(a,t,n,i,r,C,O,w,I){this.elementRef=a,this.deviceService=t,this.modalWindowService=n,this.appointmentApiService=i,this.oauth2AuthCodeService=r,this.healthcareLinkPipe=C,this.professionalLinkPipe=O,this.redirectService=w,this.configService=I,this.convert=new wt,this.device$=this.deviceService.getDevice(),this.DevicePlatformEnum=Pi,this.externalUrl=null,this.isPortalMobileApp=this.configService.isPortalMobileApp(),this.isQuicklinkApp=this.configService.isQuicklinkApp(),this.AppTypeEnum=Li,this.mobileConfig=this.configService.getMobile(),this.appConfig=this.configService.getAppConfig(),this.environmentConfig=this.configService.getEnvironmentConfig()}ngOnInit(){this.appointmentId=this.appointment.appointmentId||this.appointment.i
1d,this.isRolePatient=this.appConfig.defaultUserRole===vi.USER,this.message=this.isRolePatient?"Please wait. Your provider will start the call in a minute.":"You are the first participant on the call. Please wait.",this.appType=this.isRolePatient?"care-plan":"care-manager",this.isConvertRequired=this.convert.observers.length>0,this.videoCallLink$=this.getVideoCallLink()}getVideoCallLink(){return si(this.elementRef.nativeElement).pipe(Jt(300),Nn(Boolean),L(()=>this.appointmentApiService.getExternalVideoCallUrl(this.appointmentId)),Q(a=>this.externalUrl=a),L(a=>a?ge(a):this.appointment.hasNewVideoLayout?this.isRolePatient?ge(`/user/video-call/${this.appointmentId}`):ge(`/provider/video-call/${this.appointmentId}`):this.isRolePatient?this.healthcareLinkPipe.transform(`communication/${this.appointment.patientId}/appointment/${this.appointmentId}`):this.professionalLinkPipe.transform(`/pro/backend/clinic-appointment/video-consultation/${this.appointmentId}`)),ke(this))}openUrl(a){window.open(a,jt.SYSTEM,"hidden=yes,location=no")}starVideoCallForPatientAndroidApp(){if(this.externalUrl){this.openUrl(this.externalUrl);return}let{portalMobileUrl:a,portalMobileClientId:t}=this.environmentConfig.mobile;this.oauth2AuthCodeService.getOneTimeCode(In.USER_MOBILE_PORTAL,{redirectUri:a,clientId:t}).pipe(he(({auth_code:n})=>`${a}/#/move-to-video-call?appointmentId=${this.appointmentId}&code=${n}`)).subscribe(n=>this.openUrl(n))}starVideoCallForIOSApp(){this.externalUrl?this.openUrl(this.externalUrl):window.cordova.videoconversation.open(this.appointment.twilioVideoRoom,this.appointment.twilioAccessToken,this.appType,this.message)}starVideoCallForProviderAndroidApp(){this.externalUrl?this.openUrl(this.externalUrl):this.redirectService.redirect(In.DOCTOR_CARE_MANAGER,`/provider/video-call/${this.appointmentId}`,jt.SYSTEM)}convertAppointmentToVideoCall(){this.appointment.type==="video_call"||!this.isConvertRequired||this.modalWindowService.confirm("Are you sure you want to convert this appointment to a Telehealth call?","Convert to Telehealth call?","YES","NO",!0).pipe(_e(Boolean),L(()=>this.appointmentApiService.convertAppointmentToVideoCall(this.appointmentId))).subscribe(()=>this.convert.emit())}},et.\u0275fac=function(t){return new(t||et)(_(pt),_(Pe),_(Ot),_(j),_(_n),_(dn),_(mn),_(Ji,8),_(ae))},et.\u0275cmp=b({type:et,selectors:[["lib-video-call"]],inputs:{appointment:"appointment",videoCallText:"videoCallText",iconParams:"iconParams"},outputs:{convert:"convert"},ngContentSelectors:eo,decls:3,vars:1,consts:[["videoCallLinkContent",""],["defaultIconTpl",""],["internalLinkTemplate",""],["routerLinkTemplate",""],["oldVideoCallTpl",""],["class","video-call-wrapper",4,"ngIf"],[1,"icon"],[3,"params",4,"ngIf","ngIfElse"],["class","text",4,"ngIf"],[3,"params"],[1,"text"],[1,"video-call-wrapper"],[1,"video-call"],["type","button",3,"matTooltip","click",4,"ngIf"],[4,"ngIf"],["type","button",3,"click","matTooltip"],[4,"ngTemplateOutlet"],[3,"href","matTooltip","target",4,"ngIf","ngIfElse"],[3,"href","matTooltip","target"],["target","_blank",3,"href","matTooltip",4,"ngIf","ngIfElse"],["target","_blank",3,"href","matTooltip"],[3,"matTooltip","routerLink"],[4,"ngIf","ngIfElse"],["type","button",3,"matTooltip"]],template:function(t,n){t&1&&(Kn(eo),f(0,Lo,5,3,"ng-template",null,0,ue)(2,ca,5,4,"div",5)),t&2&&(o(2),l("ngIf",n.appointment))},dependencies:[ei,T,Rt,fi,Ci,ci,Pt,A,Lt,S],styles:[".video-call[_ngcontent-%COMP%]{display:flex;font-size:.8rem}.video-call[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .video-call[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{background:transparent;display:flex;width:100%;align-items:center;cursor:pointer}.video-call[_ngcontent-%COMP%] button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%], .video-call[_ngcontent-%COMP%] a[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 2.5rem}.video-call[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .text[_ngcontent-%COMP%], .video-call[_ngcontent-%COMP%] a[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{margin-left:.7rem}"]}),et);Ht=ye([Se(),xe("design:paramtypes",[pt,Pe,Ot,j,_n,dn,mn,Object,ae])],Ht);var An=e=>["/user/appointment",e],En=()=>["/user/appointment/create"];function la(e,a){if(e&1&&(s(0,"a",7),d(1),p(2,"translate"),c()),e&2){let t=g(5);l("routerLink",W(4,An,t.getAppointmentId())),o(),u(" ",m(2,2,"View Visit details")," ")}}function pa(e,a){if(e&1&&(s(0,"div"),f(1,la,3,6,"a",6),c()),e&2){let t=g(2).$implicit,n=g(2);o(),l("ngIf",n.hasTypeAppointment(n.task.todo.source)&&!n.hasTypeLink(t))}}function da(e,a){if(e&1){let t=y();s(0,"a",9),M("click",function(){h(t);let i=g(6);return v(i.doneAction())}),d(1),p(2,"translate"),c()}if(e&2){let t=g().$implicit,n=g(5);l("href",n.sanitize(t),Be),o(),u(" ",m(2,2,"Follow the link")," ")}}function ma(e,a){if(e&1){let t=y();s(0,"a",9),M("click",function(){h(t);let i=g(6);return v(i.goToNextCheckInTask())}),d(1),p(2,"translate"),c()}if(e&2){let t=g().$implicit,n=g(5);l("href",n.sanitize(t),Be),o(),u(" ",m(2,2,"Follow the link")," ")}}function ga(e,a){if(e&1&&(s(0,"span"),f(1,da,3,4,"a",8)(2,ma,3,4,"a",8),c()),e&2){let t=g(5);o(),l("ngIf",!t.checkInFlowService.isCheckInAppFlow()),o(),l("ngIf",t.checkInFlowService.isCheckInAppFlow())}}function _a(e,a){if(e&1&&(s(0,"div"),f(1,ga,3,2,"span",2),c()),e&2){let t=g(2).$implicit;o(),l("ngForOf",t.value)}}function ua(e,a){e&1&&(s(0,"a",14),d(1),p(2,"translate"),c()),e&2&&(l("routerLink",z(4,En)),o(),u(" ",m(2,2,"Schedule Now"),"\xA7 "))}function Ca(e,a){if(e&1){let t=y();s(0,"button",15),M("click",function(){h(t);let i=g(5);return v(i.doneAction())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"Mark as completed")," "))}function fa(e,a){e&1&&(s(0,"span",16),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"Completed")," "))}function ha(e,a){if(e&1){let t=y();s(0,"button",15),M("click",function(){h(t);let i=g(5);return v(i.doneAction())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"Mark as completed")," "))}function va(e,a){if(e&1&&(s(0,"a",17),k(1,"lib-video-call",18),c()),e&2){let t=g(5);o(),l("appointment",t.appointment)("videoCallText","Start video call here")}}function Pa(e,a){if(e&1&&(s(0,"div"),f(1,ua,3,5,"a",10)(2,Ca,3,3,"button",11)(3,fa,3,3,"span",12)(4,ha,3,3,"button",11)(5,va,2,2,"a",13),c()),e&2){let t=g(4);o(),l("ngIf",t.isAppointment()&&!t.isVideoAppointment()),o(),l("ngIf",t.task.todo.category.isCheckUpType),o(),l("ngIf",t.task.todo.category.isTaskType&&t.isTaskDone()),o(),l("ngIf",t.task.todo.category.isTaskType&&!t.isTaskDone()),o(),l("ngIf",t.isVideoAppointment()&&t.appointment)}}function Ma(e,a){if(e&1&&(s(0,"div"),f(1,pa,2,1,"div",3)(2,_a,2,1,"div",3)(3,Pa,6,5,"div",3),c()),e&2){let t=g().$implicit,n=g(2);o(),l("ngIf",n.task.todo.source&&n.task.todo.source.type),o(),l("ngIf",n.hasTypeLink(t)),o(),l("ngIf",!n.task.todo.source&&!n.task.todo.source.type)}}function Oa(e,a){if(e&1){let t=y();s(0,"span")(1,"a",20),M("click",function(){let i=h(t).$implicit,r=g(4);return v(r.openVideoLink(i))})("keydown.enter",function(){let i=h(t).$implicit,r=g(4);return v(r.openVideoLink(i))}),d(2),p(3,"translate"),c()()}e&2&&(o(2),u(" ",m(3,1,"Watch video")," "))}function ka(e,a){if(e&1){let t=y();s(0,"div",19),M("click",function(){h(t);let i=g(3);return v(i.markTaskAsDone())}),f(1,Oa,4,3,"span",2),c()}if(e&2){let t=g().$implicit;o(),l("ngForOf",t.value)}}function ya(e,a){if(e&1){let t=y();s(0,"div")(1,"a",20),M("click",function(){h(t);let i=g(3);return v(i.gotoQuestionnaire(i.getQuestionnaireFormId()))})("keydown.enter",function(){h(t);let i=g(3);return v(i.gotoQuestionnaire(i.getQuestionnaireFormId()))}),d(2),p(3,"translate"),c()()}e&2&&(o(2),u(" ",m(3,1,"Click here")," "))}function xa(e,a){if(e&1){let t=y();s(0,"div")(1,"a",20),M("click",function(){h(t);let i=g(3);return v(i.redirectToTaskAction())})("keydown.enter",function(){h(t);let i=g(3);return v(i.redirectToTaskAction())}),d(2),p(3,"translate"),c()()}e&2&&(o(2),u(" ",m(3,1,"View now")," "))}function ba(e,a){e&1&&(s(0,"div")(1,"a",21),p(2,"translate"),d(3),p(4,"translate"),c()()),e&2&&(o(),l("text",Vt(m(2,4,"Schedule Now")))("routerLink",z(8,En)),o(2),u(" ",m(4,6,"
1Schedule Now")," "))}function Sa(e,a){e&1&&(s(0,"a",14),d(1),p(2,"translate"),c()),e&2&&(l("routerLink",z(4,En)),o(),u(" ",m(2,2,"Schedule Now")," "))}function wa(e,a){if(e&1){let t=y();s(0,"button",15),M("click",function(){h(t);let i=g(2).$implicit,r=g(2);return v(r.doneAction(i))}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"Mark as completed")," "))}function Ta(e,a){if(e&1&&(s(0,"a",14),d(1),p(2,"translate"),c()),e&2){let t=g(4);l("routerLink",W(4,An,t.getAppointmentId())),o(),u(" ",m(2,2,"View Visit details")," ")}}function Ia(e,a){if(e&1&&(s(0,"a",17),k(1,"lib-video-call",18),c()),e&2){let t=g(4);o(),l("appointment",t.appointment)("videoCallText","Start video call here")}}function Aa(e,a){e&1&&(s(0,"span",16),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"Completed")," "))}function Ea(e,a){if(e&1){let t=y();s(0,"a",23),M("click",function(){h(t);let i=g(4);return v(i.gotoNextTask())})("keydown.enter",function(){h(t);let i=g(4);return v(i.gotoNextTask())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"Go to next task")," "))}function Da(e,a){if(e&1&&(s(0,"div"),f(1,Sa,3,5,"a",10)(2,wa,3,3,"button",11)(3,Ta,3,6,"a",10)(4,Ia,2,2,"a",13)(5,Aa,3,3,"span",12)(6,Ea,3,3,"a",22),c()),e&2){let t=g(3);o(),l("ngIf",t.isAppointment()&&t.task.todo.category.isInPast),o(),l("ngIf",!t.isAppointment()&&!t.isTaskDone()),o(),l("ngIf",t.isAppointment()&&!t.isVideoAppointment()),o(),l("ngIf",t.isVideoAppointment()&&t.appointment),o(),l("ngIf",!t.isAppointment()&&t.isTaskDone()),o(),l("ngIf",!t.isAppointment()&&t.isTaskDone())}}function Fa(e,a){if(e&1){let t=y();s(0,"a",9),p(1,"apiLink"),p(2,"async"),M("click",function(){h(t);let i=g(4);return v(i.markTaskAsDone())}),s(3,"strong"),d(4),p(5,"translate"),c()()}if(e&2){let t=g().$implicit;l("href",Vt(m(2,5,m(1,3,t.href))),Be),o(4),P(m(5,7,"View now"))}}function Ba(e,a){if(e&1&&(s(0,"ul",24)(1,"li"),f(2,Fa,6,9,"a",8),c()()),e&2){let t=a.$implicit;o(2),l("ngIf",t.href)}}function Va(e,a){if(e&1&&(s(0,"div")(1,"div"),f(2,Ma,4,3,"div",3)(3,ka,2,1,"div",4)(4,ya,4,3,"div",3)(5,xa,4,3,"div",3)(6,ba,5,9,"div",3)(7,Da,7,6,"div",3),c(),f(8,Ba,3,1,"ul",5),c()),e&2){let t=a.$implicit,n=g(2);o(2),l("ngIf",n.hasTypeDocumentOrEmpty(t)),o(),l("ngIf",n.hasTypeVideo(t)),o(),l("ngIf",n.hasTypeQuestionnaire(t)&&n.getQuestionnaireFormId()),o(),l("ngIf",n.isTaskSignDocument()&&n.task.isDescriptionVisible),o(),l("ngIf",n.hasTypeAppointment(t)),o(),l("ngIf",n.hasTypeCommon(t)),o(),l("ngForOf",n.task.todo.attachments)}}function Ra(e,a){if(e&1&&(s(0,"span",26)(1,"span",16),d(2),p(3,"translate"),c(),s(4,"span"),d(5),p(6,"applyUserTimezone"),p(7,"async"),p(8,"c4uDate"),c()()),e&2){let t=g(3);o(2),u(" ",m(3,2,"Completed")," "),o(3),u("",ne(8,8,m(7,6,m(6,4,t.task.doneAt||t.task.dueAt)),"todo_full")," ")}}function La(e,a){if(e&1){let t=y();s(0,"button",15),M("click",function(){h(t);let i=g(3);return v(i.doneAction())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"Mark as completed")," "))}function Na(e,a){if(e&1&&(s(0,"a",17),k(1,"lib-video-call",18),c()),e&2){let t=g(3);o(),l("appointment",t.appointment)("videoCallText","Start video call here")}}function za(e,a){if(e&1&&(s(0,"a",14),d(1),p(2,"translate"),c()),e&2){let t=g(3);l("routerLink",W(4,An,t.getAppointmentId())),o(),u(" ",m(2,2,"View Visit details")," ")}}function Ua(e,a){if(e&1&&(s(0,"div"),f(1,Ra,9,11,"span",25)(2,La,3,3,"button",11)(3,Na,2,2,"a",13)(4,za,3,6,"a",10),c()),e&2){let t=g(2);o(),l("ngIf",t.task.todo.category.isTaskType&&t.isTaskDone()),o(),l("ngIf",t.task.todo.category.isTaskType&&!t.isTaskDone()),o(),l("ngIf",t.isVideoAppointment()&&t.appointment),o(),l("ngIf",t.isAppointment()&&!t.isVideoAppointment())}}function ja(e,a){if(e&1&&(s(0,"div",1),f(1,Va,9,7,"div",2)(2,Ua,5,4,"div",3),c()),e&2){let t=g();l("ngClass",t.task.isDescriptionVisible&&t.task.valueType||""),o(),l("ngForOf",t.task.todo.actions),o(),l("ngIf",!t.task.todo.actions.length)}}var tt,Gt=(tt=class{constructor(a,t,n,i,r,C){this.redirectTaskService=a,this.taskGeneralService=t,this.sanitizer=n,this.appointmentApiService=i,this.deviceService=r,this.checkInFlowService=C}ngOnInit(){this.task?this.getAppointment():this.initCurrentTask()}initCurrentTask(){let a;this.redirectTaskService.currentTask$.pipe(ke(this)).subscribe(t=>{this.task=t,this.getAppointment(),t&&!t.isDone&&!this.redirectTaskService.isBaseUrlTypeCommon()?(this.checkInFlowService.isCheckInAppFlow()?this.checkInFlowService.isTaskActive(a,t):this.redirectTaskService.isTaskActive(a,t))||this.tryToRedirectToContent(t):this.afterInitRedirect(),a=t})}afterInitRedirect(){this.checkInFlowService.isCheckInAppFlow()&&!this.redirectCompleted&&(this.redirectCompleted=!0,this.tryToRedirectToContent(this.task))}tryToRedirectToContent(a){if(this.taskGeneralService.isTaskQuestionnaire(a)){let t=this.getQuestionnaireFormId();t?this.gotoQuestionnaire(t):this.redirectTaskService.navigate([this.redirectTaskService.getBaseQuestionnaireUrl(),"unavailable"])}}getAppointment(){this.task?.todo?.source?.appointment_id&&this.appointmentApiService.get(this.getAppointmentId()).subscribe(a=>{this.appointment=a})}getAppointmentId(){return this.task.todo.source.appointment_id}getQuestionnaireFormId(){return this.task.todo.source.questionnaire_form_id}doneAction(a){this.checkInFlowService.isCheckInAppFlow()?this.checkInFlowService.markCheckInFlowTaskAsDoneAndGoToNext(this.task,!0):this.redirectTaskService.completeTaskAndSetItActive(this.task).pipe(_e(()=>a&&a.type!==D.REGULAR)).subscribe(()=>this.redirectToTaskAction())}markTaskAsDone(){this.checkInFlowService.isCheckInAppFlow()?this.checkInFlowService.markSavedCheckInFlowTask(Ee.DONE).subscribe(()=>{this.task.isDone=!0,this.redirectTaskService.setActiveTask(this.task)}):this.redirectTaskService.completeTaskAndSetItActive(this.task).subscribe()}isTaskDone(){return this.task.doneAt&&this.task.isDone}isAppointment(){return this.task.todo.category.isAppointment&&this.task.todo.source&&this.hasTypeAppointment(this.task.todo.source)}isVideoAppointment(){return this.isAppointment()&&this.task.todo.category.isVideoCallType}
1hasTypeAppointment(a){return a.type===D.APPOINTMENT}hasTypeLink(a){return a.type===D.LINK}sanitize(a){return this.sanitizer.bypassSecurityTrustUrl(a)}hasTypeCommon(a){return[D.COMMON,D.REGULAR].includes(a.type)}hasTypeDocumentOrEmpty(a){return[D.LINK,D.SIGN_DOCUMENT,D.EMPTY].includes(a.type)}hasTypeQuestionnaire(a){return this.taskGeneralService.isTypeQuestionnaire(a?.type)}isTaskSignDocument(){return this.taskGeneralService.isTaskSignDocument(this.task)}redirectToTaskAction(){this.redirectTaskService.redirectToTaskAction(this.task,!1)}hasTypeVideo(a){return a.type===D.VIDEO}gotoQuestionnaire(a){this.redirectTaskService.navigate([this.redirectTaskService.getBaseQuestionnaireUrl(),"main",a],{queryParams:{appointmentId:this.getAppointmentId(),clinicUuid:this.task.clinicUuid}})}gotoNextTask(){this.redirectTaskService.gotoNextTask()}goToNextCheckInTask(){this.checkInFlowService.markSavedCheckInFlowTask(Ee.DONE).subscribe(()=>{this.checkInFlowService.nextCheckInFlowTask()})}openVideoLink(a){this.deviceService.isCordovaApp()?window.open(a,jt.SYSTEM,"hidden=yes,location=no"):window.open(a,jt.BLANK)}},tt.\u0275fac=function(t){return new(t||tt)(_(x),_(vn),_(gt),_(j),_(Pe),_(R))},tt.\u0275cmp=b({type:tt,selectors:[["app-regular-button"]],inputs:{task:"task"},standalone:!1,decls:1,vars:1,consts:[["class","button",3,"ngClass",4,"ngIf"],[1,"button",3,"ngClass"],[4,"ngFor","ngForOf"],[4,"ngIf"],[3,"click",4,"ngIf"],["class","attachment-list",4,"ngFor","ngForOf"],["class","view-appointment-details",3,"routerLink",4,"ngIf"],[1,"view-appointment-details",3,"routerLink"],["target","_blank",3,"href","click",4,"ngIf"],["target","_blank",3,"click","href"],[3,"routerLink",4,"ngIf"],["type","button",3,"click",4,"ngIf"],["class","completed",4,"ngIf"],["class","video-call-btn",4,"ngIf"],[3,"routerLink"],["type","button",3,"click"],[1,"completed"],[1,"video-call-btn"],[3,"appointment","videoCallText"],[3,"click"],["tabindex","0",3,"click","keydown.enter"],[3,"text","routerLink"],["class","go-to-next-task","tabindex","0",3,"click","keydown.enter",4,"ngIf"],["tabindex","0",1,"go-to-next-task",3,"click","keydown.enter"],[1,"attachment-list"],["class","todo-event-info-completed",4,"ngIf"],[1,"todo-event-info-completed"]],template:function(t,n){t&1&&f(0,ja,3,3,"div",0),t&2&&l("ngIf",n.task)},dependencies:[Pt,mt,me,T,Ht,ze,Ai,pn,S,Lt],styles:[".button[_ngcontent-%COMP%]{margin-bottom:3rem}.button[_ngcontent-%COMP%] .completed[_ngcontent-%COMP%]{display:flex;padding:1rem;justify-content:center;font-family:Roboto-bold,sans-serif}.button[_ngcontent-%COMP%] .attachment-list[_ngcontent-%COMP%]{margin-top:1rem}.button[_ngcontent-%COMP%] .attachment-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] + li[_ngcontent-%COMP%]{margin-top:1rem}.button[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.7rem 2rem;background-color:#064060;border-radius:4px;width:100%;box-sizing:border-box;font-family:Roboto-bold;align-items:center;cursor:pointer}.button[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{opacity:.8}.button[_ngcontent-%COMP%] a[_ngcontent-%COMP%] svg[_ngcontent-%COMP%], .button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.button[_ngcontent-%COMP%] a[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%], .button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.button[_ngcontent-%COMP%] a[disabled][_ngcontent-%COMP%], .button[_ngcontent-%COMP%] button[disabled][_ngcontent-%COMP%]{cursor:default}"]}),tt);Gt=ye([Se(),xe("design:paramtypes",[x,vn,gt,j,Pe,R])],Gt);var Wa=(e,a)=>({name:e,color:a});function qa(e,a){if(e&1&&(s(0,"div",1)(1,"div",2)(2,"div",3),k(3,"div",4)(4,"lib-svg-icon",5),c(),s(5,"div",6)(6,"h1",7),d(7),c(),s(8,"p"),d(9),c()(),s(10,"div",8),k(11,"app-regular-button"),c()()()),e&2){let t=g();ve("background-color",t.task.todo.category.backgroundColor),o(3),ve("background-color",t.task.todo.category.backgroundColor),o(),l("params",Z(7,Wa,t.task.todo.category.icon,t.task.todo.category.backgroundColor)),o(3),P(t.task.todo.category.title),o(2),u(" ",t.task.todo.category.description||t.task.todo.title," ")}}
1var nt,io=(nt=class{constructor(a,t){this.redirectService=a,this.configService=t}ngOnInit(){this.task=this.redirectService.getActiveTask(),this.redirectService.activeTask().pipe(Q(()=>this.task=null),en(0),ke(this)).subscribe(()=>{this.task=this.redirectService.getActiveTask(),this.configService.setTitle(this.task.todo.category.title)})}},nt.\u0275fac=function(t){return new(t||nt)(_(x),_(ae))},nt.\u0275cmp=b({type:nt,selectors:[["app-regular"]],standalone:!1,decls:1,vars:1,consts:[["class","task-panel-background",3,"background-color",4,"ngIf"],[1,"task-panel-background"],[1,"task-panel"],[1,"task-panel-header"],[1,"header-background"],[3,"params"],[1,"task-panel-body"],[1,"title"],[1,"footer"]],template:function(t,n){t&1&&f(0,qa,12,10,"div",0),t&2&&l("ngIf",n.task)},dependencies:[T,A,Gt],styles:[".task-panel-background[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;height:100%;width:100%;padding:30px 20px}.task-panel[_ngcontent-%COMP%]{height:100%;background-color:#fff;border-radius:8px;display:flex;flex-direction:column;overflow:hidden}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:100px;display:flex;align-items:center;justify-content:center;position:relative}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .header-background[_ngcontent-%COMP%]{pointer-events:none;position:absolute;height:100%;width:100%;opacity:.15}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 50px}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:1rem 2rem 0;overflow-y:auto;line-height:1.5}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:left;font-family:Roboto-bold,sans-serif;font-size:18px;letter-spacing:.53px;color:#064060;padding-bottom:1rem}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin-top:2rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.8rem 2rem;background-color:#064060;width:100%;box-sizing:border-box;font-family:Roboto-bold,sans-serif;align-items:center;cursor:pointer;width:15rem;border-radius:8px;margin:1rem 0;text-transform:uppercase;font-size:.875rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]:hover{opacity:.8}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[disabled][_ngcontent-%COMP%]{cursor:default}.task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{background:none;color:#064060;text-transform:uppercase;font-size:.875rem;letter-spacing:.43px;margin:.75rem 0}@media(max-height:460px){.task-panel-background[_ngcontent-%COMP%]{padding:10px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:60px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 30px}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:8px 8px 0}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{margin-top:8px}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%], .task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin:8px 0}}[_nghost-%COMP%]{height:100%} .video-call-btn{background:none!important;padding:0!important} .video-call-btn a{font-size:1rem;display:flex;color:#fff;justify-content:center;padding:.7rem 2rem;background-color:#064060;border-radius:4px;width:100%;box-sizing:border-box;font-family:Roboto-bold;align-items:center;cursor:pointer} .video-call-btn a .icon{display:none} .video-call-btn a:hover{opacity:.8} .video-call-btn a svg{width:2rem;height:2rem;margin-right:.5rem} .video-call-btn a lib-svg-icon{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem} .video-call-btn a[disabled]{cursor:default}"]}),nt);io=ye([Se(),xe("design:paramtypes",[x,ae])],io);var Qa=()=>({name:"arrow-left",color:"#a7a7a7"}),Ha=e=>({active:e}),oo=()=>({name:"arrow-right",color:"#a7a7a7"}),Ga=e=>({color:e}),Za=(e,a)=>({name:e,color:a}),$a=()=>({name:"ok",color:"#8CC63F"});function Ka(e,a){e&1&&(s(0,"div",2)(1,"p"),d(2),p(3,"translate"),c()()),e&2&&(o(2),u(" ",m(3,1,"You do not currently have any upcoming tasks.")," "))}function Xa(e,a){e&1&&(s(0,"div",2)(1,"h1"),d(2),p(3,"translate"),c(),s(4,"p")(5,"a",3),d(6),p(7,"translate"),c()()()),e&2&&(o(2),u(" ",m(3,2,"Welcome!")," "),o(4),u(" ",m(7,4,"Please click here to connect a provider to your profile")," "))}function Ja(e,a){if(e&1){let t=y();s(0,"a",12),M("click",function(){h(t);let i=g(3);return v(i.loadTaskList(i.navPrevParams,!1))}),k(1,"lib-svg-icon",13),c()}e&2&&(o(),l("params",z(1,Qa)))}function er(e,a){if(e&1&&(s(0,"div",11),f(1,Ja,2,2,"a",8),c()),e&2){let t=g(2);o(),l("ngIf",t.navPrev)}}function tr(e,a){if(e&1){let t=y();s(0,"div",14),M("click",function(){let i=h(t).index,r=g(2);return v(r.setActiveDay(i))}),s(1,"span",15),d(2),p(3,"c4uDate"),p(4,"translate"),c(),s(5,"span",16),d(6),p(7,"c4uDate"),p(8,"translate"),c()()}if(e&2){let t=a.$implicit,n=a.index,i=g(2);l("ngClass",W(13,Ha,i.selectedDay===n)),o(2),P(m(4,6,ne(3,3,t,"todo_event_week"))),o(4),P(m(8,11,ne(7,8,t,"todo_event_day")))}}function nr(e,a){if(e&1){let t=y();s(0,"a",12),M("click",function(){h(t);let i=g(2);
1return v(i.loadTaskList(i.navNextParams,!1))}),k(1,"lib-svg-icon",13),c()}e&2&&(o(),l("params",z(1,oo)))}function ir(e,a){if(e&1&&(s(0,"span",23),d(1),c()),e&2){let t=g().$implicit;o(),P(t.todo.category.description||t.todo.title)}}function or(e,a){if(e&1&&(s(0,"span",23),d(1),c()),e&2){let t=g().$implicit;o(),P(t.todo.category.title)}}function ar(e,a){e&1&&(s(0,"span",24),k(1,"lib-svg-icon",13),c()),e&2&&(o(),l("params",z(1,$a)))}function rr(e,a){e&1&&(s(0,"span",25),k(1,"lib-svg-icon",13),c()),e&2&&(o(),l("params",z(1,oo)))}function cr(e,a){if(e&1){let t=y();s(0,"a",17),M("click",function(){let i=h(t).$implicit,r=g(2);return v(r.showTask(i))}),s(1,"span",18),k(2,"lib-svg-icon",13),c(),s(3,"span",19)(4,"span",16),d(5),p(6,"applyTimezone"),p(7,"c4uDate"),c(),f(8,ir,2,1,"span",20)(9,or,2,1,"span",20),c(),f(10,ar,2,2,"span",21)(11,rr,2,2,"span",22),c()}if(e&2){let t=a.$implicit;o(),l("ngStyle",W(13,Ga,t.todo.category.backgroundColor?t.todo.category.backgroundColor:"#03C5E5")),o(),l("params",Z(15,Za,t.todo.category.icon,t.todo.category.backgroundColor)),o(3),P(ne(7,10,ne(6,7,t.dueAt,t.timezone),"todo_time")),o(3),l("ngIf",t.todo.category.isNeedDescription),o(),l("ngIf",!t.todo.category.isNeedDescription),o(),l("ngIf",t.isDone&&!t.todo.category.isAppointment),o(),l("ngIf",!t.isDone||t.todo.category.isAppointment)}}function sr(e,a){if(e&1){let t=y();s(0,"div",4)(1,"nav"),f(2,er,2,1,"div",5)(3,tr,9,15,"div",6),s(4,"div",7),f(5,nr,2,2,"a",8),c()(),s(6,"div",9),M("swipeDown",function(){h(t);let i=g();return v(i.ngOnInit())}),f(7,cr,12,18,"a",10),c()()}if(e&2){let t=g();o(2),l("ngIf",t.navPrevParams),o(),l("ngForOf",t.calendar),o(2),l("ngIf",t.navNextParams),o(2),l("ngForOf",t.activeDay)}}var Vp=(()=>{let a=class a{constructor(n,i,r,C,O){this.taskApiService=n,this.dateTimeService=i,this.redirectService=r,this.currentUser=C,this.clinicApiService=O,this.calendar=[],this.activeDay=[],this.daysCount=3}ngOnInit(){this.redirectService.setBaseUrlType(hi.COMMON),this.selectedDay=this.redirectService.getActiveDay(),this.currentUser.getModel().subscribe(n=>{this.timezone=n.timezone,this.userId=n.id,this.setupStartDate()})}setupStartDate(){this.actualDate=this.dateTimeService.getStartOfDay(),this.startDate=this.redirectService.getCalendarParams()?this.redirectService.getCalendarParams().fromDate:this.dateTimeService.format(this.actualDate,"mysql_date"),this.finishDate=this.redirectService.getCalendarParams()?this.redirectService.getCalendarParams().toDate:"",this.loadTaskList({count:this.daysCount,timezone:this.timezone,fromDate:this.startDate,toDate:this.finishDate,appointmentId:this.redirectService.getAppointmentId()},!0)}loadTaskList(n,i){this.isListEmpty=void 0,this.redirectService.setCalendarParams(n);let r=this.taskApiService.getTaskList(this.userId,n).subscribe(C=>{if(this.navNext=C.headers.get("x-next-page"),this.navPrev=C.headers.get("x-prev-page"),this.initNavParams(C.headers.get("link")),this.todoList=C.body,this.todoList.length<3&&i&&this.navPrevParams&&this.loadTaskList(this.navPrevParams,!1),this.todoList.length===0){!i||!this.navPrevParams&&i?this.clinicApiService.getClinicListByToken().subscribe(O=>{this.clinicList=O,this.isListEmpty=!0}):this.isListEmpty=!0;return}this.todoList.length<3&&i&&this.navPrevParams&&(this.navPrevParams.toDate=this.todoList[this.todoList.length-1].day,this.loadTaskList(this.navPrevParams,!1)),i||this.redirectService.saveActiveDay(0),this.createCalendar(),this.saveTaskList(),this.setActiveDay(this.selectedDay),r.unsubscribe()})}saveTaskList(){this.todoList[0]&&this.redirectService.saveTaskList(this.todoList[0].events)}createCalendar(){this.isListEmpty=!1,this.todoList.length&&(this.calendar=this.todoList.map(n=>n.day),this.setActiveDay(this.redirectService.getActiveDay()))}setActiveDay(n){this.selectedDay=n,this.activeDay=this.todoList[this.selectedDay].events,this.redirectService.saveTaskList(this.todoList[this.selectedDay].events),this.redirectService.saveActiveDay(this.selectedDay)}showTask(n){this.redirectService.redirectToTaskAction(n,!1)}initNavParams(n){this.navPrevParams=null,this.navNextParams=null,n!==""&&(n||"").split(",").forEach(i=>
1{if(i!==""){let[r,C]=i.split(";"),O=new URL(r.replace(/[<|>]/g,"")).href.split("&");this.toDateParam="",this.fromDateParam="",this.countParam="";for(let w of O)w.search("toDate")!==-1&&(this.toDateParam=w.substring(w.indexOf("=")+1)),w.search("fromDate")!==-1&&(this.fromDateParam=w.substring(w.indexOf("=")+1)),w.search("count")!==-1&&(this.countParam=w.substring(w.indexOf("=")+1));switch(C.trim()){case'rel="prev"':this.navPrevParams={toDate:this.toDateParam,fromDate:this.fromDateParam,timezone:this.timezone,count:Number(this.countParam),appointmentId:this.redirectService.getAppointmentId()};break;case'rel="next"':this.navNextParams={toDate:this.toDateParam,fromDate:this.fromDateParam,timezone:this.timezone,count:Number(this.countParam),appointmentId:this.redirectService.getAppointmentId()};break}}})}};a.\u0275fac=function(i){return new(i||a)(_(Ke),_(kt),_(x),_(re),_(Ze))},a.\u0275cmp=b({type:a,selectors:[["app-task-list"]],inputs:{event:"event"},standalone:!1,decls:3,vars:3,consts:[["class","no-data",4,"ngIf"],["class","todo-events",4,"ngIf"],[1,"no-data"],["routerLink","/user/provider/connect"],[1,"todo-events"],["class","arrow left-arrow",4,"ngIf"],["class","calendar",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"arrow","right-arrow"],[3,"click",4,"ngIf"],["libSwipeAction","",1,"list",3,"swipeDown"],["class","element",3,"click",4,"ngFor","ngForOf"],[1,"arrow","left-arrow"],[3,"click"],[3,"params"],[1,"calendar",3,"click","ngClass"],[1,"day"],[1,"date"],[1,"element",3,"click"],[1,"icon",3,"ngStyle"],[1,"content"],["class","title",4,"ngIf"],["class","arrow ok",4,"ngIf"],["class","arrow",4,"ngIf"],[1,"title"],[1,"arrow","ok"],[1,"arrow"]],template:function(i,r){i&1&&f(0,Ka,4,3,"div",0)(1,Xa,8,6,"div",0)(2,sr,8,4,"div",1),i&2&&(l("ngIf",r.isListEmpty===!0&&r.clinicList&&r.clinicList.length>0),o(),l("ngIf",r.isListEmpty===!0&&r.clinicList&&!r.clinicList.length),o(),l("ngIf",r.isListEmpty===!1))},dependencies:[Ei,Pt,mt,me,T,Le,A,ze,ln,S],styles:["button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.7rem 3.5rem;background-color:#064060;border-radius:4px;width:auto;box-sizing:border-box;font-family:Roboto-bold;align-items:center;cursor:pointer}button[_ngcontent-%COMP%]:hover{opacity:.8}button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}button[disabled][_ngcontent-%COMP%]{cursor:default}.todo-events[_ngcontent-%COMP%]{font-family:Roboto-medium,sans-serif;display:flex;flex-direction:column;width:100%;overflow:auto;-webkit-overflow-scrolling:touch}.todo-events[_ngcontent-%COMP%] nav[_ngcontent-%COMP%]{display:flex;padding:0 1rem}.todo-events[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex;flex:1 0 20%;height:4rem;align-items:center}.todo-events[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] div.calendar[_ngcontent-%COMP%]{text-align:center;flex-direction:column;font-size:.8rem}.todo-events[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] div.calendar[_ngcontent-%COMP%] .day[_ngcontent-%COMP%]{display:flex;align-items:flex-end;padding-bottom:.3rem;flex:1}.todo-events[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] div.calendar[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{display:flex;flex:1}.todo-events[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] div.calendar.active[_ngcontent-%COMP%]{background-color:#d9f7ff}.todo-events[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] div.right-arrow[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{justify-content:flex-end}.todo-events[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] div.arrow[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#a7a7a7;display:flex;width:100%;height:100%;align-items:center}.todo-events[_ngcontent-%COMP%] nav[_ngcontent-%COMP%] div.arrow[_ngcontent-%COMP%] a[_ngcontent-%COMP%] svg{width:1.7rem;height:1.7rem}.todo-events[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1}.todo-events[_ngcontent-%COMP%] .list-content[_ngcontent-%COMP%]{display:flex;flex:1}.todo-events[_ngcontent-%COMP%] .list-wrapper[_ngcontent-%COMP%]{display:flex;flex:1;width:100%}.todo-events[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1rem;border-top:1px solid #e6e6e6;align-items:center;justify-content:space-between;color:#505050;font-size:.9rem;cursor:pointer;-webkit-overflow-scrolling:touch}.todo-events[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]:last-child, .todo-events[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .last[_ngcontent-%COMP%]{border-bottom:1px solid #e6e6e6}.todo-events[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 .5rem;overflow:hidden;flex:1;line-height:1.3rem}.todo-events[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .date[_ngcontent-%COMP%], .todo-events[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:block}.todo-events[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{margin-bottom:.3rem}.todo-events[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;flex:.2;--avatar-image-size: 2rem}.todo-events[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] svg, .todo-events[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:2rem;height:2rem;min-width:1rem;min-height:1rem;background-size:2rem}.todo-events[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{color:#a7a7a7;display:flex;align-items:center;font-family:Roboto-medium,sans-serif}.todo-events[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{min-height:7vh}.todo-events[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] svg{width:2rem;height:2rem;min-width:1rem;min-height:1rem;background-size:2rem}.todo-events[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%] svg{width:1.4rem;height:1.4rem}.todo-events[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .ok[_ngcontent-%COMP%]{color:#8cc63f}.no-data[_ngcontent-%COMP%]{display:flex;height:100%;width:100%;padding:0 5%;align-items:center;justify-content:center;background-color:#effcff;text-align:center;color:#064060;line-height:1.5rem;font-family:Roboto-bold,sans-serif;flex-direction:column;box-sizing:border-box}.no-data[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:1.5rem;margin-bottom:1rem}.no-data[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding:1rem}.no-data[_ngcontent-%COMP%]{flex-direction:column}"]});let e=a;return e})();var xt=(()=>{let a=class a{constructor(n){this.redirectTaskService=n}gotoThankYouPage(){this.redirectTaskService.isRedirectToCheckInNeeded()?this.redirectTaskService.gotoToAppointmentCheckIn():this.redirectTaskService.isBaseUrlTypeCommon()?this.redirectTaskService.navigate([this.redirectTaskService.getBaseUrl()+"/copay-thank-you"],{queryParamsHandling:"preserve"}):this.redirectTaskService.gotoNextUndoneTaskOrCheckIn()}};a.\u0275fac=function(i){return new(i||a)(ce(x))}
1,a.\u0275prov=lt({token:a,factory:a.\u0275fac,providedIn:"root"});let e=a;return e})();var bt=(()=>{let a=class a{constructor(n,i,r,C,O,w,I,K,J,Oe,Te,ct,Zt,Tn){this.sanitizer=n,this.currentUserService=i,this.appointmentApiService=r,this.demographicsApiService=C,this.paymentApiService=O,this.checkInFlowService=w,this.onFlyTasksFlowService=I,this.copayService=K,this.errorService=J,this.loggingService=Oe,this.configService=Te,this.deviceService=ct,this.storageService=Zt,this.router=Tn}prepareUrl(n,i,r={includeWallets:!0}){let C=i.url,O=i.trxCustId,w=i.trxCustIdLicenseKey,I=i.aggregatorId,K=this.sanitizer.sanitize(Yn.URL,window.location.href),J={amount:n,aggregators:I,trxcustid:O,trxcustid_licensekey:w,ticketno:li(),pre_auth:"y",display_logo:"y",hide_ticket:"y",wcag:"y",is_redirect:"y",response_url:K};r.includeWallets&&!this.checkInFlowService.isSelfCheckIn()&&(J.applepay="y",J.googlepay="y");let Oe=Object.entries(J).map(([Te,ct])=>`${Te}=${encodeURIComponent(ct)}`).join("&");return this.loggingService.log({message:"Prepared Trust Commerce URL",tcUrl:`${C}?${Oe}`,loggingApplication:this.configService.getAppName(),flow:this.storageService.get("appFlow"),page:window.location.href,os:this.deviceService.getOS()}),`${C}?${Oe}`}handleTrustCommerceRedirect(n,i){this.loggingService.log({message:"Checking url for trustCommerce params",tcUrl:window.location.href,loggingApplication:this.configService.getAppName(),flow:this.storageService.get("appFlow"),page:window.location.href,os:this.deviceService.getOS()});let r=this.parseParams(n.snapshot.queryParamMap);this.router.navigate([],{relativeTo:n,queryParams:{},replaceUrl:!0}),r.result&&this.postTrustCommercePayment(i,r)}parseParams(n){let i=["transaction[amount]","transaction[transid]","transaction[authcode]","transaction[status_name]","transaction[name]","transaction[ccBrand]"],r={amount:"transactionAmount",transid:"transactionId",authcode:"authCode",status_name:"result",name:"cardHolderName",ccBrand:"cardType"},C={};try{i.forEach(O=>{let w=n.get(O);if(w){let I=O.replace("transaction[","").replace("]","");C[r[I]]=w}}),Object.keys(C).length>0&&this.loggingService.log({message:`Parsed trust commerce redirect parameters: ${JSON.stringify(C)}`,loggingApplication:this.configService.getAppName(),flow:this.storageService.get("appFlow"),page:window.location.href,os:this.deviceService.getOS()})}catch(O){this.loggingService.log({message:`Error parsing Trust Commerce redirect parameters: ${O}`,loggingApplication:this.configService.getAppName(),flow:this.storageService.get("appFlow"),page:window.location.href,os:this.deviceService.getOS()})}return C}postTrustCommercePayment(n,i,r){try{let C;n.valueType===D.OUTSTANDING_BALANCE&&(C={amount:n.outstandingBalance.amount,departmentId:n.outstandingBalance.departmentUuid,financialGroupId:n.outstandingBalance.financialGroupId});let O=n?.todo?.source?.appointment_id??void 0;(()=>{if(r?.clinicUuid&&r?.patientId&&r?.userId)return ge({clinicUuid:r.clinicUuid,patientId:r.patientId,userId:r.userId});let I="userId"in n?ge(n.userId):this.currentUserService.getModel().pipe(he(J=>J.id)),K=O?this.appointmentApiService.get(O):ge({clinicUuid:n?.clinicUuid,patientId:null});return Ae([I,K]).pipe(L(([J,Oe])=>{let Te=r?.clinicUuid??Oe?.clinicUuid??n?.clinicUuid,ct=r?.patientId??Oe?.patientId??null;return ct?ge({clinicUuid:Te,patientId:ct,userId:J}):this.demographicsApiService.getClinicUserDetails(Te,J).pipe(he(Zt=>({clinicUuid:Te,patientId:Zt.patientId,userId:J})))}))})().pipe(L(({clinicUuid:I,patientId:K,userId:J})=>{let Oe,Te=this.checkInFlowService.isCheckInAppFlow()?It.CHECK_IN:It.MANUAL_FAST_PAY;return this.onFlyTasksFlowService.isOnFlyTasksFlow()&&(Oe=this.onFlyTasksFlowService.getFlowResultUuid(I,String(J)),Te=this.onFlyTasksFlowService.getPaymentSource(I,String(J))),this.loggingService.log({message:`Posting payment from Trust Commerce, patientId: ${K}, flowResultUuid: ${Oe}, paymentSource: ${Te}`,loggingApplication:this.configService.getAppName(),clinicId:I,userId:J,flow:this.storageService.get("appFlow"),page:window.location.href,os:this.deviceService.getOS()}),this.paymentApiService.postTrustCommercePayment(I,K,n.valueType===D.COPAY?"copay":"balance",{appointmentId:O,balanceData:C,transactionInfo:i,paymentSource:Te,flowResultUuid:Oe})})).subscribe({next:()=>{this.checkInFlowService.isCheckInAppFlow()?this.markCheckInTaskAsCompleted(n):this.onFlyTasksFlowService.isOnFlyTasksFlow()?this.onFlyTasksFlowService.markTaskAsDoneAndMoveForward(n):this.copayService.gotoThankYouPage()},error:I=>{if(r?.errorCallback){r.errorCallback(I);return}this.errorService.displayNotification("We couldn't process your payment. Please try again or use a different method."),this.loggingService.log({message:"Error posting payment from Trust Commerce",loggingApplication:this.configService.getAppName(),flow:this.storageService.get("appFlow"),page:window.location.href,os:this.deviceService.getOS()})}})}catch{this.loggingService.log({message:"Error in postTrustCommercePayment",loggingApplication:this.configService.getAppName(),flow:this.storageService.get("appFlow"),page:window.location.href,os:this.deviceService.getOS()})}}markCheckInTaskAsCompleted(n){let i=n.copayTaskList.map(r=>this.checkInFlowService.markCheckInFlowTask(Ee.DONE,r.source.appointment.i
1d,r.settingId));Ae(i).subscribe({next:()=>{this.checkInFlowService.moveForwardFromCompletedTask(n)},error:()=>{this.loggingService.log({message:"Error marking check-in tasks as done",loggingApplication:this.configService.getAppName(),flow:this.storageService.get("appFlow"),page:window.location.href,os:this.deviceService.getOS()})}})}};a.\u0275fac=function(i){return new(i||a)(ce(gt),ce(re),ce(j),ce(Ue),ce(Me),ce(R),ce(We),ce(xt),ce($e),ce(Cn),ce(ae),ce(Pe),ce(Mt),ce(De))},a.\u0275prov=lt({token:a,factory:a.\u0275fac,providedIn:"root"});let e=a;return e})();var lr=e=>({background:e}),pr=(e,a)=>({name:e,color:a});function dr(e,a){e&1&&(s(0,"div",7),d(1),p(2,"translate"),c(),k(3,"lib-loading-spinner")),e&2&&(o(),P(m(2,1,"We're checking if there is a copay due for your visit.")))}function mr(e,a){e&1&&(d(0),p(1,"translate")),e&2&&u(" ",m(1,1,"There was an issue retrieving your copay details. Please try again later.")," ")}function gr(e,a){if(e&1&&(s(0,"div",5),ee(1,dr,4,3)(2,mr,2,3),c()),e&2){let t=g();o(),te(t.isCopayLoading?1:2)}}function _r(e,a){if(e&1&&(s(0,"div",14)(1,"span",19),d(2),c(),s(3,"span",20),d(4),p(5,"currency"),c()()),e&2){let t=g().$implicit;o(2),u("",t.appointmentTitle,": "),o(2),P(ne(5,2,t.amount,"USD"))}}function ur(e,a){if(e&1&&f(0,_r,6,5,"div",18),e&2){let t=a.$implicit;l("ngIf",t.amount>0)}}function Cr(e,a){if(e&1&&(s(0,"div",13),Et(1,ur,1,1,"div",14,At),s(3,"div",15)(4,"span",16),d(5),p(6,"translate"),c(),s(7,"span",17),d(8),p(9,"currency"),c()()()),e&2){let t=g(2);o(),Dt(t.copayTaskList),o(4),P(m(6,2,"Total Amount:")),o(3),P(ne(9,4,t.totalCopayAmount,"USD"))}}function fr(e,a){if(e&1){let t=y();s(0,"app-payment-buttons",21),M("cardPaymentTriggered",function(){h(t);let i=g(2);return v(i.initiateCardPayment())}),c()}if(e&2){let t=g(2);l("trustCommerceUrl",t.trustCommerceUrl)}}function hr(e,a){if(e&1){let t=y();s(0,"button",22),M("click",function(){h(t);let i=g(2);return v(i.continueToNextTask())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"CONTINUE")," "))}function vr(e,a){if(e&1&&(s(0,"div",6),f(1,Cr,10,7,"div",8),s(2,"div",9),ee(3,fr,1,1,"app-payment-buttons",10)(4,hr,3,3,"button",11),s(5,"div",12)(6,"p"),d(7),p(8,"translate"),c(),s(9,"p"),d(10),p(11,"translate"),c(),s(12,"p"),d(13),p(14,"translate"),c()()()()),e&2){let t=g();o(),l("ngIf",t.checkInFlowService.isCheckInAppFlow()&&t.copayTaskList),o(2),te(t.totalCopayAmount>0?3:4),o(4),P(m(8,5,"Please Note:")),o(3),P(m(11,7,"You may have additional payments due at your visit depending on services provided.")),o(3),P(m(14,9,"Your payment is secure and will be applied to your visit."))}}var Cd=(()=>{let a=class a{constructor(n,i,r,C,O,w,I){this.redirectService=n,this.paymentApiService=i,this.checkInFlowService=r,this.storageService=C,this.trustCommerceService=O,this.activatedRoute=w,this.cdr=I,this.hexToRgba=rn,this.isCopayLoading=!1,this.copayError=!1,this.copayRespList=[]}ngOnInit(){this.task=this.redirectService.getActiveTask(),this.trustCommerceService.handleTrustC
1ommerceRedirect(this.activatedRoute,this.task),this.checkInFlowService.isCheckInAppFlow()&&this.initCheckInFlow()}initCheckInFlow(){this.isCopayLoading=!0;let n=this.storageService.get("checkInAppointment");for(let i of this.task.copayTaskList){this.copayRespList.push(this.paymentApiService.getCopay(i.todo.userId,i.source.appointment.id));for(let r of n.appointments)if(i.source.appointment.id===r.appointmentId){i.appointmentTitle=r.appointmentTitle;break}}this.getCheckInFlowData()}getCheckInFlowData(){this.totalCopayAmount=0,Ae(this.copayRespList).subscribe({next:n=>{for(let i of n){this.totalCopayAmount+=i.amount;let r=this.task.copayTaskList.findIndex(C=>C.source.appointment.id===i.appointmentId);this.task.copayTaskList[r]=$t($t({},this.task.copayTaskList[r]),i)}n.some(i=>i.processorData?.type==="trust_commerce")&&this.totalCopayAmount>0&&(this.trustCommerceUrl=this.trustCommerceService.prepareUrl(this.totalCopayAmount,n[0].processorData)),this.redirectService.setActiveTask(this.task),this.copayTaskList=this.task.copayTaskList,this.isCopayLoading=!1,this.cdr.markForCheck(),!(this.totalCopayAmount>0)&&this.markCheckInTaskAsCompleted().subscribe(()=>{this.task.status=Ee.DONE,this.redirectService.setActiveTask(this.task)})},error:()=>{this.isCopayLoading=!1,this.copayError=!0,this.cdr.markForCheck()}})}markCheckInTaskAsCompleted(){return Ae(this.copayTaskList.map(n=>this.checkInFlowService.markCheckInFlowTask(Ee.DONE,n.source.appointment.id,n.settingId)))}initiateCardPayment(){this.redirectService.navigate([this.getCopayCreateUrl()])}getCopayCreateUrl(){return this.redirectService.getBaseUrl()+"/copay-create"}continueToNextTask(){this.checkInFlowService.moveForwardFromCompletedTask(this.task)}};a.\u0275fac=function(i){return new(i||a)(_(x),_(Me),_(R),_(Mt),_(bt),_(fe),_(dt))},a.\u0275cmp=b({type:a,selectors:[["app-copay-data"]],standalone:!1,decls:9,vars:11,consts:[[1,"copay-data",3,"ngStyle"],[1,"copay-data-wrapper"],[1,"header"],[3,"params"],[1,"title"],[1,"loading-container"],[1,"content"],[1,"loading-text"],["class","description",4,"ngIf"],[1,"footer"],[3,"trustCommerceUrl"],["libButton","","type","button",1,"button"],[1,"disclaimer"],[1,"description"],[1,"copay-task"],[1,"total-amount","description"],[1,"label"],[1,"amount"],["class","copay-task",4,"ngIf"],[1,"appointment-title"],[1,"copay-amount"],[3,"cardPaymentTriggered","trustCommerceUrl"],["libButton","","type","button",1,"button",3,"click"]],template:function(i,r){i&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),k(3,"lib-svg-icon",3),s(4,"h1",4),d(5),p(6,"translate"),c()(),ee(7,gr,3,1,"div",5)(8,vr,15,11,"div",6),c()()),i&2&&(l("ngStyle",W(6,lr,"linear-gradient(to bottom right,"+r.task.todo.category.backgroundColor+","+r.hexToRgba(r.task.todo.category.backgroundColor,.6)+")")),o(3),l("params",Z(8,pr,r.task.todo.category.icon,r.task.todo.category.backgroundColor)),o(2),P(m(6,4,"Copay")),o(2),te(r.isCopayLoading||r.copayError?7:8))},dependencies:[T,Le,A,G,Vi,Qt,S,Ge],styles:["[_nghost-%COMP%]{height:100%}.loading-container[_ngcontent-%COMP%]{position:relative;flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2rem;padding:1rem;text-align:center;line-height:1.5}.copay-data[_ngcontent-%COMP%]{background-color:#f99143;box-sizing:border-box;padding:1.5rem 1.25rem;color:#505050;height:fit-content;min-height:100%;display:flex;width:100%}.copay-data[_ngcontent-%COMP%] .copay-data-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;border-radius:8px;width:100%}.copay-data[_ngcontent-%COMP%] .copay-data-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:1.25rem 2rem;box-sizing:border-box}.copay-data[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{--svg-size: 2rem;display:flex;box-sizing:border-box;padding:2rem;background:#f9914326;width:100%;gap:1rem;align-items:center}.copay-data[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1.125rem;font-family:Roboto-bold,sans-serif}.copay-data[_ngcontent-%COMP%] .copay-task[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;
1align-items:center}.copay-data[_ngcontent-%COMP%] .copay-task[_ngcontent-%COMP%] .appointment-title[_ngcontent-%COMP%]{font-size:.75rem}.copay-data[_ngcontent-%COMP%] .copay-task[_ngcontent-%COMP%] .copay-amount[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif}.copay-data[_ngcontent-%COMP%] .copay-task[_ngcontent-%COMP%]:last-child{margin-bottom:1rem}.copay-data[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:.75rem}.copay-data[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem}.copay-data[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .amount[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif}.copay-data[_ngcontent-%COMP%] .total-amount[_ngcontent-%COMP%] .amount[_ngcontent-%COMP%]{font-size:3.5rem;color:#064060;font-family:Roboto-light,sans-serif}.copay-data[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex!important;flex-direction:column;align-items:center;margin-top:4rem;padding-bottom:1.5rem}.copay-data[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{width:15rem}.disclaimer[_ngcontent-%COMP%]{font-size:.75rem;padding-top:1.5rem;text-align:center;letter-spacing:.014rem}.disclaimer[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-top:1rem}@media(min-width:700px){.copay-data[_ngcontent-%COMP%]{padding:1.5rem 2.5rem}}"],changeDetection:0});let e=a;return e})();var Pr=()=>({standalone:!0});function Mr(e,a){if(e&1&&(s(0,"option",29),d(1),c()),e&2){let t=a.$implicit;l("ngValue",t),o(),u(" ",t.name," ")}}function Or(e,a){if(e&1&&(s(0,"div",30),d(1),p(2,"translate"),c()),e&2){let t=g();o(),u(" ",m(2,1,t.getErrorFromList("cardHolderName"))," ")}}function kr(e,a){if(e&1&&(s(0,"div",30),d(1),p(2,"translate"),c()),e&2){let t=g();o(),u(" ",m(2,1,t.getErrorFromList("cardNumber"))," ")}}function yr(e,a){if(e&1&&(s(0,"div",30),d(1),p(2,"translate"),c()),e&2){let t=g();o(),u(" ",m(2,1,t.getErrorFromList("cardSecurityCode"))," ")}}function xr(e,a){if(e&1&&(s(0,"option",29),d(1),c()),e&2){let t=a.$implicit;l("ngValue",t),o(),u(" ",t," ")}}function br(e,a){if(e&1&&(s(0,"div",30),d(1),p(2,"translate"),c()),e&2){let t=g();o(),u(" ",m(2,1,t.getErrorFromList("expirationMonth"))," ")}}function Sr(e,a){if(e&1&&(s(0,"option",29),d(1),c()),e&2){let t=a.$implicit;l("ngValue",t),o(),u(" ",t," ")}}function wr(e,a){if(e&1&&(s(0,"div",30),d(1),p(2,"translate"),c()),e&2){let t=g();o(),u(" ",m(2,1,t.getErrorFromList("expirationYear"))," ")}}function Tr(e,a){if(e&1&&(s(0,"div",30),d(1),p(2,"translate"),c()),e&2){let t=g();o(),u(" ",m(2,1,t.getErrorFromList("billingAddress"))," ")}}function Ir(e,a){if(e&1&&(s(0,"div",30),d(1),p(2,"translate"),c()),e&2){let t=g();o(),u(" ",m(2,1,t.getErrorFromList("billingZipCode"))," ")}}var bn=(()=>{let a=class a{constructor(){this.isAmexCard=!1,this.yearList=[],this.monthList=[...Array(12).keys()].map(n=>++n)}ngOnInit(){this.initYearList()}ngOnChanges(n){n.cardTypes&&this.cardTypes&&this.cardTypes.length&&(this.selectedCardType||(this.selectedCardType=this.cardTypes[0],this.onCardTypeChange(this.selectedCardType)))}initYearList(){let n=new Date().getFullYear(),i=n+20;for(;n<=i;)this.yearList.push(n++)}getErrorFromList(n){return this.respErrorList?.error?.form?.[n]?.errors?.[0]}onCardTypeChange(n){this.isAmexCard=n.method==="AMEX"}};a.\u0275fac=function(i){return new(i||a)},a.\u0275cmp=b({type:a,selectors:[["app-card-fields"]],inputs:{cardTypes:"cardTypes",respErrorList:"respErrorList"},standalone:!1,features:[Jn([],[{provide:ti,useExisting:_t}]),qn],decls:58,vars:63,consts:[[1,"body"],[1,"card-type","item"],["for","cardType",1,"required-field"],["id","cardType","autocomplete","cc-type","required","",3,"ngModelChange","ngModelOptions","ngModel"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"card-holder-name","item"],["for","cardHolderName",1,"required-field"],["type","text","id","cardHolderName","autocomplete","cc-name","name","name","ngModel","","required",""],["class","error error-message","role","alert","aria-atomic","true",4,"ngIf"],[1,"card-number","item"],["for","cardNumber",1,"required-field"],["type","text","inputmode","numeric","pattern","[0-9]*","id","cardNumber","name","number","autocomplete","cc-number","ngModel","","required","",3,"mask"],[1,"card-security-code","item"],["for","cardSecurityCode",1,"required-field"],["type","text","inputmode","numeric","id","cardSecurityCode","pattern","[0-9]*","name","cvc","autocomplete","cc-csc","ngModel","","required",""],[1,"exp-date","item"],[1,"required-field"],[1,"select"],[1,"month"],["
1id","dateSelect","autocomplete","cc-exp-month","name","month","ngModel","","required","",1,"exp-month"],["value",""],[1,"year"],["name","year","autocomplete","cc-exp-year","ngModel","","required","",1,"exp-year"],[1,"billing-address","item"],["for","billingAddress",1,"required-field"],["type","text","id","billingAddress","name","address","autocomplete","billing street-address","ngModel","","required",""],[1,"billing-zip-code","item"],["for","billingZipCode",1,"required-field"],["type","text","inputmode","numeric","pattern","[0-9]*","id","billingZipCode","autocomplete","billing postal-code","name","zip","ngModel","","required",""],[3,"ngValue"],["role","alert","aria-atomic","true",1,"error","error-message"]],template:function(i,r){i&1&&(s(0,"div",0)(1,"div",1)(2,"label",2),d(3),p(4,"translate"),c(),s(5,"select",3),V("ngModelChange",function(O){return B(r.selectedCardType,O)||(r.selectedCardType=O),O}),M("ngModelChange",function(O){return r.onCardTypeChange(O)}),f(6,Mr,2,2,"option",4),c()(),s(7,"div",5)(8,"label",6),d(9),p(10,"translate"),c(),k(11,"input",7),f(12,Or,3,3,"div",8),c(),s(13,"div",9)(14,"label",10),d(15),p(16,"translate"),c(),k(17,"input",11),f(18,kr,3,3,"div",8),c(),s(19,"div",12)(20,"label",13),d(21),p(22,"translate"),c(),k(23,"input",14),f(24,yr,3,3,"div",8),c(),s(25,"fieldset",15)(26,"legend",16),d(27),p(28,"translate"),c(),s(29,"div",17)(30,"div",18)(31,"select",19),p(32,"translate"),s(33,"option",20),d(34),p(35,"translate"),c(),f(36,xr,2,2,"option",4),c(),f(37,br,3,3,"div",8),c(),s(38,"div",21)(39,"select",22),p(40,"translate"),s(41,"option",20),d(42),p(43,"translate"),c(),f(44,Sr,2,2,"option",4),c(),f(45,wr,3,3,"div",8),c()()(),s(46,"div",23)(47,"label",24),d(48),p(49,"translate"),c(),k(50,"input",25),f(51,Tr,3,3,"div",8),c(),s(52,"div",26)(53,"label",27),d(54),p(55,"translate"),c(),k(56,"input",28),f(57,Ir,3,3,"div",8),c()()),i&2&&(o(3),u(" ",m(4,40,"Card Type")," "),o(2),l("ngModelOptions",z(62,Pr)),F("ngModel",r.selectedCardType),o(),l("ngForOf",r.cardTypes),o(),E("error",r.getErrorFromList("cardHolderName")),o(2),u(" ",m(10,42,"Name on Card")," "),o(3),l("ngIf",r.getErrorFromList("cardHolderName")),o(),E("error",r.getErrorFromList("cardNumber")),o(2),u(" ",m(16,44,"Card Number")," "),o(2),l("mask",r.isAmexCard?"0000 000000 00000":"0000 0000 0000 0000"),o(),l("ngIf",r.getErrorFromList("cardNumber")),o(),E("error",r.getErrorFromList("cardSecurityCode")),o(2),u(" ",m(22,46,"CVC Number")," "),o(3),l("ngIf",r.getErrorFromList("cardSecurityCode")),o(2),E("error",r.getErrorFromList("expirationMonth")||r.getErrorFromList("expirationYear")),o(),u(" ",m(28,48,"Expiration Date")," "),o(3),E("error",r.getErrorFromList("expirationMonth")),o(),H("aria-label",m(32,50,"Month")),o(3),P(m(35,52,"Month")),o(2),l("ngForOf",r.monthList),o(),l("ngIf",r.getErrorFromList("expirationMonth")),o(),E("error",r.getErrorFromList("expirationYear")),o(),H("aria-label",m(40,54,"Year")),o(3),P(m(43,56,"Year")),o(2),l("ngForOf",r.yearList),o(),l("ngIf",r.getErrorFromList("expirationYear")),o(),E("error",r.getErrorFromList("billingAddress")),o(2),u(" ",m(49,58,"Billing Address")," "),o(3),l("ngIf",r.getErrorFromList("billingAddress")),o(),E("error",r.getErrorFromList("billingZipCode")),o(2),u(" ",m(55,60,"Zip Code")," "),o(3),l("ngIf",r.getErrorFromList("billingZipCode")))},dependencies:[Ct,ft,Ce,ut,ie,ht,vt,oe,je,me,T,S],styles:['.error[_ngcontent-%COMP%]{color:#de000d!important}.error[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .error[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{border-color:#de000d!important;color:#de000d!important}.error-message[_ngcontent-%COMP%]{margin-top:.5rem}.required-field[_ngcontent-%COMP%]:after{content:"*"}.body[_ngcontent-%COMP%]{background:#fff;border-radius:8px;padding:1.5rem 1.25rem;display:flex;flex-wrap:wrap;gap:1.25rem;flex:1}.body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch;text-align:left;width:100%;font-size:1rem}.body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{margin-bottom:.5rem;font-size:.75rem;line-height:.75rem}.body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial;border-radius:8px;text-align:left;text-align:-webkit-left;color:#505050;border-color:#949494;background-color:#fff;font-size:1rem}.body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button, .body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear, .body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator, .body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring, .body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%], .body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] select.ng-dirty[_ngcontent-%COMP%]{border-color:#505050}.body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled, .body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:disabled{background:#efefef;border-color:#80808014;color:#505050;-webkit-text-fill-color:#505050;opacity:1}.body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{background-image:linear-gradient(45deg,transparent 50%,#949494 50%),linear-gradient(135deg,#949494 50%,transparent 50%);background-position:calc(100% - 20px) calc(1em + 2px),calc(100% - 15px) calc(1em + 2px);background-size:5px 5px,5px 5px,1px 1.5em;background-repeat:no-repeat;appearance:none}.body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-ms-expand{display:none}.body[_ngcontent-%COMP%] .item.exp-date[_ngcontent-%COMP%] .select[_ngcontent-%COMP%]{display:flex;gap:1.25rem}.body[_ngcontent-%COMP%] .item.exp-date[_ngcontent-%COMP%] .select[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1}@media(min-width:700px){.body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{width:calc(50% - .625rem)!important}}']});let e=a;return e})();var Ar=["form"];function Er(e,a){if(e&1&&(s(0,"div")(1,"p",6),d(2),p(3,"translate"),c()()),e&2){let t=g(2);o(2),u(" ",m(3,1,t.getErrorFromLocal())," ")}}function Dr(e,a){if(e&1&&(s(0,"div",5)(1,"h1",6),d(2),p(3,"translate"),c(),f(4,Er,4,3,"div",7),s(5,"p",8),d(6),p(7,"translate"),c()()),e&2){let t=g();o(2),P(m(3,3,"Payment error ...")),o(2),l("ngIf",t.getErrorFromLocal()),o(2),u(" ",m(7,5,"We c
1ouldn't process your payment. Please try again or use a different card.")," ")}}function Fr(e,a){if(e&1){let t=y();s(0,"iframe",9),M("load",function(i){h(t);let r=g();return v(r.onIframeLoad(i))}),c()}if(e&2){let t=g();l("src",t.trustCommerceUrl,Hn)}}function Br(e,a){e&1&&(s(0,"div",16)(1,"h1",17),d(2),p(3,"translate"),c(),s(4,"p",8),d(5),p(6,"translate"),c()()),e&2&&(o(2),u(" ",m(3,2,"Card details")," "),o(3),u(" ",m(6,4,"Please enter your card details")," "))}function Vr(e,a){e&1&&(s(0,"div",18)(1,"label",19),k(2,"input",20)(3,"span",21),d(4),p(5,"translate"),c()()),e&2&&(o(4),u(" ",m(5,1,"Save Card")," "))}function Rr(e,a){if(e&1){let t=y();s(0,"form",10,0),M("ngSubmit",function(){h(t);let i=U(1),r=g();return v(r.submitForm(i))}),f(2,Br,7,6,"div",11),k(3,"app-card-fields",12),f(4,Vr,6,3,"div",13),s(5,"div",14)(6,"button",15),d(7),p(8,"translate"),c()()()}if(e&2){let t=g();o(2),l("ngIf",!t.paymentFailed),o(),l("cardTypes",t.cardTypes)("respErrorList",t.respErrorList),o(),l("ngIf",t.isStoreCardOnFile),o(2),l("disabled",t.paymentFailed===!1),o(),u(" ",m(8,6,"SUBMIT")," ")}}var jd=(()=>{let a=class a{constructor(n,i,r,C,O,w,I,K,J,Oe,Te,ct,Zt,Tn,Oo,ko){this.redirectService=n,this.modalWindowService=i,this.appointmentApiService=r,this.paymentApiService=C,this.demographicsApiService=O,this.currentUser=w,this.checkInFlowService=I,this.onFlyTasksFlowService=K,this.copayService=J,this.clinicApiService=Oe,this.trustCommerceService=Te,this.sanitizer=ct,this.loggingService=Zt,this.configService=Tn,this.deviceService=Oo,this.storageService=ko,this.monthList=[],this.yearList=[],this.copayRespList=[],this.trustCommerceFlow=!1,this.showTrustCommerce=!1,this.trustCommerceResult={}}ngOnInit(){this.task=this.redirectService.getActiveTask(),this.initTrustCommerce(),this.trustCommerceFlow||(this.initialize(()=>{this.paymentApiService.getCardTypes(this.clinicUuid).subscribe(n=>this.cardTypes=n)}),this.initMonthList(),this.initYearList(),this.initUserData())}initModulePermissionAndGetContracts(){this.clinicApiService.isClinicModuleActiveByDepartment(this.clinicUuid,this.departmentUuid,Ut.ONE_YEAR_PAYMENT_CONTRACT).pipe(_e(Boolean),L(()=>this.paymentApiService.getOneYearContractList(this.clinicUuid,this.userId,this.departmentUuid)),he(n=>n.length===0)).subscribe(n=>this.isStoreCardOnFile=n)}initialize(n){let i=this.task?.todo?.source?.appointment_id??null;i?this.appointmentApiService.get(i).subscribe(r=>{this.clinicUuid=r.clinicUuid,this.departmentUuid=r.departmentUuid,this.patientId=r.patientId,this.initModulePermissionAndGetContracts(),n()}):(this.clinicUuid=this.task?.clinicUuid,n())}initMonthList(){this.monthList=[...Array(12).keys()].map(n=>++n)}initYearList(){let n=new Date().getFullYear(),i=n+20;for(;n<=i;)this.yearList.push(n++)}initUserData(){this.currentUser.getModel().pipe(Q(n=>{this.userId=n.id,this.userName=n.name}),L(({id:n})=>this.demographicsApiService.getAddress(this.clinicUuid,n))).subscribe(n=>{this.userData=n,this.setUserData()})}setUserData(){this.task.paymentEmail=this.userData.email,this.userEmail=this.userData.email,this.userForm.setValue({address:this.userData.address,cvc:"",month:"",name:this.userData.name||this.userName,number:"",year:"",zip:this.userData.zipCode?this.userData.zipCode.replace("-","").trim():""})}submitForm(n){this.isContractPageRedirect=n.value.storeCardOnFile,this.paymentFailed=!1,this.checkInFlowService.isCheckInAppFlow()&&this.task.valueType!==D.OUTSTANDING_BALANCE?this.prepareForSendCheckInFlowCopay(n):this.prepareForSendCopay(n)}prepareForSendCheckInFlowCopay(n){n.value.receipt&&(this.task.paymentEmail=this.userData.email),this.redirectService.setActiveTask(this.task),this.paymentData={clinicUuid:this.clinicUuid,cardNumber:n.value.number,expirationYear:n.value.year,expirationMonth:n.value.month,cardSecurityCode:n.value.cvc,billingAddress:n.value.address,billingZipCode:n.value.zip,cardHolderName:n.value.name,emailReceipt:!0,storeCard:n.value.storeCard,email:this.userEmail,confirm:!1,paymentData:{},paymentSource:It.CHECK_IN},this.sendCheckInFlowForm()}setupCheckInFlowPaymentData(){this.copayRespList=[],this.forcePayment&&(this.paymentData.confirm=!0);for(let n of this.task.copayTaskList)n.amount&&(this.paymentData.paymentData={appointment:{appointmentId:n.source.appointment.i
1d,amount:n.amount,sourceType:n.sourceType==="custom-copay"?"copay":n.sourceType,sourceId:n.sourceId}},this.copayRespList.push(this.paymentApiService.postPayment(Object.assign({},this.paymentData))));this.copayService.paymentData=this.paymentData}prepareForSendCopay(n){if(n.value.receipt&&(this.task.paymentEmail=this.userData.email),this.redirectService.setActiveTask(this.task),this.paymentData={clinicUuid:this.clinicUuid,cardNumber:n.value.number,expirationYear:n.value.year,expirationMonth:n.value.month,cardSecurityCode:n.value.cvc,billingAddress:n.value.address,billingZipCode:n.value.zip,cardHolderName:n.value.name,emailReceipt:!0,storeCard:n.value.storeCard,email:this.userEmail,confirm:!1,paymentData:{},paymentSource:this.checkInFlowService.isCheckInAppFlow()?It.CHECK_IN:It.MANUAL_FAST_PAY},this.onFlyTasksFlowService.isOnFlyTasksFlow()){let i=this.onFlyTasksFlowService.getFlowResultUuid(this.clinicUuid,String(this.userId));i&&(this.paymentData.flowResultUuid=i),this.paymentData.paymentSource=this.onFlyTasksFlowService.getPaymentSource(this.clinicUuid,String(this.userId))}switch(this.task.valueType){case D.COPAY:this.paymentData.paymentData={appointment:{appointmentId:this.task.todo.source.appointment_id,amount:Array.isArray(this.task.todo.actions[0].value)&&this.task.todo.actions[0].value[0]!=="0"?Number(this.task.todo.actions[0].value[0]):this.task.copay?.amount,sourceType:this.task.copay?.sourceType==="custom-copay"?"copay":this.task.copay?.sourceType,sourceId:this.task.copay?.sourceId}};break;case D.OUTSTANDING_BALANCE:this.paymentData.paymentData={balance:{amount:this.task.outstandingBalance.amount,departmentUuid:this.task.outstandingBalance.departmentUuid}};break;case D.SELF_PAY:this.paymentData.paymentData={balance:{amount:this.task.paymentRequest.reduce((i,r)=>i+r.amount,0),departmentUuid:this.task.departmentUuid}};break}this.sendForm()}forceConfirm(){this.modalWindowService.confirm("Are you sure you want to proceed with this payment?","Confirmation","YES","NO").pipe(Q(n=>{n||(this.paymentFailed=void 0)}),_e(Boolean)).subscribe(()=>{this.paymentData.confirm=!0,this.forcePayment=!0,this.checkInFlowService.isCheckInAppFlow()&&this.task.valueType!==D.OUTSTANDING_BALANCE?this.sendCheckInFlowForm():this.sendForm()})}sendCheckInFlowForm(){this.setupCheckInFlowPaymentData(),Ae(this.copayRespList).subscribe({next:n=>{n[0].status===202?this.forceConfirm():this.markCheckInTaskAsCompleted()},error:n=>{this.paymentFailed=!0,n.error.hasOwnProperty("form")?(this.respErrorLocal=!1,this.respErrorList=n):(this.respErrorList=!1,this.respErrorLocal=n)}})}markCheckInTaskAsCompleted(){let n=this.task.copayTaskList.map(i=>this.checkInFlowService.markCheckInFlowTask(Ee.DONE,i.source.appointment.id,i.settingId));Ae(n).subscribe(()=>{this.isContractPageRedirect?this.redirectService.navigate([this.redirectService.getBaseUrl()+"/copay-contract"]):this.checkInFlowService.moveForwardFromCompletedTask(this.task)})}sendForm(){this.copayService.paymentData=this.paymentData,this.paymentApiService.postPayment(this.paymentData).pipe(Q(({status:n})=>{n===202?this.forceConfirm():this.isContractPageRedirect&&this.redirectService.navigate([this.redirectService.getBaseUrl()+"/copay-contract"])}),_e(({status:n})=>n!==202&&!this.isContractPageRedirect),L(()=>this.task.valueType===D.COPAY?this.redirectService.completeTaskAndSetItActive(this.task):ge(null))).subscribe({next:()=>{this.checkInFlowService.isCheckInAppFlow()?this.markCheckInTaskAsCompleted():this.onFlyTasksFlowService.isOnFlyTasksFlow()?this.onFlyTasksFlowService.markTaskAsDoneAndMoveForward(this.task):this.copayService.gotoThankYouPage()},error:n=>{this.paymentFailed=!0,n.error.hasOwnProperty("form")?(this.respErrorLocal=!1,this.respErrorList=n):(this.respErrorList=!1,this.respErrorLocal=n)}})}getErrorFromLocal(){return this.respErrorLocal?.error?.errors?.[0]?.detail}getProcessorData(){return this.task.valueType===D.OUTSTANDING_BALANCE?this.task.outstandingBalance.processorData:this.task.copayTaskList?.[0].processorData}getAmount(){if(this.task.valueType===D.OUTSTANDING_BALANCE)return this.task.outstandingBalance.amount;if(this.task.valueType===D.SELF_PAY)return this.task.paymentRequest.reduce((i,r)=>i+r.amount,0);let n=0;for(let i of this.task.copayTaskList)i.amount&&(n+=i.amount);return n}
1initTrustCommerce(){if(!this.checkInFlowService.isCheckInAppFlow()&&!this.onFlyTasksFlowService.isOnFlyTasksFlow())return;let n=this.getProcessorData();if(!n||n.type!=="trust_commerce")return;let i=this.getAmount();"userId"in this.task?this.userId=this.task.userId:this.currentUser.getModel().subscribe(r=>this.userId=r.id),this.initialize(()=>{this.patientId||this.demographicsApiService.getClinicUserDetails(this.clinicUuid,this.userId).subscribe(({patientId:r})=>this.patientId=r)}),this.trustCommerceFlow=!0,this.showTrustCommerce=!0,this.trustCommerceUrl=this.sanitizer.bypassSecurityTrustResourceUrl(this.trustCommerceService.prepareUrl(i,n,{includeWallets:!1}))}onIframeLoad(n){try{let r=n.target.contentWindow?.location;this.loggingService.log({message:"Checking url for trustCommerce params",tcUrl:r.toString(),loggingApplication:this.configService.getAppName(),flow:this.storageService.get("appFlow"),page:window.location.href,os:this.deviceService.getOS()});let C=new URLSearchParams(r.search);this.trustCommerceResult=this.trustCommerceService.parseParams(C),this.trustCommerceResult.result&&this.postTrustCommercePayment(this.trustCommerceResult)}catch(i){i instanceof DOMException&&i.name==="SecurityError"||console.error(i)}}postTrustCommercePayment(n){this.trustCommerceService.postTrustCommercePayment(this.task,n,{clinicUuid:this.clinicUuid,patientId:this.patientId,userId:this.userId,errorCallback:i=>{this.paymentFailed=!0,this.trustCommerceResult={},i.error.hasOwnProperty("form")?(this.respErrorLocal=!1,this.respErrorList=i):(this.respErrorList=!1,this.respErrorLocal=i)}})}};a.\u0275fac=function(i){return new(i||a)(_(x),_(Ot),_(j),_(Me),_(Ue),_(re),_(R),_(We),_(xt),_(Ze),_(bt),_(gt),_(Cn),_(ae),_(Pe),_(Mt))},a.\u0275cmp=b({type:a,selectors:[["app-copay-create"]],viewQuery:function(i,r){if(i&1&&le(Ar,5),i&2){let C;pe(C=de())&&(r.userForm=C.first)}},standalone:!1,decls:4,vars:3,consts:[["form","ngForm"],["id","formElement",1,"copay-create"],["class","header error-panel",4,"ngIf"],["class","tc-iframe","sandbox","allow-scripts allow-same-origin allow-forms",3,"src","load",4,"ngIf"],["aria-labelledby","copay-title",3,"ngSubmit",4,"ngIf"],[1,"header","error-panel"],[1,"title","error-title"],[4,"ngIf"],[1,"description"],["sandbox","allow-scripts allow-same-origin allow-forms",1,"tc-iframe",3,"load","src"],["aria-labelledby","copay-title",3,"ngSubmit"],["class","header",4,"ngIf"],[3,"cardTypes","respErrorList"],["class","store-card-on-file",4,"ngIf"],[1,"footer"],["libButton","","type","submit",3,"disabled"],[1,"header"],["id","copay-title",1,"title"],[1,"store-card-on-file"],["for","save-card",1,"element"],["type","checkbox","id","save-card","name","storeCardOnFile","ngModel","",1,"checkbox"],[1,"mark"]],template:function(i,r){i&1&&(s(0,"div",1),f(1,Dr,8,7,"div",2)(2,Fr,1,1,"iframe",3)(3,Rr,9,8,"form",4),c()),i&2&&(o(),l("ngIf",r.paymentFailed),o(),l("ngIf",r.showTrustCommerce&&!r.trustCommerceResult.result),o(),l("ngIf",!r.showTrustCommerce))},dependencies:[zt,on,ie,Nt,oe,_t,T,G,bn,S],styles:['.header[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-bottom:1.5rem;gap:.5rem}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:center;line-height:1.31rem;font-family:Roboto-bold,sans-serif;font-size:1.125rem;color:#064060}.header[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:1.5rem;color:#505050;font-size:1rem;text-align:left;margin:0 1rem}[_nghost-%COMP%]{height:100%}.header[_ngcontent-%COMP%]{width:100%}.error-panel[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:1.5rem 1rem}.error-panel[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{text-align:center}.copay-create[_ngcontent-%COMP%]{width:100%;height:100%;background:#8080801a;overflow:auto;display:flex;flex-direction:column}.copay-create[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{box-sizing:border-box;padding:1.5rem 1rem;width:100%}.copay-create[_ngcontent-%COMP%] .store-card-on-file[_ngcontent-%COMP%]{display:flex;width:100%;align-items:center}.copay-create[_ngcontent-%COMP%] .store-card-on-file[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{display:flex;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-direction:row;align-items:center;width:100%;margin:2rem auto;text-align:left;align-items:inherit;justify-content:center;font-size:.875rem;margin-bottom:0;margin-top:2.5rem}.copay-create[_ngcontent-%COMP%] .store-card-on-file[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.copay-create[_ngcontent-%COMP%] .store-card-on-file[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{height:2.5rem;width:2.5rem;background-color:"transparent";border:1px solid #e6e6e6;margin:0 1rem;flex:.15}
1.copay-create[_ngcontent-%COMP%] .store-card-on-file[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex:.85}.copay-create[_ngcontent-%COMP%] .store-card-on-file[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{content:"";display:none}.copay-create[_ngcontent-%COMP%] .store-card-on-file[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%]:after, .copay-create[_ngcontent-%COMP%] .store-card-on-file[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[type=checkbox].checked[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]:after{display:block}.copay-create[_ngcontent-%COMP%] .store-card-on-file[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{margin-left:.7rem;margin-top:.1rem;width:1rem;height:1.4rem;border:solid var(--branding-primary-color);border-width:0 .3rem .3rem 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.copay-create[_ngcontent-%COMP%] .store-card-on-file[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[type=checkbox].checked[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%], .copay-create[_ngcontent-%COMP%] .store-card-on-file[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%]{background-color:var(--branding-primary-color);border-color:var(--branding-primary-color)}.copay-create[_ngcontent-%COMP%] .store-card-on-file[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{width:1.1rem;height:1.1rem;flex:inherit;border-color:#949494;border-radius:.3rem;margin:0 1rem 0 0}.copay-create[_ngcontent-%COMP%] .store-card-on-file[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{margin-top:.13rem;margin-left:.33rem;width:.3rem;height:.5rem;border-width:0 .15rem .15rem 0;border-color:#fff}.copay-create[_ngcontent-%COMP%] .store-card-on-file[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark.disabled[_ngcontent-%COMP%]{opacity:.6}.copay-create[_ngcontent-%COMP%] .store-card-on-file[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{line-height:1.2rem}.copay-create[_ngcontent-%COMP%] .store-card-on-file[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .label.disabled[_ngcontent-%COMP%]{opacity:.6}.copay-create[_ngcontent-%COMP%] .error-title[_ngcontent-%COMP%]{color:#de000d}.copay-create[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex!important;justify-content:center;padding-top:2.5rem;padding-bottom:1.5rem}.copay-create[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:auto;min-width:15rem}.tc-iframe[_ngcontent-%COMP%]{width:100%;flex:1}@media(min-width:700px){form[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{padding:1.5rem 2.5rem}.body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{width:calc(50% - .625rem)!important}}']});let e=a;return e})();var Ye=(()=>{let a=class a extends Yi{constructor(n,i,r){super(),this.currentUserService=n,this.redirectTaskService=i,this.mediatorService=r,this.mediatorService.listen("resetAndLoadDemographics").subscribe(()=>{this.resetData(),this.loadDataIfNeeded()})}getAccountData(){return this.currentUserService.getModel()}navigateToFirstStep(){this.redirectTaskService.navigate([this.redirectTaskService.getBaseUrl()+"/demographic/personal"])}navigateToSecondStep(){this.redirectTaskService.navigate([this.redirectTaskService.getBaseUrl()+"/demographic/contact-info"])}navigateToThirdStep(){this.redirectTaskService.navigate([this.redirectTaskService.getBaseUrl()+"/demographic/emergency-info"])}getActiveTask(){return this.redirectTaskService.getActiveTask()}};a.\u0275fac=function(i){return new(i||a)(ce(re),ce(x),ce(ki))},a.\u0275prov=lt({token:a,factory:a.\u0275fac,providedIn:"root"});let e=a;return e})();var St=(()=>{let a=class a{};a.\u0275fac=function(i){return new(i||a)},a.\u0275cmp=b({type:a,selectors:[["app-demographics-header"]],inputs:{currentStep:"currentStep"},standalone:!1,decls:10,vars:10,consts:[[1,"header"],[1,"title"],[1,"stepper"],[1,"description"]],template:function(i,r){i&1&&(s(0,"div",0)(1,"h1",1),d(2),p(3,"translate"),c(),s(4,"div",2),d(5),p(6,"translate"),c(),s(7,"div",3),d(8),p(9,"translate"),c()()),i&2&&(o(2),u(" ",m(3,4,"Update Demographics")," "),o(3),He("",m(6,6,"Step")," ",r.currentStep,"/4"),o(3),u(" ",m(9,8,"Please review and update the patient\u2019s demographic details")," "))},dependencies:[S],styles:[".header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding-bottom:1.5rem;text-align:center}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding-bottom:1rem;line-height:1.31rem;font-family:Roboto-bold,sans-serif;font-size:1.125rem;color:#064060}.header[_ngcontent-%COMP%] .stepper[_ngcontent-%COMP%]{font-size:.75rem}.header[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:1.5rem;color:#505050;font-size:1rem;text-align:left;margin:1rem 1rem 0}"]});let e=a;return e})();var Lr=()=>({name:"arrow-right",color:"#fff"});function Nr(e,a){if(e&1){let t=y();s(0,"div",23)(1,"label",24),d(2),p(3,"translate"),c(),s(4,"input",25),V("ngModelChange",function(i){h(t);let r=g(2);return B(r.userData.personal.ssn,i)||(r.userData.personal.ssn=i),v(i)}),c()()}if(e&2){let t=g(2);o(2),P(m(3,2,"Social Security Number")),o(2),F("ngModel",t.userData.personal.ssn)}}function zr(e,a){e&1&&Ft(0)}function Ur(e,a){if(e&1&&(s(0,"div",26),f(1,zr,1,0,"ng-container",27),c()),e&2){g(2);let t=U(2);o(),l("ngTemplateOutlet",t)}}function jr(e,a){if(e&1){let t=y();s(0,"div",2),k(1,"app-demographics-header",3),s(2,"div",4)(3,"div",5)(4,"label",6),d(5),p(6,"translate"),c(),k(7,"input",7),c(),s(8,"div",8)(9,"label",9),d(10),p(11,"translate"),c(),k(12,"input",10),c(),f(13,Nr,5,4,"div",11),s(14,"div",12)(15,"label",13),d(16),p(17,"translate"),c(),s(18,"input",14),V("ngModelChange",function(i){h(t);let r=g();return B(r.userData.address.address,i)||(r.userData.address.address=i),v(i)}),c()(),s(19,"div",15)(20,"label",16),d(21),p(22,"translate"),c(),s(23,"input",17),V("ngModelChange",function(i){h(t);let r=g();return B(r.userData.address.city,i)||(r.userData.address.city=i),v(i)}),c()(),f(24,Ur,2,1,"div",18),c(),s(25,"div",19)(26,"button",20),M("click",function(){h(t);let i=g();return v(i.nextPage())}),d(27),p(28,"translate"),s(29,"span",21),k(30,"lib-svg-icon",22),c()()()()}if(e&2){let t=g(),n=U(2);o(),l("currentStep",1),o(4),P(m(6,16,"Legal First Name")),o(2),l("disabled",!0)("value",t.userData.personal.firstName),o(3),P(m(11,18,"Legal Last Name")),o(2),l("disabled",!0)("value",t.userData.personal.lastName),o(),l("ngIf",t.isSsnModuleEnabled),o(3),P(m(17,20,"Address")),o(2),F("ngModel",t.userData.address.address),o(3),P(m(22,22,"City")),o(2),F("ngModel",t.userData.address.city),o(),l("ngIf",t.isSsnModuleEnabled)("ngIfElse",n),o(3),u(" ",m(28,24,"NEXT")," "),o(3),l("params",z(26,Lr))}}function Wr(e,a){if(e&1&&(s(0,"option",37),d(1),c()),e&2){let t=a.$implicit;l("ngValue",t.id),o(),u(" ",t.title," ")}}function qr(e,a){e&1&&(s(0,"div",38),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"This value is not a valid ZIP code.")," "))}function Yr(e,a){if(e&1){let t=y();s(0,"div",28)(1,"label",29),d(2),p(3,"translate"),c(),s(4,"select",30),V("ngModelChange",function(i){h(t);let r=g();return B(r.userData.address.countryStateId,i)||(r.userData.address.countryStateId=i),v(i)}),s(5,"option",31),d(6),p(7,"translate"),c(),f(8,Wr,2,2,"option",32),c()(),s(9,"div",33)(10,"label",34),d(11),p(12,"translate"),c(),s(13,"input",35),V("ngModelChange",function(i){h(t);let r=g();return B(r.userData.address.zipCode,i)||(r.userData.address.zipCode=i),v(i)}),c(),f(14,qr,3,3,"div",36),c()}if(e&2){let t=g();o(2),P(m(3,12,"State")),o(2),F("ngModel",t.userData.address.countryStateId),o(),l("ngValue",null)("selected",!0),o(),u(" ",m(7,14,"Select")," "),o(2),l("ngForOf",t.userData.stateList),o(),E("error",t.isZipCodeInvalid),o(2),u("",m(12,16,"Zip Code")," *"),o(2),l("dropSpecialCharacters",!1),F("ngModel",t.userData.address.zipCode),o(),l("ngIf",t.isZipCodeInvalid)}}var om=(()=>{let a=class a extends Wi{constructor(n,i,r,C,O){super(n,i),this.redirectTaskService=r,this.checkInFlowService=C,this.clinicApiService=O,this.demographicsTaskService.loadDataIfNeeded()}ngOnInit(){let n=this.checkInFlowService.getCheckInFlowClinicUuid();n&&this.clinicApiService.isClinicModuleActive(n,Ut.SSN_SUPPORT).subscribe(i=>{this.isSsnModuleEnabled=i})}onZipCodeValidationSuccess(){this.redirectTaskService.navigate([this.redirectTaskService.getBaseUrl()+"/demographic/contact-info"])}};a.\u0275fac=function(i){return new(i||a)(_(Ye),_(Ne),_(x),_(R),_(Ze))},a.\u0275cmp=b({type:a,selectors:[["app-user-personal"]],standalone:!1,features:[be],decls:3,vars:1,consts:[["stateAndZipCodeTemplate",""],["class","demographic",4,"ngIf"],[1,"demographic"],[3,"currentStep"],[1,"content"],[1,"first-name"],["for","firstName"],["id","firstName",3,"disabled","value"],[1,"last-name"],["for","lastName"],["id","lastName",3,"disabled","value"],["class","ssn",4,"ngIf"],[1,"address"],["for","address"],["id","address","autocomplete","street-address",3,"ngModelChange","ngModel"],[1,"city"],["for","city"],["id","city","autocomplete","address-level2",3,"ngModelChange","ngModel"],["class","half-size-control
1s",4,"ngIf","ngIfElse"],[1,"navigation"],["libButton","","type","button",1,"btn-right",3,"click"],[1,"arrow"],[3,"params"],[1,"ssn"],["for","ssn"],["id","ssn","type","text","inputmode","numeric","mask","000000000","pattern","[0-9]*",3,"ngModelChange","ngModel"],[1,"half-size-controls"],[4,"ngTemplateOutlet"],[1,"state"],["for","state"],["id","state","name","state","autocomplete","address-level1",3,"ngModelChange","ngModel"],[3,"ngValue","selected"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"zip-code"],["for","zipCode"],["id","zipCode","type","tel","autocomplete","postal-code","inputmode","numeric","mask","00000-0000","required","",1,"postal-code",3,"ngModelChange","dropSpecialCharacters","ngModel"],["aria-atomic","true","class","error-message","role","alert",4,"ngIf"],[3,"ngValue"],["aria-atomic","true","role","alert",1,"error-message"]],template:function(i,r){i&1&&f(0,jr,31,27,"div",1)(1,Yr,15,18,"ng-template",null,0,ue),i&2&&l("ngIf",(r.userData==null?null:r.userData.personal)&&(r.userData==null?null:r.userData.address)&&r.isSsnModuleEnabled!==void 0)},dependencies:[Ct,ft,Ce,ut,ie,ht,vt,oe,je,me,T,Rt,A,G,St,S],styles:[".error[_ngcontent-%COMP%]{color:#de000d!important}.error[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .error[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{border-color:#de000d!important;color:#de000d!important}[_nghost-%COMP%]{display:block;height:100%;background-color:#f5f5f5;overflow:auto}.demographic[_ngcontent-%COMP%]{display:flex;flex-direction:column;-webkit-overflow-scrolling:touch;padding:1rem}.error-message[_ngcontent-%COMP%]{padding:.5rem 0;color:#de000d}.content[_ngcontent-%COMP%]{background:#fff;border-radius:8px;padding:1.5rem 1.25rem;display:flex;flex-wrap:wrap;align-items:flex-end;gap:1.25rem;margin-bottom:3.4rem}.content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch;text-align:left;width:100%}.content[_ngcontent-%COMP%] .home-phone-inputs[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] .mobile-phone-inputs[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.content[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-bottom:.5rem;font-size:.75rem;line-height:.75rem}.content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]{text-align:left;text-indent:0;padding-top:0;display:flex;justify-content:flex-start}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;border-radius:4px;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-webkit-clear-button, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-ms-clear, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-webkit-inner-spin-button, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-webkit-calendar-picker-indicator, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]:-moz-focusring, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{border-radius:8px;text-align:left;text-align:-webkit-left;color:#505050;border-color:#949494;background-color:#fff}.content[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date].ng-dirty[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select.ng-dirty[_ngcontent-%COMP%]{border-color:#505050}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]:disabled, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:disabled{background:#efefef;border-color:#80808014;color:#505050;-webkit-text-fill-color:#505050;opacity:1}.content[_ngcontent-%COMP%] input.upper-first[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date].upper-first[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select.upper-first[_ngcontent-%COMP%]{text-transform:capitalize}.content[_ngcontent-%COMP%] input.upper-first[_ngcontent-%COMP%] option[_ngcontent-%COMP%]:first-letter, .content[_ngcontent-%COMP%] input[type=date].upper-first[_ngcontent-%COMP%] option[_ngcontent-%COMP%]:first-letter, .content[_ngcontent-%COMP%] select.upper-first[_ngcontent-%COMP%] option[_ngcontent-%COMP%]:first-letter{text-transform:capitalize}.content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{background-image:linear-gradient(45deg,transparent 50%,#949494 50%),linear-gradient(135deg,#949494 50%,transparent 50%);background-position:calc(100% - 20px) calc(1em + 2px),calc(100% - 15px) calc(1em + 2px);background-size:5px 5px,5px 5px,1px 1.5em;background-repeat:no-repeat;appearance:none}.content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-ms-expand{display:none}.navigation[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:2.5rem}.navigation[_ngcontent-%COMP%] button.btn-left[_ngcontent-%COMP%]{color:#505050;font-size:.875rem}.navigation[_ngcontent-%COMP%] button.btn-right[_ngcontent-%COMP%]{width:auto;padding:.5rem 1rem}@media(min-width:700px){.demographic[_ngcontent-%COMP%], .content[_ngcontent-%COMP%]{padding:2rem 2.5rem}.content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:calc(50% - .625rem)}}
1",".first-name[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .last-name[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{text-transform:capitalize}.content[_ngcontent-%COMP%] .half-size-controls[_ngcontent-%COMP%]{flex-direction:row;gap:1.25rem}.content[_ngcontent-%COMP%] .half-size-controls[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1}.navigation[_ngcontent-%COMP%]{justify-content:flex-end}"]});let e=a;return e})();var Qr=()=>({name:"arrow-left",color:"currentcolor"}),Hr=()=>({name:"arrow-right",color:"#fff"});function Gr(e,a){e&1&&(s(0,"option",34),d(1),p(2,"translate"),c()),e&2&&(l("selected",!0)("disabled",!0)("ngValue",null),o(),u(" ",m(2,4,"Select")," "))}function Zr(e,a){if(e&1&&(s(0,"option",35),d(1),p(2,"translate"),c()),e&2){let t=a.$implicit;l("ngValue",t),o(),u(" ",m(2,2,t)," ")}}function $r(e,a){e&1&&(s(0,"div",36),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"This value is not a valid phone number.")," "))}function Kr(e,a){e&1&&(s(0,"div",36),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"This value is not a valid mobile number.")," "))}function Xr(e,a){e&1&&(s(0,"div",36),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"This value is not a valid email.")," "))}function Jr(e,a){e&1&&(s(0,"option",34),d(1),p(2,"translate"),c()),e&2&&(l("selected",!0)("disabled",!0)("ngValue",null),o(),u(" ",m(2,4,"Select")," "))}function ec(e,a){if(e&1&&(s(0,"option",35),d(1),p(2,"translate"),c()),e&2){let t=a.$implicit;l("ngValue",t.label),o(),u(" ",m(2,2,t.title)," ")}}function tc(e,a){e&1&&(s(0,"div",36),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"This value can not be empty")," "))}function nc(e,a){e&1&&(s(0,"div",37),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"Phone is required.")," "))}function ic(e,a){e&1&&(s(0,"div",37),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"Mobile phone is required.")," "))}function oc(e,a){e&1&&(s(0,"div",37),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"Either Mobile Phone or Email is required.")," "))}function ac(e,a){if(e&1){let t=y();s(0,"div",2),k(1,"app-demographics-header",3),s(2,"div",4)(3,"div",5)(4,"label",6),d(5),p(6,"translate"),c(),k(7,"input",7),c(),s(8,"div",8)(9,"label",9),d(10),p(11,"translate"),c(),s(12,"select",10),V("ngModelChange",function(i){h(t);let r=g();return B(r.userData.personal.gender,i)||(r.userData.personal.gender=i),v(i)}),f(13,Gr,3,6,"option",11)(14,Zr,3,4,"option",12),c()(),s(15,"div",13)(16,"label",14),d(17),p(18,"translate"),c(),s(19,"div",15)(20,"input",16),V("ngModelChange",function(i){h(t);let r=g();return B(r.userData.details.homePhone,i)||(r.userData.details.homePhone=i),v(i)}),c()(),f(21,$r,3,3,"div",17),c(),s(22,"div",18)(23,"label",19),d(24),p(25,"translate"),c(),s(26,"div",20)(27,"input",21),V("ngModelChange",function(i){h(t);let r=g();return B(r.userData.details.mobilePhone,i)||(r.userData.details.mobilePhone=i),v(i)}),c()(),f(28,Kr,3,3,"div",17),c(),s(29,"div",22)(30,"label",23),d(31),p(32,"translate"),c(),s(33,"div")(34,"input",24,0),V("ngModelChange",function(i){h(t);let r=g();return B(r.userData.personal.email,i)||(r.userData.personal.email=i),v(i)}),c()(),f(36,Xr,3,3,"div",17),c(),s(37,"div",25)(38,"label",26),d(39),p(40,"translate"),c(),s(41,"select",27),V("ngModelChange",function(i){h(t);let r=g();return B(r.userData.personal.contactPreference,i)||(r.userData.personal.contactPreference=i),v(i)}),f(42,Jr,3,6,"option",11)(43,ec,3,4,"option",12),c(),f(44,tc,3,3,"div",17),c(),f(45,nc,3,3,"div",28)(46,ic,3,3,"div",28)(47,oc,3,3,"div",28),c(),s(48,"div",29)(49,"button",30),M("click",function(){h(t);let i=g();return v(i.goToPrevPage())}),s(50,"span",31),k(51,"lib-svg-icon",32),c(),d(52),p(53,"translate"),c(),s(54,"button",33),M("click",function(){h(t);let i=g();return v(i.nextPage())}),d(55),p(56,"translate"),s(57,"span",31),k(58,"lib-svg-icon",32),c()()()()}if(e&2){let t=U(35),n=g();o(),l("currentStep",2),o(4),P(m(6,40,"Date of Birth")),o(2),l("disabled",!0)("value",n.userData.personal.birthdate),o(3),P(m(11,42,"Legal Sex")),o(2),F("ngModel",n.userData.personal.gender),o(),l("ngIf",!n.userData.personal.gender),o(),l("ngForOf",n.infoData.genderList),o(),E("error",n.phoneValidation==="error"),o(2),P(m(18,44,"Home Phone Number")),o(3),l("minlength",n.phoneLength),F("ngModel",n.userData.details.homePhone),o(),l("ngIf",n.phoneValidation==="error"),o(),E("error",n.mobilePhoneValidation==="error"),o(2),P(m(25,46,"Mobile Phone Number")),o(3),l("minlength",n.phoneLength),F("ngModel",n.userData.details.mobilePhone),o(),l("ngIf",n.mobilePhoneValidation==="error"),o(),E("error",!t.valid),o(2),P(m(32,48,"Email")),o(3),F("ngModel",n.userData.personal.email),o(2),l("ngIf",!t.valid),o(),E("error",!n.userData.personal.contactPreference&&n.isNextButtonPressed),o(2),P(m(40,50,"Contact Preference")),o(2),F("ngModel",n.userData.personal.contactPreference),o(),l("ngIf",!n.userData.personal.contactPreference),o(),l("ngForOf",n.infoData.contactPreferenceList),o(),l("ngIf",!n.userData.personal.contactPreference&&n.isNextButtonPressed),o(),l("ngIf",n.demographicsTaskService.isPhoneRequired&&!n.userData.details.homePhone),o(),l("ngIf",n.demographicsTaskService.isMobilePhoneRequired&&!n.userData.details.mobilePhone),o(),l("ngIf",!n.userData.personal.email&&!n.userData.details.mobilePhone&&!n.demographicsTaskService.isMobilePhoneRequired),o(4),l("params",z(56,Qr)),o(),u(" ",m(53,52,"PREVIOUS")," "),o(2),l("disabled",n.isNextButtonDisabled(t)),o(),u(" ",m(56,54,"NEXT")," "),o(3),l("params",z(57,Hr))}}var um=(()=>{let a=class a extends Qi{constructor(n,i,r,C,O,w){super(n,i,r,C),this.demographicsTaskService=n,this.dateTimeService=i,this.infoApiService=r,this.appConfig=C,this.configService=O,this.redirectTaskService=w,this.phoneLength=this.appConfig.phoneLength,this.demographicsTaskService.loadDataIfNeeded()}isNextButtonDisabled(n){return!n.valid||!this.demographicsTaskService.isMobilePhoneRequired&&!this.userData.personal.email&&!this.userData.details.mobilePhone||this.demographicsTaskService.isMobilePhoneRequired&&!this.userData.details.mobilePhone||this.demographicsTaskService.isPhoneRequired&&!this.userData.details.homePhone}goToPrevPage(){this.redirectTaskService.navigate([this.redirectTaskService.getBaseUrl()+"/demographic/personal"])}goToNextPage(){this.redirectTaskService.navigate([this.redirectTaskService.getBaseUrl()+"/demographic/emergency-info"])}setPhoneLength(){this.phoneLength=this.configService.getPhoneLength()}};a.\u0275fac=function(i){return new(i||a)(_(Ye),_(kt),_(Ne),_("APP_CONFIG"),_(ae),_(x))}
1,a.\u0275cmp=b({type:a,selectors:[["app-user-contact-info"]],standalone:!1,features:[be],decls:1,vars:1,consts:[["emailField","ngModel"],["class","demographic",4,"ngIf"],[1,"demographic"],[3,"currentStep"],[1,"content"],[1,"birthdate"],["for","birthdate"],["id","birthdate","type","date",3,"disabled","value"],[1,"gender"],["for","gender"],["id","gender","autocomplete","sex",3,"ngModelChange","ngModel"],[3,"selected","disabled","ngValue",4,"ngIf"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"home-phone"],["for","phone-number"],[1,"home-phone-inputs"],["id","phone-number","autocomplete","tel","mask","(000)000-0000","pattern","[0-9\\s\\(\\)_]+","type","tel",1,"phone-number",3,"ngModelChange","minlength","ngModel"],["class","error-message","role","alert","aria-atomic","true",4,"ngIf"],[1,"mobile-phone"],["for","mobile-phone"],[1,"mobile-phone-inputs"],["id","mobile-phone","autocomplete","tel-national","mask","(000)000-0000","pattern","[0-9\\s\\(\\)_]+","type","tel",1,"phone-number",3,"ngModelChange","minlength","ngModel"],[1,"email"],["for","email"],["id","email","type","email","autocomplete","email","pattern","^\\w+([\\.+\\-]?\\w+)*@\\w+([\\.\\-]?\\w+)*(\\.[A-Za-z]{2,4})+$",3,"ngModelChange","ngModel"],[1,"contact-preference"],["for","contactPreference"],["id","contactPreference",3,"ngModelChange","ngModel"],["aria-atomic","true","class","error error-message","role","alert",4,"ngIf"],[1,"navigation"],["libButton","","variant","link","type","button",1,"btn-left",3,"click"],[1,"arrow"],[3,"params"],["libButton","","type","button",1,"btn-right",3,"click","disabled"],[3,"selected","disabled","ngValue"],[3,"ngValue"],["role","alert","aria-atomic","true",1,"error-message"],["aria-atomic","true","role","alert",1,"error","error-message"]],template:function(i,r){i&1&&f(0,ac,59,58,"div",1),i&2&&l("ngIf",(r.userData==null?null:r.userData.personal)&&(r.userData==null?null:r.userData.address))},dependencies:[Ct,ft,Ce,ut,ie,an,vt,oe,je,me,T,A,G,St,S],styles:[".error[_ngcontent-%COMP%]{color:#de000d!important}.error[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .error[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{border-color:#de000d!important;color:#de000d!important}[_nghost-%COMP%]{display:block;height:100%;background-color:#f5f5f5;overflow:auto}.demographic[_ngcontent-%COMP%]{display:flex;flex-direction:column;-webkit-overflow-scrolling:touch;padding:1rem}.error-message[_ngcontent-%COMP%]{padding:.5rem 0;color:#de000d}.content[_ngcontent-%COMP%]{background:#fff;border-radius:8px;padding:1.5rem 1.25rem;display:flex;flex-wrap:wrap;align-items:flex-end;gap:1.25rem;margin-bottom:3.4rem}.content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch;text-align:left;width:100%}.content[_ngcontent-%COMP%] .home-phone-inputs[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] .mobile-phone-inputs[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.content[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-bottom:.5rem;font-size:.75rem;line-height:.75rem}.content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]{text-align:left;text-indent:0;padding-top:0;display:flex;justify-content:flex-start}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;border-radius:4px;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-webkit-clear-button, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-ms-clear, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-webkit-inner-spin-button, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-webkit-calendar-picker-indicator, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]:-moz-focusring, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{border-radius:8px;text-align:left;text-align:-webkit-left;color:#505050;border-color:#949494;background-color:#fff}.content[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date].ng-dirty[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select.ng-dirty[_ngcontent-%COMP%]{border-color:#505050}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]:disabled, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:disabled{background:#efefef;border-color:#80808014;color:#505050;-webkit-text-fill-color:#505050;opacity:1}.content[_ngcontent-%COMP%] input.upper-first[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date].upper-first[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select.upper-first[_ngcontent-%COMP%]{text-transform:capitalize}.content[_ngcontent-%COMP%] input.upper-first[_ngcontent-%COMP%] option[_ngcontent-%COMP%]:first-letter, .content[_ngcontent-%COMP%] input[type=date].upper-first[_ngcontent-%COMP%] option[_ngcontent-%COMP%]:first-letter, .content[_ngcontent-%COMP%] select.upper-first[_ngcontent-%COMP%] option[_ngcontent-%COMP%]:first-letter{text-transform:capitalize}.content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{background-image:linear-gradient(45deg,transparent 50%,#949494 50%),linear-gradient(135deg,#949494 50%,transparent 50%);background-position:calc(100% - 20px) calc(1em + 2px),calc(100% - 15px) calc(1em + 2px);background-size:5px 5px,5px 5px,1px 1.5em;background-repeat:no-repeat;appearance:none}.content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-ms-expand{display:none}.navigation[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:2.5rem}.navigation[_ngcontent-%COMP%] button.btn-left[_ngcontent-%COMP%]{color:#505050;font-size:.875rem}.navigation[_ngcontent-%COMP%] button.btn-right[_ngcontent-%COMP%]{width:auto;padding:.5rem 1rem}@media(min-width:700px){.demographic[_ngcontent-%COMP%], .content[_ngcontent-%COMP%]{padding:2rem 2.5rem}.content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:calc(50% - .625rem)}}","input[_ngcontent-%COMP%]::-webkit-date-and-time-value{text-align:left}"]});let e=a;return e})();var rc=()=>({name:"arrow-left",color:"#949494"}),cc=()=>({name:"arrow-right",color:"#fff"});function sc(e,a){e&1&&(s(0,"div",7),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"Max 50 characters limit exceeded")," "))}function lc(e,a){e&1&&(s(0,"div",7),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"This value is not a valid mobile number.")," "))}function pc(e,a){if(e&1){let t=y();s(0,"div",1),k(1,"app-demographics-header",2),s(2,"div",3)(3,"div",4)(4,"label",5),d(5),p(6,"translate"),c(),s(7,"input",6),V("ngModelChange",function(i){h(t);let r=g();return B(r.userData.emergency.name,i)||(r.userData.emergency.name=i),v(i)}),M("input",function(){h(t);let i=g();return v(i.onNameChange())}),c(),ee(8,sc,3,3,"div",7),c(),s(9,"div",8)(10,"label",9),d(11),p(12,"translate"),c(),s(13,"div",10)(14,"input",11),V("ngModelChange",function(i){h(t);let r=g();return B(r.userData.emergency.phone,i)||(r.userData.emergency.phone=i),v(i)}),c()(),f(15,lc,3,3,"div",12),c(),s(16,"div")(17,"lib-select",13),V("ngModelChange",function(i){h(t);let r=g();return B(r.userData.emergency.relationshipId,i)||(r.userData.emergency.relationshipId=i),v(i)}),c()()(),s(18,"div",14)(19,"button",15),M("click",function(){h(t);let i=g();return v(i.goToPrevPage())}),s(20,"span",16),k(21,"lib-svg-icon",17),c(),d(22),p(23,"translate"),c(),s(24,"button",18),M("click",function(){h(t);let i=g();return v(i.nextPage())}),d(25),p(26,"translate"),s(27,"span",16),k(28,"lib-svg-icon",17),c()()()()}if(e&2){let t=g();o(),l("currentStep",3),o(2),E("error",t.nameLengthError),o(2),P(m(6,18,"Emergency Contact Name")),o(2),F("ngModel",t.userData.emergency.name),o(),te(t.nameLengthError?8:-1),o(),E("error",t.validationError),o(2),P(m(12,20,"Emergency Contact Number")),o(3),l("minlength",t.phoneLength),F("ngModel",t.userData.emergency.phone),o(),l("ngIf",t.validationError),o(2),l("options",t.demographicsTaskService.infoData.relationshipStatusList),F("ngModel",t.userData.emergency.relationshipId),o(4),l("params",z(26,rc)),o(),u(" ",m(23,22,"PREVIOUS")," "),o(3),u(" ",m(26,24,"NEXT")," "),o(3),l("params",z(27,cc))}}var xm=(()=>{let a=class a extends Hi{constructor(n,i,r,C,O){super(n,i,r),this.demographicsTaskService=n,this.infoApiService=i,this.appConfig=r,this.config=C,this.redirectTaskService=O,this.demographicsTaskService.loadDataIfNeeded()}goToNextPage(){this.redirectTaskService.navigate([this.redirectTaskService.getBaseUrl()+"/demographic/ad
1ditional-info"])}goToPrevPage(){this.redirectTaskService.navigate([this.redirectTaskService.getBaseUrl()+"/demographic/contact-info"])}setPhoneLength(){this.phoneLength=this.config.getPhoneLength()}};a.\u0275fac=function(i){return new(i||a)(_(Ye),_(Ne),_("APP_CONFIG"),_(ae),_(x))},a.\u0275cmp=b({type:a,selectors:[["app-user-emergency-info"]],standalone:!1,features:[be],decls:1,vars:1,consts:[["class","demographic",4,"ngIf"],[1,"demographic"],[3,"currentStep"],[1,"content"],[1,"first-name"],["for","name"],["id","name","type","text",3,"ngModelChange","input","ngModel"],["role","alert","aria-atomic","true",1,"error-message"],[1,"mobile-phone"],["for","phone-number"],[1,"mobile-phone-inputs"],["id","phone-number","type","tel","mask","(000)000-0000","pattern","/^[0-9\\s\\-\\(\\)_]+$/",1,"phone-number",3,"ngModelChange","minlength","ngModel"],["class","error-message","role","alert","aria-atomic","true",4,"ngIf"],["label","Relationship to Patient","labelField","title","valueField","id",3,"ngModelChange","options","ngModel"],[1,"navigation"],["libButton","","variant","link","type","button",1,"btn-left",3,"click"],[1,"arrow"],[3,"params"],["libButton","","type","button",1,"btn-right",3,"click"]],template:function(i,r){i&1&&f(0,pc,29,28,"div",0),i&2&&l("ngIf",r.userData==null?null:r.userData.emergency)},dependencies:[Ce,ie,an,vt,oe,je,T,A,qt,G,St,S],styles:[".error[_ngcontent-%COMP%]{color:#de000d!important}.error[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .error[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{border-color:#de000d!important;color:#de000d!important}[_nghost-%COMP%]{display:block;height:100%;background-color:#f5f5f5;overflow:auto}.demographic[_ngcontent-%COMP%]{display:flex;flex-direction:column;-webkit-overflow-scrolling:touch;padding:1rem}.error-message[_ngcontent-%COMP%]{padding:.5rem 0;color:#de000d}.content[_ngcontent-%COMP%]{background:#fff;border-radius:8px;padding:1.5rem 1.25rem;display:flex;flex-wrap:wrap;align-items:flex-end;gap:1.25rem;margin-bottom:3.4rem}.content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch;text-align:left;width:100%}.content[_ngcontent-%COMP%] .home-phone-inputs[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] .mobile-phone-inputs[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.content[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-bottom:.5rem;font-size:.75rem;line-height:.75rem}.content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]{text-align:left;text-indent:0;padding-top:0;display:flex;justify-content:flex-start}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;border-radius:4px;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-webkit-clear-button, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-ms-clear, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-webkit-inner-spin-button, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-webkit-calendar-picker-indicator, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]:-moz-focusring, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{border-radius:8px;text-align:left;text-align:-webkit-left;color:#505050;border-color:#949494;background-color:#fff}.content[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date].ng-dirty[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select.ng-dirty[_ngcontent-%COMP%]{border-color:#505050}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]:disabled, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:disabled{background:#efefef;border-color:#80808014;color:#505050;-webkit-text-fill-color:#505050;opacity:1}.content[_ngcontent-%COMP%] input.upper-first[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date].upper-first[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select.upper-first[_ngcontent-%COMP%]{text-transform:capitalize}.content[_ngcontent-%COMP%] input.upper-first[_ngcontent-%COMP%] option[_ngcontent-%COMP%]:first-letter, .content[_ngcontent-%COMP%] input[type=date].upper-first[_ngcontent-%COMP%] option[_ngcontent-%COMP%]:first-letter, .content[_ngcontent-%COMP%] select.upper-first[_ngcontent-%COMP%] option[_ngcontent-%COMP%]:first-letter{text-transform:capitalize}.content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{background-image:linear-gradient(45deg,transparent 50%,#949494 50%),linear-gradient(135deg,#949494 50%,transparent 50%);background-position:calc(100% - 20px) calc(1em + 2px),calc(100% - 15px) calc(1em + 2px);background-size:5px 5px,5px 5px,1px 1.5em;background-repeat:no-repeat;appearance:none}.content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-ms-expand{display:none}.navigation[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:2.5rem}.navigation[_ngcontent-%COMP%] button.btn-left[_ngcontent-%COMP%]{color:#505050;font-size:.875rem}.navigation[_ngcontent-%COMP%] button.btn-right[_ngcontent-%COMP%]{width:auto;padding:.5rem 1rem}@media(min-width:700px){.demographic[_ngcontent-%COMP%], .content[_ngcontent-%COMP%]{padding:2rem 2.5rem}.content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:calc(50% - .625rem)}}","lib-select[_ngcontent-%COMP%]{width:100%}"]});let e=a;return e})();st();var dc=()=>({name:"arrow-left",color:"#949494"});function mc(e,a){if(e&1){let t=y();s(0,"lib-select",19),V("ngModelChange",function(i){h(t);let r=g(2).ngIf;return B(r.ethnicCodes,i)||(r.ethnicCodes=i),v(i)}),c()}if(e&2){let t=g().ngIf,n=g().ngIf,i=g();l("isMultiple",!0)("isRequired",!0)("hasSearch",!0)("hideAllLabel",!0)("searchInputPlaceholder","Search\u2026")("options",t.ethnicityList),F("ngModel",n.ethnicCodes),l("multipleSelectionTransform",i.multipleCodesTransform)}}function gc(e,a){if(e&1){let t=y();s(0,"lib-select",20),V("ngModelChange",function(i){h(t);let r=g(2).ngIf;return B(r.ethnicCodes[0],i)||(r.ethnicCodes[0]=i),v(i)}),c()}if(e&2){let t=g().ngIf,n=g().ngIf;l("isRequired",!0)("hasSearch",!0)("searchInputPlaceholder","Search\u2026")("options",t.ethnicityList),F("ngModel",n.ethnicCodes[0])}}function _c(e,a){if(e&1){let t=y();s(0,"lib-select",21),V("ngModelChange",function(i){h(t);let r=g(2).ngIf;return B(r.raceCodes,i)||(r.raceCodes=i),v(i)}),c()}if(e&2){let t=g().ngIf,n=g().ngIf,i=g();l("isMultiple",!0)("isRequired",!0)("hasSearch",!0)("hideAllLabel",!0)("searchInputPlaceholder","Search\u2026")("options",t.raceList),F("ngModel",n.raceCodes),l("multipleSelectionTransform",i.multipleCodesTransform)}}function uc(e,a){if(e&1){let t=y();s(0,"lib-select",22),V("ngModelChange",function(i){h(t);let r=g(2).ngIf;return B(r.raceCodes[0],i)||(r.raceCodes[0]=i),v(i)}),c()}if(e&2){let t=g().ngIf,n=g().ngIf;l("isRequired",!0)("hasSearch",!0)("searchInputPlaceholder","Search\u2026")("options",t.raceList),F("ngModel",n.raceCodes[0])}}function Cc(e,a){if(e&1){let t=y();s(0,"div",10)(1,"lib-select",11),V("ngModelChange",function(i){h(t);let r=g().ngIf;return B(r.maritalStatus,i)||(r.maritalStatus=i),v(i)}),c(),k(2,"div",12),s(3,"lib-select",13),V("ngModelChange",function(i){h(t);let r=g().ngIf;return B(r.language,i)||(r.language=i),v(i)}),c(),s(4,"div",14),d(5),p(6,"translate"),c(),ee(7,mc,1,8,"lib-select",15)(8,gc,1,5,"lib-select",16),s(9,"div",14),d(10),p(11,"translate"),c(),ee(12,_c,1,8,"lib-select",17)(13,uc,1,5,"lib-select",18),s(14,"div",14),d(15),p(16,"translate"),c()()}if(e&2){let t=a.ngIf,n=g().ngIf,i=g();o(),l("options",t.maritalStatusList),F("ngModel",n.maritalStatus),o(2),l("isRequired",!0)("hasSearch",!0)("searchInputPlaceholder","Search\u2026")("options",t.languageList),F("ngModel",n.language),o(2),u(" ",i.hasError&&!n.language?m(6,12,"Please select value."):""," "),o(2),te(i.demographicsTaskService.clinicInfo!=null&&i.demographicsTaskService.clinicInfo.multipleEthnicity?7:8),o(3),u(" ",i.hasError&&!(n.ethnicCodes!=null&&n.ethnicCodes[0])?m(11,14,"Please select value."):""," "),o(2),te(i.demographicsTaskService.clinicInfo!=null&&i.demographicsTaskService.clinicInfo.multipleRace?12:13),o(3),u(" ",i.hasError&&!(n.raceCodes!=null&&n.raceCodes[0])?m(16,16,"Please select value."):""," ")}}function fc(e,a){if(e&1){let t=y();s(0,"div",23)(1,"label",24)(2,"div",25)(3,"input",26),V("ngModelChange",function(i){h(t);let r=g(2);return B(r.demographicsTaskService.userData.details.consentToCall,i)||(r.demographicsTaskService.userData.details.consentToCall=i),v(i)}),c(),k(4,"span",27),c(),s(5,"div",28),d(6),p(7,"translate"),c()(),s(8,"label",24)(9,"div",29)(10,"input",30),V("ngModelChange",function(i){h(t);let r=g(2);return B(r.demographicsTaskService.userData.details.consentToText,i)||(r.demographicsTaskService.userData.details.consentToText=i),v(i)}),c(),k(11,"span",27),c(),s(12,"div",28),d(13),p(14,"translate"),c()()()}if(e&2){let t=g(2);o(3),E("checked",t.demographicsTaskService.userData.details.consentToCall),F("ngModel",t.demographicsTaskService.userData.details.consentToCall),o(3),u(" ",m(7,8,"I give consent to receive calls.")," "),o(4),E("checked",t.demographicsTaskService.userData.details.consentToText),F("ngModel",t.demographicsTaskService.userData.details.consentToText),o(3),u(" ",m(14,10,"I give consent to text (SMS rates from your wireless carrier may still apply)")," ")}}function hc(e,a){if(e&1){let t=y();s(0,"div",1),k(1,"app-demographics-header",2),f(2,Cc,17,18,"div",3)(3,fc,15,12,"div",4),s(4,"div",5)(5,"button",6),M("click",function(){h(t);let i=g();return v(i.prevPage())}
1),s(6,"span",7),k(7,"lib-svg-icon",8),c(),d(8),p(9,"translate"),c(),s(10,"button",9),M("click",function(){h(t);let i=g();return v(i.save())}),d(11),p(12,"translate"),c()()()}if(e&2){let t=g();o(),l("currentStep",4),o(),l("ngIf",t.demographicsTaskService.infoData),o(),l("ngIf",t.appointmentId),o(4),l("params",z(11,dc)),o(),u(" ",m(9,7,"PREVIOUS")," "),o(2),l("disabled",t.isSaveInProgress),o(),u(" ",m(12,9,"SUBMIT")," ")}}var it,so=(it=class extends qi{constructor(a,t,n,i,r){super(a),this.demographicsTaskService=a,this.redirectTaskService=t,this.errorService=n,this.demographicsApiService=i,this.checkInFlowService=r,this.errorList=[],this.isSaveInProgress=!1,this.multipleCodesTransform=(C,O)=>O.includes("dec")&&O.length>1?C.includes("dec")?O.filter(I=>I!=="dec"):O.filter(I=>!C.includes(I)).length>1?O.filter(I=>I!=="dec"):["dec"]:O,this.initTask(),this.appointmentId=this.task?.todo?.source?.appointment_id,this.errorNotification(),this.demographicsTaskService.loadDataIfNeeded()}initTask(){this.task=this.redirectTaskService.getActiveTask()}ngOnDestroy(){this.errorService.updateCustomError(null),this.errorService.refreshCustomError()}completeTask(){if(!this.task){this.redirectTaskService.navigate([this.redirectTaskService.getBaseUrl()]);return}this.redirectTaskService.completeTaskAndSetItActive(this.task).subscribe(()=>{this.initTask(),this.redirectTaskService.redirectToTaskAction(this.task,!1)})}save(){if(!this.isSaveInProgress){if(this.hasError=!1,this.isSubmitNotAllowed()){this.hasError=!0;return}this.isSaveInProgress=!0,this.demographicsTaskService.publish().pipe(L(()=>this.updateClinicUserDetails())).subscribe({next:()=>{this.checkInFlowService.isCheckInAppFlow()?this.checkInFlowService.markCheckInFlowTaskAsDoneAndGoToNext(this.task,!0):this.completeTask()},error:()=>{this.isSaveInProgress=!1}})}}updateClinicUserDetails(){if(!this.appointmentId)return ge(null);let{userId:a}=this.task.todo,t=this.task.clinicUuid??this.demographicsTaskService.taskClinicUuid;return this.demographicsApiService.updateClinicUserDetails(t,a,this.demographicsTaskService.userData.details)}errorNotification(){this.errorService.initError(),this.errorService.activeError.pipe(_e(Boolean),ke(this)).subscribe(a=>{this.errorService.refreshCustomError();let t=a.url.split("/");this.errorPage=t[t.length-1];for(let i of Object.keys(a?.error?.form)){let r=a.error.form[i];r.errors&&(this.errorField=i,this.errorMess=r.errors)}let n="Error in "+this.errorPage+" "+this.errorField+" field.";this.errorList.push(n),this.errorList.push(this.errorMess),this.errorService.updateCustomError(this.errorList)})}prevPage(){this.redirectTaskService.navigate([this.redirectTaskService.getBaseUrl()+"/demographic/emergency-info"])}},it.\u0275fac=function(t){return new(t||it)(_(Ye),_(x),_($e),_(Ue),_(R))},it.\u0275cmp=b({type:it,selectors:[["app-user-additional-info"]],standalone:!1,features:[be],decls:1,vars:1,consts:[["class","demographic",4,"ngIf"],[1,"demographic"],[3,"currentStep"],["class","content",4,"ngIf"],["class","consent-to-options",4,"ngIf"],[1,"navigation"],["libButton","","variant","link","type","button",1,"btn-left",3,"click"],[1,"arrow"],[3,"params"],["libButton","","type","button",1,"btn-right",3,"click","disabled"],[1,"content"],["label","Marital Status","labelField","name","valueField","name",3,"ngModelChange","options","ngModel"],[1,"error-message"],["label","Language","labelField","title","valueField","title",3,"ngModelChange","isRequired","hasSearch","searchInputPlaceholder","options","ngModel"],["role","alert","aria-atomic","true",1,"error-message"],["label","Ethnicity","labelField","description","valueField","code","useAutoTrigger","",3,"isMultiple","isRequired","hasSearch","hideAllLabel","searchInputPlaceholder","options","ngModel","multipleSelectionTransform"],["label","Ethnicity","labelField","description","valueField","code",3,"isRequired","hasSearch","searchInputPlaceholder","options","ngModel"],["label","Race","labelField","description","valueField","code","useAutoTrigger","",3,"isMultiple","isRequired","hasSearch","hideAllLabel","searchInputPlaceholder","options","ngModel","multipleSelectionTransform"],["label","Race","labelField","description","valueField","code",3,"isRequired","hasSearch","searchInputPlaceholder","options","ngModel"],["label","Ethnicity","labelField","description","valueField","code","useAutoTrigger","",3,"ngModelChange","isMultiple","
1isRequired","hasSearch","hideAllLabel","searchInputPlaceholder","options","ngModel","multipleSelectionTransform"],["label","Ethnicity","labelField","description","valueField","code",3,"ngModelChange","isRequired","hasSearch","searchInputPlaceholder","options","ngModel"],["label","Race","labelField","description","valueField","code","useAutoTrigger","",3,"ngModelChange","isMultiple","isRequired","hasSearch","hideAllLabel","searchInputPlaceholder","options","ngModel","multipleSelectionTransform"],["label","Race","labelField","description","valueField","code",3,"ngModelChange","isRequired","hasSearch","searchInputPlaceholder","options","ngModel"],[1,"consent-to-options"],[1,"consent-to-options-wrapper"],["for","consent-to-call-checkbox",1,"element"],["id","consent-to-call-checkbox","type","checkbox",1,"checkbox",3,"ngModelChange","ngModel"],[1,"mark"],[1,"consent-to-options-text"],["for","consent-to-text-checkbox",1,"element"],["id","consent-to-text-checkbox","type","checkbox",1,"checkbox",3,"ngModelChange","ngModel"]],template:function(t,n){t&1&&f(0,hc,13,12,"div",0),t&2&&l("ngIf",n.demographicsTaskService.userData==null?null:n.demographicsTaskService.userData.personal)},dependencies:[on,ie,oe,T,A,qt,G,St,S],styles:[".error[_ngcontent-%COMP%]{color:#de000d!important}.error[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .error[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{border-color:#de000d!important;color:#de000d!important}[_nghost-%COMP%]{display:block;height:100%;background-color:#f5f5f5;overflow:auto}.demographic[_ngcontent-%COMP%]{display:flex;flex-direction:column;-webkit-overflow-scrolling:touch;padding:1rem}.error-message[_ngcontent-%COMP%]{padding:.5rem 0;color:#de000d}.content[_ngcontent-%COMP%]{background:#fff;border-radius:8px;padding:1.5rem 1.25rem;display:flex;flex-wrap:wrap;align-items:flex-end;gap:1.25rem;margin-bottom:3.4rem}.content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch;text-align:left;width:100%}.content[_ngcontent-%COMP%] .home-phone-inputs[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] .mobile-phone-inputs[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.content[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{margin-bottom:.5rem;font-size:.75rem;line-height:.75rem}.content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]{text-align:left;text-indent:0;padding-top:0;display:flex;justify-content:flex-start}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;border-radius:4px;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-webkit-clear-button, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-ms-clear, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-webkit-inner-spin-button, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]::-webkit-calendar-picker-indicator, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]:-moz-focusring, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{border-radius:8px;text-align:left;text-align:-webkit-left;color:#505050;border-color:#949494;background-color:#fff}.content[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date].ng-dirty[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select.ng-dirty[_ngcontent-%COMP%]{border-color:#505050}.content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled, .content[_ngcontent-%COMP%] input[type=date][_ngcontent-%COMP%]:disabled, .content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:disabled{background:#efefef;border-color:#80808014;color:#505050;-webkit-text-fill-color:#505050;opacity:1}.content[_ngcontent-%COMP%] input.upper-first[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] input[type=date].upper-first[_ngcontent-%COMP%], .content[_ngcontent-%COMP%] select.upper-first[_ngcontent-%COMP%]{text-transform:capitalize}.content[_ngcontent-%COMP%] input.upper-first[_ngcontent-%COMP%] option[_ngcontent-%COMP%]:first-letter, .content[_ngcontent-%COMP%] input[type=date].upper-first[_ngcontent-%COMP%] option[_ngcontent-%COMP%]:first-letter, .content[_ngcontent-%COMP%] select.upper-first[_ngcontent-%COMP%] option[_ngcontent-%COMP%]:first-letter{text-transform:capitalize}.content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{background-image:linear-gradient(45deg,transparent 50%,#949494 50%),linear-gradient(135deg,#949494 50%,transparent 50%);background-position:calc(100% - 20px) calc(1em + 2px),calc(100% - 15px) calc(1em + 2px);background-size:5px 5px,5px 5px,1px 1.5em;background-repeat:no-repeat;appearance:none}.content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-ms-expand{display:none}.navigation[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:2.5rem}.navigation[_ngcontent-%COMP%] button.btn-left[_ngcontent-%COMP%]{color:#505050;font-size:.875rem}.navigation[_ngcontent-%COMP%] button.btn-right[_ngcontent-%COMP%]{width:auto;padding:.5rem 1rem}@media(min-width:700px){.demographic[_ngcontent-%COMP%], .content[_ngcontent-%COMP%]{padding:2rem 2.5rem}.content[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:calc(50% - .625rem)}}",'.consent-to-options[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem;margin:0 1rem 3.9rem}.consent-to-options-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center}.consent-to-options[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{display:flex;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-direction:row;align-items:center;text-align:left}.consent-to-options[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.consent-to-options[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{height:2.5rem;width:2.5rem;background-color:"transparent";border:1px solid #e6e6e6;margin:0 1rem;flex:.15}
1.consent-to-options[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex:.85}.consent-to-options[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{content:"";display:none}.consent-to-options[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%]:after, .consent-to-options[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[type=checkbox].checked[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%]:after{display:block}.consent-to-options[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{margin-left:.7rem;margin-top:.1rem;width:1rem;height:1.4rem;border:solid var(--branding-primary-color);border-width:0 .3rem .3rem 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.consent-to-options[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[type=checkbox].checked[_ngcontent-%COMP%] ~ .mark[_ngcontent-%COMP%], .consent-to-options[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked ~ .mark[_ngcontent-%COMP%]{background-color:var(--branding-primary-color);border-color:var(--branding-primary-color)}.consent-to-options[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem;flex:inherit;border-color:#949494;border-radius:8px;margin:0 .75rem 0 0}.consent-to-options[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .mark[_ngcontent-%COMP%]:after{margin-top:.21rem;margin-left:.37rem;width:.3rem;height:.5rem;border-width:0 .15rem .15rem 0;border-color:#fff}.consent-to-options-text[_ngcontent-%COMP%]{font-size:.875rem;line-height:1rem}@media(min-width:700px){.consent-to-options[_ngcontent-%COMP%]{margin-right:3rem;margin-left:3rem}}lib-select[_ngcontent-%COMP%]{width:100%}.content[_ngcontent-%COMP%]{gap:0}.error-message[_ngcontent-%COMP%]{min-height:.875rem;padding:.25rem 0 0;font-size:.875rem;line-height:1}']}),it);so=ye([Se(),xe("design:paramtypes",[Ye,x,$e,Ue,R])],so);var vc=(e,a)=>({name:e,color:a});function Pc(e,a){if(e&1&&(s(0,"p",15),d(1),c()),e&2){let t=g();o(),u(" ",t.task.todo.category.description||t.task.todo.title," ")}}function Mc(e,a){if(e&1&&(s(0,"div",22),d(1),p(2,"translate"),p(3,"translate"),c()),e&2){let t=g().$implicit;o(),He(" ",m(2,2,t.error)," ",m(3,4,"Value must be valid.")," ")}}function Oc(e,a){if(e&1){let t=y();s(0,"div",16)(1,"label",17)(2,"span",18),d(3),p(4,"translate"),c(),s(5,"input",19),p(6,"translate"),V("ngModelChange",function(i){let r=h(t).$implicit;return B(r.answer,i)||(r.answer=i),v(i)}),c(),s(7,"div",20),d(8),p(9,"translate"),c()(),f(10,Mc,4,6,"div",21),c()}if(e&2){let t=a.$implicit,n=g();o(3),P(m(4,9,t.title)),o(2),l("min",Vt(t.stringId==="pain"?0:""))("max",Vt(t.stringId==="pain"?10:""))("placeholder",n.task.isDescriptionVisible?"Enter":m(6,11,"")),F("ngModel",t.answer),o(3),u(" ",m(9,13,(t.unit||"").replace("0 - 10","0-10"))," "),o(2),l("ngIf",t.error)}}var lo=(()=>{let a=class a extends Ui{constructor(n,i,r,C,O,w){super(n,C,O,r,i),this.taskApiService=n,this.redirectTaskService=i,this.router=r,this.vitalApiService=C,this.dateTimeService=O,this.configService=w,this.taskFeedView=!1}ngOnInit(){this.task=this.redirectTaskService.getActiveTask(),this.onSetActiveTask(this.task),this.taskFeedView||this.configService.setTitle(this.task.todo.category.title)}markTaskAsDone(){this.task.isDone=!0}};a.\u0275fac=function(i){return new(i||a)(_(Ke),_(x),_(De),_(gn),_(kt),_(ae))},a.\u0275cmp=b({type:a,selectors:[["app-vital"]],inputs:{taskFeedView:"taskFeedView"},standalone:!1,features:[be],decls:23,vars:27,consts:[[1,"task-panel-background"],[1,"task-panel"],[1,"task-panel-header"],[1,"header-background"],[3,"params"],[1,"title"],[1,"task-panel-body"],["class","description",4,"ngIf"],[1,"fields-container"],["class","fields",4,"ngFor","ngForOf"],[1,"footer"],[1,"button"],["type","button",1,"task-panel-button",3,"click"],[1,"date"],[3,"hidden"],[1,"description"],[1,"fields"],[1,"vital-content"],[1,"vital-label"],["type","number","step","0.01",3,"ngModelChange","min","max","placeholder","ngModel"],[1,"vital-unit"],["class","error",4,"ngIf"],[1,"error"]],template:function(i,r){i&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),k(3,"div",3)(4,"lib-svg-icon",4),s(5,"h1",5),d(6),c()(),s(7,"div",6),f(8,Pc,2,1,"p",7),s(9,"div",8),f(10,Oc,11,15,"div",9),c()(),s(11,"div",10)(12,"div",11)(13,"button",12),M("click",function(){return r.submit(r.task)}),d(14),p(15,"translate"),c()(),s(16,"div",13)(17,"p",14),d(18),p(19,"c4uDate"),c(),s(20,"p",14),d(21),p(22,"c4uDate"),c()()()()()),i&2&&(ve("background-color",r.task.todo.category.backgroundColor),E("task-feed",r.task
1FeedView),o(3),ve("background-color",r.task.todo.category.backgroundColor),o(),l("params",Z(24,vc,r.task.todo.category.icon,r.task.todo.category.backgroundColor)),o(2),P(r.task.todo.category.title),o(2),l("ngIf",r.task.todo.category.description||r.task.todo.title),o(2),l("ngForOf",r.vitalList),o(3),H("aria-disabled",!r.areTaskFeedVitalsAnswered()),o(),u(" ",m(15,16,"Save")," "),o(3),l("hidden",!r.task.todo.category.isCheckUpType&&!r.task.todo.category.isAppointment),o(),u(" ",ne(19,18,r.task.dueAt,"todo_full_check_up")," "),o(2),l("hidden",!r.task.todo.category.isAppointment||!r.task.todo.category.isTaskType||!r.task.todo.category.isVideoCallType),o(),u(" ",ne(22,21,r.task.dueAt,"todo_full")," "))},dependencies:[Ce,ni,ie,ai,oi,oe,me,T,A,ze,S],styles:[".task-panel-background[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;height:100%;width:100%;padding:30px 20px}.task-panel[_ngcontent-%COMP%]{height:100%;background-color:#fff;border-radius:8px;display:flex;flex-direction:column;overflow:hidden}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:100px;display:flex;align-items:center;justify-content:center;position:relative}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .header-background[_ngcontent-%COMP%]{pointer-events:none;position:absolute;height:100%;width:100%;opacity:.15}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 50px}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:1rem 2rem 0;overflow-y:auto;line-height:1.5}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:left;font-family:Roboto-bold,sans-serif;font-size:18px;letter-spacing:.53px;color:#064060;padding-bottom:1rem}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin-top:2rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.8rem 2rem;background-color:#064060;width:100%;box-sizing:border-box;font-family:Roboto-bold,sans-serif;align-items:center;cursor:pointer;width:15rem;border-radius:8px;margin:1rem 0;text-transform:uppercase;font-size:.875rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]:hover{opacity:.8}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[disabled][_ngcontent-%COMP%]{cursor:default}.task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{background:none;color:#064060;text-transform:uppercase;font-size:.875rem;letter-spacing:.43px;margin:.75rem 0}@media(max-height:460px){.task-panel-background[_ngcontent-%COMP%]{padding:10px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:60px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 30px}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:8px 8px 0}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{margin-top:8px}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%], .task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin:8px 0}}[_nghost-%COMP%]{height:100%}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{justify-content:left}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{margin-left:2rem;z-index:0;--svg-size: 2.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-left:1rem;z-index:0;padding:0;color:#505050}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{line-height:1}.task-panel[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:1.4rem}.fields[_ngcontent-%COMP%]{max-width:280px;margin:2rem auto}.fields[_ngcontent-%COMP%] .vital-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;color:#505050;flex-direction:column;align-items:flex-start;position:relative}.fields[_ngcontent-%COMP%] .vital-content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial;padding:10px 50% 10px 10px;height:40px;border-radius:8px;border-color:#949494;margin:0}.fields[_ngcontent-%COMP%] .vital-content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.fields[_ngcontent-%COMP%] .vital-content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.fields[_ngcontent-%COMP%] .vital-content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.fields[_ngcontent-%COMP%] .vital-content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.fields[_ngcontent-%COMP%] .vital-content[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.fields[_ngcontent-%COMP%] .vital-content[_ngcontent-%COMP%] .vital-label[_ngcontent-%COMP%]{line-height:24px;font-size:16px;margin-bottom:4px}.fields[_ngcontent-%COMP%] .vital-content[_ngcontent-%COMP%] .vital-unit[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;font-size:16px;position:absolute;top:40px;right:10px}.fields[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{margin-top:1rem}.error-message[_ngcontent-%COMP%]{display:none}.task-feed[_ngcontent-%COMP%]{background:none!important;padding:0}.task-feed[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{display:none}.task-feed[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:0;overflow:visible}.task-feed[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{margin-bottom:12px}.task-feed[_ngcontent-%COMP%] .fields-container[_ngcontent-%COMP%]{display:flex;width:100%;flex-wrap:wrap;justify-content:space-between}.task-feed[_ngcontent-%COMP%] .fields-container[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%]{width:calc(50% - 10px
1);max-width:none;min-width:172px;padding:0 0 10px;margin:0}.task-feed[_ngcontent-%COMP%] .fields-container[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%] .vital-label[_ngcontent-%COMP%]{font-size:12px;margin:0}.task-feed[_ngcontent-%COMP%] .fields-container[_ngcontent-%COMP%] .fields[_ngcontent-%COMP%] .vital-unit[_ngcontent-%COMP%]{top:38px;font-size:14px;letter-spacing:-.4px}.task-feed[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{margin:0}.task-feed[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:115px;min-height:40px;margin-bottom:0}"]});let e=a;return e})();var yc=(e,a)=>({name:e,color:a});function xc(e,a){if(e&1&&(s(0,"div",12)(1,"div",13)(2,"p",14),d(3),p(4,"translate"),c(),s(5,"div",15)(6,"p",16),d(7),p(8,"translate"),c(),s(9,"p",17),d(10),p(11,"translate"),c()()()()),e&2){let t=a.$implicit;o(3),u(" ",m(4,3,t.title)," "),o(4),u(" ",m(8,5,t.value)," "),o(3),u(" ",m(11,7,t.unit)," ")}}function bc(e,a){if(e&1){let t=y();s(0,"button",18),M("click",function(){h(t);let i=g();return v(i.toDashboard())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"Back to dashboard")," "))}function Sc(e,a){if(e&1){let t=y();s(0,"button",18),M("click",function(){h(t);let i=g();return v(i.goToNextTask())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"Go to next task")," "))}var po=(()=>{let a=class a extends ji{constructor(n,i,r,C,O){super(r,C),this.redirectTaskService=n,this.checkInFlowService=i,this.vitalApiService=r,this.activatedRoute=C,this.configService=O,this.taskFeedView=!1}ngOnInit(){super.ngOnInit(),this.taskFeedView||this.configService.setTitle(this.task.todo.category.title)}getActiveTask(){return this.redirectTaskService.getActiveTask()}goToNextTask(){this.checkInFlowService.nextCheckInFlowTask()}toDashboard(){this.redirectTaskService.toDashboard()}};a.\u0275fac=function(i){return new(i||a)(_(x),_(R),_(gn),_(fe),_(ae))},a.\u0275cmp=b({type:a,selectors:[["app-vital-data"]],inputs:{taskFeedView:"taskFeedView"},standalone:!1,features:[be],decls:15,vars:15,consts:[[1,"task-panel-background"],[1,"task-panel"],[1,"task-panel-header"],[1,"header-background"],[3,"params"],[1,"task-panel-body"],[1,"title"],[1,"description"],["class","field",4,"ngFor","ngForOf"],[1,"footer"],[1,"button"],["type","button","class","task-panel-button",3,"click",4,"ngIf"],[1,"field"],[1,"vital-content"],[1,"vital-title"],[1,"vital-content-data"],[1,"vital-body"],[1,"vital-unit"],["type","button",1,"task-panel-button",3,"click"]],template:function(i,r){i&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),k(3,"div",3)(4,"lib-svg-icon",4),c(),s(5,"div",5)(6,"h1",6),d(7),c(),s(8,"p",7),d(9),c(),f(10,xc,12,9,"div",8),c(),s(11,"div",9)(12,"div",10),f(13,bc,3,3,"button",11)(14,Sc,3,3,"button",11),c()()()()),i&2&&(ve("background-color",r.task.todo.category.backgroundColor),E("task-feed",r.taskFeedView),o(3),ve("background-color",r.task.todo.category.backgroundColor),o(),l("params",Z(12,yc,r.task.todo.category.icon,r.task.todo.category.backgroundColor)),o(3),P(r.task.todo.category.title),o(2),u(" ",r.task.todo.category.description||r.task.todo.title," "),o(),l("ngForOf",r.vitalList),o(3),l("ngIf",!r.checkInFlowService.isCheckInAppFlow()),o(),l("ngIf",r.checkInFlowService.isCheckInAppFlow()))},dependencies:[me,T,A,S],styles:[".task-panel-background[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;height:100%;width:100%;padding:30px 20px}.task-panel[_ngcontent-%COMP%]{height:100%;background-color:#fff;border-radius:8px;display:flex;flex-direction:column;overflow:hidden}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:100px;display:flex;align-items:center;justify-content:center;position:relative}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .header-background[_ngcontent-%COMP%]{pointer-events:none;position:absolute;height:100%;width:100%;opacity:.15}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 50px}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:1rem 2rem 0;overflow-y:auto;line-height:1.5}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:left;font-family:Roboto-bold,sans-serif;font-size:18px;letter-spacing:.53px;color:#064060;padding-bottom:1rem}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin-top:2rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.8rem 2rem;background-color:#064060;width:100%;box-sizing:border-box;font-family:Roboto-bold,sans-serif;align-items:center;cursor:pointer;width:15rem;border-radius:8px;margin:1rem 0;text-transform:uppercase;font-size:.875rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]:hover{opacity:.8}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[disabled][_ngcontent-%COMP%]{cursor:default}.task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{background:none;color:#064060;text-transform:uppercase;font-size:.875rem;letter-spacing:.43px;margin:.75rem 0}@media(max-height:460px){.task-panel-background[_ngcontent-%COMP%]{padding:10px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:60px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 30px}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:8px 8px 0}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{margin-top:8px}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%], .task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin:8px 0}}[_nghost-%COMP%]{height:100%}.description[_ngcontent-%COMP%]{margin-bottom:1rem}.field[_ngcontent-%COMP%]{padding:2rem 0;border-bottom:1px solid #fff;width:100%;text-align:center;justify-content:center;display:flex}.field[_ngcontent-%COMP%] .vital-title[_ngcontent-%COMP%]{margin-bottom:1rem}.field[_ngcontent-%COMP%] .vital-body[_ngcontent-%COMP%]{font-size:2.5rem;margin-bottom:1rem}.task-feed[_ngcontent-%COMP%]{background:none!important;padding:0}.task-feed[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{display:none}.task-feed[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:8px 0 0 48px;overflow:visible}.task-feed[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .task-feed[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{display:none}.task-feed[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]{width:50%;border:none;text-align:left;justify-content:flex-start;padding:0}.task-feed[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] .vital-content[_ngcontent-%COMP%]{color:#505050;width:100%}.task-feed[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] .vital-content[_ngcontent-%COMP%] .vital-content-data[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;display:flex;align-items:baseline;letter-spacing:.4px}.task-feed[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] .vital-content[_ngcontent-%COMP%] .vital-title[_ngcontent-%COMP%]{font-size:12px;line-height:24px;margin-bottom:5px}.task-feed[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] .vital-content[_ngcontent-%COMP%] .vital-body[_ngcontent-%COMP%]{font-size:24px;margin:0;max-width:50%;overflow:hidden;line-height:28px}.task-feed[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] .vital-content[_ngcontent-%COMP%] .vital-unit[_ngcontent-%COMP%]{font-size:14px;margin-left:5px}.task-feed[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:none}"]});let e=a;return e})();var Tc=(e,a)=>({name:e,color:a});function Ic(e,a){if(e&1&&(s(0,"div",12)(1,"p"),d(2),p(3,"translate"),c(),s(4,"p",13),d(5),c()()),e&2){let t=g(2);o(2),P(m(3,2,"We have emailed your receipt to:")),o(3),P(t.task.paymentEmail)}}function Ac(e,a){if(e&1){let t=y();s(0,"button",14),M("click",function(){h(t);let i=g(2);return v(i.reviewTask())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"Click here to review")," "))}function Ec(e,a){if(e&1){let t=y();s(0,"div",1)(1,"div",2)(2,"div",3),k(3,"div",4)(4,"lib-svg-icon",5),c(),s(5,"div",6)(6,"h1",7),d(7
1),p(8,"translate"),c(),s(9,"p"),d(10),p(11,"translate"),c(),f(12,Ic,6,4,"div",8),c(),s(13,"div",9),f(14,Ac,3,3,"button",10),s(15,"button",11),M("click",function(){h(t);let i=g();return v(i.done())}),d(16),p(17,"translate"),c()()()()}if(e&2){let t=g();ve("background-color",t.task.todo.category.backgroundColor),o(3),ve("background-color",t.task.todo.category.backgroundColor),o(),l("params",Z(16,Tc,t.task.todo.category.icon,t.task.todo.category.backgroundColor)),o(3),P(m(8,10,t.title)),o(3),P(m(11,12,t.description)),o(2),l("ngIf",t.task.paymentEmail),o(2),l("ngIf",t.isReviewNeeded()),o(2),u(" ",m(17,14,"Go to next task")," ")}}var tg=(()=>{let a=class a{constructor(n,i,r){this.redirectService=n,this.demographicsTaskService=i,this.checkInFlowService=r}ngOnInit(){let n;this.demographicsTaskService.resetData(),this.subscription=this.redirectService.currentTask$.subscribe(i=>{if(this.redirectService.isRedirectToCheckInNeeded())this.redirectService.gotoToAppointmentCheckIn();else if(i){let r=this.checkInFlowService.isCheckInAppFlow()?this.checkInFlowService.isTaskActive(n,i):this.redirectService.isTaskActive(n,i);!this.redirectService.isBaseUrlTypeCommon()&&!r?i.isDone&&this.redirectService.gotoNextUndoneTaskOrCheckIn():(this.task=i,this.setup(),this.afterInitRedirect())}n=i})}ngOnDestroy(){this.subscription?.unsubscribe()}afterInitRedirect(){this.checkInFlowService.isCheckInAppFlow()&&!this.redirectCompleted&&(this.redirectCompleted=!0,this.checkInFlowService.markCheckInFlowTaskAsDoneAndGoToNext(this.task,!0))}setup(){switch(this.task.valueType){case D.SIGN_DOCUMENT:this.title="Thank you",this.description="Your information has been updated";break;case D.DEMOGRAPHICS:this.title="Thank you",this.description="Your information has been updated";break;case D.HHF:case D.HHF_EXTERNAL:case D.QUESTIONNAIRE:case D.HPI_QUESTIONNAIRE:case D.ROS_QUESTIONNAIRE:case D.DEMOGRAPHIC_UDS:this.title="Thank you",this.description="Your information has been updated";break;case D.INSURANCE_CARD:this.title="Thank you",this.description="Your insurance card has been uploaded";break;default:this.title="Success",this.description="Thank you, your information has been updated"}}done(){this.checkInFlowService.isCheckInAppFlow()?this.checkInFlowService.markCheckInFlowTaskAsDoneAndGoToNext(this.task,!0):this.redirectService.gotoNextTask()}reviewTask(){this.redirectService.redirectToTaskAction(this.task,!0)}isReviewNeeded(){return this.task.valueType!==D.REGULAR&&this.task.valueType!==D.COPAY&&this.task.valueType!==D.OUTSTANDING_BALANCE&&this.task.valueType!==D.INSURANCE_CARD}};a.\u0275fac=function(i){return new(i||a)(_(x),_(Ye),_(R))},a.\u0275cmp=b({type:a,selectors:[["app-success"]],standalone:!1,decls:1,vars:1,consts:[["class","task-panel-background",3,"background-color",4,"ngIf"],[1,"task-panel-background"],[1,"task-panel"],[1,"task-panel-header"],[1,"header-background"],[3,"params"],[1,"task-panel-body"],[1,"title"],["class","description",4,"ngIf"],[1,"footer"],["class","link",3,"click",4,"ngIf"],[1,"task-panel-button",3,"click"],[1,"description"],[1,"email"],[1,"link",3,"click"]],template:function(i,r){i&1&&f(0,Ec,18,19,"div",0),i&2&&l("ngIf",r.task)},dependencies:[T,A,S],styles:[".task-panel-background[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;height:100%;width:100%;padding:30px 20px}.task-panel[_ngcontent-%COMP%]{height:100%;background-color:#fff;border-radius:8px;display:flex;flex-direction:column;overflow:hidden}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:100px;display:flex;align-items:center;justify-content:center;position:relative}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .header-background[_ngcontent-%COMP%]{pointer-events:none;position:absolute;height:100%;width:100%;opacity:.15}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 50px}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:1rem 2rem 0;overflow-y:auto;line-height:1.5}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:left;font-family:Roboto-bold,sans-serif;font-size:18px;letter-spacing:.53px;color:#064060;padding-bottom:1rem}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin-top:2rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.8rem 2rem;background-color:#064060;width:100%;box-sizing:border-box;font-family:Roboto-bold,sans-serif;align-items:center;cursor:pointer;width:15rem;border-radius:8px;margin:1rem 0;text-transform:uppercase;font-size:.875rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]:hover{opacity:.8}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[disabled][_ngcontent-%COMP%]{cursor:default}.task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{background:none;color:#064060;text-transform:uppercase;font-size:.875rem;letter-spacing:.43px;margin:.75rem 0}@media(max-height:460px){.task-panel-background[_ngcontent-%COMP%]{padding:10px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:60px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 30px}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:8px 8px 0}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{margin-top:8px}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%], .task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin:8px 0}}[_nghost-%COMP%]{height:100%}.task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{padding:.8rem 2rem;margin-top:1rem;margin-bottom:0}"]});let e=a;return e})();var Dc=["fileFrontInput"],Fc=["fileBackInput"],mo=()=>({name:"edit",color:"#949494"});function Bc(e,a){if(e&1&&(Ve(0),d(1),p(2,"translate"),Re()),e&2){let t=g();o(),u(" ",m(2,1,t.isInsuranceCardPrimary?"Primary insurance":"Secondary insurance")," ")}}function Vc(e,a){if(e&1&&(d(0),p(1,"translate")),e&2){let t=g();P(m(1,1,t.activeTask.todo.category.title))}}function Rc(e,a){if(e&1&&(k(0,"img",20),p(1,"translate")),e&2){let t=g();
1l("src",t.fileFront.href,Be)("alt",m(1,2,"Front of Insurance Card"))}}function Lc(e,a){if(e&1&&(k(0,"img",20),p(1,"translate")),e&2){let t=g();l("src",t.fileBack.href,Be)("alt",m(1,2,"Back of Insurance Card"))}}function Nc(e,a){if(e&1){let t=y();s(0,"button",21),M("click",function(){h(t);let i=g();return v(i.fileFrontClick())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"UPLOAD FRONT")," "))}function zc(e,a){if(e&1){let t=y();s(0,"button",21),M("click",function(){h(t);let i=g();return v(i.fileBackClick())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"UPLOAD BACK")," "))}function Uc(e,a){if(e&1){let t=y();s(0,"button",21),M("click",function(){h(t);let i=g();return v(i.saveInsuranceCard())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"CONFIRM")," "))}function jc(e,a){if(e&1){let t=y();s(0,"button",22),M("click",function(){h(t);let i=g();return v(i.moveForward())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"I DON'T HAVE INSURANCE")," "))}function Wc(e,a){e&1&&(s(0,"article",23)(1,"h2",5),d(2),p(3,"translate"),c(),s(4,"p",7),d(5),p(6,"translate"),c(),s(7,"p",7),d(8),p(9,"translate"),c(),s(10,"p",7),d(11),p(12,"translate"),c()()),e&2&&(o(2),u(" ",m(3,4,"Tips for taking photos")," "),o(3),u(" ",m(6,6,"Tilt your phone to take the photo in landscape")," "),o(3),u(" ",m(9,8,"Zoom in to fit the card within the frame of the screen")," "),o(3),u(" ",m(12,10,"Be sure that the card looks clear before taking the photo")," "))}var mg=(()=>{let a=class a extends Gi{constructor(n,i,r,C,O,w,I,K,J){super(n,i,r,C,I,K,O,J),this.insuranceCardTaskService=n,this.activatedRoute=i,this.appointmentApiService=r,this.insuranceCardApiService=C,this.checkInFlowService=O,this.redirectTaskService=w,this.fileLoaderService=I,this.viewContainerRef=K,this.simpleStorageService=J,this.onSaveSuccessInsuranceCardPrimary=()=>{this.redirectTaskService.gotoPageByUrl("add-secondary-insurance-card")},this.onSaveError=()=>{this.redirectTaskService.gotoNextTask()}}moveForward(){this.checkInFlowService.markTaskAsDone(this.activeTask,()=>this.redirectTaskService.gotoNextTask())}get isNewCheckInFlowEnabled(){return this.insuranceCardTaskService.isNewCheckInFlowEnabled}fileFrontClick(){this.fileFrontInput.nativeElement.click()}fileBackClick(){this.fileBackInput.nativeElement.click()}finishTask(n){n?this.checkInFlowService.moveForwardFromCompletedTask(this.activeTask):this.checkInFlowService.markTaskAsDone(this.activeTask,()=>this.redirectTaskService.gotoNextTask())}getActiveTask(){return this.redirectTaskService.getActiveTask()}};a.\u0275fac=function(i){return new(i||a)(_(Pn),_(fe),_(j),_(Si),_(R),_(x),_(fn),_(Gn),_(Mt))},a.\u0275cmp=b({type:a,selectors:[["app-insurance-card"]],viewQuery:function(i,r){if(i&1&&(le(Dc,5),le(Fc,5)),i&2){let C;pe(C=de())&&(r.fileFrontInput=C.first),pe(C=de())&&(r.fileBackInput=C.first)}},standalone:!1,features:[be],decls:38,vars:32,consts:[["taskTitleTemplate",""],["fileFrontInput",""],["fileBackInput",""],[1,"insurance-card"],[1,"insurance-card-wrapper"],[1,"title"],[4,"ngIf","ngIfElse"],[1,"description"],["type","file","hidden","","accept","image/*","id","fileFront","multiple","",3,"change"],[1,"side"],[1,"image-container"],[3,"src","alt",4,"ngIf"],["for","fileFront"],["role","button","aria-controls","fileFront","tabindex","0",3,"keydown.enter","params"],["type","file","hidden","","accept","image/*","id","fileBack","multiple","",3,"change"],["for","fileBack"],["role","button","aria-controls","fileBack","tabindex","0",3,"keydown.enter","params"],["type","button","class","action",3,"click",4,"ngIf"],["class","missing-insurance","type","button",3,"click",4,"ngIf"],["class","tips",4,"ngIf"],[3,"src","alt"],["type","button",1,"action",3,"click"],["type","button",1,"missing-insurance",3,"click"],[1,"tips"]],template:function(i,r){if(i&1){let C=y();s(0,"div",3)(1,"div",4)(2,"header")(3,"h1",5),f(4,Bc,3,3,"ng-container",6)(5,Vc,2,3,"ng-template",null,0,ue),c(),s(7,"p",7),d(8),p(9,"translate"),c()(),s(10,"section")(11,"input",8,1),M("change",function(w){return h(C),v(r.selectFile(w.target.files,"front"))}),c(),s(13,"p",9),d(14),p(15,"translate"),c(),s(16,"div",10),f(17,Rc,2,4,"img",11),c(),s(18,"label",12)(19,"lib-svg-icon",13),p(20,"translate"),M("keydown.enter",function(){return h(C),v(r.fileFrontClick())}),c()()(),s(21,"section")(22,"input",14,2),M("change",function(w){return h(C),v(r.selectFile(w.target.files,"back"))}),c(),s(24,"p",9),d(25),p(26,"translate"),c(),s(27,"div",10),f(28,Lc,2,4,"img",11),c(),s(29,"label",15)(30,"lib-svg-icon",16),p(31,"translate"),M("keydown.enter",function(){return h(C),v(r.fileBackClick())}),c()()(),s(32,"footer"),f(33,Nc,3,3,"button",17)(34,zc,3,3,"button",17)(35,Uc,3,3,"button",17)(36,jc,3,3,"button",18)(37,Wc,13,12,"article",19),c()()()}if(i&2){let C=U(6);o(4),l("ngIf",r.isNewCheckInFlowEnabled)("ngIfElse",C),o(4),u(" ",m(9,20,r.activeTask.todo.category.description||r.activeTask.todo.title)," "),o(2),E("hidden",!r.fileFront),o(4),P(m(15,22,"Front:")),o(3),l("ngIf",r.fileFront),o(2),l("params",z(30,mo)),H("aria-label",m(20,24,"UPLOAD FRONT")),o(2),E("hidden",!r.fileBack),o(4),P(m(26,26,"Back:")),o(3),l("ngIf",r.fileBack),o(2),l("params",z(31,mo)),H("aria-label",m(31,28,"UPLOAD BACK")),o(3),l("ngIf",!r.fileFront),o(),l("ngIf",r.fileFront&&!r.fileBack),o(),l("ngIf",r.fileFront&&r.fileBack),o(),l("ngIf",!r.fileFront),o(),l("ngIf",!r.fileFront)}},dependencies:[T,A,S],styles:['[_nghost-%COMP%]{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;height:100%;overflow:auto;padding:1.25em 1em;background-color:#80808014;color:#505050;font-family:Roboto-regular,sans-serif;font-size:1rem}header[_ngcontent-%COMP%]{padding-bottom:1.5em}.title[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;font-size:1.125em;color:#064060;text-align:center;justify-content:center;padding-bottom:1em}.description[_ngcontent-%COMP%]{padding:0 1.25em;line-height:1.5}footer[_ngcontent-%COMP%] .action[_ngcontent-%COMP%], footer[_ngcontent-%COMP%] .missing-insurance[_ngcontent-%COMP%]{box-sizing:border-box;display:block;margin:auto;width:15em;padding:.875em;color:#064060;background-color:transparent;border-radius:8px;font-family:Roboto-bold,sans-serif;font-size:.75em;text-align:center;cursor:pointer}footer[_ngcontent-%COMP%] .action[_ngcontent-%COMP%]{margin-bottom:.75rem;color:#fff;background-color:var(--branding-primary-color)}footer[_ngcontent-%COMP%] .action[_ngcontent-%COMP%]:only-child{margin:3.25em auto 2em}footer[_ngcontent-%COMP%] .tips[_ngcontent-%COMP%]{margin-top:4em}footer[_ngcontent-%COMP%] .tips[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], footer[_ngcontent-%COMP%] .tips[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{color:#de000d}footer[_ngcontent-%COMP%] .tips[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]:before{content:"";display:inline-flex;position:relative;top:-.25em;width:.25em;height:.25em;margin:0 .5em;border-radius:50%;background-color:currentcolor}section[_ngcontent-%COMP%]{margin-bottom:.625em;padding:2em 1.25em 1em;background-color:#fff;border-radius:8px}img[_ngcontent-%COMP%]{max-width:100%;margin:0 auto}.hidden[_ngcontent-%COMP%]{display:none}.side[_ngcontent-%COMP%]{font-size:1em;font-family:Roboto-bold,sans-serif}.image-container[_ngcontent-%COMP%]{margin:.625em 0 1em;padding:1em;border-radius:8px;border:1px solid currentcolor}']});let e=a;return e})();var qc=["lastActionButton"],Yc=e=>({"background-color":e}),Qc=(e,a)=>({name:e,color:a});function Hc(e,a){if(e&1){let t=y();s(0,"div",4)(1,"header"),k(2,"lib-svg-icon",5),s(3,"h4",6),d(4),p(5,"translate"),c()(),s(6,"div",7)(7,"section")(8,"p",8),d(9),p(10,"translate"),c(),s(11,"div",9)(12,"p",10),d(13),p(14,"translate"),c(),s(15,"p",11),d(16),c()(),s(17,"div",9)(18,"p",10),d(19),p(20,"translate"),c(),s(21,"p",11),d(22),c()(),s(23,"div",9)(24,"p",10),d(25),p(26,"translate"),c(),s(27,"p",11),d(28),c()()(),s(29,"footer")(30,"button",12),M("click",function(){h(t);let i=g(2);return v(i.addInsurance())}),d(31),p(32,"translate"),c(),s(33,"button",13,0),M("click",function(){h(t);let i=g(2);return v(i.moveForward())}),d(35),p(36,"translate"),c()()()()}if(e&2){let t=a.ngIf,n=g().ngIf;o(2),l("params",Z(25,Qc,n.icon,n.backgroundColor)),o(2),P(m(5,11,"Insurance Card")),o(5),u(" ",m(10,13,"Please review your insurance details below and click continue.")," "),o(4),P(m(14,15,"Payer:")),o(3),P(t.ircName),o(3),P(m(20,17,"Policy Name:")),o(3),P(t.planName),o(3),P(m(26,19,"Policy ID:")),o(3),P(t.insuranceNumber),o(3),u(" ",m(32,21,"CONTINUE")," "),o(4),u(" ",m(36,23,"I DON'T HAVE INSURANCE")," ")}}function Gc(e,a){if(e&1&&(s(0,"div",2),f(1,Hc,37,28,"div",3),c()),e&2){let t=a.ngIf,n=g();l("ngStyle",W(2,Yc,t.backgroundColor)),o(),l("ngIf",n.primaryInsuranceDetails)}}var vg=(()=>{let a=class a{set lastActionButton(n){n?.nativeElement.scrollIntoView(!1)}constructor(n,i,r){this.redirectTaskService=n,this.checkInFlowService=i,this.insuranceCardTaskService=r}ngOnInit(){this.activeTask=this.redirectTaskService.getActiveTask()}get primaryInsuranceDetails(){return this.insuranceCardTaskService.primaryInsuranceDetails}moveForward(){this.checkInFlowService.markTaskAsDone(this.activeTask,()=>this.redirectTaskService.gotoNextTask())}addInsurance(){this.redirectTaskService.gotoPageByUrl(`insurance-card/${cn.INSURANCE_CARD_PRIMARY}`)}};a.\u0275fac=function(i){return new(i||a)(_(x),_(R),_(Pn))}
1,a.\u0275cmp=b({type:a,selectors:[["app-confirm-insurance-card"]],viewQuery:function(i,r){if(i&1&&le(qc,5),i&2){let C;pe(C=de())&&(r.lastActionButton=C.first)}},standalone:!1,decls:1,vars:1,consts:[["lastActionButton",""],["class","insurance-card",3,"ngStyle",4,"ngIf"],[1,"insurance-card",3,"ngStyle"],["class","insurance-card-container",4,"ngIf"],[1,"insurance-card-container"],[1,"icon",3,"params"],[1,"title"],[1,"section-with-footer"],[1,"hint"],[1,"field"],[1,"field-name"],[1,"field-value"],["type","button",1,"confirm-button",3,"click"],["type","button",1,"missing-insurance",3,"click"]],template:function(i,r){i&1&&f(0,Gc,2,4,"div",1),i&2&&l("ngIf",r.activeTask.todo.category)},dependencies:[T,Le,A,S],styles:["[_nghost-%COMP%]{box-sizing:border-box;display:block;height:100%;overflow:auto;color:#505050;font-family:Roboto-regular,Arial,Helvetica,sans-serif;font-size:1rem;--base-space-value: .125em}@media(min-width:768px){[_nghost-%COMP%]{--base-space-value: .0625em}}.insurance-card[_ngcontent-%COMP%]{display:flex;height:auto;min-height:100%;box-sizing:border-box;padding:calc(var(--base-space-value) * 15) calc(var(--base-space-value) * 10)}.insurance-card-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.insurance-card-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100%}header[_ngcontent-%COMP%]{display:flex;padding:calc(var(--base-space-value) * 20);border-radius:8px 8px 0 0;background-color:#ffffffe6;font-size:1.125em}.title[_ngcontent-%COMP%], .field-value[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif}.hint[_ngcontent-%COMP%], .field-value[_ngcontent-%COMP%]{line-height:1.5;font-size:1em}.hint[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .field-value[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif}.title[_ngcontent-%COMP%] + .hint[_ngcontent-%COMP%]{margin-top:calc(var(--base-space-value) * 16)}.section-with-footer[_ngcontent-%COMP%]{flex-direction:column;display:flex;flex-grow:1;background-color:#fff;border-radius:0 0 8px 8px}footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;flex-grow:1;border-radius:0 0 8px 8px;text-align:center}section[_ngcontent-%COMP%], footer[_ngcontent-%COMP%]{padding:calc(var(--base-space-value) * 10) calc(var(--base-space-value) * 18) calc(var(--base-space-value) * 20);background-color:#fff}.icon[_ngcontent-%COMP%]{margin-right:calc(var(--base-space-value) * 7)}.icon[_ngcontent-%COMP%] svg{width:2em;height:1.375em}button[_ngcontent-%COMP%], .field-name[_ngcontent-%COMP%]{font-size:.75em}.field-name[_ngcontent-%COMP%]{margin-top:calc(var(--base-space-value) * 10)}button[_ngcontent-%COMP%]{box-sizing:border-box;min-width:15em;padding:calc(var(--base-space-value) * 7);background:none;color:#064060;font-weight:700;border-radius:8px;cursor:pointer}button[_ngcontent-%COMP%]:first-child{color:#fff}.confirm-button[_ngcontent-%COMP%]{padding:.875em;margin-bottom:calc(var(--base-space-value) * 3);background-color:var(--branding-primary-color)}.confirm-button[_ngcontent-%COMP%] + .missing-insurance[_ngcontent-%COMP%]{margin-top:calc(var(--base-space-value) * 6)}"]});let e=a;return e})();var Zc=e=>({"background-color":e}),$c=(e,a)=>({name:e,color:a});function Kc(e,a){if(e&1){let t=y();s(0,"div",1)(1,"div",2)(2,"header"),k(3,"lib-svg-icon",3),s(4,"h1",4),d(5),p(6,"translate"),c()(),s(7,"div",5)(8,"section")(9,"p",4),d(10),p(11,"translate"),c(),s(12,"p",6),d(13),p(14,"translate"),c()(),s(15,"footer")(16,"button",7),M("click",function(){h(t);let i=g();return v(i.addInsurance())}),d(17),p(18,"translate"),c(),s(19,"button",8),M("click",function(){h(t);let i=g();return v(i.gotoNextTask())}),d(20),p(21,"translate"),c()()()()()}if(e&2){let t=g();l("ngStyle",W(17,Zc,t.activeTask.todo.category.backgroundColor)),o(3),l("params",Z(19,$c,t.activeTask.todo.category.icon,t.activeTask.todo.category.backgroundColor)),o(2),P(m(6,7,"Insurance Card")),o(5),P(m(11,9,"Thank you!")),o(3),u(" ",m(14,11,"Your insurance card information has been updated. If you have secondary insurance you can tap below to submit your details.")," "),o(4),u(" ",m(18,13,"ADD SECONDARY INSURANCE")," "),o(3),u(" ",m(21,15,"CONTINUE TO NEXT TASK")," ")}}var xg=(()=>{let a=class a{constructor(n,i){this.redirectTaskService=n,this.checkInFlowService=i}ngOnInit(){this.activeTask=this.redirectTaskService.getActiveTask()}gotoNextTask(){this.checkInFlowService.markTaskAsDone(this.activeTask,()=>this.redirectTaskService.gotoNextTask())}addInsurance(){this.redirectTaskService.gotoPageByUrl(`insurance-card/${cn.INSURANCE_CARD_SECONDARY}`)}};a.\u0275fac=function(i){return new(i||a)(_(x),_(R))}
1,a.\u0275cmp=b({type:a,selectors:[["app-add-secondary-insurance-card"]],standalone:!1,decls:1,vars:1,consts:[["class","insurance-card",3,"ngStyle",4,"ngIf"],[1,"insurance-card",3,"ngStyle"],[1,"insurance-card-wrapper"],[1,"icon",3,"params"],[1,"title"],[1,"section-with-footer"],[1,"hint"],["type","button",1,"confirm-button",3,"click"],["type","button",3,"click"]],template:function(i,r){i&1&&f(0,Kc,22,22,"div",0),i&2&&l("ngIf",r.activeTask)},dependencies:[T,Le,A,S],styles:["[_nghost-%COMP%]{box-sizing:border-box;display:block;height:100%;overflow:auto;color:#505050;font-family:Roboto-regular,Arial,Helvetica,sans-serif;font-size:1rem;--base-space-value: .125em}@media(min-width:768px){[_nghost-%COMP%]{--base-space-value: .0625em}}.insurance-card[_ngcontent-%COMP%]{display:flex;height:auto;min-height:100%;box-sizing:border-box;padding:calc(var(--base-space-value) * 15) calc(var(--base-space-value) * 10)}.insurance-card-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.insurance-card-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100%}header[_ngcontent-%COMP%]{display:flex;padding:calc(var(--base-space-value) * 20);border-radius:8px 8px 0 0;background-color:#ffffffe6;font-size:1.125em}.title[_ngcontent-%COMP%], .field-value[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif}.hint[_ngcontent-%COMP%], .field-value[_ngcontent-%COMP%]{line-height:1.5;font-size:1em}.hint[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .field-value[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif}.title[_ngcontent-%COMP%] + .hint[_ngcontent-%COMP%]{margin-top:calc(var(--base-space-value) * 16)}.section-with-footer[_ngcontent-%COMP%]{flex-direction:column;display:flex;flex-grow:1;background-color:#fff;border-radius:0 0 8px 8px}footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;flex-grow:1;border-radius:0 0 8px 8px;text-align:center}section[_ngcontent-%COMP%], footer[_ngcontent-%COMP%]{padding:calc(var(--base-space-value) * 10) calc(var(--base-space-value) * 18) calc(var(--base-space-value) * 20);background-color:#fff}.icon[_ngcontent-%COMP%]{margin-right:calc(var(--base-space-value) * 7)}.icon[_ngcontent-%COMP%] svg{width:2em;height:1.375em}button[_ngcontent-%COMP%], .field-name[_ngcontent-%COMP%]{font-size:.75em}.field-name[_ngcontent-%COMP%]{margin-top:calc(var(--base-space-value) * 10)}button[_ngcontent-%COMP%]{box-sizing:border-box;min-width:15em;padding:calc(var(--base-space-value) * 7);background:none;color:#064060;font-weight:700;border-radius:8px;cursor:pointer}button[_ngcontent-%COMP%]:first-child{color:#fff}.confirm-button[_ngcontent-%COMP%]{padding:.875em;margin-bottom:calc(var(--base-space-value) * 3);background-color:var(--branding-primary-color)}.confirm-button[_ngcontent-%COMP%] + .missing-insurance[_ngcontent-%COMP%]{margin-top:calc(var(--base-space-value) * 6)}"]});let e=a;return e})();var go=e=>({color:e}),_o=(e,a)=>({name:e,color:a});function Jc(e,a){if(e&1&&(s(0,"p"),d(1),c()),e&2){let t=g();o(),u(" ",t.task.todo.category.description||t.task.todo.title," ")}}function es(e,a){if(e&1&&(s(0,"div",18),k(1,"img",19),p(2,"translate"),c()),e&2){let t=g();o(),l("src",t.fileFront.href,Be)("alt",m(2,2,"Driver's License"))}}function ts(e,a){if(e&1){let t=y();s(0,"button",20),M("click",function(){h(t);let i=g();return v(i.sendImage())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"Confirm")," "))}var Fg=(()=>{let a=class a extends zi{constructor(n,i,r,C,O){super(n,i,r,C),this.checkInFlowService=n,this.appointmentApiService=i,this.documentApiService=r,this.fileLoaderService=C,this.redirectTaskService=O,this.task=this.redirectTaskService.getActiveTask()}markTaskAsDone(){if(this.checkInFlowService.isCheckInAppFlow()){this.checkInFlowService.markCheckInFlowTaskAsDoneAndGoToNext(this.task);return}this.redirectTaskService.completeTaskAndSetItActive(this.task).subscribe(()=>{this.redirectTaskService.gotoSuccessPage()})}};a.\u0275fac=function(i){return new(i||a)(_(R),_(j),_(Wt),_(fn),_(x))},a.\u0275cmp=b({type:a,selectors:[["app-driver-license"]],standalone:!1,features:[be],decls:34,vars:48,consts:[[1,"picture","custom",3,"ngStyle"],[3,"params"],[1,"text-wrap"],[1,"text",3,"ngStyle"],[1,"task-panel-background"],[1,"task-panel"],[1,"task-panel-header"],[1,"header-background"],[1,"task-panel-body"],[1,"title"],[4,"ngIf"],["class","image-container",4,"ngIf"],[1,"footer"],["type","file","accept","image/*","id","fileFront","name","front","multiple","",1,"cdk-visually-hidden",3,"change"],["for","fileFront",1,"task-panel-button"],["type","button","class","task-panel-button",3,"click",4,"ngIf"],[1,"date"],[3,"hidden"],[1,"image-container"],[3,"src","alt"],["type","button",1,"task-panel-button",3,"click"]],template:function(i,r){i&1&&(s(0,"app-header-title-update")(1,"div",0),k(2,"lib-svg-icon",1),c(),s(3,"div",2)(4,"span",3),d(5),p(6,"translate"),c()()(),s(7,"div",4)(8,"div",5)(9,"div",6),k(10,"div",7)(11,"lib-svg-icon",1),c(),s(12,"div",8)(13,"h1",9),d(14),c(),f(15,Jc,2,1,"p",10)(16,es,3,4,"div",11),s(17,"div",12)(18,"input",13),M("change",function(O){return r.uploadFile(O.target.files)}),c(),s(19,"label",14),d(20),p(21,"translate"),c(),f(22,ts,3,3,"button",15),c(),s(23,"div",16)(24,"p",17),d(25),p(26,"c4uDate"),c(),s(27,"p",17),d(28),p(29,"c4uDate"),c(),s(30,"p",17),d(31),p(32,"translate"),p(33,"c4uDate"),c()()()()()),i&2&&(o(),l("ngStyle",W(38,go,r.task.todo.category.backgroundColor)),o(),l("params",Z(40,_o,r.task.todo.category.icon,r.task.todo.category.backgroundColor)),o(2),l("ngStyle",W(43,go,r.task.todo.category.backgroundColor)),o(),u(" ",m(6,23,"Driver license")," "),o(2),ve("background-color",r.task.todo.category.backgroundColor),o(3),ve("background-color",r.task.todo.category.backgroundColor),o(),l("params",Z(45,_o,r.task.todo.category.icon,r.task.todo.category.backgroundColor)),o(3),P(r.task.todo.category.title),o(),l("ngIf",!r.fileFront),o(),l("ngIf",r.fileFront),o(3),E("link",!!r.fileFront),o(),u(" ",r.fileFront?m(21,25,"Edit"):"Upload"," "),o(2),l("ngIf",r.fileFront==null?null:r.fileFront.href),o(2),l("hidden",!r.task.todo.category.isCheckUpType&&!r.task.todo.category.isAppointment),o(),u(" ",ne(26,27,r.task.dueAt,"todo_full_check_up")," "),o(2),l("hidden",!r.task.todo.category.isAppointment||!r.task.todo.category.isTaskType||!r.task.todo.category.isVideoCallType),o(),u(" ",ne(29,30,r.task.dueAt,"todo_full")," "),o(2),l("hidden",!r.task.isDone),o(),He(" ",m(32,33,"Completed")," ",ne(33,35,r.task.doneAt,"todo_full")," "))},dependencies:[Mn,T,Le,A,ze,S],styles:[".task-panel-background[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;height:100%;width:100%;padding:30px 20px}.task-panel[_ngcontent-%COMP%]{height:100%;background-color:#fff;border-radius:8px;display:flex;flex-direction:column;overflow:hidden}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:100px;display:flex;align-items:center;justify-content:center;position:relative}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .header-background[_ngcontent-%COMP%]{pointer-events:none;position:absolute;height:100%;width:100%;opacity:.15}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 50px}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:1rem 2rem 0;overflow-y:auto;line-height:1.5}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:left;font-family:Roboto-bold,sans-serif;font-size:18px;letter-spacing:.53px;color:#064060;padding-bottom:1rem}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin-top:2rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.8rem 2rem;background-color:#064060;width:100%;box-sizing:border-box;font-family:Roboto-bold,sans-serif;align-items:center;cursor:pointer;width:15rem;border-radius:8px;margin:1rem 0;text-transform:uppercase;font-size:.875rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]:hover{opacity:.8}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[disabled][_ngcontent-%COMP%]{cursor:default}.task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{background:none;color:#064060;text-transform:uppercase;font-size:.875rem;letter-spacing:.43px;margin:.75rem 0}@media(max-height:460px){.task-panel-background[_ngcontent-%COMP%]{padding:10px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:60px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 30px}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:8px 8px 0}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{margin-top:8px}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%], .task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin:8px 0}}[_nghost-%COMP%]{height:100%}.picture[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{border-radius:0}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding-right:1.8rem}.image-container[_ngcontent-%COMP%]{width:18rem;height:18rem;display:flex;align-items:center;justify-content:center;margin:auto;max-width:100%}.image-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18rem;max-height:18rem;transform:rotate(-90deg)}#fileFront[_ngcontent-%COMP%]:focus-visible + label[_ngcontent-%COMP%]{outline:2px solid #2A7EFB}.date[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:.5rem}.footer[_ngcontent-%COMP%]{position:relative}"]});let e=a;return e})();var uo=(()=>{let a=class a{constructor(n){this.redirectService=n,this.activeFormStorage=new Ie(null),this.formStorageList=new Ie(null),this.questionnaireStorageList=new Ie(null),this.prevQuestionnaireParams=new Ie({}),this.formOrder=new Ie(-1),this.formList=[],this.clearForm(),this.isNextLocked=new Ie(!1),this.isFormSending=new Ie(!1)}updateForm(n){this.activeForm.next(n)}updatePrevQuestionnaireParams(n){this.prevQuestionnaireParams.next(n)}updateFormStorageList(n){this.formStorageList.next(n)}updateQuestionnaireStorageList(n){this.questionnaireStorageList.next(n)}updateFormOrder(n){this.formOrder.next(n)}updateDrawingData(n){this.drawingData.next(n)}clearForm(){this.activeForm=new Ie(null),this.drawingData=new Ie(null)}clearFormsStorage(){this.activeFormStorage=new Ie(null),this.formStorageList=new Ie(null),this.questionnaireStorageList=new Ie(null),this.prevQuestionnaireParams=new Ie({}),this.formOrder=new Ie(-1),this.formList=[]}updateNextButtonStatus(n){this.isNextLocked.next(n)}isNextButtonLocked(){return this.isNextLocked.getValue()}updateFormSendingStatus(n){this.isFormSending.next(n)}isNextFormAvailable(){return this.formStorageList.value?.length>=1&&this.formStorageList.value.length>this.formOrder.value+1}redirectToNextForm(){let n=this.redirectService.getActiveTask();this.isNextFormAvailable()?(this.updateFormOrder(this.formOrder.value+1),n?.todo?.source?.appointment_id&&this.redirectService.navigate([this.redirectService.getBaseQuestionnaireUrl(),"main",this.formStorageList.value[this.formOrder.value].formId],{queryParams:{appointmentId:n.todo.source.appointment_id}})):(this.clearFormsStorage(),n?this.redirectService.redirectToTaskAction(n,!1):this.redirectService.navigate([this.redirectService.getBaseUrl()]))}clearBaseData(){this.appointmentId=void 0,this.formId=void 0,this.language=void 0}};a.\u0275fac=function(i){return new(i||a)(ce(x))}
1,a.\u0275prov=lt({token:a,factory:a.\u0275fac});let e=a;return e})();var is=()=>({name:"arrow-right",color:"#fff"});function os(e,a){if(e&1){let t=y();s(0,"div",13)(1,"input",14),M("change",function(){let i=h(t).$implicit,r=g();return v(r.selectReason(i))}),c(),s(2,"label",15),d(3),c()()}if(e&2){let t=a.$implicit,n=g();o(),l("id","reason-"+t.id),o(),E("chosen",(n.selectedReason==null?null:n.selectedReason.id)===t.id),l("for","reason-"+t.id),o(),u(" ",t.title," ")}}var Hg=(()=>{let a=class a{constructor(n,i,r,C){this.appointmentApiService=n,this.redirectService=i,this.dataService=r,this.questionnaireApiService=C}ngOnInit(){this.task=this.redirectService.getActiveTask(),this.appointmentId=this.task?.todo?.source?.appointment_id,this.appointmentId&&this.appointmentApiService.getAppointmentReasons(this.appointmentId).subscribe(n=>this.reasonList=n),this.dataService.clearFormsStorage()}goToQuestionnaireForms(){this.appointmentApiService.getQuestionnaireForms(this.appointmentId,this.selectedReason.id).pipe(Q(n=>this.dataService.updateFormStorageList(n)),he(n=>n.map(({formId:i})=>this.questionnaireApiService.getByInputParams(i,{appointmentId:this.appointmentId}))),L(n=>Ae(n))).subscribe(n=>{this.dataService.updateQuestionnaireStorageList(n),this.dataService.redirectToNextForm()})}selectReason(n){this.selectedReason=n}};a.\u0275fac=function(i){return new(i||a)(_(j),_(x),_(uo),_(bi))}
1,a.\u0275cmp=b({type:a,selectors:[["app-appointment-reason"]],standalone:!1,decls:21,vars:18,consts:[[1,"field"],[1,"title"],[1,"desc"],[1,"question"],[1,"cdk-visually-hidden"],["class","variant-wrap",4,"ngFor","ngForOf"],[1,"pagination"],[1,"pagination-btn"],[1,"pagination-info","pagination-btn"],[1,"pagination-btn","right"],["libButton","",1,"right",3,"click","disabled"],[1,"arrow"],[3,"params"],[1,"variant-wrap"],["type","radio","name","reason",1,"cdk-visually-hidden",3,"change","id"],[1,"variant",3,"for"]],template:function(i,r){i&1&&(s(0,"div",0)(1,"h1",1),d(2),p(3,"translate"),c(),s(4,"div",2),d(5),p(6,"translate"),c(),s(7,"fieldset",3)(8,"legend",4),d(9),p(10,"translate"),c(),f(11,os,4,5,"div",5),c(),s(12,"div",6),k(13,"span",7)(14,"span",8),s(15,"span",9)(16,"button",10),M("click",function(){return r.goToQuestionnaireForms()}),d(17),p(18,"translate"),s(19,"span",11),k(20,"lib-svg-icon",12),c()()()()()),i&2&&(o(2),P(m(3,9,"Select reason")),o(3),u(" ",m(6,11,"Please select the reason for your visit")," "),o(4),u(" ",m(10,13,"Select reason")," "),o(2),l("ngForOf",r.reasonList),o(5),E("inactive",!r.selectedReason),l("disabled",!r.selectedReason),o(),u(" ",m(18,15,"NEXT")," "),o(3),l("params",z(17,is)))},dependencies:[me,A,G,S],styles:['.field[_ngcontent-%COMP%]{display:block;margin:0 auto;text-align:center}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:auto}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-bottom:.625rem}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]:focus-visible + label[_ngcontent-%COMP%]{border:solid 2px #2A7EFB}.field[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%]{display:flex;color:#505050;justify-content:center;padding:var(--field-variant-option-vertical-padding, 1rem) 1rem;background-color:var(--field-variant-option-default-color, #fff);width:100%;box-sizing:border-box;font-family:var(--field-variant-option-font-family, "Roboto-bold", sans-serif);align-items:center;cursor:pointer;min-height:2.4rem;transition:all linear .2s;border-radius:8px;border:solid 2px transparent}.field[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%]:hover{opacity:.8}.field[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.field[_ngcontent-%COMP%] .variant[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.field[_ngcontent-%COMP%] .variant[disabled][_ngcontent-%COMP%]{cursor:default}.field[_ngcontent-%COMP%] .variant.chosen[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:var(--field-variant-option-vertical-padding, 1rem) 1rem;background-color:var(--branding-primary-color);width:100%;box-sizing:border-box;font-family:var(--field-variant-option-font-family, "Roboto-bold", sans-serif);align-items:center;cursor:pointer;border-radius:8px}.field[_ngcontent-%COMP%] .variant.chosen[_ngcontent-%COMP%]:hover{opacity:.8}.field[_ngcontent-%COMP%] .variant.chosen[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.field[_ngcontent-%COMP%] .variant.chosen[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.field[_ngcontent-%COMP%] .variant.chosen[disabled][_ngcontent-%COMP%]{cursor:default}.field[_ngcontent-%COMP%] .variant.chosen.with-conditional-fields[_ngcontent-%COMP%]{border-radius:8px 8px 0 0}.field[_ngcontent-%COMP%] .variant.disabled[_ngcontent-%COMP%]{opacity:.6}.field[_ngcontent-%COMP%] app-questionnaire-field-common[_ngcontent-%COMP%]{display:block;border:var(--field-variant-option-conditional-fields-border-size, 1px) solid rgba(6,64,96,.5);border-top:none;border-radius:0 0 8px 8px}.field[_ngcontent-%COMP%] app-questionnaire-field-common[_ngcontent-%COMP%] .title{text-align:left;font-family:Roboto-regular,sans-serif;color:#505050;font-size:1rem;margin-bottom:var(--secondary-question-variant-header-bottom-margin, 1rem);padding:var(--secondary-question-header-title-vertical-padding, 0) var(--secondary-question-header-title-horizontal-padding, 1rem)}.field[_ngcontent-%COMP%] app-questionnaire-field-common[_ngcontent-%COMP%] .wrapper{background-color:#fff;border-radius:0 0 8px 8px}.field[_ngcontent-%COMP%] app-questionnaire-field-common[_ngcontent-%COMP%] app-questionnaire-field-height .question label{align-items:flex-start}.field[_ngcontent-%COMP%] app-questionnaire-field-common.scale[_ngcontent-%COMP%], .field[_ngcontent-%COMP%] app-questionnaire-field-common.variant[_ngcontent-%COMP%], .field[_ngcontent-%COMP%] app-questionnaire-field-common.dropdown[_ngcontent-%COMP%]{border:none;margin-bottom:.5rem}.field[_ngcontent-%COMP%] app-questionnaire-field-common.scale[_ngcontent-%COMP%] + .variant[_ngcontent-%COMP%], .field[_ngcontent-%COMP%] app-questionnaire-field-common.variant[_ngcontent-%COMP%] + .variant[_ngcontent-%COMP%], .field[_ngcontent-%COMP%] app-questionnaire-field-common.dropdown[_ngcontent-%COMP%] + .variant[_ngcontent-%COMP%]{border-radius:8px}.field[_ngcontent-%COMP%] app-questionnaire-field-common.scale[_ngcontent-%COMP%] .title, .field[_ngcontent-%COMP%] app-questionnaire-field-common.variant[_ngcontent-%COMP%] .title, .field[_ngcontent-%COMP%] app-questionnaire-field-common.dropdown[_ngcontent-%COMP%] .title{margin:1.5rem 0 var(--secondary-question-variant-header-bottom-margin, 1.5rem)}.field[_ngcontent-%COMP%] app-questionnaire-field-common.scale[_ngcontent-%COMP%] .wrapper, .field[_ngcontent-%COMP%] app-questionnaire-field-common.variant[_ngcontent-%COMP%] .wrapper, .field[_ngcontent-%COMP%] app-questionnaire-field-common.dropdown[_ngcontent-%COMP%] .wrapper{background-color:initial}',".pagination[_ngcontent-%COMP%]{display:flex;width:100%;flex-direction:row;align-items:center;padding:1rem 0 2rem;font-size:.7rem;justify-content:space-between;background-color:#f5f5f5}.pagination[_ngcontent-%COMP%] .pagination-btn[_ngcontent-%COMP%]{flex:1}.pagination[_ngcontent-%COMP%] .pagination-btn[_ngcontent-%COMP%]:not(.right){padding-left:1rem;padding-right:0}.pagination[_ngcontent-%COMP%] .pagination-btn.right[_ngcontent-%COMP%]{justify-content:flex-end;display:flex;padding-left:0}.pagination[_ngcontent-%COMP%] button.right[_ngcontent-%COMP%]{width:auto;padding:.5rem 1rem;font-size:.75rem}.pagination[_ngcontent-%COMP%] .nav-back[_ngcontent-%COMP%]{color:#505050}.pagination[_ngcontent-%COMP%] .button-placeholder[_ngcontent-%COMP%]{display:flex;min-width:30vw}","[_nghost-%COMP%]{display:block;height:100%;background-color:#f5f5f5;overflow:auto}.field[_ngcontent-%COMP%]{display:block;margin:0 auto;text-align:center;width:100%;min-height:100%;height:max-content;box-sizing:border-box;padding:1.5rem 1rem}.field[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;font-size:1.125rem;margin:1rem auto .5rem;line-height:1.3rem;padding:0 1rem;color:#064060}.field[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%]{padding:1rem 1.25rem 1.5rem;padding-top:0;margin:0 auto;text-align:left}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus-visible + label[_ngcontent-%COMP%]{outline:solid 2px #2A7EFB}.field[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .variant-wrap[_ngcontent-%COMP%] .variant.chosen[_ngcontent-%COMP%]{background-color:var(--branding-primary-color);color:#fff}.pagination[_ngcontent-%COMP%]{margin-top:3.4rem}@media(min-width:700px){.field[_ngcontent-%COMP%]{padding:1.5rem 2.5rem}}"]});let e=a;return e})();function as(e,a){if(e&1&&(s(0,"lib-expansion-panel")(1,"div",3)(2,"span",4),d(3),p(4,"translate"),c(),s(5,"span",2),d(6),p(7,"currency"),c()(),s(8,"div")(9,"div",5)(10,"span",1),d(11),p(12,"translate"),c(),s(13,"span",2),d(14),p(15,"currency"),c()(),s(16,"div",5)(17,"span",1),d(18),p(19,"translate"),c(),s(20,"span",2),d(21),p(22,"currency"),c()(),s(23,"div",6)(24,"div",7),d(25),p(26,"c4uDate"),c(),s(27,"div",8),d(28),
1c()()()()),e&2){let t=a.$implicit;o(3),He("",m(4,9,"Invoice")," ",t.invoiceNumber),o(3),P(Tt(7,11,t.totalAmount,"USD","symbol","1.2-2")),o(5),P(m(12,16,"Paid:")),o(3),P(Tt(15,18,t.paidAmount,"USD","symbol","1.2-2")),o(4),P(m(19,23,"Remaining Balance:")),o(3),P(Tt(22,25,t.balanceAmount,"USD","symbol","1.2-2")),o(4),u(" ",ne(26,30,t.dateOfService,"appointment_date")," "),o(3),u(" ",t.locationName," ")}}var Co=(()=>{let a=class a{};a.\u0275fac=function(i){return new(i||a)},a.\u0275cmp=b({type:a,selectors:[["app-balance-by-invoice"]],inputs:{outstandingBalance:"outstandingBalance"},decls:9,vars:9,consts:[[1,"balance-line","total-balance-line"],[1,"label"],[1,"amount"],["panelHeader","",1,"invoice-header"],[1,"invoice-number"],[1,"balance-line"],[1,"date-location"],[1,"invoice-date"],[1,"location"]],template:function(i,r){i&1&&(Et(0,as,29,33,"lib-expansion-panel",null,At),s(2,"div",0)(3,"div",1),d(4),p(5,"translate"),c(),s(6,"div",2),d(7),p(8,"currency"),c()()),i&2&&(Dt(r.outstandingBalance.invoiceDetailsList),o(4),u("",m(5,2,"Total amount due:")," "),o(3),P(Tt(8,4,r.outstandingBalance.amount,"USD","symbol","1.2-2")))},dependencies:[Bi,S,Ge,ze],styles:["[_nghost-%COMP%]{letter-spacing:.23px}lib-expansion-panel[_ngcontent-%COMP%]{margin-bottom:.25rem}.invoice-header[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center}.invoice-number[_ngcontent-%COMP%]{flex:1;font-family:Roboto-bold,sans-serif;font-size:.875rem}.amount[_ngcontent-%COMP%]{color:#064060}.balance-line[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:.75rem;padding-bottom:.75rem}.balance-line[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex:1}.date-location[_ngcontent-%COMP%]{font-size:.625rem;font-family:Roboto-bold,sans-serif;line-height:1.4;padding:.5rem 0}.total-balance-line[_ngcontent-%COMP%]{padding:1.5rem 1rem 0}.total-balance-line[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{letter-spacing:.4px}.total-balance-line[_ngcontent-%COMP%] .amount[_ngcontent-%COMP%]{font-size:2rem}"],changeDetection:0});let e=a;return e})();var cs=e=>({"--category-color":e}),fo=e=>({name:"copay",color:e});function ss(e,a){if(e&1&&k(0,"app-balance-by-invoice",10),e&2){let t=g(2);l("outstandingBalance",t.task.outstandingBalance)}}function ls(e,a){if(e&1&&(s(0,"div",9)(1,"span",13),d(2),p(3,"translate"),c(),s(4,"span",14),d(5),p(6,"currency"),c()()),e&2){let t=g(2);o(2),P(m(3,2,"Amount:")),o(3),P(Tt(6,4,t.task.outstandingBalance.amount,"USD","symbol","1.2-2"))}}function ps(e,a){if(e&1){let t=y();s(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5),k(4,"lib-svg-icon",6),s(5,"h1",7),d(6),p(7,"translate"),c()(),s(8,"div",8)(9,"div",9),d(10),p(11,"translate"),c(),ee(12,ss,1,1,"app-balance-by-invoice",10)(13,ls,7,9,"div",9),c()(),s(14,"app-payment-buttons",11),M("cardPaymentTriggered",function(){h(t);let i=g();return v(i.goToPayment())}),s(15,"button",12),M("click",function(){h(t);let i=g();return v(i.goToPartialPayment())}),d(16),p(17,"translate"),c()()()()}if(e&2){let t=g();nn(W(14,cs,t.task.todo.category.backgroundColor)),o(4),l("params",W(16,fo,t.task.todo.category.backgroundColor)),o(2),P(m(7,8,"Payments")),o(4),u(" ",m(11,10,t.task.category.description||"You have an outstanding balance on your account.")," "),o(2),te(t.displayInvoiceDetails?12:t.task.outstandingBalance!=null&&t.task.outstandingBalance.amount?13:-1),o(2),l("trustCommerceUrl",t.trustCommerceUrl),o(2),u(" ",m(17,12,"MAKE PARTIAL PAYMENT")," ")}}function ds(e,a){if(e&1&&(s(0,"div",15),k(1,"lib-svg-icon",6),s(2,"div",9),d(3),p(4,"translate"),c()()),e&2){let t=g();o(),l("params",W(4,fo,t.task.todo.category.backgroundColor)),o(2),u(" ",m(4,2,"You have no payable outstanding balances in our app at this time.")," ")}}var p0=(()=>{let a=class a{constructor(n,i,r,C,O,w,I,K,J,Oe){this.paymentApiService=n,this.currentUserService=i,this.redirectService=r,this.router=C,this.checkInFlowService=O,this.appointmentApiService=w,this.onFlyTasksFlowService=I,this.trustCommerceService=K,this.cdr=J,this.activatedRoute=Oe,this.displayInvoiceDetails=!1}ngOnInit(){this.task=this.redirectService.getActiveTask(),this.isCheckInAppFlow=this.checkInFlowService.isCheckInAppFlow(),this.isOnFlyTasksFlow=this.onFlyTasksFlowService.isOnFlyTasksFlow(),this.task?.clinicUuid&&this.setOutstandingBalance()}setOutstandingBalance(){let n;this.currentUserService.getModel().pipe(Q(({id:i})=>n=i),L(()=>
1{if(this.task.departmentUuid)return ge(this.task.departmentUuid);let i=this.task?.todo?.source?.appointment_id??null;return i?this.appointmentApiService.get(i).pipe(he(({departmentUuid:r})=>r)):ge(void 0)}),L(i=>this.paymentApiService.getDepartmentBalance(n,this.task.clinicUuid,i))).subscribe({next:i=>{this.task.outstandingBalance=i,this.task.departmentUuid&&(this.task.outstandingBalance.departmentUuid=this.task.departmentUuid),i?.invoiceDetailsList?.length&&(this.displayInvoiceDetails=!0),i.processorData?.type==="trust_commerce"&&(this.trustCommerceUrl=this.trustCommerceService.prepareUrl(i.amount,i.processorData),this.trustCommerceService.handleTrustCommerceRedirect(this.activatedRoute,this.task)),this.cdr.markForCheck()},complete:()=>{this.task.outstandingBalance||(this.isCheckInAppFlow?this.checkInFlowService.markCheckInFlowTaskAsDoneAndGoToNext(this.task):this.isOnFlyTasksFlow&&this.onFlyTasksFlowService.markTaskAsDoneAndMoveForward(this.task))}})}goToPartialPayment(){let n=this.router.isActive(this.redirectService.getBaseUrl(),!1)?this.redirectService.getBaseUrl()+"/outstanding-balance-partial-payment":"/user/outstanding-balance-partial-payment";this.redirectService.navigate([n],{queryParamsHandling:"preserve"})}goToPayment(){this.redirectService.setActiveTask(this.task),this.redirectService.navigate([this.redirectService.getBaseUrl()+"/copay-create"],{queryParamsHandling:"preserve"})}};a.\u0275fac=function(i){return new(i||a)(_(Me),_(re),_(x),_(De),_(R),_(j),_(We),_(bt),_(dt),_(fe))},a.\u0275cmp=b({type:a,selectors:[["app-outstanding-balance"]],standalone:!1,decls:3,vars:2,consts:[["noData",""],["class","outstanding-balance-data",3,"style",4,"ngIf","ngIfElse"],[1,"outstanding-balance-data"],[1,"outstanding-balance-wrapper"],[1,"body"],[1,"header"],[3,"params"],[1,"title"],[1,"content"],[1,"description"],[3,"outstandingBalance"],[3,"cardPaymentTriggered","trustCommerceUrl"],["libButton","","variant","link","type","button",1,"button-link",3,"click"],[1,"label"],[1,"amount"],[1,"no-data"]],template:function(i,r){if(i&1&&f(0,ps,18,18,"div",1)(1,ds,5,6,"ng-template",null,0,ue),i&2){let C=U(2);l("ngIf",r.task.clinicUuid)("ngIfElse",C)}},dependencies:[T,A,G,Co,Qt,S,Ge],styles:["[_nghost-%COMP%]{height:100%}.outstanding-balance-data[_ngcontent-%COMP%]{background-color:#f99143;background:linear-gradient(164.52deg,var(--category-color),rgb(from var(--category-color) r g b/60%));box-sizing:border-box;padding:1.5rem 1.25rem;color:#505050;height:fit-content;min-height:100%;display:flex;width:100%}.outstanding-balance-data[_ngcontent-%COMP%] .outstanding-balance-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;border-radius:8px;width:100%}.outstanding-balance-data[_ngcontent-%COMP%] .outstanding-balance-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:1.25rem 2rem;box-sizing:border-box}.outstanding-balance-data[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;box-sizing:border-box;padding:2rem;background:#f9914326;width:100%;gap:1rem;align-items:center;--svg-size: 2rem}.outstanding-balance-data[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1.125rem;font-family:Roboto-bold,sans-serif}.outstanding-balance-data[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{display:flex;align-items:center;margin:.7rem 0;flex-direction:column;font-size:1rem;line-height:1.5rem;gap:.5rem}.outstanding-balance-data[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;margin-bottom:.5rem}.outstanding-balance-data[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .amount[_ngcontent-%COMP%]{font-size:3.5rem;font-family:Roboto-regular,sans-serif;color:#064060}@media(max-width:375px){.outstanding-balance-data[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .amount[_ngcontent-%COMP%]{font-size:3rem}}.outstanding-balance-data[_ngcontent-%COMP%] app-payment-buttons[_ngcontent-%COMP%]{margin-top:1.5rem;padding-bottom:2.5rem}.outstanding-balance-data[_ngcontent-%COMP%] app-payment-buttons[_ngcontent-%COMP%] .button-link[_ngcontent-%COMP%]{color:var(--branding-primary-color);font-size:.875rem;margin-top:.75rem}.no-data[_ngcontent-%COMP%]{background:#fff;display:flex;flex-direction:column;align-items:center;padding:2rem;box-sizing:border-box;width:100%}.no-data[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 2.5rem;width:10rem;height:10rem;display:flex;align-items:center;justify-content:center;background:#f9914326;border-radius:50%}.no-data[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{font-size:1rem;line-height:1.5rem;text-align:center;margin-top:3rem}@media(min-width:700px){.outstanding-balance-data[_ngcontent-%COMP%]{padding:1.5rem 2.5rem}}"],changeDetection:0});let e=a;return e})();var ms=()=>({name:"arrow-right",color:"currentColor"});function gs(e,a){if(e&1){let t=y();s(0,"li")(1,"a",4),M("click",function(){let i=h(t).$implicit,r=g();return v(r.goToBalance(i.settings.clinicUuid))})("keydown.enter",function(){let i=h(t).$implicit,r=g();return v(r.goToBalance(i.settings.clinicUuid))}),s(2,"span",5),k(3,"lib-avatar-image",6),c(),s(4,"span",7),d(5),c(),s(6,"span",8),d(7),p(8,"translate"),k(9,"lib-svg-icon",9),c()()()}if(e&2){let t=a.$implicit,n=g();o(3),l("src",n.clinicInfo[t.settings.clinicUuid].image),o(2),P(n.clinicInfo[t.settings.clinicUuid].title),o(2),u("",m(8,4,"PAY")," "),o(2),l("params",z(6,ms))}}var O0=(()=>{let a=class a{constructor(n,i,r,C,O,w){this.clinicApiService=n,this.currentUser=i,this.userApiService=r,this.redirectService=C,this.checkInFlowService=O,this.onFlyTasksFlowService=w,this.clinicInfo={},this.clinicList=[]}ngOnInit(){let n=this.redirectService.getActiveTask();(this.checkInFlowService.isCheckInAppFlow()||this.onFlyTasksFlowService.isOnFlyTasksFlow())&&this.isOutstandingBalanceTask(n)?this.goToBalance(n.clinicUuid):this.currentUser.getModel().subscribe(i=>{this.loadClinicInfo(),this.getEvents(i.id)})}isOutstandingBalanceTask(n){return n.actions.some(({type:i})=>i===D.OUTSTANDING_BALANCE)}loadClinicInfo(){this.clinicApiService.getClinicListByToken().subscribe(n=>
1{n.forEach(({clinicUuid:i,image:r,title:C})=>{this.clinicInfo[i]={title:C||i,image:r}})})}getEvents(n){this.userApiService.getUserActions({userId:n,action:yi.APP_RELEASE,type:xi.BALANCE}).subscribe(i=>{this.actionList=i,this.actionSetup()})}actionSetup(){if(!this.actionList.length)this.goToBalance(null);else{for(let n of this.actionList)this.clinicList.push(n.settings.clinicUuid);this.clinicList=[...new Set(this.clinicList)],this.clinicList.length<2&&this.goToBalance(this.clinicList[0])}}goToBalance(n){this.checkInFlowService.isCheckInAppFlow()||this.onFlyTasksFlowService.isOnFlyTasksFlow()?this.redirectService.setActiveTask(this.redirectService.getActiveTask()):this.redirectService.setActiveTask({todo:{category:{backgroundColor:"#f99042",icon:"copay"},actions:[{type:D.OUTSTANDING_BALANCE}]},category:{title:D.OUTSTANDING_BALANCE},clinicUuid:n,valueType:D.OUTSTANDING_BALANCE}),this.redirectService.navigate([this.checkInFlowService.isCheckInAppFlow()||this.onFlyTasksFlowService.isOnFlyTasksFlow()?this.redirectService.getBaseUrl()+"/outstanding-balance":"/user/outstanding-balance"],{queryParamsHandling:"preserve"})}};a.\u0275fac=function(i){return new(i||a)(_(Ze),_(re),_(Oi),_(x),_(R),_(We))},a.\u0275cmp=b({type:a,selectors:[["app-outstanding-balance-list"]],standalone:!1,decls:7,vars:4,consts:[[1,"list-wrapper","clinic-list"],[1,"list-content"],[1,"list"],[4,"ngFor","ngForOf"],["tabindex","0",1,"element",3,"click","keydown.enter"],[1,"icon"],[1,"image",3,"src"],[1,"content"],[1,"arrow"],[3,"params"]],template:function(i,r){i&1&&(s(0,"app-header-title-update"),d(1),p(2,"translate"),c(),s(3,"div",0)(4,"div",1)(5,"ul",2),f(6,gs,10,7,"li",3),c()()()),i&2&&(o(),P(m(2,2,"Outstanding balances")),o(5),l("ngForOf",r.actionList))},dependencies:[Mn,wi,me,A,S],styles:[".no-data[_ngcontent-%COMP%]{display:flex;height:100%;width:100%;padding:0 5%;align-items:center;justify-content:center;background-color:#effcff;text-align:center;color:#064060;line-height:1.5rem;font-family:Roboto-bold,sans-serif;flex-direction:column;box-sizing:border-box}.no-data[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:1.5rem;margin-bottom:1rem}.no-data[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding:1rem}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1}.list-content[_ngcontent-%COMP%]{display:flex;flex:1}.list-wrapper[_ngcontent-%COMP%]{display:flex;flex:1;width:100%}.element[_ngcontent-%COMP%]{display:flex;padding:1.5rem 1rem;border-top:1px solid #e6e6e6;align-items:center;justify-content:space-between;color:#505050;font-size:.9rem;cursor:pointer;-webkit-overflow-scrolling:touch}.element[_ngcontent-%COMP%]:last-child, .element[_ngcontent-%COMP%] .last[_ngcontent-%COMP%]{border-bottom:1px solid #e6e6e6}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 .5rem;overflow:hidden;flex:1;line-height:1.3rem}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .date[_ngcontent-%COMP%], .element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:block}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{margin-bottom:.3rem}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;flex:.2;--avatar-image-size: 2rem}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] svg, .element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:2rem;height:2rem;min-width:1rem;min-height:1rem;background-size:2rem}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{color:#a7a7a7;display:flex;align-items:center;font-family:Roboto-medium,sans-serif}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%] svg{width:1.4rem;height:1.4rem}.clinic-list[_ngcontent-%COMP%]{padding-top:2rem}.list[_ngcontent-%COMP%]{padding:2px}.element[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:none}.element[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;font-size:1rem}.element[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{color:#b55813;font-family:Roboto-bold,sans-serif}"]});let e=a;return e})();function _s(e,a){if(e&1&&(s(0,"div",12),d(1),p(2,"translate"),p(3,"currency"),p(4,"translate"),c()),e&2){let t=g(2);o(),Bt(" ",m(2,4,"Minimum payment required:")," ",m(3,6,t.minimumAmount)," (",t.minimumPaymentPercent,"% ",m(4,8,"of your balance"),"). ")}}function us(e,a){if(e&1&&(s(0,"div",12),d(1),p(2,"translate"),p(3,"currency"),c()),e&2){let t=g(2);o(),He(" ",m(2,2,"Payment amount cannot exceed your balance of "),"",m(3,4,t.task.outstandingBalance.amount)," ")}}function Cs(e,a){if(e&1){let t=y();s(0,"div",8)(1,"label",9),d(2),p(3,"translate"),c(),s(4,"div",10)(5,"input",11),V("ngModelChange",function(i){h(t);let r=g();return B(r.enteredAmount,i)||(r.enteredAmount=i),v(i)}),M("ngModelChange",function(i){h(t);let r=g();return v(r.onAmountChange(i))}),c()(),ee(6,_s,5,10,"div",12),ee(7,us,4,6,"div",12),c()}if(e&2){let t=g();o(2),P(m(3,4,"Amount")),o(3),F("ngModel",t.enteredAmount),o(),te(t.enteredAmount<t.minimumAmount?6:-1),o(),te(t.enteredAmount>t.task.outstandingBalance.amount?7:-1)}}function fs(e,a){if(e&1){let t=y();s(0,"app-payment-buttons",13),M("cardPaymentTriggered",function(){h(t);let i=g();return v(i.goToPayment())}),c()}if(e&2){let t=g();l("trustCommerceUrl",t.trustCommerceUrl)}}var F0=(()=>{let a=class a{constructor(n,i,r,C,O,w,I){this.paymentApiService=n,this.currentUserService=i,this.redirectService=r,this.appointmentApiService=C,this.trustCommerceService=O,this.activatedRoute=w,this.cdr=I,this.minimumAmount=0}ngOnInit(){let n;this.task=this.redirectService.getActiveTask(),this.currentUserService.getModel().pipe(Q(({id:i})=>n=i),L(()=>
1{if(this.task.departmentUuid)return ge(this.task.departmentUuid);let i=this.task?.todo?.source?.appointment_id??null;return i?this.appointmentApiService.get(i).pipe(he(({departmentUuid:r})=>r)):ge(void 0)}),L(i=>this.paymentApiService.getDepartmentBalance(n,this.task.clinicUuid,i))).subscribe(i=>{this.enteredAmount=i.amount,this.minimumAmount=i.minPaymentPercent?Math.round(i.amount*i.minPaymentPercent)/100:0,this.minimumPaymentPercent=i.minPaymentPercent??0,this.task.outstandingBalance=i,this.task.departmentUuid&&(this.task.outstandingBalance.departmentUuid=this.task.departmentUuid),i.processorData?.type==="trust_commerce"&&(this.trustCommerceUrl=this.trustCommerceService.prepareUrl(i.amount,i.processorData),this.trustCommerceService.handleTrustCommerceRedirect(this.activatedRoute,this.task)),this.cdr.markForCheck()})}onAmountChange(n){if(!this.task?.outstandingBalance||isNaN(n))return;let i=this.task.outstandingBalance.processorData;i?.type==="trust_commerce"&&(this.trustCommerceUrl=this.trustCommerceService.prepareUrl(n,i))}goToPayment(){this.task.outstandingBalance.amount=this.enteredAmount,this.redirectService.setActiveTask(this.task),this.redirectService.navigate([this.redirectService.getBaseUrl()+"/copay-create"],{queryParamsHandling:"preserve"})}};a.\u0275fac=function(i){return new(i||a)(_(Me),_(re),_(x),_(j),_(bt),_(fe),_(dt))},a.\u0275cmp=b({type:a,selectors:[["app-outstanding-balance-partial-payment"]],standalone:!1,decls:12,vars:8,consts:[[1,"outstanding-balance-data"],[1,"outstanding-balance-wrapper"],[1,"content"],[1,"header"],[1,"title"],[1,"description"],["class","amount-wrapper",4,"ngIf"],[3,"trustCommerceUrl"],[1,"amount-wrapper"],["for","amount"],[1,"input-wrapper"],["type","text","id","amount","mask","separator.2","thousandSeparator",",","prefix","$",3,"ngModelChange","ngModel"],[1,"error"],[3,"cardPaymentTriggered","trustCommerceUrl"]],template:function(i,r){i&1&&(s(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h1",4),d(5),p(6,"translate"),c(),s(7,"div",5),d(8),p(9,"translate"),c()(),f(10,Cs,8,6,"div",6),c()(),ee(11,fs,1,1,"app-payment-buttons",7),c()),i&2&&(o(5),P(m(6,4,"Enter amount")),o(3),u(" ",m(9,6,"Please enter how much of your outstanding balance you would like to pay now")," "),o(2),l("ngIf",r.task.outstandingBalance),o(),te(r.enteredAmount>0&&r.enteredAmount>=r.minimumAmount&&r.enteredAmount<=r.task.outstandingBalance.amount?11:-1))},dependencies:[Ce,ie,oe,je,T,Qt,S,Ge],styles:["[_nghost-%COMP%]{display:block;height:100%}.outstanding-balance-data[_ngcontent-%COMP%]{color:#505050;height:fit-content;min-height:100%;background-color:#8080801a;padding:0 1rem;display:flex;flex-direction:column}.outstanding-balance-data[_ngcontent-%COMP%] .outstanding-balance-wrapper[_ngcontent-%COMP%]{padding-top:1.5rem;display:flex;flex-direction:column}.outstanding-balance-data[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.outstanding-balance-data[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{line-height:1.31rem;font-family:Roboto-bold,sans-serif;font-size:1.125rem;color:#064060;text-align:center}.outstanding-balance-data[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{color:#505050;font-size:1rem;text-align:left;line-height:1.5rem;padding:0 1rem}.outstanding-balance-data[_ngcontent-%COMP%] .amount-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;border-radius:8px;box-sizing:border-box;padding:1.5rem 1.25rem;margin-top:1.5rem;gap:.5rem}.outstanding-balance-data[_ngcontent-%COMP%] .amount-wrapper[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:.75rem}.outstanding-balance-data[_ngcontent-%COMP%] .amount-wrapper[_ngcontent-%COMP%] .input-wrapper[_ngcontent-%COMP%]{border:1px solid #949494;border-radius:8px;color:#505050;text-align:center;font-size:3.5rem;padding:.5rem;position:relative;width:100%;box-sizing:border-box}.outstanding-balance-data[_ngcontent-%COMP%] .amount-wrapper[_ngcontent-%COMP%] .input-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{color:#505050;max-width:100%;text-align:center}.outstanding-balance-data[_ngcontent-%COMP%] .amount-wrapper[_ngcontent-%COMP%] .input-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.outstanding-balance-data[_ngcontent-%COMP%] .amount-wrapper[_ngcontent-%COMP%] .input-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.outstanding-balance-data[_ngcontent-%COMP%] .amount-wrapper[_ngcontent-%COMP%] .input-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.outstanding-balance-data[_ngcontent-%COMP%] .amount-wrapper[_ngcontent-%COMP%] .input-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.outstanding-balance-data[_ngcontent-%COMP%] .amount-wrapper[_ngcontent-%COMP%] .input-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.outstanding-balance-data[_ngcontent-%COMP%] app-payment-buttons[_ngcontent-%COMP%]{margin-top:3.5rem}@media(min-width:700px){.outstanding-balance-data[_ngcontent-%COMP%] .amount-wrapper[_ngcontent-%COMP%]{padding:1.5rem 2.5rem}}"],changeDetection:0});let e=a;return e})();var hs=()=>({name:"close",color:"#949494"}),vs=()=>({standalone:!0}),ho=(()=>{let a=class a{constructor(){this.dialogRef=tn(pi),this.text=""}closeDialog(){this.dialogRef.close(this.text.trim())}};a.\u0275fac=function(i){return new(i||a)},a.\u0275cmp=b({type:a,selectors:[["lib-image-draw-type"]],standalone:!1,decls:18,vars:21,consts:[["mat-dialog-close","","type","button",1,"close-button",3,"aria-label"],[3,"params"],["mat-dialog-title","","id","type-where-pain-is"],[1,"description"],[3,"ngSubmit"],["aria-labelledby","type-where-pain-is",3,"ngModelChange","ngModelOptions","placeholder","ngModel"],["libButton","","type","submit",1,"save-btn",3,"disabled"]],template:function(i,r){i&1&&(s(0,"button",0),p(1,"translate"),k(2,"lib-svg-icon",1),c(),s(3,"h2",2),d(4),p(5,"translate"),c(),s(6,"div",3),d(7),p(8,"translate"),c(),s(9,"form",4),M("ngSubmit",function(){return r.closeDialog()}),s(10,"mat-dialog-content")(11,"textarea",5),p(12,"translate"),V("ngModelChange",function(O){return B(r.text,O)||(r.text=O),O}),c()(),s(13,"footer")(14,"mat-dialog-actions")(15,"button",6),d(16),p(17,"translate"),c()()()()),i&2&&($n("aria-label",m(1,9,"Close")),o(2),l("params",z(19,hs)),o(2),u(" ",m(5,11,"Describe where it hurts"),` 2`),o(3),P(m(8,13,"Type the location and any detail you'd like to share.")),o(4),l("ngModelOptions",z(20,vs))("placeholder",m(12,15,"e.g. Sharp pain in lower back, left side...")),F("ngModel",r.text),o(4),l("disabled",!r.text.trim()),o(),u(" ",m(17,17,"CONFIRM")," "))},dependencies:[zt,Ce,ie,Nt,oe,_t,mi,gi,ui,_i,A,G,S],styles:[".close-button[_ngcontent-%COMP%]{background:none;margin-left:auto;display:block}.close-button[_ngcontent-%COMP%]:hover{cursor:pointer}.close-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 1rem}h2.mdc-dialog__title[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;font-size:18px;color:#064060;padding-left:0;letter-spacing:.53px}h2.mdc-dialog__title[_ngcontent-%COMP%]:before{display:none}.description[_ngcontent-%COMP%]{font-family:Roboto-regular,sans-serif;font-size:13px;letter-spacing:.43px;line-height:1.2}mat-dialog-content[_ngcontent-%COMP%]{padding:2px!important;padding-top:10px}textarea[_ngcontent-%COMP%]{border:1px solid #505050;border-radius:8px;overflow:hidden;box-sizing:border-box;font-size:15px;line-height:1.5;height:120px;width:100%;padding:6px 8px;font-family:Roboto-regular,sans-serif;margin:20px auto!important}textarea.empty[_ngcontent-%COMP%]{border-color:#949494}textarea.has-error[_ngcontent-%COMP%]{border-color:#de000d}textarea[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{display:block;width:100%;border:none}.save-btn[_ngcontent-%COMP%]{width:auto;min-width:240px;padding:.75rem 2.5rem;margin:auto}@media(min-width:390px){textarea[_ngcontent-%COMP%]{min-width:260px}}
2@media(min-width:900px){textarea[_ngcontent-%COMP%]{min-width:670px}}"]});let e=a;return e})();var Ps=["signaturePad"],Ms=["drawCreate"];function Os(e,a){e&1&&(s(0,"div",23),d(1),p(2,"translate"),c()),e&2&&(o(),P(m(2,1,"Please draw")))}function ks(e,a){if(e&1){let t=y();s(0,"div",5)(1,"h1",6),d(2),p(3,"translate"),c(),s(4,"div",7)(5,"span"),d(6),p(7,"translate"),c()(),s(8,"div",8)(9,"div",9)(10,"div",10),d(11),p(12,"translate"),c(),s(13,"div",11)(14,"div",12)(15,"signature-pad",13,1),M("drawStart",function(){h(t);let i=g(2);return v(i.onDrawStart())}),c()(),s(17,"div",14),d(18),p(19,"translate"),c()(),s(20,"div",15)(21,"button",16),M("click",function(){h(t);let i=g(2);return v(i.removeSignature())}),d(22),p(23,"translate"),c()(),s(24,"div",17),f(25,Os,3,3,"div",18),c(),s(26,"div",19),d(27),p(28,"translate"),c(),s(29,"button",20),M("click",function(){h(t);let i=g(2);return v(i.openAlternativeTextDialog())}),d(30),p(31,"translate"),c()()(),s(32,"div",21)(33,"button",22),M("click",function(){h(t);let i=g(2);return v(i.submitSignature())}),d(34),p(35,"translate"),c()()()}if(e&2){let t=g(2);o(2),P(m(3,13,"Draw on Image")),o(4),P(m(7,15,t.task.todo.category.description)),o(5),P(m(12,17,"Please draw below:")),o(4),l("options",t.signaturePadOptions),o(3),u(" ",m(19,19,'Draw your pain/issue area, or use the "Type where pain/issue is" button below.')," "),o(2),E("hidden",!t.isDrawn),o(2),P(m(23,21,"Clear")),o(3),l("ngIf",t.signatureError),o(2),P(m(28,23,"Or")),o(3),u(" ",m(31,25,"TYPE WHERE PAIN/ISSUE IS")," "),o(3),l("disabled",!t.isDrawn),o(),P(m(35,27,"Submit"))}}function ys(e,a){if(e&1&&(s(0,"div",3,0),f(2,ks,36,29,"div",4),c()),e&2){let t=g();o(2),l("ngIf",t.signaturePadOptions)}}var wn=(()=>{let a=class a{constructor(){this.drawImage=new wt,this.remove=new wt,this.matDialog=tn(di),this.signaturePadOptions=null}createCanvas(n,i,r){this.imgSrc=r;let C;if(this.signaturePad&&!this.signaturePad.isEmpty()){C=this.signaturePad.toData();let O=n/this.signaturePadOptions.canvasWidth,w=i/this.signaturePadOptions.canvasHeight;C.forEach(I=>{I.points.forEach(K=>{K.x*=O,K.y*=w})})}this.signaturePadOptions=null,this.signaturePadOptions={backgroundColor:"#ffffff",minWidth:1,canvasHeight:i,canvasWidth:n},this.signaturePadOptions.penColor="#FF0A0A",setTimeout(()=>Dn(this,null,function*(){this.signaturePad&&(this.signaturePad.clear(),yield this.signaturePad.getSignaturePad().fromDataURL(r,{width:n,height:i}),C&&this.signaturePad.getSignaturePad().fromData(C,{clear:!1}),this.alternativeText&&this.drawTextOnPad(this.alternativeText))}),0)}setCanvasSizes(n,i){let r=this.signaturePad?.getCanvas();r&&(r.width=n,r.height=i)}onDrawStart(){this.isDrawn=!0,this.signatureError=!1}removeSignature(){this.signaturePad.clear(),this.alternativeText=void 0,this.isDrawn=!1,this.signatureError=!1,this.remove.emit()}submitSignature(){if(!this.isDrawn){this.signatureError=!0;return}this.drawImage.emit(this.signaturePad.toDataURL())}openAlternativeTextDialog(){this.matDialog.open(ho,{data:{},autoFocus:"textarea"}).afterClosed().subscribe(n=>{if(!n)return;this.alternativeText=n;let i=this.signaturePad?.getCanvas();i&&this.createCanvas(i.width,i.height,this.imgSrc),this.isDrawn=!0,this.signatureError=!1})}drawTextOnPad(n){let i=this.signaturePad?.getCanvas(),r=i?.getContext("2d");if(!r)return;let C=21,O=C*1.2,I=i.width-16*2;r.fillStyle=this.signaturePadOptions.penColor,r.font=`${C}px Beth_Ellen, serif`,r.textAlign="center",r.textBaseline="middle";let K=this.wrapText(r,n,I),J=i.height/2-(K.length-1)*O/2;K.forEach((Oe,Te)=>{r.fillText(Oe,i.width/2,J+Te*O)})}wrapText(n,i,r){let C=[];for(let O of i.split(/\r?\n/)){let w=O.split(/\s+/).filter(Boolean);if(!w.length){C.push("");continue}let I=w[0];for(let K=1;K<w.length;K++){let J=`${I} ${w[K]}`;n.measureText(J).width<=r?I=J:(C.push(I),I=w[K])}C.push(I)}return C}};a.\u0275fac=function(i){return new(i||a)},a.\u0275cmp=b({type:a,selectors:[["lib-image-draw"]],viewQuery:function(i,r){if(i&1&&(le(Ps,5),le(Ms,5)),i&2){let C;pe(C=de())&&(r.signaturePad=C.first),pe(C=de())&&(r.drawCreate=C.first)}},inputs:{task:"task",canvasSizes:"canvasSizes"},outputs:{drawImage:"drawImage",remove:"remove"},standalone:!1,decls:1,vars:1,consts:[["drawCreate",""],["signaturePad",""],["class","wrapper new-layout",4,"ngIf"],[1,"wrapper","new-layout"],["class","draw-create",4,"ngIf"],[1,"draw-create"],[1,"title"],[1,"description"],[1,"sign-area-wrapper"],[1,"sign-area-content"],[1,"sign-area-title"],[1,"sign-area-container"],["id","signArea",1,"sign-area"],["aria-describedby","signature-pad-description",3,"drawStart","options"],["id","signature-pad-description",1,"sr-only"],[1,"sign-area-action"],["type","button",1,"link",3,"click"],[1,"signature-errors"],["class","error",4,"ngIf"],[1,"or"],["libButton","","variant","outline","type","button",1,"type-button",3,"click"],[1,"signature-action"],["libButton","","type","button",3,"click","disabled"],[1,"error"]],template:function(i,r){i&1&&f(0,ys,3,1,"div",2),i&2&&l("ngIf",r.task)},dependencies:[T,Ii,G,S],styles:['[_nghost-%COMP%]{display:flex;width:100%}.hidden[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%]{visibility:hidden}.new-layout[_ngcontent-%COMP%]{height:fit-content;max-width:100%}.new-layout.wrapper[_ngcontent-%COMP%]{width:100%}.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%]{width:100%;height:fit-content}.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;color:#064060;font-size:1.1rem;margin:0}.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{text-align:left;padding:0 1.25rem;line-height:1.5rem;margin:1rem 0 1.5rem}.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .sign-area-wrapper[_ngcontent-%COMP%]{background-color:#fff;flex-direction:column;border-radius:.5rem;align-items:center;margin:0}.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .sign-area-wrapper[_ngcontent-%COMP%] .sign-area-content[_ngcontent-%COMP%]{padding:2rem calc(1.25rem - 1px)}.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .sign-area-wrapper[_ngcontent-%COMP%] .sign-area-content[_ngcontent-%COMP%] .sign-area-title[_ngcontent-%COMP%]{color:#505050;font-family:Roboto-bold,sans-serif;margin-bottom:.5rem}.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .sign-area-wrapper[_ngcontent-%COMP%] .sign-area-content[_ngcontent-%COMP%] .sign-area-action[_ngcontent-%COMP%]{justify-content:flex-end;display:flex;margin-top:.3rem}.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .sign-area-wrapper[_ngcontent-%COMP%] .sign-area-content[_ngcontent-%COMP%] .sign-area-action.hidden[_ngcontent-%COMP%]{visibility:hidden;pointer-events:none}.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .sign-area-wrapper[_ngcontent-%COMP%] .sign-area-content[_ngcontent-%COMP%] .sign-area-action[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{color:#505050;text-transform:uppercase;font-family:Roboto-bold,sans-serif;font-size:.7rem}.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .sign-area-wrapper[_ngcontent-%COMP%] .sign-area-content[_ngcontent-%COMP%] .sign-area-container[_ngcontent-%COMP%]{border:1px solid #505050;border-radius:.5rem;min-height:290px;min-width:290px;
2display:flex;align-items:center;justify-content:center;overflow:hidden}.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .sign-area-wrapper[_ngcontent-%COMP%] .sign-area-content[_ngcontent-%COMP%] .sign-area-container[_ngcontent-%COMP%] .sign-area[_ngcontent-%COMP%]{border:none}.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .sign-area-wrapper[_ngcontent-%COMP%] .sign-area-content[_ngcontent-%COMP%] .sign-area-container[_ngcontent-%COMP%] .sign-area[_ngcontent-%COMP%] signature-pad[_ngcontent-%COMP%]{display:flex}.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .sign-area-wrapper[_ngcontent-%COMP%] .sign-area-content[_ngcontent-%COMP%] .sign-area-container[_ngcontent-%COMP%] .sign-area[_ngcontent-%COMP%] canvas{border:none;border-radius:.5rem}@media screen and (min-width:700px){.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .sign-area-wrapper[_ngcontent-%COMP%] .sign-area-content[_ngcontent-%COMP%] .sign-area-container[_ngcontent-%COMP%]{min-height:420px;min-width:540px}}@media screen and (min-width:900px){.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .sign-area-wrapper[_ngcontent-%COMP%] .sign-area-content[_ngcontent-%COMP%] .sign-area-container[_ngcontent-%COMP%]{min-height:420px;min-width:740px}}.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .signature-action[_ngcontent-%COMP%]{justify-content:center;margin:2.5rem 0}.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .signature-action[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:13rem}.wrapper[_ngcontent-%COMP%]{width:100vw;display:flex}.draw-create[_ngcontent-%COMP%]{box-sizing:border-box;padding:0 1rem 1rem;flex-direction:column;display:flex;align-items:center;justify-content:center;width:auto}.draw-create[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{margin:.5rem 0;display:flex}.draw-create[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;text-align:center;line-height:1.4rem}.draw-create[_ngcontent-%COMP%] .sign-area[_ngcontent-%COMP%]{touch-action:none;border:2px solid #949494}.draw-create[_ngcontent-%COMP%] .signature-errors[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.draw-create[_ngcontent-%COMP%] .signature-errors[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin-bottom:.5rem}.draw-create[_ngcontent-%COMP%] .or[_ngcontent-%COMP%]{display:flex;flex-direction:row;font-size:1rem;margin:.25rem 0 1rem}.draw-create[_ngcontent-%COMP%] .or[_ngcontent-%COMP%]:before, .draw-create[_ngcontent-%COMP%] .or[_ngcontent-%COMP%]:after{content:"";flex:1 1;border-bottom:1px solid;margin:auto;opacity:.2}.draw-create[_ngcontent-%COMP%] .or[_ngcontent-%COMP%]:before{margin-right:8px}.draw-create[_ngcontent-%COMP%] .or[_ngcontent-%COMP%]:after{margin-left:8px}.draw-create[_ngcontent-%COMP%] .type-button[_ngcontent-%COMP%]{margin:0 auto;min-width:240px}.draw-create[_ngcontent-%COMP%] .signature-action[_ngcontent-%COMP%]{justify-content:space-between;width:100%}.self-checkin[_nghost-%COMP%] .new-layout[_ngcontent-%COMP%] .sign-area-container[_ngcontent-%COMP%], .self-checkin [_nghost-%COMP%] .new-layout[_ngcontent-%COMP%] .sign-area-container[_ngcontent-%COMP%]{min-height:290px!important;min-width:290px!important}@media all and (max-width:340px){.new-layout[_ngcontent-%COMP%] .draw-create[_ngcontent-%COMP%] .sign-area-wrapper[_ngcontent-%COMP%] .sign-area-content[_ngcontent-%COMP%]{padding:6px}}@media all and (min-width:700px){.draw-create[_ngcontent-%COMP%] .type-button[_ngcontent-%COMP%]{width:auto}}']});let e=a;return e})();st();function bs(e,a){if(e&1){let t=y();s(0,"lib-image-draw",1),M("remove",function(){h(t);let i=g();return v(i.removeSignature())})("drawImage",function(i){h(t);let r=g();return v(r.signatureComplete(i))}),c()}if(e&2){let t=g();l("task",t.task)}}var ot,vo=(ot=class{constructor(a,t,n,i,r,C,O,w,I,K){this.appointmentApiService=a,this.documentApiService=t,this.translateService=n,this.redirectService=i,this.configService=r,this.router=C,this.checkInFlowService=O,this.onFlyTasksFlowService=w,this.taskApiService=I,this.elementRef=K,this.isOnFlyTasksFlow=this.onFlyTasksFlowService.isOnFlyTasksFlow()}ngOnInit(){this.init(),this.task&&this.configService.setTitle(this.task.todo?.category?.title),this.redirectService.activeTask().pipe(_e(a=>!this.redirectService.isTaskActive(a,this.task)),en(0),_e(()=>this.router.url.includes("image-draw")),ke(this)).subscribe(a=>{this.isHidden=!0,this.task=a,setTimeout(()=>{this.task=null},1500),setTimeout(()=>{this.isHidden=!1,this.router.url.includes("image-draw")&&this.init()},3e3)}),Bn(window,"resize").pipe(Jt(300),Un(null),he(()=>window.innerWidth),Ln(),zn(1),ke(this)).subscribe(()=>this.calculateCanvas())}getActiveTask(){return this.redirectService.getActiveTask()}signatureComplete(a){this.documentApiService.postDrawnPicture(this.task.clinicUuid,this.task.todo.userId,this.task.documentType,a,`${this.task.documentType}.png`).subscribe(({id:t})=>this.onSignatureCompleted(t))}loadImage(){let a=new Image;a.src=this.imgSrc,a.onload=()=>this.onImageLoadSuccess(a),a.onerror=()=>this.onImageLoadFailure(),a.onabort=()=>this.onImageLoadFailure()}onImageLoadFailure(){this.imgWidth=0,this.imgHeight=0,this.canvasWidth=0,this.canvasHeight=0,console.error("Failed to load image for image draw task.",this.imgSrc)}init(){this.task=this.getActiveTask(),this.task?.todo?.source?.appointment_id?this.appointmentApiService.get(this.task.todo.source.appointment_id).subscribe(a=>{this.task.clinicUuid=a.clinicUuid,this.initImageSrc()}):this.task?.todo?.source?.clinic_id&&(this.task.clinicUuid=this.task.todo.source.clinic_id,this.initImageSrc())}initImageSrc(){this.documentApiService.getClinicDocumentTypes(this.task.clinicUuid,[Mi.DRAW_ON_IMAGE]).pipe(Q(a=>{this.task.documentType=a.find(t=>
2t.id===Number(this.task.todo.actions[0].value[0]))?.name}),L(()=>this.translateService.getCurrentLanguageProperties()),L(a=>this.documentApiService.getDocumentContent(this.task.clinicUuid,this.task.documentType,a?.id))).subscribe(a=>{this.imgSrc=a,this.loadImage()})}calculateCanvas(){if(!this.imgWidth||!this.imgHeight||!this.imageDrawComponent)return;let a=this.getCanvasMaxHeight(),t=Math.max(this.imgWidth/this.getCanvasMaxWidth(),this.imgHeight/a),n=this.imgWidth/this.imgHeight;this.canvasHeight=this.imgHeight/t<a?this.imgHeight/t:a,this.canvasWidth=this.canvasHeight*n,this.imageDrawComponent.createCanvas(this.canvasWidth,this.canvasHeight,this.imgSrc),this.imageDrawComponent.setCanvasSizes(this.canvasWidth,this.canvasHeight)}onSignatureCompleted(a){this.isOnFlyTasksFlow?this.onFlyTasksFlowService.markTaskAsDoneAndMoveForward(this.task,[a]):this.checkInFlowService.isCheckInAppFlow()?this.task.source?.appointment?this.checkInFlowService.markCheckInFlowTaskAsDoneAndGoToNext(this.task,!1,[a]):this.taskApiService.markOnFlyTaskAsDone(this.task.settingId,[a]).subscribe(()=>this.checkInFlowService.moveForwardFromCompletedTask(this.task)):this.redirectService.completeTaskAndSetItActive(this.task).subscribe(()=>this.redirectService.gotoSuccessPage())}onImageLoadSuccess(a){this.imgWidth=a.width,this.imgHeight=a.height,this.calculateCanvas()}removeSignature(){this.loadImage()}getCanvasMaxHeight(){let a=this.elementRef.nativeElement.offsetWidth,t=700;return a<350?290:a<t?320:420}getCanvasMaxWidth(){let a=this.elementRef.nativeElement.offsetWidth,t=700,n=900;return a<t?320:a<n?540:740}},ot.\u0275fac=function(t){return new(t||ot)(_(j),_(Wt),_(sn),_(x),_(ae),_(De),_(R),_(We),_(Ke),_(pt))},ot.\u0275cmp=b({type:ot,selectors:[["lib-image-draw-task"]],viewQuery:function(t,n){if(t&1&&le(wn,5),t&2){let i;pe(i=de())&&(n.imageDrawComponent=i.first)}},standalone:!1,decls:1,vars:1,consts:[[3,"task"],[3,"remove","drawImage","task"]],template:function(t,n){t&1&&ee(0,bs,1,1,"lib-image-draw",0),t&2&&te(n.isHidden?-1:0)},dependencies:[wn],styles:[".quick-link-app[_nghost-%COMP%] lib-image-draw[_ngcontent-%COMP%], .quick-link-app [_nghost-%COMP%] lib-image-draw[_ngcontent-%COMP%]{margin:0 auto}[_nghost-%COMP%]{display:flex;height:100%;width:100%;background-color:#8080801a;overflow:auto}lib-image-draw[_ngcontent-%COMP%]{padding-top:1.5rem}"]}),ot);vo=ye([Se(),xe("design:paramtypes",[j,Wt,sn,x,ae,De,R,We,Ke,pt])],vo);var Ss=e=>[e];function ws(e,a){if(e&1&&(s(0,"div",7),k(1,"div",8),c()),e&2){let t=g();o(),l("innerHTML",t.description,Qn)}}function Ts(e,a){if(e&1&&(s(0,"button",9),d(1),p(2,"translate"),c()),e&2){let t=g();l("routerLink",W(4,Ss,t.copayCreateUrl)),o(),u(" ",m(2,2,"CLICK TO SIGN")," ")}}var __=(()=>{let a=class a{constructor(n,i,r){this.paymentApiService=n,this.appointmentApiService=i,this.redirectService=r}ngOnInit(){this.task=this.redirectService.getActiveTask(),this.initDescription()}initDescription(){let n=this.task.todo.source?.appointment_id;n&&this.appointmentApiService.get(n).pipe(L(({clinicUuid:i})=>this.paymentApiService.getOneYearContractTerms(i))).subscribe(i=>{this.description=i})}get copayCreateUrl(){return this.redirectService.getBaseUrl()+"/copay-contract-sign"}};a.\u0275fac=function(i){return new(i||a)(_(Me),_(j),_(x))},a.\u0275cmp=b({type:a,selectors:[["app-copay-contract"]],standalone:!1,decls:11,vars:8,consts:[[1,"copay-contract"],[1,"header"],[1,"title"],[1,"description"],["class","main",4,"ngIf"],[1,"footer"],["libButton","","type","button",3,"routerLink",4,"ngIf"],[1,"main"],[1,"container",3,"innerHTML"],["libButton","","type","button",3,"routerLink"]],template:function(i,r){i&1&&(s(0,"div",0)(1,"div",1)(2,"h1",2),d(3),p(4,"translate"),c(),s(5,"p",3),d(6),p(7,"translate"),c()(),f(8,ws,2,1,"div",4),s(9,"div",5),f(10,Ts,3,6,"button",6),c()()),i&2&&(o(3),P(m(4,4,"Sign card on file contract")),o(3),u(" ",m(7,6,"We require you to read and sign the below card on file contract")," "),o(2),l("ngIf",r.description),o(2),l("ngIf",r.description))},dependencies:[Pt,T,G,S],styles:[".header[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-bottom:1.5rem;gap:.5rem}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:center;line-height:1.31rem;font-family:Roboto-bold,sans-serif;font-size:1.125rem;color:#064060}.header[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:1.5rem;color:#505050;font-size:1rem;text-align:left;margin:0 1rem}[_nghost-%COMP%]{height:100%}.copay-contract[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;color:#505050;height:100%;background-color:#8080801a;overflow:auto;padding:1.5rem 1rem}.copay-contract[_ngcontent-%COMP%] .main[_ngcontent-%COMP%]{display:flex;height:55%}@media(max-height:700px){.copay-contract[_ngcontent-%COMP%] .main[_ngcontent-%COMP%]{height:45%}}.copay-contract[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{background-color:#fff;overflow:auto;padding:1rem 2rem;border-radius:8px}
2.copay-contract[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{width:100%;display:flex!important;justify-content:center;margin:3.5rem auto}.copay-contract[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:15rem;width:auto}@media(min-width:700px){.copay-contract[_ngcontent-%COMP%]{padding:1.5rem 2.5rem}.copay-contract[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{padding:1.5rem 3rem}}"]});let e=a;return e})();function Is(e,a){if(e&1&&(s(0,"p",16),d(1),p(2,"translate"),c()),e&2){let t=g();o(),u(" ",m(2,1,"The minimum amount allowed for a card on file is $"+t.MAX_AMOUNT_MIN_VALUE)," ")}}function As(e,a){e&1&&(s(0,"div",16),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"Please enter an Email Address to complete payment.")," "))}function Es(e,a){if(e&1&&(s(0,"div",16),d(1),p(2,"translate"),c()),e&2){let t=g();o(),u(" ",m(2,1,t.emailError)," ")}}function Ds(e,a){e&1&&(s(0,"div",16),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"You must agree to our Terms & Conditions before continuing")," "))}var x_=(()=>{let a=class a{constructor(n,i,r,C,O){this.paymentApiService=n,this.appointmentApiService=i,this.redirectService=r,this.copayService=C,this.checkInFlowService=O,this.MAX_AMOUNT_MIN_VALUE=500,this.signatureImage=""}ngOnInit(){this.task=this.redirectService.getActiveTask(),this.email=this.copayService.paymentData?.email,this.initClinicUuid()}initClinicUuid(){this.appointmentId=this.task.todo.source?this.task.todo.source.appointment_id:null,this.appointmentId&&this.appointmentApiService.get(this.appointmentId).subscribe(n=>{this.userId=n.userId,this.clinicUuid=n.clinicUuid,this.departmentUuid=n.departmentUuid,this.initContractsMaxAmount()})}initContractsMaxAmount(){this.paymentApiService.getOneYearContractMaxAmount(this.clinicUuid,this.departmentUuid).subscribe(n=>{this.maximumAmount=n})}onSignatureUpdate(n){this.signatureImage=n.toDataURL()}onSignatureClear(){this.signatureImage=""}isDataValid(){return this.areTermsAccepted&&this.maximumAmount>=this.MAX_AMOUNT_MIN_VALUE&&!!this.signatureImage&&!!this.email}prepareForSend(){this.isButtonClicked=!0,this.isDataValid()&&(this.paymentData={cardNumber:this.copayService.paymentData?.cardNumber,expirationYear:this.copayService.paymentData?.expirationYear,expirationMonth:this.copayService.paymentData?.expirationMonth,cardSecurityCode:this.copayService.paymentData?.cardSecurityCode,billingAddress:this.copayService.paymentData?.billingAddress,billingZipCode:this.copayService.paymentData?.billingZipCode,cardHolderName:this.copayService.paymentData?.cardHolderName,email:this.email,paymentData:{appointment:{appointmentId:this.appointmentId,amount:this.maximumAmount}},sign:this.signatureImage},this.submit())}submit(){this.paymentApiService.createOneYearContract(this.clinicUuid,this.userId,this.paymentData).subscribe(()=>{this.copayService.paymentData=null,this.emailError=null,this.checkInFlowService.isCheckInAppFlow()?this.markCheckInTaskAsCompleted():this.task.valueType===D.COPAY?this.redirectService.completeTaskAndSetItActive(this.task).subscribe(()=>{this.copayService.gotoThankYouPage()}):this.copayService.gotoThankYouPage()},n=>{this.emailError=n?.error?.form?.email?.errors?.[0]})}markCheckInTaskAsCompleted(){if(this.task.valueType===D.CARD_ON_FILE){this.checkInFlowService.markCheckInFlowTaskAsDoneAndGoToNext(this.task);return}let n=this.task.copayTaskList.map(i=>this.checkInFlowService.markCheckInFlowTask(Ee.DONE,i.source.appointment.id,i.settingId));Ae(n).subscribe(()=>this.checkInFlowService.moveForwardFromCompletedTask(this.task))}ngOnDestroy(){this.copayService.paymentData=null}};a.\u0275fac=function(i){return new(i||a)(_(Me),_(j),_(x),_(xt),_(R))},a.\u0275cmp=b({type:a,selectors:[["app-copay-contract-sign"]],standalone:!1,decls:37,vars:31,consts:[[1,"copay-contract-sign"],[1,"header"],[1,"title"],[1,"main"],[3,"update","clear"],[1,"maximum-amount"],[1,"description"],[1,"element"],["mask","000000000","type","tel","inputmode","numeric",3,"ngModelChange","ngModel"],["class","error error-message",4,"ngIf"],[1,"email"],["required","",3,"ngModelChange","ngModel"],[1,"terms-container"],[3,"ngModelChange","ngModel"],[1,"footer"],["libButton","","type","button",3,"click"],[1,"error","error-message"]],template:function(i,r){i&1&&(s(0,"div",0)(1,"div",1)(2,"h1",2),d(3),p(4,"translate"),c()(),s(5,"div",3)(6,"app-signature-input",4),M("update",function(O){return r.onSignatureUpdate(O)})("clear",function(){return r.onSignatureClear()}),c(),s(7,"div",5)(8,"div",6),d(9),p(10,"translate"),c(),s(11,"div",7)(12,"label")(13,"span"),d(14),p(15,"translate"),c(),s(16,"input",8),V("ngModelChange",function(O){return B(r.maximumAmount,O)||(r.maximumAmount=O),O}),c()(),f(17,Is,3,3,"p",9),c()(),s(18,"div",10)(19,"div",6),d(20),p(21,"translate"),c(),s(22,"div",7)(23,"label")(24,"span"),d(25),p(26,"translate"),c(),s(27,"input",11),V("ngModelChange",function(O){return B(r.email,O)||(r.email=O),O}),c()(),f(28,As,3,3,"div",9)(29,Es,3,3,"div",9),c()()(),s(30,"div",12)(31,"lib-terms-checkbox",13),V("ngModelChange",function(O){return B(r.areTermsAccepted,O)||(r.areTermsAccepted=O),O}),c(),f(32,Ds,3,3,"div",9),c(),s(33,"div",14)(34,"button",15),M("click",function(){return r.prepareForSend()}),d(35),p(36,"translate"),c()()()),i&2&&(o(3),u(" ",m(4,19,"Sign card on file contract")," "),o(3),E("error",r.isButtonClicked&&!r.signatureImage),o(3),u(" ",m(10,21,"Please enter the maximum amount you authorize the practice to apply to the card during the term of the contract")," "),o(2),E("error",r.isButtonClicked&&r.maximumAmount<r.MAX_AMOUNT_MIN_VALUE),o(3),P(m(15,23,"Maximum Amou
2nt")),o(2),F("ngModel",r.maximumAmount),o(),l("ngIf",r.isButtonClicked&&r.maximumAmount<r.MAX_AMOUNT_MIN_VALUE),o(3),u(" ",m(21,25,"Please enter the email address you would like us to send a copy to")," "),o(2),E("error",r.emailError),o(3),P(m(26,27,"Email")),o(2),F("ngModel",r.email),o(),l("ngIf",r.isButtonClicked&&!r.email),o(),l("ngIf",r.emailError),o(2),F("ngModel",r.areTermsAccepted),o(),l("ngIf",r.isButtonClicked&&!r.areTermsAccepted),o(3),u(" ",m(36,29,"SUBMIT")," "))},dependencies:[On,Ce,ie,ht,oe,je,T,Yt,G,S],styles:[".header[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-bottom:1.5rem;gap:.5rem}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:center;line-height:1.31rem;font-family:Roboto-bold,sans-serif;font-size:1.125rem;color:#064060}.header[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:1.5rem;color:#505050;font-size:1rem;text-align:left;margin:0 1rem}.error[_ngcontent-%COMP%]{color:#de000d!important}.error[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .error[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{border-color:#de000d!important;color:#de000d!important}[_nghost-%COMP%]{display:block;height:100%;background-color:#8080801a;overflow:auto}.copay-contract-sign[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:1.5rem 1rem}.copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;background-color:#fff;border-radius:8px;padding:2rem 1.25rem;box-sizing:border-box}.copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .maximum-amount[_ngcontent-%COMP%], .copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .email[_ngcontent-%COMP%]{margin-top:2rem}.copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .maximum-amount[_ngcontent-%COMP%] .description[_ngcontent-%COMP%], .copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .email[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:1.5rem;color:#505050;font-size:1rem;text-align:left}.copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .maximum-amount[_ngcontent-%COMP%] .element[_ngcontent-%COMP%], .copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .email[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{padding-top:.75rem}.copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .maximum-amount[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .email[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .maximum-amount[_ngcontent-%COMP%] label[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .email[_ngcontent-%COMP%] label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.75rem}.copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .maximum-amount[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .email[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial;border-radius:8px;text-align:left;text-align:-webkit-left;color:#505050;border-color:#949494;background-color:#fff;font-size:1rem}.copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .maximum-amount[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button, .copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .email[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .maximum-amount[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear, .copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .email[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .maximum-amount[_ng
2content-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .email[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .maximum-amount[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator, .copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .email[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .maximum-amount[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring, .copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .email[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .maximum-amount[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%], .copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .email[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%]{border-color:#505050}.copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .maximum-amount[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled, .copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .email[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled{background:#efefef;border-color:#80808014;color:#505050;-webkit-text-fill-color:#505050;opacity:1}.copay-contract-sign[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{font-size:.75rem;line-height:1.5rem}.copay-contract-sign[_ngcontent-%COMP%] .terms-container[_ngcontent-%COMP%]{text-align:center;margin-top:2rem}.copay-contract-sign[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{width:100%;display:flex!important;justify-content:center;margin:3.5rem 0 2rem}.copay-contract-sign[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:15rem;width:auto}@media(min-width:700px){.copay-contract-sign[_ngcontent-%COMP%]{padding:1.5rem 2.5rem}.copay-contract-sign[_ngcontent-%COMP%] .main[_ngcontent-%COMP%]{padding:2rem 2.5rem}}"]});let e=a;return e})();st();var Fs=e=>({background:e}),Bs=(e,a)=>({name:e,color:a});function Vs(e,a){if(e&1&&(s(0,"div"),d(1),p(2,"translate"),s(3,"p",12),d(4),p(5,"currency"),c()()),e&2){let t=g();o(),u(" ",m(2,2,"You have successfully paid:")," "),o(3),u(" ",ne(5,4,(t.task.outstandingBalance==null?null:t.task.outstandingBalance.amount)||t.task.copay.amount,"USD")," ")}}function Rs(e,a){e&1&&(s(0,"div"),d(1),p(2,"translate"),c()),e&2&&(o(),u(" ",m(2,1,"Your payment has been received.")," "))}function Ls(e,a){if(e&1){let t=y();s(0,"button",13),M("click",function(){h(t);let i=g();return v(i.gotoAppointmentList())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"VIEW UPCOMING VISITS")," "))}function Ns(e,a){if(e&1){let t=y();s(0,"button",13),M("click",function(){h(t);let i=g();return v(i.gotoNextTask())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"GO TO NEXT TASK")," "))}var at,Po=(at=class{constructor(a,t){this.activatedRoute=a,this.redirectService=t,this.hexToRgba=rn,this.isRedirectToAppointmentListSensible=this.activatedRoute.snapshot.queryParams.cameFrom==="login"}ngOnInit(){this.task=this.redirectService.getActiveTask(),this.redirectService.activeTask().pipe(ke(this)).subscribe(a=>this.task=a)}gotoAppointmentList(){this.redirectService.navigate(["/user/appointment"],{queryParams:{cameFrom:"login"}})}gotoNextTask(){this.redirectService.gotoNextTask()}},at.\u0275fac=function(t){return new(t||at)(_(fe),_(x))},at.\u0275cmp=b({type:at,selectors:[["app-copay-thank-you"]],standalone:!1,decls:22,vars:22,consts:[["noPaymentAmount",""],[1,"copay-data",3,"ngStyle"],[1,"copay-data-wrapper"],[1,"body"],[1,"header"],[3,"params"],[1,"title"],[1,"content"],[1,"main"],[4,"ngIf","ngIfElse"],[1,"footer"],["libButton","","class","button","type","button",3,"click",4,"ngIf"],[1,"amount"],["libButton","","type","button",1,"button",3,"click"]],template:function(t,n){if(t&1&&(s(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4),k(4,"lib-svg-icon",5),s(5,"h1",6),d(6),p(7,"translate"),c()(),s(8,"div",7)(9,"div",8)(10,"h2"),d(11),p(12,"translate"),c(),f(13,Vs,6,7,"div",9)(14,Rs,3,3,"ng-template",null,0,ue),s(16,"p"),d(17
2),p(18,"translate"),c()(),s(19,"div",10),f(20,Ls,3,3,"button",11)(21,Ns,3,3,"button",11),c()()()()()),t&2){let i=U(15);l("ngStyle",W(17,Fs,"linear-gradient(to bottom right,"+n.task.todo.category.backgroundColor+","+n.hexToRgba(n.task.todo.category.backgroundColor,.6)+")")),o(3),ve("background",n.hexToRgba(n.task.todo.category.backgroundColor)),o(),l("params",Z(19,Bs,n.task.todo.category.icon,n.task.todo.category.backgroundColor)),o(2),P(m(7,11,"Payments")),o(5),P(m(12,13,"Thank you!")),o(2),l("ngIf",(n.task.outstandingBalance==null?null:n.task.outstandingBalance.amount)||n.task.copay.amount)("ngIfElse",i),o(4),u(" ",m(18,15,"A receipt of this transaction has been emailed to you.")," "),o(3),l("ngIf",n.isRedirectToAppointmentListSensible),o(),l("ngIf",!n.isRedirectToAppointmentListSensible)}},dependencies:[T,Le,A,G,S,Ge],styles:["[_nghost-%COMP%]{height:100%}.copay-data[_ngcontent-%COMP%]{background-color:#f99143;box-sizing:border-box;padding:1.5rem 1.25rem;color:#505050;height:fit-content;min-height:100%;display:flex;width:100%}.copay-data[_ngcontent-%COMP%] .copay-data-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;border-radius:8px;width:100%}.copay-data[_ngcontent-%COMP%] .copay-data-wrapper[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:1.25rem 2rem;box-sizing:border-box}.copay-data[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;box-sizing:border-box;padding:2rem;background:#f9914326;width:100%;gap:1rem;align-items:center}.copay-data[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1.125rem;font-family:Roboto-bold,sans-serif}.copay-data[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] svg{width:2rem;height:2rem;min-width:1rem;min-height:1rem;background-size:2rem}.copay-data[_ngcontent-%COMP%] .main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;line-height:1.5rem}.copay-data[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .copay-data[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .amount[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif}.copay-data[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .amount[_ngcontent-%COMP%]{color:#064060}.copay-data[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex!important;flex-direction:column;align-items:center;margin-top:4.5rem;padding-bottom:1.5rem}.copay-data[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{width:auto;min-width:15rem}@media(min-width:700px){.copay-data[_ngcontent-%COMP%]{padding:1.5rem 2.5rem}}"]}),at);Po=ye([Se(),xe("design:paramtypes",[fe,x])],Po);var zs=["taskFeedWrapper"],Us=["topMarker"],js=["bottomMarker"],Ws=e=>({events:e}),qs=(e,a)=>({name:e,color:a}),Ys=e=>({name:"ok",color:e}),Qs=e=>({"details-open":e}),Hs=()=>({name:"accordion-arrow-down",color:"#949494"});function Gs(e,a){e&1&&Ft(0)}function Zs(e,a){if(e&1){let t=y();Ve(0),s(1,"div",10,4),M("scrolled",function(){h(t);let i=g();return v(i.loadNextTasks())})("scrolledUp",function(){h(t);let i=g();return v(i.loadPrevTasks())}),f(3,Gs,1,0,"ng-container",11),c(),Re()}if(e&2){g();let t=U(4);o(),l("infiniteScrollDistance",.2)("infiniteScrollUpDistance",.2)("infiniteScrollThrottle",50)("scrollWindow",!1),o(2),l("ngTemplateOutlet",t)}}function $s(e,a){e&1&&Ft(0)}function Ks(e,a){if(e&1&&(s(0,"div",12,4),k(2,"div",13,5),f(4,$s,1,0,"ng-container",11),k(5,"div",13,6),c()),e&2){g();let t=U(4);o(4),l("ngTemplateOutlet",t)}}function Xs(e,a){if(e&1){let t=y();s(0,"button",18),M("click",function(){h(t);let i=g(3);return v(i.loadPrevTasks())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"Swipe down for past tasks")," "))}function Js(e,a){if(e&1){let t=y();s(0,"button",18),M("click",function(){h(t);let i=g(3);return v(i.initTaskList())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"Back to today")," "))}function el(e,a){if(e&1&&(Ve(0),f(1,Xs,3,3,"button",17)(2,Js,3,3,"ng-template",null,7,ue),Re()),e&2){let t=U(3),n=g(2);o(),l("ngIf",n.isFirstDayToday)("ngIfElse",t)}}function tl(e,a){if(e&1&&(s(0,"div",19)(1,"div",20),k(2,"span",21),s(3,"div",22)(4,"h2",23),d(5),p(6,"c4uDate"),c(),Ft(7,24),c()()()),e&2){let t=a.$implicit;g(2);let n=U(6),i=U(8);o(5),u(" ",ne(6,3,t.day,"message_full")," "),o(2),l("ngTemplateOutlet",t.events!=null&&t.events.length?i:n)("ngTemplateOutletContext",W(6,Ws,t.events))}}function nl(e,a){if(e&1&&(f(0,el,4,2,"ng-container",14),s(1,"div",15),f(2,tl,8,8,"div",16),c()),e&2){let t=g();l("ngIf",t.taskList==null?null:t.taskList.length),o(2),l("ngForOf",t.taskList)}}function il(e,a){e&1&&(s(0,"div",25),d(1),p(2,"translate"),c()),e&2&&(o(),P(m(2,1,"No tasks scheduled")))}function ol(e,a){if(e&1&&(s(0,"span",38),d(1),c()),e&2){let t=g().$implicit;o(),u(" ",t.todo.category.description||t.todo.title," ")}}function al(e,a){if(e&1&&(s(0,"span",38),d(1),c()),e&2){let t=g().$implicit;o(),P(t.todo.category.title)}}function rl(e,a){if(e&1&&(s(0,"span",39),k(1,"lib-svg-icon",31),s(2,"span",40),d(3),p(4,"translate"),c()()),e&2){let t=g().$implicit;o(),l("params",W(4,Ys,t.todo.category.backgroundColor)),o(2),P(m(4,2,"VIEW"))}}function cl(e,a){if(e&1&&(s(0,"span",41),k(1,"lib-svg-icon",31),c()),e&2){let t=g().$implicit;l("ngClass",W(2,Qs,t.isDescriptionVisible)),o(),l("params",z(4,Hs))}}function sl(e,a){e&1&&k(0,"app-vital",44),e&2&&l("taskFeedView",!0)}function ll(e,a){e&1&&k(0,"app-vital-data",44),e&2&&l("taskFeedView",!0)}function pl(e,a){if(e&1&&(Ve(0),f(1,sl,1,1,"app-vital",43)(2,ll,1,1,"app-vital-data",43),Re()),e&2){let t=g(2).$implicit;o(),l("ngIf",!t.isVitalDataVisible),o(),l("ngIf",t.isVitalDataVisible)}}function dl(e,a){if(e&1&&(s(0,"div",47),d(1),c()),e&2){let t=g(3).$implicit;o(),u(" ",t.todo.category.description||t.todo.title," ")}}function ml(e,a){if(e&1&&(f(0,dl,2,1,"div",45),k(1,"app-regular-button",46)),e&2){let t=g(2).$implicit;l("ngIf",t.todo.category.description||t.todo.title),o(),l("task",t)}}function gl(e,a){if(e&1&&(s(0,"div",42),f(1,pl,3,2,"ng-container",9)(2,ml,2,2,"ng-template",null,8,ue),c()),e&2){let t=U(3),n=g().$implicit,i=g(2);H("aria-labelledby","task"+n.id),o(),l("ngIf",n.valueType===i.TaskTypeEnum.VITAL)("ngIfElse",t)}}function _l(e,a){if(e&1){let t=y();s(0,"div",28)(1,"h3")(2,"button",29),M("click",function(){let i=h(t).$implicit,r=g(2);return v(r.showTask(i))}),s(3,"span",30),k(4,"lib-svg-icon",31),c(),s(5,"span",32)(6,"span",33),d(7),p(8,"applyTimezone"),p(9,"c4uDate"),c(),f(10,ol,2,1,"span",34)(11,al,2,1,"span",34),c(),f(12,rl,5,6,"span",35)(13,cl,2,5,"span",36),c()(),f(14,gl,4,3,"div",37),c()}if(e&2){let t=a.$implicit;o(2),l("id","task"+t.id),H("aria-expanded",t.isDescriptionVisible),o(2),l("params",Z(15,qs,t.todo.category.icon,t.todo.category.backgroundColor)),o(3),P(ne(9,12,ne(8,9,t.dueAt,t.timezone),"todo_time")),o(3),l("ngIf",t.todo.category.isNeedDescription),o(),l("ngIf",!t.todo.category.isNeedDescription),o(),l("ngIf",t.isDone&&!t.isDescriptionVisible),o(),l("ngIf",!t.isDone||t.isDescriptionVisible),o(),l("ngIf",t.isDescriptionVisible)}}function ul(e,a){if(e&1&&(s(0,"div",26),f(1,_l,15,18,"div",27),c()),e&2){let t=a.events,n=g();o(),l("ngForOf",n.castToCareplanTasks(t))}}var W_=(()=>{let a=class a{constructor(n,i,r,C,O){this.taskApiService=n,this.dateTimeService=i,this.redirectService=r,this.currentUser=C,this.deviceService=O,this.taskList=[],this.TaskTypeEnum=D,this.isTouchDevice=this.deviceService.isTouchDevice(),this.TOTAL_DAYS_COUNT=15,this.SWIPE_DAYS_COUNT=5,this.isDataLoading=!1,this.currentDate=this.dateTimeService.getStartOfDay()}ngAfterViewInit(){this.currentUser.getModel().subscribe(n=>{this.user=n,this.initTaskList(),this.isTouchDevice&&this.topMarker&&this.bottomMarker&&this.setupIntersectionObservers()})}ngOnDestroy(){this.topObserver?.disconnect(),this.bottomObserver?.disconnect()}get isFirstDayToday(){return this.taskList?.[0]?.day===this.dateTimeService.format(this.currentDate,"mysql_date")}finalizeTaskLoading(n){setTimeout(()=>{this.taskFeedWrapper.nativeElement.scrollTop=n>=0?n:this.taskFeedWrapper.nativeElement.scrollTop+n,this.isDataLoading=!1},500)}initTaskList(){this.finishDate=this.dateTimeService.addDays(this.dateTimeService.getStartOfDay(this.currentDate),this.TOTAL_DAYS_COUNT-1),this.loadTaskList(this.dateTimeService.format(this.finishDate,"mysql_date"),this.TOTAL_DAYS_COUNT).subscribe({next:n=>{this.taskList=this.getInitialTaskList(this.finishDate,this.TOTAL_DAYS_COUNT),this.fillOutTaskList(this.taskList,n)},complete:()=>this.finalizeTaskLoading(1)})}getInitialTaskList(n,i){return new Array(i).fill(null).map((r,C)=>({day:this.dateTimeService.format(this.dateTimeService.addDays(n,C-i+1),"mysql_date"),events:[]}))}loadTaskList(n,i){return Vn(0).pipe(_e(()=>!this.isDataLoading),Q(()=>this.isDataLoading=!0),L(()=>this.taskApiService.getTaskList(this.user.id,{timezone:this.user.timezone,count:i,toDate:n,isExcludedPatternsIgnored:!0})),he(({body:r})=>r))}
2fillOutTaskList(n,i){n.forEach(r=>{r.events=i.find(C=>C.day===r.day)?.events??[]})}setupIntersectionObservers(){this.topObserver=new IntersectionObserver(n=>{n[0].isIntersecting&&!this.isDataLoading&&this.loadPrevTasks()},{threshold:1}),this.bottomObserver=new IntersectionObserver(n=>{n[0].isIntersecting&&!this.isDataLoading&&this.loadNextTasks()},{threshold:1}),this.topObserver.observe(this.topMarker.nativeElement),this.bottomObserver.observe(this.bottomMarker.nativeElement)}loadNextTasks(){let n=this.dateTimeService.addDays(this.finishDate,this.SWIPE_DAYS_COUNT);n.isAfter(this.dateTimeService.addDays(this.currentDate,this.TOTAL_DAYS_COUNT))||this.loadTaskList(this.dateTimeService.format(n,"mysql_date"),this.SWIPE_DAYS_COUNT).subscribe({next:i=>{let r=this.getInitialTaskList(n,this.SWIPE_DAYS_COUNT);this.fillOutTaskList(r,i),this.finishDate=n,this.taskList.splice(0,this.SWIPE_DAYS_COUNT),this.taskList.push(...r)},complete:()=>this.finalizeTaskLoading(-1)})}loadPrevTasks(){let n=this.dateTimeService.addDays(this.finishDate,-this.TOTAL_DAYS_COUNT);this.loadTaskList(this.dateTimeService.format(n,"mysql_date"),this.SWIPE_DAYS_COUNT).subscribe({next:i=>{let r=this.getInitialTaskList(n,this.SWIPE_DAYS_COUNT);this.fillOutTaskList(r,i),this.finishDate=this.dateTimeService.addDays(this.finishDate,-this.SWIPE_DAYS_COUNT),this.taskList.splice(this.TOTAL_DAYS_COUNT-this.SWIPE_DAYS_COUNT,this.SWIPE_DAYS_COUNT),this.taskList.unshift(...r)},complete:()=>this.finalizeTaskLoading(1)})}showTask(n){this.redirectService.setActiveTask(n),!Ni[n.valueType]||[D.REGULAR,D.SIGN_DOCUMENT,D.VITAL].includes(n.valueType)?(n.isVitalDataVisible=!1,n.isDescriptionVisible=!n.isDescriptionVisible):this.redirectService.redirectToTaskAction(n,!1)}castToCareplanTasks(n){return n}};a.\u0275fac=function(i){return new(i||a)(_(Ke),_(kt),_(x),_(re),_(Pe))},a.\u0275cmp=b({type:a,selectors:[["app-task-feed"]],viewQuery:function(i,r){if(i&1&&(le(zs,5),le(Us,5),le(js,5)),i&2){let C;pe(C=de())&&(r.taskFeedWrapper=C.first),pe(C=de())&&(r.topMarker=C.first),pe(C=de())&&(r.bottomMarker=C.first)}},standalone:!1,decls:9,vars:2,consts:[["touchDeviceTemplate",""],["taskListTemplate",""],["noCareplanTasksTemplate",""],["careplanTasksTemplate",""],["taskFeedWrapper",""],["topMarker",""],["bottomMarker",""],["backToTodayTpl",""],["taskDescriptionTpl",""],[4,"ngIf","ngIfElse"],["infiniteScroll","",1,"task-feed-wrapper",3,"scrolled","scrolledUp","infiniteScrollDistance","infiniteScrollUpDistance","infiniteScrollThrottle","scrollWindow"],[4,"ngTemplateOutlet"],[1,"task-feed-wrapper"],[1,"scroll-marker"],[4,"ngIf"],[1,"task-feed"],["class","day",4,"ngFor","ngForOf"],["type","button","class","action-hint clickable",3,"click",4,"ngIf","ngIfElse"],["type","button",1,"action-hint","clickable",3,"click"],[1,"day"],[1,"container"],[1,"circle"],[1,"content"],[1,"day-data"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"no-tasks"],[1,"task-list"],["class","task",4,"ngFor","ngForOf"],[1,"task"],["type","button",1,"task-heading",3,"click","id"],[1,"icon"],[3,"params"],[1,"data"],[1,"date"],["class","title",4,"ngIf"],["class","view",4,"ngIf"],["class","arrow",3,"ngClass",4,"ngIf"],["class","details","role","region",4,"ngIf"],[1,"title"],[1,"view"],[1,"text"],[1,"arrow",3,"ngClass"],["role","region",1,"details"],[3,"taskFeedView",4,"ngIf"],[3,"taskFeedView"],["class","description",4,"ngIf"],[3,"task"],[1,"description"]],template:function(i,r){if(i&1&&f(0,Zs,4,5,"ng-container",9)(1,Ks,7,1,"ng-template",null,0,ue)(3,nl,3,2,"ng-template",null,1,ue)(5,il,3,3,"ng-template",null,2,ue)(7,ul,2,1,"ng-template",null,3,ue),i&2){let C=U(2);l("ngIf",!r.isTouchDevice)("ngIfElse",C)}},dependencies:[mt,me,T,Rt,A,Ki,Gt,lo,po,ze,ln,S],styles:["[_nghost-%COMP%]{overflow:auto;-webkit-overflow-scrolling:touch;background-color:#f5f5f5;overscroll-behavior:contain}.task-feed-wrapper[_ngcontent-%COMP%]{width:100%;overflow:auto;position:relative}.scroll-marker[_ngcontent-%COMP%]{height:1px;width:100%}.action-hint[_ngcontent-%COMP%]{position:absolute;left:50%;top:.875rem;transform:translate(-50%);z-index:1;padding:.625rem .875rem;background-color:#fff;font-family:Roboto-bold,sans-serif;font-size:.875rem;box-shadow:0 .25rem .25rem #80808040;border-radius:2rem;border:0;white-space:nowrap;color:#505050;text-align:center}.action-hint.clickable[_ngcontent-%COMP%]{cursor:pointer}.task-feed[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%]:last-child .container[_ngcontent-%COMP%]{padding-bottom:56px}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%]:first-child .container[_ngcontent-%COMP%]{padding-top:64px}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{display:flex;margin-left:25px;padding:15px;border-left:4px solid rgba(128,128,128,.2)}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{position:relative;width:100%;left:-15px;font-size:16px}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%]{width:calc(100% + 47px);margin-top:14px;background-color:#fff;position:relative;
2left:-30px;border-radius:8px;overflow:hidden}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:#505050}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%]:first-child .task-heading[_ngcontent-%COMP%]{border-radius:8px 8px 0 0}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .task-heading[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;background-color:#fff;color:#505050;border:transparent solid 2px;text-align:left;cursor:pointer}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .task-heading[_ngcontent-%COMP%]:focus-visible{border:#2A7EFB solid 2px;outline:none!important}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%]{padding:15px 15px 10px}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:24px;margin-bottom:25px}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button{margin-top:0;margin-bottom:0;display:flex;justify-content:center;font-size:14px}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button.sign-document .attachment-list, .task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button.sign-document .view-appointment-details{display:none}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button .video-call-btn{padding:0;background:none}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button .video-call-btn a .icon{display:none}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button .video-call-btn a .text{margin:0;font-size:16px}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button .completed{padding:0}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button a, .task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button button{display:flex;color:#fff;justify-content:center;padding:12px 25px;background-color:var(--branding-primary-color, #064060);border-radius:8px;width:100%;box-sizing:border-box;font-family:Roboto-bold;align-items:center;cursor:pointer;text-transform:uppercase}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button a:hover, .task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button button:hover{opacity:.8}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button a svg, .task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button button svg{width:2rem;height:2rem;margin-right:.5rem}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button a lib-svg-icon, .task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button button lib-svg-icon{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button a[disabled], .task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button button[disabled]{cursor:default}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button a:disabled, .task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button a[aria-disabled=true], .task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button button:disabled, .task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button button[aria-disabled=true]{opacity:.5;cursor:auto}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .details[_ngcontent-%COMP%] .button .go-to-next-task{dis
2play:none!important}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .view[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:52px;align-items:center;justify-content:center;border-left:1px solid #e6e6e6}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .view[_ngcontent-%COMP%] svg{width:15px;height:15px}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .view[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{margin-top:10px;font-size:12px;color:#064060;font-family:Roboto-bold,sans-serif}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{display:flex;align-items:center;padding-right:15px}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%] svg{width:15px;height:15px}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .arrow.details-open[_ngcontent-%COMP%] svg{transform:rotate(180deg)}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid rgba(128,128,128,.2)}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:16px;padding-left:12px}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] svg{width:32px;height:32px}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .data[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;padding:13px 0}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .data[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{margin-bottom:5px}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%] .task[_ngcontent-%COMP%] .data[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;line-height:18px}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .circle[_ng
2content-%COMP%]{position:relative;left:-25px;display:flex;width:12px;height:11px;border:2px solid #064060;border-radius:50%;background-color:#fff}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .day-data[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;color:#064060}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .no-tasks[_ngcontent-%COMP%]{margin-top:7px}@media only screen and (min-width:480px){.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{margin-left:53px}.task-feed[_ngcontent-%COMP%] .day[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .task-list[_ngcontent-%COMP%]{width:calc(100% + 23px);left:-32px}}"]});let e=a;return e})();st();var Cl=["checkInFlowBar"],fl=()=>({name:"close",color:"#505050"});function hl(e,a){if(e&1&&k(0,"mat-progress-bar",11),e&2){let t=g(2);l("value",t.doneTasksNumber*100/t.totalTasksNumber)}}function vl(e,a){if(e&1){let t=y();s(0,"nav",3,0)(2,"div")(3,"button",4),p(4,"translate"),M("click",function(){h(t);let i=g();return v(i.close())}),k(5,"lib-svg-icon",5),c(),s(6,"div",6)(7,"div",7),d(8),c(),s(9,"div",8)(10,"span"),d(11),p(12,"translate"),p(13,"translate"),c()(),f(14,hl,1,1,"mat-progress-bar",9),c(),s(15,"button",10),M("click",function(){h(t);let i=g();return v(i.skip())}),s(16,"span"),d(17),p(18,"translate"),c()()()()}if(e&2){let t=g();o(3),H("aria-label",m(4,11,"Exit")),o(2),l("params",z(19,fl)),o(3),P(t.taskTitle),o(3),Bt("",m(12,13,"Task")," ",t.currentTaskNumber," ",m(13,15,"of")," ",t.totalTasksNumber),o(3),l("ngIf",t.totalTasksNumber),o(),E("invisible",!t.isSkipVisible),o(2),P(m(18,17,"Skip"))}}var rt,Mo=(rt=class{constructor(a,t,n){this.router=a,this.redirectTaskService=t,this.checkInFlowService=n,this.taskList=[],this.activeTaskIndex=-1}ngOnInit(){Fn([this.redirectTaskService.currentTask$,this.checkInFlowService.taskList$]).pipe(ke(this)).subscribe(([a,t])=>{this.taskList=t,this.activeTaskIndex=t.findIndex(n=>this.checkInFlowService.isTaskActive(n)),this.activeTask=a})}get taskTitle(){return this.activeTask?.category?.title}get currentTaskNumber(){return this.activeTaskIndex+1||this.totalTasksNumber}get totalTasksNumber(){return this.taskList.length}get doneTasksNumber(){return this.taskList.filter(({isDone:a})=>a).length}get isCloseBtnVisible(){return this.router.url.includes("landing")}get isCheckInBarVisible(){return!["warning","landing","final"].some(a=>this.router.url.includes(a))}get isSkipVisible(){return!this.activeTask||!this.activeTask.isRequired&&this.activeTask.status!==Ee.DONE}close(){this.router.navigate(["/user/check-in-warning"])}skip(){this.checkInFlowService.markSavedCheckInFlowTask(Ee.SKIPPED).subscribe(()=>{this.checkInFlowService.nextCheckInFlowTask()})}},rt.\u0275fac=function(t){return new(t||rt)(_(De),_(x),_(R))},rt.\u0275cmp=b({type:rt,selectors:[["app-check-in-flow-container"]],viewQuery:function(t,n){if(t&1&&le(Cl,5),t&2){let i;pe(i=de())&&(n.checkInFlowBarRef=i.first)}},standalone:!1,decls:5,vars:1,consts:[["checkInFlowBar",""],[1,"check-in-flow"],["class","check-in-flow-bar",4,"ngIf"],[1,"check-in-flow-bar"],["type","button",1,"close-bar-btn",3,"click"],[3,"params"],[1,"pagination"],[1,"title"],["id","check-in-flow-progress-label",1,"pagination"],["aria-labelledby","check-in-flow-progress-label",3,"value",4,"ngIf"],["type","button",1,"skip-bar-btn",3,"click"],["aria-labelledby","check-in-flow-progress-label",3,"value"]],template:function(t,n){t&1&&(s(0,"main",1),f(1,vl,19,20,"nav",2),k(2,"router-outlet")(3,"lib-loader")(4,"app-ajax-error"),c()),t&2&&(o(),l("ngIf",n.isCheckInBarVisible))},dependencies:[Zi,Di,Ti,ri,T,A,S],styles:[".check-in-flow[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column}.check-in-flow[_ngcontent-%COMP%] .check-in-flow-bar[_ngcontent-%COMP%]{width:100%;background-color:#fff;padding:.5rem 0;font-size:.7rem;border-bottom:1px solid #e6e6e6;min-height:var(--header-height);box-sizing:border-box;box-shadow:0 2px 4px #0000001b;z-index:1}
2.check-in-flow[_ngcontent-%COMP%] .check-in-flow-bar[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%}.check-in-flow[_ngcontent-%COMP%] .check-in-flow-bar[_ngcontent-%COMP%] .close-bar-btn[_ngcontent-%COMP%]{margin-left:1rem;background:none;cursor:pointer}.check-in-flow[_ngcontent-%COMP%] .check-in-flow-bar[_ngcontent-%COMP%] .close-bar-btn[_ngcontent-%COMP%] svg{width:1rem;height:1rem}.check-in-flow[_ngcontent-%COMP%] .check-in-flow-bar[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-family:Roboto-bold,sans-serif;color:#505050}.check-in-flow[_ngcontent-%COMP%] .check-in-flow-bar[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-direction:column;align-items:center;margin-right:auto;margin-left:auto;min-width:240px}.check-in-flow[_ngcontent-%COMP%] .check-in-flow-bar[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .check-in-flow[_ngcontent-%COMP%] .check-in-flow-bar[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%]{margin-bottom:.3rem}.check-in-flow[_ngcontent-%COMP%] .check-in-flow-bar[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .span[_ngcontent-%COMP%]{color:#505050}.check-in-flow[_ngcontent-%COMP%] .check-in-flow-bar[_ngcontent-%COMP%] .skip-bar-btn[_ngcontent-%COMP%]{margin-right:1rem;font-size:.8rem;background:none;cursor:pointer;letter-spacing:.43px}.check-in-flow[_ngcontent-%COMP%] .check-in-flow-bar[_ngcontent-%COMP%] .skip-bar-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#064060;font-family:Roboto-bold,sans-serif;text-transform:uppercase}.check-in-flow[_ngcontent-%COMP%] .check-in-flow-bar[_ngcontent-%COMP%] .skip-bar-btn.invisible[_ngcontent-%COMP%]{visibility:hidden}.close-btn[_ngcontent-%COMP%]{position:absolute;top:1rem;left:1rem}.close-btn[_ngcontent-%COMP%] svg{width:1.3rem;height:1.3rem}@media screen and (min-width:768px){.title[_ngcontent-%COMP%]{font-size:.875rem}}@media only screen and (max-height:460px){nav[_ngcontent-%COMP%]{--header-height: 40px}.check-in-flow[_ngcontent-%COMP%] .check-in-flow-bar[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .check-in-flow[_ngcontent-%COMP%] .check-in-flow-bar[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%] .pagination[_ngcontent-%COMP%]{margin-bottom:0}}@media only screen and (max-height:350px){nav[_ngcontent-%COMP%]{--header-height: 30px}}"]}),rt);Mo=ye([Se(),xe("design:paramtypes",[De,x,R])],Mo);var Pl=e=>({"--category-color":e}),Ml=(e,a)=>({name:e,color:a}),du=(()=>{let a=class a{constructor(n,i,r,C,O,w,I){this.redirectService=n,this.clinicApiService=i,this.appointmentApiService=r,this.currentUserService=C,this.paymentApiService=O,this.checkInFlowService=w,this.activatedRoute=I}ngOnInit(){this.task=this.redirectService.getActiveTask();let n=this.task?.todo?.source?.appointment_id??null,i,r,C;n&&Ae([this.appointmentApiService.get(n),this.currentUserService.getModel()]).pipe(Q(([O,w])=>{i=O.clinicUuid,r=O.departmentUuid,C=w.id}),L(()=>this.clinicApiService.isClinicModuleActiveByDepartment(i,r,Ut.ONE_YEAR_PAYMENT_CONTRACT)),_e(Boolean),L(()=>this.paymentApiService.getOneYearContractList(i,C,r))).subscribe(O=>{O.length>0&&this.checkInFlowService.isCheckInAppFlow()&&this.checkInFlowService.markCheckInFlowTaskAsDoneAndGoToNext(this.task)})}addCard(){this.redirectService.navigate(["card-details"],{relativeTo:this.activatedRoute})}};a.\u0275fac=function(i){return new(i||a)(_(x),_(Ze),_(j),_(re),_(Me),_(R),_(fe))},a.\u0275cmp=b({type:a,selectors:[["app-card-on-file"]],standalone:!1,decls:15,vars:17,consts:[[1,"task-panel-background"],[1,"task-panel"],[1,"task-panel-header"],[1,"header-background"],[3,"params"],[1,"title"],[1,"task-panel-body"],[1,"footer"],["type","button",1,"task-panel-button",3,"click"]],template:function(i,r){i&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),k(3,"div",3)(4,"lib-svg-icon",4),s(5,"h1",5),d(6),c()(),s(7,"div",6)(8,"p"),d(9),p(10,"translate"),c()(),s(11,"div",7)(12,"button",8),M("click",function(){return r.addCard()}),d(13),p(14,"translate"),c()()()()),i&2&&(nn(W(12,Pl,r.task.todo.category.backgroundColor)),o(3),ve("background-color",r.task.todo.category.backgroundColor),o(),l("params",Z(14,Ml,r.task.todo.category.icon,r.task.todo.category.backgroundColor)),o(2),P(r.task.todo.category.title),o(3),P(m(10,8,"Our practice requires patients to save their card on file prior to seeing the provider.")),o(4),u(" ",m(14,10,"ADD CARD")," "))},dependencies:[A,S],styles:[".task-panel-background[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;height:100%;width:100%;padding:30px 20px}.task-panel[_ngcontent-%COMP%]{height:100%;background-color:#fff;border-radius:8px;display:flex;flex-direction:column;overflow:hidden}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:100px;display:flex;align-items:center;justify-content:center;position:relative}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .header-background[_ngcontent-%COMP%]{pointer-events:none;position:absolute;height:100%;width:100%;opacity:.15}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 50px}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:1rem 2rem 0;overflow-y:auto;line-height:1.5}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:left;font-family:Roboto-bold,sans-serif;font-size:18px;letter-spacing:.53px;color:#064060;padding-bottom:1rem}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin-top:2rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.8rem 2rem;background-color:#064060;width:100%;box-sizing:border-box;font-family:Roboto-bold,sans-serif;align-items:center;cursor:pointer;width:15rem;border-radius:8px;margin:1rem 0;text-transform:uppercase;font-size:.875rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]:hover{opacity:.8}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[disabled][_ngcontent-%COMP%]{cursor:default}.task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{background:none;color:#064060;text-transform:uppercase;font-size:.875rem;letter-spacing:.43px;margin:.75rem 0}@media(max-height:460px){.task-panel-background[_ngcontent-%COMP%]{padding:10px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:60px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 30px}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:8px 8px 0}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{margin-top:8px}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%], .task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin:8px 0}}[_nghost-%COMP%]{height:100%}.task-panel-background[_ngcontent-%COMP%]{background:linear-gradient(164.52deg,var(--category-color),rgb(from var(--category-color) r g b/60%))}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{justify-content:left}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{margin-left:2rem;z-index:0}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%] svg{width:2.5rem;height:2.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-left:1rem;z-index:0;padding:0;color:#505050}"]});let e=a;return e})();var Ol=["form"],ku=(()=>{let a=class a{constructor(n,i,r,C,O){this.redirectService=n,this.paymentApiService=i,this.currentUserService=r,this.demographicsApiService=C,this.copayService=O}ngOnInit(){let n=this.redirectService.getActiveTask()?.clinicUuid;this.paymentApiService.getCardTypes(n).pipe(Q(i=>this.cardTypes=i),L(()=>this.currentUserService.getModel()),Q(({name:i})=>this.userName=i),L(({id:i})=>this.demographicsApiService.getAddress(n,i))).subscribe(i=>{this.userData=i,this.userForm.setValue({address:this.userData.address,cvc:"",month:"",name:this.userData.name||this.userName,number:"",year:"",zip:this.userData.zipCode?this.userData.zipCode.replace("-","").trim():""})})}submitForm(n){n.invalid||(this.copayService.paymentData={cardNumber:n.value.number,expirationYear:n.value.year,expirationMonth:n.value.month,cardSecurityCode:n.value.cvc,billingAddress:n.value.address,billingZipCode:n.value.zip,cardHolderName:n.value.name,email:this.userData.email},this.redirectService.navigate([this.redirectService.getBaseUrl()+"/copay-contract"]))}};a.\u0275fac=function(i){return new(i||a)(_(x),_(Me),_(re),_(Ue),_(xt))}
2,a.\u0275cmp=b({type:a,selectors:[["app-card-details"]],viewQuery:function(i,r){if(i&1&&le(Ol,5),i&2){let C;pe(C=de())&&(r.userForm=C.first)}},standalone:!1,decls:13,vars:11,consts:[["form","ngForm"],["aria-labelledby","card-details-title",3,"ngSubmit"],[1,"header"],["id","card-details-title",1,"title"],[1,"description"],[3,"cardTypes"],["libButton","","type","submit"]],template:function(i,r){if(i&1){let C=y();s(0,"form",1,0),M("ngSubmit",function(){h(C);let w=U(1);return v(r.submitForm(w))}),s(2,"div",2)(3,"h1",3),d(4),p(5,"translate"),c(),s(6,"p",4),d(7),p(8,"translate"),c()(),k(9,"app-card-fields",5),s(10,"button",6),d(11),p(12,"translate"),c()()}if(i&2){let C=U(1);o(4),u(" ",m(5,5,"Card details")," "),o(3),u(" ",m(8,7,"Please enter your card details")," "),o(2),l("cardTypes",r.cardTypes),o(),H("aria-disabled",C.invalid),o(),u(" ",m(12,9,"SUBMIT")," ")}},dependencies:[zt,Nt,_t,G,bn,S],styles:[".header[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-bottom:1.5rem;gap:.5rem}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:center;line-height:1.31rem;font-family:Roboto-bold,sans-serif;font-size:1.125rem;color:#064060}.header[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:1.5rem;color:#505050;font-size:1rem;text-align:left;margin:0 1rem}[_nghost-%COMP%]{display:block;height:100%;background:#8080801a}.header[_ngcontent-%COMP%]{width:100%}form[_ngcontent-%COMP%]{box-sizing:border-box;padding:1.5rem 1rem;max-width:51.25rem;margin-left:auto;margin-right:auto}button[_ngcontent-%COMP%]{width:auto;min-width:15rem;margin:2.5rem auto 1.5rem}"]});let e=a;return e})();var kl=()=>({name:"trash-new",color:"#949494"}),yl=()=>({name:"exchange",color:"#064060"});function xl(e,a){if(e&1){let t=y();s(0,"p"),d(1),p(2,"translate"),c(),s(3,"div",6)(4,"div",7)(5,"button",8),p(6,"translate"),M("click",function(){h(t);let i=g();return v(i.deletePreferredPharmacy(i.pharmacy.id))}),k(7,"lib-svg-icon",9),c(),s(8,"strong"),d(9),c(),d(10),k(11,"br"),d(12),c(),s(13,"button",10),M("click",function(){h(t);let i=g();return v(i.addPreferredPharmacy())}),k(14,"lib-svg-icon",11),s(15,"span"),d(16),p(17,"translate"),c()()()}if(e&2){let t=g();o(),P(m(2,10,"Please check and confirm your preferred pharmacy details are correct, if you wish you can change pharmacy below.")),o(4),H("aria-label",m(6,12,"Remove preferred pharmacy")),o(2),l("params",z(16,kl)),o(2),P(t.pharmacy.name),o(),u(" ",t.pharmacy.address," "),o(2),Xn(" ",t.pharmacy.city,", ",t.pharmacy.state,", ",t.pharmacy.zip," "),o(2),l("params",z(17,yl)),o(2),P(m(17,14,"CHANGE PHARMACY"))}}function bl(e,a){e&1&&(s(0,"p"),d(1),p(2,"translate"),c()),e&2&&(o(),P(m(2,1,"You do not currently have a preferred pharmacy on file. You can add one by tapping the button below.")))}function Sl(e,a){if(e&1){let t=y();s(0,"button",12),M("click",function(){h(t);let i=g();return v(i.confirm())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"CONFIRM")," "))}function wl(e,a){if(e&1){let t=y();s(0,"button",12),M("click",function(){h(t);let i=g();return v(i.addPreferredPharmacy())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"ADD PREFERRED PHARMACY")," "))}var Bu=(()=>{let a=class a{constructor(n,i,r,C,O,w,I){this.activatedRoute=n,this.checkInFlowService=i,this.redirectTaskService=r,this.currentUserService=C,this.appointmentApiService=O,this.pharmacyApiService=w,this.modalWindowService=I}ngOnInit(){this.task=this.redirectTaskService.getActiveTask();let n=this.task?.todo?.source?.appointment_id??null;n&&this.currentUserService.getModel().pipe(Q(({id:i})=>this.userId=i),L(()=>this.appointmentApiService.get(n)),Q(i=>{this.clinicUuid=i.clinicUuid,this.departmentUuid=i.departmentUuid}),L(()=>this.pharmacyApiService.getDefaultPharmacy(this.clinicUuid,this.userId,this.departmentUuid))).subscribe(i=>{this.pharmacy=i})}deletePreferredPharmacy(n){this.modalWindowService.confirm("Are you sure you want to remove this pharmacy?","Remove pharmacy","REMOVE","CANCEL",!0).pipe(_e(Boolean),L(()=>this.pharmacyApiService.deletePreferredPharmacy(this.clinicUuid,this.userId,this.departmentUuid,n))).subscribe(i=>{i&&(this.pharmacy=null)})}confirm(){this.checkInFlowService.markTaskAsDone(this.task,()=>this.redirectTaskService.gotoNextTask())}addPreferredPharmacy(){this.redirectTaskService.navigate(["search"],{relativeTo:this.activatedRoute,queryParams:{departmentUuid:this.departmentUuid}})}};a.\u0275fac=function(i){return new(i||a)(_(fe),_(R),_(x),_(re),_(j),_(un),_(Ot))},a.\u0275cmp=b({type:a,selectors:[["ng-component"]],standalone:!1,decls:11,vars:5,consts:[[1,"task-panel"],[1,"task-panel-header"],[1,"title"],[1,"task-panel-body"],[1,"task-panel-footer"],["type","button",1,"task-panel-button"],[1,"preferred-
2pharmacy"],[1,"preferred-pharmacy-details"],["type","button",1,"delete-pharmacy-button",3,"click"],[1,"delete-icon",3,"params"],[1,"change-pharmacy",3,"click"],[3,"params"],["type","button",1,"task-panel-button",3,"click"]],template:function(i,r){i&1&&(s(0,"div",0)(1,"div",1)(2,"h1",2),d(3),p(4,"translate"),c()(),s(5,"div",3),ee(6,xl,18,18)(7,bl,3,3,"p"),c(),s(8,"div",4),ee(9,Sl,3,3,"button",5)(10,wl,3,3,"button",5),c()()),i&2&&(o(3),P(m(4,3,r.task.todo.category.title)),o(3),te(r.pharmacy?6:r.pharmacy!==void 0?7:-1),o(3),te(r.pharmacy?9:r.pharmacy!==void 0?10:-1))},dependencies:[A,S],styles:[".task-panel-background[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;height:100%;width:100%;padding:30px 20px}.task-panel[_ngcontent-%COMP%]{height:100%;background-color:#fff;border-radius:8px;display:flex;flex-direction:column;overflow:hidden}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:100px;display:flex;align-items:center;justify-content:center;position:relative}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .header-background[_ngcontent-%COMP%]{pointer-events:none;position:absolute;height:100%;width:100%;opacity:.15}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 50px}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:1rem 2rem 0;overflow-y:auto;line-height:1.5}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:left;font-family:Roboto-bold,sans-serif;font-size:18px;letter-spacing:.53px;color:#064060;padding-bottom:1rem}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin-top:2rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.8rem 2rem;background-color:#064060;width:100%;box-sizing:border-box;font-family:Roboto-bold,sans-serif;align-items:center;cursor:pointer;width:15rem;border-radius:8px;margin:1rem 0;text-transform:uppercase;font-size:.875rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]:hover{opacity:.8}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[disabled][_ngcontent-%COMP%]{cursor:default}.task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{background:none;color:#064060;text-transform:uppercase;font-size:.875rem;letter-spacing:.43px;margin:.75rem 0}@media(max-height:460px){.task-panel-background[_ngcontent-%COMP%]{padding:10px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:60px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 30px}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:8px 8px 0}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{margin-top:8px}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%], .task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin:8px 0}}[_nghost-%COMP%]{height:100%;background:#f5f5f5;font-size:16px}.task-panel[_ngcontent-%COMP%]{background-color:#f5f5f5;border-radius:0;width:100%}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{padding:40px 0;height:unset;justify-content:flex-start}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:center;z-index:0;padding:0;flex:1}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:0 16px}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-left:20px;margin-right:20px}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{margin:40px auto 32px;text-wrap:nowrap;font-size:14px;padding:12.8px 32px}
2.preferred-pharmacy[_ngcontent-%COMP%]{border-radius:.4rem;background:#fff;margin-top:32px;display:flex;flex-direction:column;align-items:stretch}.preferred-pharmacy[_ngcontent-%COMP%] .preferred-pharmacy-details[_ngcontent-%COMP%]{position:relative;padding:40px 48px 40px 24px;border-bottom:1px solid #f5f5f5}.preferred-pharmacy[_ngcontent-%COMP%] .preferred-pharmacy-details[_ngcontent-%COMP%] .delete-pharmacy-button[_ngcontent-%COMP%]{position:absolute;top:40px;right:24px;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;cursor:pointer;opacity:.8;--svg-size: 22.4px}.preferred-pharmacy[_ngcontent-%COMP%] .preferred-pharmacy-details[_ngcontent-%COMP%] .delete-pharmacy-button[_ngcontent-%COMP%]:hover{opacity:1}.preferred-pharmacy[_ngcontent-%COMP%] .preferred-pharmacy-details[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;font-family:Roboto-medium,sans-serif}.preferred-pharmacy[_ngcontent-%COMP%] .change-pharmacy[_ngcontent-%COMP%]{margin:16px auto;cursor:pointer;background:transparent;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:12px}.preferred-pharmacy[_ngcontent-%COMP%] .change-pharmacy[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{background:transparent;font-size:14px;letter-spacing:.43px;color:#064060;font-family:Roboto-bold,sans-serif}.preferred-pharmacy[_ngcontent-%COMP%] .change-pharmacy[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{align-items:center;justify-content:center;border-radius:50%;background-color:#d1dadf;height:38px;width:38px;--svg-width: 18px;--svg-height: 20px}@media all and (max-height:350px){.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{padding:4px 0}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{margin:4px auto}}"]});let e=a;return e})();var Tl=["pharmacyProviderContainer"],Il=()=>({name:"arrow-left",color:"#505050"}),Al=e=>({name:"search",color:e});function El(e,a){e&1&&(s(0,"p"),d(1),p(2,"translate"),c()),e&2&&(o(),P(m(2,1,"Choose the pharmacy you would like to add")))}function Dl(e,a){e&1&&(s(0,"p"),d(1),p(2,"translate"),c()),e&2&&(o(),P(m(2,1,"No pharmacies found. Please try to change search criteria")))}function Fl(e,a){if(e&1&&ee(0,El,3,3,"p")(1,Dl,3,3,"p"),e&2){let t=g();te(t.pharmacyProviderList.length?0:1)}}function Bl(e,a){if(e&1&&(s(0,"div",19),k(1,"lib-radio-button",24),s(2,"label",25)(3,"strong"),d(4),c(),d(5),c()()),e&2){let t=a.$implicit;o(),l("id","provider"+t.id)("value",t.id),o(),l("for","provider"+t.id),o(2),P(t.name),o(),Bt(" ",t.address,", ",t.city,", ",t.state," ",t.zip," ")}}function Vl(e,a){if(e&1){let t=y();s(0,"button",23),M("click",function(){h(t);let i=g(2);return v(i.loadMoreProviders())}),d(1),p(2,"translate"),c()}e&2&&(o(),u(" ",m(2,1,"LOAD MORE")," "))}function Rl(e,a){if(e&1){let t=y();
2s(0,"div",17,0)(2,"lib-radio-button-group",18),V("ngModelChange",function(i){h(t);let r=g();return B(r.selectedPharmacyProviderId,i)||(r.selectedPharmacyProviderId=i),v(i)}),Et(3,Bl,6,8,"div",19,At),c()(),s(5,"div",20),f(6,Vl,3,3,"button",21),s(7,"button",22),M("click",function(){h(t);let i=g();return v(i.savePharmacyProvider())}),d(8),p(9,"translate"),c(),s(10,"button",23),M("click",function(){h(t);let i=g();return v(i.goBack())}),d(11),p(12,"translate"),c()()}if(e&2){let t=g();o(2),F("ngModel",t.selectedPharmacyProviderId),o(),Dt(t.pharmacyProviderList),o(3),l("ngIf",t.isLoadMoreAvailable),o(),l("disabled",!t.selectedPharmacyProviderId),o(),u(" ",m(9,5,"SAVE")," "),o(3),u(" ",m(12,7,"CANCEL")," ")}}var Gu=(()=>{let a=class a{constructor(n,i,r,C,O,w,I){this.activatedRoute=n,this.currentUserService=i,this.redirectService=r,this.demographicsApiService=C,this.pharmacyApiService=O,this.infoApiService=w,this.cdr=I,this.departmentUuid=this.activatedRoute.snapshot.queryParams.departmentUuid,this.pharmacyTotalCount=0,this.distanceList=[{value:"10",label:"10 Miles"},{value:"25",label:"25 Miles"},{value:"50",label:"50 Miles"},{value:"100",label:"100 Miles"}],this.pharmacySearch={search:"",zip:"",distance:this.distanceList[1].value,limit:4,offset:0}}ngOnInit(){this.clinicUuid=this.redirectService.getActiveTask()?.clinicUuid,this.currentUserService.getModel().pipe(Q(({id:n})=>this.userId=n),L(()=>this.demographicsApiService.getAddress(this.clinicUuid,this.userId))).subscribe(({zipCode:n})=>{this.pharmacySearch.zip=n,this.cdr.markForCheck()})}get isSearchValid(){return this.pharmacySearch.search.length>=3}get isZipValid(){return this.pharmacySearch.zip.search(/^[0-9]{5}(-[0-9]{4})?$/)!==-1}get isLoadMoreAvailable(){return this.pharmacySearch.offset+this.pharmacySearch.limit<this.pharmacyTotalCount}goBack(){this.redirectService.navigate([".."],{relativeTo:this.activatedRoute})}doSearchPharmacies(n){return this.pharmacyApiService.searchPharmacies(this.clinicUuid,this.pharmacySearch).pipe(Q(({result:i,totalCount:r})=>{this.pharmacyTotalCount=r,this.pharmacyProviderList=n.concat(i),this.cdr.markForCheck()}),he(()=>!0),Rn(()=>ge(!1)))}searchProviders(){!this.isSearchValid||!this.isZipValid||this.infoApiService.zipCodeValidation(this.pharmacySearch.zip).pipe(Q(()=>{this.pharmacySearch.offset=0,this.selectedPharmacyProviderId=void 0}),L(()=>this.doSearchPharmacies([]))).subscribe()}loadMoreProviders(){this.pharmacySearch.offset+=this.pharmacySearch.limit,this.doSearchPharmacies(this.pharmacyProviderList).subscribe(n=>{n&&setTimeout(()=>this.pharmacyProviderContainer.nativeElement.scrollTop=this.pharmacyProviderContainer.nativeElement.scrollHeight)})}savePharmacyProvider(){this.pharmacyApiService.updateDefaultPharmacy(this.clinicUuid,this.userId,this.departmentUuid,this.selectedPharmacyProviderId).subscribe(()=>this.goBack())}};a.\u0275fac=function(i){return new(i||a)(_(fe),_(re),_(x),_(Ue),_(un),_(Ne),_(dt))},a.\u0275cmp=b({type:a,selectors:[["ng-component"]],viewQuery:function(i,r){if(i&1&&le(Tl,5),i&2){let C;pe(C=de())&&(r.pharmacyProviderContainer=C.first)}},standalone:!1,decls:31,vars:40,consts:[["pharmacyProviderContainer",""],[1,"task-panel-background"],[1,"task-panel"],[1,"task-panel-header"],["type","button",1,"back-button",3,"click"],[3,"params"],[1,"title"],[1,"search-fields-container"],[1,"search-field"],["type","text",3,"ngModelChange","keydown.enter","placeholder","ngModel"],["type","button",1,"search-button",3,"click","disabled"],[1,"search-options"],[1,"search-option"],["id","pharmacy-distance-label"],["labelField","label","valueField","value","ariaLabelledby","pharmacy-distance-label","placeholder","",3,"ngModelChange","selectionValueChange","options","ngModel"],["for","pharmacy-zip-search"],["id","pharmacy-zip-search","type","text",3,"ngModelChange","keydown.enter","placeholder","ngModel"],[1,"task-panel-body"],["name","pharmacy-provider",1,"search-result-container",3,"ngModelChange","ngModel"],[1,"search-result-item"],[1,"task-panel-footer"],["type","button","class","link",3,"click",4,"ngIf"],["type","button",1,"task-panel-button",3,"click","disabled"],["type","button",1,"link",3,"click"],[3,"id","value"],[3,"for"]],template:function(i,r){i&1&&(s(0,"div",1)(1,"div",2)(2,"div",3)(3,"button",4),p(4,"translate"),M("click",function(){return r.goBack()}),k(5,"lib-svg-icon",5),c(),s(6,"h1",6),d(7),p(8,"translate"),c()(),s(9,"div",7)(10,"div",8)(11,"input",9),p(12,"translate"),p(13,"translate"),V("ngModelChange",function(O){return B(r.pharmacySearch.search,O)||(r.pharmacySearch.search=O),O}),M("keydown.enter",function(){return r.searchProviders()}),c(),s(14,"button",10),p(15,"translate"),M("click",function(){return r.searchProviders()}),k(16,"lib-svg-icon",5),c()(),s(17,"div",11)(18,"div",12)(19,"span",13),d(20),p(21,"translate"),c(),s(22,"lib-select",14),V("ngModelChange",function(O){return B(r.pharmacySearch.distance,O)||(r.pharmacySearch.distance=O),O}),M("selectionValueChange",function(){return r.searchProviders()}),c()(),s(23,"div",12)(24,"label",15),d(25),p(26,"translate"),c(),s(27,"input",16),p(28,"translate"),V("ngModelChange",function(O){return B(r.pharmacySearch.zip,O)||(r.pharmacySearch.zip=O),O}),M("keydown.enter",function(){return r.searchProviders()}),c()()(),ee(29,Fl,2,1),c(),ee(30,Rl,13,9),c()()),i&2&&(o(3),H("aria-label",m(4,21,"Back")),o(2),l("params",z(37,Il)),o(2),P(m(8,23,"Pharmacy Search")),o(4),E("empty",!r.
2isSearchValid),l("placeholder",m(12,25,"Pharmacy name")),F("ngModel",r.pharmacySearch.search),H("aria-label",m(13,27,"Pharmacy name")),o(3),l("disabled",!r.isSearchValid),H("aria-label",m(15,29,"Search")),o(2),l("params",W(38,Al,r.isSearchValid?"#505050":"#949494")),o(4),P(m(21,31,"Within")),o(2),l("options",r.distanceList),F("ngModel",r.pharmacySearch.distance),o(3),P(m(26,33,"of Zip Code")),o(2),E("empty",!r.isZipValid),l("placeholder",m(28,35,"Zip Code")),F("ngModel",r.pharmacySearch.zip),o(2),te(r.pharmacyProviderList?29:-1),o(),te(r.pharmacyProviderList!=null&&r.pharmacyProviderList.length?30:-1))},dependencies:[Ce,ie,oe,T,A,qt,hn,Ri,S],styles:[".task-panel-background[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;height:100%;width:100%;padding:30px 20px}.task-panel[_ngcontent-%COMP%]{height:100%;background-color:#fff;border-radius:8px;display:flex;flex-direction:column;overflow:hidden}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:100px;display:flex;align-items:center;justify-content:center;position:relative}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .header-background[_ngcontent-%COMP%]{pointer-events:none;position:absolute;height:100%;width:100%;opacity:.15}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 50px}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:1rem 2rem 0;overflow-y:auto;line-height:1.5}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:left;font-family:Roboto-bold,sans-serif;font-size:18px;letter-spacing:.53px;color:#064060;padding-bottom:1rem}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin-top:2rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{display:flex;color:#fff;justify-content:center;padding:.8rem 2rem;background-color:#064060;width:100%;box-sizing:border-box;font-family:Roboto-bold,sans-serif;align-items:center;cursor:pointer;width:15rem;border-radius:8px;margin:1rem 0;text-transform:uppercase;font-size:.875rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]:hover{opacity:.8}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-width: 2rem;--svg-height: 2rem;margin-right:.5rem}.task-panel[_ngcontent-%COMP%] .task-panel-button[disabled][_ngcontent-%COMP%]{cursor:default}.task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{background:none;color:#064060;text-transform:uppercase;font-size:.875rem;letter-spacing:.43px;margin:.75rem 0}@media(max-height:460px){.task-panel-background[_ngcontent-%COMP%]{padding:10px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{height:60px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 30px}.task-panel[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:1rem}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:8px 8px 0}.task-panel[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{margin-top:8px}.task-panel[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%], .task-panel[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin:8px 0}}[_nghost-%COMP%]{height:100%;background:#fff;font-size:16px}.task-panel-background[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:0 20px}.task-panel[_ngcontent-%COMP%]{border-radius:0;width:100%;max-width:350px;background:transparent;overflow:unset}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%]{padding:40px 0;height:unset;justify-content:flex-start}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:center;z-index:0;padding:0;flex:1}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .back-button[_ngcontent-%COMP%]{background:transparent;cursor:pointer}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .back-button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 20px}.task-panel[_ngcontent-%COMP%] .task-panel-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding-right:20px}.task-panel[_ngcontent-%COMP%] .task-panel-body[_ngcontent-%COMP%]{padding:0;min-height:136px}.task-panel[_ngcontent-%COMP%] .task-panel-footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-end;margin-top:8px;align-items:center}.task-panel[_ngcontent-%COMP%] .task-panel-footer[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]{margin:24px auto 12px;text-wrap:nowrap;font-size:14px;max-width:240px;padding:12.8px 32px}.task-panel[_ngcontent-%COMP%] .task-panel-footer[_ngcontent-%COMP%] .task-panel-button[_ngcontent-%COMP%]:disabled{opacity:.25;cursor:default}.task-panel[_ngcontent-%COMP%] .task-panel-footer[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{background:transparent;border:0;padding:0;cursor:pointer;font-family:Roboto-bold,sans-serif;font-size:14px;margin:12px 0}.task-panel[_ngcontent-%COMP%] .task-panel-footer[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]:last-child{margin-bottom:32px}.search-fields-container[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;margin-bottom:12px;position:relative}.search-fields-container[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background:transparent;position:absolute;z-index:1;top:9px;right:8px;
2cursor:pointer}.search-fields-container[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] button[_ngcontent-%COMP%] lib-svg-icon[_ngcontent-%COMP%]{--svg-size: 22.4px}.search-fields-container[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{border:1px solid #505050;border-radius:8px;box-sizing:border-box;flex:1;height:40px;padding:9px 32px 8px 16px;color:#505050;background:transparent}.search-fields-container[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]::placeholder{color:#6a6a6a}.search-fields-container[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] input[type=text].empty[_ngcontent-%COMP%]{color:#6a6a6a;border-color:#6a6a6a}.search-fields-container[_ngcontent-%COMP%] .search-options[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem 0}.search-fields-container[_ngcontent-%COMP%] .search-options[_ngcontent-%COMP%] .search-option[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:4px}.search-fields-container[_ngcontent-%COMP%] .search-options[_ngcontent-%COMP%] .search-option[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .search-fields-container[_ngcontent-%COMP%] .search-options[_ngcontent-%COMP%] .search-option[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px;white-space:nowrap}.search-fields-container[_ngcontent-%COMP%] .search-options[_ngcontent-%COMP%] .search-option[_ngcontent-%COMP%] lib-select[_ngcontent-%COMP%]{width:118px;border-radius:8px;--select-height: 40px;--label-font-size: 12px}.search-fields-container[_ngcontent-%COMP%] .search-options[_ngcontent-%COMP%] .search-option[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.5rem;border:1px solid #e6e6e6;width:100%;box-sizing:border-box;appearance:none;min-height:2rem;line-height:initial;border-radius:8px;text-align:left;text-align:-webkit-left;color:#505050;border-color:#949494;background-color:#fff;font-size:1rem;padding:8px;font-size:16px;min-height:32px;width:100px;height:40px;border-color:#505050}.search-fields-container[_ngcontent-%COMP%] .search-options[_ngcontent-%COMP%] .search-option[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-clear-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.search-fields-container[_ngcontent-%COMP%] .search-options[_ngcontent-%COMP%] .search-option[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-clear{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.search-fields-container[_ngcontent-%COMP%] .search-options[_ngcontent-%COMP%] .search-option[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.search-fields-container[_ngcontent-%COMP%] .search-options[_ngcontent-%COMP%] .search-option[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;appearance:none;-moz-appearance:none;background-color:transparent;outline:none}.search-fields-container[_ngcontent-%COMP%] .search-options[_ngcontent-%COMP%] .search-option[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.search-fields-container[_ngcontent-%COMP%] .search-options[_ngcontent-%COMP%] .search-option[_ngcontent-%COMP%] input.ng-dirty[_ngcontent-%COMP%]{border-color:#505050}.search-fields-container[_ngcontent-%COMP%] .search-options[_ngcontent-%COMP%] .search-option[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled{background:#efefef;border-color:#80808014;color:#505050;-webkit-text-fill-color:#505050;opacity:1}.search-fields-container[_ngcontent-%COMP%] .search-options[_ngcontent-%COMP%] .search-option[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:#6a6a6a}.search-fields-container[_ngcontent-%COMP%] .search-options[_ngcontent-%COMP%] .search-option[_ngcontent-%COMP%] input.empty[_ngcontent-%COMP%]{border-color:#6a6a6a;color:#6a6a6a}.search-fields-container[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{margin:32px 0 8px}.search-result-container[_ngcontent-%COMP%]{margin-top:16px;overflow:unset;display:flex;flex-direction:column;gap:16px}.search-result-container[_ngcontent-%COMP%] .search-result-item[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-start}.search-result-container[_ngcontent-%COMP%] .search-result-item[_ngcontent-%COMP%] lib-radio-button[_ngcontent-%COMP%]{margin-left:4px}.search-result-container[_ngcontent-%COMP%] .search-result-item[_ngcontent-%COMP%] label[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;font-family:Roboto-bold,sans-serif}"],changeDetection:0});let e=a;return e})();var Df=(()=>{let a=class a{};a.\u0275fac=function(i){return new(i||a)},a.\u0275mod=Zn({type:a}),a.\u0275inj=jn({providers:[pn],imports:[$i,Fi,hn,Yt,Ht]});let e=a;return e})();export{Ht as a,uo as b,Ye as c,io as d,Vp as e,Cd as f,jd as g,om as h,um as i,xm as j,so as k,lo as l,po as m,tg as n,mg as o,vg as p,xg as q,Fg as r,Hg as s,p0 as t,O0 as u,F0 as v,vo as w,__ as x,x_ as y,Xi as z,Po as A,W_ as B,Mo as C,du as D,ku as E,Bu as F,Gu as G,Df as H};
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.