@strapi/email 5.37.1 → 5.38.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/dist/admin/constants.js.map +1 -1
- package/dist/admin/constants.mjs.map +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs.map +1 -1
- package/dist/admin/pages/Settings.js +399 -47
- package/dist/admin/pages/Settings.js.map +1 -1
- package/dist/admin/pages/Settings.mjs +402 -50
- package/dist/admin/pages/Settings.mjs.map +1 -1
- package/dist/admin/shared/email-address-parser.js +245 -0
- package/dist/admin/shared/email-address-parser.js.map +1 -0
- package/dist/admin/shared/email-address-parser.mjs +243 -0
- package/dist/admin/shared/email-address-parser.mjs.map +1 -0
- package/dist/admin/translations/de.json.js +18 -2
- package/dist/admin/translations/de.json.js.map +1 -1
- package/dist/admin/translations/de.json.mjs +18 -2
- package/dist/admin/translations/de.json.mjs.map +1 -1
- package/dist/admin/translations/en.json.js +23 -1
- package/dist/admin/translations/en.json.js.map +1 -1
- package/dist/admin/translations/en.json.mjs +23 -1
- package/dist/admin/translations/en.json.mjs.map +1 -1
- package/dist/admin/translations/es.json.js +6 -1
- package/dist/admin/translations/es.json.js.map +1 -1
- package/dist/admin/translations/es.json.mjs +3 -1
- package/dist/admin/translations/es.json.mjs.map +1 -1
- package/dist/admin/utils/getYupInnerErrors.js.map +1 -1
- package/dist/admin/utils/getYupInnerErrors.mjs.map +1 -1
- package/dist/admin/utils/prefixPluginTranslations.js.map +1 -1
- package/dist/admin/utils/prefixPluginTranslations.mjs.map +1 -1
- package/dist/admin/utils/schema.js.map +1 -1
- package/dist/admin/utils/schema.mjs.map +1 -1
- package/dist/server/bootstrap.js.map +1 -1
- package/dist/server/bootstrap.mjs.map +1 -1
- package/dist/server/config.js.map +1 -1
- package/dist/server/config.mjs.map +1 -1
- package/dist/server/controllers/email.js +33 -1
- package/dist/server/controllers/email.js.map +1 -1
- package/dist/server/controllers/email.mjs +33 -1
- package/dist/server/controllers/email.mjs.map +1 -1
- package/dist/server/controllers/index.js.map +1 -1
- package/dist/server/controllers/index.mjs.map +1 -1
- package/dist/server/index.js +8 -8
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/middlewares/index.js.map +1 -1
- package/dist/server/middlewares/index.mjs.map +1 -1
- package/dist/server/middlewares/rateLimit.js.map +1 -1
- package/dist/server/middlewares/rateLimit.mjs.map +1 -1
- package/dist/server/routes/admin.js +18 -0
- package/dist/server/routes/admin.js.map +1 -1
- package/dist/server/routes/admin.mjs +18 -0
- package/dist/server/routes/admin.mjs.map +1 -1
- package/dist/server/routes/content-api.js.map +1 -1
- package/dist/server/routes/content-api.mjs.map +1 -1
- package/dist/server/routes/index.js.map +1 -1
- package/dist/server/routes/index.mjs.map +1 -1
- package/dist/server/routes/validation/email.js.map +1 -1
- package/dist/server/routes/validation/email.mjs.map +1 -1
- package/dist/server/services/email.js.map +1 -1
- package/dist/server/services/email.mjs +1 -1
- package/dist/server/services/email.mjs.map +1 -1
- package/dist/server/services/index.js.map +1 -1
- package/dist/server/services/index.mjs.map +1 -1
- package/dist/server/src/bootstrap.d.ts.map +1 -1
- package/dist/server/src/controllers/email.d.ts +1 -0
- package/dist/server/src/controllers/email.d.ts.map +1 -1
- package/dist/server/src/controllers/index.d.ts +1 -0
- package/dist/server/src/controllers/index.d.ts.map +1 -1
- package/dist/server/src/index.d.ts +1 -0
- package/dist/server/src/index.d.ts.map +1 -1
- package/dist/server/src/routes/admin.d.ts.map +1 -1
- package/dist/shared/email-address-parser.d.ts +81 -0
- package/dist/shared/email-address-parser.d.ts.map +1 -0
- package/dist/shared/types.d.ts +17 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/package.json +14 -9
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RFC-compliant Email Address Parser
|
|
3
|
+
*
|
|
4
|
+
* Supports:
|
|
5
|
+
* - RFC 5322: Internet Message Format (basic name <email> format)
|
|
6
|
+
* - RFC 2047: MIME encoded-words for non-ASCII characters
|
|
7
|
+
* - RFC 5322: Comments in parentheses
|
|
8
|
+
* - RFC 5322: Quoted strings with special characters
|
|
9
|
+
* - RFC 6531: Internationalized email addresses (UTF-8)
|
|
10
|
+
*/ /**
|
|
11
|
+
* Decodes RFC 2047 encoded-words
|
|
12
|
+
* Supports both Base64 (B) and Quoted-Printable (Q) encodings
|
|
13
|
+
*
|
|
14
|
+
* Examples:
|
|
15
|
+
* - =?UTF-8?B?U3RyYXBp?= -> "Strapi"
|
|
16
|
+
* - =?UTF-8?Q?M=C3=BCller?= -> "Müller"
|
|
17
|
+
* - =?ISO-8859-1?Q?=E4=F6=FC?= -> "äöü"
|
|
18
|
+
*
|
|
19
|
+
* @see https://datatracker.ietf.org/doc/html/rfc2047
|
|
20
|
+
*/ const decodeRfc2047 = (encoded)=>{
|
|
21
|
+
// Pattern: =?charset?encoding?encoded_text?=
|
|
22
|
+
const rfc2047Pattern = /=\?([^?]+)\?([BbQq])\?([^?]*)\?=/g;
|
|
23
|
+
return encoded.replace(rfc2047Pattern, (match, charset, encoding, text)=>{
|
|
24
|
+
try {
|
|
25
|
+
const upperEncoding = encoding.toUpperCase();
|
|
26
|
+
if (upperEncoding === 'B') {
|
|
27
|
+
// Base64 decoding
|
|
28
|
+
const decoded = atob(text);
|
|
29
|
+
return decodeWithCharset(decoded, charset);
|
|
30
|
+
}
|
|
31
|
+
if (upperEncoding === 'Q') {
|
|
32
|
+
// Quoted-Printable decoding
|
|
33
|
+
// In Q encoding, underscores represent spaces
|
|
34
|
+
const withSpaces = text.replace(/_/g, ' ');
|
|
35
|
+
// Decode =XX hex sequences
|
|
36
|
+
const decoded = withSpaces.replace(/=([0-9A-Fa-f]{2})/g, (_, hex)=>String.fromCharCode(parseInt(hex, 16)));
|
|
37
|
+
return decodeWithCharset(decoded, charset);
|
|
38
|
+
}
|
|
39
|
+
return match;
|
|
40
|
+
} catch {
|
|
41
|
+
// If decoding fails, return original
|
|
42
|
+
return match;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Decode a string with a specific charset
|
|
48
|
+
* Falls back to the original string if decoding fails
|
|
49
|
+
*/ const decodeWithCharset = (str, charset)=>{
|
|
50
|
+
try {
|
|
51
|
+
// For UTF-8, we need to handle the bytes properly
|
|
52
|
+
const upperCharset = charset.toUpperCase();
|
|
53
|
+
if (upperCharset === 'UTF-8' || upperCharset === 'UTF8') {
|
|
54
|
+
// Convert byte string to UTF-8
|
|
55
|
+
const bytes = new Uint8Array(str.split('').map((c)=>c.charCodeAt(0)));
|
|
56
|
+
return new TextDecoder('utf-8').decode(bytes);
|
|
57
|
+
}
|
|
58
|
+
// For ISO-8859-1 (Latin-1), characters map directly
|
|
59
|
+
if (upperCharset === 'ISO-8859-1' || upperCharset === 'LATIN1' || upperCharset === 'LATIN-1') {
|
|
60
|
+
return str;
|
|
61
|
+
}
|
|
62
|
+
// For other charsets, try TextDecoder
|
|
63
|
+
const bytes = new Uint8Array(str.split('').map((c)=>c.charCodeAt(0)));
|
|
64
|
+
return new TextDecoder(charset).decode(bytes);
|
|
65
|
+
} catch {
|
|
66
|
+
return str;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Removes RFC 5322 comments from an email string
|
|
71
|
+
* Comments are enclosed in parentheses and can be nested
|
|
72
|
+
*
|
|
73
|
+
* Examples:
|
|
74
|
+
* - "email@example.com (Support Team)" -> "email@example.com"
|
|
75
|
+
* - "(comment) Name <email@example.com>" -> "Name <email@example.com>"
|
|
76
|
+
*
|
|
77
|
+
* @see https://datatracker.ietf.org/doc/html/rfc5322#section-3.2.2
|
|
78
|
+
*/ const extractComments = (str)=>{
|
|
79
|
+
const comments = [];
|
|
80
|
+
let result = '';
|
|
81
|
+
let depth = 0;
|
|
82
|
+
let currentComment = '';
|
|
83
|
+
let inQuotes = false;
|
|
84
|
+
let escape = false;
|
|
85
|
+
for (const char of str){
|
|
86
|
+
if (escape) {
|
|
87
|
+
if (depth > 0) {
|
|
88
|
+
currentComment += char;
|
|
89
|
+
} else {
|
|
90
|
+
result += char;
|
|
91
|
+
}
|
|
92
|
+
escape = false;
|
|
93
|
+
} else if (char === '\\') {
|
|
94
|
+
escape = true;
|
|
95
|
+
if (depth > 0) {
|
|
96
|
+
currentComment += char;
|
|
97
|
+
} else {
|
|
98
|
+
result += char;
|
|
99
|
+
}
|
|
100
|
+
} else if (char === '"' && depth === 0) {
|
|
101
|
+
inQuotes = !inQuotes;
|
|
102
|
+
result += char;
|
|
103
|
+
} else if (!inQuotes && char === '(') {
|
|
104
|
+
if (depth === 0) {
|
|
105
|
+
currentComment = '';
|
|
106
|
+
} else {
|
|
107
|
+
currentComment += char;
|
|
108
|
+
}
|
|
109
|
+
depth += 1;
|
|
110
|
+
} else if (!inQuotes && char === ')') {
|
|
111
|
+
depth -= 1;
|
|
112
|
+
if (depth === 0) {
|
|
113
|
+
comments.push(currentComment.trim());
|
|
114
|
+
currentComment = '';
|
|
115
|
+
} else if (depth > 0) {
|
|
116
|
+
currentComment += char;
|
|
117
|
+
}
|
|
118
|
+
} else if (depth > 0) {
|
|
119
|
+
currentComment += char;
|
|
120
|
+
} else {
|
|
121
|
+
result += char;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
text: result.trim(),
|
|
126
|
+
comments
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Unquotes a quoted string according to RFC 5322
|
|
131
|
+
* Handles escaped characters within quoted strings
|
|
132
|
+
*
|
|
133
|
+
* Examples:
|
|
134
|
+
* - "\"John Doe\"" -> "John Doe"
|
|
135
|
+
* - "\"Doe, John\"" -> "Doe, John"
|
|
136
|
+
* - "\"Support \\\"24/7\\\"\"" -> "Support \"24/7\""
|
|
137
|
+
*
|
|
138
|
+
* @see https://datatracker.ietf.org/doc/html/rfc5322#section-3.2.4
|
|
139
|
+
*/ const unquoteString = (str)=>{
|
|
140
|
+
const trimmed = str.trim();
|
|
141
|
+
// Check if it's a quoted string
|
|
142
|
+
if (!trimmed.startsWith('"') || !trimmed.endsWith('"')) {
|
|
143
|
+
return trimmed;
|
|
144
|
+
}
|
|
145
|
+
// Remove surrounding quotes
|
|
146
|
+
const inner = trimmed.slice(1, -1);
|
|
147
|
+
// Unescape escaped characters (\" -> ", \\ -> \)
|
|
148
|
+
let result = '';
|
|
149
|
+
let escape = false;
|
|
150
|
+
for (const char of inner){
|
|
151
|
+
if (escape) {
|
|
152
|
+
result += char;
|
|
153
|
+
escape = false;
|
|
154
|
+
} else if (char === '\\') {
|
|
155
|
+
escape = true;
|
|
156
|
+
} else {
|
|
157
|
+
result += char;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return result;
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Parses an email address string according to RFC 5322 and related RFCs
|
|
164
|
+
*
|
|
165
|
+
* Supported formats:
|
|
166
|
+
* 1. Simple email: "email@example.com"
|
|
167
|
+
* 2. Name with angle brackets: "Name <email@example.com>"
|
|
168
|
+
* 3. Quoted name: "\"Doe, John\" <email@example.com>"
|
|
169
|
+
* 4. RFC 2047 encoded: "=?UTF-8?B?...?= <email@example.com>"
|
|
170
|
+
* 5. With comment: "email@example.com (Display Name)"
|
|
171
|
+
* 6. Mixed: "\"Name\" <email@example.com> (comment)"
|
|
172
|
+
*
|
|
173
|
+
* @param emailString - The email address string to parse
|
|
174
|
+
* @returns Parsed email address with name, email, and original string
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* parseEmailAddress('Strapi <no-reply@strapi.io>')
|
|
178
|
+
* // { name: 'Strapi', email: 'no-reply@strapi.io', original: '...' }
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* parseEmailAddress('=?UTF-8?B?U3RyYXBp?= <no-reply@strapi.io>')
|
|
182
|
+
* // { name: 'Strapi', email: 'no-reply@strapi.io', original: '...' }
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* parseEmailAddress('no-reply@strapi.io (Strapi Support)')
|
|
186
|
+
* // { name: 'Strapi Support', email: 'no-reply@strapi.io', original: '...' }
|
|
187
|
+
*/ const parseEmailAddress = (emailString)=>{
|
|
188
|
+
if (!emailString || typeof emailString !== 'string') {
|
|
189
|
+
return {
|
|
190
|
+
name: null,
|
|
191
|
+
email: '',
|
|
192
|
+
original: emailString || ''
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
const original = emailString;
|
|
196
|
+
// Step 1: Decode any RFC 2047 encoded-words
|
|
197
|
+
let decoded = decodeRfc2047(emailString);
|
|
198
|
+
// Step 2: Extract and remove comments, but save them
|
|
199
|
+
const { text: withoutComments, comments } = extractComments(decoded);
|
|
200
|
+
decoded = withoutComments;
|
|
201
|
+
// Step 3: Try to parse "Name <email>" format
|
|
202
|
+
// This regex handles both quoted and unquoted names
|
|
203
|
+
const angleMatch = decoded.match(/^(.*?)\s*<([^>]+)>\s*$/);
|
|
204
|
+
if (angleMatch) {
|
|
205
|
+
let name = angleMatch[1].trim();
|
|
206
|
+
const email = angleMatch[2].trim();
|
|
207
|
+
// Unquote the name if it's quoted
|
|
208
|
+
if (name) {
|
|
209
|
+
name = unquoteString(name);
|
|
210
|
+
// Decode again in case the name itself contains encoded words
|
|
211
|
+
name = decodeRfc2047(name);
|
|
212
|
+
}
|
|
213
|
+
// If no name in the main part, check comments
|
|
214
|
+
if (!name && comments.length > 0) {
|
|
215
|
+
name = comments[0];
|
|
216
|
+
}
|
|
217
|
+
return {
|
|
218
|
+
name: name || null,
|
|
219
|
+
email,
|
|
220
|
+
original
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
// Step 4: Try "email (comment)" format - use comment as name
|
|
224
|
+
// At this point, comments are already extracted
|
|
225
|
+
const trimmedDecoded = decoded.trim();
|
|
226
|
+
// Validate it looks like an email (basic check)
|
|
227
|
+
if (trimmedDecoded.includes('@')) {
|
|
228
|
+
return {
|
|
229
|
+
name: comments.length > 0 ? comments[0] : null,
|
|
230
|
+
email: trimmedDecoded,
|
|
231
|
+
original
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
// Step 5: If nothing matched, treat the whole thing as email
|
|
235
|
+
return {
|
|
236
|
+
name: null,
|
|
237
|
+
email: trimmedDecoded,
|
|
238
|
+
original
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
export { parseEmailAddress };
|
|
243
|
+
//# sourceMappingURL=email-address-parser.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-address-parser.mjs","sources":["../../../shared/email-address-parser.ts"],"sourcesContent":["/**\n * RFC-compliant Email Address Parser\n *\n * Supports:\n * - RFC 5322: Internet Message Format (basic name <email> format)\n * - RFC 2047: MIME encoded-words for non-ASCII characters\n * - RFC 5322: Comments in parentheses\n * - RFC 5322: Quoted strings with special characters\n * - RFC 6531: Internationalized email addresses (UTF-8)\n */\n\nexport interface ParsedEmailAddress {\n /** Display name (decoded if RFC 2047 encoded) */\n name: string | null;\n /** Email address */\n email: string;\n /** Original unparsed string */\n original: string;\n}\n\n/**\n * Decodes RFC 2047 encoded-words\n * Supports both Base64 (B) and Quoted-Printable (Q) encodings\n *\n * Examples:\n * - =?UTF-8?B?U3RyYXBp?= -> \"Strapi\"\n * - =?UTF-8?Q?M=C3=BCller?= -> \"Müller\"\n * - =?ISO-8859-1?Q?=E4=F6=FC?= -> \"äöü\"\n *\n * @see https://datatracker.ietf.org/doc/html/rfc2047\n */\nconst decodeRfc2047 = (encoded: string): string => {\n // Pattern: =?charset?encoding?encoded_text?=\n const rfc2047Pattern = /=\\?([^?]+)\\?([BbQq])\\?([^?]*)\\?=/g;\n\n return encoded.replace(rfc2047Pattern, (match, charset, encoding, text) => {\n try {\n const upperEncoding = encoding.toUpperCase();\n\n if (upperEncoding === 'B') {\n // Base64 decoding\n const decoded = atob(text);\n return decodeWithCharset(decoded, charset);\n }\n\n if (upperEncoding === 'Q') {\n // Quoted-Printable decoding\n // In Q encoding, underscores represent spaces\n const withSpaces = text.replace(/_/g, ' ');\n // Decode =XX hex sequences\n const decoded = withSpaces.replace(/=([0-9A-Fa-f]{2})/g, (_: string, hex: string) =>\n String.fromCharCode(parseInt(hex, 16))\n );\n return decodeWithCharset(decoded, charset);\n }\n\n return match;\n } catch {\n // If decoding fails, return original\n return match;\n }\n });\n};\n\n/**\n * Decode a string with a specific charset\n * Falls back to the original string if decoding fails\n */\nconst decodeWithCharset = (str: string, charset: string): string => {\n try {\n // For UTF-8, we need to handle the bytes properly\n const upperCharset = charset.toUpperCase();\n if (upperCharset === 'UTF-8' || upperCharset === 'UTF8') {\n // Convert byte string to UTF-8\n const bytes = new Uint8Array(str.split('').map((c) => c.charCodeAt(0)));\n return new TextDecoder('utf-8').decode(bytes);\n }\n // For ISO-8859-1 (Latin-1), characters map directly\n if (upperCharset === 'ISO-8859-1' || upperCharset === 'LATIN1' || upperCharset === 'LATIN-1') {\n return str;\n }\n // For other charsets, try TextDecoder\n const bytes = new Uint8Array(str.split('').map((c) => c.charCodeAt(0)));\n return new TextDecoder(charset).decode(bytes);\n } catch {\n return str;\n }\n};\n\n/**\n * Removes RFC 5322 comments from an email string\n * Comments are enclosed in parentheses and can be nested\n *\n * Examples:\n * - \"email@example.com (Support Team)\" -> \"email@example.com\"\n * - \"(comment) Name <email@example.com>\" -> \"Name <email@example.com>\"\n *\n * @see https://datatracker.ietf.org/doc/html/rfc5322#section-3.2.2\n */\nconst extractComments = (str: string): { text: string; comments: string[] } => {\n const comments: string[] = [];\n let result = '';\n let depth = 0;\n let currentComment = '';\n let inQuotes = false;\n let escape = false;\n\n for (const char of str) {\n if (escape) {\n if (depth > 0) {\n currentComment += char;\n } else {\n result += char;\n }\n escape = false;\n } else if (char === '\\\\') {\n escape = true;\n if (depth > 0) {\n currentComment += char;\n } else {\n result += char;\n }\n } else if (char === '\"' && depth === 0) {\n inQuotes = !inQuotes;\n result += char;\n } else if (!inQuotes && char === '(') {\n if (depth === 0) {\n currentComment = '';\n } else {\n currentComment += char;\n }\n depth += 1;\n } else if (!inQuotes && char === ')') {\n depth -= 1;\n if (depth === 0) {\n comments.push(currentComment.trim());\n currentComment = '';\n } else if (depth > 0) {\n currentComment += char;\n }\n } else if (depth > 0) {\n currentComment += char;\n } else {\n result += char;\n }\n }\n\n return { text: result.trim(), comments };\n};\n\n/**\n * Unquotes a quoted string according to RFC 5322\n * Handles escaped characters within quoted strings\n *\n * Examples:\n * - \"\\\"John Doe\\\"\" -> \"John Doe\"\n * - \"\\\"Doe, John\\\"\" -> \"Doe, John\"\n * - \"\\\"Support \\\\\\\"24/7\\\\\\\"\\\"\" -> \"Support \\\"24/7\\\"\"\n *\n * @see https://datatracker.ietf.org/doc/html/rfc5322#section-3.2.4\n */\nconst unquoteString = (str: string): string => {\n const trimmed = str.trim();\n\n // Check if it's a quoted string\n if (!trimmed.startsWith('\"') || !trimmed.endsWith('\"')) {\n return trimmed;\n }\n\n // Remove surrounding quotes\n const inner = trimmed.slice(1, -1);\n\n // Unescape escaped characters (\\\" -> \", \\\\ -> \\)\n let result = '';\n let escape = false;\n\n for (const char of inner) {\n if (escape) {\n result += char;\n escape = false;\n } else if (char === '\\\\') {\n escape = true;\n } else {\n result += char;\n }\n }\n\n return result;\n};\n\n/**\n * Parses an email address string according to RFC 5322 and related RFCs\n *\n * Supported formats:\n * 1. Simple email: \"email@example.com\"\n * 2. Name with angle brackets: \"Name <email@example.com>\"\n * 3. Quoted name: \"\\\"Doe, John\\\" <email@example.com>\"\n * 4. RFC 2047 encoded: \"=?UTF-8?B?...?= <email@example.com>\"\n * 5. With comment: \"email@example.com (Display Name)\"\n * 6. Mixed: \"\\\"Name\\\" <email@example.com> (comment)\"\n *\n * @param emailString - The email address string to parse\n * @returns Parsed email address with name, email, and original string\n *\n * @example\n * parseEmailAddress('Strapi <no-reply@strapi.io>')\n * // { name: 'Strapi', email: 'no-reply@strapi.io', original: '...' }\n *\n * @example\n * parseEmailAddress('=?UTF-8?B?U3RyYXBp?= <no-reply@strapi.io>')\n * // { name: 'Strapi', email: 'no-reply@strapi.io', original: '...' }\n *\n * @example\n * parseEmailAddress('no-reply@strapi.io (Strapi Support)')\n * // { name: 'Strapi Support', email: 'no-reply@strapi.io', original: '...' }\n */\nexport const parseEmailAddress = (emailString: string | undefined | null): ParsedEmailAddress => {\n if (!emailString || typeof emailString !== 'string') {\n return { name: null, email: '', original: emailString || '' };\n }\n\n const original = emailString;\n\n // Step 1: Decode any RFC 2047 encoded-words\n let decoded = decodeRfc2047(emailString);\n\n // Step 2: Extract and remove comments, but save them\n const { text: withoutComments, comments } = extractComments(decoded);\n decoded = withoutComments;\n\n // Step 3: Try to parse \"Name <email>\" format\n // This regex handles both quoted and unquoted names\n const angleMatch = decoded.match(/^(.*?)\\s*<([^>]+)>\\s*$/);\n\n if (angleMatch) {\n let name = angleMatch[1].trim();\n const email = angleMatch[2].trim();\n\n // Unquote the name if it's quoted\n if (name) {\n name = unquoteString(name);\n // Decode again in case the name itself contains encoded words\n name = decodeRfc2047(name);\n }\n\n // If no name in the main part, check comments\n if (!name && comments.length > 0) {\n name = comments[0];\n }\n\n return {\n name: name || null,\n email,\n original,\n };\n }\n\n // Step 4: Try \"email (comment)\" format - use comment as name\n // At this point, comments are already extracted\n const trimmedDecoded = decoded.trim();\n\n // Validate it looks like an email (basic check)\n if (trimmedDecoded.includes('@')) {\n return {\n name: comments.length > 0 ? comments[0] : null,\n email: trimmedDecoded,\n original,\n };\n }\n\n // Step 5: If nothing matched, treat the whole thing as email\n return {\n name: null,\n email: trimmedDecoded,\n original,\n };\n};\n\n/**\n * Formats an email address according to RFC 5322\n *\n * @param name - Display name (will be quoted if contains special chars)\n * @param email - Email address\n * @returns Formatted email address string\n *\n * @example\n * formatEmailAddress('Strapi', 'no-reply@strapi.io')\n * // 'Strapi <no-reply@strapi.io>'\n *\n * @example\n * formatEmailAddress('Doe, John', 'john@example.com')\n * // '\"Doe, John\" <john@example.com>'\n */\nexport const formatEmailAddress = (name: string | null, email: string): string => {\n if (!name) {\n return email;\n }\n\n // Check if name needs quoting (contains special characters)\n // RFC 5322 specials: ()<>@,;:\\\".[]\n const needsQuoting = /[()<>@,;:\\\\\".[\\]]/.test(name) || name.includes(' ');\n\n if (needsQuoting && !name.startsWith('\"')) {\n // Escape any existing quotes and backslashes\n const escaped = name.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"');\n return `\"${escaped}\" <${email}>`;\n }\n\n return `${name} <${email}>`;\n};\n\n/**\n * Validates an email address according to RFC 5322\n * This is a simplified validation that covers most common cases\n *\n * @param email - Email address to validate\n * @returns true if the email appears valid\n */\nexport const isValidEmail = (email: string): boolean => {\n if (!email || typeof email !== 'string') {\n return false;\n }\n\n // Basic RFC 5322 pattern (simplified)\n // Allows internationalized domains (RFC 6531)\n const emailPattern =\n /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~\\u0080-\\uFFFF-]+@[a-zA-Z0-9\\u0080-\\uFFFF](?:[a-zA-Z0-9\\u0080-\\uFFFF-]{0,61}[a-zA-Z0-9\\u0080-\\uFFFF])?(?:\\.[a-zA-Z0-9\\u0080-\\uFFFF](?:[a-zA-Z0-9\\u0080-\\uFFFF-]{0,61}[a-zA-Z0-9\\u0080-\\uFFFF])?)*$/;\n\n return emailPattern.test(email);\n};\n\n/**\n * Parses multiple email addresses separated by commas\n * Handles quoted strings that may contain commas\n *\n * @param emailsString - Comma-separated email addresses\n * @returns Array of parsed email addresses\n *\n * @example\n * parseMultipleEmailAddresses('a@example.com, \"Doe, John\" <b@example.com>')\n * // [{ name: null, email: 'a@example.com', ... }, { name: 'Doe, John', email: 'b@example.com', ... }]\n */\nexport const parseMultipleEmailAddresses = (\n emailsString: string | undefined | null\n): ParsedEmailAddress[] => {\n if (!emailsString || typeof emailsString !== 'string') {\n return [];\n }\n\n const addresses: string[] = [];\n let current = '';\n let inQuotes = false;\n let depth = 0;\n let prevChar = '';\n\n for (const char of emailsString) {\n // Handle escape sequences\n if (prevChar === '\\\\') {\n current += char;\n prevChar = char;\n } else if (char === '\"') {\n inQuotes = !inQuotes;\n current += char;\n prevChar = char;\n } else if (!inQuotes && (char === '<' || char === '(')) {\n depth += 1;\n current += char;\n prevChar = char;\n } else if (!inQuotes && (char === '>' || char === ')')) {\n depth -= 1;\n current += char;\n prevChar = char;\n } else if (!inQuotes && char === ',' && depth === 0) {\n const trimmed = current.trim();\n if (trimmed) {\n addresses.push(trimmed);\n }\n current = '';\n prevChar = char;\n } else {\n current += char;\n prevChar = char;\n }\n }\n\n // Don't forget the last address\n const trimmed = current.trim();\n if (trimmed) {\n addresses.push(trimmed);\n }\n\n return addresses.map(parseEmailAddress);\n};\n"],"names":["decodeRfc2047","encoded","rfc2047Pattern","replace","match","charset","encoding","text","upperEncoding","toUpperCase","decoded","atob","decodeWithCharset","withSpaces","_","hex","String","fromCharCode","parseInt","str","upperCharset","bytes","Uint8Array","split","map","c","charCodeAt","TextDecoder","decode","extractComments","comments","result","depth","currentComment","inQuotes","escape","char","push","trim","unquoteString","trimmed","startsWith","endsWith","inner","slice","parseEmailAddress","emailString","name","email","original","withoutComments","angleMatch","length","trimmedDecoded","includes"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;IA+BA,MAAMA,gBAAgB,CAACC,OAAAA,GAAAA;;AAErB,IAAA,MAAMC,cAAAA,GAAiB,mCAAA;AAEvB,IAAA,OAAOD,QAAQE,OAAO,CAACD,gBAAgB,CAACE,KAAAA,EAAOC,SAASC,QAAAA,EAAUC,IAAAA,GAAAA;QAChE,IAAI;YACF,MAAMC,aAAAA,GAAgBF,SAASG,WAAW,EAAA;AAE1C,YAAA,IAAID,kBAAkB,GAAA,EAAK;;AAEzB,gBAAA,MAAME,UAAUC,IAAAA,CAAKJ,IAAAA,CAAAA;AACrB,gBAAA,OAAOK,kBAAkBF,OAAAA,EAASL,OA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AO;AACLiB,YAAAA,IAAAA,EAAMA,IAAAA,IAAQ,IAAA;AACdC,YAAAA,KAAAA;AACAC,YAAAA;AACF,SAAA;AACF,IAAA;;;IAIA,MAAMI,cAAAA,GAAiB3C,QAAQ4B,IAAI,EAAA;;IAGnC,IAAIe,cAAAA,CAAeC,QAAQ,CAAC,GAAA,CAAA,EAAM;QAChC,OAAO;AACLP,YAAAA,IAAAA,EAAMjB,SAASsB,MAAM,GAAG,IAAItB,QAAQ,CAAC,EAAE,GAAG,IAAA;YAC1CkB,KAAAA,EAAOK,cAAAA;AACPJ,YAAAA;AACF,SAAA;AACF,IAAA;;IAGA,OAAO;QACLF,IAAAA,EAAM,IAAA;QACNC,KAAAA,EAAOK,cAAAA;AACPJ,QAAAA;AACF,KAAA;AACF;;;;"}
|
|
@@ -6,9 +6,11 @@ var link = "Link";
|
|
|
6
6
|
var de = {
|
|
7
7
|
link: link,
|
|
8
8
|
"Settings.email.plugin.button.test-email": "Test-E-Mail senden",
|
|
9
|
-
"Settings.email.plugin.label.defaultFrom": "Standard Absenderadresse
|
|
9
|
+
"Settings.email.plugin.label.defaultFrom": "Standard Absenderadresse",
|
|
10
10
|
"Settings.email.plugin.label.defaultReplyTo": "Standard Antwortadresse",
|
|
11
11
|
"Settings.email.plugin.label.provider": "E-Mail-Anbieter",
|
|
12
|
+
"Settings.email.plugin.label.replyToName": "Standard Antwort-Name",
|
|
13
|
+
"Settings.email.plugin.label.senderName": "Standard Absendername",
|
|
12
14
|
"Settings.email.plugin.label.testAddress": "Empfängeradresse",
|
|
13
15
|
"Settings.email.plugin.notification.config.error": "E-Mail-Einstellungen konnte nicht abgerufen werden",
|
|
14
16
|
"Settings.email.plugin.notification.data.loaded": "E-Mail-Einstellungen wurden geladen",
|
|
@@ -24,7 +26,21 @@ var de = {
|
|
|
24
26
|
"Settings.email.plugin.title.test": "E-Mail-Zustellung testen",
|
|
25
27
|
"SettingsNav.link.settings": "Einstellungen",
|
|
26
28
|
"SettingsNav.section-label": "E-Mail-Plugin",
|
|
27
|
-
"components.Input.error.validation.email": "Dies ist keine gültige E-Mail-Adresse"
|
|
29
|
+
"components.Input.error.validation.email": "Dies ist keine gültige E-Mail-Adresse",
|
|
30
|
+
"Settings.capabilities.title": "Provider-Funktionen",
|
|
31
|
+
"Settings.capabilities.subtitle": "Aktuelle SMTP-Konfiguration und aktivierte Funktionen",
|
|
32
|
+
"Settings.capabilities.label.smtpServer": "SMTP-Server",
|
|
33
|
+
"Settings.capabilities.label.encryption": "Verschlüsselung",
|
|
34
|
+
"Settings.capabilities.label.authType": "Authentifizierung",
|
|
35
|
+
"Settings.capabilities.label.poolStatus": "Pool-Status",
|
|
36
|
+
"Settings.capabilities.label.features": "Aktivierte Funktionen",
|
|
37
|
+
"Settings.capabilities.poolStatus.idle": "Leerlauf",
|
|
38
|
+
"Settings.capabilities.poolStatus.active": "Aktiv",
|
|
39
|
+
"Settings.capabilities.feature.dkim": "DKIM",
|
|
40
|
+
"Settings.capabilities.feature.pool": "Verbindungspool",
|
|
41
|
+
"Settings.capabilities.feature.rateLimiting": "Ratenbegrenzung",
|
|
42
|
+
"Settings.capabilities.feature.oauth2": "OAuth2",
|
|
43
|
+
"Settings.capabilities.feature.requireTLS": "TLS erforderlich"
|
|
28
44
|
};
|
|
29
45
|
|
|
30
46
|
exports.default = de;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"de.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"de.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,9 +2,11 @@ var link = "Link";
|
|
|
2
2
|
var de = {
|
|
3
3
|
link: link,
|
|
4
4
|
"Settings.email.plugin.button.test-email": "Test-E-Mail senden",
|
|
5
|
-
"Settings.email.plugin.label.defaultFrom": "Standard Absenderadresse
|
|
5
|
+
"Settings.email.plugin.label.defaultFrom": "Standard Absenderadresse",
|
|
6
6
|
"Settings.email.plugin.label.defaultReplyTo": "Standard Antwortadresse",
|
|
7
7
|
"Settings.email.plugin.label.provider": "E-Mail-Anbieter",
|
|
8
|
+
"Settings.email.plugin.label.replyToName": "Standard Antwort-Name",
|
|
9
|
+
"Settings.email.plugin.label.senderName": "Standard Absendername",
|
|
8
10
|
"Settings.email.plugin.label.testAddress": "Empfängeradresse",
|
|
9
11
|
"Settings.email.plugin.notification.config.error": "E-Mail-Einstellungen konnte nicht abgerufen werden",
|
|
10
12
|
"Settings.email.plugin.notification.data.loaded": "E-Mail-Einstellungen wurden geladen",
|
|
@@ -20,7 +22,21 @@ var de = {
|
|
|
20
22
|
"Settings.email.plugin.title.test": "E-Mail-Zustellung testen",
|
|
21
23
|
"SettingsNav.link.settings": "Einstellungen",
|
|
22
24
|
"SettingsNav.section-label": "E-Mail-Plugin",
|
|
23
|
-
"components.Input.error.validation.email": "Dies ist keine gültige E-Mail-Adresse"
|
|
25
|
+
"components.Input.error.validation.email": "Dies ist keine gültige E-Mail-Adresse",
|
|
26
|
+
"Settings.capabilities.title": "Provider-Funktionen",
|
|
27
|
+
"Settings.capabilities.subtitle": "Aktuelle SMTP-Konfiguration und aktivierte Funktionen",
|
|
28
|
+
"Settings.capabilities.label.smtpServer": "SMTP-Server",
|
|
29
|
+
"Settings.capabilities.label.encryption": "Verschlüsselung",
|
|
30
|
+
"Settings.capabilities.label.authType": "Authentifizierung",
|
|
31
|
+
"Settings.capabilities.label.poolStatus": "Pool-Status",
|
|
32
|
+
"Settings.capabilities.label.features": "Aktivierte Funktionen",
|
|
33
|
+
"Settings.capabilities.poolStatus.idle": "Leerlauf",
|
|
34
|
+
"Settings.capabilities.poolStatus.active": "Aktiv",
|
|
35
|
+
"Settings.capabilities.feature.dkim": "DKIM",
|
|
36
|
+
"Settings.capabilities.feature.pool": "Verbindungspool",
|
|
37
|
+
"Settings.capabilities.feature.rateLimiting": "Ratenbegrenzung",
|
|
38
|
+
"Settings.capabilities.feature.oauth2": "OAuth2",
|
|
39
|
+
"Settings.capabilities.feature.requireTLS": "TLS erforderlich"
|
|
24
40
|
};
|
|
25
41
|
|
|
26
42
|
export { de as default, link };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"de.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"de.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -6,17 +6,25 @@ var link = "Link";
|
|
|
6
6
|
var en = {
|
|
7
7
|
link: link,
|
|
8
8
|
"Settings.email.plugin.button.test-email": "Send test email",
|
|
9
|
+
"Settings.email.plugin.button.verify": "Test connection",
|
|
9
10
|
"Settings.email.plugin.label.defaultFrom": "Default sender email",
|
|
10
11
|
"Settings.email.plugin.label.defaultReplyTo": "Default response email",
|
|
11
12
|
"Settings.email.plugin.label.provider": "Email provider",
|
|
13
|
+
"Settings.email.plugin.label.replyToName": "Default reply-to name",
|
|
14
|
+
"Settings.email.plugin.label.senderName": "Default sender name",
|
|
12
15
|
"Settings.email.plugin.label.testAddress": "Recipient email",
|
|
16
|
+
"Settings.email.plugin.label.verifyConnection": "Connection status",
|
|
13
17
|
"Settings.email.plugin.notification.config.error": "Failed to retrieve the email config",
|
|
14
18
|
"Settings.email.plugin.notification.data.loaded": "Email settings data has been loaded",
|
|
15
19
|
"Settings.email.plugin.notification.test.error": "Failed to send a test mail to {to}",
|
|
16
20
|
"Settings.email.plugin.notification.test.success": "Email test succeeded, check the {to} mailbox",
|
|
21
|
+
"Settings.email.plugin.notification.verify.error": "Connection verification failed",
|
|
22
|
+
"Settings.email.plugin.notification.verify.success": "Connection verified successfully",
|
|
17
23
|
"Settings.email.plugin.placeholder.defaultFrom": "ex: Strapi No-Reply <no-reply@strapi.io>",
|
|
18
24
|
"Settings.email.plugin.placeholder.defaultReplyTo": "ex: Strapi <example@strapi.io>",
|
|
19
25
|
"Settings.email.plugin.placeholder.testAddress": "ex: developer@example.com",
|
|
26
|
+
"Settings.email.plugin.status.connected": "Connected",
|
|
27
|
+
"Settings.email.plugin.status.error": "Error",
|
|
20
28
|
"Settings.email.plugin.subTitle": "Test the settings for the Email plugin",
|
|
21
29
|
"Settings.email.plugin.text.configuration": "The plugin is configured through the {file} file, checkout this {link} for the documentation.",
|
|
22
30
|
"Settings.email.plugin.title": "Configuration",
|
|
@@ -24,7 +32,21 @@ var en = {
|
|
|
24
32
|
"Settings.email.plugin.title.test": "Test email delivery",
|
|
25
33
|
"SettingsNav.link.settings": "Settings",
|
|
26
34
|
"SettingsNav.section-label": "Email plugin",
|
|
27
|
-
"components.Input.error.validation.email": "This is not a valid email"
|
|
35
|
+
"components.Input.error.validation.email": "This is not a valid email",
|
|
36
|
+
"Settings.capabilities.title": "Provider capabilities",
|
|
37
|
+
"Settings.capabilities.subtitle": "Current SMTP configuration and enabled features",
|
|
38
|
+
"Settings.capabilities.label.smtpServer": "SMTP server",
|
|
39
|
+
"Settings.capabilities.label.encryption": "Encryption",
|
|
40
|
+
"Settings.capabilities.label.authType": "Authentication",
|
|
41
|
+
"Settings.capabilities.label.poolStatus": "Pool status",
|
|
42
|
+
"Settings.capabilities.label.features": "Enabled features",
|
|
43
|
+
"Settings.capabilities.poolStatus.idle": "Idle",
|
|
44
|
+
"Settings.capabilities.poolStatus.active": "Active",
|
|
45
|
+
"Settings.capabilities.feature.dkim": "DKIM",
|
|
46
|
+
"Settings.capabilities.feature.pool": "Connection pool",
|
|
47
|
+
"Settings.capabilities.feature.rateLimiting": "Rate limiting",
|
|
48
|
+
"Settings.capabilities.feature.oauth2": "OAuth2",
|
|
49
|
+
"Settings.capabilities.feature.requireTLS": "Require TLS"
|
|
28
50
|
};
|
|
29
51
|
|
|
30
52
|
exports.default = en;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,17 +2,25 @@ var link = "Link";
|
|
|
2
2
|
var en = {
|
|
3
3
|
link: link,
|
|
4
4
|
"Settings.email.plugin.button.test-email": "Send test email",
|
|
5
|
+
"Settings.email.plugin.button.verify": "Test connection",
|
|
5
6
|
"Settings.email.plugin.label.defaultFrom": "Default sender email",
|
|
6
7
|
"Settings.email.plugin.label.defaultReplyTo": "Default response email",
|
|
7
8
|
"Settings.email.plugin.label.provider": "Email provider",
|
|
9
|
+
"Settings.email.plugin.label.replyToName": "Default reply-to name",
|
|
10
|
+
"Settings.email.plugin.label.senderName": "Default sender name",
|
|
8
11
|
"Settings.email.plugin.label.testAddress": "Recipient email",
|
|
12
|
+
"Settings.email.plugin.label.verifyConnection": "Connection status",
|
|
9
13
|
"Settings.email.plugin.notification.config.error": "Failed to retrieve the email config",
|
|
10
14
|
"Settings.email.plugin.notification.data.loaded": "Email settings data has been loaded",
|
|
11
15
|
"Settings.email.plugin.notification.test.error": "Failed to send a test mail to {to}",
|
|
12
16
|
"Settings.email.plugin.notification.test.success": "Email test succeeded, check the {to} mailbox",
|
|
17
|
+
"Settings.email.plugin.notification.verify.error": "Connection verification failed",
|
|
18
|
+
"Settings.email.plugin.notification.verify.success": "Connection verified successfully",
|
|
13
19
|
"Settings.email.plugin.placeholder.defaultFrom": "ex: Strapi No-Reply <no-reply@strapi.io>",
|
|
14
20
|
"Settings.email.plugin.placeholder.defaultReplyTo": "ex: Strapi <example@strapi.io>",
|
|
15
21
|
"Settings.email.plugin.placeholder.testAddress": "ex: developer@example.com",
|
|
22
|
+
"Settings.email.plugin.status.connected": "Connected",
|
|
23
|
+
"Settings.email.plugin.status.error": "Error",
|
|
16
24
|
"Settings.email.plugin.subTitle": "Test the settings for the Email plugin",
|
|
17
25
|
"Settings.email.plugin.text.configuration": "The plugin is configured through the {file} file, checkout this {link} for the documentation.",
|
|
18
26
|
"Settings.email.plugin.title": "Configuration",
|
|
@@ -20,7 +28,21 @@ var en = {
|
|
|
20
28
|
"Settings.email.plugin.title.test": "Test email delivery",
|
|
21
29
|
"SettingsNav.link.settings": "Settings",
|
|
22
30
|
"SettingsNav.section-label": "Email plugin",
|
|
23
|
-
"components.Input.error.validation.email": "This is not a valid email"
|
|
31
|
+
"components.Input.error.validation.email": "This is not a valid email",
|
|
32
|
+
"Settings.capabilities.title": "Provider capabilities",
|
|
33
|
+
"Settings.capabilities.subtitle": "Current SMTP configuration and enabled features",
|
|
34
|
+
"Settings.capabilities.label.smtpServer": "SMTP server",
|
|
35
|
+
"Settings.capabilities.label.encryption": "Encryption",
|
|
36
|
+
"Settings.capabilities.label.authType": "Authentication",
|
|
37
|
+
"Settings.capabilities.label.poolStatus": "Pool status",
|
|
38
|
+
"Settings.capabilities.label.features": "Enabled features",
|
|
39
|
+
"Settings.capabilities.poolStatus.idle": "Idle",
|
|
40
|
+
"Settings.capabilities.poolStatus.active": "Active",
|
|
41
|
+
"Settings.capabilities.feature.dkim": "DKIM",
|
|
42
|
+
"Settings.capabilities.feature.pool": "Connection pool",
|
|
43
|
+
"Settings.capabilities.feature.rateLimiting": "Rate limiting",
|
|
44
|
+
"Settings.capabilities.feature.oauth2": "OAuth2",
|
|
45
|
+
"Settings.capabilities.feature.requireTLS": "Require TLS"
|
|
24
46
|
};
|
|
25
47
|
|
|
26
48
|
export { en as default, link };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var link = "Enlace";
|
|
3
6
|
var es = {
|
|
7
|
+
link: link,
|
|
4
8
|
"Settings.email.plugin.button.test-email": "Enviar email de prueba",
|
|
5
9
|
"Settings.email.plugin.label.defaultFrom": "Email del remitente predeterminado",
|
|
6
10
|
"Settings.email.plugin.label.defaultReplyTo": "Email de respuesta predeterminado",
|
|
@@ -23,5 +27,6 @@ var es = {
|
|
|
23
27
|
"components.Input.error.validation.email": "Este es un correo electrónico inválido"
|
|
24
28
|
};
|
|
25
29
|
|
|
26
|
-
|
|
30
|
+
exports.default = es;
|
|
31
|
+
exports.link = link;
|
|
27
32
|
//# sourceMappingURL=es.json.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"es.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
var link = "Enlace";
|
|
1
2
|
var es = {
|
|
3
|
+
link: link,
|
|
2
4
|
"Settings.email.plugin.button.test-email": "Enviar email de prueba",
|
|
3
5
|
"Settings.email.plugin.label.defaultFrom": "Email del remitente predeterminado",
|
|
4
6
|
"Settings.email.plugin.label.defaultReplyTo": "Email de respuesta predeterminado",
|
|
@@ -21,5 +23,5 @@ var es = {
|
|
|
21
23
|
"components.Input.error.validation.email": "Este es un correo electrónico inválido"
|
|
22
24
|
};
|
|
23
25
|
|
|
24
|
-
export { es as default };
|
|
26
|
+
export { es as default, link };
|
|
25
27
|
//# sourceMappingURL=es.json.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"es.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getYupInnerErrors.js","sources":["../../../admin/src/utils/getYupInnerErrors.ts"],"sourcesContent":["import type { MessageDescriptor, PrimitiveType } from 'react-intl';\nimport type { ValidationError } from 'yup';\n\ninterface TranslationMessage extends MessageDescriptor {\n values?: Record<string, PrimitiveType>;\n}\n\nconst extractValuesFromYupError = (\n errorType?: string | undefined,\n errorParams?: Record<string, any> | undefined\n) => {\n if (!errorType || !errorParams) {\n return {};\n }\n\n return {\n [errorType]: errorParams[errorType],\n };\n};\n\nconst getYupInnerErrors = (error: ValidationError) =>\n (error?.inner || []).reduce<Record<string, TranslationMessage>>((acc, currentError) => {\n if (currentError.path) {\n acc[currentError.path.split('[').join('.').split(']').join('')] = {\n id: currentError.message,\n defaultMessage: currentError.message,\n values: extractValuesFromYupError(currentError?.type, currentError?.params),\n };\n }\n\n return acc;\n }, {});\n\nexport { getYupInnerErrors };\n"],"names":["extractValuesFromYupError","errorType","errorParams","getYupInnerErrors","error","inner","reduce","acc","currentError","path","split","join","id","message","defaultMessage","values","type","params"],"mappings":";;AAOA,MAAMA,yBAAAA,GAA4B,CAChCC,
|
|
1
|
+
{"version":3,"file":"getYupInnerErrors.js","sources":["../../../admin/src/utils/getYupInnerErrors.ts"],"sourcesContent":["import type { MessageDescriptor, PrimitiveType } from 'react-intl';\nimport type { ValidationError } from 'yup';\n\ninterface TranslationMessage extends MessageDescriptor {\n values?: Record<string, PrimitiveType>;\n}\n\nconst extractValuesFromYupError = (\n errorType?: string | undefined,\n errorParams?: Record<string, any> | undefined\n) => {\n if (!errorType || !errorParams) {\n return {};\n }\n\n return {\n [errorType]: errorParams[errorType],\n };\n};\n\nconst getYupInnerErrors = (error: ValidationError) =>\n (error?.inner || []).reduce<Record<string, TranslationMessage>>((acc, currentError) => {\n if (currentError.path) {\n acc[currentError.path.split('[').join('.').split(']').join('')] = {\n id: currentError.message,\n defaultMessage: currentError.message,\n values: extractValuesFromYupError(currentError?.type, currentError?.params),\n };\n }\n\n return acc;\n }, {});\n\nexport { getYupInnerErrors };\n"],"names":["extractValuesFromYupError","errorType","errorParams","getYupInnerErrors","error","inner","reduce","acc","currentError","path","split","join","id","message","defaultMessage","values","type","params"],"mappings":";;AAOA,MAAMA,yBAAAA,GAA4B,CAChCC,SAAAA,EACAC,WAAAA,GAAAA;IAEA,IAAI,CAACD,SAAAA,IAAa,CAACC,WAAAA,EAAa;AAC9B,QAAA,OAAO,EAAC;AACV,IAAA;IAEA,OAAO;AACL,QAAA,CAACD,SAAAA,GAAYC,WAAW,CAACD,SAAAA;AAC3B,KAAA;AACF,CAAA;AAEA,MAAME,iBAAAA,GAAoB,CAACC,KAAAA,GACxBA,CAAAA,KAAAA,EAAOC,KAAAA,IAAS,EAAE,EAAEC,MAAM,CAAqC,CAACC,GAAAA,EAAKC,YAAAA,GAAAA;QACpE,IAAIA,YAAAA,CAAaC,IAAI,EAAE;AACrBF,YAAAA,GAAG,CAACC,YAAAA,CAAaC,IAAI,CAACC,KAAK,CAAC,GAAA,CAAA,CAAKC,IAAI,CAAC,GAAA,CAAA,CAAKD,KAAK,CAAC,GAAA,CAAA,CAAKC,IAAI,CAAC,IAAI,GAAG;AAChEC,gBAAAA,EAAAA,EAAIJ,aAAaK,OAAO;AACxBC,gBAAAA,cAAAA,EAAgBN,aAAaK,OAAO;gBACpCE,MAAAA,EAAQf,yBAAAA,CAA0BQ,YAAAA,EAAcQ,IAAAA,EAAMR,YAAAA,EAAcS,MAAAA;AACtE,aAAA;AACF,QAAA;QAEA,OAAOV,GAAAA;AACT,IAAA,CAAA,EAAG,EAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getYupInnerErrors.mjs","sources":["../../../admin/src/utils/getYupInnerErrors.ts"],"sourcesContent":["import type { MessageDescriptor, PrimitiveType } from 'react-intl';\nimport type { ValidationError } from 'yup';\n\ninterface TranslationMessage extends MessageDescriptor {\n values?: Record<string, PrimitiveType>;\n}\n\nconst extractValuesFromYupError = (\n errorType?: string | undefined,\n errorParams?: Record<string, any> | undefined\n) => {\n if (!errorType || !errorParams) {\n return {};\n }\n\n return {\n [errorType]: errorParams[errorType],\n };\n};\n\nconst getYupInnerErrors = (error: ValidationError) =>\n (error?.inner || []).reduce<Record<string, TranslationMessage>>((acc, currentError) => {\n if (currentError.path) {\n acc[currentError.path.split('[').join('.').split(']').join('')] = {\n id: currentError.message,\n defaultMessage: currentError.message,\n values: extractValuesFromYupError(currentError?.type, currentError?.params),\n };\n }\n\n return acc;\n }, {});\n\nexport { getYupInnerErrors };\n"],"names":["extractValuesFromYupError","errorType","errorParams","getYupInnerErrors","error","inner","reduce","acc","currentError","path","split","join","id","message","defaultMessage","values","type","params"],"mappings":"AAOA,MAAMA,yBAAAA,GAA4B,CAChCC,
|
|
1
|
+
{"version":3,"file":"getYupInnerErrors.mjs","sources":["../../../admin/src/utils/getYupInnerErrors.ts"],"sourcesContent":["import type { MessageDescriptor, PrimitiveType } from 'react-intl';\nimport type { ValidationError } from 'yup';\n\ninterface TranslationMessage extends MessageDescriptor {\n values?: Record<string, PrimitiveType>;\n}\n\nconst extractValuesFromYupError = (\n errorType?: string | undefined,\n errorParams?: Record<string, any> | undefined\n) => {\n if (!errorType || !errorParams) {\n return {};\n }\n\n return {\n [errorType]: errorParams[errorType],\n };\n};\n\nconst getYupInnerErrors = (error: ValidationError) =>\n (error?.inner || []).reduce<Record<string, TranslationMessage>>((acc, currentError) => {\n if (currentError.path) {\n acc[currentError.path.split('[').join('.').split(']').join('')] = {\n id: currentError.message,\n defaultMessage: currentError.message,\n values: extractValuesFromYupError(currentError?.type, currentError?.params),\n };\n }\n\n return acc;\n }, {});\n\nexport { getYupInnerErrors };\n"],"names":["extractValuesFromYupError","errorType","errorParams","getYupInnerErrors","error","inner","reduce","acc","currentError","path","split","join","id","message","defaultMessage","values","type","params"],"mappings":"AAOA,MAAMA,yBAAAA,GAA4B,CAChCC,SAAAA,EACAC,WAAAA,GAAAA;IAEA,IAAI,CAACD,SAAAA,IAAa,CAACC,WAAAA,EAAa;AAC9B,QAAA,OAAO,EAAC;AACV,IAAA;IAEA,OAAO;AACL,QAAA,CAACD,SAAAA,GAAYC,WAAW,CAACD,SAAAA;AAC3B,KAAA;AACF,CAAA;AAEA,MAAME,iBAAAA,GAAoB,CAACC,KAAAA,GACxBA,CAAAA,KAAAA,EAAOC,KAAAA,IAAS,EAAE,EAAEC,MAAM,CAAqC,CAACC,GAAAA,EAAKC,YAAAA,GAAAA;QACpE,IAAIA,YAAAA,CAAaC,IAAI,EAAE;AACrBF,YAAAA,GAAG,CAACC,YAAAA,CAAaC,IAAI,CAACC,KAAK,CAAC,GAAA,CAAA,CAAKC,IAAI,CAAC,GAAA,CAAA,CAAKD,KAAK,CAAC,GAAA,CAAA,CAAKC,IAAI,CAAC,IAAI,GAAG;AAChEC,gBAAAA,EAAAA,EAAIJ,aAAaK,OAAO;AACxBC,gBAAAA,cAAAA,EAAgBN,aAAaK,OAAO;gBACpCE,MAAAA,EAAQf,yBAAAA,CAA0BQ,YAAAA,EAAcQ,IAAAA,EAAMR,YAAAA,EAAcS,MAAAA;AACtE,aAAA;AACF,QAAA;QAEA,OAAOV,GAAAA;AACT,IAAA,CAAA,EAAG,EAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefixPluginTranslations.js","sources":["../../../admin/src/utils/prefixPluginTranslations.ts"],"sourcesContent":["type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n"],"names":["prefixPluginTranslations","trad","pluginId","Object","keys","reduce","acc","current"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"prefixPluginTranslations.js","sources":["../../../admin/src/utils/prefixPluginTranslations.ts"],"sourcesContent":["type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n"],"names":["prefixPluginTranslations","trad","pluginId","Object","keys","reduce","acc","current"],"mappings":";;AAEA,MAAMA,wBAAAA,GAA2B,CAACC,IAAAA,EAAmBC,QAAAA,GAAAA;AAInD,IAAA,OAAOC,OAAOC,IAAI,CAACH,MAAMI,MAAM,CAAC,CAACC,GAAAA,EAAKC,OAAAA,GAAAA;QACpCD,GAAG,CAAC,CAAA,EAAGJ,QAAAA,CAAS,CAAC,EAAEK,SAAS,CAAC,GAAGN,IAAI,CAACM,OAAAA,CAAQ;QAC7C,OAAOD,GAAAA;AACT,IAAA,CAAA,EAAG,EAAC,CAAA;AACN;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefixPluginTranslations.mjs","sources":["../../../admin/src/utils/prefixPluginTranslations.ts"],"sourcesContent":["type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n"],"names":["prefixPluginTranslations","trad","pluginId","Object","keys","reduce","acc","current"],"mappings":"
|
|
1
|
+
{"version":3,"file":"prefixPluginTranslations.mjs","sources":["../../../admin/src/utils/prefixPluginTranslations.ts"],"sourcesContent":["type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n"],"names":["prefixPluginTranslations","trad","pluginId","Object","keys","reduce","acc","current"],"mappings":"AAEA,MAAMA,wBAAAA,GAA2B,CAACC,IAAAA,EAAmBC,QAAAA,GAAAA;AAInD,IAAA,OAAOC,OAAOC,IAAI,CAACH,MAAMI,MAAM,CAAC,CAACC,GAAAA,EAAKC,OAAAA,GAAAA;QACpCD,GAAG,CAAC,CAAA,EAAGJ,QAAAA,CAAS,CAAC,EAAEK,SAAS,CAAC,GAAGN,IAAI,CAACM,OAAAA,CAAQ;QAC7C,OAAOD,GAAAA;AACT,IAAA,CAAA,EAAG,EAAC,CAAA;AACN;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sources":["../../../admin/src/utils/schema.ts"],"sourcesContent":["import { translatedErrors } from '@strapi/admin/strapi-admin';\nimport * as yup from 'yup';\n\nexport const schema = yup.object().shape({\n email: yup.string().email(translatedErrors.email.id).required(translatedErrors.required.id),\n});\n"],"names":["schema","yup","object","shape","email","string","translatedErrors","id","required"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;MAGaA,
|
|
1
|
+
{"version":3,"file":"schema.js","sources":["../../../admin/src/utils/schema.ts"],"sourcesContent":["import { translatedErrors } from '@strapi/admin/strapi-admin';\nimport * as yup from 'yup';\n\nexport const schema = yup.object().shape({\n email: yup.string().email(translatedErrors.email.id).required(translatedErrors.required.id),\n});\n"],"names":["schema","yup","object","shape","email","string","translatedErrors","id","required"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;MAGaA,MAAAA,GAASC,cAAAA,CAAIC,MAAM,EAAA,CAAGC,KAAK,CAAC;AACvCC,IAAAA,KAAAA,EAAOH,cAAAA,CAAII,MAAM,EAAA,CAAGD,KAAK,CAACE,4BAAAA,CAAiBF,KAAK,CAACG,EAAE,EAAEC,QAAQ,CAACF,4BAAAA,CAAiBE,QAAQ,CAACD,EAAE;AAC5F,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.mjs","sources":["../../../admin/src/utils/schema.ts"],"sourcesContent":["import { translatedErrors } from '@strapi/admin/strapi-admin';\nimport * as yup from 'yup';\n\nexport const schema = yup.object().shape({\n email: yup.string().email(translatedErrors.email.id).required(translatedErrors.required.id),\n});\n"],"names":["schema","yup","object","shape","email","string","translatedErrors","id","required"],"mappings":";;;MAGaA,
|
|
1
|
+
{"version":3,"file":"schema.mjs","sources":["../../../admin/src/utils/schema.ts"],"sourcesContent":["import { translatedErrors } from '@strapi/admin/strapi-admin';\nimport * as yup from 'yup';\n\nexport const schema = yup.object().shape({\n email: yup.string().email(translatedErrors.email.id).required(translatedErrors.required.id),\n});\n"],"names":["schema","yup","object","shape","email","string","translatedErrors","id","required"],"mappings":";;;MAGaA,MAAAA,GAASC,GAAAA,CAAIC,MAAM,EAAA,CAAGC,KAAK,CAAC;AACvCC,IAAAA,KAAAA,EAAOH,GAAAA,CAAII,MAAM,EAAA,CAAGD,KAAK,CAACE,gBAAAA,CAAiBF,KAAK,CAACG,EAAE,EAAEC,QAAQ,CAACF,gBAAAA,CAAiBE,QAAQ,CAACD,EAAE;AAC5F,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sources":["../../server/src/bootstrap.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\nimport type { EmailConfig, SendOptions } from './types';\n\ninterface EmailProvider {\n send: (options: SendOptions) => Promise<any>;\n}\n\ninterface EmailProviderModule {\n init: (\n options: EmailConfig['providerOptions'],\n settings: EmailConfig['settings']\n ) => EmailProvider;\n name?: string;\n provider?: string;\n}\n\nconst createProvider = (emailConfig: EmailConfig) => {\n const providerName = emailConfig.provider.toLowerCase();\n let provider: EmailProviderModule;\n\n let modulePath: string;\n try {\n modulePath = require.resolve(`@strapi/provider-email-${providerName}`);\n } catch (error) {\n if (\n error !== null &&\n typeof error === 'object' &&\n 'code' in error &&\n error.code === 'MODULE_NOT_FOUND'\n ) {\n modulePath = providerName;\n } else {\n throw error;\n }\n }\n\n try {\n provider = require(modulePath);\n } catch (err) {\n const newError = new Error(`Could not load email provider \"${providerName}\".`);\n if (err instanceof Error) {\n newError.stack = err.stack;\n }\n throw newError;\n }\n\n return provider.init(emailConfig.providerOptions, emailConfig.settings);\n};\n\nexport const bootstrap = async ({ strapi }: { strapi: Core.Strapi }) => {\n const emailConfig: EmailConfig = strapi.config.get('plugin::email');\n strapi.plugin('email').provider = createProvider(emailConfig);\n\n // Add permissions\n const actions = [\n {\n section: 'settings',\n category: 'email',\n displayName: 'Access the Email Settings page',\n uid: 'settings.read',\n pluginName: 'email',\n },\n ];\n\n await strapi.service('admin::permission').actionProvider.registerMany(actions);\n};\n"],"names":["createProvider","emailConfig","providerName","provider","toLowerCase","modulePath","require","resolve","error","code","err","newError","Error","stack","init","providerOptions","settings","bootstrap","strapi","config","get","plugin","actions","section","category","displayName","uid","pluginName","service","actionProvider","registerMany"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sources":["../../server/src/bootstrap.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\nimport type { ProviderCapabilities } from '../../shared/types';\nimport type { EmailConfig, SendOptions } from './types';\n\ninterface EmailProvider {\n send: (options: SendOptions) => Promise<any>;\n verify?: () => Promise<boolean>;\n isIdle?: () => boolean;\n close?: () => void;\n getCapabilities?: () => ProviderCapabilities;\n}\n\ninterface EmailProviderModule {\n init: (\n options: EmailConfig['providerOptions'],\n settings: EmailConfig['settings']\n ) => EmailProvider;\n name?: string;\n provider?: string;\n}\n\nconst createProvider = (emailConfig: EmailConfig) => {\n const providerName = emailConfig.provider.toLowerCase();\n let provider: EmailProviderModule;\n\n let modulePath: string;\n try {\n modulePath = require.resolve(`@strapi/provider-email-${providerName}`);\n } catch (error) {\n if (\n error !== null &&\n typeof error === 'object' &&\n 'code' in error &&\n error.code === 'MODULE_NOT_FOUND'\n ) {\n modulePath = providerName;\n } else {\n throw error;\n }\n }\n\n try {\n provider = require(modulePath);\n } catch (err) {\n const newError = new Error(`Could not load email provider \"${providerName}\".`);\n if (err instanceof Error) {\n newError.stack = err.stack;\n }\n throw newError;\n }\n\n return provider.init(emailConfig.providerOptions, emailConfig.settings);\n};\n\nexport const bootstrap = async ({ strapi }: { strapi: Core.Strapi }) => {\n const emailConfig: EmailConfig = strapi.config.get('plugin::email');\n strapi.plugin('email').provider = createProvider(emailConfig);\n\n // Add permissions\n const actions = [\n {\n section: 'settings',\n category: 'email',\n displayName: 'Access the Email Settings page',\n uid: 'settings.read',\n pluginName: 'email',\n },\n ];\n\n await strapi.service('admin::permission').actionProvider.registerMany(actions);\n};\n"],"names":["createProvider","emailConfig","providerName","provider","toLowerCase","modulePath","require","resolve","error","code","err","newError","Error","stack","init","providerOptions","settings","bootstrap","strapi","config","get","plugin","actions","section","category","displayName","uid","pluginName","service","actionProvider","registerMany"],"mappings":";;AAqBA,MAAMA,iBAAiB,CAACC,WAAAA,GAAAA;AACtB,IAAA,MAAMC,YAAAA,GAAeD,WAAAA,CAAYE,QAAQ,CAACC,WAAW,EAAA;IACrD,IAAID,QAAAA;IAEJ,IAAIE,UAAAA;IACJ,IAAI;AACFA,QAAAA,UAAAA,GAAaC,QAAQC,OAAO,CAAC,CAAC,uBAAuB,EAAEL,YAAAA,CAAAA,CAAc,CAAA;AACvE,IAAA,CAAA,CAAE,OAAOM,KAAAA,EAAO;QACd,IACEA,KAAAA,KAAU,IAAA,IACV,OAAOA,KAAAA,KAAU,QAAA,IACjB,UAAUA,KAAAA,IACVA,KAAAA,CAAMC,IAAI,KAAK,kBAAA,EACf;YACAJ,UAAAA,GAAaH,YAAAA;QACf,CAAA,MAAO;YACL,MAAMM,KAAAA;AACR,QAAA;AACF,IAAA;IAEA,IAAI;AACFL,QAAAA,QAAAA,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