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,UAAM,SAAN,UAAM,WAAN,GAAM,IAAN,GAAM,OAANA,MAAM,CAAGI,GAAH,CAAN;AACAJ,UAAM,SAAN,UAAM,WAAN,GAAM,IAAN,GAAM,OAANA,MAAM,CAAGK,QAAH,CAAN;AAEP,SAAKhE,6BAAL,CAAmCC,IAAnC,CAAuCC,gCAClCyD,MADkC,GAC5B;AACT,OAACI,GAAD,GAAO;AACL5B,wBAAgB,EAAE0B;AADb;AADE,KAD4B,CAAvC;AAMD;AAED;;;;;AAGAI,kBAAgB;AACd,SAAKjE,6BAAL,CAAmCC,IAAnC,CAAwC,IAAxC;AACD;;AAxMgC;;;mBAAtBhB,wBAAsBiF,sDAAAA,CAAAA,wDAAAA,GAAAA,sDAAAA,CAAAA,4DAAAA,GAAAA,sDAAAA,CAAAA,qFAAAA;AAAA;;;SAAtBjF;AAAsBkF,WAAtBlF,sBAAsB;AAAAmF,cAFrB;;;;;;;;;;;;;;;;;ACjBiC;AACD;AACvC;AACP;AACA;AACA,+BAA+B,uDAAc;AAC7C;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,wDAAU;AACzC;AACA,aAAa;AACb,SAAS;AACT;AACA,KAAK;AACL;;;;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA","sources":["./src/app/directives/phone-number/phone-number.directive.ts","./src/app/services/api/api.service.ts","./src/app/services/furniture-credit/furniture-credit.service.ts","./node_modules/rxjs/dist/esm/internal/firstValueFrom.js","./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"],"sourcesContent":["import { Directive, Input } from '@angular/core';\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n} from '@angular/forms';\n\n/**\n * Phone number must be 10 characters in length once stripped of parentheses, dashes,\n * periods, or spaces.\n *\n * @usageNotes\n * Can be used with reactive forms and with template-driven forms.\n *\n * @selector appPhoneNumber\n * @returns\n * ```javascript\n * { phoneInvalid: true } | null\n * ```\n */\n@Directive({\n selector: '[appPhoneNumber]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: PhoneNumberDirective,\n multi: true,\n },\n ],\n})\nexport class PhoneNumberDirective {\n @Input('appPhoneNumber') phone = '';\n\n constructor() {}\n\n validate(control: AbstractControl): ValidationErrors | null {\n return this.phone ? phoneNumberValidator(control) : null;\n }\n}\n\nexport const PHONE_VALID_REGEX = /^[(]?(\\d{3})[-.)]?[ ]?(\\d{3})[-.]?(\\d{4})\\b$/;\n\n/**\n * Phone number must be 10 characters in length once stripped of parentheses, dashes,\n * periods, or spaces.\n *\n * @returns\n * ```javascript\n * { phoneInvalid: true } | null\n * ```\n */\nexport const phoneNumberValidator = (\n control: AbstractControl\n): ValidationErrors | null => {\n const value = control.value;\n const phoneValid = PHONE_VALID_REGEX.test(value);\n\n return !phoneValid ? { phoneInvalid: true } : null;\n};\n\n/**\n * Strips phone number of parentheses, dashes, periods, or spaces.\n *\n * This is required to POST this data to the server.\n *\n * @param phone Phone number to clean up.\n * @returns I.e. 8595551234.\n */\nexport const stripPhoneNumber = (phone?: string) => {\n if (!phone) {\n return '';\n }\n\n return phone.replace(PHONE_VALID_REGEX, '$1$2$3');\n};\n","import { Injectable } from '@angular/core';\n\nimport { environment } from 'src/environments/environment';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ApiService {\n baseUrl = environment.apiUrl;\n\n constructor() {}\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, firstValueFrom } from 'rxjs';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\n\nimport {\n FinalFurnitureLoanApplication,\n IFurnitureCreditService,\n} from './furniture-credit.model';\nimport {\n FurnitureApplicationEmployerForm,\n FurnitureApplicationInformationForm,\n} from 'src/app/models/furniture-credit-form.model';\nimport { ApiService } from '../api/api.service';\nimport { ErrorMessageService } from '../error-message/error-message.service';\nimport { stripPhoneNumber } from 'src/app/directives/phone-number/phone-number.directive';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FurnitureCreditService implements IFurnitureCreditService {\n finalFurnitureLoanApplication =\n new BehaviorSubject(null);\n\n constructor(\n private api: ApiService,\n private http: HttpClient,\n private errorMessageService: ErrorMessageService\n ) {}\n\n /**\n * POST request for furniture loan.\n *\n * @param body Request body of type {FinalFurnitureLoanApplication}.\n * @param endpoint Defaults to 'loan/save'.\n * @returns Promise of type {FinalFurnitureLoanApplication}.\n */\n async postCreditApplication(\n body: FinalFurnitureLoanApplication,\n endpoint = 'loan/save'\n ): Promise {\n const url = `${this.api.baseUrl}${endpoint}`;\n\n const headers = new HttpHeaders({\n 'Content-Type': 'application/json',\n });\n\n this.errorMessageService.clearErrorMessages();\n\n return await firstValueFrom(\n this.http.post(url, body, {\n headers,\n })\n );\n }\n\n /**\n * Use this to update the {FinalFurnitureLoanApplication} after getting a response\n * from POST. This will update the local object with ID's.\n *\n * @param loan Entire loan object, {FinalFurnitureLoanApplication}.\n */\n setCreditAfterPost(loan: FinalFurnitureLoanApplication) {\n this.finalFurnitureLoanApplication.next({ ...loan });\n }\n\n /**\n * Furniture Loan Part #1 - Applicant Information.\n *\n * This will automatically set the {RequestCreditTypeCD} to `IND` and {RequestZip} to\n * the applicant's zip code.\n *\n * @param data Form data of type {FurnitureApplicationInformationForm}.\n * @returns Transformed {FinalFurnitureLoanApplication} object to use for POST to server.\n */\n setApplicantInformation(\n data: FurnitureApplicationInformationForm\n ): FinalFurnitureLoanApplication {\n this.finalFurnitureLoanApplication.next({\n ...this.finalFurnitureLoanApplication.value,\n LoanApplication: {\n ...this.finalFurnitureLoanApplication.value?.LoanApplication,\n DomainID: data.DomainID,\n RequestPurpose: data.RequestPurpose,\n RequestCreditTypeCD: 'IND',\n RequestZip: data.ZipCode,\n Over18: data.Over18,\n PrivacyPolicy: data.PrivacyPolicy,\n CommunicationConsent: data.CommunicationConsent,\n },\n Applicant: {\n ...this.finalFurnitureLoanApplication.value?.Applicant,\n ContactFirst: data.ContactFirst,\n ContactLast: data.ContactLast,\n ContactMiddle: data.ContactMiddle,\n PhoneNumber: stripPhoneNumber(data.PhoneNumber),\n PhoneNumberType: data.PhoneNumberType,\n EmailAddress: data.EmailAddress,\n },\n ApplicantAddress: {\n ...this.finalFurnitureLoanApplication.value?.ApplicantAddress,\n Address: data.Address,\n AptNumber: data.AptNumber,\n City: data.City,\n State: data.State,\n ZipCode: data.ZipCode,\n Years: data.Years,\n Months: data.Months,\n LivingSituation: data.LivingSituation,\n },\n ApplicantEmployment: {\n ...this.finalFurnitureLoanApplication.value?.ApplicantEmployment,\n EmploymentStatus: data.EmploymentStatus,\n },\n });\n\n return this.finalFurnitureLoanApplication.value!;\n }\n\n /**\n * Furniture Loan Part #2 - Applicant Employer.\n *\n * @param data Form data of type {FurnitureApplicationEmployerForm}.\n * @returns Transformed {FinalFurnitureLoanApplication} object to use for POST to server.\n */\n setApplicantEmployer(\n data: FurnitureApplicationEmployerForm\n ): FinalFurnitureLoanApplication {\n this.finalFurnitureLoanApplication.next({\n ...this.finalFurnitureLoanApplication.value,\n Applicant: {\n ...this.finalFurnitureLoanApplication.value?.Applicant,\n DateOfBirth: data.DateOfBirth,\n SSN: data.SSN,\n },\n LoanApplication: {\n ...this.finalFurnitureLoanApplication.value?.LoanApplication,\n CreditReportAuthorization: data.CreditReportAuthorization,\n },\n ApplicantEmployment: {\n ...this.finalFurnitureLoanApplication.value?.ApplicantEmployment,\n EmployerName: data.EmployerName ?? '',\n Position: data.Position,\n Years: data.Years,\n Months: data.Months,\n PhoneNumber: stripPhoneNumber(data.PhoneNumber),\n PayTypeCD: data.PayTypeCD,\n PayPeriod: data.PayPeriod,\n TakeHomePay: data.TakeHomePay,\n AnnualSalary: data.AnnualSalary ?? null,\n HourlyRate: data.HourlyRate ?? null,\n HoursPerWeek: data.HoursPerWeek ?? null,\n },\n ApplicantAdditionalIncome: {\n ...this.finalFurnitureLoanApplication.value?.ApplicantAdditionalIncome,\n OtherIncomes: data.OtherIncomes,\n MonthlyAdditionalIncome: data.MonthlyAdditionalIncome,\n },\n });\n\n console.log(this.finalFurnitureLoanApplication.value!);\n return this.finalFurnitureLoanApplication.value!;\n }\n\n /**\n * Clears out the following properties for applicant on change event:\n * * AnnualSalary\n * * HoursPerWeek\n * * HourlyRate\n */\n clearOnPayTypeChange(payType: string) {\n const credit = {\n ...this.finalFurnitureLoanApplication.value,\n ApplicantEmployment: {\n ...this.finalFurnitureLoanApplication.value?.ApplicantEmployment,\n PayTypeCD: payType,\n AnnualSalary: null,\n HoursPerWeek: null,\n HourlyRate: null,\n },\n };\n\n this.finalFurnitureLoanApplication.next(credit);\n }\n\n /**\n * Only call this function if employment has changed to `unemployed` or `retired`. It will clear out\n * all employment information for applicant or co-applicant.\n *\n * The form currently doesn't have a co-applicant, but this is here for future use.\n *\n * @param employmentStatus Employment status.\n * @param coApplicant Defaults to `false`.\n */\n clearOnEmploymentStatusChange(employmentStatus: string, coApplicant = false) {\n const key = coApplicant ? 'CoApplicantEmployment' : 'ApplicantEmployment';\n const otherKey = coApplicant\n ? 'CoApplicantAdditionalIncome'\n : 'ApplicantAdditionalIncome';\n\n const credit = {\n ...this.finalFurnitureLoanApplication.value,\n };\n\n delete credit?.[key];\n delete credit?.[otherKey];\n\n this.finalFurnitureLoanApplication.next({\n ...credit,\n [key]: {\n EmploymentStatus: employmentStatus,\n },\n });\n }\n\n /**\n * This is called when a user clears or exits the application.\n */\n clearApplication() {\n this.finalFurnitureLoanApplication.next(null);\n }\n}\n","import { EmptyError } from './util/EmptyError';\nimport { SafeSubscriber } from './Subscriber';\nexport function firstValueFrom(source, config) {\n const hasConfig = typeof config === 'object';\n return new Promise((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n resolve(value);\n subscriber.unsubscribe();\n },\n error: reject,\n complete: () => {\n if (hasConfig) {\n resolve(config.defaultValue);\n }\n else {\n reject(new EmptyError());\n }\n },\n });\n source.subscribe(subscriber);\n });\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}"],"names":["BehaviorSubject","firstValueFrom","HttpHeaders","stripPhoneNumber","FurnitureCreditService","constructor","api","http","errorMessageService","postCreditApplication","body","endpoint","url","baseUrl","headers","clearErrorMessages","post","setCreditAfterPost","loan","finalFurnitureLoanApplication","next","Object","setApplicantInformation","data","value","LoanApplication","_a","DomainID","RequestPurpose","RequestCreditTypeCD","RequestZip","ZipCode","Over18","PrivacyPolicy","CommunicationConsent","Applicant","_b","ContactFirst","ContactLast","ContactMiddle","PhoneNumber","PhoneNumberType","EmailAddress","ApplicantAddress","_c","Address","AptNumber","City","State","Years","Months","LivingSituation","ApplicantEmployment","_d","EmploymentStatus","setApplicantEmployer","DateOfBirth","SSN","CreditReportAuthorization","EmployerName","Position","PayTypeCD","PayPeriod","TakeHomePay","AnnualSalary","_e","HourlyRate","_f","HoursPerWeek","_g","ApplicantAdditionalIncome","_h","OtherIncomes","MonthlyAdditionalIncome","console","log","clearOnPayTypeChange","payType","credit","clearOnEmploymentStatusChange","employmentStatus","coApplicant","key","otherKey","clearApplication","i0","factory","providedIn"],"sourceRoot":"webpack:///"}