1import{b as F,h as O}from"./chunk-TCEX2SVM.js";import{m as h}from"./chunk-FFZFW6O4.js";import{a as R}from"./chunk-3WYUHSXD.js";import{B as P,G as w,l as C}from"./chunk-5UX7LOXR.js";import{b as f,d as k}from"./chunk-BSAB5FTB.js";import{T as M,f as B,g as x,v as T}from"./chunk-IVKO44MK.js";import{$b as a,D as v,Gb as b,Gc as m,Lb as g,Zb as s,_b as n,ac as S,pb as p,pc as y,ra as E,rc as _,wa as c}from"./chunk-GV4FS4I4.js";var u=(function(e){return e[e.GeneralMPCBudgetBill=1]="GeneralMPCBudgetBill",e[e.BudgetBillAmount=3]="BudgetBillAmount",e[e.RateChange=4]="RateChange",e[e.CanceledBill=5]="CanceledBill",e[e.MeterChange=6]="MeterChange",e[e.BillingPeriodOutsideNormalRange=7]="BillingPeriodOutsideNormalRange",e})(u||{});function A(e,i){e&1&&(n(0,"p"),m(1," You are currently enrolled in Budget Billing. The Bill Compare Tool in the Online Energy Checkup shows the Current Electric Service amount from your bill. This is the amount you would pay if you were not enrolled in Budget Billing. "),a())}function G(e,i){e&1&&(n(0,"p"),m(1," The Budget Bill amount is reviewed monthly and the bill amount could change based on your usage. Budget Billing keeps a running total of the difference in the dollar amount of what you were billed on the program and your actual usage. "),a())}function j(e,i){e&1&&(n(0,"p"),m(1," Bill analysis may not be available for this account due to a rate change. "),a())}function U(e,i){e&1&&(n(0,"p"),m(1," Bill analysis may not be available for months in which there is a canceled bill. "),a())}function D(e,i){e&1&&(n(0,"p"),m(1," Bill analysis may not be available for months in which there is a meter change. "),a())}function L(e,i){e&1&&(n(0,"p"),m(1," Bill analysis may not be available for months in which there is a billing period outside the normal range. "),a())}function Y(e,i){if(e&1&&(n(0,"div"),g(1,A,2,0,"p",9)(2,G,2,0,"p",9)(3,j,2,0,"p",9)(4,U,2,0,"p",9)(5,D,2,0,"p",9)(6,L,2,0,"p",9),a()),e&2){let d=i.$implicit,t=_();p(),s("ngIf",d===t.OpowerHBAErrors.GeneralMPCBudgetBill),p(),s("ngIf",d===t.OpowerHBAErrors.BudgetBillAmount),p(),s("ngIf",d===t.OpowerHBAErrors.RateChange),p(),s("ngIf",d===t.OpowerHBAErrors.CanceledBill),p(),s("ngIf",d===t.OpowerHBAErrors.MeterChange),p(),s("ngIf",d===t.OpowerHBAErrors.BillingPeriodOutsideNormalRange)}}var I=(()=>{let i=class i{constructor(){this.modalService=c(h),this.OpowerHBAErrors=u,this.hbaErrors=[]}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=b({type:i,selectors:[["occ-exception-modal"]],inputs:{hbaErrors:"hbaErrors",redirectToEnergyCheckup:"redirectToEnergyCheckup"},decls:12,vars:1,consts:[[1,"modal-header"],[1,"modal-title"],[1,"fa","fa-info-circle","icon-spacing-right"],["type","button","aria-label","Close",1,"btn-close","close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[4,"ngFor","ngForOf"],[1,"modal-footer"],["type","button",1,"btn","btn-primary-modal","btn-lg",3,"click"],[4,"ngIf"]],template:function(o,r){o&1&&(n(0,"div",0)(1,"h3",1),S(2,"i",2),m(3,"Online Energy Checkup"),a(),n(4,"button",3),y("click",function(){return r.modalService.hide()}),n(5,"span",4),m(6,"\xD7"),a()()(),n(7,"div",5),g(8,Y,7,6,"div",6),a(),n(9,"div",7)(10,"button",8),y("click",function(){return r.redirectToEnergyCheckup()}),m(11," Continue "),a()()),o&2&&(p(8),s("ngForOf",r.hbaErrors))},dependencies:[T,B,x],encapsulation:2});let e=i;return e})();var ue=(()=>{let i=class i{constructor(){this.formatService=c(P),this.commonService=c(k),this.featureFlagService=c(R),this.router=c(M),this.userService=c(w),this.modalService=c(h),this.productPortalService=c(O),this.opCo=this.userService.operatingCompany,this.accountType=this.userService.accountSummary.accountType}isEnergyAnalysisEligible(){return this.featureFlagService.isFeatureFlagEnabled("ENERGY_CHECKUP",this.opCo).pipe(v(t=>t&&this.userService.accountSummary.accountType===C.Residential))}loadOpowerAssets(t){let o=this.getOpowerUrl(t)+"embedded-api/core.js?auth-mode=oauth";return this.commonService.loadScript(o,"opowerScript")}onlineEnergyCheckup(t){this.opCo===f.MPC&&this.accountType===C.Residential?this.productPortalService.getProductStatusByName().subscribe({next:o=>{let{budgetBilling:r}=o;r&&r.status===F.Enrolled?this.openExceptionModal(t,[u.GeneralMPCBudgetBill]):this.redirectToEnergyCheckup(t)},error:o=>{this.redirectToEnergyCheckup(t)}}):this.redirectToEnergyCheckup(t)}getOpowerUrl(t){let o=window.location.hostname.startsWith("prelivea-"),r=window.OCC_ENVIRONMENT==="PR"&&!o,l="";switch(t){case f.APC:l="apc";break;case f.GPC:l="gpc";break;default:l="mspo";break}return"https://"+(r?l:"ei-"+l+"-stage")+".opower.com/ei/x/"}openExceptionModal(t,o){let r=null,l={hbaErrors:o,modalRef:null,redirectToEnergyCheckup:()=>{this.redirectToEnergyCheckup(t),r.hide()}};r=this.modalService.show(I,{initialState:l,class:"modal-info"}),l.modalRef=r}redirectToEnergyCheckup(t){this.router.navigate(["OnlineEnergyCheckup/Landing"],{queryParams:{acctno:this.formatService.formatAccountId(t)}})}};i.\u0275fac=function(o){return new(o||i)},i.\u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"});let e=i;return e})();export{ue as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.