@analogjs/vite-plugin-angular 0.2.0-alpha.4 → 0.2.0-alpha.7
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/package.json +4 -1
- package/setup-vitest.d.ts +4 -0
- package/setup-vitest.js +116 -0
- package/setup-vitest.js.map +1 -0
- package/src/lib/angular-vite-plugin.js +96 -44
- package/src/lib/angular-vite-plugin.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@analogjs/vite-plugin-angular",
|
|
3
3
|
"description": "Vite Plugin for Angular",
|
|
4
|
-
"version": "0.2.0-alpha.
|
|
4
|
+
"version": "0.2.0-alpha.7",
|
|
5
5
|
"keywords": [
|
|
6
|
+
"vite",
|
|
7
|
+
"vitest",
|
|
6
8
|
"vite-plugin",
|
|
7
9
|
"angular"
|
|
8
10
|
],
|
|
@@ -18,6 +20,7 @@
|
|
|
18
20
|
},
|
|
19
21
|
"peerDependencies": {
|
|
20
22
|
"@angular-devkit/build-angular": "^14.0.0",
|
|
23
|
+
"zone.js": "~0.11.4",
|
|
21
24
|
"tslib": "^2.0.0"
|
|
22
25
|
},
|
|
23
26
|
"main": "./src/index.js",
|
package/setup-vitest.js
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
require("zone.js");
|
|
4
|
+
require("zone.js/dist/sync-test");
|
|
5
|
+
require("zone.js/dist/proxy");
|
|
6
|
+
require("zone.js/testing");
|
|
7
|
+
/**
|
|
8
|
+
* Patch Vitest's describe/test/beforeEach/afterEach functions so test code
|
|
9
|
+
* always runs in a testZone (ProxyZone).
|
|
10
|
+
*/
|
|
11
|
+
/* global Zone */
|
|
12
|
+
const Zone = globalThis['Zone'];
|
|
13
|
+
if (Zone === undefined) {
|
|
14
|
+
throw new Error('Missing: Zone (zone.js)');
|
|
15
|
+
}
|
|
16
|
+
if (globalThis['__vitest_zone_patch__'] === true) {
|
|
17
|
+
throw new Error("'vitest' has already been patched with 'Zone'.");
|
|
18
|
+
}
|
|
19
|
+
globalThis['__vitest_zone_patch__'] = true;
|
|
20
|
+
const SyncTestZoneSpec = Zone['SyncTestZoneSpec'];
|
|
21
|
+
const ProxyZoneSpec = Zone['ProxyZoneSpec'];
|
|
22
|
+
if (SyncTestZoneSpec === undefined) {
|
|
23
|
+
throw new Error('Missing: SyncTestZoneSpec (zone.js/dist/sync-test)');
|
|
24
|
+
}
|
|
25
|
+
if (ProxyZoneSpec === undefined) {
|
|
26
|
+
throw new Error('Missing: ProxyZoneSpec (zone.js/dist/proxy.js)');
|
|
27
|
+
}
|
|
28
|
+
const env = globalThis;
|
|
29
|
+
const ambientZone = Zone.current;
|
|
30
|
+
// Create a synchronous-only zone in which to run `describe` blocks in order to
|
|
31
|
+
// raise an error if any asynchronous operations are attempted
|
|
32
|
+
// inside of a `describe` but outside of a `beforeEach` or `it`.
|
|
33
|
+
const syncZone = ambientZone.fork(new SyncTestZoneSpec('vitest.describe'));
|
|
34
|
+
function wrapDescribeInZone(describeBody) {
|
|
35
|
+
return function (...args) {
|
|
36
|
+
return syncZone.run(describeBody, null, args);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
// Create a proxy zone in which to run `test` blocks so that the tests function
|
|
40
|
+
// can retroactively install different zones.
|
|
41
|
+
const testProxyZone = ambientZone.fork(new ProxyZoneSpec());
|
|
42
|
+
function wrapTestInZone(testBody) {
|
|
43
|
+
if (testBody === undefined) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const wrappedFunc = function () {
|
|
47
|
+
return testProxyZone.run(testBody, null, arguments);
|
|
48
|
+
};
|
|
49
|
+
try {
|
|
50
|
+
Object.defineProperty(wrappedFunc, 'length', {
|
|
51
|
+
configurable: true,
|
|
52
|
+
writable: true,
|
|
53
|
+
enumerable: false,
|
|
54
|
+
});
|
|
55
|
+
wrappedFunc.length = testBody.length;
|
|
56
|
+
}
|
|
57
|
+
catch (e) {
|
|
58
|
+
return testBody.length === 0
|
|
59
|
+
? () => testProxyZone.run(testBody, null)
|
|
60
|
+
: (done) => testProxyZone.run(testBody, null, [done]);
|
|
61
|
+
}
|
|
62
|
+
return wrappedFunc;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* bind describe method to wrap describe.each function
|
|
66
|
+
*/
|
|
67
|
+
const bindDescribe = (originalVitestFn) => function (...eachArgs) {
|
|
68
|
+
return function (...args) {
|
|
69
|
+
args[1] = wrapDescribeInZone(args[1]);
|
|
70
|
+
// @ts-ignore
|
|
71
|
+
return originalVitestFn.apply(this, eachArgs).apply(this, args);
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* bind test method to wrap test.each function
|
|
76
|
+
*/
|
|
77
|
+
const bindTest = (originalVitestFn) => function (...eachArgs) {
|
|
78
|
+
return function (...args) {
|
|
79
|
+
args[1] = wrapTestInZone(args[1]);
|
|
80
|
+
// @ts-ignore
|
|
81
|
+
return originalVitestFn.apply(this, eachArgs).apply(this, args);
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
['describe'].forEach((methodName) => {
|
|
85
|
+
const originalvitestFn = env[methodName];
|
|
86
|
+
env[methodName] = function (...args) {
|
|
87
|
+
args[1] = wrapDescribeInZone(args[1]);
|
|
88
|
+
return originalvitestFn.apply(this, args);
|
|
89
|
+
};
|
|
90
|
+
env[methodName].each = bindDescribe(originalvitestFn.each);
|
|
91
|
+
if (methodName === 'describe') {
|
|
92
|
+
env[methodName].only = env['fdescribe'];
|
|
93
|
+
env[methodName].skip = env['xdescribe'];
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
['test', 'it'].forEach((methodName) => {
|
|
97
|
+
const originalvitestFn = env[methodName];
|
|
98
|
+
env[methodName] = function (...args) {
|
|
99
|
+
args[1] = wrapTestInZone(args[1]);
|
|
100
|
+
return originalvitestFn.apply(this, args);
|
|
101
|
+
};
|
|
102
|
+
env[methodName].each = bindTest(originalvitestFn.each);
|
|
103
|
+
if (methodName === 'test' || methodName === 'it') {
|
|
104
|
+
env[methodName].todo = function (...args) {
|
|
105
|
+
return originalvitestFn.todo.apply(this, args);
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
['beforeEach', 'afterEach', 'beforeAll', 'afterAll'].forEach((methodName) => {
|
|
110
|
+
const originalvitestFn = env[methodName];
|
|
111
|
+
env[methodName] = function (...args) {
|
|
112
|
+
args[0] = wrapTestInZone(args[0]);
|
|
113
|
+
return originalvitestFn.apply(this, args);
|
|
114
|
+
};
|
|
115
|
+
});
|
|
116
|
+
//# sourceMappingURL=setup-vitest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-vitest.js","sourceRoot":"","sources":["../../../packages/vite-plugin-angular/setup-vitest.ts"],"names":[],"mappings":";;AAAA,mBAAiB;AACjB,kCAAgC;AAChC,8BAA4B;AAC5B,2BAAyB;AAEzB;;;GAGG;AACH,iBAAiB;AACjB,MAAM,IAAI,GAAI,UAAkB,CAAC,MAAM,CAAC,CAAC;AAEzC,IAAI,IAAI,KAAK,SAAS,EAAE;IACtB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;CAC5C;AAED,IAAK,UAAkB,CAAC,uBAAuB,CAAC,KAAK,IAAI,EAAE;IACzD,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;CACnE;AAEA,UAAkB,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAAC;AACpD,MAAM,gBAAgB,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAC;AAClD,MAAM,aAAa,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC;AAE5C,IAAI,gBAAgB,KAAK,SAAS,EAAE;IAClC,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;CACvE;AACD,IAAI,aAAa,KAAK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AAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAElC,OAAO,gBAAgB,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -10,8 +10,10 @@ const compiler_plugin_1 = require("@angular-devkit/build-angular/src/builders/br
|
|
|
10
10
|
const load_esm_1 = require("@angular-devkit/build-angular/src/utils/load-esm");
|
|
11
11
|
const component_resolvers_1 = require("./component-resolvers");
|
|
12
12
|
function angular(pluginOptions = {
|
|
13
|
-
tsconfig:
|
|
14
|
-
|
|
13
|
+
tsconfig: process.env['NODE_ENV'] === 'test'
|
|
14
|
+
? './tsconfig.spec.json'
|
|
15
|
+
: './tsconfig.app.json',
|
|
16
|
+
workspaceRoot: process.cwd(),
|
|
15
17
|
}) {
|
|
16
18
|
// The file emitter created during `onStart` that will be used during the build in `onLoad` callbacks for TS files
|
|
17
19
|
let fileEmitter;
|
|
@@ -28,6 +30,8 @@ function angular(pluginOptions = {
|
|
|
28
30
|
let watchMode = false;
|
|
29
31
|
let sourceFileCache = new SourceFileCache();
|
|
30
32
|
let isProd = process.env['NODE_ENV'] === 'production';
|
|
33
|
+
let isTest = process.env['NODE_ENV'] === 'test' || !!process.env['VITEST'];
|
|
34
|
+
let viteServer;
|
|
31
35
|
return [
|
|
32
36
|
{
|
|
33
37
|
name: '@analogjs/vite-plugin-angular',
|
|
@@ -59,34 +63,18 @@ function angular(pluginOptions = {
|
|
|
59
63
|
};
|
|
60
64
|
});
|
|
61
65
|
},
|
|
66
|
+
configureServer(server) {
|
|
67
|
+
viteServer = server;
|
|
68
|
+
server.watcher.on('add', setupCompilation);
|
|
69
|
+
server.watcher.on('unlink', setupCompilation);
|
|
70
|
+
},
|
|
62
71
|
buildStart() {
|
|
63
72
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
|
|
65
|
-
enableIvy: true,
|
|
66
|
-
noEmitOnError: false,
|
|
67
|
-
suppressOutputPathCheck: true,
|
|
68
|
-
outDir: undefined,
|
|
69
|
-
inlineSources: !isProd,
|
|
70
|
-
inlineSourceMap: !isProd,
|
|
71
|
-
sourceMap: false,
|
|
72
|
-
mapRoot: undefined,
|
|
73
|
-
sourceRoot: undefined,
|
|
74
|
-
declaration: false,
|
|
75
|
-
declarationMap: false,
|
|
76
|
-
allowEmptyCodegenFiles: false,
|
|
77
|
-
annotationsAs: 'decorators',
|
|
78
|
-
enableResourceInlining: false,
|
|
79
|
-
});
|
|
80
|
-
rootNames = rn;
|
|
81
|
-
compilerOptions = tsCompilerOptions;
|
|
82
|
-
host = ts.createIncrementalCompilerHost(compilerOptions);
|
|
83
|
-
// Setup source file caching and reuse cache from previous compilation if present
|
|
84
|
-
let cache = new SourceFileCache();
|
|
73
|
+
setupCompilation();
|
|
85
74
|
// Only store cache if in watch mode
|
|
86
75
|
if (watchMode) {
|
|
87
|
-
sourceFileCache
|
|
76
|
+
augmentHostWithCaching(host, sourceFileCache);
|
|
88
77
|
}
|
|
89
|
-
augmentHostWithCaching(host, cache);
|
|
90
78
|
yield buildAndAnalyze();
|
|
91
79
|
});
|
|
92
80
|
},
|
|
@@ -127,24 +115,48 @@ function angular(pluginOptions = {
|
|
|
127
115
|
return;
|
|
128
116
|
}
|
|
129
117
|
if (/\.[cm]?tsx?$/.test(id)) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
118
|
+
/**
|
|
119
|
+
* Re-analyze on each transform
|
|
120
|
+
* for test(Vitest)
|
|
121
|
+
*/
|
|
122
|
+
if (isTest) {
|
|
123
|
+
const tsMod = viteServer.moduleGraph.getModuleById(id);
|
|
124
|
+
if (tsMod) {
|
|
125
|
+
sourceFileCache.invalidate(id);
|
|
126
|
+
yield buildAndAnalyze();
|
|
134
127
|
}
|
|
135
128
|
}
|
|
136
|
-
if (
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
129
|
+
if (watchMode) {
|
|
130
|
+
if ((0, component_resolvers_1.hasTemplateUrl)(code)) {
|
|
131
|
+
const templateUrl = (0, component_resolvers_1.resolveTemplateUrl)(code, id);
|
|
132
|
+
if (templateUrl) {
|
|
133
|
+
this.addWatchFile(templateUrl);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if ((0, component_resolvers_1.hasStyleUrls)(code)) {
|
|
137
|
+
const styleUrls = (0, component_resolvers_1.resolveStyleUrls)(code, id);
|
|
138
|
+
styleUrls.forEach((styleUrl) => {
|
|
139
|
+
this.addWatchFile(styleUrl);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
141
142
|
}
|
|
142
143
|
const typescriptResult = yield fileEmitter(id);
|
|
143
144
|
// return fileEmitter
|
|
144
145
|
const data = (_a = typescriptResult === null || typescriptResult === void 0 ? void 0 : typescriptResult.content) !== null && _a !== void 0 ? _a : '';
|
|
146
|
+
const forceAsyncTransformation = /for\s+await\s*\(|async\s+function\s*\*/.test(data);
|
|
147
|
+
const useInputSourcemap = (!isProd ? undefined : false);
|
|
148
|
+
if (!forceAsyncTransformation && !isProd) {
|
|
149
|
+
return {
|
|
150
|
+
code: isProd
|
|
151
|
+
? data.replace(/^\/\/# sourceMappingURL=[^\r\n]*/gm, '')
|
|
152
|
+
: data,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
145
155
|
const babelResult = yield (0, core_1.transformAsync)(data, {
|
|
146
156
|
filename: id,
|
|
147
|
-
inputSourceMap: (
|
|
157
|
+
inputSourceMap: (useInputSourcemap
|
|
158
|
+
? undefined
|
|
159
|
+
: false),
|
|
148
160
|
sourceMaps: !isProd ? 'inline' : false,
|
|
149
161
|
compact: false,
|
|
150
162
|
configFile: false,
|
|
@@ -155,7 +167,7 @@ function angular(pluginOptions = {
|
|
|
155
167
|
[
|
|
156
168
|
application_1.default,
|
|
157
169
|
{
|
|
158
|
-
forceAsyncTransformation
|
|
170
|
+
forceAsyncTransformation,
|
|
159
171
|
optimize: isProd && {},
|
|
160
172
|
},
|
|
161
173
|
],
|
|
@@ -176,7 +188,7 @@ function angular(pluginOptions = {
|
|
|
176
188
|
config() {
|
|
177
189
|
return {
|
|
178
190
|
esbuild: {
|
|
179
|
-
legalComments:
|
|
191
|
+
legalComments: 'none',
|
|
180
192
|
keepNames: false,
|
|
181
193
|
define: isProd
|
|
182
194
|
? {
|
|
@@ -185,6 +197,18 @@ function angular(pluginOptions = {
|
|
|
185
197
|
ngI18nClosureMode: 'false',
|
|
186
198
|
}
|
|
187
199
|
: undefined,
|
|
200
|
+
supported: {
|
|
201
|
+
// Native async/await is not supported with Zone.js. Disabling support here will cause
|
|
202
|
+
// esbuild to downlevel async/await to a Zone.js supported form.
|
|
203
|
+
'async-await': false,
|
|
204
|
+
// Zone.js also does not support async generators or async iterators. However, esbuild does
|
|
205
|
+
// not currently support downleveling either of them. Instead babel is used within the JS/TS
|
|
206
|
+
// loader to perform the downlevel transformation. They are both disabled here to allow
|
|
207
|
+
// esbuild to handle them in the future if support is ever added.
|
|
208
|
+
// NOTE: If esbuild adds support in the future, the babel support for these can be disabled.
|
|
209
|
+
'async-generator': false,
|
|
210
|
+
'for-await': false,
|
|
211
|
+
},
|
|
188
212
|
},
|
|
189
213
|
};
|
|
190
214
|
},
|
|
@@ -193,12 +217,20 @@ function angular(pluginOptions = {
|
|
|
193
217
|
if (/\.[cm]?js$/.test(id)) {
|
|
194
218
|
const angularPackage = /[\\/]node_modules[\\/]@angular[\\/]/.test(id);
|
|
195
219
|
const linkerPluginCreator = (yield (0, load_esm_1.loadEsmModule)('@angular/compiler-cli/linker/babel')).createEs2015LinkerPlugin;
|
|
196
|
-
const
|
|
220
|
+
const forceAsyncTransformation = !/[\\/][_f]?esm2015[\\/]/.test(id) &&
|
|
221
|
+
/for\s+await\s*\(|async\s+function\s*\*/.test(code);
|
|
222
|
+
const shouldLink = yield (0, webpack_loader_1.requiresLinking)(id, code);
|
|
223
|
+
const useInputSourcemap = (!isProd ? undefined : false);
|
|
224
|
+
if (!forceAsyncTransformation && !isProd && !shouldLink) {
|
|
225
|
+
return {
|
|
226
|
+
code: isProd
|
|
227
|
+
? code.replace(/^\/\/# sourceMappingURL=[^\r\n]*/gm, '')
|
|
228
|
+
: code,
|
|
229
|
+
};
|
|
230
|
+
}
|
|
197
231
|
const result = yield (0, core_1.transformAsync)(code, {
|
|
198
232
|
filename: id,
|
|
199
|
-
inputSourceMap:
|
|
200
|
-
? undefined
|
|
201
|
-
: false),
|
|
233
|
+
inputSourceMap: useInputSourcemap,
|
|
202
234
|
sourceMaps: !isProd ? 'inline' : false,
|
|
203
235
|
compact: false,
|
|
204
236
|
configFile: false,
|
|
@@ -210,12 +242,11 @@ function angular(pluginOptions = {
|
|
|
210
242
|
application_1.default,
|
|
211
243
|
{
|
|
212
244
|
angularLinker: {
|
|
213
|
-
shouldLink
|
|
245
|
+
shouldLink,
|
|
214
246
|
jitMode: false,
|
|
215
247
|
linkerPluginCreator,
|
|
216
248
|
},
|
|
217
|
-
forceAsyncTransformation
|
|
218
|
-
code.includes('async'),
|
|
249
|
+
forceAsyncTransformation,
|
|
219
250
|
optimize: isProd && {
|
|
220
251
|
looseEnums: angularPackage,
|
|
221
252
|
pureTopLevel: angularPackage,
|
|
@@ -234,6 +265,27 @@ function angular(pluginOptions = {
|
|
|
234
265
|
},
|
|
235
266
|
},
|
|
236
267
|
];
|
|
268
|
+
function setupCompilation() {
|
|
269
|
+
const { options: tsCompilerOptions, rootNames: rn } = compilerCli.readConfiguration(pluginOptions.tsconfig, {
|
|
270
|
+
enableIvy: true,
|
|
271
|
+
noEmitOnError: false,
|
|
272
|
+
suppressOutputPathCheck: true,
|
|
273
|
+
outDir: undefined,
|
|
274
|
+
inlineSources: !isProd,
|
|
275
|
+
inlineSourceMap: !isProd,
|
|
276
|
+
sourceMap: false,
|
|
277
|
+
mapRoot: undefined,
|
|
278
|
+
sourceRoot: undefined,
|
|
279
|
+
declaration: false,
|
|
280
|
+
declarationMap: false,
|
|
281
|
+
allowEmptyCodegenFiles: false,
|
|
282
|
+
annotationsAs: 'decorators',
|
|
283
|
+
enableResourceInlining: false,
|
|
284
|
+
});
|
|
285
|
+
rootNames = rn;
|
|
286
|
+
compilerOptions = tsCompilerOptions;
|
|
287
|
+
host = ts.createIncrementalCompilerHost(compilerOptions);
|
|
288
|
+
}
|
|
237
289
|
/**
|
|
238
290
|
* Creates a new NgtscProgram to analyze/re-analyze
|
|
239
291
|
* the source files and create a file emitter.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-vite-plugin.js","sourceRoot":"","sources":["../../../../../packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts"],"names":[],"mappings":";;;;AACA,sCAA6C;AAC7C,6FAAmG;AACnG,2FAAyF;AACzF,iCAAiC;AAGjC,gHAAkH;AAClH,+EAAiF;AACjF,+DAK+B;AAe/B,SAAgB,OAAO,CACrB,gBAA+B;IAC7B,QAAQ,
|
|
1
|
+
{"version":3,"file":"angular-vite-plugin.js","sourceRoot":"","sources":["../../../../../packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts"],"names":[],"mappings":";;;;AACA,sCAA6C;AAC7C,6FAAmG;AACnG,2FAAyF;AACzF,iCAAiC;AAGjC,gHAAkH;AAClH,+EAAiF;AACjF,+DAK+B;AAe/B,SAAgB,OAAO,CACrB,gBAA+B;IAC7B,QAAQ,EACN,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,MAAM;QAChC,CAAC,CAAC,sBAAsB;QACxB,CAAC,CAAC,qBAAqB;IAC3B,aAAa,EAAE,OAAO,CAAC,GAAG,EAAE;CAC7B;IAED,kHAAkH;IAClH,IAAI,WAAoC,CAAC;IACzC,IAAI,eAAe,GAAG,EAAE,CAAC;IACzB,gDAAgD;IAChD,MAAM,EACJ,iBAAiB,EACjB,gBAAgB,GACjB,GAAG,OAAO,CAAC,yCAAyC,CAAC,CAAC;IACvD,MAAM,EACJ,4BAA4B,EAC5B,sBAAsB,GACvB,GAAG,OAAO,CAAC,+BAA+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