mp-front-cli 0.0.78 → 0.0.80

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 (93) hide show
  1. package/dist/core/errors/error-catalog.d.ts +16 -0
  2. package/dist/core/errors/error-catalog.d.ts.map +1 -0
  3. package/dist/core/errors/index.d.ts +2 -0
  4. package/dist/core/errors/index.d.ts.map +1 -0
  5. package/dist/core/errors/message-error.d.ts +16 -0
  6. package/dist/core/errors/message-error.d.ts.map +1 -0
  7. package/dist/core/index.d.ts +5 -0
  8. package/dist/core/index.d.ts.map +1 -0
  9. package/dist/core/interfaces/api-response.d.ts +56 -0
  10. package/dist/core/interfaces/api-response.d.ts.map +1 -0
  11. package/dist/core/interfaces/index.d.ts +4 -0
  12. package/dist/core/interfaces/index.d.ts.map +1 -0
  13. package/dist/core/interfaces/message.d.ts +16 -0
  14. package/dist/core/interfaces/message.d.ts.map +1 -0
  15. package/dist/core/interfaces/method.d.ts +2 -0
  16. package/dist/core/interfaces/method.d.ts.map +1 -0
  17. package/dist/core/middleware/index.d.ts +17 -0
  18. package/dist/core/middleware/index.d.ts.map +1 -0
  19. package/dist/core/services/service-token.d.ts +11 -0
  20. package/dist/core/services/service-token.d.ts.map +1 -0
  21. package/dist/core/utils/api-request/fetch-service-be.d.ts +14 -0
  22. package/dist/core/utils/api-request/fetch-service-be.d.ts.map +1 -0
  23. package/dist/core/utils/api-request/fetch-service-fe.d.ts +14 -0
  24. package/dist/core/utils/api-request/fetch-service-fe.d.ts.map +1 -0
  25. package/dist/core/utils/api-request/index.d.ts +3 -0
  26. package/dist/core/utils/api-request/index.d.ts.map +1 -0
  27. package/dist/core/utils/custom-adapter.d.ts +15 -0
  28. package/dist/core/utils/custom-adapter.d.ts.map +1 -0
  29. package/dist/core/utils/custom-cache.d.ts +58 -0
  30. package/dist/core/utils/custom-cache.d.ts.map +1 -0
  31. package/dist/core/utils/custom-encoder.d.ts +8 -0
  32. package/dist/core/utils/custom-encoder.d.ts.map +1 -0
  33. package/dist/core/utils/custom-encrypter.d.ts +10 -0
  34. package/dist/core/utils/custom-encrypter.d.ts.map +1 -0
  35. package/dist/core/utils/custom-header.d.ts +9 -0
  36. package/dist/core/utils/custom-header.d.ts.map +1 -0
  37. package/dist/core/utils/custom-logger.d.ts +16 -0
  38. package/dist/core/utils/custom-logger.d.ts.map +1 -0
  39. package/dist/core/utils/custom-redis.d.ts +4 -0
  40. package/dist/core/utils/custom-redis.d.ts.map +1 -0
  41. package/dist/core/utils/func/escape_unicode.d.ts +2 -0
  42. package/dist/core/utils/func/escape_unicode.d.ts.map +1 -0
  43. package/dist/core/utils/func/index.d.ts +2 -0
  44. package/dist/core/utils/func/index.d.ts.map +1 -0
  45. package/dist/core/utils/index.d.ts +3 -0
  46. package/dist/core/utils/index.d.ts.map +1 -0
  47. package/dist/core/utils/rxjs/index.d.ts +4 -0
  48. package/dist/core/utils/rxjs/index.d.ts.map +1 -0
  49. package/dist/core/utils/rxjs/loading-handler.d.ts +7 -0
  50. package/dist/core/utils/rxjs/loading-handler.d.ts.map +1 -0
  51. package/dist/core/utils/rxjs/message-handler.d.ts +8 -0
  52. package/dist/core/utils/rxjs/message-handler.d.ts.map +1 -0
  53. package/dist/core/utils/rxjs/rx-subject-manager.d.ts +9 -0
  54. package/dist/core/utils/rxjs/rx-subject-manager.d.ts.map +1 -0
  55. package/dist/custom-header-b6432556.js +866 -0
  56. package/dist/custom-redis-bee66564.js +11 -0
  57. package/dist/index-f596eb97.js +341 -0
  58. package/dist/index.d.ts +2 -0
  59. package/dist/index.d.ts.map +1 -0
  60. package/dist/lang/common/errors/calculator/en_EN/index.d.ts +10 -0
  61. package/dist/lang/common/errors/calculator/en_EN/index.d.ts.map +1 -0
  62. package/dist/lang/common/errors/calculator/es_MX/index.d.ts +190 -0
  63. package/dist/lang/common/errors/calculator/es_MX/index.d.ts.map +1 -0
  64. package/dist/lang/common/errors/calculator/index.d.ts +3 -0
  65. package/dist/lang/common/errors/calculator/index.d.ts.map +1 -0
  66. package/dist/lang/common/errors/en_EN/index.d.ts +5 -0
  67. package/dist/lang/common/errors/en_EN/index.d.ts.map +1 -0
  68. package/dist/lang/common/errors/es_MX/index.d.ts +332 -0
  69. package/dist/lang/common/errors/es_MX/index.d.ts.map +1 -0
  70. package/dist/lang/common/errors/index.d.ts +3 -0
  71. package/dist/lang/common/errors/index.d.ts.map +1 -0
  72. package/dist/lang/common/index.d.ts +2 -0
  73. package/dist/lang/common/index.d.ts.map +1 -0
  74. package/dist/lang/index.d.ts +3 -0
  75. package/dist/lang/index.d.ts.map +1 -0
  76. package/dist/lang/validator/en_EN/index.d.ts +5 -0
  77. package/dist/lang/validator/en_EN/index.d.ts.map +1 -0
  78. package/dist/lang/validator/es_MX/index.d.ts +41 -0
  79. package/dist/lang/validator/es_MX/index.d.ts.map +1 -0
  80. package/dist/lang/validator/index.d.ts +3 -0
  81. package/dist/lang/validator/index.d.ts.map +1 -0
  82. package/dist/mp-front-cli-adapter.es.js +174 -0
  83. package/dist/mp-front-cli-all.es.js +21 -0
  84. package/dist/mp-front-cli-cache.es.js +87 -0
  85. package/dist/mp-front-cli-core.es.js +881 -0
  86. package/dist/mp-front-cli-encoder.es.js +3706 -0
  87. package/dist/mp-front-cli-encrypter.es.js +55 -0
  88. package/dist/mp-front-cli-header.es.js +10 -0
  89. package/dist/mp-front-cli-locale.es.js +50 -0
  90. package/dist/mp-front-cli-logger.es.js +60 -0
  91. package/dist/mp-front-cli-utils-rxjs.es.js +46 -0
  92. package/dist/stringify-788d71a0.js +9 -0
  93. package/package.json +2 -2
@@ -0,0 +1,881 @@
1
+ var Q = Object.defineProperty;
2
+ var h = (l, t, e) => t in l ? Q(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
+ var L = (l, t, e) => (h(l, typeof t != "symbol" ? t + "" : t, e), e);
4
+ import { MessageHandler as u, LoadingHandler as U } from "./mp-front-cli-utils-rxjs.es.js";
5
+ import { RxSubjectManager as ge } from "./mp-front-cli-utils-rxjs.es.js";
6
+ import w, { t as C } from "i18next";
7
+ import { t as v } from "./index-f596eb97.js";
8
+ import { CustomLogger as x } from "./mp-front-cli-logger.es.js";
9
+ import { of as T, switchMap as c, forkJoin as I, catchError as B, EMPTY as p, filter as P } from "rxjs";
10
+ import { CustomEncrypter as G } from "./mp-front-cli-encrypter.es.js";
11
+ import { C as M, f as D } from "./custom-header-b6432556.js";
12
+ import { CustomEncoder as F } from "./mp-front-cli-encoder.es.js";
13
+ import { u as V } from "./stringify-788d71a0.js";
14
+ import "node-jose";
15
+ import "crypto";
16
+ const J = {
17
+ es: {
18
+ translation: {
19
+ ...v
20
+ }
21
+ }
22
+ };
23
+ w.init({
24
+ resources: J,
25
+ lng: "es",
26
+ // language to use, more information here: https://www.i18next.com/overview/configuration-options#languages-namespaces-resources
27
+ // you can use the i18n.changeLanguage function to change the language manually: https://www.i18next.com/overview/api#changelanguage
28
+ // if you're using a language detector, do not define the lng option
29
+ supportedLngs: ["es", "en"],
30
+ interpolation: {
31
+ escapeValue: !1
32
+ // react already safes from xss
33
+ },
34
+ debug: !1
35
+ });
36
+ const g = {
37
+ "MP-001": {
38
+ code: 400,
39
+ type: "modal",
40
+ message: "errors.MP-001.message",
41
+ title: "errors.MP-001.title",
42
+ level: "info"
43
+ },
44
+ UNAUTHORIZED: {
45
+ level: "error",
46
+ type: "modal",
47
+ message: "errors.UnAuthorized.message",
48
+ title: "errors.UnAuthorized.title",
49
+ code: 310
50
+ },
51
+ "ERR-GENERAL-01": {
52
+ level: "error",
53
+ type: "modal",
54
+ message: "errors.ERR-GENERAL-01.message",
55
+ title: "errors.ERR-GENERAL-01.title",
56
+ code: 400
57
+ },
58
+ internalError: {
59
+ level: "error",
60
+ type: "modal",
61
+ message: "errors.internalError.message",
62
+ title: "errors.internalError.title",
63
+ code: 500
64
+ },
65
+ default: {
66
+ code: 520,
67
+ type: "modal",
68
+ message: "errors.default.message",
69
+ title: "errors.default.title",
70
+ level: "warning"
71
+ },
72
+ // Biometric
73
+ "PF-BIOMETRIC-001": {
74
+ title: "errors.PF-BIOMETRIC-001.title",
75
+ message: "errors.PF-BIOMETRIC-001.message",
76
+ level: "warning",
77
+ code: 420,
78
+ type: "modal"
79
+ },
80
+ "PF-BIOMETRIC-002": {
81
+ title: "errors.PF-BIOMETRIC-002.title",
82
+ message: "errors.PF-BIOMETRIC-002.message",
83
+ level: "warning",
84
+ code: 420,
85
+ type: "modal"
86
+ },
87
+ "PF-BIOMETRIC-003": {
88
+ title: "errors.PF-BIOMETRIC-003.title",
89
+ message: "errors.PF-BIOMETRIC-003.message",
90
+ level: "warning",
91
+ code: 420,
92
+ type: "modal"
93
+ },
94
+ "PF-BIOMETRIC-004": {
95
+ code: 421,
96
+ type: "modal",
97
+ message: "errors.PF-BIOMETRIC-004.message",
98
+ title: "errors.PF-BIOMETRIC-004.title",
99
+ level: "warning"
100
+ },
101
+ "PF-VALIDATE-CLIENTTYPE-003": {
102
+ title: "errors.PF-VALIDATE-CLIENTTYPE-003.title",
103
+ message: "errors.PF-VALIDATE-CLIENTTYPE-003.message",
104
+ level: "warning",
105
+ code: 420,
106
+ type: "modal"
107
+ },
108
+ // Calculator
109
+ "SCORE-CLIENTREJECTED-01": {
110
+ title: "errors.calculator.SCORE-CLIENTREJECTED-01.title",
111
+ message: "errors.calculator.SCORE-CLIENTREJECTED-01.message",
112
+ code: 310,
113
+ type: "modal",
114
+ level: "warning"
115
+ },
116
+ "CALCULATOR-MAPPING-01": {
117
+ title: "errors.calculator.CALCULATOR-MAPPING-01.title",
118
+ message: "errors.calculator.CALCULATOR-MAPPING-01.message",
119
+ code: 420,
120
+ type: "modal",
121
+ level: "warning"
122
+ },
123
+ "CALCULATOR-MAPPING-02": {
124
+ title: "errors.calculator.CALCULATOR-MAPPING-02.title",
125
+ message: "errors.calculator.CALCULATOR-MAPPING-02.message",
126
+ code: 420,
127
+ type: "modal",
128
+ level: "warning"
129
+ },
130
+ "CALCULATOR-MAPPING-03": {
131
+ title: "errors.calculator.CALCULATOR-MAPPING-03.title",
132
+ message: "errors.calculator.CALCULATOR-MAPPING-03.message",
133
+ code: 420,
134
+ type: "modal",
135
+ level: "warning"
136
+ },
137
+ "CALCULATOR-MAPPING-04": {
138
+ title: "errors.calculator.CALCULATOR-MAPPING-04.title",
139
+ message: "errors.calculator.CALCULATOR-MAPPING-04.message",
140
+ code: 420,
141
+ type: "modal",
142
+ level: "warning"
143
+ },
144
+ "CALCULATOR-BAD-REQUEST-01": {
145
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-01.title",
146
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-01.message",
147
+ code: 420,
148
+ type: "modal",
149
+ level: "warning"
150
+ },
151
+ "CALCULATOR-BAD-REQUEST-02": {
152
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-02.title",
153
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-02.message",
154
+ code: 420,
155
+ type: "modal",
156
+ level: "warning"
157
+ },
158
+ "CALCULATOR-BAD-REQUEST-03": {
159
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-03.title",
160
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-03.message",
161
+ code: 420,
162
+ type: "modal",
163
+ level: "warning"
164
+ },
165
+ "CALCULATOR-BAD-REQUEST-04": {
166
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-04.title",
167
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-04.message",
168
+ code: 420,
169
+ type: "modal",
170
+ level: "warning"
171
+ },
172
+ "CALCULATOR-BAD-REQUEST-05": {
173
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-05.title",
174
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-05.message",
175
+ code: 420,
176
+ type: "modal",
177
+ level: "warning"
178
+ },
179
+ "CALCULATOR-BAD-REQUEST-06": {
180
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-06.title",
181
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-06.message",
182
+ code: 420,
183
+ type: "modal",
184
+ level: "warning"
185
+ },
186
+ "CALCULATOR-BAD-REQUEST-07": {
187
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-07.title",
188
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-07.message",
189
+ code: 420,
190
+ type: "modal",
191
+ level: "warning"
192
+ },
193
+ "CALCULATOR-BAD-REQUEST-08": {
194
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-08.title",
195
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-08.message",
196
+ code: 420,
197
+ type: "modal",
198
+ level: "warning"
199
+ },
200
+ "CALCULATOR-BAD-REQUEST-09": {
201
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-09.title",
202
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-09.message",
203
+ code: 420,
204
+ type: "modal",
205
+ level: "warning"
206
+ },
207
+ "CALCULATOR-BAD-REQUEST-10": {
208
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-10.title",
209
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-10.message",
210
+ code: 420,
211
+ type: "modal",
212
+ level: "warning"
213
+ },
214
+ "CALCULATOR-BAD-REQUEST-11": {
215
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-11.title",
216
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-11.message",
217
+ code: 420,
218
+ type: "modal",
219
+ level: "warning"
220
+ },
221
+ "CALCULATOR-BAD-REQUEST-12": {
222
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-12.title",
223
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-12.message",
224
+ code: 420,
225
+ type: "modal",
226
+ level: "warning"
227
+ },
228
+ "CALCULATOR-BAD-REQUEST-13": {
229
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-13.title",
230
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-13.message",
231
+ code: 420,
232
+ type: "modal",
233
+ level: "warning"
234
+ },
235
+ "CALCULATOR-BAD-REQUEST-14": {
236
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-14.title",
237
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-14.message",
238
+ code: 420,
239
+ type: "modal",
240
+ level: "warning"
241
+ },
242
+ "CALCULATOR-BAD-REQUEST-15": {
243
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-15.title",
244
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-15.message",
245
+ code: 420,
246
+ type: "modal",
247
+ level: "warning"
248
+ },
249
+ "CALCULATOR-BAD-REQUEST-16": {
250
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-16.title",
251
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-16.message",
252
+ code: 420,
253
+ type: "modal",
254
+ level: "warning"
255
+ },
256
+ "CALCULATOR-BAD-REQUEST-17": {
257
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-17.title",
258
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-17.message",
259
+ code: 420,
260
+ type: "modal",
261
+ level: "warning"
262
+ },
263
+ "CALCULATOR-BAD-REQUEST-18": {
264
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-18.title",
265
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-18.message",
266
+ code: 420,
267
+ type: "modal",
268
+ level: "warning"
269
+ },
270
+ "CALCULATOR-BAD-REQUEST-19": {
271
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-19.title",
272
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-19.message",
273
+ code: 420,
274
+ type: "modal",
275
+ level: "warning"
276
+ },
277
+ "CALCULATOR-BAD-REQUEST-20": {
278
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-20.title",
279
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-20.message",
280
+ code: 420,
281
+ type: "modal",
282
+ level: "warning"
283
+ },
284
+ "CALCULATOR-BAD-REQUEST-21": {
285
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-21.title",
286
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-21.message",
287
+ code: 420,
288
+ type: "modal",
289
+ level: "warning"
290
+ },
291
+ "CALCULATOR-BAD-REQUEST-22": {
292
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-22.title",
293
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-22.message",
294
+ code: 420,
295
+ type: "modal",
296
+ level: "warning"
297
+ },
298
+ "CALCULATOR-BAD-REQUEST-23": {
299
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-23.title",
300
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-23.message",
301
+ code: 420,
302
+ type: "modal",
303
+ level: "warning"
304
+ },
305
+ "CALCULATOR-BAD-REQUEST-24": {
306
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-24.title",
307
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-24.message",
308
+ code: 420,
309
+ type: "modal",
310
+ level: "warning"
311
+ },
312
+ "CALCULATOR-BAD-REQUEST-25": {
313
+ title: "errors.calculator.CALCULATOR-BAD-REQUEST-25.title",
314
+ message: "errors.calculator.CALCULATOR-BAD-REQUEST-25.message",
315
+ code: 420,
316
+ type: "modal",
317
+ level: "warning"
318
+ },
319
+ "CALCULATOR-UNAUTHORIZED-01": {
320
+ title: "errors.calculator.CALCULATOR-UNAUTHORIZED-01.title",
321
+ message: "errors.calculator.CALCULATOR-UNAUTHORIZED-01.message",
322
+ code: 420,
323
+ type: "modal",
324
+ level: "warning"
325
+ },
326
+ "CALCULATOR-UNAUTHORIZED-02": {
327
+ title: "errors.calculator.CALCULATOR-UNAUTHORIZED-02.title",
328
+ message: "errors.calculator.CALCULATOR-UNAUTHORIZED-02.message",
329
+ code: 420,
330
+ type: "modal",
331
+ level: "warning"
332
+ },
333
+ "CALCULATOR-SERVICE-UNAVAILABLE-01": {
334
+ title: "errors.calculator.CALCULATOR-SERVICE-UNAVAILABLE-01.title",
335
+ message: "errors.calculator.CALCULATOR-SERVICE-UNAVAILABLE-01.message",
336
+ code: 420,
337
+ type: "modal",
338
+ level: "warning"
339
+ },
340
+ "CALCULATOR-SERVICE-UNAVAILABLE-02": {
341
+ title: "errors.calculator.CALCULATOR-SERVICE-UNAVAILABLE-02.title",
342
+ message: "errors.calculator.CALCULATOR-SERVICE-UNAVAILABLE-02.message",
343
+ code: 420,
344
+ type: "modal",
345
+ level: "warning"
346
+ },
347
+ "CALCULATOR-NOT-FOUND-01": {
348
+ title: "errors.calculator.CALCULATOR-NOT-FOUND-01.title",
349
+ message: "errors.calculator.CALCULATOR-NOT-FOUND-01.message",
350
+ code: 420,
351
+ type: "modal",
352
+ level: "warning"
353
+ },
354
+ "CALCULATOR-NOT-FOUND-02": {
355
+ title: "errors.calculator.CALCULATOR-NOT-FOUND-02.title",
356
+ message: "errors.calculator.CALCULATOR-NOT-FOUND-02.message",
357
+ code: 420,
358
+ type: "modal",
359
+ level: "warning"
360
+ },
361
+ "CALCULATOR-SAP-ERROR-01": {
362
+ title: "errors.calculator.CALCULATOR-SAP-ERROR-01.title",
363
+ message: "errors.calculator.CALCULATOR-SAP-ERROR-01.message",
364
+ code: 420,
365
+ type: "modal",
366
+ level: "warning"
367
+ },
368
+ "CALCULATOR-SAP-ERROR-02": {
369
+ title: "errors.calculator.CALCULATOR-SAP-ERROR-02.title",
370
+ message: "errors.calculator.CALCULATOR-SAP-ERROR-02.message",
371
+ code: 420,
372
+ type: "modal",
373
+ level: "warning"
374
+ },
375
+ "CALCULATOR-SAP-ERROR-03": {
376
+ title: "errors.calculator.CALCULATOR-SAP-ERROR-03.title",
377
+ message: "errors.calculator.CALCULATOR-SAP-ERROR-03.message",
378
+ code: 420,
379
+ type: "modal",
380
+ level: "warning"
381
+ },
382
+ "CALCULATOR-SAP-ERROR-04": {
383
+ title: "errors.calculator.CALCULATOR-SAP-ERROR-04.title",
384
+ message: "errors.calculator.CALCULATOR-SAP-ERROR-04.message",
385
+ code: 420,
386
+ type: "modal",
387
+ level: "warning"
388
+ },
389
+ "CALCULATOR-GENERIC-001": {
390
+ title: "errors.calculator.CALCULATOR-GENERIC-001.title",
391
+ message: "errors.calculator.CALCULATOR-GENERIC-001.message",
392
+ code: 420,
393
+ type: "modal",
394
+ level: "warning"
395
+ },
396
+ //Apartadito
397
+ "SAVING_NOT_FOUND-01": {
398
+ title: "errors.calculator.SAVING_NOT_FOUND-01.title",
399
+ message: "errors.calculator.SAVING_NOT_FOUND-01.message",
400
+ code: 420,
401
+ type: "modal",
402
+ level: "warning"
403
+ },
404
+ "SAVING-BAD-REQUEST-01": {
405
+ title: "errors.calculator.SAVING-BAD-REQUEST-01.title",
406
+ message: "errors.calculator.SAVING-BAD-REQUEST-01.message",
407
+ code: 420,
408
+ type: "modal",
409
+ level: "warning"
410
+ },
411
+ "SAVING-BAD-REQUEST-02": {
412
+ title: "errors.calculator.SAVING-BAD-REQUEST-02.title",
413
+ message: "errors.calculator.SAVING-BAD-REQUEST-02.message",
414
+ code: 420,
415
+ type: "modal",
416
+ level: "warning"
417
+ },
418
+ "SAVING-BAD-REQUEST-03": {
419
+ title: "errors.calculator.SAVING-BAD-REQUEST-03.title",
420
+ message: "errors.calculator.SAVING-BAD-REQUEST-03.message",
421
+ code: 420,
422
+ type: "modal",
423
+ level: "warning"
424
+ },
425
+ "SAVING-GENERIC-01": {
426
+ title: "errors.calculator.SAVING-GENERIC-01.title",
427
+ message: "errors.calculator.SAVING-GENERIC-01.message",
428
+ code: 420,
429
+ type: "modal",
430
+ level: "warning"
431
+ },
432
+ //JORNADA
433
+ "JOURNEY-INVALIDATEDATA-01": {
434
+ title: "errors.JOURNEY-INVALIDATEDATA-01.title",
435
+ message: "errors.JOURNEY-INVALIDATEDATA-01.message",
436
+ code: 420,
437
+ type: "modal",
438
+ level: "warning"
439
+ },
440
+ "JOURNEY-DATANOTFOUND-02": {
441
+ title: "errors.JOURNEY-DATANOTFOUND-02.title",
442
+ message: "errors.JOURNEY-DATANOTFOUND-02.message",
443
+ code: 420,
444
+ type: "modal",
445
+ level: "warning"
446
+ },
447
+ "JOURNEY-FLOWEND-03": {
448
+ title: "errors.JOURNEY-FLOWEND-03.title",
449
+ message: "errors.JOURNEY-FLOWEND-03.message",
450
+ code: 420,
451
+ type: "modal",
452
+ level: "warning"
453
+ },
454
+ "PF-ERROR-GENERIC": {
455
+ title: "errors.PF-ERROR-GENERIC.title",
456
+ message: "errors.PF-ERROR-GENERIC.message",
457
+ code: 420,
458
+ type: "modal",
459
+ level: "warning"
460
+ },
461
+ "JOURNEY-IDSTATEINCORRECT-04": {
462
+ title: "errors.JOURNEY-IDSTATEINCORRECT-04.title",
463
+ message: "errors.JOURNEY-IDSTATEINCORRECT-04.message",
464
+ code: 420,
465
+ type: "modal",
466
+ level: "warning"
467
+ },
468
+ "JOURNEY-HEADERS-05": {
469
+ title: "errors.JOURNEY-HEADERS-05.title",
470
+ message: "errors.JOURNEY-HEADERS-05.message",
471
+ code: 420,
472
+ type: "modal",
473
+ level: "warning"
474
+ },
475
+ //INITIAL
476
+ "INITIAL-INVALIDATEDATA-01": {
477
+ title: "errors.INITIAL-INVALIDATEDATA-01.title",
478
+ message: "errors.INITIAL-INVALIDATEDATA-01.message",
479
+ code: 420,
480
+ type: "modal",
481
+ level: "warning"
482
+ },
483
+ "INITIAL-DATANOTFOUND-02": {
484
+ title: "errors.INITIAL-DATANOTFOUND-02.title",
485
+ message: "errors.INITIAL-DATANOTFOUND-02.message",
486
+ code: 420,
487
+ type: "modal",
488
+ level: "warning"
489
+ },
490
+ "INITIAL-HEADERS-03": {
491
+ title: "errors.INITIAL-HEADERS-03.title",
492
+ message: "errors.INITIAL-HEADERS-03.message",
493
+ code: 420,
494
+ type: "modal",
495
+ level: "warning"
496
+ },
497
+ //PERSONAL DATA
498
+ "PERSONALDATA-INVALID-MEDIA-TYPE": {
499
+ title: "errors.PERSONALDATA-INVALID-MEDIA-TYPE.title",
500
+ message: "errors.PERSONALDATA-INVALID-MEDIA-TYPE.message",
501
+ code: 420,
502
+ type: "modal",
503
+ level: "warning"
504
+ },
505
+ "PERSONALDATA-INVALID-CONTENT-TYPE": {
506
+ title: "errors.PERSONALDATA-INVALID-CONTENT-TYPE.title",
507
+ message: "errors.PERSONALDATA-INVALID-CONTENT-TYPE.message",
508
+ code: 420,
509
+ type: "modal",
510
+ level: "warning"
511
+ },
512
+ "PERSONALDATA-INVALID-DATA-TYPE": {
513
+ title: "errors.PERSONALDATA-INVALID-DATA-TYPE.title",
514
+ message: "errors.PERSONALDATA-INVALID-DATA-TYPE.message",
515
+ code: 420,
516
+ type: "modal",
517
+ level: "warning"
518
+ },
519
+ "PERSONALDATA-UNKNOWN-REGISTER-01": {
520
+ title: "errors.PERSONALDATA-UNKNOWN-REGISTER-01.title",
521
+ message: "errors.PERSONALDATA-UNKNOWN-REGISTER-01.message",
522
+ code: 420,
523
+ type: "modal",
524
+ level: "warning"
525
+ },
526
+ "PERSONALDATA-UNKNOWN-REGISTER-02": {
527
+ title: "errors.PERSONALDATA-UNKNOWN-REGISTER-02.title",
528
+ message: "errors.PERSONALDATA-UNKNOWN-REGISTER-02.message",
529
+ code: 420,
530
+ type: "modal",
531
+ level: "warning"
532
+ },
533
+ "PERSONALDATA-BAD-REQUEST-01": {
534
+ title: "errors.PERSONALDATA-BAD-REQUEST-01.title",
535
+ message: "errors.PERSONALDATA-BAD-REQUEST-01.message",
536
+ code: 420,
537
+ type: "modal",
538
+ level: "warning"
539
+ },
540
+ "PERSONALDATA-BAD-REQUEST-02": {
541
+ title: "errors.PERSONALDATA-BAD-REQUEST-02.title",
542
+ message: "errors.PERSONALDATA-BAD-REQUEST-02.message",
543
+ code: 420,
544
+ type: "modal",
545
+ level: "warning"
546
+ },
547
+ "PERSONALDATA-BAD-REQUEST-03": {
548
+ title: "errors.PERSONALDATA-BAD-REQUEST-03.title",
549
+ message: "errors.PERSONALDATA-BAD-REQUEST-03.message",
550
+ code: 420,
551
+ type: "modal",
552
+ level: "warning"
553
+ },
554
+ "PERSONALDATA-BAD-REQUEST-04": {
555
+ title: "errors.PERSONALDATA-BAD-REQUEST-04.title",
556
+ message: "errors.PERSONALDATA-BAD-REQUEST-04.message",
557
+ code: 420,
558
+ type: "modal",
559
+ level: "warning"
560
+ },
561
+ "PERSONALDATA-BAD-REQUEST-05": {
562
+ title: "errors.PERSONALDATA-BAD-REQUEST-05.title",
563
+ message: "errors.PERSONALDATA-BAD-REQUEST-05.message",
564
+ code: 420,
565
+ type: "modal",
566
+ level: "warning"
567
+ },
568
+ "PERSONALDATA-BAD-REQUEST-06": {
569
+ title: "errors.PERSONALDATA-BAD-REQUEST-06.title",
570
+ message: "errors.PERSONALDATA-BAD-REQUEST-06.message",
571
+ code: 420,
572
+ type: "modal",
573
+ level: "warning"
574
+ },
575
+ "PERSONALDATA-BAD-REQUEST-07": {
576
+ title: "errors.PERSONALDATA-BAD-REQUEST-07.title",
577
+ message: "errors.PERSONALDATA-BAD-REQUEST-07.message",
578
+ code: 420,
579
+ type: "modal",
580
+ level: "warning"
581
+ },
582
+ "PERSONALDATA-BAD-REQUEST-08": {
583
+ title: "errors.PERSONALDATA-BAD-REQUEST-08.title",
584
+ message: "errors.PERSONALDATA-BAD-REQUEST-08.message",
585
+ code: 420,
586
+ type: "modal",
587
+ level: "warning"
588
+ },
589
+ "PERSONALDATA-GENERIC-ERROR": {
590
+ title: "errors.PERSONALDATA-GENERIC-ERROR.title",
591
+ message: "errors.PERSONALDATA-GENERIC-ERROR.message",
592
+ code: 420,
593
+ type: "modal",
594
+ level: "warning"
595
+ }
596
+ };
597
+ class O extends x {
598
+ get(t = "default", e = "NOT_FOUND") {
599
+ var A, a;
600
+ if (t instanceof Error)
601
+ return this.logError(t.message), {
602
+ ...g.internalError,
603
+ title: C(g.internalError.title),
604
+ message: C(g.internalError.message),
605
+ uuid: e
606
+ };
607
+ const r = typeof t == "string" ? t : t.code ?? t.errorType;
608
+ this.logDebug("statusCode", r);
609
+ const s = typeof t == "string" ? {} : { ...t };
610
+ return {
611
+ ...g[r] ?? g.default,
612
+ title: C(
613
+ ((A = g[r]) == null ? void 0 : A.title) ?? g.default.title,
614
+ s
615
+ ),
616
+ message: C(
617
+ ((a = g[r]) == null ? void 0 : a.message) ?? g.default.message,
618
+ s
619
+ ),
620
+ uuid: e
621
+ };
622
+ }
623
+ }
624
+ class Re extends G {
625
+ constructor() {
626
+ super(...arguments);
627
+ L(this, "uuid", "");
628
+ L(this, "session", null);
629
+ }
630
+ setSession(e) {
631
+ this.session = e;
632
+ }
633
+ getSession() {
634
+ if (!this.session)
635
+ throw new O().get("SESSION_NOT_FOUND");
636
+ return this.session;
637
+ }
638
+ returnData(e, r, s) {
639
+ const A = this.encode(r, s);
640
+ e.status(200).json(A);
641
+ }
642
+ returnError(e, r) {
643
+ return r != null && r.uuid ? e.status(520).json(r) : e.status(520).json(new O().get(r, this.uuid));
644
+ }
645
+ get(e) {
646
+ return this.logDebug("get ApiMiddleware"), (r, s) => {
647
+ var A;
648
+ this.logDebug("return ApiMiddleware"), this.uuid = (A = r == null ? void 0 : r.body) == null ? void 0 : A.uuid, T(r).pipe(
649
+ c(
650
+ (a) => I({
651
+ params: T(this.decode(a.body)),
652
+ headers: T(a.headers)
653
+ })
654
+ ),
655
+ c(
656
+ ({ params: a, headers: o }) => I({
657
+ response: e(a, this.uuid, o),
658
+ headers: T(o),
659
+ params: T(a)
660
+ })
661
+ ),
662
+ c(({ params: a, response: o, headers: E }) => (this.logDebug(
663
+ `ApiMiddleware \x1B[37m <URL>: \x1B[33m ${r.url} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(E)} \x1B[37m <UUID> \x1B[33m ${r.body.uuid} \x1B[37m <PARAMS> \x1B[33m ${JSON.stringify(a)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(o)}`
664
+ ), T(o))),
665
+ B((a) => {
666
+ var o;
667
+ return this.logError(
668
+ `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)}`
669
+ ), this.returnError(s, a), p;
670
+ })
671
+ ).subscribe({
672
+ next: (a) => {
673
+ this.logDebug("ApiMiddleware subscribe next", JSON.stringify(a)), this.returnData(s, a, this.uuid);
674
+ }
675
+ });
676
+ };
677
+ }
678
+ }
679
+ const b = process.env.ID_FRONT ?? "NOT_AVAILABLE";
680
+ class Te extends M {
681
+ constructor(e, r, s = {}) {
682
+ super(s);
683
+ L(this, "apiUrl");
684
+ L(this, "method");
685
+ this.apiUrl = e, this.method = r ?? "POST";
686
+ }
687
+ errorHandler(e, r) {
688
+ if (e != null && e.errors)
689
+ throw new O().get(e.errors[0], r);
690
+ return !(e != null && e.errors);
691
+ }
692
+ formatParams(e) {
693
+ return JSON.stringify({
694
+ data: {
695
+ type: b,
696
+ attributes: e
697
+ }
698
+ });
699
+ }
700
+ fetchData(e = {}, r) {
701
+ return this.getHeaders().pipe(
702
+ c(
703
+ (s) => D(
704
+ this.apiUrl,
705
+ {
706
+ method: "POST",
707
+ headers: s,
708
+ body: this.formatParams(e),
709
+ selector: (A) => A.json()
710
+ }
711
+ ).pipe(
712
+ c((A) => (this.logDebug(
713
+ `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
714
+ s
715
+ )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
716
+ this.formatParams(e)
717
+ )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(A)} \x1B[33m`
718
+ ), T(A)))
719
+ )
720
+ ),
721
+ P((s) => this.errorHandler(s, r))
722
+ );
723
+ }
724
+ fetchCustomData(e = {}, r) {
725
+ return this.getHeaders().pipe(
726
+ c(
727
+ (s) => D(this.apiUrl, {
728
+ method: this.method,
729
+ headers: s,
730
+ body: this.method === "GET" ? null : JSON.stringify(e),
731
+ selector: (A) => A.json()
732
+ }).pipe(
733
+ c((A) => (this.logDebug(
734
+ `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m \x1B[37m <METHOD>: \x1B[33m ${this.method} <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
735
+ s
736
+ )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
737
+ e
738
+ )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(A)} \x1B[33m`
739
+ ), T(A)))
740
+ )
741
+ )
742
+ );
743
+ }
744
+ }
745
+ const Y = /^(?:[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;
746
+ function H(l) {
747
+ return typeof l == "string" && Y.test(l);
748
+ }
749
+ function $(l) {
750
+ if (!H(l))
751
+ throw TypeError("Invalid UUID");
752
+ let t;
753
+ const e = new Uint8Array(16);
754
+ return e[0] = (t = parseInt(l.slice(0, 8), 16)) >>> 24, e[1] = t >>> 16 & 255, e[2] = t >>> 8 & 255, e[3] = t & 255, e[4] = (t = parseInt(l.slice(9, 13), 16)) >>> 8, e[5] = t & 255, e[6] = (t = parseInt(l.slice(14, 18), 16)) >>> 8, e[7] = t & 255, e[8] = (t = parseInt(l.slice(19, 23), 16)) >>> 8, e[9] = t & 255, e[10] = (t = parseInt(l.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;
755
+ }
756
+ function j(l) {
757
+ l = unescape(encodeURIComponent(l));
758
+ const t = [];
759
+ for (let e = 0; e < l.length; ++e)
760
+ t.push(l.charCodeAt(e));
761
+ return t;
762
+ }
763
+ const _ = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", W = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
764
+ function K(l, t, e) {
765
+ function r(s, A, a, o) {
766
+ var E;
767
+ if (typeof s == "string" && (s = j(s)), typeof A == "string" && (A = $(A)), ((E = A) === null || E === void 0 ? void 0 : E.length) !== 16)
768
+ throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
769
+ let R = new Uint8Array(16 + s.length);
770
+ if (R.set(A), R.set(s, A.length), R = e(R), R[6] = R[6] & 15 | t, R[8] = R[8] & 63 | 128, a) {
771
+ o = o || 0;
772
+ for (let n = 0; n < 16; ++n)
773
+ a[o + n] = R[n];
774
+ return a;
775
+ }
776
+ return V(R);
777
+ }
778
+ try {
779
+ r.name = l;
780
+ } catch {
781
+ }
782
+ return r.DNS = _, r.URL = W, r;
783
+ }
784
+ function Z(l, t, e, r) {
785
+ switch (l) {
786
+ case 0:
787
+ return t & e ^ ~t & r;
788
+ case 1:
789
+ return t ^ e ^ r;
790
+ case 2:
791
+ return t & e ^ t & r ^ e & r;
792
+ case 3:
793
+ return t ^ e ^ r;
794
+ }
795
+ }
796
+ function S(l, t) {
797
+ return l << t | l >>> 32 - t;
798
+ }
799
+ function k(l) {
800
+ const t = [1518500249, 1859775393, 2400959708, 3395469782], e = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
801
+ if (typeof l == "string") {
802
+ const a = unescape(encodeURIComponent(l));
803
+ l = [];
804
+ for (let o = 0; o < a.length; ++o)
805
+ l.push(a.charCodeAt(o));
806
+ } else
807
+ Array.isArray(l) || (l = Array.prototype.slice.call(l));
808
+ l.push(128);
809
+ const r = l.length / 4 + 2, s = Math.ceil(r / 16), A = new Array(s);
810
+ for (let a = 0; a < s; ++a) {
811
+ const o = new Uint32Array(16);
812
+ for (let E = 0; E < 16; ++E)
813
+ o[E] = l[a * 64 + E * 4] << 24 | l[a * 64 + E * 4 + 1] << 16 | l[a * 64 + E * 4 + 2] << 8 | l[a * 64 + E * 4 + 3];
814
+ A[a] = o;
815
+ }
816
+ A[s - 1][14] = (l.length - 1) * 8 / Math.pow(2, 32), A[s - 1][14] = Math.floor(A[s - 1][14]), A[s - 1][15] = (l.length - 1) * 8 & 4294967295;
817
+ for (let a = 0; a < s; ++a) {
818
+ const o = new Uint32Array(80);
819
+ for (let i = 0; i < 16; ++i)
820
+ o[i] = A[a][i];
821
+ for (let i = 16; i < 80; ++i)
822
+ o[i] = S(o[i - 3] ^ o[i - 8] ^ o[i - 14] ^ o[i - 16], 1);
823
+ let E = e[0], R = e[1], n = e[2], m = e[3], d = e[4];
824
+ for (let i = 0; i < 80; ++i) {
825
+ const N = Math.floor(i / 20), y = S(E, 5) + Z(N, R, n, m) + d + t[N] + o[i] >>> 0;
826
+ d = m, m = n, n = S(R, 30) >>> 0, R = E, E = y;
827
+ }
828
+ e[0] = e[0] + E >>> 0, e[1] = e[1] + R >>> 0, e[2] = e[2] + n >>> 0, e[3] = e[3] + m >>> 0, e[4] = e[4] + d >>> 0;
829
+ }
830
+ 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];
831
+ }
832
+ const X = K("v5", 80, k), f = X;
833
+ class ce extends F {
834
+ constructor(e, r = "POST", s = {}) {
835
+ super();
836
+ L(this, "apiUrl");
837
+ L(this, "method");
838
+ L(this, "headers");
839
+ L(this, "isLoadingEnabled", !0);
840
+ this.apiUrl = e, this.method = r, this.headers = {
841
+ "Content-Type": "application/json",
842
+ ...s
843
+ };
844
+ }
845
+ setIsLoadingEnabled(e) {
846
+ this.isLoadingEnabled = e;
847
+ }
848
+ errorHandler(e) {
849
+ return e.code && (e.type === "modal" || e.type === "message") && (u.getInstance().setSubject(e), U.getInstance().setSubject(!1)), !e.code;
850
+ }
851
+ fetchData(e = {}) {
852
+ const r = (/* @__PURE__ */ new Date()).toISOString(), s = f(r, f.URL), A = this.encode({ ...e }, s);
853
+ U.getInstance().setSubject(this.isLoadingEnabled);
854
+ const o = new URLSearchParams(window.location.search).get("flow") ?? "N/A";
855
+ return D(this.apiUrl, {
856
+ method: this.method,
857
+ headers: { ...this.headers, flow: o },
858
+ body: A,
859
+ selector: (E) => E.json()
860
+ }).pipe(
861
+ c((E) => T(this.decode(E))),
862
+ c((E) => (this.logDebug(
863
+ `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${A} <RESPONSE>: ${JSON.stringify(E)}`
864
+ ), T(E))),
865
+ P(this.errorHandler),
866
+ c((E) => (U.getInstance().setSubject(!1), T(E))),
867
+ B((E) => (U.getInstance().setSubject(!1), u.getInstance().setSubject(
868
+ new O().get(E, s)
869
+ ), p))
870
+ );
871
+ }
872
+ }
873
+ export {
874
+ Re as ApiMiddleware,
875
+ O as ErrorCatalog,
876
+ Te as FetchServiceBE,
877
+ ce as FetchServiceFE,
878
+ U as LoadingHandler,
879
+ u as MessageHandler,
880
+ ge as RxSubjectManager
881
+ };