@jvsoft/utils 0.0.3 → 0.0.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.
Files changed (54) hide show
  1. package/fesm2022/jvsoft-utils-src-functions.mjs +1053 -0
  2. package/fesm2022/jvsoft-utils-src-functions.mjs.map +1 -0
  3. package/fesm2022/jvsoft-utils-src-interfaces.mjs +6 -0
  4. package/fesm2022/jvsoft-utils-src-interfaces.mjs.map +1 -0
  5. package/fesm2022/jvsoft-utils-src-pipes.mjs +290 -0
  6. package/fesm2022/jvsoft-utils-src-pipes.mjs.map +1 -0
  7. package/fesm2022/jvsoft-utils.mjs +47 -269
  8. package/fesm2022/jvsoft-utils.mjs.map +1 -1
  9. package/functions/email.d.ts +2 -0
  10. package/functions/file.d.ts +1 -1
  11. package/functions/index.d.ts +1 -16
  12. package/functions/mat-form-controls/autocomplete.d.ts +1 -1
  13. package/functions/mat-form-controls/index.d.ts +1 -0
  14. package/functions/public-api.d.ts +16 -0
  15. package/interfaces/index.d.ts +1 -2
  16. package/interfaces/public-api.d.ts +1 -0
  17. package/package.json +15 -3
  18. package/pipes/index.d.ts +1 -7
  19. package/pipes/public-api.d.ts +8 -0
  20. package/pipes/tipo-valor-funcion.pipe.d.ts +9 -0
  21. package/src/functions/base64.d.ts +2 -0
  22. package/src/functions/browser.d.ts +1 -0
  23. package/src/functions/crypto-js.d.ts +2 -0
  24. package/src/functions/date.d.ts +3 -0
  25. package/src/functions/email.d.ts +2 -0
  26. package/src/functions/file.d.ts +10 -0
  27. package/src/functions/forms.d.ts +10 -0
  28. package/src/functions/http-client.d.ts +2 -0
  29. package/src/functions/index.d.ts +5 -0
  30. package/src/functions/local-storage.d.ts +29 -0
  31. package/src/functions/mat-form-controls/autocomplete.d.ts +21 -0
  32. package/src/functions/mat-form-controls/index.d.ts +2 -0
  33. package/src/functions/number.d.ts +1 -0
  34. package/src/functions/object-transformation.d.ts +2 -0
  35. package/src/functions/objects-arrays.d.ts +26 -0
  36. package/src/functions/public-api.d.ts +16 -0
  37. package/src/functions/string.d.ts +1 -0
  38. package/src/functions/sweetalert.d.ts +5 -0
  39. package/src/functions/utiles.d.ts +1 -0
  40. package/src/interfaces/datos.d.ts +4 -0
  41. package/src/interfaces/index.d.ts +5 -0
  42. package/src/interfaces/public-api.d.ts +1 -0
  43. package/src/pipes/data-en-lista.pipe.d.ts +8 -0
  44. package/src/pipes/date-diff-string.pipe.d.ts +17 -0
  45. package/src/pipes/filtro.pipe.d.ts +18 -0
  46. package/src/pipes/form-control-is-required.pipe.d.ts +9 -0
  47. package/src/pipes/index.d.ts +5 -0
  48. package/src/pipes/json-parse.pipe.d.ts +7 -0
  49. package/src/pipes/no-sanitize.pipe.d.ts +10 -0
  50. package/src/pipes/public-api.d.ts +8 -0
  51. package/src/pipes/tipo-valor-funcion.pipe.d.ts +9 -0
  52. package/src/pipes/zero-fill.pipe.d.ts +8 -0
  53. package/functions/formatear-pdfmake.d.ts +0 -39
  54. package/interfaces/otros.d.ts +0 -2
@@ -0,0 +1,1053 @@
1
+ import { untilDestroyed } from '@ngneat/until-destroy';
2
+ import { startWith, debounceTime, tap, isObservable, switchMap, of, finalize } from 'rxjs';
3
+ import { map } from 'rxjs/operators';
4
+ import { Buffer } from 'buffer';
5
+ import CryptoJS from 'crypto-js';
6
+ import { formatDate } from '@angular/common';
7
+ import { saveAs } from 'file-saver';
8
+ import { Validators, FormGroup, FormControl, FormArray } from '@angular/forms';
9
+ import { ReactiveFormConfig } from '@rxweb/reactive-form-validators';
10
+ import swal from 'sweetalert2';
11
+ import moment from 'moment';
12
+ import { jwtDecode } from 'jwt-decode';
13
+
14
+ function deepMerge(source, target) {
15
+ // Crea un clon profundo sin usar JSON.parse(JSON.stringify)
16
+ let cloneSource = deepClone(source);
17
+ if (typeof target !== 'object' || target === null) {
18
+ return target;
19
+ }
20
+ if (typeof cloneSource !== 'object' || cloneSource === null) {
21
+ cloneSource = Array.isArray(target) ? [] : {};
22
+ }
23
+ for (const key of Object.keys(target)) {
24
+ const targetValue = target[key];
25
+ const sourceValue = cloneSource[key];
26
+ if (typeof targetValue === 'object' && targetValue !== null && !Array.isArray(targetValue)) {
27
+ cloneSource[key] = deepMerge(sourceValue, targetValue);
28
+ }
29
+ else {
30
+ cloneSource[key] = targetValue;
31
+ }
32
+ }
33
+ return cloneSource; // Retorna el clon y no modifica el original
34
+ }
35
+ // Función de clonación profunda que maneja funciones, fechas y otros tipos especiales
36
+ function deepClone(obj) {
37
+ if (obj === null || typeof obj !== 'object') {
38
+ return obj; // Devuelve el valor si no es un objeto
39
+ }
40
+ // Manejar instancias de Date
41
+ if (obj instanceof Date) {
42
+ return new Date(obj.getTime());
43
+ }
44
+ // Manejar funciones devolviendo una copia directa
45
+ if (typeof obj === 'function') {
46
+ return obj.bind({}); // Devuelve una copia de la función enlazada a un contexto vacío
47
+ }
48
+ // Crear un nuevo objeto o array
49
+ const clonedObj = Array.isArray(obj) ? [] : {};
50
+ // Clonar recursivamente las propiedades del objeto
51
+ for (const key in obj) {
52
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
53
+ clonedObj[key] = deepClone(obj[key]);
54
+ }
55
+ }
56
+ return clonedObj;
57
+ }
58
+ /**
59
+ * Busca un elemento en un array o jerarquía de objetos según un campo y valor especificado.
60
+ *
61
+ * @returns El elemento encontrado o undefined si no existe.
62
+ */
63
+ function buscarPorCampo(datosFn) {
64
+ for (const item of datosFn.items) {
65
+ // Verifica si el campo coincide con el valor
66
+ if (item[datosFn.campo] === datosFn.valor) {
67
+ return item;
68
+ }
69
+ // Verifica si hay un campo hijo y si es un array
70
+ if (datosFn.campoHijo && item[datosFn.campoHijo] && Array.isArray(item[datosFn.campoHijo])) {
71
+ // Realiza la búsqueda recursiva en el campo hijo
72
+ const encontrado = buscarPorCampo({
73
+ items: item[datosFn.campoHijo], // Asegura el tipo correcto
74
+ campo: datosFn.campo,
75
+ valor: datosFn.valor,
76
+ campoHijo: datosFn.campoHijo,
77
+ });
78
+ // Si se encuentra el valor en el campo hijo, retorna el resultado
79
+ if (encontrado) {
80
+ return encontrado;
81
+ }
82
+ }
83
+ }
84
+ // Si no se encuentra nada, retorna undefined
85
+ return undefined;
86
+ }
87
+ function sumarPropiedades(item, campos) {
88
+ const datosSumar = campos.map(campo => (item[campo] * 1));
89
+ return datosSumar.reduce((a, b) => a + b, 0);
90
+ }
91
+ function esNumero(value) {
92
+ return !isNaN(Number(value));
93
+ }
94
+ function sumarObjetos(arrayObjetos, campos) {
95
+ return arrayObjetos.reduce((accumulator, item) => {
96
+ campos.forEach(campo => {
97
+ if (esNumero(item[campo])) {
98
+ accumulator[campo] = (accumulator[campo] ?? 0) + (item[campo] ?? 0);
99
+ }
100
+ });
101
+ return accumulator;
102
+ }, {});
103
+ }
104
+ function getUniqueValues(array) {
105
+ return array.filter((currentValue, index, arr) => (arr.indexOf(currentValue) === index));
106
+ }
107
+ function getUniqueValuesByProperty(objetos, campo) {
108
+ const objetosUnicos = {};
109
+ objetos.forEach(objeto => {
110
+ // Verificar si el objeto tiene el campo especificado
111
+ // @ts-ignore
112
+ if (objeto.hasOwnProperty(campo)) {
113
+ // @ts-ignore
114
+ const valorCampo = objeto[campo];
115
+ // Utilizar el valor del campo como clave en un objeto para asegurar que no haya duplicados
116
+ objetosUnicos[valorCampo] = objeto;
117
+ }
118
+ });
119
+ // Convertir el objeto de claves únicas de vuelta a una lista de objetos
120
+ return Object.values(objetosUnicos);
121
+ }
122
+ function ordenarArray(array, numeros = false, sentido = 'ASC') {
123
+ if (numeros) {
124
+ if (sentido != 'ASC') {
125
+ return array.sort((a, b) => b - a);
126
+ }
127
+ return array.sort((a, b) => a - b);
128
+ }
129
+ return array.sort((a, b) => (a > b) ? 1 : ((b > a) ? -1 : 0));
130
+ }
131
+ function ordenarPorPropiedad(objData, propiedad, /**@deprecated*/ numeros = false) {
132
+ return ordenarPorPropiedades(objData, { propiedades: [propiedad], direcciones: ['asc'] });
133
+ }
134
+ function ordenarPorPropiedades(arr, options) {
135
+ const { propiedades, direcciones = [] } = options;
136
+ const orden = direcciones.map(d => d === 'desc' ? -1 : 1);
137
+ return [...arr].sort((a, b) => {
138
+ return propiedades.reduce((acc, propiedad, index) => {
139
+ if (acc !== 0)
140
+ return acc; // Si ya hay diferencia, no seguir comparando
141
+ const aValue = a[propiedad];
142
+ const bValue = b[propiedad];
143
+ if (typeof aValue === 'string' && typeof bValue === 'string') {
144
+ return aValue.localeCompare(bValue) * orden[index]; // 🔹 Comparación alfabética
145
+ }
146
+ if (typeof aValue === 'number' && typeof bValue === 'number') {
147
+ return (aValue - bValue) * orden[index]; // 🔹 Comparación numérica
148
+ }
149
+ return 0; // En caso de valores no comparables
150
+ }, 0);
151
+ });
152
+ }
153
+
154
+ function mostrarValorEnBusqueda(campos, idxSel) {
155
+ const impDataMostrar = () => {
156
+ let vD;
157
+ if (campos.campoId == '*object*' || campos.campoId == '*objeto*') {
158
+ console.log(campos);
159
+ vD = campos.lista.find((x) => JSON.stringify(x).trim() == JSON.stringify(idxSel).trim());
160
+ console.log(vD);
161
+ }
162
+ else {
163
+ vD = campos.lista.find((x) => x[campos.campoId] == idxSel);
164
+ }
165
+ if (!vD && campos.opcExtra) {
166
+ console.log('eval ', campos.opcExtra);
167
+ if (campos.campoId == '*object*' || campos.campoId == '*objeto*') {
168
+ console.log(campos);
169
+ vD = campos.opcExtra.find((x) => JSON.stringify(x).trim() == JSON.stringify(idxSel).trim());
170
+ console.log(vD);
171
+ }
172
+ else {
173
+ vD = campos.opcExtra.find((x) => x[campos.campoId] == idxSel);
174
+ }
175
+ }
176
+ if (vD) {
177
+ let txtFinal = '';
178
+ if (Array.isArray(campos.campoValue)) {
179
+ campos.campoValue.forEach((vCampo, idx) => {
180
+ txtFinal += (vD[vCampo] ?? '');
181
+ if (idx < campos.campoValue.length - 1) {
182
+ txtFinal += ' - ';
183
+ }
184
+ });
185
+ }
186
+ else {
187
+ txtFinal = vD[campos.campoValue] ?? '';
188
+ }
189
+ return txtFinal.trim();
190
+ }
191
+ else {
192
+ console.log('ASSSSS ----- SSSS ');
193
+ }
194
+ return '';
195
+ };
196
+ if (esNumero(idxSel)) {
197
+ if (idxSel > 0 && campos.lista?.length > 0) {
198
+ return impDataMostrar();
199
+ }
200
+ else if (idxSel && typeof idxSel == 'object') {
201
+ return impDataMostrar();
202
+ }
203
+ }
204
+ else {
205
+ if (campos.lista?.length > 0) {
206
+ return impDataMostrar();
207
+ }
208
+ }
209
+ return '';
210
+ }
211
+ function changeSelectData(objThis, dataFiltro) {
212
+ objThis['filtrados'][dataFiltro.variableResultado] = dataFiltro.formControl.valueChanges.pipe(untilDestroyed(objThis)).pipe(startWith(''), map(value => {
213
+ const varN = dataFiltro.data;
214
+ if (varN) {
215
+ if (value) {
216
+ return varN.map(x => x).filter(dat => {
217
+ if (Array.isArray(dataFiltro.campoBuscar)) {
218
+ let encontrado = false;
219
+ for (const vCampo of dataFiltro.campoBuscar) {
220
+ // console.log(vCampo, value, dat[vCampo]);
221
+ if (isNaN(Number(value))) {
222
+ // NO ES NUMERO
223
+ if (value && dat[vCampo] && dat[vCampo].toLowerCase().includes(value?.toString().toLowerCase())) {
224
+ encontrado = true;
225
+ break;
226
+ }
227
+ }
228
+ else {
229
+ if (value && dat[vCampo] && dat[vCampo].toString().includes(value?.toString())) {
230
+ encontrado = true;
231
+ break;
232
+ }
233
+ }
234
+ }
235
+ return encontrado;
236
+ }
237
+ else {
238
+ if (isNaN(Number(value))) {
239
+ return dat[dataFiltro.campoBuscar].toLowerCase().includes(value?.toString().toLowerCase());
240
+ }
241
+ else {
242
+ return dat[dataFiltro.campoBuscar].toString().includes(value?.toString());
243
+ }
244
+ }
245
+ });
246
+ }
247
+ return varN;
248
+ }
249
+ return false;
250
+ }));
251
+ }
252
+ function changeSelect(control, formControl, tipo, campoBuscar, campoFiltro = null) {
253
+ // console.log(formControl);
254
+ // const formGroup = formControl.parent.controls;
255
+ // console.warn( Object.keys(formGroup).find(name => formControl === formGroup[name]) || null );
256
+ if (!campoFiltro) {
257
+ campoFiltro = tipo;
258
+ }
259
+ control['filtrados'][campoFiltro ?? '__'] = formControl.valueChanges.pipe(untilDestroyed(control)).pipe(startWith(''), map(value => {
260
+ // console.warn(value);
261
+ const partes = tipo.split('.');
262
+ let varN;
263
+ if (control['dataServidor']) {
264
+ varN = (partes.length > 1) ? control['dataServidor'][partes[0]][partes[1]] : control['dataServidor'][tipo];
265
+ }
266
+ else if (control['dataServidorSuscripcion']) {
267
+ varN = control['dataServidorSuscripcion'][tipo].getValue();
268
+ }
269
+ if (varN) {
270
+ if (value) {
271
+ return varN.map((x) => x).filter((dat) => {
272
+ if (Array.isArray(campoBuscar)) {
273
+ let encontrado = false;
274
+ for (const vCampo of campoBuscar) {
275
+ // console.log(vCampo, value, dat[vCampo]);
276
+ if (isNaN(Number(value))) {
277
+ // NO ES NUMERO
278
+ if (value && dat[vCampo] && dat[vCampo].toLowerCase().includes(value?.toString().toLowerCase())) {
279
+ encontrado = true;
280
+ break;
281
+ }
282
+ }
283
+ else {
284
+ if (value && dat[vCampo] && dat[vCampo].toString().includes(value?.toString())) {
285
+ encontrado = true;
286
+ break;
287
+ }
288
+ }
289
+ }
290
+ return encontrado;
291
+ }
292
+ else {
293
+ if (isNaN(Number(value))) {
294
+ return dat[campoBuscar].toLowerCase().includes(value?.toString().toLowerCase());
295
+ }
296
+ else {
297
+ return dat[campoBuscar].toString().includes(value?.toString());
298
+ }
299
+ }
300
+ });
301
+ }
302
+ return varN;
303
+ }
304
+ return false;
305
+ }));
306
+ }
307
+ function changeSelectDataApi(objThis, dataFiltro) {
308
+ if (!dataFiltro.variableResultado) {
309
+ dataFiltro.variableResultado = dataFiltro.tipoReq;
310
+ }
311
+ const idFiltrado = dataFiltro.variableResultado;
312
+ dataFiltro.formControl.valueChanges.pipe(debounceTime(500), tap(() => {
313
+ objThis.filtrados[dataFiltro.variableResultado + 'tmp'] = isObservable(objThis.filtrados[idFiltrado]) ? [] : objThis.filtrados[idFiltrado] || [];
314
+ if (objThis.filtrados[idFiltrado] !== objThis.filtrados[idFiltrado + 'tmp']) {
315
+ objThis.filtrados[idFiltrado] = [];
316
+ }
317
+ objThis.isLoading = true;
318
+ }), switchMap(value => {
319
+ if (dataFiltro.campoId) {
320
+ const busquedaActual2 = objThis.filtrados[idFiltrado + 'tmp'].findIndex((item) => item[dataFiltro.campoId ?? '--'] === value);
321
+ if (busquedaActual2 >= 0) {
322
+ return of({ [dataFiltro.tipoReq]: objThis.filtrados[idFiltrado + 'tmp'] });
323
+ }
324
+ }
325
+ return !value || value.length < (dataFiltro.minLength ?? 3) ? [] : (dataFiltro.queryService.getDataMethod('GET', dataFiltro.tipoReq, {
326
+ ...(dataFiltro.dataExtra ?? {}),
327
+ ...(dataFiltro.dataExtraVariable ? Object.fromEntries(dataFiltro.dataExtraVariable.map((objData) => [objData.campo, objData.ctrlValue.value])) : {}),
328
+ txtBuscar: value,
329
+ }, dataFiltro.anonimo).pipe(finalize(() => objThis.isLoading = false)));
330
+ })).subscribe((data) => {
331
+ objThis.filtrados[idFiltrado] = data[dataFiltro.tipoReq] ?? [];
332
+ });
333
+ }
334
+ function changeSelectApi(control, queryService, formControl, tipo, dataExtra = {}, dataExtraVariable = null, minLength = 1, anonimo = false) {
335
+ formControl.valueChanges.pipe(debounceTime(500), tap((value) => {
336
+ control['filtrados'][tipo + 'tmp'] = isObservable(control['filtrados'][tipo]) ? [] : control['filtrados'][tipo];
337
+ if (control['filtrados'][tipo] != control['filtrados'][tipo + 'tmp']) {
338
+ control['filtrados'][tipo] = [];
339
+ }
340
+ control['isLoading'] = true;
341
+ }), switchMap(value => {
342
+ const formGroup = formControl.parent?.controls;
343
+ const nombreControl = Object.keys(formGroup).find(name => formControl === formGroup[name]) || null;
344
+ if (nombreControl && control['filtrados'][tipo + 'tmp'] && control['filtrados'][tipo + 'tmp'].length > 0) {
345
+ const busquedaActual = control['filtrados'][tipo + 'tmp'].findIndex((item) => item[nombreControl] == value);
346
+ if (busquedaActual >= 0) {
347
+ const vRet = {};
348
+ vRet[tipo] = control['filtrados'][tipo + 'tmp'];
349
+ control['isLoading'] = false;
350
+ return of(vRet);
351
+ }
352
+ }
353
+ if (!value || value.length < minLength) {
354
+ return [];
355
+ }
356
+ const dataExtraVariableData = {};
357
+ if (dataExtraVariable) {
358
+ // @ts-ignore
359
+ for (const objData of dataExtraVariable) {
360
+ dataExtraVariableData[objData.campo] = objData.ctrlValue.value;
361
+ }
362
+ }
363
+ return queryService.getDataMethod('GET', tipo, { ...dataExtra, ...dataExtraVariableData, ...{ txtBuscar: value } }, anonimo).pipe(finalize(() => {
364
+ control['isLoading'] = false;
365
+ }));
366
+ })).subscribe((data) => {
367
+ if (data[tipo] == undefined) {
368
+ control['filtrados'][tipo] = [];
369
+ }
370
+ else {
371
+ control['filtrados'][tipo] = data[tipo];
372
+ }
373
+ });
374
+ }
375
+
376
+ function seleccionarTextoInput(event) {
377
+ event.target.select();
378
+ }
379
+
380
+ function b64Encode(val) {
381
+ return Buffer.from(val, 'binary').toString('base64');
382
+ }
383
+ function b64Decode(val) {
384
+ return Buffer.from(val, 'base64').toString('binary');
385
+ }
386
+
387
+ function getBrowserName() {
388
+ const agent = window.navigator.userAgent.toLowerCase();
389
+ switch (true) {
390
+ case agent.indexOf('edge') > -1:
391
+ return 'edge';
392
+ case agent.indexOf('opr') > -1 && !!window.opr:
393
+ return 'opera';
394
+ case agent.indexOf('chrome') > -1 && !!window.chrome:
395
+ return 'chrome';
396
+ case agent.indexOf('trident') > -1:
397
+ return 'ie';
398
+ case agent.indexOf('firefox') > -1:
399
+ return 'firefox';
400
+ case agent.indexOf('safari') > -1:
401
+ return 'safari';
402
+ default:
403
+ return 'other';
404
+ }
405
+ }
406
+
407
+ // import * as CryptoJS from 'crypto-js';
408
+ // var CryptoJS = require("crypto-js");
409
+ // Clave secreta (debe ser de 16, 24 o 32 caracteres)
410
+ const secretKey = CryptoJS.enc.Utf8.parse('JVSoftSecret@20615178350');
411
+ const iv = CryptoJS.enc.Utf8.parse('AnSalHuaJVSoft07'); // Debe ser de 16 bytes
412
+ // Función para encriptar texto
413
+ function encriptar(text) {
414
+ const encrypted = CryptoJS.AES.encrypt(text, secretKey, {
415
+ iv: iv,
416
+ mode: CryptoJS.mode.CBC,
417
+ padding: CryptoJS.pad.Pkcs7,
418
+ });
419
+ return encrypted.toString(); // Texto cifrado en Base64
420
+ }
421
+ // Función para desencriptar texto
422
+ function desencriptar(ciphertext) {
423
+ const decrypted = CryptoJS.AES.decrypt(ciphertext, secretKey, {
424
+ iv: iv,
425
+ mode: CryptoJS.mode.CBC,
426
+ padding: CryptoJS.pad.Pkcs7,
427
+ });
428
+ return decrypted.toString(CryptoJS.enc.Utf8);
429
+ }
430
+
431
+ function formatearFechaFormato(val, format = 'dd/MM/yyyy') {
432
+ return val ? formatDate(val, format, 'es-PE') : '';
433
+ }
434
+ function formatearFecha(val, hora = '00:00:00') {
435
+ if (val) {
436
+ if (val.length <= 10) {
437
+ val = val + ' ' + hora;
438
+ }
439
+ return new Date(val);
440
+ }
441
+ return val;
442
+ }
443
+ function formatearFechaCadena(fecha) {
444
+ const year = parseInt(fecha.substring(0, 4), 10);
445
+ const month = parseInt(fecha.substring(4, 6), 10) - 1;
446
+ const day = parseInt(fecha.substring(6, 8), 10);
447
+ return new Date(year, month, day);
448
+ }
449
+
450
+ function maskEmail(email) {
451
+ const [user, domain] = email.split("@");
452
+ if (user.length <= 2) {
453
+ return `${user[0]}***@${domain}`; // 🔹 Si el usuario es muy corto, no se oculta nada
454
+ }
455
+ if (user.length <= 4) {
456
+ return `${user[0]}***${user.slice(-1)}@${domain}`; // 🔹 Muestra 1 al inicio y 1 al final
457
+ }
458
+ return `${user.slice(0, 2)}***${user.slice(-2)}@${domain}`; // 🔹 Muestra 2 al inicio y 2 al final
459
+ }
460
+ function isEmail(email) {
461
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
462
+ }
463
+
464
+ const mimeTypes = {
465
+ // Imágenes
466
+ 'jpg': 'image/jpeg',
467
+ 'jpeg': 'image/jpeg',
468
+ 'png': 'image/png',
469
+ 'gif': 'image/gif',
470
+ 'webp': 'image/webp',
471
+ 'svg': 'image/svg+xml',
472
+ 'ico': 'image/x-icon',
473
+ 'bmp': 'image/bmp',
474
+ // Documentos
475
+ 'pdf': 'application/pdf',
476
+ 'doc': 'application/msword',
477
+ 'docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
478
+ 'xls': 'application/vnd.ms-excel',
479
+ 'xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
480
+ 'ppt': 'application/vnd.ms-powerpoint',
481
+ 'pptx': 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
482
+ 'txt': 'text/plain',
483
+ 'csv': 'text/csv',
484
+ 'json': 'application/json',
485
+ 'xml': 'application/xml',
486
+ 'html': 'text/html',
487
+ // Audio
488
+ 'mp3': 'audio/mpeg',
489
+ 'wav': 'audio/wav',
490
+ 'ogg': 'audio/ogg',
491
+ 'm4a': 'audio/mp4',
492
+ // Video
493
+ 'mp4': 'video/mp4',
494
+ 'avi': 'video/x-msvideo',
495
+ 'mov': 'video/quicktime',
496
+ 'wmv': 'video/x-ms-wmv',
497
+ 'flv': 'video/x-flv',
498
+ 'webm': 'video/webm',
499
+ 'mkv': 'video/x-matroska',
500
+ // Archivos comprimidos
501
+ 'zip': 'application/zip',
502
+ 'rar': 'application/vnd.rar',
503
+ '7z': 'application/x-7z-compressed',
504
+ 'tar': 'application/x-tar',
505
+ 'gz': 'application/gzip',
506
+ 'bz2': 'application/x-bzip2',
507
+ // Otros formatos
508
+ 'js': 'application/javascript',
509
+ 'css': 'text/css',
510
+ 'ts': 'application/typescript',
511
+ 'md': 'text/markdown',
512
+ 'exe': 'application/octet-stream',
513
+ 'eot': 'application/vnd.ms-fontobject',
514
+ 'woff': 'font/woff',
515
+ 'woff2': 'font/woff2',
516
+ 'ttf': 'font/ttf',
517
+ 'otf': 'font/otf',
518
+ };
519
+ function obtenerMimeType(nombreArchivo) {
520
+ const extension = nombreArchivo.split('.').pop()?.toLowerCase();
521
+ return extension ? mimeTypes[extension] || 'application/octet-stream' : null;
522
+ }
523
+ function sanitizarNombreArchivo(nombre, reemplazo = '_') {
524
+ // 1. Quitar caracteres no válidos para nombres de archivo
525
+ const nombreSanitizado = nombre.replace(/[\/\\:*?"<>|]/g, reemplazo);
526
+ // 2. Reemplazar espacios múltiples o al inicio/final
527
+ const nombreLimpio = nombreSanitizado.trim().replace(/\s+/g, reemplazo);
528
+ // 3. Asegurar longitud máxima (opcional, aquí 255 caracteres)
529
+ return nombreLimpio.substring(0, 255);
530
+ }
531
+ function getDataArchivoFromPath(value, conTimeStamp = false) {
532
+ const partesPath = value.split('/');
533
+ const nombreCompleto = partesPath[partesPath.length - 1];
534
+ let timeStamp = 1;
535
+ let nombreSinTimeStamp = nombreCompleto;
536
+ const partesNombre = nombreCompleto.split('-');
537
+ if (partesNombre.length > 1) {
538
+ timeStamp = partesNombre[0] * 1;
539
+ partesNombre.shift();
540
+ nombreSinTimeStamp = partesNombre.join('-');
541
+ }
542
+ if (conTimeStamp) {
543
+ return {
544
+ nombre: nombreCompleto,
545
+ extension: nombreCompleto.split('.').pop(),
546
+ d: timeStamp,
547
+ fechaSubida: timeStamp ? new Date(timeStamp * 1000) : '',
548
+ };
549
+ }
550
+ return {
551
+ nombre: nombreSinTimeStamp,
552
+ extension: nombreSinTimeStamp.split('.').pop(),
553
+ d: timeStamp,
554
+ fechaSubida: timeStamp ? new Date(timeStamp * 1000) : '',
555
+ };
556
+ }
557
+ function convertirBytes(valor, unidadSalida = null, incluirUnidad = true) {
558
+ const unidades = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];
559
+ const indiceEntrada = unidadSalida ? unidades.indexOf(unidadSalida) : 0;
560
+ if (indiceEntrada === -1) {
561
+ // Unidad de entrada no válida
562
+ return null;
563
+ }
564
+ let indiceActual = indiceEntrada;
565
+ let resultado = valor;
566
+ let cont = 0;
567
+ while (cont < 6 && (indiceActual < unidades.length - 1) && (resultado >= 1024)) {
568
+ resultado /= 1024;
569
+ indiceActual++;
570
+ }
571
+ if (incluirUnidad) {
572
+ return `${resultado.toFixed(2)} ${unidades[indiceActual]}`;
573
+ }
574
+ return resultado;
575
+ }
576
+ function downLoadFileStream(data, type, nombreArchivo) {
577
+ const blob = new Blob([data], { type });
578
+ saveAs(blob, nombreArchivo);
579
+ }
580
+
581
+ function establecerQuitarRequired(formulario, establecer = [], quitar = [], camposDisabled = []) {
582
+ establecer.forEach((control) => {
583
+ if (!formulario.get(control)?.hasValidator(Validators.required)) {
584
+ formulario.get(control)?.addValidators([Validators.required]);
585
+ formulario.get(control)?.enable();
586
+ formulario.get(control)?.updateValueAndValidity();
587
+ }
588
+ });
589
+ const deshabilitar = (strControl) => {
590
+ if (camposDisabled == 'todos') {
591
+ formulario.get(strControl)?.disable();
592
+ console.log(strControl);
593
+ }
594
+ else {
595
+ if (camposDisabled.includes(strControl)) {
596
+ formulario.get(strControl)?.disable();
597
+ }
598
+ }
599
+ };
600
+ quitar.forEach(control => {
601
+ if (formulario.get(control)?.hasValidator(Validators.required)) {
602
+ formulario.get(control)?.removeValidators([Validators.required]);
603
+ formulario.get(control)?.updateValueAndValidity();
604
+ }
605
+ deshabilitar(control);
606
+ });
607
+ }
608
+ function getFormValidationErrors(form) {
609
+ const result = [];
610
+ Object.keys(form.controls).forEach(key => {
611
+ const formProperty = form.get(key);
612
+ if (formProperty instanceof FormGroup) {
613
+ result.push(...getFormValidationErrors(formProperty));
614
+ }
615
+ const controlErrors = formProperty?.errors;
616
+ if (controlErrors) {
617
+ Object.keys(controlErrors).forEach(keyError => {
618
+ result.push({
619
+ control: key,
620
+ error: keyError,
621
+ value: controlErrors[keyError]
622
+ });
623
+ });
624
+ }
625
+ });
626
+ return result;
627
+ }
628
+ function mensajesErrorFormControl(control) {
629
+ if (!control || !control.errors || !control.touched)
630
+ return '';
631
+ ReactiveFormConfig.set({
632
+ // RxwebValidators
633
+ validationMessage: {
634
+ required: 'Es requerido',
635
+ numeric: 'Debe ser numérico valido',
636
+ // minLength: 'minimum length is {{1}}',
637
+ // maxLength: 'allowed max length is {{1}}',
638
+ },
639
+ });
640
+ const errorMessages = {
641
+ required: 'Es requerido',
642
+ numeric: 'Debe ser numérico válido',
643
+ min: `Valor mínimo permitido: ${control.errors['min']?.min}`,
644
+ minValue: 'Debe ser positivo',
645
+ minlength: `Mínimo ${control.errors['minlength']?.requiredLength} caracteres.`,
646
+ maxlength: `Caracteres ${control.errors['maxlength']?.actualLength}/${control.errors['maxlength']?.requiredLength}`,
647
+ email: 'No se cumple con el formato de Correo Electrónico',
648
+ isNumeric: 'Debe seleccionar una opción',
649
+ hasNumber: 'Se requiere al menos un número',
650
+ hasCapitalCase: 'Se requiere al menos una mayúscula',
651
+ hasSmallCase: 'Se requiere al menos una minúscula',
652
+ hasSpecialCharacters: 'Se requiere al menos un carácter especial',
653
+ NoPassswordMatch: 'La contraseña no coincide',
654
+ itemSelected: 'Debe seleccionar una opción de la lista',
655
+ inputMask: 'El formato ingresado no es válido',
656
+ };
657
+ // Devuelve el primer mensaje de error encontrado
658
+ for (const errorKey of Object.keys(control.errors)) {
659
+ if (errorMessages[errorKey]) {
660
+ return errorMessages[errorKey];
661
+ }
662
+ }
663
+ // Si el error tiene un mensaje personalizado, usarlo
664
+ return control.errors[Object.keys(control.errors)[0]]?.message || '';
665
+ }
666
+ function toFormData(formValue) {
667
+ const formData = new FormData();
668
+ Object.keys(formValue).forEach((key) => {
669
+ const value = formValue[key];
670
+ if (value === null || value === undefined) {
671
+ return; // Ignorar valores nulos o indefinidos
672
+ }
673
+ if (Array.isArray(value)) {
674
+ value.forEach((item, index) => {
675
+ if (typeof item === 'object' && item !== null) {
676
+ if ('file' in item) {
677
+ formData.append(`${key}[${index}]`, item.file);
678
+ }
679
+ else {
680
+ formData.append(`${key}[${index}]`, JSON.stringify(item));
681
+ }
682
+ }
683
+ else {
684
+ formData.append(`${key}[${index}]`, item.toString());
685
+ }
686
+ });
687
+ }
688
+ else if (typeof value === 'object') {
689
+ // Si es un objeto (pero no un array), convertirlo a JSON
690
+ formData.append(key, JSON.stringify(value));
691
+ }
692
+ else {
693
+ // Para valores primitivos (string, number, boolean)
694
+ formData.append(key, value.toString());
695
+ }
696
+ });
697
+ return formData;
698
+ }
699
+ function markAsTouchedWithoutEmitEvent(control) {
700
+ if (control instanceof FormControl) {
701
+ control.markAsTouched({ onlySelf: true });
702
+ control.updateValueAndValidity({ emitEvent: false });
703
+ }
704
+ else if (control instanceof FormGroup || control instanceof FormArray) {
705
+ Object.values(control.controls).forEach(childControl => {
706
+ markAsTouchedWithoutEmitEvent(childControl);
707
+ });
708
+ control.updateValueAndValidity({ emitEvent: false });
709
+ }
710
+ }
711
+
712
+ function mensajeAlerta(tipo, titulo, mensaje, opciones) {
713
+ opciones = {
714
+ ...{
715
+ heightAuto: false,
716
+ title: titulo,
717
+ html: mensaje,
718
+ icon: tipo,
719
+ confirmButtonText: 'Aceptar',
720
+ // customClass: {
721
+ // confirmButton: 'btn btn-lg btn-outline-success mx-2',
722
+ // cancelButton: 'btn btn-lg btn-outline-dark mx-2'
723
+ // },
724
+ // buttonsStyling: false
725
+ },
726
+ ...opciones
727
+ };
728
+ return swal.fire(opciones);
729
+ }
730
+ function mensajeTimer(tipo, titulo, mensaje, milisegundos = 3000, showLoading = true, opciones) {
731
+ let timerInterval;
732
+ opciones = {
733
+ ...{
734
+ heightAuto: false,
735
+ title: titulo,
736
+ html: mensaje + '<br> Se cerrará en <strong> X </strong> segundos.',
737
+ icon: tipo,
738
+ timer: milisegundos,
739
+ showCancelButton: false,
740
+ showConfirmButton: false,
741
+ willOpen: () => {
742
+ if (showLoading) {
743
+ swal.showLoading();
744
+ }
745
+ timerInterval = setInterval(() => {
746
+ const impr = Math.ceil(((swal.getTimerLeft() ?? 1) / 1000));
747
+ if (swal.getHtmlContainer()) {
748
+ // @ts-ignore
749
+ swal.getHtmlContainer().querySelector('strong').textContent = String(impr);
750
+ }
751
+ }, 100);
752
+ },
753
+ willClose: () => {
754
+ clearInterval(timerInterval);
755
+ }
756
+ },
757
+ ...opciones
758
+ };
759
+ return swal.fire(opciones);
760
+ }
761
+ // @ts-ignore
762
+ function mensajeConfirmacion(tipo, titulo, mensaje, opciones) {
763
+ opciones = {
764
+ ...{
765
+ heightAuto: false,
766
+ title: titulo,
767
+ html: mensaje,
768
+ icon: tipo,
769
+ showCancelButton: true,
770
+ // confirmButtonColor: '#3f51b5',
771
+ // cancelButtonColor: '#ffffff',
772
+ confirmButtonText: 'Confirmar',
773
+ cancelButtonText: 'Cancelar',
774
+ reverseButtons: true,
775
+ // customClass: {
776
+ // confirmButton: 'btn btn-lg btn-outline-success mx-2',
777
+ // cancelButton: 'btn btn-lg btn-outline-dark mx-2'
778
+ // },
779
+ // buttonsStyling: false
780
+ },
781
+ ...opciones
782
+ };
783
+ return swal.fire(opciones);
784
+ }
785
+ function mensajeToast(tipo, titulo, mensaje, opciones) {
786
+ opciones = {
787
+ ...{
788
+ heightAuto: false,
789
+ title: titulo,
790
+ html: mensaje,
791
+ icon: tipo,
792
+ confirmButtonText: 'Aceptar',
793
+ toast: true,
794
+ position: 'top-end',
795
+ showConfirmButton: false,
796
+ timer: 3000,
797
+ timerProgressBar: true,
798
+ },
799
+ ...opciones
800
+ };
801
+ return swal.fire(opciones);
802
+ }
803
+
804
+ function mensajesDeError(error, toast = false) {
805
+ let msg;
806
+ if (error.error && error.error instanceof ArrayBuffer) {
807
+ const msgArrayBuffer = (arrayBuffer) => {
808
+ try {
809
+ const mensajeError = JSON.parse(new TextDecoder("utf-8").decode(arrayBuffer));
810
+ return mensajeError.message || 'Error desconocido';
811
+ }
812
+ catch (parseError) {
813
+ console.error('Error al analizar la respuesta JSON:', parseError);
814
+ return 'Error al analizar la respuesta JSON';
815
+ }
816
+ };
817
+ msg = msgArrayBuffer(error.error);
818
+ }
819
+ else {
820
+ switch (error.status) {
821
+ case 0:
822
+ // msg = error.message;
823
+ msg = 'El servidor no responde, verifica tu conexion a la red';
824
+ console.log(error);
825
+ break;
826
+ case 401:
827
+ if (error.error && typeof error.error == 'object') {
828
+ if (error.error.message) {
829
+ msg = error.error.message;
830
+ }
831
+ else if (error.error.error) {
832
+ msg = error.error.error;
833
+ }
834
+ else {
835
+ msg = JSON.stringify(error.error);
836
+ console.log(error);
837
+ }
838
+ }
839
+ else if (error.error && typeof error.error == 'string') {
840
+ msg = error.error;
841
+ }
842
+ else {
843
+ msg = 'Acceso no autorizado';
844
+ console.log(error);
845
+ }
846
+ break;
847
+ case 422:
848
+ let strEr = '';
849
+ console.log(typeof error.error.errors);
850
+ console.log(error.error.errors);
851
+ if (error.error.errors) {
852
+ Object.keys(error.error.errors).forEach(o => {
853
+ strEr += '<li>' + error.error.errors[o][0] + '</li>';
854
+ });
855
+ msg = (error.error.message ?? '') + '<ul>' + strEr + '</ul>';
856
+ }
857
+ else if (error.error.error) {
858
+ msg = error.error.msg;
859
+ }
860
+ break;
861
+ case 429:
862
+ case 400:
863
+ case 500:
864
+ case 503:
865
+ msg = error.error.message;
866
+ break;
867
+ case 504:
868
+ msg = 'No se puede conectar al servidor. Comprueba tu conexion a la red - ' + error.statusText;
869
+ break;
870
+ default:
871
+ msg = 'Error de Sistema';
872
+ console.log(error);
873
+ break;
874
+ }
875
+ }
876
+ if (!msg) {
877
+ msg = error.statusText ?? 'Error inesperado o datos inexistentes.';
878
+ }
879
+ let tituloFinal = 'Error!';
880
+ let mensajeFinal;
881
+ if (msg.includes('Hmac::doVerify')) {
882
+ console.log(error, msg);
883
+ return;
884
+ }
885
+ else if (msg == 'Server Error') {
886
+ console.log(error, msg);
887
+ return;
888
+ }
889
+ else if (msg.includes('[IMSSP]')) {
890
+ mensajeFinal = 'Error en consulta de registros.';
891
+ }
892
+ else if (msg.includes('Tiempo de espera de la')) {
893
+ mensajeFinal = 'Hubo un error en la solicitud de datos, por favor actualice (SHIFT + F5)';
894
+ }
895
+ else {
896
+ mensajeFinal = msg;
897
+ }
898
+ if (toast) {
899
+ mensajeToast('error', tituloFinal, mensajeFinal);
900
+ }
901
+ else {
902
+ mensajeAlerta('error', tituloFinal, mensajeFinal);
903
+ }
904
+ throw new Error(mensajeFinal);
905
+ }
906
+
907
+ let dataSessionStorageKey = {
908
+ tokenStringKey: 'JVSoftTkn',
909
+ changePasswordKey: 'chPwd',
910
+ logoUrl: 'logo_url',
911
+ logoLogin: 'login-logo',
912
+ backgroundLogin: 'login-background',
913
+ favicon: 'favicon',
914
+ darkMode: 'darkMode',
915
+ serverTimestamp: 'srvtmstp',
916
+ apiDataKey: 'reqDt',
917
+ };
918
+ let localStorageKeys = dataSessionStorageKey;
919
+ function inicializarVariablesSessionStorage(datSesion) {
920
+ dataSessionStorageKey = datSesion;
921
+ }
922
+ function setJwtTokenData(data) {
923
+ localStorage.setItem(dataSessionStorageKey.tokenStringKey, data);
924
+ }
925
+ function jwtTokenData(key = dataSessionStorageKey.tokenStringKey) {
926
+ const tokenObj = localStorage.getItem(key);
927
+ try {
928
+ return JSON.parse(tokenObj);
929
+ }
930
+ catch (error) {
931
+ return null;
932
+ }
933
+ }
934
+ function jwtToken(key = dataSessionStorageKey.tokenStringKey) {
935
+ const varJwtTokenData = jwtTokenData(key);
936
+ if (varJwtTokenData) {
937
+ return varJwtTokenData.access_token;
938
+ }
939
+ return '';
940
+ }
941
+ function jwtTokenExpiracion(key = dataSessionStorageKey.tokenStringKey) {
942
+ const jwtStr = jwtToken(key);
943
+ if (!jwtStr)
944
+ return null;
945
+ try {
946
+ const decodedToken = jwtDecode(jwtStr);
947
+ return decodedToken.exp ? decodedToken.exp * 1000 : null; // Convertir a milisegundos
948
+ }
949
+ catch (e) {
950
+ return null;
951
+ }
952
+ }
953
+ function jwtTokenExpiracionFaltante() {
954
+ return Math.abs(moment().diff(jwtTokenExpiracion(), 'seconds'));
955
+ }
956
+ function setCambiarPwd(accion = true) {
957
+ localStorage.setItem(dataSessionStorageKey.changePasswordKey, (accion ? 1 : 0).toString());
958
+ }
959
+ function getCambiarPwd() {
960
+ const frmCambioPwd = localStorage.getItem(dataSessionStorageKey.changePasswordKey);
961
+ if (!frmCambioPwd) {
962
+ return null;
963
+ }
964
+ return frmCambioPwd == '1';
965
+ }
966
+ function delLocalStorage(keyElim = [
967
+ dataSessionStorageKey.tokenStringKey,
968
+ dataSessionStorageKey.changePasswordKey,
969
+ dataSessionStorageKey.apiDataKey,
970
+ ]) {
971
+ keyElim.forEach(key => {
972
+ localStorage.removeItem(key);
973
+ });
974
+ }
975
+ function getLocalStorage(key) {
976
+ return localStorage.getItem(key);
977
+ }
978
+ function setLocalStorage(key, value = '') {
979
+ localStorage.setItem(key, value.toString());
980
+ }
981
+
982
+ function roundToDecimal(number, decimal) {
983
+ return parseFloat(number.toFixed(decimal));
984
+ }
985
+
986
+ function objectPropertiesToType(formFields) {
987
+ Object.keys(formFields).filter(control => !!formFields[control]).forEach(control => {
988
+ if (/^dt[a-zA-Z]+/.test(control)) {
989
+ formFields[control] = formatDate(formFields[control], 'yyyy-MM-dd HH:mm', 'es-PE');
990
+ }
991
+ else if (control.startsWith('d')) {
992
+ formFields[control] = formatearFecha(formFields[control]);
993
+ }
994
+ else if (control.startsWith('n')) {
995
+ formFields[control] = Number(formFields[control]);
996
+ }
997
+ });
998
+ return formFields;
999
+ }
1000
+ function objectPropertiesBoolean(formFields, retorno = 'boolean') {
1001
+ Object.keys(formFields).forEach(control => {
1002
+ const valRetorno = (ctrl) => {
1003
+ switch (retorno) {
1004
+ case 'boolean':
1005
+ formFields[ctrl] = formFields[ctrl] == 1;
1006
+ break;
1007
+ case 'bit':
1008
+ formFields[ctrl] = formFields[ctrl] ? 1 : 0;
1009
+ break;
1010
+ }
1011
+ };
1012
+ if (control.charAt(0) == 'b' || (control.charAt(0) == 'i' && control.indexOf('Estado') !== -1)) {
1013
+ valRetorno(control);
1014
+ }
1015
+ });
1016
+ return formFields;
1017
+ }
1018
+
1019
+ function generateRandomString(length) {
1020
+ let result = '';
1021
+ const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
1022
+ const charactersLength = characters.length;
1023
+ for (let i = 0; i < length; i++) {
1024
+ result += characters.charAt(Math.floor(Math.random() * charactersLength));
1025
+ }
1026
+ return result;
1027
+ }
1028
+
1029
+ function verificarRUC(ruc) {
1030
+ const f = [5, 4, 3, 2, 7, 6, 5, 4, 3, 2];
1031
+ const rucArray = ruc.split('');
1032
+ const nArray = f.map((item, idx) => {
1033
+ return item * parseFloat(rucArray[idx]);
1034
+ });
1035
+ const suma = nArray.reduce((a, b) => a + b, 0);
1036
+ const residuo = suma % 11;
1037
+ const residuo2 = 11 - residuo;
1038
+ // @residuo=CONVERT(Integer,Right(CONVERT(VarChar,@residuo),1))
1039
+ const residuo3 = residuo2.toString().charAt(residuo2.toString().length - 1);
1040
+ const ultimoCaracter = ruc.toString().charAt(ruc.toString().length - 1);
1041
+ if (residuo3 == ultimoCaracter) {
1042
+ return true;
1043
+ }
1044
+ mensajeAlerta('error', 'Datos No válidos', ' El número de RUC no es válido');
1045
+ return false;
1046
+ }
1047
+
1048
+ /**
1049
+ * Generated bundle index. Do not edit.
1050
+ */
1051
+
1052
+ export { b64Decode, b64Encode, buscarPorCampo, changeSelect, changeSelectApi, changeSelectData, changeSelectDataApi, convertirBytes, deepClone, deepMerge, delLocalStorage, desencriptar, downLoadFileStream, encriptar, esNumero, establecerQuitarRequired, formatearFecha, formatearFechaCadena, formatearFechaFormato, generateRandomString, getBrowserName, getCambiarPwd, getDataArchivoFromPath, getFormValidationErrors, getLocalStorage, getUniqueValues, getUniqueValuesByProperty, inicializarVariablesSessionStorage, isEmail, jwtToken, jwtTokenData, jwtTokenExpiracion, jwtTokenExpiracionFaltante, localStorageKeys, markAsTouchedWithoutEmitEvent, maskEmail, mensajeAlerta, mensajeConfirmacion, mensajeTimer, mensajeToast, mensajesDeError, mensajesErrorFormControl, mostrarValorEnBusqueda, objectPropertiesBoolean, objectPropertiesToType, obtenerMimeType, ordenarArray, ordenarPorPropiedad, ordenarPorPropiedades, roundToDecimal, sanitizarNombreArchivo, seleccionarTextoInput, setCambiarPwd, setJwtTokenData, setLocalStorage, sumarObjetos, sumarPropiedades, toFormData, verificarRUC };
1053
+ //# sourceMappingURL=jvsoft-utils-src-functions.mjs.map