@factor_ec/utils 2.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/{esm2020 → esm2022}/lib/color.service.mjs +9 -9
- package/{esm2020 → esm2022}/lib/files.service.mjs +4 -4
- package/{esm2020 → esm2022}/lib/google-tag-manager.service.mjs +4 -4
- package/{esm2020 → esm2022}/lib/storage.service.mjs +4 -7
- package/esm2022/public-api.mjs +8 -0
- package/{fesm2020 → fesm2022}/factor_ec-utils.mjs +18 -211
- package/fesm2022/factor_ec-utils.mjs.map +1 -0
- package/lib/color.service.d.ts +5 -5
- package/package.json +9 -16
- package/public-api.d.ts +0 -2
- package/esm2020/lib/validators/ec/identification-type.mjs +0 -161
- package/esm2020/lib/validators/ec/identification-validator.mjs +0 -30
- package/esm2020/public-api.mjs +0 -10
- package/fesm2015/factor_ec-utils.mjs +0 -575
- package/fesm2015/factor_ec-utils.mjs.map +0 -1
- package/fesm2020/factor_ec-utils.mjs.map +0 -1
- package/lib/validators/ec/identification-type.d.ts +0 -1
- package/lib/validators/ec/identification-validator.d.ts +0 -2
- /package/{esm2020 → esm2022}/factor_ec-utils.mjs +0 -0
|
@@ -1,575 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, PLATFORM_ID, Inject } from '@angular/core';
|
|
3
|
-
import { isPlatformBrowser } from '@angular/common';
|
|
4
|
-
import * as i1 from '@angular/router';
|
|
5
|
-
import { NavigationEnd } from '@angular/router';
|
|
6
|
-
|
|
7
|
-
class ColorService {
|
|
8
|
-
constructor() {
|
|
9
|
-
const options = {};
|
|
10
|
-
let LS = [options.lightness, options.saturation].map(function (param) {
|
|
11
|
-
param = param || [0.35, 0.5, 0.65]; // note that 3 is a prime
|
|
12
|
-
return Array.isArray(param) ? param.concat() : [param];
|
|
13
|
-
});
|
|
14
|
-
this.L = LS[0];
|
|
15
|
-
this.S = LS[1];
|
|
16
|
-
if (typeof options.hue === 'number') {
|
|
17
|
-
options.hue = { min: options.hue, max: options.hue };
|
|
18
|
-
}
|
|
19
|
-
if (typeof options.hue === 'object' && !Array.isArray(options.hue)) {
|
|
20
|
-
options.hue = [options.hue];
|
|
21
|
-
}
|
|
22
|
-
if (typeof options.hue === 'undefined') {
|
|
23
|
-
options.hue = [];
|
|
24
|
-
}
|
|
25
|
-
this.hueRanges = options.hue.map(function (range) {
|
|
26
|
-
return {
|
|
27
|
-
min: typeof range.min === 'undefined' ? 0 : range.min,
|
|
28
|
-
max: typeof range.max === 'undefined' ? 360 : range.max
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* BKDR Hash (modified version)
|
|
34
|
-
*
|
|
35
|
-
* @param str string to hash
|
|
36
|
-
*/
|
|
37
|
-
hash(str) {
|
|
38
|
-
let seed = 131;
|
|
39
|
-
let seed2 = 137;
|
|
40
|
-
let hash = 0;
|
|
41
|
-
// make hash more sensitive for short string like 'a', 'b', 'c'
|
|
42
|
-
str += 'x';
|
|
43
|
-
// Note: Number.MAX_SAFE_INTEGER equals 9007199254740991
|
|
44
|
-
const maxSafeInteger = Math.round(9007199254740991 / seed2);
|
|
45
|
-
for (let i = 0; i < str.length; i++) {
|
|
46
|
-
if (hash > maxSafeInteger) {
|
|
47
|
-
hash = Math.round(hash / seed2);
|
|
48
|
-
}
|
|
49
|
-
hash = hash * seed + str.charCodeAt(i);
|
|
50
|
-
}
|
|
51
|
-
return hash;
|
|
52
|
-
}
|
|
53
|
-
;
|
|
54
|
-
/**
|
|
55
|
-
* Convert RGB Array to HEX
|
|
56
|
-
*
|
|
57
|
-
* @param RGBArray - [R, G, B]
|
|
58
|
-
* @returns 6 digits hex starting with #
|
|
59
|
-
*/
|
|
60
|
-
rgb2hex(RGBArray) {
|
|
61
|
-
let hex = '#';
|
|
62
|
-
RGBArray.forEach(function (value) {
|
|
63
|
-
if (value < 16) {
|
|
64
|
-
hex += 0;
|
|
65
|
-
}
|
|
66
|
-
hex += value.toString(16);
|
|
67
|
-
});
|
|
68
|
-
return hex;
|
|
69
|
-
}
|
|
70
|
-
;
|
|
71
|
-
/**
|
|
72
|
-
* Convert HSL to RGB
|
|
73
|
-
*
|
|
74
|
-
* @see {@link http://zh.wikipedia.org/wiki/HSL和HSV色彩空间} for further information.
|
|
75
|
-
* @param H Hue ∈ [0, 360)
|
|
76
|
-
* @param S Saturation ∈ [0, 1]
|
|
77
|
-
* @param L Lightness ∈ [0, 1]
|
|
78
|
-
* @returns R, G, B ∈ [0, 255]
|
|
79
|
-
*/
|
|
80
|
-
hsl2rgb(H, S, L) {
|
|
81
|
-
H /= 360;
|
|
82
|
-
let q = L < 0.5 ? L * (1 + S) : L + S - L * S;
|
|
83
|
-
let p = 2 * L - q;
|
|
84
|
-
return [H + 1 / 3, H, H - 1 / 3].map(function (color) {
|
|
85
|
-
if (color < 0) {
|
|
86
|
-
color++;
|
|
87
|
-
}
|
|
88
|
-
if (color > 1) {
|
|
89
|
-
color--;
|
|
90
|
-
}
|
|
91
|
-
if (color < 1 / 6) {
|
|
92
|
-
color = p + (q - p) * 6 * color;
|
|
93
|
-
}
|
|
94
|
-
else if (color < 0.5) {
|
|
95
|
-
color = q;
|
|
96
|
-
}
|
|
97
|
-
else if (color < 2 / 3) {
|
|
98
|
-
color = p + (q - p) * 6 * (2 / 3 - color);
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
color = p;
|
|
102
|
-
}
|
|
103
|
-
return Math.round(color * 255);
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
;
|
|
107
|
-
/**
|
|
108
|
-
* Returns the hash in [h, s, l].
|
|
109
|
-
* Note that H ∈ [0, 360); S ∈ [0, 1]; L ∈ [0, 1];
|
|
110
|
-
*
|
|
111
|
-
* @param str string to hash
|
|
112
|
-
* @returns [h, s, l]
|
|
113
|
-
*/
|
|
114
|
-
hsl(str) {
|
|
115
|
-
let H;
|
|
116
|
-
let S;
|
|
117
|
-
let L;
|
|
118
|
-
let hash = this.hash(str);
|
|
119
|
-
if (this.hueRanges.length) {
|
|
120
|
-
let range = this.hueRanges[hash % this.hueRanges.length];
|
|
121
|
-
let hueResolution = 727; // note that 727 is a prime
|
|
122
|
-
H = ((hash / this.hueRanges.length) % hueResolution) * (range.max - range.min) / hueResolution + range.min;
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
H = hash % 359; // note that 359 is a prime
|
|
126
|
-
}
|
|
127
|
-
hash = Math.round(hash / 360);
|
|
128
|
-
S = this.S[hash % this.S.length];
|
|
129
|
-
hash = Math.round(hash / this.S.length);
|
|
130
|
-
L = this.L[hash % this.L.length];
|
|
131
|
-
return [H, S, L];
|
|
132
|
-
}
|
|
133
|
-
;
|
|
134
|
-
/**
|
|
135
|
-
* Returns the hash in [r, g, b].
|
|
136
|
-
* Note that R, G, B ∈ [0, 255]
|
|
137
|
-
*
|
|
138
|
-
* @param str string to hash
|
|
139
|
-
* @returns [r, g, b]
|
|
140
|
-
*/
|
|
141
|
-
rgb(str) {
|
|
142
|
-
let hsl = this.hsl(str);
|
|
143
|
-
return this.hsl2rgb(hsl[0], hsl[1], hsl[2]);
|
|
144
|
-
}
|
|
145
|
-
;
|
|
146
|
-
/**
|
|
147
|
-
* Returns the hash in hex
|
|
148
|
-
*
|
|
149
|
-
* @param str string to hash
|
|
150
|
-
* @returns hex with #
|
|
151
|
-
*/
|
|
152
|
-
hex(str) {
|
|
153
|
-
let rgb = this.rgb(str);
|
|
154
|
-
return this.rgb2hex(rgb);
|
|
155
|
-
}
|
|
156
|
-
;
|
|
157
|
-
}
|
|
158
|
-
ColorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ColorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
159
|
-
ColorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ColorService, providedIn: 'root' });
|
|
160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ColorService, decorators: [{
|
|
161
|
-
type: Injectable,
|
|
162
|
-
args: [{
|
|
163
|
-
providedIn: 'root'
|
|
164
|
-
}]
|
|
165
|
-
}], ctorParameters: function () { return []; } });
|
|
166
|
-
|
|
167
|
-
class FilesService {
|
|
168
|
-
constructor() {
|
|
169
|
-
this.fileInput = document.createElement('input');
|
|
170
|
-
this.fileInput.type = 'file';
|
|
171
|
-
this.fileInput.addEventListener('change', (event) => {
|
|
172
|
-
this.loadValue(event.currentTarget.files);
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
loadValue(files) {
|
|
176
|
-
if (files && files.length > 0) {
|
|
177
|
-
let data = [];
|
|
178
|
-
for (let i = 0; i < files.length; i++) {
|
|
179
|
-
const file = files.item(i);
|
|
180
|
-
const reader = new FileReader();
|
|
181
|
-
reader.readAsDataURL(file);
|
|
182
|
-
reader.onload = () => {
|
|
183
|
-
data.push(Object.assign(file, {
|
|
184
|
-
data: reader.result
|
|
185
|
-
}));
|
|
186
|
-
if (data.length == files.length) {
|
|
187
|
-
this.callback(data.length > 0 ? data : null);
|
|
188
|
-
this.fileInput.value = '';
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
open(callback, options) {
|
|
195
|
-
this.fileInput.accept = (options === null || options === void 0 ? void 0 : options.accept) ? options.accept : '';
|
|
196
|
-
this.fileInput.multiple = (options === null || options === void 0 ? void 0 : options.multiple) || false;
|
|
197
|
-
this.fileInput.click();
|
|
198
|
-
if (callback) {
|
|
199
|
-
this.callback = callback;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
FilesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FilesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
204
|
-
FilesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FilesService, providedIn: 'root' });
|
|
205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FilesService, decorators: [{
|
|
206
|
-
type: Injectable,
|
|
207
|
-
args: [{
|
|
208
|
-
providedIn: 'root'
|
|
209
|
-
}]
|
|
210
|
-
}], ctorParameters: function () { return []; } });
|
|
211
|
-
|
|
212
|
-
class GoogleTagManagerService {
|
|
213
|
-
constructor(platformId, router) {
|
|
214
|
-
this.platformId = platformId;
|
|
215
|
-
this.router = router;
|
|
216
|
-
}
|
|
217
|
-
appendTrackingCode(trackingId) {
|
|
218
|
-
try {
|
|
219
|
-
if (isPlatformBrowser(this.platformId) && trackingId) {
|
|
220
|
-
this.trackingId = trackingId;
|
|
221
|
-
const s1 = document.createElement('script');
|
|
222
|
-
s1.innerHTML = `
|
|
223
|
-
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
|
224
|
-
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|
225
|
-
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
226
|
-
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
|
227
|
-
})(window,document,'script','dataLayer','${trackingId}');
|
|
228
|
-
`;
|
|
229
|
-
document.head.appendChild(s1);
|
|
230
|
-
const s2 = document.createElement('noscript');
|
|
231
|
-
const s3 = document.createElement('iframe');
|
|
232
|
-
s3.width = '0';
|
|
233
|
-
s3.height = '0';
|
|
234
|
-
s3.style.display = 'none';
|
|
235
|
-
s3.style.visibility = 'hidden';
|
|
236
|
-
s3.src = `//www.googletagmanager.com/ns.html?id=${trackingId}`;
|
|
237
|
-
s2.appendChild(s3);
|
|
238
|
-
document.body.prepend(s2);
|
|
239
|
-
this.initSubscribers();
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
catch (ex) {
|
|
243
|
-
console.error('Error appending google tag manager');
|
|
244
|
-
console.error(ex);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
addVariable(variable) {
|
|
248
|
-
if (isPlatformBrowser(this.platformId) && this.trackingId) {
|
|
249
|
-
window.dataLayer = window.dataLayer || [];
|
|
250
|
-
window.dataLayer.push(variable);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
initSubscribers() {
|
|
254
|
-
this.router.events.subscribe(event => {
|
|
255
|
-
try {
|
|
256
|
-
if (event instanceof NavigationEnd && this.trackingId) {
|
|
257
|
-
this.addVariable({
|
|
258
|
-
event: 'router.NavigationEnd',
|
|
259
|
-
pageTitle: document.title,
|
|
260
|
-
pagePath: event.urlAfterRedirects
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
catch (e) {
|
|
265
|
-
console.error(e);
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
GoogleTagManagerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: GoogleTagManagerService, deps: [{ token: PLATFORM_ID }, { token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
271
|
-
GoogleTagManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: GoogleTagManagerService, providedIn: 'root' });
|
|
272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: GoogleTagManagerService, decorators: [{
|
|
273
|
-
type: Injectable,
|
|
274
|
-
args: [{
|
|
275
|
-
providedIn: 'root'
|
|
276
|
-
}]
|
|
277
|
-
}], ctorParameters: function () {
|
|
278
|
-
return [{ type: Object, decorators: [{
|
|
279
|
-
type: Inject,
|
|
280
|
-
args: [PLATFORM_ID]
|
|
281
|
-
}] }, { type: i1.Router }];
|
|
282
|
-
} });
|
|
283
|
-
|
|
284
|
-
class StorageService {
|
|
285
|
-
constructor(platformId) {
|
|
286
|
-
this.platformId = platformId;
|
|
287
|
-
}
|
|
288
|
-
getValue(key, storage) {
|
|
289
|
-
let value;
|
|
290
|
-
if (!storage || typeof storage == 'string') {
|
|
291
|
-
switch (storage) {
|
|
292
|
-
case 'local':
|
|
293
|
-
value = localStorage[key];
|
|
294
|
-
break;
|
|
295
|
-
case 'memory':
|
|
296
|
-
value = this.memoryStorage[key];
|
|
297
|
-
break;
|
|
298
|
-
default:
|
|
299
|
-
value = sessionStorage[key];
|
|
300
|
-
break;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
else if (typeof storage == 'object') {
|
|
304
|
-
value = storage[key];
|
|
305
|
-
}
|
|
306
|
-
return value;
|
|
307
|
-
}
|
|
308
|
-
delete(key, storage) {
|
|
309
|
-
if (isPlatformBrowser(this.platformId)) {
|
|
310
|
-
if (!storage || typeof storage == 'string') {
|
|
311
|
-
switch (storage) {
|
|
312
|
-
case 'local':
|
|
313
|
-
delete localStorage[key];
|
|
314
|
-
break;
|
|
315
|
-
case 'memory':
|
|
316
|
-
delete this.memoryStorage[key];
|
|
317
|
-
break;
|
|
318
|
-
default:
|
|
319
|
-
delete sessionStorage[key];
|
|
320
|
-
break;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
else if (typeof storage == 'object') {
|
|
324
|
-
delete storage[key];
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
get(key, storage) {
|
|
329
|
-
let parsedValue;
|
|
330
|
-
if (isPlatformBrowser(this.platformId)) {
|
|
331
|
-
try {
|
|
332
|
-
parsedValue = JSON.parse(this.getValue(key, storage));
|
|
333
|
-
}
|
|
334
|
-
catch (err) {
|
|
335
|
-
parsedValue = this.getValue(key, storage);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
return parsedValue;
|
|
339
|
-
}
|
|
340
|
-
set(key, value, storage) {
|
|
341
|
-
if (isPlatformBrowser(this.platformId)) {
|
|
342
|
-
const valueString = JSON.stringify(value);
|
|
343
|
-
if (!storage || typeof storage == 'string') {
|
|
344
|
-
switch (storage) {
|
|
345
|
-
case 'local':
|
|
346
|
-
localStorage[key] = valueString;
|
|
347
|
-
break;
|
|
348
|
-
case 'memory':
|
|
349
|
-
this.memoryStorage[key] = valueString;
|
|
350
|
-
break;
|
|
351
|
-
default:
|
|
352
|
-
sessionStorage[key] = valueString;
|
|
353
|
-
break;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
else {
|
|
357
|
-
//storage[key] = valueEncrypted;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
StorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: StorageService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
363
|
-
StorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: StorageService, providedIn: 'root' });
|
|
364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: StorageService, decorators: [{
|
|
365
|
-
type: Injectable,
|
|
366
|
-
args: [{
|
|
367
|
-
providedIn: 'root'
|
|
368
|
-
}]
|
|
369
|
-
}], ctorParameters: function () {
|
|
370
|
-
return [{ type: Object, decorators: [{
|
|
371
|
-
type: Inject,
|
|
372
|
-
args: [PLATFORM_ID]
|
|
373
|
-
}] }];
|
|
374
|
-
} });
|
|
375
|
-
|
|
376
|
-
function lengthValidator(number, digits) {
|
|
377
|
-
let value = true;
|
|
378
|
-
if (number.trim() === '') { // No puede estar vacio
|
|
379
|
-
value = false;
|
|
380
|
-
}
|
|
381
|
-
else if (number.trim().length !== digits) { // Cantidad de dígitos
|
|
382
|
-
value = false;
|
|
383
|
-
}
|
|
384
|
-
return value;
|
|
385
|
-
}
|
|
386
|
-
function provinceValidator(number) {
|
|
387
|
-
let value = true;
|
|
388
|
-
const code = Number(number);
|
|
389
|
-
if (code < 0 || code > 24) {
|
|
390
|
-
value = false;
|
|
391
|
-
}
|
|
392
|
-
return value;
|
|
393
|
-
}
|
|
394
|
-
function typeValidator(number, type) {
|
|
395
|
-
let value = true;
|
|
396
|
-
const code = Number(number);
|
|
397
|
-
switch (type) {
|
|
398
|
-
case 'cedula':
|
|
399
|
-
if (code < 0 || code > 6) {
|
|
400
|
-
value = false;
|
|
401
|
-
}
|
|
402
|
-
break;
|
|
403
|
-
case 'ruc_natural':
|
|
404
|
-
if (code < 0 || code > 6) {
|
|
405
|
-
value = false;
|
|
406
|
-
}
|
|
407
|
-
break;
|
|
408
|
-
case 'ruc_privada':
|
|
409
|
-
if (code !== 9) {
|
|
410
|
-
value = false;
|
|
411
|
-
}
|
|
412
|
-
break;
|
|
413
|
-
case 'ruc_publica':
|
|
414
|
-
if (code !== 6) {
|
|
415
|
-
value = false;
|
|
416
|
-
}
|
|
417
|
-
break;
|
|
418
|
-
default:
|
|
419
|
-
value = false;
|
|
420
|
-
break;
|
|
421
|
-
}
|
|
422
|
-
return value;
|
|
423
|
-
}
|
|
424
|
-
function module10Validator(number, verifierCodeString) {
|
|
425
|
-
let value = true;
|
|
426
|
-
let coefficients = [2, 1, 2, 1, 2, 1, 2, 1, 2];
|
|
427
|
-
let verifierCode = Number(verifierCodeString);
|
|
428
|
-
let numberParts = number.split('');
|
|
429
|
-
let total = 0;
|
|
430
|
-
let result;
|
|
431
|
-
numberParts.forEach((part, index) => {
|
|
432
|
-
let valuePosition = Number(part) * coefficients[index];
|
|
433
|
-
if (valuePosition >= 10) {
|
|
434
|
-
let newValuePosition = String(valuePosition).split('');
|
|
435
|
-
let sum = newValuePosition.reduce((previousValue, currentValue) => {
|
|
436
|
-
return String(Number(currentValue) + Number(previousValue));
|
|
437
|
-
});
|
|
438
|
-
valuePosition = Number(sum);
|
|
439
|
-
}
|
|
440
|
-
total += valuePosition;
|
|
441
|
-
});
|
|
442
|
-
const residue = total % 10;
|
|
443
|
-
if (residue === 0) {
|
|
444
|
-
result = 0;
|
|
445
|
-
}
|
|
446
|
-
else {
|
|
447
|
-
result = 10 - residue;
|
|
448
|
-
}
|
|
449
|
-
if (result !== verifierCode) {
|
|
450
|
-
value = false;
|
|
451
|
-
}
|
|
452
|
-
return value;
|
|
453
|
-
}
|
|
454
|
-
function module11Validator(number, verifierCodeString, type) {
|
|
455
|
-
let value = true;
|
|
456
|
-
let coefficients;
|
|
457
|
-
let verifierCode = Number(verifierCodeString);
|
|
458
|
-
let numberParts = number.split('');
|
|
459
|
-
let total = 0;
|
|
460
|
-
let result;
|
|
461
|
-
switch (type) {
|
|
462
|
-
case 'ruc_privada':
|
|
463
|
-
coefficients = [4, 3, 2, 7, 6, 5, 4, 3, 2];
|
|
464
|
-
break;
|
|
465
|
-
case 'ruc_publica':
|
|
466
|
-
coefficients = [3, 2, 7, 6, 5, 4, 3, 2];
|
|
467
|
-
break;
|
|
468
|
-
default:
|
|
469
|
-
return false;
|
|
470
|
-
break;
|
|
471
|
-
}
|
|
472
|
-
numberParts.forEach((part, index) => {
|
|
473
|
-
let valuePosition = Number(part) * coefficients[index];
|
|
474
|
-
/*
|
|
475
|
-
if (valuePosition >= 10) {
|
|
476
|
-
let newValuePosition: string[] = String(valuePosition).split('');
|
|
477
|
-
let sum: string = newValuePosition.reduce((previousValue: string, currentValue: string) => {
|
|
478
|
-
return String(Number(currentValue) + Number(previousValue));
|
|
479
|
-
});
|
|
480
|
-
valuePosition = Number(sum);
|
|
481
|
-
}
|
|
482
|
-
*/
|
|
483
|
-
total += valuePosition;
|
|
484
|
-
});
|
|
485
|
-
const residue = total % 11;
|
|
486
|
-
if (residue === 0) {
|
|
487
|
-
result = 0;
|
|
488
|
-
}
|
|
489
|
-
else {
|
|
490
|
-
result = 11 - residue;
|
|
491
|
-
}
|
|
492
|
-
if (result !== verifierCode) {
|
|
493
|
-
value = false;
|
|
494
|
-
}
|
|
495
|
-
return value;
|
|
496
|
-
}
|
|
497
|
-
function storeCodeValidator(number) {
|
|
498
|
-
let value = true;
|
|
499
|
-
const code = Number(number);
|
|
500
|
-
if (code < 1) {
|
|
501
|
-
value = false;
|
|
502
|
-
}
|
|
503
|
-
return value;
|
|
504
|
-
}
|
|
505
|
-
function getIdentificationType(number) {
|
|
506
|
-
let type = '';
|
|
507
|
-
if (lengthValidator(number, 10) &&
|
|
508
|
-
provinceValidator(number.substr(0, 2)) &&
|
|
509
|
-
typeValidator(number.substr(2, 1), 'cedula') &&
|
|
510
|
-
module10Validator(number.substr(0, 9), number.substr(9, 1))) {
|
|
511
|
-
type = 'cedula';
|
|
512
|
-
}
|
|
513
|
-
else if (lengthValidator(number, 13) &&
|
|
514
|
-
provinceValidator(number.substr(0, 2)) &&
|
|
515
|
-
typeValidator(number.substr(2, 1), 'ruc_natural') &&
|
|
516
|
-
storeCodeValidator(number.substr(10, 3)) &&
|
|
517
|
-
module10Validator(number.substr(0, 9), number.substr(9, 1))) {
|
|
518
|
-
type = 'ruc_natural';
|
|
519
|
-
}
|
|
520
|
-
else if (lengthValidator(number, 13) &&
|
|
521
|
-
provinceValidator(number.substr(0, 2)) &&
|
|
522
|
-
typeValidator(number.substr(2, 1), 'ruc_privada') &&
|
|
523
|
-
storeCodeValidator(number.substr(10, 3)) &&
|
|
524
|
-
module11Validator(number.substr(0, 9), number.substr(9, 1), 'ruc_privada')) {
|
|
525
|
-
type = 'ruc_privada';
|
|
526
|
-
}
|
|
527
|
-
else if (lengthValidator(number, 13) &&
|
|
528
|
-
provinceValidator(number.substr(0, 2)) &&
|
|
529
|
-
typeValidator(number.substr(2, 1), 'ruc_publica') &&
|
|
530
|
-
storeCodeValidator(number.substr(9, 4)) &&
|
|
531
|
-
module11Validator(number.substr(0, 8), number.substr(8, 1), 'ruc_publica')) {
|
|
532
|
-
type = 'ruc_publica';
|
|
533
|
-
}
|
|
534
|
-
return type;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
function identificationValidator(type) {
|
|
538
|
-
return (control) => {
|
|
539
|
-
const number = String(control.value);
|
|
540
|
-
if (number && number.trim() !== '') {
|
|
541
|
-
const parsedType = getIdentificationType(number);
|
|
542
|
-
switch (type) {
|
|
543
|
-
case 'cedula':
|
|
544
|
-
case 'ruc_natural':
|
|
545
|
-
case 'ruc_privada':
|
|
546
|
-
case 'ruc_publica':
|
|
547
|
-
return !parsedType || parsedType !== type ? { invalidIdentification: true } : null;
|
|
548
|
-
break;
|
|
549
|
-
case 'ruc':
|
|
550
|
-
return !parsedType || ['ruc_natural', 'ruc_privada', 'ruc_publica'].indexOf(parsedType) === -1 ? { invalidIdentification: true } : null;
|
|
551
|
-
break;
|
|
552
|
-
case 'id':
|
|
553
|
-
return !parsedType ? { invalidIdentification: true } : null;
|
|
554
|
-
break;
|
|
555
|
-
default:
|
|
556
|
-
return null;
|
|
557
|
-
break;
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
else {
|
|
561
|
-
return null;
|
|
562
|
-
}
|
|
563
|
-
};
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
/*
|
|
567
|
-
* Public API Surface of utils
|
|
568
|
-
*/
|
|
569
|
-
|
|
570
|
-
/**
|
|
571
|
-
* Generated bundle index. Do not edit.
|
|
572
|
-
*/
|
|
573
|
-
|
|
574
|
-
export { ColorService, FilesService, GoogleTagManagerService, StorageService, getIdentificationType, identificationValidator };
|
|
575
|
-
//# sourceMappingURL=factor_ec-utils.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factor_ec-utils.mjs","sources":["../../../projects/utils/src/lib/color.service.ts","../../../projects/utils/src/lib/files.service.ts","../../../projects/utils/src/lib/google-tag-manager.service.ts","../../../projects/utils/src/lib/storage.service.ts","../../../projects/utils/src/lib/validators/ec/identification-type.ts","../../../projects/utils/src/lib/validators/ec/identification-validator.ts","../../../projects/utils/src/public-api.ts","../../../projects/utils/src/factor_ec-utils.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ColorService {\n L: number[];\n S: number[];\n hueRanges: { min: number, max: number }[];\n\n constructor() {\n const options: any = {};\n let LS = [options.lightness, options.saturation].map(function (param) {\n param = param || [0.35, 0.5, 0.65]; // note that 3 is a prime\n return Array.isArray(param) ? param.concat() : [param];\n });\n\n this.L = LS[0];\n this.S = LS[1];\n\n if (typeof options.hue === 'number') {\n options.hue = { min: options.hue, max: options.hue };\n }\n if (typeof options.hue === 'object' && !Array.isArray(options.hue)) {\n options.hue = [options.hue];\n }\n if (typeof options.hue === 'undefined') {\n options.hue = [];\n }\n this.hueRanges = options.hue.map(function (range: { min: number, max: number }) {\n return {\n min: typeof range.min === 'undefined' ? 0 : range.min,\n max: typeof range.max === 'undefined' ? 360 : range.max\n };\n });\n }\n\n /**\n * BKDR Hash (modified version)\n *\n * @param str string to hash\n */\n hash(str: string): number {\n let seed = 131;\n let seed2 = 137;\n let hash = 0;\n // make hash more sensitive for short string like 'a', 'b', 'c'\n str += 'x';\n // Note: Number.MAX_SAFE_INTEGER equals 9007199254740991\n const maxSafeInteger: number = Math.round(9007199254740991 / seed2);\n for (let i = 0; i < str.length; i++) {\n if (hash > maxSafeInteger) {\n hash = Math.round(hash / seed2);\n }\n hash = hash * seed + str.charCodeAt(i);\n }\n return hash;\n };\n\n /**\n * Convert RGB Array to HEX\n *\n * @param RGBArray - [R, G, B]\n * @returns 6 digits hex starting with #\n */\n rgb2hex(RGBArray: number[]): string {\n let hex = '#';\n RGBArray.forEach(function (value) {\n if (value < 16) {\n hex += 0;\n }\n hex += value.toString(16);\n });\n return hex;\n };\n\n /**\n * Convert HSL to RGB\n *\n * @see {@link http://zh.wikipedia.org/wiki/HSL和HSV色彩空间} for further information.\n * @param H Hue ∈ [0, 360)\n * @param S Saturation ∈ [0, 1]\n * @param L Lightness ∈ [0, 1]\n * @returns R, G, B ∈ [0, 255]\n */\n hsl2rgb(H: number, S: number, L: number): number[] {\n H /= 360;\n\n let q = L < 0.5 ? L * (1 + S) : L + S - L * S;\n let p = 2 * L - q;\n\n return [H + 1 / 3, H, H - 1 / 3].map(function (color) {\n if (color < 0) {\n color++;\n }\n if (color > 1) {\n color--;\n }\n if (color < 1 / 6) {\n color = p + (q - p) * 6 * color;\n } else if (color < 0.5) {\n color = q;\n } else if (color < 2 / 3) {\n color = p + (q - p) * 6 * (2 / 3 - color);\n } else {\n color = p;\n }\n return Math.round(color * 255);\n });\n };\n\n\n /**\n * Returns the hash in [h, s, l].\n * Note that H ∈ [0, 360); S ∈ [0, 1]; L ∈ [0, 1];\n *\n * @param str string to hash\n * @returns [h, s, l]\n */\n hsl(str: string): any[] {\n let H;\n let S;\n let L;\n let hash = this.hash(str);\n\n if (this.hueRanges.length) {\n let range = this.hueRanges[hash % this.hueRanges.length];\n let hueResolution = 727; // note that 727 is a prime\n H = ((hash / this.hueRanges.length) % hueResolution) * (range.max - range.min) / hueResolution + range.min;\n } else {\n H = hash % 359; // note that 359 is a prime\n }\n hash = Math.round(hash / 360);\n S = this.S[hash % this.S.length];\n hash = Math.round(hash / this.S.length);\n L = this.L[hash % this.L.length];\n\n return [H, S, L];\n };\n\n /**\n * Returns the hash in [r, g, b].\n * Note that R, G, B ∈ [0, 255]\n *\n * @param str string to hash\n * @returns [r, g, b]\n */\n rgb(str: string): number[] {\n let hsl = this.hsl(str);\n return this.hsl2rgb(hsl[0], hsl[1], hsl[2]);\n };\n\n /**\n * Returns the hash in hex\n *\n * @param str string to hash\n * @returns hex with #\n */\n hex(str: string): string {\n let rgb = this.rgb(str);\n return this.rgb2hex(rgb);\n };\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class FilesService {\n private callback!: Function;\n private fileInput: HTMLInputElement;\n\n constructor() {\n this.fileInput = document.createElement('input');\n this.fileInput.type = 'file';\n this.fileInput.addEventListener('change', (event: any) => {\n this.loadValue(event.currentTarget.files);\n });\n }\n private loadValue(files: FileList) {\n if (files && files.length > 0) {\n let data: any[] = [];\n for (let i = 0; i < files.length; i++) {\n const file: any = files.item(i);\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () => {\n data.push(Object.assign(file, {\n data: reader.result\n }));\n if (data.length == files.length) {\n this.callback(data.length > 0 ? data : null);\n this.fileInput.value = '';\n }\n };\n }\n }\n }\n public open(callback?: Function, options?: { accept?: string, multiple?: boolean }) {\n this.fileInput.accept = options?.accept ? options.accept : '';\n this.fileInput.multiple = options?.multiple || false;\n this.fileInput.click();\n if (callback) {\n this.callback = callback;\n }\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport { Inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { Router, NavigationEnd } from '@angular/router';\n\ndeclare var window: any;\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GoogleTagManagerService {\n trackingId!: string;\n\n constructor(\n @Inject(PLATFORM_ID) private platformId: Object,\n public router: Router\n ) { }\n\n public appendTrackingCode(trackingId: string): void {\n try {\n if (isPlatformBrowser(this.platformId) && trackingId) {\n this.trackingId = trackingId;\n const s1: HTMLElement = document.createElement('script');\n s1.innerHTML = `\n (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\n new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\n j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n })(window,document,'script','dataLayer','${trackingId}');\n `;\n document.head.appendChild(s1);\n const s2: HTMLElement = document.createElement('noscript');\n const s3: HTMLIFrameElement = document.createElement('iframe');\n s3.width = '0';\n s3.height = '0';\n s3.style.display = 'none';\n s3.style.visibility = 'hidden';\n s3.src = `//www.googletagmanager.com/ns.html?id=${trackingId}`\n s2.appendChild(s3);\n (document.body as HTMLElement).prepend(s2);\n this.initSubscribers();\n }\n } catch (ex) {\n console.error('Error appending google tag manager');\n console.error(ex);\n }\n }\n public addVariable(variable: any) {\n if (isPlatformBrowser(this.platformId) && this.trackingId) {\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push(variable);\n }\n }\n private initSubscribers() {\n this.router.events.subscribe(event => {\n try {\n if (event instanceof NavigationEnd && this.trackingId) {\n this.addVariable({\n event: 'router.NavigationEnd',\n pageTitle: document.title,\n pagePath: event.urlAfterRedirects\n });\n }\n } catch (e) {\n console.error(e);\n }\n });\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport { Inject, Injectable, PLATFORM_ID } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class StorageService {\n //TODO: Replace with Map object it is more efficient\n memoryStorage: any;\n\n constructor(\n @Inject(PLATFORM_ID) private platformId: Object\n ) { }\n\n private getValue(key: string, storage?: 'local' | 'session' | 'memory'): any {\n let value: any;\n if (!storage || typeof storage == 'string') {\n switch (storage) {\n case 'local':\n value = localStorage[key];\n break;\n case 'memory':\n value = this.memoryStorage[key];\n break;\n default:\n value = sessionStorage[key];\n break;\n }\n } else if (typeof storage == 'object') {\n value = storage[key];\n }\n return value;\n }\n public delete(key: string, storage?: 'local' | 'session' | 'memory') {\n if (isPlatformBrowser(this.platformId)) {\n if (!storage || typeof storage == 'string') {\n switch (storage) {\n case 'local':\n delete localStorage[key];\n break;\n case 'memory':\n delete this.memoryStorage[key];\n break;\n default:\n delete sessionStorage[key];\n break;\n }\n } else if (typeof storage == 'object') {\n delete storage[key];\n }\n }\n }\n public get(key: string, storage?: 'local' | 'session' | 'memory'): any {\n let parsedValue: any;\n if (isPlatformBrowser(this.platformId)) {\n try {\n parsedValue = JSON.parse(this.getValue(key, storage));\n } catch (err) {\n parsedValue = this.getValue(key, storage);\n }\n }\n return parsedValue;\n }\n public set(key: string, value: any, storage?: 'local' | 'session' | 'memory') {\n if (isPlatformBrowser(this.platformId)) {\n const valueString = JSON.stringify(value);\n if (!storage || typeof storage == 'string') {\n switch (storage) {\n case 'local':\n localStorage[key] = valueString;\n break;\n case 'memory':\n this.memoryStorage[key] = valueString;\n break;\n default:\n sessionStorage[key] = valueString;\n break;\n }\n } else {\n //storage[key] = valueEncrypted;\n }\n }\n }\n}\n","function lengthValidator(number: string, digits: number): boolean {\n let value = true;\n if (number.trim() === '') { // No puede estar vacio\n value = false;\n } else if (number.trim().length !== digits) { // Cantidad de dígitos\n value = false;\n }\n return value;\n}\nfunction provinceValidator(number: string): boolean {\n let value = true;\n const code = Number(number);\n if (code < 0 || code > 24) {\n value = false;\n }\n return value;\n}\nfunction typeValidator(number: string, type: string): boolean {\n let value = true;\n const code = Number(number);\n switch (type) {\n case 'cedula':\n if (code < 0 || code > 6) {\n value = false;\n }\n break;\n case 'ruc_natural':\n if (code < 0 || code > 6) {\n value = false;\n }\n break;\n case 'ruc_privada':\n if (code !== 9) {\n value = false;\n }\n break;\n case 'ruc_publica':\n if (code !== 6) {\n value = false;\n }\n break;\n default:\n value = false;\n break;\n }\n return value;\n}\nfunction module10Validator(number: string, verifierCodeString: string): boolean {\n let value = true;\n let coefficients: number[] = [2, 1, 2, 1, 2, 1, 2, 1, 2];\n let verifierCode = Number(verifierCodeString);\n let numberParts: string[] = number.split('');\n let total = 0;\n let result: number;\n numberParts.forEach((part: string, index: number) => {\n let valuePosition: number = Number(part) * coefficients[index];\n if (valuePosition >= 10) {\n let newValuePosition: string[] = String(valuePosition).split('');\n let sum: string = newValuePosition.reduce((previousValue: string, currentValue: string) => {\n return String(Number(currentValue) + Number(previousValue));\n });\n valuePosition = Number(sum);\n }\n total += valuePosition;\n });\n const residue: number = total % 10;\n if (residue === 0) {\n result = 0;\n } else {\n result = 10 - residue;\n }\n if (result !== verifierCode) {\n value = false;\n }\n return value;\n}\nfunction module11Validator(number: string, verifierCodeString: string, type: string): boolean {\n let value = true;\n let coefficients: number[];\n let verifierCode = Number(verifierCodeString);\n let numberParts: string[] = number.split('');\n let total = 0;\n let result: number;\n switch (type) {\n case 'ruc_privada':\n coefficients = [4, 3, 2, 7, 6, 5, 4, 3, 2];\n break;\n case 'ruc_publica':\n coefficients = [3, 2, 7, 6, 5, 4, 3, 2];\n break;\n default:\n return false;\n break;\n }\n numberParts.forEach((part: string, index: number) => {\n let valuePosition: number = Number(part) * coefficients[index];\n /*\n if (valuePosition >= 10) {\n let newValuePosition: string[] = String(valuePosition).split('');\n let sum: string = newValuePosition.reduce((previousValue: string, currentValue: string) => {\n return String(Number(currentValue) + Number(previousValue));\n });\n valuePosition = Number(sum);\n }\n */\n total += valuePosition;\n });\n const residue: number = total % 11;\n if (residue === 0) {\n result = 0;\n } else {\n result = 11 - residue;\n }\n if (result !== verifierCode) {\n value = false;\n }\n return value;\n}\nfunction storeCodeValidator(number: string): boolean {\n let value = true;\n const code = Number(number);\n if (code < 1) {\n value = false;\n }\n return value;\n}\nexport function getIdentificationType(number: string): string {\n let type: string = '';\n if (lengthValidator(number, 10) &&\n provinceValidator(number.substr(0, 2)) &&\n typeValidator(number.substr(2, 1), 'cedula') &&\n module10Validator(number.substr(0, 9), number.substr(9, 1))) {\n type = 'cedula';\n } else if (lengthValidator(number, 13) &&\n provinceValidator(number.substr(0, 2)) &&\n typeValidator(number.substr(2, 1), 'ruc_natural') &&\n storeCodeValidator(number.substr(10, 3)) &&\n module10Validator(number.substr(0, 9), number.substr(9, 1))) {\n type = 'ruc_natural';\n } else if (lengthValidator(number, 13) &&\n provinceValidator(number.substr(0, 2)) &&\n typeValidator(number.substr(2, 1), 'ruc_privada') &&\n storeCodeValidator(number.substr(10, 3)) &&\n module11Validator(number.substr(0, 9), number.substr(9, 1), 'ruc_privada')) {\n type = 'ruc_privada';\n } else if (lengthValidator(number, 13) &&\n provinceValidator(number.substr(0, 2)) &&\n typeValidator(number.substr(2, 1), 'ruc_publica') &&\n storeCodeValidator(number.substr(9, 4)) &&\n module11Validator(number.substr(0, 8), number.substr(8, 1), 'ruc_publica')) {\n type = 'ruc_publica';\n }\n return type;\n}","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\nimport { getIdentificationType } from './identification-type';\n\nexport function identificationValidator(type: string): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const number: string = String(control.value);\n if (number && number.trim() !== '') {\n const parsedType = getIdentificationType(number);\n switch (type) {\n case 'cedula':\n case 'ruc_natural':\n case 'ruc_privada':\n case 'ruc_publica':\n return !parsedType || parsedType !== type ? { invalidIdentification: true } : null;\n break;\n case 'ruc':\n return !parsedType || ['ruc_natural', 'ruc_privada', 'ruc_publica'].indexOf(parsedType) === -1 ? { invalidIdentification: true } : null;\n break;\n case 'id':\n return !parsedType ? { invalidIdentification: true } : null;\n break;\n default:\n return null;\n break;\n }\n } else {\n return null;\n }\n };\n}\n","/*\n * Public API Surface of utils\n */\n\nexport * from './lib/color.service';\nexport * from './lib/files.service';\nexport * from './lib/google-tag-manager.service';\nexport * from './lib/storage.service';\nexport * from './lib/validators/ec/identification-validator';\nexport * from './lib/validators/ec/identification-type';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAKa,YAAY,CAAA;AAKvB,IAAA,WAAA,GAAA;QACE,MAAM,OAAO,GAAQ,EAAE,CAAC;AACxB,QAAA,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,UAAU,KAAK,EAAA;AAClE,YAAA,KAAK,GAAG,KAAK,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AACnC,YAAA,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;AACzD,SAAC,CAAC,CAAC;AAEH,QAAA,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AACf,QAAA,IAAI,CAAC,C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