1import{a as Mt,b as kt,c as Dt}from"./chunk-RAJBP3RX.js";import{a as At,b as Nt}from"./chunk-EGNSETUX.js";import"./chunk-LBRE4IHW.js";import"./chunk-GLCVXPF3.js";import"./chunk-X4BVTS74.js";import{$ as pt,A as G,B as Ie,Ba as ft,Ca as vt,F as Ge,Ga as Te,Ja as gt,K as R,Ka as xt,La as bt,M as B,Pa as yt,Qa as St,R as te,Ra as Ct,S as Y,Sa as wt,T,Ta as _t,U as O,V as H,W as at,Wa as L,X as q,Xa as It,Y as $,Z as W,_ as lt,_a as le,aa as ct,bb as D,ca as z,cb as _,da as E,e as nt,fa as ne,gb as P,hb as Pt,j as we,m as rt,ma as Q,na as re,pa as N,qa as dt,r as st,ra as mt,rb as pe,sa as se,tb as Ee,ua as ut,ub as Tt,va as Pe,vb as Et,wa as ht,xa as ae,y as _e}from"./chunk-2BM7GTJT.js";import{Bb as b,Db as y,Eb as De,F as We,Fb as Ye,Gb as ve,Hb as ge,I as ze,Ib as c,Ic as l,Jb as n,Jc as p,Kb as r,Lb as d,Mc as ot,Pa as Ke,Pb as Ue,Qa as Ne,Qb as Ve,R as be,Sb as V,Ua as o,Uc as oe,W as ye,Wb as x,Xb as v,_ as Qe,bb as m,da as k,ea as A,fc as Fe,gc as Je,hc as Xe,ib as S,ic as xe,jb as Ce,jc as et,kc as a,la as Se,lc as g,mc as u,nc as ee,ob as U,pa as Ze,qc as Be,rc as Le,sa as ie,sc as je,tc as C,uc as tt,xc as it,yc as I}from"./chunk-CZQR6XQ3.js";import{f as fe}from"./chunk-EQDQRRRY.js";function ei(i,h){i&1&&d(0,"i",7)}function ti(i,h){i&1&&d(0,"i",8)}function ii(i,h){if(i&1&&(n(0,"div",9),d(1,"app-tile-card",10),r()),i&2){let e=h.$implicit;o(),c("config",e)}}function oi(i,h){if(i&1&&(n(0,"div")(1,"p-carousel",3),U(2,ei,1,0,"ng-template",4)(3,ti,1,0,"ng-template",5)(4,ii,2,1,"ng-template",6),r()()),i&2){let e=v();o(),c("value",e.tiles)("numVisible",4)("numScroll",1)("responsiveOptions",e.responsiveOptions)("circular",!0)("autoplayInterval",0)("showNavigators",!0)("showIndicators",!1)}}var Ft=(()=>{class i{constructor(e){this.appsService=e,this.userInfo={},this.isLoading=!1,this.showTiles=!0,this.SLuserAccessInfo=oe(),this.siteDetails="",this.vrsDeviceCount=0,this.isVrsZeroDevices=!1,this.tiles=[],this.responsiveOptions=[{breakpoint:"1400px",numVisible:4,numScroll:1},{breakpoint:"1024px",numVisible:3,numScroll:1},{breakpoint:"768px",numVisible:2,numScroll:1},{breakpoint:"560px",numVisible:1,numScroll:1}],ie(()=>{let t=this.SLuserAccessInfo();t&&(this.userInfo=t,this.getSiteDetails(),this.buildTiles())})}ngOnInit(){this.distCommunityURL=R.distCommunityURL,this.OemCommunityURL=R.OemCommunityURL,this.madCapURL=R.madCapURL,this.shopUSUrl=R.shopUSUrl,this.shopCAUrl=R.shopCAUrl,this.vrsURL=R.VRSURL,this.servicePortal=R.servicePortal,this.appsService.vrsData$.subscribe(e=>{e&&(this.vrsDeviceCount=e.deviceCount,this.isVrsZeroDevices=e.isZeroDevices,this.buildTiles())})}buildTiles(){let e=[];!(this.userInfo?.industry==="OEM"||this.userInfo?.industry==="Videojet Distributor")&&this.userInfo?.isValidated&&["US","CA"].includes(this.userInfo?.isoCountryCode)&&e.push({iconSrc:"assets/images/Icon - IB.png",title:"apps.ShopSupplies",description:"apps.VideojetShop",isExternal:!0,externalUrl:this.userInfo?.isoCountryCode==="US"?this.shopUSUrl:this.shopCAUrl,linkText:"apps.ShopSupplies"}),!(this.userInfo?.industry==="OEM"||this.userInfo?.industry==="Videojet Distributor")&&this.userInfo?.accountNumber&&this.userInfo?.region!=="LATAM"&&e.push({iconSrc:"assets/icons/products/Service and Training.png",title:"service.SupportService",description:"service.ManageServiceDesc",isExternal:!1,linkUrl:"/field-service",linkText:"shared.AccessNow"}),this.userInfo?.vrs&&this.isVrsZeroDevices&&e.push({icon:"pi pi-cloud",title:"apps.VRSPortal",description:"apps.VRSPortalDesc",isExternal:!0,externalUrl:this.vrsURL,linkText:"shared.AccessNow"}),e.push({iconSrc:"assets/icons/products/Icon-Documents.png",title:"apps.DocumentLibrary",description:"apps.DocumentLibraryDesc",isExternal:!1,linkUrl:"/product-documentation",linkText:"shared.AccessNow"}),e.push({iconSrc:"assets/images/Icon - Lock - Unlocked.png",title:"apps.GeneratePassword",description:"apps.RequestPassword",isExternal:!1,linkUrl:"/apps/generate-password",linkText:"apps.GeneratePwdRequest"}),this.userInfo?.sfDistComm&&e.push({iconSrc:"assets/images/Icon-Globe-Europe_Africa.png",title:"apps.DistributorPortal",description:"apps.DistributorOEM",isExternal:!0,externalUrl:this.distCommunityURL,linkText:"shared.AccessNow"}),this.userInfo?.sfoem&&e.push({iconSrc:"assets/images/Icon-Globe-Europe_Africa.png",title:"apps.OEMCommPortal",description:"apps.OEMPortal",isExternal:!0,externalUrl:this.OemCommunityURL,linkText:"shared.AccessNow"}),this.userInfo?.accountNumber&&this.userInfo?.madcap&&e.push({iconSrc:"assets/images/Icon - Graduation Cap.png",title:"apps.KnowledgeBaseTitle",description:"apps.ActivationDesc",isExternal:!0,externalUrl:this.madCapURL,linkText:"shared.AccessNow"}),(this.userInfo?.industry==="Pharma and Medical"||this.userInfo?.industry==="OEM"&&!this.userInfo?.sfoem)&&e.push({icon:"pi pi-clock",title:"apps.OEMCommPortal",description:"apps.RequestMessageOEM",isExternal:!1,linkText:"apps.RequestReview"}),e.push({iconSrc:"assets/images/Icon-Globe-Europe_Africa.png",title:"DistributorsMarketingContent",description:"DistributorsMarketingContentText",linkText:"shared.AccessNow",linkUrl:"https://dam.videojet.com/videojet/distributor-channel-partners-collection",isExternal:!0}),this.tiles=[...e],console.log("Tiles Count:",this.tiles.length)}getSiteDetails(){this.siteDetails=this.appsService.SLactiveSiteInfo()}getVrsTileClass(){return this.isVrsZeroDevices?"vrs-tile-zero-devices":"vrs-tile-normal"}static{this.\u0275fac=function(t){return new(t||i)(m(le))}}static{this.\u0275cmp=S({type:i,selectors:[["app-user-app-tiles"]],inputs:{SLuserAccessInfo:[1,"SLuserAccessInfo"]},standalone:!1,decls:5,vars:4,consts:[[1,"mx-auto","max-w-(--breakpoint-2xl)","px-3","py-5","text-center"],[1,"text-lg","uppercase","font-semibold","text-gray-900"],[4,"ngIf"],[3,"value","numVisible","numScroll","responsiveOptions","circular","autoplayInterval","showNavigators","showIndicators"],["pTemplate","previousicon"],["pTemplate","nexticon"],["pTemplate","item"],[1,"pi","pi-chevron-left","text-xl","font-bold"],[1,"pi","pi-chevron-right","text-xl","font-bold"],[1,"p-2","h-full","mb-4","py-6","sm:py-4","md:py-8","lg:py-12"],[3,"config"]],template:function(t,s){t&1&&(n(0,"div",0)(1,"h5",1),a(2),l(3,"transloco"),r()(),U(4,oi,5,8,"div",2)),t&2&&(o(2),u(" ",p(3,2,"apps.MyVJApps")," "),o(2),c("ngIf",s.tiles.length>0))},dependencies:[ne,dt,nt,pe,_],styles:["p-card .p-card{display:flex!important;flex-direction:column!important;height:100%!important;padding:0!important}
1 p-card .p-card-body{display:flex!important;flex-direction:column!important;flex:1!important} p-card .p-card-content{display:flex!important;flex-direction:column!important;flex:1!important}[_nghost-%COMP%] .p-button-text.p-button-secondary{background:#4e4ef4;border-color:transparent}"]})}}return i})();var ai=()=>[1,2,3,4],li=()=>["US","CA"],pi=()=>({iconSrc:"assets/images/Icon - Graduation Cap.png",title:"apps.KnowledgeBaseTitle",description:"apps.ActivationDesc",isExternal:!0,externalUrl:"#",isDisabled:!0,linkText:"shared.AccessNow"}),ci=()=>({iconSrc:"assets/icons/products/Service and Training.png",title:"service.SupportService",description:"service.ManageServiceDesc",isExternal:!1,linkUrl:"#",isDisabled:!0,linkText:"shared.AccessNow"}),di=()=>({icon:"pi pi-cloud",title:"apps.VRSPortal",description:"apps.VRSPortalDesc",isExternal:!1,linkUrl:"#",isDisabled:!0,linkText:"shared.AccessNow"}),mi=()=>({iconSrc:"assets/images/Icon - IB.png",title:"apps.ShopSupplies",description:"apps.VideojetShop",isExternal:!1,externalUrl:"#",isDisabled:!0,linkText:"ShopSupplies"});function ui(i,h){i&1&&(n(0,"p-card",1)(1,"div",2)(2,"div",3),d(3,"p-skeleton",4),r(),n(4,"div",5),d(5,"p-skeleton",6)(6,"p-skeleton",7),r(),n(7,"div",5),d(8,"p-skeleton",8)(9,"p-skeleton",9),r(),n(10,"div",10),d(11,"p-skeleton",11),r()()())}function hi(i,h){i&1&&(n(0,"div",0),ve(1,ui,12,0,"p-card",1,Ye),r()),i&2&&(o(),ge(I(0,ai)))}function fi(i,h){i&1&&d(0,"app-tile-card",13),i&2&&c("config",I(1,mi))}function vi(i,h){i&1&&(n(0,"div",0),U(1,fi,1,2,"app-tile-card",12),d(2,"app-tile-card",13)(3,"app-tile-card",13)(4,"app-tile-card",13),r()),i&2&&(o(),c("appCountryAccess",I(4,li)),o(),c("config",I(5,pi)),o(),c("config",I(6,ci)),o(),c("config",I(7,di)))}var Bt=(()=>{class i{constructor(){this.userInfo={},this.isLoading=!0,this.SLuserAccessInfo=oe(),ie(()=>{this.getUserInfo()})}ngOnInit(){this.getUserInfo()}getUserInfo(){this.isLoading=!0,this.userInfo=this.SLuserAccessInfo(),setTimeout(()=>{this.isLoading=!1},100)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=S({type:i,selectors:[["app-inactive-tiles"]],inputs:{SLuserAccessInfo:[1,"SLuserAccessInfo"]},standalone:!1,decls:2,vars:2,consts:[[1,"mx-auto","grid","max-w-(--breakpoint-2xl)","auto-rows-fr","grid-cols-1","gap-4","px-3","py-4","sm:grid-cols-2","sm:gap-5","sm:py-5","md:gap-6","md:py-6","lg:grid-cols-3","xl:grid-cols-4"],["styleClass","border border-gray-200 rounded-lg shadow-md h-full"],[1,"flex","h-full","flex-col","gap-3","py-2","sm:gap-4","sm:py-3"],[1,"flex","items-center","justify-center"],["size","3rem","styleClass","sm:w-10 sm:h-10 md:w-12 md:h-12"],[1,"flex","flex-col","items-center","justify-center","gap-2"],["width","80%","height","1.25rem"],["width","60%","height","0.875rem"],["width","90%","height","0.75rem"],["width","85%","height","0.75rem"],[1,"mt-auto","flex","items-center","justify-center"],["width","6rem","height","1rem"],[3,"config",4,"appCountryAccess"],[3,"config"]],template:function(t,s){t&1&&(b(0,hi,3,1,"div",0),b(1,vi,5,8,"div",0)),t&2&&(y(s.isLoading?0:-1),o(),y(!s.isLoading&&!(s.userInfo!=null&&s.userInfo.isValidated)?1:-1))},dependencies:[Te,It,pe,Ee],encapsulation:2})}}return i})();var Lt=()=>["US","CA"],xi=()=>["/field-service/initiate-service-request"],bi=()=>["/field-service"],yi=()=>["/apps/customer-pricing-catalog"],Si=()=>["/product-documentation"],Ci=()=>["/user/my-profile"];function wi(i,h){if(i&1&&(n(0,"div",14),d(1,"img",25),r()),i&2){let e=v(2).$implicit;o(),c("src",e.image,Ne)("alt",e.title)}}function _i(i,h){if(i&1&&(n(0,"div",15),d(1,"i",26),r()),i&2){let e=v(2).$implicit;o(),et(tt("",e.icon," text-2xl"))}}function Ii(i,h){if(i&1&&d(0,"div",27),i&2){let e=h.$index,t=v(4);Je("background-color",e===t.currentGuideStep?"#2563eb":"#d1d5db"),Xe("w-6",e===t.currentGuideStep)("w-1",e!==t.currentGuideStep)}}function Pi(i,h){if(i&1){let e=V();n(0,"button",28),x("click",function(){k(e);let s=v(4);return A(s.previousGuideStep())}),a(1," \u2190 Back "),r()}}function Ti(i,h){if(i&1){let e=V();n(0,"div",12)(1,"div",13),b(2,wi,2,2,"div",14)(3,_i,2,3,"div",15),r(),n(4,"h3",16),a(5),l(6,"transloco"),r(),n(7,"p",17),a(8),l(9,"transloco"),r(),n(10,"div",18),ve(11,Ii,1,6,"div",19,De),n(13,"span",20),a(14),r()(),n(15,"div",21),b(16,Pi,2,0,"button",22),n(17,"button",23),x("click",function(){k(e);let s=v(3);return A(s.closeWelcomeGuide())}),a(18," Skip Tour "),r(),n(19,"button",24),x("click",function(){k(e);let s=v(3);return A(s.nextGuideStep())}),a(20),r()()()}if(i&2){let e=v().$implicit,t=v(2);o(2),y(e.image?2:e.icon?3:-1),o(3),u(" ",p(6,7,e.title)," "),o(3),u(" ",p(9,9,e.description)," "),o(3),ge(t.getGuideSteps()),o(3),ee("",t.currentGuideStep+1,"/",t.getGuideSteps().length),o(2),y(t.currentGuideStep>0?16:-1),o(4),u(" ",t.currentGuideStep===t.getGuideSteps().length-1?"Start \u2192":"Next \u2192"," ")}}function Ei(i,h){if(i&1&&b(0,Ti,21,11,"div",12),i&2){let e=h.$index,t=v(2);y(e===t.currentGuideStep?0:-1)}}function Mi(i,h){if(i&1&&(n(0,"div",0)(1,"div",11),ve(2,Ei,1,1,null,null,De),r()()),i&2){let e=v();o(2),ge(e.getGuideSteps())}}function ki(i,h){if(i&1&&(n(0,"div",29),d(1,"p",30),n(2,"div",31)(3,"a",32),a(4),l(5,"transloco"),r()()()),i&2){let e=h.$implicit;
1o(),c("innerHTML",e.detail,Ke),o(3),u(" ",p(5,2,"auth.ClickToUpdatePwd")," ")}}function Ai(i,h){i&1&&(n(0,"div",5)(1,"div",33)(2,"div",34),d(3,"p-skeleton",35)(4,"p-skeleton",36),r(),n(5,"div",37),d(6,"p-skeleton",38),r()()())}function Ni(i,h){i&1&&(n(0,"div",41),a(1),l(2,"transloco"),r()),i&2&&(o(),u(" ",p(2,1,"apps.WelcomeDashboardMsg")," "))}function Di(i,h){i&1&&(n(0,"div",41),a(1),l(2,"transloco"),r()),i&2&&(o(),u(" ",p(2,1,"apps.ValidateAccountTextDesc")," "))}function Ui(i,h){i&1&&(n(0,"button",50),l(1,"transloco"),d(2,"i",51),n(3,"span",52),a(4),l(5,"transloco"),r()()),i&2&&(c("routerLink",I(7,xi))("pTooltip",p(1,3,"service.CreateServiceRequest")),o(4),g(p(5,5,"shared.NavNew")))}function Vi(i,h){i&1&&(n(0,"button",53),l(1,"transloco"),d(2,"img",54),n(3,"span",55),a(4),l(5,"transloco"),r()()),i&2&&(c("routerLink",I(7,bi))("pTooltip",p(1,3,"service.SupportService")),o(4),g(p(5,5,"shared.NavService")))}function Fi(i,h){if(i&1&&(n(0,"a",57),l(1,"transloco"),d(2,"img",58),n(3,"span",59),a(4),l(5,"transloco"),r()()),i&2){let e=v(3);c("href",C(e.shopUSUrl),Ne)("pTooltip",p(1,4,"apps.ShopSupplies")),o(4),g(p(5,6,"shared.NavShop"))}}function Bi(i,h){i&1&&(Ue(0),U(1,Fi,6,8,"a",56),Ve()),i&2&&(o(),c("appAccountAccess","hasAccount"))}function Li(i,h){i&1&&(n(0,"button",53),l(1,"transloco"),d(2,"i",60),n(3,"span",61),a(4),l(5,"transloco"),r()()),i&2&&(c("routerLink",I(7,yi))("pTooltip",p(1,3,"NavCatalogTooltip")),o(4),g(p(5,5,"NavCatalog")))}function ji(i,h){i&1&&(Ue(0),U(1,Li,6,8,"button",44),Ve()),i&2&&(o(),c("appAccountAccess","hasAccount"))}function Gi(i,h){i&1&&(n(0,"button",62),l(1,"transloco"),d(2,"img",63),n(3,"span",64),a(4),l(5,"transloco"),r()()),i&2&&(c("routerLink",I(7,Si))("pTooltip",p(1,3,"apps.DocumentLibrary")),o(4),g(p(5,5,"shared.NavDocs")))}function Oi(i,h){if(i&1){let e=V();n(0,"button",65),l(1,"transloco"),x("click",function(){k(e);let s=v(2);return A(s.scrollToSection("apps-section"))}),d(2,"i",66),n(3,"span",67),a(4),l(5,"transloco"),r()()}i&2&&(c("pTooltip",p(1,2,"apps.MyVJApps")),o(4),g(p(5,4,"shared.NavApps")))}function Ri(i,h){i&1&&(n(0,"button",68),l(1,"transloco"),d(2,"i",69),n(3,"span",70),a(4,"Profile"),r()()),i&2&&c("routerLink",I(4,Ci))("pTooltip",p(1,2,"shared.Profile"))}function Hi(i,h){i&1&&(n(0,"p-button",49),a(1),l(2,"transloco"),r()),i&2&&(c("routerLink","/apps/validate-account"),o(),u(" ",p(2,2,"apps.ActivateCustFeed")," "))}function qi(i,h){i&1&&U(0,Hi,3,4,"p-button",71),i&2&&c("appAccountAccess","notValidated")}function $i(i,h){if(i&1&&(n(0,"div",6)(1,"div",39)(2,"div"),a(3),l(4,"transloco"),n(5,"span",40),a(6),r()(),b(7,Ni,3,3,"div",41)(8,Di,3,3,"div",41),r(),n(9,"div",42),U(10,Ui,6,8,"button",43)(11,Vi,6,8,"button",44)(12,Bi,2,1,"ng-container",45)(13,ji,2,1,"ng-container",45)(14,Gi,6,8,"button",46)(15,Oi,6,6,"button",47)(16,Ri,5,5,"button",48),n(17,"div"),b(18,qi,1,1,"p-button",49),r()()()),i&2){let e=v();o(3),u(" ",p(4,12,"shared.Hello"),", "),o(3),ee("",e.userInfo==null?null:e.userInfo.firstName," ",e.userInfo==null?null:e.userInfo.lastName),o(),y(e.userInfo!=null&&e.userInfo.isValidated?7:8),o(3),c("appAccountAccess","hasAccount"),o(),c("appAccountAccess","hasAccount"),o(),c("appCountryAccess",I(14,Lt)),o(),c("appCountryAccess",I(15,Lt)),o(),c("appAccountAccess","validated"),o(),c("appAccountAccess","validated"),o(),c("appAccountAccess","validated"),o(2),y((e.userInfo==null?null:e.userInfo.industry)==="OEM"||(e.userInfo==null?null:e.userInfo.industry)==="Videojet Distributor"?-1:18)}}function Wi(i,h){if(i&1&&(n(0,"div",9)(1,"div",72)(2,"div",73),d(3,"app-service-appointments-mini",8),r(),n(4,"div",73),d(5,"app-service-contracts-mini",8),r()()()),i&2){let e=v();o(3),c("SLuserAccessInfo",e.inputUserAccessData),o(2),c("SLuserAccessInfo",e.inputUserAccessData)}}function zi(i,h){i&1&&d(0,"app-inactive-tiles")}var Gt=(()=>{class i{constructor(e,t,s,f,w,M,X){this.userService=e,this.activeService=t,this.messageService=s,this.router=f,this.datePipe=w,this.translocoService=M,this.appsService=X,this.userInfo={},this.inputUserAccessData=Ze({}),this.isPasswordExpiring=!1,this.daysToExpire=0,this.vrsAccessInput=!1,this.showWelcomeGuide=!1,this.currentGuideStep=0,this.siteDetails="",this.vrsDeviceCount=0,this.isVrsZeroDevices=!1,this.navigationSections=[{label:"Fleet Monitoring",value:"vrs-section",icon:"pi pi-box",showCondition:()=>this.userInfo?.vrs},{label:"Service Requests",value:"service-section",icon:"pi pi-calendar",showCondition:()=>this.userInfo?.accountNumber},{label:"My Apps",value:"apps-section",icon:"pi pi-th-large",showCondition:()=>!0}],this.userInfo&&this.passwordExpiry()}ngOnInit(){this.shopUSUrl=R.shopUSUrl,this.getUserInfo(),this.checkFirstLogin(),this.appsService.vrsData$.subscribe(e=>{e&&(this.vrsDeviceCount=e.deviceCount,this.isVrsZeroDevices=e.isZeroDevices)})}checkFirstLogin(){localStorage.getItem("hasSeenWelcomeGuide")||setTimeout(()=>{this.showWelcomeGuide=!0},1e3)}closeWelcomeGuide(){this.showWelcomeGuide=!1,localStorage.setItem("hasSeenWelcomeGuide","true")}nextGuideStep(){this.currentGuideStep<this.getGuideSteps().length-1?this.currentGuideStep++:this.closeWelcomeGuide()}previousGuideStep(){this.currentGuideStep>0&&this.currentGuideStep--}getGuideSteps(){let e=this.userInfo?.isoCountryCode==="US"||this.userInfo?.isoCountryCode==="CA",t=[{title:this.translocoService.translate("apps.WelcomeVJ"),description:this.translocoService.translate("shared.QuickDashboardText"),image:"assets/images/v-logo-blue-black-rgb.png",color:"blue",url:"/user/dashboard"}];return this.userInfo?.isValidated===!1&&t.push({title:this.translocoService.translate("apps.ValidateAccount"),description:this.translocoService.translate("apps.ValidateAccountTextDesc"),icon:"pi pi-question-circle",color:"red",url:"/apps/validate-account"}),this.userInfo?.accountNumber&&(t.push({title:this.translocoService.translate("shared.NavServiceRequest"),description:this.translocoService.translate("shared.QuickServiceNew"),icon:"pi pi-plus-circle",color:"orange",url:"/field-service/initiate-service-request"}),t.push({title:this.translocoService.translate("shared.QuickServiceHistory"),description:this.translocoService.translate("shared.QuickServiceAccessText"),image:"assets/icons/products/Service and Training.png",color:"green",url:"/field-service/service-appointments"}),t.push({title:this.translocoService.translate("shared.QuickKnowledgeHub"),description:this.translocoService.translate("shared.QuickKnowledgeHubText"),image:"assets/icons/products/Icon-Documents.png",color:"amber",url:"/apps/knowledge-hub"}),t.push({title:this.translocoService.translate("shared.QuickShop"),description:this.translocoService.translate("shared.QuickShopText"),image:"assets/images/Icon - IB.png",color:"rose",url:"https://shop.videojet.com"})),e&&t.push({title:this.translocoService.translate("shared.QuickCatalog"),description:this.translocoService.translate("shared.QuickCatalogText"),icon:"pi pi-dollar",color:"green",url:"/apps/customer-pricing-catalog"}),t.push({title:this.translocoService.translate("shared.QuickMyApps"),description:this.translocoService.translate("shared.QuickMyAppsText"),icon:"pi pi-th-large",color:"purple",url:"/user/dashboard"}),t.push({title:this.translocoService.translate("shared.QuickManageProfile"),description:this.translocoService.translate("shared.QuickManageProfileText"),icon:"pi pi-user",color:"cyan",url:"/user/my-profile"}),t}getUserInfo(){return fe(this,null,function*(){yield this.activeService.userAccessData$.subscribe(e=>{this.userInfo=e,this.inputUserAccessData=this.userInfo,this.isActiveAccount=!!this.userInfo?.accountNumber})})}passwordExpiry(){return fe(this,null,function*(){let e=yield this.userService.getPasswordExpiredDate(
1);if(this.passwordDate=e,e){let t=new Date;this.daysToExpire=Math.floor((e.getTime()-t.getTime())/(1e3*3600*24)),this.daysToExpire<=30&&(this.isPasswordExpiring=!0,this.showPasswordExpiryToast())}})}showPasswordExpiryToast(){let e="info",t=!1;this.daysToExpire<=7&&(e="error",t=!0);let s=this.datePipe.transform(this.passwordDate);this.messageService.add({key:"passwordToast",severity:e,summary:"Password Expiry Warning",detail:`Your password will expire in <b>${this.daysToExpire}</b> days, needs to be changed before <br> <b>${s}</b>.`}),t&&setTimeout(()=>{this.router.navigate(["/user/password-expiry"])},1e4)}scrollToSection(e){let t=document.getElementById(e);t&&t.scrollIntoView({behavior:"smooth",block:"start"})}getAvailableSections(){return this.navigationSections.filter(e=>e.showCondition())}static{this.\u0275fac=function(t){return new(t||i)(m(P),m(B),m(E),m(G),m(we),m(D),m(le))}}static{this.\u0275cmp=S({type:i,selectors:[["app-user-home"]],standalone:!1,decls:13,vars:8,consts:[[1,"fixed","inset-0","z-9999","flex","items-center","justify-center","bg-black/50","p-4"],["key","passwordToast","position","bottom-right",3,"life"],["pTemplate","message"],[1,"mx-auto","max-w-(--breakpoint-2xl)"],[1,"mx-auto","grid","max-w-(--breakpoint-2xl)","grid-rows-1","gap-0","px-3","py-3"],[1,"pt-3","text-base","font-bold","sm:pt-4","sm:text-lg","md:text-xl"],[1,"flex","flex-col","gap-4","pt-3","text-base","sm:gap-5","sm:pt-4","sm:text-lg","md:text-xl","lg:flex-row","lg:items-center","lg:justify-between"],["id","vrs-section",1,"mx-auto","max-w-(--breakpoint-2xl)","scroll-mt-40"],[3,"SLuserAccessInfo"],["id","service-section",1,"mx-auto","max-w-(--breakpoint-2xl)","scroll-mt-40"],["id","apps-section",1,"mx-auto","max-w-(--breakpoint-2xl)","scroll-mt-40"],[1,"w-full","max-w-sm","rounded-xl","bg-white","p-6","shadow-xl"],[1,"text-center"],[1,"mb-4","flex","justify-center"],[1,"flex","w-auto","items-center","justify-center"],[1,"flex","h-14","w-14","items-center","justify-center","rounded-full","shadow-md",2,"background",`linear-gradient( 2 135deg, 3 #3b82f6 0%, 4 #2563eb 100% 5 )`],[1,"mb-2","text-lg","font-semibold",2,"color","#1f2937"],[1,"mb-6","text-sm",2,"color","#4b5563"],[1,"mb-5","flex","items-center","justify-center","gap-1.5"],[1,"h-1","rounded-full","transition-all","duration-300",3,"background-color","w-6","w-1"],[1,"ml-2","text-xs",2,"color","#6b7280"],[1,"flex","justify-center","gap-2"],["type","button",1,"rounded-lg","px-4","py-2","text-sm","font-medium","transition-colors","duration-200",2,"color","#1f2937","background-color","#f3f4f6"],["type","button",1,"rounded-lg","border","px-4","py-2","text-sm","font-medium","transition-colors","duration-200",2,"color","#1f2937","background-color","white","border-color","#d1d5db",3,"click"],["type","button",1,"rounded-lg","px-5","py-2","text-sm","font-semibold","shadow-md","transition-all","duration-200","hover:shadow-lg",2,"color","white","background-color","#2563eb",3,"click"],[1,"h-15","w-15","object-contain",3,"src","alt"],[2,"color","white"],[1,"h-1","rounded-full","transition-all","duration-300"],["type","button",1,"rounded-lg","px-4","py-2","text-sm","font-medium","transition-colors","duration-200",2,"color","#1f2937","background-color","#f3f4f6",3,"click"],[1,"px-3","py-3","text-center","sm:px-4","sm:py-4"],[1,"mb-3","text-sm","sm:mb-4","sm:text-base",3,"innerHTML"],[1,"pt-6","sm:pt-8","md:pt-12"],["href","/user/password-expiry",1,"text-sm","text-blue-200","transition-colors","duration-200","hover:text-blue-300","hover:underline","sm:text-base"],[1,"flex","flex-col","gap-3","sm:flex-row","sm:items-center","sm:justify-between","sm:gap-4"],[1,"text-center","sm:text-left"],["height","1.5rem","
5width","200px","styleClass","mb-2"],["height","1rem","width","400px","styleClass","mb-2"],[1,"flex","w-full","items-center","justify-center","gap-2","sm:w-auto","sm:justify-end","sm:gap-3"],["height","2rem","width","200px","styleClass","mb-2"],[1,"text-center","lg:text-left"],[1,"font-semibold"],[1,"mt-1","text-xs","text-gray-600","sm:text-sm"],[1,"flex","items-center","justify-center","gap-2","sm:gap-3","lg:justify-end"],["tooltipPosition","bottom","class","group flex h-[50px] w-[50px] cursor-pointer flex-col items-center justify-center gap-0.5 rounded-lg border border-gray-200 bg-white p-1.5 shadow-sm transition-all duration-200 hover:border-orange-400 hover:bg-orange-50 hover:shadow-md sm:h-[60px] sm:w-[60px] sm:p-2",3,"routerLink","pTooltip",4,"appAccountAccess"],["tooltipPosition","bottom","class","group flex h-[50px] w-[50px] cursor-pointer flex-col items-center justify-center gap-0.5 rounded-lg border border-gray-200 bg-white p-1.5 shadow-sm transition-all duration-200 hover:border-green-400 hover:bg-green-50 hover:shadow-md sm:h-[60px] sm:w-[60px] sm:p-2",3,"routerLink","pTooltip",4,"appAccountAccess"],[4,"appCountryAccess"],["tooltipPosition","bottom","class","group flex h-[50px] w-[50px] cursor-pointer flex-col items-center justify-center gap-0.5 rounded-lg border border-gray-200 bg-white p-1.5 shadow-sm transition-all duration-200 hover:border-amber-400 hover:bg-amber-50 hover:shadow-md sm:h-[60px] sm:w-[60px] sm:p-2",3,"routerLink","pTooltip",4,"appAccountAccess"],["tooltipPosition","bottom","class","group flex h-[50px] w-[50px] cursor-pointer flex-col items-center justify-center gap-0.5 rounded-lg border border-gray-200 bg-white p-1.5 shadow-sm transition-all duration-200 hover:border-purple-400 hover:bg-purple-50 hover:shadow-md sm:h-[60px] sm:w-[60px] sm:p-2",3,"pTooltip","click",4,"appAccountAccess"],["tooltipPosition","bottom","class","group flex h-[50px] w-[50px] cursor-pointer flex-col items-center justify-center gap-0.5 rounded-lg border border-gray-200 bg-white p-1.5 shadow-sm transition-all duration-200 hover:border-cyan-400 hover:bg-cyan-50 hover:shadow-md sm:h-[60px] sm:w-[60px] sm:p-2",3,"routerLink","pTooltip",4,"appAccountAccess"],["type","button",1,"btn","btn-primary","btn-md",3,"routerLink"],["tooltipPosition","bottom",1,"group","flex","h-[50px]","w-[50px]","cursor-pointer","flex-col","items-center","justify-center","gap-0.5","rounded-lg","border","border-gray-200","bg-white","p-1.5","shadow-sm","transition-all","duration-200","hover:border-orange-400","hover:bg-orange-50","hover:shadow-md","sm:h-[60px]","sm:w-[60px]","sm:p-2",3,"routerLink","pTooltip"],[1,"pi","pi-plus-circle","text-sm","text-orange-600","sm:text-base"],[1,"text-[8px]","font-medium","text-gray-700","group-hover:text-orange-700","sm:text-[9px]"],["tooltipPosition","bottom",1,"group","flex","h-[50px]","w-[50px]","cursor-pointer","flex-col","items-center","justify-center","gap-0.5","rounded-lg","border","border-gray-200","bg-white","p-1.5","shadow-sm","transition-all","duration-200","hover:border-green-400","hover:bg-green-50","hover:shadow-md","sm:h-[60px]","sm:w-[60px]","sm:p-2",3,"routerLink","pTooltip"],["src","assets/icons/products/Service and Training.png","alt","Service",1,"h-4","w-4","sm:h-5","sm:w-5"],[1,"text-[8px]","font-medium","text-gray-700","group-hover:text-green-700","sm:text-[9px]"],["target","_blank","rel","noopener noreferrer","tooltipPosition","bottom","class","group text-decoration-none flex h-[50px] w-[50px] cursor-pointer flex-col items-center justify-center gap-0.5 rounded-lg border border-gray-200 bg-white p-1.5 shadow-sm transition-all duration-200 hover:border-rose-400 hover:bg-rose-50 hover:shadow-md sm:h-[60px] sm:w-[60px] sm:p-2",3,"href","pTooltip",4,"appAccountAccess"],["target","_blank","rel","noopener noreferrer","tooltipPosition","bottom",1,"group","text-decoration-none","flex","h-[50px]","w-[50px]","cursor-pointer","flex-col","items-center","justify-center","gap-0.5","rounded-lg","border","border-gray-200","bg-white","p-1.5","shadow-sm","transition-all","duration-200","hover:border-rose-400","hover:bg-rose-50","hover:shadow-md","sm:h-[60px]","sm:w-[60px]","sm:p-2",3,"href","pTooltip"],["src","assets/images/Icon - IB.png","alt","Shop",1,"h-4","w-4","sm:h-5","sm:w-5"],[1,"text-[8px]","font-medium","text-gray-700","group-hover:text-rose-700","sm:text-[9px]"],[1,"pi","pi-dollar","text-sm","text-green-600","sm:text-base"],[1,"group-hover:text-success-200","text-[8px]","font-medium","text-gray-700","sm:text-[9px]"],["tooltipPosition","bottom",1,"group","flex","h-[50px]","w-[50px]","cursor-pointer","flex-col","items-center","justify-center","gap-0.5","rounded-lg","border","border-gray-200","bg-white","p-1.5","shadow-sm","transition-all","duration-200","hover:border-amber-400","hover:bg-amber-50","hover:shadow-md","sm:h-[60px]","sm:w-[60px]","sm:p-2",3,"routerLink","pTooltip"],["src","assets/icons/products/Icon-Documents.png","alt","Documents",1,"h-4","w-4","sm:h-5","sm:w-5"],[1,"text-[8px]","font-medium","text-gray-700","group-hover:text-amber-700","sm:text-[9px]"],["tooltipPosition","bottom",1,"group","flex","h-[50px]","w-[50px]","cursor-pointer","flex-col","items-center","justify-center","gap-0.5","rounded-lg","border","border-gray-200","bg-white","p-1.5","shadow-sm","transition-all","duration-200","hover:border-purple-400","hover:bg-purple-50","hover:shadow-md","sm:h-[60px]","sm:w-[60px]","sm:p-2",3,"click","pTooltip"],[1,"pi","pi-th-large","text-sm","text-purple-600","sm:text-base"],[1,"text-[8px]","font-medium","text-gray-700","group-hover:text-purple-700","sm:text-[9px]"],["tooltipPosition","bottom",1,"group","flex","h-[50px]","w-[50px]","cursor-pointer","flex-col","items-center","justify-center","gap-0.5","rounded-lg","border","border-gray-200","bg-white","p-1.5","shadow-sm","transition-all","duration-200","hover:border-cyan-400","hover:bg-cyan-50","hover:shadow-md","sm:h-[60px]","sm:w-[60px]","sm:p-2",3,"routerLink","pTooltip"],[1,"pi","pi-user","text-sm","text-cyan-600","sm:text-base"],[1,"text-[8px]","font-medium","text-gray-700","group-hover:text-cyan-700","sm:text-[9px]"],["type","button","class","btn btn-primary btn-md",3,"routerLink",4,"appAccountAccess"],[1,"mx-auto","grid","min-h-full","max-w-(--breakpoint-2xl)","grid-cols-1","grid-rows-1","gap-0","p-3","sm:gap-5","md:gap-6","lg:grid-cols-2","lg:gap-8","2xl:p-3","2xl:py-4"],[1,"min-h-full","w-full"]],template:function(t,s){t&1&&(b(0,Mi,4,0,"div",0),n(1,"p-toast",1),U(2,ki,6,4,"ng-template",2),r(),n(3,"div",3)(4,"div",4),b(5,Ai,7,0,"div",5),b(6,$i,19,16,"div",6),r(),n(7,"div",7),d(8,"app-customer-vrs-feed",8),r(),b(9,Wi,6,2,"div",9),n(10,"div",10),b(11,zi,1,0,"app-inactive-tiles"),d(12,"app-user-app-tiles",8),r()()),t&2&&(y(s.showWelcomeGuide?0:-1),o(),c("life",1e6),o(4),y(s.userInfo?-1:5),o(),y(s.userInfo?6:-1),o(2),c("SLuserAccessInfo",s.inputUserAccessData),o(),y(s.userInfo!=null&&s.userInfo.accountNumber?9:-1),o(2),y(s.userInfo!=null&&s.userInfo.isValidated?-1:11),o(),c("SLuserAccessInfo",s.inputUserAccessData))},dependencies:[ne,N,Te,L,re,Ie,Ee,Tt,Mt,kt,At,Ft,Bt,_],encapsulation:2})}}return i})();function Qi(i,h){i&1&&(n(0,"div",11)(1,"label",21),a(2),l(3,"transloco"),r(),d(4,"input",22),l(5,"transloco"),r()),i&2&&(o(2),g(p(3,3,"PhoneExtension")),o(2),c("placeholder",C(p(5,5,"PhoneExtension"))))}function Zi(i,h){if(i&1){let e=V();n(0,"p-button",25),x("click",function(){k(e);let s=v(3);return A(s.sendOTP())}),a(1),l(2,"transloco"),r()}if(i&2){let e=v(3);c("disabled",!e.addPhoneForm.valid),o(),u(" ",p(2,2,"Authorize")," ")}}function Ki(i,h){if(i&1){let e=V();n(0,"p-button",25),x("click",function(){k(e);let s=v(3);return A(s.landlineMethod())}),a(1),l(2,"transloco"),r()}if(i&2){let e=v(3);c("disabled",!e.addPhoneForm.valid),o(),u(" ",p(2,2,"CallMe")," ")}}function Yi(i,h){if(i&1&&(n(0,"div",18)(1,"div",23),b(2,Zi,3,4,"p-button",24),b(3,Ki,3,4,"p-button",24),r()()),i&2){let e=v(2);o(2),y(e.showSubmitButton?2:-1),o(),y(e.showCallMe?3:-1)}}function Ji(i,h){if(i&1){let e=V();n(0,"div",20)(1,"div",3)(2,"form",26),x("ngSubmit",function(){k(e);let s=v(2);return A(s.submitOTPVerification())}),n(3,"div",27)(4,"label",28),a(5),l(6,"transloco"),r(),d(7,"input",29),l(8,"transloco"),n(9,"div",30),a(10),l(11,"transloco"),r(),n(12,"p",31),a(13),l(14,"transloco"),n(15,"strong"),a(16),r()()(),n(17,"div",32)(18,"p-button",33),a(19),l(20,"transloco"),r()(),n(21,"div",34)(22,"h3",35),a(23),l(24,"transloco"),r(),n(25,"p",36),a(26),l(27,"transloco"),r(),n(28,"p-button",37),x("click",function(){k(e);let s=v(2);return A(s.sendOTP())}),a(29),l(30,"transloco"),r()()()()()}if(i&2){let e,t=v(2);o(2),c("formGroup",t.otpForm),o(3),g(p(6,14,"PhoneCode")),o(2),c("placeholder",C(p(8,16,"PhoneCode"))),o(3),u(" ",p(11,18,"OTPText")," "),o(3),u(" ",p(14,20,"VerificationCodeExpire")," "),o(3),ee("",t.minutes,":",t.seconds<10?"0"+t.seconds:t.seconds),o(2),c("disabled",((e=t.otpForm.get("phoneCode"))==null?null:e.invalid)||((e=t.otpForm.get("phoneCode"))==null?null:e.value.length)!==6),o(),u(" ",p(20,22,"VerificationCodeValidate")," "),o(4),g(p(24,24,"VerificationCodeNotReceived")),o(3),g(p(27,26,"VerificationDidntReceiveCode")),o(2),c("disabled",!t.addPhoneForm.valid),o(),u(" ",p(30,28,"VerificationResendCode")," ")}}function Xi(i,h){if(i&1){let e=V();n(0,"div",0)(1,"div",2)(2,"div",1)(3,"div",3),d(4,"p-toast",4),r()(),n(5,"div",5)(6,"h5",6),a(7),l(8,"transloco"),r()(),n(9,"div",7)(10,"div",8)(11,"form",9)(12,"div",10)(13,"div",11)(14,"label",12),a(15),l(16,"transloco"),r(),n(17,"p-select",13),l(18,"transloco"),x("onChange",function(){k(e);let s=v();return A(s.togglePhoneExtension())}),r()(),n(19,"div",11)(20,"label",14),a(21),l(22,"transloco"),r(),n(23,"p-select",15),l(24,"transloco"),x("onChange",function(s){k(e);let f=v();return A(f.onCountryChange(s))}),r()()(),n(25,"div",10)(26,"div",11)(27,"label",16),a(28),l(29,"transloco"),r(),n(30,"input",17),l(31,"transloco"),x("ngModelChange",function(){k(e);let s=v();return A(s.checkPhoneNumberValidity())}),r()(),b(32,Qi,6,7,"div",11),r(),b(33,Yi,4,2,"div",18),r()()(),d(34,"p-toast",19),b(35,Ji,31,30,"div",20),r()()}if(i&2){let e=v();o(7),g(p(8,18,"user.EditPhoneDetails")),o(4),c("formGroup",e.addPhoneForm),o(4),g(p(16,20,"user.MyProfilePhoneType")),o(2),c("placeholder",C(p(18,22,"user.MyProfilePhoneType")))("options",e.phoneTypeList),o(4),g(p(22,24,"user.CountryCode")),o(2),c("placeholder",C(p(24,26,"user.CountryCode")))("filter",!0)("options",e.countryData),o(5),g(p(29,28,"PhoneNumber")),o(2),c("placeholder",C(p(31,30,"MobileNumber"))),o(2),y(e.showPhoneExtension?32:-1),o(),y(e.showOTPBlock?-1:33),o(),c("life",5e3),o(),y(e.showOTPBlock?35:-1)}}function eo(i,h){i&1&&(n(0,"div",1),d(1,"app-phone-security"),r())}var he=(()=>{class i{constructor(e,t,s,f,w,M,X,Ae,Jt){this.fb=e,this.authService=t,this.route=s,this.router=f,this.translocoService=w,this.messageService=M,this.userService=X,this.config=Ae,this.activeUserService=Jt,this.isLoading=!1,this.countryData=[],this.phoneData=[],this.selectedCountry=null,this.co
5de="",this.email="",this.showPhoneExtension=!1,this.showCallMe=!1,this.showSubmitButton=!0,this.mobileNumber=null,this.remainingTime=600,this.minutes=0,this.seconds=0,this.showOTPBlock=!1,this.phoneTypeList=[],this.userData=[],this.showPhoneForm=!1,this.userInfo={},this.formSubmitted=new Se,this.addPhoneForm=this.fb.group({phoneType:["",T.required],country:["",T.required],mobileNumber:["",T.required],phoneExtension:[""]}),this.otpForm=this.fb.group({phoneCode:["",[T.required,T.minLength(6),T.maxLength(6)]]}),this.route.paramMap.subscribe($e=>{this.userGuid=$e.get("uId")||"",this.code=$e.get("aCode")||""}),this.phoneTypeList=[{value:"",label:this.translocoService.translate("user.Select")},{value:"Cell Phone",label:this.translocoService.translate("user.CellPhone")},{value:"Landline",label:this.translocoService.translate("user.Landline")}]}ngOnInit(){this.languageChange(),this.getCountries(),this.mobileNumber=this.authService.getUserPhoneNumber(),this.startTimer(),this.loadUserData()}languageChange(){this.translocoService.langChanges$.subscribe(()=>{this.phoneTypeList=[{value:"",label:this.translocoService.translate("user.Select")},{value:"Cell Phone",label:this.translocoService.translate("user.CellPhone")},{value:"Landline",label:this.translocoService.translate("user.Landline")}]})}loadUserData(){this.isLoading=!0,this.userService.getMyProfileData().subscribe(e=>{this.userData=e,this.userGuid=e.user.userGUID,this.addPhoneForm.patchValue({phoneType:e.user.phoneType,country:e.user.countryId,mobileNumber:e.user.mobileNumber})},e=>{},()=>{this.isLoading=!1})}getCountries(){this.isLoading=!0,this.authService.getCountries(this.selectedCountry).pipe(be(()=>{})).subscribe({next:e=>{e&&(this.countryData=e,e.map(t=>(t.countryLabel=`${t.callingCode} (${t.countryName})`,t))),this.isLoading=!1},error:e=>{this.isLoading=!1}})}onCountryChange(e){let t=this.countryData.find(s=>s.id===e.value);t&&(this.selectedCountryCallingCode=t.id)}togglePhoneExtension(){let e=this.addPhoneForm.get("phoneType");e?.value==="Landline"?(this.showPhoneExtension=!0,this.addPhoneForm.get("phoneExtension")):(this.showPhoneExtension=!1,this.addPhoneForm.get("phoneExtension")?.clearValidators()),this.addPhoneForm.get("phoneExtension")?.updateValueAndValidity(),this.showSubmitButton=e?.value!=="Landline",this.showCallMe=!this.showSubmitButton}landlineMethod(){{let e=this.addPhoneForm.getRawValue(),t={phoneType:e.phoneType,PhoneExt:e.phoneExtension,MobileNumber:e.mobileNumber,mobileCountryId:this.selectedCountryCallingCode};this.addPhoneForm.valid?(this.isValidPhone(),this.getPhone(this.userGuid),this.authService.CallMeForLoggedInUser(t).subscribe({next:s=>{s?.success?(this.messageService.add({severity:"success",summary:"",key:"t1",detail:this.translocoService.translate("user.AddPhoneSuccessMsg"),life:5e3}),this.getCallingResponse(this.userGuid),setTimeout(()=>{this.showPhoneForm=!0},3e3),this.delayClosePopup(),this.activeUserService.getActiveUserInfo(),this.formSubmitted.emit()):s?.error&&(this.messageService.add({severity:"error",summary:"Error",key:"t1",detail:this.translocoService.translate("user.CallFailedError"),life:5e3}),this.showPhoneForm=!1)},error:s=>{this.messageService.add({severity:"error",summary:"Error",key:"t1",detail:this.translocoService.translate("user.CallFailedError"),life:5e3})}})):(this.messageService.add({severity:"error",summary:"Error",key:"t1",detail:this.translocoService.translate("user.InvalidMobileInfo"),life:5e3}),this.showPhoneForm=!1,this.config.data.onPhoneUpdate(!1))}}getUserInfo(){this.activeUserService.userAccessData$.subscribe(e=>{this.userInfo=e})}markPhoneVerified(){let e={userGuid:this.userGuid};this.authService.MarkPhoneAsVerified(e).subscribe({next:t=>{},error:t=>{}})}getCallingResponse(e){this.authService.getCallingResponseLoggedInUser().subscribe({next:t=>{this.messageService.add({severity:"success",summary:"",key:"t1",detail:this.translocoService.translate("user.PhoneVeifiedMsg"),life:5e3})},error:t=>{this.messageService.add({severity:"error",summary:"Error",key:"t1",detail:this.translocoService.translate("user.UnableToCompleteValidation"),life:5e3})}})}getPhone(e){this.authService.getPhoneType(this.userGuid).subscribe({next:t=>{},error:t=>{}})}sendOTP(){let e={mobileCountryId:this.addPhoneForm.get("country")?.value,mobileNumber:this.addPhoneForm.get("mobileNumber")?.value,phoneType:this.addPhoneForm.get("phoneType")?.value,phoneExt:this.addPhoneForm.get("phoneExtension")?.value};this.addPhoneForm.valid?(this.isValidPhone(),this.updateuserMFAStatus(),this.getPhone(this.userGuid),this.authService.SendMobileOTPForLoggedInUser(e).subscribe({next:t=>{this.showOTPBlock=t?.success,t?.success?(this.messageService.add({severity:"success",summary:"",key:"t1",detail
5:this.translocoService.translate("user.SMSOTPSentMsg"),life:5e3}),this.formSubmitted.emit()):t?.error&&(this.messageService.add({severity:"error",summary:"Error",key:"t1",detail:this.translocoService.translate("user.SendActivationCodeFailed"),life:5e3}),this.showPhoneForm=!1)},error:t=>{this.messageService.add({severity:"error",summary:"Error",key:"t1",detail:this.translocoService.translate("user.InvalidMobileInfo"),life:5e3}),this.config.data.onPhoneUpdate(!1),this.showPhoneForm=!1}})):this.messageService.add({severity:"error",summary:"Error",key:"t1",detail:this.translocoService.translate("user.InvalidMobileInfo"),life:5e3})}validatePhoneNUmber(e){this.authService.isvalidPhone(e).subscribe({next:t=>{},error:t=>{}})}updateuserMFAStatus(){let e=this.addPhoneForm.value,t=e.phoneType,s=e.country,f=!0,w={phoneType:e.phoneType,contactNumberCountryId:s,contactNumber:e.mobileNumber,phoneExtension:e.phoneExtension},M={userGuid:this.userGuid,MFAAccepted:f,createUser:w};this.authService.updatedMFAStatus(M).subscribe({next:X=>{},error:X=>{}})}submitOTPVerification(){if(this.otpForm.valid){let t={code:this.otpForm.get("phoneCode")?.value};this.authService.verifyCodeUpdatingPhoneLoggedInUser(t).subscribe({next:s=>{this.isLoading=!0,s?.success===!0?(this.messageService.add({key:"otpMsg",severity:"success",summary:"",detail:this.translocoService.translate("user.OTPVerified")}),this.showOTPBlock=!1,setTimeout(()=>{this.showPhoneForm=!0},2e3),this.delayClosePopup(),this.activeUserService.getActiveUserInfo()):s?.success===!1&&(this.messageService.add({key:"otpMsg",severity:"error",summary:"Error",detail:this.translocoService.translate("user.InvalidSMSOTP")}),setTimeout(()=>{this.otpForm.reset()},3e3))},error:s=>{this.messageService.add({key:"otpMsg",severity:"error",summary:"Error",detail:this.translocoService.translate("user.InvalidSMSOTP")})}})}}startTimer(){let e=setInterval(()=>{this.remainingTime--,this.remainingTime<=0?clearInterval(e):(this.minutes=Math.floor(this.remainingTime/60),this.seconds=this.remainingTime%60)},1e3)}checkPhoneNumberValidity(){let e=this.addPhoneForm.get("mobileNumber")?.value;e&&e.length===10&&this.isValidPhone()}isValidPhone(){let e=this.addPhoneForm.get("mobileNumber")?.value;this.authService.isvalidPhone(e).subscribe({next:t=>{let s=t.isValid},error:t=>{}})}delayClosePopup(){setTimeout(()=>{this.config.data.onPhoneUpdate(!0)},3e3)}skipNow(){this.config.data.onPhoneUpdate(!0)}static{this.\u0275fac=function(t){return new(t||i)(m(z),m(te),m(_e),m(G),m(D),m(E),m(P),m(Pe),m(B))}}static{this.\u0275cmp=S({type:i,selectors:[["app-add-new-phone"]],outputs:{formSubmitted:"formSubmitted"},standalone:!1,decls:2,vars:2,consts:[[1,"@container","mx-auto"],[1,"flex","justify-center"],[1,"mx-auto","max-w-(--breakpoint-2xl)","px-5","py-2"],[1,"w-full","lg:w-1/2"],["key","t1"],[1,"grid","grid-rows-1","justify-center"],[1,"text-2xl","font-semibold"],[1,"flex","justify-center","mt-6"],[1,"w-full","lg:w-10/12"],[1,"space-y-6",3,"formGroup"],[1,"grid","grid-cols-1","md:grid-cols-2","gap-6"],[1,"flex","flex-col","gap-2"],["for","phoneType",1,"font-medium","text-sm"],["formControlName","phoneType","optionLabel","label","optionValue","value","autoWidth","fal
5se",1,"w-full","fw-bold",3,"onChange","options","placeholder"],["for","countryCode",1,"font-medium","text-sm"],["formControlName","country","filterBy","countryLabel","optionLabel","countryLabel","optionValue","id","autoWidth","false",1,"w-full","fw-bold",3,"onChange","filter","options","placeholder"],["for","mobileNumber",1,"font-medium","text-sm"],["pInputText","","formControlName","mobileNumber","id","mobileNumber",1,"w-full","fw-bold",3,"ngModelChange","placeholder"],[1,"flex","justify-center","py-4"],["key","otpMsg","position","top-right",3,"life"],[1,"flex","justify-center","mt-10"],["for","phoneExtension",1,"font-medium","text-sm"],["pInputText","","formControlName","phoneExtension","id","phoneExtension",1,"w-full","fw-bold",3,"placeholder"],[1,"flex","flex-col","gap-4","w-full"],["type","submit",1,"text-center","w-full",3,"disabled"],["type","submit",1,"text-center","w-full",3,"click","disabled"],[1,"space-y-6",3,"ngSubmit","formGroup"],[1,"flex","flex-col","items-center","gap-4"],["for","phoneCode",1,"text-sm","font-medium"],["pInputText","","formControlName","phoneCode","id","phoneCode","minlength","6","maxlength","6","required","",1,"w-40","text-center","fw-bold",3,"placeholder"],[1,"text-red-500","text-sm"],[1,"text-sm","text-gray-500"],[1,"flex","justify-center","pt-4"],["type","submit",1,"btn","btn-primary",3,"disabled"],[1,"text-center","pt-10"],[1,"font-semibold"],[1,"text-sm","text-gray-600"],["type","submit",1,"btn","btn-primary","mt-3",3,"click","disabled"]],template:function(t,s){t&1&&(b(0,Xi,36,32,"div",0),b(1,eo,2,0,"div",1)),t&2&&(y(s.showPhoneForm?-1:0),o(),y(s.showPhoneForm?1:-1))},styles:["[_nghost-%COMP%] .p-dropdown{background:#fff;border:1px solid #d1d5db!important;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s!important;border-radius:6px!important;box-shadow:none;font-weight:600;font-size:1rem}[_nghost-%COMP%] .p-dropdown .p-dropdown-label .p-enabled{background:transparent;border:0 none;color:#8695ba}[_nghost-%COMP%] .p-dropdown .p-dropdown-label{color:#222}"]})}}return i})();var ke=(()=>{class i{constructor(e,t,s,f,w,M){this.userService=e,this.authService=t,this.translocoService=s,this.messageService=f,this.fb=w,this.router=M,this.isLowerCaseUpperCaseValid=!1,this.isNumbersSymbolsValid=!1,this.isEightCharacterValid=!1,this.isNotContainPartsOfNameValid=!1,this.isSameAsConfirmPasswordValid=!1,this.isUserInteracted=!1,this.userGuid="",this.isLoading=!1,this.disablePasswordForm=!1,this.userData={},this.email="",this.firstName="",this.lastName="",this.userInfo={},this.showPasswordUpdate=!1,this.showPasswordUpdateForm=!0,this.setPasswordForm=this.fb.group({oldPassword:["",T.required],password:[{value:"",disabled:!0},T.required],confirm_password:[{value:"",disabled:!0},T.required]}),this.disablePasswordForm=!0}ngOnInit(){this.userService.getMyProfileData().subscribe(e=>{this.userData=e,this.userGuid=this.userData.user.userGUID||"",this.getUserInitials(this.userGuid)}),this.setPasswordForm.get("oldPassword")?.valueChanges.pipe(We(500),ze()).subscribe(e=>{e.length>=15?this.isValidPassword():(this.setPasswordForm.get("password")?.disable(),this.setPasswordForm.get("confirm_password")?.disable())})}isValidPassword(){let e={password:this.setPasswordForm.get("oldPassword")?.value};this.userService.isValidPassword(e).subscribe(t=>{t===!0?(this.setPasswordForm.get("password")?.enable(),this.setPasswordForm.get("confirm_password")?.enable(),setTimeout(()=>{let s=document.getElementById("password"),f=document.getElementById("confirm_password");s.addEventListener("input",()=>{this.validatePassword(s.value),this.updateConfirmPasswordValidation(f.value),this.isUserInteracted=!0}),f.addEventListener("input",()=>{this.updateConfirmPasswordValidation(f.value),this.isUserInteracted=!0})}),this.messageService.add({severity:"success",summary:"",key:"t1",detail:this.translocoService.translate("auth.PasswordValidationSuccessMsg"),life:5e3}),this.enableSubmit()):t===!1&&(this.setPasswordForm.get("password")?.disable(),this.setPasswordForm.get("confirm_password")?.disable(),this.disablePasswordForm=!0,this.messageService.add({severity:"error",summary:"Error",key:"t1",detail
5:this.translocoService.translate("auth.PasswordValidationErrorMsg"),life:5e3}))},t=>{this.disablePasswordForm=!0})}ngAfterViewInit(){setTimeout(()=>{this.setupPasswordListeners()},100)}setupPasswordListeners(){let e=document.getElementById("password"),t=document.getElementById("confirm_password");e&&e.addEventListener("input",()=>{this.validatePassword(e.value),this.updateConfirmPasswordValidation(t?.value||""),this.isUserInteracted=!0}),t&&t.addEventListener("input",()=>{this.updateConfirmPasswordValidation(t.value),this.isUserInteracted=!0})}validatePassword(e){if(this.isLowerCaseUpperCaseValid=!1,this.isNumbersSymbolsValid=!1,this.isEightCharacterValid=!1,this.isNotContainPartsOfNameValid=!1,!e){this.updateListItem("lowerCaseUpperCase",!1),this.updateListItem("numbersSymbols",!1),this.updateListItem("eightCharacter",!1),this.updateListItem("notContainPartsOfName",!1),this.enableSubmit();return}this.isLowerCaseUpperCaseValid=/[a-z]/.test(e)&&/[A-Z]/.test(e),this.isNumbersSymbolsValid=/\d/.test(e)||/[!@#$%^&*(),.?":{}|<>]/.test(e),this.isEightCharacterValid=e.length>=15;let t=this.firstName&&e.toLowerCase().includes(this.firstName.toLowerCase()),s=this.lastName&&e.toLowerCase().includes(this.lastName.toLowerCase());this.isNotContainPartsOfNameValid=!(t||s),this.updateListItem("lowerCaseUpperCase",this.isLowerCaseUpperCaseValid),this.updateListItem("numbersSymbols",this.isNumbersSymbolsValid),this.updateListItem("eightCharacter",this.isEightCharacterValid),this.updateListItem("notContainPartsOfName",this.isNotContainPartsOfNameValid),this.enableSubmit()}enableSubmit(){let e=this.setPasswordForm.get("oldPassword")?.value,t=this.setPasswordForm.get("password")?.value,s=this.setPasswordForm.get("confirm_password")?.value;e&&t&&s&&this.isLowerCaseUpperCaseValid&&this.isNumbersSymbolsValid&&this.isEightCharacterValid&&this.isNotContainPartsOfNameValid&&this.isSameAsConfirmPasswordValid?this.disablePasswordForm=!1:this.disablePasswordForm=!0}updateListItem(e,t){let s=document.getElementById(e);s&&(t?(s.innerHTML='<span class="check">✔</span>'+(s.textContent?s.textContent.substring(1):""),s.classList.remove("cross"),s.classList.add("check")):(s.innerHTML='<span class="cross">✖</span>'+(s.textContent?s.textContent.substring(1):""),s.classList.remove("check"),s.classList.add("cross"))),this.enableSubmit()}getUserInitials(e){this.authService.getUserInitials(this.userGuid).subscribe({next:t=>{this.userGuid=t.user.userGUID||"",this.firstName=t.user.firstName||"",this.lastName=t.user.lastName||"";let s=document.getElementById("password");this.validatePassword(s?.value)},error:t=>{}})}updateConfirmPasswordValidation(e){let t=document.getElementById("password"),s=document.getElementById("confirm_password");t&&s&&(t.value===""&&e===""?this.isSameAsConfirmPasswordValid=!1:this.isSameAsConfirmPasswordValid=t.value===s.value,this.updateListItem("confirmPasswordMatch",this.isSameAsConfirmPasswordValid),this.enableSubmit())}onSubmit(){if(this.setPasswordForm.valid){this.isLoading=!0;let t={password:this.setPasswordForm.get("password")?.value};this.userService.setLoggedInUserPassword(t).subscribe({next:()=>{this.isLoading=!1,this.messageService.add({severity:"success",summary:"",key:"t1",detail:this.translocoService.translate("auth.UpdatePasswordSuccessMsg"),life:5e3}),this.clearCookies(),setTimeout(()=>{this.authService.login()},2e3)},error:s=>{this.messageService.add({severity:"error",summary:"",key:"t1",detail:this.translocoService.translate("auth.UpdatePasswordErrorMsg"),life:5e3})}})}}clearCookies(){document.cookie.split(";").forEach(e=>{document.cookie=e.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date(0).toUTCString()};path=/`)})}onCancel(){this.showPasswordUpdate=!0,this.showPasswordUpdateForm=!1}static{this.\u0275fac=function(t){return new(t||i)(m(P),m(te),m(D),m(E),m(z),m(G))}}static{this.\u0275cmp=S({type:i,selectors:[["app-change-password"]],inputs:{email:"email",firstName:"firstName",lastName:"lastName"},standalone:!1,decls:64,vars:44,consts:[[1,"flex","justify-center","md:grid-cols-12","pb-6"],["key","t1"],[1,"@container","mx-auto"],[1,"flex","justify-center","py-2"],[1,"regForm","w-full","max-w-3xl",3,"formGroup"],[1,"grid","grid-cols-1","md:grid-cols-12","gap-4","py-4"],[1,"md:col-span-12","col-span-12"],[1,"flex","flex-col","gap-1"],["for","oldPassword",1,"font-semibold","text-sm"],["pInputText","","type","password","formControlName","oldPassword","id","oldPassword",1,"font-semibold","border","border-gray-300","rounded","px-3","py-2","focus:outline-none","focus:ring-2","focus:ring-primary",3,"placeholder"],["for","password",1,"font-semibold","text-sm"],["pInputText","","type","password","formControlName","password","id","password",1,"font-semibold","border","border-gray-300","rounded","px-3","py-2","focus:outline-none","focus:ring-2","focus:ring-primary",3,"placeholder"],["for","confirm_password",1,"font-semibold","text-sm"],["pInputText","","type","password","formControlName","confirm_password","id","confirm_password",1,"font-semibold","border","border-gray-300","rounded","px-3","py-2","focus:outline-none","focus:ring-2","focus:ring-primary",3,"placeholder"],[1,"flex","py-2"],[1,"w-full","md:w-8/12","lg:w-6/12"],["id","errors-list",1,"list-disc","list-inside","text-sm","space-y-1","text-left","text-red-600"],["id","lowerCaseUpperCase",1,"whitespace-normal","md:whitespace-nowrap"],[1,"inline-block","mr-2","text-red-500"],["id","numbersSymbols"],["id","eightCharacter"],["id","notContainPartsOfName"],["id","confirmPasswordMatch"],[1,"flex","justify-center","gap-4","py-6"],["type","reset",1,"btn-reset",3,"click"],["type","submit",3,"click","disabled"]],template:function(t,s){t&1&&(n(0,"div",0),d(1,"p-toast",1),r(),n(2,"div",2)(3,"div",3)(4,"form",4)(5,"div",5)(6,"div",6)(7,"div",7)(8,"label",8),a(9),l(10,"transloco"),r(),d(11,"input",9),l(12,"transloco"),r()()(),n(13,"div",5)(14,"div",6)(15,"div",7)(16,"label",10),a(17),l(18,"transloco"),r(),d(19,"input",11),l(20,"transloco"),r()()(),n(21,"div",5)(22,"div",6)(23,"div",7)(24,"label",12),a(25),l(26,"transloco"),r(),d(27,"input",13),l(28,"transloco"),r()()(),n(29,"div",14)(30,"div",15)(31,"ul",16)(32,"li",17)(33,"span",18),a(34,"\u2716"),r(),a(35),l(36,"transloco"),r(),n(37,"li",19)(38,"span",18),a(39,"\u2716"),r(),a(40),l(41,"transloco"),r(),n(42,"li",20)(43,"span",18),a(44,"\u2716"),r(),a(45),l(46,"transloco"),r(),n(47,"li",21)(48,"span",18),a(49,"\u2716"),r(),a(50),l(51,"transloco"),r(),n(52,"li",22)(53,"span",18),a(54,"\u2716"),r(),a(55),l(56,"transloco"),r()()()(),n(57,"div",23)(58,"p-button",24),x("click",function(){return s.onCancel()}),a(59),l(60,"transloco"),r(),n(61,"p-button",25),x("click",function(){return s.onSubmit()}),a(62),l(63,"transloco"),r()()()()()),t&2&&(o(4),c("formGroup",s.setPasswordForm),o(5),u(" ",p(10,18,"auth.CurrentPassword")," "),o(2),c("placeholder",C(p(12,20,"auth.CurrentPassword"))),o(6),u(" ",p(18,22,"auth.NewPassword")," "),o(2),c("placeholder",C(p(20,24,"auth.NewPassword"))),o(6),u(" ",p(26,26,"auth.ConfirmNewPassword")," "),o(2),c("placeholder",C(p(28,28,"auth.ConfirmNewPassword"))),o(8),u(" ",p(36,30,"auth.ResetPasswordErrorListRule1")," "),o(5),u(" ",p(41,32,"auth.ResetPasswordErrorListRule2")," "),o(5),u(" ",p(46,34,"auth.ResetPasswordErrorListRule3")," "),o(5),u(" ",p(51,36,"auth.ResetPasswordErrorListRule4")," "),o(5),u(" ",p(56,38,"auth.ResetPasswordErrorListRule5")," "),o(4),u(" ",p(60,40,"shared.Cancel")," "),o(2),c("disabled",s.disablePasswordForm||s.setPasswordForm.invali
5d),o(),u(" ",p(63,42,"shared.Update")," "))},dependencies:[q,Y,O,H,W,$,N,Q,L,_],styles:[".errors-list[_ngcontent-%COMP%]{list-style-type:none;color:red}.cross[_ngcontent-%COMP%]{color:red}.check[_ngcontent-%COMP%]{color:green}"]})}}return i})();var Rt=(()=>{class i{constructor(e){this.route=e,this.accountCheck=!1}activateAccountValidation(){this.route.navigateByUrl("/apps/validate-account")}static{this.\u0275fac=function(t){return new(t||i)(m(G))}}static{this.\u0275cmp=S({type:i,selectors:[["app-activate-account"]],inputs:{accountCheck:"accountCheck"},standalone:!1,decls:9,vars:6,consts:[[1,"container-md","container-lg","container-fluid"],[1,"row","text-center"],[1,"col","text-center","py-5"],[1,"pb-3"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(t,s){t&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"p",3),a(4),l(5,"transloco"),r(),n(6,"p-button",4),x("click",function(){return s.activateAccountValidation()}),a(7),l(8,"transloco"),r()()()()),t&2&&(o(4),g(p(5,2,"apps..ValidateAccountText")),o(3),g(p(8,4,"ValidateAccount")))},dependencies:[N,_],encapsulation:2})}}return i})();var oo=()=>[5,10,20],no=()=>["locatioN_ID","locatioN_NAME","displaY_ADDRESS"];function ro(i,h){i&1&&(n(0,"div",17)(1,"span")(2,"small",18)(3,"b"),a(4),l(5,"transloco"),n(6,"a",19),a(7,"(800) 843-3610"),r(),a(8,". "),r()()()()),i&2&&(o(4),u(" ",p(5,1,"apps.ActivateAccMsg")," "))}function so(i,h){if(i&1){let e=V();n(0,"div",20)(1,"div",21),a(2),l(3,"transloco"),r(),n(4,"div",22)(5,"span")(6,"p-inputgroup")(7,"p-inputgroup-addon"),d(8,"i",23),r(),n(9,"input",24),l(10,"transloco"),x("input",function(s){k(e),v();let f=Fe(32);return A(f.filterGlobal(s.target.value,"contains"))}),r()()()()()}i&2&&(o(2),u(" ",p(3,3,"apps.SetSite")," "),o(7),c("placeholder",C(p(10,5,"apps.SearchKeyword"))))}function ao(i,h){i&1&&(n(0,"tr")(1,"th",25),a(2),l(3,"transloco"),d(4,"p-sortIcon",26),r(),n(5,"th",27),a(6),l(7,"transloco"),d(8,"p-sortIcon",28),r(),n(9,"th",29),a(10),l(11,"transloco"),r()()),i&2&&(o(2),u(" ",p(3,3,"apps.SiteId")," "),o(4),u(" ",p(7,5,"apps.Address")," "),o(4),g(p(11,7,"apps.SetDefault")))}function lo(i,h){if(i&1){let e=V();n(0,"p-button",40),x("click",function(){k(e);let s=v().$implicit,f=v(2);return A(f.setDefaultSite(s.locatioN_ID))}),a(1),l(2,"transloco"),r()}i&2&&(o(),u(" ",p(2,1,"apps.SetDefault")," "))}function po(i,h){i&1&&(n(0,"span",39),a(1),l(2,"transloco"),r()),i&2&&(o(),u(" ",p(2,1,"DefaultSite")," "))}function co(i,h){if(i&1&&(n(0,"tr")(1,"td",30)(2,"span",31),a(3),l(4,"transloco"),r(),a(5),r(),n(6,"td",32)(7,"span",31),a(8),l(9,"transloco"),r(),n(10,"div",33)(11,"small",34),a(12),r(),d(13,"br"),a(14),r(),n(15,"div",35)(16,"div",36),a(17),r(),n(18,"div",37),a(19),r()()(),n(20,"td",30)(21,"span",31),a(22),l(23,"transloco"),r(),b(24,lo,3,3,"p-button",38)(25,po,3,3,"span",39),r()()),i&2){let e=h.$implicit,t=v(2);o(3),u("",p(4,9,"apps.SiteId"),":"),o(2),u(" ",e.locatioN_ID," "),o(3),u("",p(9,11,"apps.Address"),":"),o(4),g(e.locatioN_NAME),o(2),u(" ",e.displaY_ADDRESS," "),o(3),u(" ",e.locatioN_NAME," "),o(2),u(" ",e.displaY_ADDRESS," "),o(3),u(" ",p(23,13,"apps.SetDefault"),": "),o(2),y(e.locatioN_ID!==t.defaultSiteId?24:25)}}function mo(i,h){if(i&1&&(n(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6)(4,"div",7)(5,"div"),a(6),l(7,"transloco"),d(8,"br"),n(9,"b",8),a(10),r()()(),n(11,"div",7)(12,"div"),a(13),l(14,"transloco"),d(15,"i",9),U(16,ro,9,3,"ng-template",null,0,ot),d(18,"br"),n(19,"b",8),a(20),r()()(),n(21,"div",7)(22,"div"),a(23),l(24,"transloco"),d(25,"br"),n(26,"b",8),a(27),r()()()()()(),n(28,"div",10)(29,"div",11)(30,"div",12)(31,"p-table",13,1),U(33,so,11,7,"ng-template",14),d(34,"p-divider"),U(35,ao,12,9,"ng-template",15)(36,co,26,15,"ng-template",16),r()()()()()),i&2){let e=Fe(17),t=v();o(6),u(" ",p(7,15,"user.CompanyName")," "),o(4),g(t.userInfo==null?null:t.userInfo.accountName),o(3),u(" ",p(14,17,"apps.CustAccountLabel")," "),o(2),c("pTooltip",e),o(5),g(t.userInfo==null?null:t.userInfo.accountNumber),o(3),u(" ",p(24,19,"apps.SiteAndZipLabel")," "),o(4),ee("",t.defaultSiteId?t.defaultSiteId:"N/A"," - ",t.userInfo==null?null:t.userInfo.zipCode),o(4),c("value",t.sitesData)("rows",t.pageSize)("loading",t.isLoading)("showCurrentPageReport",!0)("paginator",!0)("rowsPerPageOptions",I(21,oo))("globalFilterFields",I(22,no))}}function uo(i,h){i&1&&d(0,"app-activate-account")}function ho(i,h){if(i&1&&b(0,uo,1,0,"app-activate-account"),i&2){let e=v();y(e.userInfo!=null&&e.userInfo.isValidated?-1:0)}}var Ht=(()=>{class i{constructor(e,t,s,f,w,M){this.translocoService=e,this.appsService=t,this.router=s,this.messageService=f,this.userService=w,this.activeUserService=M,this.isLoading=!1,this.userInfo=[],this.sitesData=[],this.pageSize=5,this.defaultSiteId="",this.siteNumber="",this.accountCheckInput=!1}ngOnInit(){this.getUserInfo()}getUserInfo(){this.activeUserService.userAccessData$.subscribe(e=>{this.userInfo=e,this.defaultSiteId=this.userInfo?.defaultSiteId,this.userInfo?.accountNumber&&(this.accountCheckInput=!0,this.get
5SitesData())})}getSitesData(){this.isLoading=!0,this.appsService.getUserActiveSites().subscribe({next:e=>{this.sitesData=e,this.siteNumber=e.siteNumber},error:e=>{},complete:()=>{this.isLoading=!1}})}validateAccount(){this.router.navigate(["/validate-account"])}setDefaultSite(e){let t={SiteNumber:e};this.userService.saveDefaultSite(t).subscribe(s=>{this.messageService.add({severity:"success",summary:"",detail:this.translocoService.translate("apps.SetDefaultSiteSuccessMsg"),key:"t1",life:5e3}),this.activeUserService.getActiveUserInfo()},s=>{this.messageService.add({severity:"error",summary:"",detail:this.translocoService.translate("apps.SetDefaultSiteErrorMsg"),key:"t1",life:5e3})})}static{this.\u0275fac=function(t){return new(t||i)(m(D),m(le),m(G),m(E),m(P),m(B))}}static{this.\u0275cmp=S({type:i,selectors:[["app-manage-account-sites"]],standalone:!1,decls:3,vars:1,consts:[["tooltipContent",""],["dt2",""],["key","t1"],[1,"@container","mx-auto","py-6"],[1,"custom-tabview","mx-auto","grid","max-w-(--breakpoint-2xl)","grid-cols-1","gap-0","py-5","md:grid-rows-1"],[1,"w-full","text-center"],[1,"grid","grid-cols-1","gap-6","md:grid-cols-3"],[1,"pb-5"],[1,"text-lg","font-semibold"],["tooltipPosition","bottom",1,"pi","pi-question-circle","ml-1","text-blue-200",3,"pTooltip"],[1,"w-full","px-4","md:px-6","lg:px-8"],[1,"w-full","pt-2"],[1,"overflow-x-auto"],["dataKey","siteId","styleClass","pb-5 border-b border-blue-100/30 rounded-sm bg-white shadow-sm min-h-full","currentPageReportTemplate","Showing {first} to {last} of {totalRecords} entries","responsiveLayout","stack","stripedRows","",3,"value","rows","loading","showCurrentPageReport","paginator","rowsPerPageOptions","globalFilterFields"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],[1,"flex","items-center"],[1,"text-white"],["href","tel:(800) 843-3610",1,"text-white"],[1,"flex","items-baseline","justify-between","gap-2","border-b-0","border-gray-200","bg-gray-50","p-2","px-5"],[1,"flex-1","px-3","text-left","text-lg","font-semibold","text-black","uppercase"],[1,"flex","items-center","gap-4"],[1,"pi","pi-search"],["pInputText","","showClear","true","fluid","true",3,"input","placeholder"],["pSortableColumn","locatioN_ID",1,"text-center"],["field","locatioN_ID"],["pSortableColumn","displaY_ADDRESS",1,"text-center","md:text-left"],["field","displaY_ADDRESS"],[1,"text-center"],[1,"text-center","md:text-center"],[1,"block","font-medium","text-gray-500","md:hidden"],[1,"text-center","md:text-left"],[1,"hidden","md:block"],[1,"font-medium","text-blue-200"],[1,"group","relative","block","md:hidden"],[1,"w-full","truncate","overflow-hidden","whitespace-nowrap","text-blue-600"],[1,"absolute","top-full","left-0","z-10","mt-1","hidden","w-72","max-w-xs","rounded","border","border-gray-300","bg-white","p-2","wrap-break-word","text-black","shadow-md","group-hover:block"],["type","button",1,"btn","btn-primary"],[1,"font-semibold","text-green-600"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(t,s){t&1&&(d(0,"p-toast",2),b(1,mo,37,23,"div",3)(2,ho,1,1)),t&2&&(o(),y(s.userInfo!=null&&s.userInfo.accountNumber?1:2))},dependencies:[ne,N,ut,Q,vt,ft,gt,xt,bt,L,re,Rt,_],encapsulation:2})}}return i})();var vo=()=>({minWidth:"50px",width:"100%"}),He=()=>({width:"100%"});function go(i,h){if(i&1&&(n(0,"div",14)(1,"label",25),a(2),l(3,"transloco"),n(4,"span",10),a(5,"*"),r()(),d(6,"p-select",26),l(7,"transloco"),r()),i&2){let e=v();o(2),u(" ",p(3,6,"user.Industry")," "),o(4),xe(I(10,He)),c("placeholder",C(p(7,8,"user.SelectIndustry")))("options",e.IndustryList)}}function xo(i,h){if(i&1&&(n(0,"div",8)(1,"label",27),a(2),l(3,"transloco"),n(4,"span",10),a(5,"*"),r()(),d(6,"p-select",28),l(7,"transloco"),r()),i&2){let e=v();o(2),u(" ",p(3,7,"user.State")," "),o(4),xe(I(11,He)),c("placeholder",C(p(7,9,"user.SelectState")))("filter",!0)("options",e.statesData)}}var $t=(()=>{class i{constructor(e,t,s,f,w,M,X,Ae){this.messageService=e,this.translocoService=t,this.fb=s,this.authService=f,this.userService=w,this.commonService=M,this.activeUserService=X,this.http=Ae,this.hideEditButton=!0,this.userData={},this.isLoading=!1,this.isEditing=!1,this.countryData=[],this.statesData=[],this.languageData=[],this.fullMobileNumber="",this.selectedCountry=null,this.showStateField=!1,this.ADUserGuid="",this.SalutationList=[],this.IndustryList=[],this.formEdited=!1,this.showSubmitButton=!1,this.hideIndustry=!0,this.SLuserAccessInfo=oe(),this.userInfo={},this.languageOptions=[],this.languageCatalog=[],this.profileEditForm=this.fb.group({firstName:[{value:""},T.required],lastName:[{value:""},T.required],industry:[{value:"",disabled:!0}],languageId:[{value:""}],company:[{value:"",disabled:!0},T.required],country:[{value:""},T.required],state:[{value:""}]}),this.IndustryList=[{value:"",label:this.translocoService.translate("shared.Select")},{value:"End User",label:this.translocoService.translate("user.EndUser")},{value:"Pharma and Medical",label:this.translocoService.translate("user.PharmaAndMedical")},{value:"OEM",label:this.translocoService.translate("user.OEM")},{value:"Videojet Distributor",label:this.translocoService.translate("user.VideojetDistributor")},{value:"Other",label:this.translocoService.translate("user.Other")}],this.getUserInfo()}ngOnInit(){this.industryDropdownTranslations(),this.getCountries(),this.setProfileFormData(),this.getUserLanguages(),this.profileEditForm.valueChanges.subscribe(()=>{this.isEditing||(this.formEdited=!0)})}getUserInfo(){return fe(this,null,function*(){yield this.activeUserService.userAccessData$.subscribe(e=>{this.userInfo=e,this.userInfo?.isValidated===!0&&(this.profileEditForm.controls.country.disable(),this.profileEditForm.controls.state.disable())})})}getCountries(){this.isLoading=!0,this.authService.getCountries(this.selectedCountry).pipe(be(()=>{})).subscribe({next:e=>{this.countryData=e},error:e=>{this.isLoading=!1}})}getStates(e){this.authService.getStates(e).subscribe({next:t=>{this.statesData=t},error:t=>{}})}getDBLanguage(e){return this.commonService.GetCountriesLangId(e).subscribe(t=>{this.dbLangugaeInfo=t,console.log(this.dbLangugaeInfo)})}onLanguageChange(){this.getDBLanguage(this.profileEditForm.get("languageId")?.value)}onCountryChange(){let e=this.profileEditForm.get("country")?.value;e==240?(this.showStateField=!0,this.profileEditForm.get("state")?.setValidators(T.required),this.get
5States(e)):(this.statesData=[],this.profileEditForm.get("state")?.clearValidators(),this.profileEditForm.get("state")?.reset(),this.showStateField=!1),this.getUserLanguages(),this.profileEditForm.get("state")?.updateValueAndValidity()}industryDropdownTranslations(){this.translocoService.langChanges$.subscribe(()=>{this.IndustryList=[{value:"",label:this.translocoService.translate("shared.Select")},{value:"End User",label:this.translocoService.translate("user.EndUser")},{value:"Pharma and Medical",label:this.translocoService.translate("user.PharmaAndMedical")},{value:"OEM",label:this.translocoService.translate("user.OEM")},{value:"Videojet Distributor",label:this.translocoService.translate("user.VideojetDistributor")},{value:"Other",label:this.translocoService.translate("user.Other")}]})}getUserLanguages(){this.userService.getUserCountryLanguages(this.profileEditForm.get("country")?.value).subscribe({next:e=>{this.languageOptions=e},error:()=>{}})}formStatusUpdate(){this.profileEditForm.valid?(this.formEdited=!1,this.showSubmitButton=!1):(this.profileEditForm.markAllAsTouched(),this.showSubmitButton=!1)}setProfileFormData(){this.isLoading=!0,this.userService.getMyProfileData().subscribe({next:e=>{this.userData=e,this.fullMobileNumber=e.user.fullMobileNumber,this.ADUserGuid=e.user.adUserGUID,this.userLanguageId=e.user.languageId,this.fieldCheck(),this.profileEditForm.patchValue({firstName:e.user.firstName,lastName:e.user.lastName,industry:e.user.industry,company:e.user.companyName,country:e.user.countryId,state:e.user.stateId,languageId:e.user.languageCode}),this.selectedCountry=e.user.countryId,this.getUserLanguages(),this.onCountryChange()},error:e=>{console.error("Error loading profile data",e)},complete(){}})}editForm(){this.hideEditButton=!1,this.profileEditForm.enable(),this.userInfo.isValidated===!0&&(this.profileEditForm.controls.country.disable(),this.profileEditForm.controls.state.disable()),this.isEditing=!0,this.fieldCheck()}fieldCheck(){let e=this.userData.user.reason;e==="shop-us"||e==="shop-ca"?this.hideIndustry=!1:e==="salesforce"?(this.profileEditForm.controls.industry.disable(),this.profileEditForm.controls.company.disable()):this.profileEditForm.get("industry")?.setValidators(T.required)}submitForm(){console.log("Submitting form..."),console.log(this.profileEditForm.valid),console.log(this.profileEditForm.value);try{if(this.profileEditForm.valid){let e=this.userData,t=this.profileEditForm.getRawValue();this.getDBLanguage(t.languageId);let s=this.countryData.find(M=>M.id===t.country),f=this.statesData.find(M=>M.id===t.state);console.log(this.userData),console.log(t),console.log(s);let w={Id:e.user.id,FirstName:t.firstName,LastName:t.lastName,UserGuid:e.user.userGUID,CountryId:t.country,CountryName:s?s.countryName:"",StateName:f?f.stateName:"",StateId:t.state,CompanyName:t.company,PersonId:e.user.personId,Industry:t.industry,MobileCountryId:e.user.mobileCountryId,MobileCountryNumber:e.user.mobileCountryNumber,MobileNumber:e.user.mobileNumber,PhoneType:e.user.phoneType,RegistrationSource:e.user.registrationSource,CountryCode:e.user.mobileCountryCode,LanguageId:this.dbLangugaeInfo.id};console.log(w),this.userService.saveUserProfile(w).subscribe({next:M=>{this.isLoading=!1,this.profileEditForm.updateValueAndValidity(),this.messageService.add({severity:"success",summary:"",key:"t1",detail:this.translocoService.translate("user.MyProfileDetailsUpdateSuccesMsg"),life:5e3}),this.setProfileFormData(),this.activeUserService.getActiveUserInfo()},error:M=>{this.isLoading=!1,this.messageService.add({severity:"error",summary:"",key:"t1",detail:this.translocoService.translate("user.MyProfileDetailsUpdateErrorMsg"),life:5e3})}})}else this.profileEditForm.markAllAsTouched()}catch(e){}}static{this.\u0275fac=function(t){return new(t||i)(m(E),m(D),m(z),m(te),m(P),m(Pt),m(B),m(st))}}static{this.\u0275cmp=S({type:i,selectors:[["app-myprofile-editform"]],inputs:{SLuserAccessInfo:[1,"SLuserAccessInfo"]},standalone:!1,decls:57,vars:51,consts:[[1,"@container","mx-auto"],[1,"w-full","md:w-1/2","mx-auto"],["key","t1"],[1,"mx-auto","max-w-(--breakpoint-2xl)","px-3","sm:px-4","md:px-6","lg:px-8","py-4","sm:py-5","md:py-6"],[1,"grid","grid-cols-12"],[1,"col-span-12","lg:col-span-10","lg:col-start-2","xl:col-span-8","xl:col-start-3"],[1,"profileEditForm",3,"formGroup"],[1,"grid","grid-cols-1","md:grid-cols-12","gap-3","sm:gap-4","pb-3","sm:pb-4"],[1,"col-span-12","md:col-span-6"],["for","firstName",1,"font-semibold","text-xs","
5sm:text-sm","md:text-base"],[1,"text-red-500"],["pInputText","","formControlName","firstName","type","text","id","firstName",1,"fw-bold","capitalize","w-full","text-xs","sm:text-sm","md:text-base",3,"placeholder"],["for","lastName",1,"font-semibold","text-xs","sm:text-sm","md:text-base"],["pInputText","","formControlName","lastName","type","text","id","lastName",1,"fw-bold","capitalize","w-full","text-xs","sm:text-sm","md:text-base",3,"placeholder"],[1,"col-span-12","md:col-span-4"],["for","company",1,"font-semibold","text-xs","sm:text-sm","md:text-base"],["pInputText","","formControlName","company","type","text","id","company",1,"fw-bold","capitalize","w-full","text-xs","sm:text-sm","md:text-base",3,"placeholder"],["for","languageId",1,"font-semibold","text-xs","sm:text-sm","md:text-base","inline-flex","items-center"],[1,"text-red-500","ml-1"],["formControlName","languageId","optionLabel","LanguageName","optionValue","LanguageCode","styleClass","text-xs sm:text-sm md:text-base",3,"onChange","options","placeholder"],["for","country",1,"font-semibold","text-xs","sm:text-sm","md:text-base"],["formControlName","country","filterBy","countryName","optionLabel","countryName","optionValue","id","styleClass","fw-bold text-xs sm:text-sm md:text-base",3,"onChange","filter","options","placeholder"],[1,"flex","flex-col","sm:flex-row","justify-center","gap-3","sm:gap-4","py-4","sm:py-5","md:py-6","pt-3","sm:pt-4"],[1,"text-center","sm:text-start","w-full","sm:w-auto"],["type","button","styleClass","w-full sm:w-auto",1,"btn","btn-primary",3,"click","disabled"],["for","industry",1,"font-semibold","text-xs","sm:text-sm","md:text-base"],["formControlName","industry","optionLabel","label","optionValue","value","styleClass","fw-bold text-xs sm:text-sm md:text-base",3,"options","placeholder"],["for","state",1,"font-semibold","text-xs","sm:text-sm","md:text-base"],["formControlName","state","filterBy","stateName","optionLabel","stateName","optionValue","id","styleClass","fw-bold text-xs sm:text-sm md:text-base",3,"filter","options","placeholder"]],template:function(t,s){t&1&&(n(0,"div",0)(1,"div",1),d(2,"p-toast",2),r(),n(3,"div",3)(4,"div",4)(5,"div",5)(6,"form",6)(7,"div",7)(8,"div",8)(9,"label",9),a(10),l(11,"transloco"),n(12,"span",10),a(13,"*"),r()(),d(14,"input",11),l(15,"transloco"),r(),n(16,"div",8)(17,"label",12),a(18),l(19,"transloco"),n(20,"span",10),a(21,"*"),r()(),d(22,"input",13),l(23,"transloco"),r()(),n(24,"div",7),b(25,go,8,11,"div",14),n(26,"div",14)(27,"label",15),a(28),l(29,"transloco"),n(30,"span",10),a(31,"*"),r()(),d(32,"input",16),l(33,"transloco"),r(),n(34,"div",14)(35,"label",17),a(36),l(37,"transloco"),n(38,"span",18),a(39,"*"),r()(),n(40,"p-select",19),l(41,"transloco"),x("onChange",function(){return s.onLanguageChange()}),r()()(),n(42,"div",7)(43,"div",8)(44,"label",20),a(45),l(46,"transloco"),n(47,"span",10),a(48,"*"),r()(),n(49,"p-select",21),l(50,"transloco"),x("onChange",function(){return s.onCountryChange()}),r()(),b(51,xo,8,12,"div",8),r(),n(52,"div",22)(53,"div",23)(54,"p-button",24),x("click",function(){return s.submitForm()}),a(55),l(56,"transloco"),r()()()()()()()()),t&2&&(o(6),c("formGroup",s.profileEditForm),o(4),u(" ",p(11,27,"user.FirstName")," "),o(4),c("placeholder",C(p(15,29,"FirstName"))),o(4),u(" ",p(19,31,"user.LastName")," "),o(4),c("placeholder",C(p(23,33,"user.LastName"))),o(3),y(s.hideIndustry?25:-1),o(3),u(" ",p(29,35,"user.Company")," "),o(4),c("placeholder",C(p(33,37,"user.Company"))),o(4),u(" ",p(37,39,"user.MyProfileLanguage")),o(4),xe(I(49,vo)),c("placeholder",C(p(41,41,"user.MyProfileLanguage")))("options",s.languageOptions),o(5),u(" ",p(46,43,"user.Country")," "),o(4),xe(I(50,He)),c("placeholder",C(p(50,45,"user.SelectCountry")))("filter",!0)("options",s.countryData),o(2),y(s.showStateField?51:-1),o(3),c("disabled",!s.profileEditForm.valid||s.profileEditForm.untouched),o(),g(p(56,47,"Update")))},dependencies:[q,Y,O,H,W,$,N,Q,se,L,_],encapsulation:2})}}return i})();var Wt=(()=>{class i{constructor(e,t,s,f,w){this.userService=e,this.activeUserService=t,this.fb=s,this.messageService=f,this.translocoService=w,this.userInfo={},this.termsForm=this.fb.group({agreeByTelephone:[!0],agreeByEmail:[!0]})}ngOnInit(){this.getUserInfo()}getUserInfo(){this.activeUserService.userAccessData$.subscribe(e=>{this.userInfo=e,this.isAgreedByEmail=this.userInfo?.isAgreedContactByEmail,this.isAgreedByPhone=this.userInfo?.isAgreedContactByPhone,this.termsForm.patchValue({agreeByTelephone:this.isAgreedByPhone,agreeByEmail:this.isAgreedByEmail})})}
5onSubmit(){if(this.termsForm.valid){let e={isAgreedContactByPhone:this.termsForm.get("agreeByTelephone")?.value,isAgreedContactByEmail:this.termsForm.get("agreeByEmail")?.value};this.userService.agreeTerms(e).subscribe({next:t=>{this.messageService.add({severity:"success",summary:"",key:"t1",detail:this.translocoService.translate("user.PreferenceUpdatedSuccessMsg"),life:5e3})},error:t=>{this.messageService.add({severity:"error",summary:"Error",key:"t1",detail:this.translocoService.translate("user.PreferenceUpdatedErrorMsg"),life:5e3})}})}}static{this.\u0275fac=function(t){return new(t||i)(m(P),m(B),m(z),m(E),m(D))}}static{this.\u0275cmp=S({type:i,selectors:[["app-preferences-details"]],standalone:!1,decls:24,vars:15,consts:[["key","t1"],[1,"@container","mx-auto"],[1,"mx-auto","max-w-(--breakpoint-2xl)","px-5","py-4"],[1,"flex","justify-center","py-6"],[1,"text-center"],[1,"text-base","font-medium"],[1,"termsForm","w-full","max-w-xl","mx-auto",3,"ngSubmit","formGroup"],[1,"flex","flex-col","items-center","gap-4","py-4"],[1,"flex","items-center","gap-2"],["formControlName","agreeByTelephone",3,"binary"],["for","agreeByTelephone",1,"text-sm","font-medium"],["formControlName","agreeByEmail",3,"binary"],["for","agreeByEmail",1,"text-sm","font-medium"],[1,"flex","justify-center","py-4"],["type","submit",1,"btn","btn-primary"]],template:function(t,s){t&1&&(d(0,"p-toast",0),n(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"p",5),a(6),l(7,"transloco"),r()()(),n(8,"form",6),x("ngSubmit",function(){return s.onSubmit()}),n(9,"div",7)(10,"div",8),d(11,"p-checkbox",9),n(12,"label",10),a(13),l(14,"transloco"),r()(),n(15,"div",8),d(16,"p-checkbox",11),n(17,"label",12),a(18),l(19,"transloco"),r()()(),n(20,"div",13)(21,"p-button",14),a(22),l(23,"transloco"),r()()()()()),t&2&&(o(6),g(p(7,7,"user.MyProfileCheckingOption")),o(2),c("formGroup",s.termsForm),o(3),c("binary",!0),o(2),u(" ",p(14,9,"user.MyProfileText2")," "),o(3),c("binary",!0),o(2),u(" ",p(19,11,"user.MyProfileText3")," "),o(4),u(" ",p(23,13,"shared.Update")," "))},dependencies:[q,O,H,W,$,N,mt,L,_],encapsulation:2})}}return i})();var zt=(()=>{class i{constructor(e,t,s,f,w,M){this.config=e,this.userService=t,this.messageService=s,this.fb=f,this.ref=w,this.translocoService=M,this.isPasswordValidated=!1,this.passwordForm=this.fb.group({password:["",T.required]})}onValidPassword(){if(this.passwordForm.valid){let e={password:this.passwordForm.get("password")?.value};this.userService.isValidPassword(e).subscribe({next:t=>{t?(this.messageService.add({severity:"success",summary:"",key:"t1",detail:this.translocoService.translate("auth.PasswordValidationSuccessMsg"),life:5e3}),this.isPasswordValidated=!0,this.config.data.onPasswordValidated(!0)):this.messageService.add({severity:"error",summary:"",key:"t1",detail:this.translocoService.translate("auth.PasswordValidationErrorMsg"),life:5e3})},error:t=>{this.messageService.add({severity:"error",summary:"",key:"t1",detail:this.translocoService.translate("auth.PasswordValidateFailedErrorMsg"),life:5e3}),this.config.data.onPasswordValidated(!1)}})}}closeModal(){this.ref?.close()}static{this.\u0275fac=function(t){return new(t||i)(m(Pe),m(P),m(E),m(z),m(ht),m(D))}}static{this.\u0275cmp=S({type:i,selectors:[["app-password-validation-update-password"]],standalone:!1,decls:21,vars:16,consts:[[1,"container"],[1,"col-span-12","col-md-6","col-lg-6","offset-md-3","offset-lg-3","h-50"],["key","t1"],[1,"row"],[1,"col-md-6","col-lg-6","offset-md-3","offset-lg-3","col-sm-12","py-2"],[3,"ngSubmit","formGroup"],[1,"row","password-form"],[1,"col"],["for","formCountry",1,"form-label"],["pInputText","","type","password","formControlName","password","id","password",1,"form-control",3,"placeholder"],[1,"row","pt-2"],[1,"col","text-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","label"],[1,"col","text-start"],["type","submit",1,"btn","btn-primary","next",3,"label"]],template:function(t,s){t&1&&(n(0,"div",0)(1,"div",1),d(2,"p-toast",2),r(),n(3,"div",3)(4,"div",4)(5,"div")(6,"form",5),x("ngSubmit",function(){return s.onValidPassword()}),n(7,"div",6)(8,"div",7)(9,"label",8),a(10),l(11,"transloco"),r(),d(12,"input",9),l(13,"transloco"),r()(),n(14,"div",10)(15,"div",11)(16,"p-button",12),l(17,"transloco"),x("click",function(){return s.closeModal()}),r()(),n(18,"div",13),d(19,"p-button",14),l(20,"transloco"),r()()()()()()()),t&2&&(o(6),c("formGroup",s.passwordForm),o(4),g(p(11,8,"user.MyProfilePassword")),o(2),c("placeholder",C(p(13,10,"user.MyProfilePassword"))),o(4),c("label",C(p(17,12,"shared.Cancel"))),o(3),c("label",C(p(20,14,"shared.Submit"))))},dependencies:[q,Y,O,H,W,$,N,Q,L,_],encapsulation:2})}}return i})();function So(i,h){if(i&1&&(n(0,"div",2)(1,"div",9)(2,"label",10),a(3),l(4,"transloco"),d(5,"br"),n(6,"span",11),l(7,"transloco"),a(8),r()()()()),i&2){let e=v();o(3),u(" ",p(4,3,"user.MyProfileBusinessEmail")),o(3),c("pTooltip",p(7,5,"user.EmailAddressTooltip")),o(2),u(" ",e.userInfo==null?null:e.userInfo.userName," ")}}var Qt=(()=>{class i{constructor(e,t,s,f){this.messageService=e,this.dialogService=t,this.translocoService=s,this.activeUserService=f,this.isLoading=!1,this.showChangePasswordComponent=!1,this.ref=null,this.hideChangePasswordBtn=!1,this.hidePasswordSecurity=!0,this.userInfo={},this.closemodal=new Se,this.userService=Qe(P),this.profileData=this.userService.profileData,ie(()=>{this.getUserInfo()})}ngOnInit(){}getUserInfo(){this.activeUserService.userAccessData$.subscribe(e=>{this.userInfo=e})}openPasswordModal(){this.ref=this.dialogService.open(zt,{header:this.translocoService.translate("auth.MyProfileEnterCurrentPassword"),width:"50vw",modal:!0,closable:!0,dismissableMask:!0,breakpoints:{"960px":"75vw","640px":"90vw"},data:{onPasswordValidated:e=>this.onPasswordValidated(e)}})}onPasswordValidated(e){e&&(this.ref&&this.ref.close(),this.hidePasswordSecurity=!1,this.showChangePasswordComponent=!0)}EmitClose(e){e&&(this.showChangePasswordComponent=!0)}static{this.\u0275fac=function(t){return new(t||i)(m(E),m(ae),m(D),m(B))}}static{this.\u0275cmp=S({type:i,selectors:[["app-security-details"]],outputs:{closemodal:"closemodal"},standalone:!1,decls:18,vars:10,consts:[[1,"@container","mx-auto"],[1,"mx-auto","max-w-screen-2xl","px-5","py-2"],[1,"flex","justify-center","py-6"],[1,"flex","justify-center","pt-4","pb-2"],[1,"text-center","font-semibold","text-base","md:text-lg","max-w-xl","text-gray-800"],[1,"flex","justify-center","pb-6"],[1,"text-center","max-w-xl","text-sm","md:text-base","text-gray-600"],[1,"flex","flex-col","gap-2"],[1,"px-4","md:px-8"],[1,"text-center"],["for","formName",1,"block","text-base","md:text-lg","font-semibold","text-gray-800"],["tooltipPosition","bottom",1,"text-xl","font-bold","text-blue-200","-700","break-words","max-w-full","inline-block","cursor-pointer",2,"word-break","break-word",3,"pTooltip"]],template:function(t,s){t&1&&(n(0,"div",0)(1,"div",1),b(2,S
5o,9,7,"div",2),n(3,"div",3)(4,"div",4),a(5),l(6,"transloco"),r()(),n(7,"div",5)(8,"div",6)(9,"div",7)(10,"span"),a(11),l(12,"transloco"),r(),n(13,"span"),a(14),l(15,"transloco"),r()()()()()(),n(16,"div",8),d(17,"app-change-password"),r()),t&2&&(o(2),y(s.hidePasswordSecurity?2:-1),o(3),u(" ",p(6,4,"auth.MyProfileChangePwd")," "),o(6),g(p(12,6,"auth.NewPwdConfirmation")),o(3),g(p(15,8,"auth.NewPwdCriteria")))},dependencies:[re,ke,_],encapsulation:2})}}return i})();var qe=(()=>{class i{constructor(e,t,s,f){this.route=e,this.userService=t,this.translocoService=s,this.router=f,this.activeTabIndex=0,this.tabOptions=[],this.items=[{label:"My Videojet",routerLink:"/user/dashboard"},{label:"My Profile"}]}ngOnInit(){this.userService.loadMyProfileData(),console.log(this.userService.loadMyProfileData()),this.route.queryParamMap.subscribe(e=>{let t=e.get("tab"),s=t!==null?Number(t):0;s!==null&&!Number.isNaN(s)&&(this.activeTabIndex=s||0,this.userService.setActiveTab(s))}),this.userService.activeTabIndex$.subscribe(e=>{this.activeTabIndex=e}),this.loadTabOptions(),this.translocoService.langChanges$.subscribe(()=>{this.loadTabOptions()})}onTabChange(e){this.activeTabIndex=e,this.router.navigate([],{relativeTo:this.route,queryParams:{tab:e},queryParamsHandling:"merge"})}loadTabOptions(){this.tabOptions=[{label:this.translocoService.translate("user.MyProfileDetails"),value:0},{label:this.translocoService.translate("auth.MyProfileChangePwd"),value:1},{label:this.translocoService.translate("user.MyProfilePreferences"),value:2},{label:this.translocoService.translate("user.MyProfileCustAccount"),value:3}]}static{this.\u0275fac=function(t){return new(t||i)(m(_e),m(P),m(D),m(G))}}static{this.\u0275cmp=S({type:i,selectors:[["app-my-profile"]],standalone:!1,decls:27,vars:23,consts:[[1,"@container","mx-auto","py-6"],[1,"mx-auto","grid","grid-cols-1","max-w-screen-xl","md:grid-rows-1","py-5","gap-0","custom-tabview","vj-tabs"],[1,"md:hidden","mb-4","px-3"],["optionLabel","label","optionValue","value","placeholder","Select Tab","styleClass","w-full",3,"ngModelChange","ngModel","options"],[3,"valueChange","value"],[1,"hidden","md:flex"],[3,"click","value"],[3,"value"]],template:function(t,s){t&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"p-select",3),je("ngModelChange",function(w){return Le(s.activeTabIndex,w)||(s.activeTabIndex=w),w}),r()(),n(4,"p-tabs",4),je("valueChange",function(w){return Le(s.activeTabIndex,w)||(s.activeTabIndex=w),w}),n(5,"p-tablist",5)(6,"p-tab",6),x("click",function(){return s.onTabChange(0)}),a(7),l(8,"transloco"),r(),n(9,"p-tab",6),x("click",function(){return s.onTabChange(1)}),a(10),l(11,"transloco"),r(),n(12,"p-tab",6),x("click",function(){return s.onTabChange(2)}),a(13),l(14,"transloco"),r(),n(15,"p-tab",6),x("click",function(){return s.onTabChange(3)}
5),a(16),l(17,"transloco"),r()(),n(18,"p-tabpanels")(19,"p-tabpanel",7),d(20,"app-myprofile-editform"),r(),n(21,"p-tabpanel",7),d(22,"app-security-details"),r(),n(23,"p-tabpanel",7),d(24,"app-preferences-details"),r(),n(25,"p-tabpanel",7),d(26,"app-manage-account-sites"),r()()()()()),t&2&&(o(3),Be("ngModel",s.activeTabIndex),c("options",s.tabOptions),o(),Be("value",s.activeTabIndex),o(2),c("value",0),o(),g(p(8,15,"user.MyProfileDetails")),o(2),c("value",1),o(),g(p(11,17,"auth.MyProfileChangePwd")),o(2),c("value",2),o(),g(p(14,19,"user.MyProfilePreferences")),o(2),c("value",3),o(),g(p(17,21,"user.MyProfileCustAccount")),o(3),c("value",0),o(2),c("value",1),o(2),c("value",2),o(2),c("value",3))},dependencies:[O,at,se,yt,_t,wt,St,Ct,Ht,$t,Wt,Qt,_],encapsulation:2})}}return i})();function wo(i,h){if(i&1&&(n(0,"div",4)(1,"label",8),a(2),l(3,"transloco"),d(4,"br"),n(5,"span",6),a(6),r()()()),i&2){let e=v(2);o(2),u(" ",p(3,2,"user.MyProfilePhoneType")),o(4),g(e.userInfo.phoneType)}}function _o(i,h){if(i&1){let e=V();n(0,"div",2)(1,"div",3)(2,"div",4)(3,"label",5),a(4),l(5,"transloco"),d(6,"br"),n(7,"span",6),a(8),r()()(),b(9,wo,7,4,"div",4),n(10,"div",4)(11,"p-button",7),l(12,"transloco"),x("click",function(){k(e);let s=v();return A(s.editPhoneDetails())}),r()()()()}if(i&2){let e=v();o(4),u(" ",p(5,5,"user.MobileNumber")),o(4),g(e.userInfo.mobileNumber),o(),y(e.mobileNumber&&e.phoneType?9:-1),o(2),c("label",C(p(12,7,"user.EditPhoneDetails")))}}function Io(i,h){if(i&1){let e=V();n(0,"div",2)(1,"app-add-new-phone",9),x("formSubmitted",function(){k(e);let s=v();return A(s.getUserInfo())}),r()()}}var Zt=(()=>{class i{constructor(e,t,s){this.messageService=e,this.dialogService=t,this.activeUserService=s,this.userInfo={},this.isLoading=!1,this.mobileNumber="",this.phoneType="",this.messages=[],this.ref=null}ngOnInit(){this.getUserInfo()}getUserInfo(){this.activeUserService.userAccessData$.subscribe(e=>{this.userInfo=e})}editPhoneDetails(){this.ref=this.dialogService.open(he,{showHeader:!1,width:"50vw",modal:!0,closable:!0,dismissableMask:!0,breakpoints:{"960px":"75vw","640px":"90vw"},data:{onPhoneUpdate:e=>this.onPhoneUpdate(e)}})}onPhoneUpdate(e){e&&this.ref&&(this.activeUserService.getActiveUserInfo(),this.ref.close())}static{this.\u0275fac=function(t){return new(t||i)(m(E),m(ae),m(B))}}static{this.\u0275cmp=S({type:i,selectors:[["app-phone-security"]],standalone:!1,decls:4,vars:1,consts:[[1,"@container","mx-auto"],[1,"mx-auto","max-w-(--breakpoint-2xl)","px-6","py-4"],[1,"w-full","px-6"],[1,"flex","flex-col","items-center","gap-8"],[1,"text-center"],["for","mobNumber",1,"block","text-lg","font-semibold","text-gray-800"],[1,"-700","text-2xl","font-bold","text-blue-200"],["type","button","icon","pi pi-pencil",3,"click","label"],["for","phoneType",1,"block","text-lg","font-semibold","text-gray-800"],[3,"formSubmitted"]],template:function(t,s){t&1&&(n(0,"div",0),d(1,"div",1),r(),b(2,_o,13,9,"div",2)(3,Io,2,0,"div",2)),t&2&&(o(2),y(s.userInfo!=null&&s.userInfo.mobileNumber&&(s.userInfo!=null&&s.userInfo.phoneType)?2:3))},dependencies:[N,he,_],encapsulation:2})}}return i})();function Po(i,h){i&1&&(n(0,"div",9)(1,"a",10),a(2),l(3,"transloco"),r()()),i&2&&(o(2),g(p(3,1,"apps.SkipButton")))}var Kt=(()=>{class i{constructor(e){this.userService=e,this.daysToExpire=0,this.showSkipNow=!1}
5ngOnInit(){let e=this.userService.getPasswordExpiredDate();if(this.passwordDate=e,e){let t=new Date;this.daysToExpire=Math.floor((e.getTime()-t.getTime())/(1e3*3600*24)),this.daysToExpire<=1?this.showSkipNow=!1:this.showSkipNow=!0}}static{this.\u0275fac=function(t){return new(t||i)(m(P))}}static{this.\u0275cmp=S({type:i,selectors:[["app-password-expiry-policy"]],standalone:!1,decls:25,vars:17,consts:[[1,"@container","mx-auto"],[1,"mx-auto","max-w-(--breakpoint-2xl)","px-5","py-4"],[1,"text-center","text-red-500","py-12"],[1,"row","py-6","text-center"],[1,"col-md-8","col-lg-6","offset-md-2","offset-lg-3","fw-bold"],[1,"row","py-2","text-center"],[1,"col-md-8","col-lg-6","offset-md-2","offset-lg-3"],[1,"flex","flex-col","gap-1"],[1,"d-flex","flex-col","gap-1","align-items-md-stretch"],[1,"text-center","pt-12"],["routerLink","/user/dashboard"]],template:function(t,s){t&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),a(3),l(4,"transloco"),n(5,"b"),a(6),r(),a(7),l(8,"transloco"),n(9,"b"),a(10),l(11,"date"),r()(),n(12,"div",3)(13,"div",4),a(14),l(15,"transloco"),r()(),n(16,"div",5)(17,"div",6)(18,"div",7)(19,"div",8),a(20),l(21,"transloco"),d(22,"br"),r()()()(),d(23,"app-change-password"),b(24,Po,4,3,"div",9),r()()),t&2&&(o(3),u(" ",p(4,7,"auth.PasswordMsg1")," "),o(3),g(s.daysToExpire),o(),u(" ",p(8,9,"auth.PasswordMsg2")," "),o(3),u("",p(11,11,s.passwordDate),"."),o(4),u(" ",p(15,13,"auth.MyProfileChangePwd")," "),o(6),u(" ",p(21,15,"auth.PasswordExpiryMsg")," "),o(4),y(s.showSkipNow?24:-1))},dependencies:[Ie,ke,_,we],encapsulation:2})}}return i})();var To=[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"dashboard",component:Gt,data:{title:"Dashboard",breadcrumb:"shared.DashboardBreadcrumb"}},{path:"my-profile",component:qe,data:{title:"User Profile",breadcrumb:"shared.UserProfileBreadcrumb"}},{path:"my-profile-web",component:qe,data:{title:"User Profile",breadcrumb:"shared.UserProfileBreadcrumb"}},{path:"password-expiry",component:Kt,data:{title:"Password Expiry Policy",breadcrumb:"shared.PasswordExpiryBreadcrumb"}}],Yt=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=Ce({type:i})}static{this.\u0275inj=ye({imports:[Ge.forChild(To),Ge]})}}return i})();var vr=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=Ce({type:i})}static{this.\u0275inj=ye({providers:[E,ae],imports:[Et,rt,Yt,Dt,Nt,pe]})}}return i})();it(he,[q,Y,O,H,lt,pt,ct,W,$,N,Q,se,L,Zt],[_]);export{vr as UserModule};
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.