1"use strict";(self.webpackChunkinflection=self.webpackChunkinflection||[]).push([[976],{7477:(B,p,a)=>{a.d(p,{Q:()=>f});var n=a(1477),d=a(9913),u=a(9941),_=a(5235),C=a(4909),m=a(935);let f=(()=>{class c{constructor(r,g,e){this.cdRef=r,this.layoutService=g,this.loader=e,g.updatePageInfo({navType:"full",headerType:"full",currentFlow:"Background Checks"})}ngOnInit(){this.loader.show()}ngOnDestroy(){this.loader.show()}}return c.\u0275fac=function(r){return new(r||c)(n.Y36(n.sBO),n.Y36(d.P),n.Y36(u.Z))},c.\u0275cmp=n.Xpm({type:c,selectors:[["ng-component"]],decls:6,vars:0,consts:[["id","wrap-content",1,"wrap-content"],[1,"outside"],[1,"inside"]],template:function(r,g){1&r&&(n.TgZ(0,"div",0),n._UZ(1,"app-sub-nav"),n.TgZ(2,"div",1),n.TgZ(3,"div",2),n._UZ(4,"inf-notification"),n._UZ(5,"router-outlet"),n.qZA(),n.qZA(),n.qZA())},directives:[_.A,C.c,m.lC],styles:[""]}),c})()},3217:(B,p,a)=>{a.d(p,{A:()=>n});class n{}n.NUMBERS_ONLY=new RegExp(/^\d+$/),n.LETTERS_ONLY=new RegExp(/^[a-zA-Z\s]*$/),n.ALPHA_NUMERIC_NO_SPACES=new RegExp(/^[a-zA-Z\d]*$/),n.FULL_NAME=new RegExp(/^\s*[a-zA-Z\xc0\xc1\xc2\xc3\xc4\xc5\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd1\xd2\xd3\xd4\xd5\xd6\xd9\xda\xdb\xdc\xdd\u0178\u017d\xe0\xe1\xe2\xe3\xe4\xe5\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf1\xf2\xf3\xf4\xf5\xf6\xf9\xfa\xfb\xfc\xfd\xff\u017e][\-\'\.a-zA-Z\xc0\xc1\xc2\xc3\xc4\xc5\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd1\xd2\xd3\xd4\xd5\xd6\xd9\xda\xdb\xdc\xdd\u0178\u017d\xe0\xe1\xe2\xe3\xe4\xe5\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf1\xf2\xf3\xf4\xf5\xf6\xf9\xfa\xfb\xfc\xfd\xff\u017e]{0,255}(\s+[a-zA-Z\xc0\xc1\xc2\xc3\xc4\xc5\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd1\xd2\xd3\xd4\xd5\xd6\xd9\xda\xdb\xdc\xdd\u0178\u017d\xe0\xe1\xe2\xe3\xe4\xe5\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf1\xf2\xf3\xf4\xf5\xf6\xf9\xfa\xfb\xfc\xfd\xff\u017e][\-\'\.a-zA-Z\xc0\xc1\xc2\xc3\xc4\xc5\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd1\xd2\xd3\xd4\xd5\xd6\xd9\xda\xdb\xdc\xdd\u0178\u017d\xe0\xe1\xe2\xe3\xe4\xe5\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf1\xf2\xf3\xf4\xf5\xf6\xf9\xfa\xfb\xfc\xfd\xff\u017e]{0,255})+\s*$/),n.ACCENTED_NAME=new RegExp(/^[ a-zA-Z\xc0\xc1\xc2\xc3\xc4\xc5\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd1\xd2\xd3\xd4\xd5\xd6\xd9\xda\xdb\xdc\xdd\u0178\u017d\xe0\xe1\xe2\xe3\xe4\xe5\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf1\xf2\xf3\xf4\xf5\xf6\xf9\xfa\xfb\xfc\xfd\xff\u017e][\- '.a-zA-Z\xc0\xc1\xc2\xc3\xc4\xc5\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd1\xd2\xd3\xd4\xd5\xd6\xd9\xda\xdb\xdc\xdd\u0178\u017d\xe0\xe1\xe2\xe3\xe4\xe5\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf1\xf2\xf3\xf4\xf5\xf6\xf9\xfa\xfb\xfc\xfd\xff\u017e]{0,79}$/),n.ZIP=new RegExp(/^\d{5}$/),n.ZIP4=new RegExp(/^\d{5}(?:-\d{4})?$/),n.BILLING_CODE=new RegExp(/^[#a-zA-Z0-9\-\s]*$/),n.BILLING_CODE_DESCRIPTION=new RegExp(/^[,\.\?@\&!#\'\~\*;\+\w\s\-]*[a-zA-Z]+[,\.\?@\&!#\'\~\*;\+\w\s\-]*$/),n.EMAIL=new RegExp(/^\s*[\w!#\$%'\*\+\-=\?\^_`\{\|\}~]+(\.{1}[\w!#\$%'\*\+\-=\?\^_`\{\|\}~]+)*@[A-Za-z0-9]+((\.|-|_)[A-Za-z0-9]+)*\.[A-Za-z0-9]+\s*$/),n.PIN=new RegExp(/^\d{4}$/),n.COMPANY_NAME=new RegExp(/^[,.?@&!#'~*;+\w\s\-\/]*[a-zA-Z]+[,.?@&!#'~*;+\w\s\-\/]*$/),n.ADDRESS=new RegExp(/^[\x20a-zA-Z0-9]*$/),n.CITY=new RegExp(/^[a-zA-Z][\-\ \'\.a-zA-Z]{0,255}$/),n.GENERIC_SAFE_STRING=new RegExp(/^[,.?@&!#'~*;+\w\s\-\/():]*$/),n.PASSWORD=new RegExp(/[^ ]{8,}$/),n.TAX_EIN=new RegExp(/^\d{2}-?\d{7}$/),n.WEBSITE=new RegExp(/^((?:https?:\/\/|www\.)(?:[-a-z0-9]+\.)*[-a-z0-9]+.*)$/),n.SAFE_STRING=new RegExp(/^[a-zA-Z,.?@&!#'~*;+\w\s\-\/():]*$/),n.PHONE=new RegExp(/^(1?([\-.]?|\s*)\(?(\d{3})\)?([\-.]?|\s*)(\d{3})([\-.]?|\s*)(\d{4}))\s*$/),n.PHONE_EXT_SHORT=new RegExp(/^\d{0,6}$/),n.GUID=new RegExp(/[a-fA-F0-9]{8}(-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}/)},8976:(B,p,a)=>{a.r(p),a.d(p,{SettingsModule:()=>ie});var n=a(93),d=a(9298),u=a(9405),_=a(7435),C=a(6130),m=a(935),f=a(7477),c=a(3217),b=a(4354),r=a(5613);let g=(()=>{class t{}return t.billingCodeFieldName={id:"billingCodeDescription",label:"Specify field name",errors:[{type:"required",message:"Specify field name required if billing code enable on checkout"},{type:"pattern",message:"Enter valid billing code description (letters + optional numbers)"},{type:"maxlength",message:"Maximum length 80 chars exceeded."}],maxLength:80},t.isBillingCodesRequired={id:"isBillingCodeRequiredDuringPurchase",label:"Require every order specify a billing code (optional if off)"},t.billingCodeValue={id:"code",label:"Code",errors:[{type:"required",message:"The Code field is required."},{type:"pattern",message:"Enter valid billing code (letters + numbers + number sign + dash + space)"},{type:"maxlength",message:"Maximum length 64 chars exceeded"}],maxLength:64},t.billingCodeDescription={id:"description",label:"Description",errors:[{type:"required",message:"The Description field is required."},{type:"pattern",message:"Enter valid billing code description (letters + optional numbers)"},{type:"maxlength",message:"Maximum length 128 chars exceeded."}],maxLength:128},t})();var e=a(1477),v=a(4301);let F=(()=>{class t{constructor(i,o,l){this.http=i,this.router=o,this.notify=l,this.getBillingCodesUrl="billing-code-list",this.billingCodePreferencesUrl="billing-codes-preferences",this.billingCodePreferencesUpdateUrl="update-billing-codes-preferences",this.addBillingCodeUrl="add-billing-code",this.updateBilling
1CodeUrl="edit-billing-code",this.removeBillingCodeUrl="remove-billing-code"}clearError(){this.notify.clear()}getBillingCodes(){return this.http.post(this.getBillingCodesUrl,"")}getBillingCodesPreferences(){return this.http.post(this.billingCodePreferencesUrl,"")}saveBillingCodePreferences(i){return this.http.post(this.billingCodePreferencesUpdateUrl,i)}addBillingCode(i){return this.http.post(this.addBillingCodeUrl,i)}removeBillingCode(i){return this.http.post(this.removeBillingCodeUrl,{code:i})}updateBillingCode(i){return this.http.post(this.updateBillingCodeUrl,i)}}return t.\u0275fac=function(i){return new(i||t)(e.LFG(v.eN),e.LFG(m.F0),e.LFG(u.gq))},t.\u0275prov=e.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var T=a(9941),A=a(9913),D=a(7446);const q=["addBillingCodeModal"],w=["editBillingCodeModal"],N=["removeBillingCodeModal"],E=function(t,s){return{"d-none":t,"btn-disabled":s}};function P(t,s){if(1&t){const i=e.EpF();e.TgZ(0,"button",32),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).enableEditableBlock()}),e._uU(1,"Edit"),e.qZA()}if(2&t){const i=e.oxw(2);e.Q6J("ngClass",e.WLB(1,E,i.isEditingPreferences,i.hasReadOnlyBillingCodePrivilege))}}const k=function(t,s){return{"d-flex align-items-center":t,"d-none":s}},h=function(t){return{errorBoxWrap:t}};function y(t,s){if(1&t){const i=e.EpF();e.TgZ(0,"form",16),e.TgZ(1,"div",3),e.TgZ(2,"h4",4),e._uU(3,"Billing Codes Preferences"),e.qZA(),e.YNc(4,P,2,4,"button",17),e.TgZ(5,"span",18),e.TgZ(6,"button",19),e.NdJ("click",function(){return e.CHM(i),e.oxw().disableEditableBlock(!0)}),e._uU(7,"Cancel"),e.qZA(),e.TgZ(8,"button",20),e.NdJ("click",function(){return e.CHM(i),e.oxw().saveBillingCodesPreferences()}),e._uU(9,"Save"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(10,"div",21),e.TgZ(11,"div",22),e.TgZ(12,"div",23),e._uU(13,"Require every order specify a billing code (optional if off)"),e.qZA(),e.TgZ(14,"div",24),e.TgZ(15,"div",25),e._UZ(16,"input",26),e._UZ(17,"label",27),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(18,"div",6),e.TgZ(19,"div",28),e.TgZ(20,"label",29),e._uU(21),e.qZA(),e._UZ(22,"input",30),e._UZ(23,"inf-form-error-msg",31),e.qZA(),e.qZA(),e.qZA()}if(2&t){const i=e.oxw();e.Q6J("formGroup",i.billingCodesPreferencesForm),e.xp6(4),e.Q6J("ngIf",!i.isEditingPreferences),e.xp6(1),e.Q6J("ngClass",e.WLB(18,k,i.isEditingPreferences,!i.isEditingPreferences)),e.xp6(10),e.uIk("data-qauto","req_bill_code_switch"),e.xp6(1),e.Q6J("id",i.preferencesFormData.isBillingCodesRequired.id)("formControlName",i.preferencesFormData.isBillingCodesRequired.id),e.uIk("data-qauto","req_bill_code_switch"),e.xp6(1),e.Q6J("for",i.preferencesFormData.isBillingCodesRequired.id),e.xp6(2),e.Q6J("ngClass",e.VKq(21,h,i.billingCodesNameField.invalid&&i.billingCodesNameField.dirty&&i.billingCodesNameField.touched)),e.xp6(1),e.Q6J("for",i.preferencesFormData.billingCodeFieldName.id),e.uIk("data-qauto","label_"+i.preferencesFormData.billingCodeFieldName.id),e.xp6(1),e.Oqu(i.preferencesFormData.billingCodeFieldName.label),e.xp6(1),e.Q6J("formControlName",i.preferencesFormData.billingCodeFieldName.id)("id",i.preferencesFormData.billingCodeFieldName.id)("maxLength",i.preferencesFormData.billingCodeFieldName.maxLength),e.uIk("data-qauto",i.preferencesFormData.billingCodeFieldName.id),e.xp6(1),e.Q6J("errors",i.preferencesFormData.billingCodeFieldName)("field",i.billingCodesNameField)}}const x=function(t){return{"btn-disabled":t}};function I(t,s){if(1&t){const i=e.EpF();e.TgZ(0,"button",33),e.NdJ("click",function(){return e.CHM(i),e.oxw().addNewCodeHandler()}),e._UZ(1,"span",34),e._uU(2," Add "),e.qZA()}if(2&t){const i=e.oxw();e.Q6J("ngClass",e.VKq(2,x,i.hasReadOnlyBillingCodePrivilege)),e.xp6(1),e.uIk("aria-hidden",!0)}}function R(t,s){1&t&&e.GkF(0)}function U(t,s){if(1&t){const i=e.EpF();e.TgZ(0,"td",40),e.TgZ(1,"button",41),e.NdJ("click",function(){e.CHM(i);const l=e.oxw().$implicit;return e.oxw().editBillingCodeHandler(l.value,l.name)}),e._UZ(2,"span",42),e.TgZ(3,"span",43),e._uU(4,"Edit"),e.qZA(),e.qZA(),e.TgZ(5,"button",44),e.NdJ("click",function(){e.CHM(i);const l=e.oxw().$implicit;
1return e.oxw().removeBillingCodeHandler(l.value)}),e._UZ(6,"span",45),e.TgZ(7,"span",43),e._uU(8,"Close"),e.qZA(),e.qZA(),e.qZA()}if(2&t){const i=e.oxw(2);e.xp6(1),e.Q6J("ngClass",e.VKq(6,x,i.hasReadOnlyBillingCodePrivilege)),e.uIk("title","Edit"),e.xp6(1),e.uIk("aria-hidden",!0),e.xp6(3),e.Q6J("ngClass",e.VKq(8,x,i.hasReadOnlyBillingCodePrivilege)),e.uIk("title","Remove"),e.xp6(1),e.uIk("aria-hidden",!0)}}const M=function(t){return{"border-bottom":t}};function O(t,s){if(1&t&&(e.TgZ(0,"tr",18),e.TgZ(1,"td",35),e.TgZ(2,"label",36),e._uU(3,"Code"),e.qZA(),e.TgZ(4,"p",37),e._uU(5),e.qZA(),e.qZA(),e.TgZ(6,"td",35),e.TgZ(7,"label",36),e._uU(8,"Description"),e.qZA(),e.TgZ(9,"p",38),e._uU(10),e.qZA(),e.qZA(),e.YNc(11,U,9,10,"td",39),e.qZA()),2&t){const i=s.$implicit,o=s.last,l=e.oxw();e.Q6J("ngClass",e.VKq(4,M,!o)),e.xp6(5),e.Oqu(i.value),e.xp6(5),e.Oqu(i.name),e.xp6(1),e.Q6J("ngIf",!l.isReadonly)}}function S(t,s){1&t&&(e.TgZ(0,"div",46),e._uU(1,"No records available."),e.qZA())}function L(t,s){1&t&&e.GkF(0)}function J(t,s){if(1&t){const i=e.EpF();e.TgZ(0,"div",48),e.TgZ(1,"div",49),e.TgZ(2,"p",50),e._uU(3),e.qZA(),e.TgZ(4,"div",51),e.TgZ(5,"button",52),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).decreasePage()}),e._UZ(6,"i",53),e.TgZ(7,"span",43),e._uU(8,"Previous"),e.qZA(),e.qZA(),e.TgZ(9,"button",54),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).increasePage()}),e._UZ(10,"i",55),e.TgZ(11,"span",43),e._uU(12,"Next"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&t){const i=e.oxw(2);e.xp6(3),e.Oqu(i.calcIntervalPagination()),e.xp6(2),e.ekj("btn-disabled",1==i.page),e.uIk("title","Previous"),e.xp6(1),e.uIk("aria-hidden",!0),e.xp6(3),e.ekj("btn-disabled",i.isLastPage()),e.uIk("title","Next"),e.xp6(1),e.uIk("aria-hidden",!0)}}function Q(t,s){if(1&t&&e.YNc(0,J,13,9,"div",47),2&t){const i=e.oxw();e.Q6J("ngIf",i.showPaginationButtons)}}function z(t,s){if(1&t){const i=e.EpF();e.TgZ(0,"form",16),e.TgZ(1,"div",3),e.TgZ(2,"h4",57),e._uU(3,"Enter New Code and Description"),e.qZA(),e.TgZ(4,"span",49),e.TgZ(5,"button",58),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).closeModal(!0)}),e._uU(6,"Cancel"),e.qZA(),e.TgZ(7,"button",59),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).saveNewBillingCode()}),e._uU(8,"Save"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(9,"div",60),e.TgZ(10,"div",61),e.TgZ(11,"div",62),e.TgZ(12,"div",63),e.TgZ(13,"label",29),e._uU(14,"Code"),e.qZA(),e._UZ(15,"input",30),e._UZ(16,"inf-form-error-msg",31),e.qZA(),e.qZA(),e.TgZ(17,"div",62),e.TgZ(18,"div",63),e.TgZ(19,"label",29),e._uU(20,"Description"),e.qZA(),e._UZ(21,"input",30),e._UZ(22,"inf-form-error-msg",31),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&t){const i=e.oxw(2);e.Q6J("formGroup",i.addBillingCodeForm),e.xp6(12),e.Q6J("ngClass",e.VKq(19,h,i.addBillingCodeValueField.invalid&&i.addBillingCodeValueField.dirty&&i.addBillingCodeValueField.touched)),e.xp6(1),e.Q6J("for",i.addNewCodeFormData.billingCodeValue.id),e.uIk("data-qauto","label_"+i.addNewCodeFormData.billingCodeValue.id),e.xp6(2),e.Q6J("formControlName",i.addNewCodeFormData.billingCodeValue.id)("id",i.addNewCodeFormData.billingCodeValue.id)("maxLength",i.addNewCodeFormData.billingCodeValue.maxLength),e.uIk("data-qauto",i.addNewCodeFormData.billingCodeValue.id),e.xp6(1),e.Q6J("errors",i.addNewCodeFormData.billingCodeValue)("field",i.addBillingCodeValueField),e.xp6(2),e.Q6J("ngClass",e.VKq(21,h,i.addBillingCodeDescriptionField.invalid&&i.addBillingCodeDescriptionField.dirty&&i.addBillingCodeDescriptionField.touched)),e.xp6(1),e.Q6J("for",i.addNewCodeFormData.billingCodeDescription.id),e.uIk("data-qauto","label_"+i.addNewCodeFormData.billingCodeDescription.id),e.xp6(2),e.Q6J("formControlName",i.addNewCodeFormData.billingCodeDescription.id)("id",i.addNewCodeFormData.billingCodeDescription.id)("maxLength",i.addNewCodeFormData.billingCodeDescription.maxLength),e.uIk("data-qauto",i.addNewCodeFormData.billingCodeDescription.id),e.xp6(1),e.Q6J("errors",i.addNewCodeFormData.billingCodeDescription)("field",i.addBillingCodeDescriptionField)}}function Y(t,s){if(1&t&&(e.TgZ(0,"div",56),e.YNc(1,z,23,23,"form",1),e.qZA()),2&t){const i=e.oxw();e.xp6(1),e.Q6J("ngIf",i.addBillingCodeFormCreated)}}function V(t,s){if(1&t){const i=e.EpF();e.TgZ(0,"form",16),e.TgZ(1,"div",3),e.TgZ(2,"h4",57),e._uU(3,"Edit Description of Billing Code"),e.qZA(),e.TgZ(4,"span",49),e.TgZ(5,"button",64),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).closeModal()}),e._uU(6,"Cancel"),e.qZA(),e.TgZ(7,"button",65),e.NdJ("click",function(){return e.CHM(i),e.oxw(2).updateBilling
1Codes()}),e._uU(8,"Save"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(9,"div",60),e.TgZ(10,"div",61),e.TgZ(11,"div",62),e.TgZ(12,"p",66),e._uU(13,"Code"),e.qZA(),e.TgZ(14,"p",67),e._uU(15),e.qZA(),e.qZA(),e.TgZ(16,"div",62),e.TgZ(17,"div",28),e.TgZ(18,"label",29),e._uU(19),e.qZA(),e._UZ(20,"input",30),e._UZ(21,"inf-form-error-msg",31),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&t){const i=e.oxw(2);e.Q6J("formGroup",i.updateBillingCodeForm),e.xp6(15),e.Oqu(i.billingCodeSubmit.code),e.xp6(2),e.Q6J("ngClass",e.VKq(12,h,i.updateBillingCodeDescriptionField.invalid&&i.updateBillingCodeDescriptionField.dirty&&i.updateBillingCodeDescriptionField.touched)),e.xp6(1),e.Q6J("for",i.updateCodeFormData.billingCodeDescription.id),e.uIk("data-qauto","label_"+i.updateCodeFormData.billingCodeDescription.id),e.xp6(1),e.Oqu(i.updateCodeFormData.billingCodeDescription.label),e.xp6(1),e.Q6J("formControlName",i.updateCodeFormData.billingCodeDescription.id)("id",i.updateCodeFormData.billingCodeDescription.id)("maxLength",i.updateCodeFormData.billingCodeDescription.maxLength),e.uIk("data-qauto",i.updateCodeFormData.billingCodeDescription.id),e.xp6(1),e.Q6J("errors",i.updateCodeFormData.billingCodeDescription)("field",i.updateBillingCodeDescriptionField)}}function $(t,s){if(1&t&&(e.TgZ(0,"div",56),e.YNc(1,V,22,14,"form",1),e.qZA()),2&t){const i=e.oxw();e.xp6(1),e.Q6J("ngIf",i.updateBillingCodeFormCreated)}}function H(t,s){if(1&t){const i=e.EpF();e.TgZ(0,"h2",68),e._uU(1,"Are you sure?"),e.qZA(),e.TgZ(2,"p",69),e._uU(3,"You want to remove this code?"),e.qZA(),e.TgZ(4,"div",70),e.TgZ(5,"button",71),e.NdJ("click",function(){return e.CHM(i),e.oxw().deleteBillingCode()}),e._uU(6,"Remove Code"),e.qZA(),e.TgZ(7,"button",72),e.NdJ("click",function(){return e.CHM(i),e.oxw().closeModal()}),e._uU(8,"Cancel"),e.qZA(),e.qZA()}}const G=function(t){return{"editable-block-disabled":t}},K=function(t){return{"":t}},W=function(t){return{"d-block":t}},X=[{path:"",component:f.Q,children:[{path:"",redirectTo:"billing-codes"},{path:"billing-codes",component:(()=>{class t{constructor(i,o,l,Z,te,ne){this.billingCodeService=i,this.notify=o,this.validation=l,this.loader=Z,this.layoutService=te,this.modalService=ne,this.pageSize=10,this.page=1,this.showPaginationButtons=!0,this.isEditingPreferences=!1,this.billingCodesPreferencesFormCreated=!1,this.addBillingCodeFormCreated=!1,this.updateBillingCodeFormCreated=!1,this.billingCodePreferencesLoaded=!1,this.billingCodesLoaded=!1,this.unsubscribe=new b.x}ngOnInit(){this.getBillingCodes(),this.getBillingCodesPreferences(),this.layoutService.updatePageInfo({title:"Billing Codes",currentFlow:"Settings",currentPage:"Billing Codes"})}ngOnDestroy(){this.billingCodeService.clearError(),this.unsubscribe.next(),this.unsubscribe.complete()}getBillingCodes(){this.billingCodeService.getBillingCodes().pipe((0,r.R)(this.unsubscribe)).subscribe(i=>{this.billingCodes=i.data.sort((o,l)=>o.key<l.key?1:o.key>l.key?-1:0),i.data&&(this.loadItems(),this.collectionSize=i.data.length,this.showPaginationButtons=this.collectionSize/this.pageSize>1)},()=>{this.notify.showDefaultError(),this.loader.hide()})}getBillingCodesPreferences(){this.billingCodeService.getBillingCodesPreferences().pipe((0,r.R)(this.unsubscribe)).subscribe(i=>{this.preferences=i.data,this.isReadonly=i.data.isReadonly,this.hasReadOnlyBillingCodePrivilege=i.data.hasReadOnlyBillingCodePrivilege,this.billingCodePreferencesLoaded=!0,this.createPreferencesForm(),this.checkDataLoaded()})}checkDataLoaded(){this.billingCodePreferencesLoaded&&this.billingCodesLoaded&&this.loader.hide()}pageChange(){this.loadItems()}enableEditableBlock(){this.isEditingPreferences=!0,this.billingCodesNameField.enable(),this.billingCodesRequiredField.enable()}disableEditableBlock(i){this.isEditingPreferences=!1,this.billingCodesNameField.disable(),this.billingCodesRequiredField.disable(),i&&(this.billingCodesNameField.setValue(this.preferences.billingCodeDescription),this.billingCodesRequiredField.setValue(this.preferences.isBillingCodeRequiredDuringPurchase))}addNewCodeHandler(){this.modalService.open(this.addBillingCodeModal,{windowClass:"modal-p-0",backdrop:"static"}),this.createAddBillingCodeForm()}
1removeBillingCodeHandler(i){this.modalService.open(this.removeBillingCodeModal,{backdrop:"static"}),this.billingCodeSubmit={code:i,description:""}}editBillingCodeHandler(i,o){this.modalService.open(this.editBillingCodeModal,{windowClass:"modal-p-0",backdrop:"static"}),this.billingCodeSubmit={code:i,description:o},this.createUpdateBillingCodeForm()}closeModal(i){this.modalService.dismissAll(),i&&(this.addBillingCodeValueField.reset(),this.addBillingCodeDescriptionField.reset())}saveBillingCodesPreferences(){this.validation.touchControls(this.billingCodesPreferencesForm),this.billingCodesPreferencesForm.valid&&this.billingCodeService.saveBillingCodePreferences(this.billingCodesPreferencesForm.value).pipe((0,r.R)(this.unsubscribe)).subscribe(()=>{this.preferences=this.billingCodesPreferencesForm.value},()=>{this.notify.showDefaultError(),this.loader.hide()},()=>{this.disableEditableBlock(),this.loader.hide()})}saveNewBillingCode(){this.validation.touchControls(this.addBillingCodeForm),this.addBillingCodeForm.valid&&(this.loader.show(),this.billingCodeService.addBillingCode(this.addBillingCodeForm.value).pipe((0,r.R)(this.unsubscribe)).subscribe(()=>{this.getBillingCodes(),this.loadItems(),this.notify.add(new u.P_("You successfully added billing code.","notify-success",!0))},()=>{this.notify.showDefaultError(),this.loader.hide()},()=>{this.modalService.dismissAll()}))}updateBillingCodes(){this.validation.touchControls(this.updateBillingCodeForm),this.updateBillingCodeForm.value.code=this.billingCodeSubmit.code,this.updateBillingCodeForm.valid&&(this.loader.show(),this.billingCodeService.updateBillingCode(this.updateBillingCodeForm.value).pipe((0,r.R)(this.unsubscribe)).subscribe(()=>{this.notify.add(new u.P_("You successfully updated billing code.","notify-success",!0))},()=>{this.notify.showDefaultError(),this.loader.hide()},()=>{this.getBillingCodes(),this.modalService.dismissAll()}))}deleteBillingCode(){this.loader.show(),this.billingCodeService.removeBillingCode(this.billingCodeSubmit.code).pipe((0,r.R)(this.unsubscribe)).subscribe(()=>{this.getBillingCodes(),this.notify.add(new u.P_("You successfully removed billing code.","notify-success",!0))},()=>{this.notify.showDefaultError(),this.loader.hide()},()=>{this.modalService.dismissAll()})}createPreferencesForm(){this.preferencesFormData={billingCodeFieldName:g.billingCodeFieldName,isBillingCodesRequired:g.isBillingCodesRequired},this.billingCodesNameField=new d.NI({value:this.preferences.billingCodeDescription||"",disabled:!this.isEditingPreferences},[d.kI.required,d.kI.maxLength(this.preferencesFormData.billingCodeFieldName.maxLength),d.kI.pattern(c.A.BILLING_CODE_DESCRIPTION)]),this.billingCodesRequiredField=new d.NI({value:this.preferences.isBillingCodeRequiredDuringPurchase||!1,disabled:!this.isEditingPreferences}),this.billingCodesPreferencesForm=new d.cw({[this.preferencesFormData.billingCodeFieldName.id]:this.billingCodesNameField,[this.preferencesFormData.isBillingCodesRequired.id]:this.billingCodesRequiredField}),this.billingCodesPreferencesFormCreated=!0}createUpdateBillingCodeForm(){this.updateCodeFormData={billingCodeDescription:g.billingCodeDescription},this.updateBillingCodeDescriptionField=new d.NI(this.billingCodeSubmit.description||"",[d.kI.required,d.kI.maxLength(this.updateCodeFormData.billingCodeDescription.maxLength),d.kI.pattern(c.A.BILLING_CODE_DESCRIPTION)]),this.updateBillingCodeForm=new d.cw({[this.updateCodeFormData.billingCodeDescription.id]:this.updateBillingCodeDescriptionField}),this.updateBillingCodeFormCreated=!0}createAddBillingCodeForm(){this.addNewCodeFormData={billingCodeValue:g.billingCodeValue,billingCodeDescription:g.billingCodeDescription},this.addBillingCodeValueField=new d.NI("",[d.kI.required,d.kI.maxLength(this.addNewCodeFormData.billingCodeValue.maxLength),d.kI.pattern(c.A.BILLING_CODE)]),this.addBillingCodeDescriptionField=new d.NI("",[d.kI.required,d.kI.maxLength(this.addNewCodeFormData.billingCodeDescription.maxLength),d.kI.pattern(c.A.BILLING_CODE_DESCRIPTION)]),this.addBillingCodeForm=new d.cw({[this.addNewCodeFormData.billingCodeValue.id]:this.addBillingCodeValueField,[this.addNewCodeFormData.billingCodeDescription.id]:this.addBillingCodeDescriptionField}),this.addBillingCodeFormCreated=!0}loadItems(){this.billingCodes.map((i,o)=>Object.assign({id:o+1},i)),this.billingCodesLoaded=!0,this.checkDataLoaded()}increasePage(){this.page++}decreasePage(){this.page--}isLastPage(){if(this.billingCodesLoaded)return this.page*this.pageSize>=this.billingCodes.length}calcIntervalPagination(){if(this.billingCodesLoaded){let i;return i=this.page*this.pageSize>this.billingCodes.length?this.billingCodes.length:this.page*this.pageSize,`${(this.page-1)*this.pageSize+1} - ${i} of ${this.billingCodes.length}`}}}return t.\u0275fac=function(i){return new(i||t)(e.Y36(F),e.Y36(u.gq),e.Y36(_.RJ),e.Y36(T.Z),e.Y36(A.P),e.Y36(C.FF))},t.\u0275cmp=e.Xpm({type:t,selectors:[["ng-component"]],viewQuery:function(i,o){if(1&i&&(e.Gf(q,5),e.Gf(w,5),e.Gf(N,5)),2&i){let l;e.iGM(l=e.CRH())&&(o.addBillingCodeModal=l.first),e.iGM(l=e.CRH())&&(o.editBilling
1CodeModal=l.first),e.iGM(l=e.CRH())&&(o.removeBillingCodeModal=l.first)}},decls:23,vars:20,consts:[[1,"tile","tile-light","tile-m","border","radius","mb-24","mx-auto","editable-block",3,"ngClass"],[3,"formGroup",4,"ngIf"],[1,"tile","tile-light","tile-m","border","radius","mb-24","mx-auto"],[1,"p-16","px-md-24","d-flex","justify-content-between","align-items-center","border-bottom"],[1,"h4","c-ebony-clay"],["class","btn btn-outline btn-s","data-qauto","add_new_billing_btn",3,"ngClass","click",4,"ngIf"],[1,"px-16","pb-16","px-md-56"],[4,"ngTemplateOutlet"],[1,"table","w-100",3,"ngClass"],[3,"ngClass",4,"ngFor","ngForOf"],["class","pt-16 text-center",4,"ngIf"],["pagination",""],["addBillingCodeModal",""],["editBillingCodeModal",""],["removeBillingCodeModal",""],[1,"overlay",3,"ngClass"],[3,"formGroup"],["class","btn btn-outline btn-s","data-qauto","edit_billing_pref",3,"ngClass","click",4,"ngIf"],[3,"ngClass"],["role","button","data-qauto","cancel_save_billing_pref",1,"btn-naked","me-24",3,"click"],["role","button","data-qauto","save_billing_pref",1,"btn","btn-s",3,"click"],[1,"p-16","px-md-56"],[1,"row","gx-12","align-items-center","pb-16","border-bottom"],[1,"col-10"],[1,"col-2","d-flex","justify-content-end"],[1,"form-toggle"],["type","checkbox",3,"id","formControlName"],[1,"toggles",3,"for"],[1,"form-field","mb-0",3,"ngClass"],[3,"for"],["focusInput","","type","text",3,"formControlName","id","maxLength"],[3,"errors","field"],["data-qauto","edit_billing_pref",1,"btn","btn-outline","btn-s",3,"ngClass","click"],["data-qauto","add_new_billing_btn",1,"btn","btn-outline","btn-s",3,"ngClass","click"],[1,"i-plus","i-xs","me-4","align-middle"],[1,"px-8","py-12"],[1,"py-4"],["data-qauto","billing_code_value",1,"bold","pseudo-input"],["data-qauto","billing_code_description",1,"bold","pseudo-input"],["class","px-8 py-12 text-end",4,"ngIf"],[1,"px-8","py-12","text-end"],["role","button","data-qauto","edit_billing_ico",1,"link","btn-naked-lone-icon","me-4",3,"ngClass","click"],[1,"i-edit","i-m"],[1,"d-none"],["role","button","data-qauto","remove_code_ico",1,"link","btn-naked-lone-icon",3,"ngClass","click"],[1,"i-trash","i-m"],[1,"pt-16","text-center"],["class","d-flex align-items-center justify-content-end my-24",4,"ngIf"],[1,"d-flex","align-items-center","justify-content-end","my-24"],[1,"d-flex","align-items-center"],[1,"fs-14","c-pale-sky"],[1,"btn-icon-group","ms-12"],["data-qauto","btn_previous_page",1,"btn-icon",3,"click"],[1,"i-arrow-horiz","rotate-left-180"],["data-qauto","btn_next_page",1,"btn-icon",3,"click"],[1,"i-arrow-horiz"],[1,"tile","tile-light","border","radius"],[1,"h4","c-ebony-clay","me-12"],["role","button","data-qauto","cancel_add_new_code_btn",1,"btn-naked","me-24",3,"click"],["role","button","data-qauto","save_new_billing_code",1,"btn","btn-s",3,"click"],[1,"p-16","py-md-24","px-md-56"],[1,"row","gx-12"],[1,"col-md-6","text-start"],[1,"form-field","mb-md-0",3,"ngClass"],["role","button","data-qauto","cancel_update_code_btn",1,"btn-naked","me-24",3,"click"],["role","button","data-qauto","save_updated_billing_code",1,"btn","btn-s",3,"click"],[1,"mt-4","mb-8","fs-12","c-gray"],[1,"bold","pseudo-input"],[1,"h1","mb-24","mb-md-32"],[1,"mb-24","mb-md-40"],[1,"justify-content-center","d-md-flex","align-items-center"],["data-qauto","remove_code_btn","role","button",1,"btn","order-md-2",3,"click"],["data-qauto","cancel_remove_code_btn","role","button",1,"btn-naked","btn-naked-m","me-md-16","mt-8","mt-md-0","d-block",3,"click"]],template:function(i,o){if(1&i&&(e.TgZ(0,"div",0),e.YNc(1,y,24,23,"form",1),e.qZA(),e.TgZ(2,"div",2),e.TgZ(3,"div",3),e.TgZ(4,"h4",4),e._uU(5,"Enter Your Code and Description"),e.qZA(),e.YNc(6,I,3,4,"button",5),e.qZA(),e.TgZ(7,"div",6),e.YNc(8,R,1,0,"ng-container",7),e.TgZ(9,"table",8),e.YNc(10,O,12,6,"tr",9),e.ALo(11,"slice"),e.qZA(),e.YNc(12,S,2,0,"div",10),e.YNc(13,L,1,0,"ng-container",7),e.qZA(),e.qZA(),e.YNc(14,Q,1,1,"ng-template",null,11,e.W1O),e.YNc(16,Y,2,1,"ng-template",null,12,e.W1O),e.YNc(18,$,2,1,"ng-template",null,13,e.W1O),e.YNc(20,H,9,0,"ng-template",null,14,e.W1O),e._UZ(22,"div",15)),2&i){const l=e.MAs(15);e.Q6J("ngClass",e.VKq(14,G,!o.isEditingPreferences)),e.xp6(1),e.Q6J("ngIf",o.billingCodesPreferencesFormCreated),e.xp6(
15),e.Q6J("ngIf",!o.isReadonly),e.xp6(2),e.Q6J("ngTemplateOutlet",l),e.xp6(1),e.Q6J("ngClass",e.VKq(16,K,o.showPaginationButtons)),e.xp6(1),e.Q6J("ngForOf",e.Dn7(11,10,o.billingCodes,(o.page-1)*o.pageSize,o.page*o.pageSize)),e.xp6(2),e.Q6J("ngIf",!(null!=o.billingCodes&&o.billingCodes.length)),e.xp6(1),e.Q6J("ngTemplateOutlet",l),e.xp6(9),e.Q6J("ngClass",e.VKq(18,W,o.isEditingPreferences)),e.uIk("aria-hidden",!0)}},directives:[n.mk,n.O5,n.tP,n.sg,d._Y,d.JL,d.sg,d.Wl,d.JJ,d.u,d.Fj,D.x],pipes:[n.OU],styles:[".tile-m[_ngcontent-%COMP%]{max-width:63rem}.pseudo-input[_ngcontent-%COMP%]{margin:.2rem 0 .4rem}.editable-block-disabled[_ngcontent-%COMP%] .form-field[_ngcontent-%COMP%]{border-color:transparent}.editable-block-disabled[_ngcontent-%COMP%] .form-field[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%], .editable-block-disabled[_ngcontent-%COMP%] .form-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.editable-block[_ngcontent-%COMP%]{position:relative;z-index:151}.overlay[_ngcontent-%COMP%]{background-color:#28304180;display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:150}"]}),t})()}]}];let ee=(()=>{class t{}return t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[[m.Bz.forChild(X)],m.Bz]}),t})(),ie=(()=>{class t{}return t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[[n.ez,ee,u.PQ,_.ej,d.u5,d.UX,C.bz,C.dT]]}),t})()}}]);
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.