PageSourceSearch

https://sleep.betternight.com/166.b21a36bf41058a41.js

js betternight.com collected 2026-10-07 02:48:27 UTC 191,465 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkbetternight=self.webpackChunkbetternight||[]).push([[166],{9914:(ae,G,_)=>{_.d(G,{Z:()=>J});var b=_(467),s=_(4438),y=_(386),f=_(8857),C=_(8490),B=_(3366),e=_(4854),O=_(177),k=_(8322);function S(u,w){if(1&u&&(s.j41(0,"li"),s.EFF(1),s.k0s()),2&u){const p=w.$implicit;s.R7$(),s.JRh(p)}}let N=(()=>{class u{static#e=this.\u0275fac=function(m){return new(m||u)};static#t=this.\u0275cmp=s.VBU({type:u,selectors:[["bn-bullet-list"]],inputs:{data:"data"},decls:4,vars:2,consts:[[1,"alternate",3,"cardTitle"],[4,"ngFor","ngForOf"]],template:function(m,l){1&m&&(s.j41(0,"bn-card",0)(1,"content")(2,"ul"),s.DNE(3,S,2,1,"li",1),s.k0s()()()),2&m&&(s.Y8G("cardTitle",l.data.title),s.R7$(3),s.Y8G("ngForOf",l.data.data))},dependencies:[O.Sq,k.i],styles:["[_nghost-%COMP%]{font-weight:500}"]})}return u})();var A=_(1818),U=_(636),V=_(4171),H=_(2868),$=_(2747),D=_(2440);function R(u,w){1&u&&s.nrm(0,"bn-spinner")}function j(u,w){if(1&u&&(s.j41(0,"span"),s.EFF(1),s.j41(2,"a",15),s.EFF(3),s.k0s()()),2&u){const p=s.XpG();s.R7$(),s.SpI(" Based on the severity of your sleep apnea, an oral appliance is not your best initial treatment option. ",p.data.physicianName?p.getProvider():"Your physician"," is prescribing PAP therapy. If you want to discuss further, please call us at "),s.R7$(),s.Mz_("href","tel:",null==p.dataService?null:p.dataService.phoneNumber,"",s.B4B),s.R7$(),s.SpI("",null==p.dataService?null:p.dataService.phoneNumber,".")}}function L(u,w){if(1&u&&(s.j41(0,"span"),s.EFF(1),s.k0s()),2&u){const p=s.XpG();s.R7$(),s.SpI(" Based on the results of your sleep test, ",p.data.physicianName?p.getProvider():"your physician"," has prescribed therapy. ")}}function Y(u,w){if(1&u){const p=s.RV6();s.j41(0,"bn-popup-modal",19),s.bIt("closeModel",function(l){s.eBV(p);const M=s.XpG();return s.Njj(M.close(l))}),s.j41(1,"button",20),s.bIt("click",function(){s.eBV(p);const l=s.XpG();return s.Njj(l.close(!1))}),s.EFF(2,"CLOSE"),s.k0s()()}if(2&u){const p=s.XpG();s.Y8G("ahiNumber",null==p.data?null:p.data.ahiScore)("showAhiScore",p.onLearnMore)}}let X=(()=>{class u{constructor(p,m,l,M){this.dataService=p,this.router=m,this.navService=l,this.utilService=M,this.onLearnMore=!1,this.indicatorArray=[{class:"normal",range:"0-4.9"},{class:"mild",range:"5-14.9"},{class:"moderate",range:"15-29.9"},{class:"severe",range:"30+"}]}ngOnInit(){}get title(){return!this.data?.ahiScore||""===this.data.ahiScore||isNaN(this.data.ahiScore)?"We got your referral":"Here's what your<br />sleep looks like"}get subTitle(){return!this.data?.ahiScore||""===this.data.ahiScore||isNaN(this.data.ahiScore)?"Your doctor sent us a referral. Let's translate your results into something you can feel.":"Your doctor sent us your results.<br />Let's translate them into something you can feel."}get whatThisMeansText(){const p=Number(this.data?.ahiScore);if(!this.data?.ahiScore||""===this.data.ahiScore||isNaN(this.data.ahiScore))return"For example, an AHI of 10 would mean that your breathing is interrupted about every 6 minutes while you sleep - roughly 48 times during an 8-hour period.";const m=Math.round(60/p),l=8*p;return p>60?`Your breathing is interrupted more than once every minute while you sleep - roughly ${l} times during an 8-hour period`:`Your breathing is interrupted about every ${m} minutes while you sleep &mdash; roughly ${l} times during an 8-hour period.`}getDate(){return` on ${this.data.prescriptionDate}.`}getProvider(){return`Dr. ${this.data.physicianName}`}getSeverityClass(){const p=Number(this.data?.ahiScore);return p<5?"normal":p<15?"mild":p<30?"moderate":"severe"}onClickLearnMore(){this.navService.showModalOnClick=!0,this.onLearnMore=!0}close(p){this.onLearnMore=p}static#e=this.\u0275fac=function(m){return new(m||u)(s.rXU(C.u),s.rXU(f.Ix),s.rXU(y.o),s.rXU(V.T))};static#t=this.\u0275cmp=s.VBU({type:u,selectors:[["bn-assessment-card"]],hostVars:2,hostBindings:function(m,l){2&m&&s.HbH(l.whatThisMeansText)},inputs:{data:"data"},decls:41,vars:15,consts:[[4,"ngIf"],[1,"mobile-result"],[1,"mobile-result__left"],[3,"innerHtml"],[1,"mobile-intro",3,"innerHtml"],[3,"score"],[1,"mobile-result__right"],[1,"mobile-meaning"],[1,"mobile-helps"],[1,"desktop-result"],[1,"prescription"],[1,"greeting"],[1,"summary"],[1,"icon-link"],[1,"far","fa-newspaper"],[1,"link",3,"href"],[1,"text-center"],["href","javascript:void(0)",1,"link",3,"click"],[3,"ahiNumber","showAhiScore","closeModel",4,"ngIf"],[3,"closeModel","ahiNumber","showAhiScore"],["type","button",3,"click"]],template:function(m,l){1&m&&(s.DNE(0,R,1,0,"bn-spinner",0),s.j41(1,"bn-card")(2,"content")(3,"div",1)(4,"div",2),s.nrm(5,"h1",3)(6,"p",4)(7,"bn-score",5),s.k0s(),s.j41(8,"div",6)(9,"section",7)(10,"h2"),s.EFF(11,"What This Means"),s.k0s(),s.nrm(12,"p",3),s.k0s(),s.j41(13,"section",8)(14,"h2"),s.EFF(15,"Why CPAP Helps"),s.k0s(),s.j41(16,"p"),s.EFF(17," It keeps your airway open so you can finally get the deep, uninterrupted sleep your body needs. "),s.k0s()()()(),s.j41(18,"div",9)(19,"div",10)(20,"div",11),s.EFF(21),s.nI1(22,"uppercase"),s.k0s(),s.j41(23,"div",12),s.DNE(24,j,4,4,"span",0)(25,L,2,1,"span",0),s.k0s(),s.j41(26,"div",13),s.nrm(27,"i",14),s.j41(28,"span")(29,"span"),s.EFF(30,"IF YOU WOULD LIKE A COPY OF YOUR PRESCRIPTION TO TAKE TO A DIFFERENT PROVIDER,"),s.k0s(),s.EFF(31," PLEASE CALL US AT "),s.j41(32,"a",15),s.EFF(33),s.k0s()()()(),s.j41(34,"div"),s.nrm(35,"bn-score",5),s.j41(36,"div",16)(37,"a",17),s.bIt("click",function(){return l.onClickLearnMore()}),s.EFF(38,"Learn more "),s.k0s(),s.EFF(39," about AHI "),s.k0s()()()()(),s.DNE(40,Y,3,2,"bn-popup-modal",18)),2&m&&(s.Y8G("ngIf",l.showSpinner),s.R7$(5),s.Y8G("innerHtml",l.title,s.npT),s.R7$(),s.Y8G("innerHtml",l.subTitle,s.npT),s.R7$(),s.Y8G("score",l.data.ahiScore),s.R7$(5),s.Y8G("innerHtml",l.whatThisMeansText,s.npT),s.R7$(9),s.SpI("HI ",s.bMT(22,13,l.data.patientName),","),s.R7$(3),s.Y8G("ngIf",(null==l.data?null:l.data.oatSelected)&&l.router.url.includes("cpap-home")),s.R7$(),s.Y8G("ngIf",!(null!=l.data&&l.data.oatSelected)||(null==l.data?null:l.data.oatSelected)&&l.router.url.includes("dsm-welcome")),s.R7$(7),s.Mz_("href","tel:",null==l.dataService?null:l.dataService.ph
1oneNumber,"",s.B4B),s.R7$(),s.SpI(" ",null==l.dataService?null:l.dataService.phoneNumber,""),s.R7$(2),s.FS9("score",null==l.data?null:l.data.ahiScore),s.R7$(5),s.Y8G("ngIf",l.onLearnMore))},dependencies:[O.bT,k.i,H.t,$.W,D.n,O.Pc],styles:['[_ngcontent-%COMP%]:root{--primary-color: "";--secondary-color: "";--dark-secondary-color: "";--welcome-column-header: "";--foreground: "";--alt-foreground: "";--error-color: "";--primary-text-color: "";--secondary-text-color: "";--dark-secondary-text-color: "";--sleep-risk-text: "";--header-background: "";--primary-gradient: "";--footer-background: ""}[_nghost-%COMP%]{grid-column:span 4}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .desktop-result[_ngcontent-%COMP%]{display:contents}@media (min-width: 768px){[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;justify-items:center;-moz-column-gap:40px;column-gap:40px;padding:0 40px;text-align:center;color:var(--secondary-text-color)}[_nghost-%COMP%]   .mobile-result__left[_ngcontent-%COMP%], [_nghost-%COMP%]   .mobile-result__right[_ngcontent-%COMP%]{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{margin:0 0 10px;font-size:30px;line-height:1.2;font-weight:700}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;color:var(--dark-secondary-text-color);font-size:20px;line-height:1.2;font-weight:700}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;color:var(--dark-secondary-text-color);font-size:16px;line-height:1.4}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]   .mobile-intro[_ngcontent-%COMP%]{max-width:360px;margin-bottom:25px}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]   .mobile-meaning[_ngcontent-%COMP%]{margin:0 0 24px}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]   .mobile-meaning[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin-bottom:10px}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]   .mobile-helps[_ngcontent-%COMP%]{padding:18px 20px;border-radius:10px;background:#dce9f4}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]   .mobile-helps[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:18px;margin-bottom:10px;color:var(--secondary-text-color)}[_nghost-%COMP%]   .desktop-result[_ngcontent-%COMP%]{display:none}}@media (max-width: 991px){[_nghost-%COMP%]   content[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%]   content[_ngcontent-%COMP%]   .consequences[_ngcontent-%COMP%]{margin-left:0}}[_nghost-%COMP%]   .prescription[_ngcontent-%COMP%]{margin-right:40px;flex:1 0 250px}[_nghost-%COMP%]   .prescription[_ngcontent-%COMP%]   .greeting[_ngcontent-%COMP%]{font-size:21px;font-weight:700}[_nghost-%COMP%]   .prescription[_ngcontent-%COMP%]   .summary[_ngcontent-%COMP%]{margin-top:10px;font-size:17px;line-height:140%;font-weight:500}[_nghost-%COMP%]   .prescription[_ngcontent-%COMP%]   .icon-link[_ngcontent-%COMP%]{margin-top:30px;cursor:auto}@media (max-width: 991px){[_nghost-%COMP%]   .prescription[_ngcontent-%COMP%]   .icon-link[_ngcontent-%COMP%]{justify-content:center}}@media (max-width: 767px){[_nghost-%COMP%]{margin-bottom:0}[_nghost-%COMP%]   .desktop-result[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]{box-shadow:none}[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]   content[_ngcontent-%COMP%]{padding:0}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]{display:block;padding:0!important;text-align:center;color:var(--secondary-text-color);padding:2em}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{margin:0 0 10px;font-size:26px;line-height:1.2;font-weight:700}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;font-size:20px;line-height:1.2;font-weight:700;color:var(--dark-secondary-text-color)}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;font-size:16px;line-height:1.3;color:var(--dark-secondary-text-color)}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]   .mobile-intro[_ngcontent-%COMP%]{margin-bottom:25px}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]   .mobile-meaning[_ngcontent-%COMP%]{margin:0 12px 16px}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]   .mobile-meaning[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin-bottom:10px}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]   .mobile-helps[_ngcontent-%COMP%]{padding:12px 10px 14px;border-radius:10px;background:#dce9f4;margin-bottom:20px}[_nghost-%COMP%]   .mobile-result[_ngcontent-%COMP%]   .mobile-helps[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin-bottom:10px;color:var(--secondary-text-color)}}[_nghost-%COMP%]   .consequences[_ngcontent-%COMP%]{margin-left:40px}[_nghost-%COMP%]   .consequences[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;grid-gap:5px 20px}[_nghost-%COMP%]   .consequences[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{font-family:Ubuntu}[_nghost-%COMP%]   .consequences[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{text-transform:uppercase;font-size:11px;font-weight:600;margin-bottom:10px}[_nghost-%COMP%]   .consequences[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{font-size:17px;font-weight:500;margin-bottom:15px}[_nghost-%COMP%]   .consequences[_ngcontent-%COMP%]   .list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}[_nghost-%COMP%]   .consequences[_ngcontent-%COMP%]   .list[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1 1 50%;height:40px;padding-right:8px}[_nghost-%COMP%]   .consequences[_ngcontent-%COMP%]   .list[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]   .value[_ngcontent-%COMP%]{font-weight:700}[_nghost-%COMP%]   .consequences[_ngcontent-%COMP%]   .list[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{margin:0 5px}[_nghost-%COMP%]   .consequences[_ngcontent-%COMP%]   .list[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]   .separator[_ng
1content-%COMP%]{display:inline-block;width:2px;height:22px;background:var(--primary-color);margin:0 10px}[_nghost-%COMP%]   .consequences[_ngcontent-%COMP%]   .list[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]   .condition[_ngcontent-%COMP%]{font-size:14px}[_nghost-%COMP%]   .consequences[_ngcontent-%COMP%]   .list[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]:before{display:none}']})}return u})();function z(u,w){if(1&u){const p=s.RV6();s.j41(0,"button",14),s.bIt("click",function(){s.eBV(p);const l=s.XpG(2);return s.Njj(l.onClickLearnMore())}),s.EFF(1),s.k0s()}if(2&u){const p=s.XpG(2);s.R7$(),s.SpI(" ",p.aboutCpap.button," ")}}function q(u,w){if(1&u){const p=s.RV6();s.j41(0,"div",5),s.nrm(1,"bn-assessment-card",6),s.j41(2,"div",7)(3,"bn-content-carousel",8)(4,"div",9)(5,"div",10),s.DNE(6,z,2,1,"button",11),s.j41(7,"p",12),s.EFF(8),s.k0s(),s.j41(9,"div",9)(10,"a",13),s.bIt("click",function(){s.eBV(p);const l=s.XpG();return s.Njj(l.learnMore())}),s.EFF(11,"Learn more "),s.k0s(),s.EFF(12," about apnea therapy "),s.k0s()()()(),s.nrm(13,"bn-bullet-list",6)(14,"bn-bullet-list",6),s.k0s()()}if(2&u){const p=s.XpG();s.R7$(),s.Y8G("data",p.assessmentData),s.R7$(2),s.FS9("cardTitle",p.aboutCpap.title),s.R7$(),s.Y8G("ngClass",p.router.url.includes("dsm-welcome")?"":"v-center"),s.R7$(2),s.Y8G("ngIf",!p.router.url.includes("dsm-welcome")),s.R7$(2),s.JRh(p.aboutCpap.text),s.R7$(),s.Y8G("ngClass",p.router.url.includes("dsm-welcome")?"hide":""),s.R7$(4),s.Y8G("data",p.whybn),s.R7$(),s.Y8G("data",p.tvp)}}function W(u,w){if(1&u){const p=s.RV6();s.j41(0,"bn-popup-modal",15),s.bIt("closeModel",function(l){s.eBV(p);const M=s.XpG();return s.Njj(M.close(l))}),s.j41(1,"button",16),s.bIt("click",function(){s.eBV(p);const l=s.XpG();return s.Njj(l.close(!1))}),s.EFF(2,"CLOSE"),s.k0s()()}if(2&u){const p=s.XpG();s.Y8G("ahiNumber",null==p.data?null:p.data.ahiScore)("showAhiScore",p.onLearnMore)}}let J=(()=>{class u{onResize(p){this.cardTitle=p.target.innerWidth<768?{cardKey:"",value:""}:{cardKey:this.router.url,value:"Your Sleep Study"}}constructor(p,m,l,M,I){this.navService=p,this.router=m,this.dataService=l,this.apiService=M,this.loadModule=I,this.cardTitle=null,this.onLearnMore=!1,this.assessmentData={patientName:this.dataService.currentUserInfo.firstName,physicianName:"",prescriptionDate:"",ahiScore:"",associatedConditions:[{condition:"High Blood Pressure",value:3},{condition:"Diabetes",value:2},{condition:"Stroke",value:2},{condition:"Motor Vehicle Accidents",value:5},{condition:"Heart Failure",value:6},{condition:"Depression",value:2}],hstUserOrder:!1,oatSelected:!1},this.tvp={title:"Why treat your apnea",data:["Improved energy and quality of life","Improved control of diabetes and hypertension","Reduced risk of heart disease","Reduced stress and anxiety","Elevated mood and improved relationships"]},this.whybn={title:"Why Betternight for therapy",data:["Industry leading patient success","Free ongoing sleep coaching","Ongoing parts replacement","25 years experience","70,000 patients treated yearly","Staff of over 300 highly trained sleep professionals"]},this.carouselText=[],this.aboutCpap={title:"UNDERSTANDING CPAP",text:"Continuous positive airway pressure (CPAP) is the most effective way to\n    treat sleep apnea. Mild air pressure is applied on a continuous basis to\t\n    keep the airways open while you sleep, allowing you to rest deeply\t\n    throughout the night.",button:"Learn more about AHI",class:"vertical-center"},p.currentPage[1]="OVERVIEW"}ngOnInit(){this.cardTitle={cardKey:this.router.url,value:"Your Sleep Study"},this.navService.currentPage[0]="Sleep Apnea treatment",this.router.url.includes("dsm-welcome")&&this.setTextForDsm(),this.getHstResult(),this.getProviderInfo(),1!=this.dataService.currentUserInfo.therapyDeviceTypeId&&(this.aboutCpap.title="UNDERSTANDING CPAP",this.aboutCpap.text="Positive airway pressure (PAP) is the most effective way to treat sleep apnea. Mild air pressure is applied on a continuous basis to keep the airways open while you sleep, allowing you to rest deeply throughout the night.",this.aboutCpap.button="Learn more about AHI")}setTextForDsm(){this.navService.currentPage[0]="Sleep Apnea treatment",this.whybn.title="Why Betternight",this.aboutCpap.title="what is OAT?",this.aboutCpap.text="Like an athletic mouthpiece, oral appli
1ances are often non-invasive to wear.\n     By softly shifting your lower jaw, oral appliances open your airway. Many patients report improvement\n     in both their obstructive sleep apnea and snoring."}getHstResult(){this.apiService.getApi(this.dataService.serverAddress+`service/v1/hst/patient/${this.dataService.currentUserInfo.userId}`).subscribe(m=>{const l=JSON.parse(JSON.stringify(m));if(this.assessmentData.ahiScore=+parseFloat(l.ahiNumber).toFixed(1),this.assessmentData.ahiScore&&(1==this.assessmentData.ahiScore.toString().length&&(this.assessmentData.ahiScore=""+this.assessmentData.ahiScore),l.ahiUpdatedAt)){const M=new Date(l.ahiUpdatedAt),I=1==M.getDate().toString().length?`0${M.getDate()}`:M.getDate(),Q=1==(M.getMonth()+1).toString().length?`0${M.getMonth()+1}`:M.getMonth()+1;this.assessmentData.prescriptionDate=`${Q}/${I}/${M.getFullYear()}`}this.assessmentData.hstUserOrder=!!l.hstUserOrder,this.assessmentData.oatSelected=l.oatSelected})}getProviderInfo(){this.apiService.getApi(this.dataService.serverAddress+`service/v1/consult/${this.dataService.currentUserInfo.userId}/appointments`).subscribe(m=>{const l=JSON.parse(JSON.stringify(m));if(l.appointments[0]){const{providerName:M}=l.appointments[0];this.assessmentData.physicianName=M}})}onContinue(){var p=this;return(0,b.A)(function*(){try{const{isProxySession:m}=p.dataService.currentUserInfo;let l=p.router.url.includes("dsm-welcome")?"hst/dsm-recommended":"cpap/payment-option/cpap";if(!m){yield p.apiService.updateUser({cpapHomeVisited:!0});const{uiState:M}=p.dataService.currentUserInfo;!M.includes("cpap-home")&&!M.includes("dsm-welcome")&&(l=`${p.loadModule.setModule(M)}${M}`)}p.router.navigateByUrl(l)}catch(m){console.log("Error in updating showHomepage flag  "+m)}})()}learnMore(){this.navService.previousPage=JSON.parse(JSON.stringify(this.navService.currentPage)),this.router.navigateByUrl(`${this.dataService.module}/learn-more`)}onClickLearnMore(){this.navService.showModalOnClick=!0,this.onLearnMore=!0}close(p){this.onLearnMore=p}static#e=this.\u0275fac=function(m){return new(m||u)(s.rXU(y.o),s.rXU(f.Ix),s.rXU(C.u),s.rXU(B.G),s.rXU(e.Q))};static#t=this.\u0275cmp=s.VBU({type:u,selectors:[["bn-cpap-home"]],hostBindings:function(m,l){1&m&&s.bIt("resize",function(I){return l.onResize(I)},!1,s.tSv)},decls:6,vars:4,consts:[["content",""],[1,"",3,"id","cardTitle"],["class","cpap-home",4,"ngIf"],["primaryActionText","Continue",3,"click"],[3,"ahiNumber","showAhiScore","closeModel",4,"ngIf"],[1,"cpap-home"],[3,"data"],[1,"mobile-hidden-cards"],["bullets","hide",1,"what-is-cpap-card",3,"cardTitle"],[3,"ngClass"],[1,"text-left"],["class","btn-sm m-auto block h-auto","style","width: auto; margin-bottom: 10px",3,"click",4,"ngIf"],[1,"mt-0"],["href","javascript:void(0)",1,"link",3,"click"],[1,"btn-sm","m-auto","block","h-auto",2,"width","auto","margin-bottom","10px",3,"click"],[3,"closeModel","ahiNumber","showAhiScore"],["type","button",3,"click"]],template:function(m,l){if(1&m){const M=s.RV6();s.j41(0,"bn-card",1)(1,"content",null,0),s.DNE(3,q,15,8,"div",2),s.k0s()(),s.j41(4,"bn-control-footer",3),s.bIt("click",function(){return s.eBV(M),s.Njj(l.onContinue())}),s.k0s(),s.DNE(5,W,3,2,"bn-popup-modal",4)}2&m&&(s.FS9("id",null==l.cardTitle?null:l.cardTitle.cardKey),s.FS9("cardTitle",null==l.cardTitle?null:l.cardTitle.value),s.R7$(3),s.Y8G("ngIf",!l.navService.showCloseButton),s.R7$(2),s.Y8G("ngIf",l.onLearnMore))},dependencies:[O.YU,O.bT,N,k.i,A.$,U.u,X,D.n],styles:['[_ngcontent-%COMP%]:root{--primary-color: "";--secondary-color: "";--dark-secondary-color: "";--welcome-column-header: "";--foreground: "";--alt-foreground: "";--error-color: "";--primary-text-color: "";--secondary-text-color: "";--dark-secondary-text-color: "";--sleep-risk-text: "";--header-background: "";--primary-gradient: "";--footer-background: ""}[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]{height:calc(100% - 50px)}@media (max-width: 767px){[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]{box-shadow:none}}@media (max-width: 767px){[_nghost-%COMP%]   bn-control-footer[_ngcontent-%COMP%]{position:relative}}[_nghost-%COMP%]   content[_ngcontent-%COMP%]{padding-bottom:0}[_nghost-%COMP%]   .cpap-home[_ngcontent-%COMP%]{height:100%}@media (max-width: 767px){[_nghost-%COMP%]   .cpap-home[_ngcontent-%COMP%]   bn-control-footer[_ngcontent-%COMP%]{padding:0!important}}[_nghost-%COMP%]   .mobile-hidden-cards[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:1em;margin-top:1em}@media (max-width: 767px){[_nghost-%COMP%]   .mobile-hidden-cards[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%]   .btn-sm[_ngcontent-%COMP%]{height:auto!important;min-height:34px}@media (max-width: 767px){[_nghost-%COMP%]     bn-card>.header{display:none!important}}.what-is-cpap-card[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{position:static!important;padding:0}.hide[_ngcontent-%COMP%]{display:none}']})}return u})()},1166:(ae,G,_)=>{_.r(G),_.d(G,{CpapModule:()=>nn});var b=_(177),s=_(5559),y=_(8857),f=_(5051),C=_(1454),B=_(9914),e=_(4438),O=_(8490),k=_(3366),S=_(386),N=_(8322),A=_(2868),U=_(3990),V=_(8252),H=_(9029),$=_(8860),D=_(3812),R=_(636),j=_(2440);function L(i,r){if(1&i){const t=e.RV6();e.j41(0,"bn-popup-modal",7),e.bIt("closeModel",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.closeVideo(n))}),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("videoUrl",null==t.cpapProcessOrder?null:t.cpapProcessOrder.videoUrl)}}function Y(i,r){if(1&i&&(e.j41(0,"div",13),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.SpI(" ",null==t.cpapProcessOrder?null:t.cpapProcessOrder.heading," ")}}function X(i,r){if(1&i&&e.nrm(0,"p",14),2&i){const t=e.XpG(2);e.Y8G("innerHTML",null==t.cpapProcessOrder?null:t.cpapProcessOrder.text,e.npT)}}function z(i,r){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"date"),e.j41(3,"a",17),e.EFF(4),e.k0s()()),2&i){const t=e.XpG(4);e.R7$(),e.SpI(" Estimated delivery ",e.i5U(2,3,null==t.orderStatus||null==t.orderStatus.tracker?null:t.orderStatus.tracker.expectedDeliveryDate,"EEEE, MMMM d"),". "),e.R7$(2),e.BMQ("href",t.trackUrl,e.B4B),e.R7$(),e.JRh(null==t.cpapProcessOrder?null:t.cpapProcessOrder.trackOrder)}}function q(i,r){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(),e.JRh(t.description)}}function W(i,r){if(1&i){const t=e.RV6();e.j41(0,"span"),e.EFF(1),e.j41(2,"a",18),e.bIt("click",function(){e.eBV(t);const n=e.XpG(4);return e.Njj(n.videoPlay())}),e.EFF(3,"Click here"),e.k0s(),e.EFF(4," to watch a video about your CPAP machine. "),e.k0s()}if(2&i){const t=e.XpG().$implicit;e.R7$(),e.SpI(" ",t.description," ")}}function J(i,r){if(1&i&&(e.j41(0,"li")(1,"strong"),e.EFF(2),e.k0s(),e.DNE(3,z,5,6,"span",11)(4,q,2,1,"span",11)(5,W,5,1,"span",11),e.k0s()),2&i){const t=r.$implicit,o=e.XpG(3);e.R7$(2),e.JRh(t.title),e.R7$(),e.Y8G("ngIf","SHIPPED"===(null==o.orderStatus||null==o.orderStatus.UserOrderStatus?null:o.orderStatus.UserOrderStatus.status)&&"Your device is on its way"===t.title),e.R7$(),e.Y8G("ngIf","SHIPPED"!==(null==o.orderStatus||null==o.orderStatus.UserOrderStatus?null:o.orderStatus.UserOrderStatus.status)||"Your device is on its way"!==t.title&&t.title!==o.setupVideoStepTitle),e.R7$(),e.Y8G("ngIf","SHIPPED"===(null==o.orderStatus||null==o.orderStatus.UserOrderStatus?null:o.orderStatus.UserOrderStatus.status)&&t.title===o.setupVideoStepTitle)}}function u(i,r){if(1&i&&(e.qex(0),e.j41(1,"div",15)(2,"ol"),e.DNE(3,J,6,4,"li",16),e.k0s()(),e.bVm()),2&i){const t=e.XpG(2);e.R7$(3),e.Y8G("ngForOf",t.cpapProcessOrder.shipmentText)}}function w(i,r){if(1&i&&(e.j41(0,"p")(1,"b"),e.EFF(2,"Click the link to download a PDF version of the quick start guide for your "),e.k0s(),e.j41(3,"a",19),e.EFF(4),e.k0s()()),2&i){const t=e.XpG(2);e.R7$(3),e.Y8G("href",null==t.cpapProcessOrder?null:t.cpapProcessOrder.pdfUrl,e.B4B),e.R7$(),e.SpI(" ",t.cpapProcessOrder.formattedCpapDeviceName," device. ")}}function p(i,r){1&i&&(e.j41(0,"p")(1,"b"),e.EFF(2,"Watch the video below to learn how to use your CPAP Machine"),e.k0s()())}function m(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",20),e.DNE(1,p,3,0,"p",11),e.j41(2,"div",21)(3,"div",22),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.videoPlay())}),e.nrm(4,"img",23),e.j41(5,"a",24),e.nrm(6,"img",25),e.k0s()()()()}if(2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",null==t.cpapProcessOrder?null:t.cpapProcessOrder.videoUrl),e.R7$(3),e.Y8G("src",null==t.cpapProcessOrder?null:t.cpapProcessOrder.thumbnail,e.B4B)}}function l(i,r){if(1&i&&(e.j41(0,"p"),e.EFF(1),e.j41(2,"a",17),e.EFF(3,"Track Your Shipment."),e.k0s()()),2&i){const t=e.XpG(2);e.R7$(),e.SpI(" ",null==t.cpapProcessOrder?null:t.cpapProcessOrder.lowerTrackShipment," "),e.R7$(),e.BMQ("href",t.trackUrl,e.B4B)}}function M(i,r){if(1&i&&(e.j41(0,"div",8),e.DNE(1,Y,2,1,"div",9)(2,X,1,1,"p",10)(3,u,4,1,"ng-container",11)(4,w,5,2,"p",11)(5,m,7,2,"div",12)(6,l,4,2,"p",11),e.k0s()),2&i){const t=e.XpG();e.Y8G("ngClass",null!=t.cpapProcessOrder&&null!=t.cpapProcessOrder.videoUrl&&t.cpapProcessOrder.videoUrl.length?"":"video-disappear"),e.R7$(),e.Y8G("ngIf",null==t.cpapProcessOrder?null:t.cpapProcessOrder.heading),e.R7$(),e.Y8G("ngIf",null==t.cpapProcessOrder?null:t.cpapProcessOrder.text),e.R7$(),e.Y8G("ngIf",t.cpapProcessOrder.shipmentText.length),e.R7$(),e.Y8G("ngIf",t.showDeviceTypePdf),e.R7$(),e.Y8G("ngIf",(null==t.cpapProcessOrder?null:t.cpapProcessOrder.videoUrl)&&"SHIPPED"!==(null==t.orderStatus||null==t.orderStatus.UserOrderStatus?null:t.orderStatus.UserOrderStatus.status)),e.R7$(),e.Y8G("ngIf",null==t.cpapProcessOrder?null:t.cpapProcessOrder.lowerTrackShipment)}}function I(i,r){if(1&i&&(e.j41(0,"div",13),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.SpI(" ",null==t.cpapProcessOrder?null:t.cpapProcessOrder.heading," ")}}function Q(i,r){if(1&i&&e.nrm(0,"p",27),2&i){const t=e.XpG(2);e.Y8G("innerHTML",null==t.cpapProcessOrder?null:t.cpapProcessOrder.text,e.npT)}}function se(i,r){if(1&i&&(e.qex(0),e.EFF(1),e.bVm()),2&i){const t=e.XpG().$implicit;e.R7$(),e.SpI("",t.title," ")}}function re(i,r){if(1&i&&(e.j41(0,"a",29),e.EFF(1),e.k0s()),2&i){const t=e.XpG(4);e.Y8G("href",t.supportCenterUrl,e.B4B),e.R7$(),e.JRh(t.supportCenterUrl)}}function ce(i,r){if(1&i&&(e.qex(0),e.EFF(1),e.bVm()),2&i){const t=e.XpG().$implicit;e.R7$(),e.JRh(t.title)}}function pe(i,r){if(1&i){const t=e.RV6();e.qex(0),e.EFF(1," Setup video available "),e.j41(2,"a",18),e.bIt("click",function(){e.eBV(t);const n=e.XpG(4);return e.Njj(n.videoPlay())}),e.EFF(3,"here"),e.k0s(),e.EFF(4," for your first night. "),e.bVm()}}function le(i,r){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(),e.JRh(t.description)}}function de(i,r){if(1&i&&(e.j41(0,"li")(1,"strong"),e.DNE(2,se,2,1,"ng-container",11)(3,re,2,2,"a",28)(4,ce,2,1,"ng-container",11)(5,pe,5,0,"ng-container",11),e.k0s(),e.DNE(6,le,2,1,"span",11),e.k0s()),2&i){const t=r.$implicit;e.R7$(2),e.Y8G("ngIf","More videos and help available at"===t.title||"Help available at"===t.title),e.R7$(),e.Y8G("ngIf","More videos and help available at"===t.title||"Help available at"===t.title),e.R7$(),e.Y8G("ngIf","More videos and help available at"!==t.title&&"Help available at"!==t.title&&"Setup video available here for your first night"!==t.title),e.R7$(),e.Y8G("ngIf","Setup video available here for your first night"===t.title),e.R7$(),e.Y8G("ngIf",t.description)}}function he(i,r){if(1&i&&(e.qex(0),e.j41(1,"div",15)(2,"ol"),e.DNE(3,de,7,5,"li",16),e.k0s()(),e.bVm()),2&i){const t=e.XpG(2);e.R7$(3),e.Y8G("ngForOf",t.cpapProcessOrder.shipmentText)}}function _e(i,r){if(1&i&&(e.j41(0,"p"),e.EFF(1),e.j41(2,"a",17),e.EFF(3,"Track Your Shipment."),e.k0s()()),2&i){const t=e.XpG(2);e.R7$(),e.SpI(" ",null==t.cpapProcessOrder?null:t.cpapProcessOrder.lowerTrackShipment," "),e.R7$(),e.BMQ("href",t.trackUrl,e.B4B)}}function me(i,r){if(1&i&&(e.j41(0,"div",8),e.DNE(1,I,2,1,"div",9)(2,Q,1,1,"p",26)(3,he,4,1,"ng-container",11)(4,_e,4,2,"p",11),e.k0s()),2&i){const t=e.XpG();e.Y8G("ngClass",null!=t.cpapProcessOrder&&null!=t.cpapProcessOrder.videoUrl&&t.cpapProcessOrder.videoUrl.length?"":"video-disappear"),e.R7$(),e.Y8G("ngIf",null==t.cpapProcessOrder?null:t.cpapProcessOrder.heading),e.R7$(),e.Y8G("ngIf",null==t.cpapProcessOrder?null:t.cpapProcessOrder.text),e.R7$(),e.Y8G("ngIf",t.cpapProcessOrder.shipmentText.length),e.R7$(),e.Y8G("ngIf",null==t.cpapProcessOrder?null:t.cpapProcessOrder.lowerTrackShipment)}}function ue(i,r){1&i&&(e.qex(0),e.j41(1,"section",30)(2,"p",31),e.EFF(3,"If Night One Is Hard"),e.k0s(),e.j41(4,"p")(5,"strong"),e.EFF(6,"That's normal \u2014 not failure."),e.k0s(),e.nrm(7,"br"),e.EFF(8," Nights 1\u20133 take getting used to. Take a break, try again. Your coach will help you adjust."),e.k0s()(),e.bVm())}function ge(i,r){if(1&i){const t=e.RV6();e.j41(0,"section",30)(1,"p",31),e.EFF(2,"If Night One Is Hard"),e.k0s(),e.j41(3,"p")(4,"strong"),e.EFF(5,"That's normal \u2014 not failure."),e.k0s(),e.nrm(6,"br"),e.EFF(7," It\u2019s normal to find that the first night is hard. If you want to talk with a coach to help you through setup or answer your questions, you can "),e.j41(8,"a",32),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.openCoachAppt())}),e.EFF(9,"click here"),e.k0s(),e.EFF(10," to schedule a free online appointment. "),e.k0s()()}}function fe(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",33)(1,"bn-control-footer",34),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.submit())}),e.k0s()()}if(2&i){const t=e.XpG();e.R7$(),e.FS9("primaryActionText",t.actionLabelText)}}let Ce=(()=>{class i{constructor(t,o,n,a){this.apiService=t,this.dataService=o,this.navService=n,this.router=a,this.isHideCpapInfo=new e.bkB,this.cardTitle=new e.bkB,this.isFooterHide=new e.bkB,this.actionLabel=new e.bkB,this.valid=new e.bkB,this.playVideo=!1,this.showDeviceTypePdf=!1,this.setupVideoStepTitle="Setup videos available by text or online",this.supportCenterUrl="https://www.support.betternight.com",this.cpapProcessOrder={heading:"",text:"",shipmentText:[],trackShipment:"",trackOrder:"",lowerTrackShipment:"",videoUrl:"",thumbnail:"",pdfUrl:"",formattedCpapDeviceName:""},this.therapyDelivered=!1,this.innerWidth=window.innerWidth,this.actionLabelText="Continue",this.hstCpapHoldText={INVENTORY:"Your shipment from BetterNight has been put on hold due to a backorder on the device prescribed.",RESHIPMENT:"We have identified that we will need you to retake your home sleep test. We will be calling you to confirm your shipping address and timing for the reshipment and discuss any questions you may have about the need for the retest.",PICKUP:"Per your request, your shipment from BetterNight has been put on hold so that you can pick up your device in our office. This message will update once your device has been picked up.",PENDING_ORDER:"Your shipment from BetterNight has been put on hold while we are obtaining required documentation. This message will update once your device has been shipped.",PATIENT_REQUEST:"Per your request, your shipment from BetterNight has been put on hold. This message will update once your device has been shipped on the agreed upon date.",Z_OTHER:"Your shipment from BetterNight has been put on hold.",SCHEDULING:"Your shipment from BetterNight has been put on hold while we try to contact you to confirm final details before shipment.",PHARMACIST_IN_CHARGE:"Your shipment from BetterNight has been put on hold because your state requires a pharmacist to review your prescription for all DME (durable medical equipment) orders before they can be shipped. We will take care of obtaining this for you. This often takes two business days to obtain, and typically is not something that is difficult to get approval for."}}ngOnInit(){this.cardTitle.emit({cardKey:this.router.url,value:"WHAT\u2019S NEXT"}),this.isHideCpapInfo.emit(!1),this.updateFooterVisibility(),this.getOrderStatus()}onResize(t){this.innerWidth=t.target.innerWidth,this.updateFooterVisibility()}setVideoAndImage(t){switch(t){case"resmed":this.cpapProcessOrder.thumbnail="assets/airsense-10.png",this.cpapProcessOrder.formattedCpapDeviceName="Resmed",this.getUserMaskType();break;case"resmed_airsense_11":this.cpapProcessOrder.thumbnail="assets/airsense-11.png",this.cpapProcessOrder.videoUrl="assets/videos/AirSense11_Using_your_AirSense_11_Vid.mp4",this.cpapProcessOrder.formattedCpapDeviceName="Resmed Airsense 11";break;case"philips_dreamstation_2":this.cpapPro
1cessOrder.thumbnail="assets/img/dreamstation-2.png",this.cpapProcessOrder.videoUrl="assets/videos/Philips_DreamStation_2_CPAP_Setup_and_Use.mp4",this.cpapProcessOrder.formattedCpapDeviceName=t;break;case"philips_dreamstation_1":this.cpapProcessOrder.thumbnail="assets/img/dreamstation-1.png",this.cpapProcessOrder.videoUrl="assets/videos/philipsold.mp4",this.cpapProcessOrder.formattedCpapDeviceName=t;break;case"3B_luna_II":this.cpapProcessOrder.thumbnail="assets/img/3B Luna II Thumbnail.jpg",this.cpapProcessOrder.videoUrl="assets/videos/3B Luna II Video.mp4",this.cpapProcessOrder.formattedCpapDeviceName="React Health Luna II";break;case"3B_G3":this.cpapProcessOrder.thumbnail="assets/img/G3 Thumbnail.png",this.cpapProcessOrder.videoUrl="assets/videos/G3 Video.mp4",this.showDeviceTypePdf=!1,this.cpapProcessOrder.pdfUrl="assets/pdf/3B_Luna_G3.pdf",this.cpapProcessOrder.formattedCpapDeviceName="React Health Luna G3";break;case"resvent_ibreeze":this.cpapProcessOrder.thumbnail="assets/Resvent_Video_Thumbnail.jpg",this.cpapProcessOrder.videoUrl="assets/videos/Resvent-video.mp4",this.cpapProcessOrder.formattedCpapDeviceName="Resvent iBreeze"}}getOrderStatus(){this.apiService.getApi(this.dataService.serverAddress+"service/v1/order?type=cpap").subscribe(o=>{this.orderStatus=JSON.parse(JSON.stringify(o));const{User:{UserState:{code:n},PatientInfos:a},UserOrderStatus:c}=this.orderStatus;"THERAPY_DELIVERED"==n&&(this.valid.emit(!0),this.router.navigateByUrl("cpap/cpap-delivered"),this.therapyDelivered=!0),this.updateFooterVisibility(),this.setTextOnUi(c.status,n,a&&a.ShippingHoldReasons?a.ShippingHoldReasons.code:null)})}updateFooterVisibility(){this.isFooterHide.emit(!this.therapyDelivered||this.innerWidth<768)}setTextOnUi(t,o,n){switch(this.cpapProcessOrder.shipmentText=[],this.cpapProcessOrder.trackShipment="",t){case"PROCESSING":case"PENDING":case"SKIP_PAYMENT":if(this.cpapProcessOrder.heading="Order Processing",this.navService.currentPage[1]="PROCESSING","CPAP_SHIP_HOLD"==o&&n)return this.cpapProcessOrder.text=this.hstCpapHoldText[n],this.cpapProcessOrder.heading="Shipping Hold",void(this.navService.currentPage[1]="HOLD");this.cpapProcessOrder.heading="Here\u2019s what to expect",this.cpapProcessOrder.text="",this.trackUrl=this.orderStatus?.tracker?.trackurl,this.cpapProcessOrder.trackOrder="",this.cpapProcessOrder.shipmentText=[{title:"Your device is on its way",description:"This page will update with tracking info as soon as it ships."},...this.isNotBiLevelOrOther()?[{title:this.setupVideoStepTitle,description:"Short videos walk you through unboxing, mask fitting, and your first night."}]:[],{title:"Your first night",description:"Set up the device, put on the mask, and sleep. Watch the videos as you go."},{title:"We will check in",description:"You can also reach out anytime through text or a phone call."}];break;case"SHIPPED":this.cpapProcessOrder.heading="Here\u2019s what to expect",this.trackUrl=this.orderStatus?.tracker?.trackurl,this.navService.currentPage[1]="SHIPPING",this.cpapProcessOrder.trackOrder="Track your shipment.",this.cpapProcessOrder.shipmentText=[{title:"Your device is on its way",description:"Track your shipment."},...this.isNotBiLevelOrOther()?[{title:this.setupVideoStepTitle,description:"Short videos walk you through unboxing, mask fitting, and your first night."}]:[],{title:"Your first night",description:"Set up the device, put on the mask, and sleep. Watch the videos as you go."},{title:"We will check in",description:"You can also reach out anytime through text or a phone call."}],1==this.dataService.currentUserInfo.therapyDeviceTypeId&&this.setVideoAndImage(this.dataService.currentUserInfo.cpapDeviceType);break;case"DELIVERED":this.cpapProcessOrder.heading="Your Therapy Device",this.trackUrl=this.orderStatus.tracker.trackurl,this.navService.currentPage[1]="NEXT STEPS",this.cpapProcessOrder.shipmentText=[...this.isNotBiLevelOrOther()?[{title:"Setup video available here for your first night",description:""}]:[],...this.isNotBiLevelOrOther()?[{title:"More videos and help available at",description:""}]:[{title:"Help available at",description:""}],{title:"Your first night",description:"Set up the device, put on the mask, and sleep."}],this.setVideoAndImage(this.dataService.currentUserInfo.cpapDeviceType)}}isNotBiLevelOrOther(){return"other"!==this.dataService.currentUserInfo.cpapDeviceType&&1===this.dataService.currentUserInfo.therapyDeviceTypeId}openCoachAppt(){window.open(`${this.dataService.currentUserInfo.shortioDomain}/cRaF9P`,"_blank")}getUserMaskType(){this.apiService.getApi(this.dataService.serverAddress+"service/v1/cpap/user-mask-type/"+this.dataService.currentUserInfo.userId).subscribe(o=>{switch(this.resultMask=JSON.parse(JSON.stringify(o)),this.resultMask.data.mask_type){case"f20":this.cpapProcessOrder.videoUrl="assets/videos/ResMed_F20_Final.mp4";break;case"n20":this.cpapProcessOrder.videoUrl="assets/videos/ResMed_N20_Finals_1.mp4";break;case"p10":this.cpapProcessOrder.videoUrl="assets/videos/ResMed_P10_Final_1.mp4"}})}videoPlay(){this.navService.showModalOnClick=!0,this.playVideo=!0}closeVideo(t){this.playVideo=t}submit(){this.router.navigateByUrl("cpap/therapy-maintenance")}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(k.G),e.rXU(O.u),e.rXU(S.o),e.rXU(y.Ix))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["bn-cpapprocessorder"]],hostBindings:function(o,n){1&o&&e.bIt("resize",function(c){return n.onResize(c)},!1,e.tSv)},outputs:{isHideCpapInfo:"isHideCpapInfo",cardTitle:"cardTitle",isFooterHide:"isFooterHide",actionLabel:"actionLabel",valid:"valid"},decls:15,vars:6,consts:[["therapyDeliveredTemplate",""],[3,"videoUrl","closeModel",4,"ngIf"],["class","cpap-delivery-section",3,"ngClass",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"pre-shipment-contact"],["href","tel:8668019440"],["class","footer-controlled",4,"ngIf"],[3,"closeModel","videoUrl"],[1,"cpap-delivery-section",3,"ngClass"],["class","title",4,"ngIf"],["class","process-order-text",3,"innerHTML",4,"ngIf"],[4,"ngIf"],["class","video-box","id","video-container",4,"ngIf"],[1,"title"],[1,"process-order-text",3,"innerHTML"],[1,"pre-shipment-steps"],[4,"ngFor","ngForOf"],["target","_blank",1,"link"],["href","javascript:void(0)",1,"link",3,"click"],["target","_blank","download","",1,"link",3,"href"],["id","video-container",1,"video-box"],[1,"video"],["id","video-overlay",1,"thumbnail",3,"click"],["alt","",1,"img-responsive",3,"src"],["href","javascript:void(0)",1,"btn-play"],["src","../../../assets/video-play.png","alt",""],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"],["target","_blank","rel","noopener noreferrer","class","link",3,"href",4,"ngIf"],["target","_blank","rel","noopener noreferrer",1,"link",3,"href"],[1,"first-night"],[1,"first-night-title"],[1,"link",3,"click"],[1,"footer-controlled"],["id","action",3,"click","primaryActionText"]],template:function(o,n){if(1&o&&(e.j41(0,"div"),e.DNE(1,L,1,1,"bn-popup-modal",1)(2,M,7,7,"div",2)(3,me,5,5,"div",2)(4,ue,9,0,"ng-container",3)(5,ge,11,0,"ng-template",null,0,e.C5r),e.j41(7,"div",4)(8,"p"),e.EFF(9,"Have questions? "),e.j41(10,"span"),e.EFF(11,"Call us at "),e.j41(12,"a",5),e.EFF(13,"1-866-801-9440 "),e.k0s()()()(),e.DNE(14,fe,2,1,"div",6),e.k0s()),2&o){const a=e.sdS(6);e.R7$(),e.Y8G("ngIf",n.playVideo),e.R7$(),e.Y8G("ngIf",!n.therapyDelivered),e.R7$(),e.Y8G("ngIf",n.therapyDelivered),e.R7$(),e.Y8G("ngIf",!n.therapyDelivered)("ngIfElse",a),e.R7$(10),e.Y8G("ngIf",n.therapyDelivered)}},dependencies:[b.YU,b.Sq,b.bT,R.u,j.n,b.vh],styles:['[_ngcontent-%COMP%]:root{--primary-color: "";--secondary-color: "";--dark-secondary-color: "";--welcome-column-header: "";--foreground: "";--alt-foreground: "";--error-color: "";--primary-text-color: "";--secondary-text-color: "";--dark-secondary-text-color: "";--sleep-risk-text: "";--header-background: "";--primary-gradient: "";--footer-background: ""}[_nghost-%COMP%]{display:flex;background:#fff;min-height:100%;flex-direction:column}@media (max-width: 767px){[_nghost-%COMP%]{padding:0}}[_nghost-%COMP%]   .wrapper[_ngcontent-%COMP%]{padding:0;flex:1;overflow:auto;background-color:#fff}@media (max-width: 767px){[_nghost-%COMP%]   .title[_ngcontent-%COMP%]{font-size:26px;font-weight:700;text-align:center}}[_nghost-%COMP%]   .cpap-delivery-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:20px}[_nghost-%COMP%]   .cpap-delivery-section.video-disappear[_ngcontent-%COMP%]{flex:0}@media (max-width: 767px){[_nghost-%COMP%]   .cpap-delivery-section[_ngcontent-%COMP%]{padding:0}}[_nghost-%COMP%]   .icon-list[_ngcontent-%COMP%]{display:flex;align-items:center}[_nghost-%COMP%]   .icon-list[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-right:10px}[_nghost-%COMP%]   .active[_ngcontent-%COMP%]{color:var(--primary-text-color)}[_nghost-%COMP%]   .steps-list[_ngcontent-%COMP%]{display:flex;margin-top:2.5em}@media (max-width: 767px){[_nghost-%COMP%]   .steps-list[_ngcontent-%COMP%]{flex-wrap:wrap;margin-top:1.5em}}
1[_nghost-%COMP%]   .top-space[_ngcontent-%COMP%]{margin-top:2.5em}@media (max-width: 767px){[_nghost-%COMP%]   .top-space[_ngcontent-%COMP%]{margin-top:1.5em}}[_nghost-%COMP%]   ol[_ngcontent-%COMP%]{margin-top:0;padding-left:1.5em;padding-right:1.5em}[_nghost-%COMP%]   .video-box[_ngcontent-%COMP%]{margin:0 auto;width:-moz-fit-content;width:fit-content}[_nghost-%COMP%]   .video-box[_ngcontent-%COMP%]   .video[_ngcontent-%COMP%]{max-width:518px;padding:0;min-height:auto;overflow:hidden}[_nghost-%COMP%]   .video-box[_ngcontent-%COMP%]   .thumbnail[_ngcontent-%COMP%]{height:auto;cursor:pointer}[_nghost-%COMP%]   .para[_ngcontent-%COMP%]{margin:0 12px;text-align:center;line-height:150%;font-size:.8em}[_nghost-%COMP%]   .shipped-desclimer-container[_ngcontent-%COMP%]   p.para[_ngcontent-%COMP%]{margin:0 auto;width:515px}@media (max-width: 991px){[_nghost-%COMP%]   .shipped-desclimer-container[_ngcontent-%COMP%]   p.para[_ngcontent-%COMP%]{width:100%!important}}[_nghost-%COMP%]   .process-order-text[_ngcontent-%COMP%]{font-size:14px;line-height:20px;color:#000}@media (max-width: 991px){[_nghost-%COMP%]   .process-order-text[_ngcontent-%COMP%]{font-size:16px;line-height:22px;text-align:center}}.hide-icon[_ngcontent-%COMP%], .footer-controlled[_ngcontent-%COMP%]{display:none}.footer-controlled[_ngcontent-%COMP%]     bn-control-footer{padding:20px 0 0!important}@media (max-width: 767px){.footer-controlled[_ngcontent-%COMP%]{display:block}}.first-night[_ngcontent-%COMP%]{margin:28px 0 0;padding:20px}@media (max-width: 767px){.first-night[_ngcontent-%COMP%]{text-align:center;padding:20px;margin:28px -20px 0;background:var(--foreground)}}.first-night[_ngcontent-%COMP%]   .first-night-title[_ngcontent-%COMP%]{margin:0 0 12px;color:var(--secondary-text-color);font-size:16px;font-weight:500}@media (max-width: 767px){.first-night[_ngcontent-%COMP%]   .first-night-title[_ngcontent-%COMP%]{font-size:20px;font-weight:700}}.first-night[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#000;margin:0;font-size:14px;line-height:20px}@media (max-width: 991px){.first-night[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:16px;line-height:22px}}.pre-shipment-contact[_ngcontent-%COMP%]{padding:22px 20px 10px;font-size:14px;line-height:20px;align-self:flex-start}@media (max-width: 991px){.pre-shipment-contact[_ngcontent-%COMP%]{font-size:16px;line-height:22px}}@media (max-width: 767px){.pre-shipment-contact[_ngcontent-%COMP%]{margin-top:0;align-self:auto;text-align:center}.pre-shipment-contact[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:block}}.pre-shipment-contact[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#000;margin:0 0 5px}.pre-shipment-contact[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:var(--primary-text-color);font-weight:700}.pre-shipment-contact[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--primary-text-color);text-decoration:none}.pre-shipment-ready[_ngcontent-%COMP%]{display:block;width:100%;margin-top:20px;padding:13px 12px;border:0;border-radius:9px;background:linear-gradient(#f7931d,#f15a24);color:#fff;font:inherit;font-weight:700;cursor:pointer}.pre-shipment-ready[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--secondary-text-color);outline-offset:3px}.pre-shipment-steps[_ngcontent-%COMP%]{font-size:14px;color:#000;margin-top:20px;line-height:20px}@media (max-width: 991px){.pre-shipment-steps[_ngcontent-%COMP%]{font-size:16px;line-height:22px}}.pre-shipment-steps[_ngcontent-%COMP%]   ol[_ngcontent-%COMP%]{margin:0;padding:0;list-style:none;counter-reset:shipment-step}.pre-shipment-steps[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{position:relative;min-height:26px;margin-bottom:20px;padding-left:40px;counter-increment:shipment-step}.pre-shipment-steps[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:last-child{margin-bottom:0}.pre-shipment-steps[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:before{content:counter(shipment-step);position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:29px;height:29px;border-radius:50%;background:var(--secondary-text-color);color:#fff}.pre-shipment-steps[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%], .pre-shipment-steps[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:block}']})}return i})();var F=_(467),P=_(9417);function Me(i,r){1&i&&(e.j41(0,"h4",13),e.EFF(1," There is information that must be completed. "),e.k0s())}function Pe(i,r){if(1&i){const t=e.RV6();e.j41(0,"label",14)(1,"input",15),e.bIt("change",function(n){const a=e.eBV(t).$implicit,c=e.XpG();return e.Njj(c.onToggle(a,n))}),e.k0s(),e.nrm(2,"span",16),e.j41(3,"div",17)(4,"b"),e.EFF(5),e.k0s()()()}if(2&i){const t=r.$implicit;e.R7$(),e.Y8G("checked",t.status),e.R7$(4),e.JRh(t.label)}}function be(i,r){1&i&&(e.j41(0,"div")(1,"p",18),e.EFF(2," There was an unexpected error. Please call us at "),e.j41(3,"a",19),e.EFF(4," 1-866-801-9440 "),e.k0s(),e.EFF(5," so we can troubleshoot. "),e.k0s()())}let ve=(()=>{class i{constructor(t,o,n,a,c){this.dataService=t,this.apiService=o,this.router=n,this.errorHandler=a,this.fb=c,this.serverError="",this.isShowSpinner=new e.bkB,this.isHideCpapInfo=new e.bkB,this.valid=new e.bkB,this.cardTitle=new e.bkB,this.title="Sound Familiar?",this.description="With __INTERRUPTIONS__ interruptions during 8 hours of sleep, many patients notice these. What about you?",this.reasons=[{id:1,t
1ype:"tired",label:"Waking up tired even after 8 hours",status:!1},{id:2,type:"energyCrash",label:"Afternoon energy crash",status:!1},{id:3,type:"troubleFocusing",label:"Trouble focusing or remembering",status:!1},{id:4,type:"frequentWaking",label:"Waking up often throughout the night",status:!1},{id:5,type:"noneOfTheAbove",label:"None of the above",status:!1}],this.showRedirectionError=!1,this.innerWidth=window.innerWidth,this.actionLabelText="Continue",this.formSubmitted=!1,this.actionLabel=new e.bkB,this.isFooterHide=new e.bkB}ngOnInit(){this.cardTitle.emit({cardKey:this.router.url,value:"Your Reasons"}),this.isHideCpapInfo.emit(!1),window.innerWidth<768?this.isFooterHide.emit(!0):this.isFooterHide.emit(!1),this.isShowSpinner.emit(!1),this.isValid(),this.getAHIValue(),this.getTherapyReasons()}onResize(t){const o=t.target;this.innerWidth=o.innerWidth,this.isFooterHide.emit(o.innerWidth<768)}onToggle(t,o){const n=o.target.checked;if(t.status=n,"noneOfTheAbove"===t.type&&n)this.reasons.forEach(a=>{"noneOfTheAbove"!==a.type&&(a.status=!1)});else if("noneOfTheAbove"!==t.type&&n){const a=this.reasons.find(c=>"noneOfTheAbove"===c.type);a&&(a.status=!1)}this.isValid()}isValid(){this.valid.emit(!0)}isFormValid(){return this.reasons.some(t=>t.status)}getAHIValue(){this.isShowSpinner.emit(!0),this.apiService.getApi(this.dataService.serverAddress+`service/v1/hst/patient/${this.dataService.currentUserInfo.userId}`).subscribe(o=>{const n=JSON.parse(JSON.stringify(o));let a=null;if(n?.ahiNumber){const c=+parseFloat(n.ahiNumber).toFixed(1);!isNaN(c)&&c>0&&(a=Math.round(8*c).toLocaleString())}this.description&&this.description.indexOf("__INTERRUPTIONS__")>-1&&(this.description=this.description.replace("__INTERRUPTIONS__",a||"many")),this.isShowSpinner.emit(!1)})}getTherapyReasons(){const{userId:t}=this.dataService.currentUserInfo;this.apiService.getApi(this.dataService.serverAddress+`service/v1/cpap/therapy-reasons/${t}`).subscribe(n=>{const a=JSON.parse(JSON.stringify(n));if(a&&a.data){let c=null,d=null;this.reasons.forEach(h=>{d=h.type,"noneOfTheAbove"===d&&(d="noOptionSelected"),a.data.hasOwnProperty(d)&&(c=a.data[d],h.status="none of the above"===c||c)})}})}submit(){var t=this;return(0,F.A)(function*(){if(t.formSubmitted=!0,!t.isFormValid())return;const o=t.reasons.filter(n=>n.status).map(n=>({[n.type]:n.status}));try{t.isShowSpinner.emit(!0);const{userId:n}=t.dataService.currentUserInfo,a=Object.assign({},...o);t.apiService.postApi(t.dataService.serverAddress+`service/v1/cpap/therapy-reasons/${n}`,a).subscribe(d=>{const h=JSON.parse(JSON.stringify(d));h&&h.data?.id>0?(t.isShowSpinner.emit(!1),t.router.navigateByUrl("cpap/support-information")):(t.isShowSpinner.emit(!1),t.serverError=h.message||"An error occurred.",t.showRedirectionError=!0)})}catch(n){t.isShowSpinner.emit(!1),t.serverError=n}})()}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(O.u),e.rXU(k.G),e.rXU(y.Ix),e.rXU(e.zcH),e.rXU(P.ze))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["bn-cpap-reasons"]],hostBindings:function(o,n){1&o&&e.bIt("resize",function(c){return n.onResize(c)},!1,e.tSv)},outputs:{isShowSpinner:"isShowSpinner",isHideCpapInfo:"isHideCpapInfo",valid:"valid",cardTitle:"cardTitle",actionLabel:"actionLabel",isFooterHide:"isFooterHide"},decls:15,vars:10,consts:[[1,"wrapper","without-padding",2,"flex","1"],[1,"wait-header"],[1,"title"],[1,"center"],["class","error-text validation-message",4,"ngIf"],[1,"lead"],[1,"main-content"],[1,"wait-card"],[1,"reasons-list"],["class","reason-item",4,"ngFor","ngForOf"],[1,"footer-controlled"],["id","action",3,"click","primaryActionText"],[4,"ngIf"],[1,"error-text","validation-message"],[1,"reason-item"],["type","checkbox",3,"change","checked"],["aria-hidden","true",1,"checkbox-box"],[1,"reason-text"],[1,"error-message"],["href","tel:1-866-801-9440",1,"link"]],template:function(o,n){1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2),e.EFF(3),e.k0s(),e.j41(4,"div",3),e.DNE(5,Me,2,0,"h4",4),e.k0s(),e.j41(6,"p",5),e.EFF(7),e.k0s()(),e.j41(8,"div",6)(9,"div",7)(10,"div",8),e.DNE(11,Pe,6,2,"label",9),e.k0s()()(),e.j41(12,"div",10)(13,"bn-control-footer",11),e.bIt("click",function(){return n.submit()}),e.k0s()(),e.DNE(14,be,6,0,"div",12),e.k0s()),2&o&&(e.R7$(3),e.JRh(n.title),e.R7$(2),e.Y8G("ngIf",n.formSubmitted&&!n.isFormValid()),e.R7$(),e.AVh("error-text",n.formSubmitted&&!n.isFormValid()),e.R7$(),e.SpI(" ",n.description," "),e.R7$(3),e.AVh("error-field",n.formSubmitted&&!n.isFormValid()),e.R7$(),e.Y8G("ngForOf",n.reasons),e.R7$(2),e.FS9("primaryActionText",n.actionLabelText),e.R7$(),e.Y8G("ngIf",n.showRedirectionError))},dependencies:[b.Sq,b.bT,R.u],styles:['[_ngcontent-%COMP%]:root{--primary-color: "";--secondary-color: "";--dark-secondary-color: "";--welcome-column-header: "";--foreground: "";--alt-foreground: "";--error-color: "";--primary-text-color: "";--secondary-text-color: "";--dark-secondary-text-color: "";--sleep-risk-text: "";--header-background: "";--primary-gradient: "";--footer-background: ""}[_nghost-%COMP%]{display:flex;flex-direction:column;min-height:100%;color:var(--dark-secondary-text-color);font-weight:400}[_nghost-%COMP%]   a[_ngcontent-%COMP%]{font-weight:700}@media (max-width: 991px){[_nghost-%COMP%]{min-height:calc(100% - 50px)}}@media (max-width: 767px){[_nghost-%COMP%]{padding:0;min-height:auto}}[_nghost-%COMP%]   button[_ngcontent-%COMP%]{width:180px;height:28px}[_nghost-%COMP%]   .wrapper[_ngcontent-%COMP%]{padding:0;flex:1;overflow:auto;background-color:#fff}@media (max-width: 991px){[_nghost-%COMP%]   .wrapper[_ngcontent-%COMP%]{padding:30px 0}}@media (max-width: 767px){[_nghost-%COMP%]   .wrapper[_ngcontent-%COMP%]{padding:30px 15px 15px;background:var(--foreground)}}@media (max-width: 767px){[_nghost-%COMP%]   .wrapper[_ngcontent-%COMP%]{padding:0}[_nghost-%COMP%]   .wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{color:var(--secondary-text-color)}}[_nghost-%COMP%]   .wait-header[_ngcontent-%COMP%]{text-align:center;padding:28px 18px 0}[_nghost-%COMP%]   .wait-header[_ngcontent-%COMP%]   .validation-message[_ngcontent-%COMP%]{font-size:18px;margin:10 0 10px}@media (max-width: 767px){[_nghost-%COMP%]   .wait-header[_ngcontent-%COMP%]{background:var(--foreground);padding:28px 18px 0}}@media (max-width: 767px) and (max-width: 767px){[_nghost-%COMP%]   .wait-header[_ngcontent-%COMP%]   .lead[_ngcontent-%COMP%]{margin-bottom:0}}[_nghost-%COMP%]   .wait-header[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:26px;font-weight:700;text-align:center;color:var(--secondary-text-color)}[_nghost-%COMP%]   .wait-header[_ngcontent-%COMP%]   .lead[_ngcontent-%COMP%]{margin-top:16px;text-align:center;font-size:16px;font-weight:700;color:var(--dark-secondary-text-color);max-width:520px;margin-left:auto;margin-right:auto}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]{background:var(--foreground);position:relative;margin:0 20px 20px;padding:10px 0 18px}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:after, [_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:before{display:none!important}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   form[_ngcontent-%COMP%]{max-width:565px;margin:0 auto;text-align:left}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .wait-card[_ngcontent-%COMP%]{max-width:640px;margin:0 auto 10px}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .wait-card[_ngcontent-%COMP%]   .reasons-list[_ngcontent-%COMP%]{margin-top:18px;display:flex;flex-direction:column;gap:12px}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .wait-card[_ngcontent-%COMP%]   .reasons-list.error-field[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]{border-color:#d32f2f}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .wait-card[_ngcontent-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]{display:flex;align-items:center;background:#fff;border-radius:12px;padding:10px 12px;border:2px solid #b7b7b7}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .wait-card[_ngcontent-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%]{position:absolute;opacity:0;width:18px;height:18px}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .wait-card[_ngcontent-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   .checkbox-box[_ngcontent-%COMP%]{width:22px;height:22px;border-radius:8px;border:2px solid #b7b7b7;background:#fff;margin-right:14px;display:inline-block;box-sizing:border-box;position:relative;flex:0 0 auto}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .wait-card[_ngcontent-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   .checkbox-box[_ngcontent-%COMP%]:after{content:"";position:absolute;
1left:5px;top:1px;width:6px;height:11px;border:solid transparent;border-width:0 2px 2px 0;transform:rotate(45deg);display:none}@media (max-width: 767px){[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .wait-card[_ngcontent-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   .checkbox-box[_ngcontent-%COMP%]:after{left:5px}}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .wait-card[_ngcontent-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%]:checked + .checkbox-box[_ngcontent-%COMP%]{border-color:#12a65a;background:#fff}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .wait-card[_ngcontent-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%]:checked + .checkbox-box[_ngcontent-%COMP%]:after{display:block;border-color:#12a65a}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .wait-card[_ngcontent-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   .reason-text[_ngcontent-%COMP%]{font-size:14px;color:var(--dark-secondary-text-color)}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .wait-card[_ngcontent-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   .reason-text[_ngcontent-%COMP%]   b[_ngcontent-%COMP%]{font-weight:400}@media (max-width: 767px){[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .wait-card[_ngcontent-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   .reason-text[_ngcontent-%COMP%]{font-size:16px}}@media (max-width: 767px){[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]{border-top:none;margin:0;padding:5px 18px 10px}}[_nghost-%COMP%]   .footer-controlled[_ngcontent-%COMP%]{display:none}@media (max-width: 767px){[_nghost-%COMP%]   .footer-controlled[_ngcontent-%COMP%]{display:block;background:var(--foreground)}}[_nghost-%COMP%]   .error-message[_ngcontent-%COMP%]{font-size:14px;text-align:center}@media (max-width: 767px){[_nghost-%COMP%]   .error-message[_ngcontent-%COMP%]{padding:0 8px}}button[_ngcontent-%COMP%]:disabled{pointer-events:auto}button[_ngcontent-%COMP%]:not(.selected){background:#bbbcbe}']})}return i})();const Z=()=>[];function ye(i,r){1&i&&(e.j41(0,"h4",16),e.EFF(1," There is information that must be completed. "),e.k0s())}function Oe(i,r){if(1&i){const t=e.RV6();e.j41(0,"button",24),e.bIt("click",function(){const n=e.eBV(t).$implicit,a=e.XpG(3).$implicit,c=e.XpG();return e.Njj(c.selectAnswer(a,n))}),e.EFF(1),e.k0s()}if(2&i){const t=r.$implicit,o=e.XpG(3).$implicit,n=e.XpG();e.AVh("selected",n.isAnswerSelected(o,t)),e.R7$(),e.SpI(" ",t.text," ")}}function ke(i,r){if(1&i&&(e.j41(0,"div",22),e.DNE(1,Oe,2,3,"button",23),e.k0s()),2&i){const t=e.XpG(2).$implicit,o=e.XpG();e.AVh("error-field",o.formSubmitted&&!t.selectedAnswer),e.R7$(),e.Y8G("ngForOf",t.answers)}}function xe(i,r){if(1&i){const t=e.RV6();e.j41(0,"label",27)(1,"input",28),e.bIt("change",function(){const n=e.eBV(t).$implicit,a=e.XpG(3).$implicit,c=e.XpG();return e.Njj(c.toggleCheckbox(a,n))}),e.k0s(),e.nrm(2,"span",29),e.j41(3,"div",30),e.EFF(4),e.k0s()()}if(2&i){const t=r.$implicit,o=e.XpG(3).$implicit,n=e.XpG();e.R7$(),e.Y8G("checked",n.isAnswerSelected(o,t)),e.R7$(3),e.SpI(" ",t.text," ")}}function we(i,r){if(1&i&&(e.j41(0,"div",25),e.DNE(1,xe,5,2,"label",26),e.k0s()),2&i){const t=e.XpG(2).$implicit,o=e.XpG();e.AVh("error-field",o.formSubmitted&&!(t.selectedAnswers||e.lJ4(3,Z)).length),e.R7$(),e.Y8G("ngForOf",t.answers)}}function Se(i,r){if(1&i&&(e.j41(0,"div",18)(1,"label",19),e.EFF(2),e.k0s(),e.DNE(3,ke,2,3,"div",20)(4,we,2,4,"div",21),e.k0s()),2&i){const t=e.XpG().$implicit,o=e.XpG();e.R7$(),e.AVh("error-text",o.formSubmitted&&("button"===t.type&&!t.selectedAnswer||"checkbox"===t.type&&!(t.selectedAnswers||e.lJ4(5,Z)).length)),e.R7$(),e.SpI(" ",t.prompt," "),e.R7$(),e.Y8G("ngIf","button"===t.type),e.R7$(),e.Y8G("ngIf","checkbox"===t.type)}}function Te(i,r){if(1&i&&(e.qex(0),e.DNE(1,Se,5,6,"div",17),e.bVm()),2&i){const t=r.$implicit,o=e.XpG();e.R7$(),e.Y8G("ngIf",o.isQuestionVisible(t))}}function Ie(i,r){1&i&&(e.j41(0,"div")(1,"p",31),e.EFF(2," There was an unexpected error. Please call us at "),e.j41(3,"a",32),e.EFF(4," 1-866-801-9440 "),e.k0s(),e.EFF(5," so we can troubleshoot. "),e.k0s()())}let Fe=(()=>{class i{constructor(t,o,n,a,c){this.dataService=t,this.apiService=o,this.router=n,this.errorHandler=a,this.fb=c,this.serverError="",this.isShowSpinner=new e.bkB,this.isHideCpapInfo=new e.bkB,this.valid=new e.bkB,this.cardTitle=new e.bkB,this.actionLabel=new e.bkB,this.isFooterHide=new e.bkB,this.title="Help us tailor your support",this.subtitle="Your answers help us tailor your education content and prepare the right support for you.",this.questions=[{id:"claustrophobia",prompt:"Do tight space
1s or covered faces make you uncomfortable?",type:"button",selectedAnswer:null,answers:[{text:"Not really",value:"no"},{text:"Sometimes",value:"sometimes"},{text:"Yes, often",value:"yes"}]},{id:"insomnia",prompt:"Do you have trouble falling or staying asleep, even on good nights?",type:"button",selectedAnswer:null,answers:[{text:"Not really",value:"no"},{text:"Sometimes",value:"sometimes"},{text:"Most nights",value:"yes"}]},{id:"restart",prompt:"Have you tried CPAP therapy before but stopped?",type:"button",selectedAnswer:null,answers:[{text:"First time",value:"false"},{text:"Tried before",value:"true"}]},{id:"cpapReasons",prompt:"If you have tried CPAP therapy before, why didn't it work last time?",type:"checkbox",selectedAnswers:[],answers:[{text:"Mask was uncomfortable",value:"failedMask"},{text:"Felt claustrophobic",value:"failedClaustrophobia"},{text:"Air pressure was too much",value:"failedPressure"},{text:"Other",value:"other"}]}],this.showRedirectionError=!1,this.innerWidth=window.innerWidth,this.actionLabelText="Continue",this.formSubmitted=!1}ngOnInit(){this.cardTitle.emit({cardKey:this.router.url,value:"A Few Questions"}),this.isHideCpapInfo.emit(!1),window.innerWidth<768?this.isFooterHide.emit(!0):this.isFooterHide.emit(!1),this.isShowSpinner.emit(!1),this.isValid(),this.getSupportInformation()}onResize(t){const o=t.target;this.innerWidth=o.innerWidth,this.isFooterHide.emit(o.innerWidth<768)}selectAnswer(t,o){if(t.selectedAnswer=o.value,"restart"===t.id&&"false"===o.value){const n=this.questions.find(a=>"cpapReasons"===a.id);n&&(n.selectedAnswers=[])}this.isValid()}toggleCheckbox(t,o){const n=t.selectedAnswers||[],a=n.indexOf(o.value);a>-1?n.splice(a,1):n.push(o.value),t.selectedAnswers=n,this.isValid()}isAnswerSelected(t,o){return"checkbox"===t.type?(t.selectedAnswers||[]).includes(o.value):t.selectedAnswer===o.value}isQuestionVisible(t){return"cpapReasons"!==t.id||"true"===this.questions.find(n=>"restart"===n.id)?.selectedAnswer}isValid(){this.valid.emit(!0)}isFormValid(){return this.questions.filter(t=>this.isQuestionVisible(t)).every(t=>"button"===t.type?!!t.selectedAnswer:(t.selectedAnswers||[]).length>0)}getSupportInformation(){const{userId:t}=this.dataService.currentUserInfo;this.apiService.getApi(this.dataService.serverAddress+`service/v1/cpap/support-information/${t}`).subscribe(n=>{const a=JSON.parse(JSON.stringify(n));if(a&&a.data&&(this.questions.forEach(d=>{if("checkbox"===d.type){const h=a.data;d.selectedAnswers=d.answers.filter(g=>!0===h[g.value]).map(g=>g.value)}else a.data.hasOwnProperty(d.id)&&(d.selectedAnswer=a.data[d.id]+"")}),"false"===this.questions.find(d=>"restart"===d.id)?.selectedAnswer)){const d=this.questions.find(h=>"cpapReasons"===h.id);d&&(d.selectedAnswers=[])}})}submit(){var t=this;return(0,F.A)(function*(){if(t.formSubmitted=!0,t.isFormValid())try{t.isShowSpinner.emit(!0);const{userId:o}=t.dataService.currentUserInfo,n={};t.questions.forEach(c=>{if("checkbox"===c.type){const d=(c.selectedAnswers||[]).reduce((h,g)=>(h[g]=!0,h),{});Object.assign(n,d)}else n[c.id]=c.selectedAnswer}),t.apiService.postApi(t.dataService.serverAddress+`service/v1/cpap/support-information/${o}`,n).subscribe(c=>{const d=JSON.parse(JSON.stringify(c));d&&d.data?.id>0?(t.isShowSpinner.emit(!1),t.formSubmitted=!1,t.router.navigateByUrl("cpap/cpap-mask-select")):(t.isShowSpinner.emit(!1),t.serverError=d.message||"An error occurred.",t.showRedirectionError=!0,t.formSubmitted=!1)})}catch(o){t.isShowSpinner.emit(!1),t.serverError=o,t.formSubmitted=!1}})()}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(O.u),e.rXU(k.G),e.rXU(y.Ix),e.rXU(e.zcH),e.rXU(P.ze))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["bn-cpap-support-information"]],hostBindings:function(o,n){1&o&&e.bIt("resize",function(c){return n.onResize(c)},!1,e.tSv)},outputs:{isShowSpinner:"isShowSpinner",isHideCpapInfo:"isHideCpapInfo",valid:"valid",cardTitle:"cardTitle",actionLabel:"actionLabel",isFooterHide:"isFooterHide"},decls:20,vars:6,consts:[[1,"wrapper","without-padding",2,"flex","1"],[1,"wait-header"],[1,"title"],[1,"subtitle"],[1,"main-content"],[1,"support-card"],[1,"center"],["class","error-text validation-message",4,"ngIf"],[1,"questions-container"],[4,"ngFor","ngForOf"],[1,"how-we-use-section"],[1,"how-we-use-title"],[1,"how-we-use-text"],[1,"footer-controlled"],["id","action",3,"click","primaryActionText"],[4,"ngIf"],[1,"error-text","validation-message"],["class","question-block",4,"ngIf"],[1,"question-block"],[1,"question-text"],["class","button-group",3,"error-field",4,"ngIf"],["class","checkbox-group",3,"error-field",4,"ngIf"],[1,"button-group"],["type","button","class","answer-button",3,"selected","click",4,"ngFor","ngForOf"],["type","button",1,"answer-button",3,"click"],[1,"checkbox-group"],["class","checkbox-item",4,"ngFor","ngForOf"],[1,"checkbox-item"],["type","checkbox",3,"change","checked"],["aria-hidden","true",1,"checkbox-box"],[1,"checkbox-text"],[1,"error-message"],["href","tel:1-866-801-9440",1,"link"]],template:function(o,n){1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2),e.EFF(3),e.k0s(),e.j41(4,"p",3),e.
1EFF(5),e.k0s()(),e.j41(6,"div",4)(7,"div",5)(8,"div",6),e.DNE(9,ye,2,0,"h4",7),e.k0s(),e.j41(10,"div",8),e.DNE(11,Te,2,1,"ng-container",9),e.k0s(),e.j41(12,"div",10)(13,"h4",11),e.EFF(14,"How we'll use this"),e.k0s(),e.j41(15,"div",12),e.EFF(16," We'll use this to tailor the education content and support we send you so you have the best chance of success. "),e.k0s()()()(),e.j41(17,"div",13)(18,"bn-control-footer",14),e.bIt("click",function(){return n.submit()}),e.k0s()(),e.DNE(19,Ie,6,0,"div",15),e.k0s()),2&o&&(e.R7$(3),e.JRh(n.title),e.R7$(2),e.JRh(n.subtitle),e.R7$(4),e.Y8G("ngIf",n.formSubmitted&&!n.isFormValid()),e.R7$(2),e.Y8G("ngForOf",n.questions),e.R7$(7),e.FS9("primaryActionText",n.actionLabelText),e.R7$(),e.Y8G("ngIf",n.showRedirectionError))},dependencies:[b.Sq,b.bT,R.u],styles:['[_ngcontent-%COMP%]:root{--primary-color: "";--secondary-color: "";--dark-secondary-color: "";--welcome-column-header: "";--foreground: "";--alt-foreground: "";--error-color: "";--primary-text-color: "";--secondary-text-color: "";--dark-secondary-text-color: "";--sleep-risk-text: "";--header-background: "";--primary-gradient: "";--footer-background: ""}[_nghost-%COMP%]{display:flex;flex-direction:column;min-height:100%;color:var(--dark-secondary-text-color);font-weight:400}[_nghost-%COMP%]   a[_ngcontent-%COMP%]{font-weight:700}@media (max-width: 991px){[_nghost-%COMP%]{min-height:calc(100% - 50px)}}@media (max-width: 767px){[_nghost-%COMP%]{padding:0;min-height:auto}}[_nghost-%COMP%]   .title[_ngcontent-%COMP%]{font-size:26px;text-align:center;font-weight:700;line-height:100%;color:var(--secondary-text-color);margin-bottom:16px}[_nghost-%COMP%]   .subtitle[_ngcontent-%COMP%]{text-align:center;font-size:14px;font-weight:400;color:var(--dark-secondary-text-color);margin-bottom:24px}@media (max-width: 767px){[_nghost-%COMP%]   .subtitle[_ngcontent-%COMP%]{font-size:16px}}[_nghost-%COMP%]   .section-header[_ngcontent-%COMP%]{text-align:center;font-size:12px;font-weight:700;letter-spacing:.5px;color:var(--secondary-text-color);margin-bottom:20px;text-transform:uppercase}[_nghost-%COMP%]   .wrapper[_ngcontent-%COMP%]{padding:0;flex:1;overflow:auto;background-color:#fff}@media (max-width: 991px){[_nghost-%COMP%]   .wrapper[_ngcontent-%COMP%]{padding:30px 0}}@media (max-width: 767px){[_nghost-%COMP%]   .wrapper[_ngcontent-%COMP%]{padding:30px 15px 15px;background-color:var(--foreground)}}@media (max-width: 767px){[_nghost-%COMP%]   .wrapper[_ngcontent-%COMP%]{padding:0}[_nghost-%COMP%]   .wrapper[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{color:var(--secondary-text-color)}[_nghost-%COMP%]   .wrapper[_ngcontent-%COMP%]   .main-content[_ngcontent-%COMP%]{border-top:none;margin-top:0;padding:22px}}[_nghost-%COMP%]   .wait-header[_ngcontent-%COMP%]{text-align:center;padding:28px 18px 0}@media (max-width: 767px){[_nghost-%COMP%]   .wait-header[_ngcontent-%COMP%]{background:#fff;padding:28px 18px}}@media (max-width: 767px){[_nghost-%COMP%]   .wait-header[_ngcontent-%COMP%]   .subtitle[_ngcontent-%COMP%]{margin-bottom:0}}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]{background:var(--foreground);position:relative;margin:20px;padding:25px 0}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]{max-width:640px;margin:0 auto;color:var(--dark-secondary-text-color)}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .validation-message[_ngcontent-%COMP%]{font-size:18px;margin:0 0 16px}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .questions-container[_ngcontent-%COMP%]{margin-bottom:32px}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]{margin-bottom:24px}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .question-text[_ngcontent-%COMP%]{display:block;font-size:14px;font-weight:700;margin-bottom:12px}@media (max-width: 767px){[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .question-text[_ngcontent-%COMP%]{font-size:16px}}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .question-text.error-text[_ngcontent-%COMP%]{color:#d32f2f}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .button-group[_ngcontent-%COMP%]{display:flex;gap:10px}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .button-group.error-field[_ngcontent-%COMP%]   .answer-button[_ngcontent-%COMP%]{border:2px solid #d32f2f}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .answer-button[_ngcontent-%COMP%]{padding:14px 20px;border:none;color:var(--dark-secondary-text-color);background-color:#fff;font-size:14px;font-weight:400;text-transform:none;cursor:pointer;transition:all .2s ease;white-space:nowrap;width:100%;letter-spacing:.5px;height:50px;border:2px solid #b7b7b7}@media (max-width: 767px){[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .answer-button[_ngcontent-%COMP%]{font-size:.8em}}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .answer-button[_ngcontent-%COMP%]:focus{outline-offset:2px}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .answer-button[_ngcontent-%COMP%]:active{opacity:.8}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .answer-button.selected[_ngcontent-%COMP%]{background-color:var(--primary-color);opacity:1;color:#fff}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .checkbox-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .checkbox-group.error-field[_ngcontent-%COMP%]   .checkbox-item[_ngcontent-%COMP%]{border-color:#d32f2f}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .checkbox-item[_ngcontent-%COMP%]{display:flex;align-items:center;background:#fff;border-radius:12px;padding:10px 12px;border:2px solid #b7b7b7;cursor:pointer;transition:all .2s ease}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .checkbox-item[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%]{position:absolute;opacity:0;width:18px;height:18px;
1cursor:pointer}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .checkbox-item[_ngcontent-%COMP%]   .checkbox-box[_ngcontent-%COMP%]{width:22px;height:22px;border-radius:6px;border:2px solid #b7b7b7;background:#fff;margin-right:14px;display:inline-block;box-sizing:border-box;position:relative;flex:0 0 auto;transition:all .2s ease}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .checkbox-item[_ngcontent-%COMP%]   .checkbox-box[_ngcontent-%COMP%]:after{content:"";position:absolute;left:5px;top:1px;width:6px;height:11px;border:solid transparent;border-width:0 2px 2px 0;transform:rotate(45deg);display:none}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .checkbox-item[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%]:checked + .checkbox-box[_ngcontent-%COMP%]{border-color:#12a65a;background:#fff}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .checkbox-item[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%]:checked + .checkbox-box[_ngcontent-%COMP%]:after{display:block;border-color:#12a65a}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .checkbox-item[_ngcontent-%COMP%]   .checkbox-text[_ngcontent-%COMP%]{font-size:14px;color:var(--dark-secondary-text-color);font-weight:400;flex:1}@media (max-width: 767px){[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .question-block[_ngcontent-%COMP%]   .checkbox-item[_ngcontent-%COMP%]   .checkbox-text[_ngcontent-%COMP%]{font-size:16px}}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .how-we-use-section[_ngcontent-%COMP%]{border-radius:4px;margin-top:0;text-align:center}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .how-we-use-section[_ngcontent-%COMP%]   .how-we-use-title[_ngcontent-%COMP%]{font-size:14px;font-weight:700;margin:0 0 8px}@media (max-width: 767px){[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .how-we-use-section[_ngcontent-%COMP%]   .how-we-use-title[_ngcontent-%COMP%]{font-size:16px}}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .how-we-use-section[_ngcontent-%COMP%]   .how-we-use-text[_ngcontent-%COMP%]{font-size:14px;color:var(--dark-secondary-text-color);margin:0;font-weight:400}@media (max-width: 767px){[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .support-card[_ngcontent-%COMP%]   .how-we-use-section[_ngcontent-%COMP%]   .how-we-use-text[_ngcontent-%COMP%]{font-size:15px}}@media (max-width: 767px){[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]{background:var(--foreground);padding:20px;margin:0}[_nghost-%COMP%]   .main-content[_ngcontent-%COMP%]   .answer-button[_ngcontent-%COMP%]{padding:10px 14px!important}}[_nghost-%COMP%]   .footer-controlled[_ngcontent-%COMP%]{padding:0 10px;display:none}@media (max-width: 767px){[_nghost-%COMP%]   .footer-controlled[_ngcontent-%COMP%]{display:block;margin-bottom:15px}}[_nghost-%COMP%]   .error-message[_ngcontent-%COMP%]{text-align:center;color:#d32f2f;font-size:14px;padding:20px}[_nghost-%COMP%]   input[_ngcontent-%COMP%]:after, [_nghost-%COMP%]   input[_ngcontent-%COMP%]:before{display:none!important}[_nghost-%COMP%]   .reasons-list[_ngcontent-%COMP%]{margin-top:18px;display:flex;flex-direction:column;gap:12px}[_nghost-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]{display:flex;align-items:center;background:#fff;border-radius:12px;padding:10px 12px;border:2px solid #b7b7b7}[_nghost-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%]{position:absolute;opacity:0;width:18px;height:18px}[_nghost-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   .checkbox-box[_ngcontent-%COMP%]{width:22px;height:22px;border-radius:8px;border:2px solid #b7b7b7;background:#fff;margin-right:14px;display:inline-block;box-sizing:border-box;position:relative;flex:0 0 auto}[_nghost-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   .checkbox-box[_ngcontent-%COMP%]:after{content:"";position:absolute;
1left:5px;top:1px;width:6px;height:11px;border:solid transparent;border-width:0 2px 2px 0;transform:rotate(45deg);display:none}@media (max-width: 767px){[_nghost-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   .checkbox-box[_ngcontent-%COMP%]:after{left:5px}}[_nghost-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%]:checked + .checkbox-box[_ngcontent-%COMP%]{border-color:#12a65a;background:#fff}[_nghost-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   input[type=checkbox][_ngcontent-%COMP%]:checked + .checkbox-box[_ngcontent-%COMP%]:after{display:block;border-color:#12a65a}[_nghost-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   .reason-text[_ngcontent-%COMP%]{font-size:14px}[_nghost-%COMP%]   .reasons-list[_ngcontent-%COMP%]   .reason-item[_ngcontent-%COMP%]   .reason-text[_ngcontent-%COMP%]   b[_ngcontent-%COMP%]{font-weight:400;color:var(--secondary-text-color)}@media (max-width: 767px){[_nghost-%COMP%]{background:var(--foreground)}}button[_ngcontent-%COMP%]:disabled{pointer-events:auto}button[_ngcontent-%COMP%]:not(.selected){background:#bbbcbe}']})}return i})();var Re=_(1188);const Ne=i=>({selected:i});function Ee(i,r){1&i&&(e.j41(0,"h4",15),e.EFF(1," There is information that must be completed. "),e.k0s())}function Ae(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",25),e.nrm(1,"bn-input",26),e.j41(2,"label",27),e.bIt("click",function(){const n=e.eBV(t).$implicit,a=e.XpG(2).$implicit,c=e.XpG(3);return e.Njj(c.setValue(a.id,n.value))}),e.EFF(3),e.k0s()()}if(2&i){const t=r.$implicit,o=e.XpG(2),n=o.$implicit,a=o.index,c=e.XpG(3);e.R7$(),e.FS9("id",t.value),e.Y8G("ngClass",e.eq3(6,Ne,c.maskQuestionaireForm.value[n.id]==t.value))("name",t.value),e.R7$(),e.FS9("id","label"+n.id+a),e.FS9("for",n.id+"_"+a),e.R7$(),e.SpI(" ",t.content," ")}}function je(i,r){if(1&i&&(e.j41(0,"div",23),e.DNE(1,Ae,4,8,"div",24),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(),e.Y8G("ngForOf",t.possible_answers)}}function Ge(i,r){if(1&i&&(e.j41(0,"option",34),e.EFF(1),e.k0s()),2&i){const t=r.$implicit;e.FS9("value",t),e.R7$(),e.SpI(" ",t," ")}}function Be(i,r){if(1&i&&(e.j41(0,"div",28)(1,"div",29)(2,"select",30)(3,"option",31),e.EFF(4),e.k0s(),e.DNE(5,Ge,2,2,"option",32),e.k0s(),e.nrm(6,"i",33),e.k0s()()),2&i){const t=e.XpG(4);e.R7$(),e.AVh("error-field",t.formSubmitted&&t.maskQuestionaireForm.controls.feet.errors),e.R7$(3),e.JRh("Feet"),e.R7$(),e.Y8G("ngForOf",t.optionListFeet)}}function De(i,r){if(1&i&&(e.j41(0,"option",34),e.EFF(1),e.k0s()),2&i){const t=r.$implicit;e.FS9("value",t),e.R7$(),e.SpI(" ",t," ")}}function Ue(i,r){if(1&i&&(e.j41(0,"div",35)(1,"div",29)(2,"select",36)(3,"option",31),e.EFF(4),e.k0s(),e.DNE(5,De,2,2,"option",32),e.k0s(),e.nrm(6,"i",33),e.k0s()()),2&i){const t=e.XpG(4);e.R7$(),e.AVh("error-field",t.formSubmitted&&t.maskQuestionaireForm.controls.inches.errors)("has-value",t.maskQuestionaireForm.controls.inches.valid),e.R7$(3),e.JRh("Inches"),e.R7$(),e.Y8G("ngForOf",t.optionListInches)}}function Ve(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",37)(1,"bn-input",38),e.bIt("change",function(n){e.eBV(t);const a=e.XpG(4);return e.Njj(a.setOneNumberDecimal(n))}),e.k0s()()}if(2&i){const t=e.XpG(4);e.AVh("error-field",t.formSubmitted&&t.maskQuestionaireForm.controls.weight.errors),e.R7$(),e.AVh("validweight",t.maskQuestionaireForm.get("weight").value),e.Y8G("type","number")("id","idweight")("formControlName","weight")("minValue",null==t.currentSection||null==t.currentSection.questions[2]?null:t.currentSection.questions[2].min_allowed_value)("maxValue",null==t.currentSection||null==t.currentSection.questions[2]?null:t.currentSection.questions[2].max_allowed_value)}}function He(i,r){if(1&i&&(e.j41(0,"div",16)(1,"label",17)(2,"span"),e.EFF(3),e.k0s(),e.EFF(4),e.k0s(),e.DNE(5,je,2,1,"div",18),e.j41(6,"div",19),e.DNE(7,Be,7,4,"div",20)(8,Ue,7,6,"div",21),e.k0s(),e.DNE(9,Ve,2,9,"div",22),e.k0s()),2&i){const t=r.$implicit,o=r.index,n=e.XpG(3);e.R7$(),e.AVh("error-text",n.formSubmitted&&((null==n.maskQuestionaireForm.controls[t.id]?null:n.maskQuestionaireForm.controls[t.id].errors)||"height"==t.subtype&&((null==n.maskQuestionaireForm.controls.feet?null:n.maskQuestionaireForm.controls.feet.errors)||(null==n.maskQuestionaireForm.controls.inches?null:n.maskQuestionaireForm.controls.inches.errors))||"weight"==t.subtype&&(null==n.maskQuestionaireForm.controls.weight?null:n.maskQuestionaireForm.controls.weight.errors))),e.FS9("id","id"+t.id),e.R7$(2),e.SpI("",o+1,"."),e.R7$(),e.JRh(t.prompt),e.R7$(),e.Y8G("ngIf","select"===t.type),e.R7$(2),e.Y8G("ngIf","height"===t.subtype),e.R7$(),e.Y8G("ngIf","height"===t.subtype),e.R7$(),e.Y8G("ngIf","weight"===t.subtype)}}function $e(i,r){if(1&i&&(e.j41(0,"div",10)(1,"div",11),e.DNE(2,Ee,2,0,"h4",12),e.k0s(),e.j41(3,"form",13)(4,"div"),e.DNE(
15,He,10,9,"div",14),e.k0s()()()),2&i){const t=e.XpG(2);e.R7$(2),e.Y8G("ngIf",t.formSubmitted&&(null==t.maskQuestionaireForm?null:t.maskQuestionaireForm.invalid)),e.R7$(),e.Y8G("formGroup",t.maskQuestionaireForm),e.R7$(2),e.Y8G("ngForOf",t.maskQuestionaire)}}function Le(i,r){1&i&&(e.j41(0,"div",39)(1,"div",11),e.nrm(2,"img",40),e.k0s()())}function Ye(i,r){if(1&i&&(e.j41(0,"div",5)(1,"div",6),e.EFF(2),e.k0s(),e.j41(3,"p",7),e.EFF(4),e.k0s(),e.DNE(5,$e,6,3,"div",8)(6,Le,3,0,"div",9),e.k0s()),2&i){const t=e.XpG();e.ZvI("content ",t.currentSection.isStepTwo?"step-two":"step-one",""),e.R7$(2),e.SpI(" ",null==t.currentSection?null:t.currentSection.title," "),e.R7$(),e.Aen(null!=t.currentSection&&t.currentSection.description?"":"display:none;"),e.R7$(),e.SpI(" ",null==t.currentSection?null:t.currentSection.description," "),e.R7$(),e.Y8G("ngIf",!t.showMaskScanSection),e.R7$(),e.Y8G("ngIf",t.showMaskScanSection)}}function Xe(i,r){if(1&i&&(e.j41(0,"p",41),e.EFF(1," Trouble completing the face scan? "),e.j41(2,"a",42),e.EFF(3," Please try these troubleshooting tips."),e.k0s(),e.nrm(4,"br"),e.EFF(5," To move past this page without scanning, please call us. "),e.k0s()),2&i){const t=e.XpG();e.R7$(2),e.BMQ("href",t.troubleshootUrl,e.B4B)}}function ze(i,r){1&i&&(e.j41(0,"div")(1,"p",43),e.EFF(2," There was an unexpected error. Please call us at "),e.j41(3,"a",44),e.EFF(4," 1-866-801-9440 "),e.k0s(),e.EFF(5," so we can troubleshoot. "),e.k0s()())}let qe=(()=>{class i{constructor(t,o,n,a,c){this.dataService=t,this.apiService=o,this.router=n,this.errorHandler=a,this.fb=c,this.maskDetail=[],this.serverError="",this.isShowSpinner=new e.bkB,this.isHideCpapInfo=new e.bkB,this.valid=new e.bkB,this.cardTitle=new e.bkB,this.maskQuestionaireForm=null,this.showMaskScanSection=!1,this.showRedirectionError=!1,this.troubleshootUrl="https://next.portal.maskfitar.com/cms/help/user-guides/face-scan-troubleshooting",this.step2Content={isStepTwo:!0,title:"Let's get your measurements",description:"Click the button below to complete your mask fitting scan to help us determine the correct size mask for you. This scan takes less than a minute to complete and can be done on any device with a camera. Your facial scan will never be stored or transmitted for any purpose."},this.innerWidth=window.innerWidth,this.actionLabelText="Continue",this.actionLabel=new e.bkB,this.isFooterHide=new e.bkB,this.optionListFeet=[],this.optionListInches=[],this.inchesIdForSelect=[]}ngOnInit(){this.cardTitle.emit({cardKey:this.router.url,value:"Let\u2019s find your right fit"}),this.isHideCpapInfo.emit(!1),window.innerWidth<768?this.isFooterHide.emit(!0):this.isFooterHide.emit(!1),this.isValid(),this.getAllMask(this.dataService.currentUserInfo.userId),this.getMedicalHistoryQuestion()}onResize(t){const o=t.target;this.innerWidth=o.innerWidth,this.isFooterHide.emit(o.innerWidth<768)}getMedicalHistoryQuestion(){this.apiService.getApi(this.dataService.serverAddress+"service/v1/hst/medical/questions/"+this.dataService.currentUserInfo.userId).subscribe(o=>{const n=JSON.parse(JSON.stringify(o));this.medicalAnswer=n.data.answers,this.getMaskInfo(this.medicalAnswer)},o=>{0==o.status&&(this.unableToConnectserver=!0),this.getMaskInfo()})}setValue(t,o){this.maskQuestionaireForm.patchValue({[t]:o})}maskHistorySection(t,o){const n=Math.floor(o[3]/12),a=Math.floor(o[3]%12),c=o[4],d=o[26],h=t.reduce((T,E)=>("height"==E.subtype?(T.feet=[o[3]?n:"",[P.k0.required]],T.inches=[o[3]?a:"",[P.k0.required]]):"weight"==E.subtype?T.weight=[c,[P.k0.required,P.k0.min(50),P.k0.max(999),P.k0.pattern("^[0-9\\s.]*$")]]:T[E.id]=["partner_metal_implant"==E.subtype?d:"",[P.k0.required]],T),{}),{min_allowed_value:g,max_allowed_value:x}=this.currentSection.questions[1];this.optionListFeet=this.optionForHeight(Math.floor(g/12),Math.floor(x/12),"feet"),this.optionListInches=this.optionForHeight(Math.floor(g%12),Math.floor(x%12),"inches"),this.maskQuestionaireForm=this.fb.group(h)}submitMaskQuestionaire(t){var o=this;return(0,F.A)(function*(){return new Promise((n,a)=>{let c={};c={section:o.maskQuestionaire,answers:t,activeMaskList:o.activeMaskList},o.apiService.postApi(o.dataService.serverAddress+"service/v1/cpap/mask-questions/"+o.dataService.currentUserInfo.userId,c).subscribe(h=>{const g=JSON.parse(JSON.stringify(h));if(n(g),!0===g?.data?.maskScanAlreadyCompleted||!0===g?.data?.shouldRedirectToMaskDisplay)return o.router.navigateByUrl("cpap/mask-display"),void(o.formSubmitted=!1);if(g?.data?.answers&&Object.keys(g.data.answers).length>0){if(o.isShowSpinner.emit(!1),o.showMaskScanSection=!0,o.redirectionLink=g.data.maskfitScanLink,!o.redirectionLink)return o.showRedirectionError=!0,void o.isFooterHide.emit(!0);o.currentSection={...o.currentSection,...o.step2Content},o.actionLabel.emit("Start Scan"),o.actionLabelText="Start Scan"}o.formSubmitted=!1},h=>{0==h.status?o.unableToConnectserver=!0:(o.isShowSpinner.emit(!1),o.showRedirectionError=!0,o.isFooterHide.emit(!0)),a(h)})})})()}optionForHeight(t,o,n){const a=[];for(let c=t;c<=o;c++)"inches"==n&&this.inchesIdForSelect.push(`id${c}`),a.push(c);return a}getMaskInfo(t=void 0){const n={headers:{"content-type":"application/json",authorization:"Bearer "+this.dataService.currentUserInfo.sessionId}},a=2===this.router.url.split("uuid").length?`?uuid${this.router.url.split("uuid")[1]}`:"";this.apiService.getApi(this.dataService.serverAddress+`service/v1/cpap/mask-questions/${this.dataService.currentUserInfo.userId}${a}`,n).subscribe(d=>{const h=JSON.parse(JSON.stringify(d));if(this.maskQuestionaire=h.data.section[0].questions,this.currentSection=h.data.section[0],this.isShowSpinner.emit(!1),this.maskHistorySection(this.maskQuestionaire,t),h?.data?.answers&&Object.keys(h.data.answers).length>0&&!h.data.userMaskScan?.scanCompleted&&"MASK_SELECTED"!==h.data?.userStateCode){if(this.showMaskScanSection=!0,this.redirectionLink=h.data.userMaskScan?.scanURL,!this.redirectionLink)return this.showRedirectionError=!0,void this.isFooterHide.emit(!0);this.currentSection={...this.currentSection,...this.step2Content},this.actionLabel.emit("Start Scan"),this.actionLabelText="Start Scan"}(!0===h.data?.shouldRedirectToMaskDisplay||!0===h.data?.userMaskScan?.scanCompleted||"MASK_SELECTED"===h.data?.userStateCode)&&this.router.navigateByUrl("cpap/mask-display")},d=>{0==d.status?this.unableToConnectserver=!0:(this.isShowSpinner.emit(!1),this.showRedirectionError=!0,this.isFooterHide.emit(!0))})}getAllMask(t){return new Promise((o,n)=>{this.apiService.getApi(this.dataService.serverAddress+"service/v1/cpap/mask-categories/"+t,{headers:{"content-type":"application/json",authorization:"Bearer "+this.dataService.currentUserInfo.userId}}).subscribe(h=>{const g=JSON.parse(JSON.stringify(h));Array.isArray(g)&&(this.activeMaskList=g.filter(x=>{if(x.isActive)return x})),o(g)},h=>{console.log("error",h);const g=JSON.parse(JSON.stringify(h.error));n(g.error.message)})})}submit(){var t=this;return(0,F.A)(function*(){if(t.formSubmitted=!0,t.showMaskScanSection&&t.redirectionLink)return t.isShowSpinner.emit(!0),void(window.location.href=t.redirectionLink);if(t.maskQuestionaireForm.valid&&!t.redirectionLink){const{feet:o,inches:n}=t.maskQuestionaireForm.value,a={...t.maskQuestionaireForm.value,height:12*parseInt(o)+parseInt(n)};delete a.feet,delete a.inches,t.isShowSpinner.emit(!0),yield t.submitMaskQuestionaire(
1a),t.formSubmitted=!1}})()}isValid(){this.valid.emit(!0)}setOneNumberDecimal(t){t.target.value=+parseFloat(t.target.value).toFixed(1)}onContinue(){this.submit()}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(O.u),e.rXU(k.G),e.rXU(y.Ix),e.rXU(e.zcH),e.rXU(P.ze))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["bn-cpap-mask"]],hostBindings:function(o,n){1&o&&e.bIt("resize",function(c){return n.onResize(c)},!1,e.tSv)},outputs:{isShowSpinner:"isShowSpinner",isHideCpapInfo:"isHideCpapInfo",valid:"valid",cardTitle:"cardTitle",actionLabel:"actionLabel",isFooterHide:"isFooterHide"},decls:5,vars:4,consts:[["style","flex: 1;",3,"class",4,"ngIf"],[1,"footer-controlled"],["id","action",3,"click","primaryActionText"],["class","mask-scan-troubleshooting",4,"ngIf"],[4,"ngIf"],[2,"flex","1"],["id","maskQuestionForm",1,"title"],[1,"sub-title"],["class","hst-questionnaire",4,"ngIf"],["class","mask-scan",4,"ngIf"],[1,"hst-questionnaire"],[1,"center"],["class","error-text","style","font-size: 18px",4,"ngIf"],[3,"formGroup"],["class","question-row",4,"ngFor","ngForOf"],[1,"error-text",2,"font-size","18px"],[1,"question-row"],[1,"question-text",3,"id"],["class","button-group controls",4,"ngIf"],[1,"grid","two"],["id","idheight","class","input-field",4,"ngIf"],["class","input-field",4,"ngIf"],["class","input-field mb-25",3,"error-field",4,"ngIf"],[1,"button-group","controls"],["class","controls-input",4,"ngFor","ngForOf"],[1,"controls-input"],["type","radio",3,"ngClass","name","id"],[3,"click","id","for"],["id","idheight",1,"input-field"],[1,"input-select"],["id","feet","formControlName","feet"],["value",""],[3,"value",4,"ngFor","ngForOf"],["aria-hidden","true",1,"fas","fa-chevron-down"],[3,"value"],[1,"input-field"],["id","inches","formControlName","inches"],[1,"input-field","mb-25"],["label","Weight (lbs)",1,"form-control",3,"change","type","id","formControlName","minValue","maxValue"],[1,"mask-scan"],["src","assets/img/face-scan.png","alt","Mask Scan Placeholder",1,"mask-scan-image"],[1,"mask-scan-troubleshooting"],["target","_blank",1,"link"],[2,"font-size","16px"],["href","tel:1-866-801-9440",1,"link"]],template:function(o,n){1&o&&(e.DNE(0,Ye,7,10,"div",0),e.j41(1,"div",1)(2,"bn-control-footer",2),e.bIt("click",function(){return n.onContinue()}),e.k0s()(),e.DNE(3,Xe,6,1,"p",3)(4,ze,6,0,"div",4)),2&o&&(e.Y8G("ngIf",!n.showRedirectionError&&n.currentSection),e.R7$(2),e.FS9("primaryActionText",n.actionLabelText),e.R7$(),e.Y8G("ngIf",n.showMaskScanSection),e.R7$(),e.Y8G("ngIf",n.showRedirectionError))},dependencies:[b.YU,b.Sq,b.bT,P.qT,P.xH,P.y7,P.wz,P.BC,P.cb,P.j4,P.JD,Re.S,R.u],styles:['[_ngcontent-%COMP%]:root{--primary-color: "";--secondary-color: "";--dark-secondary-color: "";--welcome-column-header: "";--foreground: "";--alt-foreground: "";--error-color: "";--primary-text-color: "";--secondary-text-color: "";--dark-secondary-text-color: "";--sleep-risk-text: "";--header-background: "";--primary-gradient: "";--footer-background: ""}[_nghost-%COMP%]{display:flex;flex-direction:column;background:#fff;padding:20px;min-height:100%;color:var(--dark-secondary-text-color);font-weight:400}[_nghost-%COMP%]   a[_ngcontent-%COMP%]{font-weight:700}@media (max-width: 991px){[_nghost-%COMP%]{min-height:calc(100% - 50px)}}@media (max-width: 767px){[_nghost-%COMP%]{padding:0;min-height:auto}}[_nghost-%COMP%]   button[_ngcontent-%COMP%]{width:180px;height:28px}[_nghost-%COMP%]   .grid[_ngcontent-%COMP%]{grid-gap:35px}@media (max-width: 767px){[_nghost-%COMP%]   .grid[_ngcontent-%COMP%]{grid-gap:0}}[_nghost-%COMP%]   .img[_ngcontent-%COMP%]{max-width:250px;margin:0 auto;height:150px}[_nghost-%COMP%]   .img[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:100%;max-height:100%}[_nghost-%COMP%]   .title[_ngcontent-%COMP%]{font-size:26px;text-align:center;font-weight:700;line-height:100%;color:var(--secondary-text-color)}[_nghost-%COMP%]   .title[_ngcontent-%COMP%] + .sub-title[_ngcontent-%COMP%]{max-width:610px;margin:20px auto 0;text-align:center}[_nghost-%COMP%]   .content[_ngcontent-%COMP%]{padding:30px 100px 25px;flex:1;overflow:auto}@media (max-width: 991px){[_nghost-%COMP%]   .content[_ngcontent-%COMP%]{padding:30px 0}}@media (max-width: 767px){[_nghost-%COMP%]   .content[_ngcontent-%COMP%]{padding:30px 15px 15px}}@media (max-width: 767px){[_nghost-%COMP%]   .content.step-one[_ngcontent-%COMP%]{padding:0}[_nghost-%COMP%]   .content.step-one[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{padding:22px 0;background-color:var(--header-background)}[_nghost-%COMP%]   .content.step-one[_ngcontent-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]{border-top:none;margin-top:0;padding:22px 22px 0}}@media (max-width: 767px){[_nghost-%COMP%]   .content.step-two[_ngcontent-%COMP%]{padding:0}[_nghost-%COMP%]   .content.step-two[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{padding:22px 0;background-color:var(--header-background)}[_nghost-%COMP%]   .content.step-two[_ngcontent-%COMP%]   .sub-title[_ngcontent-%COMP%]{margin-top:0}[_nghost-%COMP%]   .content.step-two[_ngcontent-%COMP%]   .mask-scan[_ngcontent-%COMP%]{margin-bottom:35px}}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]{background:var(--foreground);position:relative;border-top:solid 3px var(--alt-foreground);margin-top:25px;padding:15px 15px 25px}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:after, [_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:before{display:none!important}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   form[_ngcontent-%COMP%]{max-width:565px;margin:0 auto;text-align:left}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   .question-row[_ngcontent-%COMP%]{margin-bottom:3px}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   .question-row[_ngcontent-%COMP%]   bn-input[_ngcontent-%COMP%]:not(.selected){background:#fff}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   .question-row[_ngcontent-%COMP%]   .question-text[_ngcontent-%COMP%]{font-size:16px!important;font-weight:700!important;display:block;margin-bottom:10px;position:relative;padding-left:16px;color:var(--dark-secondary-text-color)}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   .question-row[_ngcontent-%COMP%]   .question-text[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{position:absolute;
1left:0;top:0}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   .question-row[_ngcontent-%COMP%]   .button-group[_ngcontent-%COMP%]{display:flex;grid-gap:35px;margin-top:0}@media (max-width: 767px){[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   .question-row[_ngcontent-%COMP%]   .button-group[_ngcontent-%COMP%]{grid-gap:15px}}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   .question-row[_ngcontent-%COMP%]   .button-group[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{flex:1;font-weight:18px!important;font-weight:400!important}[_nghost-%COMP%]   .mb-25[_ngcontent-%COMP%]{margin-bottom:25px}[_nghost-%COMP%]   .input-select[_ngcontent-%COMP%]   select[_ngcontent-%COMP%]{background:#fff}[_nghost-%COMP%]   .footer-controlled[_ngcontent-%COMP%]{display:none}@media (max-width: 767px){[_nghost-%COMP%]   .footer-controlled[_ngcontent-%COMP%]{display:block}}button[_ngcontent-%COMP%]:disabled{pointer-events:auto}button[_ngcontent-%COMP%]:not(.selected){background:#bbbcbe}.link[_ngcontent-%COMP%]{white-space:nowrap}.masks-info[_ngcontent-%COMP%]{font-weight:700;text-align:center;max-width:720px;margin:0 auto}.mask-scan-image[_ngcontent-%COMP%]{margin-top:5%}@media (max-width: 767px){.mask-scan-image[_ngcontent-%COMP%]{width:190px;height:216px}}@media (max-width: 767px){.mask-scan-troubleshooting[_ngcontent-%COMP%]{text-align:center}}']})}return i})();var We=_(4171),Je=_(3506),ee=_(9232);function Qe(i,r){1&i&&(e.j41(0,"p"),e.EFF(1,"Although we are out of network, we are still able to bill your insurance for services."),e.k0s())}function Ke(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",21)(1,"div",22)(2,"div",23),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.videoPlay())}),e.nrm(3,"img",24),e.j41(4,"a",25),e.nrm(5,"img",26),e.k0s()()(),e.j41(6,"div",27),e.EFF(7),e.k0s()()}if(2&i){const t=e.XpG();e.R7$(3),e.Y8G("src",t.modalInfo.link,e.B4B),e.R7$(4),e.SpI(" ",t.modalInfo.subtitle," ")}}function Ze(i,r){if(1&i){const t=e.RV6();e.j41(0,"bn-popup-modal",28),e.bIt("closeModel",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.closeVideo(n))}),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("videoUrl",null==t.modalInfo?null:t.modalInfo.videolink)}}let et=(()=>{class i{constructor(t,o,n,a,c,d,h){this.dataService=t,this.apiService=o,this.router=n,this.navService=a,this.errorHandler=c,this.utilService=d,this.content=h,this.paymentType="cpap",this.serverError="",this.paymentDetails={},this.eligibilityInfo={},this.showDetail="",this.modalInfo={},this.valid=new e.bkB,this.cardTitle=new e.bkB,this.orderSummaryDetails=[{title:"Initial one-time payment",text:"This is the amount you owe today. It covers the first month's rental of the machine, as well as the cost of the initial batch of supplies (such as the mask, tubing, filters, etc.).  Supplies are not rented; they are considered purchase items."},{title:"Ongoing monthly payments (x months)",text:"Insurance companies often require that you rent your therapy machine for some period of time before the machine becomes yours. This rental period may range from 1 to 15 months depending on the benefits specific to your policy. The rental period is meant to ensure that the machine you receive is the best fit for your treatment and that you will be regularly using the device.",link:"assets/rental-period.jpg",subtitle:"UNDERSTANDING RENTAL PERIOD",videolink:"../../assets/videos/Understanding_Payments.mp4"},{title:"90-Day compliance requirement",text:"Most insurance companies require you to use your machine at least four hours a day (including naps) for at least 21 days in a 30 day period. The good news is that you have three months to meet this requirement.",link:"assets/understanding-compliance.jpg",subtitle:"Understanding Compliance",videolink:"../../assets/videos/Understanding_Compliance.mp4"},{title:"Convert to purchase payment",text:"A convert to purchase payment is the final lump sum that is paid before the machine becomes yours.  Not all insurances have a convert to purchase payment.  With some insurances the machine becomes yours after the final month\u2019s rental payment.",link:"assets/rental-types.jpg",subtitle:"UNDERSTANDING RENTAL TYPES",videolink:"../../assets/videos/Convert_to_Purchase.mp4"}],this.playVideo=!1,this.videoUrl=""}ngOnInit(){this.cardTitle.emit({cardKey:this.router.url,value:"GOOD NEWS"}),this.isValid(),this.getTherapyPriceBreakdown()}videoPlay(){this.showDetail="",this.navService.showModalOnClick=!0,this.playVideo=!0}closeVideo(t){this.playVideo=t}getTherapyPriceBreakdown(){this.apiService.getApi(this.dataService.serverAddress+`service/v1/payment/${this.paymentType}/insurance/breakdown/${this.dataService.currentUserInfo.userId}`).subscribe(o=>{const n=JSON.parse(JSON.stringify(o)),{numberOfMonths:a,ongoingMonthlyPayments:c,ninetyDaysComplianceRequired:d,convertToPurchasePayment:h,totalAmountDue:g,totalAmountDueToday:x,initialPayment:T,insuranceEligibilityInfo:E}=n;this.paymentDetails.initialOneTimePayment=parseFloat(T||"0").toFixed(2),this.paymentDetails.numberOfMonths=a||"0",this.paymentDetails.ongoingMonthlyPayments=parseFloat(c||"0").toFixed(2),this.paymentDetails.ninetyDaysComplianceRequired=d?"Yes":"No",this.paymentDetails.convertToPurchasePayment=parseFloat(h||"0").toFixed(2),this.paymentDetails.totalAmountDue=n.totalAmountDue?parseFloat(g).toFixed(2):"0.00",this.paymentDetails.totalAmountDueToday=parseFloat(x||"0").toFixed(2),this.eligibilityInfo=E},o=>{if(0==o.status)return void(this.serverError="Unable to connect to Betternight server");const{error:n}=o;this.serverError=this.errorHandler.handleError(n.code),console.log(this.serverError)})}submit(){const t=this.router.url.includes("insurance-none")?"/insurance-payment-none/cpap":"/p
1ayment/cpap";this.router.navigateByUrl(`cpap${t}`)}isValid(){this.valid.emit(!0)}insuranceLearnMore(){this.navService.previousPage=JSON.parse(JSON.stringify(this.navService.currentPage)),this.navService.currentPage=["Insurance","LEARN MORE"],this.router.navigateByUrl(`${this.dataService.module}/learn-more`)}showDetails(t){this.navService.showModalOnClick=!0,this.showDetail="show",this.modalInfo.text=this.orderSummaryDetails[t].text,this.modalInfo.title=this.orderSummaryDetails[t].title,this.modalInfo.subtitle=this.orderSummaryDetails[t].subtitle,this.modalInfo.link=this.orderSummaryDetails[t].link,this.modalInfo.videolink=this.orderSummaryDetails[t].videolink,this.modalInfo.title.includes("x")&&(this.modalInfo.title=this.modalInfo.title.replace("x",`x${this.paymentDetails.numberOfMonths}`))}getTherapyPriceBreakdownPdf(){const{userId:t,firstName:o}=this.dataService.currentUserInfo,{therapyPriceInvoiceCode:n}=this.dataService;this.utilService.getInvoicePdfs(t,n,`${o}_therapy_price_breakdown.pdf`)}getFormat(t){if(+t%1!=0)return"1.2-2"}isOutOfNetwork(){return"cpap"===this.paymentType&&!1===this.eligibilityInfo?.inNetwork}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(O.u),e.rXU(k.G),e.rXU(y.Ix),e.rXU(S.o),e.rXU(e.zcH),e.rXU(We.T),e.rXU(Je.E))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["bn-therapy-price-breakdown"]],outputs:{valid:"valid",cardTitle:"cardTitle"},decls:79,vars:30,consts:[[1,"price-breakdown"],[1,"price-breakdown__header"],[1,"title"],[4,"ngIf"],[1,"price-breakdown__cost-card"],[1,"cost-card__summary"],[1,"price-breakdown__items"],[1,"complete-therapy-kit"],[1,"total"],[1,"price-breakdown__about"],[1,"price-breakdown__help"],[1,"price-breakdown__download"],["href","javascript:void(0)",1,"link","nowrap",3,"click"],[1,"modal-content",3,"bnClickOutSide","isDirectiveAdded"],[1,"contents"],[1,"title-header"],[1,"close",3,"click"],[1,"fas","fa-times-circle"],[1,"modal-body",2,"padding-right","35px"],["class","video-box",4,"ngIf"],[3,"videoUrl","closeModel",4,"ngIf"],[1,"video-box"],["id","video-container",1,"video"],["id","video-overlay",1,"thumbnail",3,"click"],["alt","",1,"img-responsive",3,"src"],["href","javascript:void(0)",1,"btn-play"],["src","../../../assets/video-play.png","alt",""],[1,"subtitle",2,"font-size","18px","font-weight","600","text-align","center","text-transform","uppercase"],[3,"closeModel","videoUrl"]],template:function(o,n){1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2),e.EFF(3,"Most of this is covered"),e.k0s(),e.DNE(4,Qe,2,0,"p",3),e.j41(5,"p"),e.EFF(6,"Here's the breakdown of your therapy cost."),e.k0s()(),e.j41(7,"section",4)(8,"div",5)(9,"span"),e.EFF(10,"AFTER DEDUCTIBLE, YOU PAY"),e.k0s(),e.j41(11,"strong"),e.EFF(12),e.nI1(13,"number"),e.k0s(),e.j41(14,"small"),e.EFF(15),e.nI1(16,"number"),e.k0s(),e.j41(17,"small"),e.EFF(18),e.nI1(19,"number"),e.k0s()()(),e.j41(20,"div",6)(21,"div",7)(22,"div")(23,"b"),e.EFF(24,"Complete Therapy Kit"),e.k0s(),e.j41(25,"p"),e.EFF(26,"Kit includes therapy device, humidifier, water chamber, tubing, mask, headgear, cushion and filter"),e.k0s()(),e.j41(27,"strong"),e.EFF(28),e.nI1(29,"number"),e.k0s()(),e.j41(30,"div")(31,"b"),e.EFF(32,"Support Program INCLUDED"),e.k0s(),e.j41(33,"strong"),e.EFF(34,"Free"),e.k0s()(),e.j41(35,"div",8)(36,"b"),e.EFF(37,"Total Today"),e.k0s(),e.j41(38,"strong"),e.EFF(39),e.nI1(40,"number"),e.k0s()()(),e.j41(41,"section",9)(42,"h2"),e.EFF(43,"About Insurance Coverage"),e.k0s(),e.j41(44,"p"),e.EFF(45,"The standard target most insurers use for coverage:"),e.k0s(),e.j41(46,"ul")(47,"li"),e.EFF(48,"At least 4 hours per night"),e.k0s(),e.j41(49,"li"),e.EFF(50,"21 nights out of any 30-day period in your first 90 days"),e.k0s(),e.j41(51,"li"),e.EFF(52,"Naps count"),e.k0s()(),e.nrm(53,"br"),e.j41(54,"p"),e.EFF(55," Why this matters: if you hit it, coverage continues smoothly. If you don't, your insurance can stop covering the device and supplies \u2014 meaning the cost shifts to you. "),e.k0s()(),e.j41(56,"section",10)(57,"h2"),e.EFF(58,"We're Here To Help You Succeed."),e.k0s(),e.j41(59,"p"),e.EFF(60,"We'll check in along the way so you continue to get your insurance benefits \u2014 and the benefit of a better night's sleep."),e.k0s()(),e.j41(61,"p",11)(62,"b"),e.EFF(63," Download a copy of this price breakdown for your records "),e.j41(64,"a",12),e.bIt("click",function(){return n.getTherapyPriceBreakdownPdf(
1)}),e.EFF(65,"here"),e.k0s()()()(),e.j41(66,"div")(67,"div",13),e.bIt("bnClickOutSide",function(){return n.showDetail=""}),e.j41(68,"div",14)(69,"div",15)(70,"div",2),e.EFF(71),e.k0s(),e.j41(72,"div",16),e.bIt("click",function(){return n.showDetail=""}),e.nrm(73,"i",17),e.k0s()(),e.j41(74,"div",18)(75,"div"),e.EFF(76),e.k0s(),e.DNE(77,Ke,8,2,"div",19),e.k0s()()()(),e.DNE(78,Ze,1,1,"bn-popup-modal",20)),2&o&&(e.R7$(4),e.Y8G("ngIf",n.isOutOfNetwork()),e.R7$(8),e.SpI("$",e.i5U(13,15,n.paymentDetails.totalAmountDueToday,n.getFormat(n.paymentDetails.totalAmountDueToday))," Now"),e.R7$(3),e.Lme("$",e.i5U(16,18,n.paymentDetails.ongoingMonthlyPayments,n.getFormat(n.paymentDetails.ongoingMonthlyPayments))," Monthly For ",n.paymentDetails.numberOfMonths," Months"),e.R7$(3),e.SpI("$",e.i5U(19,21,n.paymentDetails.convertToPurchasePayment,n.getFormat(n.paymentDetails.convertToPurchasePayment))," at the end of your rental"),e.R7$(10),e.SpI("$",e.i5U(29,24,n.paymentDetails.totalAmountDueToday,n.getFormat(n.paymentDetails.totalAmountDueToday)),""),e.R7$(11),e.SpI("$",e.i5U(40,27,n.paymentDetails.totalAmountDueToday,n.getFormat(n.paymentDetails.totalAmountDueToday)),""),e.R7$(27),e.ZvI("default-modal sm-modal ",n.showDetail,""),e.R7$(),e.Y8G("isDirectiveAdded",""!==n.showDetail),e.R7$(4),e.JRh(n.modalInfo.title),e.R7$(5),e.SpI(" ",n.modalInfo.text," "),e.R7$(),e.Y8G("ngIf",null==n.modalInfo?null:n.modalInfo.videolink),e.R7$(),e.Y8G("ngIf",n.playVideo))},dependencies:[b.bT,ee.l,j.n,b.QX],styles:['[_ngcontent-%COMP%]:root{--primary-color: "";--secondary-color: "";--dark-secondary-color: "";--welcome-column-header: "";--foreground: "";--alt-foreground: "";--error-color: "";--primary-text-color: "";--secondary-text-color: "";--dark-secondary-text-color: "";--sleep-risk-text: "";--header-background: "";--primary-gradient: "";--footer-background: ""}[_nghost-%COMP%]{display:block;padding:15px;background:#fff;text-align:center}@media (max-width: 767px){[_nghost-%COMP%]{padding:0}}[_nghost-%COMP%]   .price-breakdown[_ngcontent-%COMP%]{display:block;max-width:760px;margin:0 auto}[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]{max-width:435px;margin:15px auto 20px}[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0 0 10px;display:grid;grid-template-columns:1fr 90px;text-align:left;grid-gap:5px;font-family:Roboto;font-weight:500;letter-spacing:.1px}[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]:last-child{margin-bottom:0}@media (max-width: 767px){[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin-bottom:15px;line-height:1.2}}[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{position:relative;padding-left:25px}[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child   .info-icon[_ngcontent-%COMP%]{position:absolute;left:0;top:0;padding:0}[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{cursor:pointer;position:absolute;left:0;top:0}[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]   span[_ngcontent-%COMP%] + span[_ngcontent-%COMP%]{text-align:right}[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]   .total[_ngcontent-%COMP%]{border-top:2px solid var(--foreground);padding-top:15px;margin-top:15px;display:block}[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]   .total[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin-bottom:0}[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]   .bn-footer[_ngcontent-%COMP%]{background:var(--foreground);padding:14px 20px}[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]   .bn-footer[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;font-weight:700}[_nghost-%COMP%]   .price-breakdown[_ngcontent-%COMP%]{color:var(--dark-secondary-text-color)}@media (max-width: 767px){[_nghost-%COMP%]   .price-breakdown[_ngcontent-%COMP%]{margin:0}}[_nghost-%COMP%]   .price-breakdown__header[_ngcontent-%COMP%]{margin:20px;color:var(--dark-secondary-text-color)}[_nghost-%COMP%]   .price-breakdown__header[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{color:var(--secondary-text-color);font-size:26px;font-weight:700}[_nghost-%COMP%]   .price-breakdown__header[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:12px 0 0;font-size:14px;font-weight:400}@media (max-width: 767px){[_nghost-%COMP%]   .price-breakdown__header[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:16px}}[_nghost-%COMP%]   .price-breakdown__cost-card[_ngcontent-%COMP%]{margin:20px 20px 0;padding:14px 12px;border:2px solid var(--secondary-text-color);border-radius:10px;background:var(--foreground);text-align:left}[_nghost-%COMP%]   .price-breakdown__cost-card[_ngcontent-%COMP%]   .cost-card__summary[_ngcontent-%COMP%]{display:flex;flex-direction:column}[_nghost-%COMP%]   .price-breakdown__cost-card[_ngcontent-%COMP%]   .cost-card__summary[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:14px;margin-bottom:5px}@media (max-width: 767px){[_nghost-%COMP%]   .price-breakdown__cost-card[_ngcontent-%COMP%]   .cost-card__summary[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:16px}}[_nghost-%COMP%]   .price-breakdown__cost-card[_ngcontent-%COMP%]   .cost-card__summary[_ngcontent-%COMP%]   small[_ngcontent-%COMP%]{font-size:14px;margin-top:5px}@media (max-width: 767px){[_nghost-%COMP%]   .price-breakdown__cost-card[_ngcontent-%COMP%]   .cost-card__summary[_ngcontent-%COMP%]   small[_ngcontent-%COMP%]{font-size:16px}}[_nghost-%COMP%]   .price-breakdown__cost-card[_ngcontent-%COMP%]   .cost-card__summary[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{color:var(--secondary-text-color);font-size:20px;margin-bottom:10px;font-weight:700}@media (max-width: 767px){[_nghost-%COMP%]   .price-breakdown__cost-card[_ngcontent-%COMP%]   .cost-card__summary[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{font-size:24px}}[_nghost-%COMP%]   .price-breakdown__cost-card[_ngcontent-%COMP%]   .cost-card__divider[_ngcontent-%COMP%]{height:1px;margin:10px 0;background:var(--dark-secondary-text-color)}[_nghost-%COMP%]   .price-breakdown__items[_ngcontent-%COMP%]{margin:10px 20px 0;background:#fff;text-align:left;color:var(--secondary-text-color);font-weight:700;font-size:14px}@media (max-width: 767px){[_nghost-%COMP%]   .price-breakdown__items[_ngcontent-%COMP%]{font-size:16px}}[_nghost-%COMP%]   .price-breakdown__items[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #d4d4d4}[_nghost-%COMP%]   .price-breakdown__items[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{white-space:nowrap}[_nghost-%COMP%]   .price-breakdown__items[_ngcontent-%COMP%] > div.complete-therapy-kit[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--dark-secondary-text-color);font-weight:400;margin:2px 0 0}[_nghost-%COMP%]   .price-breakdown__items[_ngcontent-%COMP%] > div.total[_ngcontent-%COMP%]{border:none}[_nghost-%COMP%]   .price-breakdown__about[_ngcontent-%COMP%]{margin:10px 20px 0;padding:20px;background:var(--foreground);text-align:left}[_nghost-%COMP%]   .price-breakdown__about[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], [_nghost-%COMP%]   .price-breakdown__about[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%]   .price-breakdown__about[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin-bottom:8px;text-align:center;font-size:18px;color:var(--secondary-text-color)}@media (max-width: 767px){[_nghost-%COMP%]   .price-breakdown__about[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:20px}}[_nghost-%COMP%]   .price-breakdown__about[_ngcontent-%COMP%]   p[_ngcontent-%COMP%], [_nghost-%COMP%]   .price-breakdown__about[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{font-size:14px;line-height:1.35;margin-bottom:0}[_nghost-%COMP%]   .price-breakdown__about[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]:before, [_nghost-%COMP%]   .price-breakdown__about[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:before{color:var(--dark-secondary-text-color)}@media (max-width: 767px){[_nghost-%COMP%]   .price-breakdown__about[_ngcontent-%COMP%]   p[_ngcontent-%COMP%], [_nghost-%COMP%]   .price-breakdown__about[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{font-size:16px}}[_nghost-%COMP%]   .price-breakdown__about[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin:4px 10px 0;padding-left:16px}@media (max-width: 767px){[_nghost-%COMP%]   .price-breakdown__about[_ngcontent-%COMP%]{margin:auto 0}}[_nghost-%COMP%]   .price-breakdown__help[_ngcontent-%COMP%]{margin:0 20px;padding:18px 0 10px;background:#fff}[_nghost-%COMP%]   .price-breakdown__help[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0 0 10px;color:var(--secondary-text-color);font-size:18px;font-weight:800}@media (max-width: 767px){[_nghost-%COMP%]   .price-breakdown__help[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:20px}}[_nghost-%COMP%]   .price-breakdown__help[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;font-size:14px}@media (max-width: 767px){[_nghost-%COMP%]   .price-breakdown__help[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:16px}}[_nghost-%COMP%]   .price-breakdown__download[_ngcontent-%COMP%]{color:var(--secondary-text-color)}@media (max-width: 767px){[_nghost-%COMP%]   .price-breakdown__download[_ngcontent-%COMP%]{padding:0 10px}}[_nghost-%COMP%]   .default-modal[_ngcontent-%COMP%]   .close[_ngcontent-%COMP%]{right:8px;top:8px}[_nghost-%COMP%]   .default-modal[_ngcontent-%COMP%]   .video-box[_ngcontent-%COMP%]{padding:0}[_nghost-%COMP%]   .default-modal[_ngcontent-%COMP%]   .video-box[_ngcontent-%COMP%]   .video[_ngcontent-%COMP%]{overflow:hidden;padding:0;max-width:418px;min-height:auto}[_nghost-%COMP%]   .default-modal[_ngcontent-%COMP%]   .video-box[_ngcontent-%COMP%]   .thumbnail[_ngcontent-%COMP%]{height:auto;cursor:pointer}[_nghost-%COMP%]   .default-modal[_ngcontent-%COMP%]   .video-box[_ngcontent-%COMP%]   .thumbnail[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%]   .default-modal[_ngcontent-%COMP%]   .video-box[_ngcontent-%COMP%]   .thumbnail[_ngcontent-%COMP%]   .sub-title[_ngcontent-%COMP%]{font-size:19px;font-weight:600;text-align:center;text-transform:uppercase}[_nghost-%COMP%]   .text[_ngcontent-%COMP%]{font-family:Roboto;font-weight:500}[_nghost-%COMP%]   .text[_ngcontent-%COMP%]   .link[_ngcontent-%COMP%]{font-weight:600}']})}return i})();const tt=["topPage"];function nt(i,r){1&i&&e.nrm(0,"bn-spinner")}function ot(i,r){1&i&&(e.j41(0,"div",16)(1,"p"),e.EFF(2,"Based on your responses, this mask should be the best fit."),e.k0s()())}function it(i,r){1&i&&(e.j41(0,"div",16)(1,"p"),e.EFF(2," Based on your responses and face scan, this mask should be the best fit. "),e.k0s()())}function at(i,r){if(1&i&&(e.j41(0,"div",17),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.SpI(" Cushion Size: ",t.maskCushionSize," ")}}function st(i,r){1&i&&(e.j41(0,"div",16)(1,"p"),e.EFF(2," Your questionnaire pointed to a full face mask design. This mask covers the nose and mouth allowing for breathing through both and providing a comfortable seal for your therapy. "),e.k0s()())}function rt(i,r){1&i&&(e.j41(0,"div",16)(1,"p"),e.EFF(2," Your questionnaire pointed to a nasal design. It sits at the nostrils - covering less than 5% of what a traditional mask covers. "),e.k0s()())}function ct(i,r){1&i&&(e.j41(0,"p",18),e.EFF(1," *This image shows an example of this type of mask. The mask you receive will match this type but may look slightly different. "),e.k0s())}function pt(i,r){1&i&&(e.j41(0,"p",18),e.EFF(1," *BetterNight reserves the right to substitute the mask shown above with an alternative option if required by a physician's directive or due to product unavailability. "),e.k0s())}function lt(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",5)(1,"div",6),e.EFF(2,"Here\u2019s our top pick for you"),e.k0s(),e.DNE(3,ot,3,0,"div",7)(4,it,3,0,"ng-template",null,0,e.C5r),e.j41(6,"div"),e.qex(7),e.j41(8,"h2",8),e.EFF(9),e.k0s(),e.bVm(),e.DNE(10,at,2,1,"div",9),e.j41(11,"div",10),e.nrm(12,"img",11),e.k0s()(),e.j41(13,"div")(14,"h2",12),e.
1EFF(15,"Why This Mask?"),e.k0s()(),e.DNE(16,st,3,0,"div",7)(17,rt,3,0,"ng-template",null,1,e.C5r)(19,ct,2,0,"p",13)(20,pt,2,0,"ng-template",null,2,e.C5r),e.j41(22,"div",14)(23,"bn-control-footer",15),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.onContinue())}),e.k0s()()()}if(2&i){const t=e.sdS(5),o=e.sdS(18),n=e.sdS(21),a=e.XpG();e.R7$(3),e.Y8G("ngIf",!a.maskContainsTopRecommendations)("ngIfElse",t),e.R7$(6),e.SpI(" ",a.maskName?a.maskName:a.maskObj[null==a.dataService.currentUserInfo?null:a.dataService.currentUserInfo.cpapDeviceType][a.maskCode]," "),e.R7$(),e.Y8G("ngIf",a.maskContainsTopRecommendations),e.R7$(2),e.FS9("src",a.maskImage,e.B4B),e.Y8G("alt",a.maskName?a.maskName:a.maskObj[null==a.dataService.currentUserInfo?null:a.dataService.currentUserInfo.cpapDeviceType][a.maskCode]),e.R7$(4),e.Y8G("ngIf",a.showWhyFullFaceMask())("ngIfElse",o),e.R7$(3),e.Y8G("ngIf",!a.maskContainsTopRecommendations)("ngIfElse",n),e.R7$(4),e.FS9("primaryActionText",a.actionLabelText)}}let dt=(()=>{class i{constructor(t,o,n,a,c){this.dataService=t,this.apiService=o,this.router=n,this.errorHandler=a,this.navService=c,this.maskDetail=[],this.serverError="",this.actionLabelText="Looks Good",this.isShowSpinner=new e.bkB,this.actionLabel=new e.bkB,this.isFooterHide=new e.bkB,this.maskType=null,this.paymentData={},this.maskObj={resmed_airsense_11:{p10:"Nasal Pillow Mask",n20:"Nasal Mask",f20:"Full-Face Mask",selectedMaskType:"p10",maskCategoryId:1},resmed:{p10:"Nasal Pillow Mask",n20:"Nasal Mask",f20:"Full-Face Mask",selectedMaskType:"p10",maskCategoryId:1},philips_dreamstation_1:{dreamwear_gel_pillow:"Nasal Pillow Mask",dreamwear_nasal:"Nasal Mask",dreamwear_full_face:"Full-Face Mask",selectedMaskType:"dreamwear_gel_pillow",maskCategoryId:1},philips_dreamstation_2:{dreamwear_gel_pillow:"Nasal Pillow Mask",dreamwear_nasal:"Nasal Mask",dreamwear_full_face:"Full-Face Mask",masks:["Nasal Pillow Mask","Nasal Mask","Full Face Mask"],selectedMaskType:"dreamwear_gel_pillow",maskCategoryId:1},other:{p10:"Nasal Pillow Mask",n20:"Nasal Mask",f20:"Full-Face Mask",selectedMaskType:"p10",maskCategoryId:1},"3B_luna_II":{rio_II_nasal_pillow:"Nasal Pillow Mask",siesta_nasal_mask:"Nasal Mask",siesta_full_face_mask:"Full Face Mask",selectedMaskType:"rio_II_nasal_pillow",maskCategoryId:1},"3B_G3":{rio_II_nasal_pillow:"Nasal Pillow Mask",siesta_nasal_mask:"Nasal Mask",siesta_full_face_mask:"Full Face Mask",selectedMaskType:"rio_II_nasal_pillow",maskCategoryId:1},resvent_ibreeze:{resvent_nasal_pillow:"Nasal Pillow Mask",resvent_nasal_mask:"Nasal Mask",resvent_full_face_mask:"Full Face Mask",selectedMaskType:"resvent_nasal_pillow",maskCategoryId:1}},this.valid=new e.bkB,this.cardTitle=new e.bkB,this.maskContainsTopRecommendations=!1,this.showModal=!1,this.multiMaskSelect=!1}ngOnInit(){this.cardTitle.emit({cardKey:this.router.url,value:"Your Match"}),this.actionLabel.emit("Looks Good"),window.innerWidth<768?this.isFooterHide.emit(!0):this.isFooterHide.emit(!1),this.isValid(),this.getAllMasktype(),this.MyProp.nativeElement.scrollIntoView({behavior:"smooth",block:"start"})}onResize(t){this.isFooterHide.emit(t.target.innerWidth<768)}setImageUrl(t){const o="assets/img",n=t.replace(/[\u2122]/g,"").trim().toUpperCase(),c={"FISHER AND PAYKEL ESON 2 NASAL MASK":"/BN_Masks_Fisher_and_Paykel_Eson_2_Nasal_Mask.jpg","FISHER AND PAYKEL EVORA FULL FACE MASK":"/BN_Masks_Fisher_and_Paykel_Evora_Full_Face_Mask.jpg","FISHER AND PAYKEL NOVA MICRO NASAL PILLOW MASK":"/BN_Masks_Fisher-and-Paykel-Nova-Micro-Nasal-Pillow-Mask.jpg","FISHER AND PAYKEL SOLO NASAL PILLOW MASK":"/BN_Masks_Fisher-and-Paykel-Solo-Nasal-Pillow-Mask.jpg","FISHER AND PAYKEL SOLO NASAL MASK":"/BN_Masks_Fisher-and-Paykel-Solo-Nasal-Mask.jpg","PHILIPS DREAMWEAR FULL FACE MASK":"/BN_Masks_Philips_Respironics_DreamWear_Full_Face_Mask.jpg","PHILIPS DREAMWEAR GEL PILLOWS MASK":"/BN_Masks_Philips_Respironics_DreamWear_Nasal_Pillow_Mask.jpg","PHILIPS DREAMWEAR NASAL MASK":"/BN_Masks_Philips_Respironics_DreamWear_Nasal_Mask.jpg","PHILIPS RESPIRONICS DREAMWEAR FULL FACE MASK":"/BN_Masks_Philips_Respironics_DreamWear_Full_Face_Mask.jpg","PHILIPS RESPIRONICS DREAMWEAR NASAL MASK":"/BN_Masks_Philips_Respironics_DreamWear_Nasal_Mask.jpg","PHILIPS RESPIRONICS DREAMWEAR NASAL PILLOW MASK":"/BN_Masks_Philips_Respironics_DreamWear_Nasal_Pillow_Mask.jpg","REACT HEALTH RIO II NASAL PILLOW MASK":"/BN_Masks_React_Health_Rio_II_Nasal_Pillow_Mask.jpg","REACT HEALTH SIESTA FULL FACE MASK":"/BN_Masks_React_Health_Siesta_Full_Face_Mask.jpg","REACT HEALTH SIESTA NASAL MASK":"/BN_Masks_React_Health_Siesta_Nasal_Mask.jpg","RESMED AIRFIT F20 FULL FACE MASK":"/BN_Masks_ResMed_AirFit_F20_Full_Face_Mask.jpg","RESMED AIRFIT N20 NASAL MASK":"/BN_Masks_ResMed_AirFit_N20_Nasal_Mask.jpg","RESMED AIRFIT P10 NASAL PILLOW MASK":"/BN_Masks_ResMed_AirFit_P10_Nasal_Pillow_Mask.jpg","RESMED AIRTOUCH F20 FULL FACE MASK":"/BN_Masks_ResMed_AirTouch_F20_Full_Face_Mask.jpg","RESVENT FULL FACE MASK":"/Full-Face-BN.png","RESVENT NASAL MASK":"/Nasal-BN.png","RESVENT NASAL PILLOW":"/Nasal-Pillow-BN.png","RIO II NASAL PILLOW":"/BN_Masks_React_Health_Rio_II_Nasal_Pillow_Mask.jpg","SIESTA FULL FACE MASK":"/BN_Masks_React_Health_Siesta_Full_Face_Mask.jpg","SIESTA NASAL MASK":"/BN_Masks_React_Health_Siesta_Nasal_Mask.jpg"}[n];c?this.maskImage=o+c:n.includes("FULL FACE")?this.maskImage=o+"/Full-Face-BN.png":n.includes("NASAL MASK")?this.maskImage=o+"/Nasal-BN.png":n.includes("PILLOWS MASK")&&(this.maskImage=o+"/Nasal-Pillow-BN.png")}getUserMaskType(){this.apiService.getApi(this.dataService.serverAddress+"service/v1/cpap/user-mask-type/"+this.dataService.currentUserInfo.userId).subscribe(o=>{this.showSpinner=!1;const n=JSON.parse(JSON.stringify(o)),{mask_type:a,maskCategoryId:c,topRecommendation:d}=n.data;if(this.maskType=a,d)this.maskContainsTopRecommendations=!0,this.maskCategoryId=c,this.maskImage=d.maskImageUrl,this.maskName=d.maskName,this.maskCushionSize=d.maskCushionSize,this.setImageUrl(d.maskName);else{const h=this.maskObj[this.dataService.currentUserInfo.cpapDeviceType];h.selectedMaskType=a,h.maskCategoryId=c,this.maskName=this.maskObj[this.dataService.currentUserInfo?.cpapDeviceType][this.maskCode],this.maskDetail.filter(g=>{g.code==h.selectedMaskType?(this.maskCategoryId=g.maskCategoryId,this.maskCode=g.code,this.maskImage=g.imageName):this.dataService.currentUserInfo.UserCPAPMaskQuestionnaire.length||(this.maskCategoryId=this.maskDetail[0].maskCategoryId,this.maskCode=this.maskDetail[0].code,this.maskImage=this.maskDetail[0].imageName)})}},o=>{this.showSpinner=!1,console.log(o),this.maskDetail.filter(n=>{n.code&&(this.maskCategoryId=n.maskCategoryId,this.maskCode=n.code,this.maskImage=n.imageName)})})}openMaskModal(){this.navService.showModalOnClick=!0,this.showModal=!0}closeMaskModal(t){this.showModal=t,this.getUserMaskType()}getPaymentData(){this.apiService.getApi(this.dataService.serverAddress+"service/v1/payment/cpap/amount").subscribe(o=>{const n=JSON.parse(JSON.stringify(o));this.paymentData=n.result,this.proceed()})}getMaskInfo(){const t={headers:{"content-type":"application/json",authorization:"Bearer "+this.dataService.currentUserInfo.sessionId}},o=2===this.router.url.split("uuid").length?`?uuid${this.router.url.split("uuid")[1]}`:"",n=this.dataService.serverAddress+`service/v1/cpap/mask-questions/${this.dataService.currentUserInfo.userId}${o}`;return new Promise(a=>{this.apiService.getApi(n,t).subscribe(c=>{const d=JSON.parse(JSON.stringify(c));a(d),"CPAP_SKIP"==d.data.userStateCode&&this.proceed()})})}getAllMasktype(){var t=this;this.showSpinner=!0,this.apiService.getApi(this.dataService.serverAddress+`service/v1/cpap/masks/${this.dataService.currentUserInfo.userId}`).subscribe(function(){var n=(0,F.A)(function*(a){if(t.maskDetail=JSON.parse(JSON.stringify(a)),t.maskDetail.length){const[c]=t.maskDetail,d=t.maskObj[t.dataService.currentUserInfo.cpapDeviceType];d.selectedMaskType=c.code,d.maskCategoryId=c.maskCategoryId,yield t.getMaskInfo(),t.getUserMaskType()}});return function(a){return n.apply(this,arguments)}}(),n=>{if(this.showSpinner=!1,0==n.status)return void(this.serverError="Unable to connect to Betternight server");const{error:a}=n;this.serverError=this.errorHandler.handleError(a.code),console.log(this.serverError)})}submitMaskType(){this.multiMaskSelect||(this.multiMaskSelect=!0,this.apiService.postApi(this.dataService.serverAddress+"service/v1/cpap/mask",{maskCategoryId:this.maskCategoryId}).subscribe(()=>{this.getPaymentData()}))}onContinue(){this.submitMaskType()}selectMaskType(t,o){this.maskObj[this.dataService.currentUserInfo.cpapDeviceType].selectedMaskType=t.target.id,this.maskObj[this.dataService.currentUserInfo.cpapDeviceType].maskCategoryId=o,this.maskCategoryId=o}proceed(){let t;const{userStateCode:o,isCareCentrix:n}=this.dataService.currentUserInfo;t="APNEA_PAID"==o||"CPAP_SKIP"==o?"/cpap-progress":n?"/carecentrix-payment/cpap":this.paymentData.insurance_applicable?"CASH_PAY_CPAP"==o?"/cashpay/payment/cpap":0==this.paymentData.insurance.due_amount?"/insurance-none/therapy-price-breakdown":"/therapy-price-breakdown":"/payment/cpap",this.router.navigateByUrl(`cpap${t}`)}submit(){var t=this;return(0,F.A)(function*(){t.submitMaskType()})()}isValid(){this.valid.emit(!0)}showWhyFullFaceMask(){return!!(this.maskName?this.maskName:this.maskObj[this.dataService.currentUserInfo?.cpapDeviceType][this.maskCode]).toLowerCase().includes("full")}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(O.u),e.rXU(k.G),e.rXU(y.Ix),e.rXU(e.zcH),e.rXU(S.o))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["bn-mask-display"]],viewQuery:function(o,n){if(1&o&&e.GBs(tt,5),2&o){let a;e.mGM(a=e.lsd())&&(n.MyProp=a.first)}},hostBindings:function(o,n){1&o&&e.bIt("resize",function(c){return n.onResize(c)},!1,e.tSv)},outputs:{isShowSpinner:"isShowSpinner",actionLabel:"actionLabel",isFooterHide:"isFooterHide",valid:"valid",cardTitle:"cardTitle"},decls:2,vars:2,consts:[["noUserMaskScan",""],["showWhyNasal",""],["maskSelectedInfo",""],[4,"ngIf"],["id","maskDisplayForm",4,"ngIf"],["id","maskDisplayForm"],[1,"title"],["class","sub-title",4,"ngIf","ngIfElse"],[1,"mb-0","mask-title"],["class","mask-sub-title",4,"ngIf"],[1,"img"],[3,"alt","src"],[1,"mb-0"],["class","masks-info",4,"ngIf","ngIfElse"],[1,"footer-controlled"],["id","action",3,"click","primaryActionText"],[1,"sub-title"],[1,"mask-sub-title"],[1,"masks-info"]],template:function(o,n){1&o&&e.DNE(0,nt,1,0,"bn-spinner",3)(1,lt,24,11,"div",4),2&o&&(e.Y8G("ngIf",n.showSpinner),e.R7$(),e.Y8G("ngIf",!n.showSpinner))},dependencies:[b.bT,R.u,A.t],styles:['[_ngcontent-%COMP%]:root{--primary-color: "";--secondary-color: "";--dark-secondary-color: "";--welcome-column-header: "";--foreground: "";--alt-foreground: "";--error-color: "";--primary-text-color: "";--secondary-text-color: "";--dark-secondary-text-color: "";--sleep-risk-text: "";--header-background: "";--primary-gradient: "";--footer-background: ""}[_nghost-%COMP%]{display:block;text-align:center;background:#fff;padding:20px}[_nghost-%COMP%]   button[_ngcontent-%COMP%]{width:180px;height:28px}
1[_nghost-%COMP%]   .img[_ngcontent-%COMP%]{max-width:200px;margin:0 auto}[_nghost-%COMP%]   .img[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-height:100%;width:100%;height:100%}[_nghost-%COMP%]   .title[_ngcontent-%COMP%]{font-size:26px;font-weight:700;line-height:100%;color:var(--secondary-text-color);text-align:center;-webkit-overflow-scrolling:auto}[_nghost-%COMP%]   .sub-title[_ngcontent-%COMP%]{font-weight:400;max-width:610px;margin:10px auto 0;text-align:center;font-size:16px;color:var(--dark-secondary-text-color)}[_nghost-%COMP%]   .content[_ngcontent-%COMP%]{padding:30px 100px 25px;flex:1;overflow:auto}@media (max-width: 991px){[_nghost-%COMP%]   .content[_ngcontent-%COMP%]{padding:30px 50px 50px}}@media (max-width: 767px){[_nghost-%COMP%]   .content[_ngcontent-%COMP%]{padding:30px 15px 15px}}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]{background:var(--foreground);position:relative;border-top:solid 3px #cbdaec;margin-top:25px;padding:15px 15px 25px}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:after, [_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:before{display:none!important}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   form[_ngcontent-%COMP%]{max-width:565px;margin:0 auto}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   .question-row[_ngcontent-%COMP%]{margin-bottom:9px}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   .question-row[_ngcontent-%COMP%]   bn-input[_ngcontent-%COMP%]:not(.selected){background:#fff}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   .question-row[_ngcontent-%COMP%]   .question-text[_ngcontent-%COMP%]{font-size:14px!important;font-weight:400!important;display:block;margin-bottom:8px;position:relative;padding-left:16px}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   .question-row[_ngcontent-%COMP%]   .question-text[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{position:absolute;left:0;top:0}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   .question-row[_ngcontent-%COMP%]   .question-text[_ngcontent-%COMP%]   .showIcon[_ngcontent-%COMP%]{left:auto;right:0;color:var(--primary-text-color);cursor:pointer;font-style:italic;font-size:14px;width:20px;height:20px;border-radius:50%;border:2px solid var(--primary-text-color);text-align:center;line-height:16px;font-weight:700;font-family:fontAwesome}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   .question-row[_ngcontent-%COMP%]   .button-group[_ngcontent-%COMP%]{display:flex;grid-gap:35px}@media (max-width: 767px){[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   .question-row[_ngcontent-%COMP%]   .button-group[_ngcontent-%COMP%]{grid-gap:15px}}[_nghost-%COMP%]   .hst-questionnaire[_ngcontent-%COMP%]   .question-row[_ngcontent-%COMP%]   .button-group[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{flex:1;font-weight:18px!important;font-weight:400!important}[_nghost-%COMP%]   .footer-controlled[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .footer-controlled[_ngcontent-%COMP%]     bn-control-footer{padding:20px 0 0!important}@media (max-width: 767px){[_nghost-%COMP%]   .footer-controlled[_ngcontent-%COMP%]{display:block}}@media (max-width: 991px){[_nghost-%COMP%]   .sub-title[_ngcontent-%COMP%]{margin-top:22px;font-size:16px}[_nghost-%COMP%]   .mask-title[_ngcontent-%COMP%]{margin-top:27px}[_nghost-%COMP%]   .mask-sub-title[_ngcontent-%COMP%]{font-size:14px;font-weight:700;margin-top:10px}[_nghost-%COMP%]   .img[_ngcontent-%COMP%]{margin-top:10px}}@media (max-width: 767px){[_nghost-%COMP%]{padding:8px 0 0}}.link[_ngcontent-%COMP%]{white-space:nowrap}.masks-info[_ngcontent-%COMP%]{font-weight:700;text-align:center;max-width:720px;margin:0 auto}@media (max-width: 767px){.masks-info[_ngcontent-%COMP%]{margin-top:25px}}.modalData[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:180px;height:28px}.modalData[_ngcontent-%COMP%]   .grid[_ngcontent-%COMP%]{grid-gap:25px;padding-top:22px}@media (max-width: 767px){.modalData[_ngcontent-%COMP%]   .grid[_ngcontent-%COMP%]{grid-gap:0}}.modalData[_ngcontent-%COMP%]   .grid[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:disabled{pointer-events:auto}.modalData[_ngcontent-%COMP%]   .grid[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:not(.selected){background:#bbbcbe}.modalData[_ngcontent-%COMP%]   .maskTitle[_ngcontent-%COMP%]{font-size:23px;text-align:center;margin-top:20px;font-weight:700}.modalData[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{padding:30px 100px 25px;flex:1;overflow:auto}@media (max-width: 991px){.modalData[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{padding:30px 50px 50px}}@media (max-width: 767px){.modalData[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{padding:30px 15px 15px}}.modalData[_ngcontent-%COMP%]   .mb-25[_ngcontent-%COMP%]{margin-bottom:25px}.modalData[_ngcontent-%COMP%]   .input-select[_ngcontent-%COMP%]   select[_ngcontent-%COMP%]{background:#fff}.modalData[_ngcontent-%COMP%]   .btn-maskSelection[_ngcontent-%COMP%]{width:-moz-fit-content;width:fit-content;min-width:259px;max-width:335px!important;height:40px;border-radius:4px;border:none;color:#fff;font-family:inherit;font-size:15px;font-weight:700;padding:0 15px;cursor:pointer;background:var(--primary-gradient);text-transform:uppercase;margin-top:30px}']})}return i})();const ht=["selectPayment"],_t=["insuranceForm"],mt=["cpapReasons"],ut=["cpapSupportInformation"],gt=["cpapMaskSelect"],ft=["cpapMaskDisplay"],Ct=["confirmation"],Mt=["therapyPriceBreakdown"],Pt=["cpapprogress"],bt=i=>({visiblity:i});function vt(i,r){1&i&&e.nrm(0,"bn-spinner")}function yt(i,r){if(1&i){const t=e.RV6();e.j41(0,"bn-notification-preference",29,1),e.bIt("isFooterHide",function(n){e.eBV(t);const a=e.XpG(2);return e.Njj(a.hideFooter(n))})("valid",function(n){e.eBV(t);const a=e.XpG(2);return e.Njj(a.isComponentValid(n))}),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("contactConfirmation",t.type)}}function Ot(i,r){if(1&i&&(e.j41(0,"bn-tab",27),e.DNE(1,yt,2,1,"bn-notification-preference",28),e.k0s()),2&i){const t=e.XpG();e.Y8G("skipText",t.router.url.includes("/notification-preference/text"))("noAction",t.getClass("email")&&t.getClass("text")&&t.getClass("confirmation")&&t.getClass("emergency-contact"))("complete",t.isTabCompleted("email")&&t.isTabCompleted("text")&&t.isTabCompleted("c
1onfirmation")&&t.isTabCompleted("emergency-contact"))("checkValidity",t.isCompleted)("active",t.isTapActive("email")||t.isTapActive("text")||t.isTapActive("confirmation")||t.isTapActive("emergency-contact")),e.R7$(),e.Y8G("ngIf","confirmation"===t.currentComponent)}}function kt(i,r){if(1&i){const t=e.RV6();e.j41(0,"bn-select-payment-method",30,2),e.bIt("valid",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.isComponentValid(n))})("isFooterHide",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.hideFooter(n))}),e.k0s()}2&i&&e.Y8G("module","cpap")}function xt(i,r){if(1&i){const t=e.RV6();e.j41(0,"bn-insurance-information",31,3),e.bIt("actionLabel",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.changeButtonText(n))})("cardTitle",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.changeCardTitle(n))})("valid",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.isComponentValid(n))})("isFooterHide",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.hideFooter(n))}),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("paymentType",t.paymentType)}}function wt(i,r){if(1&i){const t=e.RV6();e.j41(0,"bn-insurance-information",32,3),e.bIt("cardTitle",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.changeCardTitle(n))})("valid",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.isComponentValid(n))})("isFooterHide",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.hideFooter(n))}),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("paymentType",t.paymentType)}}function St(i,r){if(1&i){const t=e.RV6();e.j41(0,"bn-cpap-reasons",33,4),e.bIt("cardTitle",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.changeCardTitle(n))})("isFooterHide",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.hideFooter(n))})("isHideCpapInfo",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.isHideFooter(n))})("valid",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.isComponentValid(n))})("isShowSpinner",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.showSpinner=n)})("actionLabel",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.changeButtonText(n))}),e.k0s()}}function Tt(i,r){if(1&i){const t=e.RV6();e.j41(0,"bn-cpap-support-information",33,5),e.bIt("cardTitle",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.changeCardTitle(n))})("isFooterHide",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.hideFooter(n))})("isHideCpapInfo",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.isHideFooter(n))})("valid",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.isComponentValid(n))})("isShowSpinner",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.showSpinner=n)})("actionLabel",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.changeButtonText(n))}),e.k0s()}}function It(i,r){if(1&i){const t=e.RV6();e.j41(0,"bn-cpap-mask",33,6),e.bIt("cardTitle",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.changeCardTitle(n))})("isFooterHide",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.hideFooter(n))})("isHideCpapInfo",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.isHideFooter(n))})("valid",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.isComponentValid(n))})("isShowSpinner",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.showSpinner=n)})("actionLabel",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.changeButtonText(n))}),e.k0s()}}function Ft(i,r){if(1&i){const t=e.RV6();e.j41(0,"bn-mask-display",34,7),e.bIt("isFooterHide",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.hideFooter(n))})("isHideCpapInfo",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.isHideFooter(n))})("cardTitle",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.changeCardTitle(n))})("valid",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.isComponentValid(n))})("isShowSpinner",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.showSpinner=n)})("actionLabel",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.changeButtonText(n))}),e.k0s()}}function Rt(i,r){if(1&i){const t=e.RV6();e.j41(0,"bn-therapy-price-breakdown",35,8),e.bIt("cardTitle",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.changeCardTitle(n))})("valid",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.isComponentValid(n))}),e.k0s()}}function Nt(i,r){if(1&i){const t=e.RV6();e.j41(0,"bn-cpapprocessorder",36,9),e.bIt("cardTitle",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.changeCardTitle(n))})("valid",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.isComponentValid(n))})("actionLabel",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.changeButtonText(n))})("isFooterHide",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.hideFooter(n))})("isHideCpapInfo",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.isHideFooter(n))}),e.k0s()}}let v=(()=>{class i{constructor(t,o,n,a){this.dataService=t,this.apiService=o,this.navService=n,this.router=a,this.isCompleted=!1,this.paymentType="cpap",this.isShowFooter=!0,this.routesUrl=["email","confirmation","text","emergency-contact","select-payment","cpap","insurance-in-progress","reasons","support-information","cpap-mask-select","mask-display","therapy-price-breakdown","cpap-progress","cpap-delivered"],this.elementRef=["confirmation","confirmation","confirmation","confirmation","selectPayment","insuranceForm","insuranceForm","cpapReasons","cpapSupportInformation","cpapMaskSelect","cpapMaskDisplay","therapyPriceBreakdown","cpapprogress","cpapprogress"],this.cardTitle={"/cpap/payment-option/cpap":"HOW YOU'LL PAY","/cpap/insurance/cpap":"YOUR COVERAGE","/cpap/insurance-in-progress/cpap":"CHECKING COVERAGE","/cpap/notification-preference/email":"CONFIRM IT'S YOU","/cpap/notification-preference/emergency-contact":"ONE QUICK THING","/cpap/notification-preference/email/confirmation":"CONFIRM IT'S YOU","/cpap/notification-preference/text":"CONFIRM IT'S YOU","/cpap/notification-preference/text/confirmation":"CONFIRM IT'S YOU"},this.showSpinner=!0,this.showContactVerification=!1,this.buttonText="Continue","SLEEP APNEA TREATMENT"!=n.currentPage[0]&&(n.currentPage=["SLEEP APNEA TREATMENT"])}ngOnInit(){this.componentLoaded(),setTimeout(()=>{"cpapMaskSelect"!=this.currentComponent&&(this.showSpinner=!1)},500)}changeButtonText(t){this.buttonText=t}componentLoaded(){this.dataService.module="cpap";const{isVerified:t,oneTimePasswordConfirmed:o,UserTypeConfiguration:n,userStateCode:a,isEmergencyContactViwed:c}=this.dataService.currentUserInfo;let{uiState:d}=this.dataService.currentUserInfo;
1if(("cpap-home"==n.redirectPageOnLogin||!t||(!o||!c)&&this.router.url.includes("/notification-preference/"))&&(this.showContactVerification=!0),!(t&&null!=o&&c||this.router.url.includes("notification-preference")))return d=d.includes("?")?"?"+d.split("?")[1]:"",void this.router.navigateByUrl(`cpap/notification-preference/${t?null==o?"text":"emergency-contact":"email"}${d}`);if(this.router.url.includes("/cpap/payment-option/cpap")){const{insuranceAllowed:h}=this.dataService.currentUserInfo.UserTypeConfiguration;h?this.apiService.getInsuranceForUser("cpap",this.dataService.currentUserInfo.userId,!1).subscribe(g=>{const{currentInsurance:x}=JSON.parse(JSON.stringify(g));x&&"CPAP_VOID"!=a?this.router.navigate(["/cpap/insurance/cpap"],{queryParams:{form:"synopsis"}}):(this.type="select-payment",this.currentComponent=this.elementRef[this.routesUrl.indexOf(this.type)])}):this.router.navigateByUrl("cpap/cpap-mask-select")}else this.router.url.includes("/cpap/insurance-in-progress/cpap")?this.type="insurance-in-progress":(this.type=this.router.url.split("/")[this.router.url.split("/").length-1],this.type=this.t
1ype.split("?")[0]);("select-payment"==this.type||"cpap"==this.type||"insurance-in-progress"==this.type||"reasons"==this.type||"support-information"==this.type||"cpap-mask-select"==this.type||"mask-display"==this.type||"therapy-price-breakdown"==this.type)&&"CONFIRM & ONBOARDING"!=this.navService.currentPage[1]&&(this.navService.currentPage[1]="CONFIRM & ONBOARDING"),this.currentComponent=this.elementRef[this.routesUrl.indexOf(this.type)]}finalSubmit(t){"skipTextVerification"!=t?"skipSupport"!==t?this[this.currentComponent].submit():this[this.currentComponent][t]():this[this.currentComponent].skipTextVerification()}getClass(t){return this.routesUrl.indexOf(t)!=this.routesUrl.indexOf(this.type)}isTapActive(t){return this.routesUrl.indexOf(t)==this.routesUrl.indexOf(this.type)}isTabCompleted(t){return this.routesUrl.indexOf(t)<this.routesUrl.indexOf(this.type)}changeCardTitle(t){let o=t.cardKey;o.includes("mask-display?")&&(o=o.split("?")[0]),this.cardTitle[o]=t.value}isComponentValid(t){this.isCompleted=t}hideFooter(t){this.ishideFooter=t}isHideFooter(t){this.isShowFooter=t}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(O.u),e.rXU(k.G),e.rXU(S.o),e.rXU(y.Ix))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["bn-therapy"]],viewQuery:function(o,n){if(1&o&&(e.GBs(ht,5),e.GBs(_t,5),e.GBs(mt,5),e.GBs(ut,5),e.GBs(gt,5),e.GBs(ft,5),e.GBs(Ct,5),e.GBs(Mt,5),e.GBs(Pt,5)),2&o){let a;e.mGM(a=e.lsd())&&(n.selectPayment=a.first),e.mGM(a=e.lsd())&&(n.insuranceForm=a.first),e.mGM(a=e.lsd())&&(n.cpapReasons=a.first),e.mGM(a=e.lsd())&&(n.cpapSupportInformation=a.first),e.mGM(a=e.lsd())&&(n.cpapMaskSelect=a.first),e.mGM(a=e.lsd())&&(n.cpapMaskDisplay=a.first),e.mGM(a=e.lsd())&&(n.confirmation=a.first),e.mGM(a=e.lsd())&&(n.therapyPriceBreakdown=a.first),e.mGM(a=e.lsd())&&(n.cpapprogress=a.first)}},decls:21,vars:45,consts:[["content",""],["confirmation",""],["selectPayment",""],["insuranceForm",""],["cpapReasons",""],["cpapSupportInformation",""],["cpapMaskSelect",""],["cpapMaskDisplay",""],["therapyPriceBreakdown",""],["cpapprogress",""],[4,"ngIf"],[1,"flex-wrapper",3,"ngClass"],[1,"payment-method",3,"id","cardTitle"],[3,"finalSubmit","showZeroIndex"],["label","Contact Information",3,"skipText","noAction","complete","checkValidity","active",4,"ngIf"],["label","Payment Method",3,"noAction","complete","checkValidity","active"],[3,"module","valid","isFooterHide",4,"ngIf"],["label","Coverage",3,"noAction","checkValidity","active","complete","hideFooter","actionLabel"],[3,"paymentType","actionLabel","cardTitle","valid","isFooterHide",4,"ngIf"],[3,"paymentType","cardTitle","valid","isFooterHide",4,"ngIf"],["label","Symptoms ",3,"noAction","checkValidity","active","complete","hideFooter","actionLabel"],[3,"cardTitle","isFooterHide","isHideCpapInfo","valid","isShowSpinner","actionLabel",4,"ngIf"],["label","Fit and Confirm",3,"noAction","checkValidity","active","complete","hideFooter","actionLabel"],[3,"isFooterHide","isHideCpapInfo","cardTitle","valid","isShowSpinner","actionLabel",4,"ngIf"],[3,"cardTitle","valid",4,"ngIf"],["label","Delivery",3,"noAction","checkValidity","active","complete","hideFooter","actionLabel"],[3,"cardTitle","valid","actionLabel","isFooterHide","isHideCpapInfo",4,"ngIf"],["label","Contact Information",3,"skipText","noAction","complete","checkValidity","active"],[3,"contactConfirmation","isFooterHide","valid",4,"ngIf"],[3,"isFooterHide","valid","contactConfirmation"],[3,"valid","isFooterHide","module"],[3,"actionLabel","cardTitle","valid","isFooterHide","paymentType"],[3,"cardTitle","valid","isFooterHide","paymentType"],[3,"cardTitle","isFooterHide","isHideCpapInfo","valid","isShowSpinner","actionLabel"],[3,"isFooterHide","isHideCpapInfo","cardTitle","valid","isShowSpinner","actionLabel"],[3,"cardTitle","valid"],[3,"cardTitle","valid","actionLabel","isFooterHide","isHideCpapInfo"]],template:function(o,n){if(1&o){const a=e.RV6();e.DNE(0,vt,1,0,"bn-spinner",10),e.j41(1,"div",11)(2,"bn-card",12)(3,"content",null,0)(5,"bn-tabbed-content",13),e.bIt("finalSubmit",function(d){return e.eBV(a),e.Njj(n.finalSubmit(d))}),e.DNE(6,Ot,2,6,"bn-tab",14),e.j41(7,"bn-tab",15),e.DNE(8,kt,2,1,"bn-select-payment-method",16),e.k0s(),e.j41(9,"bn-tab",17),e.DNE(10,xt,2,1,"bn-insurance-information",18)(11,wt,2,1,"bn-insurance-information",19),e.k0s(),e.j41(12,"bn-tab",20),e.DNE(13,St,2,0,"bn-cpap-reasons",21)(14,Tt,2,0,"bn-cpap-support-information",21),e.k0s(),e.j41(15,"bn-tab",22),e.DNE(16,It,2,0,"bn-cpap-mask",21)(17,Ft,2,0,"bn-mask-display",23)(18,Rt,2,0,"bn-therapy-price-breakdown",24),e.k0s(),e.j41(19,"bn-tab",25),e.DNE(20,Nt,2,0,"bn-cpapprocessorder",26),e.k0s()()()()()}2&o&&(e.Y8G("ngIf",n.showSpinner),e.R7$(),e.Y8G("ngClass",e.eq3(43,bt,n.showSpinner)),e.R7$(),e.FS9("id",n.cardTitle[n.router.url.split("?")[0]]),e.FS9("cardTitle",n.cardTitle[n.router.url.split("?")[0]]),e.R7$(3),e.Y8G("showZeroIndex",!!n.showContactVerification),e.R7$(),e.Y8G("ngIf",n.showContactVerification),e.R7$(),e.Y8G("noAction",n.getClass("select-payment"))("complete",n.isTabCompleted("select-payment"))("checkValidity",n.isCompleted)("active",n.isTapActive("select-payment")),e.R7$(),e.Y8G("ngIf","select-payment"===n.type),e.R7$(),e.Y8G("noAction",n.getClass("insurance-in-progress")&&n.getClass("cpap"))("checkValidity",n.isCompleted)("active",n.isTapActive("insurance-in-progress")||n.isTapActive("cpap"))("complete",n.isTabCompleted("insurance-in-progress")&&n.isTabCompleted("cpap"))("hideFooter",n.ishideFooter)("actionLabel",n.buttonText),e.R7$(),e.Y8G("ngIf","insuranceForm"==n.currentComponent&&n.router.url.includes("insurance/cpap")),e.R7$(),e.Y8G("ngIf","insuranceForm"==n.currentComponent&&n.router.url.includes("insurance-in-progress")),e.R7$(),e.Y8G("noAction",n.getClass("reasons")&&n.getClass("support-information")&&n.getClass("confirm-insurance-eligibility"))("checkValidity",n.isCompleted)("active",n.isTapActive("reasons")||n.isTapActive("support-information")||n.isTapActive("confirm-insurance-eligibility"))("complete",n.isTabCompleted("reasons")&&n.isTabCompleted("support-information")&&n.isTabCompleted("c
1onfirm-insurance-eligibility"))("hideFooter",n.ishideFooter)("actionLabel","therapyPriceBreakdown"==n.currentComponent?"Continue To Checkout":n.buttonText),e.R7$(),e.Y8G("ngIf","cpapReasons"===n.currentComponent),e.R7$(),e.Y8G("ngIf","cpapSupportInformation"===n.currentComponent),e.R7$(),e.Y8G("noAction",n.getClass("cpap-mask-select")&&n.getClass("mask-display")&&n.getClass("therapy-price-breakdown"))("checkValidity",n.isCompleted)("active",n.isTapActive("cpap-mask-select")||n.isTapActive("mask-display")||n.isTapActive("therapy-price-breakdown"))("complete",n.isTabCompleted("cpap-mask-select")&&n.isTabCompleted("mask-display")&&n.isTabCompleted("therapy-price-breakdown"))("hideFooter",n.ishideFooter)("actionLabel","therapyPriceBreakdown"==n.currentComponent?"Continue To Checkout":n.buttonText),e.R7$(),e.Y8G("ngIf","cpapMaskSelect"===n.currentComponent),e.R7$(),e.Y8G("ngIf","cpapMaskDisplay"===n.currentComponent),e.R7$(),e.Y8G("ngIf","therapyPriceBreakdown"===n.currentComponent),e.R7$(),e.Y8G("noAction",n.getClass("cpap-progress")&&n.getClass("cpap-delivered"))("checkValidity",n.isCompleted)("active",n.isTapActive("cpap-progress")||n.isTapActive("cpap-delivered"))("complete",n.isTabCompleted("cpap-progress")&&n.isTabCompleted("cpap-delivered"))("hideFooter",n.ishideFooter)("actionLabel",n.buttonText),e.R7$(),e.Y8G("ngIf","cpapprogress"===n.currentComponent))},dependencies:[b.YU,b.bT,N.i,A.t,U.l,V.j,H.W,$.n,D.S,Ce,ve,Fe,qe,et,dt],styles:['[_ngcontent-%COMP%]:root{--primary-color: "";--secondary-color: "";--dark-secondary-color: "";--welcome-column-header: "";--foreground: "";--alt-foreground: "";--error-color: "";--primary-text-color: "";--secondary-text-color: "";--dark-secondary-text-color: "";--sleep-risk-text: "";--header-background: "";--primary-gradient: "";--footer-background: ""}[_nghost-%COMP%]{display:block}[_nghost-%COMP%]   .visiblity[_ngcontent-%COMP%]{visibility:hidden}@media (max-width: 767px){[_nghost-%COMP%]   [_ngcontent-%COMP%]:has(.step-one, .without-padding)[_ngcontent-%COMP%]{background-color:var(--foreground);padding:0}}']})}return i})();var Et=_(2644);const te=()=>["3B_luna_II","3B_G3"];function At(i,r){1&i&&(e.j41(0,"div",11),e.EFF(1," THANK YOU FOR CHOOSING BETTERNIGHT AS YOUR THERAPY PROVIDER "),e.k0s())}function jt(i,r){if(1&i){const t=e.RV6();e.j41(0,"p",12),e.EFF(1," Want to access your therapy setup video? "),e.j41(2,"a",13),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.setVideoOnModal("maskTypeVideo","maskTypeImage"))}),e.EFF(3,"Click Here"),e.k0s()()}}function Gt(i,r){if(1&i){const t=e.RV6();e.j41(0,"p",12),e.EFF(1," Want to access insurance information explanations? "),e.j41(2,"a",13),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.insuranceLearnMore())}),e.EFF(3,"Click Here"),e.k0s()()}}function Bt(i,r){if(1&i){const t=e.RV6();e.j41(0,"p",12),e.EFF(1," Want to access answers to frequently asked questions? "),e.j41(2,"a",13),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(null==n.navService?null:n.navService.showModalForTerms())}),e.EFF(3,"Click Here"),e.k0s()()}}function Dt(i,r){if(1&i&&(e.j41(0,"bn-card",14)(1,"content")(2,"p"),e.EFF(3," We understand that getting started with therapy can be overwhelming. That\u2019s why we offer a complimentary virtual appointment with a BetterNight Sleep Specialist. During this appointment, our expert will guide you through the setup process, answer any questions you may have, and provide helpful tips for using your therapy device effectively. To schedule your appointment, click the button below. "),e.k0s(),e.j41(4,"div",15)(5,"a",16),e.EFF(6," Schedule FREE Appointment "),e.k0s()()()()),2&i){const t=e.XpG(2);e.R7$(5),e.FS9("href",t.calendlyLink,e.B4B)}}function Ut(i,r){if(1&i){const t=e.RV6();e.j41(0,"bn-card",17)(1,"content")(2,"p"),e.EFF(3," Keeping up with the replacement schedule for parts is an integral part of ensuring you get the most out of your therapy device. When you are eligible for any new supplies, BetterNight will contact you via email, text message or phone call to place your order. This service is available for cash pay patients and those using qualified HMO & PPO plans. "),e.k0s(),e.j41(4,"div",15)(5,"a",18),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.openLink("assets/pdf/BN_Resupply-Form_2025.pdf"))}),e.EFF(6," View Supply Schedule "),e.k0s()()()()}}function Vt(i,r){if(1&i&&e.nrm(0,"p",22),2&i){const t=e.XpG(3);
1e.Y8G("innerHTML",t.getMaskTitle(t.dataService.phoneNumber),e.npT)}}function Ht(i,r){if(1&i){const t=e.RV6();e.j41(0,"p"),e.EFF(1," Congratulations on starting therapy. Please begin using treatment right away. For more detailed information about your therapy device, please review these "),e.j41(2,"span",23),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.setVideoOnModal("maskTypeVideo","maskTypeImage"))}),e.EFF(3,"instructions"),e.k0s(),e.EFF(4,". If you have any questions, please call us at "),e.j41(5,"a",24),e.EFF(6),e.k0s(),e.EFF(7,". We\u2019re always happy to help! "),e.k0s()}if(2&i){const t=e.XpG(3);e.R7$(5),e.Mz_("href","tel:",t.dataService.phoneNumber,"",e.B4B),e.R7$(),e.JRh(t.dataService.phoneNumber)}}function $t(i,r){if(1&i){const t=e.RV6();e.j41(0,"div",15)(1,"button",25),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.openLink(n.maskObj[null==n.dataService.currentUserInfo?null:n.dataService.currentUserInfo.cpapDeviceType].providerSignInLink))}),e.EFF(2," View Therapy Data "),e.k0s(),e.j41(3,"p"),e.EFF(4),e.j41(5,"a",26),e.EFF(6,"Register Here"),e.k0s()(),e.j41(7,"p"),e.EFF(8),e.j41(9,"a",27),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.setVideoOnModal("providerTutorialVideo","providerTutorialThumbnail"))}),e.EFF(10,"Click Here"),e.k0s()()()}if(2&i){const t=e.XpG(3);e.R7$(4),e.SpI(" Haven\u2019t setup your ",t.maskObj[null==t.dataService.currentUserInfo?null:t.dataService.currentUserInfo.cpapDeviceType].linkText," account? "),e.R7$(),e.Y8G("href",t.maskObj[null==t.dataService.currentUserInfo?null:t.dataService.currentUserInfo.cpapDeviceType].providerSignUpLink,e.B4B),e.R7$(3),e.SpI(" Need to learn more about the ",t.maskObj[null==t.dataService.currentUserInfo?null:t.dataService.currentUserInfo.cpapDeviceType].linkText," platform? ")}}function Lt(i,r){if(1&i&&(e.j41(0,"bn-card",19)(1,"content"),e.DNE(2,Vt,1,1,"p",20)(3,Ht,8,3,"p",0)(4,$t,11,3,"div",21),e.k0s()()),2&i){const t=e.XpG(2);e.R7$(2),e.Y8G("ngIf",!e.lJ4(3,te).includes(t.cpapDeviceType)),e.R7$(),e.Y8G("ngIf",e.lJ4(4,te).includes(t.cpapDeviceType)),e.R7$(),e.Y8G("ngIf",null==t.maskObj[null==t.dataService.currentUserInfo?null:t.dataService.currentUserInfo.cpapDeviceType]?null:t.maskObj[null==t.dataService.currentUserInfo?null:t.dataService.currentUserInfo.cpapDeviceType].showLinks)}}function Yt(i,r){if(1&i){const t=e.RV6();e.j41(0,"bn-card",28)(1,"content")(2,"p"),e.EFF(3," BetterNight\u2019s Patient Portal is a FREE self-service tool which allows you to enjoy 24/7 access to view and pay your invoices through a convenient, safe, and secure environment. "),e.k0s(),e.j41(4,"div",15)(5,"button",25),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.openLink("https://sleepdata.hmebillpay.com/"))}),e.EFF(6," Access Patient Portal "),e.k0s()()()()}}function Xt(i,r){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"div",29),e.bIt("bnClickOutSide",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.closeVideo())}),e.j41(2,"div")(3,"div",30)(4,"div",31)(5,"video",32),e.bIt("contextmenu",function(){return e.eBV(t),e.Njj(!1)}),e.k0s(),e.j41(6,"div",33),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.videoPlay())}),e.nrm(7,"img",34),e.j41(8,"a",35),e.nrm(9,"img",36),e.k0s()()()(),e.j41(10,"div",37),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.closeVideo())}),e.nrm(11,"i",38),e.k0s()()()()}if(2&i){const t=e.XpG(2);e.ZvI("popup-modal ",t.showModal,""),e.R7$(5),e.Y8G("src",t.maskTypeVideo,e.B4B),e.R7$(2),e.FS9("src",t.maskTypeImage,e.B4B)}}function zt(i,r){if(1&i&&(e.j41(0,"div")(1,"div",2),e.DNE(2,At,2,0,"div",3),e.j41(3,"div"),e.DNE(4,jt,4,0,"p",4)(5,Gt,4,0,"p",4)(6,Bt,4,0,"p",4),e.k0s()(),e.j41(7,"div",5),e.DNE(8,Dt,7,1,"bn-card",6)(9,Ut,7,0,"bn-card",7)(10,Lt,5,5,"bn-card",8)(11,Yt,7,0,"bn-card",9),e.k0s(),e.DNE(12,Xt,12,5,"div",10),e.k0s()),2&i){const t=e.XpG();e.R7$(2),e.Y8G("ngIf",!(null!=t.navService&&t.navService.showModal)),e.R7$(2),e.Y8G("ngIf",!(null!=t.navService&&t.navService.showModal)&&t.maskTypeVideo),e.R7$(),e.Y8G("ngIf",!(null!=t.navService&&t.navService.showModal)),e.R7$(),e.Y8G("ngIf",!(null!=t.navService&&t.navService.showModal)),e.R7$(2),e.Y8G("ngIf",!(null!=t.navService&&t.navService.showModal)),e.R7$(),e.Y8G("ngIf",!(null!=t.navService&&t.navService.showModal)),e.R7$(),e.Y8G("ngIf",!(null!=t.navService&&t.navService.showModal)),e.R7$(),e.Y8G("ngIf",!(null!=t.navService&&t.navService.showModal)),e.R7$(),e.Y8G("ngIf","show"===t.showModal||"show play"===t.showModal)}}function qt(i,r){if(1&i&&e.nrm(0,"bn-termcondition",39),2&i){const t=e.XpG();e.Y8G("faQuestionSet",t.faQuestionSet)("isDirectiveAdded",!0)}}let ne=(()=>{class i{constructor(t,o,n,a){this.dataService=t,this.apiService=o,this.navService=n,this.router=a,this.playVideo=!1,this.showModal="",this.cpapDeviceType="",this.maskObj={philips_dreamstation_1:{maskTypeVideo:"../../../assets/videos/philipsold.mp4",maskTypeImage:"../../../assets/img/dreamstation-1.png",providerTutorialVideo:"../../../assets/videos/PatientInspiration-Philips-Respironics.mp4",providerTutorialThumbnail:"../../../assets/dreammapper.jpg",providerSignInLink:"https://www.mydreammapper.com/Account/LogOn",providerSignUpLink:"https://www.mydreammapper.com/Account/Register",therapyData:"BetterNight partners with Philips DreamMapper to provide you with    a sleep apnea app. DreamMapper keeps you informed about your mask    fit and therapy hours, allows you to track y
1our progress and    provides guides and videos to help you get the most from your    therapy. If you have any questions, please call us at \n    <a href='tel:__PHONENUMBER__' class='link'>__PHONENUMBER__</a>. We\u2019re always happy to help!",linkText:"DreamMapper",showLinks:!0},philips_dreamstation_2:{maskTypeVideo:"../../../assets/videos/Philips_DreamStation_2_CPAP_Setup_and_Use.mp4",maskTypeImage:"../../../assets/img/dreamstation-2.png",providerTutorialVideo:"../../../assets/videos/PatientInspiration-Philips-Respironics.mp4",providerTutorialThumbnail:"../../../assets/dreammapper.jpg",providerSignInLink:"https://www.mydreammapper.com/Account/LogOn",providerSignUpLink:"https://www.mydreammapper.com/Account/Register",therapyData:"BetterNight partners with Philips DreamMapper to provide you with      a sleep apnea app. DreamMapper keeps you informed about your mask      fit and therapy hours, allows you to track your progress and      provides guides and videos to help you get the most from your      therapy. If you have any questions, please call us at \n    <a href='tel:__PHONENUMBER__' class='link'>__PHONENUMBER__</a>. We\u2019re always happy to help!",linkText:"DreamMapper",showLinks:!0},resmed:{maskTypeVideo:"",maskTypeImage:"../../../assets/airsense-10.png",providerTutorialVideo:"../../../assets/videos/myAirByResmed.mp4",providerTutorialThumbnail:"../../../assets/bn-myair-video.png",providerSignInLink:"https://myair.resmed.com/",providerSignUpLink:"https://myair.resmed.com/account-registration",therapyData:"BetterNight partners with ResMed MyAir to provide you with an      easy-to-use online support program and app. MyAir empowers      patients to stay engaged with their therapy by providing nightly      sleep data and interactive coaching. If you have any questions, please call us at \n    <a href='tel:__PHONENUMBER__' class='link'>__PHONENUMBER__</a>. We\u2019re always happy to help!",linkText:"MyAir",showLinks:!0},resmed_airsense_11:{maskTypeVideo:"../../../assets/videos/AirSense11_Using_your_AirSense_11_Vid.mp4",maskTypeImage:"../../../assets/airsense-11.png",providerTutorialVideo:"../../../assets/videos/myAirByResmed.mp4",providerTutorialThumbnail:"../../../assets/bn-myair-video.png",providerSignInLink:"https://myair.resmed.com/",providerSignUpLink:"https://myair.resmed.com/account-registration",therapyData:"BetterNight partners with ResMed MyAir to provide you with an      easy-to-use online support program and app. MyAir empowers      patients to stay engaged with their therapy by providing nightly      sleep data and interactive coaching. If you have any questions, please call us at \n    <a href='tel:__PHONENUMBER__' class='link'>__PHONENUMBER__</a>. We\u2019re always happy to help!",linkText:"MyAir",showLinks:!0},"3B_luna_II":{maskTypeVideo:"../../../assets/videos/3B Luna II Video.mp4",maskTypeImage:"../../../assets/img/3B Luna II Thumbnail.jpg",providerTutorialVideo:"",providerTutorialThumbnail:"",providerSignInLink:"",providerSignUpLink:"",therapyData:"Congratulations on starting therapy. Please begin using treatment right away. For more detailed information about your therapy device, please review these <a href='../../../assets/videos/3B Luna II Video.mp4'  target=\"_blank\" class='link'>instructions</a>. If you have any questions, please call us at <a href='tel:__PHONENUMBER__' class='link'>__PHONENUMBER__</a>. We\u2019re always happy to help!",linkText:"",showLinks:!1},"3B_G3":{maskTypeVideo:"../../../assets/videos/G3 Video.mp4",maskTypeImage:"../../../assets/img/G3 Thumbnail.png",providerTutorialVideo:"",providerTutorialThumbnail:"",providerSignInLink:"",providerSignUpLink:"",therapyData:"Congratulations on starting therapy. Please begin using treatment right away. For more detailed information about your therapy device, please review these <a href='../../../assets/videos/G3 Video.mp4'  target=\"_blank\" class='link'>instructions</a>. If you have any questions, please call us at <a href='tel:__PHONENUMBER__' class='link'>__PHONENUMBER__</a>. We\u2019re always happy to help!",linkText:"",showLinks:!1},resvent_ibreeze:{maskTypeVideo:"../../../assets/videos/Resvent-video.mp4",maskTypeImage:"../../../assets/Resvent_Video_Thumbnail.jpg",providerTutorialVideo:"",providerTutorialThumbnail:"",providerSignInLink:"",providerSignUpLink:"",therapyData:"Congratulations on starting therapy. Please begin using treatment right away. For more detailed information about your therapy device, please review these <a class='link' href='../../assets/pdf/Resvent Wifi.pdf' download> instructions</a>. If you have any questions, please call us at <a href='tel:__PHONENUMBER__' class='link'>__PHONENUMBER__</a>. We\u2019re always happy to help!",linkText:"",showLinks:!1}},this.faQuestionSet=[{question:"Why is there air coming out of my mask / leaking from my mask?",answer:["1. Try to pinpoint where the air is coming from. If the air is coming from the front of the mask, this is where the exhalation port is located and this is completely normal. The exhalation port is a safety mechanism that allows your exh
1aled carbon dioxide to be released from the mask.","2. If the air is leaking into your eyes or from the bottom of the mask, you may need to be resized or tighten the mask. Your CPAP device has a Mask Fit Test in the Patient Menu / MyOptions Menu to see if tightening or adjusting the mask resolves the issue.","3. If the air is leaking from your nasal or full face mask while side sleeping, this suggests that your pillow is dislodging the mask. A CPAP Contour Pillow (available from Sleep Data) may be the solution."]},{question:"Why can\u2019t I keep my mouth closed while my mask is on?",answer:["1. When using a nasal mask or nasal pillows it is beneficial to be able to breathe in and out through your nose. This makes the CPAP more effective. However, the airflow can be drying and lead to congestion or a runny nose. Increasing the humidity in the Patient Menu can help relieve these symptoms. If this does not help a chin strap may be necessary.","2. If you normally find it necessary to breathe through your mouth while awake due to chronic sinus issues, switch to a full face mask as a last resort."]},{question:"Why is my mask causing skin irritation?",answer:["1. Nasal masks: CPAP masks are actually designed to fit with minimal pressure on the face. Loosening the mask may actually improve both mask function and comfort! So, try loosening the mask a little bit at a time and then turn on the CPAP device to check that it is still maintaining a seal. If that does not help, mask liners (RemZzzs) or nasal boomerang pads will sit between your mask and skin, reducing direct skin-to-mask contact. For immediate relief, Lanolin may be applied to affected areas to reduce friction and heal damaged skin. Be sure to avoid any petroleum based products like Vaseline as they can degrade the mask material.","2. Full Face Mask covering mouth and nose: Follow the steps above. If the issue is not resolved, a transition to a hybrid full face mask that covers the mouth and sits under the nose can reduce tension on the bridge of the nose."]},{question:"Why does the inside of my nose hurt / is bloody / is very dry?",answer:["1. With nasal pillows, try a different sized pillow and rotate between the sizes if the nostrils become sore.","2. With pillows and other mask styles, attempt to increase humidity or utilize saline nasal gel / Aquaphor."]},{question:"What do I do when the air is too strong?",answer:["1. Adjust your ramp time in the Patient Menu in order to allow the airflow to slowly ramp to your prescribed pressure over an extended period of time. For DreamStation devices, ensure that you are pressing the rectangular ramp button at the top of your machine after turning on the device to initiate ramp.","2. If using nasal pillows, it may feel better to switch to a nasal mask that covers the nose. The airflow will not feel as forceful or abrasive."]},{question:"How do I know if my mask is fitting correctly?",answer:["1. Perform the Mask Fit Test in your Patient Menu. For nasal pillows, ensure you do not feel air coming out from around your nostrils.","2. Nasal and full face masks should not leak air anywhere they touch the skin. The most common site for leaks include the bridge of the nose or along the bottom of each mask. If a leak is present the mask may need to be tightened a bit (remember masks are NOT designed to be worn very tightly) or perhaps the cushion is a size too large. This may mean the mask is not adjusted tight enough or that the cushion size is too large.",'3. Verify when the last time you received the cushion / headgear and how often they are being cleaned. As a cushion ages it may appear clean, however, the natural "stickiness" disappears and it begins to look shiny and does not seal unless additional pressure is applied.']},{question:"What do I do when my mask is leaving marks on my face?",answer:["1. CPAP masks are actually designed to fit with minimal pressure on the face. Loosening the mask may actually improve both mask function and comfort! So, try loosening the mask a little bit at a time and then turn on the CPAP device to check that it is still maintaining a seal. If this does not help, utilize mask liners (RemZzzs).",'2. Over tightening is common due to poor cushion / headgear quality. Verify when the last time you received the cushion / headgear was and how often they are being cleaned. As a cushion ages it may appear clean, however, the natural "stickiness" disappears and it begins to look shiny and does not seal unless additional pressure is applied.']},{question:"How do I clean my mask?",answer:["1. Wipe down the cushion daily with a non-alcoholic sanitizing wipe. Once a week, disassemble your mask and soak it in warm, soapy water. It is recommended to use a mild dish detergent (preferably no fragrance). Scrub off any visible residue with a soft toothbrush and let the equipment soak for 15 mins. Rinse the soap off and let it air dry."]},{question:"Why is my mask pulsing on my face when I breathe?",answer:["1. This is an indicator that the mask needs to be tightened. Tighten your mask to your comfort. If you cough, sneeze or speak with a full face mask, pulsing is normal at this time."]},{question:"How often do I replace my mask?",answer:["1. It is recommended to replace your nasal cushion or pillow every two weeks, full face mask cushion once a month, the mask frame every three months and the headgear every 6 months. Sleep Data has a supply renewal system that will notify you when you are due for necessary replacement parts. Keep in mind that renewal follow up times may be affected by your insurance provider. If you have not received a call or would like to check in on your renewal schedule, you can reach out to: 619-780-0796 / [email protected] for an update or assistance with your supplies."]},{question:"Am I able to sleep in any body position while I use my therapy?",answer:["1. You are able to sleep in whichever position feels most comfortable for you. While side sleeping is achievable with all mask types, full face masks may require a CPAP Contour Pillow (available from Sleep Data) to reduce positional leakage. Stomach sleeping is possible, but may 
1not be the most comfortable position. If you are inclined to stomach sleeping and can tolerate breathing in and out through your nose throughout the day, a nasal pillow mask may benefit you the most, since they have the smallest \u201cfootprint\u201d."]},{question:"May I wear a full face mask with facial hair?",answer:["1. Facial hair generally does not affect mask seal quality, as long as it is tightened enough. Facial hair should not restrict you from having the most comfortable mask for your therapy experience."]}],n.currentPage=["SLEEP APNEA TREATMENT","SUPPORT"];const{isVerified:c,oneTimePasswordConfirmed:d,isEmergencyContactViwed:h}=this.dataService.currentUserInfo;let{uiState:g}=this.dataService.currentUserInfo;if(c&&null!=d&&h);else{g=g.includes("?")?"?"+g.split("?")[1]:"";const x=`cpap/notification-preference/${c?null==d?"text":"emergency-contact":"email"}${g}`;this.router.navigateByUrl(x).then(T=>{T||this.router.navigateByUrl(x)})}}ngOnInit(){this.calendlyLink=this.dataService.currentUserInfo.shortioDomain+"/hIs5Uv",this.getUserMaskType()}getUserMaskType(){this.apiService.getApi(this.dataService.serverAddress+"service/v1/cpap/user-mask-type/"+this.dataService.currentUserInfo.userId).subscribe(o=>{switch(JSON.parse(JSON.stringify(o)).data.mask_type){case"f20":this.maskObj.resmed.maskTypeVideo="assets/videos/ResMed_F20_Final.mp4";break;case"n20":this.maskObj.resmed.maskTypeVideo="assets/videos/ResMed_N20_Finals_1.mp4";break;case"p10":this.maskObj.resmed.maskTypeVideo="assets/videos/ResMed_P10_Final_1.mp4"}this.cpapDeviceType=this.dataService.currentUserInfo.cpapDeviceType,this.maskTypeVideo=this.maskObj[this.cpapDeviceType].maskTypeVideo},o=>{console.log(o)})}openLink(t){window.open(t)}getMaskTitle(t){return this.maskObj[this.dataService.currentUserInfo.cpapDeviceType].therapyData.replace(/__PHONENUMBER__/g,t)}videoPlay(){this.showModal="show play",this.vid=document.getElementById("instruction-video"),this.vid.play()}closeVideo(){this.showModal="",this.vid.pause(),this.vid.currentTime=0,this.navService.showModal=!1}setVideoOnModal(t,o){this.showModal="show",this.navService.showModal=!1,this.navService.showModalOnClick=!0,this.maskTypeVideo=this.maskObj[this.dataService.currentUserInfo.cpapDeviceType][t],this.maskTypeImage=this.maskObj[this.dataService.currentUserInfo.cpapDeviceType][o]}insuranceLearnMore(){this.router.navigateByUrl(`${this.dataService.module}/learn-more`)}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(O.u),e.rXU(k.G),e.rXU(S.o),e.rXU(y.Ix))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["bn-therapy-maintenance"]],decls:2,vars:2,consts:[[4,"ngIf"],[3,"faQuestionSet","isDirectiveAdded",4,"ngIf"],[1,"flex-info"],["class","title",4,"ngIf"],["class","text",4,"ngIf"],[1,"grid","two"],["cardTitle","THERAPY SUPPORT",4,"ngIf"],["cardTitle","Therapy Maintenance",4,"ngIf"],["cardTitle","View Your Therapy Data","class","text-center",4,"ngIf"],["cardTitle","Online Payment","class","text-center",4,"ngIf"],[3,"class",4,"ngIf"],[1,"title"],[1,"text"],["href","javascript:void(0)",1,"link",3,"click"],["cardTitle","THERAPY SUPPORT"],[1,"center"],["type","button","target","_blank",1,"buttonLink",2,"padding","-1px 15px",3,"href"],["cardTitle","Therapy Maintenance"],["type","button","href","../../../assets/pdf/BN_Resupply-Form_2025.pdf","download","",1,"button",3,"click"],["cardTitle","View Your Therapy Data",1,"text-center"],[3,"innerHTML",4,"ngIf"],["class","center",4,"ngIf"],[3,"innerHTML"],[1,"link",3,"click"],[1,"link",3,"href"],["type","button",3,"click"],["target","_blank ",1,"link","nowrap",3,"href"],["href","javascript:void(0)",1,"link","nowrap",3,"click"],["cardTitle","Online Payment",1,"text-center"],[3,"bnClickOutSide"],[1,"video-box"],[1,"video"],["id","instruction-video","width","50%","height","50%","controlsList","nodownload","controls","",3,"contextmenu","src"],[1,"thumbnail",3,"click"],["alt","",3,"src"],["href","javascript:void(0)",1,"btn-play"],["src","../../../assets/video-play.png","alt",""],[1,"close",3,"click"],[1,"fas","fa-times-circle"],[3,"faQuestionSet","isDirectiveAdded"]],template:function(o,n){1&o&&e.DNE(0,zt,13,9,"div",0)(1,qt,1,2,"bn-termcondition",1),2&o&&(e.Y8G("ngIf",!n.navService.showCloseButton),e.R7$(),e.Y8G("ngIf",(null==n.navService?null:n.navService.showModal)&&"show"!==n.showModal))},dependencies:[b.bT,ee.l,N.i,Et.R],styles:['[_ngcontent-%COMP%]:root{--primary-color: "";--secondary-color: "";--dark-secondary-color: "";--welcome-column-header: "";--foreground: "";--alt-foreground: "";--error-color: "";--primary-text-color: "";--secondary-text-color: "";--dark-secondary-text-color: "";--sleep-risk-text: "";--header-background: "";--primary-gradient: "";--footer-background: ""}[_nghost-%COMP%]{display:block;padding:30px 80px}@media (max-width: 767px){[_nghost-%COMP%]{padding:30px 15px}}[_nghost-%COMP%]   .grid[_ngcontent-%COMP%]{grid-gap:15px;position:relative}[_nghost-%COMP%]   .grid[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{position:absolute;right:0;top:-41px;z-index:1;margin:0}@media (max-width: 767px){[_nghost-%COMP%]   .grid[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{position:static;text-align:center}}[_nghost-%COMP%]   .grid[_ngcontent-%COMP%]   content[_ngcontent-%COMP%]{height:325px}[_nghost-%COMP%]   .grid[_ngcontent-%COMP%]   content[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{min-height:125px}@media (max-width: 767px){[_nghost-%COMP%]   .grid[_ngcontent-%COMP%]   content[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{min-height:auto}}[_nghost-%COMP%]   .grid[_ngcontent-%COMP%]   .center[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{display:block;margin:20px auto}[_nghost-%COMP%]   .grid[_ngcontent-%COMP%]   .center[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%]   .flex-info[_ngcontent-%COMP%]{display:flex;margin-bottom:5px}@media (max-width: 991px){[_nghost-%COMP%]   .flex-info[_ngcontent-%COMP%]{display:block;text-align:center}}[_nghost-%COMP%]   .flex-info[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{flex:1}@media (max-width: 991px){[_nghost-%COMP%]   .flex-info[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin-bottom:8px}}[_nghost-%COMP%]   .flex-info[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;text-align:right}[_nghost-%COMP%]   .flex-info[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]   .link[_ngcontent-%COMP%]{white-space:nowrap}@media (max-width: 991px){[_nghost-%COMP%]   .flex-info[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{text-align:center}}.buttonLink[_ngcontent-%COMP%]{height:40px;border-radius:4px;border:none;color:#fff;font-family:inherit;font-size:15px;font-weight:700;cursor:pointer;background:var(--primary-gradient);text-transform:uppercase;width:259px;display:block;margin:20px auto;line-height:40px;text-decoration:none}.button[_ngcontent-%COMP%]{height:40px;border-radius:4px;border:none;color:#fff;font-family:inherit;font-size:15px;font-weight:700;padding:0 15px;cursor:pointer;background:var(--primary-gradient);text-transform:uppercase;width:259px;display:block;margin:20px auto;line-height:40px;text-decoration:none}.button[_ngcontent-%COMP%]:active{background:var(--primary-gradient)}.popup-modal[_ngcontent-%COMP%]{background:#223259b3;position:absolute;inset:0;padding:35px 70px;z-index:9;display:none}@media (max-width: 991px){.popup-modal[_ngcontent-%COMP%]{margin-top:70px}}@media (max-width: 767px){.popup-modal[_ngcontent-%COMP%]{padding:10px}}.popup-modal[_ngcontent-%COMP%]   .close[_ngcontent-%COMP%]{position:absolute;right:25px;top:25px;cursor:pointer;font-size:25px;opacity:.7}@media (max-width: 767px){.popup-modal[_ngcontent-%COMP%]   .close[_ngcontent-%COMP%]{font-size:20px;right:20px;top:20px}}.popup-modal[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{background:var(--foreground);box-shadow:0 0 29.751px #c0d3ea70;border-radius:8px;height:auto;width:100%;padding:10px;position:relative}.popup-modal[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{max-height:85vh;width:100%;padding:20px;background:#fff;border-radius:8px;display:flex;flex-direction:column;font-weight:400;overflow:auto}.popup-modal[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]   .video[_ngcontent-%COMP%]{max-width:900px;min-height:auto}@media (max-width: 767px){.popup-modal[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]   .video[_ngcontent-%COMP%]{max-width:350px}}.popup-modal[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]   .video[_ngcontent-%COMP%]   video[_ngcontent-%COMP%]{display:none}.popup-modal[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]   .video[_ngcontent-%COMP%]   .thumbnail[_ngcontent-%COMP%]{height:100%;display:flex}.popup-modal[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > .title[_ngcontent-%COMP%]{font-weight:700;font-size:21px}.popup-modal.show[_ngcontent-%COMP%]{display:block}.popup-modal.show.play[_ngcontent-%COMP%]   video[_ngcontent-%COMP%]{display:block!important}.popup-modal.show.play[_ngcontent-%COMP%]   .thumbnail[_ngcontent-%COMP%]{display:none!important}']})}return i})();var Wt=_(2524);function Jt(i,r){1&i&&e.nrm(0,"bn-spinner")}function Qt(i,r){if(1&i){const t=e.RV6();e.j41(0,"bn-payment",4),e.bIt("paymentSuccess",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.paymentSuccess(n))}),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("ignoreInsurance",t.isIgnoreInsurance())("paymentType",t.paymentType)("paymentData",t.paymentData)("showTermCondition",!0)("termConditionObj",t.termConditionObj)}}let K=(()=>{class i{constructor(t,o,n,a){this.apiService=t,this.dataService=o,this.nav=n,this.router=a,this.paymentData=null,this.paymentType={paymentTitle:"Confirm and pay",orderSummaryTitle:"Complete Therapy Kit",paymentFor:"cpap"},this.termConditionObj={title:"BetterNight\u2019s Autopay and E-delivery Payment Agreement",description:'\n    <p>\n      We require all patients with recurring rentals or resupply needs to keep a <strong>credit or debit card on file</strong>.\n      This secure payment method will be used to automatically process any future charges related to your therapy equipment or supply orders.\n      <strong>
1BetterNight will provide 10-days prior notification for any pending charges.</strong>\n    </p>\n    <p><strong>Why This Helps You</strong></p>\n    <ul class="custom-checklist">\n      <li><strong>Uninterrupted Service:</strong> No more delays in scheduling or receiving your equipment or supplies.</li>\n      <li><strong>Simplified Billing:</strong> Autopay means no more manual payments or surprise bills.</li>\n      <li><strong>Fewer Billing Issues:</strong> Helps reduce outstanding balances and ensures compliance with insurance and service agreements.</li>\n      <li><strong>Safe & Secure:</strong> Your card details are encrypted and stored securely in compliance with industry standards.</li>\n    </ul>\n  '},this.nav.currentPage=["SLEEP APNEA TREATMENT","CONFIRM"]}ngOnInit(){this.initilizeComponent()}initilizeComponent(){var t=this;return(0,F.A)(function*(){const{therapyDeviceTypeId:o,userType:n}=t.dataService.currentUserInfo,a=yield t.apiService.getTherapyTypes();if(a&&"object"==typeof a){const d=a.find(h=>{if(h.id==o)return h}).code.toLowerCase();t.apiService.getPaymentAmountForPaymentType(n,d).subscribe(h=>{t.getPaymentData(+h.payment[d])})}})()}isIgnoreInsurance(){return this.router.url.includes("cashpay")}getPaymentData(t){var o=this;return(0,F.A)(function*(){const n=o.dataService.serverAddress+`service/v1/payment/cpap/amount?ignoreInsurance=${o.isIgnoreInsurance()}`;yield o.apiService.getApi(n).subscribe(a=>{const c=JSON.parse(JSON.stringify(a));o.paymentData=c.result,o.paymentData.payment_amount=o.paymentData.insurance_applicable?o.paymentData.insurance.due_amount.toFixed(2):t.toFixed(2)})})()}paymentSuccess(t){console.log(JSON.stringify(t||"chargeResponse").substring(0,0)),this.router.navigate(["cpap/cpap-progress"]).then(o=>{o||this.router.navigate(["cpap/cpap-progress"])})}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(k.G),e.rXU(O.u),e.rXU(S.o),e.rXU(y.Ix))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["bn-cpappayment"]],decls:5,vars:2,consts:[["content",""],[4,"ngIf"],["id","final-step","cardTitle","FINAL STEP",1,"payment-method"],[3,"ignoreInsurance","paymentType","paymentData","showTermCondition","termConditionObj","paymentSuccess",4,"ngIf"],[3,"paymentSuccess","ignoreInsurance","paymentType","paymentData","showTermCondition","termConditionObj"]],template:function(o,n){1&o&&(e.DNE(0,Jt,1,0,"bn-spinner",1),e.j41(1,"bn-card",2)(2,"content",null,0),e.DNE(4,Qt,1,5,"bn-payment",3),e.k0s()()),2&o&&(e.Y8G("ngIf",!n.paymentData),e.R7$(4),e.Y8G("ngIf",n.paymentData))},dependencies:[b.bT,N.i,Wt.Y,A.t]})}return i})();function Kt(i,r){if(1&i&&(e.j41(0,"option",16),e.EFF(1),e.k0s()),2&i){const t=r.$implicit;e.FS9("id",t),e.FS9("value",t),e.R7$(),e.SpI(" ",t," ")}}function Zt(i,r){if(1&i){const t=e.RV6();e.j41(0,"bn-popup-modal",17),e.bIt("closeModel",function(n){e.eBV(t);const a=e.XpG();return e.Njj(a.closeVideo(n))}),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("videoUrl",t.currentMaskVideo)}}let oe=(()=>{class i{constructor(t,o){this.fb=t,this.navService=o,this.playVideo=!1,this.maskType=["p10","n20","f20","philips"],this.maskName=["ResMed AirFit P10 Nasal Pillow Mask","ResMed AirFit N20 Nasal Mask","ResMed AirFit F20 Full Face Mask","Philips Respironics DreamStation 1","Philips Respironics DreamStation 2"],this.videoUrls={"ResMed AirFit P10 Nasal Pillow Mask":{video:"assets/videos/ResMed_P10_Final_1.mp4",image:"assets/bn-therapy-video.png"},"ResMed AirFit N20 Nasal Mask":{video:"assets/videos/ResMed_N20_Finals_1.mp4",image:"assets/bn-therapy-video.png"},"ResMed AirFit F20 Full Face Mask":{video:"assets/videos/ResMed_F20_Final.mp4",image:"assets/bn-therapy-video.png"},"Philips Respironics DreamStation 1":{video:"assets/videos/philipsold.mp4",image:"assets/cpapold.jpg"},"Philips Respironics DreamStation 2":{video:"assets/videos/Philips_DreamStation_2_CPAP_Setup_and_Use.mp4",image:"assets/img/dreamstation-2-video.png"}},this.selectMaskForm=this.fb.group({mask:[""]})}ngOnInit(){this.currentMaskVideo=this.videoUrls["ResMed AirFit P10 Nasal Pillow Mask"].video,this.currentMaskImg=this.videoUrls["ResMed AirFit P10 Nasal Pillow Mask"].image,this.selectMaskForm.patchValue({mask:"ResMed AirFit P10 Nasal Pillow Mask"})}onSelectMask(){this.currentMaskVideo=this.videoUrls[this.selectMaskForm.get("mask").value].video,this.currentMaskImg=this.videoUrls[this.selectMaskForm.get("mask").value].image}videoPlay(){this.navService.showModalOnClick=!0,this.playVideo=!0}closeVideo(t){this.playVideo=t}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(P.ze),e.rXU(S.o))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["bn-cpap-internal"]],decls:22,vars:4,consts:[["cardTitle","CPAP INSTRUCTIONAL VIDEO"],[1,"title"],[2,"max-width","720px","margin","20p
1x auto 30px"],[1,"video-box"],[1,"input-control"],[3,"formGroup"],[1,"input-select"],["id","mask","formControlName","mask",3,"ngModelChange"],[3,"id","value",4,"ngFor","ngForOf"],["aria-hidden","true",1,"fas","fa-chevron-down"],["id","video-container",1,"video"],[3,"videoUrl","closeModel",4,"ngIf"],["id","video-overlay",1,"thumbnail",3,"click"],["alt","",1,"img-responsive",3,"src"],["href","javascript:void(0)",1,"btn-play"],["src","../../../assets/video-play.png","alt",""],[3,"id","value"],[3,"closeModel","videoUrl"]],template:function(o,n){1&o&&(e.j41(0,"bn-card",0)(1,"content")(2,"div",1),e.EFF(3," CONGRATULATIONS ON TAKING THE NEXT STEP TOWARDS A BETTER NIGHT\u2019S SLEEP "),e.k0s(),e.j41(4,"p",2),e.EFF(5," Your machine is being prepared for shipment. You can expect it to arrive within 3-5 business days. One of our Sleep Coaches will follow up with you in a few days to see how the treatment is going but if you have any questions prior to that, please call Sleep Data at (619) 299-6299. "),e.k0s(),e.j41(6,"div",3)(7,"p")(8,"b"),e.EFF(9,"Select your CPAP machine / mask type from the menu below and then watch the video for a step by step guide on how to use your machine."),e.k0s()(),e.j41(10,"div",4)(11,"form",5)(12,"div",6)(13,"select",7),e.bIt("ngModelChange",function(){return n.onSelectMask()}),e.DNE(14,Kt,2,3,"option",8),e.k0s(),e.nrm(15,"i",9),e.k0s()()(),e.j41(16,"div",10),e.DNE(17,Zt,1,1,"bn-popup-modal",11),e.j41(18,"div",12),e.bIt("click",function(){return n.videoPlay()}),e.nrm(19,"img",13),e.j41(20,"a",14),e.nrm(21,"img",15),e.k0s()()()()()()),2&o&&(e.R7$(11),e.Y8G("formGroup",n.selectMaskForm),e.R7$(3),e.Y8G("ngForOf",n.maskName),e.R7$(3),e.Y8G("ngIf",n.playVideo),e.R7$(2),e.Y8G("src",n.currentMaskImg,e.B4B))},dependencies:[b.Sq,b.bT,P.qT,P.xH,P.y7,P.wz,P.BC,P.cb,P.j4,P.JD,N.i,j.n],styles:['[_ngcontent-%COMP%]:root{--primary-color: "";--secondary-color: "";--dark-secondary-color: "";--welcome-column-header: "";--foreground: "";--alt-foreground: "";--error-color: "";--primary-text-color: "";--secondary-text-color: "";--dark-secondary-text-color: "";--sleep-risk-text: "";--header-background: "";--primary-gradient: "";--footer-background: ""}[_nghost-%COMP%]{display:block;padding:20px;text-align:center}[_nghost-%COMP%]   bn-card[_ngcontent-%COMP%]{height:auto}[_nghost-%COMP%]   .input-control[_ngcontent-%COMP%]{max-width:320px;margin:10px auto 20px}[_nghost-%COMP%]   .video[_ngcontent-%COMP%]{padding:0}@media (max-width: 767px){[_nghost-%COMP%]   .video[_ngcontent-%COMP%]{min-height:auto}}[_nghost-%COMP%]   .video[_ngcontent-%COMP%]   .thumbnail[_ngcontent-%COMP%]{cursor:pointer}[_nghost-%COMP%]   .video-box[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0 auto;max-width:575px}.thumbnail[_ngcontent-%COMP%]{width:100%;height:200px;text-align:center;display:flex;align-items:center;justify-content:center;position:relative;cursor:pointer}.thumbnail[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:100%;max-height:100%}.thumbnail[_ngcontent-%COMP%]   .btn-play[_ngcontent-%COMP%]{position:absolute}']})}return i})();const en=[{path:"cpap-home",component:B.Z,resolve:{session:f._},canActivate:[C.e]},{path:"payment-option/cpap",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"insurance/cpap",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"insurance-in-progress/cpap",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"notification-preference/email",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"notification-preference/emergency-contact",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"notification-preference/email/confirmation",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"notification-preference/text/confirmation",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"notification-preference/text",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"payment/cpap",component:K,resolve:{session:f._},canActivate:[C.e]},{path:"cashpay/payment/cpap",component:K,resolve:{session:f._},canActivate:[C.e]},{path:"therapy-maintenance",component:ne,resolve:{session:f._},canActivate:[C.e]},{path:"cpap-progress",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"cpap-delivered",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"support",component:(()=>{class i{constructor(t){this.router=t}ngOnInit(){this.router.navigateByUrl("cpap/therapy-maintenance")}static#e=this.\u0275fac=function(o){return new(o||i)(e.rXU(y.Ix))};static#t=this.\u0275cmp=e.VBU({type:i,selectors:[["bn-support-redirect"]],decls:0,vars:0,template:function(o,n){},encapsulation:2})}return i})(),resolve:{session:f._},canActivate:[C.e]},{path:"reasons",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"support-information",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"cpap-mask-select",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"insurance/cpap-mask-select",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"mask-display",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"insurance/mask-display",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"confirm-insurance-eligibility",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"therapy-price-breakdown",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"insurance-none/therapy-price-breakdown",component:v,resolve:{session:f._},canActivate:[C.e]},{path:"cpap-internal",component:oe,resolve:{session:f._},canActivate:[C.e]}];let tn=(()=>
1{class i{static#e=this.\u0275fac=function(o){return new(o||i)};static#t=this.\u0275mod=e.$C({type:i});static#n=this.\u0275inj=e.G2t({imports:[y.iI.forChild(en),y.iI]})}return i})(),nn=(()=>{class i{static#e=this.\u0275fac=function(o){return new(o||i)};static#t=this.\u0275mod=e.$C({type:i});static#n=this.\u0275inj=e.G2t({imports:[b.MD,tn,s.G]})}return i})()}}]);

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.