1(self.webpackChunkapp=self.webpackChunkapp||[]).push([[4382],{34382:(kt,wt,Y)=>{"use strict";Y.r(wt),Y.d(wt,{RecruitmentPageModule:()=>wl});var K=Y(60177),y=Y(89417),J=Y(88974),De=Y(51188),Te=Y(5964),rt=Y(30075),e=Y(54438),S=Y(25436),c=Y(87966),_=Y(30302),C=Y(53516),b=Y(75351),I=Y(26958),w=Y(96850);const D=["tabScrollContainer"],j=a=>({"is-dialog-open":a});function P(a,p){if(1&a&&(e.j41(0,"span",17)(1,"span",18),e.EFF(2),e.k0s(),e.EFF(3),e.k0s()),2&a){const r=e.XpG().$implicit;e.R7$(2),e.JRh(r.icon),e.R7$(),e.SpI(" ",r.label," ")}}function A(a,p){1&a&&(e.j41(0,"mat-tab",15),e.DNE(1,P,4,2,"ng-template",16),e.k0s()),2&a&&e.Y8G("label",p.$implicit.label)}function E(a,p){if(1&a){const r=e.RV6();e.j41(0,"div")(1,"button",19),e.bIt("click",function(){e.eBV(r);const n=e.XpG(2);return e.Njj(n.openCompanySelectionDialog())}),e.j41(2,"span",20),e.EFF(3),e.k0s()()()}if(2&a){const r=e.XpG(2);e.R7$(),e.xc7("background-color",r.buttonColorName),e.Y8G("title",r.selectedCompanyName),e.R7$(2),e.JRh(r.selectedCompanyName)}}function N(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",21),e.bIt("click",function(){e.eBV(r);const n=e.XpG(2);return e.Njj(n.onClickSetup())}),e.j41(1,"span",22),e.EFF(2,"settings"),e.k0s(),e.EFF(3," Setup "),e.k0s()}if(2&a){const r=e.XpG(2);e.xc7("background-color",r.buttonColorName)}}function X(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",4)(1,"div",5)(2,"ion-row",6)(3,"ion-col",7)(4,"div",8)(5,"mat-tab-group",9),e.mxI("selectedIndexChange",function(n){e.eBV(r);const o=e.XpG();return e.DH7(o.selectedTypeTabIndex,n)||(o.selectedTypeTabIndex=n),e.Njj(n)}),e.bIt("selectedTabChange",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.tabTypeChanged(n.index))}),e.DNE(6,A,2,1,"mat-tab",10),e.k0s()()(),e.j41(7,"ion-col",11)(8,"div",12),e.DNE(9,E,4,4,"div",13),e.j41(10,"div"),e.DNE(11,N,4,2,"button",14),e.k0s()()()()()()}if(2&a){const r=e.XpG();e.R7$(5),e.R50("selectedIndex",r.selectedTypeTabIndex),e.R7$(),e.Y8G("ngForOf",r.visibleTabs),e.R7$(3),e.Y8G("ngIf",r.canShowCompanySelection()&&r.getCompanyListData.length>1),e.R7$(2),e.Y8G("ngIf",r.canShowSetup)}}function ee(a,p){1&a&&(e.j41(0,"div",5),e.nrm(1,"router-outlet"),e.k0s())}let ie=(()=>{var a;class p{constructor(t,n,o,i,s,d,u,g){this.router=t,this.activatedroute=n,this.encryptionService=o,this.httpService=i,this.config=s,this.dataRefreshService=d,this.dialog=u,this.recruitmentService=g,this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserEmpStatus=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsMD=!1,this.originalCompanyId=null,this.selectedRecruitmentCompanyId=null,this.selectedCompanyName="Company",this.getCompanyListData=[],this.hasPromptedInThisSession=!1,this.isDialogOpen=!1,this.selectedTypeTabIndex=0,this.isTabRoute=!0,this.allTabs=[{label:"Dashboard",route:"dashboard",icon:"dashboard"},{label:"Position Requisition Form",route:"position-requisition-table",icon:"assignment"},{label:"Candidate List & Status",route:"candidate-list-and-status",icon:"people"},{label:"Resume Screening",route:"resume-screening",icon:"find_in_page"},{label:"Schedule Interview",route:"schedule-interview",icon:"event"},{label:"Pre-onboarding Documents",route:"pre-onboarding-documents",icon:"folder_open"},{label:"Reports",route:"reports",icon:"bar_chart"}],this.visibleTabs=[]}ngOnInit(){this.loadSessionData(),this.setupVisibleTabs(),this.handleTabNavigation(),this.canShowCompanySelection()?setTimeout(()=>{this.getCompanyList(()=>{this.isAdmin()?this.getAllAccessMatrix():this.openCompanySelectionDialog(!0)})},500):this.isDialogOpen=!1}ngOnDestroy(){sessionStorage.removeItem("recruitmentCompanySelected"),this.recruitmentService.setChildId(null)}loadSessionData(){const t=d=>{const u=sessionStorage.getItem(d);return u?this.encryptionService.decryptData(u):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(t("loggedInUserCompanyID")):null,this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserEmpCode=t("loggedInUserEmpCode"),this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserEmpStatus=sessionStorage.getItem("loggedInUserEmpStatus");const o=sessionStorage.getItem("loggedInUserRoles");this.loggedInUserRoles=o?JSON.parse(o):[],this.loggedInUserRoleIsM
1D=this.loggedInUserRoles.some(d=>"MD"===d.displayName);let i=sessionStorage.getItem("realLoggedInUserCompanyID");if(!i){const d=sessionStorage.getItem("loggedInUserCompanyID");d&&(sessionStorage.setItem("realLoggedInUserCompanyID",d),i=d)}this.originalCompanyId=i?Number(this.encryptionService.decryptData(i)):this.loggedInUserCompanyID;const s=this.getParamFromRouteTree("childId");s&&"null"!==s?(this.selectedRecruitmentCompanyId=Number(s),this.recruitmentService.setChildId(this.selectedRecruitmentCompanyId)):(this.selectedRecruitmentCompanyId=null,this.selectedCompanyName="All Companies",this.recruitmentService.setChildId(null))}getParamFromRouteTree(t){let n=this.activatedroute.snapshot;for(;n;){if(n.params[t])return n.params[t];n=n.firstChild}return null}getCompanyList(t){let n=this.config.getChildCompanyList+"?companyId="+this.loggedInUserCompanyID;["HOD","Admin","Manager"].includes(this.loggedInUserRole)&&(n+=`&loggedInUserId=${this.loggedInUserId}&loggedInUserRole=${this.loggedInUserRole}`),this.httpService.callGetService(n).subscribe({next:o=>{const i=((null==o?void 0:o.data)||[]).filter(s=>!1!==s.active&&!1!==s.isActive).map(s=>({companyId:s.childCompanyId,companyName:s.childCompanyName}));if(console.log(i),this.getCompanyListData=i,null!==this.selectedRecruitmentCompanyId){const s=i.find(d=>d.companyId===Number(this.selectedRecruitmentCompanyId));s&&(this.selectedCompanyName=s.companyName)}if(1===i.length&&null===this.selectedRecruitmentCompanyId)return sessionStorage.setItem("elcmCompanySelected","true"),this.onCompanyChange(i[0].companyId),void(t&&t());["HOD","Manager"].includes(this.loggedInUserRole)&&i.length>0&&null===this.selectedRecruitmentCompanyId&&this.onCompanyChange(i[0].companyId),t&&t()},error:o=>{console.error("Error fetching company list:",o),t&&t()}})}openCompanySelectionDialog(t=!1,n=!1){if(n&&(this.hasPromptedInThisSession=!1),n||!t||!this.hasPromptedInThisSession&&!sessionStorage.getItem("recruitmentCompanySelected"))return 1===this.getCompanyListData.length?(sessionStorage.setItem("recruitmentCompanySelected","true"),void this.onCompanyChange(this.getCompanyListData[0].companyId)):(this.isDialogOpen=!0,void this.dialog.open(rt.n,{width:"450px",disableClose:t,panelClass:"custom-dialog-container",backdropClass:"custom-dialog-backdrop",data:{companies:this.getCompanyListData||[],originalCompanyId:this.originalCompanyId,selectedCompanyId:this.selectedRecruitmentCompanyId,color:this.buttonColorName,isMandatory:t,loggedInUserRole:this.loggedInUserRole}}).afterClosed().subscribe(i=>{this.isDialogOpen=!1,this.hasPromptedInThisSession=!0,void 0!==i&&(this.onCompanyChange(i),sessionStorage.setItem("recruitmentCompanySelected","true"),this.visibleTabs.length&&this.router.url.endsWith("/recruitment")&&this.tabTypeChanged(0))}))}onCompanyChange(t){if(this.selectedRecruitmentCompanyId=null!=t?t:null,null!=t){this.recruitmentService.setChildId(Number(t));const n=this.getCompanyListData.find(o=>o.companyId===Number(t));this.selectedCompanyName=n?n.companyName:"Company"}else this.recruitmentService.setChildId(null),this.selectedCompanyName="All Companies";this.dataRefreshService.triggerRefresh()}setupVisibleTabs(){const t=this.loggedInUserRole,n=this.loggedInUserRoles.some(s=>"MD"===s.displayName);this.visibleTabs=["HR Admin","Super Admin","HOD","Admin"].includes(t)||n?[...this.allTabs]:"consultant"===t?this.allTabs.filter(s=>"pre-onboarding-documents"!==s.route):["Manager","Employee"].includes(t)?this.allTabs.filter(s=>"schedule-interview"===s.route):[];const o=this.router.url,i=this.visibleTabs.findIndex(s=>o.includes(`/recruitment/${s.route}`));if(this.selectedTypeTabIndex=i>-1?i:this.visibleTabs.length?0:-1,this.visibleTabs.length&&(!this.canShowCompanySelection()||sessionStorage.getItem("recruitmentCompanySelected"))){const s=o.endsWith("/recruitment")||o.endsWith("/recruitment/"),d=this.visibleTabs.some(u=>o.includes(`/recruitment/${u.route}`));(s||!d)&&this.tabTypeChanged(0)}}handleTabNavigation(){setTimeout(()=>{this.router.events.pipe((0,Te.p)(t=>t instanceof De.wF)).subscribe(t=>{const n=t.urlAfterRedirects;this.canShowCompanySelection()&&("/home/hrportal/recruitment"===n||n.endsWith("/recruitment/dashboard"))&&!this.isDialogOpen&&!sessionStorage.getItem("recruitmentCompanySelected")&&this.getCompanyList(()=>{this.isAdmin()?this.getAllAccessMatrix():this.openCompanySelectionDialog(!0,!0)}),this.isTabRoute=!n.includes("/setup");const o=this.visibleTabs.findIndex(i=>n.includes(`/recruitment/${i.route}`));this.selectedTypeTabIndex=o>-1?o:-1})})}getTabIndexByRoute(t){return this.visibleTabs.findIndex(n=>t===n.route||t.startsWith(n.route+"/"))}tabTypeChanged(t){const n=this.visibleTabs[t].route;
1"dashboard"===n&&this.canShowCompanySelection()&&!sessionStorage.getItem("recruitmentCompanySelected")&&this.getCompanyList(()=>{this.isAdmin()?this.getAllAccessMatrix():this.openCompanySelectionDialog(!0)}),this.router.navigate([n],{relativeTo:this.activatedroute})}scrollTabs(t){this.tabScrollContainer&&this.tabScrollContainer.nativeElement.scrollBy({left:"left"===t?-150:150,behavior:"smooth"})}onClickSetup(){this.router.navigate(["/home/hrportal/recruitment/setup/proficiency-and-question"])}isOnlyEmployee(){return"Employee"===this.loggedInUserRole}isMD(){return this.loggedInUserRoles.some(t=>"MD"===t.displayName)}isHOD(){return"HOD"===this.loggedInUserRole}isManager(){return"Manager"===this.loggedInUserRole}isSuperAdmin(){return"Super Admin"===this.loggedInUserRole}isAdmin(){return"Admin"===this.loggedInUserRole}isHRAdminLogin(){return"HR Admin"===this.loggedInUserRole}get canShowSetup(){return this.isSuperAdmin()||this.isHRAdminLogin()||this.isMD()}canShowCompanySelection(){return!(this.isMD()||this.isHOD()&&"Exited"===this.loggedInUserEmpStatus)&&(this.isSuperAdmin()||this.isHRAdminLogin()||this.isHOD()||this.isAdmin()||this.isManager())}getAllAccessMatrix(){this.httpService.callPostService(`${this.config.searchAccess}?sort=id,asc`,{companyId:this.loggedInUserCompanyID,search:null,loggedInUserRole:this.loggedInUserRole}).subscribe({next:n=>{if(null!=n&&n.status){var o;const s=((null==n||null===(o=n.data)||void 0===o?void 0:o.access)||[]).filter(u=>((null==u?void 0:u.modules)||[]).some(g=>{var m;return"recruitment"===(null==g||null===(m=g.moduleName)||void 0===m?void 0:m.toLowerCase())}));this.recruitmentService.setAdminAccessData(s);const d=[...new Set(s.flatMap(u=>null!=(null==u?void 0:u.childId)?[Number(u.childId)]:((null==u?void 0:u.employeeDetails)||[]).map(g=>null==g?void 0:g.childId).filter(g=>null!=g).map(g=>Number(g))))];if(0===d.length)this.openCompanySelectionDialog(!0);else if(1===d.length){var i;const u=d[0],g=s.find(l=>Number(null==l?void 0:l.childId)===u||((null==l?void 0:l.employeeDetails)||[]).some(f=>Number(null==f?void 0:f.childId)===u)),m=(null==g?void 0:g.childName)||(null==g||null===(i=g.childCompany)||void 0===i?void 0:i.childName);this.recruitmentService.setChildId(u),this.selectedCompanyName=m||"Company",this.getCompanyListData=this.getCompanyListData.filter(l=>l.companyId===u),sessionStorage.setItem("recruitmentCompanySelected","true"),this.dataRefreshService.triggerRefresh()}else this.getCompanyListData=this.getCompanyListData.filter(u=>d.includes(Number(u.companyId))),this.openCompanySelectionDialog(!0)}},error:n=>{console.error("Error fetching access matrix for Admin:",n),this.isDialogOpen=!1}})}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(De.Ix),e.rXU(De.nX),e.rXU(S.L),e.rXU(c.k),e.rXU(_.T),e.rXU(C.N),e.rXU(b.bZ),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-recruitment"]],viewQuery:function(t,n){if(1&t&&e.GBs(D,5),2&t){let o;e.mGM(o=e.lsd())&&(n.tabScrollContainer=o.first)}},decls:4,vars:5,consts:[[1,"container"],["id","background-content",3,"ngClass"],["class","tabs-container",4,"ngIf"],["class","card",4,"ngIf"],[1,"tabs-container"],[1,"card"],[2,"align-items","flex-end"],["size-sm","9","size-md","9","size-lg","9","size-xs","9",1,"pl-15","pr-0","pb-0"],[1,"borderbottomForTab"],[1,"pt-10","pr-10",3,"selectedIndexChange","selectedTabChange","selectedIndex"],[3,"label",4,"ngFor","ngForOf"],["size-sm","3","size-md","3","size-lg","3","size-xs","3",1,"borderbottomForTab","pl-10","pt-10","pr-10"],[1,"center-content","float-right",2,"display","flex","align-items","center","justify-content","flex-end"],[4,"ngIf"],["type","button","class","add_btn fs-14 center-content ml-10","style","white-space: nowrap;",3,"background-color","click",4,"ngIf"],[3,"label"],["mat-tab-label",""],[2,"display","contents"],[1,"material-icons","mr-10"],["type","button",1,"add_btn","fs-14","center-content","ml-10",3,"click","title"],[1,"company-name-text"],["type","button",1,"add_btn","fs-14","center-content","ml-10",2,"white-space","nowrap",3,"click"],[1,"material-icons","fs-20","mr-5"]],template:function(t,n){1&t&&(e.j41(0,"ion-content",0)(1,"div",1),e.DNE(2,X,12,4,"div",2)(3,ee,2,0,"div",3),e.k0s()()),2&t&&(e.R7$(),e.Y8G("ngClass",e.eq3(3,j,n.isDialogOpen)),e.R7$(),e.Y8G("ngIf",n.isTabRoute),e.R7$(),e.Y8G("ngIf",!(n.isDialogOpen&&(n.router.url.endsWith("/recruitment")||n.router.url.endsWith("/dashboard")))))},dependencies:[K.YU,K.Sq,K.bT,J.hU,J.W9,J.ln,De.n3,w.ES,w.mq,w.T8],styles:["#background-content[_ngcontent-%COMP%]{left:0;right:0;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background-color:#f6f5fb!important}ion-content.container[_ngcontent-%COMP%]{position:relative}.text-danger[_ngcontent-%COMP%]{color:#dc3545;font-weight:500}.is-dialog-open[_ngcontent-%COMP%]{filter:blur(5px);pointer-events:none;opacity:.6;transition:all .3s ease}.company-name-text[_ngcontent-%COMP%]{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}"]}),p})();var Z=Y(21413),Q=Y(70152),L=Y(56977),O=Y(83371),F=Y(62288),U=Y(2578),V=Y(14823);let ne=(()=>{var a;class p{constructor(t,n){this.elRef=t,this.cdr=n,this.text="",this.maxLength=30,this.showTooltip=!1}ngAfterViewInit(){const t=this.elRef.nativeElement.querySelector(".text-container");this.showTooltip=t.scrollWidth>t.clientWidth||this.text.length>this.maxLength,this.cdr.detectChanges()}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(e.aKT),e.rXU(e.gRc))}
1,a.\u0275cmp=e.VBU({type:a,selectors:[["app-tooltip"]],inputs:{text:"text",maxLength:"maxLength"},decls:3,vars:6,consts:[["matTooltipPosition","above","matTooltipClass","custom-tooltip",1,"text-container",3,"matTooltip"]],template:function(t,n){1&t&&(e.j41(0,"span",0),e.EFF(1),e.nI1(2,"slice"),e.k0s()),2&t&&(e.Y8G("matTooltip",n.showTooltip?n.text:""),e.R7$(),e.SpI(" ",n.text.length>n.maxLength?e.brH(2,2,n.text,0,n.maxLength)+"...":n.text,"\n"))},dependencies:[V.oV,K.P9],styles:[".text-container[_ngcontent-%COMP%]{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}"]}),p})();var q=Y(45794),$=Y(52980),R=Y(32102),M=Y(99631),x=Y(99213),z=Y(30450),G=Y(52688);const te=["columnChooserBtn"];function be(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",9)(1,"ion-row",10)(2,"ion-col",11)(3,"mat-form-field",12)(4,"mat-icon",13),e.EFF(5,"search"),e.k0s(),e.j41(6,"input",14),e.mxI("ngModelChange",function(n){e.eBV(r);const o=e.XpG();return e.DH7(o.searchTerm,n)||(o.searchTerm=n),e.Njj(n)}),e.bIt("input",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.filterData())}),e.k0s()()(),e.j41(7,"ion-col",15)(8,"mat-form-field",16),e.nrm(9,"input",17),e.k0s(),e.j41(10,"mat-form-field",16),e.nrm(11,"input",18),e.k0s(),e.j41(12,"span",19),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.downloadVisibleColumns())}),e.EFF(13,"download"),e.k0s(),e.j41(14,"span",20),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return n.resetGrid(),e.Njj(n.isClicked=!0)})("animationend",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.isClicked=!1)}),e.EFF(15,"refresh"),e.k0s(),e.j41(16,"button",21,0),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.openColumnChooser())}),e.j41(18,"span",22),e.EFF(19,"tune"),e.k0s()(),e.j41(20,"span",23),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.dialogRef.close())}),e.EFF(21,"close"),e.k0s()()(),e.j41(22,"div",24)(23,"ag-grid-angular",25),e.bIt("gridReady",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onGridReady(n))})("click",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onFilterIconClick(n))}),e.k0s()()()}if(2&a){const r=e.XpG();e.R7$(6),e.R50("ngModel",r.searchTerm),e.R7$(3),e.Y8G("value",r.sharedService.transformYearToFyFormat(r.data.year)),e.R7$(2),e.Y8G("value",r.getMonthName(r.data.month)),e.R7$(3),e.AVh("clicked",r.isClicked),e.R7$(2),e.xc7("background-color",r.buttonColorName),e.R7$(7),e.Y8G("rowData",r.agRowData)("columnDefs",r.agColumnDefs)("gridOptions",r.gridOptions)}}function Re(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",9)(1,"ion-row",10)(2,"ion-col",11)(3,"mat-form-field",12)(4,"mat-icon",13),e.EFF(5,"search"),e.k0s(),e.j41(6,"input",14),e.mxI("ngModelChange",function(n){e.eBV(r);const o=e.XpG();return e.DH7(o.searchTerm,n)||(o.searchTerm=n),e.Njj(n)}),e.bIt("input",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.filterData())}),e.k0s()()(),e.j41(7,"ion-col",15)(8,"mat-form-field",16),e.nrm(9,"input",17),e.k0s(),e.j41(10,"mat-form-field",16),e.nrm(11,"input",18),e.k0s(),e.j41(12,"span",19),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.downloadVisibleColumns())}),e.EFF(13,"download"),e.k0s(),e.j41(14,"span",20),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return n.resetGrid(),e.Njj(n.isClicked=!0)})("animationend",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.isClicked=!1)}),e.EFF(15,"refresh"),e.k0s(),e.j41(16,"button",21,0),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.openColumnChooser())}),e.j41(18,"span",22),e.EFF(19,"tune"),e.k0s()(),e.j41(20,"span",23),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.dialogRef.close())}),e.EFF(21,"close"),e.k0s()()(),e.j41(22,"div",24)(23,"ag-grid-angular",25),e.bIt("gridReady",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onGridReady(n))})("click",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onFilterIconClick(n))}),e.k0s()()()}if(2&a){const r=e.XpG();e.R7$(6),e.R50("ngModel",r.searchTerm),e.R7$(3),e.Y8G("value",r.sharedService.transformYearToFyFormat(r.data.year)),e.R7$(2),e.Y8G("value",r.getMonthName(r.data.month)),e.R7$(3),e.AVh("clicked",r.isClicked),e.R7$(2),e.xc7("background-color",r.buttonColorName),e.R7$(7),e.Y8G("rowData",r.agRowData)("columnDefs",r.agColumnDefs)("gridOptions",r.gridOptions)}}function ye(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",26)(1,"ion-row",10)(2,"ion-col",11)(3,"mat-form-field",12)(4,"mat-icon",13),e.EFF(5,"search"),e.k0s(),e.j41(6,"input",14),e.mxI("ngModelChange",function(n){e.eBV(r);const o=e.XpG();return e.DH7(o.searchTerm,n)||(o.searchTerm=n),e.Njj(n)}),e.bIt("input",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.filterData())}),e.k0s()()(),e.j41(7,"ion-col",15)(8,"mat-form-field",16),e.nrm(9,"input",17),e.k0s(),e.j41(10,"mat-form-field",16),e.nrm(11,"input",18),e.k0s(),e.j41(12,"span",19),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.downloadVisibleColumns())}),e.EFF(13,"download"),e.k0s(),e.j41(14,"span",20),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return n.resetGrid(),e.Njj(n.isClicked=!0)})("animationend",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.isClicked=!1)}),e.EFF(15,"refresh"),e.k0s(),e.j41(16,"button",21,0),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.openColumnChooser())}),e.j41(18,"span",22),e.EFF(19,"tune"),e.k0s()(),e.j41(20,"span",23),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.dialogRef.close())}),e.EFF(21,"close"),e.k0s()()(),e.j41(22,"div",24)(23,"ag-grid-angular",25),e.bIt("gridReady",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onGridReady(n))})("click",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onFilterIconClick(n))}),e.k0s()()()}if(2&a){const r=e.XpG();e.R7$(6),e.R50("ngModel",r.searchTerm),e.R7$(3),e.Y8G("value",r.sharedService.transformYearToFyFormat(r.data.year)),e.R7$(2),e.Y8G("value",r.getMonthName(r.data.month)),e.R7$(3),e.AVh("clicked",r.isClicked),e.R7$(2),e.xc7("background-color",r.buttonColorName),e.R7$(7),e.Y8G("rowData",r.agRowData)("columnDefs",r.agColumnDefs)("gridOptions",r.gridOptions)}}function Ie(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",27)(1,"ion-row",10)(2,"ion-col",11)(3,"mat-form-field",12)(4,"mat-icon",13),e.EFF(5,"search"),e.k0s(),e.j41(6,"input",14),e.mxI("ngModelChange",function(n){e.eBV(r);const o=e.XpG();return e.DH7(o.searchTerm,n)||(o.searchTerm=n),e.Njj(n)}),e.bIt("input",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.filterData())}),e.k0s()()(),e.j41(7,"ion-col",15)(8,"mat-form-field",16),e.nrm(9,"input",17),e.k0s(),e.j41(10,"mat-form-field",16),e.nrm(11,"input",18),e.k0s(),e.j41(12,"span",19),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.downloadVisibleColumns())}),e.EFF(13,"download"),e.k0s(),e.j41(14,"span",20),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return n.resetGrid(),e.Njj(n.isClicked=!0)})("animationend",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.isClicked=!1)}),e.EFF(15,"refresh"),e.k0s(),e.j41(16,"button",21,0),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.openColumnChooser())}),e.j41(18,"span",22),e.EFF(19,"tune"),e.k0s()(),e.j41(20,"span",23),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.dialogRef.close())}),e.EFF(21,"close"),e.k0s()()(),e.j41(22,"div",24)(23,"ag-grid-angular",25),e.bIt("gridReady",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onGridReady(n))})("click",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onFilterIconClick(n))}),e.k0s()()()}if(2&a){const r=e.XpG();e.R7$(6),e.R50("ngModel",r.searchTerm),e.R7$(3),e.Y8G("value",r.sharedService.transformYearToFyFormat(r.data.year)),e.R7$(2),e.Y8G("value",r.getMonthName(r.data.month)),e.R7$(3),e.AVh("clicked",r.isClicked),e.R7$(2),e.xc7("background-color",r.buttonColorName),e.R7$(7),e.Y8G("rowData",r.agRowData)("columnDefs",r.agColumnDefs)("gridOptions",r.gridOptions)}}function xe(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",28)(1,"ion-row",10)(2,"ion-col",11)(3,"mat-form-field",12)(4,"mat-icon",13),e.EFF(5,"search"),e.k0s(),e.j41(6,"input",14),e.mxI("ngModelChange",function(n){e.eBV(r);const o=e.XpG();return e.DH7(o.searchTerm,n)||(o.searchTerm=n),e.Njj(n)}),e.bIt("input",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.filterData())}),e.k0s()()(),e.j41(7,"ion-col",15)(8,"mat-form-field",16),e.nrm(9,"input",17),e.k0s(),e.j41(10,"mat-form-field",16),e.nrm(11,"input",18),e.k0s(),e.j41(12,"span",19),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.downloadVisibleColumns())}),e.EFF(13,"download"),e.k0s(),e.j41(14,"span",20),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return n.resetGrid(),e.Njj(n.isClicked=!0)})("animationend",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.isClicked=!1)}),e.EFF(15,"refresh"),e.k0s(),e.j41(16,"button",21,0),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.openColumnChooser())}),e.j41(18,"span",22),e.EFF(19,"tune"),e.k0s()(),e.j41(20,"span",23),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.dialogRef.close())}),e.EFF(21,"close"),e.k0s()()(),e.j41(22,"div",24)(23,"ag-grid-angular",25),e.bIt("gridReady",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onGridReady(n))})("click",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onFilterIconClick(n))}),e.k0s()()()}if(2&a){const r=e.XpG();e.R7$(6),e.R50("ngModel",r.searchTerm),e.R7$(3),e.Y8G("value",r.sharedService.transformYearToFyFormat(r.data.year)),e.R7$(2),e.Y8G("value",r.getMonthName(r.data.month)),e.R7$(3),e.AVh("clicked",r.isClicked),e.R7$(2),e.xc7("background-color",r.buttonColorName),e.R7$(7),e.Y8G("rowData",r.agRowData)("columnDefs",r.agColumnDefs)("gridOptions",r.gridOptions)}}function je(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",29)(1,"ion-row",10)(2,"ion-col",11)(3,"mat-form-field",12)(4,"mat-icon",13),e.EFF(5,"search"),e.k0s(),e.j41(6,"input",14),e.mxI("ngModelChange",function(n){e.eBV(r);const o=e.XpG();return e.DH7(o.searchTerm,n)||(o.searchTerm=n),e.Njj(n)}),e.bIt("input",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.filterData())}),e.k0s()()(),e.j41(7,"ion-col",15)(8,"mat-form-field",16),e.nrm(9,"input",17),e.k0s(),e.j41(10,"mat-form-field",16),e.nrm(11,"input",18),e.k0s(),e.j41(12,"span",19),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.downloadVisibleColumns())}),e.EFF(13,"download"),e.k0s(),e.j41(14,"span",20),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return n.resetGrid(),e.Njj(n.isClicked=!0)})("animationend",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.isClicked=!1)}),e.EFF(15,"refresh"),e.k0s(),e.j41(16,"button",21,0),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.openColumnChooser())}),e.j41(18,"span",22),e.EFF(19,"tune"),e.k0s()(),e.j41(20,"span",23),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.dialogRef.close())}),e.EFF(21,"close"),e.k0s()()(),e.j41(22,"div",24)(23,"ag-grid-angular",25),e.bIt("gridReady",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onGridReady(n))})("click",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onFilterIconClick(n))}),e.k0s()()()}if(2&a){const r=e.XpG();e.R7$(6),e.R50("ngModel",r.searchTerm),e.R7$(3),e.Y8G("value",r.sharedService.transformYearToFyFormat(r.data.year)),e.R7$(2),e.Y8G("value",r.getMonthName(r.data.month)),e.R7$(3),e.AVh("clicked",r.isClicked),e.R7$(2),e.xc7("background-color",r.buttonColorName),e.R7$(7),e.Y8G("rowData",r.agRowData)("columnDefs",r.agColumnDefs)("gridOptions",r.gridOptions)}}function Me(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",30)(1,"ion-row",10)(2,"ion-col",11)(3,"mat-form-field",12)(4,"mat-icon",13),e.EFF(5,"search"),e.k0s(),e.j41(6,"input",14),e.mxI("ngModelChange",function(n){e.eBV(r);const o=e.XpG();return e.DH7(o.searchTerm,n)||(o.searchTerm=n),e.Njj(n)}),e.bIt("input",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.filterData())}),e.k0s()()(),e.j41(7,"ion-col",15)(8,"mat-form-field",16),e.nrm(9,"input",17),e.k0s(),e.j41(10,"mat-form-field",16),e.nrm(11,"input",18),e.k0s(),e.j41(12,"span",19),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.downloadVisibleColumns())}),e.EFF(13,"download"),e.k0s(),e.j41(14,"span",20),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return n.resetGrid(),e.Njj(n.isClicked=!0)})("animationend",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.isClicked=!1)}),e.EFF(15,"refresh"),e.k0s(),e.j41(16,"button",21,0),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.openColumnChooser())}),e.j41(18,"span",22),e.EFF(19,"tune"),e.k0s()(),e.j41(20,"span",23),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.dialogRef.close())}),e.EFF(21,"close"),e.k0s()()(),e.j41(22,"div",24)(23,"ag-grid-angular",25),e.bIt("gridReady",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onGridReady(n))})("click",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onFilterIconClick(n))}),e.k0s()()()}if(2&a){const r=e.XpG();e.R7$(6),e.R50("ngModel",r.searchTerm),e.R7$(3),e.Y8G("value",r.sharedService.transformYearToFyFormat(r.data.year)),e.R7$(2),e.Y8G("value",r.getMonthName(r.data.month)),e.R7$(3),e.AVh("clicked",r.isClicked),e.R7$(2),e.xc7("background-color",r.buttonColorName),e.R7$(7),e.Y8G("rowData",r.agRowData)("columnDefs",r.agColumnDefs)("gridOptions",r.gridOptions)}}function _e(a,p){if(1&a){const r=e.RV6();e.j41(0,"ag-grid-angular",25),e.bIt("gridReady",function(n){e.eBV(r);const o=e.XpG(2);return e.Njj(o.onPendingGridReady(n))})("click",function(n){e.eBV(r);const o=e.XpG(2);return e.Njj(o.onFilterIconClick(n))}),e.k0s()}if(2&a){const r=e.XpG(2);e.Y8G("rowData",r.pendingRowData)("columnDefs",r.pendingColumnDefs)("gridOptions",r.gridOptions)}}function Se(a,p){if(1&a){const r=e.RV6();e.j41(0,"ag-grid-angular",25),e.bIt("gridReady",function(n){e.eBV(r);const o=e.XpG(2);return e.Njj(o.onNotPendingGridReady(n))})("click",function(n){e.eBV(r);const o=e.XpG(2);return e.Njj(o.onFilterIconClick(n))}),e.k0s()}if(2&a){const r=e.XpG(2);e.Y8G("rowData",r.notPendingRowData)("columnDefs",r.notPendingColumnDefs)("gridOptions",r.gridOptions)}}function Ee(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",31)(1,"ion-row",10)(2,"ion-col",11)(3,"mat-form-field",12)(4,"mat-icon",13),e.EFF(5,"search"),e.k0s(),e.j41(6,"input",14),e.mxI("ngModelChange",function(n){e.eBV(r);const o=e.XpG();return e.DH7(o.searchTerm,n)||(o.searchTerm=n),e.Njj(n)}),e.bIt("input",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.filterData())}),e.k0s()()(),e.j41(7,"ion-col",15)(8,"mat-slide-toggle",32),e.mxI("ngModelChange",function(n){e.eBV(r);const o=e.XpG();return e.DH7(o.showPending,n)||(o.showPending=n),e.Njj(n)}),e.EFF(9),e.k0s(),e.j41(10,"mat-form-field",16),e.nrm(11,"input",17),e.k0s(),e.j41(12,"mat-form-field",16),e.nrm(13,"input",18),e.k0s(),e.j41(14,"span",19),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.downloadVisibleColumns())}),e.EFF(15,"download"),e.k0s(),e.j41(16,"span",20),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return n.resetGrid(),e.Njj(n.isClicked=!0)})("animationend",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.isClicked=!1)}),e.EFF(17,"refresh"),e.k0s(),e.j41(18,"button",21,0),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.openColumnChooser())}),e.j41(20,"span",22),e.EFF(21,"tune"),e.k0s()(),e.j41(22,"span",23),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.dialogRef.close())}),e.EFF(23,"close"),e.k0s()()(),e.j41(24,"div",24),e.DNE(25,_e,1,3,"ag-grid-angular",33)(26,Se,1,3,"ag-grid-angular",33),e.k0s()()}if(2&a){const r=e.XpG();e.R7$(6),e.R50("ngModel",r.searchTerm),e.R7$(2),e.R50("ngModel",r.showPending),e.R7$(),e.SpI(" ",r.showPending?"Pending Documents":"Submitted Documents"," "),e.R7$(2),e.Y8G("value",r.sharedService.transformYearToFyFormat(r.data.year)),e.R7$(2),e.Y8G("value",r.getMonthName(r.data.month)),e.R7$(3),e.AVh("clicked",r.isClicked),e.R7$(2),e.xc7("background-color",r.buttonColorName),e.R7$(7),e.Y8G("ngIf",r.showPending),e.R7$(),e.Y8G("ngIf",!r.showPending)}}let et=(()=>{var a;class p{constructor(t,n,o,i,s,d,u,g,m,l,f,h){this.elementRef=t,this.fb=n,this.httpService=o,this.config=i,this.encryptionService=s,this.toastr=d,this.dataRefreshService=u,this.dialog=g,this.sharedService=m,this.dialogRef=l,this.recruitmentService=f,this.data=h,this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedIn
1UserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.arrUserIds=[],this.searchTerm="",this.showPending=!0,this.isClicked=!1,this.agColumnDefs=[],this.agRowData=[],this.pendingColumnDefs=[],this.notPendingColumnDefs=[],this.pendingRowData=[],this.notPendingRowData=[],this.gridOptions={pagination:!0,paginationPageSize:10,paginationPageSizeSelector:[5,10,25,50,75,100,200,500,1e3],suppressCellFocus:!0,popupParent:document.querySelector("body"),defaultColDef:{flex:1,minWidth:120,resizable:!0,sortable:!0,filter:!0},localeText:{noRowsToShow:"No records found"},postProcessPopup:v=>{var k;if(v.ePopup.style.zIndex="2000","columnChooser"!==v.type)return;const B=null===(k=this.columnChooserBtn)||void 0===k?void 0:k.nativeElement,de=v.ePopup;if(!B||!de)return;const ae=B.getBoundingClientRect();de.style.top=`${ae.bottom+window.scrollY+4}px`,de.style.left="auto",de.style.right=document.documentElement.clientWidth-ae.right+"px"}},this.element=t}ngOnInit(){var t,n,o,i,s,d,u,g;this.initializeSessionData();const m=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=m?Number(this.encryptionService.decryptData(m)):null,null!==(t=this.data.title)&&void 0!==t&&t.toLowerCase().includes("vacant")?(this.setVacantColumnDefs(),this.getVacantCountByDeptBandDesignation()):null!==(n=this.data.title)&&void 0!==n&&n.toLowerCase().includes("new")?(this.setNewVacantColumnDefs(),this.getNewAndVacantPositionDetails()):null!==(o=this.data.title)&&void 0!==o&&o.toLowerCase().includes("listed")?(this.setListedColumnDefs(),this.getListedCandidatesDetails()):null!==(i=this.data.title)&&void 0!==i&&i.toLowerCase().includes("reserved")?(this.setScheduledColumnDefs(),this.getScheduledInterviewDetails()):null!==(s=this.data.title)&&void 0!==s&&s.toLowerCase().includes("not scheduled")?(this.setNotScheduledColumnDefs(),this.getInterviewNotScheduledDetails()):null!==(d=this.data.title)&&void 0!==d&&d.toLowerCase().includes("hired")?(this.setHiredColumnDefs(),this.getHiredCandidateDetails()):null!==(u=this.data.title)&&void 0!==u&&u.toLowerCase().includes("rejected")?(this.setRejectedColumnDefs(),this.getRejectedCandidateDetails()):null!==(g=this.data.title)&&void 0!==g&&g.toLowerCase().includes("document")&&(this.setDocumentColumnDefs(),this.getPendingDocumentDetails(),this.getNotPendingDocumentDetails())}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName}getMonthName(t){var n;return(null===(n=[{key:"01",name:"January"},{key:"02",name:"February"},{key:"03",name:"March"},{key:"04",name:"April"},{key:"05",name:"May"},{key:"06",name:"June"},{key:"07",name:"July"},{key:"08",name:"August"},{key:"09",name:"September"},{key:"10",name:"October"},{key:"11",name:"November"},{key:"12",name:"December"}].find(i=>i.key===t))||void 0===n?void 0:n.name)||""}ngOnDestroy(){document.querySelectorAll(".ag-popup").forEach(t=>t.remove())}openColumnChooser(){var t,n;"document"===this.data.type?null===(t=this.showPending?this.pendingGridApi:this.notPendingGridApi)||void 0===t||t.showColumnChooser():null===(n=this.gridApi)||void 0===n||n.showColumnChooser()}onGridReady(t){this.gridApi=t.api}onPendingGridReady(t){this.pendingGridApi=t.api}onNotPendingGridReady(t){this.notPendingGridApi=t.api}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}filterData(){const t=this.searchTerm;this.gridApi&&this.gridApi.setGridOption("quickFilterText",t),this.pendingGridApi&&this.pendingGridApi.setGridOption("quickFilterText",t),this.notPendingGridApi&&this.notPendingGridApi.setGridOption("quickFilterText",t)}resetGrid(){this.searchTerm="",[this.gridApi,this.pendingGridApi,this.notPendingGridApi].filter(
1Boolean).forEach(n=>{n.setGridOption("quickFilterText",""),n.setFilterModel(null),n.resetColumnState(),n.deselectAll(),n.refreshCells()})}buildHodParams(){const t=this.loggedInUserRoles.some(s=>"MD"===s.displayName);let n="",o="";var i;return"HOD"!==this.loggedInUserRole&&"Admin"!==this.loggedInUserRole||t?!t&&this.arrUserIds.length>0&&(n=this.arrUserIds.join(",")):(n=null!==(i=this.loggedInUserId)&&void 0!==i?i:"",o=this.loggedInUserRole),{userIdsString:n,userHodRole:o}}buildUrl(t){const{userIdsString:n,userHodRole:o}=this.buildHodParams();let i=`${t}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.data.year}&month=${this.data.month}`;return n&&(i+=`&userHodIds=${encodeURIComponent(n)}&userHodRole=${encodeURIComponent(o)}`),this.recruitmentService.appendChildId(i)}getFinalStatusLabel(t){return t?"hired"===t.toLowerCase()?"Selected":t:""}setVacantColumnDefs(){this.agColumnDefs=[{headerName:"Department",field:"department"},{headerName:"Band",field:"band"},{headerName:"Designation",field:"designation"},{headerName:"Vacant Count",field:"vacantCount"}]}setNewVacantColumnDefs(){this.agColumnDefs=[{headerName:"Type",field:"type"},{headerName:"Department",field:"department"},{headerName:"Band",field:"band"},{headerName:"Designation",field:"designation"},{headerName:"Panel Members",field:"panelMembers",tooltipValueGetter:t=>{var n;return null!==(n=t.data)&&void 0!==n&&null!==(n=n.panelMembersList)&&void 0!==n&&n.length?t.data.panelMembersList.join(", "):"No panel members assigned"}}]}setListedColumnDefs(){this.agColumnDefs=[{headerName:"Position",field:"position"},{headerName:"Count",field:"count"}]}setScheduledColumnDefs(){this.agColumnDefs=[{headerName:"Position",field:"positionName"},{headerName:"Candidate",field:"candidateName"},{headerName:"Round",field:"interviewRound"},{headerName:"Department",field:"department"},{headerName:"Band",field:"band"},{headerName:"Panel Members",field:"panelMembers"}]}setNotScheduledColumnDefs(){this.agColumnDefs=[{headerName:"Name",field:"name"},{headerName:"Email",field:"email",tooltipField:"email"},{headerName:"Skills",field:"skills"},{headerName:"Position",field:"positionAppliedFor"}]}setHiredColumnDefs(){this.agColumnDefs=[{headerName:"Candidate Name",field:"candidateName"},{headerName:"Position",field:"positionName"},{headerName:"Department",field:"department"},{headerName:"Lead",field:"leadInterviewName",valueFormatter:t=>t.value||"N/A"},{headerName:"Panel Member",field:"panelMemberName",valueFormatter:t=>t.value||"N/A"}]}setRejectedColumnDefs(){this.agColumnDefs=[{headerName:"Candidate Name",field:"candidateName"},{headerName:"Position",field:"positionName"},{headerName:"Department",field:"department"},{headerName:"Panel Member",field:"panelMemberName",valueFormatter:t=>t.value||"N/A"}]}setDocumentColumnDefs(){this.pendingColumnDefs=[{headerName:"Candidate Name",field:"candidateName"},{headerName:"Position",field:"positionName",tooltipField:"positionName"},{headerName:"Department",field:"department"},{headerName:"Email",field:"email",tooltipField:"email"},{headerName:"Phone",field:"phone"},{headerName:"Interview Round",field:"interviewRound"},{headerName:"Final Status",field:"finalStatus",valueFormatter:n=>this.getFinalStatusLabel(n.value)},{headerName:"Lead Interviewer",field:"leadInterviewer",valueFormatter:n=>n.value?Object.values(n.value).join(", "):"N/A"}],this.notPendingColumnDefs=[{headerName:"Candidate Name",field:"candidateName"},{headerName:"Position",field:"positionName",tooltipField:"positionName"},{headerName:"Department",field:"department"},{headerName:"Email",field:"email",tooltipField:"email"},{headerName:"Phone",field:"phone"},{headerName:"Interview Round",field:"interviewRound"},{headerName:"Final Status",field:"finalStatus",valueFormatter:n=>this.getFinalStatusLabel(n.value)},{headerName:"Lead Interviewer",field:"leadInterviewer",valueFormatter:n=>n.value?Object.values(n.value).join(", "):"N/A"}]}getVacantCountByDeptBandDesignation(){const t=this.buildUrl(this.config.vacantCountByDeptBandDesignation);this.httpService.callGetService(t).subscribe({next:n=>{this.agRowData=n.data||[]},error:n=>{console.error("Error fetching vacant count data:",n),this.agRowData=[]}})}
1getNewAndVacantPositionDetails(){const t=this.buildUrl(this.config.newAndVacantPositionDetails);this.httpService.callGetService(t).subscribe({next:n=>{var o,i;const s=n.data,d=(u,g)=>g.map(m=>{var l;return{type:u,department:m.department,band:m.band,designation:m.designation,panelMembers:null!==(l=m.panelMembers)&&void 0!==l&&l.length?m.panelMembers.join(", "):"-",panelMembersList:m.panelMembers||[]}});this.agRowData=[...d("Vacant",(null===(o=s["Vacant Position"])||void 0===o?void 0:o.data)||[]),...d("New",(null===(i=s["New Position"])||void 0===i?void 0:i.data)||[])]},error:n=>{console.error("Error fetching new and vacant data:",n),this.agRowData=[]}})}getListedCandidatesDetails(){if(!this.loggedInUserCompanyID||!this.data.year||!this.data.month)return;const t=this.buildUrl(this.config.listedCandidate);this.httpService.callGetService(t).subscribe({next:n=>{this.agRowData=n.data||[]},error:n=>{console.error("Error fetching listed candidates:",n),this.agRowData=[]}})}getScheduledInterviewDetails(){if(!this.loggedInUserCompanyID||!this.data.year||!this.data.month)return;const t=this.buildUrl(this.config.scheduledInterview);this.httpService.callGetService(t).subscribe({next:n=>{this.agRowData=n.data||[]},error:n=>{console.error("Error fetching scheduled interviews:",n),this.agRowData=[]}})}getInterviewNotScheduledDetails(){if(!this.loggedInUserCompanyID||!this.data.year||!this.data.month)return;const t=this.buildUrl(this.config.interviewNotScheduled);this.httpService.callGetService(t).subscribe({next:n=>{this.agRowData=n.data||[]},error:n=>{console.error("Error fetching not scheduled interviews:",n),this.agRowData=[]}})}getHiredCandidateDetails(){if(!this.loggedInUserCompanyID||!this.data.year||!this.data.month)return;const t=this.buildUrl(this.config.hiredInterview);this.httpService.callGetService(t).subscribe({next:n=>{this.agRowData=n||[]},error:n=>{console.error("Error fetching hired candidate data:",n),this.agRowData=[]}})}getRejectedCandidateDetails(){if(!this.loggedInUserCompanyID||!this.data.year||!this.data.month)return;const t=this.buildUrl(this.config.rejectedInterview);this.httpService.callGetService(t).subscribe({next:n=>{this.agRowData=n||[]},error:n=>{console.error("Error fetching rejected candidate data:",n),this.agRowData=[]}})}
1getPendingDocumentDetails(){if(!this.loggedInUserCompanyID||!this.data.year||!this.data.month)return;const t=this.buildUrl(this.config.pendingDoc);this.httpService.callGetService(t).subscribe({next:n=>{this.pendingRowData=n||[]},error:n=>{console.error("Error fetching pending document data:",n),this.pendingRowData=[]}})}getNotPendingDocumentDetails(){if(!this.loggedInUserCompanyID||!this.data.year||!this.data.month)return;const t=this.buildUrl(this.config.notPendingDoc);this.httpService.callGetService(t).subscribe({next:n=>{this.notPendingRowData=n||[]},error:n=>{console.error("Error fetching not-pending document data:",n),this.notPendingRowData=[]}})}exportCurrentPage(t,n,o,i){const s=t.paginationGetPageSize(),u=t.paginationGetCurrentPage()*s,g=[];if(t.forEachNodeAfterFilterAndSort((h,v)=>{v>=u&&v<u+s&&g.push(h.data)}),!g.length)return void this.toastr.info("No data to download for this page.","Info");const m=F.utils.json_to_sheet(g.map(n)),f=F.write({Sheets:{[o]:m},SheetNames:[o]},{bookType:"xlsx",type:"array"});U.saveAs(new Blob([f],{type:"application/octet-stream"}),i)}downloadCandidates(){this.exportCurrentPage(this.gridApi,t=>({Department:t.department,Band:t.band,Designation:t.designation,"Vacant Count":t.vacantCount}),"Vacant Positions",`Vacant_Positions_${this.data.month}_${this.data.year}.xlsx`)}downloadNewAndVacant(){this.exportCurrentPage(this.gridApi,t=>({Type:t.type,Department:t.department,Band:t.band,Designation:t.designation,"Panel Members":t.panelMembers}),"New & Vacant Positions",`New_And_Vacant_Positions_${this.data.month}_${this.data.year}.xlsx`)}downloadListedCandidates(){this.exportCurrentPage(this.gridApi,t=>({Position:t.position,Count:t.count}),"Listed Candidates",`Listed_Candidates_${this.data.month}_${this.data.year}.xlsx`)}downloadScheduledInterviews(){this.exportCurrentPage(this.gridApi,t=>({Position:t.positionName,Candidate:t.candidateName,Round:t.interviewRound,Department:t.department,Band:t.band,"Panel Members":t.panelMembers||"N/A"}),"Scheduled Interviews",`Scheduled_Interviews_${this.data.month}_${this.data.year}.xlsx`)}downloadInterviewNotScheduled(){this.exportCurrentPage(this.gridApi,t=>({Name:t.name,Email:t.email,Skills:t.skills,"Position Applied For":t.positionAppliedFor}),"Interview Not Scheduled",`Interview_Not_Scheduled_${this.data.month}_${this.data.year}.xlsx`)}downloadHiredCandidates(){this.exportCurrentPage(this.gridApi,t=>({"Candidate Name":t.candidateName,"Position Name":t.positionName,Department:t.department,Lead:t.leadInterviewer||"N/A","Panel Member":t.panelMemberName||"N/A"}),"Hired Candidates",`Hired_Candidates_${this.data.month}_${this.data.year}.xlsx`)}downloadRejectedCandidates(){this.exportCurrentPage(this.gridApi,t=>({"Candidate Name":t.candidateName,"Position Name":t.positionName,Department:t.department,"Panel Member":t.panelMemberName||"N/A"}),"Rejected Candidates",`Rejected_Candidates_${this.data.month}_${this.data.year}.xlsx`)}downloadPendingDocuments(){this.exportCurrentPage(this.pendingGridApi,t=>({"Candidate Name":t.candidateName,"Position Name":t.positionName,Department:t.department,Email:t.email,Phone:t.phone,"Interview Round":t.interviewRound,"Final Status":this.getFinalStatusLabel(t.finalStatus),"Lead Interviewer":t.leadInterviewer?Object.values(t.leadInterviewer).join(", "):"N/A"}),"Pending Documents",`Pending_Documents_${this.data.month}_${this.data.year}.xlsx`)}downloadNotPendingDocuments(){this.exportCurrentPage(this.notPendingGridApi,t=>({"Candidate Name":t.candidateName,"Position Name":t.positionName,Department:t.department,Email:t.email,Phone:t.phone,"Interview Round":t.interviewRound,"Final Status":this.getFinalStatusLabel(t.finalStatus),"Lead Interviewer":t.leadInterviewer?Object.values(t.leadInterviewer).join(", "):"N/A"}),"Not Pending Documents",`Not_Pending_Documents_${this.data.month}_${this.data.year}.xlsx`)}openTooltipDialog(t,n){var o;this.dialog.open(ne,{data:t,panelClass:"tooltip-dialog-panel",hasBackdrop:!1,position:{top:`${n.clientY+10}px`,left:`${n.clientX+10}px`}}),null===(o=this.dialogInstance)||void 0===o||o.afterClosed().subscribe(()=>{})}onDialogMouseLeave(t){this.dialogInstance&&this.dialogInstance.close()}onMouseMove(t){if(this.dialogInstance){const n=document.querySelector(".tooltip-dialog-panel");
1if(!n)return void this.dialogInstance.close();const o=this.element.nativeElement.getBoundingClientRect(),i=n.getBoundingClientRect();(t.clientX<o.left||t.clientX>o.right||t.clientY<o.top||t.clientY>o.bottom)&&(t.clientX<i.left||t.clientX>i.right||t.clientY<i.top||t.clientY>i.bottom)&&this.dialogInstance.close()}}downloadVisibleColumns(){const t="document"===this.data.type?this.showPending?this.pendingGridApi:this.notPendingGridApi:this.gridApi;if(!t)return;const n=t.getAllDisplayedColumns().map(f=>f.getColDef()).filter(f=>f.headerName&&f.field&&"Actions"!==f.headerName),o=t.paginationGetCurrentPage(),i=t.paginationGetPageSize(),s=[];t.forEachNodeAfterFilterAndSort(f=>s.push(f.data));const d=s.slice(o*i,(o+1)*i);if(!d.length)return void this.toastr.info("No data to download for this page.","Info");const u=d.map(f=>{const h={};for(const v of n){let k;if("function"==typeof v.valueGetter)try{k=v.valueGetter({data:f})}catch{k=f[v.field]}else k=f[v.field];null==k?k="":"object"==typeof k&&(k=Object.values(k).join(", ")),h[v.headerName]=String(k)}return h}),m={Sheets:{Data:F.utils.json_to_sheet(u)},SheetNames:["Data"]},l=F.write(m,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([l],{type:"application/octet-stream"}),`Export_Visible_Page_${o+1}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(e.aKT),e.rXU(y.ok),e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU(q.tw),e.rXU(C.N),e.rXU(b.bZ),e.rXU($.d),e.rXU(b.CP),e.rXU(I.W),e.rXU(b.Vh))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-recruitment-dashboard-popup-component"]],viewQuery:function(t,n){if(1&t&&e.GBs(te,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},hostBindings:function(t,n){1&t&&e.bIt("mousemove",function(i){return n.onMouseMove(i)},!1,e.EBC)},decls:9,vars:8,consts:[["columnChooserBtn",""],[1,"modal-content-wrapper"],["class","vacant-table-container",4,"ngIf"],["class","listed-table-container",4,"ngIf"],["class","scheduled-table-container",4,"ngIf"],["class","interview-not-scheduled-container",4,"ngIf"],["class","hired-candidate-container",4,"ngIf"],["class","rejected-candidate-container",4,"ngIf"],["class","pending-document-container",4,"ngIf"],[1,"vacant-table-container"],[1,"filter-bar","mb-10"],["size","12","size-md","auto"],[1,"mat-height40","mat-input-style","small-field","w-100"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],[1,"filter-col-right"],[1,"mat-height40","mat-input-style","mr-10",2,"width","130px"],["matInput","","readonly","","placeholder","Year",3,"value"],["matInput","","readonly","","placeholder","Month",3,"value"],["matTooltip","Download Excel",1,"icon-action-btn","material-icons","mr-10",3,"click"],["title","Refresh",1,"icon-action-btn","material-icons","ml-5","mr-10",3,"click","animationend"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5","mr-5",3,"click"],[1,"material-icons"],["matTooltip","Close",1,"material-icons","cp","ml-10",3,"click"],[1,"table-container","mb-20"],[1,"ag-theme-alpine",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],[1,"listed-table-container"],[1,"scheduled-table-container"],[1,"interview-not-scheduled-container"],[1,"hired-candidate-container"],[1,"rejected-candidate-container"],[1,"pending-document-container"],["color","primary",1,"mr-10","documentToggle",3,"ngModelChange","ngModel"],["style","width: 100%; height: 600px;","class","ag-theme-alpine",3,"rowData","columnDefs","gridOptions","gridReady","click",4,"ngIf"]],template:function(t,n){1&t&&(e.j41(0,"div",1),e.DNE(1,be,24,10,"div",2)(2,Re,24,10,"div",2)(3,ye,24,10,"div",3)(4,Ie,24,10,"div",4)(5,xe,24,10,"div",5)(6,je,24,10,"div",6)(7,Me,24,10,"div",7)(8,Ee,27,11,"div",8),e.k0s()),2&t&&(e.R7$(),e.Y8G("ngIf","vacant"===n.data.type),e.R7$(),e.Y8G("ngIf","new"===n.data.type),e.R7$(),e.Y8G("ngIf","listed"===n.data.type),e.R7$(),e.Y8G("ngIf","reserved"===n.data.type),e.R7$(),e.Y8G("ngIf","notScheduled"===n.data.type),e.R7$(),e.Y8G("ngIf","hired"===n.data.type),e.R7$(),e.Y8G("ngIf","rejected"===n.data.type),e.R7$(),e.Y8G("ngIf","document"===n.data.type))},dependencies:[K.bT,y.me,y.BC,y.vS,J.hU,J.ln,R.rl,R.JW,M.fg,x.An,V.oV,z.sG,G.xs],styles:[".modal-content-wrapper{max-height:87vh;overflow-y:auto;overflow-x:hidden;padding:20px}.modal-content-wrapper .table-container{width:100%;overflow-y:auto;overflow-x:auto;max-height:60vh;border:1px solid #ddd;border-radius:4px}.modal-content-wrapper .table-container table{width:100%;border-collapse:collapse}.modal-content-wrapper .table-container table th,.modal-content-wrapper .table-container table td{border-bottom:1px solid #ddd;padding:10px;text-align:left;font-size:14px!important}.modal-content-wrapper .table-container table th{background-color:#f2f2f2;font-family:OpenSans-SemiBold;white-space:nowrap;position:sticky;top:0;z-index:10}.modal-content-wrapper .table-container table td{background-color:#fff;font-family:OpenSans-Regular}.modal-content-wrapper .filter-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;width:100%}.modal-content-wrapper .filter-col-right{display:flex!important;align-items:center!important;justify-content:flex-end!important;flex:1}@media (min-width: 768px){.modal-content-wrapper .justify-content-md-end{justify-content:flex-end!important}}.modal-content-wrapper .ml-10{margin-left:10px}.modal-content-wrapper .mt-4{margin-top:4px}
1.modal-content-wrapper .mb-20{margin-bottom:20px}.modal-content-wrapper .w-100{width:100%}.modal-content-wrapper .small-field{width:250px}@media (max-width: 767px){.modal-content-wrapper .small-field{width:100%}}.modal-content-wrapper .cell{font-size:14px!important}.modal-content-wrapper .mat-height40{height:40px!important}.modal-content-wrapper .icon-action-btn{border:1px solid #f3820e;color:#f3820e;padding:9px;border-radius:6px;background-color:#fff;height:40px;width:40px;font-size:22px;cursor:pointer}.modal-content-wrapper .icon-action-btn.clicked{animation:spin .4s linear}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.modal-content-wrapper .cp{cursor:pointer;color:#333;display:inline-flex;align-items:center;height:40px;font-size:24px}.modal-content-wrapper .header-cell{background-color:#ddd!important;font-weight:700!important;font-size:14px!important}.modal-content-wrapper .documentToggle{align-content:center}.modal-content-wrapper .align-center{display:flex!important;align-items:center!important}.modal-content-wrapper .justify-content-start{justify-content:flex-start!important}.mat-mdc-dialog-container .mdc-dialog__surface{border-radius:18px!important}:host ::ng-deep .mat-dialog-container{padding:0!important;overflow:hidden!important}\n"],encapsulation:2}),p})();var He=Y(77180),lt=Y(21518),he=Y(82798),pe=Y(86600);const $e=a=>({dispNone:a});function dt(a,p){if(1&a&&(e.j41(0,"mat-option",65),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG();e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}function Ye(a,p){if(1&a&&(e.j41(0,"mat-option",65),e.EFF(1),e.k0s()),2&a){const r=p.$implicit;e.Y8G("value",r.key),e.R7$(),e.SpI(" ",r.name,"")}}function ct(a,p){1&a&&e.nrm(0,"img",66)}function ht(a,p){1&a&&e.nrm(0,"img",67)}function Ue(a,p){1&a&&e.nrm(0,"img",68)}function Qe(a,p){1&a&&e.nrm(0,"img",69)}function st(a,p){1&a&&e.nrm(0,"img",70)}function Fe(a,p){1&a&&e.nrm(0,"img",71)}function ft(a,p){if(1&a&&(e.j41(0,"tr")(1,"td"),e.EFF(2),e.k0s(),e.j41(3,"td"),e.EFF(4),e.k0s(),e.j41(5,"td"),e.EFF(6),e.k0s(),e.j41(7,"td"),e.EFF(8),e.k0s()()),2&a){const r=p.$implicit;e.R7$(2),e.JRh(r.department),e.R7$(2),e.JRh(r.plan),e.R7$(2),e.JRh(r.actual),e.R7$(2),e.JRh(r.gap)}}function T(a,p){1&a&&e.nrm(0,"img",66)}function H(a,p){1&a&&e.nrm(0,"img",67)}function W(a,p){1&a&&e.nrm(0,"img",68)}function oe(a,p){1&a&&e.nrm(0,"img",69)}function ce(a,p){1&a&&e.nrm(0,"img",70)}function ge(a,p){1&a&&e.nrm(0,"img",71)}function ke(a,p){1&a&&e.nrm(0,"img",72)}function Le(a,p){1&a&&e.nrm(0,"img",73)}function qe(a,p){if(1&a&&(e.j41(0,"mat-option",65),e.EFF(1),e.k0s()),2&a){const r=p.$implicit;e.Y8G("value",r),e.R7$(),e.JRh(r)}}function tt(a,p){if(1&a&&(e.j41(0,"tr")(1,"td"),e.EFF(2),e.k0s(),e.j41(3,"td"),e.EFF(4),e.k0s(),e.j41(5,"td"),e.EFF(6),e.k0s(),e.j41(7,"td"),e.EFF(8),e.k0s()()),2&a){const r=p.$implicit;e.R7$(2),e.JRh(r.department),e.R7$(2),e.JRh(r.evaluated),e.R7$(2),e.JRh(r.scheduled),e.R7$(2),e.JRh(r.pending)}}let Je=(()=>{var a;class p{get arrAllMonths(){return"Apr_Mar"===this.loggedInCompanyFiscalyear?[...this.months.slice(3),...this.months.slice(0,3)]:this.months}constructor(t,n,o,i,s,d,u,g,m){this.fb=t,this.httpService=n,this.config=o,this.encryptionService=i,this.dataRefreshService=s,this.dialog=d,this.sharedService=u,this.PdfDownload=g,this.recruitmentService=m,this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.recruitmentYears=[],this.selectedYearForRecruitment="",this.fromYear="",this.toYear="",this.taskFromDate=null,this.taskToDate=null,this.selectedMonth="",this.selectedMonthName="",this.vacantCount=0,this.newPositionCount=0,this.dashboardCandidateCount=0,this.interviewScheduleCount=0,this.interviewNotScheduleCount=0,this.hiredCount=0,this.rejectedCount=0,this.documentPendingCount=0,this.documentNotPendingCount=0,this.isNotEmployee=!1,this.arrHODByUserList=[],this.arrUserIds=[],this.destroy$=new Z.B,this.months=[{key:"01",name:"January"},{key:"02",name:"February"},{key:"03",name:"March"},{key:"04",name:"April"},{key:"05",name:"May"},{key:"06",name:"June"},{key:"07",name:"July"},{key:"08",name:"August"},{key:"09",name:"September"},{key:"10",name:"October"},{key:"11",name:"November"},{key:"12",name:"December"}],this.planVsActualData=[],this.planVsActualTableData=[],this.isPlanActualTableVisible=!1,this.selectedPlanActualChartType="bar",this.loading=!1,this.renderRetries=0,this.maxRenderRetries=20,this.interviewStatusData=[],this.filteredInterviewStatusData=[],this.isInterviewTableVisible=!1,this.selectedInterviewChartType="bar",this.selectedDepartment=null,this.departmentList=[],this.selectedDepartments=[],this.renderRetriesInterviewStatus=0,this.maxRenderRetriesInterviewStatus=10,this.funnelSourceData=[],this.dynamicStages=[],this.funnelColumnDefs=[],this.funnelGridOptions={suppressCellFocus:!0,pagination:!0,paginationPageSize:10,paginationPageSizeSelector:[5,10,25,50,100],defaultColDef:{sortable:!0,filter:!0,resizable:!0,flex:1,minWidth:130}}}ngOnInit(){this.loadUserRoles(),this.dataRefreshService.refreshNeeded$.pipe((0,Q.B)(300),(0,L.Q)(this.destroy$)).subscribe(()=>{this.initializeSessionData(),this.getPmsYearList()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}loadUserRoles(){const n=sessionStorage.getItem("loggedInUserRoles");this.loggedInUserRoles=n?JSON.parse(n):[],this.loggedInUserRole=(o=>{const i=sessionStorage.getItem("loggedInUserRole");return i?this.encryptionService.decryptData(i):null})()}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName,this.isNotEmployee="Employee"!==this.loggedInUserRole}getPmsYearList(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.recruitmentYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.recruitmentYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-")),this.setDefaultMonth()}onYearChange(t){this.selectedYearForRecruitment=t,this.setDefaultMonth()}setDefaultMonth(){const t=(new Date).toISOString().slice(5,7),n=this.arrAllMonths.find(o=>o.key===t);n?(this.selectedMonth=n.key,this.selectedMonthName=n.name):(this.selectedMonth=this.arrAllMonths[0].key,this.selectedMonthName=this.arrAllMonths[0].name),this.fetchDashboardCount()}onMonthChange(t){const n=this.arrAllMonths.find(o=>o.key===t.value);n&&(this.selectedMonth=n.key,this.selectedMonthName=n.name),this.fetchDashboardCount()}fetchDashboardCount(){this.getVacantCount(),this.getNewPositionCount(),this.getDashboardCandidateListCount(),this.getInterviewScheduleCount(),this.getInterviewNotScheduleCount(),this.getHireCount(),this.getRejectedCount(),this.getDocumentPendingCount(),this.getDocumentNotPendingCount(),this.fetchRecruitmentPlanVsActual(),this.fetchDepartmentInterviewStatus(),this.fetchFunnelSourceReport()}getVacantCount(){this.loading=!0;const t=this.loggedInUserRoles.some(u=>"MD"===u.displayName);let n="",o="";var i;"HOD"!==this.loggedInUserRole&&"Admin"!==this.loggedInUserRole||t?!t&&this.arrUserIds.length>0&&(n=this.arrUserIds.join(",")):(n=null!==(i=this.loggedInUserId)&&void 0!==i?i:"",o=this.loggedInUserRole);const s=n?`${this.config.getVacantCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}&userHodIds=${encodeURIComponent(n)}&userHodRole=${encodeURIComponent(o)}`:`${this.config.getVacantCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}`,d=this.recruitmentService.appendChildId(s);this.httpService.callGetService(d).subscribe({next:u=>{this.vacantCount=u.vacantCount||0},error:u=>{this.vacantCount=0}})}getNewPositionCount(){this.loading=!0;const t=this.loggedInUserRoles.some(u=>"MD"===u.displayName);let n="",o="";var i;"HOD"!==this.loggedInUserRole&&"Admin"!==this.loggedInUserRole||t?!t&&this.arrUserIds.length>0&&(n=this.arrUserIds.join(",")):(n=null!==(i=this.loggedInUserId)&&void 0!==i?i:"",o=this.loggedInUserRole);const s=n?`${this.config.getNewPositionCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}&userHodIds=${encodeURIComponent(n)}&userHodRole=${encodeURIComponent(o)}`:`${this.config.getNewPositionCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}`,d=this.recruitmentService.appendChildId(s);this.httpService.callGetService(d).subscribe({next:u=>{this.newPositionCount=u.count||0},error:u=>{this.newPositionCount=0}})}getDashboardCandidateListCount(){this.loading=!0;const t=this.loggedInUserRoles.some(u=>"MD"===u.displayName);let n="",o="";var i;"HOD"!==this.loggedInUserRole&&"Admin"!==this.loggedInUserRole||t?!t&&this.arrUserIds.length>0&&(n=this.arrUserIds.join(",")):(n=null!==(i=this.loggedInUserId)&&void 0!==i?i:"",o=this.loggedInUserRole);const s=n?`${this.config.getDashboardCandidateListCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}&userHodIds=${encodeURIComponent(n)}&userHodRole=${encodeURIComponent(o)}`:`${this.config.getDashboardCandidateListCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}`,d=this.recruitmentService.appendChildId(s);this.httpService.callGetService(d).subscribe({next:u=>this.dashboardCandidateCount=u.count||0,error:()=>this.dashboardCandidateCount=0})}getInterviewScheduleCount(){this.loading=!0;const t=this.loggedInUserRoles.some(u=>"MD"===u.displayName);let n="",o="";var i;"HOD"!==this.loggedInUserRole&&"Admin"!==this.loggedInUserRole||t?!t&&this.arrUserIds.length>0&&(n=this.arrUserIds.join(",")):(n=null!==(i=this.loggedInUserId)&&void 0!==i?i:"",o=this.loggedInUserRole);const s=n?`${this.config.interviewScheduleCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}&userHodIds=${encodeURIComponent(n)}&userHodRole=${encodeURIComponent(o)}`:`${this.config.interviewScheduleCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}`,d=this.recruitmentService.appendChildId(s);this.httpService.callGetService(d).subscribe({next:u=>this.interviewScheduleCount=u.data||0,error:()=>this.interviewScheduleCount=0})}getInterviewNotScheduleCount(){const t=this.loggedInUserRoles.some(u=>"MD"===u.displayName);let n="",o="";var i;"HOD"!==this.loggedInUserRole&&"Admin"!==this.loggedInUserRole||t?!t&&this.arrUserIds.length>0&&(n=this.arrUserIds.join(",")):(n=null!==(i=this.loggedInUserId)&&void 0!==i?i:"",o=this.loggedInUserRole);const s=n?`${this.config.interviewNotScheduleCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}&userHodIds=${encodeURIComponent(n)}&userHodRole=${encodeURIComponent(o)}`:`${this.config.interviewNotScheduleCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}`,d=this.recruitmentService.appendChildId(s);this.httpService.callGetService(d).subscribe({next:u=>this.interviewNotScheduleCount=u.data||0,error:()=>this.interviewNotScheduleCount=0})}getHireCount(){const t=this.loggedInUserRoles.some(u=>"MD"===u.displayName);let n="",o="";var i;"HOD"!==this.loggedInUserRole&&"Admin"!==this.loggedInUserRole||t?!t&&this.arrUserIds.length>0&&(n=this.arrUserIds.join(",")):(n=null!==(i=this.loggedInUserId)&&void 0!==i?i:"",o=this.loggedInUserRole);const s=n?`${this.config.getDashboardHireCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}&userHodIds=${encodeURIComponent(n)}&userHodRole=${encodeURIComponent(o)}`:`${this.config.getDashboardHireCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}`,d=this.recruitmentService.appendChildId(s);this.httpService.callGetService(d).subscribe({next:u=>this.hiredCount=u.data||0,error:()=>this.hiredCount=0})}getRejectedCount(){const t=this.loggedInUserRoles.some(u=>"MD"===u.displayName);let n="",o="";var i;"HOD"!==this.loggedInUserRole&&"Admin"!==this.loggedInUserRole||t?!t&&this.arrUserIds.length>0&&(n=this.arrUserIds.join(",")):(n=null!==(i=this.loggedInUserId)&&void 0!==i?i:"",o=this.loggedInUserRole);const s=n?`${this.config.getDashboardRejectedCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}&userHodIds=${encodeURIComponent(n)}&userHodRole=${encodeURIComponent(o)}`:`${this.config.getDashboardRejectedCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}`,d=this.recruitmentService.appendChildId(s);this.httpService.callGetService(d).subscribe({next:u=>this.rejectedCount=u.data||0,error:()=>this.rejectedCount=0})}getDocumentPendingCount(){const t=this.loggedInUserRoles.some(u=>"MD"===u.displayName);let n="",o="";var i;"HOD"!==this.loggedInUserRole&&"Admin"!==this.loggedInUserRole||t?!t&&this.arrUserIds.length>0&&(n=this.arrUserIds.join(",")):(n=null!==(i=this.loggedInUserId)&&void 0!==i?i:"",o=this.loggedInUserRole);const s=n?`${this.config.getDocumentStatusPendingCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}&userHodIds=${encodeURIComponent(n)}&userHodRole=${encodeURIComponent(o)}`:`${this.config.getDocumentStatusPendingCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}`,d=this.recruitmentService.appendChildId(s);this.httpService.callGetService(d).subscribe({next:u=>this.documentPendingCount=u.data||0,error:()=>this.documentPendingCount=0})}getDocumentNotPendingCount(){const t=this.loggedInUserRoles.some(u=>"MD"===u.displayName);let n="",o="";var i;"HOD"!==this.loggedInUserRole&&"Admin"!==this.loggedInUserRole||t?!t&&this.arrUserIds.length>0&&(n=this.arrUserIds.join(",")):(n=null!==(i=this.loggedInUserId)&&void 0!==i?i:"",o=this.loggedInUserRole);const s=n?`${this.config.getDocumentStatusNotPendingCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}&userHodIds=${encodeURIComponent(n)}&userHodRole=${encodeURIComponent(o)}`:`${this.config.getDocumentStatusNotPendingCount}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}`,d=this.recruitmentService.appendChildId(s);this.httpService.callGetService(d).subscribe({next:u=>this.documentNotPendingCount=u.data||0,error:()=>this.documentNotPendingCount=0})}openRecruitmentPopup(t){let n="",o=0;switch(t){case"vacant":n="Total Vacant Positions",o=this.vacantCount;break;case"new":n="Total New Positions",o=this.newPositionCount;break;case"listed":n="Listed Candidates",o=this.d
1ashboardCandidateCount;break;case"reserved":n="Interview Slot Reserved",o=this.interviewScheduleCount;break;case"notScheduled":n="Interviews Not Scheduled",o=this.interviewNotScheduleCount;break;case"document":n="Document Status",o=this.documentPendingCount+this.documentNotPendingCount;break;case"hired":n="Hired Candidates",o=this.hiredCount;break;case"rejected":n="Rejected Candidates",o=this.rejectedCount}const i=new b.ru;i.disableClose=!1,i.height="70%",i.width="80%",i.panelClass="custom-dialog-container",i.data={type:t,title:n,count:o,year:this.selectedYearForRecruitment,month:this.selectedMonth},this.dialog.open(et,i)}fetchRecruitmentPlanVsActual(){this.loading=!0;const t=this.loggedInUserRoles.some(u=>"MD"===u.displayName);let n="",o="";var i;"HOD"!==this.loggedInUserRole&&"Admin"!==this.loggedInUserRole||t?!t&&this.arrUserIds.length>0&&(n=this.arrUserIds.join(",")):(n=null!==(i=this.loggedInUserId)&&void 0!==i?i:"",o=this.loggedInUserRole);const s=n?`${this.config.getManpowerVsActualDatabyDepartment}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}&userHodIds=${encodeURIComponent(n)}&userHodRole=${encodeURIComponent(o)}`:`${this.config.getManpowerVsActualDatabyDepartment}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}`,d=this.recruitmentService.appendChildId(s);this.httpService.callGetService(d).subscribe({next:u=>{this.planVsActualData=(null==u?void 0:u.data)||[],this.planVsActualTableData=this.planVsActualData,this.renderRecruitmentPlanVsActualChart(),this.loading=!1},error:u=>{this.loading=!1}})}renderRecruitmentPlanVsActualChart(){const t=document.getElementById("plan-actual-chart");if(!t||0===t.offsetHeight||0===t.offsetWidth)return void(this.renderRetries<this.maxRenderRetries&&(this.renderRetries++,setTimeout(()=>this.renderRecruitmentPlanVsActualChart(),100)));this.renderRetries=0;const n=He.getInstanceByDom(t)||He.init(t),o={tooltip:{trigger:"axis"},legend:{data:["Planned","Actual","Gap"],top:"bottom",textStyle:{fontSize:12}},xAxis:{type:"category",data:this.planVsActualData.map(i=>i.department),axisLabel:{rotate:30,fontSize:10,formatter:i=>i.length>10?i.slice(0,10)+"...":i}},yAxis:{type:"value",splitLine:{show:!1},axisLabel:{fontSize:12}},series:[{name:"Planned",type:this.selectedPlanActualChartType,data:this.planVsActualData.map(i=>i.plan),color:"#4285F4",label:{show:!0,position:"top",fontSize:10}},{name:"Actual",type:this.selectedPlanActualChartType,data:this.planVsActualData.map(i=>i.actual),color:"#FB8C00",label:{show:!0,position:"top",fontSize:10}},{name:"Gap",type:this.selectedPlanActualChartType,data:this.planVsActualData.map(i=>i.gap),color:"#E53935",label:{show:!0,position:"top",fontSize:10}}],dataZoom:[{type:"slider",start:0,end:100,handleSize:"100%",showDetail:!1,xAxisIndex:[0],bottom:50}],grid:{left:"10%",right:"10%",bottom:"20%",containLabel:!0}};n.setOption(o)}changePlanActualChart(t){this.selectedPlanActualChartType=t,this.isPlanActualTableVisible=!1,this.renderRecruitmentPlanVsActualChart()}togglePlanActualTable(){this.isPlanActualTableVisible=!this.isPlanActualTableVisible}downloadChartAsPDF(t,n){var o,i;const s={"Manpower Plan vs Actual":()=>this.isPlanActualTableVisible?"table-plan-vs-actual-data":"plan-actual-chart","Department-wise Interview Status":()=>this.isInterviewTableVisible?"table-department-interview-status":"interview-status-chart"},d={planActual:this.selectedYearForRecruitment},u={planActual:this.selectedMonthName},g=(null===(o=s[t])||void 0===o?void 0:o.call(s))||"default-chart-id",m=d[n]||this.selectedYearForRecruitment,l=u[n]||this.selectedMonthName,f="Jan_Dec"===this.loggedInCompanyFiscalyear?`FY ${m.split("-")[0]}`:`FY ${m.split("-")[0]}-${null===(i=m.split("-")[1])||void 0===i?void 0:i.slice(-2)}`;this.PdfDownload.downloadPDFMonthwise(g,t,f,l)}initResizeObserver(){const t=document.getElementById("plan-actual-chart");t&&(this.chartObserver=new ResizeObserver(n=>{for(let o of n)o.contentRect.width>0&&o.contentRect.height>0&&this.renderRecruitmentPlanVsActualChart()}),this.chartObserver.observe(t))}ngAfterViewInit(){this.initResizeObserver()}fetchDepartmentInterviewStatus(){this.loading=!0;const t=this.loggedInUserRoles.some(u=>"MD"===u.displayName);let n="",o="";var i;"HOD"!==this.loggedInUserRole&&"Admin"!==this.loggedInUserRole||t?!t&&this.arrUserIds.length>0&&(n=this.arrUserIds.join(",")):(n=null!==(i=this.loggedInUserId)&&void 0!==i?i:"",o=this.loggedInUserRole);const s=n?`${this.config.getCountOfDepartment}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}&userHodIds=${encodeURIComponent(n)}&userHodRole=${encodeURIComponent(o)}`:`${this.config.getCountOfDepartment}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}`,d=this.recruitmentService.appendChildId(s);this.httpService.callGetService(d).subscribe({next:u=>{this.interviewStatusData=u||[],this.departmentList=[...new Set(this.interviewStatusData.map(g=>g.department))].sort(),this.selectedDepartments=[...this.departmentList],setTimeout(()=>this.onDepartmentChange()),this.loading=!1},error:u=>{this.loading=!1}})}onDepartmentChange(){if(this.selectedDepartments&&0!==this.selectedDepartments.length)this.filteredInterviewStatusData=this.selectedDepartments.length?this.interviewStatusData.filter(t=>this.selectedDepartments.includes(t.department)):this.interviewStatusData,this.renderInterviewStatusChart();else{this.filteredInterviewStatusData=[];const t=document.getElementById("interview-status-chart");if(t instanceof HTMLElement){const n=He.getInstanceByDom(t);n&&n.dispose(),t.innerHTML=""}}}changeInterviewStatusChart(t){this.selectedInterviewChartType=t,this.isInterviewTableVisible=!1,this.renderInterviewStatusChart()}toggleInterviewTable(){this.isInterviewTableVisible=!this.isInterviewTableVisible}renderInterviewStatusChart(){setTimeout(()=>{const t=document.getElementById("interview-status-chart");if(!t||0===t.offsetHeight||0===t.offsetWidth)return void(this.renderRetriesInterviewStatus<this.maxRenderRetriesInterviewStatus&&(this.renderRetriesInterviewStatus++,setTimeout(()=>this.renderInterviewStatusChart(),100)));this.renderRetriesInterviewStatus=0;let n=He.getInstanceByDom(t);n&&n.dispose(),n=He.init(t);const o=this.filteredInterviewStatusData,i="pie"===this.selectedInterviewChartType?{tooltip:{trigger:"item",formatter:s=>{const{data:d}=s;return`\n <b>${d.name}</b><br/>\n Evaluated: ${d.evaluated}<br/>\n Scheduled: ${d.scheduled}<br/>\n Pending: ${d.pending} \n `}},legend:{bottom:0}
1,series:[{type:"pie",radius:["40%","70%"],label:{show:!0,formatter:s=>`${s.name}: ${s.value}`},data:o.map(s=>({name:s.department,value:s.evaluated+s.scheduled+s.pending,evaluated:s.evaluated,scheduled:s.scheduled,pending:s.pending}))}]}:{tooltip:{trigger:"axis"},legend:{data:["Evaluated","Scheduled","Pending"],top:"bottom"},xAxis:{type:"category",data:o.map(s=>s.department),axisLabel:{rotate:30,fontSize:10,formatter:s=>s.length>10?s.slice(0,10)+"...":s}},yAxis:{type:"value",splitLine:{show:!1}},series:[{name:"Evaluated",type:this.selectedInterviewChartType,data:o.map(s=>s.evaluated),color:"#1E88E5",label:{show:!0,position:"top",fontSize:10}},{name:"Scheduled",type:this.selectedInterviewChartType,data:o.map(s=>s.scheduled),color:"#43A047",label:{show:!0,position:"top",fontSize:10}},{name:"Pending",type:this.selectedInterviewChartType,data:o.map(s=>s.pending),color:"#FB8C00",label:{show:!0,position:"top",fontSize:10}}],grid:{left:"10%",right:"10%",bottom:"20%",containLabel:!0}};n.setOption(i)})}onFunnelGridReady(t){this.funnelGridApi=t.api}fetchFunnelSourceReport(){this.loading=!0;const t=this.loggedInUserRoles.some(u=>"MD"===u.displayName);let n="",o="";var i;"HOD"!==this.loggedInUserRole&&"Admin"!==this.loggedInUserRole||t?!t&&this.arrUserIds.length>0&&(n=this.arrUserIds.join(",")):(n=null!==(i=this.loggedInUserId)&&void 0!==i?i:"",o=this.loggedInUserRole);const s=n?`${this.config.getFunnelSourceReport}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}&userHodIds=${encodeURIComponent(n)}&userHodRole=${encodeURIComponent(o)}`:`${this.config.getFunnelSourceReport}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonth}`,d=this.recruitmentService.appendChildId(s);this.httpService.callGetService(d).subscribe({next:u=>{this.funnelSourceData=(null==u?void 0:u.data)||[],this.extractDynamicStages(),this.buildFunnelColumnDefs(),this.loading=!1},error:u=>{this.loading=!1}})}extractDynamicStages(){const t=new Set;this.funnelSourceData.forEach(o=>{Object.keys(o).forEach(i=>{["positionName","jobPlatform","Hired Ratio","Final Stage Cleared"].includes(i)||t.add(i)})});const n=Array.from(t).filter(o=>"Position Name"!==o&&"JobPlatform"!==o);this.dynamicStages=["Position Name","JobPlatform",...n,"Hired Ratio"]}buildFunnelColumnDefs(){this.funnelColumnDefs=this.dynamicStages.map(t=>({field:t,headerName:t,valueGetter:n=>{var o;return(null===(o=n.data)||void 0===o?void 0:o[t])||0},cellRenderer:"Hired Ratio"===t?this.funnelRatioCellRenderer:void 0}))}funnelRatioCellRenderer(t){const n=Number(t.value)||0;return`<span class="funnel-ratio-pill ${0===n?"flat":n<40?"warn":"good"}"><span class="dot"></span>${n}%</span>`}downloadFunnelSourceReport(){var t;if(null===(t=this.funnelSourceData)||void 0===t||!t.length)return;const n=this.funnelSourceData.map(u=>{var g;const m={"Position Name":u["Position Name"],JobPlatform:u.JobPlatform};
1return this.dynamicStages.forEach(l=>{var f;["Position Name","JobPlatform","Hired Ratio","Final Stage Cleared"].includes(l)||(m[l]=null!==(f=u[l])&&void 0!==f?f:0)}),m["Hired Ratio"]=null!==(g=u["Hired Ratio"])&&void 0!==g?g:0,m}),i={Sheets:{"Funnel & Source Report":F.utils.json_to_sheet(n)},SheetNames:["Funnel & Source Report"]},s=F.write(i,{bookType:"xlsx",type:"array"}),d=new Blob([s],{type:"application/octet-stream"});U.saveAs(d,`Funnel_Source_Report_${this.selectedMonth}_${this.selectedYearForRecruitment}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(y.ok),e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU(C.N),e.rXU(b.bZ),e.rXU($.d),e.rXU(lt.s),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-dashboard"]],decls:190,vars:46,consts:[[2,"margin-left","18px","margin-top","15px","margin-right","15px"],[1,"mat-height40","mat-input-style","small-field","mr-10"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["placeholder","Month",3,"ngModelChange","selectionChange","ngModel"],[2,"margin-left","15px","margin-top","15px","margin-right","15px"],["size","12","size-sm","6","size-md","3","size-lg","3","size-xs","6"],[1,"card","success","card-clickable",3,"click"],[1,"d-flex","align-items-center"],[1,"icon-box"],["name","people-outline"],[1,"ml-15"],[1,"fs-12"],[1,"fs-14"],[1,"card","warning","card-clickable",3,"click"],["name","add-circle-outline"],["name","person-add-outline"],[1,"card","danger","card-clickable",3,"click"],["name","file-tray-full-outline"],[1,"text-danger"],[1,"text-success"],["name","document-outline"],["name","warning-outline"],["name","checkmark-circle-outline"],["name","close-circle-outline"],["size-sm","12","size-md","6","size-lg","6","size-xs","12"],[1,"graphs","m-50"],[1,"justify-content-center"],["size-sm","12","size-md","7","size-lg","7","size-xs","12"],[1,"fs-16","font_bold"],["size-sm","12","size-md","5","size-lg","5","size-xs","12"],[1,"d-flex","graph-icon"],[3,"click"],["src","./assets/icon/BarGraphIcon.svg","alt","","class","cp",4,"ngIf"],["src","./assets/icon/BarGraphActive.svg","alt","",4,"ngIf"],["src","./assets/icon/tableIcon.svg","alt","","class","cp",4,"ngIf"],["src","./assets/icon/TableIconActive.svg","alt","",4,"ngIf"],["src","./assets/icon/lineChartIcon.svg","alt","","class","cp",4,"ngIf"],["src","./assets/icon/activeLineChart.svg","alt","",4,"ngIf"],["src","./assets/icon/downloadIcon.svg","alt","",1,"cp",3,"click"],["size-sm","12","size-md","12","size-lg","12","size-xs","12"],[3,"ngClass"],[1,"dashboardGraphTable"],["id","table-plan-vs-actual-data"],[1,"custom-size","header-cell"],[4,"ngFor","ngForOf"],["id","plan-actual-chart",2,"width","550px","height","500px","align-items","center",3,"ngClass"],[1,"d-flex","graph-icon","justify-content-end","align-items-center","gap-10"],[1,"cp",3,"click"],["src","./assets/icon/pieChartIcon.svg",4,"ngIf"],["src","./assets/icon/activePieChartIcon.svg",4,"ngIf"],["size","6",1,"mt-10"],[1,"formLabelRegularfs16","mb-5"],[1,"red-cl"],[1,"w-100","mat-height40","mat-input-style"],["multiple","","placeholder","Select Department",3,"valueChange","selectionChange","value"],["id","table-department-interview-status"],["id","interview-status-chart",2,"width","100%","height","400px",3,"ngClass"],[1,"funnel-report-card"],[1,"funnel-card-head"],[1,"funnel-title-block"],["type","button","title","Download report",1,"funnel-icon-btn",3,"click"],[1,"material-icons"],[1,"m-20","funnel-grid-wrapper"],[1,"ag-theme-quartz","funnel-grid-container",2,"width","100%","height","460px",3,"gridReady","rowData","columnDefs","gridOptions"],[3,"value"],["src","./assets/icon/BarGraphIcon.svg","alt","",1,"cp"],["src","./assets/icon/BarGraphActive.svg","alt",""],["src","./assets/icon/tableIcon.svg","alt","",1,"cp"],["src","./assets/icon/TableIconActive.svg","alt",""],["src","./assets/icon/lineChartIcon.svg","alt","",1,"cp"],["src","./assets/icon/activeLineChart.svg","alt",""],["src","./assets/icon/pieChartIcon.svg"],["src","./assets/icon/activePieChartIcon.svg"]],template:function(t,n){1&t&&(e.j41(0,"div")(1,"ion-row",0)(2,"mat-form-field",1)(3,"mat-select",2),e.mxI("ngModelChange",function(i){return e.DH7(n.selectedYearForRecruitment,i)||(n.selectedYearForRecruitment=i),i}),e.bIt("selectionChange",function(i){return n.onYearChange(i.value)}),e.DNE(4,dt,2,2,"mat-option",3),e.k0s()(),e.j41(5,"mat-form-field",1)(6,"mat-select",4),e.mxI("ngModelChange",function(i){return e.DH7(n.selectedMonth,i)||
1(n.selectedMonth=i),i}),e.bIt("selectionChange",function(i){return n.onMonthChange(i)}),e.DNE(7,Ye,2,2,"mat-option",3),e.k0s()()(),e.j41(8,"ion-row",5)(9,"ion-col",6)(10,"div",7),e.bIt("click",function(){return n.openRecruitmentPopup("vacant")}),e.j41(11,"div",8)(12,"div",9),e.nrm(13,"ion-icon",10),e.k0s(),e.j41(14,"div",11)(15,"p",12),e.EFF(16,"Total Vacant Positions"),e.k0s(),e.j41(17,"p",13),e.EFF(18),e.k0s()()()()(),e.j41(19,"ion-col",6)(20,"div",14),e.bIt("click",function(){return n.openRecruitmentPopup("new")}),e.j41(21,"div",8)(22,"div",9),e.nrm(23,"ion-icon",15),e.k0s(),e.j41(24,"div",11)(25,"p",12),e.EFF(26,"Total New Positions"),e.k0s(),e.j41(27,"p",13),e.EFF(28),e.k0s()()()()(),e.j41(29,"ion-col",6)(30,"div",7),e.bIt("click",function(){return n.openRecruitmentPopup("listed")}),e.j41(31,"div",8)(32,"div",9),e.nrm(33,"ion-icon",16),e.k0s(),e.j41(34,"div",11)(35,"p",12),e.EFF(36,"Listed Candidates"),e.k0s(),e.j41(37,"p",13),e.EFF(38),e.k0s()()()()(),e.j41(39,"ion-col",6)(40,"div",17),e.bIt("click",function(){return n.openRecruitmentPopup("document")}),e.j41(41,"div",8)(42,"div",9),e.nrm(43,"ion-icon",18),e.k0s(),e.j41(44,"div",11)(45,"p",12),e.EFF(46,"Document Status"),e.k0s(),e.j41(47,"p",12)(48,"span",19),e.EFF(49),e.k0s(),e.EFF(50," | "),e.j41(51,"span",20),e.EFF(52),e.k0s()()()()()(),e.j41(53,"ion-col",6)(54,"div",7),e.bIt("click",function(){return n.openRecruitmentPopup("reserved")}),e.j41(55,"div",8)(56,"div",9),e.nrm(57,"ion-icon",21),e.k0s(),e.j41(58,"div",11)(59,"p",12),e.EFF(60,"Interview Slot Reserved"),e.k0s(),e.j41(61,"p",13),e.EFF(62),e.k0s()()()()(),e.j41(63,"ion-col",6)(64,"div",14),e.bIt("click",function(){return n.openRecruitmentPopup("notScheduled")}),e.j41(65,"div",8)(66,"div",9),e.nrm(67,"ion-icon",22),e.k0s(),e.j41(68,"div",11)(69,"p",12),e.EFF(70,"Interviews Not Scheduled"),e.k0s(),e.j41(71,"p",13),e.EFF(72),e.k0s()()()()(),e.j41(73,"ion-col",6)(74,"div",7),e.bIt("click",function(){return n.openRecruitmentPopup("hired")}),e.j41(75,"div",8)(76,"div",9),e.nrm(77,"ion-icon",23),e.k0s(),e.j41(78,"div",11)(79,"p",12),e.EFF(80,"Hired Candidates"),e.k0s(),e.j41(81,"p",13),e.EFF(82),e.k0s()()()()(),e.j41(83,"ion-col",6)(84,"div",17),e.bIt("click",function(){return n.openRecruitmentPopup("rejected")}),e.j41(85,"div",8)(86,"div",9),e.nrm(87,"ion-icon",24),e.k0s(),e.j41(88,"div",11)(89,"p",12),e.EFF(90,"Rejected Candidates"),e.k0s(),e.j41(91,"p",13),e.EFF(92),e.k0s()()()()()(),e.j41(93,"ion-row",5)(94,"ion-col",25)(95,"div",26)(96,"ion-row",27)(97,"ion-col",28)(98,"div",29),e.EFF(99,"Manpower Plan vs Actual"),e.k0s()(),e.j41(100,"ion-col",30)(101,"div",31)(102,"span",32),e.bIt("click",function(){return n.changePlanActualChart("bar")}),e.DNE(103,ct,1,0,"img",33)(104,ht,1,0,"img",34),e.k0s(),e.j41(105,"span",32),e.bIt("click",function(){return n.togglePlanActualTable()}),e.DNE(106,Ue,1,0,"img",35)(107,Qe,1,0,"img",36),e.k0s(),e.j41(108,"span",32),e.bIt("click",function(){return n.changePlanActualChart("line")}),e.DNE(109,st,1,0,"img",37)(110,Fe,1,0,"img",38),e.k0s(),e.j41(111,"span")(112,"img",39),e.bIt("click",function(){return n.downloadChartAsPDF("Manpower Plan vs Actual","planActual")}),e.k0s()()()()(),e.j41(113,"ion-col",40)(114,"div",41)(115,"div",42)(116,"table",43)(117,"thead")(118,"tr",44)(119,"th"),e.EFF(120,"Department"),e.k0s(),e.j41(121,"th"),e.EFF(122,"Planned"),e.k0s(),e.j41(123,"th"),e.EFF(124,"Actual"),e.k0s(),e.j41(125,"th"),e.EFF(126,"Gap"),e.k0s()()(),e.j41(127,"tbody"),e.DNE(128,ft,9,4,"tr",45),e.k0s()()()(),e.nrm(129,"div",46),e.k0s()()(),e.j41(130,"ion-col",25)(131,"div",26)(132,"ion-row",27)(133,"ion-col",28)(134,"div",29),e.EFF(135,"Department-wise Interview Status"),e.k0s()(),e.j41(136,"ion-col",30)(137,"div",47)(138,"span",32),e.bIt("click",function(){return n.changeInterviewStatusChart("bar")}),e.DNE(139,T,1,0,"img",33)(140,H,1,0,"img",34),e.k0s(),e.j41(141,"span",32),e.bIt("click",function(){return n.toggleInterviewTable()}),e.DNE(142,W,1,0,"img",35)(143,oe,1,0,"img",36),e.k0s(),e.j41(144,"span",32),e.bIt("click",function(){return n.changeInterviewStatusChart("line")}),e.DNE(145,ce,1,0,"img",37)(146,ge,1,0,"img",38),e.k0s(),e.j41(147,"span",48),e.bIt("click",function(){return n.changeInterviewStatusChart("pie")}),e.DNE(148,ke,1,0,"img",49)(149,Le,1,0,"img",50),e.k0s(),e.j41(150,"span")(151,"img",39),e.bIt("click",function(){return n.downloadChartAsPDF("Department-wise Interview Status","interviewStatus")}),e.k0s()()()()(),e.j41(152,"ion-row")(153,"ion-col",51)(154,"label",52),e.EFF(155,"Department"),e.j41(156,"span",53),e.EFF(157," *"),e.k0s()(),e.j41(158,"mat-form-field",54)(159,"mat-select",55),e.mxI("valueChange",function(i){return e.DH7(n.selectedDepartments,i)||(n.selectedDepartments=i),i}),e.bIt("selectionChange",function(){return n.onDepartmentChange()}),e.DNE(160,qe,2,2,"mat-option",3),e.k0s()()()(),e.j41(161,"ion-col",40)(162,"div",41)(163,"div",42)(164,"table",56)(165,"thead")(166,"tr",44)(167,"th"),e.EFF(168,"Department"),e.k0s(),e.j41(169,"th"),e.EFF(170,"Evaluated"),e.k0s(),e.j41(171,"th"),e.EFF(172,"Scheduled"),e.k0s(),e.j41(173,"th"),e.EFF(174,"Pending"),e.k0s()()(),e.j41(175,"tbody"),e.DNE(176,tt,9,4,"tr",45),e.k0s()()()(),e.nrm(177,"div",57),e.k0s()()()(),e.j41(178,"ion-row",5)(179,"ion-col")(180,"div",58)(181,"div",59)(182,"div",60)(183,"strong"),e.EFF(184,"Funnel & Source Report"),e.k0s()(),e.j41(185,"button",61),e.bIt("click",function(){return n.downloadFunnelSourceReport()}),e.j41(186,"span",62),e.EFF(187,"download"),e.k0s()()(),e.j41(188,"div",63)(189,"ag-grid-angular",64),e.bIt("gridReady",function(i){return n.onFunnelGridReady(i)}),e.k0s()()()()()()),2&t&&(e.R7$(3),e.R50("ngModel",n.selectedYearForRecruitment),e.R7$(),e.Y8G("ngForOf",n.recruitmentYears),e.R7$(2),e.R50("ngModel",n.selectedMonth),e.R7$(),e.Y8G("ngForOf",n.arrAllMonths),e.R7$(11),e.JRh(n.vacantCount),e.R7$(10),e.JRh(n.newPositionCount),e.R7$(10),e.JRh(n.dashboardCandidateCount),e.R7$(11),e.SpI("Pending: ",n.documentPendingCount,""),e.R7$(3),e.SpI("Submitted: ",n.documentNotPendingCount,""),e.R7$(10),e.JRh(n.interviewScheduleCount),e.R7$(10),e.JRh(n.interviewNotScheduleCount),e.R7$(10),e.JRh(n.hiredCount),e.R7$(10),e.JRh(n.rejectedCount),e.R7$(11),e.Y8G("ngIf","bar"!==n.selectedPlanActualChartType||n.isPlanActualTableVisible),e.R7$(),e.Y8G("ngIf","bar"===n.selectedPlanActualChartType&&!n.isPlanActualTableVisible),e.R7$(2),e.Y8G("ngIf",!n.isPlanActualTableVisible),e.R7$(),e.Y8G("ngIf",n.isPlanActualTableVisible),e.R7$(2),e.Y8G("ngIf","line"!==n.selectedPlanActualChartType||n.isPlanActualTableVisible),e.R7$(),e.Y8G("ngIf","line"===n.selectedPlanActualChartType&&!n.isPlanActualTableVisible),e.R7$(4),e.Y8G("ngClass",e.eq3(38,$e,!n.isPlanActualTableVisible)),e.R7$(14),e.Y8G("ngForOf",n.planVsActualData),e.R7$(),e.Y8G("ngClass",e.eq3(40,$e,n.isPlanActualTableVisible)),e.R7$(10),e.Y8G("ngIf","bar"!==n.selectedInterviewChartType||n.isInterviewTableVisible),e.R7$(),e.Y8G("ngIf","bar"===n.selectedInterviewChartType&&!n.isInterviewTableVisible),e.R7$(2),e.Y8G("ngIf",!n.isInterviewTableVisible),e.R7$(),e.Y8G("ngIf",n.isInterviewTableVisible),e.R7$(2),e.Y8G("ngIf","line"!==n.selectedInterviewChartType||n.isInterviewTableVisible),e.R7$(),e.Y8G("ngIf","line"===n.selectedInterviewChartType&&!n.isInterviewTableVisible),e.R7$(2),e.Y8G("ngIf","pie"!==n.selectedInterviewChartType||n.isInterviewTableVisible),e.R7$(),e.Y8G("ngIf","pie"===n.selectedInterviewChartType&&!n.isInterviewTableVisible),e.R7$(10),e.R50("value",n.selectedDepartments),e.R7$(),e.Y8G("ngForOf",n.departmentList),e.R7$(2),e.Y8G("ngClass",e.eq3(42,$e,!n.isInterviewTableVisible)),e.R7$(14),e.Y8G("ngForOf",n.filteredInterviewStatusData),e.R7$(),e.Y8G("ngClass",e.eq3(44,$e,n.isInterviewTableVisible)),e.R7$(12),e.Y8G("rowData",n.funnelSourceData)("columnDefs",n.funnelColumnDefs)("gridOptions",n.funnelGridOptions))},dependencies:[K.YU,K.Sq,K.bT,y.BC,y.vS,J.hU,J.iq,J.ln,R.rl,he.VO,pe.wT,G.xs],styles:['.card[_ngcontent-%COMP%]{background:#fff;border-radius:10px;padding:15px;box-shadow:0 3px 6px #00000029;height:100%;transition:transform .2s ease-in-out}.card[_ngcontent-%COMP%]:hover{transform:translateY(-3px)}.card[_ngcontent-%COMP%] .d-flex[_ngcontent-%COMP%]{display:flex;align-items:center}.card[_ngcontent-%COMP%] .icon-box[_ngcontent-%COMP%]{width:40px;height:40px;background-color:#f2f2f2;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:22px;color:#555}.card[_ngcontent-%COMP%] .ml-15[_ngcontent-%COMP%]{margin-left:15px}.card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.card[_ngcontent-%COMP%] .fs-12[_ngcontent-%COMP%]{font-size:12px}.card[_ngcontent-%COMP%] .fs-14[_ngcontent-%COMP%]{font-size:14px}.card[_ngcontent-%COMP%] .fs-10[_ngcontent-%COMP%]{font-size:10px}.card[_ngcontent-%COMP%] .font_bold[_ngcontent-%COMP%]{font-weight:700}.card[_ngcontent-%COMP%] .font_semibold[_ngcontent-%COMP%]{font-weight:600}.card[_ngcontent-%COMP%] .text-success[_ngcontent-%COMP%]{color:#28a745}.card[_ngcontent-%COMP%] .text-danger[_ngcontent-%COMP%]{color:#dc3545}.card[_ngcontent-%COMP%] .text-primary[_ngcontent-%COMP%]{color:#007bff}.card.success[_ngcontent-%COMP%] .icon-box[_ngcontent-%COMP%]{background-color:#e6f4ea;color:#28a745}.card.warning[_ngcontent-%COMP%] .icon-box[_ngcontent-%COMP%]{background-color:#fff3cd;color:#ffc107}.card.danger[_ngcontent-%COMP%] .icon-box[_ngcontent-%COMP%]{background-color:#f8d7da;color:#dc3545}.card-clickable[_ngcontent-%COMP%]{cursor:pointer}@media (max-width: 768px){.card[_ngcontent-%COMP%]{margin-bottom:15px}}.container[_ngcontent-%COMP%]{--background: #f6f5fb;padding:0 15px}.cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.cardBoxHeading[_ngcontent-%COMP%]{background-color:#ddd;padding:5px;color:#000;border-radius:10px 10px 0 0}.mat-height40[_ngcontent-%COMP%]{height:40px!important}.w70px[_ngcontent-%COMP%]{width:70px}.custom-size[_ngcontent-%COMP%]{font-size:15px}.icon-download[_ngcontent-%COMP%]{border:1px solid #f3820e;color:#f3820e;padding:6px;border-radius:6px;background-color:#fff;height:35px;width:35px;font-size:22px;
1cursor:pointer}.cp[_ngcontent-%COMP%]{cursor:pointer;margin-right:8px;color:#333}.header-cell[_ngcontent-%COMP%]{background-color:#ddd!important;font-weight:700!important}.m-20[_ngcontent-%COMP%]{margin:20px}.cardLayout[_ngcontent-%COMP%]{padding:20px}.removeIcon[_ngcontent-%COMP%]{height:25px} .mat-mdc-dialog-container .mdc-dialog__surface{border-radius:18px!important}.form-scroll-container[_ngcontent-%COMP%]{max-height:80vh;overflow-y:auto;padding:1rem}[_nghost-%COMP%] .mat-dialog-container{max-height:90vh;overflow-y:auto}.mb-5[_ngcontent-%COMP%]{margin-bottom:5px}.graphs[_ngcontent-%COMP%]{background:#fff 0% 0% no-repeat padding-box;box-shadow:0 6px 12px #d1d1d1ad;border:1px solid #dddddd;border-radius:6px;opacity:1;padding:15px;height:100%}.graph-icon[_ngcontent-%COMP%]{float:right}.graph-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:last-child img[_ngcontent-%COMP%]{margin-right:0}.graph-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-right:10px;height:30px;width:30px}.Graph-axis[_ngcontent-%COMP%]{font-family:OpenSans-Regular;font-size:10px;float:right;text-align:right}.Graph-subtitle[_ngcontent-%COMP%]{font-family:OpenSans-Regular;text-align:center;font-size:14px}.dashboardGraphTable[_ngcontent-%COMP%]{overflow-x:auto;background-color:#fff;border-radius:8px;box-shadow:0 2px 6px #0000001a;padding:1rem}.dashboardGraphTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:.875rem;color:#333}.dashboardGraphTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{background-color:#f5f7fa}.dashboardGraphTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .header-cell[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.75rem 1rem;text-align:left;font-weight:600;border-bottom:2px solid #e0e0e0;background-color:#ddd!important;font-weight:700!important}.dashboardGraphTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{transition:background-color .2s}.dashboardGraphTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#f0f4ff}.dashboardGraphTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.75rem 1rem;border-bottom:1px solid #e0e0e0}.dispNone[_ngcontent-%COMP%]{display:none!important}.funnel-report-card[_ngcontent-%COMP%]{--funnel-border: #e6e6ec;--funnel-border-strong: #d7d7e0;--funnel-surface: #ffffff;--funnel-surface-2: #f7f7fa;--funnel-text: #1e1f2b;--funnel-text-muted: #6c6f80;--funnel-text-faint: #9497a6;--funnel-accent: #ee6c1f;--funnel-accent-strong: #d85c14;--funnel-accent-soft: #fdeee1;--funnel-good: #1a8f5a;--funnel-good-soft: #e6f6ee;--funnel-warn: #b8860b;--funnel-warn-soft: #fbf1d8;background:var(--funnel-surface);border:1px solid var(--funnel-border);border-radius:12px;box-shadow:0 1px 2px #1e1f2b0a,0 8px 24px -12px #1e1f2b1f;overflow:hidden}.funnel-card-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--funnel-border)}.funnel-card-head[_ngcontent-%COMP%] .funnel-title-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.funnel-card-head[_ngcontent-%COMP%] .funnel-title-block[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:15px;font-weight:700;color:var(--funnel-text)}.funnel-card-head[_ngcontent-%COMP%] .funnel-title-block[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px;color:var(--funnel-text-faint)}.funnel-icon-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:9px;border:1px solid var(--funnel-border-strong);background:var(--funnel-surface);color:var(--funnel-text-muted);cursor:pointer;transition:background .15s,color .15s,border-color .15s;flex:none}.funnel-icon-btn[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:19px}.funnel-icon-btn[_ngcontent-%COMP%]:hover{background:var(--funnel-accent-soft);color:var(--funnel-accent-strong);border-color:var(--funnel-accent)}.funnel-grid-wrapper[_ngcontent-%COMP%]{height:auto}.funnel-grid-container[_ngcontent-%COMP%]{font-family:OpenSans-Regular,sans-serif}[_nghost-%COMP%] .funnel-grid-container.ag-theme-quartz{--ag-header-background-color: #dddddd;--ag-header-foreground-color: #000;--ag-row-hover-color: #f8fafc;--ag-font-size: 13px;--ag-font-family: "OpenSans-Regular", sans-serif;--ag-border-color: #e2e8f0;--ag-row-border-style: solid;--ag-row-border-width: 1px;--ag-row-border-color: #e2e8f0;border:1px solid #e2e8f0;border-radius:8px}[_nghost-%COMP%] .funnel-grid-container.ag-theme-quartz .ag-header-cell-label{font-weight:700!important}[_nghost-%COMP%] .funnel-grid-container.ag-theme-quartz .ag-cell{display:flex;align-items:center;font-variant-numeric:tabular-nums}.funnel-ratio-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:99px;font-weight:700;font-size:12px}.funnel-ratio-pill[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:99px;background:currentColor}.funnel-ratio-pill.good[_ngcontent-%COMP%]{background:var(--funnel-good-soft);color:var(--funnel-good)}.funnel-ratio-pill.warn[_ngcontent-%COMP%]{background:var(--funnel-warn-soft);color:var(--funnel-warn)}.funnel-ratio-pill.flat[_ngcontent-%COMP%]{background:var(--funnel-surface-2);color:var(--funnel-text-faint)}@media (max-width: 560px){.funnel-card-head[_ngcontent-%COMP%]{padding:12px 14px}}']}),p})();const xt=["Super Admin","HR Admin","MD","HOD","Admin"],ve=["Employee","PHI Admin","PHI Finance & Accounts","Manager","Finance"];let re=(()=>{var a;class p{constructor(t,n){this.encryptionService=t,this.router=n}
1canActivate(t,n){const o=this.decrypt("loggedInUserRole"),s=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]").some(g=>"MD"===g.displayName);return!(!xt.includes(o)&&!s)||!ve.includes(o)||this.router.parseUrl("/home/hrportal/recruitment/schedule-interview")}decrypt(t){const n=sessionStorage.getItem(t);return n?this.encryptionService.decryptData(n):null}}return(a=p).\u0275fac=function(t){return new(t||a)(e.KVO(S.L),e.KVO(De.Ix))},a.\u0275prov=e.jDH({token:a,factory:a.\u0275fac,providedIn:"root"}),p})();var ue=Y(97993),fe=Y(75451),le=Y(10812),Oe=Y(18359),ut=Y(40605),Be=Y(7673),ze=Y(27468),pt=Y(99437),we=Y(21626),Pe=Y(62010),Ht=Y(45312),Ae=Y(88834),nt=Y(9183),Pt=Y(79402),Wt=Y.n(Pt);function Qt(a,p){1&a&&(e.j41(0,"div",3),e.nrm(1,"mat-spinner",4),e.j41(2,"span"),e.EFF(3,"Loading scoring details..."),e.k0s()())}function qt(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",5)(1,"mat-icon"),e.EFF(2,"error_outline"),e.k0s(),e.j41(3,"p"),e.EFF(4),e.k0s(),e.j41(5,"button",6),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.close())}),e.EFF(6,"Close"),e.k0s()()}if(2&a){const r=e.XpG();e.R7$(4),e.JRh(r.error)}}function Jt(a,p){if(1&a&&(e.j41(0,"div",22)(1,"span",23),e.EFF(2,"Practiced Skills"),e.k0s(),e.j41(3,"div",24),e.nrm(4,"div",25),e.k0s(),e.j41(5,"span",26),e.EFF(6),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(4),e.xc7("width",r.skillsWithEvidenceScore,"%"),e.Y8G("ngClass",r.getScoreClass(r.skillsWithEvidenceScore)),e.R7$(2),e.SpI("",r.skillsWithEvidenceScore,"%")}}function Kt(a,p){if(1&a&&(e.j41(0,"div",37)(1,"h3"),e.EFF(2,"Summary"),e.k0s(),e.j41(3,"p",38),e.EFF(4),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(4),e.JRh(null==r.scoreData?null:r.scoreData.summary)}}function Zt(a,p){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const r=p.$implicit;e.R7$(),e.JRh(r)}}function en(a,p){if(1&a&&(e.j41(0,"div",37)(1,"h3")(2,"mat-icon",39),e.EFF(3,"thumb_up"),e.k0s(),e.EFF(4," Strengths "),e.k0s(),e.j41(5,"ul",40),e.DNE(6,Zt,2,1,"li",41),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(6),e.Y8G("ngForOf",null==r.scoreData?null:r.scoreData.strengths)}}function tn(a,p){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const r=p.$implicit;e.R7$(),e.JRh(r)}}function nn(a,p){if(1&a&&(e.j41(0,"div",37)(1,"h3")(2,"mat-icon",42),e.EFF(3,"warning"),e.k0s(),e.EFF(4," Concerns "),e.k0s(),e.j41(5,"ul",43),e.DNE(6,tn,2,1,"li",41),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(6),e.Y8G("ngForOf",null==r.scoreData?null:r.scoreData.concerns)}}function on(a,p){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const r=p.$implicit;e.R7$(),e.JRh(r)}}function rn(a,p){if(1&a&&(e.j41(0,"div",37)(1,"h3")(2,"mat-icon",44),e.EFF(3,"lightbulb"),e.k0s(),e.EFF(4," Recommendations "),e.k0s(),e.j41(5,"ul",45),e.DNE(6,on,2,1,"li",41),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(6),e.Y8G("ngForOf",null==r.scoreData?null:r.scoreData.recommendations)}}function sn(a,p){1&a&&(e.j41(0,"div",46)(1,"mat-icon"),e.EFF(2,"info"),e.k0s(),e.j41(3,"p"),e.EFF(4,"Detailed scoring data is not available"),e.k0s()())}function an(a,p){if(1&a&&(e.j41(0,"div",37)(1,"p",47),e.EFF(2),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(2),e.JRh(null==r.scoreData||null==r.scoreData.breakdown||null==r.scoreData.breakdown.skillsMatch?null:r.scoreData.breakdown.skillsMatch.reasoning)}}function ln(a,p){if(1&a&&(e.j41(0,"div",50)(1,"mat-icon"),e.EFF(2,"check"),e.k0s(),e.j41(3,"span",51),e.EFF(4),e.k0s()()),2&a){const r=p.$implicit;e.R7$(4),e.JRh(r.skill)}}function dn(a,p){if(1&a&&(e.j41(0,"div",37)(1,"h3")(2,"mat-icon",39),e.EFF(3,"check_circle"),e.k0s(),e.EFF(4),e.k0s(),e.j41(5,"div",48),e.DNE(6,ln,5,1,"div",49),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(4),e.SpI(" Matched Skills (",r.matchedSkills.length,") "),e.R7$(2),e.Y8G("ngForOf",r.matchedSkills)}}function cn(a,p){if(1&a&&(e.j41(0,"div",53)(1,"mat-icon"),e.EFF(2,"close"),e.k0s(),e.j41(3,"span",51),e.EFF(4),e.k0s()()),2&a){const r=p.$implicit;e.R7$(4),e.JRh(r.skill)}}function un(a,p){if(1&a&&(e.j41(0,"div",37)(1,"h3")(2,"mat-icon",42),e.EFF(3,"cancel"),e.k0s(),e.EFF(4),e.k0s(),e.j41(5,"div",48),e.DNE(6,cn,5,1,"div",52),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(4),e.SpI(" Missing Skills (",r.missingSkills.length,") "),e.R7$(2),e.Y8G("ngForOf",r.missingSkills)}}
1function pn(a,p){if(1&a&&(e.j41(0,"span",58),e.EFF(1),e.k0s()),2&a){const r=e.XpG().$implicit;e.R7$(),e.JRh(r.relevance)}}function gn(a,p){if(1&a&&(e.j41(0,"div",55)(1,"mat-icon"),e.EFF(2,"star"),e.k0s(),e.j41(3,"div",56)(4,"span",51),e.EFF(5),e.k0s(),e.DNE(6,pn,2,1,"span",57),e.k0s()()),2&a){const r=p.$implicit;e.R7$(5),e.JRh(r.skill),e.R7$(),e.Y8G("ngIf",r.relevance)}}function mn(a,p){if(1&a&&(e.j41(0,"div",37)(1,"h3")(2,"mat-icon",44),e.EFF(3,"add_circle"),e.k0s(),e.EFF(4),e.k0s(),e.j41(5,"div",48),e.DNE(6,gn,7,2,"div",54),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(4),e.SpI(" Additional Skills (",r.extraSkills.length,") "),e.R7$(2),e.Y8G("ngForOf",r.extraSkills)}}function hn(a,p){1&a&&(e.j41(0,"div",46)(1,"mat-icon"),e.EFF(2,"psychology"),e.k0s(),e.j41(3,"p"),e.EFF(4,"No skills data available"),e.k0s()())}function fn(a,p){if(1&a&&(e.j41(0,"div",59)(1,"div",60)(2,"span",61),e.EFF(3),e.k0s(),e.j41(4,"span",62),e.EFF(5,"Required Years"),e.k0s()(),e.j41(6,"div",63)(7,"mat-icon"),e.EFF(8,"compare_arrows"),e.k0s()(),e.j41(9,"div",60)(10,"span",61),e.EFF(11),e.k0s(),e.j41(12,"span",62),e.EFF(13,"Candidate Years"),e.k0s()()()),2&a){const r=e.XpG(2);e.R7$(3),e.JRh(r.experienceData.yearsRequired||"N/A"),e.R7$(8),e.JRh(r.experienceData.yearsCandidate||"N/A")}}function vn(a,p){if(1&a&&(e.j41(0,"div",64)(1,"mat-icon"),e.EFF(2),e.k0s(),e.j41(3,"span"),e.EFF(4),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(),e.AVh("success",null==r.experienceData?null:r.experienceData.industryMatch),e.R7$(),e.SpI(" ",null!=r.experienceData&&r.experienceData.industryMatch?"check_circle":"cancel"," "),e.R7$(2),e.SpI("Industry Match: ",null!=r.experienceData&&r.experienceData.industryMatch?"Yes":"No","")}}function bn(a,p){if(1&a&&(e.j41(0,"p",73),e.EFF(1),e.k0s()),2&a){const r=e.XpG().$implicit;e.R7$(),e.JRh(r.relevance)}}function _n(a,p){if(1&a&&(e.j41(0,"div",67)(1,"div",68)(2,"span",69),e.EFF(3),e.k0s(),e.j41(4,"span",70),e.EFF(5),e.k0s()(),e.j41(6,"span",71),e.EFF(7),e.k0s(),e.DNE(8,bn,2,1,"p",72),e.k0s()),2&a){const r=p.$implicit;e.R7$(3),e.JRh(r.role||r.title),e.R7$(2),e.JRh(r.duration),e.R7$(2),e.JRh(r.company),e.R7$(),e.Y8G("ngIf",r.relevance)}}function Cn(a,p){if(1&a&&(e.j41(0,"div",37)(1,"h3")(2,"mat-icon",44),e.EFF(3,"work"),e.k0s(),e.EFF(4),e.k0s(),e.j41(5,"div",65),e.DNE(6,_n,9,4,"div",66),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(4),e.SpI(" Relevant Roles (",null==r.experienceData||null==r.experienceData.relevantRoles?null:r.experienceData.relevantRoles.length,") "),e.R7$(2),e.Y8G("ngForOf",null==r.experienceData?null:r.experienceData.relevantRoles)}}function yn(a,p){if(1&a&&(e.j41(0,"div",37)(1,"h3"),e.EFF(2,"Analysis"),e.k0s(),e.j41(3,"p",47),e.EFF(4),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(4),e.JRh(null==r.experienceData?null:r.experienceData.reasoning)}}function In(a,p){1&a&&(e.j41(0,"div",46)(1,"mat-icon"),e.EFF(2,"work_history"),e.k0s(),e.j41(3,"p"),e.EFF(4,"No experience data available"),e.k0s()())}function Sn(a,p){if(1&a&&(e.j41(0,"p",47),e.EFF(1),e.k0s()),2&a){const r=e.XpG(3);e.R7$(),e.SpI(" ",r.skillsWithEvidenceData.reasoning," ")}}function wn(a,p){if(1&a&&(e.j41(0,"p",47),e.EFF(1),e.nI1(2,"number"),e.k0s()),2&a){const r=e.XpG(3);e.R7$(),e.SpI(" Evidence ratio: ",e.i5U(2,1,100*r.skillsWithEvidenceData.evidenceRatio,"1.0-0"),"% ")}}function xn(a,p){if(1&a&&(e.j41(0,"p",81),e.EFF(1),e.k0s()),2&a){const r=e.XpG(3);e.R7$(),e.SpI(" Practiced Skills (",r.evidencedSkills.length,") ")}}function Rn(a,p){if(1&a&&(e.j41(0,"span",58),e.EFF(1),e.k0s()),2&a){const r=e.XpG().$implicit;e.R7$(),e.Lme("",r.evidence," (",r.source,")")}}function jn(a,p){if(1&a&&(e.j41(0,"div",50)(1,"mat-icon"),e.EFF(2,"check"),e.k0s(),e.j41(3,"div",56)(4,"span",51),e.EFF(5),e.k0s(),e.DNE(6,Rn,2,2,"span",57),e.k0s()()),2&a){const r=p.$implicit;e.R7$(5),e.JRh(r.skill),e.R7$(),e.Y8G("ngIf",r.evidence)}}function Dn(a,p){if(1&a&&(e.j41(0,"div",48),e.DNE(1,jn,7,2,"div",49),e.k0s()),2&a){const r=e.XpG(3);e.R7$(),e.Y8G("ngForOf",r.evidencedSkills)}}function kn(a,p){if(1&a&&(e.j41(0,"h3")(1,"mat-icon",42),e.EFF(2,"report"),e.k0s(),e.EFF(3),e.k0s()),2&a){const r=e.XpG(3);e.R7$(3),e.SpI(" Unsubstantiated Skills (",r.unsubstantiatedSkills.length,") ")}}function Pn(a,p){if(1&a&&(e.j41(0,"span",58),e.EFF(1),e.k0s()),2&a){const r=e.XpG().$implicit;e.R7$(),e.JRh(r.reason)}}
1function Fn(a,p){if(1&a&&(e.j41(0,"div",53)(1,"mat-icon"),e.EFF(2,"close"),e.k0s(),e.j41(3,"div",56)(4,"span",51),e.EFF(5),e.k0s(),e.DNE(6,Pn,2,1,"span",57),e.k0s()()),2&a){const r=p.$implicit;e.R7$(5),e.JRh(r.skill),e.R7$(),e.Y8G("ngIf",r.reason)}}function Mn(a,p){if(1&a&&(e.j41(0,"div",48),e.DNE(1,Fn,7,2,"div",52),e.k0s()),2&a){const r=e.XpG(3);e.R7$(),e.Y8G("ngForOf",r.unsubstantiatedSkills)}}function En(a,p){if(1&a&&(e.j41(0,"div",74)(1,"div",75)(2,"mat-icon"),e.EFF(3,"verified"),e.k0s(),e.j41(4,"h3"),e.EFF(5,"Praticed Skills"),e.k0s(),e.j41(6,"span",76),e.EFF(7),e.k0s()(),e.j41(8,"div",77),e.DNE(9,Sn,2,1,"p",78)(10,wn,3,4,"p",78)(11,xn,2,1,"p",79)(12,Dn,2,1,"div",80)(13,kn,4,1,"h3",2)(14,Mn,2,1,"div",80),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(6),e.Y8G("ngClass",r.getScoreClass(r.skillsWithEvidenceScore)),e.R7$(),e.SpI("",r.skillsWithEvidenceScore,"%"),e.R7$(2),e.Y8G("ngIf",r.skillsWithEvidenceData.reasoning),e.R7$(),e.Y8G("ngIf",null!=r.skillsWithEvidenceData.evidenceRatio),e.R7$(),e.Y8G("ngIf",r.evidencedSkills.length>0),e.R7$(),e.Y8G("ngIf",r.evidencedSkills.length>0),e.R7$(),e.Y8G("ngIf",r.unsubstantiatedSkills.length>0),e.R7$(),e.Y8G("ngIf",r.unsubstantiatedSkills.length>0)}}function On(a,p){if(1&a&&(e.j41(0,"p",47),e.EFF(1),e.k0s()),2&a){const r=e.XpG(3);e.R7$(),e.JRh(r.educationData.reasoning)}}function Tn(a,p){if(1&a&&(e.j41(0,"div",74)(1,"div",75)(2,"mat-icon"),e.EFF(3,"school"),e.k0s(),e.j41(4,"h3"),e.EFF(5,"Education"),e.k0s(),e.j41(6,"span",76),e.EFF(7),e.k0s()(),e.j41(8,"div",77)(9,"div",82)(10,"span",83),e.EFF(11,"Required:"),e.k0s(),e.j41(12,"span",84),e.EFF(13),e.k0s()(),e.j41(14,"div",82)(15,"span",83),e.EFF(16,"Candidate:"),e.k0s(),e.j41(17,"span",84),e.EFF(18),e.k0s()(),e.j41(19,"div",82)(20,"span",83),e.EFF(21,"Field Match:"),e.k0s(),e.j41(22,"span",84),e.EFF(23),e.k0s()(),e.DNE(24,On,2,1,"p",78),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(6),e.Y8G("ngClass",r.getScoreClass(r.educationScore)),e.R7$(),e.SpI("",r.educationScore,"%"),e.R7$(6),e.JRh(r.educationData.requiredDegree||"Not specified"),e.R7$(5),e.JRh(r.educationData.candidateDegree||"Not specified"),e.R7$(4),e.AVh("success",r.educationData.fieldMatch)("danger",!r.educationData.fieldMatch),e.R7$(),e.SpI(" ",r.educationData.fieldMatch?"Yes":"No"," "),e.R7$(),e.Y8G("ngIf",r.educationData.reasoning)}}function An(a,p){if(1&a&&(e.j41(0,"p",47),e.EFF(1),e.k0s()),2&a){const r=e.XpG(3);e.R7$(),e.JRh(r.locationData.reasoning)}}function Nn(a,p){if(1&a&&(e.j41(0,"div",74)(1,"div",75)(2,"mat-icon"),e.EFF(3,"location_on"),e.k0s(),e.j41(4,"h3"),e.EFF(5,"Location"),e.k0s(),e.j41(6,"span",76),e.EFF(7),e.k0s()(),e.j41(8,"div",77)(9,"div",82)(10,"span",83),e.EFF(11,"JD Location:"),e.k0s(),e.j41(12,"span",84),e.EFF(13),e.k0s()(),e.j41(14,"div",82)(15,"span",83),e.EFF(16,"Candidate:"),e.k0s(),e.j41(17,"span",84),e.EFF(18),e.k0s()(),e.j41(19,"div",85)(20,"span",86)(21,"mat-icon"),e.EFF(22),e.k0s(),e.EFF(23," Same City "),e.k0s(),e.j41(24,"span",86)(25,"mat-icon"),e.EFF(26),e.k0s(),e.EFF(27," Same State "),e.k0s(),e.j41(28,"span",86)(29,"mat-icon"),e.EFF(30),e.k0s(),e.EFF(31," Same Country "),e.k0s()(),e.DNE(32,An,2,1,"p",78),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(6),e.Y8G("ngClass",r.getScoreClass(r.locationScore)),e.R7$(),e.SpI("",r.locationScore,"%"),e.R7$(6),e.JRh(r.locationData.jdLocation||"Not specified"),e.R7$(5),e.JRh(r.locationData.candidateLocation||"Not specified"),e.R7$(2),e.AVh("active",r.locationData.sameCity),e.R7$(2),e.JRh(r.locationData.sameCity?"check":"close"),e.R7$(2),e.AVh("active",r.locationData.sameState),e.R7$(2),e.JRh(r.locationData.sameState?"check":"close"),e.R7$(2),e.AVh("active",r.locationData.sameCountry),e.R7$(2),e.JRh(r.locationData.sameCountry?"check":"close"),e.R7$(2),e.Y8G("ngIf",r.locationData.reasoning)}}function $n(a,p){if(1&a&&(e.j41(0,"span",94),e.EFF(1),e.k0s()),2&a){const r=e.XpG().$implicit;e.R7$(),e.JRh(r.similarity)}}function Un(a,p){if(1&a&&(e.j41(0,"div",90)(1,"span",91),e.EFF(2),e.k0s(),e.j41(3,"span",92),e.EFF(4),e.k0s(),e.DNE(5,$n,2,1,"span",93),e.k0s()),2&a){const r=p.$implicit;e.R7$(2),e.JRh(r.company||r.name),e.R7$(2),e.JRh(r.role),e.R7$(),e.Y8G("ngIf",r.similarity)}}
1function Bn(a,p){if(1&a&&(e.j41(0,"div",88),e.DNE(1,Un,6,3,"div",89),e.k0s()),2&a){const r=e.XpG(3);e.R7$(),e.Y8G("ngForOf",r.industryMatchData.relevantCompanies)}}function Gn(a,p){if(1&a&&(e.j41(0,"p",47),e.EFF(1),e.k0s()),2&a){const r=e.XpG(3);e.R7$(),e.JRh(r.industryMatchData.reasoning)}}function Yn(a,p){if(1&a&&(e.j41(0,"div",74)(1,"div",75)(2,"mat-icon"),e.EFF(3,"business"),e.k0s(),e.j41(4,"h3"),e.EFF(5,"Industry Experience"),e.k0s(),e.j41(6,"span",76),e.EFF(7),e.k0s()(),e.j41(8,"div",77),e.DNE(9,Bn,2,1,"div",87)(10,Gn,2,1,"p",78),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(6),e.Y8G("ngClass",r.getScoreClass(r.industryMatchScore)),e.R7$(),e.SpI("",r.industryMatchScore,"%"),e.R7$(2),e.Y8G("ngIf",null==r.industryMatchData.relevantCompanies?null:r.industryMatchData.relevantCompanies.length),e.R7$(),e.Y8G("ngIf",r.industryMatchData.reasoning)}}function Ln(a,p){if(1&a&&(e.j41(0,"div",96)(1,"span",97),e.EFF(2,"Career Trajectory:"),e.k0s(),e.j41(3,"p",98),e.EFF(4),e.k0s()()),2&a){const r=e.XpG(3);e.R7$(4),e.JRh(r.culturalFitData.careerTrajectory)}}function zn(a,p){if(1&a&&(e.j41(0,"div",96)(1,"span",97),e.EFF(2,"Work Style:"),e.k0s(),e.j41(3,"p",98),e.EFF(4),e.k0s()()),2&a){const r=e.XpG(3);e.R7$(4),e.JRh(r.culturalFitData.workStyle)}}function Vn(a,p){if(1&a&&(e.j41(0,"div",96)(1,"span",97),e.EFF(2,"Job Stability:"),e.k0s(),e.j41(3,"p",98),e.EFF(4),e.k0s()()),2&a){const r=e.XpG(3);e.R7$(4),e.JRh(r.culturalFitData.jobStability)}}function Xn(a,p){if(1&a&&(e.j41(0,"p",47),e.EFF(1),e.k0s()),2&a){const r=e.XpG(3);e.R7$(),e.JRh(r.culturalFitData.reasoning)}}function Hn(a,p){if(1&a&&(e.j41(0,"div",74)(1,"div",75)(2,"mat-icon"),e.EFF(3,"groups"),e.k0s(),e.j41(4,"h3"),e.EFF(5,"Cultural Fit"),e.k0s(),e.j41(6,"span",76),e.EFF(7),e.k0s()(),e.j41(8,"div",77),e.DNE(9,Ln,5,1,"div",95)(10,zn,5,1,"div",95)(11,Vn,5,1,"div",95)(12,Xn,2,1,"p",78),e.k0s()()),2&a){const r=e.XpG(2);e.R7$(6),e.Y8G("ngClass",r.getScoreClass(r.culturalFitScore)),e.R7$(),e.SpI("",r.culturalFitScore,"%"),e.R7$(2),e.Y8G("ngIf",r.culturalFitData.careerTrajectory),e.R7$(),e.Y8G("ngIf",r.culturalFitData.workStyle),e.R7$(),e.Y8G("ngIf",r.culturalFitData.jobStability),e.R7$(),e.Y8G("ngIf",r.culturalFitData.reasoning)}}function Wn(a,p){1&a&&(e.j41(0,"div",46)(1,"mat-icon"),e.EFF(2,"info"),e.k0s(),e.j41(3,"p"),e.EFF(4,"No additional data available"),e.k0s()())}function Qn(a,p){if(1&a){const r=e.RV6();e.qex(0),e.j41(1,"div",7)(2,"div",8)(3,"button",9),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.close())}),e.j41(4,"mat-icon"),e.EFF(5,"close"),e.k0s()(),e.j41(6,"button",10),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.downloadPDF())}),e.j41(7,"mat-icon"),e.EFF(8,"picture_as_pdf"),e.k0s()(),e.j41(9,"div",11)(10,"div",12)(11,"span",13),e.EFF(12),e.k0s(),e.j41(13,"span",14),e.EFF(14,"Score"),e.k0s()(),e.j41(15,"div",15)(16,"h2"),e.EFF(17),e.k0s(),e.j41(18,"p",16),e.EFF(19),e.k0s(),e.j41(20,"span",17),e.EFF(21),e.k0s()()()(),e.j41(22,"div",18)(23,"button",19),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.setTab("overview"))}),e.j41(24,"mat-icon"),e.EFF(25,"summarize"),e.k0s(),e.EFF(26," Overview "),e.k0s(),e.j41(27,"button",19),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.setTab("skills"))}),e.j41(28,"mat-icon"),e.EFF(29,"psychology"),e.k0s(),e.EFF(30," Trained Skills "),e.k0s(),e.j41(31,"button",19),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.setTab("experience"))}),e.j41(32,"mat-icon"),e.EFF(33,"work_history"),e.k0s(),e.EFF(34," Experience "),e.k0s(),e.j41(35,"button",19),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.setTab("more"))}),e.j41(36,"mat-icon"),e.EFF(37,"more_horiz"),e.k0s(),e.EFF(38," More "),e.k0s()(),e.j41(39,"mat-dialog-content")(40,"div",20)(41,"div",21)(42,"div",22)(43,"span",23),e.EFF(44,"Train Skills"),e.k0s(),e.j41(45,"div",24),e.nrm(46,"div",25),e.k0s(),e.j41(47,"span",26),e.EFF(48),e.k0s()(),e.DNE(49,Jt,7,4,"div",27),e.j41(50,"div",22)(51,"span",23),e.EFF(52,"Experience"),e.k0s(),e.j41(53,"div",24),e.nrm(54,"div",25),e.k0s(),e.j41(55,"span",26),e.EFF(56),e.k0s()(),e.j41(57,"div",22)(58,"span",23),e.EFF(59,"Education"),e.k0s(),e.j41(60,"div",24),e.nrm(61,"div",25),e.k0s(),e.j41(62,"span",26),e.EFF(63),e.k0s()(),e.j41(64,"div",22)(65,"span",23),e.EFF(66,"Location"),e.k0s(),e.j41(67,"div",24),e.nrm(68,"div",25),e.k0s(),e.j41(69,"span",26),e.EFF(70),e.k0s()(),e.j41(71,"div",22)(72,"span",23),e.EFF(73,"Industry"),e.k0s(),e.j41(74,"div",24),e.nrm(75,"div",25),e.k0s(),e.j41(76,"span",26),e.EFF(77),e.k0s()(),e.j41(78,"div",22)(79,"span",23),e.EFF(80,"Culture Fit"),e.k0s(),e.j41(81,"div",24),e.nrm(82,"div",25),e.k0s(),e.j41(83,"span",26),e.EFF(84),e.k0s()()(),e.DNE(85,Kt,5,1,"div",28)(86,en,7,1,"div",28)(87,nn,7,1,"div",28)(88,rn,7,1,"div",28)(89,
1sn,5,0,"div",29),e.k0s(),e.j41(90,"div",20)(91,"div",30)(92,"div",31)(93,"span",13),e.EFF(94),e.k0s(),e.j41(95,"span",14),e.EFF(96,"Skills Match"),e.k0s()()(),e.DNE(97,an,3,1,"div",28)(98,dn,7,2,"div",28)(99,un,7,2,"div",28)(100,mn,7,2,"div",28)(101,hn,5,0,"div",29),e.k0s(),e.j41(102,"div",20)(103,"div",32)(104,"div",33)(105,"span",13),e.EFF(106),e.k0s(),e.j41(107,"span",14),e.EFF(108,"Experience Match"),e.k0s()()(),e.DNE(109,fn,14,2,"div",34)(110,vn,5,4,"div",35)(111,Cn,7,2,"div",28)(112,yn,5,1,"div",28)(113,In,5,0,"div",29),e.k0s(),e.j41(114,"div",20),e.DNE(115,En,15,8,"div",36)(116,Tn,25,10,"div",36)(117,Nn,33,14,"div",36)(118,Yn,11,4,"div",36)(119,Hn,13,6,"div",36)(120,Wn,5,0,"div",29),e.k0s()()(),e.bVm()}if(2&a){const r=e.XpG();e.R7$(10),e.Y8G("ngClass",r.getScoreClass(r.scoreOverall)),e.R7$(2),e.JRh(r.scoreOverall||"-"),e.R7$(5),e.JRh(r.candidateName||"Unknown Candidate"),e.R7$(2),e.JRh(r.jdTitle||"Position"),e.R7$(),e.Y8G("ngClass",r.getDecisionClass(r.hiringDecision)),e.R7$(),e.SpI(" ",r.hiringDecision||"Pending"," "),e.R7$(2),e.AVh("active","overview"===r.activeTab),e.R7$(4),e.AVh("active","skills"===r.activeTab),e.R7$(4),e.AVh("active","experience"===r.activeTab),e.R7$(4),e.AVh("active","more"===r.activeTab),e.R7$(5),e.Y8G("hidden","overview"!==r.activeTab),e.R7$(6),e.xc7("width",r.skillsScore,"%"),e.Y8G("ngClass",r.getScoreClass(r.skillsScore)),e.R7$(2),e.SpI("",r.skillsScore,"%"),e.R7$(),e.Y8G("ngIf",r.skillsWithEvidenceData),e.R7$(5),e.xc7("width",r.experienceScore,"%"),e.Y8G("ngClass",r.getScoreClass(r.experienceScore)),e.R7$(2),e.SpI("",r.experienceScore,"%"),e.R7$(5),e.xc7("width",r.educationScore,"%"),e.Y8G("ngClass",r.getScoreClass(r.educationScore)),e.R7$(2),e.SpI("",r.educationScore,"%"),e.R7$(5),e.xc7("width",r.locationScore,"%"),e.Y8G("ngClass",r.getScoreClass(r.locationScore)),e.R7$(2),e.SpI("",r.locationScore,"%"),e.R7$(5),e.xc7("width",r.industryMatchScore,"%"),e.Y8G("ngClass",r.getScoreClass(r.industryMatchScore)),e.R7$(2),e.SpI("",r.industryMatchScore,"%"),e.R7$(5),e.xc7("width",r.culturalFitScore,"%"),e.Y8G("ngClass",r.getScoreClass(r.culturalFitScore)),e.R7$(2),e.SpI("",r.culturalFitScore,"%"),e.R7$(),e.Y8G("ngIf",null==r.scoreData?null:r.scoreData.summary),e.R7$(),e.Y8G("ngIf",null==r.scoreData||null==r.scoreData.strengths?null:r.scoreData.strengths.length),e.R7$(),e.Y8G("ngIf",null==r.scoreData||null==r.scoreData.concerns?null:r.scoreData.concerns.length),e.R7$(),e.Y8G("ngIf",null==r.scoreData||null==r.scoreData.recommendations?null:r.scoreData.recommendations.length),e.R7$(),e.Y8G("ngIf",!r.scoreData),e.R7$(),e.Y8G("hidden","skills"!==r.activeTab),e.R7$(2),e.Y8G("ngClass",r.getScoreClass(r.skillsScore)),e.R7$(2),e.SpI("",r.skillsScore,"%"),e.R7$(3),e.Y8G("ngIf",null==r.scoreData||null==r.scoreData.breakdown||null==r.scoreData.breakdown.skillsMatch?null:r.scoreData.breakdown.skillsMatch.reasoning),e.R7$(),e.Y8G("ngIf",r.matchedSkills.length>0),e.R7$(),e.Y8G("ngIf",r.missingSkills.length>0),e.R7$(),e.Y8G("ngIf",r.extraSkills.length>0),e.R7$(),e.Y8G("ngIf",0===r.matchedSkills.length&&0===r.missingSkills.length),e.R7$(),e.Y8G("hidden","experience"!==r.activeTab),e.R7$(2),e.Y8G("ngClass",r.getScoreClass(r.experienceScore)),e.R7$(2),e.SpI("",r.experienceScore,"%"),e.R7$(3),e.Y8G("ngIf",r.experienceData),e.R7$(),e.Y8G("ngIf",void 0!==(null==r.experienceData?null:r.experienceData.industryMatch)),e.R7$(),e.Y8G("ngIf",null==r.experienceData||null==r.experienceData.relevantRoles?null:r.experienceData.relevantRoles.length),e.R7$(),e.Y8G("ngIf",null==r.experienceData?null:r.experienceData.reasoning),e.R7$(),e.Y8G("ngIf",!r.experienceData),e.R7$(),e.Y8G("hidden","more"!==r.activeTab),e.R7$(),e.Y8G("ngIf",r.skillsWithEvidenceData),e.R7$(),e.Y8G("ngIf",r.educationData),e.R7$(),e.Y8G("ngIf",r.locationData),e.R7$(),e.Y8G("ngIf",r.industryMatchData),e.R7$(),e.Y8G("ngIf",r.culturalFitData),e.R7$(),e.Y8G("ngIf",!(r.skillsWithEvidenceData||r.educationData||r.locationData||r.industryMatchData||r.culturalFitData))}}let Ft=(()=>{var a;class p{constructor(){this.dialogRef=(0,e.WQX)(b.CP),this.recruitmentService=(0,e.WQX)(I.W),this.http=(0,e.WQX)(we.Qq),this.data=(0,e.WQX)(b.Vh),this.loading=!0,this.error=null,this.currentDateTime=new Date,this.candidateName="",this.jdTitle="",this.scoreOverall=null,this.hiringDecision=null,this.scoreData=null,this.candidateId=this.data.candidateId,this.activeTab="overview"}ngOnInit(){console.log(this.data),this.data.candidateId?this.loadScoringDetails(this.data.candidateId):(this.error="No candidate ID provided",this.loading=!1)}loadScoringDetails(t){this.loading=!0,this.error=null;const n=new we.Lr({"user-id":sessionStorage.getItem("loggedInUserId")||"",Authorization:`Bearer ${sessionStorage.getItem("currentToken")||""}`}),o=this.recruitmentService.appendChildId(Pe.YK.GET_RESULT_BY_CANDIDATE(t));this.http.get(o,{headers:n}).subscribe({next:i=>{const s=Array.isArray(null==i?void 0:i.data)?i.data[0]:null==i?void 0:i.data;s?this.processScoreData(s):this.error="No scoring data found for this candidate.",this.loading=!1},error:i=>{var s;console.error("Error loading scoring details:",i),this.error=(null===(s=i.error)||void 0===s?void 0:s.message)||"Failed to load scoring details",this.loading=!1}})}processScoreData(t){var n;let o=t.score_data||t.scoreData;if("string"==typeof o)try{o=JSON.parse(o)}catch(i){console.error("Failed to parse score_data JSON string:",i)}this.scoreData=o||{},this.candidateName=t.candidate_name||t.candidateName||"Unknown Candidate",this.jdTitle=t.jd_title||t.jdTitle||"Position",this.scoreOverall=void 0!==t.score_overall?Number(t.score_overall):void 0!==t.overallScore?Number(t.overallScore):null,this.hiringDecision=(null===(n=this.scoreData)||void 0===n?void 0:n.hiringDecision)||t.hiring_decision||null}get matchedSkills(){var t;return(null===(t=this.scoreData)||void 0===t||null===(t=t.breakdown)||void 0===t||null===(t=t.skillsMatch)||void 0===t?void 0:t.matchedSkills)||[]}get missingSkills(){var t;return(null===(t=this.scoreData)||void 0===t||null===(t=t.breakdown)||void 0===t||null===(t=t.skillsMatch)||void 0===t?void 0:t.missingSkills)||[]}get extraSkills(){var t;return(null===(t=this.scoreData)||void 0===t||null===(t=t.breakdown)||void 0===t||null===(t=t.skillsMatch)||void 0===t?void 0:t.extraSkills)||[]}
1get skillsWithEvidenceData(){var t;return(null===(t=this.scoreData)||void 0===t||null===(t=t.breakdown)||void 0===t?void 0:t.skillsWithEvidence)||null}get evidencedSkills(){var t;return(null===(t=this.skillsWithEvidenceData)||void 0===t?void 0:t.evidencedSkills)||[]}get unsubstantiatedSkills(){var t;return(null===(t=this.skillsWithEvidenceData)||void 0===t?void 0:t.unsubstantiatedSkills)||[]}get experienceData(){var t;return(null===(t=this.scoreData)||void 0===t||null===(t=t.breakdown)||void 0===t?void 0:t.experienceMatch)||null}get educationData(){var t;return(null===(t=this.scoreData)||void 0===t||null===(t=t.breakdown)||void 0===t?void 0:t.educationMatch)||null}get locationData(){var t;return(null===(t=this.scoreData)||void 0===t||null===(t=t.breakdown)||void 0===t?void 0:t.locationMatch)||null}get industryMatchData(){var t;return(null===(t=this.scoreData)||void 0===t||null===(t=t.breakdown)||void 0===t?void 0:t.industryMatch)||null}get culturalFitData(){var t;return(null===(t=this.scoreData)||void 0===t||null===(t=t.breakdown)||void 0===t?void 0:t.culturalFit)||null}get skillsScore(){var t;return(null===(t=this.scoreData)||void 0===t||null===(t=t.breakdown)||void 0===t||null===(t=t.skillsMatch)||void 0===t?void 0:t.score)||0}get skillsWithEvidenceScore(){var t;return(null===(t=this.scoreData)||void 0===t||null===(t=t.breakdown)||void 0===t||null===(t=t.skillsWithEvidence)||void 0===t?void 0:t.score)||0}get experienceScore(){var t;return(null===(t=this.scoreData)||void 0===t||null===(t=t.breakdown)||void 0===t||null===(t=t.experienceMatch)||void 0===t?void 0:t.score)||0}get educationScore(){var t;return(null===(t=this.scoreData)||void 0===t||null===(t=t.breakdown)||void 0===t||null===(t=t.educationMatch)||void 0===t?void 0:t.score)||0}get locationScore(){var t;return(null===(t=this.scoreData)||void 0===t||null===(t=t.breakdown)||void 0===t||null===(t=t.locationMatch)||void 0===t?void 0:t.score)||0}get industryMatchScore(){var t;return(null===(t=this.scoreData)||void 0===t||null===(t=t.breakdown)||void 0===t||null===(t=t.industryMatch)||void 0===t?void 0:t.score)||0}get culturalFitScore(){var t;return(null===(t=this.scoreData)||void 0===t||null===(t=t.breakdown)||void 0===t||null===(t=t.culturalFit)||void 0===t?void 0:t.score)||0}setTab(t){this.activeTab=t}getScoreClass(t){return null===t?"score--none":t>=75?"score--high":t>=50?"score--medium":"score--low"}getDecisionClass(t){return t?`decision--${t.toLowerCase().replace(/\s+/g,"-")}`:"decision--none"}close(){this.dialogRef.close()}downloadPDF(){const t=document.getElementById("pdf-content");if(!t)return;const n=Array.from(t.querySelectorAll(".tab-content")),o=n.map(l=>l.hidden),i=n.map(l=>l.style.display),s=Array.from(t.querySelectorAll("mat-dialog-content, .mat-dialog-content, .mat-mdc-dialog-content, .mdc-dialog__content")),d=s.map(l=>({overflow:l.style.overflow,overflowY:l.style.overflowY,maxHeight:l.style.maxHeight,height:l.style.height})),u=Array.from(t.querySelectorAll(".no-print, .tabs")),g=u.map(l=>l.style.display);n.forEach(l=>{l.hidden=!1,l.style.setProperty("display","block","important")}),s.forEach(l=>{l.style.setProperty("overflow","visible","important"),l.style.setProperty("overflow-y","visible","important"),l.style.setProperty("max-height","none","important"),l.style.setProperty("height","auto","important")}),u.forEach(l=>{l.style.setProperty("display","none","important")}),t.classList.add("printing-mode");const m={margin:[10,10,10,10],filename:`Analysis_${this.candidateName.replace(/\s+/g,"_")}.pdf`,image:{type:"jpeg",quality:.98},html2canvas:{scale:2,useCORS:!0,logging:!1,letterRendering:!0,windowWidth:760},jsPDF:{unit:"mm",format:"a4",orientation:"portrait"},pagebreak:{mode:["css","legacy"]}};Pt().from(t).set(m).save().then(()=>{n.forEach((l,f)=>{l.hidden=o[f],l.style.display=i[f]}),s.forEach((l,f)=>{l.style.overflow=d[f].overflow,l.style.overflowY=d[f].overflowY,l.style.maxHeight=d[f].maxHeight,l.style.height=d[f].height}),u.forEach((l,f)=>{l.style.display=g[f]}),t.classList.remove("printing-mode")})}}return(a=p).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=e.VBU({type:a,selectors:[["app-scoring-details-modal"]],standalone:!0,features:[e.aNF],decls:3,vars:3,consts:[["class","loading-state",4,"ngIf"],["class","error-state",4,"ngIf"],[4,"ngIf"],[1,"loading-state"],["diameter","40"],[1,"error-state"],["mat-stroked-button","","color","primary",3,"click"],["id","pdf-content"],[1,"details-header"],["mat-icon-button","","aria-label","Close",1,"close-btn","no-print",3,"click"],["mat-icon-button","","aria-label","Download PDF","matTooltip","Download PDF",1,"download-btn","no-print",3,"click"],[1,"candidate-summary"],[1,"score-display",3,"ngClass"],[1,"score-value"],[1,"score-label"],[1,"candidate-info"],[1,"position"],[1,"match-badge",3,"ngClass"],[1,"tabs"],[3,"click"],[1,"tab-content",3,"hidden"],[1,"score-breakdown"],[1,"breakdown-item"],[1,"breakdown-label"],[1,"breakdown-bar"],[1,"breakdown-fill",3,"ngClass"],[1,"breakdown-value"],["class","breakdown-item",4,"ngIf"],["class","section",4,"ngIf"],["class","no-data",4,"ngIf"],[1,"skills-header"],[1,"skills-score",3,"ngClass"],[1,"experience-header"],[1,"experience-score",3,"ngClass"],["class","years-comparison",4,"ngIf"],["class","industry-badge",4,"ngIf"],["class","more-section",4,"ngIf"],[1,"section"],[1,"summary-text"],[1,"section-icon","section-icon--success"],[1,"bullet-list","bullet-list--success"],[4,"ngFor","ngForOf"],[1,"section-icon","section-icon--danger"],[1,"bullet-list","bullet-list--danger"],[1,"section-icon","section-icon--info"],[1,"recommendations-list"],[1,"no-data"],[1,"reasoning-text"],[1,"skills-grid"],["class","skill-chip skill-chip--matched",4,"ngFor","ngForOf"],[1,"skill-chip","skill-chip--matched"],[1,"skill-name"],["class","skill-chip skill-chip--missing",4,"ngFor","ngForOf"],[1,"skill-chip","skill-chip--missing"],["class","skill-chip skill-chip--extra",4,"ngFor","ngForOf"],[1,"skill-chip","skill-chip--extra"],[1,"skill-content"],["class","skill-relevance",4,"ngIf"],[1,"skill-relevance"],[1,"years-comparison"],[1,"years-stat"],[1,"years-value"],[1,"years-label"],[1,"years-divider"],[1,"industry-badge"],[1,"roles-list"],["class","role-item",4,"ngFor","ngForOf"],[1,"role-item"],[1,"role-header"],[1,"role-title"],[1,"role-duration"],[1,"role-company"],["class","role-relevance",4,"ngIf"],[1,"role-relevance"],[1,"more-section"],[1,"more-section-header"],[1,"more-section-score",3,"ngClass"],[1,"more-section-content"],["class","reasoning-text",4,"ngIf"],["style","font-size:15px",4,"ngIf"],["class","skills-grid",4,"ngIf"],[2,"font-size","15px"],[1,"info-row"],[1,"info-label"],[1,"info-value"],[1,"location-checks"],[1,"check-item"],["class","companies-list",4,"ngIf"],[1,"companies-list"],["class","company-item",4,"ngFor","ngForOf"],[1,"company-item"],[1,"company-name"],[1,"company-role"],["class","company-similarity",4,"ngIf"],[1,"company-similarity"],["class","culture-item",4,"ngIf"],[1,"culture-item"],[1,"culture-label"],[1,"culture-value"]],template:function(t,n){1&t&&e.DNE(0,Qt,4,0,"div",0)(1,qt,7,1,"div",1)(2,Qn,121,68,"ng-container",2),2&t&&(e.Y8G("ngIf",n.loading),e.R7$(),e.Y8G("ngIf",!n.loading&&n.error),e.R7$(),e.Y8G("ngIf",!n.loading&&!n.error))},dependencies:[K.MD,K.YU,K.Sq,K.bT,K.QX,b.hM,b.Yi,Ae.Hl,Ae.$z,Ae.iY,x.m_,x.An,nt.D6,nt.LG,V.uc,V.oV],styles:[".details-header[_ngcontent-%COMP%]{position:relative;padding:24px;background:linear-gradient(135deg,#f5f7fa,#e8edf2);border-bottom:1px solid rgba(0,0,0,.08)}.close-btn[_ngcontent-%COMP%], .download-btn[_ngcontent-%COMP%]{position:absolute;top:12px}.close-btn[_ngcontent-%COMP%]{right:12px}.download-btn[_ngcontent-%COMP%]{right:52px;
1color:#e74c3c}.download-btn[_ngcontent-%COMP%]:hover{background:#e74c3c1a!important}.candidate-summary[_ngcontent-%COMP%]{display:flex;align-items:center;gap:20px}.pdf-section[_ngcontent-%COMP%]{padding:20px;background:#fff;border-bottom:1px solid #f0f2f5}.pdf-section[_ngcontent-%COMP%] .pdf-section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;margin-bottom:15px;color:var(--ion-color-primary, #3880ff)}.pdf-section[_ngcontent-%COMP%] .pdf-section-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.pdf-section[_ngcontent-%COMP%] .pdf-section-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:16px;font-weight:700}.score-display[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;width:80px;height:80px;border-radius:50%;border:4px solid;background:#fff}.score-display[_ngcontent-%COMP%] .score-value[_ngcontent-%COMP%]{font-size:24px;font-weight:700}.score-display[_ngcontent-%COMP%] .score-label[_ngcontent-%COMP%]{font-size:10px;text-transform:uppercase;letter-spacing:.5px}.score-display.score--high[_ngcontent-%COMP%]{border-color:#4caf50;color:#4caf50}.score-display.score--medium[_ngcontent-%COMP%]{border-color:#ff9800;color:#ff9800}.score-display.score--low[_ngcontent-%COMP%]{border-color:#f44336;color:#f44336}.score-display.score--none[_ngcontent-%COMP%]{border-color:#bdbdbd;color:#9e9e9e}.candidate-info[_ngcontent-%COMP%]{flex:1}.candidate-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 4px;font-size:20px;font-weight:600;color:#212121}.candidate-info[_ngcontent-%COMP%] .position[_ngcontent-%COMP%]{margin:0 0 8px;font-size:14px;color:#616161}.match-badge[_ngcontent-%COMP%]{display:inline-block;padding:4px 12px;border-radius:12px;font-size:12px;font-weight:500}.match-badge.decision--strong-match[_ngcontent-%COMP%]{background:#4caf5026;color:#2e7d32}.match-badge.decision--good-match[_ngcontent-%COMP%]{background:#3880ff26;color:#1565c0}.match-badge.decision--moderate-match[_ngcontent-%COMP%]{background:#ff980026;color:#e65100}.match-badge.decision--weak-match[_ngcontent-%COMP%]{background:#f4433626;color:#c62828}.match-badge.decision--none[_ngcontent-%COMP%]{background:#9e9e9e26;color:#616161}.tabs[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid rgba(0,0,0,.08);padding:0 16px;background:#fff}.tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;padding:12px 16px;border:none;background:none;font-size:13px;font-weight:500;color:#757575;cursor:pointer;border-bottom:2px solid transparent;transition:all .2s ease}.tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:#424242;background:#0000000a}.tabs[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{color:var(--ion-color-primary, #3880ff);border-bottom-color:var(--ion-color-primary, #3880ff)}.tab-content[_ngcontent-%COMP%]{padding:20px}[hidden][_ngcontent-%COMP%]{display:none!important}.score-breakdown[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding:16px;background:#f9fafb;border-radius:8px;margin-bottom:20px}.breakdown-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px}.breakdown-item[_ngcontent-%COMP%] .breakdown-label[_ngcontent-%COMP%]{width:170px;font-size:12px;font-weight:500;color:#616161;white-space:nowrap}.breakdown-item[_ngcontent-%COMP%] .breakdown-bar[_ngcontent-%COMP%]{flex:0 0 75%;height:8px;width:5px;background:#e0e0e0;border-radius:4px;overflow:hidden}.breakdown-item[_ngcontent-%COMP%] .breakdown-fill[_ngcontent-%COMP%]{height:100%;width:50%;border-radius:4px;transition:width .3s ease}.breakdown-item[_ngcontent-%COMP%] .breakdown-fill.score--high[_ngcontent-%COMP%]{background:#4caf50}.breakdown-item[_ngcontent-%COMP%] .breakdown-fill.score--medium[_ngcontent-%COMP%]{background:#ff9800}.breakdown-item[_ngcontent-%COMP%] .breakdown-fill.score--low[_ngcontent-%COMP%]{background:#f44336}.breakdown-item[_ngcontent-%COMP%] .breakdown-value[_ngcontent-%COMP%]{width:50px;text-align:right;font-size:12px;font-weight:600;color:#424242}.section[_ngcontent-%COMP%]{margin-bottom:24px}.section[_ngcontent-%COMP%]:last-child{margin-bottom:0}.section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin:0 0 12px;font-size:14px;font-weight:600;color:#424242}.section-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.section-icon.section-icon--success[_ngcontent-%COMP%]{color:#4caf50}.section-icon.section-icon--danger[_ngcontent-%COMP%]{color:#f44336}.section-icon.section-icon--info[_ngcontent-%COMP%]{color:var(--ion-color-primary, #3880ff)}.summary-text[_ngcontent-%COMP%]{font-size:14px;line-height:1.6;color:#424242;margin:0}.chips-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px}.chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:16px;font-size:12px;font-weight:500}.chip[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;
1height:14px}.chip.chip--success[_ngcontent-%COMP%]{background:#4caf501f;color:#2e7d32}.chip.chip--danger[_ngcontent-%COMP%]{background:#f443361f;color:#c62828}.recommendations-list[_ngcontent-%COMP%]{margin:0;padding-left:20px}.recommendations-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:13px;line-height:1.6;color:#424242;margin-bottom:8px}.recommendations-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{margin-bottom:0}.skills-header[_ngcontent-%COMP%], .experience-header[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-bottom:24px}.skills-score[_ngcontent-%COMP%], .experience-score[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:16px 32px;border-radius:12px;background:#f5f5f5}.skills-score[_ngcontent-%COMP%] .score-value[_ngcontent-%COMP%], .experience-score[_ngcontent-%COMP%] .score-value[_ngcontent-%COMP%]{font-size:32px;font-weight:700}.skills-score[_ngcontent-%COMP%] .score-label[_ngcontent-%COMP%], .experience-score[_ngcontent-%COMP%] .score-label[_ngcontent-%COMP%]{font-size:12px;color:#757575}.skills-score.score--high[_ngcontent-%COMP%], .experience-score.score--high[_ngcontent-%COMP%]{background:#4caf501a;color:#2e7d32}.skills-score.score--medium[_ngcontent-%COMP%], .experience-score.score--medium[_ngcontent-%COMP%]{background:#ff98001a;color:#e65100}.skills-score.score--low[_ngcontent-%COMP%], .experience-score.score--low[_ngcontent-%COMP%]{background:#f443361a;color:#c62828}.skills-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px}.skill-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:8px;font-size:13px}.skill-chip[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.skill-chip[_ngcontent-%COMP%] .skill-name[_ngcontent-%COMP%]{font-weight:500}.skill-chip[_ngcontent-%COMP%] .skill-category[_ngcontent-%COMP%], .skill-chip[_ngcontent-%COMP%] .skill-importance[_ngcontent-%COMP%]{font-size:10px;padding:2px 6px;border-radius:4px;text-transform:capitalize}.skill-chip.skill-chip--matched[_ngcontent-%COMP%]{background:#4caf501a;color:#2e7d32}.skill-chip.skill-chip--matched[_ngcontent-%COMP%] .skill-category[_ngcontent-%COMP%]{background:#4caf5033}.skill-chip.skill-chip--missing[_ngcontent-%COMP%]{background:#f443361a;color:#c62828}.skill-chip.skill-chip--missing[_ngcontent-%COMP%] .importance--required[_ngcontent-%COMP%]{background:#f4433633}.skill-chip.skill-chip--missing[_ngcontent-%COMP%] .importance--preferred[_ngcontent-%COMP%]{background:#ff980033;color:#e65100}.years-comparison[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:24px;padding:20px;background:#f9fafb;border-radius:12px;margin-bottom:24px}.years-stat[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.years-stat[_ngcontent-%COMP%] .years-value[_ngcontent-%COMP%]{font-size:28px;font-weight:700;color:#212121}.years-stat[_ngcontent-%COMP%] .years-label[_ngcontent-%COMP%]{font-size:12px;color:#757575}.years-divider[_ngcontent-%COMP%]{color:#bdbdbd}.years-divider[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:24px;width:24px;height:24px}.roles-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.role-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;padding:12px;background:#f9fafb;border-radius:8px}.role-item[_ngcontent-%COMP%] .role-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.role-item[_ngcontent-%COMP%] .role-title[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#212121}.role-item[_ngcontent-%COMP%] .role-duration[_ngcontent-%COMP%]{font-size:12px;color:#757575;font-weight:500}.role-item[_ngcontent-%COMP%] .role-company[_ngcontent-%COMP%]{font-size:13px;color:#616161}.role-item[_ngcontent-%COMP%] .role-relevance[_ngcontent-%COMP%]{font-size:12px;color:#757575;margin:8px 0 0;line-height:1.5}.reasoning-text[_ngcontent-%COMP%]{font-size:13px;line-height:1.6;color:#424242;margin:0;padding:12px;background:#f9fafb;border-radius:8px}.loading-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:64px 24px;gap:16px}.loading-state[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px;color:#757575}.error-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:64px 24px;gap:12px;text-align:center}.error-state[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;color:#f44336}.error-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px;color:#616161}.bullet-list[_ngcontent-%COMP%]{margin:0;padding-left:20px}.bullet-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:13px;line-height:1.6;margin-bottom:8px}.bullet-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{margin-bottom:0}.bullet-list.bullet-list--success[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{color:#2e7d32}.bullet-list.bullet-list--danger[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{color:#c62828}.skill-chip--extra[_ngcontent-%COMP%]{background:#3880ff1a;color:#1565c0;flex-direction:column;align-items:flex-start;gap:4px}.skill-chip--extra[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#f59e0b}.skill-chip--extra[_ngcontent-%COMP%] .skill-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.skill-chip--extra[_ngcontent-%COMP%] .skill-relevance[_ngcontent-%COMP%]{font-size:11px;color:#757575;font-weight:400}.industry-badge[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px;background:#f9fafb;border-radius:8px;margin-bottom:20px;font-size:14px;color:#616161}.industry-badge[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:#f44336}.industry-badge[_ngcontent-%COMP%] mat-icon.success[_ngcontent-%COMP%]{color:#4caf50}.more-section[_ngcontent-%COMP%]{margin-bottom:20px;border:1px solid rgba(0,0,0,.08);border-radius:8px;overflow:hidden}.more-section[_ngcontent-%COMP%]:last-child{margin-bottom:0}.more-section-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:12px 16px;background:#f9fafb;border-bottom:1px solid rgba(0,0,0,.06)}.more-section-header[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:var(--ion-color-primary, #3880ff)}.more-section-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{flex:1;margin:0;font-size:14px;font-weight:600;color:#424242}.more-section-score[_ngcontent-%COMP%]{font-size:14px;font-weight:700;padding:4px 10px;border-radius:12px}.more-section-score.score--high[_ngcontent-%COMP%]{background:#4caf5026;color:#2e7d32}
1.more-section-score.score--medium[_ngcontent-%COMP%]{background:#ff980026;color:#e65100}.more-section-score.score--low[_ngcontent-%COMP%]{background:#f4433626;color:#c62828}.more-section-content[_ngcontent-%COMP%]{padding:16px}.info-row[_ngcontent-%COMP%]{display:flex;gap:12px;margin-bottom:8px}.info-row[_ngcontent-%COMP%]:last-child{margin-bottom:0}.info-row[_ngcontent-%COMP%] .info-label[_ngcontent-%COMP%]{font-size:13px;color:#757575;min-width:100px}.info-row[_ngcontent-%COMP%] .info-value[_ngcontent-%COMP%]{font-size:13px;color:#212121;font-weight:500}.info-row[_ngcontent-%COMP%] .info-value.success[_ngcontent-%COMP%]{color:#2e7d32}.info-row[_ngcontent-%COMP%] .info-value.danger[_ngcontent-%COMP%]{color:#c62828}.location-checks[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0}.check-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;font-size:12px;color:#9e9e9e}.check-item[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.check-item.active[_ngcontent-%COMP%]{color:#2e7d32}.companies-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;margin-bottom:12px}.company-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;padding:12px;background:#f9fafb;border-radius:8px}.company-item[_ngcontent-%COMP%] .company-name[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#212121}.company-item[_ngcontent-%COMP%] .company-role[_ngcontent-%COMP%]{font-size:13px;color:#616161}.company-item[_ngcontent-%COMP%] .company-similarity[_ngcontent-%COMP%]{font-size:12px;color:#757575;font-style:italic}.culture-item[_ngcontent-%COMP%]{margin-bottom:16px}.culture-item[_ngcontent-%COMP%]:last-child{margin-bottom:0}.culture-item[_ngcontent-%COMP%] .culture-label[_ngcontent-%COMP%]{display:block;font-size:12px;font-weight:600;color:#757575;margin-bottom:4px;text-transform:uppercase;letter-spacing:.5px}.culture-item[_ngcontent-%COMP%] .culture-value[_ngcontent-%COMP%]{margin:0;font-size:13px;line-height:1.6;color:#424242}.no-data[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 24px;color:#9e9e9e}.no-data[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;margin-bottom:12px;opacity:.5}.no-data[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}@media (max-width: 600px){.candidate-summary[_ngcontent-%COMP%]{flex-direction:column;text-align:center}.candidate-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:18px}.tabs[_ngcontent-%COMP%]{overflow-x:auto;padding:0 8px}.tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:10px 12px;font-size:12px;white-space:nowrap}.years-comparison[_ngcontent-%COMP%]{flex-direction:column;gap:16px}.years-divider[_ngcontent-%COMP%]{transform:rotate(90deg)}}.mat-icon[_ngcontent-%COMP%]{padding:0!important}.printing-mode[_ngcontent-%COMP%]{width:750px!important;box-sizing:border-box!important;background:#fff!important;color:#000!important;margin:0 auto!important}.printing-mode[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{box-sizing:border-box!important}.printing-mode[_ngcontent-%COMP%] .tabs[_ngcontent-%COMP%]{display:none!important}.printing-mode[_ngcontent-%COMP%] mat-dialog-content[_ngcontent-%COMP%]{max-height:none!important;overflow:visible!important;padding:0!important;height:auto!important}.printing-mode[_ngcontent-%COMP%] .section[_ngcontent-%COMP%], .printing-mode[_ngcontent-%COMP%] .more-section[_ngcontent-%COMP%], .printing-mode[_ngcontent-%COMP%] .score-breakdown[_ngcontent-%COMP%], .printing-mode[_ngcontent-%COMP%] .skills-header[_ngcontent-%COMP%], .printing-mode[_ngcontent-%COMP%] .experience-header[_ngcontent-%COMP%], .printing-mode[_ngcontent-%COMP%] .years-comparison[_ngcontent-%COMP%], .printing-mode[_ngcontent-%COMP%] .industry-badge[_ngcontent-%COMP%]{break-inside:avoid!important;page-break-inside:avoid!important}.printing-mode[_ngcontent-%COMP%] .tab-content[_ngcontent-%COMP%]{display:block!important;width:100%!important;padding:24px!important;border-bottom:2px solid #f0f2f5!important;visibility:visible!important;opacity:1!important}.printing-mode[_ngcontent-%COMP%] .details-header[_ngcontent-%COMP%]{background:#f8f9fa!important;-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}.printing-mode[_ngcontent-%COMP%] .score-breakdown[_ngcontent-%COMP%], .printing-mode[_ngcontent-%COMP%] .breakdown-fill[_ngcontent-%COMP%]{-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}.printing-mode[_ngcontent-%COMP%] .no-print[_ngcontent-%COMP%]{display:none!important}"]}),p})();var qn=Y(15455),Mt=Y(84412);let Jn=(()=>{var a;
1class p{constructor(){this.socket=null,this.progressSubject=new Mt.t(null),this.connectedSubject=new Mt.t(!1),this.progress$=this.progressSubject.asObservable(),this.connected$=this.connectedSubject.asObservable()}connect(t){var n;null!==(n=this.socket)&&void 0!==n&&n.connected||(this.socket=(0,qn.io)(t,{path:"/ws/scoring-progress",transports:["websocket","polling"]}),this.socket.on("connect",()=>{console.log("Socket.IO connected"),this.connectedSubject.next(!0)}),this.socket.on("disconnect",()=>{console.log("Socket.IO disconnected"),this.connectedSubject.next(!1)}),this.socket.on("scoring_progress",o=>{this.progressSubject.next(o)}),this.socket.on("connect_error",o=>{console.error("Socket.IO connection error:",o)}))}subscribeToJD(t){var n;null===(n=this.socket)||void 0===n||n.emit("subscribe",{jd_id:t})}subscribeToUser(t){var n;null!==(n=this.socket)&&void 0!==n&&n.connected?(this.socket.emit("subscribe",{user_id:t}),console.log(`Subscribed to scoring progress for user: ${t}`)):console.warn("Socket not connected, cannot subscribe to user")}subscribeToAll(){console.warn("subscribeToAll() is DEPRECATED and no longer works. Use subscribeToUser(userId) instead.")}unsubscribeFromJD(t){var n;null===(n=this.socket)||void 0===n||n.emit("unsubscribe",{jd_id:t})}unsubscribeAll(){var t;null===(t=this.socket)||void 0===t||t.emit("unsubscribe",{all:!0})}disconnect(){var t;null===(t=this.socket)||void 0===t||t.disconnect(),this.socket=null}ngOnDestroy(){this.disconnect()}}return(a=p).\u0275fac=function(t){return new(t||a)},a.\u0275prov=e.jDH({token:a,factory:a.\u0275fac,providedIn:"root"}),p})();var yt=Y(53651),Kn=Y(58755),Ke=Y(57482);const Zn=["columnChooserBtn"];function eo(a,p){if(1&a&&(e.j41(0,"div",24)(1,"div",25),e.nrm(2,"div",26),e.j41(3,"div",27)(4,"span",28),e.EFF(5),e.k0s(),e.j41(6,"span",29),e.EFF(7,"/"),e.k0s(),e.j41(8,"span",30),e.EFF(9),e.k0s()(),e.j41(10,"p",31),e.EFF(11,"Scoring Resumes..."),e.k0s(),e.j41(12,"div",32),e.nrm(13,"div",33),e.k0s()()()),2&a){const r=e.XpG();e.R7$(5),e.JRh(r.completedCount),e.R7$(4),e.JRh(r.totalItemsToProcess),e.R7$(4),e.xc7("width",r.progressPercentage,"%")}}function to(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",34),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.addCandidate())}),e.j41(1,"span",35),e.EFF(2,"add"),e.k0s(),e.EFF(3," Add Candidate "),e.k0s()}if(2&a){const r=e.XpG();e.xc7("background-color",r.buttonColorName)("opacity",r.isAllCompanySelected||r.isPastYear?"0.5":"1"),e.Y8G("disabled",r.isAllCompanySelected||r.isPastYear)}}function no(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",36),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.calculateScore())}),e.EFF(1,"Calculate Score"),e.k0s()}if(2&a){const r=e.XpG();e.Y8G("disabled",r.isAllCompanySelected)}}function oo(a,p){if(1&a&&(e.j41(0,"mat-option",37),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG();e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}let io=(()=>{var a;class p{get arrAllMonths(){return this._arrAllMonthsCacheKey!==this.loggedInCompanyFiscalyear&&(this._arrAllMonthsCacheKey=this.loggedInCompanyFiscalyear,this._arrAllMonthsCache="Apr_Mar"===this.loggedInCompanyFiscalyear?[...this.months.slice(3),...this.months.slice(0,3)]:this.months),this._arrAllMonthsCache}get selectedMonths(){return this.selectedMonthObjects.map(t=>t.key)}get allMonthsSelected(){return this.selectedMonthObjects.length===this.arrAllMonths.length}onMonthsChange(t){this.selectedMonthObjects=t,this.loadCandidates()}constructor(t,n,o,i,s,d,u,g,m,l,f,h,v,k){this.httpService=t,this.config=n,this.encryptionService=o,this.dataRefreshService=i,this.dialog=s,this.sharedService=d,this.dialogRef=u,this.router=g,this.toastr=m,this.httpClient=l,this.scoringProgressService=f,this.accessControlService=h,this.recruitmentService=v,this.systemSettingsService=k,this.candidates=[],this.searchTerm="",this.selectedRowCount=0,this.agColumnDefs=[],this.agRowData=[],this.gridFilterActive=!1,this.isClicked=!1,this.gridOptions={pagination:!0,paginationPageSize:10,paginationPageSizeSelector:[5,10,25,50,75,100,200,500,1e3],suppressCellFocus:!0,rowHeight:42,popupParent:document.querySelector("body"),rowSelection:"multiple",suppressRowClickSelection:!0,defaultColDef:{flex:1,minWidth:120,resizable:!0,sortable:!0,filter:!0}
1,localeText:{noRowsToShow:"No records found"},postProcessPopup:B=>{var de;if("columnChooser"!==B.type)return;const ae=null===(de=this.columnChooserBtn)||void 0===de?void 0:de.nativeElement,me=B.ePopup;if(!ae||!me)return;const se=ae.getBoundingClientRect();me.style.top=`${se.bottom+window.scrollY+4}px`,me.style.left="auto",me.style.right=document.documentElement.clientWidth-se.right+"px"},onCellClicked:B=>this.handleCellClick(B),onFilterChanged:()=>{var B;const de=null===(B=this.gridApi)||void 0===B?void 0:B.getFilterModel();this.gridFilterActive=!!de&&Object.keys(de).length>0},onSelectionChanged:()=>{var B;this.selectedRowCount=(null===(B=this.gridApi)||void 0===B?void 0:B.getSelectedRows().length)||0}},this.isScoringInProgress=!1,this.progressEvents=[],this.totalItemsToProcess=0,this.socketSubscriptions=new Oe.yU,this.userInitiatedScoring=!1,this.currentScoringResumeIds=new Set,this.scoringPollSubscription=null,this.polledCompletedCount=0,this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.recruitmentYears=[],this.selectedYearForRecruitment="",this.isPastYear=!1,this.fromYear="",this.toYear="",this.taskFromDate=null,this.taskToDate=null,this.selectedMonthObjects=[],this.monthDropdownSettings={singleSelection:!1,enableCheckAll:!0,selectAllText:"Select All",unSelectAllText:"Unselect All",idField:"key",textField:"name",itemsShowLimit:1,closeDropDownOnSelection:!1},this.loggedInUserRoleIsMD=!1,this.loggedInUserRoleIsHOD=!1,this.destroy$=new Z.B,this.months=[{key:"01",name:"January"},{key:"02",name:"February"},{key:"03",name:"March"},{key:"04",name:"April"},{key:"05",name:"May"},{key:"06",name:"June"},{key:"07",name:"July"},{key:"08",name:"August"},{key:"09",name:"September"},{key:"10",name:"October"},{key:"11",name:"November"},{key:"12",name:"December"}],this._arrAllMonthsCacheKey=Symbol(),this._arrAllMonthsCache=[],this.showAiRecruitmentFeatures=!1,this.isAllCompanySelected=!1,this.hodDeptBandPairs=new Set}ngOnInit(){this.initSocketConnection(),this.isAllCompanySelected=null===this.recruitmentService.getChildId(),this.recruitmentService.selectedChildId$.pipe((0,L.Q)(this.destroy$)).subscribe(t=>{var n;this.isAllCompanySelected=null===t,null===(n=this.gridApi)||void 0===n||n.refreshCells({force:!0})}),this.dataRefreshService.refreshNeeded$.pipe((0,Q.B)(300),(0,L.Q)(this.destroy$)).subscribe(()=>{this.initializeSessionData(),this.getPmsYearList()})}ngOnDestroy(){var t;this.scoringProgressService.unsubscribeAll(),this.scoringProgressService.disconnect(),null===(t=this.scoringPollSubscription)||void 0===t||t.unsubscribe(),this.destroy$.next(),this.destroy$.complete()}onGridReady(t){this.gridApi=t.api}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}resetGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.deselectAll(),this.gridApi.refreshCells()),this.gridFilterActive=!1,this.loadCandidates()}setAgColumnDefs(){const n=!this.isMDOrHOD,o=[];!this.isMDOrHOD&&o.push({headerName:"select",field:"id",width:50,minWidth:50,maxWidth:50,sortable:!1,filter:!1,checkboxSelection:!0,headerCheckboxSelection:!0,pinned:"left"}),o.push({headerName:"Name",field:"name",minWidth:150,tooltipField:"name",cellRenderer:i=>this.truncateCell(i.value),pinned:"left"},{headerName:"Phone",field:"phone",minWidth:130},{headerName:"Email",field:"email",minWidth:200,tooltipField:"email",cellRenderer:i=>this.truncateCell(i.value)},{headerName:"Position",field:"positionAppliedFor",minWidth:160,tooltipField:"positionAppliedFor",cellRenderer:i=>this.truncateCell(i.value)},{headerName:"Year of Exp.",field:"yearOfExperience",minWidth:130,valueFormatter:i=>null!=i.value&&""!==i.value?String((0,O.eB)(i.value,2)):""},{headerName:"Expected CTC",field:"expectedSalary",minWidth:140},{headerName:"Skills",field:"skills",minWidth:200,tooltipField:"skills",cellRenderer:i=>this.truncateCell(i.value)},{headerName:"Reason For Job Change",field:"reasonForJobChange",minWidth:220,tooltipField:"reasonForJobChange",cellRenderer:i=>this.truncateCell(i.value)},{headerName:"Education",field:"education",minWidth:160,tooltipField:"education",cellRenderer:i=>this.truncateCell(i.value)},{headerName:"Notice Period",field:"noticePeriod",minWidth:140,valueFormatter:i=>null!=i.value&&""!==i.value?String((0,O.Y1)(i.value)):""},{headerName:"Applied On",field:"applicationDate",minWidth:130,valueFormatter:i=>i.value?new Date(i.value).toLocaleDateString("en-GB"):"",cellRenderer:i=>i.value?new Date(i.value).toLocaleDateString("en-GB"):""},{headerName:"Closed",field:"positionClosingDate",minWidth:130,valueFormatter:i=>i.value?new Date(i.value).toLocaleDateString("en-GB"):"",cellRenderer:i=>i.value?new Date(i.value).toLocaleDateString("en-GB"):""},{headerName:"Resume",field:"resumeFile",minWidth:110,sortable:!1,filter:!1,cellRenderer:i=>i.value?'<button data-action="view-resume" class="ag-icon-btn" style="color:#1976d2;font-size:13px;">View</button>
1':"",cellClass:"center-content-cell"}),this.showAiRecruitmentFeatures&&o.push({headerName:"Resume Score",field:"resumeScore",minWidth:150,cellRenderer:i=>this.renderResumeScoreCell(i),cellClass:"center-content-cell"}),o.push({headerName:"Source",field:"source",minWidth:130,tooltipField:"source",cellRenderer:i=>this.truncateCell(i.value)}),n&&o.push({headerName:"Actions",field:"id",minWidth:120,sortable:!1,filter:!1,cellRenderer:i=>this.renderActionsCell(i),cellClass:"center-content-cell"}),this.agColumnDefs=o}truncateCell(t){return t?t.length>25?`${t.slice(0,25)}...`:t:""}renderResumeScoreCell(t){const n=t.data;return n.resumeScore?`<div class="action-row">\n <span>${n.resumeScore}</span>\n <button data-action="view-score" class="ag-icon-btn" title="View Detailed Analysis">\n <span class="material-icons" style="font-size:18px;color:#1976d2;">visibility</span>\n </button>\n </div>`:'<span style="color:#9e9e9e;">N/A</span>'}renderActionsCell(t){const n=t.data,i=this.isAllCompanySelected||"Selected"===n.status||"Rejected"===n.status?"disabled":"";return`<div class="action-row">\n <button data-action="edit" class="ag-icon-btn" title="Edit" ${i}>\n <span class="material-icons" style="font-size:18px;color:#1976d2;">edit</span>\n </button>\n <button data-action="delete" class="ag-icon-btn" title="Delete" ${i}>\n <span class="material-icons" style="font-size:18px;color:#d32f2f;">delete</span>\n </button>\n </div>`}handleCellClick(t){var n;const o=null===(n=t.event)||void 0===n?void 0:n.target,i=null==o?void 0:o.closest("[data-action]");if(!i)return;const s=i.getAttribute("data-action"),d=t.data;switch(s){case"edit":this.editCandidate(d);break;
1case"delete":this.deleteCandidate(d.id);break;case"view-resume":this.viewResume(d.resumeFile);break;case"view-score":this.viewScoringResult(d.id)}}initSocketConnection(){this.scoringProgressService.connect(Ht.c.apiAiSocketUrl),this.socketSubscriptions.add(this.scoringProgressService.progress$.subscribe(n=>{n&&this.handleProgressUpdate(n)})),this.socketSubscriptions.add(this.scoringProgressService.connected$.subscribe(n=>{if(n){const o=this.loggedInUserId||sessionStorage.getItem("loggedInUserId");o&&this.scoringProgressService.subscribeToUser(o)}}))}handleProgressUpdate(t){if(!this.userInitiatedScoring||!this.currentScoringResumeIds.has(String(t.resume_id)))return;const n=this.progressEvents.findIndex(i=>i.scoring_id===t.scoring_id);-1!==n?this.progressEvents[n]=t:this.progressEvents.unshift(t),this.progressEvents.length>0&&this.progressEvents.length>=this.totalItemsToProcess&&this.progressEvents.every(i=>"completed"===i.status||"failed"===i.status||"failed_permanent"===i.status)&&(this.loadCandidates(),setTimeout(()=>this.resetScoringState(),1500))}resetScoringState(){var t;this.isScoringInProgress=!1,this.progressEvents=[],this.totalItemsToProcess=0,this.userInitiatedScoring=!1,this.currentScoringResumeIds.clear(),this.polledCompletedCount=0,null===(t=this.scoringPollSubscription)||void 0===t||t.unsubscribe(),this.scoringPollSubscription=null}startScoringResultPoll(t){var n;null===(n=this.scoringPollSubscription)||void 0===n||n.unsubscribe();const o=new we.Lr({"user-id":this.loggedInUserId?this.loggedInUserId.toString():"","company-id":this.loggedInUserCompanyID?this.loggedInUserCompanyID.toString():"",Authorization:`Bearer ${sessionStorage.getItem("currentToken")||""}`});let d=0;this.scoringPollSubscription=(0,ut.Y)(2e3).subscribe(()=>{d++,this.httpClient.post(Pe.YK.SCORES_BY_CANDIDATES,{candidate_ids:t,jd_id:null},{headers:o}).subscribe({next:u=>{var g;const m=null==u||null===(g=u.data)||void 0===g?void 0:g.candidates,l=new Set((Array.isArray(m)?m:[]).filter(v=>null!=v.score_overall).map(v=>String(v.candidate_id))),f=t.every(v=>l.has(String(v)));var h;this.polledCompletedCount=t.filter(v=>l.has(String(v))).length,(f||d>=150)&&(null===(h=this.scoringPollSubscription)||void 0===h||h.unsubscribe(),this.loadCandidates(),setTimeout(()=>this.resetScoringState(),1200))},error:()=>{var u;d>=150&&(null===(u=this.scoringPollSubscription)||void 0===u||u.unsubscribe(),this.resetScoringState())}})})}get completedCount(){const t=this.progressEvents.filter(n=>"completed"===n.status||"failed"===n.status||"failed_permanent"===n.status).length;return Math.max(t,this.polledCompletedCount)}get progressPercentage(){return 0===this.totalItemsToProcess?0:Math.round(this.completedCount/this.totalItemsToProcess*100)}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName,this.loggedInUserRoleIsMD=this.loggedInUserRoles.some(o=>"MD"===o.displayName),this.loggedInUserRoleIsHOD=this.loggedInUserRoles.some(o=>"HOD"===o.displayName),this.setAgColumnDefs(),this.checkAiRecruitmentPermission()}get isMDOrHOD(){return this.loggedInUserRoles.some(t=>"MD"===t.displayName)||"HOD"===this.loggedInUserRole}onClose(){this.dialogRef.close()}getPmsYearList(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.recruitmentYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.recruitmentYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-")),this.updateIsPastYear(),this.setDefaultMonth(),this.loadCandidates()}onYearChange(t){this.selectedYearForRecruitment=t,this.taskFromDate=null,this.taskToDate=null,this.updateIsPastYear(),this.setDefaultMonth(),this.loadCandidates()}updateIsPastYear(){const{fiscalStartYear:t,fiscalEndYear:n}=(0,O.O)(this.loggedInCompanyFiscalyear);this.isPastYear=this.selectedYearForRecruitment!==`${t}-${n}`}setDefaultMonth(){this.selectedMonthObjects=[...this.arrAllMonths]}viewResume(t){const n=t.split("/").pop()||"",o=encodeURIComponent(n);this.httpClient.get(`${this.config.getRecruitmentFiles}?fileName=${o}`,{responseType:"blob",headers:{Authorization:`Bearer ${sessionStorage.getItem("currentToken")||""}`}}).subscribe({next:s=>{const d=window.URL.createObjectURL(s);window.open(d,"_blank"),setTimeout(()=>window.URL.revokeObjectURL(d),5e3)},error:()=>this.toastr.error("Failed to open file")})}filterCandidates(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}hasSelectedRows(){return this.selectedRowCount>0}addCandidate(){const t=new b.ru;t.disableClose=!0,t.height="70%",t.width="70%",t.panelClass="custom-dialog-container",t.data={},this.dialog.open(fe.q,t).afterClosed().subscribe(o=>{o&&this.loadCandidates()})}editCandidate(t){const n=new b.ru;n.disableClose=!0,n.height="70%",n.width="70%",n.panelClass="custom-dialog-container",n.data={candidateData:{candidate:t}},this.dialog.open(fe.q,n).afterClosed().subscribe(i=>{i&&this.loadCandidates()})}deleteCandidate(t){this.dialog.open(le.$,{disableClose:!0,height:"25%",width:"30%",data:{msg:"Are you sure you want to delete this Candidate?",btn1:"Cancel",btn2:"Yes",btn2BgColor:this.buttonColorName,showSuccessIcon:!1,showSuccessMessage:!1,showCloseIcon:!1}}).afterClosed().subscribe(o=>{if(!o)return;const s=this.recruitmentService.appendChildId(`${this.config.softDeleteCandidateUrl}?id=${t}&deletedBy=${this.loggedInUserId}`);this.httpService.callPutService(s,{}).subscribe({next:()=>{this.dialog.open(le.$,{disableClose:!0,height:"25%",width:"30%",data:{msg:"Candidate has been deleted successfully.",btn1:"Close",btn2:"",btn2BgColor:this.buttonColorName,showSuccessIcon:!0,showSuccessMessage:!1,showCloseIcon:!1}}),this.loadCandidates()},error:d=>{var u;this.dialog.open(le.$,{disableClose:!0,height:"25%",width:"30%",data:{msg:(null===(u=d.error)||void 0===u?void 0:u.message)||"Failed to delete the Candidate.",btn1:"Close",btn2:"",btn2BgColor:this.buttonColorName,showSuccessIcon:!1,showSuccessMessage:!1,showCloseIcon:!1}})}})})}bulkDelete(){var t;const n=(null===(t=this.gridApi)||void 0===t?void 0:t.getSelectedRows())||[];if(!n.length)return;const o=n.map(d=>d.id).join(","),s=this.recruitmentService.appendChildId(`${this.config.softDeleteCandidateByIds}?id=${o}&deletedBy=${this.loggedInUserId}`);this.httpService.callPutService(s,{}).subscribe({next:()=>{this.toastr.success("Selected candidates deleted successfully.","Success",{timeOut:3e3,progressBar:!0}),this.loadCandidates()},error:d=>{var u;this.toastr.error((null==d||null===(u=d.error)||void 0===u?void 0:u.message)||"Bulk delete failed.","Error",{timeOut:3e3,progressBar:!0})}})}downloadCandidates(){if(!this.gridApi)return;const t=this.gridApi.paginationGetCurrentPage(),n=this.gridApi.paginationGetPageSize(),o=t*n,i=o+n,s=[];this.gridApi.forEachNodeAfterFilterAndSort(h=>s.push(h.data));const d=s.slice(o,i);if(!d.length)return void this.toastr.info("No data to download for this page.","Info");const u=d.map(h=>({Name:h.name,Phone:h.phone,Email:h.email,Position:h.positionAppliedFor,"Reason For Job Change":h.reasonForJobChange,"Year of Experience":null!=h.yearOfExperience&&""!==h.yearOfExperience?(0,O.eB)(h.yearOfExperience,2):"","Expected Salary":h.expectedSalary,Skill:h.skills,Education:h.education,"Notice Period":null!=h.noticePeriod&&""!==h.noticePeriod?(0,O.Y1)(h.noticePeriod):"","Applied On":h.applicationDate?new Date(h.applicationDate).toLocaleDateString("en-GB"):"",Closed:h.positionClosingDate?new Date(h.positionClosingDate).toLocaleDateString("en-GB"):"","Resume Score":null!=h.resumeScore&&""!==h.resumeScore?(0,O.eB)(h.resumeScore,2):"",Source:h.source})),m={Sheets:{Candidates:F.utils.json_to_sheet(u)},SheetNames:["Candidates"]},l=F.write(m,{bookType:"xlsx",type:"array"}),f=new Blob([l],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});U.saveAs(f,`Candidate_List_Page_${t+1}.xlsx`)}calculateScore(){var t;const n=(null===(t=this.gridApi)||void 0===t?void 0:t.getSelectedRows())||[];0!==n.length?this.systemSettingsService.getWeights().subscribe({next:o=>{o?this.runCalculateScore(n):this.showSystemSettingsRequiredPopup()},error:()=>this.showSystemSettingsRequiredPopup()}):this.toastr.warning("Please select at least one candidate to calculate score.")}showSystemSettingsRequiredPopup(){this.toastr.warning("Please configure JD Scoring Weights under Setup > System Settings before calculating score.")}runCalculateScore(t){const n={};let o=!1;const i=[];if(t.forEach(g=>{const m=g.positionId,l=g.id,f=g.aiResumeParseId;m&&l&&f&&(n[m]||(n[m]=[]),n[m].push({candidate_id:l,resume_id:f}),o=!0,i.push(g))}),!o)return void this.toastr.warning("Selected candidates are missing Position ID or AI Resume Parse ID.");const s=new we.Lr({"user-id":this.loggedInUserId?this.loggedInUserId.toString():"","company-id":this.loggedInUserCompanyID?this.loggedInUserCompanyID.toString():"",Authorization:`Bearer ${sessionStorage.getItem("currentToken")||""}`});
1this.currentScoringResumeIds.clear(),i.forEach(g=>{g.aiResumeParseId&&this.currentScoringResumeIds.add(String(g.aiResumeParseId))}),this.progressEvents=[],this.totalItemsToProcess=i.length,this.userInitiatedScoring=!0,this.isScoringInProgress=!0;const u=this.recruitmentService.appendChildId(`${Pe.YK.SCORE_BATCH}?company_id=${this.loggedInUserCompanyID}&fiscal_year=${this.selectedYearForRecruitment}`);this.httpClient.post(u,n,{headers:s}).subscribe({next:()=>{var g;this.toastr.success("Batch scoring initiated successfully.","Success"),null===(g=this.gridApi)||void 0===g||g.deselectAll(),this.startScoringResultPoll(i.map(m=>m.id))},error:g=>{var m,l;this.resetScoringState();const f=(null==g||null===(m=g.error)||void 0===m?void 0:m.error)||(null==g||null===(l=g.error)||void 0===l?void 0:l.message)||(null==g?void 0:g.message)||"Failed to initiate batch scoring.";this.toastr.error(f,"Error",{timeOut:4e3})}})}getScoringResult(t){const n=new we.Lr({"user-id":this.loggedInUserId?this.loggedInUserId.toString():"",Authorization:`Bearer ${sessionStorage.getItem("currentToken")||""}`}),o=Pe.YK.GET_RESULT_BY_CANDIDATE(t),i=this.recruitmentService.appendChildId(o);this.httpClient.get(i,{headers:n}).subscribe({next:s=>{const d=Array.isArray(null==s?void 0:s.data)?s.data[0]:null==s?void 0:s.data,u=(null==d?void 0:d.score_overall)||(null==d?void 0:d.score);if(u){const m=this.candidates.find(l=>l.id===t);var g;m&&(m.resumeScore=u,null!==(g=d.score_data)&&void 0!==g&&g.summary&&(m.scoreSummary=d.score_data.summary),this.agRowData=[...this.candidates],this.toastr.success(`Resume score updated to ${m.resumeScore}.`,"Success"))}else this.toastr.info("No scoring result found for this candidate.","Info")},error:s=>{var d;return this.toastr.error((null===(d=s.error)||void 0===d?void 0:d.message)||"Failed to fetch scoring result.","Error")}})}viewScoringResult(t){this.dialog.open(Ft,{width:"80%",height:"90%",data:{candidateId:t}})}fetchMyHodDeptBandPairs(){if("HOD"!==this.loggedInUserRole||!this.intHODempCode)return(0,Be.of)(null);const t=`${this.config.getMyHodDeptBandPairs}?hodEmployeeCode=${encodeURIComponent(this.intHODempCode)}&companyId=${this.loggedInUserCompanyID}`,n=this.recruitmentService.appendChildId(t);return this.httpService.callGetService(n).pipe((0,pt.W)(()=>(0,Be.of)(null)))}loadCandidates(){const t=`${this.config.getCandidateList}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonths.join(",")}`,n=this.recruitmentService.appendChildId(t);(0,ze.p)({candidates:this.httpService.callGetService(n),hodPairs:this.fetchMyHodDeptBandPairs()}).subscribe({next:({candidates:o,hodPairs:i})=>{this.hodDeptBandPairs=new Set((i||[]).map(d=>`${(d.department||"").trim().toUpperCase()}|${(d.band||"").trim().toUpperCase()}`));let s=o.data.filter(d=>!d.isDeleted);["Super Admin","HR Admin"].includes(this.loggedInUserRole)||this.loggedInUserRoleIsMD||(s="HOD"===this.loggedInUserRole?s.filter(d=>{const u=String(d.positionCreatedById)===String(this.loggedInUserId),g="Admin"===d.positionCreatedByUserRole,m=`${(d.department||"").trim().toUpperCase()}|${(d.band||"").trim().toUpperCase()}`,l=this.hodDeptBandPairs.has(m);return(u||l)&&!g}):"Admin"===this.loggedInUserRole?s.filter(d=>{const u=String(d.positionCreatedById)===String(this.loggedInUserId)&&"Admin"===d.positionCreatedByUserRole,g=d.positionAssignedAdmins&&Object.keys(d.positionAssignedAdmins).some(m=>String(m)===String(this.loggedInUserId));return u||g}):[]),this.candidates=s,this.agRowData=[...this.candidates],this.showAiRecruitmentFeatures&&this.fetchResumeScores(this.candidates)},error:()=>{}})}fetchResumeScores(t){if(!this.showAiRecruitmentFeatures||!t||0===t.length)return;const n=t.map(i=>i.id).filter(i=>i);if(0===n.length)return;const o=new we.Lr({"user-id":this.loggedInUserId?this.loggedInUserId.toString():"","company-id":this.loggedInUserCompanyID?this.loggedInUserCompanyID.toString():"",Authorization:`Bearer ${sessionStorage.getItem("currentToken")||""}`});this.httpClient.post(Pe.YK.SCORES_BY_CANDIDATES,{candidate_ids:n,jd_id:null},{headers:o}).subscribe({next:i=>{var s;const d=null==i||null===(s=i.data)||void 0===s?void 0:s.candidates;
1d&&Array.isArray(d)&&(d.forEach(u=>{const g=this.candidates.find(l=>String(l.id)===String(u.candidate_id));var m;g&&(g.resumeScore=u.score_overall,null!==(m=u.score_data)&&void 0!==m&&m.summary&&(g.scoreSummary=u.score_data.summary))}),this.agRowData=[...this.candidates])},error:i=>console.error("Error fetching scores:",i)})}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}clearAllFilters(){this.gridApi&&(this.gridApi.setFilterModel(null),this.gridFilterActive=!1)}get isAnyFilterApplied(){return this.gridFilterActive}onClickImportCandidateList(){this.router.navigate(["/home/hrportal/importFiles",{module:"candidateImport",year:this.loggedInCompanyFiscalyear}])}checkAiRecruitmentPermission(){if(!this.loggedInUserCompanyID)return this.showAiRecruitmentFeatures=!1,void this.setAgColumnDefs();this.accessControlService.getMyModulePermissions(this.loggedInUserCompanyID).subscribe({next:t=>{if(null!=t&&t.success&&Array.isArray(t.data)){const n=t.data.find(o=>{var i;return"recruitment"===(null===(i=o.name)||void 0===i?void 0:i.toLowerCase())});this.showAiRecruitmentFeatures=!!n&&n.isEnabled}else this.showAiRecruitmentFeatures=!1;this.setAgColumnDefs()},error:()=>{this.showAiRecruitmentFeatures=!1,this.setAgColumnDefs()}})}downloadVisibleColumns(){if(!this.gridApi)return;const t=this.gridApi.getAllDisplayedColumns().map(l=>l.getColDef()).filter(l=>l.headerName&&l.field&&"Actions"!==l.headerName&&"select"!==l.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=[];this.gridApi.forEachNodeAfterFilterAndSort(l=>i.push(l.data));const s=i.slice(n*o,(n+1)*o);if(!s.length)return void this.toastr.info("No data to download for this page.","Info");const d=s.map(l=>{const f={};for(const h of t){let v;if("function"==typeof h.valueFormatter)v=h.valueFormatter({value:l[h.field],data:l});else if("function"==typeof h.valueGetter)try{v=h.valueGetter({data:l})}catch{v=l[h.field]}else v=l[h.field];null==v?v="":"object"==typeof v&&(v=Object.values(v).join(", ")),f[h.headerName]=String(v)}return f}),g={Sheets:{Data:F.utils.json_to_sheet(d)},SheetNames:["Data"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Export_Visible_Page_${n+1}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU(C.N),e.rXU(b.bZ),e.rXU($.d),e.rXU(b.CP),e.rXU(De.Ix),e.rXU(q.tw),e.rXU(we.Qq),e.rXU(Jn),e.rXU(yt.$),e.rXU(I.W),e.rXU(Kn.c))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-candidate-listand-status"]],viewQuery:function(t,n){if(1&t&&e.GBs(Zn,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},features:[e.Jv_([K.vh])],decls:32,vars:17,consts:[["columnChooserBtn",""],["class","scoring-loader-overlay",4,"ngIf"],[1,"container"],[1,"justify-between","align-items-center"],["size","6",1,"mt-20","mb-10"],["type","button","class","add_btn fs-14 float-right center-content mr-5",3,"background-color","disabled","opacity","click",4,"ngIf"],[1,"container","mb-20"],[1,"cardBox","mb-20"],[1,"toolbar-row"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],["mat-raised-button","","color","primary",3,"disabled","click",4,"ngIf"],[1,"toolbar-spacer"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"month-multiselect"],[3,"ngModelChange","placeholder","settings","data","ngModel"],["title","Download",1,"icon-action-btn","material-icons",3,"click"],["title","Refresh",1,"icon-action-btn","material-icons",3,"click","animationend"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5",3,"click"],[1,"material-icons"],[1,"grid-wrapper","p-10"],[1,"ag-theme-quartz",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],[1,"scoring-loader-overlay"],[1,"scoring-loader"],[1,"loader-spinner"],[1,"loader-count"],[1,"current"],[1,"separator"],[1,"total"],[1,"loader-text"],[1,"loader-progress-bar"],[1,"loader-progress-fill"],["type","button",1,"add_btn","fs-14","float-right","center-content","mr-5",3,"click","disabled"],[1,"material-icons","fs-20","mr-5"],["mat-raised-button","","color","primary",3,"click","disabled"],[3,"value"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div"),e.DNE(1,eo,14,4,"div",1),e.j41(2,"div",2)(3,"div")(4,"ion-row",3),e.nrm(5,"ion-col",4),e.j41(6,"ion-col",4),e.DNE(7,to,4,5,"button",5),e.k0s()()()()(),e.j41(8,"div",6)(9,"div",7)(10,"div",8)(11,"mat-form-field",9)(12,"mat-icon",10),e.EFF(13,"search"),e.k0s(),e.j41(14,"input",11),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.filterCandidates())}),e.k0s()(),e.DNE(15,no,2,1,"button",12),e.nrm(16,"div",13),e.j41(17,"mat-form-field",9)(18,"mat-select",14),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.selectedYearForRecruitment,s)||(n.selectedYearForRecruitment=s),e.Njj(s)}),e.bIt("selectionChange",function(s){return e.eBV(o),e.Njj(n.onYearChange(s.value))}),e.DNE(19,oo,2,2,"mat-option",15),e.k0s()(),e.j41(20,"div",16)(21,"ng-multiselect-dropdown",17),e.bIt("ngModelChange",function(s){return e.eBV(o),e.Njj(n.onMonthsChange(s))}),e.k0s()(),e.j41(22,"span",18),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(23,"download"),e.k0s(),e.j41(24,"span",19),e.bIt("click",function(){return e.eBV(o),n.resetGrid(),e.Njj(n.isClicked=!0)})("animationend",function(){return e.eBV(o),e.Njj(n.isClicked=!1)}),e.EFF(25,"refresh"),e.k0s(),e.j41(26,"button",20,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(28,"span",21),e.EFF(29,"tune"),e.k0s()()(),e.j41(30,"div",22)(31,"ag-grid-angular",23),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))}),e.k0s()()()()}2&t&&(e.R7$(),e.Y8G("ngIf",n.isScoringInProgress),e.R7$(6),e.Y8G("ngIf",!n.isMDOrHOD),e.R7$(7),e.R50("ngModel",n.searchTerm),e.R7$(),e.Y8G("ngIf",n.hasSelectedRows()&&n.showAiRecruitmentFeatures),e.R7$(3),e.R50("ngModel",n.selectedYearForRecruitment),e.R7$(),e.Y8G("ngForOf",n.recruitmentYears),e.R7$(2),e.Y8G("placeholder","Select Month")("settings",n.monthDropdownSettings)("data",n.arrAllMonths)("ngModel",n.selectedMonthObjects),e.R7$(3),e.AVh("clicked",n.isClicked),e.R7$(2),e.xc7("background-color",n.buttonColorName),e.R7$(5),e.Y8G("rowData",n.agRowData)("columnDefs",n.agColumnDefs)("gridOptions",n.gridOptions))},dependencies:[K.Sq,K.bT,y.me,y.BC,y.vS,J.hU,J.ln,R.rl,R.JW,he.VO,pe.wT,Ke.b,M.fg,x.An,Ae.$z,G.xs],styles:[".month-multiselect{display:inline-block;min-width:180px;vertical-align:middle}.scoring-loader-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#0009;display:flex;align-items:center;justify-content:center;z-index:9999;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.scoring-loader-overlay .scoring-loader{background:#fff;border-radius:16px;padding:32px 48px;display:flex;flex-direction:column;align-items:center;box-shadow:0 8px 32px #0003;min-width:280px}.scoring-loader-overlay .scoring-loader .loader-spinner{width:60px;height:60px;border:4px solid #f3f3f3;border-top:4px solid #3498db;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:20px}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.scoring-loader-overlay .scoring-loader .loader-count{font-size:3rem;font-weight:700;line-height:1;margin-bottom:8px}.scoring-loader-overlay .scoring-loader .loader-count .current{color:#28a745}.scoring-loader-overlay .scoring-loader .loader-count .separator{color:#6c757d;margin:0 4px}.scoring-loader-overlay .scoring-loader .loader-count .total{color:#212529}.scoring-loader-overlay .scoring-loader .loader-text{font-size:1rem;color:#6c757d;margin:0 0 16px}.scoring-loader-overlay .scoring-loader .loader-progress-bar{width:100%;height:6px;background:#e9ecef;border-radius:3px;overflow:hidden}.scoring-loader-overlay .scoring-loader .loader-progress-bar .loader-progress-fill{height:100%;background:linear-gradient(90deg,#007bff,#28a745);border-radius:3px;transition:width .3s ease}.container{--background: #f6f5fb;padding:0 15px}.cardBox{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.mat-height40{height:40px!important}.icon-action-btn{border:1px solid #f3820e;color:#f3820e;padding:9px;border-radius:6px;background-color:#fff;height:40px;width:40px;font-size:22px;
1cursor:pointer}.icon-action-btn.clicked{animation:spin-btn .4s linear}@keyframes spin-btn{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ag-icon-btn{background:none;border:none;cursor:pointer;padding:2px 4px;border-radius:4px;line-height:1;vertical-align:middle}.ag-icon-btn:hover{background-color:#0000000f}.ag-icon-btn:disabled{opacity:.4;cursor:not-allowed}.grid-wrapper{width:100%;overflow-x:auto}.fs-14{font-size:14px}.fs-20{font-size:20px}.mr-5{margin-right:5px}.mr-10{margin-right:10px}.ml-5{margin-left:5px}.ml-10{margin-left:10px}.mt-20{margin-top:20px}.mb-10{margin-bottom:10px}.mb-20{margin-bottom:20px}.p-10{padding:10px}.d-flex{display:flex}.align-center{align-items:center}.justify-content-flex-end{justify-content:flex-end}.center-content{display:flex;align-items:center;justify-content:center}.add_btn{background-color:#031263;color:#fff;border:none;padding:6px 12px;border-radius:5px;cursor:pointer}.add_btn:disabled{opacity:.6;cursor:not-allowed;color:#302b2b}.toolbar-row{display:flex;align-items:center;flex-wrap:nowrap;gap:10px;padding:12px 10px 4px}.toolbar-spacer{flex:1 1 auto}.small-field{min-width:180px}.action-row{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:nowrap;height:100%}::ng-deep .ag-theme-quartz{border:1px solid #e2e8f0;border-radius:8px}::ng-deep .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}::ng-deep .ag-theme-quartz .ag-cell{display:flex!important;align-items:center!important;padding-left:12px!important;padding-right:12px!important;border-right:1px solid #e2e8f0!important}::ng-deep .ag-theme-quartz .ag-cell .ag-cell-value,::ng-deep .ag-theme-quartz .ag-cell .ag-cell-wrapper{display:flex!important;align-items:center!important;height:100%!important;width:100%!important}::ng-deep .ag-theme-quartz .center-content-cell{justify-content:center!important}::ng-deep .ag-theme-quartz .center-content-cell .ag-cell-value,::ng-deep .ag-theme-quartz .center-content-cell .ag-cell-wrapper{justify-content:center!important}::ng-deep .ag-theme-quartz .ag-row{border-bottom:1px solid #e2e8f0!important}\n"],encapsulation:2}),p})();var Et=Y(23294),vt=Y(65245);function ro(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Rating Value is required "),e.k0s())}function so(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Maximum 50 characters allowed "),e.k0s())}function ao(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Rating Label is required "),e.k0s())}function lo(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Maximum 100 characters allowed "),e.k0s())}function co(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Maximum 255 characters allowed "),e.k0s())}let Ot=(()=>{var a;class p{constructor(t,n,o,i,s,d,u,g){this.fb=t,this.encryptionService=n,this.dialogRef=o,this.data=i,this.toastr=s,this.httpService=d,this.config=u,this.recruitmentService=g,this.isEditMode=!1,this.isSubmitting=!1,this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.loggedInCompanyReviewCycle=null,this.positionRequisitionYears=[],this.selectedYearForRecruitment="",this.fromYear="",this.toYear="",this.taskFromDate=null,this.taskToDate=null}ngOnInit(){var t,n;this.initializeSessionData(),this.getPmsYearList(),this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.isEditMode=!(null===(t=this.data)||void 0===t||null===(t=t.ratingDefinition)||void 0===t||!t.id),this.initForm((null===(n=this.data)||void 0===n?void 0:n.ratingDefinition)||{})}initForm(t){this.ratingForm=this.fb.group({ratingValue:[t.ratingValue||"",[y.k0.required,y.k0.maxLength(50)]],label:[t.label||"",[y.k0.required,y.k0.maxLength(100)]],description:[t.description||"",y.k0.maxLength(255)]})}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName}getPmsYearList(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.positionRequisitionYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.positionRequisitionYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-"))}onYearChange(t){this.selectedYearForRecruitment=t,this.taskFromDate=null,this.taskToDate=null}
1onSubmit(){if(this.ratingForm.invalid)return this.ratingForm.markAllAsTouched(),void this.toastr.error("Please fill all required fields.","Validation Error",{timeOut:3e3,progressBar:!0});this.isSubmitting=!0;const t={fiscalYear:this.selectedYearForRecruitment,companyId:this.loggedInUserCompanyID,childId:this.recruitmentService.getChildId(),...this.ratingForm.value,id:this.isEditMode?this.data.ratingDefinition.id:void 0},n=this.isEditMode?`${this.config.updateRatingDefinition}/${t.id}`:this.config.addRatingDefinition;(this.isEditMode?this.httpService.callPutService(n,t):this.httpService.callPostService(n,[t])).subscribe({next:()=>{this.toastr.success(this.isEditMode?"Rating updated successfully":"Rating added successfully","Success",{timeOut:3e3,progressBar:!0}),this.dialogRef.close(!0),this.isSubmitting=!1},error:i=>{var s;console.error("Rating save error:",i),this.toastr.error((null==i||null===(s=i.error)||void 0===s?void 0:s.message)||"Operation failed","Error",{timeOut:3e3,progressBar:!0}),this.isSubmitting=!1}})}cancel(){this.dialogRef.close()}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(y.ok),e.rXU(S.L),e.rXU(b.CP),e.rXU(b.Vh),e.rXU(q.tw),e.rXU(c.k),e.rXU(_.T),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-add-edit-rating-definition"]],decls:43,vars:11,consts:[[1,"form-container"],[1,"cardLayout"],["size","4"],[1,"formLabelSemiBoldfs16","mb-5",2,"margin","10px"],["size","8",1,"text-right"],["src","././assets/icon/close_icon.png","alt","Close","role","button","tabindex","0",1,"cp",3,"mat-dialog-close"],[1,"form-scroll-container",2,"padding","0rem !important"],[3,"ngSubmit","formGroup"],["size","6"],[1,"formLabelRegularfs16","mb-5"],[1,"red-cl"],["appearance","fill",1,"w-100","mat-height40","mat-input-style"],["matInput","","formControlName","ratingValue","placeholder","Enter rating value"],[4,"ngIf"],["matInput","","formControlName","label","placeholder","Enter rating label"],["size","12",1,"mt-10"],[1,"w-100","mat-input-style"],["matInput","","rows","3","formControlName","description","placeholder","Enter description"],["size","12",1,"text-right","mt-10"],["type","button",1,"back_btn","fs-14",3,"click"],["type","submit",1,"add_btn","fs-14","ml-10",3,"disabled"]],template:function(t,n){if(1&t&&(e.j41(0,"div",0)(1,"div",1)(2,"ion-row")(3,"ion-col",2)(4,"div",3),e.EFF(5),e.k0s()(),e.j41(6,"ion-col",4),e.nrm(7,"img",5),e.k0s()(),e.j41(8,"div",6)(9,"form",7),e.bIt("ngSubmit",function(){return n.onSubmit()}),e.j41(10,"ion-grid")(11,"ion-row")(12,"ion-col",8)(13,"label",9),e.EFF(14,"Rating Value"),e.j41(15,"span",10),e.EFF(16," *"),e.k0s()(),e.j41(17,"mat-form-field",11),e.nrm(18,"input",12),e.DNE(19,ro,2,0,"mat-error",13)(20,so,2,0,"mat-error",13),e.k0s()(),e.j41(21,"ion-col",8)(22,"label",9),e.EFF(23,"Rating Label"),e.j41(24,"span",10),e.EFF(25," *"),e.k0s()(),e.j41(26,"mat-form-field",11),e.nrm(27,"input",14),e.DNE(28,ao,2,0,"mat-error",13)(29,lo,2,0,"mat-error",13),e.k0s()()(),e.j41(30,"ion-row")(31,"ion-col",15)(32,"label",9),e.EFF(33,"Description"),e.k0s(),e.j41(34,"mat-form-field",16),e.nrm(35,"textarea",17),e.DNE(36,co,2,0,"mat-error",13),e.k0s()()(),e.j41(37,"ion-row")(38,"ion-col",18)(39,"button",19),e.bIt("click",function(){return n.cancel()}),e.EFF(40,"Cancel"),e.k0s(),e.j41(41,"button",20),e.EFF(42),e.k0s()()()()()()()()),2&t){let o,i,s,d,u;e.R7$(5),e.SpI(" ",n.isEditMode?"Edit Rating Definition":"Add New Rating Definition"," "),e.R7$(4),e.Y8G("formGroup",n.ratingForm),e.R7$(10),e.Y8G("ngIf",null==(o=n.ratingForm.get("ratingValue"))?null:o.hasError("required")),e.R7$(),e.Y8G("ngIf",null==(i=n.ratingForm.get("ratingValue"))?null:i.hasError("maxlength")),e.R7$(8),e.Y8G("ngIf",null==(s=n.ratingForm.get("label"))?null:s.hasError("required")),e.R7$(),e.Y8G("ngIf",null==(d=n.ratingForm.get("label"))?null:d.hasError("maxlength")),e.R7$(7),e.Y8G("ngIf",null==(u=n.ratingForm.get("description"))?null:u.hasError("maxlength")),e.R7$(5),e.xc7("background-color",n.buttonColorName),e.Y8G("disabled",n.isSubmitting),e.R7$(),e.SpI(" ",n.isEditMode?"Update Rating":"Add Rating"," ")}},dependencies:[K.bT,y.qT,y.me,y.BC,y.cb,J.hU,J.lO,J.ln,R.rl,R.TL,y.j4,y.JD,M.fg,b.tx],styles:[".cardLayout[_ngcontent-%COMP%]{padding:20px}.removeIcon[_ngcontent-%COMP%]{height:25px} .mat-mdc-dialog-container .mdc-dialog__surface{border-radius:18px!important}.add_btn.disabled[_ngcontent-%COMP%]{color:#302b2b;cursor:not-allowed;opacity:.6}.form-scroll-container[_ngcontent-%COMP%]{max-height:80vh;overflow-y:auto;padding:1rem}[_nghost-%COMP%] .mat-dialog-container{max-height:90vh;overflow-y:auto}.mb-5[_ngcontent-%COMP%]{margin-bottom:5px}"]}),p})();const uo=["columnChooserBtn"];function po(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",20),e.bIt("click",function(){e.eBV(r);const n=e.XpG(2);return e.Njj(n.bulkDeleteRatings())}),e.j41(1,"span",21),e.EFF(2,"delete"),e.k0s(),e.EFF(3,"Bulk Delete "),e.k0s()}if(2&a){const r=e.XpG(2);e.Y8G("disabled",r.isAllCompanySelected||r.selectedYearForRecruitment!==r.currentFiscalYear)}}
1function go(a,p){if(1&a&&(e.j41(0,"mat-option",22),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG(2);e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}function mo(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",23),e.bIt("click",function(){e.eBV(r);const n=e.XpG(2);return e.Njj(n.addRatingDefinition())}),e.j41(1,"span",21),e.EFF(2,"add"),e.k0s(),e.EFF(3,"Add Rating Definition "),e.k0s()}if(2&a){const r=e.XpG(2);e.xc7("background-color",r.selectedYearForRecruitment===r.currentFiscalYear?r.buttonColorName:null),e.Y8G("disabled",r.isAllCompanySelected||r.selectedYearForRecruitment!==r.currentFiscalYear)}}function ho(a,p){if(1&a){const r=e.RV6();e.j41(0,"ion-row",5)(1,"ion-col",6)(2,"mat-form-field",7)(3,"mat-icon",8),e.EFF(4,"search"),e.k0s(),e.j41(5,"input",9),e.mxI("ngModelChange",function(n){e.eBV(r);const o=e.XpG();return e.DH7(o.searchTerm,n)||(o.searchTerm=n),e.Njj(n)}),e.bIt("input",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.filterRatingDefinitions())}),e.k0s()(),e.DNE(6,po,4,1,"button",10),e.k0s(),e.j41(7,"ion-col",11)(8,"mat-form-field",12)(9,"mat-select",13),e.mxI("ngModelChange",function(n){e.eBV(r);const o=e.XpG();return e.DH7(o.selectedYearForRecruitment,n)||(o.selectedYearForRecruitment=n),e.Njj(n)}),e.bIt("selectionChange",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onYearChange(n.value))}),e.DNE(10,go,2,2,"mat-option",14),e.k0s()(),e.DNE(11,mo,4,3,"button",15),e.j41(12,"span",16),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.downloadVisibleColumns())}),e.EFF(13,"download"),e.k0s(),e.j41(14,"span",17),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.resetGrid())}),e.EFF(15,"refresh"),e.k0s(),e.j41(16,"button",18,0),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.openColumnChooser())}),e.j41(18,"span",19),e.EFF(19,"tune"),e.k0s()()()()}if(2&a){const r=e.XpG();e.R7$(5),e.R50("ngModel",r.searchTerm),e.R7$(),e.Y8G("ngIf",r.hasSelectedRatingRows()&&!r.loggedInUserRoleIsMD&&!r.isPopup),e.R7$(3),e.R50("ngModel",r.selectedYearForRecruitment),e.R7$(),e.Y8G("ngForOf",r.ratingYears),e.R7$(),e.Y8G("ngIf",!r.loggedInUserRoleIsMD),e.R7$(5),e.xc7("background-color",r.buttonColorName)}}let Tt=(()=>{var a;class p{constructor(t,n,o,i,s,d,u,g){this.httpService=t,this.config=n,this.encryptionService=o,this.dataRefreshService=i,this.dialog=s,this.sharedService=d,this.toastr=u,this.recruitmentService=g,this.isPopup=!1,this.ratingDefinitions=[],this.searchTerm="",this.pageSize=10,this.pageSizeOptions=[5,10,25,50,75,100,200,500,1e3],this.currentFiscalYear="",this.rowData=[],this.columnDefs=[],this.selectedRowCount=0,this.gridOptions={context:{componentParent:this},popupParent:document.querySelector("body"),pagination:!0,paginationPageSize:10,suppressCellFocus:!0,paginationPageSizeSelector:[5,10,25,50,75,100,200,500,1e3],rowSelection:"multiple",suppressRowClickSelection:!0,defaultColDef:{sortable:!0,filter:!0,resizable:!0,floatingFilter:!1,flex:1,headerClass:"centered-header"},onSelectionChanged:()=>{this.selectedRowCount=this.gridApi?this.gridApi.getSelectedRows().length:0},postProcessPopup:m=>{var l;if("columnChooser"!==m.type)return;const f=null===(l=this.columnChooserBtn)||void 0===l?void 0:l.nativeElement,h=m.ePopup;if(!f||!h)return;const v=f.getBoundingClientRect();h.style.top=`${v.bottom+window.scrollY+4}px`,h.style.left="auto",h.style.right=document.documentElement.clientWidth-v.right+"px"}},this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.ratingYears=[],this.isAllCompanySelected=!1,this.loggedInUserRoleIsMD=!1}ngOnInit(){this.initSessionData(),this.initColumnDefs(),this.getPMSYearListAndInitialize(),this.dataRefreshService.refreshNeeded$.pipe((0,vt.i)(1)).subscribe(()=>{this.getPMSYearListAndInitialize()}),this.isAllCompanySelected=null===this.recruitmentService.getChildId(),this.recruitmentService.selectedChildId$.subscribe(t=>{this.isAllCompanySelected=null===t})}
1initColumnDefs(){const t=this.loggedInUserRoleIsMD||this.isPopup;this.columnDefs=[{headerName:"select",checkboxSelection:!0,headerCheckboxSelection:!t,width:50,minWidth:50,maxWidth:50,hide:t,pinned:"left",sortable:!1,filter:!1},{field:"ratingValue",headerName:"Rating Value",minWidth:130,tooltipField:"ratingValue"},{field:"label",headerName:"Rating Label",minWidth:180,tooltipField:"label"},{field:"description",headerName:"Description",minWidth:220,flex:2,tooltipField:"description"},{headerName:"Actions",minWidth:120,maxWidth:130,hide:t,sortable:!1,filter:!1,cellRenderer:n=>{var o;const i=null===(o=n.context)||void 0===o?void 0:o.componentParent,d=(null==i?void 0:i.isAllCompanySelected)||(null==i?void 0:i.selectedYearForRecruitment)!==(null==i?void 0:i.currentFiscalYear)?"opacity:0.4;pointer-events:none;":"";return`\n <span class="material-icons" data-action="edit" style="color:#3f51b5;cursor:pointer;margin-right:10px;font-size:20px;vertical-align:middle;${d}" title="Edit">edit</span>\n <span class="material-icons" data-action="delete" style="color:#f44336;cursor:pointer;font-size:20px;vertical-align:middle;${d}" title="Delete">delete</span>\n `},onCellClicked:n=>{var o;const i=n.event.target,s=i.getAttribute("data-action")||(null===(o=i.closest("[data-action]"))||void 0===o?void 0:o.getAttribute("data-action"));"edit"===s&&this.editRatingDefinition(n.data),"delete"===s&&this.deleteRatingDefinition(n.data)}}]}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}onGridReady(t){this.gridApi=t.api}resetGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.deselectAll(),this.gridApi.refreshCells()),this.selectedRowCount=0,this.fetchRatingDefinitions()}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}initSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName,this.loggedInUserRoleIsMD=this.loggedInUserRoles.some(o=>"MD"===o.displayName)}getPMSYearListAndInitialize(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.ratingYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear),d=`${i}-${s}`;this.currentFiscalYear=d,this.setSelectedYear(d)})}setSelectedYear(t){const n=this.ratingYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-"),this.fetchRatingDefinitions())}onYearChange(t){this.taskFromDate=null,this.taskToDate=null,this.setSelectedYear(t)}fetchRatingDefinitions(){const t=this.recruitmentService.appendChildId(`${this.config.getRatingDefinitionData}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}`);this.httpService.callGetService(t).subscribe({next:n=>{this.ratingDefinitions=n.data.filter(o=>!o.isDeleted),this.rowData=[...this.ratingDefinitions]},error:n=>console.error("Error fetching rating definitions:",n)})}filterRatingDefinitions(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}hasSelectedRatingRows(){return this.selectedRowCount>0}bulkDeleteRatings(){const n=(this.gridApi?this.gridApi.getSelectedRows():[]).map(i=>i.id);n&&0!==n.length&&this.dialog.open(le.$,{disableClose:!0,height:"25%",width:"30%",data:{msg:`Are you sure you want to delete ${n.length} selected rating definition(s)?`,btn1:"Cancel",btn2:"Yes",btn2BgColor:this.buttonColorName}}).afterClosed().subscribe(i=>{if(!i)return;const s=n.join(","),d=this.recruitmentService.appendChildId(`${this.config.softBulkDeleteRatingUrl}?id=${s}&deletedBy=${this.loggedInUserId}`),u={deletedBy:this.loggedInUserId,updatedAt:(new Date).toISOString()};this.httpService.callPutService(d,u).subscribe({next:()=>{this.toastr.success("Selected rating definitions deleted successfully.","Success"),this.selectedRowCount=0,this.fetchRatingDefinitions()},error:g=>{var m;this.toastr.error((null==g||null===(m=g.error)||void 0===m?void 0:m.message)||"Failed to delete selected rating definitions.","Error")}})})}deleteRatingDefinition(t){this.dialog.open(le.$,{disableClose:!0,height:"25%",width:"30%",data:{msg:"Are you sure you want to delete this rating definition?",btn1:"Cancel",btn2:"Yes",btn2BgColor:this.buttonColorName,showSuccessIcon:!1,showSuccessMessage:!1,showCloseIcon:!1}}).afterClosed().subscribe(o=>{if(!o)return;const i=this.recruitmentService.appendChildId(`${this.config.softDeleteRatingDefinitionUrl}?id=${t.id}&deletedBy=${this.loggedInUserId}`);this.httpService.callPutService(i,{}).subscribe({next:()=>{this.toastr.success("Rating definition deleted successfully.","Success",{timeOut:3e3,progressBar:!0}),this.fetchRatingDefinitions()},error:s=>{var d;this.toastr.error((null===(d=s.error)||void 0===d?void 0:d.message)||"Failed to delete rating definition.","Error",{timeOut:3e3,progressBar:!0})}})})}addRatingDefinition(){const t=new b.ru;t.disableClose=!0,t.height="70%",t.width="70%",t.panelClass="custom-dialog-container",t.data={},this.dialog.open(Ot,t).afterClosed().subscribe(o=>{o&&this.fetchRatingDefinitions()})}editRatingDefinition(t){const n=new b.ru;n.disableClose=!0,n.height="70%",n.width="70%",n.panelClass="custom-dialog-container",n.data={ratingDefinition:t},this.dialog.open(Ot,n).afterClosed().subscribe(i=>{i&&this.fetchRatingDefinitions()})}downloadRatingDefinitions(){if(!this.gridApi)return;const t=[],n=this.gridApi.paginationGetPageSize(),i=this.gridApi.paginationGetCurrentPage()*n,s=i+n;if(this.gridApi.forEachNodeAfterFilterAndSort((l,f)=>{f>=i&&f<s&&t.push(l.data)}),!t.length)return void this.toastr.info("No data available to download for the current page.","Info");const d=t.map(l=>({"Rating Value":l.ratingValue,"Rating Label":l.label,Description:l.description})),g={Sheets:{"Rating Definitions":F.utils.json_to_sheet(d)},SheetNames:["Rating Definitions"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),"Rating_Definitions.xlsx")}downloadVisibleColumns(){if(!this.gridApi)return;
1const t=this.gridApi.getAllDisplayedColumns().map(l=>l.getColDef()).filter(l=>l.headerName&&l.field&&"Actions"!==l.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=[];this.gridApi.forEachNodeAfterFilterAndSort(l=>i.push(l.data));const s=i.slice(n*o,(n+1)*o);if(!s.length)return void this.toastr.info("No data to download for this page.","Info");const d=s.map(l=>{const f={};for(const h of t){let v;if("function"==typeof h.valueGetter)try{v=h.valueGetter({data:l})}catch{v=l[h.field]}else v=l[h.field];null==v?v="":"object"==typeof v&&(v=Object.values(v).join(", ")),f[h.headerName]=String(v)}return f}),g={Sheets:{Data:F.utils.json_to_sheet(d)},SheetNames:["Data"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Export_Visible_Page_${n+1}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU(C.N),e.rXU(b.bZ),e.rXU($.d),e.rXU(q.tw),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-rating-definition"]],viewQuery:function(t,n){if(1&t&&e.GBs(uo,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},inputs:{isPopup:"isPopup"},decls:5,vars:12,consts:[["columnChooserBtn",""],[1,"mt-20"],["class","filter-bar mb-10",4,"ngIf"],[1,"m-20","setup-grid-wrapper"],[1,"ag-theme-quartz","setup-grid-container",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],[1,"filter-bar","mb-10"],["size","auto",1,"ml-10","mt-20"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],["mat-raised-button","","color","warn","class","ml-10",3,"disabled","click",4,"ngIf"],[1,"d-flex","align-center","justify-content-flex-end","mt-20"],[1,"mat-height40","mat-input-style","small-field","mr-10"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["type","button","class","add_btn fs-14 float-right center-content mr-10",3,"background-color","disabled","click",4,"ngIf"],[1,"icon-download","material-icons","mr-10",3,"click"],[1,"icon-refresh","material-icons","mr-10",3,"click"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5","mr-10",3,"click"],[1,"material-icons"],["mat-raised-button","","color","warn",1,"ml-10",3,"click","disabled"],[1,"material-icons","fs-20","mr-5"],[3,"value"],["type","button",1,"add_btn","fs-14","float-right","center-content","mr-10",3,"click","disabled"]],template:function(t,n){1&t&&(e.j41(0,"div",1)(1,"div"),e.DNE(2,ho,20,7,"ion-row",2),e.j41(3,"div",3)(4,"ag-grid-angular",4),e.bIt("gridReady",function(i){return n.onGridReady(i)})("click",function(i){return n.onFilterIconClick(i)}),e.k0s()()()()),2&t&&(e.AVh("container",!n.isPopup)("mb-20",!n.isPopup),e.R7$(),e.AVh("cardBox",!n.isPopup)("mb-20",!n.isPopup),e.R7$(),e.Y8G("ngIf",!n.isPopup),e.R7$(2),e.Y8G("rowData",n.rowData)("columnDefs",n.columnDefs)("gridOptions",n.gridOptions))},dependencies:[K.Sq,K.bT,y.me,y.BC,y.vS,J.hU,J.ln,R.rl,R.JW,he.VO,pe.wT,M.fg,x.An,Ae.$z,G.xs],styles:['.container[_ngcontent-%COMP%]{--background: #f6f5fb;padding:0 15px}.cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.cardBoxHeading[_ngcontent-%COMP%]{background-color:#ddd;padding:5px;color:#000;border-radius:10px 10px 0 0}.table-container[_ngcontent-%COMP%]{width:100%;overflow-y:auto;overflow-x:auto;max-height:500px}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid #ddd;padding:4px;text-align:left;font-size:14px}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f2f2f2;font-family:OpenSans-SemiBold}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background-color:#fff;font-family:OpenSans-Regular}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .link-primary[_ngcontent-%COMP%]{color:#007bff;text-decoration:underline;cursor:pointer}.mat-height40[_ngcontent-%COMP%]{height:40px!important}.w70px[_ngcontent-%COMP%]{width:70px}.icon-download[_ngcontent-%COMP%], .icon-refresh[_ngcontent-%COMP%]{border:1px solid #f3820e;color:#f3820e;padding:9px;border-radius:6px;background-color:#fff;height:40px;width:40px;font-size:22px;
1cursor:pointer;display:flex;align-items:center;justify-content:center}.setup-grid-wrapper[_ngcontent-%COMP%]{height:auto;border:1px solid #e2e2e2;border-radius:8px;overflow:hidden}.setup-grid-container[_ngcontent-%COMP%]{width:100%;font-family:OpenSans-Regular,sans-serif}[_nghost-%COMP%] .ag-theme-quartz{--ag-header-background-color: #dddddd;--ag-header-foreground-color: #000;--ag-row-hover-color: #f8fafc;--ag-selected-row-background-color: #f1f5f9;--ag-font-size: 13px;--ag-font-family: "OpenSans-Regular", sans-serif;--ag-border-color: #e2e8f0;--ag-row-border-style: solid;--ag-row-border-width: 1px;--ag-row-border-color: #e2e8f0;border:1px solid #e2e8f0;border-radius:8px}[_nghost-%COMP%] .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell{display:flex;align-items:center;justify-content:center;padding-left:12px!important;padding-right:12px!important;border-right:1px solid #e2e8f0!important;border-bottom:1px solid #e2e8f0!important}.cp[_ngcontent-%COMP%]{cursor:pointer;margin-right:8px;color:#333}.header-cell[_ngcontent-%COMP%]{background-color:#ddd!important;font-weight:700!important}']}),p})();function fo(a,p){1&a&&(e.j41(0,"div",15),e.nrm(1,"mat-spinner",16),e.k0s())}function vo(a,p){1&a&&(e.j41(0,"div",17),e.EFF(1,"Here are the interview questions. You can edit them or add new ones."),e.k0s())}function bo(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",24)(1,"span",25),e.EFF(2),e.k0s(),e.j41(3,"mat-form-field",26)(4,"textarea",27),e.mxI("ngModelChange",function(n){const o=e.eBV(r).$implicit;return e.DH7(o.question,n)||(o.question=n),e.Njj(n)}),e.k0s()(),e.j41(5,"mat-form-field",28)(6,"mat-select",29),e.mxI("ngModelChange",function(n){const o=e.eBV(r).$implicit;return e.DH7(o.questionType,n)||(o.questionType=n),e.Njj(n)}),e.j41(7,"mat-option",30),e.EFF(8,"Open Ended"),e.k0s(),e.j41(9,"mat-option",31),e.EFF(10,"Rating Based"),e.k0s()()(),e.j41(11,"button",32),e.bIt("click",function(){const n=e.eBV(r).index,o=e.XpG(2);return e.Njj(o.removeQuestion(n))}),e.j41(12,"mat-icon"),e.EFF(13,"delete"),e.k0s()()()}if(2&a){const r=p.$implicit,t=p.index;e.R7$(2),e.SpI("",t+1,"."),e.R7$(2),e.R50("ngModel",r.question),e.R7$(2),e.R50("ngModel",r.questionType)}}function _o(a,p){1&a&&(e.j41(0,"div",33),e.EFF(1,"No questions available. Please add a question."),e.k0s())}function Co(a,p){if(1&a&&(e.j41(0,"mat-option",42),e.EFF(1),e.k0s()),2&a){const r=p.$implicit;e.Y8G("value",r),e.R7$(),e.JRh(r)}}function yo(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",34)(1,"div",35)(2,"span",36),e.EFF(3,"Sets:"),e.k0s(),e.j41(4,"mat-form-field",37)(5,"mat-select",38),e.mxI("valueChange",function(n){e.eBV(r);const o=e.XpG(2);return e.DH7(o.pageSize,n)||(o.pageSize=n),e.Njj(n)}),e.bIt("selectionChange",function(n){e.eBV(r);const o=e.XpG(2);return e.Njj(o.onPageSizeChange(n.value))}),e.DNE(6,Co,2,2,"mat-option",39),e.k0s()()(),e.j41(7,"button",40),e.bIt("click",function(){e.eBV(r);const n=e.XpG(2);return e.Njj(n.previousPage())}),e.j41(8,"mat-icon"),e.EFF(9,"chevron_left"),e.k0s()(),e.j41(10,"span",41),e.EFF(11),e.k0s(),e.j41(12,"button",40),e.bIt("click",function(){e.eBV(r);const n=e.XpG(2);return e.Njj(n.nextPage())}),e.j41(13,"mat-icon"),e.EFF(14,"chevron_right"),e.k0s()()()}if(2&a){const r=e.XpG(2);e.R7$(5),e.R50("value",r.pageSize),e.R7$(),e.Y8G("ngForOf",r.pageSizeOptions),e.R7$(),e.Y8G("disabled",!r.hasPreviousPage),e.R7$(4),e.SpI(" ",r.paginationText," "),e.R7$(),e.Y8G("disabled",!r.hasNextPage)}}function Io(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",18),e.DNE(1,bo,14,3,"div",19),e.j41(2,"div",20)(3,"button",21),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.addQuestion())}),e.j41(4,"mat-icon"),e.EFF(5,"add"),e.k0s(),e.EFF(6," Add Question "),e.k0s()(),e.DNE(7,_o,2,0,"div",22)(8,yo,15,5,"div",23),e.k0s()}if(2&a){const r=e.XpG();e.R7$(),e.Y8G("ngForOf",r.questions),e.R7$(2),e.Y8G("disabled",!r.canAddQuestion),e.R7$(4),e.Y8G("ngIf",0===r.questions.length),e.R7$(),e.Y8G("ngIf","previous"===r.data.mode&&!r.loading&&r.questions.length>0)}}let So=(()=>{var a;class p{constructor(t,n,o,i,s,d){this.dialogRef=t,this.data=n,this.http=o,this.toastr=i,this.encryptionService=s,this.dialog=d,this.questions=[],this.loading=!1,this.currentPage=1,this.pageSize=1,this.pageSizeOptions=[1,2,3,4,5,6,7,8,9,10],this.totalItems=0,this.totalPages=0,this.hasNextPage=!1,this.hasPreviousPage=!1,this.loggedUserCompanyId="",this.buttonColorName=null}ngOnInit(){const t=sessionStorage.getItem("loggedInUserCompanyID");t&&(this.loggedUserCompanyId=this.encryptionService.decryptData(t)||""),this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.fetchQuestions()}get paginationText(){return 0===this.totalItems?"":`Showing ${(this.currentPage-1)*this.pageSize+1} - ${Math.min(this.currentPage*this.pageSize,this.totalItems)} of ${this.totalItems}`}toTitleCase(t){return t?t.replace(/\w\S*/g,n=>n.charAt(0).toUpperCase()+n.substr(1).toLowerCase()):"Open Ended"}fetchQuestions(){this.loading=!0,console.log("========== fetchQuestions START =========="),console.log("Mode:",this.data.mode),console.log("Data:",this.data);const t=sessionStorage.getItem("currentToken")||sessionStorage.getItem("token")||"";
1console.log("Token exists:",!!t),console.log("Token value:",t);const n=sessionStorage.getItem("loggedInUserId")||"";console.log("userId raw from sessionStorage:",n);const o=sessionStorage.getItem("loggedInUserCompanyID")||"";console.log("encryptedCompanyId raw from sessionStorage:",o),console.log("encryptedCompanyId type:",typeof o),console.log("encryptedCompanyId is empty?",""===o);let i="";if(o)try{const l=this.encryptionService.decryptData(o);console.log("decrypted companyId raw result:",l),console.log("decrypted companyId type:",typeof l),i=l?String(l):"",console.log("companyId after decryption:",i)}catch(l){console.error("decryptData threw an error:",l),i=""}else console.warn("encryptedCompanyId is empty \u2014 skipping decryption");console.log("FINAL companyId to be sent in header:",i),console.log("companyId is empty?",""===i);const s={"user-id":n,Authorization:`Bearer ${t}`};i?(s["company-id"]=i,console.log("company-id ADDED to headers:",i)):console.warn("company-id NOT added to headers because companyId is empty/null/undefined");const d=new we.Lr(s);if(console.log("---------- Final Headers ----------"),console.log("All header keys:",d.keys()),console.log("company-id header value:",d.get("company-id")),console.log("user-id header value:",d.get("user-id")),console.log("Authorization header exists:",!!d.get("Authorization")),console.log("-----------------------------------"),"previous"===this.data.mode){const l=Pe.TE.AI_GENERATED_QUESTIONS_HISTORY,f={positionName:this.data.positionName,page:this.currentPage,pageSize:this.pageSize};return console.log("Mode: PREVIOUS"),console.log("URL:",l),console.log("Payload:",f),console.log("company-id being sent:",d.get("company-id")),void this.http.post(l,f,{headers:d}).subscribe({next:h=>{this.loading=!1,console.log("PREVIOUS questions API response:",h);const k=(Array.isArray(h.data)?h.data:[]).flatMap(B=>B.questions||[]);this.questions=k.map(B=>"string"==typeof B?{question:B,questionType:"Open Ended"}:{...B,questionType:this.toTitleCase(B.type||B.questionType)}),console.log("Mapped questions (previous):",this.questions),h.pagination&&(this.currentPage=h.pagination.page,this.totalItems=h.pagination.total,this.totalPages=h.pagination.totalPages,this.hasNextPage=h.pagination.hasNextPage,this.hasPreviousPage=h.pagination.hasPreviousPage,console.log("Pagination:",h.pagination))},error:h=>{var v,k;this.loading=!1,console.error("Error fetching PREVIOUS questions:",h),console.error("Error status:",null==h?void 0:h.status),console.error("Error body:",null==h?void 0:h.error);const B=(null==h||null===(v=h.error)||void 0===v?void 0:v.error)||(null==h||null===(k=h.error)||void 0===k?void 0:k.message)||(null==h?void 0:h.message)||"Error fetching previous questions";this.toastr.error(B,"Error",{timeOut:4e3})}})}if("generated"===this.data.mode){const l=this.data.candidateId,f=Pe.TE.GET_AI_GENERATED_QUESTIONS(l);return console.log("Mode: GENERATED"),console.log("Candidate ID:",l),console.log("URL:",f),console.log("company-id being sent:",d.get("company-id")),void this.http.get(f,{headers:d}).subscribe({next:h=>{var v;this.loading=!1,console.log("GENERATED questions API response:",h);const k=(null===(v=h.data)||void 0===v?void 0:v.questions)||h.data||[];this.questions=k.map(B=>"string"==typeof B?{question:B,questionType:"Open Ended"}:{...B,questionType:this.toTitleCase(B.type||B.questionType)}),console.log("Mapped questions (generated):",this.questions),console.log("company-id sent was:",i)},error:h=>{var v,k;this.loading=!1,console.error("Error fetching GENERATED questions:",h),console.error("Error status:",null==h?void 0:h.status),console.error("Error body:",null==h?void 0:h.error);const B=(null==h||null===(v=h.error)||void 0===v?void 0:v.error)||(null==h||null===(k=h.error)||void 0===k?void 0:k.message)||(null==h?void 0:h.message)||"Error fetching generated questions";this.toastr.error(B,"Error",{timeOut:4e3})}})}if("ResumeBasedQuestions"===this.data.mode){const l=this.data.candidateId,f=Pe.TE.GET_RESUME_BASED_QUESTIONS(l);return console.log("Mode: RESUME-BASED"),console.log("Candidate ID:",l),console.log("URL:",f),console.log("company-id being sent:",d.get("company-id")),void this.http.get(f,{headers:d}).subscribe({next:h=>{var v;this.loading=!1,console.log("RESUME-BASED questions API response:",h);const k=(null===(v=h.data)||void 0===v?void 0:v.questions)||h.data||[];this.questions=k.map(B=>"string"==typeof B?{question:B,questionType:"Open Ended"}
1:{...B,questionType:this.toTitleCase(B.type||B.questionType)}),console.log("Mapped questions (resume-based):",this.questions)},error:h=>{var v,k;this.loading=!1,console.error("Error fetching RESUME-BASED questions:",h),console.error("Error status:",null==h?void 0:h.status),console.error("Error body:",null==h?void 0:h.error);const B=(null==h||null===(v=h.error)||void 0===v?void 0:v.error)||(null==h||null===(k=h.error)||void 0===k?void 0:k.message)||(null==h?void 0:h.message)||"Error fetching resume-based questions";this.toastr.error(B,"Error",{timeOut:4e3})}})}const u=this.data.candidateId;if(u){const l=Pe.YK.GET_INTERVIEW_QUESTIONS(u);return console.log("Mode: INTERVIEW QUESTIONS"),console.log("Candidate ID:",u),console.log("URL:",l),console.log("company-id being sent:",d.get("company-id")),void this.http.get(l,{headers:d}).subscribe({next:f=>{var h;this.loading=!1,console.log("INTERVIEW questions API response:",f);const v=(null===(h=f.data)||void 0===h?void 0:h.questions)||f.data||[];this.questions=v.map(k=>"string"==typeof k?{question:k,questionType:"Open Ended"}:{...k,questionType:this.toTitleCase(k.type||k.questionType)}),console.log("Mapped questions (interview):",this.questions)},error:f=>{var h,v;this.loading=!1,console.error("Error fetching INTERVIEW questions:",f),console.error("Error status:",null==f?void 0:f.status),console.error("Error body:",null==f?void 0:f.error);const k=(null==f||null===(h=f.error)||void 0===h?void 0:h.error)||(null==f||null===(v=f.error)||void 0===v?void 0:v.message)||(null==f?void 0:f.message)||"Error fetching questions";this.toastr.error(k,"Error",{timeOut:4e3})}})}const g={candidateId:this.data.candidateId,positionId:this.data.positionId},m=`${Pe.A0}/interview/generate-questions`;console.log("Mode: GENERATE QUESTIONS"),console.log("URL:",m),console.log("Payload:",g),console.log("company-id being sent:",d.get("company-id")),this.http.post(m,g,{headers:d}).subscribe({next:l=>{this.loading=!1,console.log("GENERATE questions API response:",l),this.questions=(l.data||[]).map(h=>"string"==typeof h?{question:h,questionType:"Open Ended"}:{...h,questionType:this.toTitleCase(h.type||h.questionType)}),console.log("Mapped questions (generate):",this.questions)},error:l=>{var f,h;this.loading=!1,console.error("Error GENERATING questions:",l),console.error("Error status:",null==l?void 0:l.status),console.error("Error body:",null==l?void 0:l.error);const v=(null==l||null===(f=l.error)||void 0===f?void 0:f.error)||(null==l||null===(h=l.error)||void 0===h?void 0:h.message)||(null==l?void 0:l.message)||"Error generating questions";this.toastr.error(v,"Error",{timeOut:4e3})}})}nextPage(){this.hasNextPage&&(this.currentPage++,this.fetchQuestions())}previousPage(){this.hasPreviousPage&&(this.currentPage--,this.fetchQuestions())}onPageSizeChange(t){this.pageSize=t,this.currentPage=1,this.fetchQuestions()}get canAddQuestion(){return 0===this.questions.length||this.questions.every(t=>t.question&&""!==t.question.trim())}get canSave(){return this.questions.length>0&&this.questions.every(t=>t.question&&""!==t.question.trim())}get hasRealQuestion(){return this.questions.some(t=>t.question&&""!==t.question.trim())}addQuestion(){this.questions.push({question:"",questionType:"Open Ended"})}removeQuestion(t){this.questions.splice(t,1)}saveQuestions(){if(this.data.candidateId){if(("ResumeBasedQuestions"===this.data.mode||"generated"===this.data.mode||"previous"===this.data.mode)&&this.hasRealQuestion)return void this.checkForExistingSavedQuestions(t=>{t?this.showReplaceOrAddDialog():this.performSave(!1)});this.performSave(!1)}}showReplaceOrAddDialog(){this.dialog.open(le.$,{disableClose:!0,width:"35%",data:{msgTitle:"Save Questions",msg:"Do you want to replace the existing saved questions, or add these to the existing ones?",btn1:"Cancel",btn2:"Add to Existing",btn2BgColor:this.buttonColorName,btn3:"Replace Existing",btn3BgColor:this.buttonColorName,showSuccessIcon:!1,showSuccessMessage:!1,showCloseIcon:!1}}).afterClosed().subscribe(n=>{"btn3"===n?this.performSave(!1):!0===n&&this.performSave(!0)})}checkForExistingSavedQuestions(t){this.loading=!0;const n=sessionStorage.getItem("currentToken")||sessionStorage.getItem("token"),o=new we.Lr({"user-id":sessionStorage.getItem("loggedInUserId")||"","company-id":this.loggedUserCompanyId||"",Authorization:`Bearer ${n||""}`}),i=Pe.YK.GET_INTERVIEW_QUESTIONS(this.data.candidateId);this.http.get(i,{headers:o}).subscribe({next:s=>{var d;this.loading=!1;const u=(null===(d=s.data)||void 0===d?void 0:d.questions)||s.data||[];t(Array.isArray(u)&&u.length>0)},error:s=>{this.loading=!1,console.error("Error checking existing saved questions before save:",s),t(!0)}})}normalizeQuestionText(t){return(t||"").toString().trim().toLowerCase()}performSave(t){if(!t)return void this.submitQuestions(this.questions,!1);this.loading=!0;const n=sessionStorage.getItem("currentToken")||sessionStorage.getItem("token"),o=new we.Lr({"user-id":sessionStorage.getItem("loggedInUserId")||"","company-id":this.loggedUserCompanyId||"",Authorization:`Bearer ${n||""}`}),i=Pe.YK.GET_INTERVIEW_QUESTIONS(this.data.candidateId);this.http.get(i,{headers:o}).subscribe({next:s=>{var d;const u=(null===(d=s.data)||void 0===d?void 0:d.questions)||s.data||[],g=new Set(u.map(f=>this.normalizeQuestionText("string"==typeof f?f:f.question))),m=this.questions.filter(f=>!g.has(this.normalizeQuestionText(f.question))),l=this.questions.length-m.length;if(0===m.length)return this.loading=!1,void this.toastr.info("All of these questions are already saved for this candidate.","No New Questions",{timeOut:4e3});l>0&&this.toastr.warning(`Skipped ${l} question(s) already saved for this candidate.`,"Duplicates Skipped",{timeOut:4e3}),this.submitQuestions(m,!0)},error:s=>{console.error("Error checking existing questions before save:",s),this.submitQuestions(this.questions,!0)}})}submitQuestions(t,n){this.loading=!0;const o=Pe.TE.SET_QUESTIONS,i={candidateId:this.data.candidateId,questions:t.map(u=>({question:u.question,questionType:u.questionType}))};n&&(i.appendQuestions=!0),console.log("Payload for saving questions:",i);const s=sessionStorage.getItem("currentToken")||sessionStorage.getItem("token"),d=new we.Lr({"user-id":sessionStorage.getItem("loggedInUserId")||"",Authorization:`Bearer ${s||""}`});this.http.post(o,i,{headers:d}).subscribe({next:u=>{this.loading=!1,this.toastr.success("Interview questions saved successfully."),this.dialogRef.close(!0)},error:u=>{var g;this.loading=!1,console.error("Error saving questions:",u),this.toastr.error((null===(g=u.error)||void 0===g?void 0:g.message)||"Failed to save interview questions.")}})}close(){this.dialogRef.close()}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(b.CP),e.rXU(b.Vh),e.rXU(we.Qq),e.rXU(q.tw),e.rXU(S.L),e.rXU(b.bZ))}
1,a.\u0275cmp=e.VBU({type:a,selectors:[["app-ai-interview-questions-popup"]],decls:20,vars:10,consts:[[1,"modal-header",2,"display","flex","justify-content","space-between","align-items","center","padding-bottom","10px","border-bottom","1px solid #ddd"],[2,"display","flex","align-items","center","gap","10px"],["mat-dialog-title","",2,"margin","0","font-size","18px"],[1,"rating-info-wrapper"],["name","information-circle-outline",2,"font-size","24px","cursor","pointer","color","#666"],[1,"rating-tooltip"],[3,"isPopup"],["mat-icon-button","",3,"click"],[2,"padding-top","20px"],["style","display: flex; justify-content: center; align-items: center; height: 150px;",4,"ngIf"],["style","margin-bottom: 10px; color: #555; font-size: 14px;",4,"ngIf"],["class","questions-list","style","display: flex; flex-direction: column; gap: 10px; margin-top: 10px;",4,"ngIf"],["align","end",2,"padding-top","20px"],["mat-raised-button","","color","primary",2,"margin-right","10px",3,"click","disabled"],["mat-raised-button","","color","accent",3,"click"],[2,"display","flex","justify-content","center","align-items","center","height","150px"],["diameter","40"],[2,"margin-bottom","10px","color","#555","font-size","14px"],[1,"questions-list",2,"display","flex","flex-direction","column","gap","10px","margin-top","10px"],["style","display: flex; align-items: flex-start; gap: 10px;",4,"ngFor","ngForOf"],[2,"text-align","center","margin-top","5px"],["mat-stroked-button","","color","primary",3,"click","disabled"],["style","text-align: center; padding: 20px; color: #666;",4,"ngIf"],["style","display: flex; justify-content: center; align-items: center; gap: 15px; margin-top: 15px; padding-top: 10px; border-top: 1px solid #eee;",4,"ngIf"],[2,"display","flex","align-items","flex-start","gap","10px"],[2,"font-weight","600","margin-top","15px","min-width","20px"],["appearance","outline",2,"flex","2","font-size","14px"],["matInput","","placeholder","Enter question","rows","1",3,"ngModelChange","ngModel"],["appearance","outline","aria-placeholder","Type",2,"flex","1","font-size","14px"],[3,"ngModelChange","ngModel"],["value","Open Ended"],["value","Rating Based"],["mat-icon-button","","color","warn",2,"margin-top","5px",3,"click"],[2,"text-align","center","padding","20px","color","#666"],[2,"display","flex","justify-content","center","align-items","center","gap","15px","margin-top","15px","padding-top","10px","border-top","1px solid #eee"],[2,"display","flex","align-items","center","gap","8px"],[2,"font-size","12px","color","#666"],["appearance","outline",2,"width","75px","font-size","12px"],[3,"valueChange","selectionChange","value"],[3,"value",4,"ngFor","ngForOf"],["mat-icon-button","",3,"click","disabled"],[2,"font-size","14px","color","#666","min-width","120px","text-align","center"],[3,"value"]],template:function(t,n){1&t&&(e.j41(0,"div",0)(1,"div",1)(2,"h2",2),e.EFF(3),e.k0s(),e.j41(4,"div",3),e.nrm(5,"ion-icon",4),e.j41(6,"div",5),e.nrm(7,"app-rating-definition",6),e.k0s()()(),e.j41(8,"button",7),e.bIt("click",function(){return n.close()}),e.j41(9,"mat-icon"),e.EFF(10,"close"),e.k0s()()(),e.j41(11,"mat-dialog-content",8),e.DNE(12,fo,2,0,"div",9)(13,vo,2,0,"div",10)(14,Io,9,4,"div",11),e.k0s(),e.j41(15,"mat-dialog-actions",12)(16,"button",13),e.bIt("click",function(){return n.saveQuestions()}),e.EFF(17,"Save Questions"),e.k0s(),e.j41(18,"button",14),e.bIt("click",function(){return n.close()}),e.EFF(19,"Close"),e.k0s()()),2&t&&(e.R7$(3),e.JRh("previous"===n.data.mode?"Previously Generated AI Interview Questions":"generated"===n.data.mode?"AI Generated Questions":"ResumeBasedQuestions"===n.data.mode?"Resume-Based Questions":"Manage Questions"),e.R7$(4),e.Y8G("isPopup",!0),e.R7$(5),e.Y8G("ngIf",n.loading),e.R7$(),e.Y8G("ngIf",!n.loading&&n.questions.length>0),e.R7$(),e.Y8G("ngIf",!n.loading),e.R7$(2),e.xc7("background-color",n.buttonColorName),e.Y8G("disabled",n.loading),e.R7$(2),e.xc7("background-color",n.buttonColorName))},dependencies:[K.Sq,K.bT,y.me,y.BC,y.vS,J.iq,R.rl,he.VO,pe.wT,M.fg,x.An,b.BI,b.E7,b.Yi,Ae.$z,Ae.iY,nt.LG,Tt],styles:[".questions-list[_ngcontent-%COMP%]{max-height:400px;overflow-y:auto}.mat-icon[_ngcontent-%COMP%]{padding:0!important}.rating-info-wrapper[_ngcontent-%COMP%]{position:relative;margin-left:10px;display:flex;align-items:center}.rating-tooltip[_ngcontent-%COMP%]{display:none;position:absolute;top:100%;left:0;transform:translate(0);width:700px;max-height:400px;overflow-y:auto;overflow-x:auto;background:#fff;border:1px solid #ccc;box-shadow:0 4px 15px #0003;z-index:1000;padding:10px;border-radius:4px}.rating-info-wrapper[_ngcontent-%COMP%]:hover .rating-tooltip[_ngcontent-%COMP%]{display:block}"]}),p})();var gt=Y(25084),Ge=Y(59115);function wo(a,p){1&a&&e.nrm(0,"mat-spinner",41)}function xo(a,p){if(1&a&&(e.j41(0,"mat-option",46),e.EFF(1),e.k0s()),2&a){const r=p.$implicit;e.Y8G("value",r.id),e.R7$(),e.SpI(" ",r.candidateName," ")}}function Ro(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Candidate is required"),e.k0s())}function jo(a,p){if(1&a){const r=e.RV6();e.qex(0),e.j41(1,"mat-form-field",20)(2,"mat-select",42),e.bIt("selectionChange",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onCandidateChange(n.value))})("openedChange",function(n){e.eBV(r);const o=e.sdS(5),i=e.XpG();return e.Njj(i.onSelectOpened(n,o))}),e.j41(3,"div",43),e.bIt("click",function(n){return e.eBV(r),e.Njj(n.stopPropagation())}),e.nrm(4,"input",44,2),e.k0s(),e.DNE(6,xo,2,2,"mat-option",45),e.k0s(),e.DNE(7,Ro,2,0,"mat-error",22),e.k0s(),e.bVm()}if(2&a){let r;const t=e.XpG();
1e.R7$(2),e.Y8G("placeholder",t.candidatesLoading?"Loading candidates...":"Select candidate")("disabled",t.candidatesLoading),e.R7$(2),e.Y8G("formControl",t.candidateSearchCtrl),e.R7$(2),e.Y8G("ngForOf",t.filteredCandidates),e.R7$(),e.Y8G("ngIf",(null==(r=t.scheduleForm.get("candidateId"))?null:r.hasError("required"))&&(null==(r=t.scheduleForm.get("candidateId"))?null:r.touched))}}function Do(a,p){if(1&a&&(e.j41(0,"div",47),e.EFF(1),e.k0s()),2&a){let r;const t=e.XpG();e.R7$(),e.SpI(" ",t.selectedCandidateName||(null==(r=t.scheduleForm.get("candidateName"))?null:r.value)," ")}}function ko(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Position Name is required"),e.k0s())}function Po(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Interview date is required"),e.k0s())}function Fo(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Interview time is required"),e.k0s())}function Mo(a,p){1&a&&(e.j41(0,"div",48),e.EFF(1," Interview date and time must be in the future "),e.k0s())}function Eo(a,p){1&a&&(e.j41(0,"mat-option",49),e.EFF(1,"AI INTERVIEW"),e.k0s())}function Oo(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Interview type is required"),e.k0s())}function To(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Meeting Link is required"),e.k0s())}function Ao(a,p){if(1&a&&(e.j41(0,"ion-row")(1,"ion-col",50)(2,"label",16),e.EFF(3," ONLINE Meeting Link "),e.j41(4,"span",17),e.EFF(5,"*"),e.k0s()(),e.j41(6,"mat-form-field",20),e.nrm(7,"input",51),e.DNE(8,To,2,0,"mat-error",22),e.k0s()()()),2&a){let r;const t=e.XpG();e.R7$(8),e.Y8G("ngIf",(null==(r=t.scheduleForm.get("meetingLink"))?null:r.hasError("required"))&&(null==(r=t.scheduleForm.get("meetingLink"))?null:r.touched))}}function No(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Please enter a whole number (no decimals)."),e.k0s())}function $o(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Maximum allowed is 60 minutes."),e.k0s())}function Uo(a,p){if(1&a){const r=e.RV6();e.j41(0,"ion-row")(1,"ion-col",50)(2,"div",52)(3,"button",53),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.openAiQuestionsPopup("manage"))}),e.EFF(4,"Manage Questions"),e.k0s(),e.j41(5,"button",54),e.EFF(6," AI Questions "),e.j41(7,"span",55),e.EFF(8,"keyboard_arrow_down"),e.k0s()(),e.j41(9,"mat-menu",null,3)(11,"button",56),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.openAiQuestionsPopup("generated"))}),e.EFF(12,"Based On JD "),e.k0s(),e.j41(13,"button",56),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.openAiQuestionsPopup("previous"))}),e.EFF(14,"Previously Generated Based on JD"),e.k0s(),e.j41(15,"button",56),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.openAiQuestionsPopup("ResumeBasedQuestions"))}),e.EFF(16,"Based On Resume"),e.k0s()()()(),e.j41(17,"ion-col",50)(18,"ion-row")(19,"ion-col",23)(20,"label",16),e.EFF(21," Interview Minutes "),e.j41(22,"span",17),e.EFF(23,"*"),e.k0s()(),e.j41(24,"mat-form-field",20),e.nrm(25,"input",57),e.DNE(26,No,2,0,"mat-error",22)(27,$o,2,0,"mat-error",22),e.k0s()(),e.j41(28,"ion-col",58),e.EFF(29),e.k0s()()()()}if(2&a){let r,t;const n=e.sdS(10),o=e.XpG();e.R7$(5),e.Y8G("matMenuTriggerFor",n),e.R7$(21),e.Y8G("ngIf",null==(r=o.scheduleForm.get("aiInterviewMinutes"))||null==r.errors?null:r.errors.pattern),e.R7$(),e.Y8G("ngIf",null==(t=o.scheduleForm.get("aiInterviewMinutes"))||null==t.errors?null:t.errors.max),e.R7$(2),e.SpI("Available Minutes: ",o.remainingMinutes,"")}}function Bo(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Meeting Location is required"),e.k0s())}function Go(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Meeting Location cannot exceed 255 characters"),e.k0s())}function Yo(a,p){if(1&a&&(e.j41(0,"ion-row")(1,"ion-col",50)(2,"label",16),e.EFF(3," Meeting Location "),e.j41(4,"span",17),e.EFF(5,"*"),e.k0s()(),e.j41(6,"mat-form-field",59),e.nrm(7,"textarea",60),e.DNE(8,Bo,2,0,"mat-error",22)(9,Go,2,0,"mat-error",22),e.k0s()()()),2&a){let r,t;const n=e.XpG();e.R7$(8),e.Y8G("ngIf",(null==(r=n.scheduleForm.get("meetingLocation"))?null:r.hasError("required"))&&(null==(r=n.scheduleForm.get("meetingLocation"))?null:r.touched)),e.R7$(),e.Y8G("ngIf",(null==(t=n.scheduleForm.get("meetingLocation"))?null:t.hasError("maxlength"))&&(null==(t=n.scheduleForm.get("meetingLocation"))?null:t.touched))}}function Lo(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Round type is required."),e.k0s())}function zo(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Round type must be at least 1."),e.k0s())}function Vo(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Round type cannot exceed 15."),e.k0s())}function Xo(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Application Source is required"),e.k0s())}function Ho(a,p){if(1&a&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&a){let r;const t=e.XpG(3);e.R7$(),e.SpI("Invalid: ",null==(r=t.scheduleForm.get("externalPanelMembers"))?null:r.getError("invalidEmailList").invalid.join(", "),"")}}
1function Wo(a,p){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1," Please enter valid email IDs separated by semicolons. "),e.DNE(2,Ho,2,1,"span",22),e.k0s()),2&a){let r;const t=e.XpG(2);e.R7$(2),e.Y8G("ngIf",null==(r=t.scheduleForm.get("externalPanelMembers"))||null==(r=r.getError("invalidEmailList"))||null==r.invalid?null:r.invalid.length)}}function Qo(a,p){if(1&a&&(e.j41(0,"ion-row")(1,"ion-col",50)(2,"label",16),e.EFF(3,"External Panel Members"),e.k0s(),e.j41(4,"mat-form-field",61),e.nrm(5,"input",62),e.DNE(6,Wo,3,1,"mat-error",22),e.k0s()()()),2&a){let r;const t=e.XpG();e.R7$(6),e.Y8G("ngIf",null==(r=t.scheduleForm.get("externalPanelMembers"))?null:r.hasError("invalidEmailList"))}}function qo(a,p){1&a&&e.nrm(0,"mat-spinner",41)}function Jo(a,p){if(1&a&&(e.j41(0,"mat-option",46),e.EFF(1),e.k0s()),2&a){const r=p.$implicit;e.Y8G("value",r),e.R7$(),e.SpI(" ",r.name," ")}}function Ko(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Lead Interviewer is required"),e.k0s())}function Zo(a,p){if(1&a){const r=e.RV6();e.j41(0,"ion-col",23)(1,"label",16),e.EFF(2,"Lead Interviewer "),e.j41(3,"span",63),e.EFF(4,"*"),e.k0s(),e.DNE(5,qo,1,0,"mat-spinner",18),e.k0s(),e.j41(6,"mat-form-field",20)(7,"mat-select",64),e.bIt("openedChange",function(n){e.eBV(r);const o=e.sdS(10),i=e.XpG();return e.Njj(i.onSelectOpened(n,o))}),e.j41(8,"div",43),e.bIt("click",function(n){return e.eBV(r),e.Njj(n.stopPropagation())}),e.nrm(9,"input",65,4),e.k0s(),e.DNE(11,Jo,2,2,"mat-option",45),e.k0s(),e.DNE(12,Ko,2,0,"mat-error",22),e.k0s()()}if(2&a){let r;const t=e.XpG();e.R7$(5),e.Y8G("ngIf",t.interviewersLoading),e.R7$(2),e.Y8G("placeholder",t.interviewersLoading?"Loading interviewers...":"Lead Interviewer")("disabled",t.interviewersLoading)("compareWith",t.compareById)("disableOptionCentering",!0),e.R7$(2),e.Y8G("formControl",t.leadInterviewerSearchCtrl),e.R7$(2),e.Y8G("ngForOf",t.filteredLeadInterviewerList),e.R7$(),e.Y8G("ngIf",(null==(r=t.scheduleForm.get("leadInterviewer"))?null:r.hasError("required"))&&(null==(r=t.scheduleForm.get("leadInterviewer"))?null:r.touched))}}function ei(a,p){1&a&&e.nrm(0,"mat-spinner",41)}function ti(a,p){if(1&a&&(e.j41(0,"mat-option",46),e.EFF(1),e.k0s()),2&a){const r=p.$implicit;e.Y8G("value",r),e.R7$(),e.SpI(" ",r.name," ")}}function ni(a,p){if(1&a){const r=e.RV6();e.j41(0,"ion-col",23)(1,"label",16),e.EFF(2,"Panel Members "),e.DNE(3,ei,1,0,"mat-spinner",18),e.k0s(),e.j41(4,"mat-form-field",20)(5,"mat-select",66),e.bIt("openedChange",function(n){e.eBV(r);const o=e.sdS(8),i=e.XpG();return e.Njj(i.onSelectOpened(n,o))}),e.j41(6,"div",43),e.bIt("click",function(n){return e.eBV(r),e.Njj(n.stopPropagation())}),e.nrm(7,"input",67,5),e.k0s(),e.DNE(9,ti,2,2,"mat-option",45),e.k0s()()()}if(2&a){const r=e.XpG();e.R7$(3),e.Y8G("ngIf",r.interviewersLoading),e.R7$(2),e.Y8G("placeholder",r.interviewersLoading?"Loading interviewers...":"Select Panel Members")("disabled",r.interviewersLoading)("compareWith",r.comparePanel),e.R7$(2),e.Y8G("formControl",r.panelMembersSearchCtrl),e.R7$(2),e.Y8G("ngForOf",r.filteredPanelList)}}function oi(a,p){if(1&a&&(e.j41(0,"div",79),e.EFF(1),e.k0s()),2&a){let r;const t=e.XpG(3);e.R7$(),e.SpI("Carried over from Round ",(null==(r=t.scheduleForm.get("roundType"))?null:r.value)-1||"previous","")}}function ii(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",80)(1,"span",81),e.EFF(2),e.k0s(),e.j41(3,"div",82)(4,"span",83),e.EFF(5),e.k0s(),e.j41(6,"span",84),e.EFF(7),e.nI1(8,"number"),e.k0s()(),e.j41(9,"button",85),e.bIt("click",function(){const n=e.eBV(r).$implicit,o=e.XpG(3);return e.Njj(o.removeCarriedScreeningDoc(n))}),e.j41(10,"span",86),e.EFF(11,"close"),e.k0s()()()}if(2&a){const r=p.$implicit,t=e.XpG(3);e.R7$(2),e.JRh(t.getScreeningDocExtension(r.originalFileName||"")),e.R7$(2),e.Y8G("title",r.originalFileName),e.R7$(),e.JRh(r.originalFileName),e.R7$(2),e.SpI("",e.i5U(8,4,r.fileSize/1024,"1.0-0")," KB")}}function ri(a,p){if(1&a&&(e.j41(0,"div",76),e.DNE(1,oi,2,1,"div",77)(2,ii,12,7,"div",78),e.k0s()),2&a){const r=e.XpG(2);e.R7$(),e.Y8G("ngIf",r.isNextRound),e.R7$(),e.Y8G("ngForOf",r.carriedScreeningDocs)}}function si(a,p){1&a&&(e.j41(0,"div",79),e.EFF(1,"Newly added"),e.k0s())}
1function ai(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",80)(1,"span",81),e.EFF(2),e.k0s(),e.j41(3,"div",82)(4,"span",83),e.EFF(5),e.k0s(),e.j41(6,"span",84),e.EFF(7),e.nI1(8,"number"),e.k0s()(),e.j41(9,"button",85),e.bIt("click",function(){const n=e.eBV(r).index,o=e.XpG(3);return e.Njj(o.removeSelectedScreeningDoc(n))}),e.j41(10,"span",86),e.EFF(11,"close"),e.k0s()()()}if(2&a){const r=p.$implicit,t=e.XpG(3);e.R7$(2),e.JRh(t.getScreeningDocExtension(r.name)),e.R7$(2),e.Y8G("title",r.name),e.R7$(),e.JRh(r.name),e.R7$(2),e.SpI("",e.i5U(8,4,r.size/1024,"1.0-0")," KB")}}function li(a,p){if(1&a&&(e.j41(0,"div",76),e.DNE(1,si,2,0,"div",77)(2,ai,12,7,"div",78),e.k0s()),2&a){const r=e.XpG(2);e.R7$(),e.Y8G("ngIf",r.carriedScreeningDocs.length),e.R7$(),e.Y8G("ngForOf",r.selectedScreeningDocs)}}function di(a,p){if(1&a&&(e.j41(0,"div",87)(1,"span"),e.EFF(2),e.k0s(),e.j41(3,"div",88)(4,"span"),e.EFF(5),e.nI1(6,"number"),e.k0s(),e.j41(7,"div",89),e.nrm(8,"div",90),e.k0s()()()),2&a){const r=e.XpG(2);e.R7$(2),e.Lme("",r.screeningDocsAttachedCount," file",r.screeningDocsAttachedCount>1?"s":""," attached"),e.R7$(3),e.SpI("",e.i5U(6,5,r.screeningDocsTotalSizeBytes/1024/1024,"1.1-1")," / 10 MB used"),e.R7$(3),e.xc7("width",r.screeningDocsCapPercent,"%")}}function ci(a,p){if(1&a){const r=e.RV6();e.j41(0,"ion-row")(1,"ion-col",50)(2,"label",16),e.EFF(3,"Screening Documents"),e.k0s(),e.j41(4,"input",68,6),e.bIt("change",function(n){e.eBV(r);const o=e.sdS(5);return e.XpG().onScreeningDocsSelected(n),e.Njj(o.value="")}),e.k0s(),e.j41(6,"div",69),e.bIt("click",function(){e.eBV(r);const n=e.sdS(5);return e.Njj(n.click())})("dragover",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onScreeningDropzoneDragOver(n))})("dragleave",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onScreeningDropzoneDragLeave(n))})("drop",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onScreeningDropzoneDrop(n))}),e.j41(7,"span",70),e.EFF(8,"upload_file"),e.k0s(),e.j41(9,"div",71),e.EFF(10,"Drag files here, or "),e.j41(11,"span",72),e.EFF(12,"browse"),e.k0s()(),e.j41(13,"div",73),e.EFF(14,"PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX \u2014 up to 10MB total"),e.k0s()(),e.DNE(15,ri,3,2,"div",74)(16,li,3,2,"div",74)(17,di,9,8,"div",75),e.k0s()()}if(2&a){const r=e.XpG();e.R7$(6),e.AVh("dragover",r.isScreeningDropzoneActive),e.R7$(9),e.Y8G("ngIf",r.carriedScreeningDocs.length),e.R7$(),e.Y8G("ngIf",r.selectedScreeningDocs.length),e.R7$(),e.Y8G("ngIf",r.screeningDocsAttachedCount)}}function ui(a,p){1&a&&e.nrm(0,"mat-spinner",91)}let Rt=(()=>{var a;class p{get arrAllMonths(){return"Apr_Mar"===this.loggedInCompanyFiscalyear?[...this.months.slice(3),...this.months.slice(0,3)]:this.months}constructor(t,n,o,i,s,d,u,g,m,l,f){this.fb=t,this.dialogRef=n,this.data=o,this.encryptionService=i,this.httpService=s,this.config=d,this.http=u,this.toastr=g,this.dialog=m,this.accessControlService=l,this.recruitmentService=f,this.isEditMode=!1,this.isSubmitting=!1,this.candidates=[],this.filteredCandidates=[],this.panelList=[],this.roundTypes=[],this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.loggedInCompanyReviewCycle=null,this.positionRequisitionYears=[],this.selectedYearForRecruitment="",this.fromYear="",this.toYear="",this.taskFromDate=null,this.taskToDate=null,this.selectedMonth="",this.isCandidateReadOnly=!1,this.isNextRound=!1,this.previousInterviewId=null,this.minInterviewDate=new Date,this.selectedAiQuestions=[],this.interviewQuestions=[],this.isLoadingQuestions=!1,this.candidatesLoading=!1,this.interviewersLoading=!1,this.showAiRecruitmentFeatures=!1,this.aiQuestionsDialogRef=null,this._onDestroy=new Z.B,this.candidateSearchCtrl=new y.MJ(""),this.panelMembersSearchCtrl=new y.MJ(""),this.leadInterviewerSearchCtrl=new y.MJ(""),this.filteredPanelList=[],this.filteredLeadInterviewerList=[],this.pendingPanelIds=[],this.pendingLeadIds=[],this.remainingMinutes=0,this.months=[{key:"01",name:"January"},{key:"02",name:"February"},{key:"03",name:"March"},{key:"04",name:"April"},{key:"05",name:"May"},{key:"06",name:"June"},{key:"07",name:"July"},{key:"08",name:"August"},{key:"09",name:"September"},{key:"10",name:"October"},{key:"11",name:"November"},{key:"12",name:"December"}],this.selectedCandidateName="",this.leadInterviewer="",this.compareById=(h,v)=>(null==h?void 0:h.id)===(null==v?void 0:v.id),this.selectedScreeningDocs=[],this.isScreeningDropzoneActive=!1,this.carriedScreeningDocs=[],this.excludedScreeningDocIds=[],this.comparePanel=(h,v)=>h&&v&&h.id===v.id}ngOnInit(){var t,n;if(this.roundTypes=this.generateRoundTypes(15),this.initializeSessionData(),this.getPmsYearList(),this.initializeForm(),this.loadDropdownData(),this.checkAiRecruitmentPermission(),this.filterCandidates(),this.setupInterviewerSearch(),null!==(t=this.data)&&void 0!==t&&null!==(t=t.interview)&&void 0!==t&&t.id)this.isEditMode=!0,this.patchForm(this.data.interview);else if(null!==(n=this.data)&&void 0!==n&&n.interview){var o;this.isEditMode=!1,this.isCandidateReadOnly=!0,this.isNextRound=!0,this.previousInterviewId=null!==(o=this.data.interview.previousInterviewId)&&void 0!==o?o:null,this.carriedScreeningDocs=Array.isArray(this.data.interview.screeningDocs)?[...this.data.interview.screeningDocs]:[],this.patchForm(this.data.interview)}else this.isEditMode=!1,this.isNextRound=!1,this.scheduleForm.patchValue({roundType:1})}getRemainingMinutes(t,n){this.accessControlService.getRemainingMinutes(t,n).subscribe({next:o=>{o.success&&(this.remainingMinutes=o.remainingMinutes,this.remainingMinutes<=0&&this.toastr.warning("Your AI interview minutes have been exhausted. Please contact your admin for more details."))},error:o=>{this.remainingMinutes<=0&&this.toastr.warning("Your AI interview minutes have been exhausted. Please contact your admin for more details.")}})}generateRoundTypes(t){return Array.from({length:t},(n,o)=>o+1)}ngOnDestroy(){this._onDestroy.next(),this._onDestroy.complete()}initializeForm(){var t,n,o,i,s;this.scheduleForm=this.fb.group({id:[null],positionName:[""],experience:[""],interviewDate:[null,y.k0.required],interviewTime:[null,y.k0.required],interviewType:["",y.k0.required],aiInterviewMinutes:[{value:"",disabled:!0}
1,[y.k0.min(1),y.k0.max(60),y.k0.pattern("^[0-9]*$")]],meetingLink:[""],meetingLocation:["",y.k0.maxLength(255)],roundType:[null,[y.k0.required,y.k0.min(1),y.k0.max(15)]],panelMembers:[[]],leadInterviewer:[[]],source:[""],candidateId:[null,y.k0.required],candidateName:["",y.k0.required],email:["",[y.k0.required,y.k0.email]],phone:[null,y.k0.required],department:["",y.k0.required],band:["",y.k0.required],finalStatus:[""],hods:[{}],interviewCreatedById:[null],interviewCreatedByName:[""],interviewCreatedByUserRole:[""],positionId:[null],positionCreatedById:[null],positionCreatedByName:[""],positionCreatedByUserRole:[""],externalPanelMembers:["",[this.emailListValidator()]]},{validators:[this.futureDateTimeValidator()]}),null===(t=this.scheduleForm.get("interviewType"))||void 0===t||t.valueChanges.subscribe(d=>{this.toggleLocationOrLink(d)}),this.toggleLocationOrLink(null===(n=this.scheduleForm.get("interviewType"))||void 0===n?void 0:n.value),null===(o=this.scheduleForm.get("interviewDate"))||void 0===o||o.valueChanges.subscribe(()=>{this.scheduleForm.updateValueAndValidity()}),null===(i=this.scheduleForm.get("interviewTime"))||void 0===i||i.valueChanges.subscribe(()=>{this.scheduleForm.updateValueAndValidity()}),null===(s=this.scheduleForm.get("candidateId"))||void 0===s||s.valueChanges.pipe((0,Et.F)()).subscribe(d=>{if(d){var u,g,m,l,f;const h=(null===(u=this.scheduleForm.get("candidateName"))||void 0===u?void 0:u.value)||"",v=d,k=null===(g=this.scheduleForm.get("id"))||void 0===g?void 0:g.value;this.scheduleForm.reset({id:k,candidateId:v,candidateName:h}),this.scheduleForm.patchValue({roundType:1,interviewType:"",panelMembers:[],leadInterviewer:[]}),null===(m=this.scheduleForm.get("panelMembers"))||void 0===m||m.enable(),null===(l=this.scheduleForm.get("leadInterviewer"))||void 0===l||l.enable();const B=null===(f=this.scheduleForm.get("interviewType"))||void 0===f?void 0:f.value;B&&this.toggleLocationOrLink(B)}})}atLeastOnePanelOrLeadRequired(){return t=>{var n,o,i,s;if("AI"===(null===(n=t.get("interviewType"))||void 0===n?void 0:n.value))return null;const u=null===(o=t.get("panelMembers"))||void 0===o?void 0:o.value,g=null===(i=t.get("leadInterviewer"))||void 0===i?void 0:i.value,m=null===(s=t.get("externalPanelMembers"))||void 0===s?void 0:s.value,l=Array.isArray(u)&&u.length>0,f=Array.isArray(g)&&g.length>0,h=this.parseEmailList(m),v=h.length>0&&h.every(k=>this.isValidEmail(k));return l||f||v?null:{atLeastOneRequired:!0}}}openNativeTimePicker(t){var n;const o=t.target;null===(n=o.showPicker)||void 0===n||n.call(o)}nonEmptyArrayValidator(){return t=>{const n=t.value;return Array.isArray(n)&&n.length>0?null:{required:!0}}}toggleLocationOrLink(t){const n=this.scheduleForm.get("meetingLink"),o=this.scheduleForm.get("meetingLocation"),i=this.scheduleForm.get("externalPanelMembers"),s=this.scheduleForm.get("aiInterviewMinutes"),d=this.scheduleForm.get("leadInterviewer");"ONLINE"===t?(null==n||n.setValidators([y.k0.required]),null==n||n.enable(),null==o||o.clearValidators(),null==o||o.setValue(""),null==o||o.disable(),null==s||s.clearValidators(),null==s||s.setValue(""),null==s||s.disable(),null==d||d.setValidators([this.nonEmptyArrayValidator()])):"OFFLINE"===t?(null==o||o.setValidators([y.k0.required,y.k0.maxLength(255)]),null==o||o.enable(),null==n||n.clearValidators(),null==n||n.setValue(""),null==n||n.disable(),null==s||s.clearValidators(),null==s||s.setValue(""),null==s||s.disable(),null==d||d.setValidators([this.nonEmptyArrayValidator()])):"AI"===t?(null==n||n.clearValidators(),null==n||n.setValue(""),null==n||n.disable(),null==o||o.clearValidators(),null==o||o.setValue(""),null==o||o.disable(),null==i||i.setValue(""),null==s||s.setValidators([y.k0.required,y.k0.min(1),y.k0.max(60),y.k0.pattern("^[0-9]*$")]),null==s||s.enable(),null==d||d.clearValidators()):(null==n||n.clearValidators(),null==n||n.setValue(""),null==n||n.disable(),null==o||o.clearValidators(),null==o||o.setValue(""),null==o||o.disable(),null==s||s.clearValidators(),null==s||s.setValue(""),null==s||s.disable(),null==d||d.clearValidators()),null==n||n.updateV
1alueAndValidity(),null==o||o.updateValueAndValidity(),null==i||i.updateValueAndValidity(),null==s||s.updateValueAndValidity(),null==d||d.updateValueAndValidity()}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName,this.userName=sessionStorage.getItem("loggedInUserName")}getPmsYearList(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.positionRequisitionYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`),this.setDefaultMonth()})}setSelectedYear(t){const n=this.positionRequisitionYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-"))}onYearChange(t){this.selectedYearForRecruitment=t,this.taskFromDate=null,this.taskToDate=null,this.setDefaultMonth()}setDefaultMonth(){const t=(new Date).toISOString().slice(5,7),n=this.arrAllMonths.find(o=>o.key===t);this.selectedMonth=n?n.key:this.arrAllMonths[0].key}onMonthChange(t){this.selectedMonth=t.value}loadAllInterviewers(){const n=this.recruitmentService.appendChildId(`${this.config.getRecruitmentEmployeeDetails}?companyId=${this.loggedInUserCompanyID}`);this.interviewersLoading=!0,this.httpService.callGetService(n).subscribe({next:o=>{const s=((null==o?void 0:o.data)||[]).map(d=>({id:+d.employee_id,name:d.fullName})).sort((d,u)=>d.name.localeCompare(u.name));this.panelList=s,this.leadInterviewerList=s,this.filteredPanelList=[...s],this.filteredLeadInterviewerList=[...s],(this.pendingPanelIds.length||this.pendingLeadIds.length)&&this.applyPendingSelections(),this.interviewersLoading=!1},error:()=>{this.interviewersLoading=!1}})}applyPendingSelections(){const t=this.pendingPanelIds.map(o=>this.panelList.find(i=>i.id===o)).filter(Boolean),n=this.pendingLeadIds.map(o=>this.leadInterviewerList.find(i=>i.id===o)).filter(Boolean);this.scheduleForm.patchValue({panelMembers:t,leadInterviewer:n}),this.pendingPanelIds=[],this.pendingLeadIds=[]}setupInterviewerSearch(){this.panelMembersSearchCtrl.valueChanges.pipe((0,L.Q)(this._onDestroy),(0,Q.B)(200)).subscribe(t=>{const n=(t||"").toLowerCase();this.filteredPanelList=this.panelList.filter(o=>o.name.toLowerCase().includes(n))}),this.leadInterviewerSearchCtrl.valueChanges.pipe((0,L.Q)(this._onDestroy),(0,Q.B)(200)).subscribe(t=>{const n=(t||"").toLowerCase();this.filteredLeadInterviewerList=this.leadInterviewerList.filter(o=>o.name.toLowerCase().includes(n))})}loadDropdownData(){const n=this.recruitmentService.appendChildId(`${this.config.getCandiDetails}?companyId=${this.loggedInUserCompanyID}`);this.loadAllInterviewers(),this.candidatesLoading=!0,this.httpService.callGetService(n).subscribe({next:o=>{this.candidates=(o.data||[]).filter(i=>!i.isDeleted).filter(i=>{if("Admin"===this.loggedInUserRole){const s=String(i.positionCreatedById)===String(this.loggedInUserId),d=i.positionAssignedAdmins&&Object.keys(i.positionAssignedAdmins).some(u=>String(u)===String(this.loggedInUserId));return s||d}return!0}).map(i=>({id:+i.id,candidateName:i.candidateName,positionName:i.positionName,positionId:i.positionId,yearOfExperience:i.yearOfExperience,source:i.source,band:i.band,email:i.email,phone:i.phone,department:i.department,positionCreatedById:i.positionCreatedById,positionCreatedByName:i.positionCreatedByName,positionCreatedByUserRole:i.positionCreatedByUserRole,hods:Array.isArray(i.hods)||"object"==typeof i.hods?i.hods:[]})),this.filteredCandidates=[...this.candidates],this.candidatesLoading=!1},error:o=>{this.candidatesLoading=!1}})}mapMembers(t){return Object.entries(t||{}).map(([n,o])=>({id:+n,name:o}))}patchForm(t){var n,o,i,s,d,u,g,m,l,f,h,v,k,B,de,ae,me,se,Ve,Ne,We,ot;if(this.scheduleForm.patchValue({id:null!==(n=t.id)&&void 0!==n?n:null,candidateId:null!==(o=t.candidateId)&&void 0!==o?o:"",candidateName:null!==(i=t.candidateName)&&void 0!==i?i:"",positionName:"string"==typeof t.positionName?t.positionName:(null===(s=t.positionName)||void 0===s?void 0:s.name)||"",experience:null!==(d=t.yearOfExperience)&&void 0!==d?d:"",source:"string"==typeof t.source?t.source:(null===(u=t.source)||void 0===u?void 0:u.name)||"",band:null!==(g=t.band)&&void 0!==g?g:"",email:null!==(m=t.email)&&void 0!==m?m:"",phone:null!==(l=t.phone)&&void 0!==l?l:null,department:null!==(f=t.department)&&void 0!==f?f:"",interviewDate:t.interviewDate?new Date(t.interviewDate):null,interviewTime:null!==(h=t.interviewTime)&&void 0!==h?h:null,interviewType:null!==(v=t.interviewMode)&&void 0!==v?v:"",meetingLink:"ONLINE"===t.interviewMode&&null!==(k=t.interviewUrl)&&void 0!==k?k:"",meetingLocation:"OFFLINE"===t.interviewMode&&null!==(B=t.interviewLocation)&&void 0!==B?B:"",roundType:null!=t.interviewRound?+t.interviewRound:null,finalStatus:null!==(de=t.finalStatus)&&void 0!==de?de:"",hods:t.hods||{},interviewCreatedById:null!==(ae=t.interviewCreatedById)&&void 0!==ae?ae:null,interviewCreatedByName:null!==(me=t.interviewCreatedByName)&&void 0!==me?me:"",interviewCreatedByUserRole:null!==(se=t.interviewCreatedByUserRole)&&void 0!==se?se:"",positionId:t.positionId||null,positionCreatedById:null!==(Ve=t.positionCreatedById)&&void 0!==Ve?Ve:null,positionCreatedByName:null!==(Ne=t.positionCreatedByName)&&void 0!==Ne?Ne:"",positionCreatedByUserRole:null!==(We=t.positionCreatedByUserRole)&&void 0!==We?We:"",externalPanelMembers:null!==(ot=t.externalPanelMembers)&&void 0!==ot?ot:""}),this.positionCreatedById=t.positionCreatedById,this.positionCreatedByName=t.positionCreatedByName,t.candidateId){const Ze=this.candidates.find(Ct=>Ct.id===t.candidateId);Ze&&(this.selectedCandidateName=Ze.candidateName)}const Xe=t.positionId,it=Object.keys(t.panelMembers||{}).map(Ze=>+Ze),Ce=Object.keys(t.leadInterviewer||{}).map(Ze=>+Ze);t.candidateId&&t.positionId&&(this.fetchScoringId(t.candidateId,t.positionId),this.getInterviewQuestions(t.candidateId)),this.fetchPanelDataByPositionAndSelect(Xe,it,Ce)}fetchPanelDataByPositionAndSelect(t,n=[],o=[]){if(t)if(this.panelList.length>0){const i=n.map(d=>this.panelList.find(u=>
1u.id===d)).filter(Boolean),s=o.map(d=>this.leadInterviewerList.find(u=>u.id===d)).filter(Boolean);this.scheduleForm.patchValue({panelMembers:i,leadInterviewer:s})}else this.pendingPanelIds=n,this.pendingLeadIds=o}onCandidateChange(t){if(this.isEditMode)return;const n=this.candidates.find(o=>o.id===t);n&&(this.selectedCandidateName=n.candidateName,this.scheduleForm.patchValue({candidateId:n.id,candidateName:n.candidateName,positionName:n.positionName,experience:n.yearOfExperience,source:n.source,band:n.band,email:n.email,phone:n.phone,department:n.department,positionId:n.positionId,positionCreatedById:n.positionCreatedById,positionCreatedByName:n.positionCreatedByName,positionCreatedByUserRole:n.positionCreatedByUserRole}),n.id&&(this.fetchPanelDataByPosition(n.positionId),this.fetchScoringId(n.id,n.positionId),this.getInterviewQuestions(n.id)))}extractValue(t){return null==t?"":"object"==typeof t?(null==t?void 0:t.name)||"":t.toString()}fetchPanelDataByPosition(t){var n,o;this.scheduleForm.patchValue({panelMembers:[],leadInterviewer:[]}),null===(n=this.scheduleForm.get("panelMembers"))||void 0===n||n.enable(),null===(o=this.scheduleForm.get("leadInterviewer"))||void 0===o||o.enable()}formatDate(t){const n=new Date(t);return`${n.getFullYear()}-${`0${n.getMonth()+1}`.slice(-2)}-${`0${n.getDate()}`.slice(-2)}`}getPanelMembersObject(t){const n={};for(const o of t)n[o.id]=o.name;return n}removeCarriedScreeningDoc(t){this.carriedScreeningDocs=this.carriedScreeningDocs.filter(n=>n!==t),null!=(null==t?void 0:t.id)&&this.excludedScreeningDocIds.push(t.id)}onScreeningDocsSelected(t){this.addScreeningDocs(Array.from(t.target.files||[]))}onScreeningDropzoneDragOver(t){t.preventDefault(),t.stopPropagation(),this.isScreeningDropzoneActive=!0}onScreeningDropzoneDragLeave(t){t.preventDefault(),t.stopPropagation(),this.isScreeningDropzoneActive=!1}onScreeningDropzoneDrop(t){var n;t.preventDefault(),t.stopPropagation(),this.isScreeningDropzoneActive=!1,this.addScreeningDocs(Array.from((null===(n=t.dataTransfer)||void 0===n?void 0:n.files)||[]))}addScreeningDocs(t){if(!t.length)return;const n=t.find(d=>{const u=d.name.includes(".")?d.name.split(".").pop().toLowerCase():"";return!p.SCREENING_DOC_ALLOWED_EXTENSIONS.includes(u)});if(n)return void this.toastr.error(`Unsupported file type: ${n.name}. Allowed types: PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX.`,"Error",{timeOut:3e3});const o=[...this.selectedScreeningDocs,...t];this.carriedScreeningDocs.reduce((d,u)=>d+(u.fileSize||0),0)+o.reduce((d,u)=>d+u.size,0)>p.SCREENING_DOC_MAX_SIZE_BYTES?this.toastr.error("Combined size of all screening documents must not exceed 10MB.","Error",{timeOut:3e3}):this.selectedScreeningDocs=o}removeSelectedScreeningDoc(t){this.selectedScreeningDocs=this.selectedScreeningDocs.filter((n,o)=>o!==t)}getScreeningDocExtension(t){return t.includes(".")?t.split(".").pop().toUpperCase():""}get screeningDocsTotalSizeBytes(){return this.carriedScreeningDocs.reduce((n,o)=>n+(o.fileSize||0),0)+this.selectedScreeningDocs.reduce((n,o)=>n+o.size,0)}get screeningDocsAttachedCount(){return this.carriedScreeningDocs.length+this.selectedScreeningDocs.length}get screeningDocsCapPercent(){return Math.min(100,this.screeningDocsTotalSizeBytes/p.SCREENING_DOC_MAX_SIZE_BYTES*100)}onSubmit(){if(this.scheduleForm.valid){this.isSubmitting=!0;const o=this.scheduleForm.getRawValue(),i=this.formatDate(o.interviewDate),s=this.scheduleForm.getRawValue(),d=this.candidates.find(h=>String(h.id)===String(s.candidateId)),u=new Date,g=new Date(o.interviewDate);if(o.interviewTime){const[h,v]=o.interviewTime.split(":").map(Number);g.setHours(h,v,0,0)}const m=g>u,l={id:this.isEditMode?o.id:void 0,previousInterviewId:this.previousInterviewId,excludedScreeningDocumentIds:this.excludedScreeningDocIds,candidateId:o.candidateId,candidateName:o.candidateName,positionName:o.positionName,positionId:o.positionId,positionCreatedById:o.positionCreatedById,positionCreatedByName:o.positionCreatedByName,positionCreatedByUserRole:o.positionCreatedByUserRole,yearOfExperience:o.experience,interviewDate:i,interviewTime:o.interviewTime,interviewMode:o.interviewType,interviewUrl:o.meetingLink,interviewLocation:o.meetingLocation,interviewRound:o.roun
1dType,leadInterviewer:this.getPanelMembersObject(o.leadInterviewer),panelMembers:this.getPanelMembersObject(o.panelMembers),externalPanelMembers:this.normalizeEmailList(o.externalPanelMembers),source:o.source,fiscalYear:this.selectedYearForRecruitment,month:+this.selectedMonth,companyId:this.loggedInUserCompanyID,email:o.email,phone:Number(o.phone),department:o.department,band:o.band,finalStatus:m?"Scheduled":o.finalStatus,childId:this.recruitmentService.getChildId(),isDeleted:0,...this.isEditMode?{interviewCreatedById:o.interviewCreatedById,interviewCreatedByName:o.interviewCreatedByName,interviewCreatedByUserRole:o.interviewCreatedByUserRole}:{interviewCreatedById:this.loggedInUserId,interviewCreatedByName:this.userName,interviewCreatedByUserRole:this.loggedInUserRole},hods:(()=>{if(this.isEditMode)return this.scheduleForm.value.hods||{};if(o.hods&&Object.keys(o.hods).length>0)return o.hods;const h=(null==d?void 0:d.hods)||[];return Array.isArray(h)?h.reduce((v,k)=>(v[k.hodId]=k.hodName,v),{}):h})()},f=h=>{h&&(l.aiInterviewId=h.interview_id,l.interviewUrl=h.public_link);let de,B=this.isEditMode?`${this.config.updateInterviewDetails}/${l.id}`:this.config.addInterviewDetails;if(this.isEditMode)de=this.httpService.callPutService(B,l);else if(this.selectedScreeningDocs.length){const ae=new FormData;ae.append("dtos",new Blob([JSON.stringify([l])],{type:"application/json"})),this.selectedScreeningDocs.forEach(me=>ae.append("screeningDocs",me)),ae.append("uploadedBy",this.loggedInUserId||""),de=this.httpService.submitFileService(B,ae,"POST")}else de=this.httpService.callPostService(B,[l]);de.subscribe({next:()=>{this.toastr.success(this.isEditMode?"Interview updated successfully":"Interview scheduled successfully","Success",{timeOut:3e3,progressBar:!0}),this.dialogRef.close(l),this.isSubmitting=!1},error:ae=>{var me;this.toastr.error((null==ae||null===(me=ae.error)||void 0===me?void 0:me.message)||"Failed to save interview details","Error",{timeOut:3e3,progressBar:!0}),this.isSubmitting=!1}})};if("AI"===o.interviewType){var t,n;console.log(this.scoringId);const h=new Date(o.interviewDate);if(o.interviewTime){const[ae,me]=o.interviewTime.split(":").map(Number);h.setHours(ae,me,0,0)}const v=60*Number(this.scheduleForm.value.aiInterviewMinutes);let k;k=this.scoringId?{scoring_id:this.scoringId,interviewRound:o.roundType,interviewMode:o.interviewType,scheduled_at:h.toISOString(),expected_duration_seconds:v}:{candidate_id:o.candidateId,jd_id:o.positionId,interviewRound:o.roundType,scheduled_at:h.toISOString(),expected_duration_seconds:v};const B=sessionStorage.getItem("currentToken")||sessionStorage.getItem("token"),de=new we.Lr({"user-id":sessionStorage.getItem("loggedInUserId")||"",Authorization:`Bearer ${B||""}`,"child-id":(null===(t=this.recruitmentService.getChildId())||void 0===t?void 0:t.toString())||"","company-id":(null===(n=this.loggedInUserCompanyID)||void 0===n?void 0:n.toString())||""});this.http.post(Pe.TE.SCHEDULE_SESSION,k,{headers:de}).subscribe({next:ae=>{ae.success&&ae.data?f(ae.data):f()},error:ae=>{this.isSubmitting=!1,console.error("Error scheduling AI interview:",ae),this.toastr.error("Failed to schedule AI interview session.")}})}else f()}else this.scheduleForm.markAllAsTouched(),Object.keys(this.scheduleForm.controls).forEach(o=>{this.scheduleForm.get(o)}),this.toastr.error("Please fix the errors in the form.","Validation Error",{timeOut:3e3,progressBar:!0})}parseEmailList(t){const n=(null!=t?t:"").toString().trim();return n?n.split(/;+/g).map(o=>o.trim()).filter(Boolean):[]}normalizeEmailList(t){const n=this.parseEmailList(t).map(i=>i.toLowerCase());return Array.from(new Set(n)).join("; ")}isValidEmail(t){return/^[^\s@,]+@[^\s@,]+\.[^\s@,]{2,}$/i.test(t)}emailListValidator(){return t=>{const n=this.parseEmailList(t.value);if(0===n.length)return null;const o=n.filter(i=>!this.isValidEmail(i));return o.length?{invalidEmailList:{invalid:o}}:null}}futureDateTimeValidator(){return t=>{var n,o;const i=null===(n=t.get("interviewDate"))||void 0===n?void 0:n.value,s=null===(o=t.get("interviewTime"))||void 0===o?void 0:o.value;if(!i||!s)return null;const d=new Date(i),[u,g]=s.split(":").map(Number);d.setHours(u,g,0,0);const m=new Date;return m.setMinutes(m.getMinutes()+1),d>m?null:{pastDateTime:!0}}}onCancel(){this.dialogRef.close()}fetchScoringId(t,n){var o,i;if(!t||!n)return;const s=Pe.YK.GET_SCORING_ID,d={JdId:n,CandidateId:t},u=sessionStorage.getItem("currentToken")||sessionStorage.getItem("token"),g=new we.Lr({"user-id":sessionStorage.getItem("loggedInUserId")||"",Authorization:`Bearer ${u||""}`,"child-id":(null===(o=this.recruitmentService.getChildId())||void 0===o?void 0:o.toString())||"","company-id":(null===(i=this.loggedInUserCompanyID)||void 0===i?void 0:i.toString())||""});this.http.post(s,d,{headers:g}).subscribe({next:m=>{const l=m.data;l&&(this.scoringId=l)},error:m=>{}})}getInterviewQuestions(t){var n;this.isLoadingQuestions=!0;const o=Pe.YK.GET_INTERVIEW_QUESTIONS(t),i=sessionStorage.getItem("currentToken")||sessionStorage.getItem("token");i||console.warn("\u26a0\ufe0f No authentication token found in session storage.");const s=new we.Lr({"user-id":sessionStorage.getItem("loggedInUserId")||"","company-id":(null===(n=this.loggedInUserCompanyID)||void 0===n?void 0:n.toString())||"",Authorization:`Bearer ${i||""}`});this.http.get(o,{headers:s}).subscribe({next:d=>{var u;this.isLoadingQuestions=!1,this.interviewQuestions=(null===(u=d.data)||void 0===u?void 0:u.questions)||d.data||[]},error:d=>{this.isLoadingQuestions=!1}})}openAiQuestionsPopup(t="manage"){var n;null===(n=this.aiQuestionsDialogRef)||void 0===n||n.close();const o=this.scheduleForm.getRawValue();console.log(o.candidateId,o.positionId),this.aiQuestionsDialogRef=this.dialog.open(So,{width:"60%",height:"70%",disableClose:!0,data:{candidateId:o.candidateId,positionId:o.positionId,positionName:o.positionName,scoringId:this.scoringId,mode:t}})}checkAiRecruitmentPermission(){this.loggedInUserCompanyID?this.accessControlService.getMyModulePermissions(this.loggedInUserCompanyID).subscribe({next:t=>{if(null!=t&&t.success&&Array.isArray(t.data)){const n=t.data.find(o=>{var i;return"recruitment"===(null===(i=o.name)||void 0===i?void 0:i.toLowerCase())});this.showAiRecruitmentFeatures=!!n&&n.isEnabled}else this.showAiRecruitmentFeatures=!1;this.showAiRecruitmentFeatures&&this.getRemainingMinutes(this.loggedInUserCompanyID,this.loggedInUserId)},error:t=>{console.error("Error fetching AI recruitment permissions:",t),this.showAiRecruitmentFeatures=!1}}):this.showAiRecruitmentFeatures=!1}
1onSelectOpened(t,n){t&&("candidateSearchInput"===n.id?this.candidateSearchCtrl.reset():"panelMembersSearchInput"===n.id?this.panelMembersSearchCtrl.reset():"leadInterviewerSearchInput"===n.id&&this.leadInterviewerSearchCtrl.reset(),setTimeout(()=>{n.focus()},100))}filterCandidates(){this.candidateSearchCtrl.valueChanges.pipe((0,L.Q)(this._onDestroy),(0,Q.B)(200)).subscribe(t=>{t=(t||"").toLowerCase(),this.filteredCandidates=this.candidates.filter(n=>n.candidateName.toLowerCase().includes(t))})}}return(a=p).SCREENING_DOC_ALLOWED_EXTENSIONS=["pdf","doc","docx","ppt","pptx","xls","xlsx"],a.SCREENING_DOC_MAX_SIZE_BYTES=10485760,a.\u0275fac=function(t){return new(t||a)(e.rXU(y.ok),e.rXU(b.CP),e.rXU(b.Vh),e.rXU(S.L),e.rXU(c.k),e.rXU(_.T),e.rXU(we.Qq),e.rXU(q.tw),e.rXU(b.bZ),e.rXU(yt.$),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-add-edit-schedule-interview-popup"]],decls:100,vars:31,consts:[["viewCandidateName",""],["picker",""],["candidateSearchInput",""],["aiQuestionsMenu","matMenu"],["leadInterviewerSearchInput",""],["panelMembersSearchInput",""],["screeningDocInput",""],[1,"form-container"],[1,"cardLayout"],["size","4"],[1,"formLabelSemiBoldfs16","mb-5",2,"margin","10px"],["size","8",1,"text-right"],["src","././assets/icon/close_icon.png",1,"cp",3,"mat-dialog-close"],[1,"form-scroll-container",2,"padding","0rem !important"],[3,"formGroup"],["size","6"],[1,"formLabelRegularfs16","mb-5"],[1,"red-cl"],["diameter","14","style","display:inline-block; vertical-align:middle; margin-left:6px;",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"w-100","mat-height40","mat-input-style"],["matInput","","formControlName","positionName","readonly","","placeholder","Position Name",1,"readonly-text"],[4,"ngIf"],["size","6",1,"mt-10"],["matInput","","formControlName","experience","readonly","","placeholder","Years of Experience",1,"readonly-text"],["matInput","","formControlName","interviewDate","readonly","","placeholder","Select date",3,"focus","click","matDatepicker","min"],["matSuffix","",3,"for"],["matInput","","type","time","formControlName","interviewTime",3,"focus","click"],["class","mt-2","style","color: red;",4,"ngIf"],["placeholder","Select type","formControlName","interviewType"],["value","ONLINE"],["value","OFFLINE"],["value","AI",4,"ngIf"],["matInput","","type","number","formControlName","roundType","placeholder","Enter round number",3,"readonly"],["matInput","","formControlName","source","readonly","","placeholder","Application Source",1,"readonly-text"],["size","6","class","mt-10",4,"ngIf"],["size","12",1,"text-right","mt-10"],[2,"display","flex","justify-content","flex-end","align-items","center","gap","10px"],[1,"back_btn","fs-14",3,"click"],["type","button",1,"add_btn","fs-14",3,"click","disabled"],["diameter","16","style","display:inline-block; vertical-align:middle; margin-right:6px;",4,"ngIf"],["diameter","14",2,"display","inline-block","vertical-align","middle","margin-left","6px"],["formControlName","candidateId",3,"selectionChange","openedChange","placeholder","disabled"],[1,"search-input-wrapper",3,"click"],["id","candidateSearchInput","placeholder","Search...",1,"mat-select-search-input",3,"formControl"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"readonly-field"],[1,"mt-2",2,"color","red"],["value","AI"],["size","12",1,"mt-10"],["matInput","","placeholder","Enter meeting link","formControlName","meetingLink"],[2,"display","flex","align-items","center"],["type","button","mat-stroked-button","","color","primary",2,"height","40px",3,"click"],["type","button","mat-stroked-button","","color","primary",2,"height","40px","margin-left","10px",3,"matMenuTriggerFor"],[1,"material-icons",2,"font-size","18px","vertical-align","middle"],["mat-menu-item","","type","button",2,"font-size","13px",3,"click"],["matInput","","type","number","formControlName","aiInterviewMinutes","placeholder","Enter minutes (max 60)","onkeydown","return event.keyCode !== 190 && event.keyCode !== 110"],["size","6",1,"mt-10","ion-align-self-center","fw-b"],[1,"w-100","mat-input-style"],["matInput","","rows","3","placeholder","Enter location","formControlName","meetingLocation"],["subscriptSizing","dynamic",1,"w-100","mat-input-style"],["matInput","","formControlName","externalPanelMembers","placeholder","e.g. [email protected]; [email protected]"],[2,"color","red"],["formControlName","leadInterviewer","multiple","",3,"openedChange","placeholder","disabled","compareWith","disableOptionCentering"],["id","leadInterviewerSearchInput","placeholder","Search...",1,"mat-select-search-input",3,"formControl"],["formControlName","panelMembers","multiple","",3,"openedChange","placeholder","disabled","compareWith"],["id","panelMembersSearchInput","placeholder","Search...",1,"mat-select-search-input",3,"formControl"],["type","file","multiple","","accept",".pdf,.doc,.docx,.ppt,.pptx,.xls,.xlsx",2,"display","none",3,"change"],[1,"screening-dropzone",3,"click","dragover","dragleave","drop"],[1,"material-icons","screening-dropzone-icon"],[1,"screening-dropzone-title"],[1,"screening-browse-link"],[1,"screening-dropzone-sub"],["class","screening-file-list",4,"ngIf"],["class","screening-cap-line",4,"ngIf"],[1,"screening-file-list"],["class","screening-file-group-label",4,"ngIf"],["class","screening-file-row",4,"ngFor","ngForOf"],[1,"screening-file-group-label"],[1,"screening-file-row"],[1,"screening-file-icon"],[1,"screening-file-meta"],[1,"screening-file-name",3,"title"],[1,"screening-file-size"],["type","button","title","Remove file",1,"screening-file-remove",3,"click"],[1,"material-icons","fs-16"],[1,"screening-cap-line"],[1,"screening-cap-meter"],[1,"screening-cap-track"],[1,"screening-cap-fill"],["diameter","16",2,"display","inline-block","vertical-align","middle","margin-right","6px"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",7)(1,"div",8)(2,"ion-row")(3,"ion-col",9)(4,"div",10),e.EFF(5),e.k0s()(),e.j41(6,"ion-col",11),e.nrm(7,"img",12),e.k0s()(),e.j41(8,"div",13)(9,"form",14)(10,"ion-grid")(11,"ion-row")(12,"ion-col",15)(13,"label",16),e.EFF(14," Candidate Name "),e.j41(15,"span",17),e.EFF(16,"*"),e.k0s(),e.DNE(17,wo,1,0,"mat-spinner",18),e.k0s(),e.DNE(18,jo,8,5,"ng-container",19)(19,Do,2,1,"ng-template",null,0,e.C5r),e.k0s(),e.j41(21,"ion-col",15)(22,"label",16),e.EFF(23,"Position Name"),e.k0s(),e.j41(24,"mat-form-field",20),e.nrm(25,"input",21),e.DNE(26,ko,2,0,"mat-error",22),e.k0s()()(),e.j41(27,"ion-row")(28,"ion-col",23)(29,"label",16),e.EFF(30,"Years of Experience"),e.k0s(),e.j41(31,"mat-form-field",20),e.nrm(32,"input",24),e.k0s()(),e.j41(33,"ion-col",23)(34,"label",16),e.EFF(35," Interview Date "),e.j41(36,"span",17),e.EFF(37,"*"),e.k0s()(),e.j41(38,"mat-form-field",20)(39,"input",25),e.bIt("focus",function(){e.eBV(o);const s=e.sdS(42);return e.Njj(s.open())})("click",function(){e.eBV(o);const s=e.sdS(42);return e.Njj(s.open())}),e.k0s(),e.nrm(40,"mat-datepicker-toggle",26)(41,"mat-datepicker",null,1),e.DNE(43,Po,2,0,"mat-error",22),e.k0s()()(),e.j41(44,"ion-row")(45,"ion-col",23)(46,"label",16),e.EFF(47," Interview Time "),e.j41(48,"span",17),e.EFF(49,"*"),e.k0s()(),e.j41(50,"mat-form-field",20)(51,"input",27),e.bIt("focus",function(s){return e.eBV(o),e.Njj(n.openNativeTimePicker(s))})("click",function(s){return e.eBV(o),e.Njj(n.openNativeTimePicker(s))}),e.k0s(),e.DNE(52,Fo,2,0,"mat-error",22),e.k0s(),e.DNE(53,Mo,2,0,"div",28),e.k0s(),e.j41(54,"ion-col",23)(55,"label",16),e.EFF(56," Interview Type "),e.j41(57,"span",17),e.EFF(58,"*"),e.k0s()(),e.j41(59,"mat-form-field",20)(60,"mat-select",29)(61,"mat-option",30),e.EFF(62,"ONLINE"),e.k0s(),e.j41(63,"mat-option",31),e.EFF(64,"OFFLINE"),e.k0s(),e.DNE(65,Eo,2,0,"mat-option",32),e.k0s(),e.DNE(66,Oo,2,0,"mat-error",22),e.k0s()()(),e.DNE(67,Ao,9,1,"ion-row",22)(68,Uo,30,4,"ion-row",22)(69,Yo,10,2,"ion-row",22),e.j41(70,"ion-row")(71,"ion-col",23)(72,"label",16),e.EFF(73," Round Type "),e.j41(74,"span",17),e.EFF(75,"*"),e.k0s()(),e.j41(76,"mat-form-field",20),e.nrm(77,"input",33),e.DNE(78,Lo,2,0,"mat-error",22)(79,zo,2,0,"mat-error",22)(80,Vo,2,0,"mat-error",22),e.k0s()(),e.j41(81,"ion-col",23)(82,"label",16),e.EFF(83,"Application Source"),e.k0s(),e.j41(84,"mat-form-field",20),e.nrm(85,"input",34),e.DNE(86,Xo,2,0,"mat-error",22),e.k0s()()(),e.DNE(87,Qo,7,1,"ion-row",22),e.j41(88,"ion-row"),e.DNE(89,Zo,13,8,"ion-col",35)(90,ni,10,6,"ion-col",35),e.k0s(),e.DNE(91,ci,18,5,"ion-row",22),e.j41(92,"ion-row")(93,"ion-col",36)(94,"div",37)(95,"button",38),e.bIt("click",function(){return e.eBV(o),e.Njj(n.onCancel())}),e.EFF(96,"Cancel"),e.k0s(),e.j41(97,"button",39),e.bIt("click",function(){return e.eBV(o),e.Njj(n.onSubmit())}),e.DNE(98,ui,1,0,"mat-spinner",40),e.EFF(99),e.k0s()()()()()()()()()}if(2&t){let o,i,s,d,u,g,m,l,f,h,v,k,B,de,ae;const me=e.sdS(20),se=e.sdS(42);e.R7$(5),e.SpI(" ",n.isEditMode?"Edit Interview Schedule":"Add Interview Schedule"," "),e.R7$(4),e.Y8G("formGroup",n.scheduleForm),e.R7$(8),e.Y8G("ngIf",n.candidatesLoading),e.R7$(),e.Y8G("ngIf",!n.isEditMode&&!n.isCandidateReadOnly)("ngIfElse",me),e.R7$(8),e.Y8G("ngIf",(null==(o=n.scheduleForm.get("positionName"))?null:o.hasError("required"))&&(null==(o=n.scheduleForm.get("positionName"))?null:o.touched)),e.R7$(13),e.Y8G("matDatepicker",se)("min",n.minInterviewDate),e.R7$(),e.Y8G("for",se),e.R7$(3),e.Y8G("ngIf",(null==(i=n.scheduleForm.get("interviewDate"))?null:i.hasError("required"))&&(null==(i=n.scheduleForm.get("interviewDate"))?null:i.touched)),e.R7$(9),e.Y8G("ngIf",(null==(s=n.scheduleForm.get("interviewTime"))?null:s.hasError("required"))&&(null==(s=n.scheduleForm.get("interviewTime"))?null:s.touched)),e.R7$(),e.Y8G("ngIf",n.scheduleForm.hasError("pastDateTime")&&((null==(d=n.scheduleForm.get("interviewDate"))?null:d.touched)||(null==(d=n.scheduleForm.get("interviewTime"))?null:d.touched))
1),e.R7$(12),e.Y8G("ngIf",n.showAiRecruitmentFeatures),e.R7$(),e.Y8G("ngIf",(null==(u=n.scheduleForm.get("interviewType"))?null:u.hasError("required"))&&(null==(u=n.scheduleForm.get("interviewType"))?null:u.touched)),e.R7$(),e.Y8G("ngIf","ONLINE"===(null==(g=n.scheduleForm.get("interviewType"))?null:g.value)),e.R7$(),e.Y8G("ngIf","AI"===(null==(m=n.scheduleForm.get("interviewType"))?null:m.value)),e.R7$(),e.Y8G("ngIf","OFFLINE"===(null==(l=n.scheduleForm.get("interviewType"))?null:l.value)),e.R7$(8),e.Y8G("readonly",n.isEditMode||n.isNextRound),e.R7$(),e.Y8G("ngIf",null==(f=n.scheduleForm.get("roundType"))?null:f.hasError("required")),e.R7$(),e.Y8G("ngIf",null==(h=n.scheduleForm.get("roundType"))?null:h.hasError("min")),e.R7$(),e.Y8G("ngIf",null==(v=n.scheduleForm.get("roundType"))?null:v.hasError("max")),e.R7$(6),e.Y8G("ngIf",(null==(k=n.scheduleForm.get("source"))?null:k.hasError("required"))&&(null==(k=n.scheduleForm.get("source"))?null:k.touched)),e.R7$(),e.Y8G("ngIf","AI"!==(null==(B=n.scheduleForm.get("interviewType"))?null:B.value)),e.R7$(2),e.Y8G("ngIf","AI"!==(null==(de=n.scheduleForm.get("interviewType"))?null:de.value)),e.R7$(),e.Y8G("ngIf","AI"!==(null==(ae=n.scheduleForm.get("interviewType"))?null:ae.value)),e.R7$(),e.Y8G("ngIf",!n.isEditMode),e.R7$(6),e.xc7("background-color",n.buttonColorName),e.Y8G("disabled",n.isSubmitting),e.R7$(),e.Y8G("ngIf",n.isSubmitting),e.R7$(),e.SpI(" ",n.isSubmitting?n.isEditMode?"Updating...":"Scheduling...":n.isEditMode?"Update Interview":"Schedule Interview"," ")}},dependencies:[K.Sq,K.bT,y.qT,y.me,y.Q0,y.BC,y.cb,J.hU,J.lO,J.ln,R.rl,R.TL,R.yw,he.VO,pe.wT,y.l_,y.j4,y.JD,gt.Vh,gt.bZ,gt.bU,M.fg,b.tx,Ae.$z,Ge.kk,Ge.fb,Ge.Cp,nt.LG,K.QX],styles:[".cardLayout[_ngcontent-%COMP%]{padding:20px}.removeIcon[_ngcontent-%COMP%]{height:25px} .mat-mdc-dialog-container .mdc-dialog__surface{border-radius:18px!important}.add_btn.disabled[_ngcontent-%COMP%]{color:#302b2b;cursor:not-allowed;opacity:.6}.form-scroll-container[_ngcontent-%COMP%]{max-height:80vh;overflow-y:auto;padding:1rem}[_nghost-%COMP%] .mat-mdc-form-field-subscript-wrapper{line-height:1.2}[_nghost-%COMP%] .mat-mdc-form-field-hint-wrapper, [_nghost-%COMP%] .mat-mdc-form-field-error-wrapper{margin-top:4px}[_nghost-%COMP%] .mat-dialog-container{max-height:90vh;overflow-y:auto}.mb-5[_ngcontent-%COMP%]{margin-bottom:5px}.screening-dropzone[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;border:1.5px dashed #c3cad6;border-radius:10px;background:#f7f8fb;padding:16px;cursor:pointer;transition:border-color .15s ease,background-color .15s ease}.screening-dropzone[_ngcontent-%COMP%]:hover, .screening-dropzone.dragover[_ngcontent-%COMP%]{border-color:#e8790f;background:#fef1e2}.screening-dropzone-icon[_ngcontent-%COMP%]{color:#e8790f;font-size:22px}.screening-dropzone-title[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#1c2130}.screening-browse-link[_ngcontent-%COMP%]{color:#e8790f;text-decoration:underline}.screening-dropzone-sub[_ngcontent-%COMP%]{font-size:11.5px;color:#9aa1af}.screening-file-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;margin-top:8px}.screening-file-group-label[_ngcontent-%COMP%]{font-size:11px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:#9aa1af;margin-bottom:2px}.screening-file-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:6px 10px;border:1px solid #dde2ea;border-radius:8px;background:#fff}.screening-file-icon[_ngcontent-%COMP%]{flex:none;width:30px;height:26px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:700;background:#fbebec;color:#d1444a}.screening-file-meta[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column}.screening-file-name[_ngcontent-%COMP%]{font-size:12.5px;color:#1c2130;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.screening-file-size[_ngcontent-%COMP%]{font-size:11px;color:#9aa1af}.screening-file-remove[_ngcontent-%COMP%]{flex:none;width:24px;height:24px;border:none;border-radius:6px;background:none;color:#9aa1af;display:flex;align-items:center;justify-content:center;cursor:pointer}.screening-file-remove[_ngcontent-%COMP%]:hover{background:#fbebec;color:#d1444a}.screening-cap-line[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px;font-size:11.5px;color:#9aa1af}.screening-cap-meter[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.screening-cap-track[_ngcontent-%COMP%]{width:100px;height:4px;border-radius:2px;background:#dde2ea;overflow:hidden}.screening-cap-fill[_ngcontent-%COMP%]{height:100%;background:#e8790f;border-radius:2px}.readonly-text[readonly][_ngcontent-%COMP%]{color:#1e1e1e!important;opacity:1!important;cursor:default;background-color:transparent!important}.readonly-field[_ngcontent-%COMP%]{border:.1px solid #ccc;padding:10px;border-radius:5px;height:40px}.rating-info-wrapper[_ngcontent-%COMP%]{position:relative;margin-left:10px;display:flex;align-items:center}.rating-tooltip[_ngcontent-%COMP%]{display:none;position:absolute;top:100%;left:0;transform:translate(0);width:700px;max-height:400px;overflow-y:auto;overflow-x:auto;background:#fff;border:1px solid #ccc;box-shadow:0 4px 15px #0003;z-index:1000;padding:10px;border-radius:4px}.rating-info-wrapper[_ngcontent-%COMP%]:hover .rating-tooltip[_ngcontent-%COMP%]{display:block}.search-input-wrapper[_ngcontent-%COMP%]{padding:8px 12px;position:sticky;top:-8px;background:#fff;z-index:10;border-bottom:1px solid #eee}.mat-select-search-input[_ngcontent-%COMP%]{width:100%;height:36px;padding:0 12px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;outline:none}"]}),p})();var pi=Y(44354);function gi(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Reason is required "),e.k0s())}function mi(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Reason cannot exceed 255 characters "),e.k0s())}let At=(()=>{var a;class p{constructor(t,n,o){this.fb=t,this.dialogRef=n,this.data=o,this.reasonForm=this.fb.group({reason:["",[y.k0.required,y.k0.maxLength(255)]]})}ngOnInit(){}submit(){console.log(this.reasonForm.value),this.reasonForm.valid&&this.dialogRef.close(this.reasonForm.value.reason)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(y.ok),e.rXU(b.CP),e.rXU(b.Vh))}
1,a.\u0275cmp=e.VBU({type:a,selectors:[["app-rejection-reason-dialog"]],decls:28,vars:4,consts:[[1,"form-container"],[1,"cardLayout"],["size","4"],[1,"formLabelSemiBoldfs16","mb-5"],["size","8",1,"text-right"],["src","././assets/icon/close_icon.png","alt","Close","role","button","tabindex","0",1,"cp",3,"mat-dialog-close"],[1,"form-scroll-container",2,"padding","0rem !important"],[3,"ngSubmit","formGroup"],["size","12"],[1,"formLabelRegularfs16","mb-10"],[1,"red-cl"],[1,"w-100","mat-input-style","mt-10"],["matInput","","formControlName","reason","rows","4","placeholder","Enter reason for rejection"],[4,"ngIf"],["size","12",1,"mt-10"],[1,"button-row"],["type","button",1,"back_btn","fs-14",3,"click"],["type","submit",1,"add_btn","fs-14",3,"disabled"]],template:function(t,n){if(1&t&&(e.j41(0,"div",0)(1,"div",1)(2,"ion-row")(3,"ion-col",2)(4,"div",3),e.EFF(5," Reason for Rejection "),e.k0s()(),e.j41(6,"ion-col",4),e.nrm(7,"img",5),e.k0s()(),e.j41(8,"div",6)(9,"form",7),e.bIt("ngSubmit",function(){return n.submit()}),e.j41(10,"ion-row")(11,"ion-col",8)(12,"label",9),e.EFF(13,"Rejection Reason "),e.j41(14,"span",10),e.EFF(15,"*"),e.k0s()(),e.j41(16,"mat-form-field",11)(17,"textarea",12),e.EFF(18," "),e.k0s(),e.DNE(19,gi,2,0,"mat-error",13)(20,mi,2,0,"mat-error",13),e.k0s()()(),e.j41(21,"ion-row")(22,"ion-col",14)(23,"div",15)(24,"button",16),e.bIt("click",function(){return n.dialogRef.close()}),e.EFF(25,"Cancel"),e.k0s(),e.j41(26,"button",17),e.EFF(27,"Submit"),e.k0s()()()()()()()()),2&t){let o,i;e.R7$(9),e.Y8G("formGroup",n.reasonForm),e.R7$(10),e.Y8G("ngIf",null==(o=n.reasonForm.get("reason"))?null:o.hasError("required")),e.R7$(),e.Y8G("ngIf",(null==(i=n.reasonForm.get("reason"))?null:i.hasError("maxlength"))&&(null==(i=n.reasonForm.get("reason"))?null:i.touched)),e.R7$(6),e.Y8G("disabled",n.reasonForm.invalid)}},dependencies:[K.bT,y.qT,y.me,y.BC,y.cb,J.hU,J.ln,R.rl,R.TL,y.j4,y.JD,M.fg,b.tx],styles:[".cardLayout[_ngcontent-%COMP%]{padding:20px}.removeIcon[_ngcontent-%COMP%]{height:25px} .mat-mdc-dialog-container .mdc-dialog__surface{border-radius:18px!important}.add_btn.disabled[_ngcontent-%COMP%]{color:#302b2b;cursor:not-allowed;opacity:.6}.form-scroll-container[_ngcontent-%COMP%]{max-height:80vh;overflow-y:auto;padding:1rem}[_nghost-%COMP%] .mat-dialog-container{max-height:90vh;overflow-y:auto}.mb-5[_ngcontent-%COMP%]{margin-bottom:5px}.button-row[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:10px}"]}),p})();var hi=Y(43236),fi=Y(28211),vi=Y(39974),bi=Y(58750),_i=Y(81853),Ci=Y(54360),yi=Y(45225);const Ii=(0,_i.L)(a=>function(r=null){a(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r});function Si(a,p){const{first:r,each:t,with:n=wi,scheduler:o=(null!=p?p:hi.E),meta:i=null}=(0,fi.v)(a)?{first:a}:"number"==typeof a?{each:a}:a;if(null==r&&null==t)throw new TypeError("No timeout provided.");return(0,vi.N)((s,d)=>{let u,g,m=null,l=0;const f=h=>{g=(0,yi.N)(d,o,()=>{try{u.unsubscribe(),(0,bi.Tg)(n({meta:i,lastValue:m,seen:l})).subscribe(d)}catch(v){d.error(v)}},h)};u=s.subscribe((0,Ci._)(d,h=>{null==g||g.unsubscribe(),l++,d.next(m=h),t>0&&f(t)},void 0,void 0,()=>{null!=g&&g.closed||null==g||g.unsubscribe(),m=null})),!l&&f(null!=r?"number"==typeof r?r:+r-o.now():t)})}function wi(a){throw new Ii(a)}var bt=Y(9454);function xi(a,p){1&a&&(e.j41(0,"div",23),e.nrm(1,"mat-spinner",24),e.j41(2,"div",25),e.EFF(3,"Loading evaluation..."),e.k0s()())}function Ri(a,p){1&a&&e.nrm(0,"mat-spinner",30)}function ji(a,p){if(1&a){const r=e.RV6();e.j41(0,"img",31),e.bIt("click",function(){e.eBV(r);const n=e.XpG(2);return e.Njj(n.downloadPDF())}),e.k0s()}}function Di(a,p){if(1&a&&(e.j41(0,"div",26)(1,"div")(2,"strong"),e.EFF(3),e.k0s(),e.EFF(4," - "),e.j41(5,"span"),e.EFF(6),e.k0s()(),e.j41(7,"div",27),e.DNE(8,Ri,1,0,"mat-spinner",28)(9,ji,1,0,"img",29),e.k0s()()),2&a){const r=e.XpG();e.R7$(3),e.JRh(r.evaluationForm.value.candidateName),e.R7$(3),e.JRh(r.evaluationForm.value.positionName),e.R7$(2),e.Y8G("ngIf",r.downloadingPdf),e.R7$(),e.Y8G("ngIf",!r.downloadingPdf)}}function ki(a,p){if(1&a&&(e.j41(0,"div",45)(1,"strong",46),e.EFF(2,"Candidate's Answer:"),e.k0s(),e.j41(3,"textarea",47),e.EFF(4),e.k0s()()),2&a){const r=e.XpG().$implicit;e.R7$(4),e.JRh(r.value.candidateAnswer)}}function Pi(a,p){if(1&a&&(e.j41(0,"div",50)(1,"div",51)(2,"div",52),e.EFF(3),e.k0s()(),e.j41(4,"div",53),e.EFF(5),e.k0s()()),2&a){const r=p.$implicit,t=e.XpG(2).$implicit;e.R7$(),e.AVh("selected",t.value.ratingValue?r.ratingValue===t.value.ratingValue:(null==t.value.rating?null:t.value.rating.toUpperCase())===(null==r.label?null:r.label.toUpperCase()))("disabled-box",!0),e.R7$(2),e.JRh(r.ratingValue),e.R7$(2),e.JRh(r.label)}}
1function Fi(a,p){if(1&a&&(e.j41(0,"div",48),e.DNE(1,Pi,6,6,"div",49),e.k0s()),2&a){const r=e.XpG().$implicit,t=e.XpG(5);e.R7$(),e.Y8G("ngForOf",null!=r.value.ratings&&r.value.ratings.length?r.value.ratings:t.ratingOptions)}}function Mi(a,p){if(1&a&&(e.j41(0,"div",41)(1,"div",42),e.EFF(2),e.k0s(),e.DNE(3,ki,5,1,"div",43)(4,Fi,2,1,"div",44),e.k0s()),2&a){const r=p.$implicit,t=p.index,n=e.XpG(2).$implicit;e.Y8G("formGroupName",t),e.R7$(2),e.JRh(r.value.questions),e.R7$(),e.Y8G("ngIf",n.value.isAiInterview&&r.value.candidateAnswer),e.R7$(),e.Y8G("ngIf",!n.value.isAiInterview||n.value.isAiInterview&&"Rating Based"===r.value.questionType)}}function Ei(a,p){if(1&a&&(e.j41(0,"mat-expansion-panel",34)(1,"mat-expansion-panel-header")(2,"mat-panel-title"),e.EFF(3),e.k0s()(),e.j41(4,"div",39),e.DNE(5,Mi,5,4,"div",40),e.k0s()()),2&a){const r=p.$implicit,t=p.index,n=e.XpG(4);e.Y8G("formGroupName",t),e.R7$(3),e.SpI(" Competency: ",r.value.competencyName," "),e.R7$(2),e.Y8G("ngForOf",n.getQuestions(r,"questions").controls)}}function Oi(a,p){1&a&&(e.j41(0,"div",54),e.EFF(1," No evaluation questions configured for this round "),e.k0s())}function Ti(a,p){if(1&a&&(e.j41(0,"div",45)(1,"strong",46),e.EFF(2,"Candidate's Answer:"),e.k0s(),e.j41(3,"textarea",47),e.EFF(4),e.k0s()()),2&a){const r=e.XpG().$implicit;e.R7$(4),e.JRh(r.value.candidateAnswer)}}function Ai(a,p){if(1&a&&(e.j41(0,"div",50)(1,"div",51)(2,"div",52),e.EFF(3),e.k0s()(),e.j41(4,"div",53),e.EFF(5),e.k0s()()),2&a){const r=p.$implicit,t=e.XpG(2).$implicit;e.R7$(),e.AVh("selected",t.value.ratingValue?r.ratingValue===t.value.ratingValue:(null==t.value.rating?null:t.value.rating.toUpperCase())===(null==r.label?null:r.label.toUpperCase()))("disabled-box",!0),e.R7$(2),e.JRh(r.ratingValue),e.R7$(2),e.JRh(r.label)}}function Ni(a,p){if(1&a&&(e.j41(0,"div",48),e.DNE(1,Ai,6,6,"div",49),e.k0s()),2&a){const r=e.XpG().$implicit,t=e.XpG(6);e.R7$(),e.Y8G("ngForOf",null!=r.value.ratings&&r.value.ratings.length?r.value.ratings:t.ratingOptions)}}function $i(a,p){1&a&&(e.j41(0,"strong",46),e.EFF(1,"AI Feedback:"),e.k0s())}function Ui(a,p){if(1&a&&(e.j41(0,"div",57),e.DNE(1,$i,2,0,"strong",58),e.j41(2,"textarea",47),e.EFF(3),e.k0s()()),2&a){const r=e.XpG().$implicit,t=e.XpG(3).$implicit;e.R7$(),e.Y8G("ngIf",t.value.isAiInterview),e.R7$(2),e.JRh(r.value.comment)}}function Bi(a,p){if(1&a&&(e.j41(0,"div",41)(1,"div",42),e.EFF(2),e.k0s(),e.DNE(3,Ti,5,1,"div",43)(4,Ni,2,1,"div",44)(5,Ui,4,2,"div",56),e.k0s()),2&a){const r=p.$implicit,t=p.index,n=e.XpG(3).$implicit;e.Y8G("formGroupName",t),e.R7$(2),e.JRh(r.value.question),e.R7$(),e.Y8G("ngIf",n.value.isAiInterview&&r.value.candidateAnswer),e.R7$(),e.Y8G("ngIf",r.value.rating&&(!n.value.isAiInterview||n.value.isAiInterview&&"Rating Based"===r.value.questionType)),e.R7$(),e.Y8G("ngIf",r.value.comment&&(!n.value.isAiInterview||n.value.isAiInterview&&"Rating Based"===r.value.questionType))}}function Gi(a,p){if(1&a&&(e.j41(0,"mat-expansion-panel",34)(1,"mat-expansion-panel-header")(2,"mat-panel-title"),e.EFF(3),e.k0s()(),e.j41(4,"div",39),e.DNE(5,Bi,6,5,"div",40),e.k0s()()),2&a){const r=p.$implicit,t=p.index,n=e.XpG(5);e.Y8G("formGroupName",t),e.R7$(3),e.SpI(" Tech Position: ",r.value.techPosition," "),e.R7$(2),e.Y8G("ngForOf",n.getQuestions(r,"questions").controls)}}function Yi(a,p){if(1&a&&(e.j41(0,"mat-accordion",55),e.DNE(1,Gi,6,3,"mat-expansion-panel",33),e.k0s()),2&a){const r=e.XpG().$implicit,t=e.XpG(3);e.R7$(),e.Y8G("ngForOf",t.getTechPositions(r).controls)}}function Li(a,p){if(1&a&&(e.j41(0,"mat-expansion-panel",34)(1,"mat-expansion-panel-header")(2,"mat-panel-title"),e.EFF(3),e.k0s()(),e.j41(4,"mat-accordion",36),e.DNE(5,Ei,6,3,"mat-expansion-panel",33),e.k0s(),e.DNE(6,Oi,2,0,"div",37)(7,Yi,2,1,"mat-accordion",38),e.k0s()),2&a){const r=p.$implicit,t=p.index,n=e.XpG(3);e.Y8G("formGroupName",t),e.R7$(3),e.SpI(" Lead Interviewer: ",r.value.leadInterviewer," "),e.R7$(2),e.Y8G("ngForOf",n.getCompetencies(r).controls),e.R7$(),e.Y8G("ngIf",r.value.noQuestionsConfigured),e.R7$(),e.Y8G("ngIf",!r.value.noQuestionsConfigured)}}function zi(a,p){if(1&a&&(e.j41(0,"mat-expansion-panel",34)(1,"mat-expansion-panel-header")(2,"mat-panel-title"),e.EFF(3),e.k0s()(),e.j41(4,"mat-accordion",35),e.DNE(5,Li,8,5,"mat-expansion-panel",33),e.k0s()()),2&a){const r=p.$implicit,t=p.index,n=e.XpG(2);e.Y8G("formGroupName",t),e.R7$(3),e.SpI(" Interview Round ",r.value.interviewRound," "),e.R7$(2),e.Y8G("ngForOf",n.getLeadInterviewers(r).controls)}}function Vi(a,p){if(1&a&&(e.j41(0,"mat-accordion",32),e.DNE(1,zi,6,3,"mat-expansion-panel",33),e.k0s()),2&a){const r=e.XpG();e.R7$(),e.Y8G("ngForOf",r.rounds.controls)}}function Xi(a,p){if(1&a&&(e.j41(0,"div",74)(1,"div",75)(2,"span",76),e.EFF(3),e.k0s()(),e.j41(4,"div",77),e.EFF(5),e.k0s()()),2&a){const r=p.$implicit,t=e.XpG().$implicit;e.R7$(),e.xc7("background-color",(t.ratingValue?r.ratingValue===t.ratingValue:(null==t.rating?null:t.rating.toUpperCase())===(null==r.label?null:r.label.toUpperCase()))?"#00ff00":"white"),e.R7$(2),e.JRh(r.ratingValue),e.R7$(2),e.JRh(r.label)}}
1function Hi(a,p){if(1&a&&(e.j41(0,"div",70)(1,"div",71),e.EFF(2),e.k0s(),e.j41(3,"div",72),e.DNE(4,Xi,6,4,"div",73),e.k0s()()),2&a){const r=p.$implicit,t=e.XpG(4);e.R7$(2),e.JRh(r.questions||r.question),e.R7$(2),e.Y8G("ngForOf",null!=r.ratings&&r.ratings.length?r.ratings:t.ratingOptions)}}function Wi(a,p){if(1&a&&(e.j41(0,"div",67)(1,"div",68),e.EFF(2),e.k0s(),e.DNE(3,Hi,5,2,"div",69),e.k0s()),2&a){const r=p.$implicit;e.R7$(2),e.SpI(" Competency: ",r.competencyName," "),e.R7$(),e.Y8G("ngForOf",r.questions)}}function Qi(a,p){1&a&&(e.j41(0,"div",78),e.EFF(1," No evaluation questions configured for this round "),e.k0s())}function qi(a,p){if(1&a&&(e.j41(0,"div",74)(1,"div",75)(2,"span",76),e.EFF(3),e.k0s()(),e.j41(4,"div",77),e.EFF(5),e.k0s()()),2&a){const r=p.$implicit,t=e.XpG(2).$implicit;e.R7$(),e.xc7("background-color",(t.ratingValue?r.ratingValue===t.ratingValue:(null==t.rating?null:t.rating.toUpperCase())===(null==r.label?null:r.label.toUpperCase()))?"#00ff00":"white"),e.R7$(2),e.JRh(r.ratingValue),e.R7$(2),e.JRh(r.label)}}function Ji(a,p){if(1&a&&(e.j41(0,"div",72),e.DNE(1,qi,6,4,"div",73),e.k0s()),2&a){const r=e.XpG().$implicit,t=e.XpG(4);e.R7$(),e.Y8G("ngForOf",null!=r.ratings&&r.ratings.length?r.ratings:t.ratingOptions)}}function Ki(a,p){if(1&a&&(e.j41(0,"div",83)(1,"strong",84),e.EFF(2,"Candidate's Answer:"),e.k0s(),e.j41(3,"div",85),e.EFF(4),e.k0s()()),2&a){const r=e.XpG().$implicit;e.R7$(4),e.JRh(r.candidateAnswer)}}function Zi(a,p){if(1&a&&(e.j41(0,"div",83)(1,"strong",84),e.EFF(2,"AI Feedback:"),e.k0s(),e.j41(3,"div",85),e.EFF(4),e.k0s()()),2&a){const r=e.XpG().$implicit;e.R7$(4),e.JRh(r.comment)}}function er(a,p){if(1&a&&(e.j41(0,"div",70)(1,"div",80),e.EFF(2),e.k0s(),e.DNE(3,Ji,2,1,"div",81)(4,Ki,5,1,"div",82)(5,Zi,5,1,"div",82),e.k0s()),2&a){const r=p.$implicit;e.R7$(2),e.JRh(r.questions||r.question),e.R7$(),e.Y8G("ngIf",r.rating),e.R7$(),e.Y8G("ngIf",r.candidateAnswer),e.R7$(),e.Y8G("ngIf",r.comment)}}function tr(a,p){if(1&a&&(e.j41(0,"div",67)(1,"div",79),e.EFF(2),e.k0s(),e.DNE(3,er,6,4,"div",69),e.k0s()),2&a){const r=p.$implicit;e.R7$(2),e.SpI(" Tech Position: ",r.techPosition," "),e.R7$(),e.Y8G("ngForOf",r.questions)}}function nr(a,p){if(1&a&&(e.j41(0,"div",62)(1,"div",63),e.EFF(2),e.k0s(),e.j41(3,"div",64),e.DNE(4,Wi,4,2,"div",65)(5,Qi,2,0,"div",66)(6,tr,4,2,"div",65),e.k0s()()),2&a){const r=p.$implicit;e.R7$(2),e.SpI(" Lead Interviewer: ",r.leadInterviewer," "),e.R7$(2),e.Y8G("ngForOf",r.competencies),e.R7$(),e.Y8G("ngIf",r.noQuestionsConfigured),e.R7$(),e.Y8G("ngForOf",r.techPositions)}}function or(a,p){if(1&a&&(e.j41(0,"div",59)(1,"div",60),e.EFF(2),e.k0s(),e.DNE(3,nr,7,4,"div",61),e.k0s()),2&a){const r=p.$implicit;e.R7$(2),e.SpI(" Interview Round: ",r.interviewRound," "),e.R7$(),e.Y8G("ngForOf",r.leadInterviewers)}}let ir=(()=>{var a;class p{constructor(t,n,o,i,s,d,u,g){this.fb=t,this.http=n,this.toastr=o,this.httpService=i,this.config=s,this.encryptionService=d,this.dialogRef=u,this.data=g,this.buttonColorName=null,this.loggedInUserCompanyID=null,this.subModuleButtonColor=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.loggedInCompanyReviewCycle=null,this.loading=!1,this.downloadingPdf=!1,this.ratingOptions=[],this.todayDate=(new Date).toLocaleDateString("en-GB")}ngOnInit(){this.initSessionData(),this.initForm(),this.loadCandidateEvaluation()}close(){this.dialogRef.close()}initSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName}initForm(){this.evaluationForm=this.fb.group({candidateName:[""],positionName:[""],rounds:this.fb.array([])})}get rounds(){return this.evaluationForm.get("rounds")}get formRawValue(){return this.evaluationForm.getRawValue()}createRound(t){return this.fb.group({interviewRound:[t.interviewRound],leadInterviewers:this.fb.array(t.leadInterviewers.map(n=>this.createLeadInterviewer(n)))})}createLeadInterviewer(t){return this.fb.group({leadInterviewer:[t.leadInterviewer],isAiInterview:[t.isAiInterview||!1],competencies:this.fb.array(t.competencies.map(n=>this.createCompetency(n))),techPositions:this.fb.array(t.techPositions.map(n=>this.createTechPosition(n))),noQuestionsConfigured:[t.noQuestionsConfigured||!1]})}createTechPosition(t){return this.fb.group({techPosition:[t.techPosition],questions:this.fb.array(t.questions.map(n=>this.createQuestion(n)))})}createCompetency(t){return this.fb.group({competencyName:[t.competencyName],questions:this.fb.array(t.questions.map(n=>this.createQuestion(n)))})}parseRatingScaleSnapshot(t){if(!t)return[];try{const n=JSON.parse(t);return Array.isArray(n)?n:[]}catch{return[]}}createQuestion(t){return this.fb.group({questions:t.questions||"",question:t.question||"",rating:t.rating,ratingValue:t.ratingValue||"",ratings:[this.parseRatingScaleSnapshot(t.ratingScaleSnapshot)],comment:t.comment,candidateAnswer:[t.candidateAnswer||""],questionType:[t.questionType||""]})}getLeadInterviewers(t){return t.get("leadInterviewers")}
1getCompetencies(t){return t.get("competencies")}getTechPositions(t){return t.get("techPositions")}getQuestions(t,n){return t.get(n)}loadRatingOptions(){this.httpService.callGetService(`${this.config.getRatingDefinitionData}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.data.fiscalYear}&childId=${this.data.childId}`).subscribe({next:n=>{this.ratingOptions=n.data}})}loadCandidateEvaluation(){const t=`${Pe.ad.evaluation}?candidateId=${this.data.candidateId}&jdId=${this.data.positionId}`,n=`${this.config.getCandidateEvaluation}?companyId=${this.loggedInUserCompanyID}&positionId=${this.data.positionId}&candidateId=${this.data.candidateId}&childId=${this.data.childId}`;this.loading=!0,(0,ze.p)({aiRes:this.httpService.callGetService(t).pipe(Si(4e3),(0,pt.W)(()=>(0,Be.of)(null))),standardRes:this.httpService.callGetService(n).pipe((0,pt.W)(()=>(0,Be.of)(null)))}).subscribe(({aiRes:o,standardRes:i})=>{this.loading=!1;let s=[],d="",u="",g=!1;if(i&&i.data){const m=i.data;d=m.candidateName||d,u=m.positionName||u,m.rounds&&Array.isArray(m.rounds)&&(s=[...s,...m.rounds]),m.ratingData&&Array.isArray(m.ratingData)&&m.ratingData.length>0&&(this.ratingOptions=m.ratingData,g=!0)}if(o&&o.data){const m=o.data.candidate_evaluation||o.data;d=d||m.candidateName,u=u||m.positionName,m.rounds&&Array.isArray(m.rounds)&&(s=[...s,...m.rounds]),m.ratingData&&Array.isArray(m.ratingData)&&m.ratingData.length>0&&(this.ratingOptions=m.ratingData,g=!0)}g||this.loadRatingOptions(),this.evaluationForm.patchValue({candidateName:d,positionName:u}),s.sort((m,l)=>Number(m.interviewRound)-Number(l.interviewRound)),this.rounds.clear(),s.forEach(m=>{this.rounds.push(this.createRound(m))}),this.evaluationForm.disable()})}downloadPDF(){const t=document.getElementById("pdfTemplate");t&&(this.downloadingPdf=!0,setTimeout(()=>{var n;const o={margin:10,filename:`${null===(n=this.evaluationForm.getRawValue().candidateName)||void 0===n?void 0:n.replace(/\s+/g,"_")}_Feedback_Report.pdf`,image:{type:"jpeg",quality:.98},html2canvas:{scale:2,useCORS:!0,logging:!0,width:800,windowWidth:800},jsPDF:{unit:"mm",format:"a4",orientation:"portrait"},pagebreak:{mode:["avoid-all","css","legacy"]}};Wt()().set(o).from(t).save().then(()=>{this.downloadingPdf=!1}).catch(()=>{this.downloadingPdf=!1,this.toastr.error("Failed to download the evaluation form PDF.","Error")})},0))}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(y.ok),e.rXU(we.Qq),e.rXU(q.tw),e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU(b.CP),e.rXU(b.Vh))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-panel-feedback-dialog"]],decls:33,vars:8,consts:[[1,"form-container",3,"formGroup"],[1,"cardLayout"],[1,"cardBoxHeading","font_medium","fs-16","pl-10"],["size","8"],["size","4",1,"text-right","head"],["src","./assets/icon/close_icon.png","alt","Close",1,"cp",3,"mat-dialog-close"],["id","feedbackContent",1,"card","feedback-section"],["class","pl-10 pr-10 pt-10 pb-10 text-center",4,"ngIf"],["class","pl-10 pr-10 pt-10 pb-10 d-flex align-items-center justify-content-between",4,"ngIf"],["formArrayName","rounds",4,"ngIf"],[2,"position","absolute","top","-999999px","left","0","width","800px","overflow","visible","-webkit-print-color-adjust","exact","print-color-adjust","exact"],["id","pdfTemplate",2,"width","800px","background","white","color","black","font-family","sans-serif","padding","30px"],[2,"display","flex","justify-content","space-between","align-items","center","border-bottom","2px solid #eeeeee","padding-bottom","15px","margin-bottom","25px"],["src","assets/icon/Phiedge-logo_HRMS_1.png",2,"height","45px"],[2,"text-align","right"],[2,"margin","0","color","#333","font-size","24px"],[2,"margin","5px 0","font-size","14px","color","#666"],[2,"margin-bottom","30px","padding","15px","background","#fcfcfc","border","1px solid #f0f0f0","border-radius","10px"],[2,"font-size","18px","margin-bottom","8px"],[2,"color","#222"],[2,"font-size","16px"],[2,"color","#444"],["style","margin-bottom: 40px;",4,"ngFor","ngForOf"],[1,"pl-10","pr-10","pt-10","pb-10","text-center"],["diameter","32",2,"margin","0 auto"],[1,"fs-14","mt-10",2,"color","#9e9e9e"],[1,"pl-10","pr-10","pt-10","pb-10","d-flex","align-items-center","justify-content-between"],[1,"text-right"],["diameter","20","style","display:inline-block;",4,"ngIf"],["src","./assets/icon/downloadIcon.svg","class","cp","alt","Download PDF","title","Download PDF","style","width: 20p
1x; height: 20px;",3,"click",4,"ngIf"],["diameter","20",2,"display","inline-block"],["src","./assets/icon/downloadIcon.svg","alt","Download PDF","title","Download PDF",1,"cp",2,"width","20px","height","20px",3,"click"],["formArrayName","rounds"],[3,"formGroupName",4,"ngFor","ngForOf"],[3,"formGroupName"],["formArrayName","leadInterviewers"],["formArrayName","competencies"],["class","fs-14 pl-10 pr-10 pt-10 pb-10",4,"ngIf"],["formArrayName","techPositions",4,"ngIf"],["formArrayName","questions",1,"pl-10","pr-10","pt-10","pb-10"],["class","mb-10",3,"formGroupName",4,"ngFor","ngForOf"],[1,"mb-10",3,"formGroupName"],[1,"fs-14","mb-10"],["class","mb-10",4,"ngIf"],["class","rating-options d-flex gap-10",4,"ngIf"],[1,"mb-10"],[1,"fs-14"],["readonly","",1,"comment-text","mt-5"],[1,"rating-options","d-flex","gap-10"],["class","rating-box-wrapper",4,"ngFor","ngForOf"],[1,"rating-box-wrapper"],[1,"rating-box"],[1,"rating-value"],[1,"rating-label"],[1,"fs-14","pl-10","pr-10","pt-10","pb-10"],["formArrayName","techPositions"],["class","mt-10",4,"ngIf"],[1,"mt-10"],["class","fs-14",4,"ngIf"],[2,"margin-bottom","40px"],[2,"background","#f5f5f5","padding","12px 20px","font-weight","bold","font-size","16px","border-radius","8px","margin-bottom","15px","border-left","5px solid #666"],["style","margin-left: 15px; margin-bottom: 25px; border: 1px solid #eee; border-radius: 10px; overflow: hidden;",4,"ngFor","ngForOf"],[2,"margin-left","15px","margin-bottom","25px","border","1px solid #eee","border-radius","10px","overflow","hidden"],[2,"background","#fafafa","padding","10px 15px","border-bottom","1px solid #eee","font-weight","600","color","#444"],[2,"padding","15px"],["style","margin-bottom: 20px;",4,"ngFor","ngForOf"],["style","margin-bottom: 20px; font-size: 14px;",4,"ngIf"],[2,"margin-bottom","20px"],[2,"font-weight","600","color","#555","margin-bottom","12px","font-size","14px","text-transform","uppercase","letter-spacing","0.5px"],["style","margin-left: 15px; margin-bottom: 15px; padding: 12px; background: #fdfdfd; border-radius: 8px; border: 1px solid #f9f9f9; -webkit-print-color-adjust: exact; print-color-adjust: exact;",4,"ngFor","ngForOf"],[2,"margin-left","15px","margin-bottom","15px","padding","12px","background","#fdfdfd","border-radius","8px","border","1px solid #f9f9f9","-webkit-print-color-adjust","exact","print-color-adjust","exact"],[2,"font-size","14px","margin-bottom","12px","line-height","1.4"],[2,"display","flex","gap","15px","flex-wrap","wrap"],["style","display: flex; flex-direction: column; align-items: center; width: 60px;",4,"ngFor","ngForOf"],[2,"display","flex","flex-direction","column","align-items","center","width","60px"],[1,"rating-box",2,"width","55px","height","35px","border","1px solid #333","border-radius","6px","display","flex","align-items","center","justify-content","center"],[2,"font-weight","bold"],[2,"margin-top","5px","font-size","11px","text-align","center"],[2,"margin-bottom","20px","font-size","14px"],[2,"font-weight","600","color","#555","margin-bottom","12px","font-size","14px","text-transform","uppercase"],[2,"font-size","14px","margin-bottom","12px"],["style","display: flex; gap: 15px; flex-wrap: wrap;",4,"ngIf"],["style","margin-top: 12px;",4,"ngIf"],[2,"margin-top","12px"],[2,"font-size","12px","color","#555"],[2,"background","#f9f9f9","border","1px solid #eee","padding","8px","border-radius","5px","font-size","13px","margin-top","5px","white-space","pre-wrap"]],template:function(t,n){1&t&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"ion-row")(4,"ion-col",3),e.EFF(5,"Lead Interviewer Feedback"),e.k0s(),e.j41(6,"ion-col",4),e.nrm(7,"img",5),e.k0s()()(),e.j41(8,"div",6),e.DNE(9,xi,4,0,"div",7)(10,Di,10,4,"div",8)(11,Vi,2,1,"mat-accordion",9),e.k0s()()(),e.j41(12,"div",10)(13,"div",11)(14,"div",12),e.nrm(15,"img",13),e.j41(16,"div",14)(17,"h2",15),e.EFF(18,"Interview Feedback Report"),e.k0s(),e.j41(19,"p",16),e.EFF(20),e.k0s()()(),e.j41(21,"div",17)(22,"div",18)(23,"strong"),e.EFF(24,"Candidate:"),e.k0s(),e.j41(25,"span",19),e.EFF(26),e.k0s()(),e.j41(27,"div",20)(28,"strong"),e.EFF(29,"Position Applied For:"),e.k0s(),e.j41(30,"span",21),e.EFF(31),e.k0s()()(),e.DNE(32,or,4,2,"div",22),e.k0s()()),2&t&&(e.Y8G("formGroup",n.evaluationForm),e.R7$(9),e.Y8G("ngIf",n.loading),e.R7$(),e.Y8G("ngIf",!n.loading),e.R7$(),e.Y8G("ngIf",!n.loading),e.R7$(9),e.SpI("Generated on: ",n.todayDate,""),e.R7$(6),e.JRh(n.formRawValue.candidateName),e.R7$(5),e.JRh(n.formRawValue.positionName),e.R7$(),e.Y8G("ngForOf",n.formRawValue.rounds))},dependencies:[K.Sq,K.bT,y.cb,J.hU,J.ln,y.j4,y.$R,y.v8,b.tx,nt.LG,bt.BS,bt.GK,bt.Z2,bt.WN],styles:[".headerBreadcrumb[_ngcontent-%COMP%]{background-color:#e6e6e6;display:flex;align-items:center;cursor:pointer}.cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 2px 6px #00000029;
1transition:box-shadow .3s ease;border-radius:10px;margin:20px;padding-bottom:10px} .mat-mdc-dialog-container .mdc-dialog__surface{border-radius:18px!important}.cardBoxHeading[_ngcontent-%COMP%]{background-color:#ddd;padding:5px 10px;color:#000;border-radius:10px 10px 0 0}.fs-14[_ngcontent-%COMP%]{font-size:14px}.fs-18[_ngcontent-%COMP%]{font-size:18px}.font_bold[_ngcontent-%COMP%]{font-weight:600}.font_semibold[_ngcontent-%COMP%]{font-weight:500}.mt-10[_ngcontent-%COMP%]{margin-top:40px}.mb-10[_ngcontent-%COMP%]{margin-bottom:10px}.mb-20[_ngcontent-%COMP%]{margin-bottom:20px}.pl-10[_ngcontent-%COMP%]{padding-left:10px}.pr-10[_ngcontent-%COMP%]{padding-right:10px}.pt-10[_ngcontent-%COMP%]{padding-top:10px}.pb-10[_ngcontent-%COMP%]{padding-bottom:10px}.black_color[_ngcontent-%COMP%]{color:#000}.mat-input-style[_ngcontent-%COMP%]{background:#f8f8f8;border-radius:5px}textarea.mat-input-element[_ngcontent-%COMP%]{min-height:80px;resize:vertical}.cp[_ngcontent-%COMP%]{cursor:pointer}.add_btn[_ngcontent-%COMP%]{color:#fff;border:none;padding:6px 12px;border-radius:5px;cursor:pointer}.text-success[_ngcontent-%COMP%]{color:green}form[_ngcontent-%COMP%]{max-height:90vh;overflow-y:auto}.rating-options[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:20px;justify-content:flex-start}.d-flex[_ngcontent-%COMP%]{display:flex!important}.align-items-center[_ngcontent-%COMP%]{align-items:center!important}.justify-content-between[_ngcontent-%COMP%]{justify-content:space-between!important}.gap-10[_ngcontent-%COMP%]{gap:10px}.rating-box-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;min-width:80px;text-align:center}.comment-text[_ngcontent-%COMP%]{width:100%;min-height:80px;max-height:200px;padding:10px;border-radius:5px;border:1px solid #ccc;background-color:#f8f8f8;resize:vertical;font-size:14px;line-height:1.4;color:#333;overflow-y:auto;margin-top:10px}.comment-text[_ngcontent-%COMP%]:focus{outline:none;border-color:#999}.rating-box[_ngcontent-%COMP%]{width:80px;height:50px;display:flex;align-items:center;justify-content:center;border:1px solid #333;border-radius:6px;cursor:pointer;transition:all .2s ease-in-out}.rating-box[_ngcontent-%COMP%] .rating-value[_ngcontent-%COMP%]{font-weight:700;font-size:16px}.rating-box[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.rating-box.selected[_ngcontent-%COMP%]{background-color:#0f0;border-color:#0a0}.rating-box.disabled-box[_ngcontent-%COMP%]{pointer-events:none;opacity:.5;cursor:not-allowed}.rating-label[_ngcontent-%COMP%]{margin-top:8px;font-size:12px;word-wrap:break-word;white-space:normal;max-width:100px}.error-text[_ngcontent-%COMP%]{font-size:12px;color:red;margin-top:4px}.feedback-section[_ngcontent-%COMP%]{max-height:80vh;overflow-y:auto;padding:1rem}.scrollable-rounds[_ngcontent-%COMP%]{max-height:500px;overflow-y:auto;padding-right:10px}.scrollable-rounds[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.scrollable-rounds[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background-color:#0000004d;border-radius:3px}"]}),p})();var rr=Y(57786),It=Y(96354),Nt=Y(25558),at=Y(70980);function sr(a,p){1&a&&e.nrm(0,"mat-spinner",11)}function ar(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",10),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.evaluateCandidate())}),e.EFF(1," Evaluate "),e.k0s()}if(2&a){const r=e.XpG();e.Y8G("disabled",r.isRowLoading)}}let lr=(()=>{var a;class p{agInit(t){this.params=t,this.row=t.data}refresh(t){return this.params=t,this.row=t.data,!0}get parent(){var t;return null===(t=this.params.context)||void 0===t?void 0:t.componentParent}get isAllCompanySelected(){var t;return null===(t=this.parent)||void 0===t?void 0:t.isAllCompanySelected}get loggedInUserRole(){var t;return null===(t=this.parent)||void 0===t?void 0:t.loggedInUserRole}get isRowLoading(){var t;return!(null===(t=this.parent)||void 0===t||!t.isRowActionInProgress(this.row))}isLeadInterviewerforedit(){var t;return null===(t=this.parent)||void 0===t?void 0:t.isLeadInterviewerforedit(this.row)}isLeadInterviewer(){var t;return null===(t=this.parent)||void 0===t?void 0:t.isLeadInterviewer(this.row)}isEligibleForNextRound(){var t;return null===(t=this.parent)||void 0===t?void 0:t.isEligibleForNextRound(this.row)}editInterview(){var t;null===(t=this.parent)||void 0===t||t.editInterview(this.row)}superDeleteInterview(){var t;null===(t=this.parent)||void 0===t||t.superDeleteInterview(this.row.candidateId,this.row.id)}evaluateCandidate(){var t;null===(t=this.parent)||void 0===t||t.evaluateCandidate(this.row)}hireCandidate(){var t;null===(t=this.parent)||void 0===t||t.hireCandidate(this.row)}offerCandidate(){var t;null===(t=this.parent)||void 0===t||t.offerCandidate(this.row)}scheduleNextRound(){var t;null===(t=this.parent)||void 0===t||t.scheduleNextRound(this.row)}rejectCandidate(){var t;null===(t=this.parent)||void 0===t||t.rejectCandidate(this.row)}deleteInterview(){var t;null===(t=this.parent)||void 0===t||t.deleteInterview(this.row.id,this.row.candidateId,this.row.interviewRound)}}return(a=p).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=e.VBU({type:a,selectors:[["app-interview-actions-cell-renderer"]],decls:24,vars:11,consts:[["menu","matMenu"],[1,"action-row"],["diameter","18",4,"ngIf"],["title","Edit",1,"ag-icon-btn",3,"click","disabled"],[1,"material-icons",2,"font-size","18px","color","#1976d2"],["title","Remove Candidate & All Rounds - Super Delete",1,"ag-icon-btn",3,"click","disabled"],[1,"material-icons",2,"font-size","18px","color","#d32f2f"],["t
1itle","More actions",1,"ag-icon-btn",3,"matMenuTriggerFor","disabled"],[1,"material-icons",2,"font-size","20px","color","#475569"],["mat-menu-item","",3,"disabled","click",4,"ngIf"],["mat-menu-item","",3,"click","disabled"],["diameter","18"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",1),e.DNE(1,sr,1,0,"mat-spinner",2),e.j41(2,"button",3),e.bIt("click",function(){return e.eBV(o),e.Njj(n.editInterview())}),e.j41(3,"span",4),e.EFF(4,"edit"),e.k0s()(),e.j41(5,"button",5),e.bIt("click",function(){return e.eBV(o),e.Njj(n.superDeleteInterview())}),e.j41(6,"span",6),e.EFF(7,"delete"),e.k0s()(),e.j41(8,"button",7)(9,"span",8),e.EFF(10,"more_vert"),e.k0s()()(),e.j41(11,"mat-menu",null,0),e.DNE(13,ar,2,1,"button",9),e.j41(14,"button",10),e.bIt("click",function(){return e.eBV(o),e.Njj(n.hireCandidate())}),e.EFF(15," Selected "),e.k0s(),e.j41(16,"button",10),e.bIt("click",function(){return e.eBV(o),e.Njj(n.offerCandidate())}),e.EFF(17," Offer "),e.k0s(),e.j41(18,"button",10),e.bIt("click",function(){return e.eBV(o),e.Njj(n.scheduleNextRound())}),e.EFF(19," Next Round "),e.k0s(),e.j41(20,"button",10),e.bIt("click",function(){return e.eBV(o),e.Njj(n.rejectCandidate())}),e.EFF(21," Reject "),e.k0s(),e.j41(22,"button",10),e.bIt("click",function(){return e.eBV(o),e.Njj(n.deleteInterview())}),e.EFF(23," Delete This Round "),e.k0s()()}if(2&t){const o=e.sdS(12);e.R7$(),e.Y8G("ngIf",n.isRowLoading),e.R7$(),e.Y8G("disabled",n.isAllCompanySelected||n.isRowLoading||"Evaluated"===n.row.finalStatus||"Hired"===n.row.finalStatus||"Offered"===n.row.finalStatus||"Rejected"===n.row.finalStatus||n.isLeadInterviewerforedit()),e.R7$(3),e.Y8G("disabled",n.isAllCompanySelected||n.isRowLoading||n.isLeadInterviewerforedit()),e.R7$(3),e.Y8G("matMenuTriggerFor",o)("disabled",n.isRowLoading),e.R7$(5),e.Y8G("ngIf",n.isLeadInterviewer()),e.R7$(),e.Y8G("disabled",n.isAllCompanySelected||n.isRowLoading||"Hired"===n.row.finalStatus||"Offered"===n.row.finalStatus||"Rejected"===n.row.finalStatus||n.isLeadInterviewerforedit()||"Admin"===n.loggedInUserRole),e.R7$(2),e.Y8G("disabled","Hired"!==n.row.finalStatus||n.isAllCompanySelected||n.isRowLoading||n.isLeadInterviewerforedit()||"Admin"===n.loggedInUserRole),e.R7$(2),e.Y8G("disabled",n.isAllCompanySelected||n.isRowLoading||"Offered"===n.row.finalStatus||!n.isEligibleForNextRound()||n.isLeadInterviewerforedit()),e.R7$(2),e.Y8G("disabled",n.isAllCompanySelected||n.isRowLoading||"Hired"===n.row.finalStatus||"Rejected"===n.row.finalStatus||"Offered"===n.row.finalStatus||n.isLeadInterviewerforedit()||"Admin"===n.loggedInUserRole||"HOD"===n.loggedInUserRole),e.R7$(2),e.Y8G("disabled",n.isAllCompanySelected||n.isRowLoading||n.isLeadInterviewerforedit())}},dependencies:[K.bT,Ge.kk,Ge.fb,Ge.Cp,nt.LG],encapsulation:2}),p})();function dr(a,p){1&a&&e.nrm(0,"mat-spinner",18)}function cr(a,p){if(1&a){const r=e.RV6();e.qex(0),e.j41(1,"button",19),e.bIt("click",function(){e.eBV(r),e.XpG();const n=e.sdS(3);return e.Njj(n.click())}),e.j41(2,"span",20),e.EFF(3,"upload_file"),e.k0s(),e.EFF(4," Upload "),e.k0s(),e.bVm()}if(2&a){const r=e.XpG();e.R7$(),e.Y8G("disabled",!r.canManageDoc||r.isLocked||r.isAllCompanySelected||r.isRowLoading)}}function ur(a,p){if(1&a&&(e.j41(0,"button",21)(1,"span",20),e.EFF(2,"description"),e.k0s(),e.EFF(3),e.k0s()),2&a){const r=e.XpG(),t=e.sdS(8);e.Y8G("matMenuTriggerFor",t)("disabled",r.isRowLoading),e.R7$(3),e.Lme(" ",r.docs.length," file",r.docs.length>1?"s":""," ")}}function pr(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",30),e.bIt("click",function(){e.eBV(r);const n=e.XpG().$implicit,o=e.XpG();return e.Njj(o.removeDoc(n))}),e.j41(1,"span",20),e.EFF(2,"delete_outline"),e.k0s()()}if(2&a){const r=e.XpG(2);e.Y8G("disabled",r.isAllCompanySelected||r.isRowLoading)}}function gr(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",22),e.bIt("click",function(n){return e.eBV(r),e.Njj(n.stopPropagation())}),e.j41(1,"span",23),e.EFF(2),e.k0s(),e.j41(3,"span",24)(4,"span",25),e.EFF(5),e.k0s(),e.j41(6,"span",26),e.EFF(7),e.k0s()(),e.j41(8,"span",27)(9,"button",28),e.bIt("click",function(){const n=e.eBV(r).$implicit,o=e.XpG();return e.Njj(o.downloadDoc(n))}),e.j41(10,"span",20),e.EFF(11,"download"),e.k0s()(),e.DNE(12,pr,3,1,"button",29),e.k0s()()}if(2&a){const r=p.$implicit,t=e.XpG();e.R7$(),e.Y8G("ngClass",t.fileChipClass(r)),e.R7$(),e.JRh(t.fileChipLabel(r)),e.R7$(2),e.Y8G("title",r.originalFileName),e.R7$(),e.JRh(r.originalFileName),e.R7$(2),e.JRh(t.fileSizeLabel(r)),e.R7$(2),e.Y8G("disabled",t.isRowLoading),e.R7$(3),e.Y8G("ngIf",t.canManageDoc&&!t.isLocked)}}function mr(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",31),e.bIt("click",function(){e.eBV(r),e.XpG();const n=e.sdS(3);return e.Njj(n.click())}),e.j41(1,"span",20),e.EFF(2,"add"),e.k0s(),e.EFF(3," Add file(s) "),e.k0s()}if(2&a){const r=e.XpG();e.Y8G("disabled",r.isAllCompanySelected||r.isRowLoading)}}let hr=(()=>{var a;class p{agInit(t){this.params=t,this.row=t.data}refresh(t){return this.params=t,this.row=t.data,!0}get parent(){var t;return null===(t=this.params.context)||void 0===t?void 0:t.componentParent}get isRowLoading(){var t;return!(null===(t=this.parent)||void 0===t||!t.isRowActionInProgress(this.row))}get isLocked(){var t;const n=((null===(t=this.row)||void 0===t?void 0:t.finalStatus)||"").toString().toLowerCase();return"hired"===n||"offered"===n||"rejected"===n}get canManageDoc(){var t;return!(null===(t=this.parent)||void 0===t||!t.canManageScreeningDoc)}get isAllCompanySelected(){var t;return null===(t=this.parent)||void 0===t?void 0:t.isAllCompanySelected}get docs(){var t;return(null===(t=this.row)||void 0===t?void 0:t.screeningDocs)||[]}get totalBytes(){return this.docs.reduce((t,n)=>t+(n.fileSize||0),0)}get usedLabel(){return this.formatFileSize(this.totalBytes)}get limitLabel(){return this.formatFileSize(p.MAX_SIZE_BYTES)}get usagePercent(){return Math.min(100,this.totalBytes/p.MAX_SIZE_BYTES*100)}get usageLevel(){const t=this.usagePercent;return t>=90?"danger":t>=70?"warn":"ok"}fileExt(t){const n=(null==t?void 0:t.originalFileName)||"";return n.includes(".")?n.split(".").pop().toLowerCase():""}fileChipClass(t){return p.EXT_CHIP_MAP[this.fileExt(t)]||"doc"}fileChipLabel(t){const n=this.fileExt(t);return(p.EXT_CHIP_MAP[n]||"doc").toUpperCase()}fileSizeLabel(t){return this.formatFileSize((null==t?void 0:t.fileSize)||0)}formatFileSize(t){return t>=1048576?`${(t/1048576).toFixed(1)} MB`:t>=1024?`${Math.round(t/1024)} KB`:`${t} B`}onFileSelected(t){var n;const o=t.target,i=null!=o&&o.files?Array.from(o.files):[];o&&(o.value=""),i.length&&(null===(n=this.parent)||void 0===n||n.uploadScreeningDoc(this.row,i))}downloadDoc(t){var n;null===(n=this.parent)||void 0===n||n.downloadScreeningDoc(this.row,t)}removeDoc(t){var n;null===(n=this.parent)||void 0===n||n.removeScreeningDoc(this.row,t)}}return(a=p).MAX_SIZE_BYTES=10485760,a.EXT_CHIP_MAP={pdf:"pdf",doc:"doc",docx:"doc",xls:"xls",xlsx:"xls",ppt:"ppt",pptx:"ppt"},a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=e.VBU({type:a,selectors:[["app-screening-doc-cell-renderer"]],decls:25,vars:15,consts:[["fileInput",""],["hasDocs",""],["docMenu","matMenu"],[1,"screening-doc-cell"],["diameter","16",4,"ngIf"],["type","file","hidden","","multiple","","accept",".pdf,.doc,.docx,.ppt,.pptx,.xls,.xlsx",3,"change"],[4,"ngIf","ngIfElse"],[1,"screening-doc-menu"],[1,"doc-menu-head",3,"click"],[1,"doc-menu-head-top"],[1,"doc-menu-title"],[1,"doc-menu-count"],[1,"doc-usage-track"],[1,"doc-usage-fill"],[1,"doc-usage-label"],[1,"doc-menu-list"],["class","doc-menu-row",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","","class","doc-add-btn",3,"disabled","click",4,"ngIf"],["diameter","16"],["type","button","title","Upload Screening Document(s)",1,"doc-upload-btn",3,"click","disabled"],[1,"material-icons",2,"font-size","16px"],["type","button",1,"doc-count-btn",3,"matMenuTriggerFor","disabled"],[1,"doc-menu-row",3,"click"],[1,"doc-chip",3,"ngClass"],[1,"doc-meta"],[1,"doc-name",3,"title"],[1,"doc-size"],[1,"doc-row-actions"],["title","Download",1,"ag-icon-btn",3,"click","disabled"],["class","ag-icon-btn doc-remove","title","Remove",3,"disabled","click",4,"ngIf"],["title","Remove",1,"ag-icon-btn","doc-remove",3,"click","disabled"],["mat-menu-item","",1,"doc-add-btn",3,"click","disabled"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",3),e.DNE(1,dr,1,0,"mat-spinner",4),e.j41(2,"input",5,0),e.bIt("change",function(s){return e.eBV(o),e.Njj(n.onFileSelected(s))}),e.k0s(),e.DNE(4,cr,5,1,"ng-container",6)(5,ur,4,4,"ng-template",null,1,e.C5r),e.j41(7,"mat-menu",7,2)(9,"div",8),e.bIt("click",function(s){return e.eBV(o),e.Njj(s.stopPropagation())}),e.j41(10,"div",9)(11,"span",10),e.EFF(12,"Screening documents"),e.k0s(),e.j41(13,"span",11),e.EFF(14),e.k0s()(),e.j41(15,"div",12),e.nrm(16,"div",13),e.k0s(),e.j41(17,"div",14)(18,"span"),e.EFF(19),e.k0s(),e.j41(20,"span"),e.EFF(21),e.k0s()()(),e.j41(22,"div",15),e.DNE(23,gr,13,7,"div",16),e.k0s(),e.DNE(24,mr,4,1,"button",17),e.k0s()()}if(2&t){const o=e.sdS(6);e.R7$(),e.Y8G("ngIf",n.isRowLoading),e.R7$(3),e.Y8G("ngIf",!n.docs.length)("ngIfElse",o),e.R7$(10),e.Lme("",n.docs.length," file",n.docs.length>
11?"s":"",""),e.R7$(2),e.xc7("width",n.usagePercent,"%"),e.AVh("warn","warn"===n.usageLevel)("danger","danger"===n.usageLevel),e.R7$(3),e.SpI("",n.usedLabel," used"),e.R7$(2),e.SpI("",n.limitLabel," limit"),e.R7$(2),e.Y8G("ngForOf",n.docs),e.R7$(),e.Y8G("ngIf",n.canManageDoc&&!n.isLocked)}},dependencies:[K.YU,K.Sq,K.bT,Ge.kk,Ge.fb,Ge.Cp,nt.LG],encapsulation:2}),p})(),fr=(()=>{var a;class p{constructor(){this.selected=!1,this.onRowSelected=()=>{this.selected=this.node.isSelected()||!1}}agInit(t){this.params=t,this.node=t.node,this.selected=this.node.isSelected()||!1,this.node.addEventListener("rowSelected",this.onRowSelected)}refresh(t){return this.params=t,this.selected=this.node.isSelected()||!1,!0}ngOnDestroy(){var t;null===(t=this.node)||void 0===t||t.removeEventListener("rowSelected",this.onRowSelected)}get isSelectable(){var t;return!(null===(t=this.params.context)||void 0===t||null===(t=t.componentParent)||void 0===t||!t.isRowRejectable(this.params.data))}toggle(){this.isSelectable&&this.node.setSelected(!this.node.isSelected())}}return(a=p).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=e.VBU({type:a,selectors:[["app-select-row-cell-renderer"]],decls:1,vars:2,consts:[["type","checkbox",1,"select-row-checkbox",3,"click","change","checked","disabled"]],template:function(t,n){1&t&&(e.j41(0,"input",0),e.bIt("click",function(){return n.toggle()})("change",function(i){return i.stopPropagation()}),e.k0s()),2&t&&e.Y8G("checked",n.selected)("disabled",!n.isSelectable)},encapsulation:2}),p})();const vr=["columnChooserBtn"];function br(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",21)(1,"button",22),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.addInterview())}),e.j41(2,"span",23),e.EFF(3,"add"),e.k0s(),e.EFF(4," Schedule Interview "),e.k0s()()}if(2&a){const r=e.XpG();e.R7$(),e.xc7("background-color",r.buttonColorName),e.Y8G("disabled",r.isAllCompanySelected)}}function _r(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",24),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.bulkRejectSelected())}),e.EFF(1),e.k0s()}if(2&a){const r=e.XpG();e.R7$(),e.SpI(" Bulk Reject (",r.selectedRowsCount,") ")}}function Cr(a,p){if(1&a&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG();e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}let yr=(()=>{var a;class p{isRowRejectable(t){if("Admin"===this.loggedInUserRole||"HOD"===this.loggedInUserRole)return!1;const n=null!=t&&t.finalStatus?String(t.finalStatus).toLowerCase():"";return"rejected"!==n&&"hired"!==n&&"selected"!==n&&"offered"!==n}get arrAllMonths(){return this._arrAllMonthsCacheKey!==this.loggedInCompanyFiscalyear&&(this._arrAllMonthsCacheKey=this.loggedInCompanyFiscalyear,this._arrAllMonthsCache="Apr_Mar"===this.loggedInCompanyFiscalyear?[...this.months.slice(3),...this.months.slice(0,3)]:this.months),this._arrAllMonthsCache}get selectedMonths(){return this.selectedMonthObjects.map(t=>t.key)}get allMonthsSelected(){return this.selectedMonthObjects.length===this.arrAllMonths.length}onMonthsChange(t){this.selectedMonthObjects=t,this.refreshTrigger$.next(),this.autoRefreshStarted||(this.startAutoRefresh(),this.autoRefreshStarted=!0)}constructor(t,n,o,i,s,d,u,g,m,l){this.httpService=t,this.config=n,this.encryptionService=o,this.dataRefreshService=i,this.dialog=s,this.sharedService=d,this.toastr=u,this.recruitmentService=g,this.router=m,this.http=l,this.candidatesIntrview=[],this.searchTerm="",this.actionLoadingRowIds=new Set,this.agColumnDefs=[],this.agRowData=[],this.gridFilterActive=!1,this.isClicked=!1,this.selectedRowsCount=0,this.gridOptions={getRowId:f=>String(f.data.id),pagination:!0,paginationPageSize:10,paginationPageSizeSelector:[5,10,25,50,75,100,200,500,1e3],suppressCellFocus:!0,rowHeight:48,popupParent:document.querySelector("body"),defaultColDef:{flex:1,minWidth:100,resizable:!0,sortable:!0,filter:!0},localeText:{noRowsToShow:"No records found"},rowSelection:"multiple",suppressRowClickSelection:!0,isRowSelectable:f=>this.isRowRejectable(f.data),onSelectionChanged:()=>{var f;this.selectedRowsCount=(null===(f=this.gridApi)||void 0===f?void 0:f.getSelectedRows().length)||0},postProcessPopup:f=>{var h;if("columnChooser"!==f.type)return;const v=null===(h=this.columnChooserBtn)||void 0===h?void 0:h.nativeElement,k=f.ePopup;if(!v||!k)return;const B=v.getBoundingClientRect();k.style.top=`${B.bottom+window.scrollY+4}px`,k.style.left="auto",k.style.right=document.documentElement.clientWidth-B.right+"px"},context:{componentParent:this},onCellClicked:f=>this.handleCellClick(f),onFilterChanged:()=>{var f;const h=null===(f=this.gridApi)||void 0===f?void 0:f.getFilterModel();this.gridFilterActive=!!h&&Object.keys(h).length>0}},this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsM
1D=!1,this.loggedInUserRoleIsEmployee=!1,this.loggedInUserRoleIsManager=!1,this.isAllCompanySelected=!1,this.loggedInCompanyMDCode=null,this.recruitmentYears=[],this.selectedYearForRecruitment="",this.fromYear="",this.toYear="",this.taskFromDate=null,this.taskToDate=null,this.selectedMonthObjects=[],this.monthDropdownSettings={singleSelection:!1,enableCheckAll:!0,selectAllText:"Select All",unSelectAllText:"Unselect All",idField:"key",textField:"name",itemsShowLimit:1,closeDropDownOnSelection:!1},this.destroy$=new Z.B,this.months=[{key:"01",name:"January"},{key:"02",name:"February"},{key:"03",name:"March"},{key:"04",name:"April"},{key:"05",name:"May"},{key:"06",name:"June"},{key:"07",name:"July"},{key:"08",name:"August"},{key:"09",name:"September"},{key:"10",name:"October"},{key:"11",name:"November"},{key:"12",name:"December"}],this._arrAllMonthsCacheKey=Symbol(),this._arrAllMonthsCache=[],this.originalData=[],this.refreshTrigger$=new Z.B,this.offerLetterApprovalFlow=null,this.appointmentLetterApprovalFlow=null,this.autoRefreshStarted=!1,this.hodDeptBandPairs=new Set}ngOnInit(){this.isAllCompanySelected=null===this.recruitmentService.getChildId(),this.recruitmentService.selectedChildId$.pipe((0,L.Q)(this.destroy$)).subscribe(t=>{var n;this.isAllCompanySelected=null===t,null===(n=this.gridApi)||void 0===n||n.refreshCells({force:!0})}),this.dataRefreshService.refreshNeeded$.pipe((0,Q.B)(300),(0,L.Q)(this.destroy$)).subscribe(()=>{this.initializeSessionData(),this.getPmsYearList(),this.loadLetterApprovalFlows()})}loadLetterApprovalFlows(){const t=this.recruitmentService.appendChildId(`${this.config.getApprovalFlowSetup}/${this.loggedInUserCompanyID}`);this.httpService.callGetService(t).subscribe({next:n=>{const o=(null==n?void 0:n.data)||[];this.offerLetterApprovalFlow=this.findApprovalFlowForLetter(o,"Offer_Letter"),this.appointmentLetterApprovalFlow=this.findApprovalFlowForLetter(o,"Appointment_Letter")},error:()=>{this.offerLetterApprovalFlow=null,this.appointmentLetterApprovalFlow=null}})}findApprovalFlowForLetter(t,n){var o,i,s;const d=(t||[]).find(u=>(u.approveLetter||"").split(",").map(g=>g.trim()).includes(n));return d?{reviewerUserId:null!==(o=d.reviewerUserId)&&void 0!==o?o:null,approverUserId:null!==(i=d.approverUserId)&&void 0!==i?i:null,approveLetter:null!==(s=d.approveLetter)&&void 0!==s?s:null}:null}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onGridReady(t){this.gridApi=t.api}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}resetGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.refreshCells()),this.gridFilterActive=!1,this.refreshTrigger$.next()}setAgColumnDefs(){const t=[];this.canBulkReject&&t.push({headerName:"select",cellRenderer:fr,headerCheckboxSelection:!0,headerCheckboxSelectionFilteredOnly:!0,width:50,minWidth:50,maxWidth:50,sortable:!1,filter:!1,pinned:"left"}),t.push({headerName:"Name",field:"candidateName",minWidth:200,cellRenderer:n=>n.value?`<span title="${n.value}">${n.value}</span>`:""},{headerName:"Email ID",field:"email",minWidth:200,cellRenderer:n=>n.value?`<span title="${n.value}">${n.value}</span>`:""},{headerName:"Phone",field:"phone",minWidth:120},{headerName:"Dept",field:"department",minWidth:120},{headerName:"Band",field:"band",minWidth:90},{headerName:"Position",field:"positionName",minWidth:180,cellRenderer:n=>n.value?`<span title="${n.value}">${n.value}</span>`:""},{headerName:"Exp(yrs)",field:"yearOfExperience",minWidth:90},{headerName:"Interview At",field:"interviewDate",minWidth:180,cellRenderer:n=>{const o=n.data;if(!o.interviewDate)return"";const i=new Date(o.interviewDate),g=`${`0${i.getDate()}`.slice(-2)}/${`0${i.getMonth()+1}`.slice(-2)}/${i.getFullYear()}`,m=this.formatInterviewTime(o.interviewDate,o.interviewTime);return m?`${g} ${m}`:g}},{headerName:"Mode",field:"interviewMode",minWidth:110},{headerName:"Location/URL",field:"interviewLocation",minWidth:130,sortable:!1,
1cellRenderer:n=>this.renderLocationCell(n)},{headerName:"Lead Interviewer",field:"leadInterviewer",minWidth:200,cellRenderer:n=>{const o=this.getLeadInterviewerName(n.value);return o?`<span title="${o}">${o}</span>`:""}},{headerName:"Panel Members",field:"panelMembers",minWidth:200,cellRenderer:n=>{if(!n.value)return"";const o=this.getPanelNames(n.value);return o?`<span title="${o}">${o}</span>`:""}},{headerName:"External Panel",field:"externalPanelMembers",minWidth:180,cellRenderer:n=>n.value?`<span title="${n.value}">${n.value}</span>`:""},{headerName:"Source",field:"source",minWidth:120,cellRenderer:n=>n.value?`<span title="${n.value}">${n.value}</span>`:""},{headerName:"Round",field:"interviewRound",minWidth:90},{headerName:"Screening Doc",field:"screeningDocs",minWidth:100,sortable:!1,filter:!1,cellRenderer:hr,cellClass:"center-content-cell"},{headerName:"Result",field:"finalStatus",minWidth:170,cellRenderer:n=>this.renderFinalStatusCell(n),cellClass:"center-content-cell"}),t.push({headerName:"Actions",minWidth:200,sortable:!1,filter:!1,cellRenderer:lr,cellClass:"center-content-cell"}),this.agColumnDefs=t}get isMDOrHOD(){return this.loggedInUserRoles.some(t=>"MD"===t.displayName)||"HOD"===this.loggedInUserRole}get canManageScreeningDoc(){return!this.isMDOrHOD&&!this.loggedInUserRoleIsEmployee&&!this.loggedInUserRoleIsManager}truncateCell(t,n=25){return t?t.length>n?`${t.slice(0,n)}...`:t:""}renderLocationCell(t){const n=t.data;return"ONLINE"!==n.interviewMode&&"AI"!==n.interviewMode||!n.interviewUrl?n.interviewLocation?`<span>${n.interviewLocation}</span>`:"":`<button data-action="open-link" class="ag-icon-btn" ${"AI"===n.interviewMode&&"HR Admin"!==this.loggedInUserRole&&"Super Admin"!==this.loggedInUserRole?"disabled":""} style="color:#9c27b0;font-size:13px;">Join</button>`}renderFinalStatusCell(t){const n=t.value?String(t.value).toLowerCase():"";let o=this.getFinalStatusLabel(t.value);return`<span class="status-badge-report ${this.getFinalStatusClass(t.value)}" ${"rejected"===n&&t.data.reason?`title="${t.data.reason}"`:""}>${o}</span>`}handleCellClick(t){var n;const o=null===(n=t.event)||void 0===n?void 0:n.target,i=null==o?void 0:o.closest("[data-action]");i&&"open-link"===i.getAttribute("data-action")&&this.openInterviewLink(t.data.interviewUrl)}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsMD=this.loggedInUserRoles.some(o=>"MD"===o.displayName),this.loggedInUserRoleIsEmployee="Employee"===this.loggedInUserRole,this.loggedInUserRoleIsManager="Manager"===this.loggedInUserRole,this.setAgColumnDefs()}getPmsYearList(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.recruitmentYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.recruitmentYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-")),this.setDefaultMonth(),this.refreshTrigger$.next(),this.autoRefreshStarted||(this.startAutoRefresh(),this.autoRefreshStarted=!0)}startAutoRefresh(){(0,rr.h)(this.refreshTrigger$,(0,ut.Y)(1e4).pipe((0,It.T)(()=>{}))).pipe((0,Q.B)(100),(0,Nt.n)(()=>this.fetchInterviewData()),(0,L.Q)(this.destroy$)).subscribe({next:t=>this.processResponse(t),error:t=>console.error("Error loading interviews:",t)})}onYearChange(t){this.selectedYearForRecruitment=t,this.setDefaultMonth(),this.refreshTrigger$.next(),this.autoRefreshStarted||(this.startAutoRefresh(),this.autoRefreshStarted=!0)}setDefaultMonth(){this.selectedMonthObjects=[...this.arrAllMonths],this.autoRefreshStarted||(this.startAutoRefresh(),this.autoRefreshStarted=!0)}filterSearch(){var t;null===(t=this.gridApi)||void 0===t||t.setGridOption("quickFilterText",this.searchTerm)}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}clearAllFilters(){this.gridApi&&(this.gridApi.setFilterModel(null),this.gridFilterActive=!1)}get isAnyFilterApplied(){return this.gridFilterActive}getInterviewDateTime(t){const n=new Date(t.interviewDate),[o,i]=(t.interviewTime||"00:00").split(":");return n.setHours(+o||0,+i||0,0,0),n}viewInterview(t){}addInterview(){const t=new b.ru;t.disableClose=!0,t.height="70%",t.width="70%",t.panelClass="custom-dialog-container",t.data={},this.dialog.open(Rt,t).afterClosed().subscribe(o=>{o&&this.refreshTrigger$.next()})}editInterview(t){const n=new b.ru;n.disableClose=!0,n.height="70%",n.width="70%",n.panelClass="custom-dialog-container",n.data={interview:t},this.dialog.open(Rt,n).afterClosed().subscribe(i=>{i&&this.refreshTrigger$.next()})}superDeleteInterview(t,n){this.dialog.open(le.$,{disableClose:!0,height:"25%",width:"30%",data:{msg:"Are you sure you want to delete this candidate and all interview rounds? This action cannot be undone.",btn1:"Cancel",btn2:"Yes, Delete All",btn2BgColor:this.buttonColorName,showSuccessIcon:!1,showSuccessMessage:!1,showCloseIcon:!1}}).afterClosed().subscribe(i=>{if(!i)return;const d=this.agRowData.filter(m=>String(m.candidateId)===String(t)).reduce((m,l)=>l.interviewRound>((null==m?void 0:m.interviewRound)||0)?l:m,null);if("AI"===(null==d?void 0:d.interviewMode)&&"scheduled"===((null==d?void 0:d.finalStatus)||"").toLowerCase()&&null!=d&&d.aiInterviewId){const m=sessionStorage.getItem("currentToken")||sessionStorage.getItem("token"),l=new we.Lr({"Content-Type":"application/json","user-id":String(this.loggedInUserId||""),"company-id":String(this.loggedInUserCompanyID||""),Authorization:`Bearer ${m||""}`});this.http.patch(Pe.TE.CANCEL(String(d.aiInterviewId)),{reason:"Candidate rescheduled"},{headers:l}).subscribe({next:()=>console.log("Last AI round cancelled successfully"),error:f=>console.error("Cancel API error:",f)})}const g=this.recruitmentService.appendChildId(`${this.config.superDeleteCandidateUrl}?candidateId=${t}&deletedBy=${this.loggedInUserId}`);this.setRowLoading(n,!0),this.httpService.callPutService(g,{}).subscribe({next:()=>{this.toastr.success("Candidate and all interview rounds deleted successfully.","Deleted",{timeOut:3e3,progressBar:!0}),this.refreshTrigger$.next();const l=this.recruitmentService.appendChildId(`${this.config.SuperDeleteEvaluation}?candidateId=${t}`);this.httpService.callPutService(l,{}).pipe((0,at.j)(()=>this.setRowLoading(n,!1))).subscribe({next:()=>{this.refreshTrigger$.next()},error:f=>{this.refreshTrigger$.next()}})},error:m=>{var l;this.setRowLoading(n,!1),this.toastr.error((null===(l=m.error)||void 0===l?void 0:l.message)||"Failed to delete candidate and all roun
1ds.","Error",{timeOut:3e3,progressBar:!0})}})})}deleteInterview(t,n,o,i){this.dialog.open(le.$,{disableClose:!0,height:"25%",width:"30%",data:{msg:"Are you sure you want to delete this round?",btn1:"Cancel",btn2:"Yes",btn2BgColor:this.buttonColorName,showSuccessIcon:!1,showSuccessMessage:!1,showCloseIcon:!1}}).afterClosed().subscribe(d=>{if(!d)return;const u=((null==i?void 0:i.finalStatus)||"").toLowerCase();if("AI"===(null==i?void 0:i.interviewMode)&&["scheduled"].includes(u)&&i.aiInterviewId){const l=sessionStorage.getItem("currentToken")||sessionStorage.getItem("token"),f=new we.Lr({"Content-Type":"application/json","user-id":String(this.loggedInUserId||""),"company-id":String(this.loggedInUserCompanyID||""),Authorization:`Bearer ${l||""}`});this.http.patch(Pe.TE.CANCEL(String(i.aiInterviewId)),{reason:"Candidate rescheduled"},{headers:f}).subscribe({next:()=>console.log("AI interview cancelled successfully"),error:h=>console.error("Cancel API error:",h)})}const m=this.recruitmentService.appendChildId(`${this.config.softDeleteInterviewUrl}?candidateId=${n}&interviewRound=${o}&deletedBy=${this.loggedInUserId}`);this.setRowLoading(t,!0),this.httpService.callPutService(m,{deletedBy:this.loggedInUserId}).subscribe({next:()=>{this.toastr.success("Current interview round deleted successfully.","Deleted",{timeOut:3e3,progressBar:!0}),this.refreshTrigger$.next();const f=this.recruitmentService.appendChildId(`${this.config.SoftDeleteEvaluation}?candidateId=${n}&interviewRound=${o}`);this.httpService.callPutService(f,{}).pipe((0,at.j)(()=>this.setRowLoading(t,!1))).subscribe({next:()=>{this.refreshTrigger$.next()},error:h=>{this.refreshTrigger$.next()}})},error:l=>{var f;this.setRowLoading(t,!1),this.toastr.error((null===(f=l.error)||void 0===f?void 0:f.message)||"Failed to delete the interview.","Error",{timeOut:3e3,progressBar:!0})}})})}openInterviewLink(t){window.open(t,"_blank")}onFileSelected(t){var n;const i=null===(n=t.target.files)||void 0===n?void 0:n[0];i&&(i.name.endsWith(".xlsx")||i.name.endsWith(".xls"))}downloadInterviews(){if(!this.gridApi)return;const t=this.gridApi.paginationGetCurrentPage(),n=this.gridApi.paginationGetPageSize(),o=t*n,i=o+n,s=[];this.gridApi.forEachNodeAfterFilterAndSort(f=>s.push(f.data));const d=s.slice(o,i);if(!d.length)return void this.toastr.info("No data to download for this page.","Info");const u=d.map(f=>{const h=f.interviewDate?new Date(f.interviewDate):null,v=h?h.toLocaleDateString("en-GB"):"",k=this.formatInterviewTime(f.interviewDate,f.interviewTime);return{Name:f.candidateName||"",Email:f.email||"",Phone:f.phone||"",Department:f.department||"",Band:f.band||"",Position:f.positionName||"","Year of Experience":f.yearOfExperience||"","Interview Date Time":v&&k?`${v} ${k}`:v||k,"Interview Type":f.interviewMode||"","Location / URL":"ONLINE"===f.interviewMode?f.interviewUrl||"":f.interviewLocation||"","Panel Members":Array.isArray(f.panelMembers)?f.panelMembers.join(", "):"object"==typeof f.panelMembers&&null!==f.panelMembers?Object.values(f.panelMembers).join(", "):f.panelMembers||"","External Panel Members":f.externalPanelMembers||"","Lead Interviewer":"string"==typeof f.leadInterviewer?f.leadInterviewer:Object.values(f.leadInterviewer||{}).join(", "),Source:f.source||"","Round Status":f.interviewRound||"","Final Status":this.getFinalStatusLabel(f.finalStatus)}}),m={Sheets:{Interviews:F.utils.json_to_sheet(u)},SheetNames:["Interviews"]},l=F.write(m,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([l],{type:"application/octet-stream"}),`Interview_Schedule_Page_${t+1}.xlsx`)}downloadVisibleColumns(){if(!this.gridApi)return;const t=this.gridApi.getAllDisplayedColumns().map(h=>h.getColDef()).filter(h=>h.field&&"Actions"!==h.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=n*o,s=i+o,d=[];this.gridApi.forEachNodeAfterFilterAndSort(h=>d.push(h.data));const u=d.slice(i,s);if(!u.length)return void this.toastr.info("No data to download for this page.","Info");const g=u.map(h=>{const v={};for(const k of t)v[k.headerName]=this.getInterviewCellValue(h,k.field);return v}),l={Sheets:{Interviews:F.utils.json_to_sheet(g)},SheetNames:["Interviews"]},f=F.write(l,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([f],{type:"application/octet-stream"}),`Interview_Schedule_Page_${n+1}.xlsx`)}
1getInterviewCellValue(t,n){switch(n){case"interviewDate":{if(!t.interviewDate)return"";const i=new Date(t.interviewDate).toLocaleDateString("en-GB"),s=this.formatInterviewTime(t.interviewDate,t.interviewTime);return i&&s?`${i} ${s}`:i||s}case"interviewLocation":return"ONLINE"===t.interviewMode||"AI"===t.interviewMode?t.interviewUrl||"":t.interviewLocation||"";case"leadInterviewer":return"string"==typeof t.leadInterviewer?t.leadInterviewer:Object.values(t.leadInterviewer||{}).join(", ");case"panelMembers":return Array.isArray(t.panelMembers)?t.panelMembers.join(", "):"object"==typeof t.panelMembers&&null!==t.panelMembers?Object.values(t.panelMembers).join(", "):t.panelMembers||"";case"finalStatus":return this.getFinalStatusLabel(t.finalStatus);default:return null!=t[n]?String(t[n]):""}}createInterviewPayload(t,n,o,i){var s;return{candidateId:t.candidateId,candidateName:t.candidateName,childId:this.recruitmentService.getChildId(),positionName:t.positionName,yearOfExperience:t.yearOfExperience,positionId:t.positionId,interviewDate:this.formatDate(new Date),interviewTime:t.interviewTime,interviewMode:t.interviewMode,interviewUrl:t.interviewUrl,interviewLocation:t.interviewLocation,interviewRound:n,panelMembers:t.panelMembers,leadInterviewer:t.leadInterviewer,externalPanelMembers:null!==(s=t.externalPanelMembers)&&void 0!==s?s:"",source:t.source,fiscalYear:this.selectedYearForRecruitment,month:(new Date).getMonth()+1,companyId:this.loggedInUserCompanyID,email:t.email,phone:t.phone,department:t.department,band:t.band,finalStatus:o,isDeleted:0,reason:i,rejectedById:"Rejected"===o?this.loggedInUserId:void 0,positionCreatedById:t.positionCreatedById,positionCreatedByName:t.positionCreatedByName,positionCreatedByUserRole:t.positionCreatedByUserRole,interviewCreatedById:t.interviewCreatedById,interviewCreatedByName:t.interviewCreatedByName,interviewCreatedByUserRole:t.interviewCreatedByUserRole,hods:t.hods||{}}}formatDate(t){const n=new Date(t);return`${n.getFullYear()}-${`0${n.getMonth()+1}`.slice(-2)}-${`0${n.getDate()}`.slice(-2)}`}loadEvaluationSummary(t){const o=this.recruitmentService.appendChildId(`${this.config.getEvaluationDetails}?interviewId=${t}`);this.httpService.callGetService(o).subscribe({next:i=>{this.refreshTrigger$.next()},error:i=>{this.toastr.error("Failed to add interview","Error",{timeOut:3e3,progressBar:!0})}})}isRowActionInProgress(t){return this.actionLoadingRowIds.has(null==t?void 0:t.id)}setRowLoading(t,n){null!=t&&(n?this.actionLoadingRowIds.add(t):this.actionLoadingRowIds.delete(t))}uploadScreeningDoc(t,n){if(!this.canManageScreeningDoc)return;const o=n.find(g=>{const m=g.name.includes(".")?g.name.split(".").pop().toLowerCase():"";return!p.SCREENING_DOC_ALLOWED_EXTENSIONS.includes(m)});if(o)return void this.toastr.error(`Unsupported file type: ${o.name}. Allowed types: PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX.`,"Error",{timeOut:3e3});const i=(t.screeningDocs||[]).reduce((g,m)=>g+(m.fileSize||0),0);if(i+n.reduce((g,m)=>g+m.size,0)>p.SCREENING_DOC_MAX_SIZE_BYTES){const g=Math.max(0,(p.SCREENING_DOC_MAX_SIZE_BYTES-i)/1048576);return void this.toastr.error(`Combined size of all screening documents must not exceed 10MB. Only ${g.toFixed(1)}MB remaining for this record.`,"Error",{timeOut:4e3})}const d=`${this.config.uploadScreeningDoc}/${t.id}`,u=new FormData;n.forEach(g=>u.append("files",g)),u.append("uploadedBy",this.loggedInUserId||""),this.setRowLoading(t.id,!0),this.httpService.submitFileService(d,u,"POST").pipe((0,at.j)(()=>this.setRowLoading(t.id,!1))).subscribe({next:()=>{this.toastr.success(n.length>1?"Documents uploaded":"Document uploaded","Success",{timeOut:2e3}),this.refreshTrigger$.next()},error:g=>{var m;this.toastr.error((null==g||null===(m=g.error)||void 0===m?void 0:m.message)||"Upload failed","Error",{timeOut:3e3})}})}downloadScreeningDoc(t,n){const o=`${this.config.viewScreeningDoc}/${t.id}/${n.id}`;this.setRowLoading(t.id,!0),this.httpService.callGetServiceBlob(o).pipe((0,at.j)(()=>this.setRowLoading(t.id,!1))).subscribe({next:i=>{U.saveAs(i,n.originalFileName||"screening-document")},error:()=>{this.toastr.error("Failed to download document","Error",{timeOut:3e3})}})}removeScreeningDoc(t,n){this.canManageScreeningDoc&&this.dialog.open(le.$,{disableClose:!0,height:"25%",width:"30%",data:{msg:`Are you sure you want to remove "${n.originalFileName}"?`,btn1:"Cancel",btn2:"Yes, Remove",btn2BgColor:this.buttonColorName,showSuccessIcon:!1,showSuccessMessage:!1,showCloseIcon:!1}}).afterClosed().subscribe(o=>{if(!o)return;const i=`${this.config.deleteScreeningDoc}/${t.id}/${n.id}`;this.setRowLoading(t.id,!0),this.httpService.callDeleteService(i).pipe((0,at.j)(()=>this.setRowLoading(t.id,!1))).subscribe({next:()=>{this.toastr.success("Document removed","Success",{timeOut:2e3}),this.refreshTrigger$.next()},error:()=>{this.toastr.error("Failed to remove document","Error",{timeOut:3e3})}})})}addInterviewEntry(t,n){const i=this.recruitmentService.appendChildId(this.config.addInterviewDetails);this.setRowLoading(n,!0),this.httpService.callPostService(i,[t]).pipe((0,at.j)(()=>this.setRowLoading(n,!1))).subscribe({next:()=>{this.refreshTrigger$.next()},error:s=>{this.toastr.error("Failed to add interview","Error",{timeOut:3e3,progressBar:!0})}})}evaluateCandidate(t){const n=new b.ru;n.disableClose=!0,n.height="70%",n.width="70%",n.panelClass="custom-dialog-container",n.data={candidateId:t.candidateId,interviewRound:t.interviewRound,interviewId:t.id,fiscalYear:this.selectedYearForRecruitment,month:this.selectedMonths.join(","),positionId:t.positionId,childId:t.childId},this.dialog.open(ir,n).afterClosed().subscribe(i=>{})}hireCandidate(t){const n=Number(t.interviewRound)||1;this.dialog.open(le.$,{height:"25%",width:"30%",disableClose:!0,data:{msg:"Are you sure you want to Hire this candidate?",btn1:"Cancel",btn2:"Confirm",btn2BgColor:this.buttonColorName,showSuccessIcon:!0,showSuccessMessage:!1,showCloseIcon:!0}}).afterClosed().subscribe(o=>{if(o){const i=this.createInterviewPayload(t,n,"Hired");this.addInterviewEntry(i,t.id),this.openOfferLetterPopup(t,n)}})}offerCandidate(t){const n=Number(t.interviewRound)||1;this.openOfferLetterPopup(t,n)}openOfferLetterPopup(t,n){this.dialog.open(le.$,{height:"25%",width:"35%",disableClose:!0,data:{msg:"Do you want to send the Offer Letter and Application Form to the candidate?",btn1:"No",btn2:"Yes",btn2BgColor:this.buttonColorName,showSuccessIcon:!0,showSuccessMessage:!1,showCloseIcon:!0}}).afterClosed().subscribe(o=>{if(o){var i,s,d,u,g,m,l,f,h,v;
1const k=new b.ru;k.disableClose=!0,k.height="70%",k.width="70%",k.panelClass="custom-dialog-container";const B=new Set;[null===(i=this.offerLetterApprovalFlow)||void 0===i?void 0:i.approveLetter,null===(s=this.appointmentLetterApprovalFlow)||void 0===s?void 0:s.approveLetter].forEach(ae=>(ae||"").split(",").map(me=>me.trim()).filter(Boolean).forEach(me=>B.add(me))),k.data={candidateData:t,reviewerUserId:null!==(d=null===(u=this.offerLetterApprovalFlow)||void 0===u?void 0:u.reviewerUserId)&&void 0!==d?d:null,approverUserId:null!==(g=null===(m=this.offerLetterApprovalFlow)||void 0===m?void 0:m.approverUserId)&&void 0!==g?g:null,approveLetter:B.size?Array.from(B).join(","):null,appointmentReviewerUserId:null!==(l=null===(f=this.appointmentLetterApprovalFlow)||void 0===f?void 0:f.reviewerUserId)&&void 0!==l?l:null,appointmentApproverUserId:null!==(h=null===(v=this.appointmentLetterApprovalFlow)||void 0===v?void 0:v.approverUserId)&&void 0!==h?h:null},this.dialog.open(pi.v,k).afterClosed().subscribe(ae=>{if(ae){const me=this.createInterviewPayload(t,n,"Offered");this.addInterviewEntry(me,t.id),this.refreshTrigger$.next()}})}})}scheduleNextRound(t){const o=(Number(t.interviewRound)||0)+1,i={...t,interviewRound:o,roundType:o,finalStatus:"Scheduled",panelMembers:t.panelMembers||{},leadInterviewer:t.leadInterviewer||{},hods:t.hods,previousInterviewId:t.id,id:null},s=new b.ru;s.disableClose=!0,s.height="70%",s.width="70%",s.panelClass="custom-dialog-container",s.data={interview:i},this.dialog.open(Rt,s).afterClosed().subscribe(u=>{u&&this.refreshTrigger$.next()})}rejectCandidate(t){this.dialog.open(At,{width:"700px",data:t}).afterClosed().subscribe(o=>{if(o){const i=Number(t.interviewRound)||1,s=this.createInterviewPayload(t,i,"Rejected",o);this.addInterviewEntry(s,t.id)}})}get canBulkReject(){return["Super Admin","HR Admin"].includes(this.loggedInUserRole)}bulkRejectSelected(){var t;if(!this.canBulkReject)return;const n=(null===(t=this.gridApi)||void 0===t?void 0:t.getSelectedRows())||[];n.length&&this.dialog.open(At,{width:"700px",data:{count:n.length}}).afterClosed().subscribe(i=>{if(!i)return;const s=n.map(d=>this.createInterviewPayload(d,Number(d.interviewRound)||1,"Rejected",i));this.addInterviewEntries(s,n.map(d=>d.id))})}addInterviewEntries(t,n){const i=this.recruitmentService.appendChildId(this.config.addInterviewDetails);n.forEach(s=>this.setRowLoading(s,!0)),this.httpService.callPostService(i,t).pipe((0,at.j)(()=>n.forEach(s=>this.setRowLoading(s,!1)))).subscribe({next:()=>{var s;null===(s=this.gridApi)||void 0===s||s.deselectAll(),this.toastr.success(`${t.length} candidate(s) rejected`,"Success",{timeOut:3e3,progressBar:!0}),this.refreshTrigger$.next()},error:()=>{this.toastr.error("Failed to reject selected candidates","Error",{timeOut:3e3,progressBar:!0})}})}getLeadInterviewerName(t){return"string"==typeof t?t:t&&"object"==typeof t?Object.values(t).join(", "):""}getFinalStatusClass(t){const n=t?String(t).toLowerCase():"";let o="status-pending";return"hired"===n||"selected"===n?o="status-selected":"rejected"===n?o="status-rejected":"offered"===n?o="status-offered":"scheduled"===n?o="status-scheduled":"evaluated"===n?o="status-evaluated":"process"===n&&(o="status-process"),o}getFinalStatusLabel(t){if(!t)return"";const n=t.toLowerCase();return"hired"===n||"selected"===n?"Selected":t}getPanelNames(t){return Object.values(t).join(", ")}formatInterviewTime(t,n){if(!t||!n)return"";const[o,i]=n.split(":").map(Number),s=new Date(t);return s.setHours(o,i),s.toLocaleTimeString([],{hour:"numeric",minute:"numeric",hour12:!0})}isLeadInterviewerforedit(t){return!["Super Admin","HR Admin"].includes(this.loggedInUserRole)&&(!("HOD"!==this.loggedInUserRole&&!this.loggedInUserRoleIsMD)||!((t.assignedAdmins?Object.keys(t.assignedAdmins).map(i=>String(i)):[]).includes(String(this.loggedInUserId))||!t.leadInterviewer)&&Object.keys(t.leadInterviewer).map(i=>String(i)).includes(String(this.loggedInUserId)))}isLeadInterviewer(t){if(!t)return!1;const n=String(this.loggedInUserId),o=this.loggedInUserRole,i=(this.intHODempCode||"").trim().toUpperCase();if(["Super Admin","HR Admin","Admin"].includes(o))return!0;
1if(this.loggedInUserRoleIsMD)return(t.leadInterviewer?Object.keys(t.leadInterviewer).map(d=>String(d)):[]).includes(n);if("HOD"===o){const s=String(t.positionCreatedById)===n,d="admin"===String(t.positionCreatedByUserRole).toLowerCase(),g=(t.hods?Object.keys(t.hods).map(f=>f.trim().toUpperCase()):[]).includes(i),l=(t.leadInterviewer?Object.keys(t.leadInterviewer).map(f=>String(f)):[]).includes(n);return(s||g||l)&&!d&&l}if("Admin"===o){const s=String(t.positionCreatedById)===n&&"admin"===String(t.positionCreatedByUserRole).toLowerCase(),d=!!t.assignedAdmins&&Object.keys(t.assignedAdmins).map(u=>String(u)).includes(n);return s||d}return!!t.leadInterviewer&&Object.keys(t.leadInterviewer).map(d=>String(d)).includes(n)}isEligibleForNextRound(t){return"Hired"!==t.finalStatus&&"Rejected"!==t.finalStatus&&("Evaluated"===t.finalStatus||!(!t.interviewDate||!t.interviewTime)&&new Date(`${t.interviewDate}T${t.interviewTime}`)<new Date)}fetchMyHodDeptBandPairs(){if("HOD"!==this.loggedInUserRole||!this.intHODempCode)return(0,Be.of)(null);const t=`${this.config.getMyHodDeptBandPairs}?hodEmployeeCode=${encodeURIComponent(this.intHODempCode)}&companyId=${this.loggedInUserCompanyID}`,n=this.recruitmentService.appendChildId(t);return this.httpService.callGetService(n).pipe((0,pt.W)(()=>(0,Be.of)(null)))}fetchInterviewData(){const t=`fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonths.join(",")}`,n=this.recruitmentService.appendChildId(`${this.config.getLatestInterviewCandidate}?companyId=${this.loggedInUserCompanyID}&${t}`),o=this.httpService.callGetService(n);let i;if("HOD"===this.loggedInUserRole&&this.loggedInUserId){const d=this.httpService.callGetService(`${this.config.getLatestInterviewCandidate}?companyId=${this.loggedInUserCompanyID}&leadInterviewerUserId=${this.loggedInUserId}&${t}`);i=(0,ze.p)([o,d]).pipe((0,It.T)(([u,g])=>{const m=Array.isArray(null==u?void 0:u.data)?u.data:[],l=Array.isArray(null==g?void 0:g.data)?g.data:[],f=new Set(m.map(v=>v.id));return{data:[...m,...l.filter(v=>!f.has(v.id))]}}))}else i=o;return(0,ze.p)({interviews:i,hodPairs:this.fetchMyHodDeptBandPairs()}).pipe((0,It.T)(({interviews:s,hodPairs:d})=>(this.hodDeptBandPairs=new Set((d||[]).map(u=>`${(u.department||"").trim().toUpperCase()}|${(u.band||"").trim().toUpperCase()}`)),s)))}processResponse(t){let n=Array.isArray(null==t?void 0:t.data)?t.data.filter(o=>!o.isDeleted):[];n=this.applyRoleFiltering(n),this.originalData=n,this.agRowData=[...n]}applyRoleFiltering(t){const n=this.loggedInUserRole,o=String(this.loggedInUserId);return["Super Admin","HR Admin"].includes(n)||this.loggedInUserRoleIsMD?t:t.filter("HOD"===n?i=>{var s;const d=String(i.positionCreatedById)===o,u="admin"===String(i.positionCreatedByUserRole).toLowerCase(),g=`${(i.department||"").trim().toUpperCase()}|${(i.band||"").trim().toUpperCase()}`,m=this.hodDeptBandPairs.has(g);return Object.keys(null!==(s=i.leadInterviewer)&&void 0!==s?s:{}).map(String).includes(o)||(d||m)&&!u}:"Admin"===n?i=>{var s,d;const u=String(i.positionCreatedById)===o&&"admin"===String(i.positionCreatedByUserRole).toLowerCase(),g=Object.keys(null!==(s=i.leadInterviewer)&&void 0!==s?s:{}).map(String).includes(o),m=Object.keys(null!==(d=i.assignedAdmins)&&void 0!==d?d:{}).map(String).includes(o);return u||g||m}:i=>{var s;return Object.keys(null!==(s=i.leadInterviewer)&&void 0!==s?s:{}).map(String).includes(o)})}}return(a=p).SCREENING_DOC_ALLOWED_EXTENSIONS=["pdf","doc","docx","ppt","pptx","xls","xlsx"],a.SCREENING_DOC_MAX_SIZE_BYTES=10485760,a.\u0275fac=function(t){return new(t||a)(e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU(C.N),e.rXU(b.bZ),e.rXU($.d),e.rXU(q.tw),e.rXU(I.W),e.rXU(De.Ix),e.rXU(we.Qq))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-schedule-interview"]],viewQuery:function(t,n){if(1&t&&e.GBs(vr,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},features:[e.Jv_([K.vh])],decls:26,vars:16,consts:[["columnChooserBtn",""],[1,"container","pt-10"],["class","top-action-bar mb-10",4,"ngIf"],[1,"container","mb-20"],[1,"cardBox","mb-20"],[1,"toolbar-row"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],["type","button","class","bulk-reject-btn fs-14 fs_12ForMobile font_semibold mr-5",3,"click",4,"ngIf"],[1,"toolbar-spacer"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"month-multiselect"],[3,"ngModelChange","placeholder","settings","data","ngModel"],["title","Download",1,"icon-action-btn","material-icons",3,"click"],["title","Refresh",1,"icon-action-btn","material-icons","ml-5",3,"click","animationend"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5",3,"click"],[1,"material-icons"],[1,"grid-wrapper","p-10"],[1,"ag-theme-quartz",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],[1,"top-action-bar","mb-10"],["type","button",1,"add_btn","fs-14","center-content",3,"click","disabled"],[1,"material-icons","fs-20","mr-5"],["type","button",1,"bulk-reject-btn","fs-14","fs_12ForMobile","font_semibold","mr-5",3,"click"],[3,"value"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",1),e.DNE(1,br,5,3,"div",2),e.k0s(),e.j41(2,"div",3)(3,"div",4)(4,"div",5)(5,"mat-form-field",6)(6,"mat-icon",7),e.EFF(7,"search"),e.k0s(),e.j41(8,"input",8),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.filterSearch())}),e.k0s()(),e.DNE(9,_r,2,1,"button",9),e.nrm(10,"div",10),e.j41(11,"mat-form-field",6)(12,"mat-select",11),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.selectedYearForRecruitment,s)||(n.selectedYearForRecruitment=s),e.Njj(s)}),e.bIt("selectionChange",function(s){return e.eBV(o),e.Njj(n.onYearChange(s.value))}),e.DNE(13,Cr,2,2,"mat-option",12),e.k0s()(),e.j41(14,"div",13)(15,"ng-multiselect-dropdown",14),e.bIt("ngModelChange",function(s){return e.eBV(o),e.Njj(n.onMonthsChange(s))}),e.k0s()(),e.j41(16,"span",15),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(17,"download"),e.k0s(),e.j41(18,"span",16),e.bIt("click",function(){return e.eBV(o),n.resetGrid(),e.Njj(n.isClicked=!0)})("animationend",function(){return e.eBV(o),e.Njj(n.isClicked=!1)}),e.EFF(19,"refresh"),e.k0s(),e.j41(20,"button",17,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(22,"span",18),e.EFF(23,"tune"),e.k0s()()(),e.j41(24,"div",19)(25,"ag-grid-angular",20),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))}),e.k0s()()()()}2&t&&(e.R7$(),e.Y8G("ngIf",!n.isMDOrHOD&&!n.loggedInUserRoleIsEmployee&&!n.loggedInUserRoleIsManager),e.R7$(7),e.R50("ngModel",n.searchTerm),e.R7$(),e.Y8G("ngIf",n.selectedRowsCount>0&&n.canBulkReject),e.R7$(3),e.R50("ngModel",n.selectedYearForRecruitment),e.R7$(),e.Y8G("ngForOf",n.recruitmentYears),e.R7$(2),e.Y8G("placeholder","Select Month")("settings",n.monthDropdownSettings)("data",n.arrAllMonths)("ngModel",n.selectedMonthObjects),e.R7$(3),e.AVh("clicked",n.isClicked),e.R7$(2),e.xc7("background-color",n.buttonColorName),e.R7$(5),e.Y8G("rowData",n.agRowData)("columnDefs",n.agColumnDefs)("gridOptions",n.gridOptions))},dependencies:[K.Sq,K.bT,y.me,y.BC,y.vS,R.rl,R.JW,he.VO,pe.wT,Ke.b,M.fg,x.An,G.xs],styles:[".container{--background: #f6f5fb;padding:0 15px}.month-multiselect{display:inline-block;min-width:180px;vertical-align:middle}.pt-10{padding-top:10px}.mb-10{margin-bottom:10px}.mb-20{margin-bottom:20px}.ml-5{margin-left:5px}.ml-10{margin-left:10px}.mr-5{margin-right:5px}.p-10{padding:10px}.fs-14{font-size:14px}.fs-20{font-size:20px}.cardBox{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.top-action-bar{display:flex;justify-content:flex-end;padding-top:10px}.add_btn{background-color:#031263;
1color:#fff;border:none;padding:6px 12px;border-radius:5px;cursor:pointer;display:flex;align-items:center;gap:4px}.add_btn:disabled{opacity:.6;cursor:not-allowed}.center-content{display:flex;align-items:center;justify-content:center}.toolbar-row{display:flex;align-items:center;flex-wrap:nowrap;gap:10px;padding:12px 10px 4px}.bulk-reject-btn{outline:none;border-radius:7px;padding:7px 14px;height:40px;display:flex;align-items:center;gap:6px;font-family:OpenSans-SemiBold;color:#fff;background:#e94848;border:1px solid #e94848;cursor:pointer;white-space:nowrap}.bulk-reject-btn:hover{background:#d63b3b;border-color:#d63b3b}.toolbar-spacer{flex:1 1 auto}.mat-height40{height:40px!important}.small-field{min-width:180px}.icon-action-btn{border:1px solid #f3820e;color:#f3820e;padding:9px;border-radius:6px;background-color:#fff;height:40px;width:40px;font-size:22px;cursor:pointer}.icon-action-btn.clicked{animation:spin-btn .4s linear}@keyframes spin-btn{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ag-theme-quartz{--ag-header-background-color: #dddddd;--ag-header-foreground-color: #000;--ag-row-hover-color: #f8fafc;--ag-selected-row-background-color: #f1f5f9;--ag-font-size: 13px;--ag-border-color: #e2e8f0;border:1px solid #e2e8f0;border-radius:8px}.ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important;color:#000}.ag-theme-quartz .ag-cell{display:flex!important;align-items:center!important;justify-content:center;padding-left:12px!important;padding-right:12px!important;border-right:1px solid #e2e8f0!important;overflow:visible!important}.ag-theme-quartz .ag-cell .ag-cell-value,.ag-theme-quartz .ag-cell .ag-cell-wrapper{display:flex!important;align-items:center!important;justify-content:center;height:100%!important;width:100%!important;overflow:visible!important}.ag-theme-quartz .ag-row{border-bottom:1px solid #e2e8f0!important;overflow:visible!important}.ag-theme-quartz .ag-body-viewport,.ag-theme-quartz .ag-center-cols-viewport,.ag-theme-quartz .ag-center-cols-clipper,.ag-theme-quartz .ag-center-cols-container{overflow:visible!important}.status-badge-report{display:inline-flex;align-items:center;justify-content:center;padding:6px 14px;border-radius:8px;font-size:11px;font-weight:700;text-transform:capitalize;min-width:90px;line-height:1;letter-spacing:.3px;box-shadow:0 2px 4px #0000000a;border:1px solid transparent;transition:all .2s cubic-bezier(.4,0,.2,1);white-space:nowrap}.status-badge-report:hover{transform:translateY(-1.5px);box-shadow:0 4px 6px #00000014}.status-selected{background:color-mix(in srgb,#14b8a6,white 88%);color:#0f766e;border-color:color-mix(in srgb,#14b8a6,white 75%)}.status-offered{background:color-mix(in srgb,#22c55e,white 88%);color:#15803d;border-color:color-mix(in srgb,#22c55e,white 75%)}.status-rejected{background:color-mix(in srgb,#ef4444,white 88%);color:#b91c1c;border-color:color-mix(in srgb,#ef4444,white 75%)}.status-scheduled{background:color-mix(in srgb,#3b82f6,white 88%);color:#1d4ed8;border-color:color-mix(in srgb,#3b82f6,white 75%)}.status-evaluated{background:color-mix(in srgb,#a855f7,white 88%);color:#7e22ce;border-color:color-mix(in srgb,#a855f7,white 75%)}.status-process{background:color-mix(in srgb,#eab308,white 88%);color:#854d0e;border-color:color-mix(in srgb,#eab308,white 75%)}.status-pending{background:#f1f5f9;color:#475569;border:1px solid #e2e8f0}.action-row{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:nowrap;height:100%;position:relative}.ag-icon-btn{background:none;border:none;cursor:pointer;padding:2px 4px;border-radius:4px;line-height:1;vertical-align:middle;transition:background-color .2s}.ag-icon-btn:hover{background-color:#0000000f}.ag-icon-btn:disabled{opacity:.4;cursor:not-allowed}.select-row-checkbox{width:16px;height:16px;cursor:pointer}.select-row-checkbox:disabled{opacity:.4;cursor:not-allowed}.screening-doc-cell{display:flex;align-items:center;justify-content:center;gap:4px;flex-wrap:nowrap;height:100%}.screening-doc-cell .doc-name{max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px}.screening-doc-cell .doc-empty-muted{color:#00000059}.screening-doc-cell .doc-upload-btn{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;font-weight:600;color:#1976d2;background:#1976d214;border:1px dashed rgba(25,118,210,.4);border-radius:6px;padding:3px 9px;cursor:pointer}.screening-doc-cell .doc-upload-btn:hover{background:#1976d224}.screening-doc-cell .doc-upload-btn:disabled{opacity:.4;cursor:not-allowed}.screening-doc-cell .doc-count-btn{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;font-weight:600;color:#1976d2;background:#1976d214;border:1px solid rgba(25,118,210,.3);border-radius:6px;padding:3px 9px;cursor:pointer}.screening-doc-cell .doc-count-btn:hover{background:#1976d224}.screening-doc-cell .doc-count-btn:disabled{opacity:.4;cursor:not-allowed}.screening-doc-menu{min-width:300px!important;max-width:300px!important}.screening-doc-menu .mat-mdc-menu-content{padding-top:0;padding-bottom:8px}.doc-menu-head{padding:12px 16px 10px;border-bottom:1px solid rgba(0,0,0,.08);cursor:default}.doc-menu-head-top{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:8px}.doc-menu-head-top .doc-menu-title{font-size:13px;font-weight:600;color:#000000d9}.doc-menu-head-top .doc-menu-count{font-size:11px;color:#00000080}.doc-usage-track{height:5px;border-radius:999px;background:#00000014;overflow:hidden}.doc-usage-fill{height:100%;border-radius:999px;background:#2e7d32;transition:width .2s ease}.doc-usage-fill.warn{background:#c77700}.doc-usage-fill.danger{background:#d32f2f}.doc-usage-label{display:flex;justify-content:space-between;margin-top:4px;font-size:11px;color:#00000080;font-variant-numeric:tabular-nums}.doc-menu-list{max-height:220px;overflow-y:auto}.doc-menu-row{display:flex;align-items:center;gap:10px;padding:8px 16px;cursor:default}.doc-menu-row+.doc-menu-row{border-top:1px solid rgba(0,0,0,.06)}.doc-menu-row .doc-chip{flex:none;width:28px;height:28px;border-radius:7px;
1display:flex;align-items:center;justify-content:center;font-size:9.5px;font-weight:700;letter-spacing:.02em;color:#fff}.doc-menu-row .doc-chip.pdf{background:#d32f2f}.doc-menu-row .doc-chip.doc{background:#1976d2}.doc-menu-row .doc-chip.xls{background:#2e7d32}.doc-menu-row .doc-chip.ppt{background:#e65100}.doc-menu-row .doc-meta{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.doc-menu-row .doc-name{max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;font-weight:500}.doc-menu-row .doc-size{font-size:11px;color:#00000080;font-variant-numeric:tabular-nums}.doc-menu-row .doc-row-actions{flex:none;display:flex;gap:2px;opacity:.55;transition:opacity .12s ease}.doc-menu-row:hover .doc-row-actions{opacity:1}.doc-menu-row .doc-remove:hover .material-icons{color:#d32f2f}.doc-menu-row .ag-icon-btn:hover .material-icons{color:#1976d2}.doc-add-btn{display:flex!important;align-items:center;justify-content:center;gap:6px;margin:8px 12px 4px;width:calc(100% - 24px);min-height:34px!important;height:auto!important;line-height:normal!important;padding:7px 10px!important;border-radius:8px;border:1px dashed rgba(25,118,210,.45);background:#1976d214;color:#1976d2;font-size:12.5px;font-weight:600}.doc-add-btn:hover:not([disabled]){background:#1976d224}.doc-add-btn:disabled{opacity:.4}\n"],encapsulation:2}),p})();var Ir=Y(66543),Sr=Y(345);function wr(a,p){1&a&&(e.j41(0,"span",14),e.EFF(1,"arrow_drop_down"),e.k0s())}function xr(a,p){if(1&a&&(e.j41(0,"div",11)(1,"span",12),e.EFF(2),e.k0s(),e.EFF(3),e.DNE(4,wr,2,0,"span",13),e.k0s()),2&a){const r=e.XpG().$implicit;e.XpG();const t=e.sdS(8);e.Y8G("matMenuTriggerFor",r.isDropdown?t:null),e.R7$(2),e.JRh(r.icon),e.R7$(),e.SpI(" ",r.label," "),e.R7$(),e.Y8G("ngIf",r.isDropdown)}}function Rr(a,p){1&a&&(e.j41(0,"mat-tab"),e.DNE(1,xr,5,4,"ng-template",10),e.k0s())}function jr(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",17),e.bIt("click",function(){const n=e.eBV(r).$implicit,o=e.XpG(4);return e.Njj(o.selectSubReport(n))}),e.EFF(1),e.k0s()}if(2&a){const r=p.$implicit;e.R7$(),e.SpI(" ",r.label," ")}}function Dr(a,p){if(1&a&&(e.qex(0),e.DNE(1,jr,2,1,"button",16),e.bVm()),2&a){const r=e.XpG().$implicit;e.R7$(),e.Y8G("ngForOf",r.subReports)}}function kr(a,p){if(1&a&&(e.qex(0),e.DNE(1,Dr,2,1,"ng-container",15),e.bVm()),2&a){const r=p.$implicit;e.R7$(),e.Y8G("ngIf",r.isDropdown)}}function Pr(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",5)(1,"div",4)(2,"ion-row")(3,"ion-col",6)(4,"div",7)(5,"mat-tab-group",8),e.bIt("selectedTabChange",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.tabChanged(n.index))}),e.DNE(6,Rr,2,0,"mat-tab",9),e.k0s(),e.j41(7,"mat-menu",null,0),e.DNE(9,kr,2,1,"ng-container",9),e.k0s()()()()()()}if(2&a){const r=e.XpG();e.R7$(5),e.Y8G("selectedIndex",r.selectedTabIndex),e.R7$(),e.Y8G("ngForOf",r.visibleTabs),e.R7$(3),e.Y8G("ngForOf",r.visibleTabs)}}let Fr=(()=>{var a;class p{constructor(t,n,o,i){this.router=t,this.activatedroute=n,this.encryptionService=o,this.titleService=i,this.isTabRoute=!0,this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.positionYears=[],this.selectedMonth="",this.loggedInUserRoleIsMD=!1,this.reportTabs=[{label:"Manpower Plan vs Actual",icon:"bar_chart",route:"manpower-vs-actual"},{label:"Interview Status",icon:"assessment",route:"interview-status"},{label:"Turnaround Time (TAT Report)",icon:"schedule",route:"tat-report"},{label:"Master Report",icon:"table_chart",route:"master-report"},{label:"Additional Reports",icon:"library_books",isDropdown:!0,subReports:[{label:"Recruitment Tracker",route:"recruitment-tracker"},{label:"Recruitment Metrics",route:"recruitment-metrics"},{label:"Channel Data",route:"channel-data"},{label:"Channel Effectiveness",route:"channel-effectivness"}]}],this.visibleTabs=[],this.selectedTabIndex=0}ngOnInit(){this.initSessionData(),this.setupVisibleTabs(),this.handleTabNavigation()}initSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName,this.loggedInUserRoleIsM
1D=this.loggedInUserRoles.some(o=>"MD"===o.displayName),this.userName=sessionStorage.getItem("loggedInUserName")}setupVisibleTabs(){const t=this.router.url;this.visibleTabs=this.hasRestrictedAccess()?this.reportTabs.filter(i=>"interview-status"===i.route||"tat-report"===i.route||"master-report"===i.route||i.isDropdown).map(i=>({...i})):this.reportTabs.map(i=>({...i})),this.updateDropdownLabels(t);const n=t.split("/").pop()||"",o=this.getTabIndexByRoute(n);o>-1?this.selectedTabIndex=o:this.visibleTabs.length&&this.tabChanged(0),console.log("Visible report tabs:",this.visibleTabs)}handleTabNavigation(){this.router.events.pipe((0,Te.p)(t=>t instanceof De.wF)).subscribe(t=>{const n=t.urlAfterRedirects;this.updateDropdownLabels(n);const o=this.visibleTabs.findIndex(i=>i.isDropdown&&i.subReports?i.subReports.some(s=>n.includes(`/reports/${s.route}`)):n.includes(`/reports/${i.route}`));this.selectedTabIndex=o>-1?o:0})}updateDropdownLabels(t){let n="";this.visibleTabs.forEach(o=>{if(o.isDropdown&&o.subReports){const i=o.subReports.find(s=>t.includes(`/reports/${s.route}`));i?(o.label=i.label,n=i.label):o.label="Additional Reports"}else t.includes(`/reports/${o.route}`)&&(n=o.label)}),this.titleService.setTitle(n?`HRIS - ${n}`:"Phi EDGE-HRMS")}getTabIndexByRoute(t){return this.visibleTabs.findIndex(n=>!(!n.route||t!==n.route&&!t.startsWith(n.route+"/"))||!(!n.isDropdown||!n.subReports)&&n.subReports.some(o=>t===o.route||t.startsWith(o.route+"/")))}tabChanged(t){const n=this.visibleTabs[t];if(n.isDropdown&&n.subReports&&n.subReports.length>0){const o=this.router.url;n.subReports.some(s=>o.includes(s.route))||this.selectSubReport(n.subReports[0])}else this.router.navigate([n.route],{relativeTo:this.activatedroute})}selectSubReport(t){this.router.navigate([t.route],{relativeTo:this.activatedroute})}isSuperAdmin(){return"Super Admin"===this.loggedInUserRole}isHRAdmin(){return"HR Admin"===this.loggedInUserRole}isMD(){return this.loggedInUserRoles.some(t=>"MD"===t.displayName)}get canViewReports(){return this.isSuperAdmin()||this.isHRAdmin()||this.isMD()}hasRestrictedAccess(){const t=["HOD","Employee","PHI Admin","PHI Finance & Accounts","Manager","Admin","Finance"];return!(this.loggedInUserRoles.some(s=>"MD"===s.displayName)||"HR Admin"===this.loggedInUserRole||"Super Admin"===this.loggedInUserRole)&&this.loggedInUserRoles.some(s=>t.includes(s.displayName))}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(De.Ix),e.rXU(De.nX),e.rXU(S.L),e.rXU(Sr.hE))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-reports"]],decls:5,vars:1,consts:[["additionalReportsMenu","matMenu"],[1,"container"],["id","background-content"],["class","tabs-container",4,"ngIf"],[1,"card"],[1,"tabs-container"],["size-sm","11","size-md","10","size-lg","10","size-xs","10",1,"pl-15","pr-0","pb-0"],[1,"borderbottomForTab"],[1,"pt-10","pr-10",3,"selectedTabChange","selectedIndex"],[4,"ngFor","ngForOf"],["mat-tab-label",""],[2,"display","flex","align-items","center","width","100%","height","100%",3,"matMenuTriggerFor"],[1,"material-icons","mr-10"],["class","material-icons ml-5",4,"ngIf"],[1,"material-icons","ml-5"],[4,"ngIf"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"]],template:function(t,n){1&t&&(e.j41(0,"div",1)(1,"div",2),e.DNE(2,Pr,10,3,"div",3),e.j41(3,"div",4),e.nrm(4,"router-outlet"),e.k0s()()()),2&t&&(e.R7$(2),e.Y8G("ngIf",n.isTabRoute))},dependencies:[K.Sq,K.bT,J.hU,J.ln,De.n3,Ge.kk,Ge.fb,Ge.Cp,w.ES,w.mq,w.T8],styles:['@charset "UTF-8";ion-content.container[_ngcontent-%COMP%]{position:relative} .ag-filter-icon{cursor:pointer!important}']}),p})();var mt=Y(10467),$t=Y(54843),Mr=Y(95416);const Er=["jdPreviewDialog"],Or=["columnChooserBtn"],Tr=["closingDatePicker"],Ar=["closingDateInput"];function Nr(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",30),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.openRequisitionForm())}),e.j41(1,"span",31),e.EFF(2,"add"),e.k0s(),e.EFF(3," Add Position "),e.k0s()}if(2&a){const r=e.XpG();e.xc7("background-color",r.buttonColorName)("opacity",r.isAllCompanySelected||r.isPastYear?"0.5":"1"),e.Y8G("disabled",r.isAllCompanySelected||r.isPastYear)}}function $r(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",30),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.onClickImportPositionRequisition())}),e.j41(1,"span",31),e.EFF(2,"upload"),e.k0s(),e.EFF(3," Import "),e.k0s()}if(2&a){const r=e.XpG();e.xc7("background-color",r.buttonColorName)("opacity",r.isAllCompanySelected||r.isPastYear?"0.5":"1"),e.Y8G("disabled",r.isAllCompanySelected||r.isPastYear)}}function Ur(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",32),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.bulkDelete())}),e.nrm(1,"ion-icon",33),e.EFF(2," Bulk Delete "),e.k0s()}if(2&a){const r=e.XpG();e.Y8G("disabled",r.isAllCompanySelected)}}function Br(a,p){if(1&a&&(e.j41(0,"mat-option",34),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG();e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}function Gr(a,p){if(1&a&&(e.j41(0,"div",35)(1,"div",36)(2,"h2",37),e.EFF(3,"Job Description Preview"),e.k0s()(),e.j41(4,"mat-dialog-content")(5,"div",38),e.EFF(6),e.k0s()(),e.j41(7,"mat-dialog-actions",39)(8,"button",40),e.EFF(9,"Close"),e.k0s()()()),2&a){const r=e.XpG();e.R7$(6),e.SpI(" ",r.currentJdDescription," "),e.R7$(2),e.xc7("background-color",r.buttonColorName)}}let Yr=(()=>{var a;class p{get canEditClosingDate(){return this.isSuperAdmin||this.isHRAdmin}get minClosingDateForTable(){var t;return null!==(t=this.closingDateRow)&&void 0!==t&&t.positionOpeningDate?new Date(this.closingDateRow.positionOpeningDate):null}constructor(t,n,o,i,s,d,u,g,m,l,f,h,v,k){this.fb=t,this.httpService=n,this.config=o,this.encryptionService=i,this.dataRefreshService=s,this.dialog=d,this.sharedService=u,this.router=g,this.toastr=m,this.snackBar=l,this.datePipe=f,this.recruitmentService=h,this.http=v,this.activatedRoute=k,this.departmentList=[],this.positionData=[],this.originalData=[],this.searchTerm="",this.isPastYear=!1,this.agColumnDefs=[],this.agRowData=[],this.isClicked=!1,this.actionLoadingRowIds=new Set,this.gridFilterActive=!1,this.gridOptions={pagination:!0,paginationPageSize:10,paginationPageSizeSelector:[5,10,25,50,75,100,200,500,1e3],suppressCellFocus:!0,rowHeight:42,getRowId:B=>String(B.data.id),popupParent:document.querySelector("body"),defaultColDef:{flex:1,minWidth:120,resizable:!0,sortable:!0,filter:!0}
1,localeText:{noRowsToShow:"No records found"},postProcessPopup:B=>{var de;if("columnChooser"!==B.type)return;const ae=null===(de=this.columnChooserBtn)||void 0===de?void 0:de.nativeElement,me=B.ePopup;if(!ae||!me)return;const se=ae.getBoundingClientRect();me.style.top=`${se.bottom+window.scrollY+4}px`,me.style.left="auto",me.style.right=document.documentElement.clientWidth-se.right+"px"},onCellClicked:B=>this.handleCellClick(B),onFilterChanged:()=>{var B;const de=null===(B=this.gridApi)||void 0===B?void 0:B.getFilterModel();this.gridFilterActive=!!de&&Object.keys(de).length>0}},this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.positionYears=[],this.selectedMonthObjects=[],this.monthDropdownSettings={singleSelection:!1,enableCheckAll:!0,selectAllText:"Select All",unSelectAllText:"Unselect All",idField:"key",textField:"name",itemsShowLimit:1,closeDropDownOnSelection:!1},this.loggedInUserRoleIsMD=!1,this.isAllCompanySelected=!1,this.currentJdDescription="",this.closingDateRow=null,this.selectedClosingDate=null,this.destroy$=new Z.B,this._arrAllMonthsCacheKey=Symbol(),this._arrAllMonthsCache=[],this.months=[{key:"01",name:"January"},{key:"02",name:"February"},{key:"03",name:"March"},{key:"04",name:"April"},{key:"05",name:"May"},{key:"06",name:"June"},{key:"07",name:"July"},{key:"08",name:"August"},{key:"09",name:"September"},{key:"10",name:"October"},{key:"11",name:"November"},{key:"12",name:"December"}],this.hodDeptBandPairs=new Set}ngOnInit(){this.setAgColumnDefs(),this.isAllCompanySelected=null===this.recruitmentService.getChildId(),this.recruitmentService.selectedChildId$.pipe((0,L.Q)(this.destroy$)).subscribe(t=>{var n;this.isAllCompanySelected=null===t,null===(n=this.gridApi)||void 0===n||n.refreshCells({force:!0})}),this.dataRefreshService.refreshNeeded$.pipe((0,Q.B)(300),(0,L.Q)(this.destroy$)).subscribe(()=>{this.initSessionData(),this.getPMSYearListAndInitialize()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}initSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode||"",this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName,this.loggedInUserRoleIsMD=this.loggedInUserRoles.some(o=>"MD"===o.displayName),this.userName=sessionStorage.getItem("loggedInUserName")}getPMSYearListAndInitialize(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.positionYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const i=this.activatedRoute.snapshot.params.year;if(i)this.setSelectedYear(i);else{const{fiscalStartYear:s,fiscalEndYear:d}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${s}-${d}`)}})}setSelectedYear(t){const n=this.positionYears.find(o=>o.year===t);if(n){this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-");const{fiscalStartYear:o,fiscalEndYear:i}=(0,O.O)(this.loggedInCompanyFiscalyear);this.isPastYear=this.selectedYearForRecruitment!==`${o}-${i}`,this.initializeMonths(),this.getPositionData(),this.fetchDepartmentsByCompanyID()}}onYearChange(t){this.taskFromDate=null,this.taskToDate=null,this.setSelectedYear(t)}initializeMonths(){this.selectedMonthObjects=[...this.arrAllMonths]}getCurrentMonthKey(){return(new Date).toISOString().slice(5,7)}get arrAllMonths(){return this._arrAllMonthsCacheKey!==this.loggedInCompanyFiscalyear&&(this._arrAllMonthsCacheKey=this.loggedInCompanyFiscalyear,this._arrAllMonthsCache="Apr_Mar"===this.loggedInCompanyFiscalyear?[...this.months.slice(3),...this.months.slice(0,3)]:this.months),this._arrAllMonthsCache}get selectedMonths(){return this.selectedMonthObjects.map(t=>t.key)}get allMonthsSelected(){return this.selectedMonthObjects.length===this.arrAllMonths.length}onMonthsChange(t){this.selectedMonthObjects=t,this.getPositionData()}fetchDepartmentsByCompanyID(){const n=this.recruitmentService.appendChildId(`${this.config.getDepartmentDetails}?companyId=${this.loggedInUserCompanyID}`);this.httpService.callGetService(n).subscribe({next:o=>{this.departmentList=((null==o?void 0:o.data)||[]).sort((i,s)=>i.localeCompare(s))},error:o=>console.error("Error fetching departments:",o)})}openRequisitionForm(){const t=new b.ru;t.disableClose=!0,t.height="70%",t.width="70%",t.panelClass="custom-dialog-container",t.data={},this.dialog.open(ue.D,t).afterClosed().subscribe(o=>{o&&this.getPositionData()})}editpositionReuisition(t){this.dialog.open(ue.D,{disableClose:!0,height:"70%",width:"70%",panelClass:"custom-dialog-container",data:{positionRequisitionData:{positionReuisition:t}}}).afterClosed().subscribe(o=>{o&&this.getPositionData()})}deletepositionReuisition(t){this.dialog.open(le.$,{disableClose:!0,height:"25%",width:"30%",data:{msg:"Are you sure you want to delete this Position?",btn1:"Cancel",btn2:"Yes",btn2BgColor:this.buttonColorName,showSuccessIcon:!1,showSuccessMessage:!1,showCloseIcon:!1}}).afterClosed().subscribe(o=>{if(!o)return;const s=this.recruitmentService.appendChildId(`${this.config.softDeletePositionCandidateUrl}?id=${t}&deletedBy=${this.loggedInUserId}`);this.httpService.callPutService(s,{deletedBy:this.loggedInUserId}).subscribe({next:()=>{this.toastr.success("Position deleted successfully.","Success",{timeOut:3e3,progressBar:!0}),this.getPositionData()},error:d=>{var u;console.error("Error deleting Position:",d),this.toastr.error((null===(u=d.error)||void 0===u?void 0:u.message)||"Failed to delete Position.","Error",{timeOut:3e3,progressBar:!0})}})})}getHodNames(t){return t?Array.isArray(t)?t.join(", "):Object.values(t).join(", "):""}getPanelMemberNames(t){return t?Array.isArray(t)?t.join(", "):Object.values(t).join(", "):""}getLeadInterviewerNames(t){return t?Array.isArray(t)?t.join(", "):Object.values(t).join(", "):""}hasSelectedRows(){return this.agRowData.some(t=>t.selected)}bulkDelete(){const t=this.agRowData.filter(s=>s.selected);if(!t.length)return;const n=t.map(s=>s.id).join(","),i=this.recruitmentService.appendChildId(`${this.config.bulkSoftDeletePositionCandidateByIds}?id=${n}&deletedBy=${this.loggedInUserId}`);this.httpService.callPutService(i,{}).subscribe({next:()=>{this.toastr.success("Selected positions deleted successfully.","Success",{timeOut:3e3,progressBar:!0}),this.getPositionData()},error:s=>{var d;console.error("Error during bulk delete:",s),this.toastr.error((null==s||null===(d=s.error)||void 0===d?void 0:d.message)||"Bulk delete failed.","Error",{timeOut:3e3,progressBar:!0})}})}onClickImportPositionRequisition(){const t=this.selectedYearForRecruitment||this.loggedInCompanyFiscalyear,n=this.recruitmentService.getChildId();this.router.navigate(["/home/hrportal/importFiles",{module:"positionrequisition",year:t,childId:n,month:this.getCurrentMonthKey()}])}copyToClipboard(t){navigator.clipboard.writeText(t).then(()=>{this.toastr.success("Position URL copied to clipboard","Success",{timeOut:2e3})})}shortenPositionLink(t,n){var o=this;return(0,mt.A)(function*(){try{var i;const s=yield(0,$t._)(o.httpService.callPostService(o.config.shortenUrlEndpoint,{originalUrl:t,module:"RECRUITMENT_POSITION",companyId:n,childId:o.recruitmentService.getChildId()}));return(null==s||null===(i=s.data)||void 0===i?void 0:i.shortUrl)||t}catch{return t}})()}get isMD(){return this.loggedInUserRoles.some(t=>"MD"===t.displayName)}get isHOD(){return"HOD"===this.loggedInUserRole}get isHRAdmin(){return"HR Admin"===this.loggedInUserRole}get isSuperAdmin(){return"Super Admin"===this.loggedInUserRole}isRowActionInProgress(t){return this.actionLoadingRowIds.has(String(t))}setRowLoading(t,n){var o;const i=String(t);n?this.actionLoadingRowIds.add(i):this.actionLoadingRowIds.delete(i);const s=null===(o=this.gridApi)||void 0===o?void 0:o.getRowNode(i);s&&this.gridApi.refreshCells({rowNodes:[s],columns:["id"],force:!0})}approve(t){var n=this;return(0,mt.A)(function*(){let o="";if(t.id){const u=(Array.isArray(t.jobPosting)?t.jobPosting:(t.jobPosting||"").split(",")).map(g=>g.trim().toLowerCase());u.includes("external")?(o=`${window.location.origin}/candidate?companyId=${t.companyId}&fiscalYear=${t.fiscalYear}&month=${t.month}&positionId=${t.id}&childId=${n.recruitmentService.getChildId()}`,o=yield n.shortenPositionLink(o,t.companyId)):u.includes("internal")&&(o=`${window.location.origin}/home/hrportal/myhome`)}const i={...t,approveStatus:"Approved",approvedById:n.loggedInUserId,jobDescriptionFile:t.jobDescriptionFile||t.attachmentFile||null,panelMembers:t.rawPanelMembers||{},hod:t.rawHod||{},leadInterviewers:t.rawLeadInterviewers||{},...o?{positionLink:o}:{}},s=new FormData;s.append("dtos",JSON.stringify(i));const d=n.recruitmentService.appendChildId(`${n.config.updatePositionRequestUrl}/${t.id}`);n.setRowLoading(t.id,!0),n.httpService.submitFileService(d,s,"PUT").subscribe({next:()=>{n.toastr.success("The Position Requisition has been APPROVED"),n.getPositionData(()=>n.setRowLoading(t.id,!1))},error:u=>{var g;console.error("Error approving position:",u),409===(null==u?void 0:u.status)?(n.toastr.warning((null==u||null===(g=u.error)||void 0===g?void 0:g.message)||"This position has already been processed.","Already Processed"),n.getPositionData(()=>n.setRowLoading(t.id,!1))):(n.toastr.error("Failed to approve the position."),n.setRowLoading(t.id,!1))}})})()}reject(t){if(this.isRowActionInProgress(t.id))return;const n={...t,approveStatus:"Rejected",approvedById:this.loggedInUserId,jobDescriptionFile:t.jobDescriptionFile||t.attachmentFile||null,panelMembers:t.rawPanelMembers||{},hod:t.rawHod||{},leadInterviewers:t.rawLeadInterviewers||{}},o=new FormData;o.append("dtos",JSON.stringify(n));const i=this.recruitmentService.appendChildId(`${this.config.updatePositionRequestUrl}/${t.id}`);this.setRowLoading(t.id,!0),this.httpService.submitFileService(i,o,"PUT").subscribe({next:()=>{this.toastr.error("The Position Requisition has been REJECTED"),this.getPositionData(()=>this.setRowLoading(t.id,!1))},error:s=>{var d;console.error("Error rejecting position:",s),409===(null==s?void 0:s.status)?(this.toastr.warning((null==s||null===(d=s.error)||void 0===d?void 0:d.message)||"This position has already been processed.","Already Processed"),this.getPositionData(()=>this.setRowLoading(t.id,!1))):(this.toastr.error("Failed to reject the position."),this.setRowLoading(t.id,!1))}})}getApprovalChipClass(t){switch((null==t?void 0:t.toLowerCase())||""){case"approved":return"chip-approved";case"rejected":return"chip-rejected";
1case"pending by hr":return"chip-pending-hr";case"pending by md":return"chip-pending-md";default:return"chip-default"}}isPendingApproval(t){return"Approved"!==t.approveStatus&&"Rejected"!==t.approveStatus}shouldShowApprovalButtons(t){var n;const o=null===(n=t.positionCategory)||void 0===n?void 0:n.trim();return this.isHRAdmin&&"New Position"===o||this.isHRAdmin&&"Vacant Position"===o||this.isSuperAdmin&&("New Position"===o||"Vacant Position"===o)}canModify(t){return!this.loggedInUserRoleIsMD&&(this.isSuperAdmin||this.isHRAdmin||Number(t.positionCreatedById)===Number(this.loggedInUserId))}fetchMyHodDeptBandPairs(){if("HOD"!==this.loggedInUserRole||!this.intHODempCode)return(0,Be.of)(null);const t=`${this.config.getMyHodDeptBandPairs}?hodEmployeeCode=${encodeURIComponent(this.intHODempCode)}&companyId=${this.loggedInUserCompanyID}`,n=this.recruitmentService.appendChildId(t);return this.httpService.callGetService(n).pipe((0,pt.W)(()=>(0,Be.of)(null)))}getPositionData(t){if(!this.loggedInUserCompanyID||!this.selectedYearForRecruitment)return void(null==t||t());const n=`${this.config.getPositionData}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonths.join(",")}`,o=this.recruitmentService.appendChildId(n);(0,ze.p)({positions:this.httpService.callGetService(o),hodPairs:this.fetchMyHodDeptBandPairs()}).subscribe({next:({positions:i,hodPairs:s})=>{var d;this.hodDeptBandPairs=new Set((s||[]).map(m=>`${(m.department||"").trim().toUpperCase()}|${(m.band||"").trim().toUpperCase()}`));const u=i.data.filter(m=>!m.isDeleted);let g=[];g=["Super Admin","HR Admin"].includes(this.loggedInUserRole)||this.loggedInUserRoleIsMD?u:u.filter("HOD"===this.loggedInUserRole?m=>{const l=String(m.positionCreatedById)===String(this.loggedInUserId),f=["Admin"].includes(m.positionCreatedByUserRole),h=`${(m.department||"").trim().toUpperCase()}|${(m.band||"").trim().toUpperCase()}`,v=this.hodDeptBandPairs.has(h);return(l||v)&&!f}:"Admin"===this.loggedInUserRole?m=>{const l=String(m.positionCreatedById)===String(this.loggedInUserId)&&"Admin"===m.positionCreatedByUserRole,f=m.assignedAdmins&&Object.keys(m.assignedAdmins).some(h=>String(h)===String(this.loggedInUserId));return l||f}:m=>String(m.positionCreatedById)===String(this.loggedInUserId)),this.positionData=[...g],this.originalData=g.map(m=>{var l,f,h;const v=m.assignedAdmins&&Object.keys(m.assignedAdmins).some(Ve=>String(Ve)===String(this.loggedInUserId)),k=!this.loggedInUserRoleIsMD&&(this.isSuperAdmin||this.isHRAdmin||String(m.positionCreatedById)===String(this.loggedInUserId)||v),B="Approved"!==m.approveStatus&&"Rejected"!==m.approveStatus,de=this.isHRAdmin&&"New Position"===(null===(l=m.positionCategory)||void 0===l?void 0:l.trim())||this.isHRAdmin&&"Vacant Position"===(null===(f=m.positionCategory)||void 0===f?void 0:f.trim())||this.isSuperAdmin&&["New Position","Vacant Position"].includes(null===(h=m.positionCategory)||void 0===h?void 0:h.trim()),ae=B&&de,me=!ae;let se="";return se=B?"Vacant Position"===m.positionCategory||"New Position"===m.positionCategory?"Pending by HR":"Pending":m.approveStatus,{...m,rawPanelMembers:m.panelMembers||{},rawLeadInterviewers:m.leadInterviewers||{},rawHod:m.hod||{},HOD:this.formatPeopleField(m.hod),AssignedAdmins:this.formatPeopleField(m.assignedAdmins),leadInterviewer:this.formatPeopleField(m.leadInterviewers),panelMembers:this.formatPeopleField(m.panelMembers),openingDate:m.positionOpeningDate?this.datePipe.transform(m.positionOpeningDate,"dd/MM/yyyy"):"",canModify:k,canApprove:de,isPending:B,showApprovalActions:ae,showStatusChip:me,chipLabel:se,chipClass:this.getApprovalChipClass(se)}}),this.agRowData=[...this.originalData],null===(d=this.gridApi)||void 0===d||d.setGridOption("rowData",this.agRowData),null==t||t()},error:i=>{console.error("Error fetching position data:",i),null==t||t()}})}formatPeopleField(t){return t?Array.isArray(t)?t.join(", "):"object"==typeof t?Object.values(t).join(", "):String(t):""}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}onGridReady(t){this.gridApi=t.api}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}resetGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.deselectAll(),this.gridApi.refreshCells()),this.gridFilterActive=!1,this.getPositionData()}filterpositionReuisitions(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}downloadpositionReuisitions(){if(!this.gridApi)return;const t=this.gridApi.paginationGetCurrentPage(),n=this.gridApi.paginationGetPageSize(),o=t*n,i=o+n,s=[];this.gridApi.forEachNodeAfterFilterAndSort(h=>s.push(h.data));const d=s.slice(o,i);if(!d.length)return void this.toastr.info("No data to download for this page.","Info");const u=d.map(h=>({Designation:h.designation,Department:h.department,Location:h.location,Band:h.band,"Position Category":h.positionCategory,"Opening Date":h.positionOpeningDate?new Date(h.positionOpeningDate).toLocaleDateString("en-GB"):"","Closing Date":h.positionClosingDate?new Date(h.positionClosingDate).toLocaleDateString("en-GB"):"","Job Posting":h.jobPosting,HOD:h.hod?Object.values(h.hod).join(", "):"","Assigned Admin(s)":h.assignedAdmins?Object.values(h.assignedAdmins).join(", "):"","Lead Interviewers":h.leadInterviewers?Object.values(h.leadInterviewers).join(", "):"","Job Description":h.jobDescription,"Panel Members":h.panelMembers?Array.isArray(h.panelMembers)?h.panelMembers.join(", "):"object"==typeof h.panelMembers?Object.values(h.panelMembers).join(", "):h.panelMembers:""})),m={Sheets:{"Position Data":F.utils.json_to_sheet(u)},SheetNames:["Position Data"]},l=F.write(m,{bookType:"xlsx",type:"array"}),f=new Blob([l],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});U.saveAs(f,`PositionRequisition_Page_${t+1}.xlsx`)}downloadVisibleColumns(){if(!this.gridApi)return;const t=this.gridApi.getAllDisplayedColumns().map(h=>h.getColDef()).filter(h=>h.headerName&&"Actions"!==h.headerName&&"Position Link"!==h.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=n*o,s=i+o,d=[];this.gridApi.forEachNodeAfterFilterAndSort(h=>d.push(h.data));const u=d.slice(i,s);if(!u.length)return void this.toastr.info("No data to download for this page.","Info");const g=u.map(h=>{const v={};for(const k of t)v[k.headerName]=this.getPositionCellValue(h,k.field);return v}),l={Sheets:{"Position Data":F.utils.json_to_sheet(g)},SheetNames:["Position Data"]},f=F.write(l,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([f],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),`PositionRequisition_Page_${n+1}.xlsx`)}
1getPositionCellValue(t,n){switch(n){case"positionOpeningDate":return t.positionOpeningDate?new Date(t.positionOpeningDate).toLocaleDateString("en-GB"):"";case"positionClosingDate":return t.positionClosingDate?new Date(t.positionClosingDate).toLocaleDateString("en-GB"):"";case"jobDescription":return t.jobDescription||"";default:return null!=t[n]?String(t[n]):""}}clearAllFilters(){this.gridApi&&(this.gridApi.setFilterModel(null),this.gridFilterActive=!1)}get isAnyFilterApplied(){return this.gridFilterActive}handleCellClick(t){var n,o,i;const s=null===(n=t.event)||void 0===n?void 0:n.target,d=null==s?void 0:s.closest("[data-action]");if(!d)return;const u=d.getAttribute("data-action"),g=t.data;switch(u){case"edit":this.editpositionReuisition(g);break;case"delete":this.deletepositionReuisition(g.id);break;case"approve":this.approve(g);break;case"reject":this.reject(g);break;case"copy-link":this.copyToClipboard(g.positionLink);break;case"show-jd":this.showJdPopup(g.jobDescription);break;case"open-closing-datepicker":this.closingDateRow=g,this.selectedClosingDate=g.positionClosingDate?new Date(g.positionClosingDate):null;const m=null===(o=t.event)||void 0===o?void 0:o.target,f=null===(i=(null==m?void 0:m.closest(".ag-cell"))||m)||void 0===i?void 0:i.getBoundingClientRect();if(f&&this.closingDateInput){const h=this.closingDateInput.nativeElement;h.style.top="0px",h.style.left="0px";const v=h.getBoundingClientRect();h.style.top=f.top-v.top+"px",h.style.left=f.left-v.left+"px",h.style.width=`${f.width}px`,h.style.height=`${f.height}px`}setTimeout(()=>this.closingDatePicker.open(),0)}}renderClosingDateCell(t){const n=t.data;if(!n)return"";const o=n.positionClosingDate?new Date(n.positionClosingDate).toLocaleDateString("en-GB"):"Select date";return this.canEditClosingDate&&"Rejected"!==n.approveStatus&&!this.isAllCompanySelected?`<div class="closing-date-cell" data-action="open-closing-datepicker">\n <span>${o}</span>\n <span class="material-icons" style="font-size:16px;color:#888;margin-left:auto;padding-left:8px;flex-shrink:0;">calendar_today</span>\n </div>`:o}onClosingDateSelected(t){if(!this.closingDateRow||!t)return;const n=new Date(t),o=n.getFullYear(),i=String(n.getMonth()+1).padStart(2,"0"),s=String(n.getDate()).padStart(2,"0");this.updatePositionClosingDate(this.closingDateRow,`${o}-${i}-${s}`),this.closingDateRow=null}onGridChange(t){}updatePositionClosingDate(t,n){var o=this;return(0,mt.A)(function*(){let i=t.positionLink||"";if(t.id){const g=(Array.isArray(t.jobPosting)?t.jobPosting:(t.jobPosting||"").split(",")).map(m=>m.trim().toLowerCase());g.includes("external")?(i=`${window.location.origin}/candidate?companyId=${t.companyId}&fiscalYear=${t.fiscalYear}&month=${t.month}&positionId=${t.id}&childId=${o.recruitmentService.getChildId()}`,i=yield o.shortenPositionLink(i,t.companyId)):g.includes("internal")&&(i=`${window.location.origin}/home/hrportal/myhome`)}const s={...t,positionClosingDate:n,positionLink:i,jobDescriptionFile:t.jobDescriptionFile||t.attachmentFile||null,panelMembers:t.rawPanelMembers||{},hod:t.rawHod||{},leadInterviewers:t.rawLeadInterviewers||{}},d=new FormData;d.append("dtos",JSON.stringify(s));const u=o.recruitmentService.appendChildId(`${o.config.updatePositionRequestUrl}/${t.id}`);o.httpService.submitFileService(u,d,"PUT").subscribe({next:()=>{o.toastr.success("Closing date updated successfully."),o.getPositionData()},error:g=>{var m;o.toastr.error((null===(m=g.error)||void 0===m?void 0:m.message)||"Failed to update closing date.","Error")}})})()}setAgColumnDefs(){this.agColumnDefs=[{headerName:"Designation",field:"designation",minWidth:150,tooltipField:"designation",cellRenderer:t=>this.truncateCell(t.value),pinned:"left"},{headerName:"Position",field:"positionName",minWidth:150,tooltipField:"positionName",cellRenderer:t=>this.truncateCell(t.value)},{headerName:"Department",field:"department",minWidth:130},{headerName:"Location",field:"location",minWidth:120},{headerName:"Band",field:"band",width:100},{headerName:"Category",field:"positionCategory",minWidth:140},{headerName:"Posted",field:"positionOpeningDate",minWidth:120,valueGetter:t=>{var n;return null!==(n=t.data)&&void 0!==n&&n.positionOpeningDate?new Date(t.data.positionOpeningDate).toLocaleDateString("en-GB"):""}},{headerName:"Closed",field:"positionClosingDate",minWidth:150,cellRenderer:t=>this.renderClosingDateCell(t),cellStyle:t=>{var n;return this.canEditClosingDate&&"Rejected"!==(null===(n=t.data)||void 0===n?void 0:n.approveStatus)&&!this.isAllCompanySelected?{backgroundColor:"#FFF9C4"}:null}},{headerName:"Job",field:"jobPosting",minWidth:110},{headerName:"HOD",field:"HOD",minWidth:150,tooltipField:"HOD",cellRenderer:t=>this.truncateCell(t.value)},{headerName:"Assigned Admin(s)",field:"AssignedAdmins",minWidth:160,tooltipField:"AssignedAdmins",cellRenderer:t=>this.truncateCell(t.value)},{headerName:"Job Description",field:"jobDescription",minWidth:160,cellRenderer:t=>t.value?`<div class="clickable-text" data-action="show-jd" style="color:#1976d2;cursor:pointer;">${t.value.length>25?t.value.slice(0,25)+"...":t.value}</div>`:""},{headerName:"Position Link",field:"positionLink",minWidth:180,sortable:!1,
1cellRenderer:t=>this.renderPositionLinkCell(t),cellClass:"center-content-cell"},{headerName:"Actions",field:"id",minWidth:180,sortable:!1,filter:!1,cellRenderer:t=>this.renderActionsCell(t),cellClass:"center-content-cell"}]}truncateCell(t){return t?t.length>25?`${t.slice(0,25)}...`:t:""}renderPositionLinkCell(t){const n=t.data;return"Approved"===n.approveStatus?`<div class="d-flex align-center" style="gap:4px;">\n <a href="${n.positionLink}" target="_blank" title="Open Link" ${this.isAllCompanySelected?'style="pointer-events:none;opacity:0.5;"':""}>\n <span class="material-icons" style="font-size:18px;vertical-align:middle;color:#1976d2;">open_in_new</span>\n </a>\n <button data-action="copy-link" class="ag-icon-btn" title="Copy Link" ${this.isAllCompanySelected?"disabled":""}>\n <span class="material-icons" style="font-size:18px;color:#7c4dff;">content_copy</span>\n </button>\n </div>`:"Rejected"===n.approveStatus?'<span style="color:#d32f2f;font-size:13px;">Position rejected</span>':'<span style="color:#9e9e9e;font-size:13px;">Position not approved yet</span>'}renderActionsCell(t){const n=t.data,o=this.isAllCompanySelected;let i='<div class="action-row">';return n.canModify&&"Approved"!==n.approveStatus&&"Rejected"!==n.approveStatus&&(i+=`<button data-action="edit" class="ag-icon-btn" title="Edit" ${o?"disabled":""}>\n <span class="material-icons" style="font-size:18px;color:#1976d2;">edit</span></button>`,i+=`<button data-action="delete" class="ag-icon-btn" title="Delete" ${o?"disabled":""}>\n <span class="material-icons" style="font-size:18px;color:#d32f2f;">delete</span></button>`),n.showApprovalActions&&(this.actionLoadingRowIds.has(String(n.id))?i+='<span class="ag-action-spinner" title="Processing..."></span>':(i+=`<button data-action="approve" class="ag-icon-btn" title="Approve" ${o?"disabled":""}>\n <span class="material-icons" style="font-size:18px;color:#1976d2;">check_circle</span></button>`,i+=`<button data-action="reject" class="ag-icon-btn" title="Reject" ${o?"disabled":""}>\n <span class="material-icons" style="font-size:18px;color:#d32f2f;">cancel</span></button>`)),n.showStatusChip&&(i+=`<div class="custom-chip ${n.chipClass}">${n.chipLabel}</div>`),i+="</div>",i}showJdPopup(t){t&&(this.currentJdDescription=t,this.dialog.open(this.jdPreviewDialog,{width:"900px",maxHeight:"90vh",autoFocus:!1,panelClass:"custom-dialog-container"}))}getFileName(t){const n=t.jobDescriptionFile||t.attachmentFile;return n&&n.split("/").pop()||""}buildAttachmentFilePath(t){if(!t)return null;const n=String(t).trim();if(!n)return null;const o=n.toLowerCase().indexOf("uploads/");if(o>=0)return n.slice(o).replace(/^\/+/,"");try{return new URL(n).pathname.replace(/^\/+/,"")||null}catch{return n.replace(/^\/+/,"")||null}}inferMimeTypeFromName(t){switch((t.split(".").pop()||"").toLowerCase()){case"pdf":return"application/pdf";case"txt":return"text/plain";case"png":return"image/png";case"jpg":case"jpeg":return"image/jpeg";case"doc":return"application/msword";case"docx":return"application/vnd.openxmlformats-officedocument.wordprocessingml.document";default:return}}fetchPositionAttachmentBlob(t){var n=this;return(0,mt.A)(function*(){const o=n.buildAttachmentFilePath(t);if(!o)throw new Error("Missing attachment file path");const i=sessionStorage.getItem("currentToken"),s=new we.Lr({Authorization:`Bearer ${i||""}`}),d=n.recruitmentService.appendChildId(`${n.config.viewPositionAttachment}?filePath=${encodeURIComponent(o)}`),u=yield(0,$t._)(n.http.get(d,{headers:s,responseType:"blob"}));if(null!=u&&u.type)return u;const g=n.getFileName({jobDescriptionFile:t,attachmentFile:null})||o.split("/").pop()||"attachment",m=n.inferMimeTypeFromName(g);return m?new Blob([u],{type:m}):u})()}triggerBrowserDownload(t,n){const o=URL.createObjectURL(t),i=document.createElement("a");i.href=o,i.download=n||"attachment",i.click(),setTimeout(()=>URL.revokeObjectURL(o),1500)}viewFile(t){var n=this;return(0,mt.A)(function*(){const o=t.jobDescriptionFile||t.attachmentFile;if(o)try{const i=yield n.fetchPositionAttachmentBlob(o),s=URL.createObjectURL(i);window.open(s,"_blank"),setTimeout(()=>URL.revokeObjectURL(s),1500)}catch(i){console.error("Failed to view attachment:",i),n.toastr.error((null==i?void 0:i.message)||"Failed to view attachment.")}})()}downloadFile(t){var n=this;return(0,mt.A)(function*(){const o=t.jobDescriptionFile||t.attachmentFile;if(o)try{const i=yield n.fetchPositionAttachmentBlob(o),s=n.getFileName(t)||"attachment";n.triggerBrowserDownload(i,s)}catch(i){console.error("Failed to download attachment:",i),n.toastr.error((null==i?void 0:i.message)||"Failed to download attachment.")}})()}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(y.ok),e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU(C.N),e.rXU(b.bZ),e.rXU($.d),e.rXU(De.Ix),e.rXU(q.tw),e.rXU(Mr.UG),e.rXU(K.vh),e.rXU(I.W),e.rXU(we.Qq),e.rXU(De.nX))}
1,a.\u0275cmp=e.VBU({type:a,selectors:[["app-position-requisition-table"]],viewQuery:function(t,n){if(1&t&&(e.GBs(Er,5),e.GBs(Or,5),e.GBs(Tr,5),e.GBs(Ar,5,e.aKT)),2&t){let o;e.mGM(o=e.lsd())&&(n.jdPreviewDialog=o.first),e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first),e.mGM(o=e.lsd())&&(n.closingDatePicker=o.first),e.mGM(o=e.lsd())&&(n.closingDateInput=o.first)}},features:[e.Jv_([K.vh])],decls:39,vars:20,consts:[["columnChooserBtn",""],["closingDateInput",""],["closingDatePicker",""],["jdPreviewDialog",""],[1,"container"],[1,"justify-between","align-items-center"],["size","6",1,"mt-20","mb-10"],["type","button","class","add_btn fs-14 float-right center-content mr-5",3,"background-color","disabled","opacity","click",4,"ngIf"],[1,"container","mb-20"],[1,"cardBox","mb-20"],[1,"filter-bar","mb-10"],["size","auto",1,"ml-10","mt-20"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],["mat-raised-button","","color","warn","class","ml-10",3,"disabled","click",4,"ngIf"],[1,"d-flex","align-center","justify-content-flex-end","mt-20"],[1,"mat-height40","mat-input-style","small-field","mr-10"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"month-multiselect","mr-10"],[3,"ngModelChange","placeholder","settings","data","ngModel"],["title","Download",1,"icon-action-btn","material-icons","mr-10",3,"click"],["title","Refresh",1,"icon-action-btn","material-icons","ml-5","mr-10",3,"click","animationend"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5","mr-10",3,"click"],[1,"material-icons"],[1,"grid-wrapper","p-10"],[1,"ag-theme-quartz",2,"width","100%","height","600px",3,"gridReady","click","change","rowData","columnDefs","gridOptions"],[2,"position","fixed","visibility","hidden","pointer-events","none","top","0","left","0","width","0","height","0","border","none","padding","0",3,"dateChange","matDatepicker","value","min"],[3,"closed"],["type","button",1,"add_btn","fs-14","float-right","center-content","mr-5",3,"click","disabled"],[1,"material-icons","fs-20","mr-5"],["mat-raised-button","","color","warn",1,"ml-10",3,"click","disabled"],["name","trash"],[3,"value"],[1,"jd-dialog-container"],[1,"jd-dialog-header"],["mat-dialog-title","",2,"color","#031263","font-weight","600"],[1,"jd-preview-content"],["align","end"],["mat-raised-button","","mat-dialog-close","",2,"color","white"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div")(1,"div",4)(2,"div")(3,"ion-row",5),e.nrm(4,"ion-col",6),e.j41(5,"ion-col",6),e.DNE(6,Nr,4,5,"button",7)(7,$r,4,5,"button",7),e.k0s()()()()(),e.j41(8,"div",8)(9,"div",9)(10,"ion-row",10)(11,"ion-col",11)(12,"mat-form-field",12)(13,"mat-icon",13),e.EFF(14,"search"),e.k0s(),e.j41(15,"input",14),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.filterpositionReuisitions())}),e.k0s()(),e.DNE(16,Ur,3,1,"button",15),e.k0s(),e.j41(17,"ion-col",16)(18,"mat-form-field",17)(19,"mat-select",18),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.selectedYearForRecruitment,s)||(n.selectedYearForRecruitment=s),e.Njj(s)}),e.bIt("selectionChange",function(s){return e.eBV(o),e.Njj(n.onYearChange(s.value))}),e.DNE(20,Br,2,2,"mat-option",19),e.k0s()(),e.j41(21,"div",20)(22,"ng-multiselect-dropdown",21),e.bIt("ngModelChange",function(s){return e.eBV(o),e.Njj(n.onMonthsChange(s))}),e.k0s()(),e.j41(23,"span",22),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(24,"download"),e.k0s(),e.j41(25,"span",23),e.bIt("click",function(){return e.eBV(o),n.resetGrid(),e.Njj(n.isClicked=!0)})("animationend",function(){return e.eBV(o),e.Njj(n.isClicked=!1)}),e.EFF(26,"refresh"),e.k0s(),e.j41(27,"button",24,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(29,"span",25),e.EFF(30,"tune"),e.k0s()()()(),e.j41(31,"div",26)(32,"ag-grid-angular",27),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))})("change",function(s){return e.eBV(o),e.Njj(n.onGridChange(s))}),e.k0s()()()(),e.j41(33,"input",28,1),e.bIt("dateChange",function(s){return e.eBV(o),e.Njj(n.onClosingDateSelected(s.value))}),e.k0s(),e.j41(35,"mat-datepicker",29,2),e.bIt("closed",function(){return e.eBV(o),n.closingDateRow=null,e.Njj(n.selectedClosingDate=null)}),e.k0s(),e.DNE(37,Gr,10,3,"ng-template",null,3,e.C5r)}if(2&t){const o=e.sdS(36);
1e.R7$(6),e.Y8G("ngIf",!n.loggedInUserRoleIsMD),e.R7$(),e.Y8G("ngIf",n.isSuperAdmin||n.isHRAdmin),e.R7$(8),e.R50("ngModel",n.searchTerm),e.R7$(),e.Y8G("ngIf",n.hasSelectedRows()&&!n.loggedInUserRoleIsMD),e.R7$(3),e.R50("ngModel",n.selectedYearForRecruitment),e.R7$(),e.Y8G("ngForOf",n.positionYears),e.R7$(2),e.Y8G("placeholder","Select Month")("settings",n.monthDropdownSettings)("data",n.arrAllMonths)("ngModel",n.selectedMonthObjects),e.R7$(3),e.AVh("clicked",n.isClicked),e.R7$(2),e.xc7("background-color",n.buttonColorName),e.R7$(5),e.Y8G("rowData",n.agRowData)("columnDefs",n.agColumnDefs)("gridOptions",n.gridOptions),e.R7$(),e.Y8G("matDatepicker",o)("value",n.selectedClosingDate)("min",n.minClosingDateForTable)}},dependencies:[K.Sq,K.bT,y.me,y.BC,y.vS,J.hU,J.iq,J.ln,R.rl,R.JW,he.VO,pe.wT,Ke.b,gt.Vh,gt.bZ,M.fg,x.An,b.tx,b.BI,b.E7,b.Yi,Ae.$z,G.xs],styles:["::ng-deep .custom-tooltip{background-color:orange!important;color:#fff;border-radius:4px;font-size:13px;padding:8px 12px;white-space:normal;max-width:250px}.container{--background: #f6f5fb;padding:0 15px}.month-multiselect{display:inline-block;min-width:180px;vertical-align:middle}.cardBox{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.cardBoxHeading{background-color:#ddd;padding:5px;color:#000;border-radius:10px 10px 0 0}.table-container{width:100%;overflow-y:auto;overflow-x:auto;max-height:500px;max-width:100%}.table-container table{width:100%;border-collapse:collapse}.table-container table th,.table-container table td{border:1px solid #ddd;padding:4px;text-align:left;font-size:14px}.table-container table th{background-color:#f2f2f2;font-family:OpenSans-SemiBold}.table-container table td{background-color:#fff;font-family:OpenSans-Regular}.table-container table .link-primary{color:#007bff;text-decoration:underline;cursor:pointer}.mat-height40{height:40px!important}.w70px{width:70px}.icon-download,.icon-action-btn{border:1px solid #f3820e;color:#f3820e;padding:9px;border-radius:6px;background-color:#fff;height:40px;width:40px;font-size:22px;cursor:pointer}.icon-action-btn.clicked{animation:spin .4s linear}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ag-action-spinner{display:inline-block;width:16px;height:16px;border:2px solid #d0d0d0;border-top-color:#f3820e;border-radius:50%;animation:spin .8s linear infinite;vertical-align:middle}.ag-icon-btn{background:none;border:none;cursor:pointer;padding:2px 4px;border-radius:4px;line-height:1;vertical-align:middle}.ag-icon-btn:hover{background-color:#0000000f}.ag-icon-btn:disabled{opacity:.4;cursor:not-allowed}.grid-wrapper{width:100%;overflow-x:auto}.cp{cursor:pointer;margin-right:8px;color:#333}.fs-14{font-size:14px}.fs-20{font-size:20px}.mr-5{margin-right:5px}.mr-10{margin-right:10px}.ml-5{margin-left:5px}.mt-10{margin-top:10px}.mt-20{margin-top:20px}.ml-10{margin-left:10px}.pr-10{padding-right:10px}.pl-10{padding-left:10px}.d-flex{display:flex}.justify-content-flex-end{justify-content:flex-end}.center-content{display:flex;align-items:center;justify-content:center}.add_btn{background-color:#031263;color:#fff;border:none;padding:6px 12px;border-radius:5px;cursor:pointer}.add_btn:disabled,.custom-disabled-button:disabled{opacity:.6;cursor:not-allowed;color:#302b2b}.disabled{pointer-events:none;opacity:.5}.filter-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.small-field{min-width:180px}.w70px{width:70px!important}.cp{cursor:pointer}.toolbar{display:flex;align-items:center;gap:1rem;margin-bottom:1rem}.toolbar .spacer{flex:1 1 auto}.action-buttons{display:flex;gap:8px;align-items:center}.my-custom-table th.mat-header-cell{font-weight:600}.table-wrapper{overflow-y:auto;border:1px solid #ddd;border-radius:4px}.my-custom-table{width:100%;border-collapse:separate;border-spacing:0}th.mat-header-cell,td.mat-cell{padding:8px 12px;vertical-align:middle}.table-wrapper::-webkit-scrollbar{height:8px;width:8px}.table-wrapper::-webkit-scrollbar-thumb{background-color:#0003;border-radius:4px}.header-cell{background-color:#ddd!important;font-weight:700!important}::ng-deep .ag-theme-quartz{border:1px solid #e2e8f0;border-radius:8px}::ng-deep .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}::ng-deep .ag-theme-quartz .ag-cell{display:flex!important;align-items:center!important;padding-left:12px!important;padding-right:12px!important;border-right:1px solid #e2e8f0!important}::ng-deep .ag-theme-quartz .ag-cell .ag-cell-value,::ng-deep .ag-theme-quartz .ag-cell .ag-cell-wrapper{display:flex!important;align-items:center!important;height:100%!important;width:100%!important}::ng-deep .ag-theme-quartz .center-content-cell{justify-content:center!important}::ng-deep .ag-theme-quartz .center-content-cell .ag-cell-value,::ng-deep .ag-theme-quartz .center-content-cell .ag-cell-wrapper{justify-content:center!important}::ng-deep .ag-theme-quartz .ag-row{border-bottom:1px solid #e2e8f0!important}.custom-chip{display:inline-flex;align-items:center;justify-content:center;padding:6px 14px;font-size:11px;font-weight:700;border-radius:8px;line-height:1;text-transform:capitalize;min-width:90px;letter-spacing:.3px;box-shadow:0 2px 4px #0000000a;background-color:#f1f5f9;color:#475569;border:1px solid #e2e8f0;transition:all .2s cubic-bezier(.4,0,.2,1)}.custom-chip:hover{transform:translateY(-1.5px);box-shadow:0 4px 6px #00000014}.chip-approved{background:color-mix(in srgb,#22c55e,white 88%);color:#15803d;border-color:color-mix(in srgb,#22c55e,white 75%)}.chip-rejected{background:color-mix(in srgb,#ef4444,white 88%);color:#b91c1c;border-color:color-mix(in srgb,#ef4444,white 75%)}.chip-pending-md,.chip-pending-hr{background:color-mix(in srgb,#3b82f6,white 88%);color:#1d4ed8;border-color:color-mix(in srgb,#3b82f6,white 75%)}.chip-default{background:#f1f5f9;color:#475569;border-color:#e2e8f0}.action-row{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:nowrap;height:100%}.clickable-text{cursor:pointer}.closing-date-cell{display:flex;align-items:center;cursor:pointer;width:100%}.closing-date-cell:hover span.material-icons{color:#1976d2!important}.jd-dialog-header{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid #eee;margin-bottom:20px}.jd-dialog-header h2{margin:0!important}.jd-preview-content{padding:20px;background:#fafafa;border:1px solid #eee;border-radius:4px;min-height:300px;font-family:OpenSans-Regular,sans-serif;white-space:pre-wrap;font-size:14px;line-height:1.6;color:#444}\n"],encapsulation:2}),p})();function Lr(a,p){if(1&a&&(e.j41(0,"span",14)(1,"span",15),e.EFF(2),e.k0s(),e.EFF(3),e.k0s()),2&a){const r=e.XpG().$implicit;e.R7$(2),e.JRh(r.icon),e.R7$(),e.SpI("",r.label," ")}}function zr(a,p){1&a&&(e.j41(0,"mat-tab",12),e.DNE(1,Lr,4,2,"ng-template",13),e.k0s()),2&a&&e.Y8G("label",p.$implicit.label)}let Vr=(()=>{var a;class p{constructor(t,n,o,i){this.router=t,this.activatedroute=n,this.encryptionService=o,this.accessControlService=i,this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.loggedInCompanyReviewCycle=null,this.selectedTypeTabIndex=0,this.isTabRoute=!0,this.tabs=[{label:"Competencies & Questions",route:"proficiency-and-question",icon:"help"},{label:"Rating Definitions",route:"rating-definition",icon:"star_rate"},{label:"Pre-onboarding Documents",route:"onboarding",icon:"folder_open"},{label:"Technical Interview Question",route:"technical-interview",icon:"quiz"},{label:"Job Platform",route:"job-platform",icon:"business"},{label:"System Settings",route:"system-settings",icon:"settings"}]}ngOnInit(){this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const t=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=t?Number(this.encryptionService.decryptData(t)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode");const n=sessionStorage.getItem("loggedInUserRole");this.loggedInUserRole=n?this.encryptionService.decryptData(n):null;const o=sessionStorage.getItem("loggedInUserRoles");this.loggedInUserRoles=o?JSON.parse(o):[],1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName&&(this.loggedInUserRoleIsEmployee=!0),this.checkPermissions()}checkPermissions(){if(!this.loggedInUserCompanyID)return this.tabs=this.tabs.filter(t=>"system-settings"!==t.route),void this.initializeTabs();this.accessControlService.getMyModulePermissions(this.loggedInUserCompanyID).subscribe({next:t=>{let n=!1;if(null!=t&&t.success&&Array.isArray(t.data)){const o=t.data.find(i=>{var s;return"recruitment"===(null===(s=i.name)||void 0===s?void 0:s.toLowerCase())});n=!!o&&o.isEnabled}n||(this.tabs=this.tabs.filter(o=>"system-settings"!==o.route)),["Super Admin","HR Admin"].includes(this.loggedInUserRole)||(this.tabs=this.tabs.filter(o=>"consultant"!==o.route)),this.initializeTabs()},error:t=>{console.error("Error fetching module permissions:",t),this.tabs=this.tabs.filter(n=>"system-settings"!==n.route),this.initializeTabs()}})}initializeTabs(){0!==this.tabs.length?(this.selectedTypeTabIndex=this.tabs.findIndex(t=>this.router.url.includes(t.route)),this.router.events.subscribe(t=>
1{if(t instanceof De.wF){const n=this.tabs.findIndex(o=>t.urlAfterRedirects.includes(o.route));this.isTabRoute=-1!==n,this.isTabRoute&&(this.selectedTypeTabIndex=n)}})):this.isTabRoute=!1}tabTypeChanged(t){this.selectedTypeTabIndex=t.index,this.router.navigate([this.tabs[t.index].route],{relativeTo:this.activatedroute})}onClickback(){this.router.navigateByUrl("/home/hrportal/recruitment/dashboard",{state:{tabRouteSegment:"dashboard"}})}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(De.Ix),e.rXU(De.nX),e.rXU(S.L),e.rXU(yt.$))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-setup"]],decls:17,vars:4,consts:[[1,"modal","fade"],[1,"modal-dialog"],[1,"modal-content"],[1,"mt-10","d-flex","pt-5","pb-10","pr-10","pl-0","headerBreadcrumb",3,"click"],["src","././assets/icon/backArrow.svg",1,"cp"],[1,"font_semibold","fs-18","ml-10","mt-5","black_color"],[1,"cp"],[1,"modal-body","p-20"],[1,""],[1,"pr-10",3,"selectedTabChange","selectedIndex"],[3,"label",4,"ngFor","ngForOf"],[1,"modal-body","p-20","content-outlet",2,"border-top","1px solid #e0e0e0"],[3,"label"],["mat-tab-label",""],[2,"display","contents"],[1,"material-icons","mr-10"]],template:function(t,n){1&t&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.bIt("click",function(){return n.onClickback()}),e.nrm(4,"img",4),e.j41(5,"label",5)(6,"span",6),e.EFF(7,"Recruitment "),e.k0s(),e.EFF(8," / "),e.j41(9,"span"),e.EFF(10,"Setup"),e.k0s()()(),e.j41(11,"div",7)(12,"div",8)(13,"mat-tab-group",9),e.bIt("selectedTabChange",function(i){return n.tabTypeChanged(i)}),e.DNE(14,zr,2,1,"mat-tab",10),e.k0s()()(),e.j41(15,"div",11),e.nrm(16,"router-outlet"),e.k0s()()()()),2&t&&(e.R7$(9),e.xc7("color",n.buttonColorName),e.R7$(4),e.Y8G("selectedIndex",n.selectedTypeTabIndex),e.R7$(),e.Y8G("ngForOf",n.tabs))},dependencies:[K.Sq,De.n3,w.ES,w.mq,w.T8],styles:[".headerBreadcrumb[_ngcontent-%COMP%]{background-color:#e6e6e6}.modal-body[_ngcontent-%COMP%]{max-height:calc(100vh - 150px);overflow-y:auto}.modal-body[_ngcontent-%COMP%]:last-of-type{min-height:500px;max-height:calc(100vh - 200px);flex:1}[_ngcontent-%COMP%]::-webkit-scrollbar{width:12px!important;height:10px!important}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#f1f1f1}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#888;border-radius:10px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#555}.content-outlet[_ngcontent-%COMP%]{min-height:500px;max-height:800px;overflow-y:auto} .mat-mdc-menu-panel{min-width:112px;max-width:320px}"]}),p})();var _t=Y(60850);function Xr(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Name is required"),e.k0s())}function Hr(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Maximum 100 characters allowed."),e.k0s())}function Wr(a,p){if(1&a&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&a){const r=p.$implicit;e.Y8G("value",r.department),e.R7$(),e.SpI(" ",r.department," ")}}function Qr(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Department is required"),e.k0s())}function qr(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Maximum 100 characters allowed."),e.k0s())}function Jr(a,p){if(1&a&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&a){const r=p.$implicit;e.Y8G("value",r.band),e.R7$(),e.SpI(" ",r.band," ")}}function Kr(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Band is required"),e.k0s())}function Zr(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Maximum 50 characters allowed."),e.k0s())}function es(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Maximum 255 characters allowed"),e.k0s())}let Ut=(()=>{var a;class p{constructor(t,n,o,i,s,d,u,g,m){this.fb=t,this.httpService=n,this.encryptionService=o,this.config=i,this.dialogRef=s,this.data=d,this.dataRefreshService=u,this.toastr=g,this.recruitmentService=m,this.isEditMode=!1,this.isSubmitting=!1,this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.loggedInCompanyReviewCycle=null,this.allDepartments=[],this.allBands=[],this.filteredDepartments=[],this.filteredBands=[],this.positionRequisitionYears=[],this.selectedYearForRecruitment="",this.fromYear="",this.toYear="",this.taskFromDate=null,this.taskToDate=null,this.destroy$=new Z.B}ngOnInit(){var t,n;this.initializeSessionData(),this.initForm(null===(t=this.data)||void 0===t?void 0:t.competency),this.isEditMode=!(null===(n=this.data)||void 0===n||null===(n=n.competency)||void 0===n||!n.id),this.getPmsYearList()}getPmsYearList(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.positionRequisitionYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.positionRequisitionYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-")),this.loadDepartments(),this.loadBands()}onYearChange(t){this.selectedYearForRecruitment=t,this.loadDepartments(),this.loadBands()}loadDepartments(){const n=this.recruitmentService.appendChildId(`${this.config.getDepartmentSetup}?companyId=${this.loggedInUserCompanyID}`);this.httpService.callGetService(n).subscribe({next:o=>{this.allDepartments=((null==o?void 0:o.data)||[]).map(i=>({department:i})).sort((i,s)=>i.department.localeCompare(s.department)),this.filteredDepartments=[...this.allDepartments]},error:o=>console.error("Error fetching departments:",o)})}loadBands(){const n=this.recruitmentService.appendChildId(`${this.config.getBandSetup}?companyId=${this.loggedInUserCompanyID}`);this.httpService.callGetService(n).subscribe({next:o=>{this.allBands=((null==o?void 0:o.data)||[]).map(i=>({band:i})).sort((i,s)=>i.band.localeCompare(s.band)),this.filteredBands=[...this.allBands]},error:o=>console.error("Error fetching bands:",o)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}initForm(t){var n,o;this.competencyForm=this.fb.group({competency:[(null==t?void 0:t.competency)||"",[y.k0.required,y.k0.maxLength(100)]],description:[(null==t?void 0:t.description)||"",y.k0.maxLength(255)],department:[
1(null==t?void 0:t.department)||"",[y.k0.required,y.k0.maxLength(100)]],band:[(null==t?void 0:t.band)||"",[y.k0.required,y.k0.maxLength(100)]]}),null===(n=this.competencyForm.get("department"))||void 0===n||n.valueChanges.subscribe(i=>{const s=(i||"").toLowerCase();this.filteredDepartments=this.allDepartments.filter(d=>d.department.toLowerCase().includes(s))}),null===(o=this.competencyForm.get("band"))||void 0===o||o.valueChanges.subscribe(i=>{const s=(i||"").toLowerCase();this.filteredBands=this.allBands.filter(d=>d.band.toLowerCase().includes(s))})}onSubmit(){if(this.competencyForm.valid){var t;this.isSubmitting=!0;const n=this.competencyForm.getRawValue(),o={id:this.isEditMode?null===(t=this.data)||void 0===t||null===(t=t.competency)||void 0===t?void 0:t.id:void 0,competency:n.competency,department:n.department,band:n.band,description:n.description||"",fiscalYear:this.selectedYearForRecruitment,childId:this.recruitmentService.getChildId(),companyId:this.loggedInUserCompanyID},i=this.isEditMode?`${this.config.updateCompetencyUrl}/${o.id}`:this.config.addCompetencyUrl;(this.isEditMode?this.httpService.callPutService(i,o):this.httpService.callPostService(i,[o])).subscribe({next:()=>{this.toastr.success(this.isEditMode?"Competency updated successfully":"Competency added successfully","Success",{timeOut:3e3,progressBar:!0}),this.dialogRef.close(o),this.isSubmitting=!1},error:d=>{var u;this.toastr.error((null==d||null===(u=d.error)||void 0===u?void 0:u.message)||"Failed to save competency","Error",{timeOut:3e3,progressBar:!0}),this.isSubmitting=!1}})}else this.competencyForm.markAllAsTouched(),Object.keys(this.competencyForm.controls).forEach(n=>{this.competencyForm.get(n)}),this.competencyForm.markAllAsTouched(),this.toastr.error("Please fix the errors in the form.","Validation Error",{timeOut:3e3,progressBar:!0})}cancel(){this.dialogRef.close()}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(y.ok),e.rXU(c.k),e.rXU(S.L),e.rXU(_.T),e.rXU(b.CP),e.rXU(b.Vh),e.rXU(C.N),e.rXU(q.tw),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-add-edit-compenancies-popup"]],decls:59,vars:17,consts:[["autoDept","matAutocomplete"],["autoBand","matAutocomplete"],[1,"form-container"],[1,"cardLayout"],["size","4"],[1,"formLabelSemiBoldfs16","mb-5",2,"margin","10px"],["size","8",1,"text-right"],["src","././assets/icon/close_icon.png","alt","Close","role","button","tabindex","0",1,"cp",3,"mat-dialog-close"],[1,"form-scroll-container",2,"padding","0rem !important"],[3,"ngSubmit","formGroup"],["size","6"],[1,"formLabelRegularfs16","mb-5"],[1,"red-cl"],["appearance","fill",1,"w-100","mat-height40","mat-input-style"],["matInput","","placeholder","Enter competency name","formControlName","competency","aria-required","true"],[4,"ngIf"],["type","text","matInput","","placeholder","Enter department name","formControlName","department","aria-required","true",3,"matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],["size","12",1,"mt-10"],["type","text","matInput","","placeholder","Enter band name","formControlName","band","aria-required","true",3,"matAutocomplete"],[1,"w-100","mat-input-style"],["matInput","","rows","3","formControlName","description","placeholder","Enter description"],["size","12",1,"text-right","mt-10"],["type","button",1,"back_btn","fs-14",3,"click"],["type","submit",1,"add_btn","fs-14","ml-10",3,"disabled"],[3,"value"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",2)(1,"div",3)(2,"ion-row")(3,"ion-col",4)(4,"div",5),e.EFF(5),e.k0s()(),e.j41(6,"ion-col",6),e.nrm(7,"img",7),e.k0s()(),e.j41(8,"div",8)(9,"form",9),e.bIt("ngSubmit",function(){return e.eBV(o),e.Njj(n.onSubmit())}),e.j41(10,"ion-grid")(11,"ion-row")(12,"ion-col",10)(13,"label",11),e.EFF(14," Name "),e.j41(15,"span",12),e.EFF(16,"*"),e.k0s()(),e.j41(17,"mat-form-field",13),e.nrm(18,"input",14),e.DNE(19,Xr,2,0,"mat-error",15)(20,Hr,2,0,"mat-error",15),e.k0s()(),e.j41(21,"ion-col",10)(22,"label",11),e.EFF(23," Department "),e.j41(24,"span",12),e.EFF(25,"*"),e.k0s()(),e.j41(26,"mat-form-field",13),e.nrm(27,"input",16),e.j41(28,"mat-autocomplete",null,0),e.DNE(30,Wr,2,2,"mat-option",17),e.k0s(),e.DNE(31,Qr,2,0,"mat-error",15)(32,qr,2,0,"mat-error",15),e.k0s()()(),e.j41(33,"ion-row")(34,"ion-col",18)(35,"label",11),e.EFF(36," Band "),e.j41(37,"span",12),e.EFF(38,"*"),e.k0s()(),e.j41(39,"mat-form-field",13),e.nrm(40,"input",19),e.j41(41,"mat-autocomplete",null,1),e.DNE(43,Jr,2,2,"mat-option",17),e.k0s(),e.DNE(44,Kr,2,0,"mat-error",15)(45,Zr,2,0,"mat-error",15),e.k0s()()(),e.j41(46,"ion-row")(47,"ion-col",18)(48,"label",11),e.EFF(49,"Description"),e.k0s(),e.j41(50,"mat-form-field",20),e.nrm(51,"textarea",21),e.DNE(52,es,2,0,"mat-error",15),e.k0s()()(),e.j41(53,"ion-row")(54,"ion-col",22)(55,"button",23),e.bIt("click",function(){return e.eBV(o),e.Njj(n.cancel())}),e.EFF(56,"Cancel"),e.k0s(),e.j41(57,"button",24),e.EFF(58),e.k0s()()()()()()()()}if(2&t){let o,i,s,d,u,g,m;const l=e.sdS(29),f=e.sdS(42);e.R7$(5),e.SpI(" ",n.isEditMode?"Edit Competency":"Add New Competency"," "),e.R7$(4),e.Y8G("formGroup",n.competencyForm),e.R7$(10),e.Y8G("ngIf",null==(o=n.competencyForm.get("competency"))?null:o.hasError("required")),e.R7$(),e.Y8G("ngIf",null==(i=n.competencyForm.get("competency"))?null:i.hasError("maxlength")),e.R7$(7),e.Y8G("matAutocomplete",l),e.R7$(3),e.Y8G("ngForOf",n.filteredDepartments),e.R7$(),e.Y8G("ngIf",null==(s=n.competencyForm.get("department"))?null:s.hasError("required")),e.R7$(),e.Y8G("ngIf",null==(d=n.competencyForm.get("department"))?null:d.hasError("maxlength")),e.R7$(8),e.Y8G("matAutocomplete",f),e.R7$(3),e.Y8G("ngForOf",n.filteredBands),e.R7$(),e.Y8G("ngIf",null==(u=n.competencyForm.get("band"))?null:u.hasError("required")),e.R7$(),e.Y8G("ngIf",null==(g=n.competencyForm.get("band"))?null:g.hasError("maxlength")),e.R7$(7),e.Y8G("ngIf",null==(m
1=n.competencyForm.get("description"))?null:m.hasError("maxlength")),e.R7$(5),e.xc7("background-color",n.buttonColorName),e.Y8G("disabled",n.isSubmitting),e.R7$(),e.SpI(" ",n.isEditMode?"Update Competency":"Add Competency"," ")}},dependencies:[K.Sq,K.bT,y.qT,y.me,y.BC,y.cb,J.hU,J.lO,J.ln,R.rl,R.TL,pe.wT,y.j4,y.JD,M.fg,b.tx,_t.$3,_t.pN],styles:[".cardLayout[_ngcontent-%COMP%]{padding:20px}.removeIcon[_ngcontent-%COMP%]{height:25px} .mat-mdc-dialog-container .mdc-dialog__surface{border-radius:18px!important}.add_btn.disabled[_ngcontent-%COMP%]{color:#302b2b;cursor:not-allowed;opacity:.6}.form-scroll-container[_ngcontent-%COMP%]{max-height:80vh;overflow-y:auto;padding:1rem}[_nghost-%COMP%] .mat-dialog-container{max-height:90vh;overflow-y:auto}.mb-5[_ngcontent-%COMP%]{margin-bottom:5px}.search-container[_ngcontent-%COMP%]{padding:8px 12px;position:sticky;top:0;background:#fff;z-index:1}.search-input[_ngcontent-%COMP%]{width:100%;padding:8px;box-sizing:border-box;border:1px solid rgba(0,0,0,.12);border-radius:4px}"]}),p})();function ts(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Question is required "),e.k0s())}function ns(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Maximum 200 characters allowed "),e.k0s())}function os(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Already Exist "),e.k0s())}function is(a){return p=>{const r=(p.value||"").trim().toLowerCase();return r&&a.some(n=>(n||"").trim().toLowerCase()===r)?{alreadyExists:!0}:null}}let Bt=(()=>{var a;class p{constructor(t,n,o,i,s,d,u,g,m){this.fb=t,this.httpService=n,this.encryptionService=o,this.config=i,this.dialogRef=s,this.data=d,this.dataRefreshService=u,this.toastr=g,this.recruitmentService=m,this.isEditMode=!1,this.isSubmitting=!1,this.positionRequisitionYears=[],this.selectedYearForRecruitment="",this.fromYear="",this.toYear="",this.taskFromDate=null,this.taskToDate=null,this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.loggedInCompanyReviewCycle=null}ngOnInit(){var t,n,o;this.isEditMode=!(null===(t=this.data)||void 0===t||null===(t=t.element)||void 0===t||!t.question);const i=(null===(n=this.data)||void 0===n?void 0:n.existingQuestions)||[];var s;this.questionForm=this.fb.group({questionText:[(null===(o=this.data)||void 0===o||null===(o=o.element)||void 0===o?void 0:o.question)||"",[y.k0.required,y.k0.maxLength(200),is(i)]]}),this.initializeSessionData(),this.getPmsYearList(),this.isEditMode&&(this.selectedYearForRecruitment=(null===(s=this.data)||void 0===s||null===(s=s.element)||void 0===s?void 0:s.fiscalYear)||"")}onSubmit(){var t,n,o;if(this.questionForm.invalid)return this.questionForm.markAllAsTouched(),void this.toastr.error("Please fix the errors in the form.","Validation Error",{timeOut:3e3,progressBar:!0});this.isSubmitting=!0;const i=this.questionForm.getRawValue(),s=this.isEditMode?null===(t=this.data)||void 0===t||null===(t=t.element)||void 0===t?void 0:t.id:void 0,d=(null===(n=this.data)||void 0===n?void 0:n.competency)||(null===(o=this.data)||void 0===o||null===(o=o.element)||void 0===o?void 0:o.competency),u={id:s,question:i.questionText,fiscalYear:this.selectedYearForRecruitment,companyId:this.loggedInUserCompanyID,competencyId:null==d?void 0:d.id,childId:this.recruitmentService.getChildId(),isDeleted:0},l=this.isEditMode?`${this.config.updateQuestionEndpoint}/${u.id}`:this.config.addQuestionEndpoint;(this.isEditMode?this.httpService.callPutService(l,u):this.httpService.callPostService(l,[u])).subscribe({next:()=>{this.toastr.success(this.isEditMode?"Question updated successfully":"Question added successfully","Success",{timeOut:3e3,progressBar:!0}),this.dialogRef.close(u),this.isSubmitting=!1},error:h=>{var v;console.error("\u274c Error saving question:",h),this.toastr.error((null==h||null===(v=h.error)||void 0===v?void 0:v.message)||"Failed to save question","Error",{timeOut:3e3,progressBar:!0}),this.isSubmitting=!1}})}onCancel(){this.dialogRef.close()}getPmsYearList(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.positionRequisitionYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.positionRequisitionYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-"))}onYearChange(t){this.selectedYearForRecruitment=t}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(y.ok),e.rXU(c.k),e.rXU(S.L),e.rXU(_.T),e.rXU(b.CP),e.rXU(b.Vh),e.rXU(C.N),e.rXU(q.tw),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-add-edit-question-popup"]],decls:27,vars:9,consts:[[1,"form-container"],[1,"cardLayout"],["size","6"],[1,"formLabelSemiBoldfs16","mb-5",2,"margin","10px"],["size","6",1,"text-right"],["src","./assets/icon/close_icon.png","alt","Close","role","button","tabindex","0",1,"cp",3,"mat-dialog-close"],[3,"ngSubmit","formGroup"],["size","12"],[1,"formLabelRegularfs16","mb-5"],[1,"red-cl"],[1,"w-100","mat-height40","mat-input-style"],["matInput","","rows","4","placeholder","Enter the interview question","formControlName","questionText"],[4,"ngIf"],["size","12",1,"text-right","mt-10"],["type","button",1,"back_btn","fs-14",3,"click"],["type","submit",1,"add_btn","fs-14","ml-10",3,"disabled"]],template:function(t,n){if(1&t&&(e.j41(0,"div",0)(1,"div",1)(2,"ion-row")(3,"ion-col",2)(4,"div",3),e.EFF(5),e.k0s()(),e.j41(6,"ion-col",4),e.nrm(7,"img",5),e.k0s()(),e.j41(8,"form",6),e.bIt("ngSubmit",function(){return n.onSubmit()}),e.j41(9,"ion-grid")(10,"ion-row")(11,"ion-col",7)(12,"label",8),e.EFF(13,"Question Text"),e.j41(14,"span",9),e.EFF(15," *"),e.k0s()(),e.j41(16,"mat-form-field",10),e.nrm(17,"textarea",11),e.DNE(18,ts,2,0,"mat-error",12)(19,ns,2,0,"mat-error",12)(20,os,2,0,"mat-error",12),e.k0s()()(),e.j41(21,"ion-row")(22,"ion-col",13)(23,"button",14),e.bIt("click",function(){return n.onCancel()}),e.EFF(24,"Cancel"),e.k0s(),e.j41(25,"button",15),e.EFF(26),e.k0s()()()()()()()),2&t){let o,i,s;e.R7$(5),e.SpI(" ",n.isEditMode?"Edit Question":"Add New Question"," "),e.R7$(3),e.Y8G("formGroup",n.questionForm),e.R7$(10),e.Y8G("ngIf",null==(o=n.questionForm.get("questionText"))?null:o.hasError("required")),e.R7$(),e.Y8G("ngIf",null==(i=n.questionForm.get("questionText"))?null:i.hasError("maxlength")),e.R7$(),e.Y8G("ngIf",null==(s=n.questionForm.get("questionText"))?null:s.hasError("alreadyExists")),e.R7$(5),e.xc7("background-color",n.buttonColorName),e.Y8G("disabled",n.isSubmitting),e.R7$(),e.SpI(" ",n.isEditMode?"Update Question":"Add Question"," ")}},dependencies:[K.bT,y.qT,y.me,y.BC,y.cb,J.hU,J.lO,J.ln,R.rl,R.TL,y.j4,y.JD,M.fg,b.tx],styles:[".cardLayout[_ngcontent-%COMP%]{padding:20px}.removeIcon[_ngcontent-%COMP%]{height:25px} .mat-mdc-dialog-container .mdc-dialog__surface{border-radius:18px!important}.add_btn.disabled[_ngcontent-%COMP%]{color:#302b2b;cursor:not-allowed;opacity:.6}.form-scroll-container[_ngcontent-%COMP%]{max-height:80vh;overflow-y:auto;padding:1rem}[_nghost-%COMP%] .mat-dialog-container{max-height:90vh;overflow-y:auto}.mb-5[_ngcontent-%COMP%]{margin-bottom:5px}"]}),p})();const rs=["columnChooserBtn"];function ss(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",16),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.addQuestion())}),e.j41(1,"span",17),e.EFF(2,"add"),e.k0s(),e.EFF(3,"Add Question "),e.k0s()}if(2&a){const r=e.XpG();e.xc7("background-color",r.buttonColorName),e.Y8G("disabled",r.isAllCompanySelected)}}let as=(()=>{var a;class p{constructor(t,n,o,i,s,d,u,g,m,l){this.fb=t,this.httpService=n,this.config=o,this.encryptionService=i,this.dataRefreshService=s,this.dialog=d,this.sharedService=u,this.toastr=g,this.data=m,this.recruitmentService=l,this.searchTerm="",this.rowData=[],this.columnDefs=[],this.gridOptions={context:{componentParent:this},popupParent:document.querySelector("body"),pagination:!0,paginationPageSize:10,suppressCellFocus:!0,paginationPageSizeSelector:[5,10,25,50,75,100,200,500,1e3],defaultColDef:{sortable:!0,filter:!0,resizable:!0,floatingFilter:!1,flex:1,headerClass:"centered-header"},postProcessPopup:f=>{var h;const v=f.ePopup;if(v&&(v.style.zIndex="2000"),"columnChooser"!==f.type)return;const k=null===(h=this.columnChooserBtn)||void 0===h?void 0:h.nativeElement;if(!k||!v)return;const B=k.getBoundingClientRect();v.style.top=`${B.bottom+window.scrollY+4}px`,v.style.left="auto",v.style.right=document.documentElement.clientWidth-B.right+"px"}},this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.positionYears=[],this.competencyId=null,this.loggedInUserRoleIsM
1D=!1,this.isAllCompanySelected=!1}ngOnInit(){var t;this.initSessionData(),this.initColumnDefs(),this.getPMSYearListAndInitialize(),null!==(t=this.data)&&void 0!==t&&null!==(t=t.competency)&&void 0!==t&&t.id&&(this.competencyId=this.data.competency.id),this.isAllCompanySelected=null===this.recruitmentService.getChildId(),this.recruitmentService.selectedChildId$.subscribe(n=>{this.isAllCompanySelected=null===n})}initColumnDefs(){this.columnDefs=[{field:"question",headerName:"Question",minWidth:300,flex:3,tooltipField:"question"},{headerName:"Actions",minWidth:120,maxWidth:130,hide:this.loggedInUserRoleIsMD,sortable:!1,filter:!1,cellRenderer:n=>{var o;const i=null===(o=n.context)||void 0===o?void 0:o.componentParent,d=(null==i?void 0:i.isAllCompanySelected)?"opacity:0.4;pointer-events:none;":"";return`\n <span class="material-icons" data-action="edit" style="color:#3f51b5;cursor:pointer;margin-right:10px;font-size:20px;vertical-align:middle;${d}" title="Edit">edit</span>\n <span class="material-icons" data-action="delete" style="color:#f44336;cursor:pointer;font-size:20px;vertical-align:middle;${d}" title="Delete">delete</span>\n `},onCellClicked:n=>{var o;const i=n.event.target,s=i.getAttribute("data-action")||(null===(o=i.closest("[data-action]"))||void 0===o?void 0:o.getAttribute("data-action"));"edit"===s&&this.editQuestion(n.data),"delete"===s&&this.deleteQuestion(n.data)}}]}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}onGridReady(t){this.gridApi=t.api}resetGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.refreshCells()),this.fetchQuestionList()}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}applyFilter(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}fetchQuestionList(){if(!this.loggedInUserCompanyID||!this.selectedYearForRecruitment||!this.competencyId)return;const n=this.recruitmentService.appendChildId(`${this.config.getCompetencyQuestion}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&competencyId=${this.competencyId}`);this.httpService.callGetService(n).subscribe({next:o=>{null!=o&&o.status&&Array.isArray(o.data)?this.rowData=o.data.filter(i=>!i.isDeleted):this.toastr.error("No question data found.")},error:o=>{console.error("Error fetching competency data:",o),this.toastr.error("Failed to load question data.")}})}addQuestion(){const t=new b.ru;t.disableClose=!1,t.height="50%",t.width="50%",t.panelClass="custom-dialog-container",t.data={competency:{id:this.competencyId},existingQuestions:this.rowData.map(o=>o.question)},this.dialog.open(Bt,t).afterClosed().subscribe(o=>{o&&this.fetchQuestionList()})}editQuestion(t){const n=new b.ru;n.disableClose=!0,n.height="50%",n.width="50%",n.panelClass="custom-dialog-container",n.data={element:t,competency:{id:this.competencyId},existingQuestions:this.rowData.filter(i=>i.id!==t.id).map(i=>i.question)},this.dialog.open(Bt,n).afterClosed().subscribe(i=>{i&&this.fetchQuestionList()})}deleteQuestion(t){this.dialog.open(le.$,{disableClose:!0,height:"25%",width:"30%",data:{msg:"Are you sure you want to delete this question?",btn1:"Cancel",btn2:"Yes",btn2BgColor:this.buttonColorName,showSuccessIcon:!1,showSuccessMessage:!1,showCloseIcon:!1}}).afterClosed().subscribe(o=>{if(!o)return;const s=this.recruitmentService.appendChildId(`${this.config.softDeleteQuestionUrl}?id=${t.id}&deletedBy=${this.loggedInUserId}`);this.httpService.callPutService(s,{}).subscribe({next:()=>{this.toastr.success("Question deleted successfully.","Success",{timeOut:3e3,progressBar:!0}),this.fetchQuestionList()},error:d=>{var u;this.toastr.error((null===(u=d.error)||void 0===u?void 0:u.message)||"Failed to delete the question.","Error",{timeOut:3e3,progressBar:!0})}})})}initSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName,this.loggedInUserRoleIsM
1D=this.loggedInUserRoles.some(o=>"MD"===o.displayName)}getPMSYearListAndInitialize(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.positionYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.positionYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-"),this.fetchQuestionList())}downloadQuestions(){if(!this.gridApi)return;const t=[],n=this.gridApi.paginationGetPageSize(),i=this.gridApi.paginationGetCurrentPage()*n,s=i+n;if(this.gridApi.forEachNodeAfterFilterAndSort((l,f)=>{f>=i&&f<s&&t.push(l.data)}),!t.length)return void this.toastr.info("No data available to download for the current page.","Info");const d=t.map(l=>({Question:l.question})),g={Sheets:{Questions:F.utils.json_to_sheet(d)},SheetNames:["Questions"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Questions_Page_${this.gridApi.paginationGetCurrentPage()+1}.xlsx`)}downloadVisibleColumns(){if(!this.gridApi)return;const t=this.gridApi.getAllDisplayedColumns().map(l=>l.getColDef()).filter(l=>l.headerName&&l.field&&"Actions"!==l.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=[];this.gridApi.forEachNodeAfterFilterAndSort(l=>i.push(l.data));const s=i.slice(n*o,(n+1)*o);if(!s.length)return void this.toastr.info("No data to download for this page.","Info");const d=s.map(l=>{const f={};for(const h of t){let v;if("function"==typeof h.valueGetter)try{v=h.valueGetter({data:l})}catch{v=l[h.field]}else v=l[h.field];null==v?v="":"object"==typeof v&&(v=Object.values(v).join(", ")),f[h.headerName]=String(v)}return f}),g={Sheets:{Data:F.utils.json_to_sheet(d)},SheetNames:["Data"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Export_Visible_Page_${n+1}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(y.ok),e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU(C.N),e.rXU(b.bZ),e.rXU($.d),e.rXU(q.tw),e.rXU(b.Vh),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-add-edit-question-table"]],viewQuery:function(t,n){if(1&t&&e.GBs(rs,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},decls:20,vars:7,consts:[["columnChooserBtn",""],[1,"cardBox"],[1,"filter-bar","mb-10"],[1,"ml-20","mt-20"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],["size","auto",1,"d-flex","align-center","justify-content-flex-end","gap-10","mt-20"],["type","button","class","add_btn fs-14 float-right center-content mr-5",3,"background-color","disabled","click",4,"ngIf"],["title","Download",1,"icon-download","material-icons","mr-5",3,"click"],["title","Refresh",1,"icon-refresh","material-icons","mr-5",3,"click"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5","mr-5",3,"click"],[1,"material-icons"],["src","./assets/icon/close_icon.png","alt","Close","role","button","tabindex","0",1,"cp",2,"height","24px","padding-left","5px","padding-right","10px","align-self","center",3,"mat-dialog-close"],[1,"m-20","setup-grid-wrapper"],[1,"ag-theme-quartz","setup-grid-container",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],["type","button",1,"add_btn","fs-14","float-right","center-content","mr-5",3,"click","disabled"],[1,"material-icons","fs-20","mr-5"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",1)(1,"ion-row",2)(2,"ion-col",3)(3,"mat-form-field",4)(4,"mat-icon",5),e.EFF(5,"search"),e.k0s(),e.j41(6,"input",6),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.applyFilter())}),e.k0s()()(),e.j41(7,"ion-col",7),e.DNE(8,ss,4,3,"button",8),e.j41(9,"span",9),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(10,"download"),e.k0s(),e.j41(11,"span",10),e.bIt("click",function(){return e.eBV(o),e.Njj(n.resetGrid())}),e.EFF(12,"refresh"),e.k0s(),e.j41(13,"button",11,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(15,"span",12),e.EFF(16,"tune"),e.k0s()(),e.nrm(17,"img",13),e.k0s()(),e.j41(18,"div",14)(19,"ag-grid-angular",15),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))}),e.k0s()()()}2&t&&(e.R7$(6),e.R50("ngModel",n.searchTerm),e.R7$(2),e.Y8G("ngIf",!n.loggedInUserRoleIsM
1D),e.R7$(5),e.xc7("background-color",n.buttonColorName),e.R7$(6),e.Y8G("rowData",n.rowData)("columnDefs",n.columnDefs)("gridOptions",n.gridOptions))},dependencies:[K.bT,y.me,y.BC,y.vS,J.hU,J.ln,R.rl,R.JW,M.fg,x.An,b.tx,G.xs],styles:['#background-content[_ngcontent-%COMP%]{position:absolute;top:calc(var(--offset-top, 0px) * -1);bottom:calc(var(--offset-bottom, 0px) * -1);left:0;right:0;background-color:#f6f5fb!important;z-index:0}.content-wrapper[_ngcontent-%COMP%]{position:relative;z-index:1}.container[_ngcontent-%COMP%]{--background: #f6f5fb;padding:0 15px}.cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.cardBoxHeading[_ngcontent-%COMP%]{background-color:#ddd;padding:5px;color:#000;border-radius:10px 10px 0 0}.table-container[_ngcontent-%COMP%]{width:100%;overflow-y:auto;overflow-x:auto;max-height:500px}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid #ddd;padding:4px;text-align:left;font-size:14px}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f2f2f2;font-family:OpenSans-SemiBold}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background-color:#fff;font-family:OpenSans-Regular}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .link-primary[_ngcontent-%COMP%]{color:#007bff;text-decoration:underline;cursor:pointer}.mat-height40[_ngcontent-%COMP%]{height:40px!important}.w70px[_ngcontent-%COMP%]{width:70px}.icon-download[_ngcontent-%COMP%], .icon-refresh[_ngcontent-%COMP%]{border:1px solid #f3820e;color:#f3820e;padding:9px;border-radius:6px;background-color:#fff;height:40px;width:40px;font-size:22px;cursor:pointer;display:flex;align-items:center;justify-content:center}.setup-grid-wrapper[_ngcontent-%COMP%]{height:auto;border:1px solid #e2e2e2;border-radius:8px;overflow:hidden}.setup-grid-container[_ngcontent-%COMP%]{width:100%;font-family:OpenSans-Regular,sans-serif}[_nghost-%COMP%] .ag-theme-quartz{--ag-header-background-color: #dddddd;--ag-header-foreground-color: #000;--ag-row-hover-color: #f8fafc;--ag-selected-row-background-color: #f1f5f9;--ag-font-size: 13px;--ag-font-family: "OpenSans-Regular", sans-serif;--ag-border-color: #e2e8f0;--ag-row-border-style: solid;--ag-row-border-width: 1px;--ag-row-border-color: #e2e8f0;border:1px solid #e2e8f0;border-radius:8px}[_nghost-%COMP%] .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell{display:flex;align-items:center;padding-left:12px!important;padding-right:12px!important;border-right:1px solid #e2e8f0!important;border-bottom:1px solid #e2e8f0!important}.cp[_ngcontent-%COMP%]{cursor:pointer;margin-right:8px;color:#333}.fs-14[_ngcontent-%COMP%]{font-size:14px}.fs-20[_ngcontent-%COMP%]{font-size:20px}.mr-5[_ngcontent-%COMP%]{margin-right:5px}.mr-10[_ngcontent-%COMP%]{margin-right:10px}.ml-5[_ngcontent-%COMP%]{margin-left:5px}.mt-10[_ngcontent-%COMP%]{margin-top:10px}.mt-20[_ngcontent-%COMP%]{margin-top:20px}.ml-10[_ngcontent-%COMP%]{margin-left:10px}.pr-10[_ngcontent-%COMP%]{padding-right:10px}.pl-10[_ngcontent-%COMP%]{padding-left:10px}.d-flex[_ngcontent-%COMP%]{display:flex}.justify-content-flex-end[_ngcontent-%COMP%]{justify-content:flex-end}.center-content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.add_btn[_ngcontent-%COMP%]{background-color:#031263;color:#fff;border:none;padding:6px 12px;border-radius:5px;cursor:pointer}.add_btn[_ngcontent-%COMP%]:disabled, .custom-disabled-button[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed;color:#302b2b}.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}.filter-bar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.small-field[_ngcontent-%COMP%]{min-width:180px}.w70px[_ngcontent-%COMP%]{width:70px!important}.cp[_ngcontent-%COMP%]{cursor:pointer}.toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:1rem}.toolbar[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:1 1 auto}.action-buttons[_ngcontent-%COMP%]{display:flex;align-items:center}.my-custom-table[_ngcontent-%COMP%] th.mat-header-cell[_ngcontent-%COMP%]{font-weight:600}.table-wrapper[_ngcontent-%COMP%]{overflow-y:auto;border:1px solid #ddd;border-radius:4px}.my-custom-table[_ngcontent-%COMP%]{width:100%;min-width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0}.header-cell[_ngcontent-%COMP%]{background-color:#ddd!important;font-weight:700!important}.col-select[_ngcontent-%COMP%]{width:50px;min-width:50px;max-width:50px;text-align:center}.cardLayout[_ngcontent-%COMP%]{padding:20px}.removeIcon[_ngcontent-%COMP%]{height:25px} .mat-mdc-dialog-container .mdc-dialog__surface{border-radius:18px!important}.add_btn.disabled[_ngcontent-%COMP%]{color:#302b2b;cursor:not-allowed;opacity:.6}.form-scroll-container[_ngcontent-%COMP%]{max-height:80vh;overflow-y:auto;padding:1rem}[_nghost-%COMP%] .mat-dialog-container{max-height:90vh;overflow-y:auto}.mb-5[_ngcontent-%COMP%]{margin-bottom:5px}.question[_ngcontent-%COMP%]{width:70%;min-width:70%;max-width:70%;text-align:center}']}),p})();const ls=["columnChooserBtn"];
1function ds(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",20),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.bulkDelete())}),e.j41(1,"span",21),e.EFF(2,"delete"),e.k0s(),e.EFF(3,"Bulk Delete "),e.k0s()}if(2&a){const r=e.XpG();e.Y8G("disabled",r.isAllCompanySelected||r.selectedYearForRecruitment!==r.currentFiscalYear)}}function cs(a,p){if(1&a&&(e.j41(0,"mat-option",22),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG();e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}function us(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",23),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.openAddCompetencyModal())}),e.j41(1,"span",21),e.EFF(2,"add"),e.k0s(),e.EFF(3,"Add Competency "),e.k0s()}if(2&a){const r=e.XpG();e.xc7("background-color",r.selectedYearForRecruitment===r.currentFiscalYear?r.buttonColorName:null),e.Y8G("disabled",r.isAllCompanySelected||r.selectedYearForRecruitment!==r.currentFiscalYear)}}let ps=(()=>{var a;class p{constructor(t,n,o,i,s,d,u,g,m){this.fb=t,this.httpService=n,this.config=o,this.encryptionService=i,this.dataRefreshService=s,this.dialog=d,this.sharedService=u,this.toastr=g,this.recruitmentService=m,this.competancy=[],this.searchTerm="",this.pageSize=10,this.pageSizeOptions=[5,10,25,50,75,100,200,500,1e3],this.currentFiscalYear="",this.rowData=[],this.columnDefs=[],this.selectedRowCount=0,this.gridOptions={context:{componentParent:this},popupParent:document.querySelector("body"),pagination:!0,paginationPageSize:10,suppressCellFocus:!0,paginationPageSizeSelector:[5,10,25,50,75,100,200,500,1e3],rowSelection:"multiple",suppressRowClickSelection:!0,defaultColDef:{sortable:!0,filter:!0,resizable:!0,floatingFilter:!1,flex:1,headerClass:"centered-header"},onSelectionChanged:()=>{this.selectedRowCount=this.gridApi?this.gridApi.getSelectedRows().length:0},postProcessPopup:l=>{var f;if("columnChooser"!==l.type)return;const h=null===(f=this.columnChooserBtn)||void 0===f?void 0:f.nativeElement,v=l.ePopup;if(!h||!v)return;const k=h.getBoundingClientRect();v.style.top=`${k.bottom+window.scrollY+4}px`,v.style.left="auto",v.style.right=document.documentElement.clientWidth-k.right+"px"}},this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInUserRoleIsMD=!1,this.loggedInCompanyMDCode=null,this.positionYears=[],this.isAllCompanySelected=!1}ngOnInit(){this.initSessionData(),this.initColumnDefs(),this.getPMSYearListAndInitialize(),this.dataRefreshService.refreshNeeded$.pipe((0,vt.i)(1)).subscribe(()=>{this.getPMSYearListAndInitialize()}),this.isAllCompanySelected=null===this.recruitmentService.getChildId(),this.recruitmentService.selectedChildId$.subscribe(t=>{this.isAllCompanySelected=null===t})}initColumnDefs(){const t=this.loggedInUserRoleIsMD;this.columnDefs=[{headerName:"select",checkboxSelection:!0,headerCheckboxSelection:!t,width:50,minWidth:50,maxWidth:50,hide:t,pinned:"left",sortable:!1,filter:!1},{field:"competency",headerName:"Competency Name",minWidth:180,tooltipField:"competency"},{field:"department",headerName:"Department",minWidth:150,tooltipField:"department"},{field:"band",headerName:"Band",minWidth:120,tooltipField:"band"},{headerName:"Actions",minWidth:140,maxWidth:160,sortable:!1,filter:!1,cellRenderer:n=>{var o;const i=null===(o=n.context)||void 0===o?void 0:o.componentParent,u=(null==i?void 0:i.isAllCompanySelected)||(null==i?void 0:i.selectedYearForRecruitment)!==(null==i?void 0:i.currentFiscalYear)?"opacity:0.4;pointer-events:none;":"";return((null==i?void 0:i.loggedInUserRoleIsMD)?"":`\n <span class="material-icons" data-action="edit" style="color:#3f51b5;cursor:pointer;margin-right:8px;font-size:20px;vertical-align:middle;${u}" title="Edit">edit</span>\n <span class="material-icons" data-action="delete" style="color:#f44336;cursor:pointer;margin-right:8px;font-size:20px;vertical-align:middle;${u}" title="Delete">delete</span>\n `)+`<span class="material-icons" data-action="add-question" style="color:#f3820e;cursor:pointer;font-size:20px;vertical-align:middle;${(null==i?void 0:i.selectedYearForRecruitment)!==(null==i?void 0:i.currentFiscalYear)?"opacity:0.4;pointer-events:none;":""}" title="Add Question">help</span>`},onCellClicked:n=>{var o;const i=n.event.target,s=i.getAttribute("data-action")||(null===(o=i.closest("[data-action]"))||void 0===o?void 0:o.getAttribute("data-action"));"edit"===s&&this.editCompetency(n.data),"delete"===s&&this.deleteCompetency(n.data),"add-question"===s&&this.showQuestionTable(n.data)}}]}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}onGridReady(t){this.gridApi=t.api}resetGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.deselectAll(),this.gridApi.refreshCells()),this.selectedRowCount=0,this.fetchCompetencyData()}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}initSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName,this.loggedInUserRoleIsM
1D=this.loggedInUserRoles.some(o=>"MD"===o.displayName)}getPMSYearListAndInitialize(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.positionYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear),d=`${i}-${s}`;this.currentFiscalYear=d,this.setSelectedYear(d)})}setSelectedYear(t){const n=this.positionYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-"),this.fetchCompetencyData())}onYearChange(t){this.taskFromDate=null,this.taskToDate=null,this.setSelectedYear(t)}fetchCompetencyData(){const t=this.recruitmentService.appendChildId(`${this.config.getCompetencyData}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}`);this.httpService.callGetService(t).subscribe({next:n=>{this.competancy=n.data.filter(o=>!o.isDeleted),this.rowData=[...this.competancy]},error:n=>console.error("Error fetching competency data:",n)})}filterCompetencies(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}hasSelectedRows(){return this.selectedRowCount>0}bulkDelete(){const t=this.gridApi?this.gridApi.getSelectedRows():[];if(!t||0===t.length)return;const o=t.map(i=>i.id).map(i=>this.httpService.callGetService(this.recruitmentService.appendChildId(`${this.config.getCompetencyQuestion}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&competencyId=${i}`)));(0,ze.p)(o).subscribe({next:i=>{const s=[],d=[];if(i.forEach((m,l)=>{var f;((null==m||null===(f=m.data)||void 0===f?void 0:f.filter(v=>!v.isDeleted))||[]).length>0?s.push(t[l]):d.push(t[l])}),s.length>0&&this.toastr.warning(`${s.length} item(s) have associated questions and cannot be deleted.`,"Warning",{timeOut:3e3,progressBar:!0}),0===d.length)return;const u=d.map(m=>m.id);this.dialog.open(le.$,{disableClose:!0,height:"25%",width:"30%",data:{msg:`Are you sure you want to delete ${u.length} selected item(s)?`,btn1:"Cancel",btn2:"Yes",btn2BgColor:this.buttonColorName}}).afterClosed().subscribe(m=>{if(!m)return;const l=u.join(","),f=this.recruitmentService.appendChildId(`${this.config.bulkDeleteCompetencyUrl}?ids=${l}&deletedBy=${this.loggedInUserId}`),h={deletedBy:this.loggedInUserId,updatedAt:(new Date).toISOString()};this.httpService.callPutService(f,h).subscribe({next:()=>{this.toastr.success("Selected items deleted successfully.","Success"),this.selectedRowCount=0,this.fetchCompetencyData()},error:v=>{var k;this.toastr.error((null==v||null===(k=v.error)||void 0===k?void 0:k.message)||"Failed to delete selected items.","Error")}})})},error:i=>{console.error("Error checking competency questions:",i),this.toastr.error("Failed to validate selected competencies.","Error",{timeOut:3e3,progressBar:!0})}})}openAddCompetencyModal(){const t=new b.ru;t.disableClose=!0,t.height="70%",t.width="70%",t.panelClass="custom-dialog-container",t.data={},this.dialog.open(Ut,t).afterClosed().subscribe(o=>{o&&this.fetchCompetencyData()})}editCompetency(t){const n=new b.ru;n.disableClose=!0,n.height="70%",n.width="70%",n.panelClass="custom-dialog-container",n.data={competency:t},this.dialog.open(Ut,n).afterClosed().subscribe(i=>{i&&this.fetchCompetencyData()})}deleteCompetency(t){const n=this.recruitmentService.appendChildId(`${this.config.getCompetencyQuestion}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&competencyId=${t.id}`);this.httpService.callGetService(n).subscribe({next:o=>{var i;((null==o||null===(i=o.data)||void 0===i?void 0:i.filter(u=>!u.isDeleted))||[]).length>0?this.toastr.warning("This competency has associated questions and cannot be deleted.","Warning",{timeOut:3e3,progressBar:!0}):this.dialog.open(le.$,{disableClose:!0,height:"25%",width:"30%",data:{msg:"Are you sure you want to delete this competency?",btn1:"Cancel",btn2:"Yes",btn2BgColor:this.buttonColorName,showSuccessIcon:!1,showSuccessMessage:!1,showCloseIcon:!1}}).afterClosed().subscribe(u=>{if(!u)return;const g=this.recruitmentService.appendChildId(`${this.config.softDeleteCompetencyUrl}?id=${t.id}&deletedBy=${this.loggedInUserId}`);this.httpService.callPutService(g,{}).subscribe({next:()=>{this.toastr.success("Competency deleted successfully.","Success",{timeOut:3e3,progressBar:!0}),this.fetchCompetencyData()},error:m=>{var l;this.toastr.error((null===(l=m.error)||void 0===l?void 0:l.message)||"Failed to delete the competency.","Error",{timeOut:3e3,progressBar:!0})}})})},error:o=>{this.toastr.error("Failed to validate competency questions.","Error",{timeOut:3e3,progressBar:!0})}})}showQuestionTable(t){const n=new b.ru;n.disableClose=!0,n.height="70%",n.width="70%",n.panelClass="custom-dialog-container",n.data={competency:t},this.dialog.open(as,n).afterClosed().subscribe(i=>{i&&this.fetchCompetencyData()})}downloadCompetancies(){if(!this.gridApi)return;const t=[],n=this.gridApi.paginationGetPageSize(),i=this.gridApi.paginationGetCurrentPage()*n,s=i+n;if(this.gridApi.forEachNodeAfterFilterAndSort((l,f)=>{f>=i&&f<s&&t.push(l.data)}),!t.length)return void this.toastr.warning("No data available to download for the current page.","Warning");const d=t.map(l=>({Competency:l.competency,Department:l.department,Band:l.band})),g={Sheets:{competency:F.utils.json_to_sheet(d)},SheetNames:["competency"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),"Competency_List.xlsx")}downloadVisibleColumns(){if(!this.gridApi)return;
1const t=this.gridApi.getAllDisplayedColumns().map(l=>l.getColDef()).filter(l=>l.headerName&&l.field&&"Actions"!==l.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=[];this.gridApi.forEachNodeAfterFilterAndSort(l=>i.push(l.data));const s=i.slice(n*o,(n+1)*o);if(!s.length)return void this.toastr.info("No data to download for this page.","Info");const d=s.map(l=>{const f={};for(const h of t){let v;if("function"==typeof h.valueGetter)try{v=h.valueGetter({data:l})}catch{v=l[h.field]}else v=l[h.field];null==v?v="":"object"==typeof v&&(v=Object.values(v).join(", ")),f[h.headerName]=String(v)}return f}),g={Sheets:{Data:F.utils.json_to_sheet(d)},SheetNames:["Data"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Export_Visible_Page_${n+1}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(y.ok),e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU(C.N),e.rXU(b.bZ),e.rXU($.d),e.rXU(q.tw),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-competency-and-question"]],viewQuery:function(t,n){if(1&t&&e.GBs(ls,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},decls:24,vars:10,consts:[["columnChooserBtn",""],[1,"container","mb-20","mt-20"],[1,"cardBox","mb-20"],[1,"filter-bar","mb-10"],["size","auto",1,"ml-10","mt-20"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],["mat-raised-button","","color","warn","class","ml-10",3,"disabled","click",4,"ngIf"],[1,"d-flex","align-center","justify-content-flex-end","mt-20"],[1,"mat-height40","mat-input-style","small-field","mr-10"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["type","button","class","add_btn fs-14 float-right center-content mr-10",3,"background-color","disabled","click",4,"ngIf"],[1,"icon-download","material-icons","mr-10",3,"click"],[1,"icon-refresh","material-icons","mr-10",3,"click"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5","mr-10",3,"click"],[1,"material-icons"],[1,"m-20","setup-grid-wrapper"],[1,"ag-theme-quartz","setup-grid-container",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],["mat-raised-button","","color","warn",1,"ml-10",3,"click","disabled"],[1,"material-icons","fs-20","mr-5"],[3,"value"],["type","button",1,"add_btn","fs-14","float-right","center-content","mr-10",3,"click","disabled"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"ion-row",3)(3,"ion-col",4)(4,"mat-form-field",5)(5,"mat-icon",6),e.EFF(6,"search"),e.k0s(),e.j41(7,"input",7),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.filterCompetencies())}),e.k0s()(),e.DNE(8,ds,4,1,"button",8),e.k0s(),e.j41(9,"ion-col",9)(10,"mat-form-field",10)(11,"mat-select",11),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.selectedYearForRecruitment,s)||(n.selectedYearForRecruitment=s),e.Njj(s)}),e.bIt("selectionChange",function(s){return e.eBV(o),e.Njj(n.onYearChange(s.value))}),e.DNE(12,cs,2,2,"mat-option",12),e.k0s()(),e.DNE(13,us,4,3,"button",13),e.j41(14,"span",14),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(15,"download"),e.k0s(),e.j41(16,"span",15),e.bIt("click",function(){return e.eBV(o),e.Njj(n.resetGrid())}),e.EFF(17,"refresh"),e.k0s(),e.j41(18,"button",16,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(20,"span",17),e.EFF(21,"tune"),e.k0s()()()(),e.j41(22,"div",18)(23,"ag-grid-angular",19),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))}),e.k0s()()()()}2&t&&(e.R7$(7),e.R50("ngModel",n.searchTerm),e.R7$(),e.Y8G("ngIf",n.hasSelectedRows()&&!n.loggedInUserRoleIsMD),e.R7$(3),e.R50("ngModel",n.selectedYearForRecruitment),e.R7$(),e.Y8G("ngForOf",n.positionYears),e.R7$(),e.Y8G("ngIf",!n.loggedInUserRoleIsM
1D),e.R7$(5),e.xc7("background-color",n.buttonColorName),e.R7$(5),e.Y8G("rowData",n.rowData)("columnDefs",n.columnDefs)("gridOptions",n.gridOptions))},dependencies:[K.Sq,K.bT,y.me,y.BC,y.vS,J.hU,J.ln,R.rl,R.JW,he.VO,pe.wT,M.fg,x.An,Ae.$z,G.xs],styles:['.container[_ngcontent-%COMP%]{--background: #f6f5fb;padding:0 15px}.cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.cardBoxHeading[_ngcontent-%COMP%]{background-color:#ddd;padding:5px;color:#000;border-radius:10px 10px 0 0}.table-container[_ngcontent-%COMP%]{width:100%;overflow-y:auto;overflow-x:auto;max-height:500px}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid #ddd;padding:4px;text-align:left;font-size:14px}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f2f2f2;font-family:OpenSans-SemiBold}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background-color:#fff;font-family:OpenSans-Regular}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .link-primary[_ngcontent-%COMP%]{color:#007bff;text-decoration:underline;cursor:pointer}.mat-height40[_ngcontent-%COMP%]{height:40px!important}.w70px[_ngcontent-%COMP%]{width:70px}.icon-download[_ngcontent-%COMP%], .icon-refresh[_ngcontent-%COMP%]{border:1px solid #f3820e;color:#f3820e;padding:9px;border-radius:6px;background-color:#fff;height:40px;width:40px;font-size:22px;cursor:pointer;display:flex;align-items:center;justify-content:center}.setup-grid-wrapper[_ngcontent-%COMP%]{height:auto;border:1px solid #e2e2e2;border-radius:8px;overflow:hidden}.setup-grid-container[_ngcontent-%COMP%]{width:100%;font-family:OpenSans-Regular,sans-serif}[_nghost-%COMP%] .ag-theme-quartz{--ag-header-background-color: #dddddd;--ag-header-foreground-color: #000;--ag-row-hover-color: #f8fafc;--ag-selected-row-background-color: #f1f5f9;--ag-font-size: 13px;--ag-font-family: "OpenSans-Regular", sans-serif;--ag-border-color: #e2e8f0;--ag-row-border-style: solid;--ag-row-border-width: 1px;--ag-row-border-color: #e2e8f0;border:1px solid #e2e8f0;border-radius:8px}[_nghost-%COMP%] .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell{display:flex;align-items:center;justify-content:center;padding-left:12px!important;padding-right:12px!important;border-right:1px solid #e2e8f0!important;border-bottom:1px solid #e2e8f0!important}.cp[_ngcontent-%COMP%]{cursor:pointer;margin-right:8px;color:#333}.header-cell[_ngcontent-%COMP%]{background-color:#ddd!important;font-weight:700!important}']}),p})();var gs=Y(28422),St=Y(9159);const ms=["columnChooserBtn"];function hs(a,p){if(1&a&&(e.j41(0,"mat-option",20),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG();e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}let fs=(()=>{var a;class p{get arrAllMonths(){return this._arrAllMonthsCacheKey!==this.loggedInCompanyFiscalyear&&(this._arrAllMonthsCacheKey=this.loggedInCompanyFiscalyear,this._arrAllMonthsCache="Apr_Mar"===this.loggedInCompanyFiscalyear?[...this.months.slice(3),...this.months.slice(0,3)]:this.months),this._arrAllMonthsCache}get selectedMonths(){return this.selectedMonthObjects.map(t=>t.key)}get allMonthsSelected(){return this.selectedMonthObjects.length===this.arrAllMonths.length}onMonthsChange(t){this.selectedMonthObjects=t,this.fetchInterviews()}constructor(t,n,o,i,s,d,u,g){this.httpService=t,this.config=n,this.encryptionService=o,this.dataRefreshService=i,this.dialog=s,this.sharedService=d,this.toastr=u,this.recruitmentService=g,this.destroy$=new Z.B,this.agColumnDefs=[],this.agRowData=[],this.isClicked=!1,this.gridOptions={pagination:!1,suppressCellFocus:!0,rowHeight:42,popupParent:document.querySelector("body"),defaultColDef:{flex:1,minWidth:130,resizable:!0,sortable:!0,filter:!0,cellStyle:{border:"1px solid #dde2eb"}}
1,localeText:{noRowsToShow:"No records found"},postProcessPopup:m=>{var l;if("columnChooser"!==m.type)return;const f=null===(l=this.columnChooserBtn)||void 0===l?void 0:l.nativeElement,h=m.ePopup;if(!f||!h)return;const v=f.getBoundingClientRect();h.style.top=`${v.bottom+window.scrollY+4}px`,h.style.left="auto",h.style.right=document.documentElement.clientWidth-v.right+"px"},suppressRowTransform:!0,onFilterChanged:()=>{var m,l;null===(m=this.gridApi)||void 0===m||m.refreshCells({force:!0}),null===(l=this.gridApi)||void 0===l||l.redrawRows()},getRowClass:m=>{var l,f,h,v,k;const B=null!==(l=null===(f=m.node)||void 0===f?void 0:f.rowIndex)&&void 0!==l?l:-1;if(-1===B)return"";const de=null===(h=this.gridApi)||void 0===h?void 0:h.getDisplayedRowAtIndex(B+1);return de&&(null===(v=de.data)||void 0===v?void 0:v.candidateId)===(null===(k=m.data)||void 0===k?void 0:k.candidateId)?"":"group-last-row"}},this.dataSource=new St.I6([]),this.candidatesIntrview=[],this.searchTerm="",this.filteredGroupedData=[],this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.recruitmentYears=[],this.selectedYearForRecruitment="",this.fromYear="",this.toYear="",this.taskFromDate=null,this.taskToDate=null,this.selectedMonthObjects=[],this.monthDropdownSettings={singleSelection:!1,enableCheckAll:!0,selectAllText:"Select All",unSelectAllText:"Unselect All",idField:"key",textField:"name",itemsShowLimit:1,closeDropDownOnSelection:!1},this.loggedInUserRoleIsMD=!1,this.groupedInterviewData=[],this.months=[{key:"01",name:"January"},{key:"02",name:"February"},{key:"03",name:"March"},{key:"04",name:"April"},{key:"05",name:"May"},{key:"06",name:"June"},{key:"07",name:"July"},{key:"08",name:"August"},{key:"09",name:"September"},{key:"10",name:"October"},{key:"11",name:"November"},{key:"12",name:"December"}],this._arrAllMonthsCacheKey=Symbol(),this._arrAllMonthsCache=[]}ngOnInit(){this.initializeSessionData(),this.getPmsYearList(),this.setAgColumnDefs(),this.dataRefreshService.refreshNeeded$.pipe((0,Q.B)(300),(0,L.Q)(this.destroy$)).subscribe(()=>{this.initializeSessionData(),this.getPmsYearList()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName,this.loggedInUserRoleIsMD=this.loggedInUserRoles.some(o=>"MD"===o.displayName)}setAgColumnDefs(){const n=i=>({...i,rowSpan:s=>this.getRowSpan(s),cellClassRules:{"row-span-cell":s=>this.isFirstInSpan(s)},cellStyle:s=>{const d={border:"1px solid #dde2eb"};if(this.isFirstInSpan(s)){const u=this.getRowSpan(s);return{...d,height:42*u+"px",display:"flex",alignItems:"center",overflow:"visible",zIndex:2,backgroundColor:"#fff",borderBottom:"none"}}return{...d,visibility:"hidden"}}}),o=[n({headerName:"Candidate Name",field:"candidateName",pinned:"left",minWidth:180}),n({headerName:"Email",field:"email",minWidth:200}),n({headerName:"Phone",field:"phone",width:130}),n({headerName:"Position",field:"positionName",minWidth:160}),n({headerName:"Department",field:"department",minWidth:150}),n({headerName:"Source",field:"source",width:130}),n({headerName:"Band",field:"band",width:100}),{headerName:"Round",field:"interviewRound",width:120,cellRenderer:i=>i.value||'<span class="text-muted">\u2014</span>'},{headerName:"Interview Date & Time",field:"interviewDateTime",minWidth:200,valueFormatter:i=>{const s=i.data.interviewDate,d=i.data.interviewTime;return s?`${new Date(s).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"numeric"})} ${this.formatInterviewTime(s,d)}`:""},cellRenderer:i=>{const s=i.data.interviewDate,d=i.data.interviewTime;return s?`${new Date(s).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"numeric"})} ${this.formatInterviewTime(s,d)}`:'<span class="text-muted">\u2014</span>'}},{headerName:"Interview Mode",field:"interviewMode",width:140,cellRenderer:i=>i.value?`<span class="mode-badge ${"online"===i.value.toLowerCase()?"mode-online":"mode-offline"}">${i.value}</span>
1`:'<span class="text-muted">\u2014</span>'},{headerName:"Location / URL",field:"interviewDetails",minWidth:200,valueFormatter:i=>{const s=i.data;return s.interviewUrl||s.interviewLocation||""},cellRenderer:i=>{const s=i.data;return s.interviewUrl?`<a href="${s.interviewUrl}" target="_blank" class="link-btn">Join Link</a>`:s.interviewLocation||'<span class="text-muted">\u2014</span>'}},{headerName:"Panel Members",field:"panelMembers",minWidth:200,valueFormatter:i=>this.getObjectValues(i.value),cellRenderer:i=>this.getObjectValues(i.value)||'<span class="text-muted">\u2014</span>'},{headerName:"Lead Interviewer",field:"leadInterviewer",minWidth:180,valueFormatter:i=>this.getObjectValues(i.value),cellRenderer:i=>this.getObjectValues(i.value)||'<span class="text-muted">\u2014</span>'},{headerName:"Final Status",field:"finalStatus",width:140,cellRenderer:i=>{const s=this.getFinalStatusLabel(i.value);if(!s)return'<span class="text-muted">\u2014</span>';const d=s.toLowerCase().trim();let u="status-pending";return"selected"===d?u="status-selected":"rejected"===d?u="status-rejected":"offered"===d?u="status-offered":"scheduled"===d?u="status-scheduled":"evaluated"===d?u="status-evaluated":"evaluation pending"===d?u="status-pending":("shortlisted"===d||"on hold"===d)&&(u="status-process"),`<span class="status-badge-report ${u}">${s}</span>`}}];this.agColumnDefs=o}onGridReady(t){this.gridApi=t.api}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}getRowSpan(t){var n,o,i;const s=null!==(n=null===(o=t.node)||void 0===o?void 0:o.rowIndex)&&void 0!==n?n:-1;if(-1===s||!this.gridApi)return 1;const d=null===(i=t.data)||void 0===i?void 0:i.candidateId;if(s>0){var u;const f=this.gridApi.getDisplayedRowAtIndex(s-1);if((null==f||null===(u=f.data)||void 0===u?void 0:u.candidateId)===d)return 1}let g=1,m=s+1;for(;;){var l;const f=this.gridApi.getDisplayedRowAtIndex(m);if(!f||(null===(l=f.data)||void 0===l?void 0:l.candidateId)!==d)break;g++,m++}return g}isFirstInSpan(t){var n,o,i,s;const d=null!==(n=null===(o=t.node)||void 0===o?void 0:o.rowIndex)&&void 0!==n?n:-1;if(0===d||!this.gridApi)return!0;const u=this.gridApi.getDisplayedRowAtIndex(d-1);return(null==u||null===(i=u.data)||void 0===i?void 0:i.candidateId)!==(null===(s=t.data)||void 0===s?void 0:s.candidateId)}getPmsYearList(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.recruitmentYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.recruitmentYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-")),this.setDefaultMonth(),this.fetchInterviews()}onYearChange(t){this.selectedYearForRecruitment=t,this.setDefaultMonth(),this.fetchInterviews()}setDefaultMonth(){this.selectedMonthObjects=[...this.arrAllMonths]}formatInterviewTime(t,n){if(!t||!n)return"";const[o,i]=n.split(":").map(Number),s=new Date(t);return s.setHours(o,i),s.toLocaleTimeString("en-IN",{hour:"2-digit",minute:"2-digit",hour12:!0})}fetchInterviews(){const t=this.recruitmentService.appendChildId(`${this.config.getMasterReportForRecruitment}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonths.join(",")}`);this.httpService.callGetService(t).subscribe({next:n=>{if(console.log("Loaded interviews:",n.data),n.status&&Array.isArray(n.data)){const o=n.data.filter(s=>Array.isArray(s.employee)&&s.employee.length>0);this.groupedInterviewData=o.map(s=>{var d,u;let g=s.employee.filter(m=>!m.isDeleted);if(!["Super Admin","HR Admin"].includes(this.loggedInUserRole)&&!this.loggedInUserRoleIsMD)if("HOD"===this.loggedInUserRole){const m=(this.intHODempCode||"").trim().toUpperCase();g=g.filter(l=>{const f=String(l.positionCreatedById)===String(this.loggedInUserId),h="admin"===String(l.positionCreatedByUserRole).toLowerCase(),k=(l.hods?Object.keys(l.hods).map(B=>B.trim().toUpperCase()):[]).includes(m);return(f||k)&&!h})}else g="Admin"===this.loggedInUserRole?g.filter(m=>{const l=String(m.positionCreatedById)===String(this.loggedInUserId)&&"admin"===String(m.positionCreatedByUserRole).toLowerCase(),f=m.positionAssignedAdmins&&Object.keys(m.positionAssignedAdmins).some(h=>String(h)===String(this.loggedInUserId));return l||f}):[];return{candidateName:null!==(d=null===(u=g[0])||void 0===u?void 0:u.candidateName)&&void 0!==d?d:"N/A",employees:g}}).filter(s=>s.employees.length>0),this.filteredGroupedData=[...this.groupedInterviewData];const i=[];this.groupedInterviewData.forEach(s=>
1{s.employees.forEach(d=>{i.push({...d,candidateName:d.candidateName,email:d.email,phone:d.phone})})}),this.agRowData=i}else this.groupedInterviewData=[],this.filteredGroupedData=[],this.agRowData=[]},error:n=>console.error("Error loading interviews:",n)})}getFinalStatusLabel(t){return t?"hired"===t.toLowerCase()?"Selected":t:""}filterMasterReport(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}refreshGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.deselectAll(),this.gridApi.refreshCells()),this.fetchInterviews()}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}getObjectValues(t){return t?"object"==typeof t?Object.values(t).join(", "):t.toString():""}downloadMasterReport(){if(!this.gridApi||!this.agRowData.length)return void this.toastr.warning("No data available to download.");const t=[];if(this.gridApi.forEachNodeAfterFilterAndSort(Ne=>{t.push(Ne.data)}),0===t.length)return void this.toastr.warning("No records found for the current filters.");const o=[["Candidate Name","Email","Phone","Position","Department","Source","Band","Round","Interview Date & Time","Interview Mode","Location / URL","Panel Members","Lead Interviewer","Final Status"]],i=[];for(let Ne=0;Ne<t.length;Ne++){const We=o.length,ot=t[Ne].candidateId;let Xe=Ne;for(;Xe<t.length&&t[Xe].candidateId===ot;){var s,d,u,g,m,l,f,h,v,k,B;const Ce=t[Xe],Ze=Ce.interviewDate?new Date(Ce.interviewDate):null,Ct=Ze?Ze.toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"numeric"}):"",Dt=this.formatInterviewTime(Ce.interviewDate,Ce.interviewTime);o.push([null!==(s=Ce.candidateName)&&void 0!==s?s:"",null!==(d=Ce.email)&&void 0!==d?d:"",null!==(u=Ce.phone)&&void 0!==u?u:"",null!==(g=Ce.positionName)&&void 0!==g?g:"",null!==(m=Ce.department)&&void 0!==m?m:"",null!==(l=Ce.source)&&void 0!==l?l:"",null!==(f=Ce.band)&&void 0!==f?f:"",null!==(h=Ce.interviewRound)&&void 0!==h?h:"",Ct&&Dt?`${Ct} ${Dt}`:Ct||Dt,null!==(v=Ce.interviewMode)&&void 0!==v?v:"","ONLINE"===Ce.interviewMode?null!==(k=Ce.interviewUrl)&&void 0!==k?k:"":null!==(B=Ce.interviewLocation)&&void 0!==B?B:"",this.getObjectValues(Ce.panelMembers)||"",this.getObjectValues(Ce.leadInterviewer)||"",this.getFinalStatusLabel(Ce.finalStatus)]),Xe++}const it=o.length-1;if(it>We)for(let Ce=0;Ce<=6;Ce++)i.push({s:{r:We,c:Ce},e:{r:it,c:Ce}});Ne=Xe-1}const de=F.utils.aoa_to_sheet(o);de["!merges"]=i;const me=F.write({Sheets:{"Master Report":de},SheetNames:["Master Report"]},{bookType:"xlsx",type:"array"}),se=new Blob([me],{type:"application/octet-stream"}),Ve=this.allMonthsSelected?"AllMonths":this.selectedMonths.join("-");U.saveAs(se,`MasterReport_${Ve}_${this.selectedYearForRecruitment}.xlsx`)}downloadVisibleColumns(){if(!this.gridApi)return;const t=this.gridApi.getAllDisplayedColumns().map(l=>l.getColDef()).filter(l=>l.headerName&&l.field&&"Actions"!==l.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=[];this.gridApi.forEachNodeAfterFilterAndSort(l=>i.push(l.data));const s=i.slice(n*o,(n+1)*o);if(!s.length)return void this.toastr.info("No data to download for this page.","Info");const d=s.map(l=>{const f={};for(const h of t){let v;if("function"==typeof h.valueFormatter)v=h.valueFormatter({value:l[h.field],data:l});else if("function"==typeof h.valueGetter)try{v=h.valueGetter({data:l})}catch{v=l[h.field]}else v=l[h.field];null==v?v="":"object"==typeof v&&(v=Object.values(v).join(", ")),f[h.headerName]=String(v)}return f}),g={Sheets:{Data:F.utils.json_to_sheet(d)},SheetNames:["Data"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Export_Visible_Page_${n+1}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU(C.N),e.rXU(b.bZ),e.rXU($.d),e.rXU(q.tw),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-master-report"]],viewQuery:function(t,n){if(1&t&&e.GBs(ms,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},decls:24,vars:14,consts:[["columnChooserBtn",""],[1,"container","mb-20","mt-20"],[1,"cardBox","mb
1-20"],[1,"filter-bar","mb-10"],["size","auto",1,"ml-10","mt-20"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],[1,"d-flex","align-center","justify-content-flex-end","mt-20"],[1,"mat-height40","mat-input-style","small-field","mr-10"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"month-multiselect","mr-10"],[3,"ngModelChange","placeholder","settings","data","ngModel"],["title","Download",1,"icon-action-btn","material-icons","mr-10",3,"click"],["title","Refresh",1,"icon-action-btn","material-icons","ml-5","mr-10",3,"click","animationend"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5","mr-10",3,"click"],[1,"material-icons"],[1,"grid-wrapper","p-10"],[1,"ag-theme-quartz",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],[3,"value"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"ion-row",3)(3,"ion-col",4)(4,"mat-form-field",5)(5,"mat-icon",6),e.EFF(6,"search"),e.k0s(),e.j41(7,"input",7),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.filterMasterReport())}),e.k0s()()(),e.j41(8,"ion-col",8)(9,"mat-form-field",9)(10,"mat-select",10),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.selectedYearForRecruitment,s)||(n.selectedYearForRecruitment=s),e.Njj(s)}),e.bIt("selectionChange",function(s){return e.eBV(o),e.Njj(n.onYearChange(s.value))}),e.DNE(11,hs,2,2,"mat-option",11),e.k0s()(),e.j41(12,"div",12)(13,"ng-multiselect-dropdown",13),e.bIt("ngModelChange",function(s){return e.eBV(o),e.Njj(n.onMonthsChange(s))}),e.k0s()(),e.j41(14,"span",14),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(15,"download"),e.k0s(),e.j41(16,"span",15),e.bIt("click",function(){return e.eBV(o),n.refreshGrid(),e.Njj(n.isClicked=!0)})("animationend",function(){return e.eBV(o),e.Njj(n.isClicked=!1)}),e.EFF(17,"refresh"),e.k0s(),e.j41(18,"button",16,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(20,"span",17),e.EFF(21,"tune"),e.k0s()()()(),e.j41(22,"div",18)(23,"ag-grid-angular",19),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))}),e.k0s()()()()}2&t&&(e.R7$(7),e.R50("ngModel",n.searchTerm),e.R7$(3),e.R50("ngModel",n.selectedYearForRecruitment),e.R7$(),e.Y8G("ngForOf",n.recruitmentYears),e.R7$(2),e.Y8G("placeholder","Select Month")("settings",n.monthDropdownSettings)("data",n.arrAllMonths)("ngModel",n.selectedMonthObjects),e.R7$(3),e.AVh("clicked",n.isClicked),e.R7$(2),e.xc7("background-color",n.buttonColorName),e.R7$(5),e.Y8G("rowData",n.agRowData)("columnDefs",n.agColumnDefs)("gridOptions",n.gridOptions))},dependencies:[K.Sq,y.me,y.BC,y.vS,J.hU,J.ln,R.rl,R.JW,he.VO,pe.wT,Ke.b,M.fg,x.An,G.xs],styles:['.container[_ngcontent-%COMP%]{--background: #f6f5fb;padding:0 15px}.month-multiselect[_ngcontent-%COMP%]{display:inline-block;min-width:180px;vertical-align:middle}.cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.mat-height40[_ngcontent-%COMP%]{height:40px!important}.small-field[_ngcontent-%COMP%]{width:200px}[_nghost-%COMP%] .ag-theme-quartz{--ag-header-background-color: #dddddd;--ag-header-foreground-color: #000;--ag-row-hover-color: #f8fafc;--ag-selected-row-background-color: #f1f5f9;--ag-font-size: 13px;--ag-font-family: "OpenSans-Regular", sans-serif;--ag-border-color: #e2e8f0;--ag-row-border-style: solid;--ag-row-border-width: 1px;--ag-row-border-color: #e2e8f0;--ag-column-separator-display: block;--ag-column-separator-color: #d1d5db;--ag-column-separator-height: 50%;--ag-header-column-separator-display: block;--ag-header-column-separator-color: #d1d5db;--ag-header-column-separator-height: 50%;border:1px solid #e2e8f0;border-radius:8px}[_nghost-%COMP%] .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell{display:flex;align-items:center;justify-content:center;padding-left:12px!important;padding-right:12px!important;border-right:1px solid #e2e8f0!important;border-bottom:1px solid #e2e8f0!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell .ag-cell-value, [_nghost-%COMP%] .ag-theme-quartz .ag-cell .ag-cell-wrapper{display:flex;align-items:center;justify-content:center;height:100%;width:100%}[_nghost-%COMP%] .ag-theme-quartz .ag-cell.row-span-cell{overflow:visible!important;background-color:#fff;border-bottom:none!important;z-index:2;align-items:center!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell.row-span-cell .ag-cell-value, [_nghost-%COMP%] .ag-theme-quartz .ag-cell.row-span-cell .ag-cell-wrapper{align-items:center!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell.row-span-hidden{visibility:hidden}[_nghost-%COMP%] .ag-theme-quartz .ag-cell.ag-cell-focus, [_nghost-%COMP%] .ag-theme-quartz .ag-cell:focus, [_nghost-%COMP%] .ag-theme-quartz .ag-cell:focus-within{border-right:1px solid #e2e8f0!important;border-bottom:1px solid #e2e8f0!important}[_nghost-%COMP%] .ag-theme-quartz .ag-row.group-last-row .ag-cell{border-bottom:2px solid #94a3b8!important}
1[_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=candidateName], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=email], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=positionName], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=department], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=panelMembers]{justify-content:flex-start}[_nghost-%COMP%] .status-badge-report{display:inline-flex;align-items:center;padding:6px 14px;border-radius:8px;font-size:11px;font-weight:700;text-transform:capitalize;min-width:90px;justify-content:center;line-height:1;letter-spacing:.3px;box-shadow:0 2px 4px #0000000a;transition:all .2s cubic-bezier(.4,0,.2,1);border:1px solid transparent}[_nghost-%COMP%] .status-badge-report:hover{transform:translateY(-1.5px);box-shadow:0 4px 6px #00000014}[_nghost-%COMP%] .status-selected{background:color-mix(in srgb,#14b8a6,white 88%);color:#0f766e;border-color:color-mix(in srgb,#14b8a6,white 75%)}[_nghost-%COMP%] .status-offered{background:color-mix(in srgb,#22c55e,white 88%);color:#15803d;border-color:color-mix(in srgb,#22c55e,white 75%)}[_nghost-%COMP%] .status-rejected{background:color-mix(in srgb,#ef4444,white 88%);color:#b91c1c;border-color:color-mix(in srgb,#ef4444,white 75%)}[_nghost-%COMP%] .status-scheduled{background:color-mix(in srgb,#3b82f6,white 88%);color:#1d4ed8;border-color:color-mix(in srgb,#3b82f6,white 75%)}[_nghost-%COMP%] .status-evaluated{background:color-mix(in srgb,#a855f7,white 88%);color:#7e22ce;border-color:color-mix(in srgb,#a855f7,white 75%)}[_nghost-%COMP%] .status-process{background:color-mix(in srgb,#eab308,white 88%);color:#854d0e;border-color:color-mix(in srgb,#eab308,white 75%)}[_nghost-%COMP%] .status-pending{background:#f1f5f9;color:#475569;border-color:#e2e8f0}[_nghost-%COMP%] .mode-badge{padding:2px 8px;border-radius:4px;font-size:10px;font-weight:700;text-transform:uppercase}[_nghost-%COMP%] .mode-online{background:#e0f2fe;color:#0369a1}[_nghost-%COMP%] .mode-offline{background:#f3f4f6;color:#374151}[_nghost-%COMP%] .link-btn{color:#3b82f6;text-decoration:none;font-weight:600}[_nghost-%COMP%] .link-btn:hover{text-decoration:underline}.icon-action-btn[_ngcontent-%COMP%]{border:1px solid #f3820e;color:#f3820e;border-radius:6px;background-color:#fff;height:38px;width:38px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease-in-out}.icon-action-btn[_ngcontent-%COMP%]:hover{background:#fff8f1;transform:translateY(-1px);box-shadow:0 2px 4px #f3820e26}.text-muted[_ngcontent-%COMP%]{color:#94a3b8;font-size:12px}']}),p})();const vs=["columnChooserBtn"];function bs(a,p){if(1&a&&(e.j41(0,"mat-option",26),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG();e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}let _s=(()=>{var a;class p{get arrAllMonths(){return this._arrAllMonthsCacheKey!==this.loggedInCompanyFiscalyear&&(this._arrAllMonthsCacheKey=this.loggedInCompanyFiscalyear,this._arrAllMonthsCache="Apr_Mar"===this.loggedInCompanyFiscalyear?[...this.months.slice(3),...this.months.slice(0,3)]:this.months),this._arrAllMonthsCache}get selectedMonths(){return this.selectedMonthObjects.map(t=>t.key)}get allMonthsSelected(){return this.selectedMonthObjects.length===this.arrAllMonths.length}onMonthsChange(t){this.selectedMonthObjects=t,this.onReportTypeChange()}constructor(t,n,o,i,s,d,u){this.httpService=t,this.config=n,this.encryptionService=o,this.sharedService=i,this.dataRefreshService=s,this.toastr=d,this.recruitmentService=u,this.rowData=[],this.columnDefs=[],this.gridOptions={popupParent:document.querySelector("body"),pagination:!0,paginationPageSize:10,paginationPageSizeSelector:[5,10,25,50,75,100,200,500,1e3],suppressCellFocus:!0,defaultColDef:{sortable:!0,filter:!0,resizable:!0,flex:1,minWidth:120},localeText:{noRowsToShow:"No records found"},postProcessPopup:g=>{var m;if("columnChooser"!==g.type)return;const l=null===(m=this.columnChooserBtn)||void 0===m?void 0:m.nativeElement,f=g.ePopup;if(!l||!f)return;const h=l.getBoundingClientRect();f.style.top=`${h.bottom+window.scrollY+4}px`,f.style.left="auto",f.style.right=document.documentElement.clientWidth-h.right+"px"}},this.searchTerm="",this.isClicked=!1,this.selectedReportType="departmentBandGap",this.buttonColorName=null,this.ratingYears=[],this.selectedYearForRecruitment="",this.selectedMonthObjects=[],this.monthDropdownSettings={singleSelection:!1,enableCheckAll:!0,selectAllText:"Select All",unSelectAllText:"Unselect All",idField:"key",textField:"name",itemsShowLimit:1,closeDropDownOnSelection:!1},this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.months=[{key:"01",name:"January"},{key:"02",name:"February"},{key:"03",name:"March"},{key:"04",name:"April"},{key:"05",name:"May"},{key:"06",name:"June"},{key:"07",name:"July"},{key:"08",name:"August"},{key:"09",name:"September"},{key:"10",name:"October"},{key:"11",name:"November"},{key:"12",name:"December"}],this._arrAllMonthsCacheKey=Symbol(),this._arrAllMonthsCache=[]}ngOnInit(){this.initSessionData(),this.getPMSYearListAndInitialize(),this.dataRefreshService.refreshNeeded$.pipe((0,vt.i)(1)).subscribe(()=>{this.getPMSYearListAndInitialize()})}initSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null},n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.buttonColorName=sessionStorage.getItem("buttonColorName")}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}getPMSYearListAndInitialize(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.ratingYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.ratingYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,this.setDefaultMonth(),this.onReportTypeChange())}onYearChange(t){this.selectedYearForRecruitment=t,this.onReportTypeChange()}setDefaultMonth(){this.selectedMonthObjects=[...this.arrAllMonths]}onGridReady(t){this.gridApi=t.api}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}buildColumnDefs(t){const n=[{headerName:"Department",field:"department",minWidth:160},{headerName:"Band",field:"band",minWidth:120}];return"departmentBandGap"!==t&&n.push({headerName:"Designation",field:"designation",minWidth:160}),"departmentBandDesignationLocationGap"===t&&n.push({headerName:"Location",field:"location",minWidth:140}),n.push({headerName:"Plan",field:"plan",width:100},{headerName:"Actual",field:"actual",width:110},{headerName:"Gap",field:"gap",width:100,cellRenderer:o=>{const i=o.value;if(null==i||""===i)return'<span class="text-muted">\u2014</span>';const s=Number(i);return`<span class="gap-badge ${s>0?"gap-positive":s<0?"gap-negative":"gap-zero"}">${i}</span>`}}),n}onReportTypeChange(){if(!this.selectedReportType||!this.selectedYearForRecruitment)return;if(!this.selectedMonths.length)return this.rowData=[],void(this.gridApi&&this.gridApi.setGridOption("rowData",this.rowData));const n={departmentBandGap:this.config.getDepartmentBandGap,departmentBandDesignationGap:this.config.getDepartmentBandDesignationGap,departmentBandDesignationLocationGap:this.config.getDepartmentBandDesignationLocationGap}[this.selectedReportType];if(!n)return;const o=this.recruitmentService.appendChildId(`${n}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonths.map(i=>Number(i)).join(",")}`);this.httpService.callGetService(o).subscribe({next:i=>{i.status?(this.columnDefs=this.buildColumnDefs(this.selectedReportType),this.rowData=this.flattenData(i.data,this.selectedReportType),this.gridApi&&this.gridApi.setGridOption("c
1olumnDefs",this.columnDefs)):this.rowData=[]},error:i=>{console.error(i),this.rowData=[],this.gridApi&&this.gridApi.setGridOption("rowData",this.rowData),this.toastr.error("Failed to load manpower data.","Error")}})}flattenData(t,n){const o=[];return t.forEach(i=>{const s=i.department;i.bands.forEach(d=>{const u=d.band;"departmentBandGap"===n&&o.push({department:s,band:u,plan:d.plan,actual:d.actual,gap:d.gap}),"departmentBandDesignationGap"===n&&d.designations.forEach(g=>{o.push({department:s,band:u,designation:g.designation,plan:g.plan,actual:g.actual,gap:g.gap})}),"departmentBandDesignationLocationGap"===n&&d.designations.forEach(g=>{g.locations.forEach(m=>{o.push({department:s,band:u,designation:g.designation,location:m.location,plan:m.plan,actual:m.actual,gap:m.gap})})})})}),o}filterManpowerData(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}refreshGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.refreshCells()),this.onReportTypeChange()}downloadManpowerData(){if(!this.gridApi)return;const t=[];if(this.gridApi.forEachNodeAfterFilterAndSort(g=>t.push(g.data)),!t.length)return void this.toastr.warning("No data available to download.");const o={departmentBandGap:["department","band","plan","actual","gap"],departmentBandDesignationGap:["department","band","designation","plan","actual","gap"],departmentBandDesignationLocationGap:["department","band","designation","location","plan","actual","gap"]}[this.selectedReportType]||[],i=t.map(g=>{const m={};return o.forEach(l=>{var f;return m[this.capitalize(l)]=null!==(f=g[l])&&void 0!==f?f:""}),m}),d={Sheets:{"Manpower Data":F.utils.json_to_sheet(i)},SheetNames:["Manpower Data"]},u=F.write(d,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([u],{type:"application/octet-stream"}),`ManpowerVsActual_${this.selectedReportType}_${this.selectedYearForRecruitment}.xlsx`)}capitalize(t){return t.charAt(0).toUpperCase()+t.slice(1)}downloadVisibleColumns(){if(!this.gridApi)return;const t=this.gridApi.getAllDisplayedColumns().map(u=>u.getColDef()).filter(u=>u.headerName&&u.field&&"Actions"!==u.headerName),n=[];if(this.gridApi.forEachNodeAfterFilterAndSort(u=>n.push(u.data)),!n.length)return void this.toastr.info("No data to download.","Info");const o=n.map(u=>{const g={};for(const m of t){let l;if("function"==typeof m.valueGetter)try{l=m.valueGetter({data:u})}catch{l=u[m.field]}else l=u[m.field];null==l?l="":"object"==typeof l&&(l=Object.values(l).join(", ")),g[m.headerName]=String(l)}return g}),s={Sheets:{Data:F.utils.json_to_sheet(o)},SheetNames:["Data"]},d=F.write(s,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([d],{type:"application/octet-stream"}),"Export_Visible.xlsx")}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU($.d),e.rXU(C.N),e.rXU(q.tw),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-manpower-vs-actual"]],viewQuery:function(t,n){if(1&t&&e.GBs(vs,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},decls:33,vars:15,consts:[["columnChooserBtn",""],[1,"mt-20","mb-10"],[1,"container","mb-20"],[1,"cardBox","mb-20"],[1,"mt-10","mb-10",2,"display","flex","align-items","center","justify-content","space-between","width","100%"],[1,"ml-20",2,"display","flex","align-items","center"],[1,"mat-height40","mat-input-style","search-field","mt-20"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],[2,"display","flex","align-items","center","margin-right","10px"],[1,"mat-height40","mat-input-style","report-field","mr-10","mt-20"],["placeholder","Select Report Type",3,"valueChange","selectionChange","value"],["value","departmentBandGap"],["value","departmentBandDesignationGap"],["value","departmentBandDesignationLocationGap"],[1,"mat-height40","mat-input-style","small-field","mr-10","mt-20"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"month-multiselect","mr-10","mt-20"],[3,"ngModelChange","placeholder","settings","data","ngModel"],["title","Download",1,"icon-action-btn","material-icons","mr-10","mt-20",3,"click"],["title","Refresh",1,"icon-action-btn","material-icons","mt-20",3,"click","animationend"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5","mr-10","mt-20",3,"click"],[1,"material-icons"],[1,"m-20","manpower-gr
1id-wrapper"],[1,"ag-theme-quartz","manpower-grid-container",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],[3,"value"]],template:function(t,n){if(1&t){const o=e.RV6();e.nrm(0,"div",1),e.j41(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"mat-form-field",6)(6,"mat-icon",7),e.EFF(7,"search"),e.k0s(),e.j41(8,"input",8),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.filterManpowerData())}),e.k0s()()(),e.j41(9,"div",9)(10,"mat-form-field",10)(11,"mat-select",11),e.mxI("valueChange",function(s){return e.eBV(o),e.DH7(n.selectedReportType,s)||(n.selectedReportType=s),e.Njj(s)}),e.bIt("selectionChange",function(){return e.eBV(o),e.Njj(n.onReportTypeChange())}),e.j41(12,"mat-option",12),e.EFF(13,"Department & Band"),e.k0s(),e.j41(14,"mat-option",13),e.EFF(15,"Department & Band & Designation"),e.k0s(),e.j41(16,"mat-option",14),e.EFF(17,"Department & Band & Designation & Location"),e.k0s()()(),e.j41(18,"mat-form-field",15)(19,"mat-select",16),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.selectedYearForRecruitment,s)||(n.selectedYearForRecruitment=s),e.Njj(s)}),e.bIt("selectionChange",function(s){return e.eBV(o),e.Njj(n.onYearChange(s.value))}),e.DNE(20,bs,2,2,"mat-option",17),e.k0s()(),e.j41(21,"div",18)(22,"ng-multiselect-dropdown",19),e.bIt("ngModelChange",function(s){return e.eBV(o),e.Njj(n.onMonthsChange(s))}),e.k0s()(),e.j41(23,"span",20),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(24,"download"),e.k0s(),e.j41(25,"span",21),e.bIt("click",function(){return e.eBV(o),n.refreshGrid(),e.Njj(n.isClicked=!0)})("animationend",function(){return e.eBV(o),e.Njj(n.isClicked=!1)}),e.EFF(26,"refresh"),e.k0s(),e.j41(27,"button",22,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(29,"span",23),e.EFF(30,"tune"),e.k0s()()()(),e.j41(31,"div",24)(32,"ag-grid-angular",25),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))}),e.k0s()()()()}2&t&&(e.R7$(8),e.R50("ngModel",n.searchTerm),e.R7$(3),e.R50("value",n.selectedReportType),e.R7$(8),e.R50("ngModel",n.selectedYearForRecruitment),e.R7$(),e.Y8G("ngForOf",n.ratingYears),e.R7$(2),e.Y8G("placeholder","Select Month")("settings",n.monthDropdownSettings)("data",n.arrAllMonths)("ngModel",n.selectedMonthObjects),e.R7$(3),e.AVh("clicked",n.isClicked),e.R7$(2),e.xc7("background-color",n.buttonColorName),e.R7$(5),e.Y8G("rowData",n.rowData)("columnDefs",n.columnDefs)("gridOptions",n.gridOptions))},dependencies:[K.Sq,y.me,y.BC,y.vS,R.rl,R.JW,he.VO,pe.wT,Ke.b,M.fg,x.An,G.xs],styles:['.container[_ngcontent-%COMP%]{--background: #f6f5fb;padding:0 15px}.month-multiselect[_ngcontent-%COMP%]{display:inline-block;min-width:180px;vertical-align:middle}.cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.mat-height40[_ngcontent-%COMP%]{height:40px!important}.small-field[_ngcontent-%COMP%]{min-width:140px;width:140px}.search-field[_ngcontent-%COMP%]{width:180px}.report-field[_ngcontent-%COMP%]{width:250px}.manpower-grid-wrapper[_ngcontent-%COMP%]{margin:20px;height:auto;border:1px solid #e2e2e2;border-radius:8px;overflow:hidden}.manpower-grid-container[_ngcontent-%COMP%]{width:100%;font-family:OpenSans-Regular,sans-serif}[_nghost-%COMP%] .ag-theme-quartz{--ag-header-background-color: #dddddd;--ag-header-foreground-color: #000;--ag-row-hover-color: #f8fafc;--ag-selected-row-background-color: #f1f5f9;--ag-font-size: 13px;--ag-font-family: "OpenSans-Regular", sans-serif;--ag-border-color: #e2e8f0;--ag-row-border-style: solid;--ag-row-border-width: 1px;--ag-row-border-color: #e2e8f0;--ag-column-separator-display: block;--ag-column-separator-color: #d1d5db;--ag-column-separator-height: 50%;--ag-header-column-separator-display: block;--ag-header-column-separator-color: #d1d5db;--ag-header-column-separator-height: 50%;border:1px solid #e2e8f0;border-radius:8px}[_nghost-%COMP%] .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell{display:flex;align-items:center;justify-content:center;padding-left:12px!important;padding-right:12px!important;border-right:1px solid #e2e8f0!important;border-bottom:1px solid #e2e8f0!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell .ag-cell-value, [_nghost-%COMP%] .ag-theme-quartz .ag-cell .ag-cell-wrapper{display:flex;align-items:center;justify-content:center;height:100%;width:100%}
1[_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=department], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=designation]{justify-content:flex-start}.icon-action-btn[_ngcontent-%COMP%]{border:1px solid #f3820e;color:#f3820e;border-radius:6px;background-color:#fff;height:38px;width:38px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease-in-out}.icon-action-btn[_ngcontent-%COMP%]:hover{background:#fff8f1;transform:translateY(-1px);box-shadow:0 2px 4px #f3820e26}.text-muted[_ngcontent-%COMP%]{color:#94a3b8;font-size:12px}.clicked[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_rotate .5s ease-in-out}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}']}),p})();const Cs=["columnChooserBtn"];function ys(a,p){if(1&a&&(e.j41(0,"mat-option",21),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG();e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}let Is=(()=>{var a;class p{get arrAllMonths(){return this._arrAllMonthsCacheKey!==this.loggedInCompanyFiscalyear&&(this._arrAllMonthsCacheKey=this.loggedInCompanyFiscalyear,this._arrAllMonthsCache="Apr_Mar"===this.loggedInCompanyFiscalyear?[...this.months.slice(3),...this.months.slice(0,3)]:this.months),this._arrAllMonthsCache}get selectedMonths(){return this.selectedMonthObjects.map(t=>t.key)}get allMonthsSelected(){return this.selectedMonthObjects.length===this.arrAllMonths.length}onMonthsChange(t){this.selectedMonthObjects=t,this.loadInterviewData()}constructor(t,n,o,i,s,d,u,g,m){this.httpService=t,this.config=n,this.encryptionService=o,this.dataRefreshService=i,this.dialog=s,this.sharedService=d,this.toastr=u,this.httpClient=g,this.recruitmentService=m,this.destroy$=new Z.B,this.dataSource=new St.I6([]),this.candidatesIntrview=[],this.searchTerm="",this.pageSize=10,this.pageSizeOptions=[5,10,25,50,75,100,200,500,1e3],this.rowData=[],this.columnDefs=[{field:"candidateName",headerName:"Name",pinned:"left",minWidth:180},{field:"email",headerName:"Email ID",tooltipField:"email",minWidth:200},{field:"phone",headerName:"Phone",minWidth:130},{field:"department",headerName:"Dept",minWidth:140},{field:"band",headerName:"Band",minWidth:100},{field:"positionName",headerName:"Position",tooltipField:"positionName",minWidth:160},{field:"yearOfExperience",headerName:"Exp(yrs)",minWidth:110},{headerName:"Interview At",field:"interviewAt",minWidth:180,valueGetter:l=>l.data.interviewDate?`${new Date(l.data.interviewDate).toLocaleDateString("en-GB")} ${this.formatInterviewTime(l.data.interviewDate,l.data.interviewTime)}`:""},{field:"interviewMode",headerName:"Mode",minWidth:110},{headerName:"Location/URL",field:"locationOrUrl",minWidth:150,valueGetter:l=>"ONLINE"===l.data.interviewMode&&l.data.interviewUrl?l.data.interviewUrl:l.data.interviewLocation||"",cellRenderer:l=>"ONLINE"===l.data.interviewMode&&l.data.interviewUrl?'<span class="link-btn cp">Join</span>':l.data.interviewLocation||"",onCellClicked:l=>{"ONLINE"===l.data.interviewMode&&l.data.interviewUrl&&this.openInterviewLink(l.data.interviewUrl)}},{field:"panelMembers",headerName:"Panel Member",valueFormatter:l=>this.mapToCSV(l.value),minWidth:180},{field:"leadInterviewer",headerName:"Lead Interviewer",valueFormatter:l=>this.mapToCSV(l.value),minWidth:180},{field:"source",headerName:"Source",minWidth:130},{headerName:"Resume",minWidth:100,cellRenderer:l=>l.data.resume?'<span class="link-btn cp">View</span>':"",onCellClicked:l=>{l.data.resume&&this.viewResume(l.data.resume)}},{field:"interviewRound",headerName:"Round",minWidth:100},{field:"finalStatus",headerName:"Result",minWidth:140,cellRenderer:l=>{const f=l.value?String(l.value).toLowerCase():"";let v="status-pending";return"hired"===f||"selected"===f?v="status-selected":"rejected"===f?v="status-rejected":"offered"===f?v="status-offered":"scheduled"===f?v="status-scheduled":"evaluated"===f?v="status-evaluated":"process"===f&&(v="status-process"),`<span class="status-badge-report ${v}">${this.getFinalStatusLabel(l.value)}</span>`}}],this.gridOptions={popupParent:document.querySelector("body"),pagination:!0,paginationPageSize:10,suppressCellFocus:!0,paginationPageSizeSelector:[5,10,25,50,75,100,200,500,1e3],defaultColDef:{sortable:!0,filter:!0,resizable:!0,floatingFilter:!1,flex:1,headerClass:"centered-header"},postProcessPopup:l=>{var f;if("columnChooser"!==l.type)return;const h=null===(f=this.columnChooserBtn)||void 0===f?void 0:f.nativeElement,v=l.ePopup;
1if(!h||!v)return;const k=h.getBoundingClientRect();v.style.top=`${k.bottom+window.scrollY+4}px`,v.style.left="auto",v.style.right=document.documentElement.clientWidth-k.right+"px"}},this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.loggedInUserRoleIsMD=!1,this.recruitmentYears=[],this.selectedYearForRecruitment="",this.fromYear="",this.toYear="",this.taskFromDate=null,this.taskToDate=null,this.selectedMonthObjects=[],this.monthDropdownSettings={singleSelection:!1,enableCheckAll:!0,selectAllText:"Select All",unSelectAllText:"Unselect All",idField:"key",textField:"name",itemsShowLimit:1,closeDropDownOnSelection:!1},this.months=[{key:"01",name:"January"},{key:"02",name:"February"},{key:"03",name:"March"},{key:"04",name:"April"},{key:"05",name:"May"},{key:"06",name:"June"},{key:"07",name:"July"},{key:"08",name:"August"},{key:"09",name:"September"},{key:"10",name:"October"},{key:"11",name:"November"},{key:"12",name:"December"}],this._arrAllMonthsCacheKey=Symbol(),this._arrAllMonthsCache=[],this.displayedColumns=["name","email","phone","department","band","position","experience","interviewDateTime","interviewType","location","pannel","lead","source","resume","roundStatus","finalStatus"],this.filters={name:{selected:[]},email:{selected:[]},phone:{selected:[]},department:{selected:[]},band:{selected:[]},position:{selected:[]},experience:{selected:[]},interviewDateTime:{selected:[]},interviewType:{selected:[]},location:{selected:[]},lead:{selected:[]},pannel:{selected:[]},source:{selected:[]},roundStatus:{selected:[]},finalStatus:{selected:[]}},this.originalData=[],this.filterableColumns=[...this.displayedColumns],this.columnToDataKey={name:l=>l.candidateName,email:l=>l.email,phone:l=>l.phone,department:l=>l.department,band:l=>l.band,position:l=>l.positionName,experience:l=>String(l.yearOfExperience),interviewDateTime:l=>`${l.interviewDate} ${l.interviewTime}`,interviewType:l=>l.interviewMode,location:l=>"ONLINE"===l.interviewMode?l.interviewUrl:l.interviewLocation,lead:l=>this.getLeadInterviewerName(l.leadInterviewer),pannel:l=>this.getPannelName(l.panelMembers),source:l=>l.source,roundStatus:l=>l.interviewRound,finalStatus:l=>l.finalStatus}}ngOnInit(){this.initializeSessionData(),this.getPmsYearList(),this.dataRefreshService.refreshNeeded$.pipe((0,Q.B)(300),(0,L.Q)(this.destroy$)).subscribe(()=>{this.initializeSessionData(),this.getPmsYearList()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}openInterviewLink(t){window.open(t,"_blank")}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName,this.loggedInUserRoleIsMD=this.loggedInUserRoles.some(o=>"MD"===o.displayName)}getPmsYearList(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.recruitmentYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.recruitmentYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-")),this.setDefaultMonth(),this.loadInterviewData()}onYearChange(t){this.selectedYearForRecruitment=t,this.setDefaultMonth(),this.loadInterviewData()}setDefaultMonth(){this.selectedMonthObjects=[...this.arrAllMonths]}getLeadInterviewerName(t){return"string"==typeof t?t:t&&"object"==typeof t?Object.values(t).join(", "):""}getPannelName(t){return"string"==typeof t?t:t&&"object"==typeof t?Object.values(t).join(", "):""}filterInterviews(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}onFileSelected(t){var n;const i=null===(n=t.target.files)||void 0===n?void 0:n[0];i&&(i.name.endsWith(".xlsx")||i.name.endsWith(".xls"))?console.log("Selected Excel file:",i):console.error("Invalid file type. Please select an Excel file.")}toggleAllRows(t){var n;const o=null!==(n=t.checked)&&void 0!==n&&n;this.dataSource.data.forEach(i=>
1i.selected=o),this.dataSource._updateChangeSubscription()}isAllSelected(){return this.dataSource.data.every(t=>t.selected)}isIndeterminate(){const t=this.dataSource.data.filter(n=>n.selected).length;return t>0&&t<this.dataSource.data.length}bulkDelete(){const t=this.dataSource.data.filter(n=>n.selected);t.length&&(this.dataSource.data=this.dataSource.data.filter(n=>!n.selected),console.log("Deleted interviews:",t))}getFinalStatusLabel(t){return t?"hired"===t.toLowerCase()?"Selected":t:""}hasSelectedRows(){var t;return null===(t=this.dataSource)||void 0===t?void 0:t.data.some(n=>n.selected)}downloadInterviews(){if(!this.gridApi)return;const t=[],n=this.gridApi.paginationGetPageSize(),o=this.gridApi.paginationGetCurrentPage(),i=o*n,s=i+n;if(this.gridApi.forEachNodeAfterFilterAndSort((l,f)=>{f>=i&&f<s&&t.push(l.data)}),!t.length)return void this.toastr.info("No data available to download for the current page.","Info");const d=t.map(l=>{var f,h,v,k,B,de,ae,me,se,Ve,Ne,We;const ot=l.interviewDate?new Date(l.interviewDate):null,Xe=ot?ot.toLocaleDateString("en-GB"):"",it=this.formatInterviewTime(l.interviewDate,l.interviewTime);return{Name:null!==(f=l.candidateName)&&void 0!==f?f:"",Email:null!==(h=l.email)&&void 0!==h?h:"",Phone:null!==(v=l.phone)&&void 0!==v?v:"",Department:null!==(k=l.department)&&void 0!==k?k:"",Band:null!==(B=l.band)&&void 0!==B?B:"",Position:null!==(de=l.positionName)&&void 0!==de?de:"","Year of Experience":null!==(ae=l.yearOfExperience)&&void 0!==ae?ae:"","Interview Date & Time":Xe&&it?`${Xe} ${it}`:Xe||it,"Interview Mode":null!==(me=l.interviewMode)&&void 0!==me?me:"","Location / URL":"OFFLINE"===l.interviewMode?null!==(se=l.interviewLocation)&&void 0!==se?se:"":null!==(Ve=l.interviewUrl)&&void 0!==Ve?Ve:"","Panel Members":this.mapToCSV(l.panelMembers),"Lead Interviewer":this.mapToCSV(l.leadInterviewer),Source:null!==(Ne=l.source)&&void 0!==Ne?Ne:"",Round:null!==(We=l.interviewRound)&&void 0!==We?We:"","Final Status":this.getFinalStatusLabel(l.finalStatus)}}),g={Sheets:{Interviews:F.utils.json_to_sheet(d)},SheetNames:["Interviews"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Interview_Schedule_Page_${o+1}.xlsx`)}mapToCSV(t){return Array.isArray(t)?t.join(", "):t&&"object"==typeof t?Object.values(t).join(", "):null!=t?t:""}formatInterviewTime(t,n){if(!t||!n)return"";const[o,i]=n.split(":").map(Number),s=new Date(t);return s.setHours(o,i),s.toLocaleTimeString("en-IN",{hour:"2-digit",minute:"2-digit",hour12:!0})}viewResume(t){const n=t.split("/").pop()||"",o=encodeURIComponent(n),s=this.recruitmentService.appendChildId(`${this.config.getRecruitmentFiles}?fileName=${o}`);this.httpClient.get(s,{responseType:"blob",headers:{Authorization:`Bearer ${sessionStorage.getItem("currentToken")||""}`}}).subscribe({next:d=>{const u=window.URL.createObjectURL(d);window.open(u,"_blank"),setTimeout(()=>window.URL.revokeObjectURL(u),5e3)},error:d=>{this.toastr.error("Failed to open file"),console.error("\u274c File open error:",d)}})}loadInterviewData(){const t=`${this.config.getLatestInterviewCandidate}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonths.join(",")}`,n=this.recruitmentService.appendChildId(t);this.httpService.callGetService(n).subscribe({next:o=>{let i=o.data.filter(s=>!s.isDeleted);if(["Super Admin","HR Admin"].includes(this.loggedInUserRole)||this.loggedInUserRoleIsMD);else if("HOD"===this.loggedInUserRole){const s=(this.intHODempCode||"").trim().toUpperCase();i=i.filter(d=>{const u=String(d.positionCreatedById)===String(this.loggedInUserId),g="admin"===String(d.positionCreatedByUserRole).toLowerCase(),l=(d.hods?Object.keys(d.hods).map(f=>f.trim().toUpperCase()):[]).includes(s);return(u||l)&&!g})}else i="Admin"===this.loggedInUserRole?i.filter(s=>{const d=String(s.positionCreatedById)===String(this.loggedInUserId)&&"admin"===String(s.positionCreatedByUserRole).toLowerCase(),u=s.assignedAdmins&&Object.keys(s.assignedAdmins).some(g=>String(g)===String(this.loggedInUserId));return d||u}):[];
1this.candidatesIntrview=i,this.originalData=i,this.dataSource.data=[...this.originalData],this.rowData=[...this.originalData],this.filterableColumns.forEach(s=>{const d=this.columnToDataKey[s];d&&(this.filters[s]={unique:[...new Set(this.originalData.map(u=>{var g;return String(null!==(g=d(u))&&void 0!==g?g:"")}).filter(u=>""!==u.trim()))],selected:[]})})},error:o=>console.error("Error loading interviews:",o)})}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}onGridReady(t){this.gridApi=t.api,this.gridApi.sizeColumnsToFit()}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}toggleSelection(t,n,o){const i=this.filters[t];i&&(o?i.selected.includes(n)||i.selected.push(n):i.selected=i.selected.filter(s=>s!==n),this.applyFilters())}applyFilters(){const t=this.originalData.filter(n=>Object.keys(this.filters).every(o=>{var i;const{selected:s}=this.filters[o],d=this.columnToDataKey[o],u=d?String(null!==(i=d(n))&&void 0!==i?i:""):"";return 0===s.length||s.includes(u)}));this.dataSource.data=t,this.rowData=[...t]}resetGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.deselectAll(),this.gridApi.refreshCells()),this.clearAllFilters(),this.loadInterviewData()}clearAllFilters(){Object.keys(this.filters).forEach(t=>{this.filters[t]&&(this.filters[t].selected=[])}),this.applyFilters()}get isAnyFilterApplied(){return Object.values(this.filters).some(t=>t.selected.length>0)}getFinalStatusClass(t){switch((null==t?void 0:t.toLowerCase())||""){case"rejected":return"chip-rejected";case"scheduled":return"chip-scheduled";case"hired":return"chip-hired";case"evaluated":return"chip-evaluated";default:return"chip-default"}}downloadVisibleColumns(){if(!this.gridApi)return;const t=this.gridApi.getAllDisplayedColumns().map(l=>l.getColDef()).filter(l=>l.headerName&&l.field&&"Actions"!==l.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=[];this.gridApi.forEachNodeAfterFilterAndSort(l=>i.push(l.data));const s=i.slice(n*o,(n+1)*o);if(!s.length)return void this.toastr.info("No data to download for this page.","Info");const d=s.map(l=>{const f={};for(const h of t){let v;if("function"==typeof h.valueGetter)try{v=h.valueGetter({data:l})}catch{v=l[h.field]}else v=l[h.field];null==v?v="":"object"==typeof v&&(v=Object.values(v).join(", ")),f[h.headerName]=String(v)}return f}),g={Sheets:{Data:F.utils.json_to_sheet(d)},SheetNames:["Data"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Export_Visible_Page_${n+1}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU(C.N),e.rXU(b.bZ),e.rXU($.d),e.rXU(q.tw),e.rXU(we.Qq),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-interview-status"]],viewQuery:function(t,n){if(1&t&&e.GBs(Cs,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},decls:25,vars:12,consts:[["columnChooserBtn",""],[1,"mt-20","mb-10"],[1,"container","mb-20"],[1,"cardBox","mb-20"],[1,"filter-bar","mb-10"],["size","auto",1,"ml-10","mt-20"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],[1,"d-flex","align-center","justify-content-flex-end","mt-20"],[1,"mat-height40","mat-input-style","small-field","mr-10"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"month-multiselect","mr-10"],[3,"ngModelChange","placeholder","settings","data","ngModel"],[1,"icon-download","material-icons","mr-10",3,"click"],[1,"icon-refresh","material-icons","mr-10",3,"click"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5","mr-10",3,"click"],[1,"material-icons"],[1,"m-20","interview-grid-wrapper"],[1,"ag-theme-quartz","interview-grid-container",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],[3,"value"]],template:function(t,n){if(1&t){const o=e.RV6();e.nrm(0,"div",1),e.j41(1,"div",2)(2,"div",3)(3,"ion-row",4)(4,"ion-col",5)(5,"mat-form-field",6)(6,"mat-icon",7),e.EFF(7,"search"),e.k0s(),e.j41(8,"input",8),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.filterInterviews())}),e.k0s()()(),e.j41(9,"ion-col",9)(10,"mat-form-field",10)(11,"mat-select",11),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.selectedYearForRecruitment,s)||(n.selectedYearForRecruitment=s),e.Njj(s)}),e.bIt("selectionChange",function(s){return e.eBV(o),e.Njj(n.onYearChange(s.value))}),e.DNE(12,ys,2,2,"mat-option",12),e.k0s()(),e.j41(13,"div",13)(14,"ng-multiselect-dropdown",14),e.bIt("ngModelChange",function(s){return e.eBV(o),e.Njj(n.onMonthsChange(s))}),e.k0s()(),e.j41(15,"span",15),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(16,"download"),e.k0s(),e.j41(17,"span",16),e.bIt("click",function(){return e.eBV(o),e.Njj(n.resetGrid())}),e.EFF(18,"refresh"),e.k0s(),e.j41(19,"button",17,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(21,"span",18),e.EFF(22,"tune"),e.k0s()()()(),e.j41(23,"div",19)(24,"ag-grid-angular",20),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))}),e.k0s()()()()}2&t&&(e.R7$(8),e.R50("ngModel",n.searchTerm),e.R7$(3),e.R50("ngModel",n.selectedYearForRecruitment),e.R7$(),e.Y8G("ngForOf",n.recruitmentYears),e.R7$(2),e.Y8G("placeholder","Select Month")("settings",n.monthDropdownSettings)("data",n.arrAllMonths)("ngModel",n.selectedMonthObjects),e.R7$(5),e.xc7("background-color",n.buttonColorName),e.R7$(5),e.Y8G("rowData",n.rowData)("columnDefs",n.columnDefs)("gridOptions",n.gridOptions))},dependencies:[K.Sq,y.me,y.BC,y.vS,J.hU,J.ln,R.rl,R.JW,he.VO,pe.wT,Ke.b,M.fg,x.An,G.xs],styles:['.container[_ngcontent-%COMP%]{--background: #f6f5fb;padding:0 15px}.month-multiselect[_ngcontent-%COMP%]{display:inline-block;min-width:180px;vertical-align:middle}.cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.cardBoxHeading[_ngcontent-%COMP%]{background-color:#ddd;padding:5px;color:#000;border-radius:10px 10px 0 0}.mat-height40[_ngcontent-%COMP%]{height:40px!important}.icon-download[_ngcontent-%COMP%], .icon-refresh[_ngcontent-%COMP%]{border:1px solid #f3820e;color:#f3820e;padding:9px;border-radius:6px;background-color:#fff;height:40px;width:40px;font-size:22px;
1cursor:pointer;display:flex;align-items:center;justify-content:center}.mr-10[_ngcontent-%COMP%]{margin-right:10px}.ml-10[_ngcontent-%COMP%]{margin-left:10px}.mt-20[_ngcontent-%COMP%]{margin-top:20px}.mb-10[_ngcontent-%COMP%]{margin-bottom:10px}.mb-20[_ngcontent-%COMP%]{margin-bottom:20px}.d-flex[_ngcontent-%COMP%]{display:flex}.align-center[_ngcontent-%COMP%]{align-items:center}.justify-content-flex-end[_ngcontent-%COMP%]{justify-content:flex-end}.small-field[_ngcontent-%COMP%]{min-width:180px}.interview-grid-wrapper[_ngcontent-%COMP%]{margin:20px;height:auto;border:1px solid #e2e2e2;border-radius:8px;overflow:hidden}.interview-grid-container[_ngcontent-%COMP%]{width:100%;font-family:OpenSans-Regular,sans-serif}[_nghost-%COMP%] .ag-theme-quartz{--ag-header-background-color: #dddddd;--ag-header-foreground-color: #000;--ag-row-hover-color: #f8fafc;--ag-selected-row-background-color: #f1f5f9;--ag-font-size: 13px;--ag-font-family: "OpenSans-Regular", sans-serif;--ag-border-color: #e2e8f0;--ag-row-border-style: solid;--ag-row-border-width: 1px;--ag-row-border-color: #e2e8f0;--ag-column-separator-display: block;--ag-column-separator-color: #d1d5db;--ag-column-separator-height: 50%;--ag-header-column-separator-display: block;--ag-header-column-separator-color: #d1d5db;--ag-header-column-separator-height: 50%;border:1px solid #e2e8f0;border-radius:8px}[_nghost-%COMP%] .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell{display:flex;align-items:center;justify-content:center;padding-left:12px!important;padding-right:12px!important;border-right:1px solid #e2e8f0!important;border-bottom:1px solid #e2e8f0!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell .ag-cell-value, [_nghost-%COMP%] .ag-theme-quartz .ag-cell .ag-cell-wrapper{display:flex;align-items:center;justify-content:center;height:100%;width:100%}[_nghost-%COMP%] .ag-theme-quartz .ag-cell.row-span-cell{overflow:visible!important;background-color:#fff;border-bottom:none!important;z-index:2;align-items:center!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell.row-span-cell .ag-cell-value, [_nghost-%COMP%] .ag-theme-quartz .ag-cell.row-span-cell .ag-cell-wrapper{align-items:center!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell.row-span-hidden{visibility:hidden}[_nghost-%COMP%] .ag-theme-quartz .ag-row.group-last-row .ag-cell{border-bottom:2px solid #94a3b8!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=candidateName], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=email], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=positionName], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=department], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=panelMembers]{justify-content:flex-start}[_nghost-%COMP%] .status-badge-report{display:inline-flex;align-items:center;padding:6px 14px;border-radius:8px;font-size:11px;font-weight:700;text-transform:capitalize;min-width:90px;justify-content:center;line-height:1;letter-spacing:.3px;box-shadow:0 2px 4px #0000000a;transition:all .2s cubic-bezier(.4,0,.2,1);border:1px solid transparent}[_nghost-%COMP%] .status-badge-report:hover{transform:translateY(-1.5px);box-shadow:0 4px 6px #00000014}[_nghost-%COMP%] .status-selected{background:color-mix(in srgb,#14b8a6,white 88%);color:#0f766e;border-color:color-mix(in srgb,#14b8a6,white 75%)}[_nghost-%COMP%] .status-offered{background:color-mix(in srgb,#22c55e,white 88%);color:#15803d;border-color:color-mix(in srgb,#22c55e,white 75%)}[_nghost-%COMP%] .status-rejected{background:color-mix(in srgb,#ef4444,white 88%);color:#b91c1c;border-color:color-mix(in srgb,#ef4444,white 75%)}[_nghost-%COMP%] .status-scheduled{background:color-mix(in srgb,#3b82f6,white 88%);color:#1d4ed8;border-color:color-mix(in srgb,#3b82f6,white 75%)}[_nghost-%COMP%] .status-evaluated{background:color-mix(in srgb,#a855f7,white 88%);color:#7e22ce;border-color:color-mix(in srgb,#a855f7,white 75%)}[_nghost-%COMP%] .status-process{background:color-mix(in srgb,#eab308,white 88%);color:#854d0e;border-color:color-mix(in srgb,#eab308,white 75%)}[_nghost-%COMP%] .status-pending{background:#f1f5f9;color:#475569;border-color:#e2e8f0}[_nghost-%COMP%] .mode-badge{padding:2px 8px;border-radius:4px;font-size:10px;font-weight:700;text-transform:uppercase}[_nghost-%COMP%] .mode-online{background:#e0f2fe;color:#0369a1}[_nghost-%COMP%] .mode-offline{background:#f3f4f6;color:#374151}[_nghost-%COMP%] .link-btn{color:#3b82f6;text-decoration:none;font-weight:600}[_nghost-%COMP%] .link-btn:hover{text-decoration:underline}.icon-action-btn[_ngcontent-%COMP%]{border:1px solid #f3820e;color:#f3820e;border-radius:6px;background-color:#fff;height:38px;width:38px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease-in-out}.icon-action-btn[_ngcontent-%COMP%]:hover{background:#fff8f1;transform:translateY(-1px);box-shadow:0 2px 4px #f3820e26}.text-muted[_ngcontent-%COMP%]{color:#94a3b8;font-size:12px}.ag-grid-link-btn[_ngcontent-%COMP%]{background-color:#3b82f6;color:#fff;border:none;padding:4px 12px;border-radius:4px;cursor:pointer;font-size:12px}.ag-grid-link-btn[_ngcontent-%COMP%]:hover{background-color:#2563eb}.ag-grid-view-btn[_ngcontent-%COMP%]{background-color:#031263;
1color:#fff;border:none;padding:4px 12px;border-radius:4px;cursor:pointer;font-size:12px}.ag-grid-view-btn[_ngcontent-%COMP%]:hover{opacity:.9}']}),p})();var Ss=Y(53870),ws=Y(99172);function xs(a,p){if(1&a&&(e.j41(0,"mat-option",22),e.EFF(1),e.k0s()),2&a){const r=p.$implicit;e.Y8G("value",r.name),e.R7$(),e.SpI(" ",r.name," ")}}function Rs(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Tech Position is required "),e.k0s())}function js(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Maximum 100 characters allowed "),e.k0s())}function Ds(a,p){1&a&&(e.j41(0,"th",23),e.EFF(1,"Actions"),e.k0s())}function ks(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Question is required "),e.k0s())}function Ps(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Maximum 255 characters allowed "),e.k0s())}function Fs(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Type is required "),e.k0s())}function Ms(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",36),e.bIt("click",function(){e.eBV(r);const n=e.XpG(3);return e.Njj(n.addQuestion())}),e.nrm(1,"ion-icon",37),e.k0s()}}function Es(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",38),e.bIt("click",function(){e.eBV(r);const n=e.XpG(2).index,o=e.XpG();return e.Njj(o.removeQuestion(n))}),e.nrm(1,"ion-icon",39),e.k0s()}}function Os(a,p){if(1&a&&(e.j41(0,"td",32)(1,"div",33),e.DNE(2,Ms,2,0,"button",34)(3,Es,2,0,"button",35),e.k0s()()),2&a){const r=e.XpG().index,t=e.XpG();e.R7$(2),e.Y8G("ngIf",t.isLastRow(r)),e.R7$(),e.Y8G("ngIf",t.questionArray.length>1)}}function Ts(a,p){if(1&a&&(e.j41(0,"tr",24)(1,"td",25)(2,"mat-form-field",26),e.nrm(3,"textarea",27),e.DNE(4,ks,2,0,"mat-error",14)(5,Ps,2,0,"mat-error",14),e.k0s()(),e.j41(6,"td",25)(7,"mat-form-field",26)(8,"mat-select",28)(9,"mat-option",29),e.EFF(10,"Open Ended"),e.k0s(),e.j41(11,"mat-option",30),e.EFF(12,"Rating based"),e.k0s()(),e.DNE(13,Fs,2,0,"mat-error",14),e.k0s()(),e.DNE(14,Os,4,2,"td",31),e.k0s()),2&a){let r,t,n;const o=p.$implicit,i=p.index,s=e.XpG();e.Y8G("formGroupName",i),e.R7$(4),e.Y8G("ngIf",null==(r=o.get("questionText"))?null:r.hasError("required")),e.R7$(),e.Y8G("ngIf",null==(t=o.get("questionText"))?null:t.hasError("maxlength")),e.R7$(8),e.Y8G("ngIf",null==(n=o.get("questionType"))?null:n.hasError("required")),e.R7$(),e.Y8G("ngIf",!s.isEditMode)}}let Gt=(()=>{var a;class p{constructor(t,n,o,i,s,d,u,g){this.fb=t,this.httpService=n,this.encryptionService=o,this.config=i,this.dialogRef=s,this.data=d,this.toastr=u,this.recruitmentService=g,this.isEditMode=!1,this.isSubmitting=!1,this.positionRequisitionYears=[],this.selectedYearForRecruitment="",this.fromYear="",this.toYear="",this.buttonColorName=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.techPositions=[],this.questionColumns=["questionText","questionType","actions"],this.questionData=null==d?void 0:d.question}ngOnInit(){var t;const n=(null===(t=this.data)||void 0===t?void 0:t.question)||{};this.isEditMode=!(null==n||!n.questions),this.techQuestionForm=this.fb.group({techPosition:[n.techPosition||"",[y.k0.required,y.k0.maxLength(100)]],questions:this.fb.array([])}),this.initializeSessionData(),this.getPmsYearList(),this.isEditMode?(this.selectedYearForRecruitment=n.fiscalYear||"",this.addQuestionGroup(n.questions,n.questionType)):this.addQuestion(),this.filteredTechPositions=this.techPositionControl.valueChanges.pipe((0,ws.Z)(""),(0,Q.B)(300),(0,Et.F)(),(0,It.T)(o=>this._filterTechPositions(o||"")))}get techPositionControl(){return this.techQuestionForm.get("techPosition")}loadTechPositions(){const n=this.recruitmentService.appendChildId(`${this.config.getAllTechPositions}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}`);this.httpService.callGetService(n).subscribe({next:o=>{this.techPositions=(o||[]).map(i=>({name:i})).sort((i,s)=>i.name.localeCompare(s.name)),console.log("techPositions",this.techPositions)},error:o=>console.error("\u274c Error loading tech positions:",o)})}_filterTechPositions(t){const n=t.toLowerCase();return this.techPositions.filter(o=>o.name.toLowerCase().includes(n))}onTechPositionBlur(){var t;const n=null===(t=this.techPositionControl.value)||void 0===t?void 0:t.trim();n&&!this.techPositions.some(o=>o.name.toLowerCase()===n.toLowerCase())&&(this.techPositions.push({name:n}),this.techPositions.sort((o,i)=>o.name.localeCompare(i.name)))}get questionArray(){return this.techQuestionForm.get("questions")}addQuestionGroup(t="",n=""){this.questionArray.push(this.fb.group({questionText:[t,[y.k0.required,y.k0.maxLength(255)]],questionType:[n,y.k0.required]}))}addQuestion(){this.questionArray.push(this.fb.group({questionText:["",[y.k0.required,y.k0.maxLength(255)]],questionType:["",y.k0.required]}))}removeQuestion(t){this.questionArray.removeAt(t)}isLastRow(t){return t===this.questionArray.length-1}
1onSubmit(){if(this.techQuestionForm.invalid)return this.techQuestionForm.markAllAsTouched(),void this.toastr.error("Please fix the errors in the form.","Validation Error");this.isSubmitting=!0;const t=this.techQuestionForm.getRawValue(),n={companyId:this.loggedInUserCompanyID,fiscalYear:this.selectedYearForRecruitment,techPosition:t.techPosition.replace(/\t/g," ").trim(),isDeleted:!1};let o;if(this.isEditMode){var i;const s={...n,id:null===(i=this.data)||void 0===i||null===(i=i.question)||void 0===i?void 0:i.id,questions:t.questions[0].questionText,questionType:t.questions[0].questionType,childId:this.recruitmentService.getChildId()};o=this.httpService.callPutService(`${this.config.updateQuestionCompetency}/${s.id}`,s)}else{const s=t.questions.map(u=>({...n,questions:u.questionText,questionType:u.questionType,childId:this.recruitmentService.getChildId()}));o=this.httpService.callPostService(this.config.addQuestionCompetency,s)}o.subscribe({next:()=>{this.toastr.success(this.isEditMode?"Question updated":"Questions added","Success"),this.dialogRef.close(!0),this.isSubmitting=!1},error:s=>{var d;this.toastr.error((null==s||null===(d=s.error)||void 0===d?void 0:d.message)||"Operation failed","Error"),this.isSubmitting=!1}})}onCancel(){this.dialogRef.close()}initializeSessionData(){this.buttonColorName=sessionStorage.getItem("buttonColorName");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInCompanyFiscalyear=(o=>{const i=sessionStorage.getItem("loggedInCompanyFiscalyear");return i?this.encryptionService.decryptData(i):null})()}getPmsYearList(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.positionRequisitionYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.positionRequisitionYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-")),this.loadTechPositions()}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(y.ok),e.rXU(c.k),e.rXU(S.L),e.rXU(_.T),e.rXU(b.CP),e.rXU(b.Vh),e.rXU(q.tw),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-add-edit-tech-question"]],decls:46,vars:14,consts:[["autoTech","matAutocomplete"],[1,"form-container","form-scroll-container"],[1,"cardLayout"],["size","6"],[1,"formLabelSemiBoldfs16","mb-5",2,"margin","10px"],["size","6",1,"text-right"],["src","./assets/icon/close_icon.png","alt","Close","role","button","tabindex","0",1,"cp",3,"mat-dialog-close"],[3,"ngSubmit","formGroup"],["size","12"],[1,"formLabelRegularfs16","mb-5",2,"padding-left","10px"],[1,"red-cl"],["appearance","fill",1,"w-100","mat-height40","mat-input-style",2,"padding-left","10px","padding-right","10px"],["type","text","matInput","","placeholder","Enter or select tech position",3,"blur","formControl","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["formArrayName","questions",1,"custom-table","w-100"],[2,"width","60%"],["style","text-align: center;",4,"ngIf"],[3,"formGroupName",4,"ngFor","ngForOf"],["size","12",1,"text-right","mt-10"],["type","button",1,"back_btn","fs-14",3,"click"],["type","submit",1,"add_btn","fs-14","ml-10"],[3,"value"],[2,"text-align","center"],[3,"formGroupName"],[1,"align-top"],["appearance","fill",1,"w-100","mat-height40","mat-input-style"],["matInput","","rows","3","formControlName","questionText","placeholder","Type text here"],["placeholder","Select","formControlName","questionType"],["value","Open Ended"],["value","Rating based"],["class","text-center align-middle",4,"ngIf"],[1,"text-center","align-middle"],[1,"question-actions"],["mat-icon-button","","color","primary",3,"click",4,"ngIf"],["mat-icon-button","","color","warn",3,"click",4,"ngIf"],["mat-icon-button","","color","primary",3,"click"],["name","add-circle-outline",1,"green-cl"],["mat-icon-button","","color","warn",3,"click"],["name","remove-circle-outline",1,"red-cl"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"ion-row")(3,"ion-col",3)(4,"div",4),e.EFF(5),e.k0s()(),e.j41(6,"ion-col",5),e.nrm(7,"img",6),e.k0s()(),e.j41(8,"form",7),e.bIt("ngSubmit",function(){return e.eBV(o),e.Njj(n.onSubmit())}),e.j41(9,"ion-grid")(10,"ion-row")(11,"ion-col",8)(12,"label",9),e.EFF(13,"Tech Position"),e.j41(14,"span",10),e.EFF(15," *"),e.k0s()(),e.j41(16,"mat-form-field",11)(17,"input",12),e.bIt("blur",function(){return e.eBV(o),e.Njj(n.onTechPositionBlur())}),e.k0s(),e.j41(18,"mat-autocomplete",null,0),e.DNE(20,xs,2,2,"mat-option",13),e.nI1(21,"async"),e.k0s(),e.DNE(22,Rs,2,0,"mat-error",14)(23,js,2,0,"mat-error",14),e.k0s()()(),e.j41(24,"ion-row")(25,"ion-col",8)(26,"table",15)(27,"thead")(28,"tr")(29,"th",16),e.EFF(30,"Questions"),e.j41(31,"span",10),e.EFF(32," *"),e.k0s()(),e.j41(33,"th"),e.EFF(34,"Type (open/ rating)"),e.j41(35,"span",10),e.EFF(36," *"),e.k0s()(),e.DNE(37,Ds,2,0,"th",17),e.k0s()(),e.j41(38,"tbody"),e.DNE(39,Ts,15,5,"tr",18),e.k0s()()()(),e.j41(40,"ion-row")(41,"ion-col",19)(42,"button",20),e.bIt("click",function(){return e.eBV(o),e.Njj(n.onCancel())}),e.EFF(43,"Cancel"),e.k0s(),e.j41(44,"button",21),e.EFF(45),e.k0s()()()()()()()}if(2&t){const o=e.sdS(19);e.R7$(5),e.SpI(" ",n.isEditMode?"Edit Technical Questions":"Add New Technical Questions"," "),e.R7$(3),e.Y8G("formGroup",n.techQuestionForm),e.R7$(9),e.Y8G("formControl",n.techPositionControl)("matAutocomplete",o),e.R7$(3),e.Y8G("ngForOf",e.bMT(21,12,n.filteredTechPositions)),e.R7$(2),e.Y8G("ngIf",n.techPositionControl.hasError("required")),e.R7$(),e.Y8G("ngIf",n.techPositionControl.hasError("maxlength")),e.R7$(14),e.Y8G("ngIf",!n.isEditMode),e.R7$(2),e.Y8G("ngForOf",n.questionArray.controls),e.R7$(5),e.xc7("background-color",n.buttonColorName),e.R7$(),e.SpI(" ",n.isEditMode?"Update Questions":"Add Questions"," ")}},dependencies:[K.Sq,K.bT,y.qT,y.me,y.BC,y.cb,J.hU,J.lO,J.iq,J.ln,R.rl,R.TL,he.VO,pe.wT,y.l_,y.j4,y.JD,y.$R,y.v8,M.fg,b.tx,Ae.iY,_t.$3,_t.pN,K.Jj],styles:[".cardLayout[_ngcontent-%COMP%]{padding:20px}.removeIcon[_ngcontent-%COMP%]{height:25px} .mat-mdc-dialog-container .mdc-dialog__surface{border-radius:18px!important}.add_btn.disabled[_ngcontent-%COMP%]{color:#302b2b;cursor:not-allowed;opacity:.6}.form-scroll-container[_ngcontent-%COMP%]{max-height:80vh;overflow-y:auto;padding:1rem}[_nghost-%COMP%] .mat-dialog-container{max-height:90vh;overflow-y:auto}.mb-5[_ngcontent-%COMP%]{margin-bottom:5px}.custom-table[_ngcontent-%COMP%]{width:100%}.custom-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px;font-weight:600;text-align:left}.custom-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:8px 10px;vertical-align:top}.mat-input-style[_ngcontent-%COMP%]{margin-bottom:0}.mat-input-style[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0!important}.input-spacing[_ngcontent-%COMP%]{min-height:84px}.question-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;gap:2px}.green-cl[_ngcontent-%COMP%]{color:#4caf50}.red-cl[_ngcontent-%COMP%]{color:#f44336}"]}),p})();const As=["columnChooserBtn"];function Ns(a,p){if(1&a&&(e.j41(0,"mat-option",21),e.EFF(1),e.k0s()),2&a){const r=p.$implicit;e.Y8G("value",r),e.R7$(),e.JRh(r)}}function $s(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",22),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.bulkDeleteQuestions())}),e.j41(1,"span",23),e.EFF(2,"delete"),e.k0s(),e.EFF(3,"Bulk Delete "),e.k0s()}if(2&a){const r=e.XpG();e.Y8G("disabled",r.isAllCompanySelected||r.selectedYearForQuestions!==r.currentFiscalYear)}}function Us(a,p){if(1&a&&(e.j41(0,"mat-option",21),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG();e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}
1function Bs(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",24),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.openAddQuestionModal())}),e.j41(1,"span",23),e.EFF(2,"add"),e.k0s(),e.EFF(3,"Add Question "),e.k0s()}if(2&a){const r=e.XpG();e.xc7("background-color",r.selectedYearForQuestions===r.currentFiscalYear?r.buttonColorName:null),e.Y8G("disabled",r.isAllCompanySelected||r.selectedYearForQuestions!==r.currentFiscalYear)}}let Gs=(()=>{var a;class p{constructor(t,n,o,i,s,d,u){this.httpService=t,this.config=n,this.sharedService=o,this.dialog=i,this.toastr=s,this.encryptionService=d,this.recruitmentService=u,this.rowData=[],this.columnDefs=[],this.selectedRowCount=0,this.gridOptions={context:{componentParent:this},popupParent:document.querySelector("body"),pagination:!0,paginationPageSize:10,suppressCellFocus:!0,paginationPageSizeSelector:[5,10,25,50,75,100,200,500,1e3],rowSelection:"multiple",suppressRowClickSelection:!0,defaultColDef:{sortable:!0,filter:!0,resizable:!0,floatingFilter:!1,flex:1,headerClass:"centered-header"},onSelectionChanged:()=>{this.selectedRowCount=this.gridApi?this.gridApi.getSelectedRows().length:0},postProcessPopup:g=>{var m;if("columnChooser"!==g.type)return;const l=null===(m=this.columnChooserBtn)||void 0===m?void 0:m.nativeElement,f=g.ePopup;if(!l||!f)return;const h=l.getBoundingClientRect();f.style.top=`${h.bottom+window.scrollY+4}px`,f.style.left="auto",f.style.right=document.documentElement.clientWidth-h.right+"px"}},this.searchTerm="",this.selectedYearForQuestions="",this.pageSize=10,this.pageSizeOptions=[5,10,25,50,75,100,200,500,1e3],this.currentFiscalYear="",this.positions=[],this.positionYears=[],this.selectedPositions=[],this.buttonColorName=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.loggedInUserRoleIsMD=!1,this.isAllCompanySelected=!1}ngOnInit(){this.initSessionData(),this.initColumnDefs(),this.fetchPositionYears(),this.isAllCompanySelected=null===this.recruitmentService.getChildId(),this.recruitmentService.selectedChildId$.subscribe(t=>{this.isAllCompanySelected=null===t})}initColumnDefs(){const t=this.loggedInUserRoleIsMD;this.columnDefs=[{headerName:"select",checkboxSelection:!0,headerCheckboxSelection:!t,width:50,minWidth:50,maxWidth:50,hide:t,pinned:"left",sortable:!1,filter:!1},{field:"techPosition",headerName:"Technical Position",minWidth:160,tooltipField:"techPosition"},{field:"questions",headerName:"Question Name",minWidth:280,tooltipField:"questions",flex:2},{field:"questionType",headerName:"Question Type",minWidth:150,tooltipField:"questionType"},{headerName:"Actions",minWidth:120,maxWidth:130,hide:t,sortable:!1,filter:!1,cellRenderer:n=>{var o;const i=null===(o=n.context)||void 0===o?void 0:o.componentParent,d=(null==i?void 0:i.isAllCompanySelected)||(null==i?void 0:i.selectedYearForQuestions)!==(null==i?void 0:i.currentFiscalYear)?"opacity:0.4;pointer-events:none;":"";return`\n <span class="material-icons" data-action="edit" style="color:#3f51b5;cursor:pointer;margin-right:10px;font-size:20px;vertical-align:middle;${d}" title="Edit">edit</span>\n <span class="material-icons" data-action="delete" style="color:#f44336;cursor:pointer;font-size:20px;vertical-align:middle;${d}" title="Delete">delete</span>\n `},onCellClicked:n=>{var o;const i=n.event.target,s=i.getAttribute("data-action")||(null===(o=i.closest("[data-action]"))||void 0===o?void 0:o.getAttribute("data-action"));"edit"===s&&this.editQuestion(n.data),"delete"===s&&this.deleteQuestion(n.data)}}]}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}onGridReady(t){this.gridApi=t.api}resetGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.deselectAll(),this.gridApi.refreshCells()),this.selectedRowCount=0,this.fetchPositions()}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}initSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName,this.loggedInUserRoleIsM
1D=this.loggedInUserRoles.some(o=>"MD"===o.displayName)}fetchPositionYears(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.positionYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear),d=`${i}-${s}`;this.currentFiscalYear=d,this.setSelectedYear(d)})}setSelectedYear(t){const n=this.positionYears.find(o=>o.year===t);n&&(this.selectedYearForQuestions=n.year,this.selectedPositions=[],this.rowData=[],this.fetchPositions())}onYearChange(t){this.setSelectedYear(t)}fetchPositions(){if(!this.loggedInUserCompanyID||!this.selectedYearForQuestions)return;const n=this.recruitmentService.appendChildId(`${this.config.getAllTechPositions}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForQuestions}`);this.httpService.callGetService(n).subscribe({next:o=>{this.positions=o||[],this.selectedPositions=[...this.positions],setTimeout(()=>this.onPositionChange())},error:o=>{console.error("Error fetching positions:",o)}})}onPositionChange(t){var n;t&&(this.selectedPositions=t.value),null!==(n=this.selectedPositions)&&void 0!==n&&n.length?this.fetchQuestions():this.rowData=[]}fetchQuestions(){if(!this.selectedYearForQuestions)return;const t=`${this.config.getTechQuestions}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForQuestions}`,n=this.selectedPositions.length?`&techPosition=${encodeURIComponent(this.selectedPositions.join(","))}`:"",i=this.recruitmentService.appendChildId(t+n);this.httpService.callGetService(i).subscribe(s=>{var d;this.rowData=(null==s||null===(d=s.data)||void 0===d?void 0:d.filter(u=>!u.isDeleted))||[]})}filterQuestions(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}hasSelectedRows(){return this.selectedRowCount>0}bulkDeleteQuestions(){const n=(this.gridApi?this.gridApi.getSelectedRows():[]).map(i=>i.id);n&&0!==n.length&&this.dialog.open(le.$,{disableClose:!0,height:"25%",width:"30%",data:{msg:`Are you sure you want to delete ${n.length} selected question(s)?`,btn1:"Cancel",btn2:"Yes",btn2BgColor:this.buttonColorName}}).afterClosed().subscribe(i=>{if(!i)return;const s=n.join(","),u=this.recruitmentService.appendChildId(`${this.config.bulkSoftDeleteTechQuestionsUrl}?id=${s}&deletedBy=${this.loggedInUserId}`),g={deletedBy:this.loggedInUserId,updatedAt:(new Date).toISOString()};this.httpService.callPutService(u,g).subscribe({next:()=>{this.toastr.success("Selected questions deleted successfully.","Success"),this.selectedRowCount=0,this.fetchPositions()},error:m=>{var l;this.toastr.error((null==m||null===(l=m.error)||void 0===l?void 0:l.message)||"Failed to delete selected questions.","Error")}})})}openAddQuestionModal(){const t=new b.ru;t.disableClose=!0,t.height="70%",t.width="70%",t.panelClass="custom-dialog-container",t.data={},this.dialog.open(Gt,t).afterClosed().subscribe(o=>{o&&this.fetchPositions()})}editQuestion(t){const n=new b.ru;n.disableClose=!0,n.height="70%",n.width="70%",n.panelClass="custom-dialog-container",n.data={question:t},this.dialog.open(Gt,n).afterClosed().subscribe(i=>{i&&this.fetchPositions()})}deleteQuestion(t){this.dialog.open(le.$,{disableClose:!0,height:"25%",width:"30%",data:{msg:"Are you sure you want to delete this question?",btn1:"Cancel",btn2:"Yes",btn2BgColor:this.buttonColorName}}).afterClosed().subscribe(o=>{if(!o)return;const s=this.recruitmentService.appendChildId(`${this.config.softDeleteTechQuestionUrl}?id=${t.id}&deletedBy=${this.loggedInUserId}`),d={deletedBy:this.loggedInUserId,updatedAt:(new Date).toISOString()};this.httpService.callPutService(s,d).subscribe({next:()=>{this.toastr.success("Question deleted successfully.","Success"),this.fetchPositions()},error:u=>{var g;this.toastr.error((null==u||null===(g=u.error)||void 0===g?void 0:g.message)||"Failed to delete the question.","Error")}})})}downloadQuestions(){if(!this.gridApi)return;const t=[],n=this.gridApi.paginationGetPageSize(),i=this.gridApi.paginationGetCurrentPage()*n,s=i+n;if(this.gridApi.forEachNodeAfterFilterAndSort((l,f)=>{f>=i&&f<s&&t.push(l.data)}),!t.length)return void this.toastr.info("No data to download.","Info");const d=t.map(l=>({"Technical Position":l.techPosition,"Question Name":l.questions,"Question Type":l.questionType})),g={Sheets:{Questions:F.utils.json_to_sheet(d)},SheetNames:["Questions"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Questions_Page_${this.gridApi.paginationGetCurrentPage()+1}.xlsx`)}downloadVisibleColumns(){if(!this.gridApi)return;
1const t=this.gridApi.getAllDisplayedColumns().map(l=>l.getColDef()).filter(l=>l.headerName&&l.field&&"Actions"!==l.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=[];this.gridApi.forEachNodeAfterFilterAndSort(l=>i.push(l.data));const s=i.slice(n*o,(n+1)*o);if(!s.length)return void this.toastr.info("No data to download for this page.","Info");const d=s.map(l=>{const f={};for(const h of t){let v;if("function"==typeof h.valueGetter)try{v=h.valueGetter({data:l})}catch{v=l[h.field]}else v=l[h.field];null==v?v="":"object"==typeof v&&(v=Object.values(v).join(", ")),f[h.headerName]=String(v)}return f}),g={Sheets:{Data:F.utils.json_to_sheet(d)},SheetNames:["Data"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Export_Visible_Page_${n+1}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(c.k),e.rXU(_.T),e.rXU($.d),e.rXU(b.bZ),e.rXU(q.tw),e.rXU(S.L),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-technical-interview"]],viewQuery:function(t,n){if(1&t&&e.GBs(As,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},decls:27,vars:12,consts:[["columnChooserBtn",""],[1,"container","mb-20","mt-20"],[1,"cardBox","mb-20"],[1,"filter-bar","mb-10"],["size","auto",1,"ml-10","mt-20","d-flex","align-center"],[1,"mat-height40","mat-input-style","small-field","mr-10",2,"width","200px"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],[1,"mat-height40","mat-input-style","small-field","mr-10"],["placeholder","Position","multiple","",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","color","warn",3,"disabled","click",4,"ngIf"],[1,"d-flex","align-center","justify-content-flex-end","mt-20"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],["type","button","class","add_btn fs-14 float-right center-content mr-10",3,"background-color","disabled","click",4,"ngIf"],[1,"icon-download","material-icons","mr-10",3,"click"],[1,"icon-refresh","material-icons","mr-10",3,"click"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5","mr-10",3,"click"],[1,"material-icons"],[1,"m-20","setup-grid-wrapper"],[1,"ag-theme-quartz","setup-grid-container",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],[3,"value"],["mat-raised-button","","color","warn",3,"click","disabled"],[1,"material-icons","fs-20","mr-5"],["type","button",1,"add_btn","fs-14","float-right","center-content","mr-10",3,"click","disabled"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"ion-row",3)(3,"ion-col",4)(4,"mat-form-field",5)(5,"mat-icon",6),e.EFF(6,"search"),e.k0s(),e.j41(7,"input",7),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.filterQuestions())}),e.k0s()(),e.j41(8,"mat-form-field",8)(9,"mat-select",9),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.selectedPositions,s)||(n.selectedPositions=s),e.Njj(s)}),e.bIt("selectionChange",function(s){return e.eBV(o),e.Njj(n.onPositionChange(s))}),e.DNE(10,Ns,2,2,"mat-option",10),e.k0s()(),e.DNE(11,$s,4,1,"button",11),e.k0s(),e.j41(12,"ion-col",12)(13,"mat-form-field",8)(14,"mat-select",13),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.selectedYearForQuestions,s)||(n.selectedYearForQuestions=s),e.Njj(s)}),e.bIt("selectionChange",function(s){return e.eBV(o),e.Njj(n.onYearChange(s.value))}),e.DNE(15,Us,2,2,"mat-option",10),e.k0s()(),e.DNE(16,Bs,4,3,"button",14),e.j41(17,"span",15),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(18,"download"),e.k0s(),e.j41(19,"span",16),e.bIt("click",function(){return e.eBV(o),e.Njj(n.resetGrid())}),e.EFF(20,"refresh"),e.k0s(),e.j41(21,"button",17,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(23,"span",18),e.EFF(24,"tune"),e.k0s()()()(),e.j41(25,"div",19)(26,"ag-grid-angular",20),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))}),e.k0s()()()()}2&t&&(e.R7$(7),e.R50("ngModel",n.searchTerm),e.R7$(2),e.R50("ngModel",n.selectedPositions),e.R7$(),e.Y8G("ngForOf",n.positions),e.R7$(),e.Y8G("ngIf",n.hasSelectedRows()&&!n.loggedInUserRoleIsM
1D),e.R7$(3),e.R50("ngModel",n.selectedYearForQuestions),e.R7$(),e.Y8G("ngForOf",n.positionYears),e.R7$(),e.Y8G("ngIf",!n.loggedInUserRoleIsMD),e.R7$(5),e.xc7("background-color",n.buttonColorName),e.R7$(5),e.Y8G("rowData",n.rowData)("columnDefs",n.columnDefs)("gridOptions",n.gridOptions))},dependencies:[K.Sq,K.bT,y.me,y.BC,y.vS,J.hU,J.ln,R.rl,R.JW,he.VO,pe.wT,M.fg,x.An,Ae.$z,G.xs],styles:['.container[_ngcontent-%COMP%]{--background: #f6f5fb;padding:0 15px}.cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.cardBoxHeading[_ngcontent-%COMP%]{background-color:#ddd;padding:5px;color:#000;border-radius:10px 10px 0 0}.table-container[_ngcontent-%COMP%]{width:100%;overflow-y:auto;overflow-x:auto;max-height:500px}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid #ddd;padding:4px;text-align:left;font-size:14px}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f2f2f2;font-family:OpenSans-SemiBold}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background-color:#fff;font-family:OpenSans-Regular}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .link-primary[_ngcontent-%COMP%]{color:#007bff;text-decoration:underline;cursor:pointer}.mat-height40[_ngcontent-%COMP%]{height:40px!important}.w70px[_ngcontent-%COMP%]{width:70px}.icon-download[_ngcontent-%COMP%], .icon-refresh[_ngcontent-%COMP%]{border:1px solid #f3820e;color:#f3820e;padding:9px;border-radius:6px;background-color:#fff;height:40px;width:40px;font-size:22px;cursor:pointer;display:flex;align-items:center;justify-content:center}.setup-grid-wrapper[_ngcontent-%COMP%]{height:auto;border:1px solid #e2e2e2;border-radius:8px;overflow:hidden}.setup-grid-container[_ngcontent-%COMP%]{width:100%;font-family:OpenSans-Regular,sans-serif}[_nghost-%COMP%] .ag-theme-quartz{--ag-header-background-color: #dddddd;--ag-header-foreground-color: #000;--ag-row-hover-color: #f8fafc;--ag-selected-row-background-color: #f1f5f9;--ag-font-size: 13px;--ag-font-family: "OpenSans-Regular", sans-serif;--ag-border-color: #e2e8f0;--ag-row-border-style: solid;--ag-row-border-width: 1px;--ag-row-border-color: #e2e8f0;border:1px solid #e2e8f0;border-radius:8px}[_nghost-%COMP%] .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell{display:flex;align-items:center;justify-content:center;padding-left:12px!important;padding-right:12px!important;border-right:1px solid #e2e8f0!important;border-bottom:1px solid #e2e8f0!important}.cp[_ngcontent-%COMP%]{cursor:pointer;margin-right:8px;color:#333}.header-cell[_ngcontent-%COMP%]{background-color:#ddd!important;font-weight:700!important}']}),p})(),Ys=(()=>{var a;class p{constructor(t,n,o,i,s,d,u,g,m,l,f,h,v){this.elementRef=t,this.httpService=n,this.config=o,this.httpClient=i,this.sharedService=s,this.dialog=d,this.encryptionService=u,this.dataRefreshService=g,this.toastr=m,this.dialogRef=l,this.data=f,this.accessControlService=h,this.recruitmentService=v,this.candidates=[],this.searchTerm="",this.isSubmitting=!1,this.loading=!1,this.loggedInUserCompanyID=null,this.loggedInUserId=null,this.isAllCompanySelected=!1,this.showAiRecruitmentFeatures=!1,this.subscriptions=new Oe.yU,this.agColumnDefs=[],this.agRowData=[],this.gridFilterActive=!1,this.isClicked=!1,this.gridOptions={getRowId:k=>String(k.data.id),suppressCellFocus:!0,stopEditingWhenCellsLoseFocus:!0,rowHeight:48,columnMenu:"legacy",singleClickEdit:!0,enableBrowserTooltips:!0,defaultColDef:{flex:1,minWidth:120,resizable:!0,sortable:!0,filter:!0},localeText:{noRowsToShow:"No records found"},onCellClicked:k=>this.handleCellClick(k),onCellEditingStarted:k=>{"comment"===k.colDef.field&&(k.data._originalComment=k.data.comment)},onCellEditingStopped:k=>{"comment"===k.colDef.field&&this.saveComment(k.data)},onFilterChanged:()=>{var k;const B=null===(k=this.gridApi)||void 0===k?void 0:k.getFilterModel();this.gridFilterActive=!!B&&Object.keys(B).length>0}}}ngOnInit(){const t=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=t?Number(this.encryptionService.decryptData(t)):null,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.isAllCompanySelected=null===this.recruitmentService.getChildId(),this.subscriptions.add(this.recruitmentService.selectedChildId$.subscribe(n=>{this.isAllCompanySelected=null===n})),this.setAgColumnDefs(),this.loadCandidates(),this.checkAiRecruitmentPermission()}ngOnDestroy(){this.subscriptions.unsubscribe()}onGridReady(t){this.gridApi=t.api}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}resetGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.refreshCells()),this.gridFilterActive=!1,this.loadCandidates()}get isAnyFilterApplied(){return this.gridFilterActive}setAgColumnDefs(){const t="screened"===this.data.type,n="selected"===this.data.type||"rejected"===this.data.type,o=[{headerName:"Candidate Name",field:"name",minWidth:200},{headerName:"Resume",field:"resumeFile",minWidth:120,sortable:!1,filter:!1,cellRenderer:i=>i.value?'<button data-action="view-resume" class="ag-icon-btn" style="color:#1976d2;font-size:13px;">View</button>
1':"",cellClass:"center-content-cell"}];this.showAiRecruitmentFeatures&&o.push({headerName:"Resume Score",field:"resumeScore",minWidth:140,cellRenderer:i=>this.renderResumeScoreCell(i),cellClass:"center-content-cell"}),(t||n)&&(o.push({headerName:"Status",field:"status",minWidth:170,sortable:!1,filter:!1,cellRenderer:i=>this.renderStatusCell(i),cellClass:"center-content-cell"}),o.push({headerName:"Comment",field:"comment",minWidth:260,editable:i=>t&&!i.data.hasInterviewScheduled&&!this.isAllCompanySelected,cellRenderer:i=>n?`<span style="color:#555;">${i.value||"-"}</span>`:`<span style="color:${i.value?"#333":"#aaa"};">${i.value||"Click to edit..."}</span>`})),this.agColumnDefs=o}renderResumeScoreCell(t){const n=t.data;return n.resumeScore?`<div class="action-row">\n <span>${n.resumeScore}</span>\n <button data-action="view-score" class="ag-icon-btn" title="View Detailed Analysis">\n <span class="material-icons" style="font-size:18px;color:#1976d2;">visibility</span>\n </button>\n </div>`:'<span style="color:#9e9e9e;">-</span>'}renderStatusCell(t){const n=t.data;if("screened"===this.data.type){const s="Offer"===n.status,g=n.hasInterviewScheduled||this.isAllCompanySelected||s?"disabled":"";return`\n <div class="switch-wrapper" title="${n.hasInterviewScheduled?"Interview already scheduled":this.isAllCompanySelected?"All Company selected":s?"Candidate moved to Offer stage":""}">\n <label class="custom-switch ${g}">\n <input\n type="checkbox"\n data-action="toggle-status"\n ${"Selected"===n.status?"checked":""}\n ${g}\n >\n <span class="slider round">\n <span class="status-label rejected">REJ</span>\n <span class="status-label selected">SEL</span>\n </span>\n </label>\n </div>\n `}return`<span class="custom-chip ${"Selected"===n.status?"chip-selected":"chip-rejected"}">${n.status||""}</span>`}handleCellClick(t){var n;const o=null===(n=t.event)||void 0===n?void 0:n.target,i=null==o?void 0:o.closest("[data-action]");if(!i)return;const s=i.getAttribute("data-action"),d=t.data;switch(s){case"view-resume":this.viewResume(d.resumeFile);break;case"view-score":this.viewScoringResult(d.id);break;case"toggle-status":this.updateCandidate(d,"status",!("Selected"===d.status)),setTimeout(()=>{var g;return null===(g=this.gridApi)||void 0===g?void 0:g.refreshCells({force:!0})},200)}}getMonthName(t){var n;return(null===(n=[{key:"01",name:"January"},{key:"02",name:"February"},{key:"03",name:"March"},{key:"04",name:"April"},{key:"05",name:"May"},{key:"06",name:"June"},{key:"07",name:"July"},{key:"08",name:"August"},{key:"09",name:"September"},{key:"10",name:"October"},{key:"11",name:"November"},{key:"12",name:"December"}].find(i=>i.key===t))||void 0===n?void 0:n.name)||""}loadCandidates(){const t=this.recruitmentService.appendChildId(`${this.config.getCandidateList}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.data.year}&month=${this.data.month}&positionId=${this.data.rowData.positionId}`),n=this.recruitmentService.appendChildId(`${this.config.getLatestInterviewCandidate}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.data.year}&month=${this.data.month}`);this.loading=!0,(0,ze.p)({candidatesRes:this.httpService.callGetService(t),interviewsRes:this.httpService.callGetService(n)}).subscribe({next:({candidatesRes:o,interviewsRes:i})=>{let s=(null==o?void 0:o.data)||[];const u=new Set(((null==i?void 0:i.data)||[]).map(g=>g.candidateId));s=s.filter(g=>g.positionAppliedFor===this.data.rowData.positionName),"selected"===this.data.type?s=s.filter(g=>"Selected"===g.status):"rejected"===this.data.type&&(s=s.filter(g=>"Rejected"===g.status)),s=s.map(g=>({...g,hasInterviewScheduled:u.has(g.id)})),this.candidates=s,this.agRowData=[...this.candidates],this.loading=!1,this.showAiRecruitmentFeatures&&this.fetchResumeScores(this.candidates)},error:o=>{console.error("Error loading candidates:",o),this.toastr.error("Failed to load candidates.","Error"),this.loading=!1}})}filterCandidates(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}updateCandidate(t,n,o){if(t.hasInterviewScheduled)return void this.toastr.info("Interview already scheduled. Cannot modify candidate.","Info");if(null==t||!t.id)return;this.isSubmitting=!0,this.loading=!0,"status"===n&&void 0!==o&&(t.status=o?"Selected":"Rejected");const i={id:t.id,[n]:t[n]};"status"===n&&(i.statusDate=(new Date).toISOString(),i.statusAddedById=this.loggedInUserId);const s=new FormData;s.append("dto",JSON.stringify(i));const d=this.recruitmentService.appendChildId(`${this.config.updateCandidateData}/${t.id}`);this.httpService.submitFileService(d,s,"PUT").subscribe({next:()=>{this.dataRefreshService.triggerRefresh(),this.toastr.success(`Candidate ${n} updated successfully.`,"Success"),this.loading=!1,this.isSubmitting=!1},error:u=>{console.error(`Error updating candidate ${n}:`,u),this.toastr.error(`Failed to update candidate ${n}.`,"Error"),this.loading=!1,this.isSubmitting=!1}})}saveComment(t){if(null!=t&&t.id&&t._originalComment!==t.comment){if(t.comment&&t.comment.length>255)return void this.toastr.warning("Comment cannot exceed 255 characters.");this.updateCandidate(t,"comment")}}viewResume(t){const n=t.split("/").pop()||"",o=encodeURIComponent(n),i=this.recruitmentService.appendChildId(`${this.config.getRecruitmentFiles}?fileName=${o}`);this.httpClient.get(i,{responseType:"blob",headers:{Authorization:`Bearer ${sessionStorage.getItem("currentToken")||""}`}}).subscribe({next:s=>{const d=window.URL.createObjectURL(s);window.open(d,"_blank"),setTimeout(()=>window.URL.revokeObjectURL(d),5e3)},error:()=>this.toastr.error("Failed to open file")})}fetchResumeScores(t){if(!this.showAiRecruitmentFeatures||!t||0===t.length)return;const n={};t.forEach(i=>
1{if(i.positionId&&i.id){const s=String(i.positionId);n[s]||(n[s]=[]),n[s].push(i.id)}});const o=new we.Lr({"user-id":this.loggedInUserId?this.loggedInUserId.toString():"","company-id":this.loggedInUserCompanyID?this.loggedInUserCompanyID.toString():"",Authorization:`Bearer ${sessionStorage.getItem("currentToken")||""}`});Object.keys(n).forEach(i=>{const s=this.recruitmentService.appendChildId(Pe.YK.SCORES_BY_CANDIDATES);this.httpClient.post(s,{candidate_ids:n[i],jd_id:i},{headers:o}).subscribe({next:d=>{var u;const g=null==d||null===(u=d.data)||void 0===u?void 0:u.candidates;var m;g&&Array.isArray(g)&&(g.forEach(l=>{const f=this.candidates.find(v=>String(v.id)===String(l.candidate_id));var h;f&&(f.resumeScore=l.score_overall,null!==(h=l.score_data)&&void 0!==h&&h.summary&&(f.scoreSummary=l.score_data.summary))}),null===(m=this.gridApi)||void 0===m||m.refreshCells({columns:["resumeScore"],force:!0}))},error:d=>console.error(`Error fetching scores for JD ${i}:`,d)})})}getScoringResult(t){const n=new we.Lr({"user-id":this.loggedInUserId?this.loggedInUserId.toString():"",Authorization:`Bearer ${sessionStorage.getItem("currentToken")||""}`}),o=this.recruitmentService.appendChildId(Pe.YK.GET_RESULT_BY_CANDIDATE(t));this.httpClient.get(o,{headers:n}).subscribe({next:i=>{const s=Array.isArray(null==i?void 0:i.data)?i.data[0]:null==i?void 0:i.data,d=(null==s?void 0:s.score_overall)||(null==s?void 0:s.score);if(d){const m=this.candidates.find(l=>l.id===t);var u,g;m&&(m.resumeScore=d,null!==(u=s.score_data)&&void 0!==u&&u.summary&&(m.scoreSummary=s.score_data.summary),null===(g=this.gridApi)||void 0===g||g.refreshCells({columns:["resumeScore"],force:!0}),this.toastr.success(`Resume score updated to ${m.resumeScore}.`,"Success"))}else this.toastr.info("No scoring result found for this candidate.","Info")},error:i=>{var s;return this.toastr.error((null===(s=i.error)||void 0===s?void 0:s.message)||"Failed to fetch scoring result.","Error")}})}viewScoringResult(t){this.dialog.open(Ft,{width:"80%",height:"90%",data:{candidateId:t}})}checkAiRecruitmentPermission(){if(!this.loggedInUserCompanyID)return this.showAiRecruitmentFeatures=!1,void this.setAgColumnDefs();this.accessControlService.getMyModulePermissions(this.loggedInUserCompanyID).subscribe({next:t=>{if(null!=t&&t.success&&Array.isArray(t.data)){const n=t.data.find(o=>{var i;return"recruitment"===(null===(i=o.name)||void 0===i?void 0:i.toLowerCase())});this.showAiRecruitmentFeatures=!!n&&n.isEnabled}else this.showAiRecruitmentFeatures=!1;this.showAiRecruitmentFeatures&&(this.setAgColumnDefs(),this.candidates.length&&this.fetchResumeScores(this.candidates))},error:()=>{this.showAiRecruitmentFeatures=!1}})}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(e.aKT),e.rXU(c.k),e.rXU(_.T),e.rXU(we.Qq),e.rXU($.d),e.rXU(b.bZ),e.rXU(S.L),e.rXU(C.N),e.rXU(q.tw),e.rXU(b.CP),e.rXU(b.Vh),e.rXU(yt.$),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-resume-list-modal"]],decls:13,vars:6,consts:[[1,"resume-modal-container"],[1,"toolbar-row"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],[1,"toolbar-spacer"],["title","Refresh",1,"icon-action-btn","material-icons",3,"click","animationend"],[1,"material-icons","cp",3,"click"],[1,"grid-wrapper"],[1,"ag-theme-quartz",2,"width","100%","height","100%",3,"gridReady","click","rowData","columnDefs","gridOptions"]],template:function(t,n){1&t&&(e.j41(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-icon",3),e.EFF(4,"search"),e.k0s(),e.j41(5,"input",4),e.mxI("ngModelChange",function(i){return e.DH7(n.searchTerm,i)||(n.searchTerm=i),i}),e.bIt("input",function(){return n.filterCandidates()}),e.k0s()(),e.nrm(6,"div",5),e.j41(7,"span",6),e.bIt("click",function(){return n.resetGrid(),n.isClicked=!0})("animationend",function(){return n.isClicked=!1}),e.EFF(8,"refresh"),e.k0s(),e.j41(9,"span",7),e.bIt("click",function(){return n.dialogRef.close()}),e.EFF(10,"close"),e.k0s()(),e.j41(11,"div",8)(12,"ag-grid-angular",9),e.bIt("gridReady",function(i){return n.onGri
1dReady(i)})("click",function(i){return n.onFilterIconClick(i)}),e.k0s()()()),2&t&&(e.R7$(5),e.R50("ngModel",n.searchTerm),e.R7$(2),e.AVh("clicked",n.isClicked),e.R7$(5),e.Y8G("rowData",n.agRowData)("columnDefs",n.agColumnDefs)("gridOptions",n.gridOptions))},dependencies:[y.me,y.BC,y.vS,R.rl,R.JW,M.fg,x.An,G.xs],styles:['.resume-modal-container{padding:0 15px 15px}.toolbar-row{display:flex;align-items:center;flex-wrap:nowrap;gap:10px;padding:12px 10px 8px}.toolbar-spacer{flex:1 1 auto}.mat-height40{height:40px!important}.small-field{min-width:180px}.grid-wrapper{width:100%;height:480px;overflow-x:auto;padding:0 10px}.cp{cursor:pointer;color:#333}.icon-action-btn{border:1px solid #f3820e;color:#f3820e;padding:9px;border-radius:6px;background-color:#fff;height:40px;width:40px;font-size:22px;cursor:pointer}.icon-action-btn.clicked{animation:spin-btn .4s linear}@keyframes spin-btn{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.custom-chip{display:inline-flex;align-items:center;justify-content:center;padding:6px 14px;font-size:11px;font-weight:700;border-radius:8px;line-height:1;text-transform:capitalize;min-width:90px;letter-spacing:.3px;box-shadow:0 2px 4px #0000000a;background-color:#f1f5f9;color:#475569;border:1px solid #e2e8f0;transition:all .2s cubic-bezier(.4,0,.2,1)}.custom-chip:hover{transform:translateY(-1.5px);box-shadow:0 4px 6px #00000014}.chip-selected{background:color-mix(in srgb,#22c55e,white 88%);color:#15803d;border-color:color-mix(in srgb,#22c55e,white 75%)}.chip-rejected{background:color-mix(in srgb,#ef4444,white 88%);color:#b91c1c;border-color:color-mix(in srgb,#ef4444,white 75%)}::ng-deep .mat-mdc-dialog-container .mdc-dialog__surface{border-radius:18px!important}::ng-deep .ag-theme-quartz{border:1px solid #e2e8f0;border-radius:8px;width:100%;height:100%}::ng-deep .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}::ng-deep .ag-theme-quartz .ag-cell{display:flex!important;align-items:center!important;padding-left:12px!important;padding-right:12px!important;border-right:1px solid #e2e8f0!important}::ng-deep .ag-theme-quartz .ag-cell .ag-cell-value,::ng-deep .ag-theme-quartz .ag-cell .ag-cell-wrapper{display:flex!important;align-items:center!important;height:100%!important;width:100%!important}::ng-deep .ag-theme-quartz .center-content-cell{justify-content:center!important}::ng-deep .ag-theme-quartz .center-content-cell .ag-cell-value,::ng-deep .ag-theme-quartz .center-content-cell .ag-cell-wrapper{justify-content:center!important}::ng-deep .ag-theme-quartz .ag-row{border-bottom:1px solid #e2e8f0!important}.ag-icon-btn{background:none;border:none;cursor:pointer;color:#1976d2;padding:4px 8px;font-size:13px;text-decoration:underline}.ag-icon-btn:hover{color:#1565c0}.action-row{display:flex;align-items:center;gap:6px}.switch-wrapper{display:flex;align-items:center;justify-content:center;height:100%}.custom-switch{position:relative;display:inline-block;width:76px;height:30px}.custom-switch input{opacity:0;width:0;height:0}.custom-switch input:checked+.slider{background-color:#28a745;box-shadow:inset 0 2px 4px #0000001a}.custom-switch input:checked+.slider:before{transform:translate(46px)}.custom-switch input:checked+.slider .status-label.selected{opacity:1}.custom-switch input:checked+.slider .status-label.rejected{opacity:0}.custom-switch input:not(:checked)+.slider .status-label.selected{opacity:0}.custom-switch input:not(:checked)+.slider .status-label.rejected{opacity:1}.custom-switch .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#dc3545;transition:.3s;box-shadow:inset 0 2px 4px #0000001a}.custom-switch .slider:before{position:absolute;content:"";height:24px;width:24px;left:3px;bottom:3px;background-color:#fff;transition:.3s;z-index:2;box-shadow:0 2px 4px #0003}.custom-switch .slider.round{border-radius:34px}.custom-switch .slider.round:before{border-radius:50%}.custom-switch .slider .status-label{position:absolute;top:50%;transform:translateY(-50%);font-size:10px;font-weight:700;color:#fff;transition:opacity .2s;pointer-events:none;letter-spacing:.5px}.custom-switch .slider .status-label.rejected{right:10px}.custom-switch .slider .status-label.selected{left:10px}.custom-switch.disabled{opacity:.6}.custom-switch.disabled input,.custom-switch.disabled .slider{pointer-events:none}\n'],encapsulation:2}),p})();const Ls=["columnChooserBtn"];function zs(a,p){if(1&a&&(e.j41(0,"mat-option",18),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG();e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}let Vs=(()=>{var a;class p{get arrAllMonths(){return this._arrAllMonthsCacheKey!==this.loggedInCompanyFiscalyear&&(this._arrAllMonthsCacheKey=this.loggedInCompanyFiscalyear,this._arrAllMonthsCache="Apr_Mar"===this.loggedInCompanyFiscalyear?[...this.months.slice(3),...this.months.slice(0,3)]:this.months),this._arrAllMonthsCache}get selectedMonths(){return this.selectedMonthObjects.map(t=>t.key)}get allMonthsSelected(){return this.selectedMonthObjects.length===this.arrAllMonths.length}onMonthsChange(t){this.selectedMonthObjects=t,this.loadResumeScreen()}constructor(t,n,o,i,s,d,u,g,m){this.httpService=t,this.config=n,this.encryptionService=o,this.dataRefreshService=i,this.sharedService=s,this.dialogRef=d,this.dialog=u,this.toastr=g,this.recruitmentService=m,this.searchTerm="",this.originalData=[],this.agColumnDefs=[],this.agRowData=[],this.gridFilterActive=!1,this.isClicked=!1,this.gridOptions={pagination:!0,paginationPageSize:10,paginationPageSizeSelector:[5,10,25,50,75,100,200,500,1e3],suppressCellFocus:!0,rowHeight:42,popupParent:document.querySelector("body"),defaultColDef:{flex:1,minWidth:120,resizable:!0,sortable:!0,filter:!0}
1,localeText:{noRowsToShow:"No records found"},postProcessPopup:l=>{var f;if("columnChooser"!==l.type)return;const h=null===(f=this.columnChooserBtn)||void 0===f?void 0:f.nativeElement,v=l.ePopup;if(!h||!v)return;const k=h.getBoundingClientRect();v.style.top=`${k.bottom+window.scrollY+4}px`,v.style.left="auto",v.style.right=document.documentElement.clientWidth-k.right+"px"},onCellClicked:l=>this.handleCellClick(l),onFilterChanged:()=>{var l;const f=null===(l=this.gridApi)||void 0===l?void 0:l.getFilterModel();this.gridFilterActive=!!f&&Object.keys(f).length>0}},this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.recruitmentYears=[],this.selectedYearForRecruitment="",this.fromYear="",this.toYear="",this.taskFromDate=null,this.taskToDate=null,this.selectedMonthObjects=[],this.monthDropdownSettings={singleSelection:!1,enableCheckAll:!0,selectAllText:"Select All",unSelectAllText:"Unselect All",idField:"key",textField:"name",itemsShowLimit:1,closeDropDownOnSelection:!1},this.loggedInUserRoleIsMD=!1,this.loggedInUserRoleIsHOD=!1,this.months=[{key:"01",name:"January"},{key:"02",name:"February"},{key:"03",name:"March"},{key:"04",name:"April"},{key:"05",name:"May"},{key:"06",name:"June"},{key:"07",name:"July"},{key:"08",name:"August"},{key:"09",name:"September"},{key:"10",name:"October"},{key:"11",name:"November"},{key:"12",name:"December"}],this._arrAllMonthsCacheKey=Symbol(),this._arrAllMonthsCache=[]}
1ngOnInit(){this.initializeSessionData(),this.refreshSub=this.dataRefreshService.refreshNeeded$.subscribe(()=>{this.getPmsYearList()})}ngOnDestroy(){this.refreshSub&&this.refreshSub.unsubscribe()}onGridReady(t){this.gridApi=t.api}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}resetGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.refreshCells()),this.gridFilterActive=!1,this.loadResumeScreen()}setAgColumnDefs(){this.agColumnDefs=[{headerName:"Position",field:"positionName",minWidth:240,tooltipValueGetter:t=>t.value,cellRenderer:t=>this.truncateCell(t.value),pinned:"left"},{headerName:"Department",field:"department",minWidth:160,tooltipField:"department"},{headerName:"Location",field:"location",minWidth:140,tooltipField:"location"},{headerName:"Recruiter",field:"positionCreatedByName",minWidth:160,tooltipField:"positionCreatedByName"},{headerName:"Opened Date",field:"positionOpeningDate",minWidth:140,valueFormatter:t=>t.value?new Date(t.value).toLocaleDateString("en-GB"):"",cellRenderer:t=>t.value?new Date(t.value).toLocaleDateString("en-GB"):""},{headerName:"Closed Date",field:"positionClosingDate",minWidth:140,valueFormatter:t=>t.value?new Date(t.value).toLocaleDateString("en-GB"):"",cellRenderer:t=>t.value?new Date(t.value).toLocaleDateString("en-GB"):""},{headerName:"Resume Received",field:"noOfScreened",minWidth:160,filter:"agNumberColumnFilter",cellRenderer:t=>this.renderScreenedCell(t),cellClass:"center-content-cell"},{headerName:"Selected by HR",field:"noOfResumesSelected",minWidth:160,filter:"agNumberColumnFilter",cellRenderer:t=>{var n;return this.renderCountCell(null!==(n=t.value)&&void 0!==n?n:0,"selected")},cellClass:"center-content-cell"},{headerName:"Rejected by HR",field:"noOfResumesRejected",minWidth:160,filter:"agNumberColumnFilter",cellRenderer:t=>{var n;return this.renderCountCell(null!==(n=t.value)&&void 0!==n?n:0,"rejected")},cellClass:"center-content-cell"}]}truncateCell(t){return t?t.length>30?`${t.slice(0,30)}...`:t:""}renderCountCell(t,n){return`<span data-action="open-${n}" style="color:#1976d2;cursor:pointer;text-decoration:underline;">${t}</span>`}renderScreenedCell(t){var n,o;const i="HR Admin"===this.loggedInUserRole||"Super Admin"===this.loggedInUserRole;return`<span data-action="${i?"open-screened":"open-received"}" style="color:#1976d2;cursor:pointer;text-decoration:underline;">${i?null!==(n=t.data.noOfScreened)&&void 0!==n?n:0:null!==(o=t.data.noOfResumesReceived)&&void 0!==o?o:0}</span>`}handleCellClick(t){var n;const o=null===(n=t.event)||void 0===n?void 0:n.target,i=null==o?void 0:o.closest("[data-action]");if(!i)return;const s=i.getAttribute("data-action"),d=t.data;switch(s){case"open-received":this.openListModal("received",d);break;case"open-screened":this.openListModal("screened",d);break;case"open-selected":this.openListModal("selected",d);break;case"open-rejected":this.openListModal("rejected",d)}}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName,this.loggedInUserRoleIsM
1D=this.loggedInUserRoles.some(o=>"MD"===o.displayName),this.loggedInUserRoleIsHOD=this.loggedInUserRoles.some(o=>"HOD"===o.displayName),this.setAgColumnDefs()}onClose(){this.dialogRef.close()}getPmsYearList(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.recruitmentYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.recruitmentYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-")),this.setDefaultMonth(),this.loadResumeScreen()}onYearChange(t){this.selectedYearForRecruitment=t,this.taskFromDate=null,this.taskToDate=null,this.setDefaultMonth(),this.loadResumeScreen()}setDefaultMonth(){this.selectedMonthObjects=[...this.arrAllMonths]}filterResume(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}loadResumeScreen(){const t=this.recruitmentService.appendChildId(`${this.config.getResumeScreeningData}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonths.join(",")}`);this.httpService.callGetService(t).subscribe({next:n=>{let o=(n.data||[]).filter(i=>!i.isDeleted);if(!["Super Admin","HR Admin"].includes(this.loggedInUserRole)&&!this.loggedInUserRoleIsMD)if("HOD"===this.loggedInUserRole){const i=(this.intHODempCode||"").trim().toUpperCase();o=o.filter(s=>{const d=String(s.positionCreatedById)===String(this.loggedInUserId),u="Admin"===s.positionCreatedByUserRole,m=(s.hods||[]).map(l=>(l.hodId||"").trim().toUpperCase()).includes(i);return(d||m)&&!u})}else o="Admin"===this.loggedInUserRole?o.filter(i=>{const s=String(i.positionCreatedById)===String(this.loggedInUserId)&&"Admin"===i.positionCreatedByUserRole,d=i.positionAssignedAdmins&&Object.keys(i.positionAssignedAdmins).some(u=>String(u)===String(this.loggedInUserId));return s||d}):[];this.originalData=o,this.agRowData=[...this.originalData]},error:n=>console.error("Error fetching resume screening data:",n)})}downloadResumeScreening(){if(!this.gridApi)return;const t=this.gridApi.paginationGetCurrentPage(),n=this.gridApi.paginationGetPageSize(),o=t*n,i=o+n,s=[];this.gridApi.forEachNodeAfterFilterAndSort(f=>s.push(f.data));const d=s.slice(o,i);if(!d.length)return void this.toastr.info("No data to download for this page.","Info");const u=d.map(f=>({Position:f.positionName,Department:f.department,Location:f.location,Recruiter:f.positionCreatedByName,"Opened Date":f.positionOpeningDate?new Date(f.positionOpeningDate).toLocaleDateString("en-GB"):"","End Date":f.positionClosingDate?new Date(f.positionClosingDate).toLocaleDateString("en-GB"):"","Resume Received":f.noOfScreened,"Selected by HR":f.noOfResumesSelected,"Rejected by HR":f.noOfResumesRejected})),m={Sheets:{"Resume Screening":F.utils.json_to_sheet(u)},SheetNames:["Resume Screening"]},l=F.write(m,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([l],{type:"application/octet-stream"}),`Resume_Screening_Page_${t+1}.xlsx`)}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}clearAllFilters(){this.gridApi&&(this.gridApi.setFilterModel(null),this.gridFilterActive=!1)}get isAnyFilterApplied(){return this.gridFilterActive}openListModal(t,n){const o=new b.ru;o.disableClose=!1,o.height="70%",o.width="80%",o.panelClass="custom-dialog-container",o.data={type:t,rowData:n,year:this.selectedYearForRecruitment,month:this.selectedMonths.join(","),PositionId:n.positionId},this.dialog.open(Ys,o)}downloadVisibleColumns(){if(!this.gridApi)return;const t=this.gridApi.getAllDisplayedColumns().map(l=>l.getColDef()).filter(l=>l.headerName&&l.field&&"Actions"!==l.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=[];this.gridApi.forEachNodeAfterFilterAndSort(l=>i.push(l.data));const s=i.slice(n*o,(n+1)*o);if(!s.length)return void this.toastr.info("No data to download for this page.","Info");const d=s.map(l=>{const f={};for(const h of t){let v;if("function"==typeof h.valueFormatter)v=h.valueFormatter({value:l[h.field],data:l});else if("function"==typeof h.valueGetter)try{v=h.valueGetter({data:l})}catch{v=l[h.field]}else v=l[h.field];null==v?v="":"object"==typeof v&&(v=Object.values(v).join(", ")),f[h.headerName]=String(v)}return f}),g={Sheets:{Data:F.utils.json_to_sheet(d)},SheetNames:["Data"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Export_Visible_Page_${n+1}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU(C.N),e.rXU($.d),e.rXU(b.CP),e.rXU(b.bZ),e.rXU(q.tw),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-resume-screening"]],viewQuery:function(t,n){if(1&t&&e.GBs(Ls,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},decls:23,vars:14,consts:[["columnChooserBtn",""],[1,"container","mb-20"],[1,"cardBox","mb
1-20"],[1,"toolbar-row"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],[1,"toolbar-spacer"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"month-multiselect"],[3,"ngModelChange","placeholder","settings","data","ngModel"],["title","Download",1,"icon-action-btn","material-icons",3,"click"],["title","Refresh",1,"icon-action-btn","material-icons","ml-5",3,"click","animationend"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5",3,"click"],[1,"material-icons"],[1,"grid-wrapper","p-10"],[1,"ag-theme-quartz",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],[3,"value"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"mat-form-field",4)(4,"mat-icon",5),e.EFF(5,"search"),e.k0s(),e.j41(6,"input",6),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.filterResume())}),e.k0s()(),e.nrm(7,"div",7),e.j41(8,"mat-form-field",4)(9,"mat-select",8),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.selectedYearForRecruitment,s)||(n.selectedYearForRecruitment=s),e.Njj(s)}),e.bIt("selectionChange",function(s){return e.eBV(o),e.Njj(n.onYearChange(s.value))}),e.DNE(10,zs,2,2,"mat-option",9),e.k0s()(),e.j41(11,"div",10)(12,"ng-multiselect-dropdown",11),e.bIt("ngModelChange",function(s){return e.eBV(o),e.Njj(n.onMonthsChange(s))}),e.k0s()(),e.j41(13,"span",12),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(14,"download"),e.k0s(),e.j41(15,"span",13),e.bIt("click",function(){return e.eBV(o),n.resetGrid(),e.Njj(n.isClicked=!0)})("animationend",function(){return e.eBV(o),e.Njj(n.isClicked=!1)}),e.EFF(16,"refresh"),e.k0s(),e.j41(17,"button",14,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(19,"span",15),e.EFF(20,"tune"),e.k0s()()(),e.j41(21,"div",16)(22,"ag-grid-angular",17),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))}),e.k0s()()()()}2&t&&(e.R7$(6),e.R50("ngModel",n.searchTerm),e.R7$(3),e.R50("ngModel",n.selectedYearForRecruitment),e.R7$(),e.Y8G("ngForOf",n.recruitmentYears),e.R7$(2),e.Y8G("placeholder","Select Month")("settings",n.monthDropdownSettings)("data",n.arrAllMonths)("ngModel",n.selectedMonthObjects),e.R7$(3),e.AVh("clicked",n.isClicked),e.R7$(2),e.xc7("background-color",n.buttonColorName),e.R7$(5),e.Y8G("rowData",n.agRowData)("columnDefs",n.agColumnDefs)("gridOptions",n.gridOptions))},dependencies:[K.Sq,y.me,y.BC,y.vS,R.rl,R.JW,he.VO,pe.wT,Ke.b,M.fg,x.An,G.xs],styles:[".container{--background: #f6f5fb;padding:0 15px}.month-multiselect{display:inline-block;min-width:180px;vertical-align:middle}.cardBox{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.mat-height40{height:40px!important}.icon-action-btn{border:1px solid #f3820e;color:#f3820e;padding:9px;border-radius:6px;background-color:#fff;height:40px;width:40px;font-size:22px;cursor:pointer}.icon-action-btn.clicked{animation:spin-btn .4s linear}@keyframes spin-btn{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.toolbar-row{display:flex;align-items:center;flex-wrap:nowrap;gap:10px;padding:12px 10px 4px}.toolbar-spacer{flex:1 1 auto}.small-field{min-width:180px}.grid-wrapper{width:100%;overflow-x:auto}.p-10{padding:10px}.ml-5{margin-left:5px}.ml-10{margin-left:10px}.mb-20{margin-bottom:20px}.d-flex{display:flex}.align-center{align-items:center}.justify-content-flex-end{justify-content:flex-end}::ng-deep .ag-theme-quartz{border:1px solid #e2e8f0;border-radius:8px}::ng-deep .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}::ng-deep .ag-theme-quartz .ag-cell{display:flex!important;align-items:center!important;padding-left:12px!important;padding-right:12px!important;border-right:1px solid #e2e8f0!important}::ng-deep .ag-theme-quartz .ag-cell .ag-cell-value,::ng-deep .ag-theme-quartz .ag-cell .ag-cell-wrapper{display:flex!important;align-items:center!important;height:100%!important;width:100%!important}::ng-deep .ag-theme-quartz .center-content-cell{justify-content:center!important}::ng-deep .ag-theme-quartz .center-content-cell .ag-cell-value,::ng-deep .ag-theme-quartz .center-content-cell .ag-cell-wrapper{justify-content:center!important}::ng-deep .ag-theme-quartz .ag-row{border-bottom:1px solid #e2e8f0!important}\n"],encapsulation:2}),p})();var Yt=Y(96695),Lt=Y(2042);const Xs=["columnChooserBtn"];
1function Hs(a,p){if(1&a&&(e.j41(0,"mat-option",20),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG();e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}let Ws=(()=>{var a;class p{get arrAllMonths(){return this._arrAllMonthsCacheKey!==this.loggedInCompanyFiscalyear&&(this._arrAllMonthsCacheKey=this.loggedInCompanyFiscalyear,this._arrAllMonthsCache="Apr_Mar"===this.loggedInCompanyFiscalyear?[...this.months.slice(3),...this.months.slice(0,3)]:this.months),this._arrAllMonthsCache}get selectedMonths(){return this.selectedMonthObjects.map(t=>t.key)}get allMonthsSelected(){return this.selectedMonthObjects.length===this.arrAllMonths.length}onMonthsChange(t){this.selectedMonthObjects=t,this.fetchTatReport()}get displayedColumns(){return[...this.baseColumns,...this.interviewRoundColumns,"totalDaysFromOpenToOffer"]}constructor(t,n,o,i,s,d,u){this.httpService=t,this.config=n,this.encryptionService=o,this.sharedService=i,this.toastr=s,this.recruitmentService=d,this.dataRefreshService=u,this.destroy$=new Z.B,this.rowData=[],this.masterColumnDefs=[],this.baseMasterCols=[{field:"positionName",headerName:"Position Name",cellRenderer:"agGroupCellRenderer",flex:2,minWidth:200},{field:"department",headerName:"Department",flex:1.5,minWidth:150},{field:"positionSource",headerName:"Source",flex:1,minWidth:100},{field:"positionOpeningDate",headerName:"Opening Date",valueFormatter:g=>g.value?new Date(g.value).toLocaleDateString("en-GB"):"-",flex:1},{field:"positionClosingDate",headerName:"Closing Date",valueFormatter:g=>g.value?new Date(g.value).toLocaleDateString("en-GB"):"-",flex:1}],this.gridOptions={popupParent:document.querySelector("body"),masterDetail:!0,detailRowAutoHeight:!0,suppressCellFocus:!0,defaultColDef:{flex:1,resizable:!0,sortable:!0,filter:!0,valueFormatter:g=>null==g.value||""===g.value?"-":g.value},detailCellRendererParams:g=>{const m=g.data.candidates||[],l=new Set;m.forEach(v=>{Object.keys(v).forEach(k=>{k.toLowerCase().startsWith("interviewround")&&k.toLowerCase().endsWith("days")&&l.add(k)})});const f=Array.from(l).sort(),h=[{field:"candidateName",headerName:"Candidate",flex:1.5},{field:"resumeReceivedDays",headerName:"Resume Submitted Days",valueFormatter:v=>this.safeDaysFormatter(v.value)},{field:"hrDecisionDays",headerName:"HR Screening Days",valueFormatter:v=>this.safeDaysFormatter(v.value)},{field:"finalStatus",headerName:"Status",flex:1,cellClassRules:{"status-hired":v=>{var k;return"hired"===(null===(k=v.value)||void 0===k?void 0:k.toLowerCase())},"status-rejected":v=>{var k;return"rejected"===(null===(k=v.value)||void 0===k?void 0:k.toLowerCase())}}}];return f.forEach(v=>{h.push({field:v,headerName:this.columnLabels[v]||this.formatRoundLabel(v),valueFormatter:k=>this.safeDaysFormatter(k.value)})}),h.push({field:"totalDaysFromOpenToOffer",headerName:"Total TAT Days",cellStyle:{"font-weight":"bold",color:"#f3820e"}}),{detailGridOptions:{columnMenu:"legacy",columnDefs:h,defaultColDef:{flex:1,resizable:!0,filter:!0,sortable:!0,valueFormatter:v=>null==v.value||""===v.value?"-":v.value}},getDetailRowData:v=>v.successCallback(m)}},postProcessPopup:g=>{var m;if("columnChooser"!==g.type)return;const l=null===(m=this.columnChooserBtn)||void 0===m?void 0:m.nativeElement,f=g.ePopup;if(!l||!f)return;const h=l.getBoundingClientRect();f.style.top=`${h.bottom+window.scrollY+4}px`,f.style.left="auto",f.style.right=document.documentElement.clientWidth-h.right+"px"}},this.dataSource=new St.I6([]),this.filteredTatData=[],this.tatData=[],this.searchTerm="",this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.loggedInUserRoleIsMD=!1,this.recruitmentYears=[],this.selectedYearForRecruitment="",this.fromYear="",this.toYear="",this.selectedMonthObjects=[],this.monthDropdownSettings={singleSelection:!1,enableCheckAll:!0,selectAllText:"Select All",unSelectAllText:"Unselect All",idField:"key",textField:"name",itemsShowLimit:1,closeDropDownOnSelection:!1},this.months=[{key:"01",name:"January"},{key:"02",name:"February"},{key:"03",name:"March"},{key:"04",name:"April"},{key:"05",name:"May"},{key:"06",name:"June"},{key:"07",name:"July"},{key:"08",name:"August"},{key:"09",name:"September"},{key:"10",name:"October"},{key:"11",name:"November"},{key:"12",name:"December"}],this._arrAllMonthsCacheKey=Symbol(),this._arrAllMonthsCache=[],this.baseColumns=["candidateName","resumeReceivedDays","hrDecisionDays"],this.columnLabels={candidateName:"Candidate",resumeReceivedDays:"Resume Submitted Days",hrDecisionDays:"HR Screening Days",finalStatus:"Final Status",totalDaysFromOpenToOffer:"TAT Days"},this.interviewRoundColumns=[]}ngOnInit(){this.initializeSessionData(),this.getPmsYearList(),this.dataRefreshService.refreshNeeded$.pipe((0,Q.B)(300),(0,L.Q)(this.destroy$)).subscribe(()=>{this.initializeSessionData(),this.getPmsYearList()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}ngAfterViewInit(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName,this.loggedInUserRoleIsM
1D=this.loggedInUserRoles.some(o=>"MD"===o.displayName)}getPmsYearList(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.recruitmentYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.recruitmentYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-")),this.setDefaultMonth(),this.fetchTatReport()}onYearChange(t){this.selectedYearForRecruitment=t,this.setDefaultMonth(),this.fetchTatReport()}setDefaultMonth(){this.selectedMonthObjects=[...this.arrAllMonths]}fetchTatReport(){const t=this.recruitmentService.appendChildId(`${this.config.getTATReport}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}&month=${this.selectedMonths.join(",")}`);this.httpService.callGetService(t).subscribe({next:n=>{if(!n.status||!Array.isArray(n.data))return this.tatData=[],this.filteredTatData=[],void(this.interviewRoundColumns=[]);let o=n.data.filter(g=>!g.isDeleted);if(!["Super Admin","HR Admin"].includes(this.loggedInUserRole)&&!this.loggedInUserRoleIsMD)if("HOD"===this.loggedInUserRole){const g=(this.intHODempCode||"").trim().toUpperCase();o=o.filter(m=>{const l=String(m.positionCreatedById)===String(this.loggedInUserId),f="admin"===String(m.positionCreatedByUserRole).toLowerCase(),h=m.candidates.some(v=>(v.interviewHODs?Object.keys(v.interviewHODs).map(B=>B.trim().toUpperCase()):[]).includes(g));return(l||h)&&!f})}else o="Admin"===this.loggedInUserRole?o.filter(g=>{const m=String(g.positionCreatedById)===String(this.loggedInUserId)&&"admin"===String(g.positionCreatedByUserRole).toLowerCase(),l=g.positionAssignedAdmins&&Object.keys(g.positionAssignedAdmins).some(f=>String(f)===String(this.loggedInUserId));return m||l}):[];this.filteredTatData=o;const i=g=>{const m=Number(String(g).replace(/[^\d.-]/g,""));return isNaN(m)?0:Math.max(0,m)},d=new Set;this.filteredTatData.forEach(g=>{(g.candidates||[]).forEach(m=>{Object.keys(m).forEach(l=>{l.toLowerCase().startsWith("interviewround")&&l.toLowerCase().endsWith("days")&&d.add(l)})})}),this.interviewRoundColumns=Array.from(d).sort(),this.interviewRoundColumns.forEach(g=>{this.columnLabels[g]=this.formatRoundLabel(g)}),this.tatData=this.filteredTatData.map(g=>({positionName:g.positionName,department:g.department,positionSource:g.positionSource,positionOpeningDate:g.positionOpeningDate,positionClosingDate:g.positionClosingDate,candidates:(g.candidates||[]).map(m=>{m.totalDaysFromOpenToOffer=(g=>g?Object.keys(g).filter(v=>v.toLowerCase().startsWith("interviewround")&&v.toLowerCase().endsWith("days")).map(v=>i(g[v])).reduce((v,k)=>v+k,0)+i(g.hrDecisionDays)+i(g.resumeReceivedDays):0)(m);const l=Object.keys(m).filter(f=>f.toLowerCase().startsWith("interviewround")&&f.toLowerCase().endsWith("days")).sort();return l.forEach((f,h)=>{const v=i(m[f]);if(h===l.length-1){const k=(m.finalStatus||"").toLowerCase();m[f]=`${v}${"hired"===k?" (H)":"rejected"===k?" (R)":""}`}else m[f]=v}),m}),avgResumeDays:this.getAverage(g.candidates||[],"resumeReceivedDays"),avgHrDays:this.getAverage(g.candidates||[],"hrDecisionDays"),avgTotalTat:this.getAverage(g.candidates||[],"totalDaysFromOpenToOffer")})),this.tatData.forEach(g=>{this.interviewRoundColumns.forEach(m=>{g[`avg_${m}`]=this.getAverage(g.candidates,m)})});const u=[...this.baseMasterCols];u.push({field:"avgResumeDays",headerName:"Avg Resume Submitted Days",flex:1}),u.push({field:"avgHrDays",headerName:"Avg HR Screening Days",flex:1}),this.interviewRoundColumns.forEach(g=>{u.push({field:`avg_${g}`,headerName:`Avg ${this.columnLabels[g]||this.formatRoundLabel(g)}`,flex:1})}),u.push({field:"avgTotalTat",headerName:"Avg TAT",cellStyle:{"font-weight":"bold",color:"#f3820e"},flex:1}),this.masterColumnDefs=u,this.gridApi&&this.gridApi.setGridOption("columnDefs",this.masterColumnDefs),this.filteredTatData=[...this.tatData],this.rowData=this.filteredTatData},error:n=>console.error("\u274c Error loading TAT report:",n)})}formatRoundLabel(t){return t.replace(/interviewRound/gi,"Interview Round ").replace(/Days/gi,"Days").trim()}safeDaysFormatter(t){if(null==t||""===t)return"-";const n=String(t),o=n.match(/\s*\((H|R)\)\s*$/i),i=o?o[0]:"",s=n.replace(/\s*\((H|R)\)\s*$/i,""),d=Number(s.replace(/[^\d.-]/g,""));return`${isNaN(d)?0:Math.max(0,d)}${i}`}getAverage(t,n){const o=t.map(d=>Number(String(d[n]).replace(/\D/g,""))||0),i=o.reduce((d,u)=>d+u,0),s=o.length;return s?+(i/s).toFixed(2):0}filterTatReport(){const t=this.searchTerm.trim().toLowerCase();if(!t)return this.filteredTatData=[...this.tatData],void(this.rowData=this.filteredTatData);this.filteredTatData=this.tatData.map(n=>{const o=n.candidates.filter(i=>Object.values(i).some(s=>String(null!=s?s:"").toLowerCase().includes(t)));return{...n,candidates:o}}).filter(n=>n.candidates.length>0),this.rowData=this.filteredTatData}downloadTatReport(){if(!this.gridApi)return;const t=[];if(this.gridApi.forEachNodeAfterFilterAndSort(g=>{t.push(g.data)}),!t.length)return void this.toastr.warning("No data available to download.");const n=g=>{if(!g)return"";const m=new Date(g);return isNaN(m.getTime())?"":`${String(m.getDate()).padStart(2,"0")}/${String(m.getMonth()+1).padStart(2,"0")}/${m.getFullYear()}`},o=[];if(t.forEach(g=>{var m;null!==(m=g.candidates)&&void 0!==m&&m.length&&g.candidates.forEac
1h(l=>{var f,h,v;const k={Position:g.positionName||"",Department:g.department||"",Source:g.positionSource||"",OpeningDate:n(g.positionOpeningDate),ClosingDate:n(g.positionClosingDate),Candidate:l.candidateName||"",ResumeDays:null!==(f=l.resumeReceivedDays)&&void 0!==f?f:0,HRDecisionDays:null!==(h=l.hrDecisionDays)&&void 0!==h?h:0};this.interviewRoundColumns.forEach(B=>{k[this.columnLabels[B]||B]=l[B]}),k["Total TAT Days"]=null!==(v=l.totalDaysFromOpenToOffer)&&void 0!==v?v:0,k["Final Status"]=l.finalStatus||"",o.push(k)})}),!o.length)return void this.toastr.info("No valid data to export.","Info");const s={Sheets:{"TAT Report":F.utils.json_to_sheet(o)},SheetNames:["TAT Report"]},d=F.write(s,{bookType:"xlsx",type:"array"}),u=this.allMonthsSelected?"AllMonths":this.selectedMonths.join("-");U.saveAs(new Blob([d],{type:"application/octet-stream"}),`TatReport_${u}_${this.selectedYearForRecruitment}.xlsx`)}resetTatGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.deselectAll(),this.gridApi.refreshCells()),this.fetchTatReport()}getAllCandidatesCount(){return this.filteredTatData.reduce((t,n)=>{var o;return t+((null===(o=n.candidates)||void 0===o?void 0:o.length)||0)},0)}getOverallAverage(t){const o=this.filteredTatData.reduce((d,u)=>d.concat(u.candidates||[]),[]).map(d=>Number(String(d[t]).replace(/\D/g,""))||0),i=o.reduce((d,u)=>d+u,0),s=o.length;return s?+(i/s).toFixed(2):0}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}onGridReady(t){this.gridApi=t.api,this.gridApi.sizeColumnsToFit()}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}downloadVisibleColumns(){if(!this.gridApi)return;const t=this.gridApi.getAllDisplayedColumns().map(l=>l.getColDef()).filter(l=>l.headerName&&l.field&&"Actions"!==l.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=[];this.gridApi.forEachNodeAfterFilterAndSort(l=>i.push(l.data));const s=i.slice(n*o,(n+1)*o);if(!s.length)return void this.toastr.info("No data to download for this page.","Info");const d=s.map(l=>{const f={};for(const h of t){let v;if("function"==typeof h.valueFormatter)v=h.valueFormatter({value:l[h.field],data:l});else if("function"==typeof h.valueGetter)try{v=h.valueGetter({data:l})}catch{v=l[h.field]}else v=l[h.field];null==v?v="":"object"==typeof v&&(v=Object.values(v).join(", ")),f[h.headerName]=String(v)}return f}),g={Sheets:{Data:F.utils.json_to_sheet(d)},SheetNames:["Data"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Export_Visible_Page_${n+1}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU($.d),e.rXU(q.tw),e.rXU(I.W),e.rXU(C.N))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-tat-report"]],viewQuery:function(t,n){if(1&t&&(e.GBs(Yt.iy,5),e.GBs(Lt.B4,5),e.GBs(Xs,5)),2&t){let o;e.mGM(o=e.lsd())&&(n.paginator=o.first),e.mGM(o=e.lsd())&&(n.sort=o.first),e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},decls:24,vars:12,consts:[["columnChooserBtn",""],[1,"container","mb-20","mt-20"],[1,"cardBox","mb-20"],[1,"filter-bar","mb-10"],["size","auto",1,"ml-10","mt-20"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],[1,"d-flex","align-center","justify-content-flex-end","mt-20"],[1,"mat-height40","mat-input-style","small-field","mr-10"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"month-multiselect","mr-10"],[3,"ngModelChange","placeholder","settings","data","ngModel"],[1,"icon-download","material-icons","mr-10",3,"click"],[1,"icon-refresh","material-icons","mr-10",3,"click"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5","mr-10",3,"click"],[1,"material-icons"],[1,"m-20","tat-grid-wrapper"],[1,"ag-theme-alpine","tat-grid-container",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],[3,"value"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"ion-row",3)(3,"ion-col",4)(4,"mat-form-field",5)(5,"mat-icon",6),e.EFF(6,"search"),e.k0s(),e.j41(7,"input",7),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.filterTatReport())}),e.k0s()()(),e.j41(8,"ion-col",8)(9,"mat-form-field",9)(10,"mat-select",10),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.selectedYearForRecruitment,s)||(n.selectedYearForRecruitment=s),e.Njj(s)}),e.bIt("selectionChange",function(s){return e.eBV(o),e.Njj(n.onYearChange(s.value))}),e.DNE(11,Hs,2,2,"mat-option",11),e.k0s()(),e.j41(12,"div",12)(13,"ng-multiselect-dropdown",13),e.bIt("ngModelChange",function(s){return e.eBV(o),e.Njj(n.onMonthsChange(s))}),e.k0s()(),e.j41(14,"span",14),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(15,"download"),e.k0s(),e.j41(16,"span",15),e.bIt("click",function(){return e.eBV(o),e.Njj(n.resetTatGrid())}),e.EFF(17,"refresh"),e.k0s(),e.j41(18,"button",16,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(20,"span",17),e.EFF(21,"tune"),e.k0s()()()(),e.j41(22,"div",18)(23,"ag-grid-angular",19),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))}),e.k0s()()()()}2&t&&(e.R7$(7),e.R50("ngModel",n.searchTerm),e.R7$(3),e.R50("ngModel",n.selectedYearForRecruitment),e.R7$(),e.Y8G("ngForOf",n.recruitmentYears),e.R7$(2),e.Y8G("placeholder","Select Month")("settings",n.monthDropdownSettings)("data",n.arrAllMonths)("ngModel",n.selectedMonthObjects),e.R7$(5),e.xc7("background-color",n.buttonColorName),e.R7$(5),e.Y8G("rowData",n.rowData)("columnDefs",n.masterColumnDefs)("gridOptions",n.gridOptions))},dependencies:[K.Sq,y.me,y.BC,y.vS,J.hU,J.ln,R.rl,R.JW,he.VO,pe.wT,Ke.b,M.fg,x.An,G.xs],styles:[".container[_ngcontent-%COMP%]{--background: #f6f5fb;padding:0 15px}.month-multiselect[_ngcontent-%COMP%]{display:inline-block;min-width:180px;vertical-align:middle}.cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content;overflow:hidden}.cardBoxHeading[_ngcontent-%COMP%]{background-color:#ddd;padding:5px;color:#000;border-radius:10px 10px 0 0}.table-container[_ngcontent-%COMP%]{width:100%;max-height:400px;overflow-x:auto;overflow-y:auto;display:block}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{min-width:1200px;width:max-content;border-collapse:collapse}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid #ddd;padding:4px 8px;text-align:left;font-size:14px;white-space:nowrap}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f2f2f2;font-family:OpenSans-SemiBold;position:sticky;top:0;z-index:2}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background-color:#fff;font-family:OpenSans-Regular}.mat-height40[_ngcontent-%COMP%]{height:40px!important}.w70px[_ngcontent-%COMP%]{width:70px}.icon-download[_ngcontent-%COMP%], .icon-refresh[_ngcontent-%COMP%]{border:1px solid #f3820e;color:#f3820e;padding:9px;border-radius:6px;background-color:#fff;height:40px;width:40px;font-size:22px;
1cursor:pointer;display:flex;align-items:center;justify-content:center}.cp[_ngcontent-%COMP%]{cursor:pointer;margin-right:8px;color:#333}.header-cell[_ngcontent-%COMP%]{background-color:#ddd!important;font-weight:700!important}.m-20[_ngcontent-%COMP%]{margin:20px}.status-hired[_ngcontent-%COMP%]{color:green;font-weight:600;margin-left:4px}.status-rejected[_ngcontent-%COMP%]{color:red;font-weight:600;margin-left:4px}.tat-grid-wrapper[_ngcontent-%COMP%]{height:auto;border:1px solid #e2e2e2;border-radius:8px;overflow:hidden}.tat-grid-container[_ngcontent-%COMP%]{width:100%;font-family:OpenSans-Regular,sans-serif}"]}),p})();function Qs(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Name is required"),e.k0s())}function qs(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Maximum 100 characters allowed"),e.k0s())}function Js(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Code is required"),e.k0s())}function Ks(a,p){1&a&&(e.j41(0,"mat-error"),e.EFF(1,"Maximum 50 characters allowed"),e.k0s())}function Zs(a,p){if(1&a&&(e.j41(0,"ion-row",14)(1,"label",8),e.EFF(2," Code "),e.j41(3,"span",9),e.EFF(4,"*"),e.k0s()(),e.j41(5,"mat-form-field",10),e.nrm(6,"input",19),e.DNE(7,Js,2,0,"mat-error",12)(8,Ks,2,0,"mat-error",12),e.k0s()()),2&a){let r,t;const n=e.XpG();e.R7$(7),e.Y8G("ngIf",null==(r=n.jobPlatformForm.get("code"))?null:r.hasError("required")),e.R7$(),e.Y8G("ngIf",null==(t=n.jobPlatformForm.get("code"))?null:t.hasError("maxlength"))}}function ea(a,p){if(1&a&&(e.j41(0,"div",20),e.EFF(1),e.k0s()),2&a){const r=e.XpG();e.R7$(),e.SpI(" ",r.errorMessage," ")}}let zt=(()=>{var a;class p{constructor(t,n,o,i,s,d,u,g){this.fb=t,this.encryptionService=n,this.dialogRef=o,this.data=i,this.toastr=s,this.httpService=d,this.config=u,this.recruitmentService=g,this.isEditMode=!1,this.selectedType="jobPlatform",this.positionRequisitionYears=[],this.selectedYearForRecruitment="",this.fromYear="",this.toYear="",this.taskFromDate=null,this.taskToDate=null,this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInUserRoleIsMD=!1,this.loggedInCompanyMDCode=null,this.loggedInCompanyReviewCycle=null,this.loading=!1,this.isSubmitting=!1}ngOnInit(){var t,n,o,i,s;this.initializeSessionData(),this.getPmsYearList(),this.isEditMode=!(null===(t=this.data)||void 0===t||!t.element),this.selectedType=null!==(n=this.data)&&void 0!==n&&null!==(n=n.element)&&void 0!==n&&n.jobPlatformCode?"firm":"jobPlatform",this.initForm((null===(o=this.data)||void 0===o?void 0:o.element)||{}),null===(i=this.jobPlatformForm.get("name"))||void 0===i||i.valueChanges.subscribe(()=>{this.errorMessage=null}),null===(s=this.jobPlatformForm.get("code"))||void 0===s||s.valueChanges.subscribe(()=>{this.errorMessage=null})}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName,this.loggedInUserRoleIsMD=this.loggedInUserRoles.some(o=>"MD"===o.displayName),console.log(this.loggedInUserRole,this.loggedInUserRoleIsMD),this.userName=sessionStorage.getItem("loggedInUserName")}getPmsYearList(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.positionRequisitionYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.positionRequisitionYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-"))}onYearChange(t){this.selectedYearForRecruitment=t,this.taskFromDate=null,this.taskToDate=null}initForm(t){this.jobPlatformForm=this.fb.group({name:[t.jobPlatformName||"",[y.k0.required,y.k0.maxLength(100)]],code:[t.jobPlatformCode||"","firm"===this.selectedType?[y.k0.required,y.k0.maxLength(50)]:[y.k0.maxLength(50)]]})}
1onSubmit(){if(this.jobPlatformForm.invalid)return this.jobPlatformForm.markAllAsTouched(),void this.toastr.error("Please fill all required fields.","Validation Error",{timeOut:3e3,progressBar:!0});this.isSubmitting=!0;const t={companyId:this.loggedInUserCompanyID,fiscalYear:this.selectedYearForRecruitment,jobPlatformName:this.jobPlatformForm.value.name,jobPlatformCode:"firm"===this.selectedType?this.jobPlatformForm.value.code:null,type:this.selectedType,childId:this.recruitmentService.getChildId(),id:this.isEditMode?this.data.element.jobPlatformId:void 0,...this.isEditMode?{}:{createdById:this.loggedInUserId}};console.log(t);const n=this.isEditMode?`${this.config.updateJobPlatform}/${t.id}`:this.config.addJobPlatform;(this.isEditMode?this.httpService.callPutService(n,t):this.httpService.callPostService(n,t)).subscribe({next:i=>{null!=i&&i.status?(this.toastr.success(this.isEditMode?"Updated successfully":"Added successfully","Success",{timeOut:3e3,progressBar:!0}),this.dialogRef.close(!0)):this.errorMessage=(null==i?void 0:i.message)||"Something went wrong.",this.isSubmitting=!1},error:i=>{console.error("Save error:",i),this.toastr.error("Operation failed","Error",{timeOut:3e3,progressBar:!0}),this.isSubmitting=!1}})}cancel(){this.dialogRef.close()}onTypeChange(){this.jobPlatformForm.patchValue({name:"",code:""}),this.updateCodeValidator()}updateCodeValidator(){const t=this.jobPlatformForm.get("code");"firm"===this.selectedType?null==t||t.setValidators([y.k0.required,y.k0.maxLength(50)]):(null==t||t.setValidators([y.k0.maxLength(50)]),null==t||t.setValue("")),null==t||t.updateValueAndValidity()}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(y.ok),e.rXU(S.L),e.rXU(b.CP),e.rXU(b.Vh),e.rXU(q.tw),e.rXU(c.k),e.rXU(_.T),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-add-edit-job-platform"]],decls:29,vars:10,consts:[[1,"form-container"],[1,"cardLayout"],["size","4"],[1,"formLabelSemiBoldfs16","mb-5",2,"margin","10px"],["size","8",1,"text-right"],["src","././assets/icon/close_icon.png","alt","Close","role","button","tabindex","0",1,"cp",3,"mat-dialog-close"],[1,"form-scroll-container",2,"padding","0rem !important"],[3,"ngSubmit","formGroup"],[1,"formLabelRegularfs16","mb-5"],[1,"red-cl"],["appearance","fill",1,"w-100","mat-height40","mat-input-style"],["matInput","","formControlName","name","placeholder","Enter Name"],[4,"ngIf"],["style","margin-top: 10px;",4,"ngIf"],[2,"margin-top","10px"],["class","error-text",4,"ngIf"],["size","12",1,"text-right","mt-10"],["type","button",1,"back_btn","fs-14",3,"click"],["type","submit",1,"add_btn","fs-14","ml-10",3,"disabled"],["matInput","","formControlName","code","placeholder","Enter Code"],[1,"error-text"]],template:function(t,n){if(1&t&&(e.j41(0,"div",0)(1,"div",1)(2,"ion-row")(3,"ion-col",2)(4,"div",3),e.EFF(5),e.k0s()(),e.j41(6,"ion-col",4),e.nrm(7,"img",5),e.k0s()(),e.j41(8,"div",6)(9,"form",7),e.bIt("ngSubmit",function(){return n.onSubmit()}),e.j41(10,"ion-grid")(11,"ion-row")(12,"label",8),e.EFF(13," Name "),e.j41(14,"span",9),e.EFF(15,"*"),e.k0s()(),e.j41(16,"mat-form-field",10),e.nrm(17,"input",11),e.DNE(18,Qs,2,0,"mat-error",12)(19,qs,2,0,"mat-error",12),e.k0s()(),e.DNE(20,Zs,9,2,"ion-row",13),e.nrm(21,"ion-row",14),e.DNE(22,ea,2,1,"div",15),e.j41(23,"ion-row")(24,"ion-col",16)(25,"button",17),e.bIt("click",function(){return n.cancel()}),e.EFF(26,"Cancel"),e.k0s(),e.j41(27,"button",18),e.EFF(28),e.k0s()()()()()()()()),2&t){let o,i;e.R7$(5),e.SpI(" ",n.isEditMode?"Edit Entry":"Add New Entry"," "),e.R7$(4),e.Y8G("formGroup",n.jobPlatformForm),e.R7$(9),e.Y8G("ngIf",null==(o=n.jobPlatformForm.get("name"))?null:o.hasError("required")),e.R7$(),e.Y8G("ngIf",null==(i=n.jobPlatformForm.get("name"))?null:i.hasError("maxlength")),e.R7$(),e.Y8G("ngIf","firm"===n.selectedType),e.R7$(2),e.Y8G("ngIf",n.errorMessage),e.R7$(5),e.xc7("background-color",n.buttonColorName),e.Y8G("disabled",n.isSubmitting),e.R7$(),e.SpI(" ",n.isEditMode?"Update":"Add"," ")}},dependencies:[K.bT,y.qT,y.me,y.BC,y.cb,J.hU,J.lO,J.ln,R.rl,R.TL,y.j4,y.JD,M.fg,b.tx],styles:[".cardLayout[_ngcontent-%COMP%]{padding:20px}.removeIcon[_ngcontent-%COMP%]{height:25px} .mat-mdc-dialog-container .mdc-dialog__surface{border-radius:18px!important}.add_btn.disabled[_ngcontent-%COMP%]{color:#302b2b;cursor:not-allowed;opacity:.6}.form-scroll-container[_ngcontent-%COMP%]{max-height:80vh;overflow-y:auto;padding:1rem}[_nghost-%COMP%] .mat-dialog-container{max-height:90vh;overflow-y:auto}.mb-5[_ngcontent-%COMP%]{margin-bottom:5px}.readonly-text[readonly][_ngcontent-%COMP%]{color:#1e1e1e!important;opacity:1!important;cursor:default;background-color:transparent!important}.readonly-field[_ngcontent-%COMP%]{border:.1px solid #ccc;padding:10px;border-radius:5px;height:40px}.error-text[_ngcontent-%COMP%]{color:#d32f2f;font-size:14px;margin-bottom:10px}"]}),p})();const ta=["columnChooserBtn"];function na(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",20),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.bulkDeleteDoc())}),e.j41(1,"span",21),e.EFF(2,"delete"),e.k0s(),e.EFF(3,"Bulk Delete "),e.k0s()}if(2&a){const r=e.XpG();e.Y8G("disabled",r.isAllCompanySelected||r.selectedYearForRecruitment!==r.currentFiscalYear)}}function oa(a,p){if(1&a&&(e.j41(0,"mat-option",22),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG();e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}function ia(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",23),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.addJobPlatform())}),e.j41(1,"span",21),e.EFF(2,"add"),e.k0s(),e.EFF(3,"Add Job Platform "),e.k0s()}if(2&a){const r=e.XpG();e.xc7("background-color",r.selectedYearForRecruitment===r.currentFiscalYear?r.buttonColorName:null),e.Y8G("disabled",r.isAllCompanySelected||r.selectedYearForRecruitment!==r.currentFiscalYear)}}let ra=(()=>{var a;class p{constructor(t,n,o,i,s,d,u,g){this.httpService=t,this.config=n,this.encryptionService=o,this.dataRefreshService=i,this.toastr=s,this.recruitmentService=d,this.dialog=u,this.sharedService=g,this.rowData=[],this.hasSelectableRows=!1,this.columnDefs=[],this.selectedRowCount=0,this.gridOptions={context:{componentParent:this},popupParent:document.querySelector("body"),pagination:!0,paginationPageSize:10,suppressCellFocus:!0,paginationPageSizeSelector:[5,10,25,50,75,100,200,500,1e3],rowSelection:"multiple",suppressRowClickSelection:!0,isRowSelectable:m=>{var l;return!(null===(l=m.data)||void 0===l||!l.jobPlatformId)},defaultColDef:{sortable:!0,filter:!0,resizable:!0,floatingFilter:!1,flex:1,headerClass:"centered-header"},onSelectionChanged:()=>{this.selectedRowCount=this.gridApi?this.gridApi.getSelectedRows().length:0},postProcessPopup:m=>{var l;if("columnChooser"!==m.type)return;const f=null===(l=this.columnChooserBtn)||void 0===l?void 0:l.nativeElement,h=m.ePopup;if(!f||!h)return;const v=f.getBoundingClientRect();h.style.top=`${v.bottom+window.scrollY+4}px`,h.style.left="auto",h.style.right=document.documentElement.clientWidth-v.right+"px"}},this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserEmpCode=null,this.intHODempCode=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInCompanyMDCode=null,this.loggedInUserRoleIsM
1D=!1,this.searchTerm="",this.pageSize=10,this.pageSizeOptions=[5,10,25,50,75,100,200,500,1e3],this.currentFiscalYear="",this.ratingYears=[],this.jobPlatformsList=[],this.isAllCompanySelected=!1}ngOnInit(){this.initSessionData(),this.initColumnDefs(),this.getPMSYearListAndInitialize(),this.dataRefreshService.refreshNeeded$.pipe((0,vt.i)(1)).subscribe(()=>{this.getPMSYearListAndInitialize()}),this.isAllCompanySelected=null===this.recruitmentService.getChildId(),this.recruitmentService.selectedChildId$.subscribe(t=>{this.isAllCompanySelected=null===t})}initColumnDefs(){const t=this.loggedInUserRoleIsMD;this.columnDefs=[{headerName:"select",checkboxSelection:n=>{var o;return!(null===(o=n.data)||void 0===o||!o.jobPlatformId)},headerCheckboxSelection:!t,width:50,minWidth:50,maxWidth:50,hide:t,pinned:"left",sortable:!1,filter:!1},{field:"jobPlatformName",headerName:"Name",minWidth:200,tooltipField:"jobPlatformName"},{field:"jobPlatformType",headerName:"Type",minWidth:150,tooltipField:"jobPlatformType"},{headerName:"Actions",minWidth:120,maxWidth:130,hide:t,sortable:!1,filter:!1,cellRenderer:n=>{var o;if(!n.data.jobPlatformId)return"";const i=null===(o=n.context)||void 0===o?void 0:o.componentParent,d=(null==i?void 0:i.isAllCompanySelected)||(null==i?void 0:i.selectedYearForRecruitment)!==(null==i?void 0:i.currentFiscalYear)?"opacity:0.4;pointer-events:none;":"";return`\n <span class="material-icons" data-action="edit" style="color:#3f51b5;cursor:pointer;margin-right:10px;font-size:20px;vertical-align:middle;${d}" title="Edit">edit</span>\n <span class="material-icons" data-action="delete" style="color:#f44336;cursor:pointer;font-size:20px;vertical-align:middle;${d}" title="Delete">delete</span>\n `},onCellClicked:n=>{var o;const i=n.event.target,s=i.getAttribute("data-action")||(null===(o=i.closest("[data-action]"))||void 0===o?void 0:o.getAttribute("data-action"));"edit"===s&&this.editJobPlatform(n.data),"delete"===s&&this.deleteJobPlatform(n.data)}}]}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}onGridReady(t){this.gridApi=t.api}resetGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.deselectAll(),this.gridApi.refreshCells()),this.selectedRowCount=0,this.fetchJobPlatforms()}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}initSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null};this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserEmpCode=sessionStorage.getItem("empCode"),this.intHODempCode=this.loggedInUserEmpCode,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyMDCode=sessionStorage.getItem("loggedInCompanyMDCode"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName,this.loggedInUserRoleIsMD=this.loggedInUserRoles.some(o=>"MD"===o.displayName)}getPMSYearListAndInitialize(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.ratingYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear),d=`${i}-${s}`;this.currentFiscalYear=d,this.setSelectedYear(d)})}setSelectedYear(t){const n=this.ratingYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,[this.fromYear,this.toYear]=n.year.split("-"),this.fetchJobPlatforms())}onYearChange(t){this.taskFromDate=null,this.taskToDate=null,this.setSelectedYear(t)}fetchJobPlatforms(){const n=this.recruitmentService.appendChildId(`${this.config.getJobPlatforms}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}`);this.httpService.callGetService(n).subscribe({next:o=>{let i=o||[];
1i=i.filter(s=>!s.isDeleted).map(s=>({...s,jobPlatformType:s.jobPlatformCode?"Firm":"Job Platform"})),this.jobPlatformsList=i,this.rowData=[...i],this.hasSelectableRows=i.some(s=>!!s.jobPlatformId)},error:o=>{console.error("Error fetching Job Platforms:",o),this.toastr.error("Failed to fetch Job Platforms.","Error")}})}filterData(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}hasSelectedRatingRows(){return this.selectedRowCount>0}addJobPlatform(){const t=new b.ru;t.disableClose=!0,t.width="60%",t.height="70%",t.panelClass="custom-dialog-container",t.data={},this.dialog.open(zt,t).afterClosed().subscribe(o=>{o&&this.fetchJobPlatforms()})}editJobPlatform(t){const n=new b.ru;n.disableClose=!0,n.width="60%",n.height="70%",n.panelClass="custom-dialog-container",n.data={element:t},this.dialog.open(zt,n).afterClosed().subscribe(i=>{i&&this.fetchJobPlatforms()})}deleteJobPlatform(t){this.dialog.open(le.$,{disableClose:!0,width:"30%",height:"25%",data:{msg:"Are you sure you want to delete this Job Platform/Firm?",btn1:"Cancel",btn2:"Yes",btn2BgColor:this.buttonColorName}}).afterClosed().subscribe(o=>{if(!o)return;const s=this.recruitmentService.appendChildId(`${this.config.softDeleteJobPlatform}?id=${t.jobPlatformId}&deletedBy=${this.loggedInUserId}`);this.httpService.callPutService(s,{}).subscribe({next:()=>{this.toastr.success("Deleted successfully.","Success"),this.fetchJobPlatforms()},error:d=>{console.error("Error deleting Job Platform:",d),this.toastr.error("Failed to delete.","Error")}})})}bulkDeleteDoc(){const n=(this.gridApi?this.gridApi.getSelectedRows().filter(i=>i.jobPlatformId):[]).map(i=>i.jobPlatformId);0!==n.length&&this.dialog.open(le.$,{disableClose:!0,height:"25%",width:"30%",data:{msg:"Are you sure you want to delete selected Job Platform(s)?",btn1:"Cancel",btn2:"Yes",btn2BgColor:this.buttonColorName}}).afterClosed().subscribe(i=>{if(!i)return;const s=n.join(","),u=this.recruitmentService.appendChildId(`${this.config.softBulkDeleteJobPlatform}?ids=${s}&deletedBy=${this.loggedInUserId}`),g={deletedBy:this.loggedInUserId,updatedAt:(new Date).toISOString()};this.httpService.callPutService(u,g).subscribe({next:()=>{this.toastr.success("Selected documents deleted successfully.","Success"),this.selectedRowCount=0,this.fetchJobPlatforms()},error:m=>{var l;this.toastr.error((null==m||null===(l=m.error)||void 0===l?void 0:l.message)||"Failed to delete selected documents.","Error")}})})}download(){if(!this.gridApi)return;const t=[],n=this.gridApi.paginationGetPageSize(),i=this.gridApi.paginationGetCurrentPage()*n,s=i+n;if(this.gridApi.forEachNodeAfterFilterAndSort((f,h)=>{h>=i&&h<s&&t.push(f.data)}),!t.length)return void this.toastr.info("No data available to download for the current page.","Info");const d=t.map(f=>{var h;return{Code:null!==(h=f.jobPlatformCode)&&void 0!==h?h:"-",Name:f.jobPlatformName,Type:f.jobPlatformCode?"Firm":"Job Platform"}}),u=F.utils.json_to_sheet(d);u["!cols"]=Object.keys(d[0]).map(f=>({wch:Math.max(f.length,...d.map(h=>String(h[f]).length))+2}));const m=F.write({Sheets:{"Job Platforms":u},SheetNames:["Job Platforms"]},{bookType:"xlsx",type:"array"}),l=new Blob([m],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"});U.saveAs(l,"Job_Platforms.xlsx")}downloadVisibleColumns(){if(!this.gridApi)return;const t=this.gridApi.getAllDisplayedColumns().map(l=>l.getColDef()).filter(l=>l.headerName&&l.field&&"Actions"!==l.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=[];this.gridApi.forEachNodeAfterFilterAndSort(l=>i.push(l.data));const s=i.slice(n*o,(n+1)*o);if(!s.length)return void this.toastr.info("No data to download for this page.","Info");const d=s.map(l=>{const f={};for(const h of t){let v;if("function"==typeof h.valueGetter)try{v=h.valueGetter({data:l})}catch{v=l[h.field]}else v=l[h.field];null==v?v="":"object"==typeof v&&(v=Object.values(v).join(", ")),f[h.headerName]=String(v)}return f}),g={Sheets:{Data:F.utils.json_to_sheet(d)},SheetNames:["Data"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Export_Visible_Page_${n+1}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU(C.N),e.rXU(q.tw),e.rXU(I.W),e.rXU(b.bZ),e.rXU($.d))}
1,a.\u0275cmp=e.VBU({type:a,selectors:[["app-job-platform"]],viewQuery:function(t,n){if(1&t&&e.GBs(ta,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},decls:24,vars:12,consts:[["columnChooserBtn",""],[1,"container","mb-20","mt-20"],[1,"cardBox","mb-20"],[1,"filter-bar","mb-10"],["size","auto",1,"ml-10","mt-20"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],["mat-raised-button","","color","warn","class","ml-10",3,"disabled","click",4,"ngIf"],[1,"d-flex","align-center","justify-content-flex-end","mt-20"],[1,"mat-height40","mat-input-style","small-field","mr-10"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["class","add_btn fs-14 float-right center-content mr-10",3,"background-color","disabled","click",4,"ngIf"],[1,"icon-download","material-icons","mr-10",3,"click"],[1,"icon-refresh","material-icons","mr-10",3,"click"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5","mr-10",3,"click"],[1,"material-icons"],[1,"m-20","setup-grid-wrapper"],[1,"ag-theme-quartz","setup-grid-container",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],["mat-raised-button","","color","warn",1,"ml-10",3,"click","disabled"],[1,"material-icons","fs-20","mr-5"],[3,"value"],[1,"add_btn","fs-14","float-right","center-content","mr-10",3,"click","disabled"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"ion-row",3)(3,"ion-col",4)(4,"mat-form-field",5)(5,"mat-icon",6),e.EFF(6,"search"),e.k0s(),e.j41(7,"input",7),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.filterData())}),e.k0s()(),e.DNE(8,na,4,1,"button",8),e.k0s(),e.j41(9,"ion-col",9)(10,"mat-form-field",10)(11,"mat-select",11),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.selectedYearForRecruitment,s)||(n.selectedYearForRecruitment=s),e.Njj(s)}),e.bIt("selectionChange",function(s){return e.eBV(o),e.Njj(n.onYearChange(s.value))}),e.DNE(12,oa,2,2,"mat-option",12),e.k0s()(),e.DNE(13,ia,4,3,"button",13),e.j41(14,"span",14),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(15,"download"),e.k0s(),e.j41(16,"span",15),e.bIt("click",function(){return e.eBV(o),e.Njj(n.resetGrid())}),e.EFF(17,"refresh"),e.k0s(),e.j41(18,"button",16,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(20,"span",17),e.EFF(21,"tune"),e.k0s()()()(),e.j41(22,"div",18)(23,"ag-grid-angular",19),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))}),e.k0s()()()()}2&t&&(e.R7$(7),e.R50("ngModel",n.searchTerm),e.R7$(),e.Y8G("ngIf",n.hasSelectedRatingRows()&&!n.loggedInUserRoleIsMD),e.R7$(3),e.R50("ngModel",n.selectedYearForRecruitment),e.R7$(),e.Y8G("ngForOf",n.ratingYears),e.R7$(),e.Y8G("ngIf",!n.loggedInUserRoleIsMD),e.R7$(5),e.xc7("background-color",n.buttonColorName),e.R7$(5),e.AVh("disable-select-all",!n.hasSelectableRows),e.Y8G("rowData",n.rowData)("columnDefs",n.columnDefs)("gridOptions",n.gridOptions))},dependencies:[K.Sq,K.bT,y.me,y.BC,y.vS,J.hU,J.ln,R.rl,R.JW,he.VO,pe.wT,M.fg,x.An,Ae.$z,G.xs],styles:['.container[_ngcontent-%COMP%]{--background: #f6f5fb;padding:0 15px}.cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.cardBoxHeading[_ngcontent-%COMP%]{background-color:#ddd;padding:5px;color:#000;border-radius:10px 10px 0 0}.table-container[_ngcontent-%COMP%]{width:100%;overflow-y:auto;overflow-x:auto;max-height:500px}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid #ddd;padding:4px;text-align:left;font-size:14px}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f2f2f2;font-family:OpenSans-SemiBold}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background-color:#fff;font-family:OpenSans-Regular}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .link-primary[_ngcontent-%COMP%]{color:#007bff;text-decoration:underline;cursor:pointer}.mat-height40[_ngcontent-%COMP%]{height:40px!important}.w70px[_ngcontent-%COMP%]{width:70px}.icon-download[_ngcontent-%COMP%], .icon-refresh[_ngcontent-%COMP%]{border:1px solid #f3820e;color:#f3820e;padding:9px;border-radius:6px;background-color:#fff;height:40px;width:40px;font-size:22px;
1cursor:pointer;display:flex;align-items:center;justify-content:center}.setup-grid-wrapper[_ngcontent-%COMP%]{height:auto;border:1px solid #e2e2e2;border-radius:8px;overflow:hidden}.setup-grid-container[_ngcontent-%COMP%]{width:100%;font-family:OpenSans-Regular,sans-serif}[_nghost-%COMP%] .ag-theme-quartz.disable-select-all .ag-header-select-all{pointer-events:none;opacity:.4}[_nghost-%COMP%] .ag-theme-quartz{--ag-header-background-color: #dddddd;--ag-header-foreground-color: #000;--ag-row-hover-color: #f8fafc;--ag-selected-row-background-color: #f1f5f9;--ag-font-size: 13px;--ag-font-family: "OpenSans-Regular", sans-serif;--ag-border-color: #e2e8f0;--ag-row-border-style: solid;--ag-row-border-width: 1px;--ag-row-border-color: #e2e8f0;border:1px solid #e2e8f0;border-radius:8px}[_nghost-%COMP%] .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell{display:flex;align-items:center;justify-content:center;padding-left:12px!important;padding-right:12px!important;border-right:1px solid #e2e8f0!important;border-bottom:1px solid #e2e8f0!important}.cp[_ngcontent-%COMP%]{cursor:pointer;margin-right:8px;color:#333}.header-cell[_ngcontent-%COMP%]{background-color:#ddd!important;font-weight:700!important}']}),p})();var Vt=Y(56784);let sa=(()=>{var a;class p{constructor(){this.htmlContent="",this.config={height:430,width:910,toolbarSticky:!1,toolbarAdaptive:!1,askBeforePasteHTML:!0,askBeforePasteFromWord:!0,defaultActionOnPaste:"insert_as_html",language:"en",i18n:{en:{"Paste as HTML":"Paste","Your code is similar to HTML. Keep as HTML?":" Do you want to keep this content as it is ?"}},uploader:{insertImageAsBase64URI:!0},buttons:["bold","italic","underline","|","ul","ol","|","left","center","right","justify","|","preview","|","undo","redo","|","fontsize"]}}ngOnInit(){}onSave(){const t=this.htmlContent.replace(/<[^>]*>/g,"").replace(/ /g,"").trim();console.log(t),t.length>0?(console.log("Shared Message:",this.htmlContent),alert("Message saved & shared successfully!")):alert("Please write a message before saving.")}}return(a=p).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=e.VBU({type:a,selectors:[["app-mailtemplate"]],decls:17,vars:3,consts:[[1,"cardBox"],[1,"filter-bar","mb-10"],[1,"ml-20","mt-20"],[1,"header"],["size","auto",1,"d-flex","align-center","justify-content-flex-end","gap-10","mt-20"],["src","./assets/icon/close_icon.png","alt","Close","role","button","tabindex","0",1,"cp",2,"height","24px","padding-left","5px","padding-right","10px","align-self","center",3,"mat-dialog-close"],[2,"margin","20px"],[3,"ngModelChange","ngModel","config"],[1,"html-header","mt-20"],[1,"html-preview",3,"innerHTML"],[1,"mt-20"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,n){1&t&&(e.j41(0,"div",0)(1,"ion-row",1)(2,"ion-col",2)(3,"header",3)(4,"h1"),e.EFF(5,"AngularEditor"),e.k0s()()(),e.j41(6,"ion-col",4),e.nrm(7,"img",5),e.k0s()(),e.j41(8,"ion-row")(9,"div",6)(10,"jodit-editor",7),e.mxI("ngModelChange",function(i){return e.DH7(n.htmlContent,i)||(n.htmlContent=i),i}),e.k0s(),e.j41(11,"h5",8),e.EFF(12,"HTML Output"),e.k0s(),e.nrm(13,"div",9),e.j41(14,"div",10)(15,"button",11),e.bIt("click",function(){return n.onSave()}),e.EFF(16," Save & Share "),e.k0s()()()()()),2&t&&(e.R7$(10),e.R50("ngModel",n.htmlContent),e.Y8G("config",n.config),e.R7$(3),e.Y8G("innerHTML",n.htmlContent,e.npT))},dependencies:[y.BC,y.vS,J.hU,J.ln,b.tx,Ae.$z,Vt.Y],styles:[".cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}"]}),p})();function aa(a,p){if(1&a){const r=e.RV6();e.j41(0,"ion-col",1)(1,"div",2)(2,"div",3),e.EFF(3),e.k0s(),e.j41(4,"div"),e.nrm(5,"img",4),e.k0s(),e.j41(6,"button",5),e.bIt("click",function(){const n=e.eBV(r).$implicit,o=e.XpG();return e.Njj(o.onClickOpenRecruitmentMail(n))}),e.EFF(7," + Create "),e.k0s()()()}if(2&a){const r=p.$implicit,t=e.XpG();e.R7$(3),e.JRh(r.label),e.R7$(2),e.Y8G("alt",r.key),e.R7$(),e.xc7("background-color",t.buttonColorName)}}let la=(()=>{var a;class p{constructor(t,n){this.encryptionService=t,this.dialog=n,this.buttonColorName=null,this.subModuleButtonColor=null,this.recruitmentMails=[{label:"Application Invite Mail to Employee",key:"application-invite"},{label:"Intimation Mail to HR",key:"intimation-hr"},{label:"Offer Letter Mail",key:"offer-letter"},{label:"Appointment Letter Mail",key:"appointment-letter"},{label:"Interview Schedule Mail",key:"interview-schedule"},{label:"Interview Feedback Mail",key:"interview-feedback"},{label:"Shortlisted Candidate Mail",key:"shortlisted"},{label:"Rejected Candidate Mail",key:"rejected"},{label:"Onboarding Instructions Mail",key:"onboarding-instructions"},{label:"Probation Confirmation Mail",key:"probation-confirmation"},{label:"Training Invite Mail",key:"training-invite"}
1,{label:"Background Verification Mail",key:"background-verification"},{label:"Joining Reminder Mail",key:"joining-reminder"},{label:"Document Submission Mail",key:"document-submission"},{label:"Acknowledgement of Application Mail",key:"application-acknowledgement"},{label:"Welcome Mail",key:"welcome"},{label:"Salary Discussion Mail",key:"salary-discussion"},{label:"Exit/Relieving Confirmation Mail",key:"exit-relieving"}]}ngOnInit(){this.initSessionData()}initSessionData(){this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor"),sessionStorage.getItem("loggedInUserCompanyID")}onClickOpenRecruitmentMail(t){console.log("Opening recruitment mail template:",t.key);const n=new b.ru;n.height="70%",n.width="70%",n.disableClose=!0,n.data={popupName:`Create Email Body for ${t.label}`,key:t.key},n.panelClass="custom-dialog-container",this.dialog.open(sa,n).afterClosed().subscribe(i=>{i&&console.log("Dialog closed with result:",i)})}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(S.L),e.rXU(b.bZ))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-mails"]],decls:2,vars:1,consts:[["size-sm","12","size-md","3","size-lg","3","size-xs","12",4,"ngFor","ngForOf"],["size-sm","12","size-md","3","size-lg","3","size-xs","12"],[1,"content-box","mt-20"],[1,"fs-14","font_semibold","mt-20"],["src","././assets/icon/mail_Icon.svg",1,"w50",3,"alt"],[1,"recruitment_Btn","fs-14",3,"click"]],template:function(t,n){1&t&&(e.j41(0,"ion-row"),e.DNE(1,aa,8,4,"ion-col",0),e.k0s()),2&t&&(e.R7$(),e.Y8G("ngForOf",n.recruitmentMails))},dependencies:[K.Sq,J.hU,J.ln],styles:[".content-box[_ngcontent-%COMP%]{border:1px solid #EAEAEA;text-align:center;padding:10px;width:100%;border-radius:6px;height:200px;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;background-color:#fff;box-shadow:0 2px 6px #0000000d;transition:all .3s ease}.content-box[_ngcontent-%COMP%]:hover{box-shadow:0 4px 12px #0000001f;transform:translateY(-2px)}.content-box[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:40px;height:40px;margin:15px 0}.content-box[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{color:#fff;padding:8px 20px;border-radius:6px;height:38px;font-family:OpenSans-SemiBold;border:none;cursor:pointer;transition:background-color .2s ease-in-out}.content-box[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background-color:#e58310}.content-box[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{background-color:#d3d3d3;opacity:.6;cursor:not-allowed}.fs-14[_ngcontent-%COMP%]{font-size:14px}.font_semibold[_ngcontent-%COMP%]{font-weight:600}.mt-20[_ngcontent-%COMP%]{margin-top:20px}"]}),p})();var da=Y(58863),ca=Y(1807);function ua(a,p){1&a&&(e.j41(0,"span",35),e.EFF(1,"check"),e.k0s())}function pa(a,p){if(1&a&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&a){const r=e.XpG().index;e.R7$(),e.JRh(r+1)}}function ga(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",28),e.bIt("click",function(){const n=e.eBV(r).index,o=e.XpG();return e.Njj(o.goToStep(n))}),e.j41(1,"div",29),e.DNE(2,ua,2,0,"span",30)(3,pa,2,1,"span",31),e.k0s(),e.j41(4,"div",32)(5,"span",33),e.EFF(6),e.k0s(),e.j41(7,"span",34),e.EFF(8),e.k0s()()()}if(2&a){const r=p.$implicit,t=p.index,n=e.XpG();e.AVh("active",t===n.currentStep)("completed","completed"===n.getStepStatus(t))("clickable",t<=n.currentStep||"completed"===n.getStepStatus(t)),e.R7$(),e.xc7("background",t<=n.currentStep?n.buttonColorName:"")("border-color",t<=n.currentStep?n.buttonColorName:""),e.R7$(),e.Y8G("ngIf","completed"===n.getStepStatus(t)),e.R7$(),e.Y8G("ngIf","completed"!==n.getStepStatus(t)),e.R7$(3),e.JRh(r.label),e.R7$(2),e.JRh(r.description)}}function ma(a,p){if(1&a&&(e.j41(0,"mat-option",53),e.EFF(1),e.k0s()),2&a){const r=p.$implicit;e.Y8G("value",r.name),e.R7$(),e.SpI(" ",r.name," ")}}function ha(a,p){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&a){const r=e.XpG(2);e.R7$(),e.SpI(" ",r.getErrorMessage("basicDetails","consultantName")," ")}}function fa(a,p){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&a){const r=e.XpG(2);
1e.R7$(),e.SpI(" ",r.getErrorMessage("basicDetails","consultantId")," ")}}function va(a,p){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&a){const r=e.XpG(2);e.R7$(),e.SpI(" ",r.getErrorMessage("basicDetails","consultantDescription")," ")}}function ba(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",36)(1,"div",37)(2,"span",35),e.EFF(3,"business"),e.k0s(),e.j41(4,"span"),e.EFF(5,"Consultant Identity"),e.k0s()(),e.j41(6,"ion-grid")(7,"ion-row")(8,"ion-col",38)(9,"label",39),e.EFF(10," Consultant Name "),e.j41(11,"span",40),e.EFF(12,"*"),e.k0s()(),e.j41(13,"mat-form-field",41)(14,"mat-select",42),e.bIt("openedChange",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onConsultantNameSelectOpened(n))})("selectionChange",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onConsultantSelect(n))}),e.j41(15,"div",43),e.bIt("click",function(n){return e.eBV(r),e.Njj(n.stopPropagation())}),e.nrm(16,"input",44,0),e.k0s(),e.DNE(18,ma,2,2,"mat-option",45),e.k0s(),e.DNE(19,ha,2,1,"mat-error",31),e.k0s()(),e.j41(20,"ion-col",38)(21,"label",39),e.EFF(22," Consultant ID "),e.j41(23,"span",40),e.EFF(24,"*"),e.k0s()(),e.j41(25,"mat-form-field",41),e.nrm(26,"input",46),e.DNE(27,fa,2,1,"mat-error",31),e.k0s()()(),e.j41(28,"ion-row",47)(29,"ion-col",48)(30,"label",39),e.EFF(31," Description "),e.j41(32,"span",49),e.EFF(33,"(Optional)"),e.k0s()(),e.j41(34,"mat-form-field",50),e.nrm(35,"textarea",51),e.j41(36,"mat-hint",52),e.EFF(37),e.k0s(),e.DNE(38,va,2,1,"mat-error",31),e.k0s()()()()()}if(2&a){let r;const t=e.XpG();e.R7$(2),e.xc7("color",t.buttonColorName),e.R7$(14),e.Y8G("formControl",t.consultantNameSearchCtrl),e.R7$(2),e.Y8G("ngForOf",t.filteredConsultantNames)("ngForTrackBy",t.trackById),e.R7$(),e.Y8G("ngIf",t.hasError("basicDetails","consultantName")),e.R7$(8),e.Y8G("ngIf",t.hasError("basicDetails","consultantId")),e.R7$(10),e.SpI("",(null==(r=t.basicDetailsGroup.get("consultantDescription"))||null==r.value?null:r.value.length)||0,"/500"),e.R7$(),e.Y8G("ngIf",t.hasError("basicDetails","consultantDescription"))}}function _a(a,p){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&a){const r=e.XpG(2);e.R7$(),e.SpI(" ",r.getErrorMessage("contactDetails","spocName")," ")}}function Ca(a,p){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&a){const r=e.XpG(2);e.R7$(),e.SpI(" ",r.getErrorMessage("contactDetails","spocDesignation")," ")}}
1function ya(a,p){1&a&&(e.j41(0,"mat-icon",62),e.nrm(1,"ion-spinner",63),e.k0s())}function Ia(a,p){1&a&&(e.j41(0,"mat-icon",64),e.EFF(1,"check_circle"),e.k0s())}function Sa(a,p){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&a){const r=e.XpG(2);e.R7$(),e.SpI(" ",r.getErrorMessage("contactDetails","officialEmail")," ")}}function wa(a,p){1&a&&(e.j41(0,"div",65)(1,"span",66),e.EFF(2,"Checking availability..."),e.k0s()())}function xa(a,p){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&a){const r=e.XpG(2);e.R7$(),e.SpI(" ",r.getErrorMessage("contactDetails","contactNumber")," ")}}function Ra(a,p){if(1&a){const r=e.RV6();e.j41(0,"div",54)(1,"div",37)(2,"span",35),e.EFF(3,"contacts"),e.k0s(),e.j41(4,"span"),e.EFF(5,"SPOC & Communication"),e.k0s()(),e.j41(6,"ion-grid")(7,"ion-row")(8,"ion-col",38)(9,"label",39),e.EFF(10," SPOC Name "),e.j41(11,"span",40),e.EFF(12,"*"),e.k0s()(),e.j41(13,"mat-form-field",41),e.nrm(14,"input",55),e.DNE(15,_a,2,1,"mat-error",31),e.k0s()(),e.j41(16,"ion-col",38)(17,"label",39),e.EFF(18," SPOC Designation "),e.j41(19,"span",40),e.EFF(20,"*"),e.k0s()(),e.j41(21,"mat-form-field",41),e.nrm(22,"input",56),e.DNE(23,Ca,2,1,"mat-error",31),e.k0s()()(),e.j41(24,"ion-row",47)(25,"ion-col",38)(26,"label",39),e.EFF(27," Official Email "),e.j41(28,"span",40),e.EFF(29,"*"),e.k0s()(),e.j41(30,"mat-form-field",41),e.nrm(31,"input",57),e.DNE(32,ya,2,0,"mat-icon",58)(33,Ia,2,0,"mat-icon",59)(34,Sa,2,1,"mat-error",31),e.k0s(),e.DNE(35,wa,3,0,"div",60),e.k0s(),e.j41(36,"ion-col",38)(37,"label",39),e.EFF(38," Contact Number "),e.j41(39,"span",40),e.EFF(40,"*"),e.k0s()(),e.j41(41,"mat-form-field",41)(42,"input",61),e.bIt("keypress",function(n){e.eBV(r);const o=e.XpG();return e.Njj(o.onlyNumberKey(n))}),e.k0s(),e.DNE(43,xa,2,1,"mat-error",31),e.k0s()()()()()}if(2&a){const r=e.XpG();e.R7$(2),e.xc7("color",r.buttonColorName),e.R7$(13),e.Y8G("ngIf",r.hasError("contactDetails","spocName")),e.R7$(8),e.Y8G("ngIf",r.hasError("contactDetails","spocDesignation")),e.R7$(9),e.Y8G("ngIf",r.isEmailPending),e.R7$(),e.Y8G("ngIf",!r.isEmailPending&&r.emailControl.valid&&r.emailControl.value),e.R7$(),e.Y8G("ngIf",r.hasError("contactDetails","officialEmail")),e.R7$(),e.Y8G("ngIf",r.isEmailPending),e.R7$(8),e.Y8G("ngIf",r.hasError("contactDetails","contactNumber"))}}function ja(a,p){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&a){const r=e.XpG(2);e.R7$(),e.SpI(" ",r.getErrorMessage("commercialDetails","contractType")," ")}}function Da(a,p){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&a){const r=e.XpG(2);e.R7$(),e.SpI(" ",r.getErrorMessage("commercialDetails","feePercentage")," ")}}function ka(a,p){if(1&a&&(e.j41(0,"mat-option",53),e.EFF(1),e.k0s()),2&a){const r=p.$implicit;e.Y8G("value",r.value),e.R7$(),e.SpI(" ",r.label," ")}}function Pa(a,p){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&a){const r=e.XpG(2);e.R7$(),e.SpI(" ",r.getErrorMessage("commercialDetails","paymentTerms")," ")}}function Fa(a,p){if(1&a&&(e.j41(0,"div",73)(1,"label",39),e.EFF(2,"Fee Preview"),e.k0s(),e.j41(3,"div",74),e.nrm(4,"div",75),e.k0s(),e.j41(5,"span",76),e.EFF(6),e.k0s()()),2&a){let r,t;const n=e.XpG(2);e.R7$(4),e.xc7("width",((null==(r=n.commercialDetailsGroup.get("feePercentage"))?null:r.value)||0)+"%")("background",n.buttonColorName),e.R7$(),e.xc7("color",n.buttonColorName),e.R7$(),e.SpI("",(null==(t=n.commercialDetailsGroup.get("feePercentage"))?null:t.value)||0,"%")}}
1function Ma(a,p){if(1&a&&(e.j41(0,"div",67)(1,"div",37)(2,"span",35),e.EFF(3,"payments"),e.k0s(),e.j41(4,"span"),e.EFF(5,"Contract & Billing"),e.k0s()(),e.j41(6,"ion-grid")(7,"ion-row")(8,"ion-col",38)(9,"label",39),e.EFF(10," Contract Type "),e.j41(11,"span",40),e.EFF(12,"*"),e.k0s()(),e.j41(13,"mat-form-field",41),e.nrm(14,"input",68),e.DNE(15,ja,2,1,"mat-error",31),e.k0s()(),e.j41(16,"ion-col",38)(17,"label",39),e.EFF(18," Fee Percentage (%) "),e.j41(19,"span",40),e.EFF(20,"*"),e.k0s()(),e.j41(21,"mat-form-field",41),e.nrm(22,"input",69),e.DNE(23,Da,2,1,"mat-error",31),e.k0s()()(),e.j41(24,"ion-row",47)(25,"ion-col",38)(26,"label",39),e.EFF(27," Payment Terms "),e.j41(28,"span",40),e.EFF(29,"*"),e.k0s()(),e.j41(30,"mat-form-field",41)(31,"mat-select",70),e.DNE(32,ka,2,2,"mat-option",45),e.k0s(),e.DNE(33,Pa,2,1,"mat-error",31),e.k0s()(),e.j41(34,"ion-col",71),e.DNE(35,Fa,7,7,"div",72),e.k0s()()()()),2&a){let r;const t=e.XpG();e.R7$(2),e.xc7("color",t.buttonColorName),e.R7$(13),e.Y8G("ngIf",t.hasError("commercialDetails","contractType")),e.R7$(8),e.Y8G("ngIf",t.hasError("commercialDetails","feePercentage")),e.R7$(9),e.Y8G("ngForOf",t.dropdownData.paymentTermsOptions)("ngForTrackBy",t.trackById),e.R7$(),e.Y8G("ngIf",t.hasError("commercialDetails","paymentTerms")),e.R7$(2),e.Y8G("ngIf",null!==(null==(r=t.commercialDetailsGroup.get("feePercentage"))?null:r.value))}}function Ea(a,p){if(1&a&&(e.j41(0,"mat-option",53),e.EFF(1),e.k0s()),2&a){const r=p.$implicit;e.Y8G("value",r),e.R7$(),e.SpI(" ",r," ")}}function Oa(a,p){if(1&a&&(e.j41(0,"span",83),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG(3);e.xc7("background",t.buttonColorName),e.R7$(),e.SpI(" ",r," ")}}function Ta(a,p){if(1&a&&(e.j41(0,"div",81),e.DNE(1,Oa,2,3,"span",82),e.k0s()),2&a){let r;const t=e.XpG(2);e.R7$(),e.Y8G("ngForOf",null==(r=t.classificationTagsGroup.get("industryExpertise"))?null:r.value)("ngForTrackBy",t.trackByIndex)}}
1function Aa(a,p){if(1&a&&(e.j41(0,"div",77)(1,"div",37)(2,"span",35),e.EFF(3,"label"),e.k0s(),e.j41(4,"span"),e.EFF(5,"Industry & Role Tags"),e.k0s()(),e.j41(6,"ion-grid")(7,"ion-row")(8,"ion-col",48)(9,"label",39),e.EFF(10," Industry Expertise "),e.j41(11,"span",49),e.EFF(12,"(Multi-select)"),e.k0s()(),e.j41(13,"mat-form-field",41)(14,"mat-select",78),e.DNE(15,Ea,2,2,"mat-option",45),e.k0s()(),e.DNE(16,Ta,2,2,"div",79),e.k0s()(),e.j41(17,"ion-row",47)(18,"ion-col",48)(19,"label",39),e.EFF(20," Role Specialization "),e.j41(21,"span",49),e.EFF(22,"(Optional)"),e.k0s()(),e.j41(23,"mat-form-field",41),e.nrm(24,"input",80),e.k0s()()()()()),2&a){let r;const t=e.XpG();e.R7$(2),e.xc7("color",t.buttonColorName),e.R7$(13),e.Y8G("ngForOf",t.dropdownData.industryExpertise)("ngForTrackBy",t.trackByIndex),e.R7$(),e.Y8G("ngIf",(null==(r=t.classificationTagsGroup.get("industryExpertise"))||null==r.value?null:r.value.length)>0)}}function Na(a,p){if(1&a&&(e.j41(0,"div",84)(1,"span",35),e.EFF(2,"error_outline"),e.k0s(),e.EFF(3),e.k0s()),2&a){const r=e.XpG();e.R7$(3),e.SpI(" ",r.errorMessage," ")}}function $a(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",85),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.prevStep())}),e.j41(1,"span",86),e.EFF(2,"arrow_back"),e.k0s(),e.EFF(3," Previous "),e.k0s()}}function Ua(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",87),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.nextStep())}),e.EFF(1," Next "),e.j41(2,"span",86),e.EFF(3,"arrow_forward"),e.k0s()()}if(2&a){const r=e.XpG();e.xc7("background-color",r.buttonColorName)}}function Ba(a,p){1&a&&e.nrm(0,"ion-spinner",90)}function Ga(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",88),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.onSubmit())}),e.DNE(1,Ba,1,0,"ion-spinner",89),e.EFF(2),e.k0s()}if(2&a){const r=e.XpG();e.xc7("background-color",r.buttonColorName),e.Y8G("disabled",!r.isFormValid||r.isFormPending),e.R7$(),e.Y8G("ngIf",r.isSubmitting),e.R7$(),e.SpI(" ",r.isEditMode?"Update":"Submit"," ")}}const Ya={consultantId:{required:"Consultant ID is required",pattern:"Only alphanumeric characters allowed"},consultantName:{required:"Consultant Name is required"},consultantDescription:{maxlength:"Maximum 500 characters allowed"},spocName:{required:"SPOC Name is required",maxlength:"Maximum 100 characters allowed"},spocDesignation:{required:"SPOC Designation is required",maxlength:"Maximum 100 characters allowed"},officialEmail:{required:"Email is required",email:"Enter a valid email address",emailTaken:"This email is already registered"},contactNumber:{required:"Contact number is required",pattern:"Must be exactly 10 digits"},contractType:{required:"Contract type is required"},feePercentage:{required:"Fee percentage is required",min:"Minimum value is 0",max:"Maximum value is 100"},paymentTerms:{required:"Payment terms are required",pattern:'Format: "30 days", "60 days", etc.'},industryExpertise:{},roleSpecialization:{}},La={consultantNames:[],contractTypes:[],paymentTermsOptions:[{value:"15 days",label:"15 Days"},{value:"30 days",label:"30 Days"},{value:"45 days",label:"45 Days"},{value:"60 days",label:"60 Days"},{value:"90 days",label:"90 Days"}],industryExpertise:[],roleSpecialization:[]},za=[{label:"Basic Details",icon:"business",formGroupName:"basicDetails",description:"Consultant identity & info"},{label:"Contact Details",icon:"contacts",formGroupName:"contactDetails",description:"SPOC & communication"},{label:"Commercial",icon:"payments",formGroupName:"commercialDetails",description:"Contract & billing terms"},{label:"Classification",icon:"label",formGroupName:"classificationTags",description:"Industry & role tags"}];class jt{static alphanumeric(p){return p.value?/^[a-zA-Z0-9]+$/.test(p.value)?null:{pattern:!0}:null}static phoneNumber(p){return p.value?/^[0-9]{10}$/.test(p.value)?null:{pattern:!0}:null}static paymentTermsPattern(p){return p.value?/^\d+\s+days$/i.test(p.value.trim())?null:{pattern:!0}:null}static emailUniqueness(p,r){return t=>t.value?(0,ca.O)(600).pipe((0,Nt.n)(()=>{const o=["[email protected]","[email protected]"].includes(t.value.toLowerCase());return(0,Be.of)(o?{emailTaken:!0}:null)}),(0,pt.W)(()=>(0,Be.of)(null))):(0,Be.of)(null)}}let Xt=(()=>{var a;class p{constructor(t,n,o,i,s,d,u,g,m){this.fb=t,this.encryptionService=n,this.dialogRef=o,this.data=i,this.toastr=s,this.httpService=d,this.config=u,this.recruitmentService=g,this.cdr=m,this.isEditMode=!1,this.isSubmitting=!1,this.currentStep=0,this.selectedConsultantUserId=null,this.buttonColorName=null,this.loggedInUserCompanyID=null,this.loggedInUserId=null,this.dropdownData={...La},this.errorMessages=Ya,this.wizardSteps=za,this.consultantNameSearchCtrl=new y.MJ(""),this.filteredConsultantNames=[],this.candidateList=[],this.destroy$=new Z.B}ngOnInit(){var t,n;this.filteredConsultantNames=[...this.dropdownData.consultantNames],this.initSessionData(),this.isEditMode=!(null===(t=this.data)||void 0===t||!t.element),this.buildForm(null===(n=this.data)||void 0===n?void 0:n.element),this.isEditMode&&(this.selectedConsultantUserId=this.data.element.userId),this.setupConsultantNameSearch(),this.fetchUserData()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}buildForm(t){var n;
1this.consultantForm=this.fb.group({basicDetails:this.fb.group({consultantId:[(null==t?void 0:t.consultantId)||"",[y.k0.required,jt.alphanumeric]],consultantName:[{value:(null==t?void 0:t.consultantName)||"",disabled:this.isEditMode},[y.k0.required]],consultantDescription:[(null==t?void 0:t.consultantDescription)||"",[y.k0.maxLength(500)]]}),contactDetails:this.fb.group({spocName:[(null==t?void 0:t.spocName)||"",[y.k0.required,y.k0.maxLength(100)]],spocDesignation:[(null==t?void 0:t.spocDesignation)||"",[y.k0.required,y.k0.maxLength(100)]],officialEmail:[(null==t?void 0:t.officialEmail)||"",[y.k0.required,y.k0.email],[jt.emailUniqueness(this.httpService,this.config)]],contactNumber:[(null==t?void 0:t.contactNumber)||"",[y.k0.required,jt.phoneNumber]]}),commercialDetails:this.fb.group({contractType:[(null==t?void 0:t.contractType)||"",[y.k0.required]],feePercentage:[null!==(n=null==t?void 0:t.feePercentage)&&void 0!==n?n:null,[y.k0.required,y.k0.min(0),y.k0.max(100)]],paymentTerms:[(null==t?void 0:t.paymentTerms)||"",[y.k0.required]]}),classificationTags:this.fb.group({industryExpertise:[(null==t?void 0:t.industryExpertise)||[]],roleSpecialization:[(null==t?void 0:t.roleSpecialization)||""]})})}get basicDetailsGroup(){return this.consultantForm.get("basicDetails")}get contactDetailsGroup(){return this.consultantForm.get("contactDetails")}get commercialDetailsGroup(){return this.consultantForm.get("commercialDetails")}get classificationTagsGroup(){return this.consultantForm.get("classificationTags")}get emailControl(){return this.contactDetailsGroup.get("officialEmail")}get isEmailPending(){var t;return"PENDING"===(null===(t=this.emailControl)||void 0===t?void 0:t.status)}get isFormValid(){return this.consultantForm.valid&&!this.isSubmitting}get isFormPending(){return this.consultantForm.pending}getErrorMessage(t,n){const o=this.consultantForm.get(t),i=null==o?void 0:o.get(n);if(!i||!i.errors||!i.touched&&!i.dirty)return"";const s=Object.keys(i.errors),d=this.errorMessages[n]||{};for(const u of s)if(d[u])return d[u];return"Invalid value"}hasError(t,n){const o=this.consultantForm.get(t),i=null==o?void 0:o.get(n);return!(!i||!i.invalid||!i.touched&&!i.dirty)}fetchUserData(){const n=this.recruitmentService.appendChildId(this.config.getRecruitmentUserData+"?companyId="+this.loggedInUserCompanyID);this.httpService.callGetService(n).subscribe({next:o=>{if(o){var i;this.candidateList=o.candidateDetails||[];const s=(null===(i=this.data)||void 0===i?void 0:i.existingConsultantUserIds)||[];this.dropdownData.consultantNames=this.candidateList.filter(d=>{var u;return!s.includes(d.userid)||this.isEditMode&&d.userid===(null===(u=this.data.element)||void 0===u?void 0:u.userId)}).map(d=>({id:d.userid,name:d.fullName})),this.dropdownData.industryExpertise=o.industry||[],this.filteredConsultantNames=[...this.dropdownData.consultantNames],this.cdr.markForCheck()}},error:o=>console.error("Error fetching consultant user data",o)})}setupConsultantNameSearch(){this.consultantNameSearchCtrl.valueChanges.pipe((0,L.Q)(this.destroy$)).subscribe(t=>{const n=(t||"").toLowerCase();this.filteredConsultantNames=this.dropdownData.consultantNames.filter(o=>o.name.toLowerCase().includes(n)),this.cdr.markForCheck()})}onConsultantNameSelectOpened(t){t&&this.consultantNameSearchCtrl.setValue("")}onConsultantSelect(t){const n=t.value,o=this.candidateList.find(i=>i.fullName===n);o&&(this.selectedConsultantUserId=o.userid,this.contactDetailsGroup.patchValue({officialEmail:o.officialEmail||"",contactNumber:o.contactNo||""}),this.contactDetailsGroup.markAsDirty(),this.cdr.markForCheck())}get currentStepGroup(){return this.consultantForm.get(this.wizardSteps[this.currentStep].formGroupName)}get isCurrentStepValid(){var t;return null===(t=this.currentStepGroup)||void 0===t?void 0:t.valid}get isLastStep(){return this.currentStep===this.wizardSteps.length-1}nextStep(){this.currentStep<this.wizardSteps.length-1&&(this.markCurrentStepTouched(),this.isCurrentStepValid&&(this.currentStep++,this.cdr.markForCheck()))}prevStep(){this.currentStep>0&&(this.currentStep--,this.cdr.markForCheck())}goToStep(t){if(t<=this.currentStep&&(this.currentStep=t,this.cdr.markForCheck()),t>this.currentStep){let n=!0;for(let o=0;o<t;o++){const i=this.consultantForm.get(this.wizardSteps[o].formGroupName);if(i&&i.invalid){n=!1;break}}n&&(this.currentStep=t,this.cdr.markForCheck())}}getStepStatus(t){if(t<this.currentStep){const n=this.consultantForm.get(this.wizardSteps[t].formGroupName);return null!=n&&n.valid?"completed":"pending"}return t===this.currentStep?"current":"pending"}markCurrentStepTouched(){const t=this.currentStepGroup;
1t&&Object.values(t.controls).forEach(n=>n.markAsTouched())}onSubmit(){var t;if(this.consultantForm.invalid||this.isFormPending){this.consultantForm.markAllAsTouched();for(let d=0;d<this.wizardSteps.length;d++){const u=this.consultantForm.get(this.wizardSteps[d].formGroupName);if(null!=u&&u.invalid){this.currentStep=d;break}}return this.toastr.error("Please fix validation errors.","Validation Error",{timeOut:3e3,progressBar:!0}),void this.cdr.markForCheck()}this.isSubmitting=!0,this.errorMessage=null,this.cdr.markForCheck();const n=this.consultantForm.getRawValue(),o=sessionStorage.getItem("loggedInCompanyFiscalyear"),s=(o&&this.encryptionService.decryptData(o),{...this.isEditMode?{id:null===(t=this.data)||void 0===t||null===(t=t.element)||void 0===t?void 0:t.id}:{},userId:this.selectedConsultantUserId,companyId:this.loggedInUserCompanyID,childId:this.recruitmentService.getChildId(),year:null,...n.basicDetails,...n.contactDetails,...n.commercialDetails,...n.classificationTags,...this.isEditMode?{updatedBy:this.loggedInUserId}:{createdById:this.loggedInUserId}});this.httpService.callPostService(this.config.updateRoleConsultant,[s]).subscribe({next:d=>{this.isSubmitting=!1,this.toastr.success(this.isEditMode?"Consultant updated successfully":"Consultant added successfully","Success"),this.dialogRef.close(!0),this.cdr.markForCheck()},error:d=>{var u;this.isSubmitting=!1,this.errorMessage=(null===(u=d.error)||void 0===u?void 0:u.message)||"An error occurred while saving consultant details.",this.toastr.error(this.errorMessage,"Error"),this.cdr.markForCheck()}})}cancel(){this.dialogRef.close()}onlyNumberKey(t){const n=t.which||t.keyCode;return n>=48&&n<=57}initSessionData(){var t,n;this.buttonColorName=sessionStorage.getItem("buttonColorName");const i=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=i?Number(null!==(t=this.encryptionService.decryptData(i))&&void 0!==t?t:0):null;const s=sessionStorage.getItem("loggedInUserId");this.loggedInUserId=s&&null!==(n=this.encryptionService.decryptData(s))&&void 0!==n?n:null}trackByIndex(t){return t}trackById(t,n){return n.id||n.value||t}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(y.ok),e.rXU(S.L),e.rXU(b.CP),e.rXU(b.Vh),e.rXU(q.tw),e.rXU(c.k),e.rXU(_.T),e.rXU(I.W),e.rXU(e.gRc))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-add-edit-consultant"]],decls:31,vars:18,consts:[["consultantSearchInput",""],[1,"consultant-wizard-container"],[1,"wizard-card"],[1,"wizard-header"],[1,"header-content"],[1,"material-icons","header-icon"],[1,"header-title"],["src","././assets/icon/close_icon.png","alt","Close","role","button","tabindex","0",1,"cp","close-btn",3,"mat-dialog-close"],[1,"wizard-stepper"],[1,"stepper-track"],[1,"stepper-progress"],[1,"stepper-steps"],["class","step-item",3,"active","completed","clickable","click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"wizard-body"],[3,"formGroup"],["class","wizard-step","formGroupName","basicDetails",4,"ngIf"],["class","wizard-step","formGroupName","contactDetails",4,"ngIf"],["class","wizard-step","formGroupName","commercialDetails",4,"ngIf"],["class","wizard-step","formGroupName","classificationTags",4,"ngIf"],["class","error-banner",4,"ngIf"],[1,"wizard-footer"],[1,"footer-left"],[1,"step-counter"],[1,"footer-right"],["type","button",1,"back_btn","fs-14",3,"click"],["type","button","class","back_btn fs-14 ml-10",3,"click",4,"ngIf"],["type","button","class","add_btn fs-14 ml-10",3,"background-color","click",4,"ngIf"],["type","button","class","add_btn fs-14 ml-10",3,"background-color","disabled","click",4,"ngIf"],[1,"step-item",3,"click"],[1,"step-circle"],["class","material-icons",4,"ngIf"],[4,"ngIf"],[1,"step-info"],[1,"step-label"],[1,"step-desc"],[1,"material-icons"],["formGroupName","basicDetails",1,"wizard-step"],[1,"step-section-title"],["size","6"],[1,"formLabelRegularfs16","mb-5"],[1,"red-cl"],["appearance","fill",1,"w-100","mat-height40","mat-input-style"],["placeholder","Search & select consultant","formControlName","consultantName",3,"openedChange","selectionChange"],[1,"search-input-wrapper",3,"click"],["id","consultantNameSearch","placeholder","Search consultant...",1,"mat-select-search-input",3,"formControl"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["matInput","","formControlName","consultantId","placeholder","e.g., CON001"],[1,"mt-10"],["size","12"],[1,"optional-tag"],["appearance","fill",1,"w-100","mat-input-style"],["matInput","","formControlName","consultantDescription","rows","3","placeholder","Brief description about the consultant...","maxlength","500"],["align","end"],[3,"value"],["formGroupName","contactDetails",1,"wizard-step"],["matInput","","formControlName","spocName","placeholder","Enter SPOC name"],["matInput","","formControlName","spocDesignation","placeholder","e.g., Account Manager"],["matInput","","type","email","formControlName","officialEmail","placeholder","[email protected]"],["matSuffix","","class","email-spinner",4,"ngIf"],["matSuffix","","class","email-valid-icon","style","color: #4caf50;",4,"ngIf"],["class","async-info",4,"ngIf"],["matInput","","formControlName","contactNumber","placeholder","10-digit number","maxlength","10",3,"keypress"],["matSuffix","",1,"email-spinner"],["name","dots",2,"height","18px","width","18px"],["matSuffix","",1,"email-valid-icon",2,"color","#4caf50"],[1,"async-info"],[1,"checking-text"],["formGroupName","commercialDetails",1,"wizard-step"],["matInput","","formControlName","contractType","placeholder","Enter contract type"],["matInput","","type","number","formControlName","feePercentage","placeholder","e.g., 8.33","min","0","max","100","step","0.01"],["placeholder","Select payment terms","formControlName","paymentTerms"],["size","6",1,"fee-visual-col"],["class","fee-indicator",4,"ngIf"],[1,"fee-indicator"],[1,"fee-bar-track"],[1,"fee-bar-fill"],[1,"fee-percentage-text"],["formGroupName","classificationTags",1,"wizard-step"],["placeholder","Select industries","formControlName","industryExpertise","multiple",""],["class","tags-preview",4,"ngIf"],["matInput","","formControlName","roleSpecialization","placeholder","Enter role specialization"],[1,"tags-preview"],["class","tag-chip",3,"background",4,"ngFor","ngForOf","ngForTrackBy"],[1,"tag-chip"],[1,"error-banner"],["type","button",1,"back_btn","fs-14","ml-10",3,"click"],[1,"material-icons","btn-icon"],["type","button",1,"add_btn","fs-14","ml-10",3,"click"],["type","button",1,"add_btn","fs-14","ml-10",3,"click","disabled"],["name","dots","style","height: 18px; width: 18px; margin-right: 6px;",4,"ngIf"],["name","dots",2,"height","18px","width","18px","margin-right","6px"]],template:function(t,n){1&t&&(e.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"span",5),e.EFF(5,"person_add"),e.k0s(),e.j41(6,"h2",6),e.EFF(7),e.k0s()(),e.nrm(8,"img",7),e.k0s(),e.j41(9,"div",8)(10,"div",9),e.nrm(11,"div",10),e.k0s(),e.j41(12,"div",11),e.DNE(13,ga,9,14,"div",12),e.k0s()(),e.j41(14,"div",13)(15,"form",14),e.DNE(16,ba,39,9,"div",15)(17,Ra,44,9,"div",16)(18,Ma,36,8,"div",17)(19,Aa,25,5,"div",18),e.k0s()(),e.DNE(20,Na,4,1,"div",19),e.j41(21,"div",20)(22,"div",21)(23,"span",22),e.EFF(24),e.k0s()(),e.j41(25,"div",23)(26,"button",24),e.bIt("click",function(){return n.cancel()}),e.EFF(27,"Cancel"),e.k0s(),e.DNE(28,$a,4,0,"button",25)(29,Ua,4,2,"button",26)(30,Ga,3,5,"button",27),e.k0s()()()()),2&t&&(e.R7$(7),e.JRh(n.isEditMode?"Edit Consultant":"Add New Consultant"),e.R7$(4),e.xc7("width",n.currentStep/(n.wizardSteps.length-1)*100+"%")("background",n.buttonColorName),e.R7$(2),e.Y8G("ngForOf",n.wizardSteps)("ngForTrackBy",n.trackByIndex),e.R7$(2),e.Y8G("formGroup",n.consultantForm),e.R7$(),e.Y8G("ngIf",0===n.currentStep),e.R7$(),e.Y8G("ngIf",1===n.currentStep),e.R7$(),e.Y8G("ngIf",2===n.currentStep),e.R7$(),e.Y8G("ngIf",3===n.currentStep),e.R7$(),e.Y8G("ngIf",n.errorMessage),e.R7$(4),e.Lme("Step ",n.currentStep+1," of ",n.wizardSteps.length,""),e.R7$(4),e.Y8G("ngIf",n.currentStep>0),e.R7$(),e.Y8G("ngIf",!n.isLastStep),e.R7$(),e.Y8G("ngIf",n.isLastStep))},dependencies:[K.Sq,K.bT,y.qT,y.me,y.Q0,y.BC,y.cb,y.tU,y.VZ,y.zX,J.hU,J.lO,J.ln,J.w2,R.rl,R.MV,R.TL,R.yw,he.VO,pe.wT,y.l_,y.j4,y.JD,y.$R,M.fg,x.An,b.tx],styles:['.mat-mdc-dialog-container .mdc-dialog__surface{border-radius:18px!important}[_nghost-%COMP%] .mat-dialog-container{max-height:92vh;overflow:hidden;padding:0!important}.consultant-wizard-container[_ngcontent-%COMP%]{font-family:Inter,Segoe UI,sans-serif;width:100%;height:100%;display:flex;flex-direction:column}.wizard-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;background:#fff;border-radius:18px;overflow:hidden}.wizard-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:18px 24px 14px;
1border-bottom:1px solid #f0f0f0;background:linear-gradient(135deg,#fafbfc,#f5f6f8)}.wizard-header[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.wizard-header[_ngcontent-%COMP%] .header-icon[_ngcontent-%COMP%]{font-size:26px;color:var(--phi-buttonColorName, #f6921e);background:linear-gradient(135deg,color-mix(in srgb,var(--phi-buttonColorName, #f6921e),white 85%),color-mix(in srgb,var(--phi-buttonColorName, #f6921e),white 92%));padding:8px;border-radius:10px}.wizard-header[_ngcontent-%COMP%] .header-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#1e293b;margin:0}.wizard-header[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%]{width:22px;height:22px;cursor:pointer;opacity:.65;transition:opacity .2s,transform .2s}.wizard-header[_ngcontent-%COMP%] .close-btn[_ngcontent-%COMP%]:hover{opacity:1;transform:scale(1.15)}.wizard-stepper[_ngcontent-%COMP%]{padding:20px 24px 8px;background:#fafbfc;position:relative}.stepper-track[_ngcontent-%COMP%]{position:absolute;top:40px;left:64px;right:64px;height:3px;background:#e8ecf0;border-radius:3px;z-index:0}.stepper-progress[_ngcontent-%COMP%]{height:100%;border-radius:3px;transition:width .45s cubic-bezier(.4,0,.2,1)}.stepper-steps[_ngcontent-%COMP%]{display:flex;justify-content:space-between;position:relative;z-index:1}.step-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:6px;cursor:default;opacity:.5;transition:opacity .3s;min-width:0;flex:1}.step-item.active[_ngcontent-%COMP%], .step-item.completed[_ngcontent-%COMP%]{opacity:1}.step-item.clickable[_ngcontent-%COMP%]{cursor:pointer}.step-circle[_ngcontent-%COMP%]{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600;color:#94a3b8;background:#fff;border:2.5px solid #d1d5db;transition:all .3s cubic-bezier(.4,0,.2,1);box-shadow:0 1px 4px #0000000f}.active[_ngcontent-%COMP%] .step-circle[_ngcontent-%COMP%], .completed[_ngcontent-%COMP%] .step-circle[_ngcontent-%COMP%]{color:#fff;border-color:transparent;box-shadow:0 3px 10px #0000001f}.step-circle[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:18px}.step-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;text-align:center}.step-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#475569;line-height:1.2}.active[_ngcontent-%COMP%] .step-label[_ngcontent-%COMP%]{color:#1e293b}.step-desc[_ngcontent-%COMP%]{font-size:10px;color:#94a3b8;line-height:1.2;margin-top:1px;display:none}@media (min-width: 640px){.step-desc[_ngcontent-%COMP%]{display:block}}.wizard-body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:20px 28px;min-height:280px}.wizard-step[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fadeSlideIn .35s ease-out}@keyframes _ngcontent-%COMP%_fadeSlideIn{0%{opacity:0;transform:translate(18px)}to{opacity:1;transform:translate(0)}}.step-section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:18px;padding-bottom:10px;border-bottom:2px solid #f1f5f9}.step-section-title[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:22px}.step-section-title[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:last-child{font-size:15px;font-weight:600;color:#334155}.optional-tag[_ngcontent-%COMP%]{font-size:11px;font-weight:400;color:#94a3b8;margin-left:4px}.mb-5[_ngcontent-%COMP%]{margin-bottom:5px}.mt-10[_ngcontent-%COMP%]{margin-top:10px}.search-input-wrapper[_ngcontent-%COMP%]{padding:8px 12px;position:sticky;top:-8px;background:#fff;z-index:10;border-bottom:1px solid #eee}.mat-select-search-input[_ngcontent-%COMP%]{width:100%;height:36px;padding:0 12px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;outline:none;font-size:14px}.mat-select-search-input[_ngcontent-%COMP%]:focus{border-color:var(--phi-buttonColorName, #f6921e)}.async-info[_ngcontent-%COMP%]{margin-top:-10px;margin-bottom:4px}.async-info[_ngcontent-%COMP%] .checking-text[_ngcontent-%COMP%]{font-size:11px;color:#f6921e;display:flex;align-items:center;gap:4px;animation:_ngcontent-%COMP%_pulse 1.4s infinite}@keyframes _ngcontent-%COMP%_pulse{0%,to{opacity:1}50%{opacity:.5}}.email-spinner[_ngcontent-%COMP%]{display:flex;align-items:center}.email-valid-icon[_ngcontent-%COMP%]{font-size:20px!important}.fee-visual-col[_ngcontent-%COMP%]{display:flex;align-items:flex-end}.fee-indicator[_ngcontent-%COMP%]{width:100%;padding-top:4px}.fee-bar-track[_ngcontent-%COMP%]{width:100%;height:10px;background:#e8ecf0;border-radius:10px;overflow:hidden;margin-top:6px}.fee-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:10px;transition:width .35s cubic-bezier(.4,0,.2,1);min-width:2px}.fee-percentage-text[_ngcontent-%COMP%]{display:block;font-size:13px;font-weight:700;margin-top:4px;text-align:right}.tags-preview[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;padding:8px 0}.tag-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:4px 12px;border-radius:16px;font-size:12px;font-weight:500;color:#fff;opacity:.9;animation:_ngcontent-%COMP%_chipIn .25s ease-out;box-shadow:0 1px 3px #0000001a}@keyframes _ngcontent-%COMP%_chipIn{0%{opacity:0;transform:scale(.8)}to{opacity:.9;transform:scale(1)}}.error-banner[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 24px;background:#fef2f2;color:#dc2626;font-size:13px;border-top:1px solid #fecaca}.error-banner[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:18px}.wizard-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:14px 24px;
1border-top:1px solid #f0f0f0;background:#fafbfc}.footer-left[_ngcontent-%COMP%] .step-counter[_ngcontent-%COMP%]{font-size:12px;font-weight:500;color:#94a3b8}.footer-right[_ngcontent-%COMP%]{display:flex;align-items:center;gap:0}.btn-icon[_ngcontent-%COMP%]{font-size:16px!important;vertical-align:middle;margin:0 -2px}.add_btn[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:not-allowed}.ml-10[_ngcontent-%COMP%]{margin-left:10px}@media (max-width: 768px){.wizard-body[_ngcontent-%COMP%]{padding:14px 16px}.wizard-header[_ngcontent-%COMP%]{padding:14px 16px 10px}.wizard-stepper[_ngcontent-%COMP%]{padding:14px 12px 6px}.step-label[_ngcontent-%COMP%]{font-size:10px}.step-circle[_ngcontent-%COMP%]{width:28px;height:28px;font-size:11px}.stepper-track[_ngcontent-%COMP%]{top:32px;left:40px;right:40px}.wizard-footer[_ngcontent-%COMP%]{padding:10px 16px;flex-wrap:wrap;gap:8px}ion-col[size="6"][_ngcontent-%COMP%]{max-width:100%!important;flex:0 0 100%!important}}@media (max-width: 480px){.stepper-steps[_ngcontent-%COMP%]{gap:2px}.step-info[_ngcontent-%COMP%]{display:none}.step-circle[_ngcontent-%COMP%]{width:32px;height:32px}}'],changeDetection:0}),p})();const Va=["columnChooserBtn"];function Xa(a,p){if(1&a){const r=e.RV6();e.j41(0,"button",16),e.bIt("click",function(){e.eBV(r);const n=e.XpG();return e.Njj(n.addConsultant())}),e.j41(1,"span",17),e.EFF(2,"add"),e.k0s(),e.EFF(3," Add Consultant "),e.k0s()}if(2&a){const r=e.XpG();e.xc7("background-color",r.buttonColorName),e.Y8G("disabled",r.isAllCompanySelected||r.selectedYearForRecruitment!==r.currentFiscalYear)}}let Ha=(()=>{var a;class p{constructor(t,n,o,i,s,d,u,g,m){this.httpService=t,this.config=n,this.encryptionService=o,this.dataRefreshService=i,this.toastr=s,this.dialog=d,this.sharedService=u,this.cdr=g,this.recruitmentService=m,this.agColumnDefs=[],this.agRowData=[],this.gridOptions={getRowId:l=>l.data.id,pagination:!0,paginationPageSize:10,paginationPageSizeSelector:[5,10,25,50,75,100,200,500,1e3],rowSelection:"multiple",suppressRowClickSelection:!0,suppressCellFocus:!0,popupParent:document.querySelector("body"),defaultColDef:{flex:1,minWidth:120,resizable:!0,sortable:!0,filter:!0},localeText:{noRowsToShow:"No consultants found"},postProcessPopup:l=>{var f;if("columnChooser"!==l.type)return;const h=null===(f=this.columnChooserBtn)||void 0===f?void 0:f.nativeElement,v=l.ePopup;if(!h||!v)return;const k=h.getBoundingClientRect();v.style.top=`${k.bottom+window.scrollY+4}px`,v.style.left="auto",v.style.right=document.documentElement.clientWidth-k.right+"px"}},this.buttonColorName=null,this.subModuleButtonColor=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserId=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsMD=!1,this.searchTerm="",this.currentFiscalYear="",this.ratingYears=[],this.isAllCompanySelected=!1}ngOnInit(){this.initSessionData(),this.getPMSYearListAndInitialize(),this.dataRefreshService.refreshNeeded$.pipe((0,vt.i)(1)).subscribe(()=>{this.getPMSYearListAndInitialize()}),this.setAgColumnDefs(),this.isAllCompanySelected=null===this.recruitmentService.getChildId(),this.recruitmentService.selectedChildId$.subscribe(t=>{this.isAllCompanySelected=null===t})}initSessionData(){this.buttonColorName=sessionStorage.getItem("buttonColorName"),this.subModuleButtonColor=sessionStorage.getItem("subModuleButtonColor");const n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyFiscalyear=(o=>{const i=sessionStorage.getItem("loggedInCompanyFiscalyear");return i?this.encryptionService.decryptData(i):null})(),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsMD=this.loggedInUserRoles.some(o=>"MD"===o.displayName)}setAgColumnDefs(){const t=[];this.loggedInUserRoleIsMD||t.push({headerName:"select",headerCheckboxSelection:!0,checkboxSelection:!0,width:50,minWidth:50,maxWidth:50,pinned:"left",sortable:!1,filter:!1,resizable:!1}),t.push({headerName:"Consultant ID",field:"consultantId",width:130,cellRenderer:n=>n.value&&"\u2014"!==n.value?n.value:'<span class="text-muted">\u2014</span>'}),t.push({headerName:"Consultant Name",field:"consultantName",minWidth:180,tooltipField:"consultantName"}),t.push({headerName:"SPOC Name",field:"spocName",tooltipField:"spocName"}),t.push({headerName:"Contact Number",field:"contactNumber"}),t.push({headerName:"Official Email ID",field:"officialEmail",minWidth:200,tooltipField:"officialEmail"}),t.push({headerName:"Industry Expertise",field:"industryExpertise",minWidth:220,cellRenderer:n=>{const o=n.value;let i="";
1return Array.isArray(o)&&o.length?i=o.join(", "):"string"==typeof o&&o.trim()&&(i=o),i||'<span class="text-muted">\u2014</span>'}}),t.push({headerName:"Role Specialization",field:"roleSpecialization",minWidth:220,cellRenderer:n=>{const o=n.value;let i="";return Array.isArray(o)&&o.length?i=o.join(", "):"string"==typeof o&&o.trim()&&(i=o),i||'<span class="text-muted">\u2014</span>'}}),t.push({headerName:"Fee %",field:"feePercentage",width:100,cellRenderer:n=>null==n.value?'<span class="text-muted">\u2014</span>':`<span class="fee-badge">${n.value}%</span>`}),t.push({headerName:"Payment Terms",field:"paymentTerms",cellRenderer:n=>n.value?`<span class="payment-badge">${n.value}</span>`:'<span class="text-muted">\u2014</span>'}),t.push({headerName:"Status",field:"isActive",width:120,cellRenderer:n=>{const o=!1!==n.value;return`<span class="status-badge ${o?"status-active":"status-inactive"}">${o?"Active":"Inactive"}</span>`}}),this.loggedInUserRoleIsMD||t.push({headerName:"Actions",field:"isActive",width:100,pinned:"right",sortable:!1,filter:!1,cellRenderer:n=>{const o=!1!==n.value,i=o?"close-circle-outline":"checkmark-circle-outline",s=o?"#ef4444":"#22c55e",d=o?"Inactivate":"Activate",u=this.isAllCompanySelected?"disabled":"",g=document.createElement("div");var m,l;return g.className="action-btns-ag",g.innerHTML=`\n <button class="ag-action-btn edit" title="Edit" ${u}>\n <ion-icon name="create-outline"></ion-icon>\n </button>\n <button class="ag-action-btn status" title="${d}" ${u}>\n <ion-icon name="${i}" style="color: ${s}"></ion-icon>\n </button>\n `,this.isAllCompanySelected||(null===(m=g.querySelector(".edit"))||void 0===m||m.addEventListener("click",()=>this.editConsultant(n.node.data)),null===(l=g.querySelector(".status"))||void 0===l||l.addEventListener("click",()=>this.toggleConsultantStatus(n.node.data))),g}}),this.agColumnDefs=t}onGridReady(t){this.gridApi=t.api,this.gridApi.sizeColumnsToFit(),window.addEventListener("resize",()=>{setTimeout(()=>this.gridApi.sizeColumnsToFit(),50)})}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}getPMSYearListAndInitialize(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.ratingYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear),d=`${i}-${s}`;this.currentFiscalYear=d,this.setSelectedYear(d)})}setSelectedYear(t){const n=this.ratingYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year,this.fetchConsultants())}onYearChange(t){this.setSelectedYear(t)}fetchConsultants(){const n=this.recruitmentService.appendChildId(`${this.config.getConsultantData}?companyId=${this.loggedInUserCompanyID}`);this.httpService.callGetService(n).subscribe({next:o=>{let i=(null==o?void 0:o.data)||[];i=i.map(s=>({...s,id:s.id,consultantId:s.consultantId||"\u2014",consultantName:s.consultantName||"\u2014",spocName:s.spocName||"\u2014",contactNumber:s.contactNumber||"\u2014",officialEmail:s.officialEmail||"\u2014",industryExpertise:s.industryExpertise||[],roleSpecialization:s.roleSpecialization||"",feePercentage:s.feePercentage,paymentTerms:s.paymentTerms,isActive:void 0!==s.active?s.active:void 0===s.isActive||s.isActive})),this.agRowData=i,this.cdr.detectChanges()},error:o=>{console.error("Error fetching Consultants:",o),this.toastr.error("Failed to fetch Consultants.","Error")}})}filterData(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}addConsultant(){const t=new b.ru;
1t.disableClose=!0,t.width="68%",t.height="82%",t.panelClass="custom-dialog-container",t.data={existingConsultantUserIds:this.agRowData.map(o=>o.userId).filter(o=>!!o)},this.dialog.open(Xt,t).afterClosed().subscribe(o=>{o&&this.fetchConsultants()})}editConsultant(t){const n=new b.ru;n.disableClose=!0,n.width="68%",n.height="82%",n.panelClass="custom-dialog-container",n.data={element:t,existingConsultantUserIds:this.agRowData.map(i=>i.userId).filter(i=>!!i)},this.dialog.open(Xt,n).afterClosed().subscribe(i=>{i&&this.fetchConsultants()})}toggleConsultantStatus(t){const n=!1===t.isActive;this.dialog.open(le.$,{disableClose:!0,width:"30%",height:"25%",data:{msg:`Are you sure you want to ${n?"activate":"inactivate"} this Consultant?`,btn1:"Cancel",btn2:"Yes",btn2BgColor:this.buttonColorName}}).afterClosed().subscribe(s=>{if(!s)return;t.isActive=n;const u=this.recruitmentService.appendChildId(`${this.config.updateConsultantActiveStatus}?id=${t.id}&active=${n}`);this.httpService.callPutService(u,{updatedBy:this.loggedInUserId}).subscribe({next:m=>{m.status?(this.toastr.success(`Consultant ${n?"activated":"inactivated"} successfully.`),this.gridApi.applyTransaction({update:[t]}),this.gridApi.refreshCells({force:!0}),this.cdr.detectChanges()):this.toastr.error(m.message||"Failed to update consultant status.","Error")},error:m=>{var l;console.error("Error updating consultant status:",m),this.toastr.error((null===(l=m.error)||void 0===l?void 0:l.message)||"An error occurred while updating consultant status.","Error")}})})}hasSelectedRows(){var t;return(null===(t=this.gridApi)||void 0===t?void 0:t.getSelectedRows().length)>0}bulkDelete(){const n=this.gridApi.getSelectedRows().map(i=>i.id).filter(i=>!!i);0!==n.length&&this.dialog.open(le.$,{disableClose:!0,height:"25%",width:"30%",data:{msg:"Are you sure you want to delete selected Consultant(s)?",btn1:"Cancel",btn2:"Yes",btn2BgColor:this.buttonColorName}}).afterClosed().subscribe(i=>{if(!i)return;const s=n.join(","),u=this.recruitmentService.appendChildId(`${this.config.softBulkDeleteJobPlatform}?ids=${s}&deletedBy=${this.loggedInUserId}`);this.httpService.callPutService(u,{deletedBy:this.loggedInUserId}).subscribe({next:()=>{this.toastr.success("Selected items deleted successfully."),this.fetchConsultants()},error:g=>{var m;this.toastr.error((null==g||null===(m=g.error)||void 0===m?void 0:m.message)||"Failed to delete selected items.")}})})}download(t=!1){if(!this.agRowData.length)return;let n=this.agRowData;if(!t&&this.gridApi){n=this.gridApi.getDataAsCsv()?[]:this.agRowData;const g=[];this.gridApi.forEachNodeAfterFilterAndSort(m=>g.push(m.data)),n=g}const o=n.map(g=>{var m;return{"Consultant ID":g.consultantId||"","Consultant Name":g.consultantName||"","SPOC Name":g.spocName||"","Contact Number":g.contactNumber||"","Official Email":g.officialEmail||"","Industry Expertise":(Array.isArray(g.industryExpertise)?g.industryExpertise:g.industryExpertise?[g.industryExpertise]:[]).join(", "),"Role Specialization":(Array.isArray(g.roleSpecialization)?g.roleSpecialization:g.roleSpecialization?[g.roleSpecialization]:[]).join(", "),"Fee %":null!==(m=g.feePercentage)&&void 0!==m?m:"","Payment Terms":g.paymentTerms||"",Status:!1!==g.isActive?"Active":"Inactive"}}),s={Sheets:{Consultants:F.utils.json_to_sheet(o)},SheetNames:["Consultants"]},d=F.write(s,{bookType:"xlsx",type:"array"}),u=new Blob([d],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"});U.saveAs(u,"Consultants.xlsx")}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}resetGrid(){this.searchTerm="",this.gridApi.setGridOption("quickFilterText",""),this.gridApi.deselectAll(),this.gridApi.setFilterModel(null),this.fetchConsultants()}downloadVisibleColumns(){if(!this.gridApi)return;const t=this.gridApi.getAllDisplayedColumns().map(l=>l.getColDef()).filter(l=>l.headerName&&l.field&&"Actions"!==l.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=[];this.gridApi.forEachNodeAfterFilterAndSort(l=>i.push(l.data));const s=i.slice(n*o,(n+1)*o);if(!s.length)return void this.toastr.info("No data to download for this page.","Info");const d=s.map(l=>{const f={};for(const h of t){let v;if("function"==typeof h.valueGetter)try{v=h.valueGetter({data:l})}catch{v=l[h.field]}else v=l[h.field];null==v?v="":"object"==typeof v&&(v=Object.values(v).join(", ")),f[h.headerName]=String(v)}return f}),g={Sheets:{Data:F.utils.json_to_sheet(d)},SheetNames:["Data"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Export_Visible_Page_${n+1}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU(C.N),e.rXU(q.tw),e.rXU(b.bZ),e.rXU($.d),e.rXU(e.gRc),e.rXU(I.W))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-consultant"]],viewQuery:function(t,n){if(1&t&&e.GBs(Va,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},decls:20,vars:7,consts:[["columnChooserBtn",""],[1,"container","mb-20"],[1,"cardBox","mb
1-20"],[1,"filter-bar","mb-10"],["size","auto",1,"ml-10","mt-20"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],[1,"d-flex","align-center","justify-content-flex-end","mt-20"],["class","add_btn fs-14 float-right center-content mr-10",3,"background-color","disabled","click",4,"ngIf"],["title","Download",1,"icon-action-btn","material-icons","mr-10",3,"click"],["title","Refresh",1,"icon-action-btn","material-icons","ml-5","mr-10",3,"click"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5","mr-10",3,"click"],[1,"material-icons"],[1,"grid-wrapper","p-10"],[1,"ag-theme-quartz",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],[1,"add_btn","fs-14","float-right","center-content","mr-10",3,"click","disabled"],[1,"material-icons","fs-20","mr-5"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"ion-row",3)(3,"ion-col",4)(4,"mat-form-field",5)(5,"mat-icon",6),e.EFF(6,"search"),e.k0s(),e.j41(7,"input",7),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.filterData())}),e.k0s()()(),e.j41(8,"ion-col",8),e.DNE(9,Xa,4,3,"button",9),e.j41(10,"span",10),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(11,"download"),e.k0s(),e.j41(12,"span",11),e.bIt("click",function(){return e.eBV(o),e.Njj(n.resetGrid())}),e.EFF(13,"refresh"),e.k0s(),e.j41(14,"button",12,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(16,"span",13),e.EFF(17,"tune"),e.k0s()()()(),e.j41(18,"div",14)(19,"ag-grid-angular",15),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))}),e.k0s()()()()}2&t&&(e.R7$(7),e.R50("ngModel",n.searchTerm),e.R7$(2),e.Y8G("ngIf",!n.loggedInUserRoleIsMD),e.R7$(5),e.xc7("background-color",n.buttonColorName),e.R7$(5),e.Y8G("rowData",n.agRowData)("columnDefs",n.agColumnDefs)("gridOptions",n.gridOptions))},dependencies:[K.bT,y.me,y.BC,y.vS,J.hU,J.ln,R.rl,R.JW,M.fg,x.An,G.xs],styles:['.container[_ngcontent-%COMP%]{--background: #f6f5fb;padding:0 15px}.cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.mat-height40[_ngcontent-%COMP%]{height:40px!important}.small-field[_ngcontent-%COMP%]{width:200px}[_nghost-%COMP%] .ag-theme-quartz{--ag-header-background-color: #DDDDDD;--ag-header-foreground-color: #000;--ag-row-hover-color: #f8fafc;--ag-selected-row-background-color: #f1f5f9;--ag-font-size: 13px;--ag-font-family: "OpenSans-Regular", sans-serif;--ag-border-color: #e2e8f0;border:1px solid #e2e8f0;border-radius:8px}[_nghost-%COMP%] .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell{display:flex;align-items:center;justify-content:center;padding-left:12px!important;padding-right:12px!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell .ag-cell-value, [_nghost-%COMP%] .ag-theme-quartz .ag-cell .ag-cell-wrapper{display:flex;align-items:center;justify-content:center;height:100%;width:100%}[_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=consultantName], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=spocName], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=officialEmail]{justify-content:flex-start}[_nghost-%COMP%] .id-badge{display:inline-block;font-family:Courier New,monospace;font-size:12px;font-weight:600;color:#475569;background:#f1f5f9;padding:2px 8px;border-radius:4px}[_nghost-%COMP%] .tags-cell{display:flex;flex-wrap:wrap;gap:4px;align-items:center;justify-content:center}[_nghost-%COMP%] .cell-tag{display:inline-flex;align-items:center;padding:1px 8px;border-radius:10px;font-size:10px;font-weight:500;white-space:nowrap;height:-moz-fit-content;height:fit-content;line-height:1.2}[_nghost-%COMP%] .industry-tag{background:color-mix(in srgb,var(--phi-buttonColorName, #f6921e),white 82%);color:color-mix(in srgb,var(--phi-buttonColorName, #f6921e),black 20%)}[_nghost-%COMP%] .role-tag{background:#e0e7ff;color:#3730a3}[_nghost-%COMP%] .cell-tag-more{font-size:10px;font-weight:600;color:#64748b;background:#e2e8f0;padding:1px 6px;border-radius:8px;
1cursor:pointer;height:-moz-fit-content;height:fit-content;line-height:1.2}[_nghost-%COMP%] .fee-badge{font-size:12px;font-weight:600;color:var(--phi-buttonColorName, #f6921e);background:color-mix(in srgb,var(--phi-buttonColorName, #f6921e),white 88%);padding:2px 10px;border-radius:10px;height:-moz-fit-content;height:fit-content;line-height:1.2}[_nghost-%COMP%] .payment-badge{font-size:11px;font-weight:500;color:#334155;background:#f8fafc;border:1px solid #e2e8f0;padding:2px 8px;border-radius:10px;text-transform:capitalize;height:-moz-fit-content;height:fit-content;line-height:1.2}[_nghost-%COMP%] .status-badge{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:6px;font-size:11px;font-weight:600;line-height:1;height:-moz-fit-content;height:fit-content}[_nghost-%COMP%] .status-badge:before{content:"";width:6px;height:6px;border-radius:50%}[_nghost-%COMP%] .status-active{background:#dcfce7;color:#166534}[_nghost-%COMP%] .status-active:before{background:#22c55e}[_nghost-%COMP%] .status-inactive{background:#fef2f2;color:#991b1b}[_nghost-%COMP%] .status-inactive:before{background:#ef4444}[_nghost-%COMP%] .action-btns-ag{display:flex;align-items:center;justify-content:center;gap:8px;height:100%;width:100%}[_nghost-%COMP%] .action-btns-ag .ag-action-btn{background:none;border:none;padding:2px;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all .2s}[_nghost-%COMP%] .action-btns-ag .ag-action-btn.edit{width:24px;height:24px;padding:0}[_nghost-%COMP%] .action-btns-ag .ag-action-btn.edit ion-icon{color:#3b82f6!important;font-size:20px}[_nghost-%COMP%] .action-btns-ag .ag-action-btn.edit:hover{transform:scale(1.1)}[_nghost-%COMP%] .action-btns-ag .ag-action-btn.status{width:24px;height:24px;padding:0}[_nghost-%COMP%] .action-btns-ag .ag-action-btn.status ion-icon{font-size:20px}[_nghost-%COMP%] .action-btns-ag .ag-action-btn.status:hover{transform:scale(1.1)}.icon-action-btn[_ngcontent-%COMP%]{border:1px solid #f3820e;color:#f3820e;border-radius:6px;background-color:#fff;height:38px;width:38px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease-in-out}.icon-action-btn[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:20px}.icon-action-btn[_ngcontent-%COMP%]:hover{background:#fff8f1;transform:translateY(-1px);box-shadow:0 2px 4px #f3820e26}.icon-action-btn[_ngcontent-%COMP%]:active{transform:translateY(0)}.text-muted[_ngcontent-%COMP%]{color:#94a3b8;font-size:12px}']}),p})();const Wa=["columnChooserBtn"];function Qa(a,p){if(1&a&&(e.j41(0,"mat-option",18),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG();e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}const Ka=["columnChooserBtn"];function Za(a,p){if(1&a&&(e.j41(0,"mat-option",18),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG();e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}const tl=["columnChooserBtn"];function nl(a,p){if(1&a&&(e.j41(0,"mat-option",18),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG();e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}const il=["columnChooserBtn"];function rl(a,p){if(1&a&&(e.j41(0,"mat-option",18),e.EFF(1),e.k0s()),2&a){const r=p.$implicit,t=e.XpG();e.Y8G("value",r.year),e.R7$(),e.SpI(" ",t.sharedService.transformYearToFyFormat(r.year)," ")}}const al=[{path:"",component:ie,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"dashboard",component:Je,canActivate:[re]},{path:"position-requisition-form",component:ue.D},{path:"position-requisition-table",component:Yr},{path:"candidate-list-and-status",component:io},{path:"candidate",component:fe.q},{path:"resume-screening",component:Vs},{path:"schedule-interview",component:yr},{path:"pre-onboarding-documents",component:Ir.q},{path:"evaluation",component:Ss.m},{path:"reports",component:Fr,children:[{path:"manpower-vs-actual",component:_s},{path:"interview-status",component:Is},{path:"tat-report",component:Ws},{path:"master-report",component:fs},{path:"recruitment-tracker",component:(()=>{var a;class p{constructor(t,n,o,i,s,d,u){this.httpService=t,this.config=n,this.encryptionService=o,this.sharedService=i,this.toastr=s,this.recruitmentService=d,this.dataRefreshService=u,this.destroy$=new Z.B,this.agColumnDefs=[],this.agRowData=[],this.isClicked=!1,this.gridOptions={pagination:!1,rowHeight:42,popupParent:document.querySelector("body"),defaultColDef:{flex:1,minWidth:130,resizable:!0,sortable:!0,filter:!0,cellStyle:{border:"1px solid #dde2eb"}}
1,localeText:{noRowsToShow:"No records found"},postProcessPopup:g=>{var m;if("columnChooser"!==g.type)return;const l=null===(m=this.columnChooserBtn)||void 0===m?void 0:m.nativeElement,f=g.ePopup;if(!l||!f)return;const h=l.getBoundingClientRect();f.style.top=`${h.bottom+window.scrollY+4}px`,f.style.left="auto",f.style.right=document.documentElement.clientWidth-h.right+"px"},suppressCellFocus:!0,suppressRowTransform:!0,onFilterChanged:()=>{var g,m;null===(g=this.gridApi)||void 0===g||g.refreshCells({force:!0}),null===(m=this.gridApi)||void 0===m||m.redrawRows()},getRowClass:g=>{var m,l,f,h,v;const k=null!==(m=null===(l=g.node)||void 0===l?void 0:l.rowIndex)&&void 0!==m?m:-1;if(-1===k)return"";const B=null===(f=this.gridApi)||void 0===f?void 0:f.getDisplayedRowAtIndex(k+1);return B&&(null===(h=B.data)||void 0===h?void 0:h._groupId)===(null===(v=g.data)||void 0===v?void 0:v._groupId)?"":"group-last-row"}},this.searchTerm="",this.recruitmentYears=[],this.selectedYearForRecruitment="",this.buttonColorName=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsMD=!1}ngOnInit(){this.initializeSessionData(),this.setAgColumnDefs(),this.getPmsYearList(),this.dataRefreshService.refreshNeeded$.pipe((0,Q.B)(300),(0,L.Q)(this.destroy$)).subscribe(()=>{this.initializeSessionData(),this.getPmsYearList()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null},n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsMD=this.loggedInUserRoles.some(o=>"MD"===o.displayName),this.buttonColorName=sessionStorage.getItem("buttonColorName")}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}getRowSpan(t){var n,o,i;const s=null!==(n=null===(o=t.node)||void 0===o?void 0:o.rowIndex)&&void 0!==n?n:-1;if(-1===s||!this.gridApi)return 1;const d=null===(i=t.data)||void 0===i?void 0:i._groupId;if(s>0){var u;const f=this.gridApi.getDisplayedRowAtIndex(s-1);if((null==f||null===(u=f.data)||void 0===u?void 0:u._groupId)===d)return 1}let g=1,m=s+1;for(;;){var l;const f=this.gridApi.getDisplayedRowAtIndex(m);if(!f||(null===(l=f.data)||void 0===l?void 0:l._groupId)!==d)break;g++,m++}return g}isFirstInSpan(t){var n,o,i,s;const d=null!==(n=null===(o=t.node)||void 0===o?void 0:o.rowIndex)&&void 0!==n?n:-1;if(0===d||!this.gridApi)return!0;const u=this.gridApi.getDisplayedRowAtIndex(d-1);return(null==u||null===(i=u.data)||void 0===i?void 0:i._groupId)!==(null===(s=t.data)||void 0===s?void 0:s._groupId)}setAgColumnDefs(){const n=o=>({...o,rowSpan:i=>this.getRowSpan(i),cellClassRules:{"row-span-cell":i=>this.isFirstInSpan(i)},cellStyle:i=>{const s={border:"1px solid #dde2eb"};return this.isFirstInSpan(i)?{...s,height:42*this.getRowSpan(i)+"px",display:"flex",alignItems:"center",overflow:"visible",zIndex:2,backgroundColor:"#fff",borderBottom:"none"}:{...s,visibility:"hidden"}}});this.agColumnDefs=[n({headerName:"Position Name",field:"positionName",minWidth:160}),n({headerName:"Dept",field:"department",minWidth:150}),n({headerName:"Hiring Manager",field:"hiringManagerName",minWidth:180}),n({headerName:"Location",field:"location",minWidth:150}),n({headerName:"Position Category",field:"positionCategory",minWidth:150}),n({headerName:"Against Whom",field:"againstWhom",minWidth:160,valueFormatter:o=>o.value||"\u2014"}),n({headerName:"No. of Openings",field:"noOfOpenings",width:130}),n({headerName:"Priority",field:"priority",width:110,cellRenderer:o=>{if(!o.value)return'<span class="text-muted">\u2014</span>';const i=o.value.toLowerCase();return`<span class="priority-badge ${"high"===i?"priority-high":"medium"===i?"priority-medium":"priority-low"}">${o.value}</span>`}}),n({headerName:"Approve Status",field:"approveStatus",minWidth:130,cellRenderer:o=>{if(!o.value)return'<span class="text-muted">\u2014</span>';const i=o.value.toLowerCase().trim();return`<span class="status-badge-report ${"approved"===i?"status-selected":"rejected"===i?"status-rejected":"on hold"===i?"status-process":"status-pending"}">${o.value}</span>`}}),n({headerName:"Position Opened Date",field:"positionOpeningDate",minWidth:175,valueFormatter:o=>this.formatDate(o.value)}),n({headerName:"Target Closure Date",field:"targetClosingDate",minWidth:175,valueFormatter:o=>this.formatDate(o.value)}),n({headerName:"Sourcing Channel",field:"sourcingChannel",minWidth:180}),n({headerName:"Recruiter",field:"recruiterName",minWidth:150}),n({headerName:"No of Candidates Sourced",field:"noOfCandidatesSourced",width:160}),n({headerName:"No of Candidates Screened",field:"noOfCandidatesScreened",width:165}),n({headerName:"No of Interviews Scheduled",field:"noOfInterviewsScheduled",width:170}),n({headerName:"No of Offers Made",field:"noOfOffersMade",width:140,valueFormatter:o=>{var i;return null!==(i=o.value)&&void 0!==i?i:"0"}}),n({headerName:"No of Offers Accepted",field:"noOfOffersAccepted",width:150,valueFormatter:o=>{var i;return null!==(i=o.value)&&void 0!==i?i:"0"}}),{headerName:"Joiner Name",field:"joinerName",minWidth:160,cellStyle:{border:"1px solid #dde2eb"}},{headerName:"Joining Date",field:"joiningDate",minWidth:140,valueFormatter:o=>
1this.formatDate(o.value),cellStyle:{border:"1px solid #dde2eb"}},{headerName:"Time to Offer",field:"timeToOffer",width:130,cellStyle:{border:"1px solid #dde2eb"},valueFormatter:o=>null!=o.value?String(o.value):""},{headerName:"Time to Fill",field:"timeToFill",width:120,cellStyle:{border:"1px solid #dde2eb"},valueFormatter:o=>null!=o.value?String(o.value):""}]}onGridReady(t){this.gridApi=t.api}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}getPmsYearList(){if(!this.loggedInUserCompanyID)return void this.toastr.error("Company ID not found. Cannot fetch fiscal years.");const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;if(null!=n&&n.status&&null!=n&&null!==(o=n.data)&&void 0!==o&&o.yearRanges){this.recruitmentYears=(0,O.tN)(n.data.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)}else this.toastr.error("Failed to load fiscal years.")},n=>{console.error("Error fetching fiscal years:",n),this.toastr.error("Error fetching fiscal years.")})}setSelectedYear(t){var n,o;const i=this.recruitmentYears.find(s=>s.year===t);this.selectedYearForRecruitment=i?i.year:null!==(n=null===(o=this.recruitmentYears[0])||void 0===o?void 0:o.year)&&void 0!==n?n:"",this.fetchRecruitmentTrackerData()}onYearChange(t){this.selectedYearForRecruitment=t,this.fetchRecruitmentTrackerData()}fetchRecruitmentTrackerData(){if(!this.loggedInUserCompanyID||!this.selectedYearForRecruitment)return void(this.agRowData=[]);const t=["Super Admin","HR Admin"].includes(this.loggedInUserRole)||this.loggedInUserRoleIsMD;let n=this.recruitmentService.appendChildId(`${this.config.getPositionSummary}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}`);t||(n+=`&userHodIds=${this.loggedInUserId}&userHodRole=${this.loggedInUserRole}`),this.httpService.callGetService(n).subscribe({next:o=>{if(o.status&&Array.isArray(o.data)){const i=[];o.data.forEach((s,d)=>{var u;(null!==(u=s.joiners)&&void 0!==u&&u.length?s.joiners:[{}]).forEach(m=>{i.push({_groupId:d,positionName:s.positionName,department:s.department,location:s.location,approveStatus:s.approveStatus,positionOpeningDate:s.positionOpeningDate,targetClosingDate:s.TargetClosingDate,positionCategory:s.positionCategory,againstWhom:s.vacantUserName,priority:s.priority,sourcingChannel:s.sourcingChannel,hiringManagerName:s.hiringManagerName,noOfOpenings:s.noOfOpenings,noOfCandidatesSourced:s.noOfCandidatesSourced,noOfCandidatesScreened:s.noOfCandidatesScreened,noOfInterviewsScheduled:s.noOfInterviewsScheduled,noOfOffersMade:s.noOfOffersMade,recruiterName:s.recruiterName,noOfOffersAccepted:s.noOfOffersAccepted,joinerName:m.joinerName||"",joiningDate:m.joiningDate||"",timeToOffer:m.timeToOffer,timeToFill:m.timeToFill||""})})}),this.agRowData=i}else this.agRowData=[];this.gridApi&&this.gridApi.setGridOption("rowData",this.agRowData)},error:o=>{console.error("Error fetching recruitment tracker data:",o),this.toastr.error("Failed to load recruitment tracker data."),this.agRowData=[]}})}filterRecruitmentTracker(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}refreshGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.deselectAll(),this.gridApi.refreshCells()),this.fetchRecruitmentTrackerData()}formatDate(t){if(!t)return"";let n;if(/^\d{2}-\d{2}-\d{4}$/.test(t)){const[o,i,s]=t.split("-").map(Number);n=new Date(s,i-1,o)}else n=new Date(t);return new K.vh("en-US").transform(n,"dd/MM/yyyy")||""}downloadRecruitmentTracker(){if(!this.gridApi)return;const t=[];if(this.gridApi.forEachNodeAfterFilterAndSort(B=>t.push(B.data)),!t.length)return void this.toastr.warning("No data available to download.");const o=[["Position Name","Dept","Hiring Manager","Location","Position Category","Against Whom","No. of Openings","Priority","Approve Status","Position Opened Date","Target Closure Date","Sourcing Channel","Recruiter","No of Candidates Sourced","No of Candidates Screened","No of Interviews Scheduled","No of Offers Made","No of Offers Accepted","Joiner Name","Joining Date","Time to Offer","Time to Fill"]],i=[];let s=0;for(;s<t.length;){const B=o.length,de=t[s]._groupId;let ae=s;for(;ae<t.length&&t[ae]._groupId===de;){var d,u,g,m,l,f;const se=t[ae];o.push([se.positionName||"",se.department||"",se.hiringManagerName||"",se.location||"",se.positionCategory||"",se.againstWhom||"",null!==(d=se.noOfOpenings)&&void 0!==d?d:"",se.priority||"",se.approveStatus||"",this.formatDate(se.positionOpeningDate),this.formatDate(se.targetClosingDate),se.sourcingChannel||"",se.recruiterName||"",null!==(u=se.noOfCandidatesSourced)&&void 0!==u?u:"",null!==(g=se.noOfCandidatesScreened)&&void 0!==g?g:"",null!==(m=se.noOfInterviewsScheduled)&&void 0!==m?m:"",null!==(l=se.noOfOffersMade)&&void 0!==l?l:"",null!==(f=se.noOfOffersAccepted)&&void 0!==f?f:"",se.joinerName||"",this.formatDate(se.joiningDate),se.timeToOffer,se.timeToFill||""]),ae++}const me=o.length-1;if(me>B)for(let se=0;se<18;se++)i.push({s:{r:B,c:se},e:{r:me,c:se}});s=ae}const h=F.utils.aoa_to_sheet(o);h["!merges"]=i;const k=F.write({Sheets:{"Recruitment Tracker":h},SheetNames:["Recruitment Tracker"]},{bookType:"xlsx",type:"array"});U.saveAs(new Blob([k],{type:"application/octet-stream"}),`RecruitmentTracker_${this.selectedYearForRecruitment}.xlsx`)}downloadVisibleColumns(){if(!this.gridApi)return;
1const t=this.gridApi.getAllDisplayedColumns().map(l=>l.getColDef()).filter(l=>l.headerName&&l.field&&"Actions"!==l.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=[];this.gridApi.forEachNodeAfterFilterAndSort(l=>i.push(l.data));const s=i.slice(n*o,(n+1)*o);if(!s.length)return void this.toastr.info("No data to download for this page.","Info");const d=s.map(l=>{const f={};for(const h of t){let v;if("function"==typeof h.valueFormatter)v=h.valueFormatter({value:l[h.field],data:l});else if("function"==typeof h.valueGetter)try{v=h.valueGetter({data:l})}catch{v=l[h.field]}else v=l[h.field];null==v?v="":"object"==typeof v&&(v=Object.values(v).join(", ")),f[h.headerName]=String(v)}return f}),g={Sheets:{Data:F.utils.json_to_sheet(d)},SheetNames:["Data"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Export_Visible_Page_${n+1}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU($.d),e.rXU(q.tw),e.rXU(I.W),e.rXU(C.N))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-recruitment-tracker"]],viewQuery:function(t,n){if(1&t&&e.GBs(Wa,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},decls:22,vars:10,consts:[["columnChooserBtn",""],[1,"container","mb-20","mt-20"],[1,"cardBox","mb-20"],[1,"filter-bar","mb-10"],["size","auto",1,"ml-10","mt-20"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],[1,"d-flex","align-center","justify-content-flex-end","mt-20"],[1,"mat-height40","mat-input-style","small-field","mr-10"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["title","Download",1,"icon-action-btn","material-icons","mr-10",3,"click"],["title","Refresh",1,"icon-action-btn","material-icons","ml-5","mr-10",3,"click","animationend"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5","mr-10",3,"click"],[1,"material-icons"],[1,"grid-wrapper","p-10"],[1,"ag-theme-quartz",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],[3,"value"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"ion-row",3)(3,"ion-col",4)(4,"mat-form-field",5)(5,"mat-icon",6),e.EFF(6,"search"),e.k0s(),e.j41(7,"input",7),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.filterRecruitmentTracker())}),e.k0s()()(),e.j41(8,"ion-col",8)(9,"mat-form-field",9)(10,"mat-select",10),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.selectedYearForRecruitment,s)||(n.selectedYearForRecruitment=s),e.Njj(s)}),e.bIt("selectionChange",function(s){return e.eBV(o),e.Njj(n.onYearChange(s.value))}),e.DNE(11,Qa,2,2,"mat-option",11),e.k0s()(),e.j41(12,"span",12),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(13,"download"),e.k0s(),e.j41(14,"span",13),e.bIt("click",function(){return e.eBV(o),n.refreshGrid(),e.Njj(n.isClicked=!0)})("animationend",function(){return e.eBV(o),e.Njj(n.isClicked=!1)}),e.EFF(15,"refresh"),e.k0s(),e.j41(16,"button",14,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(18,"span",15),e.EFF(19,"tune"),e.k0s()()()(),e.j41(20,"div",16)(21,"ag-grid-angular",17),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))}),e.k0s()()()()}2&t&&(e.R7$(7),e.R50("ngModel",n.searchTerm),e.R7$(3),e.R50("ngModel",n.selectedYearForRecruitment),e.R7$(),e.Y8G("ngForOf",n.recruitmentYears),e.R7$(3),e.AVh("clicked",n.isClicked),e.R7$(2),e.xc7("background-color",n.buttonColorName),e.R7$(5),e.Y8G("rowData",n.agRowData)("columnDefs",n.agColumnDefs)("gridOptions",n.gridOptions))},dependencies:[K.Sq,y.me,y.BC,y.vS,J.hU,J.ln,R.rl,R.JW,he.VO,pe.wT,M.fg,x.An,G.xs],styles:['.container[_ngcontent-%COMP%]{--background: #f6f5fb;padding:0 15px}.cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.mat-height40[_ngcontent-%COMP%]{height:40px!important}
1.small-field[_ngcontent-%COMP%]{width:200px}[_nghost-%COMP%] .ag-theme-quartz{--ag-header-background-color: #DDDDDD;--ag-header-foreground-color: #000;--ag-row-hover-color: #f8fafc;--ag-selected-row-background-color: #f1f5f9;--ag-font-size: 13px;--ag-font-family: "OpenSans-Regular", sans-serif;--ag-border-color: #e2e8f0;--ag-row-border-style: solid;--ag-row-border-width: 1px;--ag-row-border-color: #e2e8f0;--ag-column-separator-display: block;--ag-column-separator-color: #d1d5db;--ag-column-separator-height: 50%;--ag-header-column-separator-display: block;--ag-header-column-separator-color: #d1d5db;--ag-header-column-separator-height: 50%;border:1px solid #e2e8f0;border-radius:8px}[_nghost-%COMP%] .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell{display:flex;align-items:center;justify-content:center;padding-left:12px!important;padding-right:12px!important;border-right:1px solid #e2e8f0!important;border-bottom:1px solid #e2e8f0!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell .ag-cell-value, [_nghost-%COMP%] .ag-theme-quartz .ag-cell .ag-cell-wrapper{display:flex;align-items:center;justify-content:center;height:100%;width:100%}[_nghost-%COMP%] .ag-theme-quartz .ag-cell.row-span-cell{overflow:visible!important;background-color:#fff;border-bottom:none!important;z-index:2;align-items:center!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell.row-span-cell .ag-cell-value, [_nghost-%COMP%] .ag-theme-quartz .ag-cell.row-span-cell .ag-cell-wrapper{align-items:center!important}[_nghost-%COMP%] .ag-theme-quartz .ag-row.group-last-row .ag-cell{border-bottom:2px solid #94a3b8!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=jobTitle], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=hiringManagerName], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=department], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=recruiterName], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=positionCategory], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=sourcingChannel], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=joinerName]{justify-content:flex-start}[_nghost-%COMP%] .status-badge-report{display:inline-flex;align-items:center;padding:6px 14px;border-radius:8px;font-size:11px;font-weight:700;text-transform:capitalize;min-width:90px;justify-content:center;line-height:1;letter-spacing:.3px;box-shadow:0 2px 4px #0000000a;transition:all .2s cubic-bezier(.4,0,.2,1);border:1px solid transparent}[_nghost-%COMP%] .status-badge-report:hover{transform:translateY(-1.5px);box-shadow:0 4px 6px #00000014}[_nghost-%COMP%] .status-selected{background:color-mix(in srgb,#22c55e,white 88%);color:#15803d;border-color:color-mix(in srgb,#22c55e,white 75%)}[_nghost-%COMP%] .status-rejected{background:color-mix(in srgb,#ef4444,white 88%);color:#b91c1c;border-color:color-mix(in srgb,#ef4444,white 75%)}[_nghost-%COMP%] .status-scheduled{background:color-mix(in srgb,#3b82f6,white 88%);color:#1d4ed8;border-color:color-mix(in srgb,#3b82f6,white 75%)}[_nghost-%COMP%] .status-evaluated{background:color-mix(in srgb,#a855f7,white 88%);color:#7e22ce;border-color:color-mix(in srgb,#a855f7,white 75%)}[_nghost-%COMP%] .status-process{background:color-mix(in srgb,#eab308,white 88%);color:#854d0e;border-color:color-mix(in srgb,#eab308,white 75%)}[_nghost-%COMP%] .status-pending{background:#f1f5f9;color:#475569;border-color:#e2e8f0}[_nghost-%COMP%] .priority-badge{padding:4px 10px;border-radius:6px;font-size:10px;font-weight:700;text-transform:uppercase}[_nghost-%COMP%] .priority-high{background:#fee2e2;color:#991b1b}[_nghost-%COMP%] .priority-medium{background:#fef3c7;color:#92400e}[_nghost-%COMP%] .priority-low{background:#f0fdf4;color:#166534}.icon-action-btn[_ngcontent-%COMP%]{border:1px solid #f3820e;color:#f3820e;border-radius:6px;background-color:#fff;height:38px;width:38px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease-in-out}.icon-action-btn[_ngcontent-%COMP%]:hover{background:#fff8f1;transform:translateY(-1px);box-shadow:0 2px 4px #f3820e26}.text-muted[_ngcontent-%COMP%]{color:#94a3b8;font-size:12px}']}),p})()},{path:"recruitment-metrics",component:(()=>{var a;class p{constructor(t,n,o,i,s,d,u){this.httpService=t,this.config=n,this.encryptionService=o,this.sharedService=i,this.toastr=s,this.recruitmentService=d,this.dataRefreshService=u,this.destroy$=new Z.B,this.agColumnDefs=[],this.agRowData=[],this.gridOptions={pagination:!0,paginationPageSize:10,paginationPageSizeSelector:[5,10,25,50,75,100,200,500,1e3],suppressCellFocus:!0,popupParent:document.querySelector("body"),defaultColDef:{flex:1,minWidth:150,resizable:!0,sortable:!0,filter:!0}
1,localeText:{noRowsToShow:"No records found"},postProcessPopup:g=>{var m;if("columnChooser"!==g.type)return;const l=null===(m=this.columnChooserBtn)||void 0===m?void 0:m.nativeElement,f=g.ePopup;if(!l||!f)return;const h=l.getBoundingClientRect();f.style.top=`${h.bottom+window.scrollY+4}px`,f.style.left="auto",f.style.right=document.documentElement.clientWidth-h.right+"px"},suppressRowTransform:!0},this.searchTerm="",this.recruitmentYears=[],this.selectedYearForRecruitment="",this.selectedMonth="",this.buttonColorName=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsEmployee=!1,this.loggedInUserRoleIsMD=!1,this.intHODempCode=null}ngOnInit(){this.initializeSessionData(),this.setAgColumnDefs(),this.getPmsYearList(),this.dataRefreshService.refreshNeeded$.pipe((0,Q.B)(300),(0,L.Q)(this.destroy$)).subscribe(()=>{this.initializeSessionData(),this.getPmsYearList()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null},n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsEmployee=1===this.loggedInUserRoles.length&&"Employee"===this.loggedInUserRoles[0].displayName,this.loggedInUserRoleIsMD=this.loggedInUserRoles.some(o=>"MD"===o.displayName),this.intHODempCode=sessionStorage.getItem("empCode"),this.buttonColorName=sessionStorage.getItem("buttonColorName")}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}setAgColumnDefs(){this.agColumnDefs=[{headerName:"Position Category",field:"positionCategory",pinned:"left",minWidth:150},{headerName:"Position Applied For",field:"positionAppliedFor",minWidth:200},{headerName:"Screening %",field:"screeningPercentage",valueFormatter:t=>this.formatPercent(t.value)},{headerName:"Interview %",field:"interviewedPercentage",valueFormatter:t=>this.formatPercent(t.value)},{headerName:"Offer %",field:"offerPercentage",valueFormatter:t=>this.formatPercent(t.value)}]}formatPercent(t){return null==t||isNaN(t)?"0%":`${Number(t).toFixed(1)}%`}onGridReady(t){this.gridApi=t.api}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}getPmsYearList(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.recruitmentYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.recruitmentYears.find(o=>o.year===t);n?this.selectedYearForRecruitment=n.year:this.recruitmentYears.length>0&&(this.selectedYearForRecruitment=this.recruitmentYears[0].year),this.fetchMetrics()}onYearChange(t){this.selectedYearForRecruitment=t,this.fetchMetrics()}fetchMetrics(){if(!this.loggedInUserCompanyID||!this.selectedYearForRecruitment)return;const t=["Super Admin","HR Admin"].includes(this.loggedInUserRole)||this.loggedInUserRoleIsMD;let n=this.recruitmentService.appendChildId(`${this.config.getRecruitmentAnalytics}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}`);t||(n+=`&userHodIds=${this.loggedInUserId}&userHodRole=${this.loggedInUserRole}`),this.httpService.callGetService(n).subscribe({next:o=>{this.agRowData=o.status&&Array.isArray(o.data)?o.data:[]},error:o=>{console.error("Error loading metrics:",o),this.toastr.error("Failed to load recruitment metrics."),this.agRowData=[]}})}filterMetrics(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}refreshGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.deselectAll(),this.gridApi.refreshCells()),this.fetchMetrics()}downloadMetrics(){if(!this.gridApi)return;const t=this.gridApi.paginationGetPageSize(),n=this.gridApi.paginationGetCurrentPage(),o=n*t,i=o+t,s=[];if(this.gridApi.forEachNodeAfterFilterAndSort((l,f)=>{f>=o&&f<i&&s.push(l.data)}),!s.length)return void this.toastr.warning("No data available to download for the current page.");const d=s.map(l=>({"Position Category":l.positionCategory||"","Position Applied For":l.positionAppliedFor||"","Screening %":this.formatPercent(l.screeningPercentage),"Interview %":this.formatPercent(l.interviewedPercentage),"Offer %":this.formatPercent(l.offerPercentage)})),g={Sheets:{"Recruitment Metrics":F.utils.json_to_sheet(d)},SheetNames:["Recruitment Metrics"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`RecruitmentMetrics_Page_${n+1}_${this.selectedYearForRecruitment}.xlsx`)}downloadVisibleColumns(){if(!this.gridApi)return;
1const t=this.gridApi.getAllDisplayedColumns().map(l=>l.getColDef()).filter(l=>l.headerName&&l.field&&"Actions"!==l.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=[];this.gridApi.forEachNodeAfterFilterAndSort(l=>i.push(l.data));const s=i.slice(n*o,(n+1)*o);if(!s.length)return void this.toastr.info("No data to download for this page.","Info");const d=s.map(l=>{const f={};for(const h of t){let v;if("function"==typeof h.valueGetter)try{v=h.valueGetter({data:l})}catch{v=l[h.field]}else v=l[h.field];null==v?v="":"object"==typeof v&&(v=Object.values(v).join(", ")),f[h.headerName]=String(v)}return f}),g={Sheets:{Data:F.utils.json_to_sheet(d)},SheetNames:["Data"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Export_Visible_Page_${n+1}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU($.d),e.rXU(q.tw),e.rXU(I.W),e.rXU(C.N))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-recruitment-metrics"]],viewQuery:function(t,n){if(1&t&&e.GBs(Ka,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},decls:22,vars:8,consts:[["columnChooserBtn",""],[1,"container","mb-20","mt-20"],[1,"cardBox","mb-20"],[1,"filter-bar","mb-10"],["size","auto",1,"ml-10","mt-20"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],[1,"d-flex","align-center","justify-content-flex-end","mt-20"],[1,"mat-height40","mat-input-style","small-field","mr-10"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["title","Download",1,"icon-action-btn","material-icons","mr-10",3,"click"],["title","Refresh",1,"icon-action-btn","material-icons","ml-5","mr-10",3,"click"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5","mr-10",3,"click"],[1,"material-icons"],[1,"grid-wrapper","p-10"],[1,"ag-theme-quartz",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],[3,"value"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"ion-row",3)(3,"ion-col",4)(4,"mat-form-field",5)(5,"mat-icon",6),e.EFF(6,"search"),e.k0s(),e.j41(7,"input",7),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.filterMetrics())}),e.k0s()()(),e.j41(8,"ion-col",8)(9,"mat-form-field",9)(10,"mat-select",10),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.selectedYearForRecruitment,s)||(n.selectedYearForRecruitment=s),e.Njj(s)}),e.bIt("selectionChange",function(s){return e.eBV(o),e.Njj(n.onYearChange(s.value))}),e.DNE(11,Za,2,2,"mat-option",11),e.k0s()(),e.j41(12,"span",12),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(13,"download"),e.k0s(),e.j41(14,"span",13),e.bIt("click",function(){return e.eBV(o),e.Njj(n.refreshGrid())}),e.EFF(15,"refresh"),e.k0s(),e.j41(16,"button",14,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(18,"span",15),e.EFF(19,"tune"),e.k0s()()()(),e.j41(20,"div",16)(21,"ag-grid-angular",17),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))}),e.k0s()()()()}2&t&&(e.R7$(7),e.R50("ngModel",n.searchTerm),e.R7$(3),e.R50("ngModel",n.selectedYearForRecruitment),e.R7$(),e.Y8G("ngForOf",n.recruitmentYears),e.R7$(5),e.xc7("background-color",n.buttonColorName),e.R7$(5),e.Y8G("rowData",n.agRowData)("columnDefs",n.agColumnDefs)("gridOptions",n.gridOptions))},dependencies:[K.Sq,y.me,y.BC,y.vS,J.hU,J.ln,R.rl,R.JW,he.VO,pe.wT,M.fg,x.An,G.xs],styles:['.container[_ngcontent-%COMP%]{--background: #f6f5fb;padding:0 15px}.cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.mat-height40[_ngcontent-%COMP%]{height:40px!important}
1.small-field[_ngcontent-%COMP%]{width:200px}[_nghost-%COMP%] .ag-theme-quartz{--ag-header-background-color: #DDDDDD;--ag-header-foreground-color: #000;--ag-row-hover-color: #f8fafc;--ag-selected-row-background-color: #f1f5f9;--ag-font-size: 13px;--ag-font-family: "OpenSans-Regular", sans-serif;--ag-border-color: #e2e8f0;border:1px solid #e2e8f0;border-radius:8px}[_nghost-%COMP%] .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell{display:flex;align-items:center;justify-content:center;padding-left:12px!important;padding-right:12px!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell .ag-cell-value, [_nghost-%COMP%] .ag-theme-quartz .ag-cell .ag-cell-wrapper{display:flex;align-items:center;justify-content:center;height:100%;width:100%}[_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=jobTitle]{justify-content:flex-start}.icon-action-btn[_ngcontent-%COMP%]{border:1px solid #f3820e;color:#f3820e;border-radius:6px;background-color:#fff;height:38px;width:38px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease-in-out}.icon-action-btn[_ngcontent-%COMP%]:hover{background:#fff8f1;transform:translateY(-1px);box-shadow:0 2px 4px #f3820e26}.text-muted[_ngcontent-%COMP%]{color:#94a3b8;font-size:12px}']}),p})()},{path:"channel-data",component:(()=>{var a;class p{constructor(t,n,o,i,s,d,u){this.httpService=t,this.config=n,this.encryptionService=o,this.sharedService=i,this.toastr=s,this.recruitmentService=d,this.dataRefreshService=u,this.destroy$=new Z.B,this.agColumnDefs=[],this.agRowData=[],this.gridOptions={pagination:!0,paginationPageSize:10,paginationPageSizeSelector:[5,10,25,50,75,100,200,500,1e3],suppressCellFocus:!0,popupParent:document.querySelector("body"),defaultColDef:{flex:1,minWidth:150,resizable:!0,sortable:!0,filter:!0},localeText:{noRowsToShow:"No records found"},postProcessPopup:g=>{var m;if("columnChooser"!==g.type)return;const l=null===(m=this.columnChooserBtn)||void 0===m?void 0:m.nativeElement,f=g.ePopup;if(!l||!f)return;const h=l.getBoundingClientRect();f.style.top=`${h.bottom+window.scrollY+4}px`,f.style.left="auto",f.style.right=document.documentElement.clientWidth-h.right+"px"}},this.searchTerm="",this.recruitmentYears=[],this.selectedYearForRecruitment="",this.buttonColorName=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsMD=!1,this.intHODempCode=null}ngOnInit(){this.initializeSessionData(),this.setAgColumnDefs(),this.getPmsYearList(),this.dataRefreshService.refreshNeeded$.pipe((0,Q.B)(300),(0,L.Q)(this.destroy$)).subscribe(()=>{this.initializeSessionData(),this.getPmsYearList()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null},n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsMD=this.loggedInUserRoles.some(o=>"MD"===o.displayName),this.intHODempCode=sessionStorage.getItem("empCode"),this.buttonColorName=sessionStorage.getItem("buttonColorName")}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}setAgColumnDefs(){this.agColumnDefs=[{headerName:"Position Category",field:"positionCategory",pinned:"left"},{headerName:"Position Name",field:"jobTitle"},{headerName:"Channel",field:"channel"},{headerName:"Candidates Sourced",field:"candidateSourced"},{headerName:"Candidates Screened",field:"candidateScreened"},{headerName:"Interviews Conducted",field:"interviewsConducted"},{headerName:"Offers Made",field:"offersMade"},{headerName:"Joinings",field:"joinings"}]}onGridReady(t){this.gridApi=t.api}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}getPmsYearList(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.recruitmentYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.recruitmentYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year),this.fetchChannelData()}onYearChange(t){this.selectedYearForRecruitment=t,this.fetchChannelData()}fetchChannelData(){if(!this.loggedInUserCompanyID||!this.selectedYearForRecruitment)return;let t=this.recruitmentService.appendChildId(`${this.config.getRecruitmentSourceAnalytics}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}`);["Super Admin","HR Admin"].includes(this.loggedInUserRole)||this.loggedInUserRoleIsM
1D||(t+=`&userHodIds=${this.loggedInUserId}&userHodRole=${this.loggedInUserRole}`),this.httpService.callGetService(t).subscribe({next:o=>{this.agRowData=o.status&&Array.isArray(o.data)?o.data:[]},error:o=>{console.error("Error loading channel data:",o),this.toastr.error("Failed to load channel data."),this.agRowData=[]}})}filterData(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}refreshGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.deselectAll(),this.gridApi.refreshCells()),this.fetchChannelData()}downloadExcel(){if(!this.gridApi)return;const t=this.gridApi.paginationGetPageSize(),n=this.gridApi.paginationGetCurrentPage(),o=n*t,i=o+t,s=[];if(this.gridApi.forEachNodeAfterFilterAndSort((f,h)=>{h>=o&&h<i&&s.push(f.data)}),!s.length)return void this.toastr.warning("No data available to download for the current page.");const d=s.map(f=>({"Position Category":f.positionCategory||"","Position Name":f.jobTitle||"",Channel:f.channel||"","Candidates Sourced":f.candidateSourced||0,"Candidates Screened":f.candidateScreened||0,"Interviews Conducted":f.interviewsConducted||0,"Offers Made":f.offersMade||0,Joinings:f.joinings||0})),g={Sheets:{"Channel Data":F.utils.json_to_sheet(d)},SheetNames:["Channel Data"]},m=F.write(g,{bookType:"xlsx",type:"array"}),l=new Blob([m],{type:"application/octet-stream"});U.saveAs(l,`ChannelData_Page_${n+1}_${this.selectedYearForRecruitment}.xlsx`)}downloadVisibleColumns(){if(!this.gridApi)return;const t=this.gridApi.getAllDisplayedColumns().map(l=>l.getColDef()).filter(l=>l.headerName&&l.field&&"Actions"!==l.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=[];this.gridApi.forEachNodeAfterFilterAndSort(l=>i.push(l.data));const s=i.slice(n*o,(n+1)*o);if(!s.length)return void this.toastr.info("No data to download for this page.","Info");const d=s.map(l=>{const f={};for(const h of t){let v;if("function"==typeof h.valueGetter)try{v=h.valueGetter({data:l})}catch{v=l[h.field]}else v=l[h.field];null==v?v="":"object"==typeof v&&(v=Object.values(v).join(", ")),f[h.headerName]=String(v)}return f}),g={Sheets:{Data:F.utils.json_to_sheet(d)},SheetNames:["Data"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Export_Visible_Page_${n+1}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU($.d),e.rXU(q.tw),e.rXU(I.W),e.rXU(C.N))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-channel-data"]],viewQuery:function(t,n){if(1&t&&e.GBs(tl,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},decls:22,vars:8,consts:[["columnChooserBtn",""],[1,"container","mb-20","mt-20"],[1,"cardBox","mb-20"],[1,"filter-bar","mb-10"],["size","auto",1,"ml-10","mt-20"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],[1,"d-flex","align-center","justify-content-flex-end","mt-20"],[1,"mat-height40","mat-input-style","small-field","mr-10"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["title","Download",1,"icon-action-btn","material-icons","mr-10",3,"click"],["title","Refresh",1,"icon-action-btn","material-icons","ml-5","mr-10",3,"click"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5","mr-10",3,"click"],[1,"material-icons"],[1,"grid-wrapper","p-10"],[1,"ag-theme-quartz",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],[3,"value"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"ion-row",3)(3,"ion-col",4)(4,"mat-form-field",5)(5,"mat-icon",6),e.EFF(6,"search"),e.k0s(),e.j41(7,"input",7),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.filterData())}),e.k0s()()(),e.j41(8,"ion-col",8)(9,"mat-form-field",9)(10,"mat-select",10),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.selectedYearForRecruitment,s)||(n.selectedYearForRecruitment=s),e.Njj(s)}),e.bIt("selectionChange",function(s){return e.eBV(o),e.Njj(n.onYearChange(s.value))}),e.DNE(11,nl,2,2,"mat-option",11),e.k0s()(),e.j41(12,"span",12),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(13,"download"),e.k0s(),e.j41(14,"span",13),e.bIt("click",function(){return e.eBV(o),e.Njj(n.refreshGrid())}),e.EFF(15,"refresh"),e.k0s(),e.j41(16,"button",14,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(18,"span",15),e.EFF(19,"tune"),e.k0s()()()(),e.j41(20,"div",16)(21,"ag-grid-angular",17),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))}),e.k0s()()()()}2&t&&(e.R7$(7),e.R50("ngModel",n.searchTerm),e.R7$(3),e.R50("ngModel",n.selectedYearForRecruitment),e.R7$(),e.Y8G("ngForOf",n.recruitmentYears),e.R7$(5),e.xc7("background-color",n.buttonColorName),e.R7$(5),e.Y8G("rowData",n.agRowData)("columnDefs",n.agColumnDefs)("gridOptions",n.gridOptions))},dependencies:[K.Sq,y.me,y.BC,y.vS,J.hU,J.ln,R.rl,R.JW,he.VO,pe.wT,M.fg,x.An,G.xs],styles:['.container[_ngcontent-%COMP%]{--background: #f6f5fb;padding:0 15px}.cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.mat-height40[_ngcontent-%COMP%]{height:40px!important}
1.small-field[_ngcontent-%COMP%]{width:200px}[_nghost-%COMP%] .ag-theme-quartz{--ag-header-background-color: #DDDDDD;--ag-header-foreground-color: #000;--ag-row-hover-color: #f8fafc;--ag-selected-row-background-color: #f1f5f9;--ag-font-size: 13px;--ag-font-family: "OpenSans-Regular", sans-serif;--ag-border-color: #e2e8f0;border:1px solid #e2e8f0;border-radius:8px}[_nghost-%COMP%] .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell{display:flex;align-items:center;justify-content:center;padding-left:12px!important;padding-right:12px!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell .ag-cell-value, [_nghost-%COMP%] .ag-theme-quartz .ag-cell .ag-cell-wrapper{display:flex;align-items:center;justify-content:center;height:100%;width:100%}[_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=jobTitle], [_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=channel]{justify-content:flex-start}.icon-action-btn[_ngcontent-%COMP%]{border:1px solid #f3820e;color:#f3820e;border-radius:6px;background-color:#fff;height:38px;width:38px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease-in-out}.icon-action-btn[_ngcontent-%COMP%]:hover{background:#fff8f1;transform:translateY(-1px);box-shadow:0 2px 4px #f3820e26}']}),p})()},{path:"channel-effectivness",component:(()=>{var a;class p{constructor(t,n,o,i,s,d,u){this.httpService=t,this.config=n,this.encryptionService=o,this.sharedService=i,this.toastr=s,this.recruitmentService=d,this.dataRefreshService=u,this.destroy$=new Z.B,this.agColumnDefs=[],this.agRowData=[],this.gridOptions={pagination:!0,paginationPageSize:10,paginationPageSizeSelector:[5,10,25,50,75,100,200,500,1e3],suppressCellFocus:!0,popupParent:document.querySelector("body"),defaultColDef:{flex:1,minWidth:130,resizable:!0,sortable:!0,filter:!0},localeText:{noRowsToShow:"No records found"},postProcessPopup:g=>{var m;if("columnChooser"!==g.type)return;const l=null===(m=this.columnChooserBtn)||void 0===m?void 0:m.nativeElement,f=g.ePopup;if(!l||!f)return;const h=l.getBoundingClientRect();f.style.top=`${h.bottom+window.scrollY+4}px`,f.style.left="auto",f.style.right=document.documentElement.clientWidth-h.right+"px"}},this.searchTerm="",this.recruitmentYears=[],this.selectedYearForRecruitment="",this.buttonColorName=null,this.loggedInUserCompanyID=null,this.loggedInCompanyFiscalyear=null,this.loggedInUserId=null,this.loggedInUserRole=null,this.loggedInUserRoles=[],this.loggedInUserRoleIsMD=!1}ngOnInit(){this.initializeSessionData(),this.setAgColumnDefs(),this.getPmsYearList(),this.dataRefreshService.refreshNeeded$.pipe((0,Q.B)(300),(0,L.Q)(this.destroy$)).subscribe(()=>{this.initializeSessionData(),this.getPmsYearList()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}initializeSessionData(){const t=o=>{const i=sessionStorage.getItem(o);return i?this.encryptionService.decryptData(i):null},n=sessionStorage.getItem("loggedInUserCompanyID");this.loggedInUserCompanyID=n?Number(this.encryptionService.decryptData(n)):null,this.loggedInUserId=sessionStorage.getItem("loggedInUserId"),this.loggedInCompanyFiscalyear=t("loggedInCompanyFiscalyear"),this.loggedInUserRole=t("loggedInUserRole"),this.loggedInUserRoles=JSON.parse(sessionStorage.getItem("loggedInUserRoles")||"[]"),this.loggedInUserRoleIsMD=this.loggedInUserRoles.some(o=>"MD"===o.displayName),this.buttonColorName=sessionStorage.getItem("buttonColorName")}openColumnChooser(){var t;null===(t=this.gridApi)||void 0===t||t.showColumnChooser()}setAgColumnDefs(){const t=n=>null!=n.value?`${Number(n.value).toFixed(1)}%`:"-";this.agColumnDefs=[{headerName:"Position Category",field:"positionCategory",pinned:"left"},{headerName:"Position Name",field:"jobTitle"},{headerName:"Channel",field:"channel"},{headerName:"Total Sourced",field:"totalSourced"},{headerName:"Total Screened",field:"totalScreened"},{headerName:"Screening %",field:"screeningPercentage",valueFormatter:t},{headerName:"Total Interviews",field:"totalInterviews"},{headerName:"Interview %",field:"interviewPercentage",valueFormatter:t},{headerName:"Total Offers",field:"totalOffers"},{headerName:"Offer %",field:"offerPercentage",valueFormatter:t},{headerName:"Total Joinings",field:"totalJoinings"},{headerName:"Joining %",field:"joiningPercentage",valueFormatter:t}]}onGridReady(t){this.gridApi=t.api}onFilterIconClick(t){const n=t.target;if(!n.closest(".ag-filter-icon"))return;const o=n.closest(".ag-header-cell"),i=null==o?void 0:o.querySelector(".ag-header-cell-menu-button");i&&(t.stopPropagation(),i.click())}getPmsYearList(){const t=this.recruitmentService.appendChildId(this.config.getpmsyearlist+this.loggedInUserCompanyID);this.httpService.callGetService(t).subscribe(n=>{var o;this.recruitmentYears=(0,O.tN)(null==n||null===(o=n.data)||void 0===o?void 0:o.yearRanges,this.loggedInCompanyFiscalyear);const{fiscalStartYear:i,fiscalEndYear:s}=(0,O.O)(this.loggedInCompanyFiscalyear);this.setSelectedYear(`${i}-${s}`)})}setSelectedYear(t){const n=this.recruitmentYears.find(o=>o.year===t);n&&(this.selectedYearForRecruitment=n.year),this.fetchEffectivenessData()}onYearChange(t){this.selectedYearForRecruitment=t,this.fetchEffectivenessData()}onMonthChange(t){this.fetchEffectivenessData()}fetchEffectivenessData(){if(!this.loggedInUserCompanyID||!this.selectedYearForRecruitment)return;let t=this.recruitmentService.appendChildId(`${this.config.getRecruitmentFunnelAnalytics}?companyId=${this.loggedInUserCompanyID}&fiscalYear=${this.selectedYearForRecruitment}`);["Super Admin","HR Admin"].includes(this.loggedInUserRole)||this.loggedInUserRoleIsM
1D||(t+=`&userHodIds=${this.loggedInUserId}&userHodRole=${this.loggedInUserRole}`),this.httpService.callGetService(t).subscribe({next:o=>{this.agRowData=o.status&&Array.isArray(o.data)?o.data:[]},error:o=>{console.error("Error loading funnel data:",o),this.toastr.error("Failed to load funnel data."),this.agRowData=[]}})}filterData(){this.gridApi&&this.gridApi.setGridOption("quickFilterText",this.searchTerm)}refreshGrid(){this.searchTerm="",this.gridApi&&(this.gridApi.setGridOption("quickFilterText",""),this.gridApi.setFilterModel(null),this.gridApi.resetColumnState(),this.gridApi.deselectAll(),this.gridApi.refreshCells()),this.fetchEffectivenessData()}downloadExcel(){if(!this.gridApi)return;const t=this.gridApi.paginationGetPageSize(),n=this.gridApi.paginationGetCurrentPage(),o=n*t,i=o+t,s=[];if(this.gridApi.forEachNodeAfterFilterAndSort((f,h)=>{h>=o&&h<i&&s.push(f.data)}),!s.length)return void this.toastr.warning("No data available to download for the current page.");const d=s.map(f=>({"Position Category":f.positionCategory||"","Position Name":f.jobTitle||"",Channel:f.channel||"","Total Sourced":f.totalSourced||0,"Total Screened":f.totalScreened||0,"Screening %":`${(f.screeningPercentage||0).toFixed(1)}%`,"Total Interviews":f.totalInterviews||0,"Interview %":`${(f.interviewPercentage||0).toFixed(1)}%`,"Total Offers":f.totalOffers||0,"Offer %":`${(f.offerPercentage||0).toFixed(1)}%`,"Total Joinings":f.totalJoinings||0,"Joining %":`${(f.joiningPercentage||0).toFixed(1)}%`})),g={Sheets:{"Channel Effectiveness":F.utils.json_to_sheet(d)},SheetNames:["Channel Effectiveness"]},m=F.write(g,{bookType:"xlsx",type:"array"}),l=new Blob([m],{type:"application/octet-stream"});U.saveAs(l,`ChannelEffectiveness_Page_${n+1}_${this.selectedYearForRecruitment}.xlsx`)}downloadVisibleColumns(){if(!this.gridApi)return;const t=this.gridApi.getAllDisplayedColumns().map(l=>l.getColDef()).filter(l=>l.headerName&&l.field&&"Actions"!==l.headerName),n=this.gridApi.paginationGetCurrentPage(),o=this.gridApi.paginationGetPageSize(),i=[];this.gridApi.forEachNodeAfterFilterAndSort(l=>i.push(l.data));const s=i.slice(n*o,(n+1)*o);if(!s.length)return void this.toastr.info("No data to download for this page.","Info");const d=s.map(l=>{const f={};for(const h of t){let v;if("function"==typeof h.valueGetter)try{v=h.valueGetter({data:l})}catch{v=l[h.field]}else v=l[h.field];null==v?v="":"object"==typeof v&&(v=Object.values(v).join(", ")),f[h.headerName]=String(v)}return f}),g={Sheets:{Data:F.utils.json_to_sheet(d)},SheetNames:["Data"]},m=F.write(g,{bookType:"xlsx",type:"array"});U.saveAs(new Blob([m],{type:"application/octet-stream"}),`Export_Visible_Page_${n+1}.xlsx`)}}return(a=p).\u0275fac=function(t){return new(t||a)(e.rXU(c.k),e.rXU(_.T),e.rXU(S.L),e.rXU($.d),e.rXU(q.tw),e.rXU(I.W),e.rXU(C.N))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-channel-effectivness"]],viewQuery:function(t,n){if(1&t&&e.GBs(il,5),2&t){let o;e.mGM(o=e.lsd())&&(n.columnChooserBtn=o.first)}},decls:22,vars:8,consts:[["columnChooserBtn",""],[1,"container","mb-20","mt-20"],[1,"cardBox","mb-20"],[1,"filter-bar","mb-10"],["size","auto",1,"ml-10","mt-20"],[1,"mat-height40","mat-input-style","small-field"],["matPrefix",""],["matInput","","type","search","placeholder","Search",3,"ngModelChange","input","ngModel"],[1,"d-flex","align-center","justify-content-flex-end","mt-20"],[1,"mat-height40","mat-input-style","small-field","mr-10"],["placeholder","Year",3,"ngModelChange","selectionChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],["title","Download",1,"icon-action-btn","material-icons","mr-10",3,"click"],["title","Refresh",1,"icon-action-btn","material-icons","ml-5","mr-10",3,"click"],["title","Choose Columns",1,"customMaterialIcon","fs-14","tableHeadingBtn","ml-5","mr-10",3,"click"],[1,"material-icons"],[1,"grid-wrapper","p-10"],[1,"ag-theme-quartz",2,"width","100%","height","600px",3,"gridReady","click","rowData","columnDefs","gridOptions"],[3,"value"]],template:function(t,n){if(1&t){const o=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"ion-row",3)(3,"ion-col",4)(4,"mat-form-field",5)(5,"mat-icon",6),e.EFF(6,"search"),e.k0s(),e.j41(7,"input",7),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.searchTerm,s)||(n.searchTerm=s),e.Njj(s)}),e.bIt("input",function(){return e.eBV(o),e.Njj(n.filterData())}),e.k0s()()(),e.j41(8,"ion-col",8)(9,"mat-form-field",9)(10,"mat-select",10),e.mxI("ngModelChange",function(s){return e.eBV(o),e.DH7(n.selectedYearForRecruitment,s)||(n.selectedYearForRecruitment=s),e.Njj(s)}),e.bIt("selectionChange",function(s){return e.eBV(o),e.Njj(n.onYearChange(s.value))}),e.DNE(11,rl,2,2,"mat-option",11),e.k0s()(),e.j41(12,"span",12),e.bIt("click",function(){return e.eBV(o),e.Njj(n.downloadVisibleColumns())}),e.EFF(13,"download"),e.k0s(),e.j41(14,"span",13),e.bIt("click",function(){return e.eBV(o),e.Njj(n.refreshGrid())}),e.EFF(15,"refresh"),e.k0s(),e.j41(16,"button",14,0),e.bIt("click",function(){return e.eBV(o),e.Njj(n.openColumnChooser())}),e.j41(18,"span",15),e.EFF(19,"tune"),e.k0s()()()(),e.j41(20,"div",16)(21,"ag-grid-angular",17),e.bIt("gridReady",function(s){return e.eBV(o),e.Njj(n.onGridReady(s))})("click",function(s){return e.eBV(o),e.Njj(n.onFilterIconClick(s))}),e.k0s()()()()}2&t&&(e.R7$(7),e.R50("ngModel",n.searchTerm),e.R7$(3),e.R50("ngModel",n.selectedYearForRecruitment),e.R7$(),e.Y8G("ngForOf",n.recruitmentYears),e.R7$(5),e.xc7("background-color",n.buttonColorName),e.R7$(5),e.Y8G("rowData",n.agRowData)("columnDefs",n.agColumnDefs)("gridOptions",n.gridOptions))},dependencies:[K.Sq,y.me,y.BC,y.vS,J.hU,J.ln,R.rl,R.JW,he.VO,pe.wT,M.fg,x.An,G.xs],styles:['.container[_ngcontent-%COMP%]{--background: #f6f5fb;padding:0 15px}.cardBox[_ngcontent-%COMP%]{background:#fff;box-shadow:0 3px 6px #00000029;border-radius:10px;padding-bottom:20px;height:-moz-fit-content;height:fit-content}.mat-height40[_ngcontent-%COMP%]{height:40px!important}
1.small-field[_ngcontent-%COMP%]{width:200px}[_nghost-%COMP%] .ag-theme-quartz{--ag-header-background-color: #DDDDDD;--ag-header-foreground-color: #000;--ag-row-hover-color: #f8fafc;--ag-selected-row-background-color: #f1f5f9;--ag-font-size: 13px;--ag-font-family: "OpenSans-Regular", sans-serif;--ag-border-color: #e2e8f0;border:1px solid #e2e8f0;border-radius:8px}[_nghost-%COMP%] .ag-theme-quartz .ag-header-cell-label{justify-content:center;font-weight:700!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell{display:flex;align-items:center;justify-content:center;padding-left:12px!important;padding-right:12px!important}[_nghost-%COMP%] .ag-theme-quartz .ag-cell .ag-cell-value, [_nghost-%COMP%] .ag-theme-quartz .ag-cell .ag-cell-wrapper{display:flex;align-items:center;justify-content:center;height:100%;width:100%}[_nghost-%COMP%] .ag-theme-quartz .ag-cell[col-id=channel]{justify-content:flex-start}.icon-action-btn[_ngcontent-%COMP%]{border:1px solid #f3820e;color:#f3820e;border-radius:6px;background-color:#fff;height:38px;width:38px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease-in-out}.icon-action-btn[_ngcontent-%COMP%]:hover{background:#fff8f1;transform:translateY(-1px);box-shadow:0 2px 4px #f3820e26}']}),p})()},{path:"",redirectTo:"manpower-vs-actual",pathMatch:"full"}]},{path:"setup",component:Vr,children:[{path:"",redirectTo:"proficiency-and-question",pathMatch:"full"},{path:"proficiency-and-question",component:ps},{path:"rating-definition",component:Tt},{path:"onboarding",component:gs.f},{path:"technical-interview",component:Gs},{path:"job-platform",component:ra},{path:"consultant",component:Ha},{path:"mails",component:la},{path:"system-settings",component:da.K}]}]}];let ll=(()=>{var a;class p{}return(a=p).\u0275fac=function(t){return new(t||a)},a.\u0275mod=e.$C({type:a}),a.\u0275inj=e.G2t({imports:[De.iI.forChild(al),De.iI]}),p})();var dl=Y(48292),cl=Y(82765),ul=Y(93887),pl=Y(79753),gl=Y(92938),ml=Y(36471),hl=Y(67575),fl=Y(75263);const vl={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};var bl=Y(88057),_l=Y(65571),Cl=Y(4056),yl=Y(5951),Il=Y(32087),Sl=Y(71997);let wl=(()=>{var a;class p{}return(a=p).\u0275fac=function(t){return new(t||a)},a.\u0275mod=e.$C({type:a}),a.\u0275inj=e.G2t({providers:[{provide:pe.Ju,useValue:"en-GB"},{provide:pe.MJ,useClass:fl.QH},{provide:pe.de,useValue:vl},I.W],imports:[K.MD,y.YN,J.bv,ll,R.RG,he.Ve,pe.Sy,cl.g7,Ke.O.forRoot(),y.X1,gt.X6,M.fS,pe.WX,x.m_,ul.G,b.hM,Ae.Hl,Ge.Cn,w.RI,St.tP,Lt.NQ,Yt.Ou,V.uc,_t.jL,pl.gS,ml.YN,hl.PO,bl.T_,_l.Vg,z.mV,nt.D6,Cl.Qt,Vt.b,yl.Wk,bt.MY,Il.b,gl.I,dl.d,G.$V,Sl.w]}),p})()},79402:(kt,wt,Y)=>{var K,y;self,kt.exports=(K=Y(20246),y=Y(7239),function(){var J={
1"./src/plugin/hyperlinks.js": 2/*!**********************************!*\ 3 !*** ./src/plugin/hyperlinks.js ***! 4 \**********************************/function(e,S,c){"use strict";c.r(S),c( 5/*! core-js/modules/web.dom-collections.for-each.js */ 6"./node_modules/core-js/modules/web.dom-collections.for-each.js"),c( 7/*! core-js/modules/es.string.link.js */ 8"./node_modules/core-js/modules/es.string.link.js");var w=c( 9/*! ../worker.js */ 10"./src/worker.js"),D=c( 11/*! ../utils.js */ 12"./src/utils.js"),j=[],P={toContainer:w.default.prototype.toContainer,toPdf:w.default.prototype.toPdf};w.default.prototype.toContainer=function(){return P.toContainer.call(this).then(function(){if(this.opt.enableLinks){var N=this.prop.container,X=N.querySelectorAll("a"),ee=(0,D.unitConvert)(N.getBoundingClientRect(),this.prop.pageSize.k);j=[],Array.prototype.forEach.call(X,function(ie){for(var Z=ie.getClientRects(),Q=0;Q<Z.length;Q++){var L=(0,D.unitConvert)(Z[Q],this.prop.pageSize.k);L.left-=ee.left,L.top-=ee.top;var O=Math.floor(L.top/this.prop.pageSize.inner.height)+1;j.push({page:O,top:this.opt.margin[0]+L.top%this.prop.pageSize.inner.height,left:this.opt.margin[1]+L.left,clientRect:L,link:ie})}},this)}})},w.default.prototype.toPdf=function(){return P.toPdf.call(this).then(function(){if(this.opt.enableLinks){j.forEach(function(X){this.prop.pdf.setPage(X.page),this.prop.pdf.link(X.left,X.top,X.clientRect.width,X.clientRect.height,{url:X.link.href})},this);var N=this.prop.pdf.internal.getNumberOfPages();this.prop.pdf.setPage(N)}})}},
12"./src/plugin/jspdf-plugin.js": 13/*!************************************!*\ 14 !*** ./src/plugin/jspdf-plugin.js ***! 15 \************************************/function(e,S,c){"use strict";c.r(S),c( 16/*! core-js/modules/es.symbol.js */ 17"./node_modules/core-js/modules/es.symbol.js"),c( 18/*! core-js/modules/es.symbol.description.js */ 19"./node_modules/core-js/modules/es.symbol.description.js"),c( 20/*! core-js/modules/es.object.to-string.js */ 21"./node_modules/core-js/modules/es.object.to-string.js"),c( 22/*! core-js/modules/es.symbol.iterator.js */ 23"./node_modules/core-js/modules/es.symbol.iterator.js"),c( 24/*! core-js/modules/es.array.iterator.js */ 25"./node_modules/core-js/modules/es.array.iterator.js"),c( 26/*! core-js/modules/es.string.iterator.js */ 27"./node_modules/core-js/modules/es.string.iterator.js"),c( 28/*! core-js/modules/web.dom-collections.iterator.js */ 29"./node_modules/core-js/modules/web.dom-collections.iterator.js");var Z=c( 30/*! jspdf */ 31"jspdf");function L(O){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(U){return typeof U}:function(U){return U&&"function"==typeof Symbol&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U})(O)}Z.jsPDF.getPageSize=function(O,F,U){if("object"===L(O)){var V=O;O=V.orientation,F=V.unit||F,U=V.format||U}F=F||"mm",U=U||"a4",O=(""+(O||"P")).toLowerCase();var ne=(""+U).toLowerCase(),q={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(F){case"pt":var $=1;break;case"mm":$=72/25.4;break;case"cm":$=72/2.54;break;case"in":$=72;break;case"px":$=.75;break;case"pc":case"em":$=12;break;case"ex":$=6;break;default:throw"Invalid unit: "+F}if(q.hasOwnProperty(ne))var R=q[ne][1]/$,M=q[ne][0]/$;else try{R=U[1],M=U[0]}catch{throw new Error("Invalid format: "+U)}if("p"===O||"portrait"===O){if(O="p",M>R){var x=M;M=R,R=x}}else{if("l"!==O&&"landscape"!==O)throw"Invalid orientation: "+O;O="l",R>M&&(x=M,M=R,R=x)}return{width:M,height:R,unit:F,k:$}},S.default=Z.jsPDF},
vendor: 2,492 bytes, lines 31-48
31"./src/plugin/pagebreaks.js": 32/*!**********************************!*\ 33 !*** ./src/plugin/pagebreaks.js ***! 34 \**********************************/function(e,S,c){"use strict";c.r(S),c( 35/*! core-js/modules/es.array.concat.js */ 36"./node_modules/core-js/modules/es.array.concat.js"),c( 37/*! core-js/modules/es.array.slice.js */ 38"./node_modules/core-js/modules/es.array.slice.js"),c( 39/*! core-js/modules/es.array.join.js */ 40"./node_modules/core-js/modules/es.array.join.js"),c( 41/*! core-js/modules/web.dom-collections.for-each.js */ 42"./node_modules/core-js/modules/web.dom-collections.for-each.js"),c( 43/*! core-js/modules/es.object.keys.js */ 44"./node_modules/core-js/modules/es.object.keys.js");var N=c( 45/*! ../worker.js */ 46"./src/worker.js"),X=c( 47/*! ../utils.js */ 48"./src/utils.js"),ee={toContainer:N.default.prototype.toContainer};N.default.template.opt.pagebreak={mode:["css","legacy"],before:[],after:[],avoid:[]},N.default.prototype.toContainer=function(){return ee.toContainer.call(this).then(function(){var Q=this.prop.container,L=this.prop.pageSize.inner.px.height,O=[].concat(this.opt.pagebreak.mode),F={avoidAll:-1!==O.indexOf("avoid-all"),css:-1!==O.indexOf("css"),legacy:-1!==O.indexOf("legacy")},U={},V=this;["before","after","avoid"].forEach(function($){U[$]=F.avoidAll&&"avoid"===$?[]:[].concat(V.opt.pagebreak[$]||[]),U[$].length>0&&(U[$]=Array.prototype.slice.call(Q.querySelectorAll(U[$].join(", "))))});var ne=Q.querySelectorAll(".html2pdf__page-break");ne=Array.prototype.slice.call(ne);var q=Q.querySelectorAll("*");Array.prototype.forEach.call(q,function(R){var M={before:!1,after:F.legacy&&-1!==ne.indexOf(R),avoid:F.avoidAll};if(F.css){var x=window.getComputedStyle(R),z=["always","page","left","right"];M={before:M.before||-1!==z.indexOf(x.breakBefore||x.pageBreakBefore),after:M.after||-1!==z.indexOf(x.breakAfter||x.pageBreakAfter),avoid:M.avoid||-1!==["avoid","avoid-page"].indexOf(x.breakInside||x.pageBreakInside)}}Object.keys(M).forEach(function(xe){M[xe]=M[xe]||-1!==U[xe].indexOf(R)});var te=R.getBoundingClientRect();if(M.avoid&&!M.before){var be=Math.floor(te.top/L),Re=Math.floor(te.bottom/L),ye=Math.abs(te.bottom-te.top)/L;Re!==be&&ye<=1&&(M.before=!0)}if(M.before){var Ie=(0,X.createElement)("div",{style:{display:"block",height:L-te.top%L+"px"}});R.parentNode.insertBefore(Ie,R)}M.after&&(Ie=(0,X.createElement)("div",{style:{display:"block",height:L-te.bottom%L+"px"}}),R.parentNode.insertBefore(Ie,R.nextSibling))})})}},
48"./src/utils.js": 49/*!**********************!*\ 50 !*** ./src/utils.js ***! 51 \**********************/function(e,S,c){"use strict";function L(q){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(R){return typeof R}:function(R){return R&&"function"==typeof Symbol&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(q)}c.r(S),c.d(S,{objType:function(){return O},createElement:function(){return F},cloneNode:function(){return U},unitConvert:function(){return V},toPx:function(){return ne}}),c( 52/*! core-js/modules/es.number.constructor.js */ 53"./node_modules/core-js/modules/es.number.constructor.js"),c( 54/*! core-js/modules/es.symbol.js */ 55"./node_modules/core-js/modules/es.symbol.js"),c( 56/*! core-js/modules/es.symbol.description.js */ 57"./node_modules/core-js/modules/es.symbol.description.js"),c( 58/*! core-js/modules/es.object.to-string.js */ 59"./node_modules/core-js/modules/es.object.to-string.js"),c( 60/*! core-js/modules/es.symbol.iterator.js */ 61"./node_modules/core-js/modules/es.symbol.iterator.js"),c( 62/*! core-js/modules/es.array.iterator.js */ 63"./node_modules/core-js/modules/es.array.iterator.js"),c( 64/*! core-js/modules/es.string.iterator.js */ 65"./node_modules/core-js/modules/es.string.iterator.js"),c( 66/*! core-js/modules/web.dom-collections.iterator.js */ 67"./node_modules/core-js/modules/web.dom-collections.iterator.js");var O=function($){var R=L($);return"undefined"===R?"undefined":"string"===R||$ instanceof String?"string":"number"===R||$ instanceof Number?"number":"function"===R||$ instanceof Function?"function":$&&$.constructor===Array?"array":$&&1===$.nodeType?"element":"object"===R?"object":"unknown"},F=function($,R){var M=document.createElement($);if(R.className&&(M.className=R.className),R.innerHTML){M.innerHTML=R.innerHTML;for(var x=M.getElementsByTagName("script"),z=x.length;z-- >0;null)x[z].parentNode.removeChild(x[z])}for(var G in R.style)M.style[G]=R.style[G];return M},U=function q($,R){for(var M=3===$.nodeType?document.createTextNode($.nodeValue):$.cloneNode(!1),x=$.firstChild;x;x=x.nextSibling)(!0===R||1!==x.nodeType||"SCRIPT"!==x.nodeName)&&M.appendChild(q(x,R));return 1===$.nodeType&&("CANVAS"===$.nodeName?(M.width=$.width,M.height=$.height,M.getContext("2d").drawImage($,0,0)):("TEXTAREA"===$.nodeName||"SELECT"===$.nodeName)&&(M.value=$.value),M.addEventListener("load",function(){M.scrollTop=$.scrollTop,M.scrollLeft=$.scrollLeft},!0)),M},V=function($,R){if("number"===O($))return 72*$/96/R;var M={};for(var x in $)M[x]=72*$[x]/96/R;return M},ne=function($,R){return Math.floor($*R/72*96)}},
vendor: 8,583 bytes, lines 67-94
67"./src/worker.js": 68/*!***********************!*\ 69 !*** ./src/worker.js ***! 70 \***********************/function(e,S,c){"use strict";c.r(S),c( 71/*! core-js/modules/es.object.assign.js */ 72"./node_modules/core-js/modules/es.object.assign.js"),c( 73/*! core-js/modules/es.array.map.js */ 74"./node_modules/core-js/modules/es.array.map.js"),c( 75/*! core-js/modules/es.object.keys.js */ 76"./node_modules/core-js/modules/es.object.keys.js"),c( 77/*! core-js/modules/es.array.concat.js */ 78"./node_modules/core-js/modules/es.array.concat.js"),c( 79/*! core-js/modules/es.object.to-string.js */ 80"./node_modules/core-js/modules/es.object.to-string.js"),c( 81/*! core-js/modules/es.regexp.to-string.js */ 82"./node_modules/core-js/modules/es.regexp.to-string.js"),c( 83/*! core-js/modules/es.function.name.js */ 84"./node_modules/core-js/modules/es.function.name.js"),c( 85/*! core-js/modules/web.dom-collections.for-each.js */ 86"./node_modules/core-js/modules/web.dom-collections.for-each.js");var L=c( 87/*! jspdf */ 88"jspdf"),F=c( 89/*! html2canvas */ 90"html2canvas"),V=c( 91/*! ./utils.js */ 92"./src/utils.js"),ne=c( 93/*! es6-promise */ 94"./node_modules/es6-promise/dist/es6-promise.js"),$=c.n(ne)().Promise,R=function M(x){var z=Object.assign(M.convert($.resolve()),JSON.parse(JSON.stringify(M.template))),G=M.convert($.resolve(),z);return(G=G.setProgress(1,M,1,[M])).set(x)};(R.prototype=Object.create($.prototype)).constructor=R,R.convert=function(x,z){return x.__proto__=z||R.prototype,x},R.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],image:{type:"jpeg",quality:.95},enableLinks:!0,html2canvas:{},jsPDF:{}}},R.prototype.from=function(x,z){return this.then(function(){switch(z=z||function G(te){switch((0,V.objType)(te)){case"string":return"string";case"element":return te.nodeName.toLowerCase&&"canvas"===te.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(x)){case"string":return this.set({src:(0,V.createElement)("div",{innerHTML:x})});case"element":return this.set({src:x});case"canvas":return this.set({canvas:x});case"img":return this.set({img:x});default:return this.error("Unknown source type.")}})},R.prototype.to=function(x){switch(x){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},R.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var G={position:"fixed",overflow:"hidden",zIndex:1e3,left:0,right:0,bottom:0,top:0,backgroundColor:"rgba(0,0,0,0.8)"},te={position:"absolute",width:this.prop.pageSize.inner.width+this.prop.pageSize.unit,left:0,right:0,top:0,height:"auto",margin:"auto",backgroundColor:"white"};G.opacity=0;var be=(0,V.cloneNode)(this.prop.src,this.opt.html2canvas.javascriptEnabled);this.prop.overlay=(0,V.createElement)("div",{className:"html2pdf__overlay",style:G}),this.prop.container=(0,V.createElement)("div",{className:"html2pdf__container",style:te}),this.prop.container.appendChild(be),this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay)})},R.prototype.toCanvas=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(function(){var G=Object.assign({},this.opt.html2canvas);return delete G.onrendered,F(this.prop.container,G)}).then(function(G){(this.opt.html2canvas.onrendered||function(){})(G),this.prop.canvas=G,document.body.removeChild(this.prop.overlay)})},R.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var G=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=G})},R.prototype.toPdf=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var G=this.prop.canvas,te=this.opt,be=G.height,Re=Math.floor(G.width*this.prop.pageSize.inner.ratio),ye=Math.ceil(be/Re),Ie=this.prop.pageSize.inner.height,xe=document.createElement("canvas"),je=xe.getContext("2d");xe.width=G.width,xe.height=Re,this.prop.pdf=this.prop.pdf||new L.jsPDF(te.jsPDF);for(var Me=0;Me<ye;Me++){Me===ye-1&&be%Re!=0&&(xe.height=be%Re,Ie=xe.height*this.prop.pageSize.inner.width/xe.width);var _e=xe.width,Se=xe.height;je.fillStyle="white",je.fillRect(0,0,_e,Se),je.drawImage(G,0,Me*Re,_e,Se,0,0,_e,Se),Me&&this.prop.pdf.addPage();var Ee=xe.toDataURL("image/"+te.image.type,te.image.quality);this.prop.pdf.addImage(Ee,te.image.type,te.margin[1],te.margin[0],this.prop.pageSize.inner.width,Ie)}})},R.prototype.output=function(x,z,G){return"img"===(G=G||"pdf").toLowerCase()||"image"===G.toLowerCase()?this.outputImg(x,z):this.outputPdf(x,z)},R.prototype.outputPdf=function(x,z){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(x,z)})},R.prototype.outputImg=function(x,z){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(x){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+x+'" is not supported.'}})},R.prototype.save=function(x){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(x?{filename:x}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},R.prototype.set=function(x){if("object"!==(0,V.objType)(x))return this;var z=Object.keys(x||{}).map(function(G){switch(G){case"margin":return this.setMargin.bind(this,x.margin);case"jsPDF":return function(){return this.opt.jsPDF=x.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,x.pageSize);default:return G in R.template.prop?function(){this.prop[G]=x[G]}:function(){this.opt[G]=x[G]}}},this);return this.then(function(){return this.thenList(z)})},R.prototype.get=function(x,z){return this.then(function(){var te=x in R.template.prop?this.prop[x]:this.opt[x];return z?z(te):te})},R.prototype.setMargin=function(x){return this.then(function(){switch((0,V.objType)(x)){case"number":x=[x,x,x,x];case"array":if(2===x.length&&(x=[x[0],x[1],x[0],x[1]]),4===x.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=x}).then(this.setPageSize)},R.prototype.setPageSize=function(x){return this.then(function(){(x=x||L.jsPDF.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(x.inner={width:x.width-this.opt.margin[1]-this.opt.margin[3],height:x.height-this.opt.margin[0]-this.opt.margin[2]},x.inner.px={width:(0,V.toPx)(x.inner.width,x.k),height:(0,V.toPx)(x.inner.height,x.k)},x.inner.ratio=x.inner.height/x.inner.width),this.prop.pageSize=x})},R.prototype.setProgress=function(x,z,G,te){return null!=x&&(this.progress.val=x),null!=z&&(this.progress.state=z),null!=G&&(this.progress.n=G),null!=te&&(this.progress.stack=te),this.progress.ratio=this.progress.val/this.progress.state,this},R.prototype.updateProgress=function(x,z,G,te){return this.setProgress(x?this.progress.val+x:null,z||null,G?this.progress.n+G:null,te?this.progress.stack.concat(te):null)},R.prototype.then=function(x,z){var G=this;return this.thenCore(x,z,function(be,Re){return G.updateProgress(null,null,1,[be]),$.prototype.then.call(this,function(Ie){return G.updateProgress(null,be),Ie}).then(be,Re).then(function(Ie){return G.updateProgress(1),Ie})})},R.prototype.thenCore=function(x,z,G){G=G||$.prototype.then;var te=this;x&&(x=x.bind(te)),z&&(z=z.bind(te));var Re=-1!==$.toString().indexOf("[native code]")&&"Promise"===$.name?te:R.convert(Object.assign({},te),$.prototype),ye=G.call(Re,x,z);return R.convert(ye,te.__proto__)},R.prototype.thenExternal=function(x,z){return $.prototype.then.call(this,x,z)},R.prototype.thenList=function(x){var z=this;return x.forEach(function(te){z=z.thenCore(te)}),z},R.prototype.catch=function(M){M&&(M=M.bind(this));var x=$.prototype.catch.call(this,M);return R.convert(x,this)},R.prototype.catchExternal=function(x){return $.prototype.catch.call(this,x)},R.prototype.error=function(x){return this.then(function(){throw new Error(x)})},R.prototype.using=R.prototype.set,R.prototype.saveAs=R.prototype.save,R.prototype.exp
94ort=R.prototype.output,R.prototype.run=R.prototype.then,S.default=R},
vendor: 377 bytes, lines 94-97
94"./node_modules/core-js/internals/a-function.js": 95/*!******************************************************!*\ 96 !*** ./node_modules/core-js/internals/a-function.js ***! 97 \******************************************************/function(e){e.exports=function(S){if("function"!=typeof S)throw TypeError(String(S)+" is not a function");return S}},
vendor: 514 bytes, lines 97-102
97"./node_modules/core-js/internals/a-possible-prototype.js": 98/*!****************************************************************!*\ 99 !*** ./node_modules/core-js/internals/a-possible-prototype.js ***! 100 \****************************************************************/function(e,S,c){var _=c( 101/*! ../internals/is-object */ 102"./node_modules/core-js/internals/is-object.js");e.exports=function(C){if(!_(C)&&null!==C)throw TypeError("Can't set "+String(C)+" as a prototype");return C}},
vendor: 739 bytes, lines 102-111
102"./node_modules/core-js/internals/add-to-unscopables.js": 103/*!**************************************************************!*\ 104 !*** ./node_modules/core-js/internals/add-to-unscopables.js ***! 105 \**************************************************************/function(e,S,c){var _=c( 106/*! ../internals/well-known-symbol */ 107"./node_modules/core-js/internals/well-known-symbol.js"),C=c( 108/*! ../internals/object-create */ 109"./node_modules/core-js/internals/object-create.js"),b=c( 110/*! ../internals/object-define-property */ 111"./node_modules/core-js/internals/object-define-property.js"),I=_("unscopables"),w=Array.prototype;null==w[I]&&b.f(w,I,{configurable:!0,value:C(null)}),e.exports=function(D){w[I][D]=!0}},
vendor: 449 bytes, lines 111-116
111"./node_modules/core-js/internals/an-object.js": 112/*!*****************************************************!*\ 113 !*** ./node_modules/core-js/internals/an-object.js ***! 114 \*****************************************************/function(e,S,c){var _=c( 115/*! ../internals/is-object */ 116"./node_modules/core-js/internals/is-object.js");e.exports=function(C){if(!_(C))throw TypeError(String(C)+" is not an object");return C}},
vendor: 627 bytes, lines 116-123
116"./node_modules/core-js/internals/array-for-each.js": 117/*!**********************************************************!*\ 118 !*** ./node_modules/core-js/internals/array-for-each.js ***! 119 \**********************************************************/function(e,S,c){"use strict";var _=c( 120/*! ../internals/array-iteration */ 121"./node_modules/core-js/internals/array-iteration.js").forEach,b=c( 122/*! ../internals/array-method-is-strict */ 123"./node_modules/core-js/internals/array-method-is-strict.js")("forEach");e.exports=b?[].forEach:function(w){return _(this,w,arguments.length>1?arguments[1]:void 0)}},
vendor: 816 bytes, lines 123-132
123"./node_modules/core-js/internals/array-includes.js": 124/*!**********************************************************!*\ 125 !*** ./node_modules/core-js/internals/array-includes.js ***! 126 \**********************************************************/function(e,S,c){var _=c( 127/*! ../internals/to-indexed-object */ 128"./node_modules/core-js/internals/to-indexed-object.js"),C=c( 129/*! ../internals/to-length */ 130"./node_modules/core-js/internals/to-length.js"),b=c( 131/*! ../internals/to-absolute-index */ 132"./node_modules/core-js/internals/to-absolute-index.js"),I=function(w){return function(D,j,P){var X,A=_(D),E=C(A.length),N=b(P,E);if(w&&j!=j){for(;E>N;)if((X=A[N++])!=X)return!0}else for(;E>N;N++)if((w||N in A)&&A[N]===j)return w||N||0;return!w&&-1}};e.exports={includes:I(!0),indexOf:I(!1)}},
vendor: 1,307 bytes, lines 132-145
132"./node_modules/core-js/internals/array-iteration.js": 133/*!***********************************************************!*\ 134 !*** ./node_modules/core-js/internals/array-iteration.js ***! 135 \***********************************************************/function(e,S,c){var _=c( 136/*! ../internals/function-bind-context */ 137"./node_modules/core-js/internals/function-bind-context.js"),C=c( 138/*! ../internals/indexed-object */ 139"./node_modules/core-js/internals/indexed-object.js"),b=c( 140/*! ../internals/to-object */ 141"./node_modules/core-js/internals/to-object.js"),I=c( 142/*! ../internals/to-length */ 143"./node_modules/core-js/internals/to-length.js"),w=c( 144/*! ../internals/array-species-create */ 145"./node_modules/core-js/internals/array-species-create.js"),D=[].push,j=function(P){var A=1==P,E=2==P,N=3==P,X=4==P,ee=6==P,ie=7==P,Z=5==P||ee;return function(Q,L,O,F){for(var x,z,U=b(Q),V=C(U),ne=_(L,O,3),q=I(V.length),$=0,R=F||w,M=A?R(Q,q):E||ie?R(Q,0):void 0;q>$;$++)if((Z||$ in V)&&(z=ne(x=V[$],$,U),P))if(A)M[$]=z;else if(z)switch(P){case 3:return!0;case 5:return x;case 6:return $;case 2:D.call(M,x)}else switch(P){case 4:return!1;case 7:D.call(M,x)}return ee?-1:N||X?X:M}};e.exports={forEach:j(0),map:j(1),filter:j(2),some:j(3),every:j(4),find:j(5),findIndex:j(6),filterReject:j(7)}},
vendor: 798 bytes, lines 145-154
145"./node_modules/core-js/internals/array-method-has-species-support.js": 146/*!****************************************************************************!*\ 147 !*** ./node_modules/core-js/internals/array-method-has-species-support.js ***! 148 \****************************************************************************/function(e,S,c){var _=c( 149/*! ../internals/fails */ 150"./node_modules/core-js/internals/fails.js"),C=c( 151/*! ../internals/well-known-symbol */ 152"./node_modules/core-js/internals/well-known-symbol.js"),b=c( 153/*! ../internals/engine-v8-version */ 154"./node_modules/core-js/internals/engine-v8-version.js"),I=C("species");e.exports=function(w){return b>=51||!_(function(){var D=[];return(D.constructor={})[I]=function(){return{foo:1}},1!==D[w](Boolean).foo})}},
vendor: 519 bytes, lines 154-159
154"./node_modules/core-js/internals/array-method-is-strict.js": 155/*!******************************************************************!*\ 156 !*** ./node_modules/core-js/internals/array-method-is-strict.js ***! 157 \******************************************************************/function(e,S,c){"use strict";var _=c( 158/*! ../internals/fails */ 159"./node_modules/core-js/internals/fails.js");e.exports=function(C,b){var I=[][C];return!!I&&_(function(){I.call(null,b||function(){throw 1},1)})}},
vendor: 788 bytes, lines 159-168
159"./node_modules/core-js/internals/array-species-constructor.js": 160/*!*********************************************************************!*\ 161 !*** ./node_modules/core-js/internals/array-species-constructor.js ***! 162 \*********************************************************************/function(e,S,c){var _=c( 163/*! ../internals/is-object */ 164"./node_modules/core-js/internals/is-object.js"),C=c( 165/*! ../internals/is-array */ 166"./node_modules/core-js/internals/is-array.js"),I=c( 167/*! ../internals/well-known-symbol */ 168"./node_modules/core-js/internals/well-known-symbol.js")("species");e.exports=function(w){var D;return C(w)&&("function"!=typeof(D=w.constructor)||D!==Array&&!C(D.prototype)?_(D)&&null===(D=D[I])&&(D=void 0):D=void 0),void 0===D?Array:D}},
vendor: 490 bytes, lines 168-173
168"./node_modules/core-js/internals/array-species-create.js": 169/*!****************************************************************!*\ 170 !*** ./node_modules/core-js/internals/array-species-create.js ***! 171 \****************************************************************/function(e,S,c){var _=c( 172/*! ../internals/array-species-constructor */ 173"./node_modules/core-js/internals/array-species-constructor.js");e.exports=function(C,b){return new(_(C))(0===b?0:b)}},
vendor: 347 bytes, lines 173-176
173"./node_modules/core-js/internals/classof-raw.js": 174/*!*******************************************************!*\ 175 !*** ./node_modules/core-js/internals/classof-raw.js ***! 176 \*******************************************************/function(e){var S={}.toString;e.exports=function(c){return S.call(c).slice(8,-1)}},
vendor: 857 bytes, lines 176-185
176"./node_modules/core-js/internals/classof.js": 177/*!***************************************************!*\ 178 !*** ./node_modules/core-js/internals/classof.js ***! 179 \***************************************************/function(e,S,c){var _=c( 180/*! ../internals/to-string-tag-support */ 181"./node_modules/core-js/internals/to-string-tag-support.js"),C=c( 182/*! ../internals/classof-raw */ 183"./node_modules/core-js/internals/classof-raw.js"),I=c( 184/*! ../internals/well-known-symbol */ 185"./node_modules/core-js/internals/well-known-symbol.js")("toStringTag"),w="Arguments"==C(function(){return arguments}());e.exports=_?C:function(j){var P,A,E;return void 0===j?"Undefined":null===j?"Null":"string"==typeof(A=function(j,P){try{return j[P]}catch{}}(P=Object(j),I))?A:w?C(P):"Object"==(E=C(P))&&"function"==typeof P.callee?"Arguments":E}},
vendor: 853 bytes, lines 185-196
185"./node_modules/core-js/internals/copy-constructor-properties.js": 186/*!***********************************************************************!*\ 187 !*** ./node_modules/core-js/internals/copy-constructor-properties.js ***! 188 \***********************************************************************/function(e,S,c){var _=c( 189/*! ../internals/has */ 190"./node_modules/core-js/internals/has.js"),C=c( 191/*! ../internals/own-keys */ 192"./node_modules/core-js/internals/own-keys.js"),b=c( 193/*! ../internals/object-get-own-property-descriptor */ 194"./node_modules/core-js/internals/object-get-own-property-descriptor.js"),I=c( 195/*! ../internals/object-define-property */ 196"./node_modules/core-js/internals/object-define-property.js");e.exports=function(w,D){for(var j=C(D),P=I.f,A=b.f,E=0;E<j.length;E++){var N=j[E];_(w,N)||P(w,N,A(D,N))}}},
vendor: 532 bytes, lines 196-201
196"./node_modules/core-js/internals/correct-prototype-getter.js": 197/*!********************************************************************!*\ 198 !*** ./node_modules/core-js/internals/correct-prototype-getter.js ***! 199 \********************************************************************/function(e,S,c){var _=c( 200/*! ../internals/fails */ 201"./node_modules/core-js/internals/fails.js");e.exports=!_(function(){function C(){}return C.prototype.constructor=null,Object.getPrototypeOf(new C)!==C.prototype})},
vendor: 619 bytes, lines 201-208
201"./node_modules/core-js/internals/create-html.js": 202/*!*******************************************************!*\ 203 !*** ./node_modules/core-js/internals/create-html.js ***! 204 \*******************************************************/function(e,S,c){var _=c( 205/*! ../internals/require-object-coercible */ 206"./node_modules/core-js/internals/require-object-coercible.js"),C=c( 207/*! ../internals/to-string */ 208"./node_modules/core-js/internals/to-string.js"),b=/"/g;e.exports=function(I,w,D,j){var P=C(_(I)),A="<"+w;return""!==D&&(A+=" "+D+'="'+C(j).replace(b,""")+'"'),A+">"+P+"</"+w+">"}},
vendor: 1,001 bytes, lines 208-221
208"./node_modules/core-js/internals/create-iterator-constructor.js": 209/*!***********************************************************************!*\ 210 !*** ./node_modules/core-js/internals/create-iterator-constructor.js ***! 211 \***********************************************************************/function(e,S,c){"use strict";var _=c( 212/*! ../internals/iterators-core */ 213"./node_modules/core-js/internals/iterators-core.js").IteratorPrototype,C=c( 214/*! ../internals/object-create */ 215"./node_modules/core-js/internals/object-create.js"),b=c( 216/*! ../internals/create-property-descriptor */ 217"./node_modules/core-js/internals/create-property-descriptor.js"),I=c( 218/*! ../internals/set-to-string-tag */ 219"./node_modules/core-js/internals/set-to-string-tag.js"),w=c( 220/*! ../internals/iterators */ 221"./node_modules/core-js/internals/iterators.js"),D=function(){return this};e.exports=function(j,P,A){var E=P+" Iterator";return j.prototype=C(_,{next:b(1,A)}),I(j,E,!1,!0),w[E]=D,j}},
vendor: 762 bytes, lines 221-230
221"./node_modules/core-js/internals/create-non-enumerable-property.js": 222/*!**************************************************************************!*\ 223 !*** ./node_modules/core-js/internals/create-non-enumerable-property.js ***! 224 \**************************************************************************/function(e,S,c){var _=c( 225/*! ../internals/descriptors */ 226"./node_modules/core-js/internals/descriptors.js"),C=c( 227/*! ../internals/object-define-property */ 228"./node_modules/core-js/internals/object-define-property.js"),b=c( 229/*! ../internals/create-property-descriptor */ 230"./node_modules/core-js/internals/create-property-descriptor.js");e.exports=_?function(I,w,D){return C.f(I,w,b(1,D))}:function(I,w,D){return I[w]=D,I}},
vendor: 432 bytes, lines 230-233
230"./node_modules/core-js/internals/create-property-descriptor.js": 231/*!**********************************************************************!*\ 232 !*** ./node_modules/core-js/internals/create-property-descriptor.js ***! 233 \**********************************************************************/function(e){e.exports=function(S,c){return{enumerable:!(1&S),configurable:!(2&S),writable:!(4&S),value:c}}},
vendor: 706 bytes, lines 233-242
233"./node_modules/core-js/internals/create-property.js": 234/*!***********************************************************!*\ 235 !*** ./node_modules/core-js/internals/create-property.js ***! 236 \***********************************************************/function(e,S,c){"use strict";var _=c( 237/*! ../internals/to-property-key */ 238"./node_modules/core-js/internals/to-property-key.js"),C=c( 239/*! ../internals/object-define-property */ 240"./node_modules/core-js/internals/object-define-property.js"),b=c( 241/*! ../internals/create-property-descriptor */ 242"./node_modules/core-js/internals/create-property-descriptor.js");e.exports=function(I,w,D){var j=_(w);j in I?C.f(I,j,b(0,D)):I[j]=D}},
vendor: 2,297 bytes, lines 242-267
242"./node_modules/core-js/internals/define-iterator.js": 243/*!***********************************************************!*\ 244 !*** ./node_modules/core-js/internals/define-iterator.js ***! 245 \***********************************************************/function(e,S,c){"use strict";var _=c( 246/*! ../internals/export */ 247"./node_modules/core-js/internals/export.js"),C=c( 248/*! ../internals/create-iterator-constructor */ 249"./node_modules/core-js/internals/create-iterator-constructor.js"),b=c( 250/*! ../internals/object-get-prototype-of */ 251"./node_modules/core-js/internals/object-get-prototype-of.js"),I=c( 252/*! ../internals/object-set-prototype-of */ 253"./node_modules/core-js/internals/object-set-prototype-of.js"),w=c( 254/*! ../internals/set-to-string-tag */ 255"./node_modules/core-js/internals/set-to-string-tag.js"),D=c( 256/*! ../internals/create-non-enumerable-property */ 257"./node_modules/core-js/internals/create-non-enumerable-property.js"),j=c( 258/*! ../internals/redefine */ 259"./node_modules/core-js/internals/redefine.js"),P=c( 260/*! ../internals/well-known-symbol */ 261"./node_modules/core-js/internals/well-known-symbol.js"),A=c( 262/*! ../internals/is-pure */ 263"./node_modules/core-js/internals/is-pure.js"),E=c( 264/*! ../internals/iterators */ 265"./node_modules/core-js/internals/iterators.js"),N=c( 266/*! ../internals/iterators-core */ 267"./node_modules/core-js/internals/iterators-core.js"),X=N.IteratorPrototype,ee=N.BUGGY_SAFARI_ITERATORS,ie=P("iterator"),Z="keys",Q="values",L="entries",O=function(){return this};e.exports=function(F,U,V,ne,q,$,R){C(V,U,ne);var ye,Ie,xe,M=function(je){if(je===q&&be)return be;if(!ee&&je in G)return G[je];switch(je){case Z:case Q:case L:return function(){return new V(this,je)}}return function(){return new V(this)}},x=U+" Iterator",z=!1,G=F.prototype,te=G[ie]||G["@@iterator"]||q&&G[q],be=!ee&&te||M(q),Re="Array"==U&&G.entries||te;if(Re&&(ye=b(Re.call(new F)),X!==Object.prototype&&ye.next&&(!A&&b(ye)!==X&&(I?I(ye,X):"function"!=typeof ye[ie]&&D(ye,ie,O)),w(ye,x,!0,!0),A&&(E[x]=O))),q==Q&&te&&te.name!==Q&&(z=!0,be=function(){return te.call(this)}),(!A||R)&&G[ie]!==be&&D(G,ie,be),E[U]=be,q)if(Ie={values:M(Q),keys:$?be:M(Z),entries:M(L)},R)for(xe in Ie)(ee||z||!(xe in G))&&j(G,xe,Ie[xe]);else _({target:U,proto:!0,forced:ee||z},Ie);return Ie}},
vendor: 794 bytes, lines 267-278
267"./node_modules/core-js/internals/define-well-known-symbol.js": 268/*!********************************************************************!*\ 269 !*** ./node_modules/core-js/internals/define-well-known-symbol.js ***! 270 \********************************************************************/function(e,S,c){var _=c( 271/*! ../internals/path */ 272"./node_modules/core-js/internals/path.js"),C=c( 273/*! ../internals/has */ 274"./node_modules/core-js/internals/has.js"),b=c( 275/*! ../internals/well-known-symbol-wrapped */ 276"./node_modules/core-js/internals/well-known-symbol-wrapped.js"),I=c( 277/*! ../internals/object-define-property */ 278"./node_modules/core-js/internals/object-define-property.js").f;e.exports=function(w){var D=_.Symbol||(_.Symbol={});C(D,w)||I(D,w,{value:b.f(w)})}},
vendor: 455 bytes, lines 278-283
278"./node_modules/core-js/internals/descriptors.js": 279/*!*******************************************************!*\ 280 !*** ./node_modules/core-js/internals/descriptors.js ***! 281 \*******************************************************/function(e,S,c){var _=c( 282/*! ../internals/fails */ 283"./node_modules/core-js/internals/fails.js");e.exports=!_(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},
vendor: 589 bytes, lines 283-290
283"./node_modules/core-js/internals/document-create-element.js": 284/*!*******************************************************************!*\ 285 !*** ./node_modules/core-js/internals/document-create-element.js ***! 286 \*******************************************************************/function(e,S,c){var _=c( 287/*! ../internals/global */ 288"./node_modules/core-js/internals/global.js"),C=c( 289/*! ../internals/is-object */ 290"./node_modules/core-js/internals/is-object.js"),b=_.document,I=C(b)&&C(b.createElement);e.exports=function(w){return I?b.createElement(w):{}}},
vendor: 797 bytes, lines 290-293
290"./node_modules/core-js/internals/dom-iterables.js": 291/*!*********************************************************!*\ 292 !*** ./node_modules/core-js/internals/dom-iterables.js ***! 293 \*********************************************************/function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},
vendor: 440 bytes, lines 293-298
293"./node_modules/core-js/internals/engine-user-agent.js": 294/*!*************************************************************!*\ 295 !*** ./node_modules/core-js/internals/engine-user-agent.js ***! 296 \*************************************************************/function(e,S,c){var _=c( 297/*! ../internals/get-built-in */ 298"./node_modules/core-js/internals/get-built-in.js");e.exports=_("navigator","userAgent")||""},
vendor: 689 bytes, lines 298-305
298"./node_modules/core-js/internals/engine-v8-version.js": 299/*!*************************************************************!*\ 300 !*** ./node_modules/core-js/internals/engine-v8-version.js ***! 301 \*************************************************************/function(e,S,c){var j,P,_=c( 302/*! ../internals/global */ 303"./node_modules/core-js/internals/global.js"),C=c( 304/*! ../internals/engine-user-agent */ 305"./node_modules/core-js/internals/engine-user-agent.js"),b=_.process,I=_.Deno,w=b&&b.versions||I&&I.version,D=w&&w.v8;D?P=(j=D.split("."))[0]<4?1:j[0]+j[1]:C&&(!(j=C.match(/Edge\/(\d+)/))||j[1]>=74)&&(j=C.match(/Chrome\/(\d+)/))&&(P=j[1]),e.exports=P&&+P},
vendor: 405 bytes, lines 305-308
305"./node_modules/core-js/internals/enum-bug-keys.js": 306/*!*********************************************************!*\ 307 !*** ./node_modules/core-js/internals/enum-bug-keys.js ***! 308 \*********************************************************/function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},
vendor: 1,293 bytes, lines 308-325
308"./node_modules/core-js/internals/export.js": 309/*!**************************************************!*\ 310 !*** ./node_modules/core-js/internals/export.js ***! 311 \**************************************************/function(e,S,c){var _=c( 312/*! ../internals/global */ 313"./node_modules/core-js/internals/global.js"),C=c( 314/*! ../internals/object-get-own-property-descriptor */ 315"./node_modules/core-js/internals/object-get-own-property-descriptor.js").f,b=c( 316/*! ../internals/create-non-enumerable-property */ 317"./node_modules/core-js/internals/create-non-enumerable-property.js"),I=c( 318/*! ../internals/redefine */ 319"./node_modules/core-js/internals/redefine.js"),w=c( 320/*! ../internals/set-global */ 321"./node_modules/core-js/internals/set-global.js"),D=c( 322/*! ../internals/copy-constructor-properties */ 323"./node_modules/core-js/internals/copy-constructor-properties.js"),j=c( 324/*! ../internals/is-forced */ 325"./node_modules/core-js/internals/is-forced.js");e.exports=function(P,A){var ie,Z,Q,L,O,E=P.target,N=P.global,X=P.stat;if(ie=N?_:X?_[E]||w(E,{}):(_[E]||{}).prototype)for(Z in A){if(L=A[Z],Q=P.noTargetGet?(O=C(ie,Z))&&O.value:ie[Z],!j(N?Z:E+(X?".":"#")+Z,P.forced)&&void 0!==Q){if(typeof L==typeof Q)continue;D(L,Q)}(P.sham||Q&&Q.sham)&&b(L,"sham",!0),I(ie,Z,L,P)}}},
vendor: 308 bytes, lines 325-328
325"./node_modules/core-js/internals/fails.js": 326/*!*************************************************!*\ 327 !*** ./node_modules/core-js/internals/fails.js ***! 328 \*************************************************/function(e){e.exports=function(S){try{return!!S()}catch{return!0}}},
vendor: 716 bytes, lines 328-333
328"./node_modules/core-js/internals/function-bind-context.js": 329/*!*****************************************************************!*\ 330 !*** ./node_modules/core-js/internals/function-bind-context.js ***! 331 \*****************************************************************/function(e,S,c){var _=c( 332/*! ../internals/a-function */ 333"./node_modules/core-js/internals/a-function.js");e.exports=function(C,b,I){if(_(C),void 0===b)return C;switch(I){case 0:return function(){return C.call(b)};case 1:return function(w){return C.call(b,w)};case 2:return function(w,D){return C.call(b,w,D)};case 3:return function(w,D,j){return C.call(b,w,D,j)}}return function(){return C.apply(b,arguments)}}},
vendor: 487 bytes, lines 333-338
333"./node_modules/core-js/internals/get-built-in.js": 334/*!********************************************************!*\ 335 !*** ./node_modules/core-js/internals/get-built-in.js ***! 336 \********************************************************/function(e,S,c){var _=c( 337/*! ../internals/global */ 338"./node_modules/core-js/internals/global.js");e.exports=function(b,I){return arguments.length<2?function(b){return"function"==typeof b?b:void 0}(_[b]):_[b]&&_[b][I]}},
vendor: 513 bytes, lines 338-341
338"./node_modules/core-js/internals/global.js": 339/*!**************************************************!*\ 340 !*** ./node_modules/core-js/internals/global.js ***! 341 \**************************************************/function(e){var S=function(c){return c&&c.Math==Math&&c};e.exports=S("object"==typeof globalThis&&globalThis)||S("object"==typeof window&&window)||S("object"==typeof self&&self)||S("object"==typeof global&&global)||function(){return this}()||Function("return this")()},
vendor: 419 bytes, lines 341-346
341"./node_modules/core-js/internals/has.js": 342/*!***********************************************!*\ 343 !*** ./node_modules/core-js/internals/has.js ***! 344 \***********************************************/function(e,S,c){var _=c( 345/*! ../internals/to-object */ 346"./node_modules/core-js/internals/to-object.js"),C={}.hasOwnProperty;e.exports=Object.hasOwn||function(I,w){return C.call(_(I),w)}},
vendor: 290 bytes, lines 346-349
346"./node_modules/core-js/internals/hidden-keys.js": 347/*!*******************************************************!*\ 348 !*** ./node_modules/core-js/internals/hidden-keys.js ***! 349 \*******************************************************/function(e){e.exports={}},
vendor: 389 bytes, lines 349-354
349"./node_modules/core-js/internals/html.js": 350/*!************************************************!*\ 351 !*** ./node_modules/core-js/internals/html.js ***! 352 \************************************************/function(e,S,c){var _=c( 353/*! ../internals/get-built-in */ 354"./node_modules/core-js/internals/get-built-in.js");e.exports=_("document","documentElement")},
vendor: 678 bytes, lines 354-363
354"./node_modules/core-js/internals/ie8-dom-define.js": 355/*!**********************************************************!*\ 356 !*** ./node_modules/core-js/internals/ie8-dom-define.js ***! 357 \**********************************************************/function(e,S,c){var _=c( 358/*! ../internals/descriptors */ 359"./node_modules/core-js/internals/descriptors.js"),C=c( 360/*! ../internals/fails */ 361"./node_modules/core-js/internals/fails.js"),b=c( 362/*! ../internals/document-create-element */ 363"./node_modules/core-js/internals/document-create-element.js");e.exports=!_&&!C(function(){return 7!=Object.defineProperty(b("div"),"a",{get:function(){return 7}}).a})},
vendor: 604 bytes, lines 363-370
363"./node_modules/core-js/internals/indexed-object.js": 364/*!**********************************************************!*\ 365 !*** ./node_modules/core-js/internals/indexed-object.js ***! 366 \**********************************************************/function(e,S,c){var _=c( 367/*! ../internals/fails */ 368"./node_modules/core-js/internals/fails.js"),C=c( 369/*! ../internals/classof-raw */ 370"./node_modules/core-js/internals/classof-raw.js"),b="".split;e.exports=_(function(){return!Object("z").propertyIsEnumerable(0)})?function(I){return"String"==C(I)?b.call(I,""):Object(I)}:Object},
vendor: 646 bytes, lines 370-377
370"./node_modules/core-js/internals/inherit-if-required.js": 371/*!***************************************************************!*\ 372 !*** ./node_modules/core-js/internals/inherit-if-required.js ***! 373 \***************************************************************/function(e,S,c){var _=c( 374/*! ../internals/is-object */ 375"./node_modules/core-js/internals/is-object.js"),C=c( 376/*! ../internals/object-set-prototype-of */ 377"./node_modules/core-js/internals/object-set-prototype-of.js");e.exports=function(b,I,w){var D,j;return C&&"function"==typeof(D=I.constructor)&&D!==w&&_(j=D.prototype)&&j!==w.prototype&&C(b,j),b}},
vendor: 517 bytes, lines 377-382
377"./node_modules/core-js/internals/inspect-source.js": 378/*!**********************************************************!*\ 379 !*** ./node_modules/core-js/internals/inspect-source.js ***! 380 \**********************************************************/function(e,S,c){var _=c( 381/*! ../internals/shared-store */ 382"./node_modules/core-js/internals/shared-store.js"),C=Function.toString;"function"!=typeof _.inspectSource&&(_.inspectSource=function(b){return C.call(b)}),e.exports=_.inspectSource},
vendor: 1,706 bytes, lines 382-401
382"./node_modules/core-js/internals/internal-state.js": 383/*!**********************************************************!*\ 384 !*** ./node_modules/core-js/internals/internal-state.js ***! 385 \**********************************************************/function(e,S,c){var N,X,ee,_=c( 386/*! ../internals/native-weak-map */ 387"./node_modules/core-js/internals/native-weak-map.js"),C=c( 388/*! ../internals/global */ 389"./node_modules/core-js/internals/global.js"),b=c( 390/*! ../internals/is-object */ 391"./node_modules/core-js/internals/is-object.js"),I=c( 392/*! ../internals/create-non-enumerable-property */ 393"./node_modules/core-js/internals/create-non-enumerable-property.js"),w=c( 394/*! ../internals/has */ 395"./node_modules/core-js/internals/has.js"),D=c( 396/*! ../internals/shared-store */ 397"./node_modules/core-js/internals/shared-store.js"),j=c( 398/*! ../internals/shared-key */ 399"./node_modules/core-js/internals/shared-key.js"),P=c( 400/*! ../internals/hidden-keys */ 401"./node_modules/core-js/internals/hidden-keys.js"),A="Object already initialized";if(_||D.state){var Q=D.state||(D.state=new(0,C.WeakMap)),L=Q.get,O=Q.has,F=Q.set;N=function(V,ne){if(O.call(Q,V))throw new TypeError(A);return ne.facade=V,F.call(Q,V,ne),ne},X=function(V){return L.call(Q,V)||{}},ee=function(V){return O.call(Q,V)}}else{var U=j("state");P[U]=!0,N=function(V,ne){if(w(V,U))throw new TypeError(A);return ne.facade=V,I(V,U,ne),ne},X=function(V){return w(V,U)?V[U]:{}},ee=function(V){return w(V,U)}}e.exports={set:N,get:X,has:ee,enforce:function(V){return ee(V)?X(V):N(V,{})},getterFor:function(V){return function(ne){var q;if(!b(ne)||(q=X(ne)).type!==V)throw TypeError("Incompatible receiver, "+V+" required");return q}}}},
vendor: 419 bytes, lines 401-406
401"./node_modules/core-js/internals/is-array.js": 402/*!****************************************************!*\ 403 !*** ./node_modules/core-js/internals/is-array.js ***! 404 \****************************************************/function(e,S,c){var _=c( 405/*! ../internals/classof-raw */ 406"./node_modules/core-js/internals/classof-raw.js");e.exports=Array.isArray||function(b){return"Array"==_(b)}},
vendor: 584 bytes, lines 406-411
406"./node_modules/core-js/internals/is-forced.js": 407/*!*****************************************************!*\ 408 !*** ./node_modules/core-js/internals/is-forced.js ***! 409 \*****************************************************/function(e,S,c){var _=c( 410/*! ../internals/fails */ 411"./node_modules/core-js/internals/fails.js"),C=/#|\.prototype\./,b=function(P,A){var E=w[I(P)];return E==j||E!=D&&("function"==typeof A?_(A):!!A)},I=b.normalize=function(P){return String(P).replace(C,".").toLowerCase()},w=b.data={},D=b.NATIVE="N",j=b.POLYFILL="P";e.exports=b},
vendor: 347 bytes, lines 411-414
411"./node_modules/core-js/internals/is-object.js": 412/*!*****************************************************!*\ 413 !*** ./node_modules/core-js/internals/is-object.js ***! 414 \*****************************************************/function(e){e.exports=function(S){return"object"==typeof S?null!==S:"function"==typeof S}},
vendor: 274 bytes, lines 414-417
414"./node_modules/core-js/internals/is-pure.js": 415/*!***************************************************!*\ 416 !*** ./node_modules/core-js/internals/is-pure.js ***! 417 \***************************************************/function(e){e.exports=!1},
vendor: 598 bytes, lines 417-424
417"./node_modules/core-js/internals/is-symbol.js": 418/*!*****************************************************!*\ 419 !*** ./node_modules/core-js/internals/is-symbol.js ***! 420 \*****************************************************/function(e,S,c){var _=c( 421/*! ../internals/get-built-in */ 422"./node_modules/core-js/internals/get-built-in.js"),C=c( 423/*! ../internals/use-symbol-as-uid */ 424"./node_modules/core-js/internals/use-symbol-as-uid.js");e.exports=C?function(b){return"symbol"==typeof b}:function(b){var I=_("Symbol");return"function"==typeof I&&Object(b)instanceof I}},
vendor: 1,164 bytes, lines 424-439
424"./node_modules/core-js/internals/iterators-core.js": 425/*!**********************************************************!*\ 426 !*** ./node_modules/core-js/internals/iterators-core.js ***! 427 \**********************************************************/function(e,S,c){"use strict";var E,N,X,_=c( 428/*! ../internals/fails */ 429"./node_modules/core-js/internals/fails.js"),C=c( 430/*! ../internals/object-get-prototype-of */ 431"./node_modules/core-js/internals/object-get-prototype-of.js"),b=c( 432/*! ../internals/create-non-enumerable-property */ 433"./node_modules/core-js/internals/create-non-enumerable-property.js"),I=c( 434/*! ../internals/has */ 435"./node_modules/core-js/internals/has.js"),w=c( 436/*! ../internals/well-known-symbol */ 437"./node_modules/core-js/internals/well-known-symbol.js"),D=c( 438/*! ../internals/is-pure */ 439"./node_modules/core-js/internals/is-pure.js"),j=w("iterator"),P=!1;[].keys&&("next"in(X=[].keys())?(N=C(C(X)))!==Object.prototype&&(E=N):P=!0);var ee=null==E||_(function(){var ie={};return E[j].call(ie)!==ie});ee&&(E={}),(!D||ee)&&!I(E,j)&&b(E,j,function(){return this}),e.exports={IteratorPrototype:E,BUGGY_SAFARI_ITERATORS:P}},
vendor: 282 bytes, lines 439-442
439"./node_modules/core-js/internals/iterators.js": 440/*!*****************************************************!*\ 441 !*** ./node_modules/core-js/internals/iterators.js ***! 442 \*****************************************************/function(e){e.exports={}},
vendor: 613 bytes, lines 442-449
442"./node_modules/core-js/internals/native-symbol.js": 443/*!*********************************************************!*\ 444 !*** ./node_modules/core-js/internals/native-symbol.js ***! 445 \*********************************************************/function(e,S,c){var _=c( 446/*! ../internals/engine-v8-version */ 447"./node_modules/core-js/internals/engine-v8-version.js"),C=c( 448/*! ../internals/fails */ 449"./node_modules/core-js/internals/fails.js");e.exports=!!Object.getOwnPropertySymbols&&!C(function(){var b=Symbol();return!String(b)||!(Object(b)instanceof Symbol)||!Symbol.sham&&_&&_<41})},
vendor: 542 bytes, lines 449-456
449"./node_modules/core-js/internals/native-weak-map.js": 450/*!***********************************************************!*\ 451 !*** ./node_modules/core-js/internals/native-weak-map.js ***! 452 \***********************************************************/function(e,S,c){var _=c( 453/*! ../internals/global */ 454"./node_modules/core-js/internals/global.js"),C=c( 455/*! ../internals/inspect-source */ 456"./node_modules/core-js/internals/inspect-source.js"),b=_.WeakMap;e.exports="function"==typeof b&&/native code/.test(C(b))},
vendor: 1,531 bytes, lines 456-473
456"./node_modules/core-js/internals/object-assign.js": 457/*!*********************************************************!*\ 458 !*** ./node_modules/core-js/internals/object-assign.js ***! 459 \*********************************************************/function(e,S,c){"use strict";var _=c( 460/*! ../internals/descriptors */ 461"./node_modules/core-js/internals/descriptors.js"),C=c( 462/*! ../internals/fails */ 463"./node_modules/core-js/internals/fails.js"),b=c( 464/*! ../internals/object-keys */ 465"./node_modules/core-js/internals/object-keys.js"),I=c( 466/*! ../internals/object-get-own-property-symbols */ 467"./node_modules/core-js/internals/object-get-own-property-symbols.js"),w=c( 468/*! ../internals/object-property-is-enumerable */ 469"./node_modules/core-js/internals/object-property-is-enumerable.js"),D=c( 470/*! ../internals/to-object */ 471"./node_modules/core-js/internals/to-object.js"),j=c( 472/*! ../internals/indexed-object */ 473"./node_modules/core-js/internals/indexed-object.js"),P=Object.assign,A=Object.defineProperty;e.exports=!P||C(function(){if(_&&1!==P({b:1},P(A({},"a",{enumerable:!0,get:function(){A(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var E={},N={},X=Symbol(),ee="abcdefghijklmnopqrst";return E[X]=7,ee.split("").forEach(function(ie){N[ie]=ie}),7!=P({},E)[X]||b(P({},N)).join("")!=ee})?function(N,X){for(var ee=D(N),ie=arguments.length,Z=1,Q=I.f,L=w.f;ie>Z;)for(var ne,O=j(arguments[Z++]),F=Q?b(O).concat(Q(O)):b(O),U=F.length,V=0;U>V;)ne=F[V++],(!_||L.call(O,ne))&&(ee[ne]=O[ne]);return ee}:P},
vendor: 1,622 bytes, lines 473-490
473"./node_modules/core-js/internals/object-create.js": 474/*!*********************************************************!*\ 475 !*** ./node_modules/core-js/internals/object-create.js ***! 476 \*********************************************************/function(e,S,c){var L,_=c( 477/*! ../internals/an-object */ 478"./node_modules/core-js/internals/an-object.js"),C=c( 479/*! ../internals/object-define-properties */ 480"./node_modules/core-js/internals/object-define-properties.js"),b=c( 481/*! ../internals/enum-bug-keys */ 482"./node_modules/core-js/internals/enum-bug-keys.js"),I=c( 483/*! ../internals/hidden-keys */ 484"./node_modules/core-js/internals/hidden-keys.js"),w=c( 485/*! ../internals/html */ 486"./node_modules/core-js/internals/html.js"),D=c( 487/*! ../internals/document-create-element */ 488"./node_modules/core-js/internals/document-create-element.js"),j=c( 489/*! ../internals/shared-key */ 490"./node_modules/core-js/internals/shared-key.js"),E="prototype",N="script",X=j("IE_PROTO"),ee=function(){},ie=function(F){return"<"+N+">"+F+"</"+N+">"},Z=function(F){F.write(ie("")),F.close();var U=F.parentWindow.Object;return F=null,U},O=function(){try{L=new ActiveXObject("htmlfile")}catch{}O=document.domain&&L?Z(L):function(){var V,F=D("iframe"),U="java"+N+":";if(F.style)return F.style.display="none",w.appendChild(F),F.src=String(U),(V=F.contentWindow.document).open(),V.write(ie("document.F=Object")),V.close(),V.F}()||Z(L);for(var F=b.length;F--;)delete O[E][b[F]];return O()};I[X]=!0,e.exports=Object.create||function(U,V){var ne;return null!==U?(ee[E]=_(U),ne=new ee,ee[E]=null,ne[X]=U):ne=O(),void 0===V?ne:C(ne,V)}},
vendor: 830 bytes, lines 490-501
490"./node_modules/core-js/internals/object-define-properties.js": 491/*!********************************************************************!*\ 492 !*** ./node_modules/core-js/internals/object-define-properties.js ***! 493 \********************************************************************/function(e,S,c){var _=c( 494/*! ../internals/descriptors */ 495"./node_modules/core-js/internals/descriptors.js"),C=c( 496/*! ../internals/object-define-property */ 497"./node_modules/core-js/internals/object-define-property.js"),b=c( 498/*! ../internals/an-object */ 499"./node_modules/core-js/internals/an-object.js"),I=c( 500/*! ../internals/object-keys */ 501"./node_modules/core-js/internals/object-keys.js");e.exports=_?Object.defineProperties:function(D,j){b(D);for(var N,P=I(j),A=P.length,E=0;A>E;)C.f(D,N=P[E++],j[N]);return D}},
vendor: 892 bytes, lines 501-512
501"./node_modules/core-js/internals/object-define-property.js": 502/*!******************************************************************!*\ 503 !*** ./node_modules/core-js/internals/object-define-property.js ***! 504 \******************************************************************/function(e,S,c){var _=c( 505/*! ../internals/descriptors */ 506"./node_modules/core-js/internals/descriptors.js"),C=c( 507/*! ../internals/ie8-dom-define */ 508"./node_modules/core-js/internals/ie8-dom-define.js"),b=c( 509/*! ../internals/an-object */ 510"./node_modules/core-js/internals/an-object.js"),I=c( 511/*! ../internals/to-property-key */ 512"./node_modules/core-js/internals/to-property-key.js"),w=Object.defineProperty;S.f=_?w:function(j,P,A){if(b(j),P=I(P),b(A),C)try{return w(j,P,A)}catch{}if("get"in A||"set"in A)throw TypeError("Accessors not supported");return"value"in A&&(j[P]=A.value),j}},
vendor: 1,210 bytes, lines 512-529
512"./node_modules/core-js/internals/object-get-own-property-descriptor.js": 513/*!******************************************************************************!*\ 514 !*** ./node_modules/core-js/internals/object-get-own-property-descriptor.js ***! 515 \******************************************************************************/function(e,S,c){var _=c( 516/*! ../internals/descriptors */ 517"./node_modules/core-js/internals/descriptors.js"),C=c( 518/*! ../internals/object-property-is-enumerable */ 519"./node_modules/core-js/internals/object-property-is-enumerable.js"),b=c( 520/*! ../internals/create-property-descriptor */ 521"./node_modules/core-js/internals/create-property-descriptor.js"),I=c( 522/*! ../internals/to-indexed-object */ 523"./node_modules/core-js/internals/to-indexed-object.js"),w=c( 524/*! ../internals/to-property-key */ 525"./node_modules/core-js/internals/to-property-key.js"),D=c( 526/*! ../internals/has */ 527"./node_modules/core-js/internals/has.js"),j=c( 528/*! ../internals/ie8-dom-define */ 529"./node_modules/core-js/internals/ie8-dom-define.js"),P=Object.getOwnPropertyDescriptor;S.f=_?P:function(E,N){if(E=I(E),N=w(N),j)try{return P(E,N)}catch{}if(D(E,N))return b(!C.f.call(E,N),E[N])}},
vendor: 861 bytes, lines 529-536
529"./node_modules/core-js/internals/object-get-own-property-names-external.js": 530/*!**********************************************************************************!*\ 531 !*** ./node_modules/core-js/internals/object-get-own-property-names-external.js ***! 532 \**********************************************************************************/function(e,S,c){var _=c( 533/*! ../internals/to-indexed-object */ 534"./node_modules/core-js/internals/to-indexed-object.js"),C=c( 535/*! ../internals/object-get-own-property-names */ 536"./node_modules/core-js/internals/object-get-own-property-names.js").f,b={}.toString,I="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(j){return I&&"[object Window]"==b.call(j)?function(D){try{return C(D)}catch{return I.slice()}}(j):C(_(j))}},
vendor: 643 bytes, lines 536-543
536"./node_modules/core-js/internals/object-get-own-property-names.js": 537/*!*************************************************************************!*\ 538 !*** ./node_modules/core-js/internals/object-get-own-property-names.js ***! 539 \*************************************************************************/function(e,S,c){var _=c( 540/*! ../internals/object-keys-internal */ 541"./node_modules/core-js/internals/object-keys-internal.js"),b=c( 542/*! ../internals/enum-bug-keys */ 543"./node_modules/core-js/internals/enum-bug-keys.js").concat("length","prototype");S.f=Object.getOwnPropertyNames||function(w){return _(w,b)}},
vendor: 392 bytes, lines 543-546
543"./node_modules/core-js/internals/object-get-own-property-symbols.js": 544/*!***************************************************************************!*\ 545 !*** ./node_modules/core-js/internals/object-get-own-property-symbols.js ***! 546 \***************************************************************************/function(e,S){S.f=Object.getOwnPropertySymbols},
vendor: 909 bytes, lines 546-557
546"./node_modules/core-js/internals/object-get-prototype-of.js": 547/*!*******************************************************************!*\ 548 !*** ./node_modules/core-js/internals/object-get-prototype-of.js ***! 549 \*******************************************************************/function(e,S,c){var _=c( 550/*! ../internals/has */ 551"./node_modules/core-js/internals/has.js"),C=c( 552/*! ../internals/to-object */ 553"./node_modules/core-js/internals/to-object.js"),b=c( 554/*! ../internals/shared-key */ 555"./node_modules/core-js/internals/shared-key.js"),I=c( 556/*! ../internals/correct-prototype-getter */ 557"./node_modules/core-js/internals/correct-prototype-getter.js"),w=b("IE_PROTO"),D=Object.prototype;e.exports=I?Object.getPrototypeOf:function(j){return j=C(j),_(j,w)?j[w]:"function"==typeof j.constructor&&j instanceof j.constructor?j.constructor.prototype:j instanceof Object?D:null}},
vendor: 830 bytes, lines 557-568
557"./node_modules/core-js/internals/object-keys-internal.js": 558/*!****************************************************************!*\ 559 !*** ./node_modules/core-js/internals/object-keys-internal.js ***! 560 \****************************************************************/function(e,S,c){var _=c( 561/*! ../internals/has */ 562"./node_modules/core-js/internals/has.js"),C=c( 563/*! ../internals/to-indexed-object */ 564"./node_modules/core-js/internals/to-indexed-object.js"),b=c( 565/*! ../internals/array-includes */ 566"./node_modules/core-js/internals/array-includes.js").indexOf,I=c( 567/*! ../internals/hidden-keys */ 568"./node_modules/core-js/internals/hidden-keys.js");e.exports=function(w,D){var E,j=C(w),P=0,A=[];for(E in j)!_(I,E)&&_(j,E)&&A.push(E);for(;D.length>P;)_(j,E=D[P++])&&(~b(A,E)||A.push(E));return A}},
vendor: 533 bytes, lines 568-575
568"./node_modules/core-js/internals/object-keys.js": 569/*!*******************************************************!*\ 570 !*** ./node_modules/core-js/internals/object-keys.js ***! 571 \*******************************************************/function(e,S,c){var _=c( 572/*! ../internals/object-keys-internal */ 573"./node_modules/core-js/internals/object-keys-internal.js"),C=c( 574/*! ../internals/enum-bug-keys */ 575"./node_modules/core-js/internals/enum-bug-keys.js");e.exports=Object.keys||function(I){return _(I,C)}},
vendor: 511 bytes, lines 575-578
575"./node_modules/core-js/internals/object-property-is-enumerable.js": 576/*!*************************************************************************!*\ 577 !*** ./node_modules/core-js/internals/object-property-is-enumerable.js ***! 578 \*************************************************************************/function(e,S){"use strict";var c={}.propertyIsEnumerable,_=Object.getOwnPropertyDescriptor,C=_&&!c.call({1:2},1);S.f=C?function(I){var w=_(this,I);return!!w&&w.enumerable}:c},
vendor: 793 bytes, lines 578-585
578"./node_modules/core-js/internals/object-set-prototype-of.js": 579/*!*******************************************************************!*\ 580 !*** ./node_modules/core-js/internals/object-set-prototype-of.js ***! 581 \*******************************************************************/function(e,S,c){var _=c( 582/*! ../internals/an-object */ 583"./node_modules/core-js/internals/an-object.js"),C=c( 584/*! ../internals/a-possible-prototype */ 585"./node_modules/core-js/internals/a-possible-prototype.js");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var w,b=!1,I={};try{(w=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(I,[]),b=I instanceof Array}catch{}return function(j,P){return _(j),C(P),b?w.call(j,P):j.__proto__=P,j}}():void 0)},
vendor: 571 bytes, lines 585-592
585"./node_modules/core-js/internals/object-to-string.js": 586/*!************************************************************!*\ 587 !*** ./node_modules/core-js/internals/object-to-string.js ***! 588 \************************************************************/function(e,S,c){"use strict";var _=c( 589/*! ../internals/to-string-tag-support */ 590"./node_modules/core-js/internals/to-string-tag-support.js"),C=c( 591/*! ../internals/classof */ 592"./node_modules/core-js/internals/classof.js");e.exports=_?{}.toString:function(){return"[object "+C(this)+"]"}},
vendor: 692 bytes, lines 592-597
592"./node_modules/core-js/internals/ordinary-to-primitive.js": 593/*!*****************************************************************!*\ 594 !*** ./node_modules/core-js/internals/ordinary-to-primitive.js ***! 595 \*****************************************************************/function(e,S,c){var _=c( 596/*! ../internals/is-object */ 597"./node_modules/core-js/internals/is-object.js");e.exports=function(C,b){var I,w;if("string"===b&&"function"==typeof(I=C.toString)&&!_(w=I.call(C))||"function"==typeof(I=C.valueOf)&&!_(w=I.call(C))||"string"!==b&&"function"==typeof(I=C.toString)&&!_(w=I.call(C)))return w;throw TypeError("Can't convert object to primitive value")}},
vendor: 794 bytes, lines 597-608
597"./node_modules/core-js/internals/own-keys.js": 598/*!****************************************************!*\ 599 !*** ./node_modules/core-js/internals/own-keys.js ***! 600 \****************************************************/function(e,S,c){var _=c( 601/*! ../internals/get-built-in */ 602"./node_modules/core-js/internals/get-built-in.js"),C=c( 603/*! ../internals/object-get-own-property-names */ 604"./node_modules/core-js/internals/object-get-own-property-names.js"),b=c( 605/*! ../internals/object-get-own-property-symbols */ 606"./node_modules/core-js/internals/object-get-own-property-symbols.js"),I=c( 607/*! ../internals/an-object */ 608"./node_modules/core-js/internals/an-object.js");e.exports=_("Reflect","ownKeys")||function(D){var j=C.f(I(D)),P=b.f;return P?j.concat(P(D)):j}},
vendor: 347 bytes, lines 608-613
608"./node_modules/core-js/internals/path.js": 609/*!************************************************!*\ 610 !*** ./node_modules/core-js/internals/path.js ***! 611 \************************************************/function(e,S,c){var _=c( 612/*! ../internals/global */ 613"./node_modules/core-js/internals/global.js");e.exports=_},
vendor: 1,288 bytes, lines 613-628
613"./node_modules/core-js/internals/redefine.js": 614/*!****************************************************!*\ 615 !*** ./node_modules/core-js/internals/redefine.js ***! 616 \****************************************************/function(e,S,c){var _=c( 617/*! ../internals/global */ 618"./node_modules/core-js/internals/global.js"),C=c( 619/*! ../internals/create-non-enumerable-property */ 620"./node_modules/core-js/internals/create-non-enumerable-property.js"),b=c( 621/*! ../internals/has */ 622"./node_modules/core-js/internals/has.js"),I=c( 623/*! ../internals/set-global */ 624"./node_modules/core-js/internals/set-global.js"),w=c( 625/*! ../internals/inspect-source */ 626"./node_modules/core-js/internals/inspect-source.js"),D=c( 627/*! ../internals/internal-state */ 628"./node_modules/core-js/internals/internal-state.js"),j=D.get,P=D.enforce,A=String(String).split("String");(e.exports=function(E,N,X,ee){var L,ie=!!ee&&!!ee.unsafe,Z=!!ee&&!!ee.enumerable,Q=!!ee&&!!ee.noTargetGet;"function"==typeof X&&("string"==typeof N&&!b(X,"name")&&C(X,"name",N),(L=P(X)).source||(L.source=A.join("string"==typeof N?N:""))),E!==_?(ie?!Q&&E[N]&&(Z=!0):delete E[N],Z?E[N]=X:C(E,N,X)):Z?E[N]=X:I(N,X)})(Function.prototype,"toString",function(){return"function"==typeof this&&j(this).source||w(this)})},
vendor: 558 bytes, lines 628-633
628"./node_modules/core-js/internals/regexp-flags.js": 629/*!********************************************************!*\ 630 !*** ./node_modules/core-js/internals/regexp-flags.js ***! 631 \********************************************************/function(e,S,c){"use strict";var _=c( 632/*! ../internals/an-object */ 633"./node_modules/core-js/internals/an-object.js");e.exports=function(){var C=_(this),b="";return C.global&&(b+="g"),C.ignoreCase&&(b+="i"),C.multiline&&(b+="m"),C.dotAll&&(b+="s"),C.unicode&&(b+="u"),C.sticky&&(b+="y"),b}},
vendor: 415 bytes, lines 633-636
633"./node_modules/core-js/internals/require-object-coercible.js": 634/*!********************************************************************!*\ 635 !*** ./node_modules/core-js/internals/require-object-coercible.js ***! 636 \********************************************************************/function(e){e.exports=function(S){if(null==S)throw TypeError("Can't call method on "+S);return S}},
vendor: 475 bytes, lines 636-641
636"./node_modules/core-js/internals/set-global.js": 637/*!******************************************************!*\ 638 !*** ./node_modules/core-js/internals/set-global.js ***! 639 \******************************************************/function(e,S,c){var _=c( 640/*! ../internals/global */ 641"./node_modules/core-js/internals/global.js");e.exports=function(C,b){try{Object.defineProperty(_,C,{value:b,configurable:!0,writable:!0})}catch{_[C]=b}return b}},
vendor: 696 bytes, lines 641-650
641"./node_modules/core-js/internals/set-to-string-tag.js": 642/*!*************************************************************!*\ 643 !*** ./node_modules/core-js/internals/set-to-string-tag.js ***! 644 \*************************************************************/function(e,S,c){var _=c( 645/*! ../internals/object-define-property */ 646"./node_modules/core-js/internals/object-define-property.js").f,C=c( 647/*! ../internals/has */ 648"./node_modules/core-js/internals/has.js"),I=c( 649/*! ../internals/well-known-symbol */ 650"./node_modules/core-js/internals/well-known-symbol.js")("toStringTag");e.exports=function(w,D,j){w&&!C(w=j?w:w.prototype,I)&&_(w,I,{configurable:!0,value:D})}},
vendor: 491 bytes, lines 650-657
650"./node_modules/core-js/internals/shared-key.js": 651/*!******************************************************!*\ 652 !*** ./node_modules/core-js/internals/shared-key.js ***! 653 \******************************************************/function(e,S,c){var _=c( 654/*! ../internals/shared */ 655"./node_modules/core-js/internals/shared.js"),C=c( 656/*! ../internals/uid */ 657"./node_modules/core-js/internals/uid.js"),b=_("keys");e.exports=function(I){return b[I]||(b[I]=C(I))}},
vendor: 504 bytes, lines 657-664
657"./node_modules/core-js/internals/shared-store.js": 658/*!********************************************************!*\ 659 !*** ./node_modules/core-js/internals/shared-store.js ***! 660 \********************************************************/function(e,S,c){var _=c( 661/*! ../internals/global */ 662"./node_modules/core-js/internals/global.js"),C=c( 663/*! ../internals/set-global */ 664"./node_modules/core-js/internals/set-global.js"),b="__core-js_shared__",I=_[b]||C(b,{});e.exports=I},
vendor: 613 bytes, lines 664-671
664"./node_modules/core-js/internals/shared.js": 665/*!**************************************************!*\ 666 !*** ./node_modules/core-js/internals/shared.js ***! 667 \**************************************************/function(e,S,c){var _=c( 668/*! ../internals/is-pure */ 669"./node_modules/core-js/internals/is-pure.js"),C=c( 670/*! ../internals/shared-store */ 671"./node_modules/core-js/internals/shared-store.js");(e.exports=function(b,I){return C[b]||(C[b]=void 0!==I?I:{})})("versions",[]).push({version:"3.16.0",mode:_?"pure":"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})},
vendor: 501 bytes, lines 671-676
671"./node_modules/core-js/internals/string-html-forced.js": 672/*!**************************************************************!*\ 673 !*** ./node_modules/core-js/internals/string-html-forced.js ***! 674 \**************************************************************/function(e,S,c){var _=c( 675/*! ../internals/fails */ 676"./node_modules/core-js/internals/fails.js");e.exports=function(C){return _(function(){var b=""[C]('"');return b!==b.toLowerCase()||b.split('"').length>3})}},
vendor: 872 bytes, lines 676-685
676"./node_modules/core-js/internals/string-multibyte.js": 677/*!************************************************************!*\ 678 !*** ./node_modules/core-js/internals/string-multibyte.js ***! 679 \************************************************************/function(e,S,c){var _=c( 680/*! ../internals/to-integer */ 681"./node_modules/core-js/internals/to-integer.js"),C=c( 682/*! ../internals/to-string */ 683"./node_modules/core-js/internals/to-string.js"),b=c( 684/*! ../internals/require-object-coercible */ 685"./node_modules/core-js/internals/require-object-coercible.js"),I=function(w){return function(D,j){var N,X,P=C(b(D)),A=_(j),E=P.length;return A<0||A>=E?w?"":void 0:(N=P.charCodeAt(A))<55296||N>56319||A+1===E||(X=P.charCodeAt(A+1))<56320||X>57343?w?P.charAt(A):N:w?P.slice(A,A+2):X-56320+(N-55296<<10)+65536}};e.exports={codeAt:I(!1),charAt:I(!0)}},
vendor: 770 bytes, lines 685-694
685"./node_modules/core-js/internals/string-trim.js": 686/*!*******************************************************!*\ 687 !*** ./node_modules/core-js/internals/string-trim.js ***! 688 \*******************************************************/function(e,S,c){var _=c( 689/*! ../internals/require-object-coercible */ 690"./node_modules/core-js/internals/require-object-coercible.js"),C=c( 691/*! ../internals/to-string */ 692"./node_modules/core-js/internals/to-string.js"),I="["+c( 693/*! ../internals/whitespaces */ 694"./node_modules/core-js/internals/whitespaces.js")+"]",w=RegExp("^"+I+I+"*"),D=RegExp(I+I+"*$"),j=function(P){return function(A){var E=C(_(A));return 1&P&&(E=E.replace(w,"")),2&P&&(E=E.replace(D,"")),E}};e.exports={start:j(1),end:j(2),trim:j(3)}},
vendor: 480 bytes, lines 694-699
694"./node_modules/core-js/internals/to-absolute-index.js": 695/*!*************************************************************!*\ 696 !*** ./node_modules/core-js/internals/to-absolute-index.js ***! 697 \*************************************************************/function(e,S,c){var _=c( 698/*! ../internals/to-integer */ 699"./node_modules/core-js/internals/to-integer.js"),C=Math.max,b=Math.min;e.exports=function(I,w){var D=_(I);return D<0?C(D+w,0):b(D,w)}},
vendor: 555 bytes, lines 699-706
699"./node_modules/core-js/internals/to-indexed-object.js": 700/*!*************************************************************!*\ 701 !*** ./node_modules/core-js/internals/to-indexed-object.js ***! 702 \*************************************************************/function(e,S,c){var _=c( 703/*! ../internals/indexed-object */ 704"./node_modules/core-js/internals/indexed-object.js"),C=c( 705/*! ../internals/require-object-coercible */ 706"./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(b){return _(C(b))}},
vendor: 359 bytes, lines 706-709
706"./node_modules/core-js/internals/to-integer.js": 707/*!******************************************************!*\ 708 !*** ./node_modules/core-js/internals/to-integer.js ***! 709 \******************************************************/function(e){var S=Math.ceil,c=Math.floor;e.exports=function(_){return isNaN(_=+_)?0:(_>0?c:S)(_)}},
vendor: 435 bytes, lines 709-714
709"./node_modules/core-js/internals/to-length.js": 710/*!*****************************************************!*\ 711 !*** ./node_modules/core-js/internals/to-length.js ***! 712 \*****************************************************/function(e,S,c){var _=c( 713/*! ../internals/to-integer */ 714"./node_modules/core-js/internals/to-integer.js"),C=Math.min;e.exports=function(b){return b>0?C(_(b),9007199254740991):0}},
vendor: 434 bytes, lines 714-719
714"./node_modules/core-js/internals/to-object.js": 715/*!*****************************************************!*\ 716 !*** ./node_modules/core-js/internals/to-object.js ***! 717 \*****************************************************/function(e,S,c){var _=c( 718/*! ../internals/require-object-coercible */ 719"./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(C){return Object(_(C))}},
vendor: 919 bytes, lines 719-730
719"./node_modules/core-js/internals/to-primitive.js": 720/*!********************************************************!*\ 721 !*** ./node_modules/core-js/internals/to-primitive.js ***! 722 \********************************************************/function(e,S,c){var _=c( 723/*! ../internals/is-object */ 724"./node_modules/core-js/internals/is-object.js"),C=c( 725/*! ../internals/is-symbol */ 726"./node_modules/core-js/internals/is-symbol.js"),b=c( 727/*! ../internals/ordinary-to-primitive */ 728"./node_modules/core-js/internals/ordinary-to-primitive.js"),w=c( 729/*! ../internals/well-known-symbol */ 730"./node_modules/core-js/internals/well-known-symbol.js")("toPrimitive");e.exports=function(D,j){if(!_(D)||C(D))return D;var A,P=D[w];if(void 0!==P){if(void 0===j&&(j="default"),A=P.call(D,j),!_(A)||C(A))return A;throw TypeError("Can't convert object to primitive value")}return void 0===j&&(j="number"),b(D,j)}},
vendor: 542 bytes, lines 730-737
730"./node_modules/core-js/internals/to-property-key.js": 731/*!***********************************************************!*\ 732 !*** ./node_modules/core-js/internals/to-property-key.js ***! 733 \***********************************************************/function(e,S,c){var _=c( 734/*! ../internals/to-primitive */ 735"./node_modules/core-js/internals/to-primitive.js"),C=c( 736/*! ../internals/is-symbol */ 737"./node_modules/core-js/internals/is-symbol.js");e.exports=function(b){var I=_(b,"string");return C(I)?I:String(I)}},
vendor: 485 bytes, lines 737-742
737"./node_modules/core-js/internals/to-string-tag-support.js": 738/*!*****************************************************************!*\ 739 !*** ./node_modules/core-js/internals/to-string-tag-support.js ***! 740 \*****************************************************************/function(e,S,c){var b={};b[c( 741/*! ../internals/well-known-symbol */ 742"./node_modules/core-js/internals/well-known-symbol.js")("toStringTag")]="z",e.exports="[object z]"===String(b)},
vendor: 470 bytes, lines 742-747
742"./node_modules/core-js/internals/to-string.js": 743/*!*****************************************************!*\ 744 !*** ./node_modules/core-js/internals/to-string.js ***! 745 \*****************************************************/function(e,S,c){var _=c( 746/*! ../internals/is-symbol */ 747"./node_modules/core-js/internals/is-symbol.js");e.exports=function(C){if(_(C))throw TypeError("Cannot convert a Symbol value to a string");return String(C)}},
vendor: 358 bytes, lines 747-750
747"./node_modules/core-js/internals/uid.js": 748/*!***********************************************!*\ 749 !*** ./node_modules/core-js/internals/uid.js ***! 750 \***********************************************/function(e){var S=0,c=Math.random();e.exports=function(_){return"Symbol("+String(void 0===_?"":_)+")_"+(++S+c).toString(36)}},
vendor: 461 bytes, lines 750-755
750"./node_modules/core-js/internals/use-symbol-as-uid.js": 751/*!*************************************************************!*\ 752 !*** ./node_modules/core-js/internals/use-symbol-as-uid.js ***! 753 \*************************************************************/function(e,S,c){var _=c( 754/*! ../internals/native-symbol */ 755"./node_modules/core-js/internals/native-symbol.js");e.exports=_&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},
vendor: 447 bytes, lines 755-760
755"./node_modules/core-js/internals/well-known-symbol-wrapped.js": 756/*!*********************************************************************!*\ 757 !*** ./node_modules/core-js/internals/well-known-symbol-wrapped.js ***! 758 \*********************************************************************/function(e,S,c){var _=c( 759/*! ../internals/well-known-symbol */ 760"./node_modules/core-js/internals/well-known-symbol.js");S.f=_},
vendor: 962 bytes, lines 760-775
760"./node_modules/core-js/internals/well-known-symbol.js": 761/*!*************************************************************!*\ 762 !*** ./node_modules/core-js/internals/well-known-symbol.js ***! 763 \*************************************************************/function(e,S,c){var _=c( 764/*! ../internals/global */ 765"./node_modules/core-js/internals/global.js"),C=c( 766/*! ../internals/shared */ 767"./node_modules/core-js/internals/shared.js"),b=c( 768/*! ../internals/has */ 769"./node_modules/core-js/internals/has.js"),I=c( 770/*! ../internals/uid */ 771"./node_modules/core-js/internals/uid.js"),w=c( 772/*! ../internals/native-symbol */ 773"./node_modules/core-js/internals/native-symbol.js"),D=c( 774/*! ../internals/use-symbol-as-uid */ 775"./node_modules/core-js/internals/use-symbol-as-uid.js"),j=C("wks"),P=_.Symbol,A=D?P:P&&P.withoutSetter||I;e.exports=function(E){return(!b(j,E)||!(w||"string"==typeof j[E]))&&(j[E]=w&&b(P,E)?P[E]:A("Symbol."+E)),j[E]}},
vendor: 413 bytes, lines 775-778
775"./node_modules/core-js/internals/whitespaces.js": 776/*!*******************************************************!*\ 777 !*** ./node_modules/core-js/internals/whitespaces.js ***! 778 \*******************************************************/function(e){e.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},
vendor: 1,883 bytes, lines 778-803
778"./node_modules/core-js/modules/es.array.concat.js": 779/*!*********************************************************!*\ 780 !*** ./node_modules/core-js/modules/es.array.concat.js ***! 781 \*********************************************************/function(e,S,c){"use strict";var _=c( 782/*! ../internals/export */ 783"./node_modules/core-js/internals/export.js"),C=c( 784/*! ../internals/fails */ 785"./node_modules/core-js/internals/fails.js"),b=c( 786/*! ../internals/is-array */ 787"./node_modules/core-js/internals/is-array.js"),I=c( 788/*! ../internals/is-object */ 789"./node_modules/core-js/internals/is-object.js"),w=c( 790/*! ../internals/to-object */ 791"./node_modules/core-js/internals/to-object.js"),D=c( 792/*! ../internals/to-length */ 793"./node_modules/core-js/internals/to-length.js"),j=c( 794/*! ../internals/create-property */ 795"./node_modules/core-js/internals/create-property.js"),P=c( 796/*! ../internals/array-species-create */ 797"./node_modules/core-js/internals/array-species-create.js"),A=c( 798/*! ../internals/array-method-has-species-support */ 799"./node_modules/core-js/internals/array-method-has-species-support.js"),E=c( 800/*! ../internals/well-known-symbol */ 801"./node_modules/core-js/internals/well-known-symbol.js"),N=c( 802/*! ../internals/engine-v8-version */ 803"./node_modules/core-js/internals/engine-v8-version.js"),X=E("isConcatSpreadable"),ee=9007199254740991,ie="Maximum allowed index exceeded",Z=N>=51||!C(function(){var F=[];return F[X]=!1,F.concat()[0]!==F}),Q=A("concat"),L=function(F){if(!I(F))return!1;var U=F[X];return void 0!==U?!!U:b(F)};_({target:"Array",proto:!0,forced:!Z||!Q},{concat:function(U){var $,R,M,x,z,V=w(this),ne=P(V,0),q=0;for($=-1,M=arguments.length;$<M;$++)if(L(z=-1===$?V:arguments[$])){if(q+(x=D(z.length))>ee)throw TypeError(ie);for(R=0;R<x;R++,q++)R in z&&j(ne,q,z[R])}else{if(q>=ee)throw TypeError(ie);j(ne,q++,z)}return ne.length=q,ne}})},
vendor: 1,191 bytes, lines 803-816
803"./node_modules/core-js/modules/es.array.iterator.js": 804/*!***********************************************************!*\ 805 !*** ./node_modules/core-js/modules/es.array.iterator.js ***! 806 \***********************************************************/function(e,S,c){"use strict";var _=c( 807/*! ../internals/to-indexed-object */ 808"./node_modules/core-js/internals/to-indexed-object.js"),C=c( 809/*! ../internals/add-to-unscopables */ 810"./node_modules/core-js/internals/add-to-unscopables.js"),b=c( 811/*! ../internals/iterators */ 812"./node_modules/core-js/internals/iterators.js"),I=c( 813/*! ../internals/internal-state */ 814"./node_modules/core-js/internals/internal-state.js"),w=c( 815/*! ../internals/define-iterator */ 816"./node_modules/core-js/internals/define-iterator.js"),D="Array Iterator",j=I.set,P=I.getterFor(D);e.exports=w(Array,"Array",function(A,E){j(this,{type:D,target:_(A),index:0,kind:E})},function(){var A=P(this),E=A.target,N=A.kind,X=A.index++;return!E||X>=E.length?(A.target=void 0,{value:void 0,done:!0}):"keys"==N?{value:X,done:!1}:"values"==N?{value:E[X],done:!1}:{value:[X,E[X]],done:!1}},"values"),b.Arguments=b.Array,C("keys"),C("values"),C("entries")},
vendor: 820 bytes, lines 816-827
816"./node_modules/core-js/modules/es.array.join.js": 817/*!*******************************************************!*\ 818 !*** ./node_modules/core-js/modules/es.array.join.js ***! 819 \*******************************************************/function(e,S,c){"use strict";var _=c( 820/*! ../internals/export */ 821"./node_modules/core-js/internals/export.js"),C=c( 822/*! ../internals/indexed-object */ 823"./node_modules/core-js/internals/indexed-object.js"),b=c( 824/*! ../internals/to-indexed-object */ 825"./node_modules/core-js/internals/to-indexed-object.js"),I=c( 826/*! ../internals/array-method-is-strict */ 827"./node_modules/core-js/internals/array-method-is-strict.js"),w=[].join,D=C!=Object,j=I("join",",");_({target:"Array",proto:!0,forced:D||!j},{join:function(A){return w.call(b(this),void 0===A?",":A)}})},
vendor: 719 bytes, lines 827-836
827"./node_modules/core-js/modules/es.array.map.js": 828/*!******************************************************!*\ 829 !*** ./node_modules/core-js/modules/es.array.map.js ***! 830 \******************************************************/function(e,S,c){"use strict";var _=c( 831/*! ../internals/export */ 832"./node_modules/core-js/internals/export.js"),C=c( 833/*! ../internals/array-iteration */ 834"./node_modules/core-js/internals/array-iteration.js").map;_({target:"Array",proto:!0,forced:!c( 835/*! ../internals/array-method-has-species-support */ 836"./node_modules/core-js/internals/array-method-has-species-support.js")("map")},{map:function(D){return C(this,D,arguments.length>1?arguments[1]:void 0)}})},
vendor: 1,593 bytes, lines 836-857
836"./node_modules/core-js/modules/es.array.slice.js": 837/*!********************************************************!*\ 838 !*** ./node_modules/core-js/modules/es.array.slice.js ***! 839 \********************************************************/function(e,S,c){"use strict";var _=c( 840/*! ../internals/export */ 841"./node_modules/core-js/internals/export.js"),C=c( 842/*! ../internals/is-object */ 843"./node_modules/core-js/internals/is-object.js"),b=c( 844/*! ../internals/is-array */ 845"./node_modules/core-js/internals/is-array.js"),I=c( 846/*! ../internals/to-absolute-index */ 847"./node_modules/core-js/internals/to-absolute-index.js"),w=c( 848/*! ../internals/to-length */ 849"./node_modules/core-js/internals/to-length.js"),D=c( 850/*! ../internals/to-indexed-object */ 851"./node_modules/core-js/internals/to-indexed-object.js"),j=c( 852/*! ../internals/create-property */ 853"./node_modules/core-js/internals/create-property.js"),P=c( 854/*! ../internals/well-known-symbol */ 855"./node_modules/core-js/internals/well-known-symbol.js"),E=c( 856/*! ../internals/array-method-has-species-support */ 857"./node_modules/core-js/internals/array-method-has-species-support.js")("slice"),N=P("species"),X=[].slice,ee=Math.max;_({target:"Array",proto:!0,forced:!E},{slice:function(Z,Q){var V,ne,q,L=D(this),O=w(L.length),F=I(Z,O),U=I(void 0===Q?O:Q,O);if(b(L)&&("function"!=typeof(V=L.constructor)||V!==Array&&!b(V.prototype)?C(V)&&null===(V=V[N])&&(V=void 0):V=void 0,V===Array||void 0===V))return X.call(L,F,U);for(ne=new(void 0===V?Array:V)(ee(U-F,0)),q=0;F<U;F++,q++)F in L&&j(ne,q,L[F]);return ne.length=q,ne}})},
vendor: 673 bytes, lines 857-864
857"./node_modules/core-js/modules/es.function.name.js": 858/*!**********************************************************!*\ 859 !*** ./node_modules/core-js/modules/es.function.name.js ***! 860 \**********************************************************/function(e,S,c){var _=c( 861/*! ../internals/descriptors */ 862"./node_modules/core-js/internals/descriptors.js"),C=c( 863/*! ../internals/object-define-property */ 864"./node_modules/core-js/internals/object-define-property.js").f,b=Function.prototype,I=b.toString,w=/^\s*function ([^ (]*)/,D="name";_&&!(D in b)&&C(b,D,{configurable:!0,get:function(){try{return I.call(this).match(w)[1]}catch{return""}}})},
vendor: 2,784 bytes, lines 864-897
864"./node_modules/core-js/modules/es.number.constructor.js": 865/*!***************************************************************!*\ 866 !*** ./node_modules/core-js/modules/es.number.constructor.js ***! 867 \***************************************************************/function(e,S,c){"use strict";var _=c( 868/*! ../internals/descriptors */ 869"./node_modules/core-js/internals/descriptors.js"),C=c( 870/*! ../internals/global */ 871"./node_modules/core-js/internals/global.js"),b=c( 872/*! ../internals/is-forced */ 873"./node_modules/core-js/internals/is-forced.js"),I=c( 874/*! ../internals/redefine */ 875"./node_modules/core-js/internals/redefine.js"),w=c( 876/*! ../internals/has */ 877"./node_modules/core-js/internals/has.js"),D=c( 878/*! ../internals/classof-raw */ 879"./node_modules/core-js/internals/classof-raw.js"),j=c( 880/*! ../internals/inherit-if-required */ 881"./node_modules/core-js/internals/inherit-if-required.js"),P=c( 882/*! ../internals/is-symbol */ 883"./node_modules/core-js/internals/is-symbol.js"),A=c( 884/*! ../internals/to-primitive */ 885"./node_modules/core-js/internals/to-primitive.js"),E=c( 886/*! ../internals/fails */ 887"./node_modules/core-js/internals/fails.js"),N=c( 888/*! ../internals/object-create */ 889"./node_modules/core-js/internals/object-create.js"),X=c( 890/*! ../internals/object-get-own-property-names */ 891"./node_modules/core-js/internals/object-get-own-property-names.js").f,ee=c( 892/*! ../internals/object-get-own-property-descriptor */ 893"./node_modules/core-js/internals/object-get-own-property-descriptor.js").f,ie=c( 894/*! ../internals/object-define-property */ 895"./node_modules/core-js/internals/object-define-property.js").f,Z=c( 896/*! ../internals/string-trim */ 897"./node_modules/core-js/internals/string-trim.js").trim,Q="Number",L=C[Q],O=L.prototype,F=D(N(O))==Q,U=function(R){if(P(R))throw TypeError("Cannot convert a Symbol value to a number");var x,z,G,te,be,Re,ye,Ie,M=A(R,"number");if("string"==typeof M&&M.length>2)if(43===(x=(M=Z(M)).charCodeAt(0))||45===x){if(88===(z=M.charCodeAt(2))||120===z)return NaN}else if(48===x){switch(M.charCodeAt(1)){case 66:case 98:G=2,te=49;break;case 79:case 111:G=8,te=55;break;default:return+M}for(Re=(be=M.slice(2)).length,ye=0;ye<Re;ye++)if((Ie=be.charCodeAt(ye))<48||Ie>te)return NaN;return parseInt(be,G)}return+M};if(b(Q,!L(" 0o1")||!L("0b1")||L("+0x1"))){for(var $,V=function(M){var x=arguments.length<1?0:M,z=this;return z instanceof V&&(F?E(function(){O.valueOf.call(z)}):D(z)!=Q)?j(new L(U(x)),z,V):U(x)},ne=_?X(L):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),q=0;ne.length>q;q++)w(L,$=ne[q])&&!w(V,$)&&ie(V,$,ee(L,$));V.prototype=O,O.constructor=V,I(C,Q,V)}},
vendor: 532 bytes, lines 897-904
897"./node_modules/core-js/modules/es.object.assign.js": 898/*!**********************************************************!*\ 899 !*** ./node_modules/core-js/modules/es.object.assign.js ***! 900 \**********************************************************/function(e,S,c){var _=c( 901/*! ../internals/export */ 902"./node_modules/core-js/internals/export.js"),C=c( 903/*! ../internals/object-assign */ 904"./node_modules/core-js/internals/object-assign.js");_({target:"Object",stat:!0,forced:Object.assign!==C},{assign:C})},
vendor: 702 bytes, lines 904-915
904"./node_modules/core-js/modules/es.object.keys.js": 905/*!********************************************************!*\ 906 !*** ./node_modules/core-js/modules/es.object.keys.js ***! 907 \********************************************************/function(e,S,c){var _=c( 908/*! ../internals/export */ 909"./node_modules/core-js/internals/export.js"),C=c( 910/*! ../internals/to-object */ 911"./node_modules/core-js/internals/to-object.js"),b=c( 912/*! ../internals/object-keys */ 913"./node_modules/core-js/internals/object-keys.js");_({target:"Object",stat:!0,forced:c( 914/*! ../internals/fails */ 915"./node_modules/core-js/internals/fails.js")(function(){b(1)})},{keys:function(j){return b(C(j))}})},
vendor: 645 bytes, lines 915-924
915"./node_modules/core-js/modules/es.object.to-string.js": 916/*!*************************************************************!*\ 917 !*** ./node_modules/core-js/modules/es.object.to-string.js ***! 918 \*************************************************************/function(e,S,c){var _=c( 919/*! ../internals/to-string-tag-support */ 920"./node_modules/core-js/internals/to-string-tag-support.js"),C=c( 921/*! ../internals/redefine */ 922"./node_modules/core-js/internals/redefine.js"),b=c( 923/*! ../internals/object-to-string */ 924"./node_modules/core-js/internals/object-to-string.js");_||C(Object.prototype,"toString",b,{unsafe:!0})},
vendor: 1,019 bytes, lines 924-937
924"./node_modules/core-js/modules/es.regexp.to-string.js": 925/*!*************************************************************!*\ 926 !*** ./node_modules/core-js/modules/es.regexp.to-string.js ***! 927 \*************************************************************/function(e,S,c){"use strict";var _=c( 928/*! ../internals/redefine */ 929"./node_modules/core-js/internals/redefine.js"),C=c( 930/*! ../internals/an-object */ 931"./node_modules/core-js/internals/an-object.js"),b=c( 932/*! ../internals/to-string */ 933"./node_modules/core-js/internals/to-string.js"),I=c( 934/*! ../internals/fails */ 935"./node_modules/core-js/internals/fails.js"),w=c( 936/*! ../internals/regexp-flags */ 937"./node_modules/core-js/internals/regexp-flags.js"),D="toString",j=RegExp.prototype,P=j[D];(I(function(){return"/a/b"!=P.call({source:"a",flags:"b"})})||P.name!=D)&&_(RegExp.prototype,D,function(){var X=C(this),ee=b(X.source),ie=X.flags;return"/"+ee+"/"+b(void 0===ie&&X instanceof RegExp&&!("flags"in j)?w.call(X):ie)},{unsafe:!0})},
vendor: 949 bytes, lines 937-948
937"./node_modules/core-js/modules/es.string.iterator.js": 938/*!************************************************************!*\ 939 !*** ./node_modules/core-js/modules/es.string.iterator.js ***! 940 \************************************************************/function(e,S,c){"use strict";var _=c( 941/*! ../internals/string-multibyte */ 942"./node_modules/core-js/internals/string-multibyte.js").charAt,C=c( 943/*! ../internals/to-string */ 944"./node_modules/core-js/internals/to-string.js"),b=c( 945/*! ../internals/internal-state */ 946"./node_modules/core-js/internals/internal-state.js"),I=c( 947/*! ../internals/define-iterator */ 948"./node_modules/core-js/internals/define-iterator.js"),w="String Iterator",D=b.set,j=b.getterFor(w);I(String,"String",function(P){D(this,{type:w,string:C(P),index:0})},function(){var X,A=j(this),E=A.string,N=A.index;return N>=E.length?{value:void 0,done:!0}:(X=_(E,N),A.index+=X.length,{value:X,done:!1})})},
vendor: 661 bytes, lines 948-957
948"./node_modules/core-js/modules/es.string.link.js": 949/*!********************************************************!*\ 950 !*** ./node_modules/core-js/modules/es.string.link.js ***! 951 \********************************************************/function(e,S,c){"use strict";var _=c( 952/*! ../internals/export */ 953"./node_modules/core-js/internals/export.js"),C=c( 954/*! ../internals/create-html */ 955"./node_modules/core-js/internals/create-html.js");_({target:"String",proto:!0,forced:c( 956/*! ../internals/string-html-forced */ 957"./node_modules/core-js/internals/string-html-forced.js")("link")},{link:function(w){return C(this,"a","href",w)}})},
vendor: 1,588 bytes, lines 957-974
957"./node_modules/core-js/modules/es.symbol.description.js": 958/*!***************************************************************!*\ 959 !*** ./node_modules/core-js/modules/es.symbol.description.js ***! 960 \***************************************************************/function(e,S,c){"use strict";var _=c( 961/*! ../internals/export */ 962"./node_modules/core-js/internals/export.js"),C=c( 963/*! ../internals/descriptors */ 964"./node_modules/core-js/internals/descriptors.js"),b=c( 965/*! ../internals/global */ 966"./node_modules/core-js/internals/global.js"),I=c( 967/*! ../internals/has */ 968"./node_modules/core-js/internals/has.js"),w=c( 969/*! ../internals/is-object */ 970"./node_modules/core-js/internals/is-object.js"),D=c( 971/*! ../internals/object-define-property */ 972"./node_modules/core-js/internals/object-define-property.js").f,j=c( 973/*! ../internals/copy-constructor-properties */ 974"./node_modules/core-js/internals/copy-constructor-properties.js"),P=b.Symbol;if(C&&"function"==typeof P&&(!("description"in P.prototype)||void 0!==P().description)){var A={},E=function(){var Q=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),L=this instanceof E?new P(Q):void 0===Q?P():P(Q);return""===Q&&(A[L]=!0),L};j(E,P);var N=E.prototype=P.prototype;N.constructor=E;var X=N.toString,ee="Symbol(test)"==String(P("test")),ie=/^Symbol\((.*)\)[^)]+$/;D(N,"description",{configurable:!0,get:function(){var Q=w(this)?this.valueOf():this,L=X.call(Q);if(I(A,Q))return"";var O=ee?L.slice(7,-1):L.replace(ie,"$1");return""===O?void 0:O}}),_({global:!0,forced:!0},{Symbol:E})}},
vendor: 425 bytes, lines 974-979
974"./node_modules/core-js/modules/es.symbol.iterator.js": 975/*!************************************************************!*\ 976 !*** ./node_modules/core-js/modules/es.symbol.iterator.js ***! 977 \************************************************************/function(e,S,c){c( 978/*! ../internals/define-well-known-symbol */ 979"./node_modules/core-js/internals/define-well-known-symbol.js")("iterator")},
vendor: 7,313 bytes, lines 979-1056
979"./node_modules/core-js/modules/es.symbol.js": 980/*!***************************************************!*\ 981 !*** ./node_modules/core-js/modules/es.symbol.js ***! 982 \***************************************************/function(e,S,c){"use strict";var _=c( 983/*! ../internals/export */ 984"./node_modules/core-js/internals/export.js"),C=c( 985/*! ../internals/global */ 986"./node_modules/core-js/internals/global.js"),b=c( 987/*! ../internals/get-built-in */ 988"./node_modules/core-js/internals/get-built-in.js"),I=c( 989/*! ../internals/is-pure */ 990"./node_modules/core-js/internals/is-pure.js"),w=c( 991/*! ../internals/descriptors */ 992"./node_modules/core-js/internals/descriptors.js"),D=c( 993/*! ../internals/native-symbol */ 994"./node_modules/core-js/internals/native-symbol.js"),j=c( 995/*! ../internals/fails */ 996"./node_modules/core-js/internals/fails.js"),P=c( 997/*! ../internals/has */ 998"./node_modules/core-js/internals/has.js"),A=c( 999/*! ../internals/is-array */ 1000"./node_modules/core-js/internals/is-array.js"),E=c( 1001/*! ../internals/is-object */ 1002"./node_modules/core-js/internals/is-object.js"),N=c( 1003/*! ../internals/is-symbol */ 1004"./node_modules/core-js/internals/is-symbol.js"),X=c( 1005/*! ../internals/an-object */ 1006"./node_modules/core-js/internals/an-object.js"),ee=c( 1007/*! ../internals/to-object */ 1008"./node_modules/core-js/internals/to-object.js"),ie=c( 1009/*! ../internals/to-indexed-object */ 1010"./node_modules/core-js/internals/to-indexed-object.js"),Z=c( 1011/*! ../internals/to-property-key */ 1012"./node_modules/core-js/internals/to-property-key.js"),Q=c( 1013/*! ../internals/to-string */ 1014"./node_modules/core-js/internals/to-string.js"),L=c( 1015/*! ../internals/create-property-descriptor */ 1016"./node_modules/core-js/internals/create-property-descriptor.js"),O=c( 1017/*! ../internals/object-create */ 1018"./node_modules/core-js/internals/object-create.js"),F=c( 1019/*! ../internals/object-keys */ 1020"./node_modules/core-js/internals/object-keys.js"),U=c( 1021/*! ../internals/object-get-own-property-names */ 1022"./node_modules/core-js/internals/object-get-own-property-names.js"),V=c( 1023/*! ../internals/object-get-own-property-names-external */ 1024"./node_modules/core-js/internals/object-get-own-property-names-external.js"),ne=c( 1025/*! ../internals/object-get-own-property-symbols */ 1026"./node_modules/core-js/internals/object-get-own-property-symbols.js"),q=c( 1027/*! ../internals/object-get-own-property-descriptor */ 1028"./node_modules/core-js/internals/object-get-own-property-descriptor.js"),$=c( 1029/*! ../internals/object-define-property */ 1030"./node_modules/core-js/internals/object-define-property.js"),R=c( 1031/*! ../internals/object-property-is-enumerable */ 1032"./node_modules/core-js/internals/object-property-is-enumerable.js"),M=c( 1033/*! ../internals/create-non-enumerable-property */ 1034"./node_modules/core-js/internals/create-non-enumerable-property.js"),x=c( 1035/*! ../internals/redefine */ 1036"./node_modules/core-js/internals/redefine.js"),z=c( 1037/*! ../internals/shared */ 1038"./node_modules/core-js/internals/shared.js"),G=c( 1039/*! ../internals/shared-key */ 1040"./node_modules/core-js/internals/shared-key.js"),te=c( 1041/*! ../internals/hidden-keys */ 1042"./node_modules/core-js/internals/hidden-keys.js"),be=c( 1043/*! ../internals/uid */ 1044"./node_modules/core-js/internals/uid.js"),Re=c( 1045/*! ../internals/well-known-symbol */ 1046"./node_modules/core-js/internals/well-known-symbol.js"),ye=c( 1047/*! ../internals/well-known-symbol-wrapped */ 1048"./node_modules/core-js/internals/well-known-symbol-wrapped.js"),Ie=c( 1049/*! ../internals/define-well-known-symbol */ 1050"./node_modules/core-js/internals/define-well-known-symbol.js"),xe=c( 1051/*! ../internals/set-to-string-tag */ 1052"./node_modules/core-js/internals/set-to-string-tag.js"),je=c( 1053/*! ../internals/internal-state */ 1054"./node_modules/core-js/internals/internal-state.js"),Me=c( 1055/*! ../internals/array-iteration */ 1056"./node_modules/core-js/internals/array-iteration.js").forEach,_e=G("hidden"),Se="Symbol",Ee="prototype",et=Re("toPrimitive"),He=je.set,lt=je.getterFor(Se),he=Object[Ee],pe=C.Symbol,$e=b("JSON","stringify"),dt=q.f,Ye=$.f,ct=V.f,ht=R.f,Ue=z("symbols"),Qe=z("op-symbols"),st=z("string-to-symbol-registry"),Fe=z("symbol-to-string-registry"),ft=z("wks"),T=C.QObject,H=!T||!T[Ee]||!T[Ee].findChild,W=w&&j(function(){return 7!=O(Ye({},"a",{get:function(){return Ye(this,"a",{value:7}).a}})).a})?function(ve,re,ue){var fe=dt(he,re);fe&&delete he[re],Ye(ve,re,ue),fe&&ve!==he&&Ye(he,re,fe)}:Ye,oe=function(ve,re){var ue=Ue[ve]=O(pe[Ee]);return He(ue,{type:Se,tag:ve,description:re}),w||(ue.description=re),ue},ce=function(re,ue,fe){re===he&&ce(Qe,ue,fe),X(re);var le=Z(ue);return X(fe),P(Ue,le)?(fe.enumerable?(P(re,_e)&&re[_e][le]&&(re[_e][le]=!1),fe=O(fe,{enumerable:L(0,!1)})):(P(re,_e)||Ye(re,_e,L(1,{})),re[_e][le]=!0),W(re,le,fe)):Ye(re,le,fe)},ge=function(re,ue){X(re);var fe=ie(ue),le=F(fe).concat(Je(fe));return Me(le,function(Oe){(!w||Le.call(fe,Oe))&&ce(re,Oe,fe[Oe])}),re},Le=function(re){var ue=Z(re),fe=ht.call(this,ue);return!(this===he&&P(Ue,ue)&&!P(Qe,ue))&&(!(fe||!P(this,ue)||!P(Ue,ue)||P(this,_e)&&this[_e][ue])||fe)},qe=function(re,ue){var fe=ie(re),le=Z(ue);if(fe!==he||!P(Ue,le)||P(Qe,le)){var Oe=dt(fe,le);return Oe&&P(Ue,le)&&!(P(fe,_e)&&fe[_e][le])&&(Oe.enumerable=!0),Oe}},tt=function(re){var ue=ct(ie(re)),fe=[];return Me(ue,function(le){!P(Ue,le)&&!P(te,le)&&fe.push(le)}),fe},Je=function(re){var ue=re===he,fe=ct(ue?Qe:ie(re)),le=[];return Me(fe,function(Oe){P(Ue,Oe)&&(!ue||P(he,Oe))&&le.push(Ue[Oe])}),le};D||(pe=function(){if(this instanceof pe)throw TypeError("Symbol is not a constructor");var re=arguments.length&&void 0!==arguments[0]?Q(arguments[0]):void 0,ue=be(re),fe=function(le){this===he&&fe.call(Qe,le),P(this,_e)&&P(this[_e],ue)&&(this[_e][ue]=!1),W(this,ue,L(1,le))};return w&&H&&W(he,ue,{configurable:!0,set:fe}),oe(ue,re)},x(pe[Ee],"toString",function(){return lt(this).tag}),x(pe,"withoutSetter",function(ve){return oe(be(ve),ve)}),R.f=Le,$.f=ce,q.f=qe,U.f=V.f=tt,ne.f=Je,ye.f=function(ve){return oe(Re(ve),ve)},w&&(Ye(pe[Ee],"description",{configurable:!0,get:function(){return lt(this).description}}),I||x(he,"propertyIsEnumerable",Le,{unsafe:!0}))),_({global:!0,wrap:!0,forced:!D,sham:!D},{Symbol:pe}),Me(F(ft),function(ve){Ie(ve)}),_({target:Se,stat:!0,forced:!D},{for:function(ve){var re=Q(ve);if(P(st,re))return st[re];var ue=pe(re);return st[re]=ue,Fe[ue]=re,ue},keyFor:function(re){if(!N(re))throw TypeError(re+" is not a symbol");if(P(Fe,re))return Fe[re]},useSetter:function(){H=!0},useSimple:function(){H=!1}}),_({target:"Object",stat:!0,forced:!D,sham:!w},{create:function(re,ue){return void 0===ue?O(re):ge(O(re),ue)},defineProperty:ce,defineProperties:ge,getOwnPropertyDescriptor:qe}),_({target:"Object",stat:!0,forced:!D},{getOwnPropertyNames:tt,getOwnPropertySymbols:Je}),_({target:"Object",stat:!0,forced:j(function(){ne.f(1)})},{getOwnPropertySymbols:function(re){return ne.f(ee(re))}}),$e&&_({target:"JSON",stat:!0,forced:!D||j(function(){var ve=pe();return"[null]"!=$e([ve])||"{}"!=$e({a:ve})||"{}"!=$e(Object(ve))})},{stringify:function(re,ue,fe){for(var ut,le=[re],Oe=1;arguments.length>Oe;)le.push(arguments[Oe++]);if(ut=ue,(E(ue)||void 0!==re)&&!N(re))return A(ue)||(ue=function(Be,ze){if("function"==typeof ut&&(ze=ut.call(this,Be,ze)),!N(ze))return ze}),le[1]=ue,$e.apply(null,le)}}),pe[Ee][et]||M(pe[Ee],et,pe[Ee].valueOf),xe(pe,Se),te[_e]=!0},
vendor: 840 bytes, lines 1056-1067
1056"./node_modules/core-js/modules/web.dom-collections.for-each.js": 1057/*!**********************************************************************!*\ 1058 !*** ./node_modules/core-js/modules/web.dom-collections.for-each.js ***! 1059 \**********************************************************************/function(e,S,c){var _=c( 1060/*! ../internals/global */ 1061"./node_modules/core-js/internals/global.js"),C=c( 1062/*! ../internals/dom-iterables */ 1063"./node_modules/core-js/internals/dom-iterables.js"),b=c( 1064/*! ../internals/array-for-each */ 1065"./node_modules/core-js/internals/array-for-each.js"),I=c( 1066/*! ../internals/create-non-enumerable-property */ 1067"./node_modules/core-js/internals/create-non-enumerable-property.js");for(var w in C){var D=_[w],j=D&&D.prototype;if(j&&j.forEach!==b)try{I(j,"forEach",b)}catch{j.forEach=b}}},
vendor: 1,059 bytes, lines 1067-1080
1067"./node_modules/core-js/modules/web.dom-collections.iterator.js": 1068/*!**********************************************************************!*\ 1069 !*** ./node_modules/core-js/modules/web.dom-collections.iterator.js ***! 1070 \**********************************************************************/function(e,S,c){var _=c( 1071/*! ../internals/global */ 1072"./node_modules/core-js/internals/global.js"),C=c( 1073/*! ../internals/dom-iterables */ 1074"./node_modules/core-js/internals/dom-iterables.js"),b=c( 1075/*! ../modules/es.array.iterator */ 1076"./node_modules/core-js/modules/es.array.iterator.js"),I=c( 1077/*! ../internals/create-non-enumerable-property */ 1078"./node_modules/core-js/internals/create-non-enumerable-property.js"),w=c( 1079/*! ../internals/well-known-symbol */ 1080"./node_modules/core-js/internals/well-known-symbol.js"),D=w("iterator"),j=w("toStringTag"),P=b.values;for(var A in C){var E=_[A],N=E&&E.prototype;if(N){if(N[D]!==P)try{I(N,D,P)}catch{N[D]=P}if(N[j]||I(N,j,A),C[A])for(var X in b)if(N[X]!==b[X])try{I(N,X,b[X])}catch{N[X]=b[X]}}}},
vendor: 7,145 bytes, lines 1080-1091
1080"./node_modules/es6-promise/dist/es6-promise.js": 1081/*!******************************************************!*\ 1082 !*** ./node_modules/es6-promise/dist/es6-promise.js ***! 1083 \******************************************************/function(e){ 1084/*! 1085 * @overview es6-promise - a tiny implementation of Promises/A+. 1086 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) 1087 * @license Licensed under MIT license 1088 * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE 1089 * @version v4.2.8+1e68dce6 1090 */ 1091var c;c=function(){"use strict";function c(T){return"function"==typeof T}var C=Array.isArray?Array.isArray:function(T){return"[object Array]"===Object.prototype.toString.call(T)},b=0,I=void 0,w=void 0,D=function(H,W){F[b]=H,F[b+1]=W,2===(b+=2)&&(w?w(U):ne())};var A=typeof window<"u"?window:void 0,E=A||{},N=E.MutationObserver||E.WebKitMutationObserver,X=typeof self>"u"&&typeof process<"u"&&"[object process]"==={}.toString.call(process),ee=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function O(){var T=setTimeout;return function(){return T(U,1)}}var F=new Array(1e3);function U(){for(var T=0;T<b;T+=2)(0,F[T])(F[T+1]),F[T]=void 0,F[T+1]=void 0;b=0}var ne=void 0;function q(T,H){var W=this,oe=new this.constructor(M);void 0===oe[R]&&$e(oe);var ce=W._state;if(ce){var ge=arguments[ce-1];D(function(){return He(ce,oe,ge,W._result)})}else Ee(W,oe,T,H);return oe}function $(T){if(T&&"object"==typeof T&&T.constructor===this)return T;var W=new this(M);return je(W,T),W}ne=X?function ie(){return function(){return process.nextTick(U)}}():N?function Q(){var T=0,H=new N(U),W=document.createTextNode("");return H.observe(W,{characterData:!0}),function(){W.data=T=++T%2}}():ee?function L(){var T=new MessageChannel;return T.port1.onmessage=U,function(){return T.port2.postMessage(0)}}():void 0===A?function V(){try{var T=Function("return this")().require("vertx");return I=T.runOnLoop||T.runOnContext,function Z(){return typeof I<"u"?function(){I(U)}:O()}()}catch{return O()}}():O();var R=Math.random().toString(36).substring(2);function M(){}var x=void 0,z=1,G=2;function xe(T,H,W){H.constructor===T.constructor&&W===q&&H.constructor.resolve===$?function Ie(T,H){H._state===z?_e(T,H._result):H._state===G?Se(T,H._result):Ee(H,void 0,function(W){return je(T,W)},function(W){return Se(T,W)})}(T,H):void 0===W?_e(T,H):c(W)?function ye(T,H,W){D(function(oe){var ce=!1,ge=function Re(T,H,W,oe){try{T.call(H,W,oe)}catch(ce){return ce}}(W,H,function(ke){ce||(ce=!0,H!==ke?je(oe,ke):_e(oe,ke))},function(ke){ce||(ce=!0,Se(oe,ke))});!ce&&ge&&(ce=!0,Se(oe,ge))},T)}(T,H,W):_e(T,H)}function je(T,H){if(T===H)Se(T,function te(){return new TypeError("You cannot resolve a promise with itself")}());else if(function S(T){var H=typeof T;return null!==T&&("object"===H||"function"===H)}(H)){var W=void 0;try{W=H.then}catch(oe){return void Se(T,oe)}xe(T,H,W)}else _e(T,H)}function Me(T){T._onerror&&T._onerror(T._result),et(T)}function _e(T,H){T._state===x&&(T._result=H,T._state=z,0!==T._subscribers.length&&D(et,T))}function Se(T,H){T._state===x&&(T._state=G,T._result=H,D(Me,T))}function Ee(T,H,W,oe){var ce=T._subscribers,ge=ce.length;T._onerror=null,ce[ge]=H,ce[ge+z]=W,ce[ge+G]=oe,0===ge&&T._state&&D(et,T)}function et(T){var H=T._subscribers,W=T._state;if(0!==H.length){for(var oe=void 0,ce=void 0,ge=T._result,ke=0;ke<H.length;ke+=3)ce=H[ke+W],(oe=H[ke])?He(W,oe,ce,ge):ce(ge);T._subscribers.length=0}}function He(T,H,W,oe){var ce=c(W),ge=void 0,ke=void 0,Le=!0;if(ce){try{ge=W(oe)}catch(qe){Le=!1,ke=qe}if(H===ge)return void Se(H,function be(){return new TypeError("A promises callback cannot return that same promise.")}())}else ge=oe;H._state!==x||(ce&&Le?je(H,ge):!1===Le?Se(H,ke):T===z?_e(H,ge):T===G&&Se(H,ge))}var he=0;function $e(T){T[R]=he++,T._state=void 0,T._result=void 0,T._subscribers=[]}var Ye=function(){function T(H,W){this._instanceConstructor=H,this.promise=new H(M),this.promise[R]||$e(this.promise),C(W)?(this.length=W.length,this._remaining=W.length,this._result=new Array(this.length),0===this.length?_e(this.promise,this._result):(this.length=this.length||0,this._enumerate(W),0===this._remaining&&_e(this.promise,this._result))):Se(this.promise,function dt(){return new Error("Array Methods must be provided an Array")}())}return T.prototype._enumerate=function(W){for(var oe=0;this._state===x&&oe<W.length;oe++)this._eachEntry(W[oe],oe)},T.prototype._eachEntry=function(W,oe){var ce=this._instanceConstructor,ge=ce.resolve;if(ge===$){var ke=void 0,Le=void 0,qe=!1;try{ke=W.then}catch(Je){qe=!0,Le=Je}if(ke===q&&W._state!==x)this._settledAt(W._state,oe,W._result);else if("function"!=typeof ke)this._remaining--,this._result[oe]=W;else if(ce===Fe){var tt=new ce(M);qe?Se(tt,Le):xe(tt,W,ke),this._willSettleAt(tt,oe)}else this._willSettleAt(new ce(function(Je){return Je(W)}),oe)}else this._willSettleAt(ge(W),oe)},T.prototype._settledAt=function(W,oe,ce){var ge=this.promise;ge._state===x&&(this._remaining--,W===G?Se(ge,ce):this._result[oe]=ce),0===this._remaining&&_e(ge,this._result)},T.prototype._willSettleAt=function(W,oe){var ce=this;Ee(W,void 0,function(ge){return ce._settledAt(z,oe,ge)},function(ge){return ce._settledAt(G,oe,ge)})},T}();var Fe=function(){function T(H){this[R]=function pe(){return he++}(),this._result=this._state=void 0,this._subscribers=[],M!==H&&("function"!=typeof H&&function Qe(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof T?function lt(T,H){try{H(function(oe){je(T,oe)},function(oe){Se(T,oe)})}catch(W){Se(T,W)}}(this,H):function st(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return T.prototype.catch=function(W){return this.then(null,W)},T.prototype.finally=function(W){var ce=this.constructor;return c(W)?this.then(function(ge){return ce.resolve(W()).then(function(){return ge})},function(ge){return ce.resolve(W()).then(function(){throw ge})}):this.then(W,W)},T}();return Fe.prototype.then=q,Fe.all=function ct(T){return new Ye(this,T).promise},Fe.race=function ht(T){var H=this;return C(T)?new H(function(W,oe){for(var ce=T.length,ge=0;ge<ce;ge++)H.resolve(T[ge]).then(W,oe)}):new H(function(W,oe){return oe(new TypeError("You must pass an array to race."))})},Fe.resolve=$,Fe.reject=function Ue(T){var W=new this(M);return Se(W,T),W},Fe._setScheduler=function j(T){w=T},Fe._setAsap=function P(T){D=T},Fe._asap=D,Fe.polyfill=function ft(){var T=void 0;if(typeof global<"u")T=global;else if(typeof self<"u")T=self;else try{T=Function("return this")()}catch{throw new Error("polyfill failed because global object is unavailable in this environment")}var H=T.Promise;if(H){var W=null;try{W=Object.prototype.toString.call(H.resolve())}catch{}if("[object Promise]"===W&&!H.cast)return}T.Promise=Fe},Fe.Promise=Fe,Fe},e.exports=c()}
1091,html2canvas: 1092/*!******************************!*\ 1093 !*** external "html2canvas" ***! 1094 \******************************/function(e){"use strict";e.exports=y},jspdf: 1095/*!************************!*\ 1096 !*** external "jspdf" ***! 1097 \************************/function(e){"use strict";e.exports=K}},De={};function Te(e){var S=De[e];if(void 0!==S)return S.exports;var c=De[e]={exports:{}};return J[e].call(c.exports,c,c.exports,Te),c.exports}Te.n=function(e){var S=e&&e.__esModule?function(){return e.default}:function(){return e};return Te.d(S,{a:S}),S},Te.d=function(e,S){for(var c in S)Te.o(S,c)&&!Te.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:S[c]})},Te.o=function(e,S){return Object.prototype.hasOwnProperty.call(e,S)},Te.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var rt={};return function(){"use strict"; 1098/*!**********************!*\ 1099 !*** ./src/index.js ***! 1100 \**********************/Te.r(rt);var e=Te( 1101/*! ./worker.js */ 1102"./src/worker.js"),C=(Te( 1103/*! ./plugin/jspdf-plugin.js */ 1104"./src/plugin/jspdf-plugin.js"),Te( 1105/*! ./plugin/pagebreaks.js */ 1106"./src/plugin/pagebreaks.js"),Te( 1107/*! ./plugin/hyperlinks.js */ 1108"./src/plugin/hyperlinks.js"),function b(I,w){var D=new b.Worker(w);return I?D.from(I).save():D});C.Worker=e.default,rt.default=C}(),rt.default}())}}]);
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.