mp-front-cli 2.1.1-next-4 → 2.1.1-next-5

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.
@@ -1,23 +1,23 @@
1
- var J = Object.defineProperty;
2
- var H = (A, s, e) => s in A ? J(A, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : A[s] = e;
3
- var C = (A, s, e) => H(A, typeof s != "symbol" ? s + "" : s, e);
4
- import { of as O, switchMap as N, forkJoin as d, catchError as U, EMPTY as P, filter as _ } from "rxjs";
5
- import { CustomEncrypter as $ } from "./mp-front-cli-encrypter.js";
6
- import { CustomHeader as M } from "./mp-front-cli-header.js";
7
- import Q from "querystring";
1
+ var Y = Object.defineProperty;
2
+ var X = (A, t, e) => t in A ? Y(A, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : A[t] = e;
3
+ var O = (A, t, e) => X(A, typeof t != "symbol" ? t + "" : t, e);
4
+ import { of as n, switchMap as N, forkJoin as p, catchError as U, EMPTY as h, filter as G } from "rxjs";
5
+ import { CustomEncrypter as b } from "./mp-front-cli-encrypter.js";
6
+ import y from "i18next";
7
+ import { CustomHeader as V } from "./mp-front-cli-header.js";
8
+ import J from "querystring";
8
9
  import { f as L } from "./service-token-DUKgd-pZ.js";
9
- import { L as c, M as p } from "./loading-handler-Br21zGTA.js";
10
- import { C as Y, l as g } from "./custom-encoder-Cfd7FFMe.js";
11
- import { u as X } from "./stringify-93tp0umt.js";
12
- import { CustomLogger as G } from "./mp-front-cli-logger.js";
13
- import h from "i18next";
14
- import { t as b } from "./index-Dy5KNkhq.js";
15
- const u = (A) => (h.init({
10
+ import { L as S, M as x } from "./loading-handler-Br21zGTA.js";
11
+ import { C as K, l as c } from "./custom-encoder-Cfd7FFMe.js";
12
+ import { CustomLogger as u } from "./mp-front-cli-logger.js";
13
+ import { u as Z } from "./stringify-93tp0umt.js";
14
+ import { t as k } from "./index-Dy5KNkhq.js";
15
+ const D = (A) => (y.init({
16
16
  resources: {
17
17
  es: {
18
18
  translation: {
19
19
  errors: {
20
- ...b.errors,
20
+ ...k.errors,
21
21
  ...(A == null ? void 0 : A.es) ?? {}
22
22
  }
23
23
  }
@@ -33,7 +33,7 @@ const u = (A) => (h.init({
33
33
  // react already safes from xss
34
34
  },
35
35
  debug: !1
36
- }), h), K = {
36
+ }), y), j = {
37
37
  "SKIPFINGERPRINT-WITHOUT-PERMISSIONS-01": {
38
38
  code: 400,
39
39
  type: "modal",
@@ -90,7 +90,7 @@ const u = (A) => (h.init({
90
90
  title: "errors.helpdesk.UNEXCEPTED-ERROR.title",
91
91
  level: "error"
92
92
  }
93
- }, Z = {
93
+ }, W = {
94
94
  "PF-CANCEL-APPLICATION-GENERIC-ERROR-001": {
95
95
  code: 400,
96
96
  type: "modal",
@@ -98,10 +98,10 @@ const u = (A) => (h.init({
98
98
  title: "errors.PF-CANCEL-APPLICATION-GENERIC-ERROR-001.title",
99
99
  level: "error"
100
100
  }
101
- }, k = {
102
- ...Z,
103
- ...K
104
- }, j = {
101
+ }, z = {
102
+ ...W,
103
+ ...j
104
+ }, H = {
105
105
  UNAUTHORIZED: {
106
106
  level: "warning",
107
107
  type: "modal",
@@ -944,36 +944,36 @@ const u = (A) => (h.init({
944
944
  type: "modal",
945
945
  level: "warning"
946
946
  },
947
- ...k
947
+ ...z
948
948
  };
949
- class I extends G {
949
+ class d extends u {
950
950
  constructor() {
951
951
  super(...arguments);
952
- C(this, "errorCatalog", { ...j });
953
- C(this, "i18Next");
952
+ O(this, "errorCatalog", { ...H });
953
+ O(this, "i18Next");
954
954
  }
955
955
  get(e = "default", r = "NOT_FOUND") {
956
- var a, l;
957
- const { errorCatalog: t } = this;
956
+ var o, l;
957
+ const { errorCatalog: s } = this;
958
958
  if (e instanceof Error)
959
959
  return this.logError(e.message), {
960
- ...t.internalError,
961
- title: this.translate(t.internalError.title),
962
- message: this.translate(t.internalError.message),
960
+ ...s.internalError,
961
+ title: this.translate(s.internalError.title),
962
+ message: this.translate(s.internalError.message),
963
963
  uuid: r
964
964
  };
965
965
  const E = typeof e == "string" ? e : e.code ?? e.errorType;
966
966
  this.logDebug("statusCode", E);
967
- const o = typeof e == "string" ? {} : { ...e };
967
+ const a = typeof e == "string" ? {} : { ...e };
968
968
  return {
969
- ...t[E] ?? t.default,
969
+ ...s[E] ?? s.default,
970
970
  title: this.translate(
971
- ((a = t[E]) == null ? void 0 : a.title) ?? t.default.title,
972
- o
971
+ ((o = s[E]) == null ? void 0 : o.title) ?? s.default.title,
972
+ a
973
973
  ),
974
974
  message: this.translate(
975
- ((l = t[E]) == null ? void 0 : l.message) ?? t.default.message,
976
- o
975
+ ((l = s[E]) == null ? void 0 : l.message) ?? s.default.message,
976
+ a
977
977
  ),
978
978
  payload: typeof e != "string" ? { errorCode: e.code } : {},
979
979
  uuid: r
@@ -983,83 +983,129 @@ class I extends G {
983
983
  this.errorCatalog = { ...this.errorCatalog, ...e };
984
984
  }
985
985
  setI18nResources(e) {
986
- this.i18Next = u(e);
986
+ this.i18Next = D(e);
987
987
  }
988
988
  translate(e, r = {}) {
989
- return this.i18Next || (this.i18Next = u()), this.i18Next.t(e, { payload: r });
989
+ return this.i18Next || (this.i18Next = D()), this.i18Next.t(e, { payload: r });
990
990
  }
991
991
  }
992
- class ce extends $ {
992
+ const m = class m {
993
+ constructor() {
994
+ O(this, "customLogger", new u());
995
+ O(this, "exceptions", { ...H });
996
+ }
997
+ static getInstance() {
998
+ return m.instance || (m.instance = new m()), m.instance;
999
+ }
1000
+ init(t, e) {
1001
+ this.exceptions = { ...this.exceptions, ...t }, m.i18n = D(e);
1002
+ }
1003
+ get(t, e = "NOT_FOUND") {
1004
+ var E, a;
1005
+ if (m.i18n || (m.i18n = D()), t instanceof Error) {
1006
+ this.customLogger.logError(t.message);
1007
+ const o = this.exceptions.internalError;
1008
+ return {
1009
+ ...o,
1010
+ title: this.translate(o.title),
1011
+ message: this.translate(o.message),
1012
+ uuid: e
1013
+ };
1014
+ }
1015
+ const r = typeof t == "string" ? t : t.code ?? t.errorType;
1016
+ this.customLogger.logDebug("statusCode", r);
1017
+ const s = typeof t == "string" ? {} : { ...t };
1018
+ return {
1019
+ ...this.exceptions[r] ?? this.exceptions.default,
1020
+ title: this.translate(
1021
+ ((E = this.exceptions[r]) == null ? void 0 : E.title) ?? this.exceptions.default.title,
1022
+ s
1023
+ ),
1024
+ message: this.translate(
1025
+ ((a = this.exceptions[r]) == null ? void 0 : a.message) ?? this.exceptions.default.message,
1026
+ s
1027
+ ),
1028
+ payload: typeof t != "string" ? { errorCode: t.code } : {},
1029
+ uuid: e
1030
+ };
1031
+ }
1032
+ translate(t, e = {}) {
1033
+ return m.i18n.t(t, { payload: e });
1034
+ }
1035
+ };
1036
+ O(m, "instance"), O(m, "i18n");
1037
+ let I = m;
1038
+ class De extends b {
993
1039
  constructor() {
994
1040
  super(...arguments);
995
- C(this, "uuid", "");
996
- C(this, "session", null);
1041
+ O(this, "uuid", "");
1042
+ O(this, "session", null);
997
1043
  }
998
1044
  setSession(e) {
999
1045
  this.session = e;
1000
1046
  }
1001
1047
  getSession() {
1002
- if (!this.session) throw new I().get("SESSION_NOT_FOUND");
1048
+ if (!this.session) throw I.getInstance().get("SESSION_NOT_FOUND");
1003
1049
  return this.session;
1004
1050
  }
1005
- returnData(e, r, t) {
1006
- const E = this.encode(r, t);
1051
+ returnData(e, r, s) {
1052
+ const E = this.encode(r, s);
1007
1053
  e.status(200).json(E);
1008
1054
  }
1009
1055
  returnError(e, r) {
1010
- return r != null && r.uuid ? e.status(520).json(r) : e.status(520).json(new I().get(r, this.uuid));
1056
+ return r != null && r.uuid ? e.status(520).json(r) : e.status(520).json(I.getInstance().get(r, this.uuid));
1011
1057
  }
1012
1058
  get(e) {
1013
- return this.logDebug("get ApiMiddleware"), (r, t) => {
1059
+ return this.logDebug("get ApiMiddleware"), (r, s) => {
1014
1060
  var E;
1015
- this.logDebug("return ApiMiddleware"), this.uuid = (E = r == null ? void 0 : r.body) == null ? void 0 : E.uuid, O(r).pipe(
1061
+ this.logDebug("return ApiMiddleware"), this.uuid = (E = r == null ? void 0 : r.body) == null ? void 0 : E.uuid, n(r).pipe(
1016
1062
  N(
1017
- (o) => d({
1018
- params: O(this.decode(o.body)),
1019
- headers: O(o.headers)
1063
+ (a) => p({
1064
+ params: n(this.decode(a.body)),
1065
+ headers: n(a.headers)
1020
1066
  })
1021
1067
  ),
1022
1068
  N(
1023
- ({ params: o, headers: a }) => d({
1024
- response: e(o, this.uuid, a),
1025
- headers: O(a),
1026
- params: O(o)
1069
+ ({ params: a, headers: o }) => p({
1070
+ response: e(a, this.uuid, o),
1071
+ headers: n(o),
1072
+ params: n(a)
1027
1073
  })
1028
1074
  ),
1029
- N(({ params: o, response: a, headers: l }) => (this.logDebug(
1030
- `ApiMiddleware \x1B[37m <URL>: \x1B[33m ${r.url} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(l)} \x1B[37m <UUID> \x1B[33m ${r.body.uuid} \x1B[37m <PARAMS> \x1B[33m ${JSON.stringify(o)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(a)}`
1031
- ), O(a))),
1032
- U((o) => {
1033
- var a;
1075
+ N(({ params: a, response: o, headers: l }) => (this.logDebug(
1076
+ `ApiMiddleware \x1B[37m <URL>: \x1B[33m ${r.url} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(l)} \x1B[37m <UUID> \x1B[33m ${r.body.uuid} \x1B[37m <PARAMS> \x1B[33m ${JSON.stringify(a)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(o)}`
1077
+ ), n(o))),
1078
+ U((a) => {
1079
+ var o;
1034
1080
  return this.logError(
1035
- `ApiMiddleware <URL>: ${r == null ? void 0 : r.url} <HEADERS>: ${JSON.stringify(r == null ? void 0 : r.headers)} <UUID> ${(a = r == null ? void 0 : r.body) == null ? void 0 : a.uuid} <PARAMS> ${JSON.stringify(r == null ? void 0 : r.body)} <ERROR>: ${JSON.stringify(o)}`
1036
- ), this.returnError(t, o), P;
1081
+ `ApiMiddleware <URL>: ${r == null ? void 0 : r.url} <HEADERS>: ${JSON.stringify(r == null ? void 0 : r.headers)} <UUID> ${(o = r == null ? void 0 : r.body) == null ? void 0 : o.uuid} <PARAMS> ${JSON.stringify(r == null ? void 0 : r.body)} <ERROR>: ${JSON.stringify(a)}`
1082
+ ), this.returnError(s, a), h;
1037
1083
  })
1038
1084
  ).subscribe({
1039
- next: (o) => {
1040
- this.logDebug("ApiMiddleware subscribe next", JSON.stringify(o)), this.returnData(t, o, this.uuid);
1085
+ next: (a) => {
1086
+ this.logDebug("ApiMiddleware subscribe next", JSON.stringify(a)), this.returnData(s, a, this.uuid);
1041
1087
  }
1042
1088
  });
1043
1089
  };
1044
1090
  }
1045
1091
  }
1046
- const W = process.env.ID_FRONT ?? "NOT_AVAILABLE";
1047
- class Se extends M {
1048
- constructor(e, r, t = {}) {
1049
- super(t);
1050
- C(this, "apiUrl");
1051
- C(this, "method");
1092
+ const q = process.env.ID_FRONT ?? "NOT_AVAILABLE";
1093
+ class de extends V {
1094
+ constructor(e, r, s = {}) {
1095
+ super(s);
1096
+ O(this, "apiUrl");
1097
+ O(this, "method");
1052
1098
  this.apiUrl = e, this.method = r ?? "POST";
1053
1099
  }
1054
1100
  errorHandler(e, r) {
1055
1101
  if (e != null && e.errors)
1056
- throw new I().get(e.errors[0], r);
1102
+ throw I.getInstance().get(e.errors[0], r);
1057
1103
  return !(e != null && e.errors);
1058
1104
  }
1059
1105
  formatParams(e) {
1060
1106
  return JSON.stringify({
1061
1107
  data: {
1062
- type: W,
1108
+ type: q,
1063
1109
  attributes: e
1064
1110
  }
1065
1111
  });
@@ -1067,11 +1113,11 @@ class Se extends M {
1067
1113
  fetchData(e = {}, r) {
1068
1114
  return this.getHeaders().pipe(
1069
1115
  N(
1070
- (t) => L(
1116
+ (s) => L(
1071
1117
  this.apiUrl,
1072
1118
  {
1073
1119
  method: "POST",
1074
- headers: t,
1120
+ headers: s,
1075
1121
  body: this.formatParams(e),
1076
1122
  selector: (E) => E.json()
1077
1123
  }
@@ -1079,157 +1125,157 @@ class Se extends M {
1079
1125
  U((E) => {
1080
1126
  throw this.logError(JSON.stringify(E)), this.logError(
1081
1127
  `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1082
- t
1128
+ s
1083
1129
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1084
1130
  this.formatParams(e)
1085
1131
  )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(E)} \x1B[33m`
1086
- ), new I().get("default", r);
1132
+ ), I.getInstance().get("default", r);
1087
1133
  }),
1088
1134
  N((E) => (this.logDebug(
1089
1135
  `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1090
- t
1136
+ s
1091
1137
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1092
1138
  this.formatParams(e)
1093
1139
  )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(E)} \x1B[33m`
1094
- ), O(E)))
1140
+ ), n(E)))
1095
1141
  )
1096
1142
  ),
1097
- _((t) => this.errorHandler(t, r))
1143
+ G((s) => this.errorHandler(s, r))
1098
1144
  );
1099
1145
  }
1100
- fetchCustomData(e = {}, r, t) {
1146
+ fetchCustomData(e = {}, r, s) {
1101
1147
  const E = {
1102
1148
  "Content-Type": "application/json"
1103
- }, o = Q.stringify(
1149
+ }, a = J.stringify(
1104
1150
  e
1105
- ), a = `${this.apiUrl}?${o}`, l = this.method === "GET" ? a : this.apiUrl;
1106
- return this.getHeaders(E, t).pipe(
1151
+ ), o = `${this.apiUrl}?${a}`, l = this.method === "GET" ? o : this.apiUrl;
1152
+ return this.getHeaders(E, s).pipe(
1107
1153
  N(
1108
- (i) => L(l, {
1154
+ (R) => L(l, {
1109
1155
  method: this.method,
1110
- headers: i,
1156
+ headers: R,
1111
1157
  body: this.method === "GET" ? null : JSON.stringify(e),
1112
1158
  selector: (T) => T.json()
1113
1159
  }).pipe(
1114
1160
  U((T) => {
1115
1161
  throw this.logError(JSON.stringify(T)), this.logError(
1116
1162
  `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${l} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1117
- i
1163
+ R
1118
1164
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1119
1165
  this.formatParams(e)
1120
1166
  )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(T)} \x1B[33m`
1121
- ), new I().get("default", r);
1167
+ ), I.getInstance().get("default", r);
1122
1168
  }),
1123
1169
  N((T) => (this.logDebug(
1124
1170
  `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${l} \x1B[37m \x1B[37m <METHOD>: \x1B[33m ${this.method} <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1125
- i
1171
+ R
1126
1172
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1127
1173
  e
1128
1174
  )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(T)} \x1B[33m`
1129
- ), O(T)))
1175
+ ), n(T)))
1130
1176
  )
1131
1177
  )
1132
1178
  );
1133
1179
  }
1134
1180
  }
1135
- const z = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
1136
- function q(A) {
1137
- return typeof A == "string" && z.test(A);
1181
+ const ee = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
1182
+ function re(A) {
1183
+ return typeof A == "string" && ee.test(A);
1138
1184
  }
1139
- function ee(A) {
1140
- if (!q(A))
1185
+ function te(A) {
1186
+ if (!re(A))
1141
1187
  throw TypeError("Invalid UUID");
1142
- let s;
1188
+ let t;
1143
1189
  const e = new Uint8Array(16);
1144
- return e[0] = (s = parseInt(A.slice(0, 8), 16)) >>> 24, e[1] = s >>> 16 & 255, e[2] = s >>> 8 & 255, e[3] = s & 255, e[4] = (s = parseInt(A.slice(9, 13), 16)) >>> 8, e[5] = s & 255, e[6] = (s = parseInt(A.slice(14, 18), 16)) >>> 8, e[7] = s & 255, e[8] = (s = parseInt(A.slice(19, 23), 16)) >>> 8, e[9] = s & 255, e[10] = (s = parseInt(A.slice(24, 36), 16)) / 1099511627776 & 255, e[11] = s / 4294967296 & 255, e[12] = s >>> 24 & 255, e[13] = s >>> 16 & 255, e[14] = s >>> 8 & 255, e[15] = s & 255, e;
1190
+ return e[0] = (t = parseInt(A.slice(0, 8), 16)) >>> 24, e[1] = t >>> 16 & 255, e[2] = t >>> 8 & 255, e[3] = t & 255, e[4] = (t = parseInt(A.slice(9, 13), 16)) >>> 8, e[5] = t & 255, e[6] = (t = parseInt(A.slice(14, 18), 16)) >>> 8, e[7] = t & 255, e[8] = (t = parseInt(A.slice(19, 23), 16)) >>> 8, e[9] = t & 255, e[10] = (t = parseInt(A.slice(24, 36), 16)) / 1099511627776 & 255, e[11] = t / 4294967296 & 255, e[12] = t >>> 24 & 255, e[13] = t >>> 16 & 255, e[14] = t >>> 8 & 255, e[15] = t & 255, e;
1145
1191
  }
1146
- function re(A) {
1192
+ function se(A) {
1147
1193
  A = unescape(encodeURIComponent(A));
1148
- const s = [];
1194
+ const t = [];
1149
1195
  for (let e = 0; e < A.length; ++e)
1150
- s.push(A.charCodeAt(e));
1151
- return s;
1196
+ t.push(A.charCodeAt(e));
1197
+ return t;
1152
1198
  }
1153
- const te = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", se = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
1154
- function Ee(A, s, e) {
1155
- function r(t, E, o, a) {
1199
+ const Ee = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", le = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
1200
+ function Ae(A, t, e) {
1201
+ function r(s, E, a, o) {
1156
1202
  var l;
1157
- if (typeof t == "string" && (t = re(t)), typeof E == "string" && (E = ee(E)), ((l = E) === null || l === void 0 ? void 0 : l.length) !== 16)
1203
+ if (typeof s == "string" && (s = se(s)), typeof E == "string" && (E = te(E)), ((l = E) === null || l === void 0 ? void 0 : l.length) !== 16)
1158
1204
  throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
1159
- let i = new Uint8Array(16 + t.length);
1160
- if (i.set(E), i.set(t, E.length), i = e(i), i[6] = i[6] & 15 | s, i[8] = i[8] & 63 | 128, o) {
1161
- a = a || 0;
1205
+ let R = new Uint8Array(16 + s.length);
1206
+ if (R.set(E), R.set(s, E.length), R = e(R), R[6] = R[6] & 15 | t, R[8] = R[8] & 63 | 128, a) {
1207
+ o = o || 0;
1162
1208
  for (let T = 0; T < 16; ++T)
1163
- o[a + T] = i[T];
1164
- return o;
1209
+ a[o + T] = R[T];
1210
+ return a;
1165
1211
  }
1166
- return X(i);
1212
+ return Z(R);
1167
1213
  }
1168
1214
  try {
1169
1215
  r.name = A;
1170
1216
  } catch {
1171
1217
  }
1172
- return r.DNS = te, r.URL = se, r;
1218
+ return r.DNS = Ee, r.URL = le, r;
1173
1219
  }
1174
- function le(A, s, e, r) {
1220
+ function ae(A, t, e, r) {
1175
1221
  switch (A) {
1176
1222
  case 0:
1177
- return s & e ^ ~s & r;
1223
+ return t & e ^ ~t & r;
1178
1224
  case 1:
1179
- return s ^ e ^ r;
1225
+ return t ^ e ^ r;
1180
1226
  case 2:
1181
- return s & e ^ s & r ^ e & r;
1227
+ return t & e ^ t & r ^ e & r;
1182
1228
  case 3:
1183
- return s ^ e ^ r;
1229
+ return t ^ e ^ r;
1184
1230
  }
1185
1231
  }
1186
- function S(A, s) {
1187
- return A << s | A >>> 32 - s;
1232
+ function P(A, t) {
1233
+ return A << t | A >>> 32 - t;
1188
1234
  }
1189
- function Ae(A) {
1190
- const s = [1518500249, 1859775393, 2400959708, 3395469782], e = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
1235
+ function oe(A) {
1236
+ const t = [1518500249, 1859775393, 2400959708, 3395469782], e = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
1191
1237
  if (typeof A == "string") {
1192
- const o = unescape(encodeURIComponent(A));
1238
+ const a = unescape(encodeURIComponent(A));
1193
1239
  A = [];
1194
- for (let a = 0; a < o.length; ++a)
1195
- A.push(o.charCodeAt(a));
1240
+ for (let o = 0; o < a.length; ++o)
1241
+ A.push(a.charCodeAt(o));
1196
1242
  } else Array.isArray(A) || (A = Array.prototype.slice.call(A));
1197
1243
  A.push(128);
1198
- const r = A.length / 4 + 2, t = Math.ceil(r / 16), E = new Array(t);
1199
- for (let o = 0; o < t; ++o) {
1200
- const a = new Uint32Array(16);
1244
+ const r = A.length / 4 + 2, s = Math.ceil(r / 16), E = new Array(s);
1245
+ for (let a = 0; a < s; ++a) {
1246
+ const o = new Uint32Array(16);
1201
1247
  for (let l = 0; l < 16; ++l)
1202
- a[l] = A[o * 64 + l * 4] << 24 | A[o * 64 + l * 4 + 1] << 16 | A[o * 64 + l * 4 + 2] << 8 | A[o * 64 + l * 4 + 3];
1203
- E[o] = a;
1248
+ o[l] = A[a * 64 + l * 4] << 24 | A[a * 64 + l * 4 + 1] << 16 | A[a * 64 + l * 4 + 2] << 8 | A[a * 64 + l * 4 + 3];
1249
+ E[a] = o;
1204
1250
  }
1205
- E[t - 1][14] = (A.length - 1) * 8 / Math.pow(2, 32), E[t - 1][14] = Math.floor(E[t - 1][14]), E[t - 1][15] = (A.length - 1) * 8 & 4294967295;
1206
- for (let o = 0; o < t; ++o) {
1207
- const a = new Uint32Array(80);
1208
- for (let n = 0; n < 16; ++n)
1209
- a[n] = E[o][n];
1210
- for (let n = 16; n < 80; ++n)
1211
- a[n] = S(a[n - 3] ^ a[n - 8] ^ a[n - 14] ^ a[n - 16], 1);
1212
- let l = e[0], i = e[1], T = e[2], m = e[3], R = e[4];
1213
- for (let n = 0; n < 80; ++n) {
1214
- const B = Math.floor(n / 20), V = S(l, 5) + le(B, i, T, m) + R + s[B] + a[n] >>> 0;
1215
- R = m, m = T, T = S(i, 30) >>> 0, i = l, l = V;
1251
+ E[s - 1][14] = (A.length - 1) * 8 / Math.pow(2, 32), E[s - 1][14] = Math.floor(E[s - 1][14]), E[s - 1][15] = (A.length - 1) * 8 & 4294967295;
1252
+ for (let a = 0; a < s; ++a) {
1253
+ const o = new Uint32Array(80);
1254
+ for (let C = 0; C < 16; ++C)
1255
+ o[C] = E[a][C];
1256
+ for (let C = 16; C < 80; ++C)
1257
+ o[C] = P(o[C - 3] ^ o[C - 8] ^ o[C - 14] ^ o[C - 16], 1);
1258
+ let l = e[0], R = e[1], T = e[2], g = e[3], i = e[4];
1259
+ for (let C = 0; C < 80; ++C) {
1260
+ const f = Math.floor(C / 20), $ = P(l, 5) + ae(f, R, T, g) + i + t[f] + o[C] >>> 0;
1261
+ i = g, g = T, T = P(R, 30) >>> 0, R = l, l = $;
1216
1262
  }
1217
- e[0] = e[0] + l >>> 0, e[1] = e[1] + i >>> 0, e[2] = e[2] + T >>> 0, e[3] = e[3] + m >>> 0, e[4] = e[4] + R >>> 0;
1263
+ e[0] = e[0] + l >>> 0, e[1] = e[1] + R >>> 0, e[2] = e[2] + T >>> 0, e[3] = e[3] + g >>> 0, e[4] = e[4] + i >>> 0;
1218
1264
  }
1219
1265
  return [e[0] >> 24 & 255, e[0] >> 16 & 255, e[0] >> 8 & 255, e[0] & 255, e[1] >> 24 & 255, e[1] >> 16 & 255, e[1] >> 8 & 255, e[1] & 255, e[2] >> 24 & 255, e[2] >> 16 & 255, e[2] >> 8 & 255, e[2] & 255, e[3] >> 24 & 255, e[3] >> 16 & 255, e[3] >> 8 & 255, e[3] & 255, e[4] >> 24 & 255, e[4] >> 16 & 255, e[4] >> 8 & 255, e[4] & 255];
1220
1266
  }
1221
- const f = Ee("v5", 80, Ae);
1222
- class De extends Y {
1223
- constructor(e, r = "POST", t = {}) {
1267
+ const v = Ae("v5", 80, oe);
1268
+ class Pe extends K {
1269
+ constructor(e, r = "POST", s = {}) {
1224
1270
  super();
1225
- C(this, "apiUrl");
1226
- C(this, "method");
1227
- C(this, "headers");
1228
- C(this, "isLoadingEnabled", !0);
1229
- C(this, "errorResponse");
1271
+ O(this, "apiUrl");
1272
+ O(this, "method");
1273
+ O(this, "headers");
1274
+ O(this, "isLoadingEnabled", !0);
1275
+ O(this, "errorResponse");
1230
1276
  this.apiUrl = e, this.method = r, this.headers = {
1231
1277
  "Content-Type": "application/json",
1232
- ...t
1278
+ ...s
1233
1279
  };
1234
1280
  }
1235
1281
  setIsLoadingEnabled(e) {
@@ -1239,37 +1285,37 @@ class De extends Y {
1239
1285
  this.errorResponse = e;
1240
1286
  }
1241
1287
  fetchData(e = {}) {
1242
- const r = (/* @__PURE__ */ new Date()).toISOString(), t = f(r, f.URL), E = this.encode({ ...e }, t);
1243
- c.getInstance().setSubject(this.isLoadingEnabled);
1244
- const a = new URLSearchParams(window.location.search).get("flow") ?? "N/A";
1288
+ const r = (/* @__PURE__ */ new Date()).toISOString(), s = v(r, v.URL), E = this.encode({ ...e }, s);
1289
+ S.getInstance().setSubject(this.isLoadingEnabled);
1290
+ const o = new URLSearchParams(window.location.search).get("flow") ?? "N/A";
1245
1291
  return L(this.apiUrl, {
1246
1292
  method: this.method,
1247
- headers: { ...this.headers, flow: a },
1293
+ headers: { ...this.headers, flow: o },
1248
1294
  body: E,
1249
1295
  selector: (l) => l.json()
1250
1296
  }).pipe(
1251
- N((l) => O(this.decode(l))),
1297
+ N((l) => n(this.decode(l))),
1252
1298
  N((l) => l.code && (l.type === "modal" || l.type === "message") ? (this.logError(
1253
1299
  `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${E} <RESPONSE>: ${JSON.stringify(l)}`
1254
- ), c.getInstance().setSubject(!1), p.getInstance().setSubject(l), this.errorResponse ? O(this.errorResponse) : P) : O(l)),
1255
- N((l) => (c.getInstance().setSubject(!1), this.logDebug(
1300
+ ), S.getInstance().setSubject(!1), x.getInstance().setSubject(l), this.errorResponse ? n(this.errorResponse) : h) : n(l)),
1301
+ N((l) => (S.getInstance().setSubject(!1), this.logDebug(
1256
1302
  `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${E} <RESPONSE>: ${JSON.stringify(l)}`
1257
- ), O(l))),
1303
+ ), n(l))),
1258
1304
  U((l) => (this.logError(
1259
1305
  `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${E} <RESPONSE>: ${JSON.stringify(l)}`
1260
- ), c.getInstance().setSubject(!1), p.getInstance().setSubject(
1261
- new I().get(l, t)
1262
- ), this.errorResponse ? O(this.errorResponse) : P))
1306
+ ), S.getInstance().setSubject(!1), x.getInstance().setSubject(
1307
+ I.getInstance().get(l, s)
1308
+ ), this.errorResponse ? n(this.errorResponse) : h))
1263
1309
  );
1264
1310
  }
1265
1311
  }
1266
- const oe = process.env.ID_FRONT ?? "NOT_AVAILABLE";
1267
- class de extends M {
1268
- constructor(e, r, t = {}) {
1269
- super(t);
1270
- C(this, "apiUrl");
1271
- C(this, "method");
1272
- C(this, "errorCatalog", new I());
1312
+ const ie = process.env.ID_FRONT ?? "NOT_AVAILABLE";
1313
+ class Be extends V {
1314
+ constructor(e, r, s = {}) {
1315
+ super(s);
1316
+ O(this, "apiUrl");
1317
+ O(this, "method");
1318
+ O(this, "errorCatalog", new d());
1273
1319
  this.apiUrl = e, this.method = r ?? "POST";
1274
1320
  }
1275
1321
  errorHandler(e, r) {
@@ -1280,104 +1326,104 @@ class de extends M {
1280
1326
  formatParams(e) {
1281
1327
  return JSON.stringify({
1282
1328
  data: {
1283
- type: oe,
1329
+ type: ie,
1284
1330
  attributes: e
1285
1331
  }
1286
1332
  });
1287
1333
  }
1288
1334
  fetchData(e = {}, r) {
1289
- const { resources: t, errors: E } = this.onInit();
1290
- return this.errorCatalog.setErrors(E), this.errorCatalog.setI18nResources(t), this.getHeaders().pipe(
1335
+ const { resources: s, errors: E } = this.onInit();
1336
+ return this.errorCatalog.setErrors(E), this.errorCatalog.setI18nResources(s), this.getHeaders().pipe(
1291
1337
  N(
1292
- (o) => L(
1338
+ (a) => L(
1293
1339
  this.apiUrl,
1294
1340
  {
1295
1341
  method: "POST",
1296
- headers: o,
1342
+ headers: a,
1297
1343
  body: this.formatParams(e),
1298
- selector: (a) => a.json()
1344
+ selector: (o) => o.json()
1299
1345
  }
1300
1346
  ).pipe(
1301
- U((a) => {
1302
- throw this.logError(JSON.stringify(a)), this.logError(
1347
+ U((o) => {
1348
+ throw this.logError(JSON.stringify(o)), this.logError(
1303
1349
  `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1304
- o
1350
+ a
1305
1351
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1306
1352
  this.formatParams(e)
1307
- )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(a)} \x1B[33m`
1308
- ), new I().get("default", r);
1353
+ )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(o)} \x1B[33m`
1354
+ ), new d().get("default", r);
1309
1355
  }),
1310
- N((a) => (this.logDebug(
1356
+ N((o) => (this.logDebug(
1311
1357
  `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1312
- o
1358
+ a
1313
1359
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1314
1360
  this.formatParams(e)
1315
- )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(a)} \x1B[33m`
1316
- ), O(a)))
1361
+ )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(o)} \x1B[33m`
1362
+ ), n(o)))
1317
1363
  )
1318
1364
  ),
1319
- _((o) => this.errorHandler(o, r))
1365
+ G((a) => this.errorHandler(a, r))
1320
1366
  );
1321
1367
  }
1322
- fetchCustomData(e = {}, r, t) {
1323
- const { resources: E, errors: o } = this.onInit();
1324
- this.errorCatalog.setErrors(o), this.errorCatalog.setI18nResources(E);
1325
- const a = {
1368
+ fetchCustomData(e = {}, r, s) {
1369
+ const { resources: E, errors: a } = this.onInit();
1370
+ this.errorCatalog.setErrors(a), this.errorCatalog.setI18nResources(E);
1371
+ const o = {
1326
1372
  "Content-Type": "application/json"
1327
- }, l = Q.stringify(
1373
+ }, l = J.stringify(
1328
1374
  e
1329
- ), i = `${this.apiUrl}?${l}`, T = this.method === "GET" ? i : this.apiUrl;
1330
- return this.getHeaders(a, t).pipe(
1375
+ ), R = `${this.apiUrl}?${l}`, T = this.method === "GET" ? R : this.apiUrl;
1376
+ return this.getHeaders(o, s).pipe(
1331
1377
  N(
1332
- (m) => L(T, {
1378
+ (g) => L(T, {
1333
1379
  method: this.method,
1334
- headers: m,
1380
+ headers: g,
1335
1381
  body: this.method === "GET" ? null : JSON.stringify(e),
1336
- selector: (R) => R.json()
1382
+ selector: (i) => i.json()
1337
1383
  }).pipe(
1338
- U((R) => {
1339
- throw this.logError(JSON.stringify(R)), this.logError(
1384
+ U((i) => {
1385
+ throw this.logError(JSON.stringify(i)), this.logError(
1340
1386
  `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${T} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1341
- m
1387
+ g
1342
1388
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1343
1389
  this.formatParams(e)
1344
- )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(R)} \x1B[33m`
1345
- ), new I().get("default", r);
1390
+ )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(i)} \x1B[33m`
1391
+ ), new d().get("default", r);
1346
1392
  }),
1347
- N((R) => (this.logDebug(
1393
+ N((i) => (this.logDebug(
1348
1394
  `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${T} \x1B[37m \x1B[37m <METHOD>: \x1B[33m ${this.method} <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1349
- m
1395
+ g
1350
1396
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1351
1397
  e
1352
- )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(R)} \x1B[33m`
1353
- ), O(R)))
1398
+ )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(i)} \x1B[33m`
1399
+ ), n(i)))
1354
1400
  )
1355
1401
  )
1356
1402
  );
1357
1403
  }
1358
1404
  }
1359
- const D = {
1405
+ const B = {
1360
1406
  client_id: process.env.AZURE_AD_CLIENT_ID,
1361
1407
  client_secret: process.env.AZURE_AD_CLIENT_SECRET,
1362
1408
  resource: process.env.AZURE_AD_CLIENT_RESOURCE,
1363
1409
  grant_type: process.env.AZURE_AD_CLIENT_GRANT_TYPE
1364
- }, y = process.env.AZURE_AD_GRAPH_URL_TOKEN, w = process.env.AZURE_AD_TENANT_ID;
1365
- class ae extends G {
1410
+ }, w = process.env.AZURE_AD_GRAPH_URL_TOKEN, F = process.env.AZURE_AD_TENANT_ID;
1411
+ class Re extends u {
1366
1412
  getHeaders() {
1367
- const s = Object.keys(D).some((r) => g.isEmpty(D[r]));
1368
- if (g.isEmpty(y) || g.isEmpty(w))
1413
+ const t = Object.keys(B).some((r) => c.isEmpty(B[r]));
1414
+ if (c.isEmpty(w) || c.isEmpty(F))
1369
1415
  throw this.logError(
1370
1416
  "AZURE_AD_GRAPH_URL_TOKEN or AZURE_AD_TENANT_ID are empty or missing"
1371
1417
  ), new Error(
1372
1418
  "AZURE_AD_GRAPH_URL_TOKEN or AZURE_AD_TENANT_ID are empty or missing"
1373
1419
  );
1374
- if (s)
1420
+ if (t)
1375
1421
  throw this.logError(
1376
1422
  "Some variables are empty or missing, check AZURE_AD_CLIENT_ID, AZURE_AD_CLIENT_SECRET, AZURE_AD_CLIENT_RESOURCE, AZURE_AD_CLIENT_GRANT_TYPE"
1377
1423
  ), new Error("some variables are empty or missing");
1378
- const e = y.replace(
1424
+ const e = w.replace(
1379
1425
  "AZURE_AD_TENANT_ID",
1380
- w
1426
+ F
1381
1427
  );
1382
1428
  return L(e, {
1383
1429
  method: "POST",
@@ -1385,13 +1431,13 @@ class ae extends G {
1385
1431
  Accept: "application/json",
1386
1432
  "Content-Type": "application/x-www-form-urlencoded"
1387
1433
  },
1388
- body: new URLSearchParams(D),
1434
+ body: new URLSearchParams(B),
1389
1435
  selector: (r) => r.json()
1390
1436
  }).pipe(
1391
1437
  N((r) => (this.logDebug(
1392
1438
  "response from API new_url_365_graph_token",
1393
1439
  JSON.stringify(r)
1394
- ), O({
1440
+ ), n({
1395
1441
  headers: {
1396
1442
  Authorization: `Bearer ${r == null ? void 0 : r.access_token}`,
1397
1443
  responseType: "json"
@@ -1400,91 +1446,91 @@ class ae extends G {
1400
1446
  );
1401
1447
  }
1402
1448
  }
1403
- const v = process.env.AZURE_AD_GRAPH_GET_APP_ROLES, x = process.env.AZURE_AD_GRAPH_GET_USER_BY_EMAIL, F = process.env.AZURE_AD_GRAPH_GROUPS;
1404
- class Pe extends ae {
1405
- getAppRoles(s) {
1406
- if (g.isEmpty(v))
1449
+ const _ = process.env.AZURE_AD_GRAPH_GET_APP_ROLES, M = process.env.AZURE_AD_GRAPH_GET_USER_BY_EMAIL, Q = process.env.AZURE_AD_GRAPH_GROUPS;
1450
+ class pe extends Re {
1451
+ getAppRoles(t) {
1452
+ if (c.isEmpty(_))
1407
1453
  throw this.logError("AZURE_AD_GRAPH_GET_APP_ROLES URL is empty or missing"), new Error("AZURE_AD_GRAPH_GET_APP_ROLES URL is empty or missing");
1408
- const e = v.replace(
1454
+ const e = _.replace(
1409
1455
  "{id-obj}",
1410
- `${s}`
1456
+ `${t}`
1411
1457
  );
1412
1458
  return this.getHeaders().pipe(
1413
1459
  N(
1414
1460
  (r) => L(e, {
1415
1461
  method: "GET",
1416
1462
  headers: r == null ? void 0 : r.headers,
1417
- selector: (t) => t.json()
1418
- }).pipe(N((t) => O({ roles: t == null ? void 0 : t.value })))
1463
+ selector: (s) => s.json()
1464
+ }).pipe(N((s) => n({ roles: s == null ? void 0 : s.value })))
1419
1465
  )
1420
1466
  );
1421
1467
  }
1422
- getAppRoleAssignments(s) {
1423
- if (g.isEmpty(x))
1468
+ getAppRoleAssignments(t) {
1469
+ if (c.isEmpty(M))
1424
1470
  throw this.logError("AZURE_AD_GRAPH_GET_USER_BY_EMAIL URL is empty or missing"), new Error(
1425
1471
  "AZURE_AD_GRAPH_GET_USER_BY_EMAIL URL is empty or missing"
1426
1472
  );
1427
- const r = `${x.replace(
1473
+ const r = `${M.replace(
1428
1474
  "{user-mail}",
1429
- `${s}/appRoleAssignments`
1475
+ `${t}/appRoleAssignments`
1430
1476
  )}?$select=appRoleId,resourceDisplayName`;
1431
1477
  return this.getHeaders().pipe(
1432
1478
  N(
1433
- (t) => L(r, {
1479
+ (s) => L(r, {
1434
1480
  method: "GET",
1435
- headers: t == null ? void 0 : t.headers,
1481
+ headers: s == null ? void 0 : s.headers,
1436
1482
  selector: (E) => E.json()
1437
1483
  })
1438
1484
  )
1439
1485
  );
1440
1486
  }
1441
- userRolesByApp(s, e) {
1442
- return d({
1487
+ userRolesByApp(t, e) {
1488
+ return p({
1443
1489
  appRoles: this.getAppRoles(e),
1444
- appRoleAssignments: this.getAppRoleAssignments(s)
1490
+ appRoleAssignments: this.getAppRoleAssignments(t)
1445
1491
  }).pipe(
1446
- N(({ appRoles: r, appRoleAssignments: t }) => {
1447
- var a;
1448
- const E = (a = t == null ? void 0 : t.value) == null ? void 0 : a.map(
1492
+ N(({ appRoles: r, appRoleAssignments: s }) => {
1493
+ var o;
1494
+ const E = (o = s == null ? void 0 : s.value) == null ? void 0 : o.map(
1449
1495
  (l) => {
1450
- var i, T, m;
1451
- return (m = (T = (i = r == null ? void 0 : r.roles) == null ? void 0 : i.filter((R) => (R == null ? void 0 : R.id) === (l == null ? void 0 : l.appRoleId))) == null ? void 0 : T.filter((R) => R == null ? void 0 : R.isEnabled)) == null ? void 0 : m.map((R) => ({
1496
+ var R, T, g;
1497
+ return (g = (T = (R = r == null ? void 0 : r.roles) == null ? void 0 : R.filter((i) => (i == null ? void 0 : i.id) === (l == null ? void 0 : l.appRoleId))) == null ? void 0 : T.filter((i) => i == null ? void 0 : i.isEnabled)) == null ? void 0 : g.map((i) => ({
1452
1498
  appRoleId: l == null ? void 0 : l.appRoleId,
1453
- displayName: R == null ? void 0 : R.displayName,
1454
- value: R == null ? void 0 : R.value
1499
+ displayName: i == null ? void 0 : i.displayName,
1500
+ value: i == null ? void 0 : i.value
1455
1501
  }));
1456
1502
  }
1457
- ).flat(), o = E == null ? void 0 : E.map((l) => l == null ? void 0 : l.appRoleId);
1458
- return O({ roles: o });
1503
+ ).flat(), a = E == null ? void 0 : E.map((l) => l == null ? void 0 : l.appRoleId);
1504
+ return n({ roles: a });
1459
1505
  })
1460
1506
  );
1461
1507
  }
1462
- getRolesFromApi(s, e) {
1463
- return this.userRolesByApp(s, e).pipe(
1464
- N((r) => O(r))
1508
+ getRolesFromApi(t, e) {
1509
+ return this.userRolesByApp(t, e).pipe(
1510
+ N((r) => n(r))
1465
1511
  );
1466
1512
  }
1467
- getRoles(s, e) {
1468
- return this.getRolesFromApi(s, e);
1513
+ getRoles(t, e) {
1514
+ return this.getRolesFromApi(t, e);
1469
1515
  }
1470
- getGroupsFromApi(s) {
1471
- if (this.logDebug("getGroupsFromApi by email: ", JSON.stringify(s)), g.isEmpty(F))
1516
+ getGroupsFromApi(t) {
1517
+ if (this.logDebug("getGroupsFromApi by email: ", JSON.stringify(t)), c.isEmpty(Q))
1472
1518
  throw this.logError("AZURE_AD_GRAPH_GROUPS URL is empty or missing"), new Error("AZURE_AD_GRAPH_GROUPS URL is empty or missing");
1473
- const e = `${F.replace("idUser", s)}?$select=id,description,displayName`;
1519
+ const e = `${Q.replace("idUser", t)}?$select=id,description,displayName`;
1474
1520
  return this.logDebug("URL base: ", e), this.getHeaders().pipe(
1475
1521
  N(
1476
1522
  (r) => L(e, {
1477
1523
  method: "GET",
1478
1524
  headers: r == null ? void 0 : r.headers,
1479
- selector: (t) => t.json()
1525
+ selector: (s) => s.json()
1480
1526
  }).pipe(
1481
- N((t) => (this.logDebug("response from API: ", JSON.stringify(t)), O(t)))
1527
+ N((s) => (this.logDebug("response from API: ", JSON.stringify(s)), n(s)))
1482
1528
  )
1483
1529
  )
1484
1530
  );
1485
1531
  }
1486
- getUserGroups(s) {
1487
- return this.getGroupsFromApi(s);
1532
+ getUserGroups(t) {
1533
+ return this.getGroupsFromApi(t);
1488
1534
  }
1489
1535
  /**
1490
1536
  *
@@ -1492,11 +1538,11 @@ class Pe extends ae {
1492
1538
  * @param idGroup id del grupo de EntraID
1493
1539
  * @returns `true` si el usuario pertenece al grupo
1494
1540
  */
1495
- inGroup(s, e) {
1496
- return this.logDebug("Check inGroup params: ", JSON.stringify({ email: s, idGroup: e })), g.isEmpty(s) || g.isEmpty(e) ? (this.logError("inGroup method error"), this.logError("email or idGroup are empty or missing"), O(!1)) : this.getUserGroups(s).pipe(
1541
+ inGroup(t, e) {
1542
+ return this.logDebug("Check inGroup params: ", JSON.stringify({ email: t, idGroup: e })), c.isEmpty(t) || c.isEmpty(e) ? (this.logError("inGroup method error"), this.logError("email or idGroup are empty or missing"), n(!1)) : this.getUserGroups(t).pipe(
1497
1543
  N((r) => {
1498
- var t;
1499
- return O((t = r == null ? void 0 : r.value) == null ? void 0 : t.some((E) => (E == null ? void 0 : E.id) === e));
1544
+ var s;
1545
+ return n((s = r == null ? void 0 : r.value) == null ? void 0 : s.some((E) => (E == null ? void 0 : E.id) === e));
1500
1546
  })
1501
1547
  );
1502
1548
  }
@@ -1507,23 +1553,24 @@ class Pe extends ae {
1507
1553
  * @param idObjApp id del objeto de la aplicacion `Identificador de objeto` en EntraID
1508
1554
  * @returns `true` si el usuario tiene asignado el rol
1509
1555
  */
1510
- inRole(s, e, r) {
1556
+ inRole(t, e, r) {
1511
1557
  return this.logDebug(
1512
1558
  "Check inRole params: ",
1513
- JSON.stringify({ email: s, idRole: e, idObjApp: r })
1514
- ), g.isEmpty(s) || g.isEmpty(e) || g.isEmpty(r) ? (this.logError("inRole method error"), this.logError("email or idRole or idObjApp are empty or missing"), O(!1)) : this.getRoles(s, r).pipe(
1515
- N((t) => {
1559
+ JSON.stringify({ email: t, idRole: e, idObjApp: r })
1560
+ ), c.isEmpty(t) || c.isEmpty(e) || c.isEmpty(r) ? (this.logError("inRole method error"), this.logError("email or idRole or idObjApp are empty or missing"), n(!1)) : this.getRoles(t, r).pipe(
1561
+ N((s) => {
1516
1562
  var E;
1517
- return O((E = t == null ? void 0 : t.roles) == null ? void 0 : E.includes(e));
1563
+ return n((E = s == null ? void 0 : s.roles) == null ? void 0 : E.includes(e));
1518
1564
  })
1519
1565
  );
1520
1566
  }
1521
1567
  }
1522
1568
  export {
1523
- ce as A,
1524
- I as E,
1525
- Se as F,
1526
- De as a,
1527
- de as b,
1528
- Pe as c
1569
+ De as A,
1570
+ d as E,
1571
+ de as F,
1572
+ I as a,
1573
+ Pe as b,
1574
+ Be as c,
1575
+ pe as d
1529
1576
  };