dealpos 25.38.0 → 25.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/browser/{chunk-72JSQO47.js → chunk-2ZLV5QOF.js} +1 -1
  2. package/browser/{chunk-GWEO2O7F.js → chunk-33Z3MBAK.js} +1 -1
  3. package/browser/{chunk-MUB2YLV7.js → chunk-3HEZ7L27.js} +3 -3
  4. package/browser/chunk-3R7CKCQC.js +1 -0
  5. package/browser/{chunk-WRV6CSOO.js → chunk-4MKFW5HF.js} +1 -1
  6. package/browser/{chunk-2GX6XQZF.js → chunk-56F5KRLJ.js} +1 -1
  7. package/browser/{chunk-4JUHQN2M.js → chunk-5LDMXZLC.js} +1 -1
  8. package/browser/{chunk-RGG3QDWH.js → chunk-5VKCMGYJ.js} +1 -1
  9. package/browser/{chunk-7EDUE7BL.js → chunk-5VRRYWVC.js} +1 -1
  10. package/browser/{chunk-N5JHKAFG.js → chunk-6RP2WO45.js} +1 -1
  11. package/browser/{chunk-VN2KN6HW.js → chunk-7LY6BGJJ.js} +4 -4
  12. package/browser/{chunk-DSBTC6NY.js → chunk-7OH6LVTJ.js} +5 -5
  13. package/browser/{chunk-6Q7RLLZ7.js → chunk-7UBJFV53.js} +1 -1
  14. package/browser/{chunk-DBDZEXKT.js → chunk-7YE4HOHN.js} +1 -1
  15. package/browser/chunk-A5X65SOA.js +57 -0
  16. package/browser/{chunk-QOFAWXYH.js → chunk-AFU62F2M.js} +1 -1
  17. package/browser/{chunk-F7QHJHPI.js → chunk-ASU7GMVT.js} +1 -1
  18. package/browser/{chunk-6UDIG5NT.js → chunk-AZC62B34.js} +1 -1
  19. package/browser/{chunk-OIC3622Z.js → chunk-BDIOBQ3F.js} +1 -1
  20. package/browser/{chunk-TBFC5WPR.js → chunk-BGRIUOYM.js} +1 -1
  21. package/browser/{chunk-VO2YCRKY.js → chunk-CF6DDJIR.js} +3 -3
  22. package/browser/{chunk-E5IHXVRK.js → chunk-CFQ7OFCQ.js} +1 -1
  23. package/browser/{chunk-W4EJ4OPP.js → chunk-CMTZAHVY.js} +1 -1
  24. package/browser/{chunk-3TRZIGNN.js → chunk-DUEJUN6K.js} +1 -1
  25. package/browser/{chunk-YQL6I7MX.js → chunk-DXNYWBOJ.js} +1 -1
  26. package/browser/{chunk-3TLC4BCW.js → chunk-EPQCS4G7.js} +2 -2
  27. package/browser/{chunk-Z4RJX6TP.js → chunk-FC2QVVNL.js} +1 -1
  28. package/browser/{chunk-CXLVBY6W.js → chunk-FT7BPR32.js} +1 -1
  29. package/browser/{chunk-KCVPGI7J.js → chunk-G7YXYVOM.js} +1 -1
  30. package/browser/{chunk-NSWBZJ3H.js → chunk-GKVCGI4Q.js} +1 -1
  31. package/browser/{chunk-BJGUO5QJ.js → chunk-H6OITCFT.js} +1 -1
  32. package/browser/{chunk-EJT5BT4S.js → chunk-HGB2NJEI.js} +1 -1
  33. package/browser/{chunk-5UZV25KW.js → chunk-I4UPUEJQ.js} +4 -4
  34. package/browser/{chunk-RFMFH35P.js → chunk-J27ER66U.js} +2 -2
  35. package/browser/{chunk-DTU7HI5U.js → chunk-J6H577U5.js} +1 -1
  36. package/browser/{chunk-IMNC5BEA.js → chunk-JG6KP3LU.js} +1 -1
  37. package/browser/{chunk-YEDG3CPO.js → chunk-JHLUUVPP.js} +1 -1
  38. package/browser/{chunk-QLHT2WKZ.js → chunk-JI6KR4QD.js} +1 -1
  39. package/browser/{chunk-OYIZSQES.js → chunk-JKXSLPGV.js} +1 -1
  40. package/browser/{chunk-HFBB76IK.js → chunk-JRRUR7IA.js} +1 -1
  41. package/browser/{chunk-M5VAD4I7.js → chunk-K5DJ5WPE.js} +1 -1
  42. package/browser/{chunk-Y4PFW74I.js → chunk-K7MKOLA6.js} +1 -1
  43. package/browser/{chunk-AGIW63M2.js → chunk-KGDQP4JR.js} +1 -1
  44. package/browser/{chunk-O6TRX3HB.js → chunk-KXOXDBRC.js} +1 -1
  45. package/browser/{chunk-BFDUSGD3.js → chunk-KYSWAYKK.js} +1 -1
  46. package/browser/{chunk-7XDBVIDD.js → chunk-L3MPEEI7.js} +1 -1
  47. package/browser/{chunk-XMRKW24P.js → chunk-LT55LCIC.js} +1 -1
  48. package/browser/{chunk-MW2XU7A2.js → chunk-MGFRGPN4.js} +1 -1
  49. package/browser/{chunk-7WAYNKNJ.js → chunk-MPENEFJK.js} +1 -1
  50. package/browser/{chunk-XTNPUUQK.js → chunk-MTTML3DV.js} +2 -2
  51. package/browser/{chunk-MTCKPAGT.js → chunk-O6K27TYY.js} +1 -1
  52. package/browser/{chunk-UB6B4AAQ.js → chunk-OWSL7VZ7.js} +1 -1
  53. package/browser/{chunk-X2GBLPKU.js → chunk-PPSWM237.js} +1 -1
  54. package/browser/{chunk-UXF66ZFH.js → chunk-Q5WMF6RD.js} +1 -1
  55. package/browser/chunk-QBWWLEFP.js +24 -0
  56. package/browser/{chunk-WXOFCCQJ.js → chunk-QCJ7PV4R.js} +4 -4
  57. package/browser/{chunk-ROWX7LQD.js → chunk-QQ5NVKJL.js} +1 -1
  58. package/browser/{chunk-2YS7DHQK.js → chunk-QZDLOXOP.js} +1 -1
  59. package/browser/{chunk-5EOPJGJR.js → chunk-SF6TPOUV.js} +1 -1
  60. package/browser/chunk-SSRC3KCP.js +1 -0
  61. package/browser/{chunk-NTZBLWXS.js → chunk-STC3XKNG.js} +1 -1
  62. package/browser/{chunk-6AGUBOKS.js → chunk-TIXKTMNP.js} +1 -1
  63. package/browser/{chunk-27LG5ACJ.js → chunk-TNXU6YBX.js} +1 -1
  64. package/browser/{chunk-UOPAXKYI.js → chunk-ULVRQWWQ.js} +1 -1
  65. package/browser/{chunk-RH2IFHFD.js → chunk-UMUBYBGM.js} +1 -1
  66. package/browser/{chunk-6Z226K55.js → chunk-V5A6ADTH.js} +1 -1
  67. package/browser/{chunk-K7TWOQ3C.js → chunk-VE4MEWC3.js} +1 -1
  68. package/browser/{chunk-JY5T2CXQ.js → chunk-W446RFN2.js} +1 -1
  69. package/browser/{chunk-NS6R2NM3.js → chunk-W7TIYEEV.js} +1 -1
  70. package/browser/{chunk-EPLULPBX.js → chunk-XI63Z4XV.js} +1 -1
  71. package/browser/{chunk-AF524AZZ.js → chunk-XUOXQ56H.js} +2 -2
  72. package/browser/{chunk-SEDXTQH7.js → chunk-Y6SHFOKM.js} +2 -2
  73. package/browser/chunk-YNKGRRRO.js +1 -0
  74. package/browser/{chunk-YBNK7QU2.js → chunk-YTSJ26UL.js} +1 -1
  75. package/browser/{chunk-ARGRANJD.js → chunk-Z75HO5XT.js} +1 -1
  76. package/browser/{chunk-3QDAA2EL.js → chunk-ZZVXDXSB.js} +1 -1
  77. package/browser/index.html +2 -2
  78. package/browser/{main-BJA2TDEV.js → main-HGYA62Q7.js} +2 -2
  79. package/package.json +1 -1
  80. package/browser/chunk-6XGQOQ4B.js +0 -1
  81. package/browser/chunk-ESU4YRJD.js +0 -1
  82. package/browser/chunk-I6MACZWG.js +0 -1
  83. package/browser/chunk-PEG2US5N.js +0 -57
  84. package/browser/chunk-ZDY5HSYT.js +0 -24
@@ -1 +1 @@
1
- import{b as s}from"./chunk-DBDZEXKT.js";import{a as i}from"./chunk-AHCRE4GP.js";import{ja as o,ma as l}from"./chunk-DZT5XHBQ.js";var p=class r{constructor(t){this.cookieService=t}_reportFilter={from:null,outletIds:[],to:null};_cookiesName="ReportFilter";initOutletFilter(t=[]){let e=this.getReportFilter();return i.IsNotEmpty(e?.outletIds)?t=e.outletIds:this.setOutletFilter(t),t}initDateFromFilter(t){let e=this.getReportFilter();return i.IsNotEmpty(e?.from)?t=e.from:this.setDateFromFilter(t),t}initDateToFilter(t){let e=this.getReportFilter();return i.IsNotEmpty(e?.to)?t=e.to:this.setDateToFilter(t),t}setDateFromFilter(t){let e=this.getReportFilter();i.IsEmpty(e)&&(e=this._reportFilter),e.from=t,this.saveFilterToCookie(e)}setDateToFilter(t){let e=this.getReportFilter();i.IsEmpty(e)&&(e=this._reportFilter),e.to=t,this.saveFilterToCookie(e)}setOutletFilter(t=[]){let e=this.getReportFilter();i.IsEmpty(e)&&(e=this._reportFilter),e.outletIds=t,this.saveFilterToCookie(e)}saveFilterToCookie(t){this.cookieService.set(this._cookiesName,JSON.stringify(t),this.getExpiredDate(),"/")}getReportFilter(){if(this.cookieService.check("ReportFilter")){let t=this.cookieService.get("ReportFilter");this._reportFilter=JSON.parse(t)}return this._reportFilter}getExpiredDate(){let t=new Date,F=1*60*60*1e3;return t.setTime(t.getTime()+F),t}resetFilter(){this._reportFilter={from:null,outletIds:[],to:null},this.cookieService.delete("ReportFilter","/")}static \u0275fac=function(e){return new(e||r)(l(s))};static \u0275prov=o({token:r,factory:r.\u0275fac,providedIn:"root"})};export{p as a};
1
+ import{b as s}from"./chunk-7YE4HOHN.js";import{a as i}from"./chunk-AHCRE4GP.js";import{ja as o,ma as l}from"./chunk-DZT5XHBQ.js";var p=class r{constructor(t){this.cookieService=t}_reportFilter={from:null,outletIds:[],to:null};_cookiesName="ReportFilter";initOutletFilter(t=[]){let e=this.getReportFilter();return i.IsNotEmpty(e?.outletIds)?t=e.outletIds:this.setOutletFilter(t),t}initDateFromFilter(t){let e=this.getReportFilter();return i.IsNotEmpty(e?.from)?t=e.from:this.setDateFromFilter(t),t}initDateToFilter(t){let e=this.getReportFilter();return i.IsNotEmpty(e?.to)?t=e.to:this.setDateToFilter(t),t}setDateFromFilter(t){let e=this.getReportFilter();i.IsEmpty(e)&&(e=this._reportFilter),e.from=t,this.saveFilterToCookie(e)}setDateToFilter(t){let e=this.getReportFilter();i.IsEmpty(e)&&(e=this._reportFilter),e.to=t,this.saveFilterToCookie(e)}setOutletFilter(t=[]){let e=this.getReportFilter();i.IsEmpty(e)&&(e=this._reportFilter),e.outletIds=t,this.saveFilterToCookie(e)}saveFilterToCookie(t){this.cookieService.set(this._cookiesName,JSON.stringify(t),this.getExpiredDate(),"/")}getReportFilter(){if(this.cookieService.check("ReportFilter")){let t=this.cookieService.get("ReportFilter");this._reportFilter=JSON.parse(t)}return this._reportFilter}getExpiredDate(){let t=new Date,F=1*60*60*1e3;return t.setTime(t.getTime()+F),t}resetFilter(){this._reportFilter={from:null,outletIds:[],to:null},this.cookieService.delete("ReportFilter","/")}static \u0275fac=function(e){return new(e||r)(l(s))};static \u0275prov=o({token:r,factory:r.\u0275fac,providedIn:"root"})};export{p as a};
@@ -1 +1 @@
1
- import{a as b}from"./chunk-7WAYNKNJ.js";import{a as p,d as T,e as R}from"./chunk-AHCRE4GP.js";import{Pa as S,Qd as v,Sc as d,Yd as k,fa as h,ja as u,kd as I,ma as c}from"./chunk-DZT5XHBQ.js";var U=(o=>(o[o.PAID=0]="PAID",o[o.OVERDUE=1]="OVERDUE",o[o.SELL_ONLY=2]="SELL_ONLY",o[o.SUSPENDED=3]="SUSPENDED",o))(U||{});var y=(()=>{class n{constructor(e,i){this.document=e,this.platformId=i,this.documentIsAccessible=I(this.platformId)}static getCookieRegExp(e){let i=e.replace(/([\[\]{}()|=;+?,.*^$])/gi,"\\$1");return new RegExp("(?:^"+i+"|;\\s*"+i+")=(.*?)(?:;|$)","g")}static safeDecodeURIComponent(e){try{return decodeURIComponent(e)}catch{return e}}check(e){return this.documentIsAccessible?(e=encodeURIComponent(e),n.getCookieRegExp(e).test(this.document.cookie)):!1}get(e){if(this.check(e)){e=encodeURIComponent(e);let o=n.getCookieRegExp(e).exec(this.document.cookie);return o&&o[1]?n.safeDecodeURIComponent(o[1]):""}else return""}getAll(){if(!this.documentIsAccessible)return{};let e={},i=this.document;return i.cookie&&i.cookie!==""&&i.cookie.split(";").forEach(o=>{let[a,s]=o.split("=");e[n.safeDecodeURIComponent(a.replace(/^ /,""))]=n.safeDecodeURIComponent(s)}),e}set(e,i,o,a,s,m,f,D){if(!this.documentIsAccessible)return;if(typeof o=="number"||o instanceof Date||a||s||m||f){let g={expires:o,path:a,domain:s,secure:m,sameSite:f||"Lax",partitioned:D};this.set(e,i,g);return}let l=encodeURIComponent(e)+"="+encodeURIComponent(i)+";",r=o||{};if(r.expires)if(typeof r.expires=="number"){let g=new Date(new Date().getTime()+r.expires*1e3*60*60*24);l+="expires="+g.toUTCString()+";"}else l+="expires="+r.expires.toUTCString()+";";r.path&&(l+="path="+r.path+";"),r.domain&&(l+="domain="+r.domain+";"),r.secure===!1&&r.sameSite==="None"&&(r.secure=!0,console.warn(`[ngx-cookie-service] Cookie ${e} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),r.secure&&(l+="secure;"),r.sameSite||(r.sameSite="Lax"),l+="sameSite="+r.sameSite+";",r.partitioned&&(l+="Partitioned;"),this.document.cookie=l}delete(e,i,o,a,s="Lax"){if(!this.documentIsAccessible)return;let m=new Date("Thu, 01 Jan 1970 00:00:01 GMT");this.set(e,"",{expires:m,path:i,domain:o,secure:a,sameSite:s})}deleteAll(e,i,o,a="Lax"){if(!this.documentIsAccessible)return;let s=this.getAll();for(let m in s)s.hasOwnProperty(m)&&this.delete(m,e,i,o,a)}static{this.\u0275fac=function(i){return new(i||n)(c(d),c(S))}}static{this.\u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var C=class n{constructor(t,e,i,o,a,s){this.httpService=t;this.cookieService=e;this.router=i;this.roleService=o;this.intercomService=a;this.fraction=s}role=[];_returnUrl;_loginResponse;_jwtToken;set returnUrl(t){this._returnUrl=t}get returnUrl(){return this._returnUrl}login(t){return this.httpService.post("/api/Login/Web",t).pipe(h(e=>{this._loginResponse=e,e.Type=="geo"||e.Type=="totp"||this.saveLoginConfigToStorage(e)}))}loginLoader(){return this.httpService.get("/api/login/Loader")}getRedirectUrl(){let t=this.getSubscriptionStatus(),e=this.getRedirectUrlByRole();return(t==2||t==3)&&(e="/menu/Profile/Main/My_Subscription"),e}getRedirectUrlByRole(){let t,e=this.roleService;return e.dashboard.View?t="/menu/Dashboard":e.product.View?t="/menu/Products":t="/menu/Sell",t}logout(){localStorage.removeItem("ConfigData"),localStorage.removeItem("Token"),localStorage.removeItem("Roles"),localStorage.removeItem("AccountInfo"),localStorage.removeItem("CloudinaryConfig"),localStorage.removeItem("SubscriptionStatus"),this.cookieService.delete("ReportFilter","/"),this.intercomService.shutdown(),this._jwtToken=null,this.roleService.resetRoles(),this.router.navigate(["/"])}refreshToken(){this.httpService.post("/API/Authentication/RefreshToken",{}).subscribe(t=>{localStorage.removeItem("Token"),localStorage.setItem("Token",t.Token),this._jwtToken=null,this.roleService.resetRoles(),this.roleService.parseJWTRoles()})}isTokenExpired(){let t=localStorage.getItem("Token");if(t){let e=p.parseJwt(t),i=this.convertUnixTimesTamp(e.exp),o=new Date;if(i.getTime()-o.getTime()>0)return!1}return!0}isInRole(t){t.forEach(e=>e(this.role))}convertUnixTimesTamp(t){return new Date(t*1e3)}saveLoginConfigToStorage(t){localStorage.setItem("quantityFraction",JSON.stringify(t.UIConfig.Fraction.Quantity)),localStorage.setItem("amountFraction",JSON.stringify(t.UIConfig.Fraction.Amount)),this.fraction.setAmountFraction(t.UIConfig.Fraction.Amount.Minimum,t.UIConfig.Fraction.Amount.Maximum),this.fraction.setQuantityFraction(t.UIConfig.Fraction.Quantity.Minimum,t.UIConfig.Fraction.Quantity.Maximum),localStorage.setItem("AccountInfo",JSON.stringify(t?.AccountInfo)),localStorage.setItem("Token",t?.Token),localStorage.setItem("TinyMCEPlugins",t?.UIConfig.TinyMCE),this.intercomService.updateLocalStorage(t?.Intercom),localStorage.setItem("CloudinaryConfig",t?.UIConfig.CloudinaryConfig),localStorage.setItem("DataDaysRange",t?.UIConfig.DataDaysRange),localStorage.setItem("SubscriptionStatus",JSON.stringify(t?.SubscriptionStatus));let e=this.getParseToken();p.IsNotEmpty(e?.NotificationOutletID)&&localStorage.setItem("NotificationOutletID",e?.NotificationOutletID),this.roleService.parseJWTRoles(),this._loginResponse=null}getParseToken(){let t=localStorage.getItem("Token");return t&&!this._jwtToken&&(this._jwtToken=p.parseJwt(t)),this._jwtToken}get loginResponse(){return this._loginResponse}getSubscriptionStatus(){let t=localStorage.getItem("SubscriptionStatus");return t?parseInt(t):null}static \u0275fac=function(e){return new(e||n)(c(k),c(y),c(v),c(T),c(b),c(R))};static \u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"})};export{U as a,y as b,C as c};
1
+ import{a as b}from"./chunk-MPENEFJK.js";import{a as p,d as T,e as R}from"./chunk-AHCRE4GP.js";import{Pa as S,Qd as v,Sc as d,Yd as k,fa as h,ja as u,kd as I,ma as c}from"./chunk-DZT5XHBQ.js";var U=(o=>(o[o.PAID=0]="PAID",o[o.OVERDUE=1]="OVERDUE",o[o.SELL_ONLY=2]="SELL_ONLY",o[o.SUSPENDED=3]="SUSPENDED",o))(U||{});var y=(()=>{class n{constructor(e,i){this.document=e,this.platformId=i,this.documentIsAccessible=I(this.platformId)}static getCookieRegExp(e){let i=e.replace(/([\[\]{}()|=;+?,.*^$])/gi,"\\$1");return new RegExp("(?:^"+i+"|;\\s*"+i+")=(.*?)(?:;|$)","g")}static safeDecodeURIComponent(e){try{return decodeURIComponent(e)}catch{return e}}check(e){return this.documentIsAccessible?(e=encodeURIComponent(e),n.getCookieRegExp(e).test(this.document.cookie)):!1}get(e){if(this.check(e)){e=encodeURIComponent(e);let o=n.getCookieRegExp(e).exec(this.document.cookie);return o&&o[1]?n.safeDecodeURIComponent(o[1]):""}else return""}getAll(){if(!this.documentIsAccessible)return{};let e={},i=this.document;return i.cookie&&i.cookie!==""&&i.cookie.split(";").forEach(o=>{let[a,s]=o.split("=");e[n.safeDecodeURIComponent(a.replace(/^ /,""))]=n.safeDecodeURIComponent(s)}),e}set(e,i,o,a,s,m,f,D){if(!this.documentIsAccessible)return;if(typeof o=="number"||o instanceof Date||a||s||m||f){let g={expires:o,path:a,domain:s,secure:m,sameSite:f||"Lax",partitioned:D};this.set(e,i,g);return}let l=encodeURIComponent(e)+"="+encodeURIComponent(i)+";",r=o||{};if(r.expires)if(typeof r.expires=="number"){let g=new Date(new Date().getTime()+r.expires*1e3*60*60*24);l+="expires="+g.toUTCString()+";"}else l+="expires="+r.expires.toUTCString()+";";r.path&&(l+="path="+r.path+";"),r.domain&&(l+="domain="+r.domain+";"),r.secure===!1&&r.sameSite==="None"&&(r.secure=!0,console.warn(`[ngx-cookie-service] Cookie ${e} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),r.secure&&(l+="secure;"),r.sameSite||(r.sameSite="Lax"),l+="sameSite="+r.sameSite+";",r.partitioned&&(l+="Partitioned;"),this.document.cookie=l}delete(e,i,o,a,s="Lax"){if(!this.documentIsAccessible)return;let m=new Date("Thu, 01 Jan 1970 00:00:01 GMT");this.set(e,"",{expires:m,path:i,domain:o,secure:a,sameSite:s})}deleteAll(e,i,o,a="Lax"){if(!this.documentIsAccessible)return;let s=this.getAll();for(let m in s)s.hasOwnProperty(m)&&this.delete(m,e,i,o,a)}static{this.\u0275fac=function(i){return new(i||n)(c(d),c(S))}}static{this.\u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var C=class n{constructor(t,e,i,o,a,s){this.httpService=t;this.cookieService=e;this.router=i;this.roleService=o;this.intercomService=a;this.fraction=s}role=[];_returnUrl;_loginResponse;_jwtToken;set returnUrl(t){this._returnUrl=t}get returnUrl(){return this._returnUrl}login(t){return this.httpService.post("/api/Login/Web",t).pipe(h(e=>{this._loginResponse=e,e.Type=="geo"||e.Type=="totp"||this.saveLoginConfigToStorage(e)}))}loginLoader(){return this.httpService.get("/api/login/Loader")}getRedirectUrl(){let t=this.getSubscriptionStatus(),e=this.getRedirectUrlByRole();return(t==2||t==3)&&(e="/menu/Profile/Main/My_Subscription"),e}getRedirectUrlByRole(){let t,e=this.roleService;return e.dashboard.View?t="/menu/Dashboard":e.product.View?t="/menu/Products":t="/menu/Sell",t}logout(){localStorage.removeItem("ConfigData"),localStorage.removeItem("Token"),localStorage.removeItem("Roles"),localStorage.removeItem("AccountInfo"),localStorage.removeItem("CloudinaryConfig"),localStorage.removeItem("SubscriptionStatus"),this.cookieService.delete("ReportFilter","/"),this.intercomService.shutdown(),this._jwtToken=null,this.roleService.resetRoles(),this.router.navigate(["/"])}refreshToken(){this.httpService.post("/API/Authentication/RefreshToken",{}).subscribe(t=>{localStorage.removeItem("Token"),localStorage.setItem("Token",t.Token),this._jwtToken=null,this.roleService.resetRoles(),this.roleService.parseJWTRoles()})}isTokenExpired(){let t=localStorage.getItem("Token");if(t){let e=p.parseJwt(t),i=this.convertUnixTimesTamp(e.exp),o=new Date;if(i.getTime()-o.getTime()>0)return!1}return!0}isInRole(t){t.forEach(e=>e(this.role))}convertUnixTimesTamp(t){return new Date(t*1e3)}saveLoginConfigToStorage(t){localStorage.setItem("quantityFraction",JSON.stringify(t.UIConfig.Fraction.Quantity)),localStorage.setItem("amountFraction",JSON.stringify(t.UIConfig.Fraction.Amount)),this.fraction.setAmountFraction(t.UIConfig.Fraction.Amount.Minimum,t.UIConfig.Fraction.Amount.Maximum),this.fraction.setQuantityFraction(t.UIConfig.Fraction.Quantity.Minimum,t.UIConfig.Fraction.Quantity.Maximum),localStorage.setItem("AccountInfo",JSON.stringify(t?.AccountInfo)),localStorage.setItem("Token",t?.Token),localStorage.setItem("TinyMCEPlugins",t?.UIConfig.TinyMCE),this.intercomService.updateLocalStorage(t?.Intercom),localStorage.setItem("CloudinaryConfig",t?.UIConfig.CloudinaryConfig),localStorage.setItem("DataDaysRange",t?.UIConfig.DataDaysRange),localStorage.setItem("SubscriptionStatus",JSON.stringify(t?.SubscriptionStatus));let e=this.getParseToken();p.IsNotEmpty(e?.NotificationOutletID)&&localStorage.setItem("NotificationOutletID",e?.NotificationOutletID),this.roleService.parseJWTRoles(),this._loginResponse=null}getParseToken(){let t=localStorage.getItem("Token");return t&&!this._jwtToken&&(this._jwtToken=p.parseJwt(t)),this._jwtToken}get loginResponse(){return this._loginResponse}getSubscriptionStatus(){let t=localStorage.getItem("SubscriptionStatus");return t?parseInt(t):null}static \u0275fac=function(e){return new(e||n)(c(k),c(y),c(v),c(T),c(b),c(R))};static \u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"})};export{U as a,y as b,C as c};