PageSourceSearch

https://www.verasuite.com/src_app_reporting_reporting_module_ts.239ad268fd91589d.js

js verasuite.com collected 2026-10-07 15:16:54 UTC 173,404 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkplatform_web=self.webpackChunkplatform_web||[]).push([["src_app_reporting_reporting_module_ts"],{92140:(f,m,l)=>{l.d(m,{C:()=>P});var a=l(89204),g=l(46443),v=l(98764),d=l(61318),y=l(70271),x=l(43576),S=l(37580),E=l(48222),O=l(81264),F=l(45312),U=l(80436);const T={headers:new g.Lr({"Content-Type":"application/json"})};let P=(()=>{class e extends x.t{constructor(c,h,R,k,B){super(),this.http=c,this.log=h,this.loadingIndicatorService=R,this.domSanitizer=B,this.baseUrl=k.services.clients,this.url=this.baseUrl+"ServiceTo"}get(c){const h=`${this.url}/${c}`;return this.log.logVerbose("ServiceTo Get with id:"+c),this.http.get(h).pipe((0,v.M)(()=>this.log.logInformation(`fetched ServiceTo id=${c}`)),(0,d.W)(this.createErrorResponseHandler(this.log)))}getByUniversalId(c){const h=`${this.url}/GetByUniversalId/${c}`;return this.log.logVerbose("ServiceTo GetByUniversalId with universalId:"+c),this.http.get(h).pipe((0,v.M)(()=>this.log.logInformation(`fetched ServiceTo universalId=${c}`)),(0,d.W)(this.createErrorResponseHandler(this.log)))}getCyrismaSettings(c){const h=`${this.url}/crysma/${c}`;return this.log.logVerbose("getCyrismaSettings with universalId:"+c),this.http.get(h).pipe((0,v.M)(()=>this.log.logInformation(`fetched ServiceTo universalId=${c}`)),(0,d.W)(this.createErrorResponseHandler(this.log)))}createCyrismaSettings(c,h){const R=`${this.url}/crysma/${c}?email=${h}`;return this.log.logVerbose("createCyrismaSettings with universalId:"+c),this.http.post(R,null).pipe((0,v.M)(()=>this.log.logInformation(`fetched ServiceTo universalId=${c}`)),(0,d.W)(this.createErrorResponseHandler(this.log)))}getHRServicetos(){var c=this;return(0,a.A)(function*(){const h=`${c.url}/GetAll`;return c.loadingIndicatorService.startLoading(),yield c.http.get(h).pipe((0,v.M)(()=>{c.log.logInformation("ServiceTo GetAll"),c.loadingIndicatorService.stopLoading()}),(0,d.W)(c.createErrorResponseHandler(c.log,void 0,R=>c.loadingIndicatorService.stopLoading())),(0,y.T)(R=>R.filter(k=>k.isActive&&k.locationAppFeatures.some(B=>"HrDrive"===B.featureName)).map(k=>({id:k.id,display:k.name,lookUp:k.name,selectable:!0,sort:0,rank:0})))).toPromise()})()}getAll(){var c=this;return(0,a.A)(function*(){const h=`${c.url}/GetAll`;return c.loadingIndicatorService.startLoading(),yield c.http.get(h).pipe((0,v.M)(()=>{c.log.logInformation("ServiceTo GetAll"),c.loadingIndicatorService.stopLoading()}),(0,d.W)(c.createErrorResponseHandler(c.log,void 0,R=>c.loadingIndicatorService.stopLoading())),(0,y.T)(R=>R.filter(k=>k.isActive&&k.locationAppFeatures.some(B=>"EHS"===B.featureName)&&!(3===k.option.mkoAccountType||11===k.option.mkoAccountType||12===k.option.mkoAccountType||13===k.option.mkoAccountType||15===k.option.mkoAccountType||21===k.option.mkoAccountType||22===k.option.mkoAccountType)).map(k=>({label:k.name,value:k.id})))).toPromise()})()}getServiceToPromise(){var c=this;return(0,a.A)(function*(){return c.loadingIndicatorService.startLoading(),yield c.getServiceTo().pipe((0,v.M)(()=>{c.log.logInformation("ServiceTo GetAll"),c.loadingIndicatorService.stopLoading()}),(0,d.W)(c.createErrorResponseHandler(c.log,void 0,h=>c.loadingIndicatorService.stopLoading()))).toPromise()})()}getServiceTo(c=null){let h=`${this.url}/GetAll`;return c&&(h=`${h}?clientId=${c}`),this.http.get(h).pipe((0,v.M)(()=>{this.log.logInformation("ServiceTo GetAll")}),(0,y.T)(R=>R.sort((k,B)=>{const u=k.name.toLowerCase(),I=B.name.toLowerCase();return u<I?-1:u>I?1:0})),(0,d.W)(this.createErrorResponseHandler(this.log)))}getServiceToName(c){const h=`${this.url}/${c}/Name`;return this.log.logVerbose("ServiceTo Get Name:"),this.http.get(h).pipe((0,v.M)(()=>this.log.logInformation("fetched ServiceTo")),(0,d.W)(this.createErrorResponseHandler(this.log)))}getAllByTenancy(){const c=`${this.url}/GetAllLookup`;return this.log.logVerbose("ServiceTo GetAllLookup"),this.http.get(c).pipe((0,v.M)(()=>this.log.logInformation("fetched ServiceTo Lookup")),(0,d.W)(this.createErrorResponseHandler(this.log)))}getAllLookUpByTenancyForUser(c,h){const R=`${this.url}/GetAllLookup?ssoUserId=${c}&useUniversalId=${h}`;return this.log.logVerbose(`ServiceTo getAllLookUpByTenancyForUser for ssoUserId: ${c} and useUniversalId: ${h}`),this.http.get(R).pipe((0,v.M)(()=>this.log.logInformation("fetched ServiceTo getAllLookUpByTenancyForUser")),(0,d.W)(this.createErrorResponseHandler(this.log)))}getLookUpFiltered(c,h){const R=`${this.url}/LookUpFiltered?useUniversalId=${h}`;return this.log.logVerbose(`ServiceTo getLookUpFiltered: useUniversalId: ${h}`),this.http.post(R,c).pipe((0,v.M)(()=>this.log.logVerbose("fetched ServiceTo getLookUpFiltered")),(0,d.W)(this.createErrorResponseHandler(this.log)))}getByClientId(c){const h=`${this.url}/GetByClientId/${c}`;return this.log.logVerbose("ServiceTo GetByClientId with clientId:"+c),this.http.get(h).pipe((0,v.M)(()=>this.log.logInformation(`fetched ServiceTo clientId=${c}`)),(0,d.W)(this.createErrorResponseHandler(this.log)))}save(c){const h=c.getRawValue();null==h.option.visitValue&&null==h.option.sfVisitValue&&(h.option=null),this.loadingIndicatorService.startLoading();const R=this.createErrorResponseHandler(this.log,c,k=>this.loadingIndicatorService.stopLoading());return null==h.id?this.http.post(this.url,h,T).pipe((0,v.M)(k=>{this.log.logInformation(`created entity id=${k}`),this.loadingIndicatorService.stopLoading()}),(0,d.W)(R)):this.http.put(this.url+"/"+h.id,h,T).pipe((0,v.M)(k=>{this.log.logInformation(`update entity id=${k}`),this.loadingIndicatorService.stopLoading()}),(0,d.W)(R))}saveFile(c,h){const R=`${this.url}/${h}/Logo`,k=this.createErrorResponseHandler(this.log,void 0,I=>this.loadingIndicatorService.stopLoading());var B=new FormData;B.append("file",c[0].rawFile);var u=new g.Lr({enctype:"multipart/form-data"});return this.loadingIndicatorService.startLoading(),this.http.post(R,B,{headers:u}).pipe((0,v.M)(()=>this.loadingIndicatorService.stopLoading()),(0,d.W)(k))}removeFile(c){const h=`${this.url}/${c}/Logo`,R=this.createErrorResponseHandler(this.log,void 0,k=>this.loadingIndicatorService.stopLoading());return this.http.delete(h,T).pipe((0,v.M)(()=>this.loadingIndicatorService.stopLoading()),(0,d.W)(R))}getLogo(c){const h=`${this.url}/${c}/Logo`,R=this.createErrorResponseHandler(this.log,void 0,k=>this.loadingIndicatorService.stopLoading());return this.loadingIndicatorService.startLoading(),this.http.get(h,{responseType:"blob"}).pipe((0,y.T)(k=>this.domSanitizer.bypassSecurityTrustStyle(`url(${URL.createObjectURL(k)})`)),(0,v.M)(()=>this.loadingIndicatorService.stopLoading()),(0,d.W)(R))}getPayPlans(c){const h=this.createErrorResponseHandler(this.log);if(c)return this.http.get(`${this.url}/${c}/PayPlans`).pipe((0,v.M)(()=>this.log.logInformation(`fetched pay plans universalId=${c}`)),(0,d.W)(h))}getServiceToLiteForClient(c){return this.http.get(`${this.url}/GetServiceToLiteForClient/${c}`).pipe((0,v.M)(()=>this.log.logInformation(`fetched ServiceTo universalId=${c}`)),(0,d.W)(this.createErrorResponseHandler(this.log)))}getServiceToLiteForClientAndApplicationFeature(c,h){return this.http.get(`${this.url}/GetServiceToLiteForClientAndAppFeatureId/${c}/${h}`).pipe((0,v.M)(()=>this.log.logInformation(`fetched ServiceTo universalId=${c} and applicationFeatureId=${h}`)),(0,d.W)(this.createErrorResponseHandler(this.log)))}getMysteryShopSettings(c){const h=`${this.url}/GetMysteryShopSettings/${c}`;return this.loadingIndicatorService.startLoading(),this.http.get(h).pipe((0,v.M)(()=>{this.log.logInformation(`fetched Mystery Shop settings for serviceToUniversalId=${c}`),this.loadingIndicatorService.stopLoading()}),(0,d.W)(this.createErrorResponseHandler(this.log,void 0,R=>this.loadingIndicatorService.stopLoading())))}getClientChatAuditDetails(c,h){const R=`${this.url}/FetchMysteryShopData`;let k={ssoUserId:c,serviceToUniversalIds:h};return this.loadingIndicatorService.startLoading(),this.http.post(R,k).pipe((0,v.M)(()=>{this.log.logInformation(`fetched Chat Audit details for user ${c} and locations ${h.join(", ")}`),this.loadingIndicatorService.stopLoading()}),(0,d.W)(this.createErrorResponseHandler(this.log,void 0,B=>this.loadingIndicatorService.stopLoading())))}updateChatAuditDetails(c,h){const R=`${this.url}/UpdateMysteryShop/${c}`;return this.loadingIndicatorService.startLoading(),this.http.post(R,h).pipe((0,v.M)(()=>{this.log.logInformation(`updated Chat Audit details for mysteryShopSettingsId=${c}`),this.loadingIndicatorService.stopLoading()}),(0,d.W)(this.createErrorResponseHandler(this.log,void 0,k=>this.loadingIndicatorService.stopLoading())))}createChatAudit(c){const h=`${this.url}/CreateMysteryShop`;return this.loadingIndicatorService.startLoading(),this.http.post(h,c).pipe((0,v.M)(()=>{this.log.logInformation("created new Chat Audit configuration"),this.loadingIndicatorService.stopLoading()}),(0,d.W)(this.createErrorResponseHandler(this.log,void 0,R=>this.loadingIndicatorService.stopLoading())))}getAllLocationsItem(){return{serviceToName:"All Locations",clientName:"",clientId:"00000000-0000-0000-0000-000000000000",clientUniversalId:"00000000-0000-0000-0000-000000000000",serviceToUniversalId:"00000000-0000-0000-0000-000000000000",serviceToId:"00000000-0000-0000-0000-000000000000"}}getMysteryShopServiceTosByClientId(c){return this.http.get(`${this.url}/GetMysteryShopServiceTosByClientId/${c}`).pipe((0,v.M)(()=>this.log.logInformation(`fetched ServiceTo universalId=${c} for mystery shop`)),(0,d.W)(this.createErrorResponseHandler(this.log)))}static{this.\u0275fac=function(h){return new(h||e)(S.KVO(g.Qq),S.KVO(E.K),S.KVO(O.F),S.KVO(F.O),S.KVO(U.up))}}static{this.\u0275prov=S.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})()},98677:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{w:()=>ReportViewerComponent});var jquery__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(93224),jquery__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__),_angular_core__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(37580),_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(55499),_app_core_services_user_info_service__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(36347),_angular_router__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(2094),_env_environment__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(45312),_shared_services_reporting_service__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(78885),_angular_common__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(60316),_progress_kendo_angular_buttons__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(96481),_shared_kendo_buttons_directives_kpa_secondary_button_directive__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(55604),_progress_telerik_angular_report_viewer__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(71976);const _c0=["viewer"];function ReportViewerComponent_div_1_Template(f,m){1&f&&(_angular_core__WEBPACK_IMPORTED_MODULE_5__.j41(0,"div",4)(1,"div",5),_angular_core__WEBPACK_IMPORTED_MODULE_5__.EFF(2,"LOADING"),_angular_core__WEBPACK_IMPORTED_MODULE_5__.nrm(3,"br")(4,"i",6),_angular_core__WEBPACK_IMPORTED_MODULE_5__.k0s()())}const _c1=function(){return["../../"]};function ReportViewerComponent_button_2_Template(f,m){if(1&f&&(_angular_core__WEBPACK_IMPORTED_MODULE_5__.j41(0,"button",7),_angular_core__WEBPACK_IMPORTED_MODULE_5__.EFF(1," Close "),_angular_core__WEBPACK_IMPORTED_MODULE_5__.k0s()),2&f){const l=_angular_core__WEBPACK_IMPORTED_MODULE_5__.XpG();_angular_core__WEBPACK_IMPORTED_MODULE_5__.Y8G("routerLink",_angular_core__WEBPACK_IMPORTED_MODULE_5__.lJ4(2,_c1))("relativeTo",l.route)}}const _c2=function(f,m){return{report:f,parameters:m}};function ReportViewerComponent_tr_viewer_3_Template(f,m){if(1&f&&_angular_core__WEBPACK_IMPORTED_MODULE_5__.nrm(0,"tr-viewer",8,9),2&f){const l=_angular_core__WEBPACK_IMPORTED_MODULE_5__.XpG();_angular_core__WEBPACK_IMPORTED_MODULE_5__.Y8G("containerStyle",l.viewerContainerStyle)("serviceUrl",l.telerikReportingUrl)("reportSource",_angular_core__WEBPACK_IMPORTED_MODULE_5__.l_i(16,_c2,l.reportId,l.reportParameterValues))("parametersAreaPosition","LEFT")("parameters",l.parameterEditors)("viewMode","PRINT_PREVIEW")("scaleMode","SPECIFIC")("scale",1)("ready",l.ready)("parametersAreaVisible",!l.usesNe
1wReportParameterArch)("updateUi",l.updateUi)("viewerToolTipOpening",l.viewerToolTipOpening)("enableAccessibility",!1)("authenticationToken",l.token)("viewerToolTipOpening",l.myViewerToolTipOpeningHandler)("renderingEnd",l.onRenderingEnd)}}let ReportViewerComponent=(()=>{class ReportViewerComponent{constructor(f,m,l,a,g){this.authService=f,this.userInfoService=m,this.route=l,this.environment=a,this.reportingService=g,this.reportParameters=null,this.report=null,this.reportParameterValues={},this.loadingFinished=!1,this.parameterEditors={editors:{multiSelect:"COMBO_BOX",singleSelect:"COMBO_BOX"}},this.viewerContainerStyle={position:"absolute",zIndex:"100",inset:"0px",overflow:"hidden",clear:"both","font-family":"ms sans serif"},this.runtimeValues=null,this.generateReport=!0,this.runtimeParameterMapping=null,this.chipObservers=new Map,this.telerikReportingUrl=`${this.environment.services.reporting}telerikreports`,ExportOptionsHider.instance=null}ngOnInit(){this.reportId=this.route.snapshot.params.reportId,this.usesNewReportParameterArch="true"===this.route.snapshot.queryParams.usesNewReportParameterArch,this.usesNewReportParameterArch&&(this.reportParameterValues=JSON.parse(this.route.snapshot.queryParams.reportParameterValues)),this.authService.accessToken.subscribe(f=>{this.token=f}),this.reportingService.getTelerikReportClientId().subscribe(f=>{this.reportId&&this.reportingService.getTelerikReportParameters(f.clientId,this.reportId,this.token).subscribe(l=>{this.reportingService.getReportByReportId(this.reportId).subscribe(a=>{this.report=a,ExportOptionsHider.report=a,this.reportParameters=l,this.setRunTimeValues()})})})}onResize(){ExportOptionsHider.init()}onRenderingEnd(f,m){ExportOptionsHider.instance.update(f.target.reportSource().report)}myViewerToolTipOpeningHandler(f,m){console.log("Tooltip shows: "+m.toolTip.text)}ngAfterViewInit(){this.bodyObserver=new MutationObserver(()=>{document.querySelectorAll(".k-chip-list").forEach(m=>{if(!this.chipObservers.has(m)){const l=this.observeChipList(m);this.chipObservers.set(m,l)}}),this.chipObservers.forEach((m,l)=>{document.body.contains(l)||(m.disconnect(),this.chipObservers.delete(l))})}),this.bodyObserver.observe(document.body,{childList:!0,subtree:!0})}observeChipList(f){const m=()=>{const a=Array.from(f.querySelectorAll("k-chip, span.k-chip"));if(a.length>1){const g=a[0],d=g.querySelector(".k-chip-content")?.querySelector(".k-chip-label");a.slice(1).forEach(y=>y.style.display="none"),d&&(d.textContent=`${a.length} Selected`),g.classList.add("chip-summary")}else 1==a.length&&a[0]&&a[0].classList.remove("chip-summary")};m();const l=new MutationObserver(m);return l.observe(f,{childList:!0,subtree:!1}),l}ngOnDestroy(){this.bodyObserver&&this.bodyObserver.disconnect(),this.chipObservers.forEach(f=>f.disconnect()),this.chipObservers.clear()}loaded(){return this.loadingFinished||(this.usesNewReportParameterArch?this.loadingFinished=void 0!==this.token:null!=this.runtimeParameterMapping&&(this.loadingFinished=0==this.runtimeParameterMapping.length||this.runtimeParameterMapping?.every(m=>m.set))),this.loadingFinished}hasUnsetRuntimeValue(){}ready(){ExportOptionsHider.init()}updateUi(f){document.querySelectorAll("li").forEach(m=>{const a=`(${m.className.trim()})`;m.textContent.includes(a)&&(m.textContent=m.textContent.replace(a,"").trim())})}viewerToolTipOpening(f,m){console.log("viewerToolTipOpening "+m.toolTip.text)}instantiateRuntimeValuesObject(){let f={};this.reportParameters.forEach(m=>{if(m.value.toString().startsWith("runtimeValue:")){const l=m.value.toString().split(":")[1];f[l]=null}}),this.runtimeValues=f}getDateRuntimeValue(fullDateExpression){const today=new Date;fullDateExpression=fullDateExpression.replace("CurrentYear",today.getFullYear().toString()),fullDateExpression=fullDateExpression.replace("CurrentMonth",today.getMonth().toString()),fullDateExpression=fullDateExpression.replace("CurrentDay",today.getDate().toString());var dateParts=fullDateExpression.split("_"),month=eval(dateParts[0]),day=eval(dateParts[1]),year=eval(dateParts[2]);return new Date(year,month,day)}setRunTimeValues(){this.userInfo=this.userInfoService.getUserInfoFromStorage();var f=this.reportParameters.find(m=>"runtimeParametersMapping"==m.id)?.value;null==f?this.runtimeParameterMapping=[]:(this.runtimeParameterMapping=JSON.parse(f),this.runtimeParameterMapping.forEach(m=>{var l=m.runtimeVariable.split("|");switch(l[0]){case"bearerToken":this.setRuntimeValue(m,"Bearer "+this.token);break;case"date":var g=this.getDateRuntimeValue(l[1]);this.setRuntimeValue(m,g);break;case"clientUniversalId":this.setRuntimeValue(m,this.userInfo.clientUniversalId);break;case"clientId":this.setRuntimeValue(m,this.userInfo.clientId);break;case"primaryServiceToUniversalId":this.setRuntimeValue(m,this.userInfo.primaryServiceToUniversalId);break;case"mkoServicePath":this.setRuntimeValue(m,this.environment.services.mko);break;case"clientServicePath":this.setRuntimeValue(m,this.environment.services.clients);break;case"dashboardServicePath":this.setRuntimeValue(m,this.environment.services.dashboard);break;case"auditServicePathFromEnv":this.setRuntimeValue(m,this.environment.services.audit);break;case"mykpaonlinePathFromEnv":this.setRuntimeValue(m,this.environment.preAuthLanding.myKpaOnline);break;case"mkoAccountIdFromQueryString":this.setRuntimeValueFromQueryString(m,"accountId");break;case"mkoSurveyIdFromQueryString":this.setRuntimeValueFromQueryString(m,"surveyId")}}))}
1setRuntimeValueFromQueryString(f,m){const l=this.route.snapshot.queryParamMap.get(m);this.setRuntimeValue(f,l)}setRuntimeValue(f,m){this.reportParameterValues[f.reportParameter]=m,f.set=!0}static{this.\u0275fac=function(m){return new(m||ReportViewerComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_5__.rXU(_app_core_services_auth_service__WEBPACK_IMPORTED_MODULE_1__.u),_angular_core__WEBPACK_IMPORTED_MODULE_5__.rXU(_app_core_services_user_info_service__WEBPACK_IMPORTED_MODULE_2__.fv),_angular_core__WEBPACK_IMPORTED_MODULE_5__.rXU(_angular_router__WEBPACK_IMPORTED_MODULE_6__.nX),_angular_core__WEBPACK_IMPORTED_MODULE_5__.rXU(_env_environment__WEBPACK_IMPORTED_MODULE_7__.O),_angular_core__WEBPACK_IMPORTED_MODULE_5__.rXU(_shared_services_reporting_service__WEBPACK_IMPORTED_MODULE_3__.k))}}static{this.\u0275cmp=_angular_core__WEBPACK_IMPORTED_MODULE_5__.VBU({type:ReportViewerComponent,selectors:[["kpa-report-viewer"]],viewQuery:function(m,l){if(1&m&&_angular_core__WEBPACK_IMPORTED_MODULE_5__.GBs(_c0,5),2&m){let a;_angular_core__WEBPACK_IMPORTED_MODULE_5__.mGM(a=_angular_core__WEBPACK_IMPORTED_MODULE_5__.lsd())&&(l.viewer=a.first)}},hostBindings:function(m,l){1&m&&_angular_core__WEBPACK_IMPORTED_MODULE_5__.bIt("resize",function(g){return l.viewer(g)},!1,_angular_core__WEBPACK_IMPORTED_MODULE_5__.tSv)},decls:4,vars:3,consts:[[1,"report-viewer"],["class","loading-container",4,"ngIf"],["kpaSecondaryButton","","kendoButton","","class","close-report","look","flat","iconClass","fa-solid fa-close",3,"routerLink","relativeTo",4,"ngIf"],[3,"containerStyle","serviceUrl","reportSource","parametersAreaPosition","parameters","viewMode","scaleMode","scale","ready","parametersAreaVisible","updateUi","viewerToolTipOpening","enableAccessibility","authenticationToken","renderingEnd",4,"ngIf"],[1,"loading-container"],[1,"loading"],[1,"fa-solid","fa-loader","fa-spin"],["kpaSecondaryButton","","kendoButton","","look","flat","iconClass","fa-solid fa-close",1,"close-report",3,"routerLink","relativeTo"],[3,"containerStyle","serviceUrl","reportSource","parametersAreaPosition","parameters","viewMode","scaleMode","scale","ready","parametersAreaVisible","updateUi","viewerToolTipOpening","enableAccessibility","authenticationToken","renderingEnd"],["viewer",""]],template:function(m,l){1&m&&(_angular_core__WEBPACK_IMPORTED_MODULE_5__.j41(0,"div",0),_angular_core__WEBPACK_IMPORTED_MODULE_5__.DNE(1,ReportViewerComponent_div_1_Template,5,0,"div",1),_angular_core__WEBPACK_IMPORTED_MODULE_5__.DNE(2,ReportViewerComponent_button_2_Template,2,3,"button",2),_angular_core__WEBPACK_IMPORTED_MODULE_5__.DNE(3,ReportViewerComponent_tr_viewer_3_Template,2,19,"tr-viewer",3),_angular_core__WEBPACK_IMPORTED_MODULE_5__.k0s()),2&m&&(_angular_core__WEBPACK_IMPORTED_MODULE_5__.R7$(1),_angular_core__WEBPACK_IMPORTED_MODULE_5__.Y8G("ngIf",!l.loaded()),_angular_core__WEBPACK_IMPORTED_MODULE_5__.R7$(1),_angular_core__WEBPACK_IMPORTED_MODULE_5__.Y8G("ngIf",l.loadingFinished),_angular_core__WEBPACK_IMPORTED_MODULE_5__.R7$(1),_angular_core__WEBPACK_IMPORTED_MODULE_5__.Y8G("ngIf",l.loadingFinished))},dependencies:[_angular_common__WEBPACK_IMPORTED_MODULE_8__.bT,_angular_router__WEBPACK_IMPORTED_MODULE_6__.Wk,_progress_kendo_angular_buttons__WEBPACK_IMPORTED_MODULE_9__.Qp,_shared_kendo_buttons_directives_kpa_secondary_button_directive__WEBPACK_IMPORTED_MODULE_10__.A,_progress_telerik_angular_report_viewer__WEBPACK_IMPORTED_MODULE_4__.S],styles:[".report-viewer[_ngcontent-%COMP%]{position:fixed;top:42px;left:280px;height:calc(100vh - 42px);width:calc(100vw - 280px);z-index:100;box-sizing:border-box;display:flex;justify-content:center}.close-report[_ngcontent-%COMP%]{position:fixed;top:43px;left:282px;z-index:110;box-sizing:border-box}.loading-container[_ngcontent-%COMP%]{position:fixed;font-weight:600;top:200px;left:calc(50vw + 40px);z-index:110;box-sizing:border-box;display:flex;width:200px;align-items:center;justify-content:center}.loading[_ngcontent-%COMP%]{font-size:18px;text-align:center}"]})}}return ReportViewerComponent})();class HideOption{constructor(m,l){this.formatsToHide=[],this.reportName=m,this.formatsToHide=l}}class ExportOptionsHider{constructor(){this.largeMenuBound=!1,this.sideMenuBound=!1,this.reportSource=""}static init(){ExportOptionsHider.instance||(ExportOptionsHider.instance=new ExportOptionsHider),ExportOptionsHider.instance.bindEvents()}update(m){this.reportSource=m,jquery__WEBPACK_IMPORTED_MODULE_0__("[data-command-parameter]").show()}bindEvents(){const m=jquery__WEBPACK_IMPORTED_MODULE_0__(".trv-side-menu").children("ul").data("kendoPanelBar"),l=jquery__WEBPACK_IMPORTED_MODULE_0__(".trv-menu-large").data("kendoMenu"),a=jquery__WEBPACK_IMPORTED_MODULE_0__(".trv-menu-small");!this.largeMenuBound&&l&&(l.bind("open",()=>{this.hideUnwantedOptions()}),this.largeMenuBound=!0),!this.sideMenuBound&&a&&(m.bind("expand",()=>{this.hideUnwantedOptions()}),this.sideMenuBound=!0)}hideUnwantedOptions(){const m=["CSV","IMAGE","RTF","PDF","XLSX","PPTX","DOCX"];let l=["CSV"];if(ExportOptionsHider.report&&ExportOptionsHider.report.fileType){const a=ExportOptionsHider.report.fileType.split(",").map(g=>g.trim());l=m.filter(g=>!a.includes(g))}l.forEach(a=>{const g=jquery__WEBPACK_IMPORTED_MODULE_0__('[data-command-parameter="'+a+'"]');g&&g.length&&g.hide()})}}},12694:(f,m,l)=>{l.r(m),l.d(m,{ReportingModule:()=>ei});var a=l(60316),g=l(93441),v=l(64060),d=l(34456),y=l(26947),x=l(40632),S=l(54025),E=l(33665),O=l(96481),F=l(88621),U=l(58659),T=l(89361),P=l(2094),e=l(37580),D=l(36347),c=l(72467),h=l(81913),R=l(25716);function k(i,p){1&i&&(e.j41(0,"p",6),e.EFF(1," Required "),e.k0s())}let B=(()=>{class i{constructor(){}ngOnInit(){}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["app-input"]],decls:8,vars:8,consts:[[3,"formGroup"],[1,"n
1on-required-spacing"],["labelCssClass","k-label",3,"id","text"],["kendoTextBox","",3,"id","formControlName"],[3,"id","control"],["class","required-label",4,"ngIf"],[1,"required-label"]],template:function(n,o){1&n&&(e.j41(0,"div",0)(1,"div",1)(2,"kendo-floatinglabel",2),e.nrm(3,"input",3),e.k0s()(),e.j41(4,"div"),e.nrm(5,"validation-errors",4),e.k0s(),e.j41(6,"div"),e.DNE(7,k,2,0,"p",5),e.k0s()()),2&n&&(e.Y8G("formGroup",o.group),e.R7$(2),e.Mz_("id","",o.field.name,"_Label"),e.FS9("text",o.field.label),e.R7$(1),e.FS9("id",o.field.name),e.Y8G("formControlName",o.field.name),e.R7$(2),e.Mz_("id","",o.field.name,"_ValidationErrors"),e.Y8G("control",o.group.get(o.field.name)),e.R7$(2),e.Y8G("ngIf",o.field.required))},dependencies:[a.bT,d.me,d.BC,d.cb,g.gl,d.j4,d.JD,h.wM,R.I],styles:[".required-label[_ngcontent-%COMP%]{font-size:12px;margin:-17px 10px 0 0;color:#514e4b;text-align:right}\n\n/*# sourceMappingURL=input.component.ts-angular-inline--2.css.map*/"]})}}return i})(),u=(()=>{class i{constructor(t){this.element=t,this.cssDirtyClass="dd-dirty",this.cssFocusClass="dd-focus",this.cssLabelClass="dd-label",this.cssDdlBorderClass="dd-border"}ngAfterViewChecked(){this.valueChange(this.element.nativeElement.innerText)}getParentClassList(){return document.getElementById(this.getId()).parentElement.parentElement.classList}getId(){return this.element.nativeElement.id}focus(){this.getParentClassList().add(this.cssFocusClass)}blur(){this.getParentClassList().remove(this.cssFocusClass)}valueChange(t){t?this.getParentClassList().add(this.cssDirtyClass):this.getParentClassList().remove(this.cssDirtyClass)}onfocus(){this.focus()}onblur(){this.blur()}onselectionchange(t){this.valueChange(t.value)}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(e.aKT))}}static{this.\u0275dir=e.FsC({type:i,selectors:[["","appRepFloatingDropDownlabel",""]],hostBindings:function(n,o){1&n&&e.bIt("focus",function(){return o.onfocus()})("blur",function(){return o.onblur()})("selectionChange",function(s){return o.onselectionchange(s)})}})}}return i})();function I(i,p){1&i&&(e.j41(0,"p",7),e.EFF(1," Required "),e.k0s())}let _=(()=>{class i{constructor(){this.emptyPlaceholder={text:"",value:null}}ngOnInit(){}onChanged(t){}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["app-select"]],decls:10,vars:15,consts:[[3,"formGroup"],[1,"k-form-field"],[1,"dd-label",3,"id"],["appRepFloatingDropDownlabel","",1,"kendo-dropdown","k-dropdown",3,"data","textField","valueField","valuePrimitive","formControlName","name","value","defaultItem","id","valueChange"],[1,"dd-border"],[3,"id","control"],["class","required-label",4,"ngIf"],[1,"required-label"]],template:function(n,o){1&n&&(e.j41(0,"div",0)(1,"div",1)(2,"span",2),e.EFF(3),e.k0s(),e.j41(4,"kendo-dropdownlist",3),e.bIt("valueChange",function(s){return o.field.value=s})("valueChange",function(s){return o.onChanged(s)}),e.k0s(),e.nrm(5,"span",4),e.k0s(),e.j41(6,"div"),e.nrm(7,"validation-errors",5),e.k0s(),e.j41(8,"div"),e.DNE(9,I,2,0,"p",6),e.k0s()()),2&n&&(e.Y8G("formGroup",o.group),e.R7$(2),e.Mz_("id","",o.field.name,"_Label"),e.R7$(1),e.JRh(o.field.label),e.R7$(1),e.FS9("name",o.field.name),e.FS9("id",o.field.name),e.Y8G("data",o.field.options)("textField","text")("valueField","id")("valuePrimitive",!0)("formControlName",o.field.name)("value",o.field.value)("defaultItem",o.emptyPlaceholder),e.R7$(3),e.Mz_("id","",o.field.value,"_ValidationErrors"),e.Y8G("control",o.group.get(o.field.name)),e.R7$(2),e.Y8G("ngIf",o.field.required))},dependencies:[a.bT,d.BC,d.cb,y.V9,d.j4,d.JD,R.I,u],styles:[".required-label[_ngcontent-%COMP%]{font-size:12px;margin:-17px 10px 0 0;color:#514e4b;text-align:right}\n\n/*# sourceMappingURL=select.component.ts-angular-inline--3.css.map*/"]})}}return i})();var j=l(87801);function V(i,p){if(1&i&&(e.j41(0,"div"),e.nrm(1,"input",3),e.j41(2,"label",4),e.EFF(3),e.k0s()()),2&i){const t=p.$implicit,n=e.XpG();e.R7$(1),e.FS9("id",t.text),e.FS9("name",n.field.name),e.Y8G("formControlName",n.field.name)("value",t.id),e.R7$(1),e.Mz_("id","",t.text,"_Label"),e.FS9("for",t.text),e.R7$(1),e.SpI(" ",t.text," ")}}let me=(()=>{class i{constructor(){}ngOnInit(){}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["app-radio"]],decls:3,vars:2,consts:[[3,"formGroup"],["fxLayout","column",1,"k-form-field"],[4,"ngFor","ngForOf"],["type","radio",1,"k-radio",3,"formControlName","id","name","value"],[1,"k-radio-label",3,"id","for"]],template:function(n,o){1&n&&(e.j41(0,"div",0)(1,"div",1),e.DNE(2,V,4,7,"div",2),e.k0s()()),2&n&&(e.Y8G("formGroup",o.group),e.R7$(2),e.Y8G("ngForOf",o.field.options))},dependencies:[a.Sq,d.me,d.Fm,d.BC,d.cb,j.DJ,d.j4,d.JD,h.C3],encapsulation:2})}}return i})(),he=(()=>{class i{constructor(t){this.element=t,this.cssDirtyClass="dp-dirty",this.cssFocusClass="dp-focus"}ngAfterViewInit(){this.initialDate&&this.valueChange(this.initialDate)}ngAfterViewChecked(){this.valueChange(this.element.nativeElement.innerText)}getParentClassList(){return document.getElementById(this.getId()).parentElement.parentElement.parentElement.classList}getId(){return this.element.nativeElement.id}focus(){this.getParentClassList().add(this.cssFocusClass)}blur(){this.getParentClassList().remove(this.cssFocusClass)}valueChange(t){t&&this.getParentClassList().add(this.cssDirtyClass),null===t&&this.getParentClassList().remove(this.cssDirtyClass)}onfocus(){this.focus()}onblur(){this.blur()}onChange(t){this.valueChange(t)}
1static{this.\u0275fac=function(n){return new(n||i)(e.rXU(e.aKT))}}static{this.\u0275dir=e.FsC({type:i,selectors:[["","appRepFloatingDatePicker",""]],hostBindings:function(n,o){1&n&&e.bIt("focus",function(){return o.onfocus()})("blur",function(){return o.onblur()})("valueChange",function(s){return o.onChange(s)})},inputs:{initialDate:"initialDate"}})}}return i})();function ge(i,p){1&i&&(e.j41(0,"p",6),e.EFF(1," Required "),e.k0s())}const ue={input:B,select:_,radio:me,date:(()=>{class i{constructor(){}ngOnInit(){}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["app-date"]],decls:11,vars:9,consts:[[1,"dp-container",3,"formGroup"],[1,"dp-label",3,"id"],["placeholder","","floatingLabel","Start Date","appRepFloatingDatePicker","",1,"kendo-datepicker",3,"formControlName","id","initialDate"],[1,"dp-border"],[3,"id","control"],["class","required-label",4,"ngIf"],[1,"required-label"]],template:function(n,o){1&n&&(e.j41(0,"div",0)(1,"div")(2,"span",1),e.EFF(3),e.k0s(),e.j41(4,"div"),e.nrm(5,"kendo-datepicker",2),e.k0s(),e.nrm(6,"span",3),e.k0s()(),e.j41(7,"div"),e.nrm(8,"validation-errors",4),e.k0s(),e.j41(9,"div"),e.DNE(10,ge,2,0,"p",5),e.k0s()),2&n&&(e.Y8G("formGroup",o.group),e.R7$(2),e.Mz_("id","",o.field.name,"-label"),e.R7$(1),e.JRh(o.field.label),e.R7$(2),e.FS9("id",o.field.name),e.Y8G("formControlName",o.field.name)("initialDate",o.group.get(o.field.name).value),e.R7$(3),e.Mz_("id","",o.field.name,"-ValidationErrors"),e.Y8G("control",o.group.get(o.field.name)),e.R7$(2),e.Y8G("ngIf",o.field.required))},dependencies:[a.bT,d.BC,d.cb,v.I,d.j4,d.JD,R.I,he],styles:[".required-label[_ngcontent-%COMP%]{font-size:12px;margin:-17px 10px 0 0;color:#514e4b;text-align:right}\n\n/*# sourceMappingURL=date.component.ts-angular-inline--4.css.map*/"]})}}return i})(),checkbox:(()=>{class i{constructor(){}ngOnInit(){}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["app-checkbox"]],decls:6,vars:5,consts:[[3,"formGroup"],[1,"non-required-spacing"],["type","checkbox","kendoCheckBox","",1,"k-checkbox",3,"id","formControlName"],[1,"k-checkbox-label",3,"for"]],template:function(n,o){1&n&&(e.j41(0,"div",0)(1,"div",1)(2,"label"),e.nrm(3,"input",2),e.j41(4,"label",3),e.EFF(5),e.k0s()()()()),2&n&&(e.Y8G("formGroup",o.group),e.R7$(3),e.FS9("id",o.field.name),e.Y8G("formControlName",o.field.name),e.R7$(1),e.FS9("for",o.field.name),e.R7$(1),e.JRh(o.field.label))},dependencies:[d.Zm,d.BC,d.cb,g.rT,d.j4,d.JD,h.C3],encapsulation:2})}}return i})()};let _e=(()=>{class i{constructor(t,n){this.resolver=t,this.container=n}ngOnChanges(){this.componentRef&&(this.componentRef.instance.field=this.field,this.componentRef.instance.group=this.group)}ngOnInit(){const t=this.resolver.resolveComponentFactory(ue[this.field.type]);this.componentRef=this.container.createComponent(t),this.componentRef.instance.field=this.field,this.componentRef.instance.group=this.group}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(e.OM3),e.rXU(e.c1b))}}static{this.\u0275dir=e.FsC({type:i,selectors:[["","dynamicField",""]],inputs:{field:"field",group:"group"},features:[e.OA$]})}}return i})();function fe(i,p){if(1&i&&(e.j41(0,"div",3)(1,"div"),e.nrm(2,"div",4),e.k0s()()),2&i){const t=p.$implicit,n=e.XpG();e.R7$(2),e.Y8G("field",t)("group",n.form)}}let ee=(()=>{class i{get controls(){return this.fields}get value(){return this.form.value}constructor(t,n){this.fb=t,this.intl=n,this.fields=[],this.submit=new e.bkB}ngOnInit(){const t=this.fields.find(n=>"facility"===n.name);t&&(this.facilitySel=t,this.facilityOptionsAll=this.facilitySel.options.map(n=>n)),this.form=this.createGroup(),this.onChanges()}onChanges(){null!=this.form.get("group")&&this.form.get("group").valueChanges.subscribe(r=>{this.form.get("facility").setValue(null),this.facilitySel.options=this.filter(this.facilityOptionsAll,r).length>0?this.filter(this.facilityOptionsAll,r):this.facilityOptionsAll});const t=this.form.get("assignedFilterId"),n=this.form.get("group"),o=this.form.get("facility");if(t&&n){const r=()=>{const s=t.value,b=null!=s&&""!==String(s).trim();b?n.setValidators([d.k0.required]):n.clearValidators(),n.updateV
1alueAndValidity({emitEvent:!1}),o&&(b?(o.reset(null,{emitEvent:!1}),o.disable({emitEvent:!1})):o.enable({emitEvent:!1}))};r(),t.valueChanges.subscribe(()=>r())}}filter(t,n){return t.filter(function(o){if(o.idSel&&(console.log(n),console.log(o.idSel),o.idSel.toLowerCase()===n.toLowerCase()))return o})}ngOnChanges(){if(this.form){const t=Object.keys(this.form.controls),n=this.controls.map(o=>o.name);t.filter(o=>!n.includes(o)).forEach(o=>this.form.removeControl(o)),n.filter(o=>!t.includes(o)).forEach(o=>{const r=this.fields.find(s=>s.name===o);this.form.addControl(o,this.createControl(r))})}}onSubmit(t){t.preventDefault(),t.stopPropagation(),this.form.valid?this.submit.emit(this.form.value):this.validateAllFormFields(this.form)}createGroup(){const t=this.fb.group({});return this.controls.forEach(n=>t.addControl(n.name,this.createControl(n))),t}createControl(t){let n;return n=this.fb.control("date"===t.type?new Date(t.value):t.value,this.bindValidations(t.validations||[])),n}bindValidations(t){if(t.length>0){const n=[];return t.forEach(o=>{n.push(this.composeValidator(o))}),d.k0.compose(n)}return null}validateAllFormFields(t){Object.keys(t.controls).forEach(n=>{t.get(n).markAsTouched({onlySelf:!0})})}setValue(t,n){this.form.controls[t].setValue(n,{emitEvent:!0})}composeValidator(t){let n;switch(t.validator){case"required":n=d.k0.required;break;case"maxLength":n=d.k0.maxLength(Number(t.value));break;case"minLength":n=d.k0.minLength(Number(t.value));break;case"pattern":n=d.k0.pattern(new RegExp(t.value));break;case"minValue":n=d.k0.min(Number(t.value))}return n}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(d.ze),e.rXU(c.Bs))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["app-dynamic-form"]],inputs:{fields:"fields"},outputs:{submit:"submit"},exportAs:["dynamicForm"],features:[e.OA$],decls:4,vars:2,consts:[[1,"dynamic-form",3,"formGroup","submit"],[1,"flexp"],["class","flexc",4,"ngFor","ngForOf"],[1,"flexc"],["dynamicField","",3,"field","group"]],template:function(n,o){1&n&&(e.j41(0,"form",0),e.bIt("submit",function(s){return o.onSubmit(s)}),e.j41(1,"div",1),e.DNE(2,fe,3,2,"div",2),e.k0s(),e.nrm(3,"div"),e.k0s()),2&n&&(e.Y8G("formGroup",o.form),e.R7$(2),e.Y8G("ngForOf",o.fields))},dependencies:[a.Sq,d.qT,d.cb,d.j4,_e],styles:[".flexp[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;flex-direction:row;justify-content:space-between}.flexc[_ngcontent-%COMP%]{margin-top:10px;width:calc(50% - 16px)}\n\n/*# sourceMappingURL=dynamic-form.component.ts-angular-inline--1.css.map*/"]})}}return i})();var C=l(46443),L=l(24513),X=l(81264),ve=l(58574),ke=l(10089),$=l(45312);let Re=(()=>{class i extends ke.E{constructor(t){super(),this.baseUrl=`${t.services.reporting}odata/`}static{this.\u0275fac=function(n){return new(n||i)(e.KVO($.O))}}static{this.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),K=(()=>{class i{constructor(t,n){const o=new ve.T(t,n);this.oDataReporting=o.CreateService("reportsearch")}static{this.\u0275fac=function(n){return new(n||i)(e.KVO(C.Qq),e.KVO(Re))}}static{this.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Y=l(78885),z=l(4900),q=l(88421),J=l(5387),ne=l(71749),H=l(31045),N=l(55604),Q=l(92965),be=l(11971),Ce=l(80436);let we=(()=>{class i{constructor(t){this.sanitized=t}transform(t){return console.log(this.sanitized.bypassSecurityTrustHtml(t)),this.sanitized.bypassSecurityTrustHtml(t)}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(Ce.up,16))}}static{this.\u0275pipe=e.EJ8({name:"safeHtml",type:i,pure:!0})}}return i})();function Se(i,p){if(1&i&&(e.nrm(0,"div",12),e.nI1(1,"safeHtml")),2&i){const t=e.XpG(2);e.Y8G("innerHtml",e.bMT(1,1,t.messageTop),e.npT)}}function Ie(i,p){if(1&i&&(e.nrm(0,"div",12),e.nI1(1,"safeHtml")),2&i){const t=e.XpG(2);e.Y8G("innerHtml",e.bMT(1,1,t.messageBottom),e.npT)}}function ye(i,p){if(1&i){const t=e.RV6();e.j41(0,"kendo-dialog",1),e.bIt("close",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.closeModal())}),e.j41(1,"div",2)(2,"h4",3),e.EFF(3),e.k0s(),e.j41(4,"div",4),e.DNE(5,Se,2,3,"div",5),e.j41(6,"div",6)(7,"app-dynamic-form",7,8),e.bIt("submit",function(o){e.eBV(t);const r=e.XpG();return e.Njj(r.submit(o))}),e.k0s()(),e.DNE(9,Ie,2,3,"div",5),e.k0s(),e.j41(10,"div",9)(11,"button",10),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.closeModal())}),e.EFF(12," CANCEL "),e.k0s(),e.j41(13,"button",11),e.bIt("click",function(o){e.eBV(t);const r=e.XpG();return e.Njj(r.downloadReportClick(o))}),e.EFF(14," DOWNLOAD REPORT "),e.k0s()()()()}if(2&i){const t=e.XpG();e.Y8G("minWidth",1e3)("maxWidth",1e3)("maxHeight",800),e.R7$(1),e.Y8G("ngClass",t.downloadReportClass),e.R7$(2),e.JRh(t.title),e.R7$(2),e.Y8G("ngIf",t.messageTop),e.R7$(2),e.Y8G("fields",t.regConfig),e.R7$(2),e.Y8G("ngIf",t.messageBottom)}}let W=(()=>{class i{constructor(){this.showModalChange=new e.bkB,this.downloadReport=new e.bkB}closeModal(){this.showModalChange.emit(!1)}downloadReportClick(t){this.form.onSubmit(t)}submit(t){this.downloadReport.emit(t)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["app-options-modal"]],viewQuery:function(n,o){if(1&n&&e.GBs(ee,5),2&n){let r;e.mGM(r=e.lsd())&&(o.form=r.first)}},inputs:{showModal:"showModal",title:"title",messageTop:"messageTop",messageBottom:"messageBottom",downloadReportClass:"downloadReportClass",regConfig:"regConfig"},outputs:{showModalChange:"showModalChange",downloadReport:"downloadReport"},decls:1,vars:1,consts:[[3,"minWidth","maxWidth","maxHeight","close",4,"ngIf"],[3,"minWidth","maxWidth","maxHeight","close"],[3,"ngClass"],[1,"bylm-title"],[1,"bylm-body"],["class","message",3,"innerHtml",4,"ngIf"],[1,"dynamic-form"],[3,"fields","submit"],["form",""],[1,"bylm-buttons"],["
1id","btn_dialogcancel",3,"click"],["id","btn_dialogdownload",3,"click"],[1,"message",3,"innerHtml"]],template:function(n,o){1&n&&e.DNE(0,ye,15,8,"kendo-dialog",0),2&n&&e.Y8G("ngIf",o.showModal)},dependencies:[a.YU,a.bT,T.mq,be.PW,ee,we],styles:[".downloadReport[_ngcontent-%COMP%]{width:750px;height:600px;position:relative}.downloadReportOsha[_ngcontent-%COMP%]{width:550px;height:350px;position:relative}.k-content[_ngcontent-%COMP%], .k-window-content[_ngcontent-%COMP%]{padding:0}.bylm-title[_ngcontent-%COMP%]{font-weight:700;font-size:16px;color:#514e4b;padding:15px 18px}.bylm-body[_ngcontent-%COMP%]   .message[_ngcontent-%COMP%]{color:#514e4b;font-weight:400;margin-bottom:0;padding:0 22px 22px;text-align:left}.bylm-body[_ngcontent-%COMP%]   .message[_ngcontent-%COMP%]   .bylm-body-bold[_ngcontent-%COMP%]{font-weight:600}.bylm-body[_ngcontent-%COMP%]{overflow:auto}.bylm-body[_ngcontent-%COMP%]   .dynamic-form[_ngcontent-%COMP%]{padding:0 22px 22px}.bylm-buttons[_ngcontent-%COMP%]{padding:10px 18px 15px;text-align:right;bottom:0;right:0}.bylm-buttons[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{background:#ffffff;border:0px;color:#1c75bc;display:inline-block;font-size:14px;font-weight:600;margin-right:34px;cursor:pointer}.bylm-buttons[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:last-child{margin-right:0}"]})}}return i})(),te=(()=>{class i{transform(t,n,o=!1){return t?(n?(t.sort((r,s)=>r[n]>s[n]?1:-1),console.log("field"),console.log(t)):(t.sort((r,s)=>r>s?1:-1),console.log(t)),o&&t.reverse(),t):[]}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=e.EJ8({name:"orderBy",type:i,pure:!0})}}return i})();function Ee(i,p){if(1&i&&(e.j41(0,"kpa-error-card",20),e.EFF(1," An error occured while attempting to retrieve your report. Please try again later. If the error persists, please contact "),e.j41(2,"a",21),e.EFF(3,"Support"),e.k0s(),e.EFF(4," for further assistance. "),e.k0s()),2&i){const t=e.XpG();e.R7$(2),e.FS9("href",t.supportUrl,e.B4B)}}function Fe(i,p){if(1&i&&(e.j41(0,"kpa-error-card",22),e.EFF(1," An error occured while attempting to retrieve the reports. Please try again later. If the error persists, please contact "),e.j41(2,"a",21),e.EFF(3,"Support"),e.k0s(),e.EFF(4," for further assistance. "),e.k0s()),2&i){const t=e.XpG();e.R7$(2),e.FS9("href",t.supportUrl,e.B4B)}}function Te(i,p){if(1&i&&(e.j41(0,"kpa-error-card",23),e.EFF(1," No data was found for the selected report. Please try again after data has been inputted into the system for the selected report. For further assistance, please contact "),e.j41(2,"a",21),e.EFF(3,"Support"),e.k0s(),e.EFF(4,". "),e.k0s()),2&i){const t=e.XpG();e.R7$(2),e.FS9("href",t.supportUrl,e.B4B)}}function xe(i,p){1&i&&(e.j41(0,"kpa-status-card",24),e.EFF(1," Email will be sent to you as soon as it is ready. "),e.k0s())}function Oe(i,p){if(1&i){const t=e.RV6();e.j41(0,"div",37)(1,"button",38),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG();return e.Njj(r.optionsClick(o.DownloadURL,o.ReportTypeId,o.Name))}),e.EFF(2," Options "),e.k0s()()}}function De(i,p){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"button",39),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG();return e.Njj(r.downloadReport(o.DownloadURL,o.ReportTypeId))}),e.EFF(2," Download "),e.k0s()()}}function Me(i,p){if(1&i&&(e.j41(0,"div",40)(1,"a",21)(2,"button",41),e.EFF(3," View TOP ISSUES "),e.k0s()()()),2&i){const t=e.XpG(2);e.R7$(1),e.FCK("href","",t.mkoUrl,"",t.viewUrl,"",e.B4B)}}function Pe(i,p){if(1&i&&(e.j41(0,"div")(1,"a",21)(2,"button",42),e.EFF(3," View "),e.k0s()()()),2&i){const t=e.XpG(2);e.R7$(1),e.FCK("href","",t.mkoUrl,"",t.viewUrl,"",e.B4B)}}function Be(i,p){if(1&i&&(e.j41(0,"div")(1,"div",25)(2,"div",26)(3,"kpa-card",27)(4,"div",28)(5,"div",29),e.nrm(6,"img",30),e.j41(7,"div",31)(8,"h4"),e.EFF(9),e.k0s(),e.j41(10,"p"),e.EFF(11),e.k0s()()()(),e.j41(12,"div",32),e.DNE(13,Oe,3,0,"div",33),e.j41(14,"div",34),e.DNE(15,De,3,0,"div",35),e.DNE(16,Me,4,2,"div",36),e.DNE(17,Pe,4,2,"div",35),e.k0s()()()()()()),2&i){const t=p.$implicit;e.R7$(1),e.Y8G("hidden",!t.IsSpotlight),e.R7$(5),e.FS9("src","../../../assets/images/"+t.ImageName,e.B4B),e.R7$(3),e.JRh(t.Name),e.R7$(2),e.JRh(t.Description),e.R7$(2),e.Y8G("ngIf",t.CanSetOptions),e.R7$(2),e.Y8G("ngIf",t.CanDownload),e.R7$(1),e.Y8G("ngIf",t.CanView&&"Top 25 Occurring EHS Issues"===t.Name),e.R7$(1),e.Y8G("ngIf",t.CanView&&"Top 25 Occurring EHS Issues"!==t.Name)}
1}function Ge(i,p){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=p.$implicit;e.R7$(1),e.JRh(t.nativeElement.innerText)}}function Ue(i,p){1&i&&e.nrm(0,"img",43),2&i&&e.FS9("src","../../../assets/images/"+p.$implicit.ImageName,e.B4B)}function Le(i,p){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"button",47),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG();return e.Njj(r.optionsClick(o.DownloadURL,o.ReportTypeId,o.Name))}),e.EFF(2," Options "),e.k0s()()}2&i&&(e.R7$(1),e.Y8G("primary",!0)("look","flat"))}function je(i,p){if(1&i&&(e.j41(0,"div")(1,"a",21)(2,"button",48),e.EFF(3," View "),e.k0s()()()),2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(1),e.FS9("href",n.mkoUrl+t.ViewURL,e.B4B),e.R7$(1),e.Y8G("primary",!0)("look","flat")}}function $e(i,p){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"button",49),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG();return e.Njj(r.downloadReport(o.DownloadURL,o.ReportTypeId,o.Name))}),e.EFF(2," Download "),e.k0s()()}}function Ve(i,p){if(1&i&&(e.j41(0,"div")(1,"a",21)(2,"button",50),e.EFF(3," View "),e.k0s()()()),2&i){const t=e.XpG(2);e.R7$(1),e.FCK("href","",t.mkoUrl,"",t.viewUrl,"",e.B4B)}}function Ne(i,p){if(1&i&&(e.j41(0,"div")(1,"a",21)(2,"button",50),e.EFF(3," View "),e.k0s()()()),2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(1),e.FS9("href",n.mkoUrl+t.ViewURL,e.B4B)}}function Ae(i,p){if(1&i&&(e.j41(0,"div",44)(1,"div",45),e.DNE(2,Le,3,2,"div",35),e.DNE(3,je,4,3,"div",35),e.k0s(),e.j41(4,"div",46),e.DNE(5,$e,3,0,"div",35),e.DNE(6,Ve,4,2,"div",35),e.DNE(7,Ne,4,1,"div",35),e.k0s()()),2&i){const t=p.$implicit;e.R7$(2),e.Y8G("ngIf",t.CanSetOptions),e.R7$(1),e.Y8G("ngIf",t.CanView&&t.CanDownload),e.R7$(2),e.Y8G("ngIf",t.CanDownload),e.R7$(1),e.Y8G("ngIf",t.CanView&&"Top 25 Occurring EHS Issues"===t.Name),e.R7$(1),e.Y8G("ngIf",t.CanView&&"Top 25 Occurring EHS Issues"!==t.Name&&!t.CanDownload)}}function Xe(i,p){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=p.$implicit;e.R7$(1),e.JRh(t.nativeElement.textContent)}}function Ye(i,p){if(1&i){const t=e.RV6();e.j41(0,"kendo-dialog",51),e.bIt("close",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.closeSendReportDialog())}),e.j41(1,"div")(2,"h4",52),e.EFF(3,"Download Training Report"),e.k0s(),e.j41(4,"p",53),e.EFF(5),e.j41(6,"a",21),e.EFF(7,"User Management"),e.k0s()(),e.j41(8,"div",54)(9,"button",55),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.closeSendReportDialog())}),e.EFF(10," Cancel "),e.k0s(),e.j41(11,"button",56),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.sendReportEmail())}),e.EFF(12," Send "),e.k0s()()()()}if(2&i){const t=e.XpG();e.Y8G("maxWidth",600)("height",180),e.R7$(5),e.SpI(" We'll send a completed report to ",t.emailid,". If this is the wrong address for you, you may update email address under "),e.R7$(1),e.FS9("href",t.manageEmployeeUrl,e.B4B),e.R7$(3),e.Y8G("primary",!0)("look","flat"),e.R7$(2),e.Y8G("primary",!0)("look","flat")}}const He=function(){return{nameClass:!0}},We=function(){return{actionsClass:!0}};let Ke=(()=>{class i{constructor(t,n,o,r,s,b){this.loadingIndicatorService=t,this.reportingOdataService=n,this.reportingService=o,this.batchImportService=r,this.userInfoService=s,this.showModal=!1,this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.fetchReportsSSRSFailed=!1,this.reportEmailQueued=!1,this.sendReportEmailRequest=!1,this.reportUrl="",this.reportType="",this.emailid="",this.hasMKO=!1,this.hasHrD=!1,this.confirmDownload=new e.bkB,this.regConfig=[],this.downloadTrainingPath="/Kpa.Reports/ClientReports/TrainingCompletionReport",this.mkoUrl=b.preAuthLanding.myKpaOnline,this.hrmUrl=b.preAuthLanding.hrDrive,this.platformUrl=b.preAuthLanding.platform}ngOnInit(){this.userInfo=this.userInfoService.getUserInfoFromStorage(),this.loadReports(),this.setViewUrl(),this.getApplicationFeatures(),this.messageTop="Customize your report using the filter and sort options below, then select Download Report.",this.messageBottom="",this.downloadReportClass="downloadReport",this.emailid=this.userInfo.primaryEmail,this.manageEmployeeUrl=`employee/employee/edit/${this.userInfo.employeeId}`}getApplicationFeatures(){this.userInfoService.hasPermission(L.V.MkoApplication,D.Ch.ApplicationMembership).subscribe(t=>{this.hasMKO=t,console.log(t)}),this.userInfoService.hasPermission(L.V.HrDrive,D.Sn.ApplicationMembership).subscribe(t=>{this.hasHrD=t,console.log(t)}),this.supportUrl=this.platformUrl+"/home/support"}loadReports(){this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.fetchReportsSSRSFailed=!1;const t=[];t.push("reportTypeId eq Kpa.Services.Reporting.Domain.Enums.ReportType'EHS'"),t.pu
1sh(this.userInfo.accessListId?"forGroup eq "+!0:"forFacility eq "+!0);let n=t.length>0?"("+t.join(" and ")+")":"";this.loadingIndicatorService.startLoading(),this.reportingOdataService.oDataReporting.Query().Filter(n).Exec().subscribe(o=>{this.gridData=o,this.spotlightData=o.sort((r,s)=>r.Sequence-s.Sequence).map(function(r){return r.DownloadURL=encodeURIComponent(r.DownloadURL),r}),this.loadingIndicatorService.stopLoading()},o=>{this.loadingIndicatorService.stopLoading(),this.fetchReportsSSRSFailed=!0})}setViewUrl(){this.viewUrl=this.userInfo.accessListId?"/Clients/group/IssueStats.aspx?&lobId=1":"/Clients/facility/IssueStats.aspx?&lobId=1"}showTooltip(t){const n=t.target;("TD"===n.nodeName||"TH"===n.nodeName)&&n.offsetWidth<n.scrollWidth?this.tooltipDir.toggle(n):this.tooltipDir.hide()}downloadReport(t,n,o){this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.fetchReportsSSRSFailed=!1,"Active Employee List"===o?this.batchImportService.getActiveEmployeeList().subscribe(r=>{this.downloadFile(r)},r=>{this.errorMessage(r)}):decodeURIComponent(t)==this.downloadTrainingPath?(this.sendReportEmailRequest=!0,this.reportUrl=t,this.reportType=n):this.reportingService.getReport(t,n).subscribe(r=>{this.downloadFile(r)},r=>{this.errorMessage(r)})}errorMessage(t){console.log(t),t instanceof C.yz&&404===t.status&&(this.fetchReportNoDataFailed=!0),t instanceof C.yz&&400===t.status&&(this.fetchReportSSRSFailed=!0),window.scrollTo(0,0)}downloadFile(t){let n=t.fileobject;if(window.navigator){const s=window.navigator;if(s&&s.msSaveOrOpenBlob)return void s.msSaveOrOpenBlob(n)}const o=window.URL.createObjectURL(n);let r=document.createElement("a");r.href=o,r.download=t.filename,r.click(),setTimeout(function(){window.URL.revokeObjectURL(o)},100)}sendReportEmail(){this.closeSendReportDialog(),this.reportingService.sendReportEmail(this.userInfo.userId,this.userInfo.primaryEmail,this.reportUrl,this.reportType).subscribe(t=>{1==t&&(this.reportEmailQueued=!0)},t=>{t instanceof C.yz&&404===t.status&&(this.fetchReportNoDataFailed=!0),t instanceof C.yz&&400===t.status&&(this.fetchReportSSRSFailed=!0),window.scrollTo(0,0)})}downloadReportWithParams(t,n,o){this.fetchReportNoDataFailed=!1,this.fetchReportSSRSFailed=!1,this.showModal=!1,this.reportingService.getReportWithParams(t,n,o).subscribe(r=>{let s=r.fileobject;if(window.navigator){const M=window.navigator;if(M&&M.msSaveOrOpenBlob)return void M.msSaveOrOpenBlob(s)}const b=window.URL.createObjectURL(s);let w=document.createElement("a");w.href=b,w.download=r.filename,w.click(),setTimeout(function(){window.URL.revokeObjectURL(b)},100)},r=>{console.log(r),r instanceof C.yz&&404===r.status&&(this.showModal=!1,this.fetchReportNoDataFailed=!0),r instanceof C.yz&&400===r.status&&(this.showModal=!1,this.fetchReportSSRSFailed=!0),window.scrollTo(0,0)})}onDownloadReport(t){this.confirmDownload.emit(!0),console.log("submit"),console.log(t),console.log(this.reportForOptions),console.log(this.reportTypeForOptions),this.downloadReportWithParams(this.reportForOptions,this.reportTypeForOptions,t)}closeSendReportDialog(){this.sendReportEmailRequest=!1}optionsClick(t,n,o){this.reportForOptions=t,this.reportTypeForOptions=n,this.title=o,this.loadOptionalFields(t,n)}loadOptionalFields(t,n){this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.loadingIndicatorService.startLoading(),this.reportingService.getOptionsFields(t,n).subscribe(o=>{this.regConfig=o,this.confirmDownload.emit(!0),this.showModal=!0,this.loadingIndicatorService.stopLoading()},o=>{o instanceof C.yz&&404===o.status&&(this.fetchReportNoDataFailed=!0,this.loadingIndicatorService.stopLoading()),o instanceof C.yz&&400===o.status&&(this.fetchReportSSRSFailed=!0,this.loadingIndicatorService.stopLoading()),window.scrollTo(0,0)})}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(X.F),e.rXU(K),e.rXU(Y.k),e.rXU(z.B),e.rXU(D.fv),e.rXU($.O))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["app-ehs-reporting"]],viewQuery:function(n,o){if(1&n&&(e.GBs(S.dg,7),e.GBs(ee,5)),2&n){let r;e.mGM(r=e.lsd())&&(o.tooltipDir=r.first),e.mGM(r=e.lsd())&&(o.form=r.first)}},decls:32,vars:27,consts:[[1,"reporting"],[3,"showModal","regConfig","title","messageTop","messageBottom","downloadReportClass","showModalChange","regConfigChange","titleChange","messageTopChange","messageBottomChange","downloadReportClassChange","downloadReport"],["mainTitle","Unable to Retrieve Report","id","SSRSFailed",4,"ngIf"],["mainTitle","Unable to Retrieve Reports","id","SSRSreportsFailed",4,"ngIf"],["mainTitle","Unable to Retrieve Report","id","noData",4,"ngIf"],["state","success","mainTitle","Report Email","id","noData",4,"ngIf"],[1,"header"],[1,"reporting-reports-section"],[4,"ngFor","ngForOf"],[1,"headerSecond"],[1,"reporting-grid-section"],["template",""],["kendoTooltip","","showOn","none","tooltipClass","kpa-tooltip-grid","filter",".k-grid td",3,"tooltipTemplate","mouseover"],[3,"kendoGridBinding","height"],["title","",1,"imageColumn",3,"width"],["kendoGridCellTemplate",""],["field","Name",1,"columnGrid",3,"width","headerClass"],["field","Description",1,"nameColumn",3,"width"],["title","Actions",1,"columnGrid",3,"width","headerClass"],["
1id","sendreport-dialog-prompt",3,"maxWidth","height","close",4,"ngIf"],["mainTitle","Unable to Retrieve Report","id","SSRSFailed"],[3,"href"],["mainTitle","Unable to Retrieve Reports","id","SSRSreportsFailed"],["mainTitle","Unable to Retrieve Report","id","noData"],["state","success","mainTitle","Report Email","id","noData"],[1,"reporting-section",3,"hidden"],[1,"reporting-card"],[1,"kpa-reporting"],[1,"kpa-reporting-item"],[1,"kpa-reporting-item-content"],["height","80","width","80",3,"src"],[1,"kpa-reporting-item-paragraph"],[1,"kpa-reporting-buttons"],["class","left-align-buttons",4,"ngIf"],[1,"right-align-buttons"],[4,"ngIf"],["class","hrefView",4,"ngIf"],[1,"left-align-buttons"],["id","btn_Options","kendoButton","","kpaTextButton","",1,"standAloneReportBtn",3,"click"],["id","btn_Download","kendoButton","","kpaSecondaryButton","",1,"standAloneReportBtn",3,"click"],[1,"hrefView"],["id","btn_View","kendoButton","","kpaSecondaryButton","",1,"standAloneReportBtnTop"],["id","btn_View","kendoButton","","kpaSecondaryButton","",1,"standAloneReportBtn"],["height","40px","width","40px",3,"src"],[1,"kpa-reporting-buttons-grid"],[1,"kpa-buttons-grid-start"],[1,"kpa-buttons-grid-end"],["id","btn_Options","kendoButton","",1,"standAloneReportBtnGrid",3,"primary","look","click"],["id","btn_View","kendoButton","",1,"standAloneReportBtnGrid",3,"primary","look"],["id","btn_Download","kendoButton","","kpaTextButton","",1,"standAloneReportBtnGrid",3,"click"],["id","btn_View","kendoButton","","kpaTextButton","",1,"standAloneReportBtnGridView"],["id","sendreport-dialog-prompt",3,"maxWidth","height","close"],["id","cancel-dialog-prompt-title"],["id","cancel-dialog-prompt-txt",1,"promptText"],[1,"kpa-dialog-button-wrap-delete","float-right"],["id","cancel-dialog-prompt-btn-cancel","kendoButton","",3,"primary","look","click"],["id","send-report-email","kendoButton","",3,"primary","look","click"]],template:function(n,o){if(1&n&&(e.j41(0,"div",0),e.nrm(1,"app-kpa-spinner"),e.j41(2,"app-options-modal",1),e.bIt("showModalChange",function(s){return o.showModal=s})("regConfigChange",function(s){return o.regConfig=s})("titleChange",function(s){return o.title=s})("messageTopChange",function(s){return o.messageTop=s})("messageBottomChange",function(s){return o.messageBottom=s})("downloadReportClassChange",function(s){return o.downloadReportClass=s})("downloadReport",function(s){return o.onDownloadReport(s)}),e.k0s(),e.j41(3,"h1"),e.EFF(4,"Environment, Health and Safety Reports"),e.k0s(),e.DNE(5,Ee,5,1,"kpa-error-card",2),e.DNE(6,Fe,5,1,"kpa-error-card",3),e.DNE(7,Te,5,1,"kpa-error-card",4),e.DNE(8,xe,2,0,"kpa-status-card",5),e.j41(9,"div",6)(10,"h2"),e.EFF(11,"Reports Spotlight"),e.k0s()(),e.j41(12,"div",7),e.DNE(13,Be,18,8,"div",8),e.k0s(),e.j41(14,"div",9)(15,"h2"),e.EFF(16,"All Reports"),e.k0s()(),e.j41(17,"div",10),e.DNE(18,Ge,2,1,"ng-template",null,11,e.C5r),e.j41(20,"div",12),e.bIt("mouseover",function(s){return o.showTooltip(s)}),e.j41(21,"kendo-grid",13),e.nI1(22,"orderBy"),e.j41(23,"kendo-grid-column",14),e.DNE(24,Ue,1,1,"ng-template",15),e.k0s(),e.nrm(25,"kendo-grid-column",16)(26,"kendo-grid-column",17),e.j41(27,"kendo-grid-column",18),e.DNE(28,Ae,8,5,"ng-template",15),e.k0s()(),e.DNE(29,Xe,2,1,"ng-template",null,11,e.C5r),e.k0s()(),e.DNE(31,Ye,13,8,"kendo-dialog",19),e.k0s()),2&n){const r=e.sdS(19);e.R7$(2),e.Y8G("showModal",o.showModal)("regConfig",o.regConfig)("title",o.title)("messageTop",o.messageTop)("messageBottom",o.messageBottom)("downloadReportClass",o.downloadReportClass),e.R7$(3),e.Y8G("ngIf",o.fetchReportSSRSFailed),e.R7$(1),e.Y8G("ngIf",o.fetchReportsSSRSFailed),e.R7$(1),e.Y8G("ngIf",o.fetchReportNoDataFailed),e.R7$(1),e.Y8G("ngIf",o.reportEmailQueued),e.R7$(5),e.Y8G("ngForOf",o.spotlightData),e.R7$(7),e.Y8G("tooltipTemplate",r),e.R7$(1),e.Y8G("kendoGridBinding",e.brH(22,21,o.gridData,"Name",!1))("height",320),e.R7$(2),e.Y8G("width",25),e.R7$(2),e.Y8G("width",60)("headerClass",e.lJ4(25,He)),e.R7$(1),e.Y8G("width",160),e.R7$(1),e.Y8G("width",90)("headerClass",e.lJ4(26,We)),e.R7$(4),e.Y8G("ngIf",o.sendReportEmailRequest)}},dependencies:[a.Sq,a.bT,E.Ioe,T.mq,O.Qp,S.dg,E._ab,E.vqx,E.i4w,q.A,J.o,ne.i,H.x,N.A,Q.p,W,te],styles:['.reporting .card{border:none;border-radius:3px;box-shadow:0 1px 2px #00000040}.reporting .card-head h3{font-size:16px!important;font-weight:700}[hidden]{display:none!important;margin:0!important}
1.reporting-reports-section{display:flex;flex-direction:row;margin:0 -15px 0 0;align-items:stretch}.reporting-grid-section .k-grid .k-grid-header th{padding-top:15px!important;padding-bottom:15px!important}::ng-deep .k-grid tbody tr{height:40px}::ng-deep .k-grid tbody tr td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.k-grid .k-grid-content td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kpa-tooltip-grid .k-tooltip{font-family:Open Sans,sans-serif;font-weight:600;font-size:12px;line-height:20px;padding:4px 10px}.kpa-tooltip-grid .k-callout:after{position:absolute;width:0;height:0;content:""}.kpa-tooltip-grid .k-callout.k-callout-n:after{top:0;left:-3px}.reporting-section{padding-top:15px;padding-right:30px;min-width:300px;max-width:500px}.reporting-grid-section{margin-top:20px}.kpa-reporting-item-paragraph{margin-top:20px;height:120px}.kpa-reporting-buttons{display:flex;flex-direction:row;flex-wrap:wrap}.kpa-reporting-buttons-grid{display:flex;flex-direction:row;justify-content:flex-end;align-items:flex-end;flex-wrap:wrap}.kpa-buttons-grid-start{justify-content:flex-start}.kpa-buttons-grid-end{justify-content:flex-end;align-items:flex-end}.reporting-card{padding-right:10px}.right-align-buttons{margin-left:auto}.left-align-buttons{margin-left:-15px;padding-left:0}.reporting-section h2{margin-bottom:25px}.reporting-section-content{display:flex}.reporting-main{margin-right:10px}.reporting-side{margin-left:15px}.reporting .card-title{color:#514e4b;font-size:16px;font-weight:700}.kpa-reporting h3{margin:0!important}.kpa-reporting-item{padding:0}.kpa-reporting-item-content{width:100%}.kpa-reporting-item-paragraph p{color:#514e4b;margin-bottom:10px}.kpa-reporting-buttons-grid .k-button{width:120px}.standAloneReportBtnTop{width:150px}.standAloneReportBtnGridView{width:30px}.imageColumn{padding-right:10px!important}.reporting .header{margin-top:20px;margin-bottom:20px}.headerSecond{margin-top:20px;margin-bottom:30px}.columnGrid{padding-left:5px!important}.k-grid tbody tr{line-height:14px}tr .nameClass{padding-left:5px!important}tr .actionsClass{padding-right:50px!important;text-align:right}.hrefView a{text-decoration:none}.k-button:hover:before,.k-toolbar .k-picker-wrap:hover:before,.k-toolbar .k-dropdown-wrap:hover:before,.k-editor-toolbar .k-picker-wrap:hover:before,.k-editor-toolbar .k-dropdown-wrap:hover:before,.k-editor-toolbar a.k-tool:hover:before,.k-gantt-views li a:hover:before,.k-scheduler-toolbar li a:hover:before,.k-scheduler-footer li a:hover:before,.k-button.k-state-hover:before,.k-toolbar .k-state-hover.k-picker-wrap:before,.k-toolbar .k-state-hover.k-dropdown-wrap:before,.k-editor-toolbar .k-state-hover.k-picker-wrap:before,.k-editor-toolbar .k-state-hover.k-dropdown-wrap:before,.k-editor-toolbar a.k-state-hover.k-tool:before,.k-gantt-views li a.k-state-hover:before,.k-scheduler-toolbar li a.k-state-hover:before,.k-scheduler-footer li a.k-state-hover:before{opacity:0!important}.k-button:focus:before,.k-toolbar .k-picker-wrap:focus:before,.k-toolbar .k-dropdown-wrap:focus:before,.k-editor-toolbar .k-picker-wrap:focus:before,.k-editor-toolbar .k-dropdown-wrap:focus:before,.k-editor-toolbar a.k-tool:focus:before,.k-gantt-views li a:focus:before,.k-scheduler-toolbar li a:focus:before,.k-scheduler-footer li a:focus:before,.k-button.k-state-focused:before,.k-toolbar .k-state-focused.k-picker-wrap:before,.k-toolbar .k-state-focused.k-dropdown-wrap:before,.k-editor-toolbar .k-state-focused.k-picker-wrap:before,.k-editor-toolbar .k-state-focused.k-dropdown-wrap:before,.k-editor-toolbar a.k-state-focused.k-tool:before,.k-gantt-views li a.k-state-focused:before,.k-scheduler-toolbar li a.k-state-focused:before,.k-scheduler-footer li a.k-state-focused:before{opacity:0!important}.float-right{float:right}\n\n/*# sourceMappingURL=ehs-reporting.component.css.map*/'],encapsulation:2})}}return i})();var Z=l(55499);function ze(i,p){if(1&i&&(e.j41(0,"kpa-error-card",20),e.EFF(1," An error occured while attempting to retrieve your report. Please try again later. If the error persists, please contact "),e.j41(2,"a",21),e.EFF(3,"Support"),e.k0s(),e.EFF(4," for further assistance. "),e.k0s()),2&i){const t=e.XpG();e.R7$(2),e.FS9("href",t.supportUrl,e.B4B)}}function qe(i,p){if(1&i&&(e.j41(0,"kpa-error-card",22),e.EFF(1," No data was found for the selected report. Please try again after data has been inputted into the system for the selected report. For further assistance, please contact "),e.j41(2,"a",21),e.EFF(3,"Support"),e.k0s(),e.EFF(4,". "),e.k0s()),2&i){const t=e.XpG();e.R7$(2),e.FS9("href",t.supportUrl,e.B4B)}}function Je(i,p){if(1&i&&(e.j41(0,"kpa-error-card",23),e.EFF(1," An error occured while attempting to retrieve the reports. Please try again later. If the error persists, please contact "),e.j41(2,"a",21),e.EFF(3,"Support"),e.k0s(),e.EFF(4," for further assistance. "),e.k0s()),2&i){const t=e.XpG();e.R7$(2),e.FS9("href",t.supportUrl,e.B4B)}}function Qe(i,p){1&i&&(e.j41(0,"kpa-status-card",24),e.EFF(1," Email will be sent to you as soon as it is ready. "),e.k0s())}function Ze(i,p){if(1&i){const t=e.RV6();e.j41(0,"div",37)(1,"button",38),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG();return e.Njj(r.optionsClick(o.DownloadURL,o.ReportTypeId,o.Name))}),e.EFF(2," Options "),e.k0s()()}}function et(i,p){if(1&i&&(e.j41(0,"div",37)(1,"a",21)(2,"button",39),e.EFF(3," View "),e.k0s()()()),2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(1),e.FCK("href","",n.mkoUrl,"",t.ViewURL,"",e.B4B)}}function tt(i,p){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"button",40),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG();return e.Njj(r.downloadReport(o.DownloadURL,o.ReportTypeId))}),e.EFF(2," Download "),e.k0s()()}}function ot(i,p){if(1&i&&(e.j41(0,"div",41)(1,"a",21)(2,"button",42),e.EFF(3," View Top Issues "),e.k0s()()()),2&i){const t=e.XpG(2);e.R7$(1),e.FCK("href","",t.mkoUrl,"",t.viewUrl,"",e.B4B)}}function it(i,p){if(1&i&&(e.j41(0,"div")(1,"div",25)(2,"div",26)(3,"kpa-card",27)(4,"div",28)(5,"div",29),e.nrm(6,"img",30),e.j41(7,"div",31)(8,"h4"),e.EFF(9),e.k0s(),e.j41(10,"p"),e.EFF(11),e.k0s()()()(),e.j41(12,"div",32),e.DNE(13,Ze,3,0,"div",33),e.DNE(14,et,4,2,"div",33),e.j41(15,"div",34),e.DNE(16,tt,3,0,"div",35),e.DNE(17,ot,4,2,"div",36),e.k0s()()()()()()),2&i){const t=p.$implicit;e.R7$(1),e.Y8G("hidden",!t.IsSpotlight),e.R7$(5),e.FS9("src","../../../assets/images/"+t.ImageName,e.B4B),e.R7$(3),e.JRh(t.Name),e.R7$(2),e.JRh(t.Description),e.R7$(2),e.Y8G("ngIf",t.CanSetOptions),e.R7$(1),e.Y8G("ngIf",t.CanView&&"Deal Jacket Audit"===t.Name),e.R7$(2),e.Y8G("ngIf",t.CanDownload),e.R7$(1),e.Y8G("ngIf",t.CanView&&"Top 25 Occurring F&I Issues"===t.Name)}
1}function nt(i,p){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=p.$implicit;e.R7$(1),e.JRh(t.nativeElement.innerText)}}function rt(i,p){1&i&&e.nrm(0,"img",43),2&i&&e.FS9("src","../../../assets/images/"+p.$implicit.ImageName,e.B4B)}function at(i,p){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"button",47),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG();return e.Njj(r.optionsClick(o.DownloadURL,o.ReportTypeId,o.Name))}),e.EFF(2," Options "),e.k0s()()}}function st(i,p){if(1&i&&(e.j41(0,"div")(1,"a",21)(2,"button",48),e.EFF(3," View "),e.k0s()()()),2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(1),e.FCK("href","",n.mkoUrl,"",t.ViewURL,"",e.B4B)}}function lt(i,p){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"button",49),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG();return e.Njj(r.downloadReport(o.DownloadURL,o.ReportTypeId))}),e.EFF(2," Download "),e.k0s()()}}function pt(i,p){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"button",49),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.downloadMasterEmployeeList())}),e.EFF(2," Download "),e.k0s()()}}function ct(i,p){if(1&i&&(e.j41(0,"div")(1,"a",21)(2,"button",48),e.EFF(3," View "),e.k0s()()()),2&i){const t=e.XpG(2);e.R7$(1),e.FCK("href","",t.mkoUrl,"",t.viewUrl,"",e.B4B)}}function dt(i,p){if(1&i&&(e.j41(0,"div")(1,"a",21)(2,"button",48),e.EFF(3," View "),e.k0s()()()),2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(1),e.FS9("href",n.mkoUrl+t.ViewURL,e.B4B)}}function mt(i,p){if(1&i&&(e.j41(0,"div",44)(1,"div",45),e.DNE(2,at,3,0,"div",35),e.DNE(3,st,4,2,"div",35),e.k0s(),e.j41(4,"div",46),e.DNE(5,lt,3,0,"div",35),e.DNE(6,pt,3,0,"div",35),e.DNE(7,ct,4,2,"div",35),e.DNE(8,dt,4,1,"div",35),e.k0s()()),2&i){const t=p.$implicit;e.R7$(2),e.Y8G("ngIf",t.CanSetOptions),e.R7$(1),e.Y8G("ngIf",t.CanView&&"Deal Jacket Audit"===t.Name),e.R7$(2),e.Y8G("ngIf",t.CanDownload&&"Active Employee List"!==t.Name),e.R7$(1),e.Y8G("ngIf",t.CanDownload&&"Active Employee List"===t.Name),e.R7$(1),e.Y8G("ngIf",t.CanView&&"Top 25 Occurring F&I Issues"===t.Name),e.R7$(1),e.Y8G("ngIf",t.CanView&&"Top 25 Occurring F&I Issues"!==t.Name&&!t.CanDownload)}}function ht(i,p){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=p.$implicit;e.R7$(1),e.JRh(t.nativeElement.textContent)}}function gt(i,p){if(1&i){const t=e.RV6();e.j41(0,"kendo-dialog",50),e.bIt("close",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.closeSendReportDialog())}),e.j41(1,"div")(2,"h4",51),e.EFF(3,"Download Training Report"),e.k0s(),e.j41(4,"p",52),e.EFF(5),e.j41(6,"a",21),e.EFF(7,"User Management"),e.k0s()(),e.j41(8,"div",53)(9,"button",54),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.closeSendReportDialog())}),e.EFF(10," Cancel "),e.k0s(),e.j41(11,"button",55),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.sendReportEmail())}),e.EFF(12," Send "),e.k0s()()()()}if(2&i){const t=e.XpG();e.Y8G("maxWidth",600)("height",180),e.R7$(5),e.SpI(" We'll send a completed report to ",t.emailid,". If this is the wrong address for you, you may update email address under "),e.R7$(1),e.FS9("href",t.manageEmployeeUrl,e.B4B),e.R7$(3),e.Y8G("primary",!0)("look","flat"),e.R7$(2),e.Y8G("primary",!0)("look","flat")}}const ut=function(){return{nameClass:!0}},_t=function(){return{actionsClass:!0}};let ft=(()=>{class i{constructor(t,n,o,r,s,b,w){this.loadingIndicatorService=t,this.reportingOdataService=n,this.userInfoService=o,this.reportingService=r,this.batchImportService=s,this.authService=b,this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.fetchReportsSSRSFailed=!1,this.reportEmailQueued=!1,this.sendReportEmailRequest=!1,this.reportUrl="",this.reportType="",this.emailid="",this.hasMKO=!1,this.hasHrD=!1,this.showModal=!1,this.confirmDownload=new e.bkB,this.downloadTrainingPath="/Kpa.Reports/ClientReports/TrainingCompletionReport",this.regConfig=[],this.mkoUrl=w.preAuthLanding.myKpaOnline,this.hrmUrl=w.preAuthLanding.hrDrive,this.platformUrl=w.preAuthLanding.platform}ngOnInit(){this.userInfo=this.userInfoService.getUserInfoFromStorage(),this.loadReports(),this.setViewUrl(),this.getApplicationFeatures(),this.messageTop="Customize your report using the filter and sort options below, then select Download Report.",this.messageBottom="",this.downloadReportClass="downloadReport",this.emailid=this.userInfo.primaryEmail,this.manageEmployeeUrl=`employee/employee/edit/${this.userInfo.employeeId}`}getApplicationFeatures(){this.userInfoService.hasPermission(L.V.MkoApplication,D.Ch.ApplicationMembership).subscribe(t=>{this.hasMKO=t,console.log(t)}),this.userInfoService.hasPermission(L.V.HrDrive,D.Sn.ApplicationMembership).subscribe(t=>{this.hasHrD=t,console.log(t)}),this.supportUrl=this.platformUrl+"/home/support"}loadReports(){this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.fetchReportsSSRSFailed=!1;const t=[];t.push("reportTypeId eq Kpa.Services.Reporting.Domain.Enums.ReportType'FandI'"),t.pu
1sh(this.userInfo.accessListId?"forGroup eq "+!0:"forFacility eq "+!0);let n=t.length>0?"("+t.join(" and ")+")":"";this.loadingIndicatorService.startLoading(),this.reportingOdataService.oDataReporting.Query().Filter(n).Exec().subscribe(o=>{let r=[];this.userInfo.accessListId?(r=o.filter(s=>"deal jacket audit"!==s.Name.toLowerCase()),r=r.map(function(s){return"top 25 occurring f&i issues"===s.Name.toLowerCase()&&(s.IsSpotlight=!0),s})):r=o,this.gridData=r,this.spotlightData=r.sort((s,b)=>s.Sequence-b.Sequence).map(function(s){return s.DownloadURL=encodeURIComponent(s.DownloadURL),s}),this.loadingIndicatorService.stopLoading()},o=>{this.loadingIndicatorService.stopLoading(),this.fetchReportsSSRSFailed=!0})}setViewUrl(){this.viewUrl=this.userInfo.accessListId?"/Clients/group/IssueStats.aspx?&lobId=3":"/Clients/facility/IssueStats.aspx?&lobId=3"}downloadMasterEmployeeList(){this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.fetchReportsSSRSFailed=!1,this.batchImportService.getBatchActiveEmployeeList().subscribe(t=>{let n=t.fileobject;if(window.navigator){const s=window.navigator;if(s&&s.msSaveOrOpenBlob)return void s.msSaveOrOpenBlob(n)}const o=window.URL.createObjectURL(n);let r=document.createElement("a");r.href=o,r.download=t.filename,r.click(),setTimeout(function(){window.URL.revokeObjectURL(o)},100)},t=>{console.log(t),t instanceof C.yz&&404===t.status&&(this.fetchReportNoDataFailed=!0),t instanceof C.yz&&400===t.status&&(this.fetchReportSSRSFailed=!0),window.scrollTo(0,0)})}showTooltip(t){const n=t.target;("TD"===n.nodeName||"TH"===n.nodeName)&&n.offsetWidth<n.scrollWidth?this.tooltipDir.toggle(n):this.tooltipDir.hide()}downloadReport(t,n){this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.fetchReportsSSRSFailed=!1,decodeURIComponent(t)==this.downloadTrainingPath?(this.sendReportEmailRequest=!0,this.reportUrl=t,this.reportType=n):this.reportingService.getReport(t,n).subscribe(o=>{let r=o.fileobject;if(window.navigator){const w=window.navigator;if(w&&w.msSaveOrOpenBlob)return void w.msSaveOrOpenBlob(r)}const s=window.URL.createObjectURL(r);var b=document.createElement("a");b.href=s,b.download=o.filename,b.click(),setTimeout(function(){window.URL.revokeObjectURL(s)},100)},o=>{console.log(o),o instanceof C.yz&&404===o.status&&(this.fetchReportNoDataFailed=!0),o instanceof C.yz&&400===o.status&&(this.fetchReportSSRSFailed=!0)})}sendReportEmail(){this.closeSendReportDialog(),this.reportingService.sendReportEmail(this.userInfo.userId,this.userInfo.primaryEmail,this.reportUrl,this.reportType).subscribe(t=>{1==t&&(this.reportEmailQueued=!0)},t=>{t instanceof C.yz&&404===t.status&&(this.fetchReportNoDataFailed=!0),t instanceof C.yz&&400===t.status&&(this.fetchReportSSRSFailed=!0),window.scrollTo(0,0)})}closeSendReportDialog(){this.sendReportEmailRequest=!1}downloadReportWithParams(t,n,o){this.fetchReportNoDataFailed=!1,this.fetchReportSSRSFailed=!1,this.showModal=!1,this.reportingService.getReportWithParams(t,n,o).subscribe(r=>{let s=r.fileobject;if(window.navigator){const M=window.navigator;if(M&&M.msSaveOrOpenBlob)return void M.msSaveOrOpenBlob(s)}const b=window.URL.createObjectURL(s);let w=document.createElement("a");w.href=b,w.download=r.filename,w.click(),setTimeout(function(){window.URL.revokeObjectURL(b)},100)},r=>{console.log(r),r instanceof C.yz&&404===r.status&&(this.showModal=!1,this.fetchReportNoDataFailed=!0),r instanceof C.yz&&400===r.status&&(this.showModal=!1,this.fetchReportSSRSFailed=!0),window.scrollTo(0,0)})}onDownloadReport(t){this.confirmDownload.emit(!0),this.downloadReportWithParams(this.reportForOptions,this.reportTypeForOptions,t)}optionsClick(t,n,o){this.reportForOptions=t,this.reportTypeForOptions=n,this.title=o,this.loadOptionalFields(t,n)}loadOptionalFields(t,n){this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.loadingIndicatorService.startLoading(),this.reportingService.getOptionsFields(t,n).subscribe(o=>{this.regConfig=o,this.confirmDownload.emit(!0),this.showModal=!0,this.loadingIndicatorService.stopLoading()},o=>{o instanceof C.yz&&404===o.status&&(this.fetchReportNoDataFailed=!0,this.loadingIndicatorService.stopLoading()),o instanceof C.yz&&400===o.status&&(this.fetchReportSSRSFailed=!0,this.loadingIndicatorService.stopLoading()),window.scrollTo(0,0)})}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(X.F),e.rXU(K),e.rXU(D.fv),e.rXU(Y.k),e.rXU(z.B),e.rXU(Z.u),e.rXU($.O))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["app-fi-reports"]
1],viewQuery:function(n,o){if(1&n&&e.GBs(S.dg,7),2&n){let r;e.mGM(r=e.lsd())&&(o.tooltipDir=r.first)}},decls:32,vars:27,consts:[[1,"reporting"],[3,"showModal","regConfig","title","messageTop","messageBottom","downloadReportClass","showModalChange","regConfigChange","titleChange","messageTopChange","messageBottomChange","downloadReportClassChange","downloadReport"],["mainTitle","Unable to Retrieve Report","id","SSRSFailed",4,"ngIf"],["mainTitle","Unable to Retrieve Report","id","noData",4,"ngIf"],["mainTitle","Unable to Retrieve Reports","id","SSRSreportsFailed",4,"ngIf"],["state","success","mainTitle","Report Email","id","noData",4,"ngIf"],[1,"header"],[1,"reporting-reports-section"],[4,"ngFor","ngForOf"],[1,"headerSecond"],[1,"reporting-grid-section"],["template",""],["kendoTooltip","","showOn","none","tooltipClass","kpa-tooltip-grid","filter",".k-grid td",3,"tooltipTemplate","mouseover"],[3,"kendoGridBinding","height"],["title","",1,"imageColumn",3,"width"],["kendoGridCellTemplate",""],["field","Name",1,"columnGrid",3,"width","headerClass"],["field","Description",1,"nameColumn",3,"width"],["title","Actions",1,"columnGrid",3,"width","headerClass"],["
1id","sendreport-dialog-prompt",3,"maxWidth","height","close",4,"ngIf"],["mainTitle","Unable to Retrieve Report","id","SSRSFailed"],[3,"href"],["mainTitle","Unable to Retrieve Report","id","noData"],["mainTitle","Unable to Retrieve Reports","id","SSRSreportsFailed"],["state","success","mainTitle","Report Email","id","noData"],[1,"reporting-section",3,"hidden"],[1,"reporting-card"],[1,"kpa-reporting"],[1,"kpa-reporting-item"],[1,"kpa-reporting-item-content"],["height","80","width","80",3,"src"],[1,"kpa-reporting-item-paragraph"],[1,"kpa-reporting-buttons"],["class","left-align-buttons",4,"ngIf"],[1,"right-align-buttons"],[4,"ngIf"],["class","hrefView",4,"ngIf"],[1,"left-align-buttons"],["id","btn_Options","kendoButton","","kpaTextButton","",1,"standAloneReportBtn",3,"click"],["id","btn_View","kendoButton","","kpaTextButton","",1,"standAloneReportBtn"],["id","btn_Download","kendoButton","","kpaSecondaryButton","",1,"standAloneReportBtn",3,"click"],[1,"hrefView"],["id","btn_View","kendoButton","","kpaSecondaryButton","",1,"standAloneReportBtnTop"],["height","40px","width","40px",3,"src"],[1,"kpa-reporting-buttons-grid"],[1,"kpa-buttons-grid-start"],[1,"kpa-buttons-grid-end"],["id","btn_Options","kendoButton","","kpaTextButton","",1,"standAloneReportBtnGrid",3,"click"],["id","btn_View","kendoButton","","kpaTextButton","",1,"standAloneReportBtnGridView"],["id","btn_Download","kendoButton","","kpaTextButton","",1,"standAloneReportBtnGrid",3,"click"],["id","sendreport-dialog-prompt",3,"maxWidth","height","close"],["id","cancel-dialog-prompt-title"],["id","cancel-dialog-prompt-txt",1,"promptText"],[1,"kpa-dialog-button-wrap-delete","float-right"],["id","cancel-dialog-prompt-btn-cancel","kendoButton","",3,"primary","look","click"],["id","send-report-email","kendoButton","",3,"primary","look","click"]],template:function(n,o){if(1&n&&(e.j41(0,"div",0),e.nrm(1,"app-kpa-spinner"),e.j41(2,"app-options-modal",1),e.bIt("showModalChange",function(s){return o.showModal=s})("regConfigChange",function(s){return o.regConfig=s})("titleChange",function(s){return o.title=s})("messageTopChange",function(s){return o.messageTop=s})("messageBottomChange",function(s){return o.messageBottom=s})("downloadReportClassChange",function(s){return o.downloadReportClass=s})("downloadReport",function(s){return o.onDownloadReport(s)}),e.k0s(),e.j41(3,"h1"),e.EFF(4,"Finance & Insurance Reports"),e.k0s(),e.DNE(5,ze,5,1,"kpa-error-card",2),e.DNE(6,qe,5,1,"kpa-error-card",3),e.DNE(7,Je,5,1,"kpa-error-card",4),e.DNE(8,Qe,2,0,"kpa-status-card",5),e.j41(9,"div",6)(10,"h2"),e.EFF(11,"Reports Spotlight"),e.k0s()(),e.j41(12,"div",7),e.DNE(13,it,18,8,"div",8),e.k0s(),e.j41(14,"div",9)(15,"h2"),e.EFF(16,"All Reports"),e.k0s()(),e.j41(17,"div",10),e.DNE(18,nt,2,1,"ng-template",null,11,e.C5r),e.j41(20,"div",12),e.bIt("mouseover",function(s){return o.showTooltip(s)}),e.j41(21,"kendo-grid",13),e.nI1(22,"orderBy"),e.j41(23,"kendo-grid-column",14),e.DNE(24,rt,1,1,"ng-template",15),e.k0s(),e.nrm(25,"kendo-grid-column",16)(26,"kendo-grid-column",17),e.j41(27,"kendo-grid-column",18),e.DNE(28,mt,9,6,"ng-template",15),e.k0s()(),e.DNE(29,ht,2,1,"ng-template",null,11,e.C5r),e.k0s()(),e.DNE(31,gt,13,8,"kendo-dialog",19),e.k0s()),2&n){const r=e.sdS(19);e.R7$(2),e.Y8G("showModal",o.showModal)("regConfig",o.regConfig)("title",o.title)("messageTop",o.messageTop)("messageBottom",o.messageBottom)("downloadReportClass",o.downloadReportClass),e.R7$(3),e.Y8G("ngIf",o.fetchReportSSRSFailed),e.R7$(1),e.Y8G("ngIf",o.fetchReportNoDataFailed),e.R7$(1),e.Y8G("ngIf",o.fetchReportsSSRSFailed),e.R7$(1),e.Y8G("ngIf",o.reportEmailQueued),e.R7$(5),e.Y8G("ngForOf",o.spotlightData),e.R7$(7),e.Y8G("tooltipTemplate",r),e.R7$(1),e.Y8G("kendoGridBinding",e.brH(22,21,o.gridData,"Name",!1))("height",320),e.R7$(2),e.Y8G("width",25),e.R7$(2),e.Y8G("width",60)("headerClass",e.lJ4(25,ut)),e.R7$(1),e.Y8G("width",160),e.R7$(1),e.Y8G("width",90)("headerClass",e.lJ4(26,_t)),e.R7$(4),e.Y8G("ngIf",o.sendReportEmailRequest)}},dependencies:[a.Sq,a.bT,E.Ioe,T.mq,O.Qp,S.dg,E._ab,E.vqx,E.i4w,q.A,J.o,ne.i,H.x,N.A,Q.p,W,te],styles:['.reporting .card{border:none;border-radius:3px;box-shadow:0 1px 2px #00000040}.reporting .card-head h3{font-size:16px!important;font-weight:700}[hidden]{display:none!important;margin:0!important}
1.reporting-reports-section{display:flex;flex-direction:row;margin:0 -15px 0 0;align-items:stretch}::ng-deep .k-grid tbody tr{height:40px}::ng-deep .k-grid tbody tr td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reporting-grid-section .k-grid .k-grid-header th{padding-top:15px!important;padding-bottom:15px!important}.k-grid .k-grid-content td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kpa-tooltip-grid .k-tooltip{font-family:Open Sans,sans-serif;font-weight:600;font-size:12px;line-height:20px;padding:4px 10px}.kpa-tooltip-grid .k-callout:after{position:absolute;width:0;height:0;content:""}.kpa-tooltip-grid .k-callout.k-callout-n:after{top:0;left:-3px}.reporting-section{padding-top:15px;padding-right:30px;min-width:300px;max-width:500px}.reporting-grid-section{margin-top:20px}.kpa-reporting-item-paragraph{margin-top:20px;height:120px}.kpa-reporting-buttons{display:flex;flex-direction:row;flex-wrap:wrap}.kpa-reporting-buttons-grid{display:flex;flex-direction:row;justify-content:flex-end;align-items:flex-end;flex-wrap:wrap}.kpa-buttons-grid-star{justify-content:flex-start}.kpa-buttons-grid-end{justify-content:flex-end;align-items:flex-end}#btn_View.standAloneReportBtnGrid.k-button.k-primary.k-flat{justify-content:flex-end}.reporting-card{padding-right:10px}.right-align-buttons{margin-left:auto}.left-align-buttons{margin-left:-15px;padding-left:0}.reporting-section h2{margin-bottom:25px}.reporting-section-content{display:flex}.reporting-main{margin-right:10px}.reporting-side{margin-left:15px}.reporting .card-title{color:#514e4b;font-size:16px;font-weight:700}.kpa-reporting h3{margin:0!important}.kpa-reporting-item{padding:0}.kpa-reporting-item-content{width:100%}.kpa-reporting-item-paragraph p{color:#514e4b;margin-bottom:10px}.kpa-reporting-buttons-grid .k-button{width:120px}.standAloneReportBtnTop{width:150px}.standAloneReportBtnGrid{width:50px}.imageColumn{padding-right:10px!important}.reporting .header{margin-top:20px;margin-bottom:20px}.headerSecond{margin-top:20px;margin-bottom:30px}
1.k-grid-header .k-header{height:10px}.columnGrid{padding-left:5px!important}.k-grid tbody tr{line-height:14px}tr .nameClass{padding-left:5px!important}tr .actionsClass{padding-right:50px;text-align:right}.k-button:hover:before,.k-toolbar .k-picker-wrap:hover:before,.k-toolbar .k-dropdown-wrap:hover:before,.k-editor-toolbar .k-picker-wrap:hover:before,.k-editor-toolbar .k-dropdown-wrap:hover:before,.k-editor-toolbar a.k-tool:hover:before,.k-gantt-views li a:hover:before,.k-scheduler-toolbar li a:hover:before,.k-scheduler-footer li a:hover:before,.k-button.k-state-hover:before,.k-toolbar .k-state-hover.k-picker-wrap:before,.k-toolbar .k-state-hover.k-dropdown-wrap:before,.k-editor-toolbar .k-state-hover.k-picker-wrap:before,.k-editor-toolbar .k-state-hover.k-dropdown-wrap:before,.k-editor-toolbar a.k-state-hover.k-tool:before,.k-gantt-views li a.k-state-hover:before,.k-scheduler-toolbar li a.k-state-hover:before,.k-scheduler-footer li a.k-state-hover:before{opacity:0!important}.k-button:focus:before,.k-toolbar .k-picker-wrap:focus:before,.k-toolbar .k-dropdown-wrap:focus:before,.k-editor-toolbar .k-picker-wrap:focus:before,.k-editor-toolbar .k-dropdown-wrap:focus:before,.k-editor-toolbar a.k-tool:focus:before,.k-gantt-views li a:focus:before,.k-scheduler-toolbar li a:focus:before,.k-scheduler-footer li a:focus:before,.k-button.k-state-focused:before,.k-toolbar .k-state-focused.k-picker-wrap:before,.k-toolbar .k-state-focused.k-dropdown-wrap:before,.k-editor-toolbar .k-state-focused.k-picker-wrap:before,.k-editor-toolbar .k-state-focused.k-dropdown-wrap:before,.k-editor-toolbar a.k-state-focused.k-tool:before,.k-gantt-views li a.k-state-focused:before,.k-scheduler-toolbar li a.k-state-focused:before,.k-scheduler-footer li a.k-state-focused:before{opacity:0!important}\n\n/*# sourceMappingURL=fi-reports.component.css.map*/'],encapsulation:2})}}return i})();var oe=l(64334);function vt(i,p){if(1&i&&(e.j41(0,"kpa-error-card",18),e.EFF(1," An error occured while attempting to retrieve your report. Please try again later. If the error persists, please contact "),e.j41(2,"a",19),e.EFF(3,"Support"),e.k0s(),e.EFF(4," for further assistance. "),e.k0s()),2&i){const t=e.XpG();e.R7$(2),e.FS9("href",t.supportUrl,e.B4B)}}function kt(i,p){if(1&i&&(e.j41(0,"kpa-error-card",20),e.EFF(1," No data was found for the selected report. Please try again after data has been inputted into the system for the selected report. For further assistance, please contact "),e.j41(2,"a",19),e.EFF(3,"Support"),e.k0s(),e.EFF(4,". "),e.k0s()),2&i){const t=e.XpG();e.R7$(2),e.FS9("href",t.supportUrl,e.B4B)}}function Rt(i,p){if(1&i&&(e.j41(0,"kpa-error-card",21),e.EFF(1," An error occured while attempting to retrieve the reports. Please try again later. If the error persists, please contact "),e.j41(2,"a",19),e.EFF(3,"Support"),e.k0s(),e.EFF(4," for further assistance. "),e.k0s()),2&i){const t=e.XpG();e.R7$(2),e.FS9("href",t.supportUrl,e.B4B)}}function bt(i,p){1&i&&(e.j41(0,"div",22)(1,"h2"),e.EFF(2,"Reports Spotlight"),e.k0s()())}function Ct(i,p){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"button",34),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG();return e.Njj(r.optionsClick(o.DownloadURL,o.ReportTypeId,o.Name))}),e.EFF(2," Options "),e.k0s()()}}function wt(i,p){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"button",35),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG();return e.Njj(r.downloadTraining(o.Name))}),e.EFF(2," Download "),e.k0s()()}}function St(i,p){if(1&i&&(e.j41(0,"div")(1,"a",36)(2,"button",37),e.EFF(3," View "),e.k0s()()()),2&i){const t=e.XpG().$implicit;e.R7$(1),e.FS9("routerLink",t.ViewURL)}}function It(i,p){if(1&i&&(e.j41(0,"div")(1,"a",19)(2,"button",38),e.EFF(3," View "),e.k0s()()()),2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(1),e.FCK("href","",n.hrmUrl,"",t.ViewURL,"",e.B4B)}}function yt(i,p){if(1&i&&(e.j41(0,"div")(1,"div",23)(2,"div",24)(3,"kpa-card",25)(4,"div",26)(5,"div",27),e.nrm(6,"img",28),e.j41(7,"div",29)(8,"h4"),e.EFF(9),e.k0s(),e.j41(10,"p"),e.EFF(11),e.k0s()()()(),e.j41(12,"div",30)(13,"div",31),e.DNE(14,Ct,3,0,"div",32),e.DNE(15,wt,3,0,"div",32),e.k0s(),e.j41(16,"div",33),e.DNE(17,St,4,1,"div",32),e.DNE(18,It,4,2,"div",32),e.k0s()()()()()()),2&i){const t=p.$implicit,n=e.XpG();e.R7$(1),e.Y8G("hidden",!t.IsSpotlight),e.R7$(5),e.FS9("src","../../../assets/images/"+t.ImageName,e.B4B),e.R7$(3),e.JRh(t.Name),e.R7$(2),e.JRh(t.Description),e.R7$(3),e.Y8G("ngIf",t.CanSetOptions),e.R7$(1),e.Y8G("ngIf",t.CanDownload),e.R7$(2),e.Y8G("ngIf",t.CanView&&"Master Employee List"===t.Name&&n.hasCreateEmployeePermission),e.R7$(1),e.Y8G("ngIf",t.CanView&&"Master Employee List"!==t.Name)}
1}function Et(i,p){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=p.$implicit;e.R7$(1),e.JRh(t.nativeElement.innerText)}}function Ft(i,p){1&i&&e.nrm(0,"img",39),2&i&&e.FS9("src","../../../assets/images/"+p.$implicit.ImageName,e.B4B)}function Tt(i,p){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"button",43),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG();return e.Njj(r.optionsClick(o.DownloadURL,o.ReportTypeId,o.Name))}),e.EFF(2," Options "),e.k0s()()}}function xt(i,p){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"button",44),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG();return e.Njj(r.downloadTraining(o.Name))}),e.EFF(2," Download "),e.k0s()()}}function Ot(i,p){if(1&i&&(e.j41(0,"div")(1,"a",36)(2,"button",45),e.EFF(3," View "),e.k0s()()()),2&i){const t=e.XpG().$implicit;e.R7$(1),e.FS9("routerLink",t.ViewURL)}}function Dt(i,p){if(1&i&&(e.j41(0,"div")(1,"a",19)(2,"button",45),e.EFF(3," View "),e.k0s()()()),2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(1),e.FCK("href","",n.hrmUrl,"",t.ViewURL,"",e.B4B)}}function Mt(i,p){if(1&i&&(e.j41(0,"div",40)(1,"div",41),e.DNE(2,Tt,3,0,"div",32),e.DNE(3,xt,3,0,"div",32),e.k0s(),e.j41(4,"div",42),e.DNE(5,Ot,4,1,"div",32),e.DNE(6,Dt,4,2,"div",32),e.k0s()()),2&i){const t=p.$implicit,n=e.XpG();e.R7$(2),e.Y8G("ngIf",t.CanSetOptions),e.R7$(1),e.Y8G("ngIf",t.CanDownload),e.R7$(2),e.Y8G("ngIf",t.CanView&&"Master Employee List"===t.Name&&n.hasCreateEmployeePermission),e.R7$(1),e.Y8G("ngIf",t.CanView&&"Master Employee List"!==t.Name)}
1}function Pt(i,p){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=p.$implicit;e.R7$(1),e.JRh(t.nativeElement.textContent)}}const Bt=function(){return{nameClass:!0}},Gt=function(){return{actionsClass:!0}};let Ut=(()=>{class i{constructor(t,n,o,r,s,b,w){this.loadingIndicatorService=t,this.reportingOdataService=n,this.authService=o,this.batchImportService=r,this.userInfoService=b,this.reportingService=w,this.hasSpotlightData=!1,this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.fetchReportsSSRSFailed=!1,this.hasCreateEmployeePermission=!1,this.showModal=!1,this.confirmDownload=new e.bkB,this.regConfig=[],this.hasMKO=!1,this.hasHrD=!1,this.mkoUrl=s.preAuthLanding.myKpaOnline,this.hrmUrl=s.preAuthLanding.hrDrive,this.platformUrl=s.preAuthLanding.platform}ngOnInit(){this.userInfo=this.userInfoService.getUserInfoFromStorage(),this.loadReports(),this.downloadReportClass="downloadReport",this.userInfoService.hasPermission(L.V.Employee,D.Xw.CreateEmployee).pipe((0,oe.s)(1)).subscribe(t=>{this.hasCreateEmployeePermission=t}),this.getApplicationFeatures(),this.messageTop="Customize your report using the filter and sort options below, then select Download Report.",this.messageBottom=""}getApplicationFeatures(){this.userInfoService.hasPermission(L.V.MkoApplication,D.Ch.ApplicationMembership).subscribe(t=>{this.hasMKO=t,console.log(t)}),this.userInfoService.hasPermission(L.V.HrDrive,D.Sn.ApplicationMembership).subscribe(t=>{this.hasHrD=t,console.log(t)}),this.supportUrl=this.platformUrl+"/home/support"}loadReports(){this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.fetchReportsSSRSFailed=!1;const t=[];t.push("reportTypeId eq Kpa.Services.Reporting.Domain.Enums.ReportType'HR'"),t.push(this.userInfo.accessListId?"forGroup eq "+!0:"forFacility eq "+!0);let n=t.length>0?"("+t.join(" and ")+")":"";this.loadingIndicatorService.startLoading(),this.reportingOdataService.oDataReporting.Query().Filter(n).Exec().subscribe(o=>{this.gridData=o.map(function(r){return r}),this.spotlightData=o.sort((r,s)=>r.Sequence-s.Sequence).map(function(r){return r}),this.spotlightData.forEach(r=>{r.IsSpotlight&&(this.hasSpotlightData=!0)}),this.loadingIndicatorService.stopLoading()},o=>{this.loadingIndicatorService.stopLoading(),this.fetchReportsSSRSFailed=!0})}downloadTraining(t){this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.fetchReportsSSRSFailed=!1,"Master Employee List"===t&&this.batchImportService.getMasterEmployeeList().subscribe(n=>{let o=n.fileobject;if(window.navigator){const b=window.navigator;if(b&&b.msSaveOrOpenBlob)return void b.msSaveOrOpenBlob(o)}const r=window.URL.createObjectURL(o);let s=document.createElement("a");s.href=r,s.download=n.filename,s.click(),setTimeout(function(){window.URL.revokeObjectURL(r)},100)},n=>{console.log(n),n instanceof C.yz&&404===n.status&&(this.fetchReportNoDataFailed=!0),n instanceof C.yz&&400===n.status&&(this.fetchReportSSRSFailed=!0),window.scrollTo(0,0)})}showTooltip(t){const n=t.target;("TD"===n.nodeName||"TH"===n.nodeName)&&n.offsetWidth<n.scrollWidth?this.tooltipDir.toggle(n):this.tooltipDir.hide()}onDownloadReport(t){this.confirmDownload.emit(!0),console.log("submit"),console.log(t)}optionsClick(t,n,o){this.title=o,this.loadOptionalFields(t,n)}loadOptionalFields(t,n){this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.loadingIndicatorService.startLoading(),this.reportingService.getOptionsFields(t,n).subscribe(o=>{this.regConfig=o,this.confirmDownload.emit(!0),this.showModal=!0,this.loadingIndicatorService.stopLoading()},o=>{o instanceof C.yz&&404===o.status&&(this.fetchReportNoDataFailed=!0,this.loadingIndicatorService.stopLoading()),o instanceof C.yz&&400===o.status&&(this.fetchReportSSRSFailed=!0,this.loadingIndicatorService.stopLoading())})}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(X.F),e.rXU(K),e.rXU(Z.u),e.rXU(z.B),e.rXU($.O),e.rXU(D.fv),e.rXU(Y.k))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["app-hr-reports"]],viewQuery:function(n,o){if(1&n&&e.GBs(S.dg,7),2&n){let r;e.mGM(r=e.lsd())&&(o.tooltipDir=r.first)}},decls:28,vars:26,consts:[[1,"reporting"],[3,"showModal","regConfig","title","messageTop","messageBottom","downloadReportClass","showModalChange","regConfigChange","titleChange","messageTopChange","messageBottomChange","downloadReportClassChange","downloadReport"],["mainTitle","Unable to Retrieve Report","id","SSRSFailed",4,"ngIf"],["mainTitle","Unable to Retrieve Report","id","noData",4,"ngIf"],["mainTitle","Unable to Retrieve Reports","id","SSRSreportsFailed",4,"ngIf"],["class","header",4,"ngIf"],[1,"reporting-reports-section"],[4,"ngFor","ngForOf"],[1,"headerSecond"],[1,"reporting-grid-section"],["template",""],["kendoTooltip","","showOn","none","tooltipClass","kpa-tooltip-grid","filter",".k-grid td",3,"tooltipTemplate","mouseover"],[3,"kendoGridBinding","height"],["title","",1,"imageColumn",3,"width"],["kendoGridCellTemplate",""],["field","Name",1,"columnGrid",3,"width","headerClass"],["field","Description",1,"nameColumn",3,"width"],["title","Actions",1,"columnGrid",3,"width","headerClass"],["mainTitle","Unable to Retrieve Report","id","SSRSFailed"],[3,"href"],["mainTitle","Unable to Retrieve Report","id","noData"],["mainTitle","Unable to Retrieve Reports","id","SSRSreportsFailed"],[1,"header"],[1,"reporting-section",3,"hidden"],[1,"reporting-card"],[1,"kpa-reporting"],[1,"kpa-reporting-item"],[1,"kpa-reporting-item-content"],["height","80","width","80",3,"src"],[1,"kpa-reporting-item-paragraph"],[1,"kpa-reporting-buttons"],[1,"left-align-buttons"],[4,"ngIf"],[1,"right-align-buttons"],["
1id","btn_Options","kendoButton","","kpaTextButton","",1,"standAloneReportBtn",3,"click"],["id","btn_Download","kendoButton","","kpaTextButton","",1,"standAloneReportBtn",3,"click"],[3,"routerLink"],["id","btn_View","kendoButton","","kpaSecondaryButton","",1,"standAloneReportBtnGrid"],["id","btn_View","kendoButton","","kpaSecondaryButton","",1,"standAloneReportBtn"],["height","40px","width","40px",3,"src"],[1,"kpa-reporting-buttons-grid"],[1,"kpa-buttons-grid-start"],[1,"kpa-buttons-grid-end"],["id","btn_Options","kendoButton","","kpaTextButton","",1,"standAloneReportBtnGrid",3,"click"],["id","btn_Download","kendoButton","","kpaTextButton","",1,"standAloneReportBtnGrid",3,"click"],["id","btn_View","kendoButton","","kpaTextButton","",1,"standAloneReportBtnGrid"]],template:function(n,o){if(1&n&&(e.j41(0,"div",0),e.nrm(1,"app-kpa-spinner"),e.j41(2,"app-options-modal",1),e.bIt("showModalChange",function(s){return o.showModal=s})("regConfigChange",function(s){return o.regConfig=s})("titleChange",function(s){return o.title=s})("messageTopChange",function(s){return o.messageTop=s})("messageBottomChange",function(s){return o.messageBottom=s})("downloadReportClassChange",function(s){return o.downloadReportClass=s})("downloadReport",function(s){return o.onDownloadReport(s)}),e.k0s(),e.j41(3,"h1"),e.EFF(4,"Human Resource Reports"),e.k0s(),e.DNE(5,vt,5,1,"kpa-error-card",2),e.DNE(6,kt,5,1,"kpa-error-card",3),e.DNE(7,Rt,5,1,"kpa-error-card",4),e.DNE(8,bt,3,0,"div",5),e.j41(9,"div",6),e.DNE(10,yt,19,8,"div",7),e.k0s(),e.j41(11,"div",8)(12,"h2"),e.EFF(13,"All Reports"),e.k0s()(),e.j41(14,"div",9),e.DNE(15,Et,2,1,"ng-template",null,10,e.C5r),e.j41(17,"div",11),e.bIt("mouseover",function(s){return o.showTooltip(s)}),e.j41(18,"kendo-grid",12),e.nI1(19,"orderBy"),e.j41(20,"kendo-grid-column",13),e.DNE(21,Ft,1,1,"ng-template",14),e.k0s(),e.nrm(22,"kendo-grid-column",15)(23,"kendo-grid-column",16),e.j41(24,"kendo-grid-column",17),e.DNE(25,Mt,7,4,"ng-template",14),e.k0s()(),e.DNE(26,Pt,2,1,"ng-template",null,10,e.C5r),e.k0s()()()),2&n){const r=e.sdS(16);e.R7$(2),e.Y8G("showModal",o.showModal)("regConfig",o.regConfig)("title",o.title)("messageTop",o.messageTop)("messageBottom",o.messageBottom)("downloadReportClass",o.downloadReportClass),e.R7$(3),e.Y8G("ngIf",o.fetchReportSSRSFailed),e.R7$(1),e.Y8G("ngIf",o.fetchReportNoDataFailed),e.R7$(1),e.Y8G("ngIf",o.fetchReportsSSRSFailed),e.R7$(1),e.Y8G("ngIf",o.hasSpotlightData),e.R7$(2),e.Y8G("ngForOf",o.spotlightData),e.R7$(7),e.Y8G("tooltipTemplate",r),e.R7$(1),e.Y8G("kendoGridBinding",e.brH(19,20,o.gridData,"Name",!1))("height",450),e.R7$(2),e.Y8G("width",25),e.R7$(2),e.Y8G("width",60)("headerClass",e.lJ4(24,Bt)),e.R7$(1),e.Y8G("width",160),e.R7$(1),e.Y8G("width",90)("headerClass",e.lJ4(25,Gt))}},dependencies:[a.Sq,a.bT,E.Ioe,P.Wk,O.Qp,S.dg,E._ab,E.vqx,E.i4w,q.A,J.o,H.x,N.A,Q.p,W,te],styles:['.reporting .card{border:none;border-radius:3px;box-shadow:0 1px 2px #00000040}.reporting .card-head h3{font-size:16px!important;font-weight:700}[hidden]{display:none!important;margin:0!important}.reporting-reports-section{display:flex;flex-direction:row;margin:0 -15px 0 0;align-items:stretch}::ng-deep .k-grid tbody tr{height:40px}::ng-deep .k-grid tbody tr td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.k-grid .k-grid-content td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reporting-grid-section .k-grid .k-grid-header th{padding-top:15px!important;padding-bottom:15px!important}.kpa-tooltip-grid .k-tooltip{font-family:Open Sans,sans-serif;font-weight:600;font-size:12px;line-height:20px;padding:4px 10px}.kpa-tooltip-grid .k-callout:after{position:absolute;width:0;height:0;content:""}.kpa-tooltip-grid .k-callout.k-callout-n:after{top:0;left:-3px}.reporting-section{padding-top:15px;padding-right:30px;min-width:300px;max-width:500px}.reporting-grid-section{margin-top:20px}.kpa-reporting-item-paragraph{margin-top:20px;height:120px}.kpa-reporting-buttons{display:flex;flex-direction:row;flex-wrap:wrap}.kpa-reporting-buttons-grid{display:flex;flex-direction:row;justify-content:flex-end;align-items:flex-end;flex-wrap:wrap}.kpa-buttons-grid-star{justify-content:flex-start}
1.kpa-buttons-grid-end{justify-content:flex-end;align-items:flex-end}.reporting-card{padding-right:10px}.right-align-buttons{margin-left:auto}.left-align-buttons{margin-left:-15px;padding-left:0}.reporting-section h2{margin-bottom:25px}.reporting-section-content{display:flex}.reporting-main{margin-right:10px}.reporting-side{margin-left:15px}.reporting .card-title{color:#514e4b;font-size:16px;font-weight:700}.kpa-reporting h3{margin:0!important}.kpa-reporting-item{padding:0}.kpa-reporting-item-content{width:100%}.kpa-reporting-item-paragraph p{color:#514e4b;margin-bottom:10px}.imageColumn{padding-right:10px!important}.reporting .header{margin-top:20px;margin-bottom:20px}.headerSecond{margin-top:20px;margin-bottom:30px}.columnGrid{padding-left:5px!important}.k-grid tbody tr{line-height:14px}tr .nameClass{padding-left:5px!important}tr .actionsClass{padding-right:40px;text-align:right}.k-button:hover:before,.k-toolbar .k-picker-wrap:hover:before,.k-toolbar .k-dropdown-wrap:hover:before,.k-editor-toolbar .k-picker-wrap:hover:before,.k-editor-toolbar .k-dropdown-wrap:hover:before,.k-editor-toolbar a.k-tool:hover:before,.k-gantt-views li a:hover:before,.k-scheduler-toolbar li a:hover:before,.k-scheduler-footer li a:hover:before,.k-button.k-state-hover:before,.k-toolbar .k-state-hover.k-picker-wrap:before,.k-toolbar .k-state-hover.k-dropdown-wrap:before,.k-editor-toolbar .k-state-hover.k-picker-wrap:before,.k-editor-toolbar .k-state-hover.k-dropdown-wrap:before,.k-editor-toolbar a.k-state-hover.k-tool:before,.k-gantt-views li a.k-state-hover:before,.k-scheduler-toolbar li a.k-state-hover:before,.k-scheduler-footer li a.k-state-hover:before{opacity:0!important}.k-button:focus:before,.k-toolbar .k-picker-wrap:focus:before,.k-toolbar .k-dropdown-wrap:focus:before,.k-editor-toolbar .k-picker-wrap:focus:before,.k-editor-toolbar .k-dropdown-wrap:focus:before,.k-editor-toolbar a.k-tool:focus:before,.k-gantt-views li a:focus:before,.k-scheduler-toolbar li a:focus:before,.k-scheduler-footer li a:focus:before,.k-button.k-state-focused:before,.k-toolbar .k-state-focused.k-picker-wrap:before,.k-toolbar .k-state-focused.k-dropdown-wrap:before,.k-editor-toolbar .k-state-focused.k-picker-wrap:before,.k-editor-toolbar .k-state-focused.k-dropdown-wrap:before,.k-editor-toolbar a.k-state-focused.k-tool:before,.k-gantt-views li a.k-state-focused:before,.k-scheduler-toolbar li a.k-state-focused:before,.k-scheduler-footer li a.k-state-focused:before{opacity:0!important}\n\n/*# sourceMappingURL=hr-reports.component.css.map*/'],encapsulation:2})}}return i})();var Lt=l(59452),re=l(70271),jt=l(92140),$t=l(97776);function Vt(i,p){if(1&i&&(e.j41(0,"kpa-error-card",7),e.EFF(1," An error occured while attempting to retrieve your report. Please try again later. If the error persists, please contact "),e.j41(2,"a",8),e.EFF(3,"Support"),e.k0s(),e.EFF(4," for further assistance. "),e.k0s()),2&i){const t=e.XpG();e.R7$(2),e.FS9("href",t.supportUrl,e.B4B)}}function Nt(i,p){if(1&i&&(e.j41(0,"kpa-error-card",9),e.EFF(1," No data was found for the selected report. Please try again after data has been inputted into the system for the selected report. For further assistance, please contact "),e.j41(2,"a",8),e.EFF(3,"Support"),e.k0s(),e.EFF(4,". "),e.k0s()),2&i){const t=e.XpG();e.R7$(2),e.FS9("href",t.supportUrl,e.B4B)}}function At(i,p){if(1&i&&(e.j41(0,"kpa-error-card",10),e.EFF(1," An error occured while attempting to retrieve the reports. Please try again later. If the error persists, please contact "),e.j41(2,"a",8),e.EFF(3,"Support"),e.k0s(),e.EFF(4," for further assistance. "),e.k0s()),2&i){const t=e.XpG();e.R7$(2),e.FS9("href",t.supportUrl,e.B4B)}}function Xt(i,p){if(1&i&&(e.j41(0,"div")(1,"a",8)(2,"button",22),e.EFF(3," Options "),e.k0s()()()),2&i){const t=e.XpG(2);e.R7$(1),e.FCK("href","",t.mkoUrl,"",t.optionsUrlOSHACSV,"",e.B4B)}}function Yt(i,p){if(1&i&&(e.j41(0,"div")(1,"a",8)(2,"button",22),e.EFF(3," Options "),e.k0s()()()),2&i){const t=e.XpG(2);e.R7$(1),e.FCK("href","",t.mkoUrl,"",t.optionsUrlOSHA300,"",e.B4B)}}function Ht(i,p){if(1&i&&(e.j41(0,"div")(1,"a",8)(2,"button",22),e.EFF(3," Options "),e.k0s()()()),2&i){const t=e.XpG(2);e.R7$(1),e.FCK("href","",t.mkoUrl,"",t.optionsUrlOSHA300,"",e.B4B)}}function Wt(i,p){1&i&&(e.j41(0,"div")(1,"a",23)(2,"button",24),e.EFF(3," Go to Incidents "),e.k0s()()())}function Kt(i,p){if(1&i&&(e.j41(0,"div")(1,"a",8)(2,"button",24),e.EFF(3," Go to accidents list "),e.k0s()()()),2&i){const t=e.XpG(2);e.R7$(1),e.FCK("href","",t.mkoUrl,"",t.viewUrl,"",e.B4B)}}function zt(i,p){if(1&i&&(e.j41(0,"div")(1,"a",8)(2,"button",25),e.EFF(3," VIEW "),e.k0s()()()),2&i){const t=e.XpG(2);e.R7$(1),e.FCK("href","",t.mkoUrl,"",t.viewUrl,"",e.B4B)}}function qt(i,p){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"button",26),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG();return e.Njj(r.optionsClick(o.DownloadURL,o.ReportTypeId,o.Name))}),e.EFF(2," Download "),e.k0s()()}}function Jt(i,p){if(1&i&&(e.j41(0,"div")(1,"div",11)(2,"div",12)(3,"kpa-card",13)(4,"div",14)(5,"div",15),e.nrm(6,"img",16),e.j41(7,"div",17)(8,"h4"),e.EFF(9),e.k0s(),e.j41(10,"p"),e.EFF(11),e.k0s()()()(),e.j41(12,"div",18)(13,"div",19),e.DNE(14,Xt,4,2,"div",20),e.DNE(15,Yt,4,2,"div",20),e.DNE(16,Ht,4,2,"div",20),e.k0s(),e.j41(17,"div",21),e.DNE(18,Wt,4,0,"div",20),e.DNE(19,Kt,4,2,"div",20),e.DNE(20,zt,4,2,"div",20),e.DNE(21,qt,3,0,"div",20),e.k0s()()()()()()),2&i){const t=p.$implicit,n=e.XpG();e.R7$(1),e.Y8G("hidden",!t.IsSpotlight),e.R7$(5),e.FS9("src","../../../assets/images/"+t.ImageName,e.B4B),e.R7$(3),e.JRh(t.Name),e.R7$(2),e.JRh(t.Description),e.R7$(3),e.Y8G("ngIf",t.CanSetOptions&&"OSHA CSV Export"===t.Name),e.R7$(1),e.Y8G("ngIf",t.CanSetOptions&&"OSHA's Form 300 Accident Logs"===t.Name),e.R7$(1),e.Y8G("ngIf",t.CanSetOptions&&"OSHA's Form 300 Incident Logs"===t.Name&&n.isIncidentsFeature),e.R7$(2),e.Y8G("ngIf",t.CanView&&"OSHA's Form 301"===t.Name&&n.isIncidentsFeature),e.R7$(1),e.Y8G("ngIf",t.CanView&&"OSHA's Form 301"===t.Name&&!n.isIncidentsFeature),e.R7$(1),e.Y8G("ngIf",t.CanView&&"OSHA's Form 301"!==t.Name),e.R7$(1),e.Y8G("ngIf",t.CanDownload)}}let Qt=(()=>{class i{constructor(t,n,o,r,s,b,w){this.loadingIndicatorService=t,this.reportingOdataService=n,this.userInfoService=o,this.reportingService=r,this.serviceToService=s,this.clientsService=b,this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.fetchReportsSSRSFailed=!1,this.hasMKO=!1,this.hasHrD=!1,this.isIncidentsFeature=!1,this.showModal=!1,this.confirmDownload=new e.bkB,this.regConfig=[],this.mkoUrl=w.preAuthLanding.myKpaOnline,this.hrmUrl=w.preAuthLanding.hrDrive,this.platformUrl=w.preAuthLanding.platform}ngOnInit(){this.userInfo=this.userInfoService.getUserInfoFromStorage(),this.userInfo&&this.userInfo.primaryLocationServiceToId&&(this.serviceToId=this.userInfo.primaryLocationServiceToId),this.getIncidentsFeature().pipe((0,oe.s)(1)).subscribe(t=>{this.isIncidentsFeature=t,this.setViewUrl(),this.loadReports(),this.setOptionsUrls(),this.getApplicationFeatures(),this.messageTop="Select the location you would like to download this report for.",this.messageBottom="",this.downloadReportClass="downloadReportOsha"}),this.manageEmployeeUrl=`employee/employee/edit/${this.userInfo.employeeId}`}getIncidentsFeature(){return this.serviceToId?this.serviceToService.get(this.serviceToId).pipe((0,oe.s)(1),(0,re.T)(t=>t.locationAppFeatures||[]),(0,re.T)(t=>t.filter(n=>"INCIDENTS"===n.featureName.toUpperCase()).length>0)):(0,Lt.of)(!1)}getApplicationFeatures(){this.userInfoService.hasPermission(L.V.MkoApplication,D.Ch.ApplicationMembership).subscribe(t=>{this.hasMKO=t,console.log(t)}),this.userInfoService.hasPermission(L.V.HrDrive,D.Sn.ApplicationMembership).subscribe(t=>{this.hasHrD=t,console.log(t)}),this.supportUrl=this.platformUrl+"/home/support"}setViewUrl(){this.viewUrl=this.userInfo.accessListId?"/Clients/group/Accidents/Accidents.aspx?filter=open":"/Clients/facility/Accidents/Accidents.aspx?filter=open"}setOptionsUrls(){this.reportingService.getMkoAccountId(this.userInfo.primaryLocationServiceToId).subscribe(t=>{this.mkoAccountId=t,console.log(t),this.userInfo.accessListId?(this.optionsUrlOSHACSV="/Clients/group/Accidents/Accidents.aspx?accountId="+t+"&reports=oshaCSV",this.optionsUrlOSHA300="/Cl
1ients/group/Accidents/Accidents.aspx?accountId="+t+"&reports=osha300"):(this.optionsUrlOSHACSV="/Clients/facility/Accidents/Accidents.aspx?accountId="+t+"&reports=oshaCSV",this.optionsUrlOSHA300="/Clients/facility/Accidents/Accidents.aspx?accountId="+t+"&reports=osha300")},t=>{console.log(t),t instanceof C.yz&&404===t.status&&(this.fetchReportNoDataFailed=!0),t instanceof C.yz&&400===t.status&&(this.fetchReportSSRSFailed=!0),window.scrollTo(0,0)})}loadReports(){this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.fetchReportsSSRSFailed=!1;const t=[];t.push("reportTypeId eq Kpa.Services.Reporting.Domain.Enums.ReportType'OSHA'"),t.push(this.userInfo.accessListId?"forGroup eq "+!0:"forFacility eq "+!0);let n=t.length>0?"("+t.join(" and ")+")":"";this.loadingIndicatorService.startLoading(),this.reportingOdataService.oDataReporting.Query().Filter(n).Exec().subscribe(o=>{this.gridData=o,this.spotlightData=o.sort((r,s)=>r.Sequence-s.Sequence).map(r=>({...r,DownloadURL:encodeURIComponent(r.DownloadURL),Name:this.getItemName(r),Description:this.getItemDescription(r)})),this.loadingIndicatorService.stopLoading()},o=>{this.loadingIndicatorService.stopLoading(),this.fetchReportsSSRSFailed=!0})}downloadReport(t,n){this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.fetchReportsSSRSFailed=!1,this.reportingService.getReport(t,n).subscribe(o=>{let r=o.fileobject;if(window.navigator){const w=window.navigator;if(w&&w.msSaveOrOpenBlob)return void w.msSaveOrOpenBlob(r)}const s=window.URL.createObjectURL(r);let b=document.createElement("a");b.href=s,b.download=o.filename,b.click(),setTimeout(function(){window.URL.revokeObjectURL(s)},100)},o=>{console.log(o),o instanceof C.yz&&404===o.status&&(this.fetchReportNoDataFailed=!0),o instanceof C.yz&&400===o.status&&(this.fetchReportSSRSFailed=!0),window.scrollTo(0,0)})}downloadReportWithParams(t,n,o){this.fetchReportNoDataFailed=!1,this.fetchReportSSRSFailed=!1,this.showModal=!1,this.reportingService.getReportWithParams(t,n,o).subscribe(r=>{let s=r.fileobject;if(window.navigator){const M=window.navigator;if(M&&M.msSaveOrOpenBlob)return void M.msSaveOrOpenBlob(s)}const b=window.URL.createObjectURL(s);let w=document.createElement("a");w.href=b,w.download=r.filename,w.click(),setTimeout(function(){window.URL.revokeObjectURL(b)},100)},r=>{console.log(r),r instanceof C.yz&&404===r.status&&(this.showModal=!1,this.fetchReportNoDataFailed=!0),r instanceof C.yz&&400===r.status&&(this.showModal=!1,this.fetchReportSSRSFailed=!0),window.scrollTo(0,0)})}onDownloadReport(t){this.confirmDownload.emit(!0);const n=t.AccountId,o=this.regConfig.find(r=>"AccountId"===r.name);if(console.log(t),o){const r=o.options.find(s=>s.id===n.toString());this.AccountIdSelected=n,r.oshaRequiredFields&&r.oshaRequiredFields.length>0?(this.regConfig=r.oshaRequiredFields,this.title="Facility Information for "+r.text,this.currentTitle="Facility Information for "+r.text,this.messageBottom="",this.messageTop="Please verify and provide any missing information below to generate your OSHA 300 log.",this.showModal=!0):(this.downloadReportWithParams(this.reportForOptions,this.reportTypeForOptions,t),this.currentTitle="")}else this.title===this.currentTitle&&(t&&(t.AccountId=this.AccountIdSelected),this.downloadReportWithParams(this.reportForOptions,this.reportTypeForOptions,t))}optionsClick(t,n,o){this.reportForOptions=t,this.reportTypeForOptions=n,this.title=o,this.currentTitle=o;const s='<b>Note:</b> To download a report for multiple locations, please visit the <a href="'+this.mkoUrl+this.optionsUrlOSHACSV+'">Report Options</a> page.';this.messageBottom=o&&-1!==o.toLowerCase().indexOf("csv")?s:"",this.loadOptionalFields(t,n)}loadOptionalFields(t,n){this.fetchReportSSRSFailed=!1,this.fetchReportNoDataFailed=!1,this.loadingIndicatorService.startLoading(),this.reportingService.getOptionsFields(t,n).subscribe(o=>{o.length>0?(this.regConfig=o,this.showModal=!0):this.downloadReportWithParams(this.reportForOptions,this.reportTypeForOptions,{AccountId:this.mkoAccountId}),this.confirmDownload.emit(!0),this.loadingIndicatorService.stopLoading()},o=>{o instanceof C.yz&&404===o.status&&(this.fetchReportNoDataFailed=!0,this.loadingIndicatorService.stopLoading()),o instanceof C.yz&&400===o.status&&(this.fetchReportSSRSFailed=!0,this.loadingIndicatorService.stopLoading()),window.scrollTo(0,0)})}getItemName(t){let n;return n=this.isIncidentsFeature?t.Name:t.Name.replace(/Incident/g,"Accident").replace(/incident/g,"accident"),n}getItemDescription(t){let n;return n=this.isIncidentsFeature?t.Description:t.Description.replace(/incident/g,"accident").replace(/Injuries and Illness Incident/g,"Accident"),n}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(X.F),e.rXU(K),e.rXU(D.fv),e.rXU(Y.k),e.rXU(jt.C),e.rXU($t.X),e.rXU($.O))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["app-osha-reports"]
1],viewQuery:function(n,o){if(1&n&&e.GBs(S.dg,5),2&n){let r;e.mGM(r=e.lsd())&&(o.tooltipDir=r.first)}},decls:10,vars:10,consts:[[1,"reporting"],[3,"showModal","regConfig","title","messageTop","messageBottom","downloadReportClass","showModalChange","regConfigChange","titleChange","messageTopChange","messageBottomChange","downloadReportClassChange","downloadReport"],["mainTitle","Unable to Retrieve Report","id","SSRSFailed",4,"ngIf"],["mainTitle","Unable to Retrieve Report","id","noData",4,"ngIf"],["mainTitle","Unable to Retrieve Reports","id","SSRSreportsFailed",4,"ngIf"],[1,"reporting-reports-section"],[4,"ngFor","ngForOf"],["mainTitle","Unable to Retrieve Report","id","SSRSFailed"],[3,"href"],["mainTitle","Unable to Retrieve Report","id","noData"],["mainTitle","Unable to Retrieve Reports","id","SSRSreportsFailed"],[1,"reporting-section",3,"hidden"],[1,"reporting-card"],[1,"kpa-reporting"],[1,"kpa-reporting-item"],[1,"kpa-reporting-item-content"],["height","80","width","80",3,"src"],[1,"kpa-reporting-item-paragraph"],[1,"kpa-reporting-buttons"],[1,"left-align-buttons"],[4,"ngIf"],[1,"right-align-buttons"],["id","btn_Options","kendoButton","","kpaTextButton","",1,"standAloneReportBtn"],["href","/incidents/search"],["id","btn_View","kendoButton","","kpaSecondaryButton","",1,"standAloneReportBtnTopList"],["id","btn_View","kendoButton","","kpaSecondaryButton","",1,"standAloneReportBtn"],["id","btn_Download","kendoButton","","kpaSecondaryButton","",1,"standAloneReportBtn",3,"click"]],template:function(n,o){1&n&&(e.j41(0,"div",0),e.nrm(1,"app-kpa-spinner"),e.j41(2,"app-options-modal",1),e.bIt("showModalChange",function(s){return o.showModal=s})("regConfigChange",function(s){return o.regConfig=s})("titleChange",function(s){return o.title=s})("messageTopChange",function(s){return o.messageTop=s})("messageBottomChange",function(s){return o.messageBottom=s})("downloadReportClassChange",function(s){return o.downloadReportClass=s})("downloadReport",function(s){return o.onDownloadReport(s)}),e.k0s(),e.j41(3,"h1"),e.EFF(4,"OSHA Reports"),e.k0s(),e.DNE(5,Vt,5,1,"kpa-error-card",2),e.DNE(6,Nt,5,1,"kpa-error-card",3),e.DNE(7,At,5,1,"kpa-error-card",4),e.j41(8,"div",5),e.DNE(9,Jt,22,11,"div",6),e.k0s()()),2&n&&(e.R7$(2),e.Y8G("showModal",o.showModal)("regConfig",o.regConfig)("title",o.title)("messageTop",o.messageTop)("messageBottom",o.messageBottom)("downloadReportClass",o.downloadReportClass),e.R7$(3),e.Y8G("ngIf",o.fetchReportSSRSFailed),e.R7$(1),e.Y8G("ngIf",o.fetchReportNoDataFailed),e.R7$(1),e.Y8G("ngIf",o.fetchReportsSSRSFailed),e.R7$(2),e.Y8G("ngForOf",o.spotlightData))},dependencies:[a.Sq,a.bT,O.Qp,q.A,J.o,H.x,N.A,Q.p,W],styles:['.reporting .card{border:none;border-radius:3px;box-shadow:0 1px 2px #00000040}.reporting .card-head h3{font-size:16px!important;font-weight:700}[hidden]{display:none!important;margin:0!important}.reporting-reports-section{display:flex;flex-direction:row;margin:0 -15px 0 0;align-items:stretch}.k-grid .k-grid-content td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kpa-tooltip-grid .k-tooltip{font-family:Open Sans,sans-serif;font-weight:600;font-size:12px;line-height:20px;padding:4px 10px}.kpa-tooltip-grid .k-callout:after{position:absolute;width:0;height:0;content:""}.kpa-tooltip-grid .k-callout.k-callout-n:after{top:0;left:-3px}.reporting-section{padding-top:15px;padding-right:30px;min-width:300px;max-width:500px}.reporting-grid-section{margin-top:20px}.kpa-reporting-item-paragraph{margin-top:20px;height:120px}.kpa-reporting-buttons{display:flex;flex-direction:row;flex-wrap:wrap}.kpa-reporting-buttons-grid{display:flex;flex-direction:row;justify-content:flex-end;align-items:flex-end;flex-wrap:wrap}.kpa-buttons-grid-star{justify-content:flex-start}.kpa-buttons-grid-end{justify-content:flex-end;align-items:flex-end}#btn_View.standAloneReportBtnGrid.k-button.k-primary.k-flat{justify-content:flex-end}.reporting-card{padding-right:10px}.right-align-buttons{margin-left:auto}.left-align-buttons{margin-left:-15px;padding-left:0}#btn_Options.standAloneReportBtn.k-button.k-primary.k-flat,#btn_Options.standAloneReportBtnGrid.k-button.k-primary.k-flat{justify-content:left!important}.reporting-section h2{margin-bottom:25px}.reporting-section-content{display:flex}.reporting-main{margin-right:10px}.reporting-side{margin-left:15px}.reporting .card-title{color:#514e4b;font-size:16px;font-weight:700}.kpa-reporting h3{margin:0!important}.kpa-reporting-item{padding:0}.kpa-reporting-item-content{width:100%}.kpa-reporting-item-paragraph p{color:#514e4b;margin-bottom:10px}.standAloneReportBtn{width:100px}.standAloneReportBtnTop{width:150px}.standAloneReportBtnTopList{width:180px}.standAloneReportBtnGrid{width:50px}.imageColumn{padding-right:10px!important}.reporting .header{margin-top:20px;margin-bottom:20px}.headerSecond{margin-top:20px;margin-bottom:30px}.columnGrid,tr .nameClass{padding-left:5px!important}tr .actionsClass{padding-right:60px;text-align:right}.k-button:hover:before,.k-toolbar .k-picker-wrap:hover:before,.k-toolbar .k-dropdown-wrap:hover:before,.k-editor-toolbar .k-picker-wrap:hover:before,.k-editor-toolbar .k-dropdown-wrap:hover:before,.k-editor-toolbar a.k-tool:hover:before,.k-gantt-views li a:hover:before,.k-scheduler-toolbar li a:hover:before,.k-scheduler-footer li a:hover:before,.k-button.k-state-hover:before,.k-toolbar .k-state-hover.k-picker-wrap:before,.k-toolbar .k-state-hover.k-dropdown-wrap:before,.k-editor-toolbar .k-state-hover.k-picker-wrap:before,.k-editor-toolbar .k-state-hover.k-dropdown-wrap:before,.k-editor-toolbar a.k-state-hover.k-tool:before,.k-gantt-views li a.k-state-hover:before,.k-scheduler-toolbar li a.k-state-hover:before,.k-scheduler-footer li a.k-state-hover:before{opacity:0!important}.k-button:focus:before,.k-toolbar .k-picker-wrap:focus:before,.k-toolbar .k-dropdown-wrap:focus:before,.k-editor-toolbar .k-picker-wrap:focus:before,.k-editor-toolbar .k-dropdown-wrap:focus:before,.k-editor-toolbar a.k-tool:focus:before,.k-gantt-views li a:focus:before,.k-scheduler-toolbar li a:focus:before,.k-scheduler-footer li a:focus:before,.k-button.k-state-focused:before,.k-toolbar .k-state-focused.k-picker-wrap:before,.k-toolbar .k-state-focused.k-dropdown-wrap:before,.k-editor-toolbar .k-state-focused.k-picker-wrap:before,.k-editor-toolbar .k-state-focused.k-dropdown-wrap:before,.k-editor-toolbar a.k-state-focused.k-tool:before,.k-gantt-views li a.k-state-focused:before,.k-scheduler-toolbar li a.k-state-focused:before,.k-scheduler-footer li a.k-state-focused:before{opacity:0!important}\n\n/*# sourceMappingURL=osha-reports.component.css.map*/'],encapsulation:2})}}return i})();var ae=l(98677),Zt=l(61873),A=function(i){return i[i.All=0]="All",i[i.Favorites=-1]="Favorites",i}(A||{}),G=function(i){return i[i.LocationPickerSingleSelect=1]="LocationPickerSingleSelect",i[i.LocationPickerMultiSelect=2]="LocationPickerMultiSelect",i[i.LineOfBusinessSingleSelect=3]="LineOfBusinessSingleSelect",i[i.LineOfBusinessMultiSelect=4]="LineOfBusinessMultiSelect",i[i.UserToken=5]="UserToken",i[i.Date=6]="Date",i[i.ClientUniversalId=7]="ClientUniversalId",i[i.ClientId=8]="ClientId",i[i.PrimaryServiceToUniversalId=9]="PrimaryServiceToUniversalId",i[i.MkoServicePath=10]="MkoServicePath",i[i.ClientServicePath=11]="ClientServicePath",i[i.DashboardServicePath=12]="DashboardServicePath",i[i.AuditServicePath=13]="AuditServicePath",i[i.MyKpaOnlineServicePath=14]="MyKpaOnlineServicePath",i[i.MkoAccountIdFromQueryString=15]="MkoAccountIdFromQueryString",i[i.MkoSurveyIdFromQueryString=16]="MkoSurveyIdFromQueryString",i[i.EmployeePickerSingleSelect=17]="EmployeePickerSingleSelect",i[i.LocationEmployeePickerSingleSelect=18]="LocationEmployeePickerSingleSelect",i}(G||{}),eo=l(61275),se=l(77944),to=l(48072),le=l(3256),oo=l(81656),pe=l(98894),ce=l(75821),de=l(88981),ie=l(64541),io=l(70292);function no(i,p){if(1&i&&(e.j41(0,"p"),e.EFF(1),e.k0s()),2&i){const t=e.XpG();
1e.R7$(1),e.SpI(" ",t.parameterInstructions.get(t.ReportParameterTypeEnum.LocationPickerSingleSelect)," ")}}const ro=function(){return{height:300,popupClass:"max-h-300"}};let ao=(()=>{class i{constructor(){this.locationPickerValueType=le.F.ServiceToUniversalId,this.employeePickerValueType=pe._.SsoUserId,this.employeeStatus=ce.v.Both,this.parameterInstructions=new Map,this.locationValueChange=new e.bkB,this.employeeValueChange=new e.bkB,this.locationValue=null,this.locationDefaultItem={serviceToName:"Select a Location",serviceToUniversalId:null,applicationFeatureIds:[],clientId:null,clientName:null,clientUniversalId:null,serviceToId:null},this.employeeDefaultItem={fullName:"Select an Employee",ssoUserId:null,firstName:null,lastName:null,phoneNumber:null,email:null},this.ReportParameterTypeEnum=G,this.isDisabled=!1}onLocationChanged(t){this.locationValue=t,this.employeePicker.setValueFromIds(io.q.EMPTY),this.onChange&&this.onChange(null)}onEmployeeChanged(t){if(t){const n=[this.locationValue,t];this.employeeValueChange.emit(n),this.onChange&&this.onChange(n)}else this.onChange(null)}set value(t){this._value=t}get value(){return this._value}writeValue(t){this.value=t}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.isDisabled=t}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["kpa-location-employee-picker"]],viewQuery:function(n,o){if(1&n&&e.GBs(ie.w,5),2&n){let r;e.mGM(r=e.lsd())&&(o.employeePicker=r.first)}},inputs:{param:"param",clientUniversalId:"clientUniversalId",applicationFeatureIds:"applicationFeatureIds",locationPickerValueType:"locationPickerValueType",employeePickerValueType:"employeePickerValueType",employeeStatus:"employeeStatus",parameterInstructions:"parameterInstructions",value:"value"},outputs:{locationValueChange:"locationValueChange",employeeValueChange:"employeeValueChange"},features:[e.Jv_([{provide:d.kq,useExisting:(0,e.Rfq)(()=>i),multi:!0}])],decls:11,vars:17,consts:[[1,"location-picker"],[4,"ngIf"],[3,"id","locationDefaultItem","clientUniversalId","applicationFeatureIds","limitToSingleSelectLocation","pickerValueType","valueChange"],[1,"required-label"],[1,"employee-picker"],[3,"id","employeeDefaultItem","clientUniversalId","servicetoUniversalId","statusId","limitToSingleSelectEmployee","pickerValueType","listHeight","popupSettings","valueChange"]],template:function(n,o){1&n&&(e.j41(0,"div",0),e.DNE(1,no,2,1,"p",1),e.j41(2,"kpa-location-picker",2),e.bIt("valueChange",function(s){return o.onLocationChanged(s)}),e.k0s(),e.j41(3,"div")(4,"p",3),e.EFF(5,"Required"),e.k0s()()(),e.j41(6,"div",4)(7,"kpa-employee-dropdown-picker",5),e.bIt("valueChange",function(s){return o.onEmployeeChanged(s)}
1),e.k0s(),e.j41(8,"div")(9,"p",3),e.EFF(10,"Required"),e.k0s()()()),2&n&&(e.R7$(1),e.Y8G("ngIf",o.parameterInstructions.has(o.ReportParameterTypeEnum.LocationPickerSingleSelect)),e.R7$(1),e.Y8G("id","locationEmployee_location_"+o.param.id)("locationDefaultItem",o.locationDefaultItem)("clientUniversalId",o.clientUniversalId)("applicationFeatureIds",o.applicationFeatureIds)("limitToSingleSelectLocation",!0)("pickerValueType",o.locationPickerValueType),e.R7$(5),e.Y8G("id","locationEmployee_employee_"+o.param.id)("employeeDefaultItem",o.employeeDefaultItem)("clientUniversalId",o.clientUniversalId)("servicetoUniversalId",o.locationValue)("statusId",o.employeeStatus)("limitToSingleSelectEmployee",!0)("pickerValueType",o.employeePickerValueType)("listHeight",300)("popupSettings",e.lJ4(16,ro)))},dependencies:[a.bT,de.v,ie.w],styles:[".required-label[_ngcontent-%COMP%]{font-size:12px;margin:0 0 0 10px;color:#514e4b;text-align:right}p[_ngcontent-%COMP%]{white-space-collapse:collapse}.location-picker[_ngcontent-%COMP%]{margin-bottom:16px}"]})}}return i})();var so=l(98217);function lo(i,p){if(1&i&&(e.j41(0,"p"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(1),e.SpI(" ",t.parameterInstructions.get(t.ReportParameterTypeEnum.LocationPickerSingleSelect)," ")}}function po(i,p){1&i&&(e.j41(0,"div")(1,"p",9),e.EFF(2,"Required"),e.k0s()())}function co(i,p){if(1&i){const t=e.RV6();e.j41(0,"div"),e.DNE(1,lo,2,1,"p",6),e.j41(2,"label",7),e.EFF(3,"Location"),e.k0s(),e.j41(4,"kpa-location-picker",8),e.bIt("valueChange",function(o){e.eBV(t);const r=e.XpG().$implicit,s=e.XpG();return e.Njj(s.setRuntimeValue(r,o))}),e.k0s(),e.DNE(5,po,3,0,"div",6),e.k0s()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(1),e.Y8G("ngIf",n.parameterInstructions.has(n.ReportParameterTypeEnum.LocationPickerSingleSelect)),e.R7$(1),e.Mz_("for","single_locations",t.id,""),e.R7$(2),e.Mz_("id","single_locations",t.id,""),e.Y8G("formControlName",t.id)("clientUniversalId",n.clientUniversalId)("applicationFeatureIds",n.applicationFeatureIds)("limitToSingleSelectLocation",!0)("pickerValueType",n.LocationPickerValueType.ServiceToUniversalId),e.R7$(1),e.Y8G("ngIf",t.isRequired)}}function mo(i,p){if(1&i&&(e.j41(0,"p"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(1),e.SpI(" ",t.parameterInstructions.get(t.ReportParameterTypeEnum.LocationPickerMultiSelect)," ")}}function ho(i,p){if(1&i){const t=e.RV6();e.j41(0,"div"),e.DNE(1,mo,2,1,"p",6),e.j41(2,"label",7),e.EFF(3,"Location"),e.k0s(),e.j41(4,"kpa-location-picker",8),e.bIt("valueChange",function(o){e.eBV(t);const r=e.XpG().$implicit,s=e.XpG();return e.Njj(s.setRuntimeValue(r,o))}),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(1),e.Y8G("ngIf",n.parameterInstructions.has(n.ReportParameterTypeEnum.LocationPickerMultiSelect)),e.R7$(1),e.Mz_("for","multi_locations",t.id,""),e.R7$(2),e.Mz_("id","multi_locations",t.id,""),e.Y8G("formControlName",t.id)("clientUniversalId",n.clientUniversalId)("applicationFeatureIds",n.applicationFeatureIds)("limitToSingleSelectLocation",!1)("pickerValueType",n.LocationPickerValueType.ServiceToUniversalIdArray)}}function go(i,p){if(1&i&&(e.j41(0,"p"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(1),e.SpI(" ",t.parameterInstructions.get(t.ReportParameterTypeEnum.LineOfBusinessSingleSelect)," ")}}function uo(i,p){if(1&i){const t=e.RV6();e.j41(0,"div"),e.DNE(1,go,2,1,"p",6),e.j41(2,"label",7),e.EFF(3,"Line of Business"),e.k0s(),e.j41(4,"kpa-line-of-business-picker",10),e.bIt("valueChange",function(o){e.eBV(t);const r=e.XpG().$implicit,s=e.XpG();return e.Njj(s.setRuntimeValue(r,o))}),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(1),e.Y8G("ngIf",n.parameterInstructions.has(n.ReportParameterTypeEnum.LineOfBusinessSingleSelect)),e.R7$(1),e.Mz_("for","single_lob",t.id,""),e.R7$(2),e.Mz_("id","single_lob",t.id,""),e.Y8G("formControlName",t.id)("clientUniversalId",n.clientUniversalId)("limitToSingleSelectLOB",!0)("pickerValueType",n.LineOfBusinessPickerValueType.LOBId)}}function _o(i,p){if(1&i&&(e.j41(0,"p"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(1),e.SpI(" ",t.parameterInstructions.get(t.ReportParameterTypeEnum.LineOfBusinessMultiSelect)," ")}}function fo(i,p){if(1&i){const t=e.RV6();e.j41(0,"div"),e.DNE(1,_o,2,1,"p",6),e.j41(2,"label",7),e.EFF(3,"Line of Business"),e.k0s(),e.j41(4,"kpa-line-of-business-picker",10),e.bIt("valueChange",function(o){e.eBV(t);const r=e.XpG().$implicit,s=e.XpG();return e.Njj(s.setRuntimeValue(r,o))}),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();
1e.R7$(1),e.Y8G("ngIf",n.parameterInstructions.has(n.ReportParameterTypeEnum.LineOfBusinessMultiSelect)),e.R7$(1),e.Mz_("for","multi_lob",t.id,""),e.R7$(2),e.Mz_("id","multi_lob",t.id,""),e.Y8G("formControlName",t.id)("clientUniversalId",n.clientUniversalId)("limitToSingleSelectLOB",!1)("pickerValueType",n.LineOfBusinessPickerValueType.LOBIdArray)}}function vo(i,p){if(1&i&&(e.j41(0,"p"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(1),e.SpI(" ",t.parameterInstructions.get(t.ReportParameterTypeEnum.EmployeePickerSingleSelect)," ")}}function ko(i,p){1&i&&(e.j41(0,"p",9),e.EFF(1," Required "),e.k0s())}function Ro(i,p){if(1&i){const t=e.RV6();e.j41(0,"div"),e.DNE(1,vo,2,1,"p",6),e.j41(2,"label",7),e.EFF(3,"Employees"),e.k0s(),e.j41(4,"kpa-employee-dropdown-picker",11),e.bIt("valueChange",function(o){e.eBV(t);const r=e.XpG().$implicit,s=e.XpG();return e.Njj(s.setRuntimeValue(r,o))}),e.k0s(),e.j41(5,"div"),e.DNE(6,ko,2,0,"p",12),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(1),e.Y8G("ngIf",n.parameterInstructions.has(n.ReportParameterTypeEnum.EmployeePickerSingleSelect)),e.R7$(1),e.Mz_("for","multi_Employee",t.id,""),e.R7$(2),e.Mz_("id","multi_Employee",t.id,""),e.Y8G("formControlName",t.id)("clientUniversalId",n.clientUniversalId)("servicetoUniversalId",n.reportParameterValues.Location)("statusId",n.EmployeeStatus.Both)("limitToSingleSelectEmployee",!0)("disabled",!1)("pickerValueType",n.EmployeePickerValueType.SsoUserId),e.R7$(2),e.Y8G("ngIf",t.isRequired)}}function bo(i,p){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"kpa-location-employee-picker",13),e.bIt("employeeValueChange",function(o){e.eBV(t);const r=e.XpG().$implicit,s=e.XpG();return e.Njj(s.setRuntimeValue(r,o))}),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG();e.R7$(1),e.Mz_("id","single_LocationEmployee",t.id,""),e.Y8G("param",t)("parameterInstructions",n.parameterInstructions)("formControlName",t.id)("clientUniversalId",n.clientUniversalId)("applicationFeatureIds",n.applicationFeatureIds)}}function Co(i,p){if(1&i&&(e.j41(0,"div",4),e.qex(1,2),e.DNE(2,co,6,9,"div",5),e.DNE(3,ho,5,8,"div",5),e.DNE(4,uo,5,7,"div",5),e.DNE(5,fo,5,7,"div",5),e.DNE(6,Ro,7,11,"div",5),e.DNE(7,bo,2,6,"div",5),e.bVm(),e.k0s()),2&i){const t=p.$implicit,n=e.XpG();e.R7$(1),e.Y8G("ngSwitch",t.enumReportParametersTypeId),e.R7$(1),e.Y8G("ngSwitchCase",n.ReportParameterTypeEnum.LocationPickerSingleSelect),e.R7$(1),e.Y8G("ngSwitchCase",n.ReportParameterTypeEnum.LocationPickerMultiSelect),e.R7$(1),e.Y8G("ngSwitchCase",n.ReportParameterTypeEnum.LineOfBusinessSingleSelect),e.R7$(1),e.Y8G("ngSwitchCase",n.ReportParameterTypeEnum.LineOfBusinessMultiSelect),e.R7$(1),e.Y8G("ngSwitchCase",n.ReportParameterTypeEnum.EmployeePickerSingleSelect),e.R7$(1),e.Y8G("ngSwitchCase",n.ReportParameterTypeEnum.LocationEmployeePickerSingleSelect)}}function wo(i,p){if(1&i&&(e.j41(0,"div",14)(1,"button",15),e.EFF(2," Open "),e.k0s()()),2&i){const t=e.XpG();e.R7$(1),e.Y8G("disabled",t.form.invalid||t.form.errors)}}function So(i,p){if(1&i){const t=e.RV6();e.j41(0,"div",14)(1,"button",16),e.bIt("click",function(o){e.eBV(t);const r=e.XpG();return e.Njj(r.onClose(o))}),e.EFF(2," Cancel "),e.k0s(),e.j41(3,"button",17),e.EFF(4," Generate Report "),e.k0s()()}if(2&i){const t=e.XpG();e.R7$(3),e.Y8G("disabled",t.form.invalid||t.form.errors)}}let Io=(()=>{class i{constructor(t,n,o){this.authService=t,this.userInfoService=n,this.environment=o,this.buttonStyle="Open",this.parameterInstructions=new Map,this.formSubmitted=new e.bkB,this.formClose=new e.bkB,this.form=new d.gE({}),this.ReportParameterTypeEnum=G,this.LocationPickerValueType=le.F,this.LineOfBusinessPickerValueType=oo.T,this.EmployeePickerValueType=pe._,this.EmployeeStatus=ce.v,this.reportParameterValues={},this.applicationFeatureIds=Object.values(L.V).filter(r=>"number"==typeof r)}ngOnInit(){this.report.reportParameters=this.report.reportParameters?.slice().sort((t,n)=>t.sortOrder-n.sortOrder),this.clientUniversalId=this.userInfoService.getUserInfoFromStorage().clientUniversalId,this.form=this.toFormGroup(this.report.reportParameters),this.authService.accessToken.subscribe(t=>{this.token=t,this.setRunTimeValues()})}toFormGroup(t){let n={};return t.forEach(o=>{o.visible&&(n[o.id]=this.createFormControl(o))}),new d.gE(n)}createFormControl(t){const n=[];return t.isRequired&&n.push(d.k0.required),new d.MJ(null,n)}onSubmit(){this.form.valid&&this.formSubmitted.emit(this.reportParameterValues)}onClose(t){t.preventDefault(),this.formClose.emit()}setRunTimeValues(){this.userInfo=this.userInfoService.getUserInfoFromStorage(),this.report.reportParameters.forEac
1h(t=>{switch(t.enumReportParametersTypeId){case G.UserToken:this.setRuntimeValue(t,"Bearer "+this.token);break;case G.ClientUniversalId:this.setRuntimeValue(t,this.userInfo.clientUniversalId);break;case G.ClientId:this.setRuntimeValue(t,this.userInfo.clientId);break;case G.PrimaryServiceToUniversalId:this.setRuntimeValue(t,this.userInfo.primaryServiceToUniversalId);break;case G.MkoServicePath:this.setRuntimeValue(t,this.environment.services.mko);break;case G.ClientServicePath:this.setRuntimeValue(t,this.environment.services.clients);break;case G.DashboardServicePath:this.setRuntimeValue(t,this.environment.services.dashboard);break;case G.AuditServicePath:this.setRuntimeValue(t,this.environment.services.audit);break;case G.MyKpaOnlineServicePath:this.setRuntimeValue(t,this.environment.preAuthLanding.myKpaOnline)}})}setRuntimeValue(t,n){"LocationEmployee"===t.parameterName?Array.isArray(n)&&2==n.length&&(this.reportParameterValues.Location=n[0],this.reportParameterValues.Employee=n[1]):this.reportParameterValues[t.parameterName]=n}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(Z.u),e.rXU(D.fv),e.rXU($.O))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["kpa-report-parameters"]],inputs:{report:"report",buttonStyle:"buttonStyle",parameterInstructions:"parameterInstructions"},outputs:{formSubmitted:"formSubmitted",formClose:"formClose"},decls:5,vars:5,consts:[[1,"k-form","k-form-md",3,"formGroup","ngSubmit"],["id","controls",4,"ngFor","ngForOf"],[3,"ngSwitch"],["class","form-footer k-form-buttons",4,"ngSwitchCase"],["id","controls"],[4,"ngSwitchCase"],[4,"ngIf"],[3,"for"],[3,"id","formControlName","clientUniversalId","applicationFeatureIds","limitToSingleSelectLocation","pickerValueType","valueChange"],[1,"required-label"],[3,"id","formControlName","clientUniversalId","limitToSingleSelectLOB","pickerValueType","valueChange"],[3,"id","formControlName","clientUniversalId","servicetoUniversalId","statusId","limitToSingleSelectEmployee","disabled","pickerValueType","valueChange"],["class","required-label",4,"ngIf"],[3,"id","param","parameterInstructions","formControlName","clientUniversalId","applicationFeatureIds","employeeValueChange"],[1,"form-footer","k-form-buttons"],["id","report-parameters-btn-open","kendoButton","","kpaPrimaryButton","","type","submit","primary","true","look","flat","fillMode","outline",3,"disabled"],["id","report-parameters-btn-cancel","kendoButton","","kpaSecondaryButton","","fillMode","flat",1,"kpa-secondary","flat",3,"click"],["id","report-parameters-btn-generate","kendoButton","","kpaPrimaryButton","","type","submit","primary","true","look","flat","fillMode","outline",3,"disabled"]],template:function(n,o){1&n&&(e.j41(0,"form",0),e.bIt("ngSubmit",function(){return o.onSubmit()}),e.DNE(1,Co,8,7,"div",1),e.qex(2,2),e.DNE(3,wo,3,1,"div",3),e.DNE(4,So,5,1,"div",3),e.bVm(),e.k0s()),2&n&&(e.Y8G("formGroup",o.form),e.R7$(1),e.Y8G("ngForOf",o.report.reportParameters),e.R7$(1),e.Y8G("ngSwitch",o.buttonStyle),e.R7$(1),e.Y8G("ngSwitchCase","Open"),e.R7$(1),e.Y8G("ngSwitchCase","Generate"))},dependencies:[a.Sq,a.bT,a.ux,a.e1,O.Qp,d.qT,d.BC,d.cb,d.j4,d.JD,h.C3,se._,N.A,de.v,ao,so.$,ie.w],styles:[".required-label[_ngcontent-%COMP%]{font-size:12px;margin:0 0 0 10px;color:#514e4b;text-align:right}.flat[_ngcontent-%COMP%]{border:none}.form-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}#controls[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{white-space-collapse:collapse}"]})}}return i})();function yo(i,p){1&i&&e.nrm(0,"div",23)}function Eo(i,p){if(1&i&&(e.qex(0),e.EFF(1),e.bVm()),2&i){const t=e.XpG().$implicit;e.R7$(1),e.SpI(" ",t.categoryName," ")}}function Fo(i,p){if(1&i&&(e.j41(0,"span",27),e.EFF(1),e.nrm(2,"i",28),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(1),e.SpI(" ",t.categoryName," "),e.R7$(1),e.HbH(t.icon)}}function To(i,p){if(1&i){const t=e.RV6();e.j41(0,"button",24),e.bIt("click",function(){const r=e.eBV(t).$implicit;return e.Njj(r.action(r.reportCategoryId))}),e.DNE(1,Eo,2,1,"ng-container",25),e.DNE(2,Fo,3,3,"span",26),e.k0s()}if(2&i){const t=p.$implicit,n=e.XpG();e.AVh("active",t.reportCategoryId==n.selectedCategoryId),e.Y8G("id",n.reportId(t.categoryName,"")),e.R7$(1),e.Y8G("ngIf",!t.icon),e.R7$(1),e.Y8G("ngIf",t.icon)}}function xo(i,p){1&i&&e.nrm(0,"div",23)}function Oo(i,p){1&i&&(e.j41(0,"div",29),e.nrm(1,"i",30),e.j41(2,"span"),e.EFF(3,"No items are in this folder yet."),e.k0s()())}function Do(i,p){1&i&&(e.j41(0,"div",29),e.nrm(1,"i",31),e.j41(2,"span"),e.EFF(3,"No matching results found."),e.k0s()())}function Mo(i,p){if(1&i&&e.DNE(0,Do,4,0,"div",17),2&i){const t=e.XpG(),n=e.sdS(29);e.Y8G("ngIf",0==(null==t.searchReports?null:t.searchReports.length))("ngIfElse",n)}}function Po(i,p){1&i&&(e.j41(0,"div",41)(1,"div"),e.EFF(2,"NEW"),e.k0s()())}function Bo(i,p){if(1&i){const t=e.RV6();e.j41(0,"div")(1,"button",42),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG(2);return e.Njj(r.setFavorite(o))}),e.nrm(2,"span",43),e.k0s()()}if(2&i){const t=e.XpG().$implicit,n=e.XpG(2);e.R7$(1),e.Y8G("disabled",t.favoriteInProgress)("id",n.reportId(t.name,"favorite_on"))}}function Go(i,p){if(1&i){const t=e.RV6();e.j41(0,"button",44),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit,r=e.XpG(2);return e.Njj(r.setFavorite(o))}),e.nrm(1,"span",45)(2,"span",46),e.k0s()}if(2&i){const t=e.XpG().$implicit,n=e.XpG(2);e.Y8G("disabled",t.favoriteInProgress)("id",n.reportId(t.name,"favorite_off"))}}function Uo(i,p){if(1&i&&(e.qex(0),e.EFF(1),e.bVm()),2&i){const t=e.XpG(2).$implicit;e.R7$(1),e.SpI(" ",t.label," ")}}function Lo(i,p){if(1&i&&(e.j41(0,"span",27),e.EFF(1),e.nrm(2,"i",28),e.k0s()),2&i){const t=e.XpG(2).$implicit;e.R7$(1),e.SpI(" ",t.label," "),e.R7$(1),e.HbH(t.icon)}}function jo(i,p){if(1&i){const t=e.RV6();e.j41(0,"button",50),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit;return e.Njj(o.onClick())}),e.DNE(1,Uo,2,1,"ng-container",25),e.DNE(2,Lo,3,3,"span",26),e.k0s()}if(2&i){const t=e.XpG().$implicit,n=e.XpG().$implicit,o=e.XpG(2);e.Y8G("id",o.reportId(n.name,t.label)),e.R7$(1),e.Y8G("ngIf",!t.icon),e.R7$(1),e.Y8G("ngIf",t.icon)}}function $o(i,p){if(1&i&&(e.qex(0),e.EFF(1),e.bVm()),2&i){const t=e.XpG(2).$implicit;e.R7$(1),e.SpI(" ",t.label," ")}}function Vo(i,p){if(1&i&&(e.j41(0,"span",27),e.nrm(1,"i",28),e.EFF(2),e.k0s()),2&i){const t=e.XpG(2).$implicit;e.R7$(1),e.HbH(t.icon),e.R7$(1),e.SpI(" ",t.label," ")}}function No(i,p){if(1&i){const t=e.RV6();e.j41(0,"button",51),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit;return e.Njj(o.onClick())}),e.DNE(1,$o,2,1,"ng-container",25),e.DNE(2,Vo,3,3,"span",26),e.k0s()}if(2&i){const t=e.XpG().$implicit,n=e.XpG().$implicit,o=e.XpG(2);e.Y8G("id",o.reportId(n.name,t.label)),e.R7$(1),e.Y8G("ngIf",!t.icon),e.R7$(1),e.Y8G("ngIf",t.icon)}}function Ao(i,p){if(1&i&&(e.qex(0),e.EFF(1),e.bVm()),2&i){const t=e.XpG(2).$implicit;e.R7$(1),e.SpI(" ",t.label," ")}}function Xo(i,p){if(1&i&&(e.j41(0,"span",27),e.nrm(1,"i",28),e.EFF(2),e.k0s()),2&i){const t=e.XpG(2).$implicit;e.R7$(1),e.HbH(t.icon),e.R7$(1),e.SpI(" ",t.label," ")}}function Yo(i,p){if(1&i){const t=e.RV6();e.j41(0,"button",52),e.bIt("click",function(){e.eBV(t);const o=e.XpG().$implicit;return e.Njj(o.onClick())}),e.DNE(1,Ao,2,1,"ng-container",25),e.DNE(2,Xo,3,3,"span",26),e.k0s()}if(2&i){const t=e.XpG().$implicit,n=e.XpG().$implicit,o=e.XpG(2);e.Y8G("id",o.reportId(n.name,t.label)),e.R7$(1),e.Y8G("ngIf",!t.icon),e.R7$(1),e.Y8G("ngIf",t.icon)}}function Ho(i,p){if(1&i&&(e.qex(0),e.DNE(1,jo,3,3,"button",47),e.DNE(2,No,3,3,"button",48),e.DNE(3,Yo,3,3,"button",49),e.bVm()),2&i){const t=p.$implicit;e.R7$(1),e.Y8G("ngIf",t.flat),e.R7$(1),e.Y8G("ngIf",!t.primary&&!t.flat),e.R7$(1),e.Y8G("ngIf",t.primary)}}function Wo(i,p){if(1&i&&(e.j41(0,"div",33),e.DNE(1,Po,3,0,"div",34),e.j41(2,"div",14)(3,"div",35),e.nrm(4,"div",36),e.DNE(5,Bo,3,2,"div",37),e.DNE(6,Go,3,2,"ng-template",null,38,e.C5r),e.k0s(),e.nrm(8,"div",39),e.k0s(),e.j41(9,"div",15),e.DNE(10,Ho,4,3,"ng-container",40),e.k0s()()),2&i){const t=p.$implicit,n=e.sdS(7),o=e.XpG(2);e.R7$(1),e.Y8G("ngIf",t.new),e.R7$(3),e.Y8G("searchValue",o.searchValue)("text",t.name),e.R7$(1),e.Y8G("ngIf",t.isFavorite)("ngIfElse",n),e.R7$(3),e.Y8G("searchValue",o.searchValue)("text",t.description),e.R7$(2),e.Y8G("ngForOf",t.actions)}}function Ko(i,p){if(1&i&&e.DNE(0,Wo,11,8,"div",32),2&i){const t=e.XpG();e.Y8G("ngForOf",t.searchReports)}}function zo(i,p){if(1&i){const t=e.RV6();e.j41(0,"kendo-dialog",53)(1,"h3",54),e.EFF(2),e.k0s(),e.j41(3,"div",55)(4,"kpa-report-parameters",56),e.bIt("formSubmitted",function(o){e.eBV(t);const r=e.XpG();return e.Njj(r.openTelerikReport(o))})("formClose",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.closeReportParametersDialog())}),e.k0s()()()}if(2&i){const t=e.XpG();e.Y8G("width",500),e.R7$(2),e.SpI(" ",t.selectedReport.name," "),e.R7$(2),e.Y8G("report",t.selectedReport)("buttonStyle","Generate")("parameterInstru
1ctions",t.selectedReportParameterInstructions)}}function qo(i,p){if(1&i){const t=e.RV6();e.j41(0,"kendo-dialog",57),e.bIt("close",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.closeSendReportDialog())}),e.j41(1,"div")(2,"h4",58),e.EFF(3,"Download Training Report"),e.k0s(),e.j41(4,"p",59),e.EFF(5),e.j41(6,"a",60),e.EFF(7,"User Management"),e.k0s()(),e.j41(8,"div",61)(9,"button",62),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.closeSendReportDialog())}),e.EFF(10," Cancel "),e.k0s(),e.j41(11,"button",63),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.sendReportEmail())}),e.EFF(12," Send "),e.k0s()()()()}if(2&i){const t=e.XpG();e.Y8G("maxWidth",400)("height",180),e.R7$(5),e.SpI(" We'll send a completed report to ",t.emailid,". If this is the wrong address for you, you may update email address under "),e.R7$(1),e.FS9("href",t.manageEmployeeUrl,e.B4B),e.R7$(3),e.Y8G("primary",!0)("look","flat"),e.R7$(2),e.Y8G("primary",!0)("look","flat")}}const Jo=[{path:"",redirectTo:"0",pathMatch:"full"},{path:"OSHAReporting",redirectTo:"4"},{path:"old/EhsReporting",component:Ke},{path:"old/FiReporting",component:ft},{path:"old/OshaReporting",component:Qt},{path:"old/HRReporting",component:Ut},{path:":categoryId",component:(()=>{class i{constructor(t,n,o,r,s,b,w,M,ti,oi){this.router=t,this.authService=n,this.environment=o,this.loadingService=r,this.reportService=s,this.batchImportService=b,this.notificationService=w,this.userInfoService=M,this.route=ti,this.renderer=oi,this.isImpersonating=!1,this.loading=!0,this.selectedCategoryId=0,this.reportCategories=[],this.searchValue="",this.showReportParametersDialog=!1,this.regConfig=[],this.confirmDownload=new e.bkB,this.showModal=!1,this.downloadTrainingPath="/Kpa.Reports/ClientReports/TrainingCompletionReport",this.sendReportEmailRequest=!1,this.reportUrl="",this.reportType="",this.reportEmailQueued=!1,this.emailid=""}ngOnInit(){this.userInfo=this.userInfoService.getUserInfoFromStorage(),this.emailid=this.userInfo.primaryEmail,this.manageEmployeeUrl=`employee/employee/edit/${this.userInfo.employeeId}`,this.authService.isImpersonating.subscribe(t=>{this.isImpersonating=t}),(0,Zt.p)({reportCategories:this.reportService.getReportCategories(),reports:this.reportService.getReports()}).subscribe(t=>{t.reportCategories.forEach(o=>o.action=r=>this.setFilterClick(r)),t.reportCategories.push({reportCategoryId:A.All,categoryName:"All",sequence:0,action:o=>this.setFilterClick(o)}),t.reportCategories.push({reportCategoryId:A.Favorites,categoryName:"Favorites",sequence:0,action:o=>this.setFilterClick(o),icon:"fa-solid fa-star"}),Math.max(...t.reportCategories.map(o=>o.sequence)),this.reportCategories=t.reportCategories.sort((o,r)=>o.sequence-r.sequence),t.reports.sort((o,r)=>o.name.toLowerCase().localeCompare(r.name.toLowerCase())).forEach(o=>this.addReportActions(o)),this.reports=t.reports.filter(o=>null!=o.reportCategoryId),this.filteredReports=this.reports,this.route.paramMap.subscribe(o=>{var r=parseInt(o.get("categoryId"));null!=r&&this.setFilter(r)}),this.loading=!1})}addReportActions(t){t.actions=[],t.canSetOptions&&t.actions.push({label:"OPTIONS",onClick:()=>this.optionsClick(t),flat:!0}),t.canDownload&&t.actions.push({label:"DOWNLOAD",onClick:()=>this.downloadReport(t),icon:"fa-solid fa-arrow-down-to-line"}),t.canView&&t.actions.push(t.isTelerikReport&&!t.usesNewReportParameterArch?{label:"OPEN",onClick:()=>this.openReport(t),primary:!0}:t.isTelerikReport&&t.usesNewReportParameterArch?{label:"OPEN",onClick:()=>this.openReportParametersDialog(t),primary:!0}:{label:"OPEN",onClick:()=>this.navigateToPage(t.viewURL),primary:!0})}closeReportParametersDialog(){this.showReportParametersDialog=!1,this.selectedReport=null,this.renderer.removeClass(document.body,"k-overflow-hidden")}openReportParametersDialog(t){this.selectedReportParameterInstructions=this.getReportParameterInstructionsByReportName(t.name),this.showReportParametersDialog=!0,this.selectedReport=t,this.renderer.addClass(document.body,"k-overflow-hidden")}getReportParameterInstructionsByReportName(t){const n=new Map;return"Employee Training Records"!==t||n.set(G.LocationPickerSingleSelect,"Select the primary location for the employee first."),n}setFilterClick(t){this.router.navigate(["reporting",t])}setFilter(t){this.selectedCategoryId=t,t==A.All?this.filteredReports=this.reports.sort((n,o)=>n.name.toLowerCase().localeCompare(o.name.toLowerCase())):t==A.Favorites?this.filterFavoriteReports():this.filteredReports=this.reports.filter(n=>n.reportCategoryId==t).sort((n,o)=>n.name.toLowerCase().localeCompare(o.name.toLowerCase())),this.searchReport()}filterFavoriteReports(){this.filteredReports=this.reports.filter(t=>t.isFavorite).sort((t,n)=>t.name.toLowerCase().localeCompare(n.name.toLowerCase()))}searchReport(){this.searchReports=void 0!==this.searchValue&&""!==this.searchValue?this.filteredReports.filter(t=>t.name.toLowerCase().includes(this.searchValue.toLowerCase())||t.description.toLowerCase().includes(this.searchValue.toLowerCase())):this.filteredReports}setFavorite(t){t.isFavorite=!t.isFavorite,t.favoriteInProgress=!0,this.reportService.setFavorite(t).subscribe(n=>{const o=new Date;this.selectedCategoryId===A.Favorites&&this.filterFavoriteReports();let r=!t.favoritedOn||o.getTime()-new Date(t.favoritedOn).getTime()>6e4;0==t.isFavorite&&r&&this.notificationService.show({content:`"${t.name}" removed from Favorites.`,cssClass:"button-notification",position:{horizontal:"center",vertical:"top"},type:{style:"success",icon:!1}}),t.favoriteInProgress=!1,t.favoritedOn=new Date})}openTelerikReport(t){this.renderer.removeClass(document.body,"k-overflow-hidden"),""!=this.selectedReport.reportId&&this.router.navigate(["view",this.selectedReport.reportId],{relativeTo:this.route,queryParams:{usesNe
1wReportParameterArch:this.selectedReport.usesNewReportParameterArch,reportParameterValues:JSON.stringify(t)}})}openReport(t){""!=t.reportId&&this.router.navigate(["view",t.reportId],{relativeTo:this.route,queryParams:{usesNewReportParameterArch:t.usesNewReportParameterArch}})}navigateToPage(t){var n=t.split(","),o=n[0];null==this.userInfo.accessListId&&n.length>1&&(o=n[1]),this.loadingService.startLoading();let r=o.replace("[MKO]",this.environment.preAuthLanding.myKpaOnline).replace("[PLATFORM]",this.environment.preAuthLanding.platform).replace("[HRM]",this.environment.preAuthLanding.hrDrive);window.location.href=r}optionsClick(t){"59b83db5-ac75-4b02-8fb4-aeffa0f01cd6"==t.reportId.toLowerCase()||"72dad3a7-e795-46f0-90f1-cb3ceaabafd4"==t.reportId.toLowerCase()?this.reportService.getMkoAccountId(this.userInfo.primaryLocationServiceToId).subscribe(n=>{let o="[MKO]/Clients/group/Accidents/Accidents.aspx?accountId="+n,r="[MKO]/Clients/facility/Accidents/Accidents.aspx?accountId="+n;"59b83db5-ac75-4b02-8fb4-aeffa0f01cd6"==t.reportId.toLowerCase()?this.navigateToPage(`${o}&reports=osha300,${r}&reports=osha300`):"72dad3a7-e795-46f0-90f1-cb3ceaabafd4"==t.reportId&&this.navigateToPage(`${o}&reports=oshaCSV,${r}&reports=oshaCSV`)}):(this.reportForOptions=t.downloadURL,this.reportTypeForOptions=t.reportTypeId,this.title=t.name,this.loadOptionalFields(t))}loadOptionalFields(t){this.loadingService.startLoading(),this.reportService.getOptionsFields(t.downloadURL,t.reportTypeId).subscribe(n=>{this.regConfig=n,this.confirmDownload.emit(!0),this.showModal=!0,this.loadingService.stopLoading()},n=>{n instanceof C.yz&&404===n.status&&this.loadingService.stopLoading(),n instanceof C.yz&&400===n.status&&this.loadingService.stopLoading(),window.scrollTo(0,0)})}onDownloadReport(t){this.confirmDownload.emit(!0),console.log("submit"),console.log(t),console.log(this.reportForOptions),console.log(this.reportTypeForOptions),this.downloadReportWithParams(this.reportForOptions,this.reportTypeForOptions,t)}downloadReportWithParams(t,n,o){this.showModal=!1,this.reportService.getReportWithParams(t,n,o).subscribe(r=>{let s=r.fileobject;if(window.navigator){const M=window.navigator;if(M&&M.msSaveOrOpenBlob)return void M.msSaveOrOpenBlob(s)}const b=window.URL.createObjectURL(s);let w=document.createElement("a");w.href=b,w.download=r.filename,w.click(),setTimeout(function(){window.URL.revokeObjectURL(b)},100)},r=>{console.log(r),r instanceof C.yz&&404===r.status&&(this.showModal=!1),r instanceof C.yz&&400===r.status&&(this.showModal=!1)})}downloadReport(t){"16874020-7b7f-46ee-995f-78dde96a1738"===t.reportId.toLowerCase()?this.downloadMasterFandIEmployeeList():"11742c03-8739-405d-bdc0-45fcb533b17d"===t.reportId.toLowerCase()?this.downloadMasterEHSEmployeeList():decodeURIComponent(t.downloadURL)==this.downloadTrainingPath?(this.sendReportEmailRequest=!0,this.reportUrl=t.downloadURL,this.reportType=t.reportTypeId):this.reportService.getReport(t.downloadURL,t.reportTypeId).subscribe(n=>{this.downloadFile(n)},n=>{this.errorMessage(n)})}downloadMasterEHSEmployeeList(){this.batchImportService.getActiveEmployeeList().subscribe(t=>{this.downloadFile(t)},t=>{this.errorMessage(t)})}downloadMasterFandIEmployeeList(){this.batchImportService.getBatchActiveEmployeeList().subscribe(t=>{let n=t.fileobject;if(window.navigator){const s=window.navigator;if(s&&s.msSaveOrOpenBlob)return void s.msSaveOrOpenBlob(n)}const o=window.URL.createObjectURL(n);let r=document.createElement("a");r.href=o,r.download=t.filename,r.click(),setTimeout(function(){window.URL.revokeObjectURL(o)},100)})}downloadFile(t){let n=t.fileobject;if(window.navigator){const s=window.navigator;if(s&&s.msSaveOrOpenBlob)return void s.msSaveOrOpenBlob(n)}const o=window.URL.createObjectURL(n);let r=document.createElement("a");r.href=o,r.download=t.filename,r.click(),setTimeout(function(){window.URL.revokeObjectURL(o)},100)}errorMessage(t){console.log(t),window.scrollTo(0,0)}sendReportEmail(){this.closeSendReportDialog(),this.reportService.sendReportEmail(this.userInfo.userId,this.userInfo.primaryEmail,this.reportUrl,this.reportType).subscribe(t=>{1==t&&(this.reportEmailQueued=!0)})}closeSendReportDialog(){this.sendReportEmailRequest=!1}buildReportId(t){return(t??"").trim().toLowerCase().replace(/[^a-z0-9_]/g,"_").replace(/_+/g,"_")}reportId(t,n){const o=n?.trim()?`report_${t}_${n}`:`report_${t}`;return this.buildReportId(o)}static{this.\u0275fac=function(n){return new(n||i)(e.rXU(P.Ix),e.rXU(Z.u),e.rXU($.O),e.rXU(X.F),e.rXU(Y.k),e.rXU(z.B),e.rXU(eo.JE),e.rXU(D.fv),e.rXU(P.nX),e.rXU(e.sFG))}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["app-reporting"]],hostVars:2,hostBindings:function(n,o){2&n&&e.AVh("is-impersonating",o.isImpersonating)},decls:33,vars:15,consts:[[1,"reporting-container"],[1,"reporting-header"],["id","report_search_box","placeholder","Type to search...",1,"search-box",3,"clearButton","
1ngModel","ngModelChange","valueChange","input"],[1,"reporting-body"],[1,"reporting-body-left-container"],[1,"reporting-body-left"],[1,"reporting-body-left-header"],[1,"fas","fa-folder-open"],[1,"reporting-body-left-body"],["class","loading-bar",4,"ngIf"],["kendoButton","","fillMode","flat",3,"id","active","click",4,"ngFor","ngForOf"],[1,"reporting-body-right"],[1,"reporting-body-right-header-container"],[1,"report-item-container","header"],[1,"report-item"],[1,"report-actions"],[1,"reporting-body-right-body"],["id","noData",4,"ngIf","ngIfElse"],["noSearchResults",""],["reportList",""],[3,"showModal","regConfig","title","messageTop","messageBottom","downloadReportClass","showModalChange","regConfigChange","titleChange","messageTopChange","messageBottomChange","downloadReportClassChange","downloadReport"],["id","report-parameters-dialog",3,"width",4,"ngIf"],["id","sendreport-dialog-prompt",3,"maxWidth","height","close",4,"ngIf"],[1,"loading-bar"],["kendoButton","","fillMode","flat",3,"id","click"],[4,"ngIf"],["class","center-icon",4,"ngIf"],[1,"center-icon"],["aria-hidden","true"],["id","noData"],[1,"fa-duotone","fa-solid","fa-folder-open"],[1,"fa-thin","fa-file-magnifying-glass"],["class","report-item-container",4,"ngFor","ngForOf"],[1,"report-item-container"],["class","badge",4,"ngIf"],[1,"report-item-header"],["searchHighlight","",1,"report-item-name",3,"searchValue","text"],[4,"ngIf","ngIfElse"],["not_favorited",""],["searchHighlight","",1,"report-item-descrition",3,"searchValue","text"],[4,"ngFor","ngForOf"],[1,"badge"],["kendoButton","","look","clear",1,"icon-button",3,"disabled","id","click"],[1,"fa-solid","fa-star"],["kendoButton","","look","clear",1,"icon-button","not-favorited",3,"disabled","id","click"],[1,"fa-light","fa-star","default-icon"],[1,"fa-regular","fa-star","hover-icon"],["kendoButton","","kpaSecondaryButton","","class","flat",3,"id","click",4,"ngIf"],["kendoButton","","kpaSecondaryButton","",3,"id","click",4,"ngIf"],["kendoButton","","kpaPrimaryButton","",3,"id","click",4,"ngIf"],["kendoButton","","kpaSecondaryButton","",1,"flat",3,"id","click"],["kendoButton","","kpaSecondaryButton","",3,"id","click"],["kendoButton","","kpaPrimaryButton","",3,"id","click"],["id","report-parameters-dialog",3,"width"],[1,"report-parameters-title"],["id","report-parameters-dialog-body",1,"report-parameters-dialog-body"],[3,"report","buttonStyle","parameterInstructions","formSubmitted","formClose"],["id","sendreport-dialog-prompt",3,"maxWidth","height","close"],["id","cancel-dialog-prompt-title"],["id","cancel-dialog-prompt-txt",1,"promptText"],[3,"href"],[1,"kpa-dialog-button-wrap-delete","float-right"],["id","cancel-dialog-prompt-btn-cancel","kendoButton","",3,"primary","look","click"],["id","send-report-email","kendoButton","",3,"primary","look","click"]],template:function(n,o){if(1&n&&(e.j41(0,"div",0),e.nrm(1,"app-kpa-spinner"),e.j41(2,"div",1)(3,"h1"),e.EFF(4,"Reports"),e.k0s(),e.j41(5,"kendo-textbox",2),e.bIt("ngModelChange",function(s){return o.searchValue=s})("valueChange",function(){return o.searchReport()})("input",function(){return o.searchReport()}),e.k0s()(),e.j41(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6),e.nrm(10,"i",7),e.j41(11,"span"),e.EFF(12,"My Reports"),e.k0s()(),e.j41(13,"div",8),e.DNE(14,yo,1,0,"div",9),e.DNE(15,To,3,5,"button",10),e.k0s()()(),e.j41(16,"div",11)(17,"div",12)(18,"div",13)(19,"div",14),e.EFF(20,"Report Name"),e.k0s(),e.j41(21,"div",15),e.EFF(22,"Actions"),e.k0s()()(),e.j41(23,"div",16),e.DNE(24,xo,1,0,"div",9),e.DNE(25,Oo,4,0,"div",17),e.DNE(26,Mo,1,2,"ng-template",null,18,e.C5r),e.DNE(28,Ko,1,1,"ng-template",null,19,e.C5r),e.k0s()()()(),e.j41(30,"app-options-modal",20),e.bIt("showModalChange",function(s){return o.showModal=s})("regConfigChange",function(s){return o.regConfig=s})("titleChange",function(s){return o.title=s})("messageTopChange",function(s){return o.messageTop=s})("messageBottomChange",function(s){return o.messageBottom=s})("downloadReportClassChange",function(s){return o.downloadReportClass=s})("downloadReport",function(s){return o.onDownloadReport(s)}),e.k0s(),e.DNE(31,zo,5,5,"kendo-dialog",21),e.DNE(32,qo,13,8,"kendo-dialog",22)),2&n){const r=e.sdS(27);e.R7$(5),e.Y8G("clearButton",!0)("ngModel",o.searchValue),e.R7$(9),e.Y8G("ngIf",o.loading),e.R7$(1),e.Y8G("ngForOf",o.reportCategories),e.R7$(9),e.Y8G("ngIf",o.loading),e.R7$(1),e.Y8G("ngIf",0==(null==o.filteredReports?null:o.filteredReports.length))("ngIfElse",r),e.R7$(5),e.Y8G("showModal",o.showModal)("regConfig",o.regConfig)("title",o.title)("messageTop",o.messageTop)("messageBottom",o.messageBottom)("downloadReportClass",o.downloadReportClass),e.R7$(1),e.Y8G("ngIf",o.showReportParametersDialog),e.R7$(1),e.Y8G("ngIf",o.sendReportEmailRequest)}},dependencies:[a.Sq,a.bT,T.mq,O.Qp,d.BC,d.vS,g.OV,H.x,se._,N.A,to.x,W,Io],styles:[".reporting-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:500px;margin:0;padding:0;background-color:#fafafa}.reporting-header[_ngcontent-%COMP%]{position:sticky;top:40px;z-index:3;background-color:#fafafa;height:135px;padding:0;display:flex;flex-direction:column;align-items:start}.reporting-header[_ngcontent-%COMP%]   .search-box[_ngcontent-%COMP%]{width:300px}@media (max-width: 1280px){.reporting-header[_ngcontent-%COMP%]{top:0}}.reporting-body[_ngcontent-%COMP%]{position:sticky;top:175px;z-index:2;padding:0;display:flex;gap:10px}@media (max-width: 1280px){.reporting-body[_ngcontent-%COMP%]{top:135px}}.reporting-body-left-container[_ngcontent-%COMP%]{position:sticky;top:175px;align-self:flex-start;z-index:2;flex:0 0 250px}@media (max-width: 1280px){.reporting-body-left-container[_ngcontent-%COMP%]{top:135px}}.reporting-body-left[_ngcontent-%COMP%]{border:2px solid #dcdee3;background-color:#fff;border-radius:10px}.reporting-body-left[_ngcontent-%COMP%]   .reporting-body-left-header[_ngcontent-%COMP%]{border-bottom:2px solid #dcdee3;height:40px;
1display:flex;align-items:center;gap:5px;padding-left:12px;padding-right:12px;color:#42526e;font-size:16px;font-style:normal;font-weight:500}.reporting-body-left[_ngcontent-%COMP%]   .reporting-body-left-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:10px}.reporting-body-left[_ngcontent-%COMP%]   .reporting-body-left-body[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{justify-content:flex-start;border-radius:4px;font-style:normal;font-weight:500;font-size:14px;color:#0f62c5}.reporting-body-left[_ngcontent-%COMP%]   .reporting-body-left-body[_ngcontent-%COMP%]   button.active[_ngcontent-%COMP%]{background:#eef6fd!important;font-weight:600}.reporting-body-right[_ngcontent-%COMP%]{align-self:flex-start;flex:1 1 100%;background-color:#fafafa}.reporting-body-right-header-container[_ngcontent-%COMP%]{position:sticky;top:175px;align-self:flex-start;z-index:2;background-color:#fafafa}@media (max-width: 1280px){.reporting-body-right-header-container[_ngcontent-%COMP%]{top:135px}}.reporting-body-right-header[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{flex:1 1 100%}.reporting-body-right-body[_ngcontent-%COMP%]{background-color:#fff;border-bottom-left-radius:10px;border-bottom-right-radius:10px;border:2px solid #dcdee3;border-top:0px}.report-item-container[_ngcontent-%COMP%]{border-bottom:2px solid #dcdee3;display:flex;align-items:center;gap:5px;padding:5px 12px}.report-item-container[_ngcontent-%COMP%]:last-child{border-bottom:none}.report-item-container.header[_ngcontent-%COMP%]{background-color:#fff;border-top-left-radius:10px;border-top-right-radius:10px;border:2px solid #dcdee3;height:40px;flex-wrap:nowrap;align-items:center;padding-top:0;padding-bottom:0;color:#42526e;font-family:Inter;font-size:14px;font-style:normal;font-weight:600;line-height:20px}.report-item-container[_ngcontent-%COMP%]   .badge[_ngcontent-%COMP%]{flex:0 0;align-self:flex-start;padding-top:12px}.report-item-container[_ngcontent-%COMP%]   .badge[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{background-color:#e9f7ee;color:#13834e;padding:2px 12px;border-radius:12px;font-size:12px;font-weight:600;line-height:16px}.report-item-container[_ngcontent-%COMP%]   .report-item[_ngcontent-%COMP%]{flex:1 1 100%;padding:10px}.report-item-container[_ngcontent-%COMP%]   .report-item[_ngcontent-%COMP%]   .report-item-header[_ngcontent-%COMP%]{display:flex}.report-item-container[_ngcontent-%COMP%]   .report-item[_ngcontent-%COMP%]   .icon-button[_ngcontent-%COMP%]{padding:0;margin-left:10px}.report-item-container[_ngcontent-%COMP%]   .report-item[_ngcontent-%COMP%]   .icon-button[_ngcontent-%COMP%]:active:before{background-color:transparent!important;box-shadow:none!important}.report-item-container[_ngcontent-%COMP%]   .report-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;flex:0 0 250px;width:250px;justify-content:end}.report-item-container[_ngcontent-%COMP%]   .report-actions[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin-left:5px}.report-item-container.header[_ngcontent-%COMP%]   .report-actions[_ngcontent-%COMP%]{justify-content:center}.report-item-container[_ngcontent-%COMP%]   .report-item-name[_ngcontent-%COMP%]{font-style:normal;font-weight:600;font-size:14px;line-height:22px;color:#253858}.report-item-container[_ngcontent-%COMP%]   .report-item-discription[_ngcontent-%COMP%]{font-style:normal;font-size:14px;line-height:20px;color:#253858}.report-item-container[_ngcontent-%COMP%]:not(:hover)   .not-favorited[_ngcontent-%COMP%]{display:none}.report-item-container[_ngcontent-%COMP%]:hover   .hover-icon[_ngcontent-%COMP%], .report-item-container[_ngcontent-%COMP%]:hover   .not-favorited[_ngcontent-%COMP%]:hover   .default-icon[_ngcontent-%COMP%]{display:none}.report-item-container[_ngcontent-%COMP%]:hover   .not-favorited[_ngcontent-%COMP%]:hover   .hover-icon[_ngcontent-%COMP%]{display:inline-block}.is-impersonating[_nghost-%COMP%]   .reporting-header[_ngcontent-%COMP%]{top:80px}@media (max-width: 1280px){.is-impersonating[_nghost-%COMP%]   .reporting-header[_ngcontent-%COMP%]{top:0}}.is-impersonating[_nghost-%COMP%]   .reporting-body[_ngcontent-%COMP%]{top:215px}@media (max-width: 1280px){.is-impersonating[_nghost-%COMP%]   .reporting-body[_ngcontent-%COMP%]{top:135px}}.is-impersonating[_nghost-%COMP%]   .reporting-body-left-container[_ngcontent-%COMP%]{top:215px}@media (max-width: 1280px){.is-impersonating[_nghost-%COMP%]   .reporting-body-left-container[_ngcontent-%COMP%]{top:135px}}.is-impersonating[_nghost-%COMP%]   .reporting-body-right-header-container[_ngcontent-%COMP%]{top:215px}@media (max-width: 1280px){.is-impersonating[_nghost-%COMP%]   .reporting-body-right-header-container[_ngcontent-%COMP%]{top:135px}}#noData[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex-direction:column;align-items:center;padding-top:100px;padding-bottom:100px}#noData[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%]{font-size:80pt;--fa-primary-color: $text-color;--fa-secondary-color: $secondary-text}.loading-bar[_ngcontent-%COMP%]{border:none;position:relative;width:100px;height:2px;background:#2279b5;top:-12px;left:-12px;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-timing-function:ease-in-out;transition:opacity 1s ease;animation-name:_ngcontent-%COMP%_loading-frames;animation-duration:3s;margin-bottom:12px}@keyframes _ngcontent-%COMP%_loading-frames{0%{right:auto;left:-12px;width:100px}50%{right:auto;left:calc(100% - 88px);width:100px}to{left:-12px;width:100px}}.reporting-body-right-body[_ngcontent-%COMP%]   .loading-bar[_ngcontent-%COMP%]{z-index:100;
1top:-2px;left:-2px;animation-name:_ngcontent-%COMP%_loading-frames-reports;margin-bottom:32px}@keyframes _ngcontent-%COMP%_loading-frames-reports{0%{right:auto;left:-2px;width:100px}50%{right:auto;left:calc(100% - 98px);width:100px}to{left:-2px;width:100px}}.flat[_ngcontent-%COMP%]{border:none}.highlight[_ngcontent-%COMP%]{background-color:#ff0}.report-parameters-title[_ngcontent-%COMP%]{margin-left:-2px;white-space-collapse:collapse}"]})}}return i})()},{path:":categoryId/view/:reportId",component:ae.w},{path:"view/:reportId",component:ae.w}];let Qo=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=e.$C({type:i})}static{this.\u0275inj=e.G2t({imports:[P.iI.forChild(Jo),P.iI]})}}return i})();var Zo=l(71976);let ei=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=e.$C({type:i})}static{this.\u0275inj=e.G2t({imports:[a.MD,E.GgS,T.ss,Qo,O.tm,S.Ss,d.YN,v.tZ,v.SC,g.ol,x.YF,y.ZS,F.RH,d.X1,U.G,Zo.$]})}}return i})()},5387:(f,m,l)=>{l.d(m,{o:()=>x});var a=l(37580),g=l(60316),v=l(87801);function d(S,E){if(1&S&&(a.j41(0,"div",5)(1,"h1"),a.nrm(2,"i",6),a.EFF(3),a.k0s()()),2&S){const O=a.XpG();a.R7$(3),a.SpI(" ",O.mainTitle,"")}}const y=["*"];let x=(()=>{class S{constructor(){}ngOnInit(){}static{this.\u0275fac=function(F){return new(F||S)}}static{this.\u0275cmp=a.VBU({type:S,selectors:[["kpa-error-card"]],inputs:{mainTitle:"mainTitle",id:"id"},ngContentSelectors:y,decls:6,vars:2,consts:[["fxLayout","column",1,"card","kpa-error-card",3,"id"],["fxLayout","row","fxLayoutAlign","space-between start","id","mainTitleContainer",4,"ngIf"],["fxLayout","row",1,"card-body-wrap"],[1,"card-body"],["fxLayout","row","fxLayoutAlign","end center",1,"card-foot"],["fxLayout","row","fxLayoutAlign","space-between start","id","mainTitleContainer"],[1,"fa-light","fa-circle-exclamation"]],template:function(F,U){1&F&&(a.NAR(),a.j41(0,"div",0),a.DNE(1,d,4,1,"div",1),a.j41(2,"div",2)(3,"div",3),a.SdG(4),a.k0s()(),a.nrm(5,"div",4),a.k0s()),2&F&&(a.FS9("id",U.id),a.R7$(1),a.Y8G("ngIf",U.mainTitle))},dependencies:[g.bT,v.DJ,v.sA],styles:[".card.kpa-error-card[_ngcontent-%COMP%]{padding:0!important;box-shadow:none!important;border:2px solid #ed5137;border-top:none;border-top-left-radius:3px;border-top-right-radius:3px}#mainTitleContainer[_ngcontent-%COMP%]{background-color:#ed5137;background-size:cover}.card-body[_ngcontent-%COMP%]{padding-left:16px;padding-top:18px}h1[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0!important;padding:11px 14px!important;font-family:Open Sans;font-size:16px;color:#fff;font-weight:700;-webkit-text-decoration:none solid rgb(255,255,255);text-decoration:none solid rgb(255,255,255)}.card-body[_ngcontent-%COMP%]{width:100%}.card-minSize[_ngcontent-%COMP%]{width:500px}\n\n/*# sourceMappingURL=kpa-error-card.component.css.map*/"]})}}return S})()},71749:(f,m,l)=>{l.d(m,{i:()=>O});var a=l(95472),g=l(37580),v=l(60316),d=l(87801),y=l(11971);const x=function(F,U){return{"fa-circle-exclamation":F,"fa-triangle-exclamation":U}};function S(F,U){if(1&F){const T=g.RV6();g.j41(0,"div",5)(1,"h1"),g.nrm(2,"i",6),g.EFF(3),g.k0s(),g.j41(4,"h1",7)(5,"span",8),g.bIt("click",function(){g.eBV(T);const e=g.XpG();return g.Njj(e.hide())}),g.k0s()()()}if(2&F){const T=g.XpG();g.HbH(T.state),g.R7$(2),g.Y8G("ngClass",g.l_i(5,x,1==T.stateClass,0==T.stateClass)),g.R7$(1),g.SpI("",T.mainTitle," ")}}const E=["*"];let O=(()=>{class F{constructor(){this.mainTitle="",this.state=a.Y.Default,this.close=new g.bkB}ngOnInit(){switch(this.state){case a.Y.Default:case a.Y.IconSuccess:this.stateClass=!0;break;case a.Y.IconWarning:this.stateClass=!1;break;case a.Y.IconAlert:this.stateClass=!0}}hide(){this.close.emit(null)}static{this.\u0275fac=function(P){return new(P||F)}}static{this.\u0275cmp=g.VBU({type:F,selectors:[["kpa-status-card"]],inputs:{mainTitle:"mainTitle",state:"state"},outputs:{close:"close"},ngContentSelectors:E,decls:6,vars:4,consts:[["fxLayout","column"],["fxLayout","row","fxLayoutAlign","space-between start","id","mainTitleContainer",3,"class",4,"ngIf"],["fxLayout","row",1,"card-body-wrap"],[1,"card-body"],["fxLayout","row","fxLayoutAlign","end center",1,"card-foot"],["fxLayout","row","fxLayoutAlign","space-between start","id","mainTitleContainer"],[1,"fal",3,"ngClass"],[1,"close"],[1,"fal","fa-times",3,"click"]],template:function(P,e){1&P&&(g.NAR(),g.j41(0,"div",0),g.DNE(1,S,6,8,"div",1),g.j41(2,"div",2)(3,"div",3),g.SdG(4),g.k0s()(),g.nrm(5,"div",4),g.k0s()),2&P&&(g.ZvI("card kpa-status-card ",e.state,""),g.R7$(1),g.Y8G("ngIf",e.mainTitle))},dependencies:[v.YU,v.bT,d.DJ,d.sA,y.PW],styles:[".card.kpa-status-card[_ngcontent-%COMP%]{padding:0!important;box-shadow:none!important;border:2px solid #1c75bc;border-top:none;border-top-left-radius:3px;border-top-right-radius:3px}.card.kpa-status-card.success[_ngcontent-%COMP%]{border:2px solid #6eb91e}.card.kpa-status-card.warning[_ngcontent-%COMP%]{border:2px solid #feaf25}.card.kpa-status-card.alert[_ngcontent-%COMP%]{border:2px solid #ed5137}#mainTitleContainer[_ngcontent-%COMP%]{background-color:#1c75bc;background-size:cover}#mainTitleContainer.success[_ngcontent-%COMP%]{background-color:#6eb91e;background-size:cover}#mainTitleContainer.warning[_ngcontent-%COMP%]{background-color:#feaf25;background-size:cover}#mainTitleContainer.alert[_ngcontent-%COMP%]{background-color:#ed5137}.card-body[_ngcontent-%COMP%]{padding-left:16px;padding-top:18px}h1[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0!important;padding:11px 14px!important;font-family:Open Sans;font-size:16px;color:#fff;font-weight:700;-webkit-text-decoration:none solid rgb(255,255,255);text-decoration:none solid rgb(255,255,255)}.card-body[_ngcontent-%COMP%]{width:100%}
1.card-minSize[_ngcontent-%COMP%]{width:500px}h1.close[_ngcontent-%COMP%]{cursor:pointer}\n\n/*# sourceMappingURL=kpa-status-card.component.css.map*/"]})}}return F})()},48072:(f,m,l)=>{l.d(m,{x:()=>g});var a=l(37580);let g=(()=>{class v{constructor(y,x){this.renderer=y,this.element=x,this.container=this.element.nativeElement}ngOnChanges(){for(;this.container.firstChild;)this.container.removeChild(this.container.firstChild);this.searchValue?this.highlightSearchText():this.renderer.appendChild(this.container,this.renderer.createText(this.text))}highlightSearchText(){const y=new RegExp(`(${this.searchValue})`,"gi");this.text.split(y).forEach(S=>{""!==S&&S.toLowerCase()===this.searchValue.toLowerCase()?this.appendToSpan(S):this.renderer.appendChild(this.container,this.renderer.createText(S))})}appendToSpan(y){const x=this.renderer.createElement("span");this.renderer.addClass(x,"highlight"),this.renderer.appendChild(x,this.renderer.createText(y)),this.renderer.appendChild(this.container,x)}static{this.\u0275fac=function(x){return new(x||v)(a.rXU(a.sFG),a.rXU(a.aKT))}}static{this.\u0275dir=a.FsC({type:v,selectors:[["","searchHighlight",""]],inputs:{text:"text",searchValue:"searchValue"},features:[a.OA$]})}}return v})()},25716:(f,m,l)=>{l.d(m,{I:()=>B});var a=l(37580),g=l(60316);function v(u,I){1&u&&(a.j41(0,"div",2),a.EFF(1," This value is required. "),a.k0s())}function d(u,I){if(1&u&&(a.j41(0,"div",2),a.EFF(1),a.k0s()),2&u){const _=a.XpG(2);a.R7$(1),a.Lme(" The value must be greater than ",_.errors.min.exclusive?"but not":"or"," equal to ",_.errors.min.min,". ")}}function y(u,I){if(1&u&&(a.j41(0,"div",2),a.EFF(1),a.k0s()),2&u){const _=a.XpG(2);a.R7$(1),a.Lme(" The value must be less than ",_.errors.max.exclusive?"but not":"or"," equal to ",_.errors.max.max,". ")}}function x(u,I){if(1&u&&(a.j41(0,"div",2),a.EFF(1),a.k0s()),2&u){const _=a.XpG(2);a.R7$(1),a.SpI(" The value must have at least ",_.errors.minlength.requiredLength," characters. ")}}function S(u,I){if(1&u&&(a.j41(0,"div",2),a.EFF(1),a.k0s()),2&u){const _=a.XpG(2);a.R7$(1),a.SpI(" The value may have ",_.errors.maxlength.requiredLength," characters at most. ")}}function E(u,I){1&u&&(a.j41(0,"div",2),a.EFF(1," The value is an invalid email. "),a.k0s())}function O(u,I){1&u&&(a.j41(0,"div",2),a.EFF(1," The value doesn't match the required pattern. "),a.k0s())}function F(u,I){1&u&&(a.j41(0,"div",2),a.EFF(1," The SSO Username doesn't match the required pattern. "),a.k0s())}function U(u,I){1&u&&(a.j41(0,"div",2),a.EFF(1," Please enter in a number. "),a.k0s())}function T(u,I){1&u&&(a.j41(0,"div",2),a.EFF(1," Please enter a valid ZIP Code. "),a.k0s())}function P(u,I){1&u&&(a.j41(0,"div",2),a.EFF(1," Phone number not valid. "),a.k0s())}function e(u,I){if(1&u&&(a.j41(0,"div",2),a.EFF(1),a.k0s()),2&u){const _=a.XpG(2);a.R7$(1),a.SpI(" ",_.errors.message," ")}}function D(u,I){if(1&u&&(a.j41(0,"div",2),a.EFF(1),a.nI1(2,"date"),a.k0s()),2&u){const _=a.XpG(2);a.R7$(1),a.SpI(" The value must be higher than ",a.i5U(2,1,_.errors.minError.minValue,"MM/dd/yyyy"),", and in the format MM/DD/YYYY. ")}}function c(u,I){if(1&u&&(a.j41(0,"div",2),a.EFF(1),a.nI1(2,"date"),a.k0s()),2&u){const _=a.XpG(2);a.R7$(1),a.SpI(" The value must be lower than ",a.i5U(2,1,_.errors.maxError.maxValue,"MM/dd/yyyy"),", and in the format MM/DD/YYYY. ")}}function h(u,I){if(1&u&&(a.qex(0),a.j41(1,"div",2),a.EFF(2),a.k0s(),a.bVm()),2&u){const _=I.$implicit;a.R7$(2),a.JRh(_)}}function R(u,I){if(1&u&&(a.qex(0),a.DNE(1,h,3,1,"ng-container",3),a.bVm()),2&u){const _=a.XpG(2);a.R7$(1),a.Y8G("ngForOf",_.errors.apiErrors)}}function k(u,I){if(1&u&&(a.j41(0,"div"),a.DNE(1,v,2,0,"div",1),a.DNE(2,d,2,2,"div",1),a.DNE(3,y,2,2,"div",1),a.DNE(4,x,2,1,"div",1),a.DNE(5,S,2,1,"div",1),a.DNE(6,E,2,0,"div",1),a.DNE(7,O,2,0,"div",1),a.DNE(8,F,2,0,"div",1),a.DNE(9,U,2,0,"div",1),a.DNE(10,T,2,0,"div",1),a.DNE(11,P,2,0,"div",1),a.DNE(12,e,2,1,"div",1),a.DNE(13,D,3,4,"div",1),a.DNE(14,c,3,4,"div",1),a.DNE(15,R,2,1,"ng-container",0),a.k0s()),2&u){const _=a.XpG();a.R7$(1),a.Y8G("ngIf",_.errors.required),a.R7$(1),a.Y8G("ngIf",_.errors.min),a.R7$(1),a.Y8G("ngIf",_.errors.max),a.R7$(1),a.Y8G("ngIf",_.errors.minlength),a.R7$(1),a.Y8G("ngIf",_.errors.maxlength),a.R7$(1),a.Y8G("ngIf",_.errors.email),a.R7$(1),a.Y8G("ngIf",_.errors.pattern&&"questionValue"!==_.controlName&&"ssoUsername"!==_.controlName&&"primaryContactPhoneNumber"!==_.controlName&&"zip"!==_.controlName),a.R7$(1),a.Y8G("ngIf",_.errors.pattern&&"questionValue"!==_.controlName&&"ssoUsername"===_.controlName),a.R7$(1),a.Y8G("ngIf",_.errors.pattern&&"questionValue"===_.controlName),a.R7$(1),a.Y8G("ngIf",_.errors.pattern&&"zip"===_.controlName),a.R7$(1),a.Y8G("ngIf",_.errors.pattern&&"primaryContactPhoneNumber"===_.controlName),a.R7$(1),a.Y8G("ngIf",_.errors.uiErrors),a.R7$(1),a.Y8G("ngIf",_.errors.minError),a.R7$(1),a.Y8G("ngIf",_.errors.maxError),a.R7$(1),a.Y8G("ngIf",_.errors.apiErrors)}}let B=(()=>{class u{ngOnInit(){this.controlName=this.getControlName(this.control)}get errors(){return this.control?this.control.errors:null}get dirty(){return this.control&&this.control.dirty}getControlName(_){if(_&&_.parent&&_.parent.controls){const j=_.parent.controls;return Object.keys(j).find(V=>_===j[V])||null}}static{this.\u0275fac=function(j){return new(j||u)}}static{this.\u0275cmp=a.VBU({type:u,selectors:[["validation-errors"]],inputs:{control:"control"}
1,decls:1,vars:1,consts:[[4,"ngIf"],["class","invalid-feedback",4,"ngIf"],[1,"invalid-feedback"],[4,"ngFor","ngForOf"]],template:function(j,V){1&j&&a.DNE(0,k,16,15,"div",0),2&j&&a.Y8G("ngIf",V.dirty&&V.errors)},dependencies:[g.Sq,g.bT,g.vh],styles:[".invalid-feedback[_ngcontent-%COMP%]{width:100%;font-family:Open Sans;font-size:12px;color:#ed5137;font-weight:600;-webkit-text-decoration:none solid rgb(237,81,55);text-decoration:none solid rgb(237,81,55);line-height:12px;margin-left:10px;margin-right:10px}.invalid-feedback[_ngcontent-%COMP%]:nth-child(n+2){margin-top:5px}\n\n/*# sourceMappingURL=validation-errors.component.css.map*/"]})}}return u})()}}]);
2//# sourceMappingURL=src_app_reporting_reporting_module_ts.239ad268fd91589d.js.map

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.