speexjs-core 0.7.0
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/CHANGELOG.md +117 -0
- package/CONTRIBUTING.md +55 -0
- package/PUBLISH.md +45 -0
- package/README.md +174 -0
- package/ROADMAP.md +72 -0
- package/SECURITY.md +35 -0
- package/SUMMARY.md +321 -0
- package/dist/async/index.d.ts +232 -0
- package/dist/async/index.js +366 -0
- package/dist/async/index.js.map +1 -0
- package/dist/collection/index.d.ts +230 -0
- package/dist/collection/index.js +375 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/color/index.d.ts +128 -0
- package/dist/color/index.js +167 -0
- package/dist/color/index.js.map +1 -0
- package/dist/core/index.d.ts +119 -0
- package/dist/core/index.js +324 -0
- package/dist/core/index.js.map +1 -0
- package/dist/crypto/index.d.ts +84 -0
- package/dist/crypto/index.js +144 -0
- package/dist/crypto/index.js.map +1 -0
- package/dist/date/index.d.ts +588 -0
- package/dist/date/index.js +737 -0
- package/dist/date/index.js.map +1 -0
- package/dist/dep-exray/analyzer/index.d.ts +7 -0
- package/dist/dep-exray/analyzer/index.js +68 -0
- package/dist/dep-exray/analyzer/index.js.map +1 -0
- package/dist/dep-exray/cli.d.ts +1 -0
- package/dist/dep-exray/cli.js +441 -0
- package/dist/dep-exray/cli.js.map +1 -0
- package/dist/dep-exray/index.d.ts +5 -0
- package/dist/dep-exray/index.js +454 -0
- package/dist/dep-exray/index.js.map +1 -0
- package/dist/dep-exray/known-mappings.d.ts +17 -0
- package/dist/dep-exray/known-mappings.js +122 -0
- package/dist/dep-exray/known-mappings.js.map +1 -0
- package/dist/dep-exray/reporter/index.d.ts +5 -0
- package/dist/dep-exray/reporter/index.js +89 -0
- package/dist/dep-exray/reporter/index.js.map +1 -0
- package/dist/dep-exray/scanner/index.d.ts +5 -0
- package/dist/dep-exray/scanner/index.js +299 -0
- package/dist/dep-exray/scanner/index.js.map +1 -0
- package/dist/dep-exray/types.d.ts +38 -0
- package/dist/dep-exray/types.js +1 -0
- package/dist/dep-exray/types.js.map +1 -0
- package/dist/error/index.d.ts +148 -0
- package/dist/error/index.js +115 -0
- package/dist/error/index.js.map +1 -0
- package/dist/index-BgG21uJC.d.ts +166 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +4378 -0
- package/dist/index.js.map +1 -0
- package/dist/io/index.d.ts +39 -0
- package/dist/io/index.js +111 -0
- package/dist/io/index.js.map +1 -0
- package/dist/logger/index.d.ts +1 -0
- package/dist/logger/index.js +214 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/logger/transports.d.ts +1 -0
- package/dist/logger/transports.js +122 -0
- package/dist/logger/transports.js.map +1 -0
- package/dist/math/index.d.ts +362 -0
- package/dist/math/index.js +372 -0
- package/dist/math/index.js.map +1 -0
- package/dist/path/index.d.ts +81 -0
- package/dist/path/index.js +134 -0
- package/dist/path/index.js.map +1 -0
- package/dist/string/index.d.ts +234 -0
- package/dist/string/index.js +411 -0
- package/dist/string/index.js.map +1 -0
- package/dist/type/index.d.ts +85 -0
- package/dist/type/index.js +107 -0
- package/dist/type/index.js.map +1 -0
- package/dist/validation/index.d.ts +203 -0
- package/dist/validation/index.js +402 -0
- package/dist/validation/index.js.map +1 -0
- package/package.json +172 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple hash function using the djb2 algorithm.
|
|
3
|
+
* Fast, non-cryptographic — suitable for hashtables, not security.
|
|
4
|
+
*
|
|
5
|
+
* @param str - The string to hash.
|
|
6
|
+
* @returns A 32-bit integer hash.
|
|
7
|
+
*/
|
|
8
|
+
declare function hash(str: string): number;
|
|
9
|
+
/**
|
|
10
|
+
* Produces a deterministic hex hash from a string.
|
|
11
|
+
* NOT actual MD5 — use for cache keys / deterministic IDs.
|
|
12
|
+
*
|
|
13
|
+
* @param str - The string to hash.
|
|
14
|
+
* @returns A 32-character hex string.
|
|
15
|
+
*/
|
|
16
|
+
declare function simpleHash(str: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Generates random bytes as a hex string.
|
|
19
|
+
*
|
|
20
|
+
* @param size - Number of random bytes (default 16).
|
|
21
|
+
* @returns A hex string of length `size * 2`.
|
|
22
|
+
*/
|
|
23
|
+
declare function randomHex(size?: number): string;
|
|
24
|
+
/**
|
|
25
|
+
* Encodes a string to base64. Works in both Node.js and browser.
|
|
26
|
+
* Handles UTF-8 characters correctly.
|
|
27
|
+
*
|
|
28
|
+
* @param str - The string to encode.
|
|
29
|
+
* @returns The base64-encoded string.
|
|
30
|
+
*/
|
|
31
|
+
declare function base64Encode(str: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Decodes a base64-encoded string. Works in both Node.js and browser.
|
|
34
|
+
*
|
|
35
|
+
* @param str - The base64 string to decode.
|
|
36
|
+
* @returns The decoded string.
|
|
37
|
+
*/
|
|
38
|
+
declare function base64Decode(str: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Generates a cryptographically random token string.
|
|
41
|
+
*
|
|
42
|
+
* @param bytes - Number of random bytes (default 32 → 64-char hex).
|
|
43
|
+
* @returns A hex string suitable for API keys, reset tokens, etc.
|
|
44
|
+
*/
|
|
45
|
+
declare function generateToken(bytes?: number): string;
|
|
46
|
+
/**
|
|
47
|
+
* Generates a numeric OTP of the given length.
|
|
48
|
+
*
|
|
49
|
+
* @param length - Number of digits (default 6).
|
|
50
|
+
* @returns A numeric string of the specified length.
|
|
51
|
+
*/
|
|
52
|
+
declare function generateOTP(length?: number): string;
|
|
53
|
+
/**
|
|
54
|
+
* Simple XOR cipher — symmetrical, for light obfuscation only.
|
|
55
|
+
*
|
|
56
|
+
* ⚠️ WARNING: This is NOT encryption. XOR cipher provides zero security
|
|
57
|
+
* against any attacker. Do NOT use this for passwords, API keys, personal
|
|
58
|
+
* data, or any sensitive information. It can be trivially reversed.
|
|
59
|
+
* For real encryption, use native `crypto.subtle` (Web) or `node:crypto`.
|
|
60
|
+
*
|
|
61
|
+
* Suitable only for: basic data masking, simple anti-scraping, educational purposes.
|
|
62
|
+
*
|
|
63
|
+
* @param str - The input string (will be transformed).
|
|
64
|
+
* @param key - The cipher key.
|
|
65
|
+
* @returns The XOR-transformed string.
|
|
66
|
+
*/
|
|
67
|
+
declare function xorCipher(str: string, key: string): string;
|
|
68
|
+
/**
|
|
69
|
+
* Computes a simple checksum (CRC-like) for file integrity checks.
|
|
70
|
+
*
|
|
71
|
+
* @param input - The input string.
|
|
72
|
+
* @returns An 8-character hex checksum.
|
|
73
|
+
*/
|
|
74
|
+
declare function checksum(input: string): string;
|
|
75
|
+
/**
|
|
76
|
+
* Constant-time string comparison to prevent timing attacks.
|
|
77
|
+
*
|
|
78
|
+
* @param a - First string.
|
|
79
|
+
* @param b - Second string.
|
|
80
|
+
* @returns Whether the strings are equal.
|
|
81
|
+
*/
|
|
82
|
+
declare function constantTimeEqual(a: string, b: string): boolean;
|
|
83
|
+
|
|
84
|
+
export { base64Decode, base64Encode, checksum, constantTimeEqual, generateOTP, generateToken, hash, randomHex, simpleHash, xorCipher };
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// src/crypto/index.ts
|
|
2
|
+
function hash(str) {
|
|
3
|
+
let h = 5381;
|
|
4
|
+
for (let i = 0; i < str.length; i++) {
|
|
5
|
+
h = (h << 5) + h + str.charCodeAt(i) | 0;
|
|
6
|
+
}
|
|
7
|
+
return h >>> 0;
|
|
8
|
+
}
|
|
9
|
+
function simpleHash(str) {
|
|
10
|
+
let h1 = 1732584193;
|
|
11
|
+
let h2 = 4023233417;
|
|
12
|
+
let h3 = 2562383102;
|
|
13
|
+
let h4 = 271733878;
|
|
14
|
+
for (let i = 0; i < str.length; i++) {
|
|
15
|
+
const c = str.charCodeAt(i);
|
|
16
|
+
h1 = h1 + c | 0;
|
|
17
|
+
h2 = h2 + (c << 3) + i | 0;
|
|
18
|
+
h3 = h3 ^ c | 0;
|
|
19
|
+
h4 = h4 + (c << 5) + (c << 1) | 0;
|
|
20
|
+
}
|
|
21
|
+
const toHex = (n) => (n >>> 0).toString(16).padStart(8, "0");
|
|
22
|
+
return toHex(h1) + toHex(h2) + toHex(h3) + toHex(h4);
|
|
23
|
+
}
|
|
24
|
+
function getRandomBytes(size) {
|
|
25
|
+
if (typeof crypto !== "undefined" && typeof crypto.getRandomValues === "function") {
|
|
26
|
+
const bytes = new Uint8Array(size);
|
|
27
|
+
crypto.getRandomValues(bytes);
|
|
28
|
+
return bytes;
|
|
29
|
+
}
|
|
30
|
+
throw new Error("Crypto API unavailable. Cannot generate secure random bytes.");
|
|
31
|
+
}
|
|
32
|
+
function randomHex(size = 16) {
|
|
33
|
+
const bytes = getRandomBytes(size);
|
|
34
|
+
let result = "";
|
|
35
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
36
|
+
result += bytes[i].toString(16).padStart(2, "0");
|
|
37
|
+
}
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
function utf8ToBytes(str) {
|
|
41
|
+
if (typeof TextEncoder !== "undefined") {
|
|
42
|
+
return new TextEncoder().encode(str);
|
|
43
|
+
}
|
|
44
|
+
const bytes = new Uint8Array(str.length);
|
|
45
|
+
for (let i = 0; i < str.length; i++) {
|
|
46
|
+
bytes[i] = str.charCodeAt(i);
|
|
47
|
+
}
|
|
48
|
+
return bytes;
|
|
49
|
+
}
|
|
50
|
+
function bytesToUtf8(bytes) {
|
|
51
|
+
if (typeof TextDecoder !== "undefined") {
|
|
52
|
+
return new TextDecoder().decode(bytes);
|
|
53
|
+
}
|
|
54
|
+
let result = "";
|
|
55
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
56
|
+
result += String.fromCharCode(bytes[i]);
|
|
57
|
+
}
|
|
58
|
+
return result;
|
|
59
|
+
}
|
|
60
|
+
function bytesToBase64(bytes) {
|
|
61
|
+
let binary = "";
|
|
62
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
63
|
+
binary += String.fromCharCode(bytes[i]);
|
|
64
|
+
}
|
|
65
|
+
if (typeof btoa === "function") {
|
|
66
|
+
return btoa(binary);
|
|
67
|
+
}
|
|
68
|
+
return Buffer.from(binary, "latin1").toString("base64");
|
|
69
|
+
}
|
|
70
|
+
function base64ToBytes(str) {
|
|
71
|
+
let binary;
|
|
72
|
+
if (typeof atob === "function") {
|
|
73
|
+
binary = atob(str);
|
|
74
|
+
} else {
|
|
75
|
+
binary = Buffer.from(str, "base64").toString("latin1");
|
|
76
|
+
}
|
|
77
|
+
const bytes = new Uint8Array(binary.length);
|
|
78
|
+
for (let i = 0; i < binary.length; i++) {
|
|
79
|
+
bytes[i] = binary.charCodeAt(i);
|
|
80
|
+
}
|
|
81
|
+
return bytes;
|
|
82
|
+
}
|
|
83
|
+
function base64Encode(str) {
|
|
84
|
+
const bytes = utf8ToBytes(str);
|
|
85
|
+
return bytesToBase64(bytes);
|
|
86
|
+
}
|
|
87
|
+
function base64Decode(str) {
|
|
88
|
+
const bytes = base64ToBytes(str);
|
|
89
|
+
return bytesToUtf8(bytes);
|
|
90
|
+
}
|
|
91
|
+
function generateToken(bytes = 32) {
|
|
92
|
+
return randomHex(bytes);
|
|
93
|
+
}
|
|
94
|
+
function generateOTP(length = 6) {
|
|
95
|
+
const bytes = getRandomBytes(length);
|
|
96
|
+
let otp = "";
|
|
97
|
+
for (let i = 0; i < length; i++) {
|
|
98
|
+
otp += (bytes[i] % 10).toString();
|
|
99
|
+
}
|
|
100
|
+
return otp;
|
|
101
|
+
}
|
|
102
|
+
function xorCipher(str, key) {
|
|
103
|
+
let result = "";
|
|
104
|
+
for (let i = 0; i < str.length; i++) {
|
|
105
|
+
const code = str.charCodeAt(i) ^ key.charCodeAt(i % key.length);
|
|
106
|
+
result += String.fromCharCode(code);
|
|
107
|
+
}
|
|
108
|
+
return result;
|
|
109
|
+
}
|
|
110
|
+
function checksum(input) {
|
|
111
|
+
let crc = 4294967295;
|
|
112
|
+
for (let i = 0; i < input.length; i++) {
|
|
113
|
+
crc ^= input.charCodeAt(i);
|
|
114
|
+
for (let j = 0; j < 8; j++) {
|
|
115
|
+
if (crc & 1) {
|
|
116
|
+
crc = crc >>> 1 ^ 3988292384;
|
|
117
|
+
} else {
|
|
118
|
+
crc = crc >>> 1;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return ((crc ^ 4294967295) >>> 0).toString(16).padStart(8, "0");
|
|
123
|
+
}
|
|
124
|
+
function constantTimeEqual(a, b) {
|
|
125
|
+
if (a.length !== b.length) return false;
|
|
126
|
+
let result = 0;
|
|
127
|
+
for (let i = 0; i < a.length; i++) {
|
|
128
|
+
result |= a.charCodeAt(i) ^ b.charCodeAt(i);
|
|
129
|
+
}
|
|
130
|
+
return result === 0;
|
|
131
|
+
}
|
|
132
|
+
export {
|
|
133
|
+
base64Decode,
|
|
134
|
+
base64Encode,
|
|
135
|
+
checksum,
|
|
136
|
+
constantTimeEqual,
|
|
137
|
+
generateOTP,
|
|
138
|
+
generateToken,
|
|
139
|
+
hash,
|
|
140
|
+
randomHex,
|
|
141
|
+
simpleHash,
|
|
142
|
+
xorCipher
|
|
143
|
+
};
|
|
144
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/crypto/index.ts"],"sourcesContent":["/**\r\n * Simple hash function using the djb2 algorithm.\r\n * Fast, non-cryptographic — suitable for hashtables, not security.\r\n *\r\n * @param str - The string to hash.\r\n * @returns A 32-bit integer hash.\r\n */\r\nexport function hash(str: string): number {\r\n let h = 5381\r\n for (let i = 0; i < str.length; i++) {\r\n h = ((h << 5) + h + str.charCodeAt(i)) | 0\r\n }\r\n return h >>> 0\r\n}\r\n\r\n/**\r\n * Produces a deterministic hex hash from a string.\r\n * NOT actual MD5 — use for cache keys / deterministic IDs.\r\n *\r\n * @param str - The string to hash.\r\n * @returns A 32-character hex string.\r\n */\r\nexport function simpleHash(str: string): string {\r\n let h1 = 0x67452301\r\n let h2 = 0xefcdab89\r\n let h3 = 0x98badcfe\r\n let h4 = 0x10325476\r\n\r\n for (let i = 0; i < str.length; i++) {\r\n const c = str.charCodeAt(i)\r\n h1 = (h1 + c) | 0\r\n h2 = (h2 + (c << 3) + i) | 0\r\n h3 = (h3 ^ c) | 0\r\n h4 = (h4 + (c << 5) + (c << 1)) | 0\r\n }\r\n\r\n const toHex = (n: number): string => (n >>> 0).toString(16).padStart(8, '0')\r\n return toHex(h1) + toHex(h2) + toHex(h3) + toHex(h4)\r\n}\r\n\r\nfunction getRandomBytes(size: number): Uint8Array {\r\n if (typeof crypto !== 'undefined' && typeof crypto.getRandomValues === 'function') {\r\n const bytes = new Uint8Array(size)\r\n crypto.getRandomValues(bytes)\r\n return bytes\r\n }\r\n throw new Error('Crypto API unavailable. Cannot generate secure random bytes.')\r\n}\r\n\r\n/**\r\n * Generates random bytes as a hex string.\r\n *\r\n * @param size - Number of random bytes (default 16).\r\n * @returns A hex string of length `size * 2`.\r\n */\r\nexport function randomHex(size: number = 16): string {\r\n const bytes = getRandomBytes(size)\r\n let result = ''\r\n for (let i = 0; i < bytes.length; i++) {\r\n result += bytes[i]!.toString(16).padStart(2, '0')\r\n }\r\n return result\r\n}\r\n\r\nfunction utf8ToBytes(str: string): Uint8Array {\r\n if (typeof TextEncoder !== 'undefined') {\r\n return new TextEncoder().encode(str)\r\n }\r\n const bytes = new Uint8Array(str.length)\r\n for (let i = 0; i < str.length; i++) {\r\n bytes[i] = str.charCodeAt(i)\r\n }\r\n return bytes\r\n}\r\n\r\nfunction bytesToUtf8(bytes: Uint8Array): string {\r\n if (typeof TextDecoder !== 'undefined') {\r\n return new TextDecoder().decode(bytes)\r\n }\r\n let result = ''\r\n for (let i = 0; i < bytes.length; i++) {\r\n result += String.fromCharCode(bytes[i]!)\r\n }\r\n return result\r\n}\r\n\r\nfunction bytesToBase64(bytes: Uint8Array): string {\r\n let binary = ''\r\n for (let i = 0; i < bytes.length; i++) {\r\n binary += String.fromCharCode(bytes[i]!)\r\n }\r\n if (typeof btoa === 'function') {\r\n return btoa(binary)\r\n }\r\n return Buffer.from(binary, 'latin1').toString('base64')\r\n}\r\n\r\nfunction base64ToBytes(str: string): Uint8Array {\r\n let binary: string\r\n if (typeof atob === 'function') {\r\n binary = atob(str)\r\n } else {\r\n binary = Buffer.from(str, 'base64').toString('latin1')\r\n }\r\n const bytes = new Uint8Array(binary.length)\r\n for (let i = 0; i < binary.length; i++) {\r\n bytes[i] = binary.charCodeAt(i)\r\n }\r\n return bytes\r\n}\r\n\r\n/**\r\n * Encodes a string to base64. Works in both Node.js and browser.\r\n * Handles UTF-8 characters correctly.\r\n *\r\n * @param str - The string to encode.\r\n * @returns The base64-encoded string.\r\n */\r\nexport function base64Encode(str: string): string {\r\n const bytes = utf8ToBytes(str)\r\n return bytesToBase64(bytes)\r\n}\r\n\r\n/**\r\n * Decodes a base64-encoded string. Works in both Node.js and browser.\r\n *\r\n * @param str - The base64 string to decode.\r\n * @returns The decoded string.\r\n */\r\nexport function base64Decode(str: string): string {\r\n const bytes = base64ToBytes(str)\r\n return bytesToUtf8(bytes)\r\n}\r\n\r\n/**\r\n * Generates a cryptographically random token string.\r\n *\r\n * @param bytes - Number of random bytes (default 32 → 64-char hex).\r\n * @returns A hex string suitable for API keys, reset tokens, etc.\r\n */\r\nexport function generateToken(bytes: number = 32): string {\r\n return randomHex(bytes)\r\n}\r\n\r\n/**\r\n * Generates a numeric OTP of the given length.\r\n *\r\n * @param length - Number of digits (default 6).\r\n * @returns A numeric string of the specified length.\r\n */\r\nexport function generateOTP(length: number = 6): string {\r\n const bytes = getRandomBytes(length)\r\n let otp = ''\r\n for (let i = 0; i < length; i++) {\r\n otp += (bytes[i]! % 10).toString()\r\n }\r\n return otp\r\n}\r\n\r\n/**\r\n * Simple XOR cipher — symmetrical, for light obfuscation only.\r\n *\r\n * ⚠️ WARNING: This is NOT encryption. XOR cipher provides zero security\r\n * against any attacker. Do NOT use this for passwords, API keys, personal\r\n * data, or any sensitive information. It can be trivially reversed.\r\n * For real encryption, use native `crypto.subtle` (Web) or `node:crypto`.\r\n *\r\n * Suitable only for: basic data masking, simple anti-scraping, educational purposes.\r\n *\r\n * @param str - The input string (will be transformed).\r\n * @param key - The cipher key.\r\n * @returns The XOR-transformed string.\r\n */\r\nexport function xorCipher(str: string, key: string): string {\r\n let result = ''\r\n for (let i = 0; i < str.length; i++) {\r\n const code = str.charCodeAt(i) ^ key.charCodeAt(i % key.length)\r\n result += String.fromCharCode(code)\r\n }\r\n return result\r\n}\r\n\r\n/**\r\n * Computes a simple checksum (CRC-like) for file integrity checks.\r\n *\r\n * @param input - The input string.\r\n * @returns An 8-character hex checksum.\r\n */\r\nexport function checksum(input: string): string {\r\n let crc = 0xffffffff\r\n for (let i = 0; i < input.length; i++) {\r\n crc ^= input.charCodeAt(i)\r\n for (let j = 0; j < 8; j++) {\r\n if (crc & 1) {\r\n crc = (crc >>> 1) ^ 0xedb88320\r\n } else {\r\n crc = crc >>> 1\r\n }\r\n }\r\n }\r\n return ((crc ^ 0xffffffff) >>> 0).toString(16).padStart(8, '0')\r\n}\r\n\r\n/**\r\n * Constant-time string comparison to prevent timing attacks.\r\n *\r\n * @param a - First string.\r\n * @param b - Second string.\r\n * @returns Whether the strings are equal.\r\n */\r\nexport function constantTimeEqual(a: string, b: string): boolean {\r\n if (a.length !== b.length) return false\r\n let result = 0\r\n for (let i = 0; i < a.length; i++) {\r\n result |= a.charCodeAt(i) ^ b.charCodeAt(i)\r\n }\r\n return result === 0\r\n}\r\n"],"mappings":";AAOO,SAAS,KAAK,KAAqB;AACxC,MAAI,IAAI;AACR,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,SAAM,KAAK,KAAK,IAAI,IAAI,WAAW,CAAC,IAAK;AAAA,EAC3C;AACA,SAAO,MAAM;AACf;AASO,SAAS,WAAW,KAAqB;AAC9C,MAAI,KAAK;AACT,MAAI,KAAK;AACT,MAAI,KAAK;AACT,MAAI,KAAK;AAET,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,UA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