@ohos-ports/rspack-core 2.2.2-beta.0 → 2.3.2-beta.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/README.md +9 -0
- package/compiled/@rspack/lite-tapable/dist/index.d.ts +20 -6
- package/compiled/@rspack/lite-tapable/package.json +1 -1
- package/compiled/http-proxy-middleware/index.d.ts +10 -10
- package/compiled/http-proxy-middleware/package.json +1 -1
- package/compiled/open/package.json +1 -1
- package/compiled/tinypool/README.md +4 -4
- package/compiled/tinypool/dist/index.d.ts +3 -2
- package/compiled/tinypool/dist/index.js +3 -3
- package/compiled/tinypool/package.json +1 -1
- package/compiled/watchpack/index.js +276 -49
- package/compiled/watchpack/package.json +1 -1
- package/compiled/watchpack/types/DirectoryWatcher.d.ts +24 -0
- package/compiled/watchpack/types/index.d.ts +1 -1
- package/compiled/watchpack/types/watchEventSource.d.ts +9 -0
- package/compiled/webpack-sources/index.d.ts +61 -0
- package/compiled/webpack-sources/index.js +858 -224
- package/compiled/webpack-sources/package.json +8 -1
- package/compiled/webpack-sources/types/CachedSource.d.ts +192 -0
- package/compiled/webpack-sources/types/CompatSource.d.ts +87 -0
- package/compiled/webpack-sources/types/ConcatSource.d.ts +75 -0
- package/compiled/webpack-sources/types/OriginalSource.d.ts +87 -0
- package/compiled/webpack-sources/types/PrefixSource.d.ts +59 -0
- package/compiled/webpack-sources/types/RawSource.d.ts +75 -0
- package/compiled/webpack-sources/types/ReplaceSource.d.ts +107 -0
- package/compiled/webpack-sources/types/SizeOnlySource.d.ts +24 -0
- package/compiled/webpack-sources/types/Source.d.ts +189 -0
- package/compiled/webpack-sources/types/SourceMapSource.d.ts +136 -0
- package/compiled/webpack-sources/types/helpers/createMappingsSerializer.d.ts +60 -0
- package/compiled/webpack-sources/types/helpers/getFromStreamChunks.d.ts +16 -0
- package/compiled/webpack-sources/types/helpers/getGeneratedSourceInfo.d.ts +31 -0
- package/compiled/webpack-sources/types/helpers/getName.d.ts +15 -0
- package/compiled/webpack-sources/types/helpers/getSource.d.ts +15 -0
- package/compiled/webpack-sources/types/helpers/readMappings.d.ts +19 -0
- package/compiled/webpack-sources/types/helpers/scopes.d.ts +119 -0
- package/compiled/webpack-sources/types/helpers/splitIntoLines.d.ts +6 -0
- package/compiled/webpack-sources/types/helpers/splitIntoPotentialTokens.d.ts +37 -0
- package/compiled/webpack-sources/types/helpers/streamAndGetSourceAndMap.d.ts +39 -0
- package/compiled/webpack-sources/types/helpers/streamChunks.d.ts +56 -0
- package/compiled/webpack-sources/types/helpers/streamChunksOfCombinedSourceMap.d.ts +42 -0
- package/compiled/webpack-sources/types/helpers/streamChunksOfRawSource.d.ts +16 -0
- package/compiled/webpack-sources/types/helpers/streamChunksOfSourceMap.d.ts +19 -0
- package/compiled/webpack-sources/types/helpers/stringBufferUtils.d.ts +55 -0
- package/compiled/webpack-sources/types/index.d.ts +50 -0
- package/dist/BuildInfo.d.ts +13 -4
- package/dist/Chunk.d.ts +3 -3
- package/dist/ChunkGraph.d.ts +2 -2
- package/dist/Chunks.d.ts +2 -2
- package/dist/CodeGenerationResults.d.ts +6 -1
- package/dist/Compilation.d.ts +16 -53
- package/dist/Compiler.d.ts +9 -10
- package/dist/ConcatenatedModule.d.ts +5 -1
- package/dist/ContextModule.d.ts +3 -1
- package/dist/Diagnostics.d.ts +2 -6
- package/dist/Entrypoint.d.ts +1 -1
- package/dist/ExportsInfo.d.ts +1 -1
- package/dist/ExternalModule.d.ts +7 -6
- package/dist/FileSystem.d.ts +3 -1
- package/dist/FileSystemDependencies.d.ts +15 -0
- package/dist/FileSystemInfo.d.ts +1 -0
- package/dist/Module.d.ts +19 -11
- package/dist/ModuleGraph.d.ts +6 -6
- package/dist/ModuleGraphConnection.d.ts +9 -3
- package/dist/Modules.d.ts +3 -0
- package/dist/NativeWatchFileSystem.d.ts +20 -8
- package/dist/NormalModule.d.ts +14 -6
- package/dist/NormalModuleFactory.d.ts +2 -1
- package/dist/Resolver.d.ts +10 -2
- package/dist/ResolverFactory.d.ts +1 -1
- package/dist/RspackError.d.ts +2 -2
- package/dist/RuntimeGlobals.d.ts +4 -3
- package/dist/RuntimeModule.d.ts +1 -1
- package/dist/RuntimeTemplate.d.ts +1 -0
- package/dist/Stats.d.ts +1 -1
- package/dist/builtin-loader/lightningcss/target.d.ts +1 -1
- package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BannerPlugin.d.ts +2 -2
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CaseSensitivePlugin.d.ts +1 -1
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CircularCheckRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CircularDependencyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CircularModulesInfoPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CompactHashedChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CompactHashedModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +2 -2
- package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssHttpExternalsRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +2 -2
- package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +2 -2
- package/dist/builtin-plugin/EsmNodeTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +2 -2
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +5 -4
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
- package/dist/builtin-plugin/HashedModuleIdsPlugin.d.ts +2 -2
- package/dist/builtin-plugin/HotModuleReplacementPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpUriPlugin.d.ts +5 -1
- package/dist/builtin-plugin/IgnorePlugin.d.ts +2 -2
- package/dist/builtin-plugin/ImportedByDeferModulesPlugin.d.ts +9 -0
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/InlineExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LibManifestPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NormalModuleReplacementPlugin.d.ts +1 -1
- package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +2 -2
- package/dist/builtin-plugin/ProgressPlugin.d.ts +2 -2
- package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RslibPlugin.d.ts +4 -4
- package/dist/builtin-plugin/RstestPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +2 -2
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +3 -2
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SyncModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/URLPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WorkerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/base.d.ts +1 -1
- package/dist/builtin-plugin/css-extract/index.d.ts +1 -1
- package/dist/builtin-plugin/css-extract/utils.d.ts +4 -1
- package/dist/builtin-plugin/html-plugin/hooks.d.ts +1 -1
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +2 -2
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +3 -3
- package/dist/builtin-plugin/rsc/RscClientPlugin.d.ts +1 -1
- package/dist/builtin-plugin/rsc/RscServerPlugin.d.ts +1 -1
- package/dist/config/adapter.d.ts +1 -1
- package/dist/config/adapterRuleUse.d.ts +3 -2
- package/dist/config/normalization.d.ts +5 -8
- package/dist/config/target.d.ts +2 -0
- package/dist/config/types.d.ts +104 -19
- package/dist/container/ContainerPlugin.d.ts +1 -1
- package/dist/container/ContainerReferencePlugin.d.ts +1 -1
- package/dist/container/ModuleFederationManifestPlugin.d.ts +1 -1
- package/dist/container/ModuleFederationPluginV1.d.ts +5 -1
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/cssExtractHmr.js +1 -1
- package/dist/cssExtractLoader.js +7 -5
- package/dist/exports.d.ts +7 -7
- package/dist/index.js +1845 -1070
- package/dist/lib/Cache.d.ts +3 -0
- package/dist/lib/DllReferencePlugin.d.ts +1 -1
- package/dist/lib/WebpackError.d.ts +1 -1
- package/dist/loader-runner/codeFilter.d.ts +9 -0
- package/dist/loader-runner/dependencies.d.ts +5 -4
- package/dist/loader-runner/index.d.ts +3 -2
- package/dist/loader-runner/service.d.ts +6 -5
- package/dist/loader-runner/worker.d.ts +5 -2
- package/dist/l~0.js +34 -0
- package/dist/l~3.js +34 -0
- package/dist/node/NodeWatchFileSystem.d.ts +7 -4
- package/dist/sharing/CollectSharedEntryPlugin.d.ts +1 -1
- package/dist/sharing/ConsumeSharedPlugin.d.ts +1 -1
- package/dist/sharing/ProvideSharedPlugin.d.ts +1 -1
- package/dist/sharing/SharePlugin.d.ts +13 -1
- package/dist/sharing/ShareRuntimePlugin.d.ts +1 -1
- package/dist/sharing/SharedContainerPlugin.d.ts +1 -1
- package/dist/sharing/SharedUsedExportsOptimizerPlugin.d.ts +2 -2
- package/dist/sources.d.ts +3 -0
- package/dist/stats/StatsFactory.d.ts +4 -2
- package/dist/stats/StatsPrinter.d.ts +5 -5
- package/dist/stats/statsFactoryUtils.d.ts +12 -6
- package/dist/swc.d.ts +1 -1
- package/dist/taps/compilation.d.ts +1 -1
- package/dist/taps/types.d.ts +1 -1
- package/dist/util/SplitChunkSize.d.ts +1 -1
- package/dist/util/bindingHelpers.d.ts +9 -0
- package/dist/util/createModule.d.ts +3 -0
- package/dist/util/fs.d.ts +22 -16
- package/dist/util/resolveLayerExternals.d.ts +1 -0
- package/dist/util/source.d.ts +13 -4
- package/dist/util/symbols.d.ts +10 -0
- package/dist/util/watchTimeInfo.d.ts +11 -0
- package/dist/worker.js +386 -353
- package/hot/lazy-compilation-node.js +1 -1
- package/hot/lazy-compilation-web.js +1 -1
- package/package.json +8 -32
- package/compiled/webpack-sources/types.d.ts +0 -500
- package/dist/612~0.js +0 -32
- package/dist/612~3.js +0 -32
- package/dist/loader-runner/cache.d.ts +0 -18
- package/dist/util/MergeCaller.d.ts +0 -10
- package/dist/util/fake.d.ts +0 -11
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
-
/***/
|
|
5
|
+
/***/ 384:
|
|
6
6
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
const Source = __nccwpck_require__(
|
|
16
|
-
const streamAndGetSourceAndMap = __nccwpck_require__(
|
|
17
|
-
const streamChunksOfRawSource = __nccwpck_require__(
|
|
18
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
|
15
|
+
const Source = __nccwpck_require__(290);
|
|
16
|
+
const streamAndGetSourceAndMap = __nccwpck_require__(658);
|
|
17
|
+
const streamChunksOfRawSource = __nccwpck_require__(543);
|
|
18
|
+
const streamChunksOfSourceMap = __nccwpck_require__(637);
|
|
19
19
|
const {
|
|
20
20
|
isDualStringBufferCachingEnabled,
|
|
21
|
-
} = __nccwpck_require__(
|
|
21
|
+
} = __nccwpck_require__(345);
|
|
22
22
|
|
|
23
23
|
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
24
24
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
@@ -31,6 +31,7 @@ const {
|
|
|
31
31
|
/** @typedef {import("./helpers/streamChunks").OnName} OnName */
|
|
32
32
|
/** @typedef {import("./helpers/streamChunks").OnSource} OnSource */
|
|
33
33
|
/** @typedef {import("./helpers/streamChunks").Options} Options */
|
|
34
|
+
/** @typedef {import("./helpers/streamChunks").ScopeBindings} ScopeBindings */
|
|
34
35
|
|
|
35
36
|
/**
|
|
36
37
|
* @typedef {object} BufferedMap
|
|
@@ -63,6 +64,25 @@ const mapToBufferedMap = (map) => {
|
|
|
63
64
|
return bufferedMap;
|
|
64
65
|
};
|
|
65
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Encodes every string a recorded hash update holds as a buffer, so cached data
|
|
69
|
+
* handed to a caller carries no big string: a string goes into the serialized
|
|
70
|
+
* payload, where it is copied in and rebuilt on every deserialization, while a
|
|
71
|
+
* buffer is carried alongside it. Hashing reads a string as utf8, so the
|
|
72
|
+
* encoded update hashes the same. It encodes in place, so a source handed out
|
|
73
|
+
* repeatedly is encoded once, and one that never is keeps its string uncopied.
|
|
74
|
+
* @param {(string | Buffer)[]=} update recorded hash update
|
|
75
|
+
* @returns {(string | Buffer)[]=} the update, holding no string
|
|
76
|
+
*/
|
|
77
|
+
const bufferHashUpdate = (update) => {
|
|
78
|
+
if (update === undefined) return undefined;
|
|
79
|
+
for (let index = 0; index < update.length; index++) {
|
|
80
|
+
const item = update[index];
|
|
81
|
+
if (typeof item === "string") update[index] = Buffer.from(item, "utf8");
|
|
82
|
+
}
|
|
83
|
+
return update;
|
|
84
|
+
};
|
|
85
|
+
|
|
66
86
|
/**
|
|
67
87
|
* @param {null | BufferedMap} bufferedMap buffered map
|
|
68
88
|
* @returns {null | RawSourceMap} map
|
|
@@ -83,7 +103,20 @@ const bufferedMapToMap = (bufferedMap) => {
|
|
|
83
103
|
return map;
|
|
84
104
|
};
|
|
85
105
|
|
|
86
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* What replaying an entry streamed for a `scopes` request needs besides its
|
|
108
|
+
* map. The map only keeps the encoded `scopes` field, so `bindings` holds, by
|
|
109
|
+
* source index, the bindings each source reported. The field also appended
|
|
110
|
+
* names to the map, and `names` counts the ones the stream itself reported,
|
|
111
|
+
* so a replay reports the same names a fresh stream would.
|
|
112
|
+
* @typedef {object} ScopesReplay
|
|
113
|
+
* @property {(ScopeBindings | undefined)[]} bindings bindings by source index
|
|
114
|
+
* @property {number} names number of names the stream reported
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @typedef {{ map?: null | RawSourceMap, bufferedMap?: null | BufferedMap, scopes?: ScopesReplay }} BufferEntry
|
|
119
|
+
*/
|
|
87
120
|
/** @typedef {Map<string, BufferEntry>} BufferedMaps */
|
|
88
121
|
|
|
89
122
|
const CACHE_KEY_EMPTY = "{}";
|
|
@@ -106,7 +139,8 @@ const getCacheKey = (options) => {
|
|
|
106
139
|
if (
|
|
107
140
|
/** @type {Options} */ (options).source === undefined &&
|
|
108
141
|
/** @type {Options} */ (options).finalSource === undefined &&
|
|
109
|
-
/** @type {MapOptions} */ (options).module === undefined
|
|
142
|
+
/** @type {MapOptions} */ (options).module === undefined &&
|
|
143
|
+
/** @type {MapOptions} */ (options).scopes === undefined
|
|
110
144
|
) {
|
|
111
145
|
if (columns === undefined) return CACHE_KEY_EMPTY;
|
|
112
146
|
return columns ? CACHE_KEY_COLUMNS_TRUE : CACHE_KEY_COLUMNS_FALSE;
|
|
@@ -131,12 +165,10 @@ class CachedSource extends Source {
|
|
|
131
165
|
constructor(source, cachedData) {
|
|
132
166
|
super();
|
|
133
167
|
/**
|
|
134
|
-
* @private
|
|
135
168
|
* @type {Source | (() => Source)}
|
|
136
169
|
*/
|
|
137
170
|
this._source = source;
|
|
138
171
|
/**
|
|
139
|
-
* @private
|
|
140
172
|
* @type {undefined | string}
|
|
141
173
|
*/
|
|
142
174
|
this._cachedSource = undefined;
|
|
@@ -146,27 +178,22 @@ class CachedSource extends Source {
|
|
|
146
178
|
// branch count roughly in half.
|
|
147
179
|
if (cachedData) {
|
|
148
180
|
/**
|
|
149
|
-
* @private
|
|
150
181
|
* @type {boolean | undefined}
|
|
151
182
|
*/
|
|
152
183
|
this._cachedSourceType = cachedData.source;
|
|
153
184
|
/**
|
|
154
|
-
* @private
|
|
155
185
|
* @type {Buffer | undefined}
|
|
156
186
|
*/
|
|
157
187
|
this._cachedBuffer = cachedData.buffer;
|
|
158
188
|
/**
|
|
159
|
-
* @private
|
|
160
189
|
* @type {number | undefined}
|
|
161
190
|
*/
|
|
162
191
|
this._cachedSize = cachedData.size;
|
|
163
192
|
/**
|
|
164
|
-
* @
|
|
165
|
-
* @type {BufferedMaps}
|
|
193
|
+
* @type {BufferedMaps | undefined}
|
|
166
194
|
*/
|
|
167
195
|
this._cachedMaps = cachedData.maps;
|
|
168
196
|
/**
|
|
169
|
-
* @private
|
|
170
197
|
* @type {(string | Buffer)[] | undefined}
|
|
171
198
|
*/
|
|
172
199
|
this._cachedHashUpdate = cachedData.hash;
|
|
@@ -174,28 +201,48 @@ class CachedSource extends Source {
|
|
|
174
201
|
this._cachedSourceType = undefined;
|
|
175
202
|
this._cachedBuffer = undefined;
|
|
176
203
|
this._cachedSize = undefined;
|
|
177
|
-
this._cachedMaps =
|
|
204
|
+
this._cachedMaps = undefined;
|
|
178
205
|
this._cachedHashUpdate = undefined;
|
|
179
206
|
}
|
|
180
207
|
}
|
|
181
208
|
|
|
209
|
+
/**
|
|
210
|
+
* The map cache, created on first use: a source nobody asks a map of holds
|
|
211
|
+
* none, since V8 allocates a Map's hash table whether or not it is filled.
|
|
212
|
+
* @returns {BufferedMaps} map cache
|
|
213
|
+
*/
|
|
214
|
+
_getOrCreateCachedMaps() {
|
|
215
|
+
const cachedMaps = this._cachedMaps;
|
|
216
|
+
if (cachedMaps !== undefined) return cachedMaps;
|
|
217
|
+
return (this._cachedMaps = new Map());
|
|
218
|
+
}
|
|
219
|
+
|
|
182
220
|
/**
|
|
183
221
|
* @returns {CachedData} cached data
|
|
184
222
|
*/
|
|
185
223
|
getCachedData() {
|
|
186
224
|
/** @type {BufferedMaps} */
|
|
187
225
|
const bufferedMaps = new Map();
|
|
188
|
-
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
cacheEntry.bufferedMap
|
|
192
|
-
|
|
193
|
-
|
|
226
|
+
if (this._cachedMaps !== undefined) {
|
|
227
|
+
for (const pair of this._cachedMaps) {
|
|
228
|
+
const [, cacheEntry] = pair;
|
|
229
|
+
if (cacheEntry.bufferedMap === undefined) {
|
|
230
|
+
cacheEntry.bufferedMap = mapToBufferedMap(
|
|
231
|
+
this._getMapFromCacheEntry(cacheEntry),
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
/** @type {BufferEntry} */
|
|
235
|
+
const bufferEntry = {
|
|
236
|
+
map: undefined,
|
|
237
|
+
bufferedMap: cacheEntry.bufferedMap,
|
|
238
|
+
};
|
|
239
|
+
// Keep the bindings a `scopes` request recorded, so a source
|
|
240
|
+
// restored from this data replays them without its original.
|
|
241
|
+
if (cacheEntry.scopes !== undefined) {
|
|
242
|
+
bufferEntry.scopes = cacheEntry.scopes;
|
|
243
|
+
}
|
|
244
|
+
bufferedMaps.set(pair[0], bufferEntry);
|
|
194
245
|
}
|
|
195
|
-
bufferedMaps.set(pair[0], {
|
|
196
|
-
map: undefined,
|
|
197
|
-
bufferedMap: cacheEntry.bufferedMap,
|
|
198
|
-
});
|
|
199
246
|
}
|
|
200
247
|
return {
|
|
201
248
|
// `CachedData.buffer` is required (it is the on-disk
|
|
@@ -216,7 +263,7 @@ class CachedSource extends Source {
|
|
|
216
263
|
: undefined,
|
|
217
264
|
size: this._cachedSize,
|
|
218
265
|
maps: bufferedMaps,
|
|
219
|
-
hash: this._cachedHashUpdate,
|
|
266
|
+
hash: bufferHashUpdate(this._cachedHashUpdate),
|
|
220
267
|
};
|
|
221
268
|
}
|
|
222
269
|
|
|
@@ -254,7 +301,6 @@ class CachedSource extends Source {
|
|
|
254
301
|
}
|
|
255
302
|
|
|
256
303
|
/**
|
|
257
|
-
* @private
|
|
258
304
|
* @param {BufferEntry} cacheEntry cache entry
|
|
259
305
|
* @returns {null | RawSourceMap} raw source map
|
|
260
306
|
*/
|
|
@@ -269,7 +315,6 @@ class CachedSource extends Source {
|
|
|
269
315
|
}
|
|
270
316
|
|
|
271
317
|
/**
|
|
272
|
-
* @private
|
|
273
318
|
* @returns {undefined | string} cached source
|
|
274
319
|
*/
|
|
275
320
|
_getCachedSource() {
|
|
@@ -352,7 +397,9 @@ class CachedSource extends Source {
|
|
|
352
397
|
*/
|
|
353
398
|
sourceAndMap(options) {
|
|
354
399
|
const key = getCacheKey(options);
|
|
355
|
-
const
|
|
400
|
+
const cachedMaps = this._cachedMaps;
|
|
401
|
+
const cacheEntry =
|
|
402
|
+
cachedMaps === undefined ? undefined : cachedMaps.get(key);
|
|
356
403
|
// Look for a cached map
|
|
357
404
|
if (cacheEntry !== undefined) {
|
|
358
405
|
// We have a cached map in some representation
|
|
@@ -374,7 +421,7 @@ class CachedSource extends Source {
|
|
|
374
421
|
map = sourceAndMap.map;
|
|
375
422
|
this._cachedSource = source;
|
|
376
423
|
}
|
|
377
|
-
this.
|
|
424
|
+
this._getOrCreateCachedMaps().set(key, {
|
|
378
425
|
map,
|
|
379
426
|
bufferedMap: undefined,
|
|
380
427
|
});
|
|
@@ -390,18 +437,38 @@ class CachedSource extends Source {
|
|
|
390
437
|
*/
|
|
391
438
|
streamChunks(options, onChunk, onSource, onName) {
|
|
392
439
|
const key = getCacheKey(options);
|
|
440
|
+
const scopes = Boolean(
|
|
441
|
+
options && /** @type {MapOptions} */ (options).scopes,
|
|
442
|
+
);
|
|
443
|
+
const cachedMaps = this._cachedMaps;
|
|
444
|
+
const cacheEntry =
|
|
445
|
+
cachedMaps === undefined ? undefined : cachedMaps.get(key);
|
|
393
446
|
if (
|
|
394
|
-
|
|
447
|
+
cacheEntry !== undefined &&
|
|
448
|
+
// An entry filled without streaming never saw the bindings, so a
|
|
449
|
+
// scopes request streams the original once to record them.
|
|
450
|
+
(!scopes || cacheEntry.scopes !== undefined) &&
|
|
395
451
|
(this._cachedBuffer !== undefined || this._cachedSource !== undefined)
|
|
396
452
|
) {
|
|
397
453
|
const { source, map } = this.sourceAndMap(options);
|
|
398
454
|
if (map) {
|
|
455
|
+
const replay = scopes ? cacheEntry.scopes : undefined;
|
|
399
456
|
return streamChunksOfSourceMap(
|
|
400
457
|
/** @type {string} */
|
|
401
458
|
(source),
|
|
402
|
-
map
|
|
459
|
+
replay !== undefined && map.names.length > replay.names
|
|
460
|
+
? { ...map, names: map.names.slice(0, replay.names) }
|
|
461
|
+
: map,
|
|
403
462
|
onChunk,
|
|
404
|
-
|
|
463
|
+
replay !== undefined
|
|
464
|
+
? (sourceIndex, source, sourceContent) =>
|
|
465
|
+
onSource(
|
|
466
|
+
sourceIndex,
|
|
467
|
+
source,
|
|
468
|
+
sourceContent,
|
|
469
|
+
replay.bindings[sourceIndex],
|
|
470
|
+
)
|
|
471
|
+
: onSource,
|
|
405
472
|
onName,
|
|
406
473
|
Boolean(options && options.finalSource),
|
|
407
474
|
true,
|
|
@@ -416,17 +483,30 @@ class CachedSource extends Source {
|
|
|
416
483
|
Boolean(options && options.finalSource),
|
|
417
484
|
);
|
|
418
485
|
}
|
|
486
|
+
/** @type {ScopesReplay | undefined} */
|
|
487
|
+
const replay = scopes ? { bindings: [], names: 0 } : undefined;
|
|
419
488
|
const sourceAndMap = streamAndGetSourceAndMap(
|
|
420
489
|
this.original(),
|
|
421
490
|
options,
|
|
422
491
|
onChunk,
|
|
423
|
-
|
|
424
|
-
|
|
492
|
+
replay !== undefined
|
|
493
|
+
? (sourceIndex, source, sourceContent, bindings) => {
|
|
494
|
+
replay.bindings[sourceIndex] = bindings;
|
|
495
|
+
onSource(sourceIndex, source, sourceContent, bindings);
|
|
496
|
+
}
|
|
497
|
+
: onSource,
|
|
498
|
+
replay !== undefined
|
|
499
|
+
? (nameIndex, name) => {
|
|
500
|
+
if (nameIndex >= replay.names) replay.names = nameIndex + 1;
|
|
501
|
+
onName(nameIndex, name);
|
|
502
|
+
}
|
|
503
|
+
: onName,
|
|
425
504
|
);
|
|
426
505
|
this._cachedSource = sourceAndMap.source;
|
|
427
|
-
this.
|
|
506
|
+
this._getOrCreateCachedMaps().set(key, {
|
|
428
507
|
map: /** @type {RawSourceMap} */ (sourceAndMap.map),
|
|
429
508
|
bufferedMap: undefined,
|
|
509
|
+
scopes: replay,
|
|
430
510
|
});
|
|
431
511
|
return sourceAndMap.result;
|
|
432
512
|
}
|
|
@@ -437,12 +517,14 @@ class CachedSource extends Source {
|
|
|
437
517
|
*/
|
|
438
518
|
map(options) {
|
|
439
519
|
const key = getCacheKey(options);
|
|
440
|
-
const
|
|
520
|
+
const cachedMaps = this._cachedMaps;
|
|
521
|
+
const cacheEntry =
|
|
522
|
+
cachedMaps === undefined ? undefined : cachedMaps.get(key);
|
|
441
523
|
if (cacheEntry !== undefined) {
|
|
442
524
|
return this._getMapFromCacheEntry(cacheEntry);
|
|
443
525
|
}
|
|
444
526
|
const map = this.original().map(options);
|
|
445
|
-
this.
|
|
527
|
+
this._getOrCreateCachedMaps().set(key, {
|
|
446
528
|
map,
|
|
447
529
|
bufferedMap: undefined,
|
|
448
530
|
});
|
|
@@ -473,7 +555,7 @@ class CachedSource extends Source {
|
|
|
473
555
|
this._cachedBuffer = undefined;
|
|
474
556
|
this._cachedBuffers = undefined;
|
|
475
557
|
}
|
|
476
|
-
if (clearMaps) {
|
|
558
|
+
if (clearMaps && this._cachedMaps !== undefined) {
|
|
477
559
|
// Reusing the Map avoids per-call allocation churn when builds
|
|
478
560
|
// call clearCache thousands of times.
|
|
479
561
|
this._cachedMaps.clear();
|
|
@@ -540,7 +622,7 @@ module.exports = CachedSource;
|
|
|
540
622
|
|
|
541
623
|
/***/ }),
|
|
542
624
|
|
|
543
|
-
/***/
|
|
625
|
+
/***/ 912:
|
|
544
626
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
545
627
|
|
|
546
628
|
/*
|
|
@@ -550,7 +632,7 @@ module.exports = CachedSource;
|
|
|
550
632
|
|
|
551
633
|
|
|
552
634
|
|
|
553
|
-
const Source = __nccwpck_require__(
|
|
635
|
+
const Source = __nccwpck_require__(290);
|
|
554
636
|
|
|
555
637
|
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
556
638
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
@@ -588,7 +670,6 @@ class CompatSource extends Source {
|
|
|
588
670
|
constructor(sourceLike) {
|
|
589
671
|
super();
|
|
590
672
|
/**
|
|
591
|
-
* @private
|
|
592
673
|
* @type {SourceLike}
|
|
593
674
|
*/
|
|
594
675
|
this._sourceLike = sourceLike;
|
|
@@ -698,7 +779,7 @@ module.exports = CompatSource;
|
|
|
698
779
|
|
|
699
780
|
/***/ }),
|
|
700
781
|
|
|
701
|
-
/***/
|
|
782
|
+
/***/ 698:
|
|
702
783
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
703
784
|
|
|
704
785
|
/*
|
|
@@ -708,10 +789,10 @@ module.exports = CompatSource;
|
|
|
708
789
|
|
|
709
790
|
|
|
710
791
|
|
|
711
|
-
const RawSource = __nccwpck_require__(
|
|
712
|
-
const Source = __nccwpck_require__(
|
|
713
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
714
|
-
const streamChunks = __nccwpck_require__(
|
|
792
|
+
const RawSource = __nccwpck_require__(132);
|
|
793
|
+
const Source = __nccwpck_require__(290);
|
|
794
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(847);
|
|
795
|
+
const streamChunks = __nccwpck_require__(487);
|
|
715
796
|
|
|
716
797
|
/** @typedef {import("./CompatSource").SourceLike} SourceLike */
|
|
717
798
|
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
@@ -737,7 +818,6 @@ class ConcatSource extends Source {
|
|
|
737
818
|
constructor(...args) {
|
|
738
819
|
super();
|
|
739
820
|
/**
|
|
740
|
-
* @private
|
|
741
821
|
* @type {Child[]}
|
|
742
822
|
*/
|
|
743
823
|
this._children = [];
|
|
@@ -758,7 +838,6 @@ class ConcatSource extends Source {
|
|
|
758
838
|
}
|
|
759
839
|
|
|
760
840
|
/**
|
|
761
|
-
* @private
|
|
762
841
|
* @type {boolean}
|
|
763
842
|
*/
|
|
764
843
|
this._isOptimized = args.length === 0;
|
|
@@ -982,11 +1061,11 @@ class ConcatSource extends Source {
|
|
|
982
1061
|
);
|
|
983
1062
|
}
|
|
984
1063
|
},
|
|
985
|
-
(i, source, sourceContent) => {
|
|
1064
|
+
(i, source, sourceContent, scopeBindings) => {
|
|
986
1065
|
let globalIndex = sourceMapping.get(source);
|
|
987
1066
|
if (globalIndex === undefined) {
|
|
988
1067
|
sourceMapping.set(source, (globalIndex = sourceMapping.size));
|
|
989
|
-
onSource(globalIndex, source, sourceContent);
|
|
1068
|
+
onSource(globalIndex, source, sourceContent, scopeBindings);
|
|
990
1069
|
}
|
|
991
1070
|
sourceIndexMapping[i] = globalIndex;
|
|
992
1071
|
},
|
|
@@ -1177,7 +1256,7 @@ module.exports = ConcatSource;
|
|
|
1177
1256
|
|
|
1178
1257
|
/***/ }),
|
|
1179
1258
|
|
|
1180
|
-
/***/
|
|
1259
|
+
/***/ 169:
|
|
1181
1260
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1182
1261
|
|
|
1183
1262
|
/*
|
|
@@ -1187,13 +1266,13 @@ module.exports = ConcatSource;
|
|
|
1187
1266
|
|
|
1188
1267
|
|
|
1189
1268
|
|
|
1190
|
-
const Source = __nccwpck_require__(
|
|
1191
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
1192
|
-
const getGeneratedSourceInfo = __nccwpck_require__(
|
|
1193
|
-
const { eachPotentialToken } = __nccwpck_require__(
|
|
1269
|
+
const Source = __nccwpck_require__(290);
|
|
1270
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(847);
|
|
1271
|
+
const getGeneratedSourceInfo = __nccwpck_require__(769);
|
|
1272
|
+
const { eachPotentialToken } = __nccwpck_require__(919);
|
|
1194
1273
|
const {
|
|
1195
1274
|
isDualStringBufferCachingEnabled,
|
|
1196
|
-
} = __nccwpck_require__(
|
|
1275
|
+
} = __nccwpck_require__(345);
|
|
1197
1276
|
|
|
1198
1277
|
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
1199
1278
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
@@ -1206,32 +1285,36 @@ const {
|
|
|
1206
1285
|
/** @typedef {import("./helpers/streamChunks").OnName} OnName */
|
|
1207
1286
|
/** @typedef {import("./helpers/streamChunks").OnSource} OnSource */
|
|
1208
1287
|
/** @typedef {import("./helpers/streamChunks").Options} Options */
|
|
1288
|
+
/** @typedef {import("./helpers/streamChunks").ScopeBindings} ScopeBindings */
|
|
1209
1289
|
|
|
1210
1290
|
class OriginalSource extends Source {
|
|
1211
1291
|
/**
|
|
1212
1292
|
* @param {string | Buffer} value value
|
|
1213
1293
|
* @param {string} name name
|
|
1294
|
+
* @param {ScopeBindings=} scopeBindings what each name this source declares
|
|
1295
|
+
* evaluates to in the generated code, for the map's `scopes` field
|
|
1214
1296
|
*/
|
|
1215
|
-
constructor(value, name) {
|
|
1297
|
+
constructor(value, name, scopeBindings) {
|
|
1216
1298
|
super();
|
|
1217
1299
|
|
|
1218
1300
|
const isBuffer = Buffer.isBuffer(value);
|
|
1219
1301
|
|
|
1220
1302
|
/**
|
|
1221
|
-
* @private
|
|
1222
1303
|
* @type {undefined | string}
|
|
1223
1304
|
*/
|
|
1224
1305
|
this._value = isBuffer ? undefined : value;
|
|
1225
1306
|
/**
|
|
1226
|
-
* @private
|
|
1227
1307
|
* @type {undefined | Buffer}
|
|
1228
1308
|
*/
|
|
1229
1309
|
this._valueAsBuffer = isBuffer ? value : undefined;
|
|
1230
1310
|
/**
|
|
1231
|
-
* @private
|
|
1232
1311
|
* @type {string}
|
|
1233
1312
|
*/
|
|
1234
1313
|
this._name = name;
|
|
1314
|
+
/**
|
|
1315
|
+
* @type {undefined | ScopeBindings}
|
|
1316
|
+
*/
|
|
1317
|
+
this._scopeBindings = scopeBindings;
|
|
1235
1318
|
}
|
|
1236
1319
|
|
|
1237
1320
|
getName() {
|
|
@@ -1311,7 +1394,7 @@ class OriginalSource extends Source {
|
|
|
1311
1394
|
/** @type {Buffer} */
|
|
1312
1395
|
(this._valueAsBuffer).toString("utf8");
|
|
1313
1396
|
}
|
|
1314
|
-
onSource(0, this._name, this._value);
|
|
1397
|
+
onSource(0, this._name, this._value, this._scopeBindings);
|
|
1315
1398
|
const finalSource = Boolean(options && options.finalSource);
|
|
1316
1399
|
if (!options || options.columns !== false) {
|
|
1317
1400
|
// With column info we need to walk every potential token. The
|
|
@@ -1432,7 +1515,13 @@ class OriginalSource extends Source {
|
|
|
1432
1515
|
*/
|
|
1433
1516
|
updateHash(hash) {
|
|
1434
1517
|
hash.update("OriginalSource");
|
|
1435
|
-
|
|
1518
|
+
// Same as RawSource: utf8 is what `buffer()` would have encoded to,
|
|
1519
|
+
// and one of the two forms is always set.
|
|
1520
|
+
if (this._valueAsBuffer === undefined) {
|
|
1521
|
+
hash.update(/** @type {string} */ (this._value));
|
|
1522
|
+
} else {
|
|
1523
|
+
hash.update(this._valueAsBuffer);
|
|
1524
|
+
}
|
|
1436
1525
|
hash.update(this._name || "");
|
|
1437
1526
|
}
|
|
1438
1527
|
}
|
|
@@ -1442,7 +1531,7 @@ module.exports = OriginalSource;
|
|
|
1442
1531
|
|
|
1443
1532
|
/***/ }),
|
|
1444
1533
|
|
|
1445
|
-
/***/
|
|
1534
|
+
/***/ 814:
|
|
1446
1535
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1447
1536
|
|
|
1448
1537
|
/*
|
|
@@ -1452,10 +1541,10 @@ module.exports = OriginalSource;
|
|
|
1452
1541
|
|
|
1453
1542
|
|
|
1454
1543
|
|
|
1455
|
-
const RawSource = __nccwpck_require__(
|
|
1456
|
-
const Source = __nccwpck_require__(
|
|
1457
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
1458
|
-
const streamChunks = __nccwpck_require__(
|
|
1544
|
+
const RawSource = __nccwpck_require__(132);
|
|
1545
|
+
const Source = __nccwpck_require__(290);
|
|
1546
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(847);
|
|
1547
|
+
const streamChunks = __nccwpck_require__(487);
|
|
1459
1548
|
|
|
1460
1549
|
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
1461
1550
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
@@ -1503,12 +1592,10 @@ class PrefixSource extends Source {
|
|
|
1503
1592
|
constructor(prefix, source) {
|
|
1504
1593
|
super();
|
|
1505
1594
|
/**
|
|
1506
|
-
* @private
|
|
1507
1595
|
* @type {string}
|
|
1508
1596
|
*/
|
|
1509
1597
|
this._prefix = prefix;
|
|
1510
1598
|
/**
|
|
1511
|
-
* @private
|
|
1512
1599
|
* @type {Source}
|
|
1513
1600
|
*/
|
|
1514
1601
|
this._source =
|
|
@@ -1662,7 +1749,7 @@ module.exports = PrefixSource;
|
|
|
1662
1749
|
|
|
1663
1750
|
/***/ }),
|
|
1664
1751
|
|
|
1665
|
-
/***/
|
|
1752
|
+
/***/ 132:
|
|
1666
1753
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1667
1754
|
|
|
1668
1755
|
/*
|
|
@@ -1672,12 +1759,12 @@ module.exports = PrefixSource;
|
|
|
1672
1759
|
|
|
1673
1760
|
|
|
1674
1761
|
|
|
1675
|
-
const Source = __nccwpck_require__(
|
|
1676
|
-
const streamChunksOfRawSource = __nccwpck_require__(
|
|
1762
|
+
const Source = __nccwpck_require__(290);
|
|
1763
|
+
const streamChunksOfRawSource = __nccwpck_require__(543);
|
|
1677
1764
|
const {
|
|
1678
1765
|
internString,
|
|
1679
1766
|
isDualStringBufferCachingEnabled,
|
|
1680
|
-
} = __nccwpck_require__(
|
|
1767
|
+
} = __nccwpck_require__(345);
|
|
1681
1768
|
|
|
1682
1769
|
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
1683
1770
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
@@ -1700,22 +1787,18 @@ class RawSource extends Source {
|
|
|
1700
1787
|
const isBuffer = Buffer.isBuffer(value);
|
|
1701
1788
|
if (isBuffer) {
|
|
1702
1789
|
/**
|
|
1703
|
-
* @private
|
|
1704
1790
|
* @type {boolean}
|
|
1705
1791
|
*/
|
|
1706
1792
|
this._valueIsBuffer = !convertToString;
|
|
1707
1793
|
/**
|
|
1708
|
-
* @private
|
|
1709
1794
|
* @type {undefined | string | Buffer}
|
|
1710
1795
|
*/
|
|
1711
1796
|
this._value = convertToString ? undefined : value;
|
|
1712
1797
|
/**
|
|
1713
|
-
* @private
|
|
1714
1798
|
* @type {undefined | Buffer}
|
|
1715
1799
|
*/
|
|
1716
1800
|
this._valueAsBuffer = value;
|
|
1717
1801
|
/**
|
|
1718
|
-
* @private
|
|
1719
1802
|
* @type {undefined | string}
|
|
1720
1803
|
*/
|
|
1721
1804
|
this._valueAsString = undefined;
|
|
@@ -1852,7 +1935,15 @@ class RawSource extends Source {
|
|
|
1852
1935
|
*/
|
|
1853
1936
|
updateHash(hash) {
|
|
1854
1937
|
hash.update("RawSource");
|
|
1855
|
-
|
|
1938
|
+
// A string is hashed as utf8, which is what `buffer()` would have
|
|
1939
|
+
// encoded it to, so hashing never has to materialize the buffer.
|
|
1940
|
+
// One of the two forms is always set: the constructor sets whichever
|
|
1941
|
+
// matches its input, and `clearCache` only drops the derived one.
|
|
1942
|
+
if (this._valueAsBuffer === undefined) {
|
|
1943
|
+
hash.update(/** @type {string} */ (this._valueAsString));
|
|
1944
|
+
} else {
|
|
1945
|
+
hash.update(this._valueAsBuffer);
|
|
1946
|
+
}
|
|
1856
1947
|
}
|
|
1857
1948
|
}
|
|
1858
1949
|
|
|
@@ -1861,7 +1952,7 @@ module.exports = RawSource;
|
|
|
1861
1952
|
|
|
1862
1953
|
/***/ }),
|
|
1863
1954
|
|
|
1864
|
-
/***/
|
|
1955
|
+
/***/ 522:
|
|
1865
1956
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1866
1957
|
|
|
1867
1958
|
/*
|
|
@@ -1871,10 +1962,10 @@ module.exports = RawSource;
|
|
|
1871
1962
|
|
|
1872
1963
|
|
|
1873
1964
|
|
|
1874
|
-
const Source = __nccwpck_require__(
|
|
1875
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
1876
|
-
const splitIntoLines = __nccwpck_require__(
|
|
1877
|
-
const streamChunks = __nccwpck_require__(
|
|
1965
|
+
const Source = __nccwpck_require__(290);
|
|
1966
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(847);
|
|
1967
|
+
const splitIntoLines = __nccwpck_require__(416);
|
|
1968
|
+
const streamChunks = __nccwpck_require__(487);
|
|
1878
1969
|
|
|
1879
1970
|
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
1880
1971
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
@@ -1958,19 +2049,16 @@ class ReplaceSource extends Source {
|
|
|
1958
2049
|
constructor(source, name) {
|
|
1959
2050
|
super();
|
|
1960
2051
|
/**
|
|
1961
|
-
* @private
|
|
1962
2052
|
* @type {Source}
|
|
1963
2053
|
*/
|
|
1964
2054
|
this._source = source;
|
|
1965
2055
|
/**
|
|
1966
|
-
* @private
|
|
1967
2056
|
* @type {string | undefined}
|
|
1968
2057
|
*/
|
|
1969
2058
|
this._name = name;
|
|
1970
2059
|
/** @type {Replacement[]} */
|
|
1971
2060
|
this._replacements = [];
|
|
1972
2061
|
/**
|
|
1973
|
-
* @private
|
|
1974
2062
|
* @type {boolean}
|
|
1975
2063
|
*/
|
|
1976
2064
|
this._isSorted = true;
|
|
@@ -2476,13 +2564,13 @@ class ReplaceSource extends Source {
|
|
|
2476
2564
|
}
|
|
2477
2565
|
pos = endPos;
|
|
2478
2566
|
},
|
|
2479
|
-
(sourceIndex, source, sourceContent) => {
|
|
2567
|
+
(sourceIndex, source, sourceContent, scopeBindings) => {
|
|
2480
2568
|
/* istanbul ignore next: non-sequential sourceIndex emission is not produced by any in-tree Source */
|
|
2481
2569
|
while (sourceContents.length < sourceIndex) {
|
|
2482
2570
|
sourceContents.push(undefined);
|
|
2483
2571
|
}
|
|
2484
2572
|
sourceContents[sourceIndex] = sourceContent;
|
|
2485
|
-
onSource(sourceIndex, source, sourceContent);
|
|
2573
|
+
onSource(sourceIndex, source, sourceContent, scopeBindings);
|
|
2486
2574
|
},
|
|
2487
2575
|
(nameIndex, name) => {
|
|
2488
2576
|
let globalIndex = nameMapping.get(name);
|
|
@@ -2624,7 +2712,7 @@ module.exports.Replacement = Replacement;
|
|
|
2624
2712
|
|
|
2625
2713
|
/***/ }),
|
|
2626
2714
|
|
|
2627
|
-
/***/
|
|
2715
|
+
/***/ 317:
|
|
2628
2716
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2629
2717
|
|
|
2630
2718
|
/*
|
|
@@ -2634,7 +2722,7 @@ module.exports.Replacement = Replacement;
|
|
|
2634
2722
|
|
|
2635
2723
|
|
|
2636
2724
|
|
|
2637
|
-
const Source = __nccwpck_require__(
|
|
2725
|
+
const Source = __nccwpck_require__(290);
|
|
2638
2726
|
|
|
2639
2727
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
2640
2728
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -2648,7 +2736,6 @@ class SizeOnlySource extends Source {
|
|
|
2648
2736
|
constructor(size) {
|
|
2649
2737
|
super();
|
|
2650
2738
|
/**
|
|
2651
|
-
* @private
|
|
2652
2739
|
* @type {number}
|
|
2653
2740
|
*/
|
|
2654
2741
|
this._size = size;
|
|
@@ -2712,7 +2799,7 @@ module.exports = SizeOnlySource;
|
|
|
2712
2799
|
|
|
2713
2800
|
/***/ }),
|
|
2714
2801
|
|
|
2715
|
-
/***/
|
|
2802
|
+
/***/ 290:
|
|
2716
2803
|
/***/ ((module) => {
|
|
2717
2804
|
|
|
2718
2805
|
/*
|
|
@@ -2726,6 +2813,7 @@ module.exports = SizeOnlySource;
|
|
|
2726
2813
|
* @typedef {object} MapOptions
|
|
2727
2814
|
* @property {boolean=} columns need columns?
|
|
2728
2815
|
* @property {boolean=} module is module
|
|
2816
|
+
* @property {boolean=} scopes emit the `scopes` field from the bindings the sources declare
|
|
2729
2817
|
*/
|
|
2730
2818
|
|
|
2731
2819
|
/**
|
|
@@ -2739,6 +2827,7 @@ module.exports = SizeOnlySource;
|
|
|
2739
2827
|
* @property {string} file file
|
|
2740
2828
|
* @property {string=} debugId debug id
|
|
2741
2829
|
* @property {number[]=} ignoreList ignore list
|
|
2830
|
+
* @property {string=} scopes encoded `scopes` field of the "Scopes" proposal
|
|
2742
2831
|
*/
|
|
2743
2832
|
|
|
2744
2833
|
/** @typedef {string | Buffer} SourceValue */
|
|
@@ -2845,7 +2934,7 @@ module.exports = Source;
|
|
|
2845
2934
|
|
|
2846
2935
|
/***/ }),
|
|
2847
2936
|
|
|
2848
|
-
/***/
|
|
2937
|
+
/***/ 471:
|
|
2849
2938
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2850
2939
|
|
|
2851
2940
|
/*
|
|
@@ -2855,13 +2944,13 @@ module.exports = Source;
|
|
|
2855
2944
|
|
|
2856
2945
|
|
|
2857
2946
|
|
|
2858
|
-
const Source = __nccwpck_require__(
|
|
2859
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
2860
|
-
const streamChunksOfCombinedSourceMap = __nccwpck_require__(
|
|
2861
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
|
2947
|
+
const Source = __nccwpck_require__(290);
|
|
2948
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(847);
|
|
2949
|
+
const streamChunksOfCombinedSourceMap = __nccwpck_require__(808);
|
|
2950
|
+
const streamChunksOfSourceMap = __nccwpck_require__(637);
|
|
2862
2951
|
const {
|
|
2863
2952
|
isDualStringBufferCachingEnabled,
|
|
2864
|
-
} = __nccwpck_require__(
|
|
2953
|
+
} = __nccwpck_require__(345);
|
|
2865
2954
|
|
|
2866
2955
|
/** @typedef {import("./Source").ClearCacheOptions} ClearCacheOptions */
|
|
2867
2956
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
@@ -2895,12 +2984,10 @@ class SourceMapSource extends Source {
|
|
|
2895
2984
|
super();
|
|
2896
2985
|
const valueIsBuffer = Buffer.isBuffer(value);
|
|
2897
2986
|
/**
|
|
2898
|
-
* @private
|
|
2899
2987
|
* @type {undefined | string}
|
|
2900
2988
|
*/
|
|
2901
2989
|
this._valueAsString = valueIsBuffer ? undefined : value;
|
|
2902
2990
|
/**
|
|
2903
|
-
* @private
|
|
2904
2991
|
* @type {undefined | Buffer}
|
|
2905
2992
|
*/
|
|
2906
2993
|
this._valueAsBuffer = valueIsBuffer ? value : undefined;
|
|
@@ -2911,18 +2998,15 @@ class SourceMapSource extends Source {
|
|
|
2911
2998
|
const sourceMapIsBuffer = Buffer.isBuffer(sourceMap);
|
|
2912
2999
|
const sourceMapIsString = typeof sourceMap === "string";
|
|
2913
3000
|
/**
|
|
2914
|
-
* @private
|
|
2915
3001
|
* @type {undefined | RawSourceMap}
|
|
2916
3002
|
*/
|
|
2917
3003
|
this._sourceMapAsObject =
|
|
2918
3004
|
sourceMapIsBuffer || sourceMapIsString ? undefined : sourceMap;
|
|
2919
3005
|
/**
|
|
2920
|
-
* @private
|
|
2921
3006
|
* @type {undefined | string}
|
|
2922
3007
|
*/
|
|
2923
3008
|
this._sourceMapAsString = sourceMapIsString ? sourceMap : undefined;
|
|
2924
3009
|
/**
|
|
2925
|
-
* @private
|
|
2926
3010
|
* @type {undefined | Buffer}
|
|
2927
3011
|
*/
|
|
2928
3012
|
this._sourceMapAsBuffer = sourceMapIsBuffer ? sourceMap : undefined;
|
|
@@ -2940,7 +3024,6 @@ class SourceMapSource extends Source {
|
|
|
2940
3024
|
const innerSourceMapIsBuffer = Buffer.isBuffer(innerSourceMap);
|
|
2941
3025
|
const innerSourceMapIsString = typeof innerSourceMap === "string";
|
|
2942
3026
|
/**
|
|
2943
|
-
* @private
|
|
2944
3027
|
* @type {undefined | RawSourceMap}
|
|
2945
3028
|
*/
|
|
2946
3029
|
|
|
@@ -2949,14 +3032,12 @@ class SourceMapSource extends Source {
|
|
|
2949
3032
|
? undefined
|
|
2950
3033
|
: innerSourceMap || undefined;
|
|
2951
3034
|
/**
|
|
2952
|
-
* @private
|
|
2953
3035
|
* @type {undefined | string}
|
|
2954
3036
|
*/
|
|
2955
3037
|
this._innerSourceMapAsString = innerSourceMapIsString
|
|
2956
3038
|
? innerSourceMap
|
|
2957
3039
|
: undefined;
|
|
2958
3040
|
/**
|
|
2959
|
-
* @private
|
|
2960
3041
|
* @type {undefined | Buffer}
|
|
2961
3042
|
*/
|
|
2962
3043
|
this._innerSourceMapAsBuffer = innerSourceMapIsBuffer
|
|
@@ -3028,7 +3109,6 @@ class SourceMapSource extends Source {
|
|
|
3028
3109
|
}
|
|
3029
3110
|
|
|
3030
3111
|
/**
|
|
3031
|
-
* @private
|
|
3032
3112
|
* @returns {undefined | Buffer} buffer
|
|
3033
3113
|
*/
|
|
3034
3114
|
_originalSourceBuffer() {
|
|
@@ -3082,7 +3162,6 @@ class SourceMapSource extends Source {
|
|
|
3082
3162
|
}
|
|
3083
3163
|
|
|
3084
3164
|
/**
|
|
3085
|
-
* @private
|
|
3086
3165
|
* @returns {string} result
|
|
3087
3166
|
*/
|
|
3088
3167
|
_innerSourceMapString() {
|
|
@@ -3311,7 +3390,7 @@ module.exports = SourceMapSource;
|
|
|
3311
3390
|
|
|
3312
3391
|
/***/ }),
|
|
3313
3392
|
|
|
3314
|
-
/***/
|
|
3393
|
+
/***/ 818:
|
|
3315
3394
|
/***/ ((module) => {
|
|
3316
3395
|
|
|
3317
3396
|
/*
|
|
@@ -3796,7 +3875,7 @@ module.exports.createMappingsWriter = createMappingsWriter;
|
|
|
3796
3875
|
|
|
3797
3876
|
/***/ }),
|
|
3798
3877
|
|
|
3799
|
-
/***/
|
|
3878
|
+
/***/ 847:
|
|
3800
3879
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
3801
3880
|
|
|
3802
3881
|
/*
|
|
@@ -3806,7 +3885,7 @@ module.exports.createMappingsWriter = createMappingsWriter;
|
|
|
3806
3885
|
|
|
3807
3886
|
|
|
3808
3887
|
|
|
3809
|
-
const { createMappingsWriter } = __nccwpck_require__(
|
|
3888
|
+
const { createMappingsWriter } = __nccwpck_require__(818);
|
|
3810
3889
|
|
|
3811
3890
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
3812
3891
|
/** @typedef {import("../Source").SourceAndMap} SourceAndMap */
|
|
@@ -3815,6 +3894,20 @@ const { createMappingsWriter } = __nccwpck_require__(72);
|
|
|
3815
3894
|
|
|
3816
3895
|
/** @typedef {{ streamChunks: StreamChunksFunction }} SourceLikeWithStreamChunks */
|
|
3817
3896
|
|
|
3897
|
+
/** @type {typeof import("./scopes") | undefined} */
|
|
3898
|
+
let scopesHelpers;
|
|
3899
|
+
|
|
3900
|
+
/**
|
|
3901
|
+
* Loads the scopes helpers on first use. They are only reachable through the
|
|
3902
|
+
* `scopes` option, so requiring them eagerly would put the encoder in the
|
|
3903
|
+
* module graph of every caller that never asks for the field.
|
|
3904
|
+
* @returns {ReturnType<typeof import("./scopes").createScopesWriter>} writer
|
|
3905
|
+
*/
|
|
3906
|
+
const createScopesWriter = () => {
|
|
3907
|
+
if (scopesHelpers === undefined) scopesHelpers = __nccwpck_require__(928);
|
|
3908
|
+
return scopesHelpers.createScopesWriter();
|
|
3909
|
+
};
|
|
3910
|
+
|
|
3818
3911
|
/**
|
|
3819
3912
|
* Assign `value` at index `i` of `arr`, padding earlier slots with `null`.
|
|
3820
3913
|
* Hoisted helper so `getMap` and `getSourceAndMap` share one
|
|
@@ -3851,51 +3944,91 @@ module.exports.getMap = (source, options) => {
|
|
|
3851
3944
|
const potentialNames = [];
|
|
3852
3945
|
const mappingsWriter = createMappingsWriter(options);
|
|
3853
3946
|
const addMapping = mappingsWriter.add;
|
|
3854
|
-
|
|
3947
|
+
const scopesWriter =
|
|
3948
|
+
options && options.scopes ? createScopesWriter() : undefined;
|
|
3949
|
+
// Chosen once rather than tested per segment: this callback is the whole of
|
|
3950
|
+
// the mapping loop, so a branch in it is measurable on every map built.
|
|
3951
|
+
const generated = source.streamChunks(
|
|
3855
3952
|
{ ...options, source: false, finalSource: true },
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3953
|
+
scopesWriter === undefined
|
|
3954
|
+
? (
|
|
3955
|
+
chunk,
|
|
3956
|
+
generatedLine,
|
|
3957
|
+
generatedColumn,
|
|
3958
|
+
sourceIndex,
|
|
3959
|
+
originalLine,
|
|
3960
|
+
originalColumn,
|
|
3961
|
+
nameIndex,
|
|
3962
|
+
) => {
|
|
3963
|
+
addMapping(
|
|
3964
|
+
generatedLine,
|
|
3965
|
+
generatedColumn,
|
|
3966
|
+
sourceIndex,
|
|
3967
|
+
originalLine,
|
|
3968
|
+
originalColumn,
|
|
3969
|
+
nameIndex,
|
|
3970
|
+
);
|
|
3971
|
+
}
|
|
3972
|
+
: (
|
|
3973
|
+
chunk,
|
|
3974
|
+
generatedLine,
|
|
3975
|
+
generatedColumn,
|
|
3976
|
+
sourceIndex,
|
|
3977
|
+
originalLine,
|
|
3978
|
+
originalColumn,
|
|
3979
|
+
nameIndex,
|
|
3980
|
+
) => {
|
|
3981
|
+
addMapping(
|
|
3982
|
+
generatedLine,
|
|
3983
|
+
generatedColumn,
|
|
3984
|
+
sourceIndex,
|
|
3985
|
+
originalLine,
|
|
3986
|
+
originalColumn,
|
|
3987
|
+
nameIndex,
|
|
3988
|
+
);
|
|
3989
|
+
scopesWriter.add(
|
|
3990
|
+
generatedLine,
|
|
3991
|
+
generatedColumn,
|
|
3992
|
+
sourceIndex,
|
|
3993
|
+
originalLine,
|
|
3994
|
+
);
|
|
3995
|
+
},
|
|
3996
|
+
(sourceIndex, source, sourceContent, scopeBindings) => {
|
|
3875
3997
|
setAtIndex(potentialSources, sourceIndex, source);
|
|
3876
3998
|
if (sourceContent !== undefined) {
|
|
3877
3999
|
setAtIndex(potentialSourcesContent, sourceIndex, sourceContent);
|
|
3878
4000
|
}
|
|
4001
|
+
if (scopesWriter !== undefined) {
|
|
4002
|
+
scopesWriter.addSource(sourceIndex, scopeBindings);
|
|
4003
|
+
}
|
|
3879
4004
|
},
|
|
3880
4005
|
(nameIndex, name) => {
|
|
3881
4006
|
setAtIndex(potentialNames, nameIndex, name);
|
|
3882
4007
|
},
|
|
3883
4008
|
);
|
|
3884
4009
|
const mappings = mappingsWriter.finish();
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
4010
|
+
if (mappings.length === 0) return null;
|
|
4011
|
+
/** @type {RawSourceMap} */
|
|
4012
|
+
const map = {
|
|
4013
|
+
version: 3,
|
|
4014
|
+
file: "x",
|
|
4015
|
+
mappings,
|
|
4016
|
+
// We handle broken sources as `null`, in spec this field should be string, but no information what we should do in such cases if we change type it will be breaking change
|
|
4017
|
+
sources: /** @type {string[]} */ (potentialSources),
|
|
4018
|
+
sourcesContent:
|
|
4019
|
+
potentialSourcesContent.length > 0
|
|
4020
|
+
? /** @type {string[]} */ (potentialSourcesContent)
|
|
4021
|
+
: undefined,
|
|
4022
|
+
names: /** @type {string[]} */ (potentialNames),
|
|
4023
|
+
};
|
|
4024
|
+
if (scopesWriter !== undefined) {
|
|
4025
|
+
scopesWriter.finish(
|
|
4026
|
+
map,
|
|
4027
|
+
generated.generatedLine,
|
|
4028
|
+
generated.generatedColumn,
|
|
4029
|
+
);
|
|
4030
|
+
}
|
|
4031
|
+
return map;
|
|
3899
4032
|
};
|
|
3900
4033
|
|
|
3901
4034
|
/**
|
|
@@ -3913,7 +4046,9 @@ module.exports.getSourceAndMap = (inputSource, options) => {
|
|
|
3913
4046
|
const potentialNames = [];
|
|
3914
4047
|
const mappingsWriter = createMappingsWriter(options);
|
|
3915
4048
|
const addMapping = mappingsWriter.add;
|
|
3916
|
-
const
|
|
4049
|
+
const scopesWriter =
|
|
4050
|
+
options && options.scopes ? createScopesWriter() : undefined;
|
|
4051
|
+
const generated = inputSource.streamChunks(
|
|
3917
4052
|
// `source: true` overrides any `source: false` a caller forwarded
|
|
3918
4053
|
// (e.g. the streamChunks fallback passing getMap options through
|
|
3919
4054
|
// sourceAndMap) — this helper always consumes the source.
|
|
@@ -3936,8 +4071,19 @@ module.exports.getSourceAndMap = (inputSource, options) => {
|
|
|
3936
4071
|
originalColumn,
|
|
3937
4072
|
nameIndex,
|
|
3938
4073
|
);
|
|
4074
|
+
if (scopesWriter !== undefined) {
|
|
4075
|
+
scopesWriter.add(
|
|
4076
|
+
generatedLine,
|
|
4077
|
+
generatedColumn,
|
|
4078
|
+
sourceIndex,
|
|
4079
|
+
originalLine,
|
|
4080
|
+
);
|
|
4081
|
+
}
|
|
3939
4082
|
},
|
|
3940
|
-
(sourceIndex, source, sourceContent) => {
|
|
4083
|
+
(sourceIndex, source, sourceContent, scopeBindings) => {
|
|
4084
|
+
if (scopesWriter !== undefined) {
|
|
4085
|
+
scopesWriter.addSource(sourceIndex, scopeBindings);
|
|
4086
|
+
}
|
|
3941
4087
|
while (potentialSources.length < sourceIndex) {
|
|
3942
4088
|
potentialSources.push(null);
|
|
3943
4089
|
}
|
|
@@ -3957,30 +4103,37 @@ module.exports.getSourceAndMap = (inputSource, options) => {
|
|
|
3957
4103
|
},
|
|
3958
4104
|
);
|
|
3959
4105
|
const mappings = mappingsWriter.finish();
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
4106
|
+
const { source } = generated;
|
|
4107
|
+
/** @type {RawSourceMap | null} */
|
|
4108
|
+
let map = null;
|
|
4109
|
+
if (mappings.length > 0) {
|
|
4110
|
+
map = {
|
|
4111
|
+
version: 3,
|
|
4112
|
+
file: "x",
|
|
4113
|
+
mappings,
|
|
4114
|
+
// We handle broken sources as `null`, in spec this field should be string, but no information what we should do in such cases if we change type it will be breaking change
|
|
4115
|
+
sources: /** @type {string[]} */ (potentialSources),
|
|
4116
|
+
sourcesContent:
|
|
4117
|
+
potentialSourcesContent.length > 0
|
|
4118
|
+
? /** @type {string[]} */ (potentialSourcesContent)
|
|
4119
|
+
: undefined,
|
|
4120
|
+
names: /** @type {string[]} */ (potentialNames),
|
|
4121
|
+
};
|
|
4122
|
+
if (scopesWriter !== undefined) {
|
|
4123
|
+
scopesWriter.finish(
|
|
4124
|
+
map,
|
|
4125
|
+
generated.generatedLine,
|
|
4126
|
+
generated.generatedColumn,
|
|
4127
|
+
);
|
|
4128
|
+
}
|
|
4129
|
+
}
|
|
4130
|
+
return { source: source !== undefined ? source : code, map };
|
|
3978
4131
|
};
|
|
3979
4132
|
|
|
3980
4133
|
|
|
3981
4134
|
/***/ }),
|
|
3982
4135
|
|
|
3983
|
-
/***/
|
|
4136
|
+
/***/ 769:
|
|
3984
4137
|
/***/ ((module) => {
|
|
3985
4138
|
|
|
3986
4139
|
/*
|
|
@@ -4034,7 +4187,7 @@ module.exports = getGeneratedSourceInfo;
|
|
|
4034
4187
|
|
|
4035
4188
|
/***/ }),
|
|
4036
4189
|
|
|
4037
|
-
/***/
|
|
4190
|
+
/***/ 292:
|
|
4038
4191
|
/***/ ((module) => {
|
|
4039
4192
|
|
|
4040
4193
|
/*
|
|
@@ -4065,7 +4218,7 @@ module.exports = getSource;
|
|
|
4065
4218
|
|
|
4066
4219
|
/***/ }),
|
|
4067
4220
|
|
|
4068
|
-
/***/
|
|
4221
|
+
/***/ 674:
|
|
4069
4222
|
/***/ ((module) => {
|
|
4070
4223
|
|
|
4071
4224
|
/*
|
|
@@ -4195,7 +4348,452 @@ module.exports = readMappings;
|
|
|
4195
4348
|
|
|
4196
4349
|
/***/ }),
|
|
4197
4350
|
|
|
4198
|
-
/***/
|
|
4351
|
+
/***/ 928:
|
|
4352
|
+
/***/ ((module) => {
|
|
4353
|
+
|
|
4354
|
+
/*
|
|
4355
|
+
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
4356
|
+
Author Alexander Akait @alexander-akait
|
|
4357
|
+
*/
|
|
4358
|
+
|
|
4359
|
+
|
|
4360
|
+
|
|
4361
|
+
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
4362
|
+
/** @typedef {import("./streamChunks").ScopeBindings} ScopeBindings */
|
|
4363
|
+
|
|
4364
|
+
/**
|
|
4365
|
+
* A generated or original position, both counted from zero.
|
|
4366
|
+
* @typedef {object} ScopePosition
|
|
4367
|
+
* @property {number} line line
|
|
4368
|
+
* @property {number} column column
|
|
4369
|
+
*/
|
|
4370
|
+
|
|
4371
|
+
/**
|
|
4372
|
+
* One source's scope, and the span of generated code it explains.
|
|
4373
|
+
* @typedef {object} SourceScope
|
|
4374
|
+
* @property {number} sourceIndex index into the map's `sources`
|
|
4375
|
+
* @property {string[]} variables the names the source declares
|
|
4376
|
+
* @property {string[]} values the generated expression each name evaluates to
|
|
4377
|
+
* @property {ScopePosition} originalEnd end of the original scope, exclusive
|
|
4378
|
+
* @property {ScopePosition[]} rangeStarts start of each generated range, inclusive
|
|
4379
|
+
* @property {ScopePosition[]} rangeEnds end of each generated range, exclusive
|
|
4380
|
+
*/
|
|
4381
|
+
|
|
4382
|
+
const BASE64_CHARS =
|
|
4383
|
+
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
4384
|
+
|
|
4385
|
+
const BASE64_VALUES = new Int8Array(128).fill(-1);
|
|
4386
|
+
for (let index = 0; index < BASE64_CHARS.length; index++) {
|
|
4387
|
+
BASE64_VALUES[BASE64_CHARS.charCodeAt(index)] = index;
|
|
4388
|
+
}
|
|
4389
|
+
|
|
4390
|
+
const VLQ_BASE_SHIFT = 5;
|
|
4391
|
+
const VLQ_BASE_MASK = (1 << VLQ_BASE_SHIFT) - 1;
|
|
4392
|
+
const VLQ_CONTINUATION_BIT = 1 << VLQ_BASE_SHIFT;
|
|
4393
|
+
|
|
4394
|
+
// Item tags of the "Scopes" proposal, base64 digits of their numeric values.
|
|
4395
|
+
const TAG_EMPTY = "A";
|
|
4396
|
+
const TAG_ORIGINAL_SCOPE_START = "B";
|
|
4397
|
+
const TAG_ORIGINAL_SCOPE_END = "C";
|
|
4398
|
+
const TAG_ORIGINAL_SCOPE_VARIABLES = "D";
|
|
4399
|
+
const TAG_GENERATED_RANGE_START = "E";
|
|
4400
|
+
const TAG_GENERATED_RANGE_END = "F";
|
|
4401
|
+
const TAG_GENERATED_RANGE_BINDINGS = "G";
|
|
4402
|
+
|
|
4403
|
+
const ORIGINAL_SCOPE_FLAG_HAS_KIND = 0x2;
|
|
4404
|
+
const GENERATED_RANGE_FLAG_HAS_LINE = 0x1;
|
|
4405
|
+
const GENERATED_RANGE_FLAG_HAS_DEFINITION = 0x2;
|
|
4406
|
+
|
|
4407
|
+
/**
|
|
4408
|
+
* Every scope webpack emits describes one module, which the proposal's
|
|
4409
|
+
* JavaScript vocabulary calls a module scope.
|
|
4410
|
+
*/
|
|
4411
|
+
const MODULE_SCOPE_KIND = "Module";
|
|
4412
|
+
|
|
4413
|
+
/**
|
|
4414
|
+
* @param {number} value non-negative value
|
|
4415
|
+
* @returns {string} base64 VLQ digits
|
|
4416
|
+
*/
|
|
4417
|
+
const encodeUnsigned = (value) => {
|
|
4418
|
+
let result = "";
|
|
4419
|
+
let rest = value;
|
|
4420
|
+
for (;;) {
|
|
4421
|
+
const digit = rest & VLQ_BASE_MASK;
|
|
4422
|
+
rest >>>= VLQ_BASE_SHIFT;
|
|
4423
|
+
if (rest === 0) return result + BASE64_CHARS[digit];
|
|
4424
|
+
result += BASE64_CHARS[VLQ_CONTINUATION_BIT + digit];
|
|
4425
|
+
}
|
|
4426
|
+
};
|
|
4427
|
+
|
|
4428
|
+
/**
|
|
4429
|
+
* @param {number} value value of either sign
|
|
4430
|
+
* @returns {string} base64 VLQ digits
|
|
4431
|
+
*/
|
|
4432
|
+
const encodeSigned = (value) =>
|
|
4433
|
+
encodeUnsigned(value >= 0 ? 2 * value : 1 - 2 * value);
|
|
4434
|
+
|
|
4435
|
+
/**
|
|
4436
|
+
* Walks the map's segments in generated order, reporting each one's source and
|
|
4437
|
+
* original line. A segment with no source position reports `sourceIndex` -1,
|
|
4438
|
+
* which ends whatever run precedes it.
|
|
4439
|
+
* @param {string} mappings the map's `mappings` field
|
|
4440
|
+
* @param {(generatedLine: number, generatedColumn: number, sourceIndex: number, originalLine: number) => void} onSegment called per segment
|
|
4441
|
+
* @returns {number} the last generated line the mappings reach
|
|
4442
|
+
*/
|
|
4443
|
+
const forEachMapping = (mappings, onSegment) => {
|
|
4444
|
+
let generatedLine = 0;
|
|
4445
|
+
let generatedColumn = 0;
|
|
4446
|
+
let sourceIndex = 0;
|
|
4447
|
+
let originalLine = 0;
|
|
4448
|
+
let position = 0;
|
|
4449
|
+
const { length } = mappings;
|
|
4450
|
+
/** @type {number[]} */
|
|
4451
|
+
const fields = [];
|
|
4452
|
+
while (position < length) {
|
|
4453
|
+
const char = mappings.charCodeAt(position);
|
|
4454
|
+
if (char === 59 /* ; */) {
|
|
4455
|
+
generatedLine++;
|
|
4456
|
+
generatedColumn = 0;
|
|
4457
|
+
position++;
|
|
4458
|
+
continue;
|
|
4459
|
+
}
|
|
4460
|
+
if (char === 44 /* , */) {
|
|
4461
|
+
position++;
|
|
4462
|
+
continue;
|
|
4463
|
+
}
|
|
4464
|
+
fields.length = 0;
|
|
4465
|
+
while (position < length) {
|
|
4466
|
+
const next = mappings.charCodeAt(position);
|
|
4467
|
+
if (next === 59 || next === 44) break;
|
|
4468
|
+
let value = 0;
|
|
4469
|
+
let shift = 0;
|
|
4470
|
+
let digit;
|
|
4471
|
+
do {
|
|
4472
|
+
digit = BASE64_VALUES[mappings.charCodeAt(position++)];
|
|
4473
|
+
// A digit outside the alphabet cannot be recovered from, and
|
|
4474
|
+
// pretending otherwise would misplace every later segment.
|
|
4475
|
+
if (digit < 0) return generatedLine;
|
|
4476
|
+
value += (digit & VLQ_BASE_MASK) << shift;
|
|
4477
|
+
shift += VLQ_BASE_SHIFT;
|
|
4478
|
+
} while (digit & VLQ_CONTINUATION_BIT);
|
|
4479
|
+
fields.push(value & 1 ? -(value >>> 1) : value >>> 1);
|
|
4480
|
+
}
|
|
4481
|
+
if (fields.length === 0) continue;
|
|
4482
|
+
generatedColumn += fields[0];
|
|
4483
|
+
if (fields.length >= 4) {
|
|
4484
|
+
sourceIndex += fields[1];
|
|
4485
|
+
originalLine += fields[2];
|
|
4486
|
+
onSegment(generatedLine, generatedColumn, sourceIndex, originalLine);
|
|
4487
|
+
} else {
|
|
4488
|
+
onSegment(generatedLine, generatedColumn, -1, -1);
|
|
4489
|
+
}
|
|
4490
|
+
}
|
|
4491
|
+
return generatedLine;
|
|
4492
|
+
};
|
|
4493
|
+
|
|
4494
|
+
/**
|
|
4495
|
+
* Collects, segment by segment, the generated runs each source explains and how
|
|
4496
|
+
* far into it the map reaches. Both lines are counted from zero, so a caller
|
|
4497
|
+
* whose lines start at one subtracts before feeding a segment in.
|
|
4498
|
+
* @param {number=} sourceCount number of entries in the map's `sources`, when known
|
|
4499
|
+
* @returns {{ add: (generatedLine: number, generatedColumn: number, sourceIndex: number, originalLine: number) => void, finish: (lastLine: number, lastColumn?: number) => SourceScope[] }} collector
|
|
4500
|
+
*/
|
|
4501
|
+
const createScopeCollector = (sourceCount) => {
|
|
4502
|
+
/** @type {Map<number, SourceScope>} */
|
|
4503
|
+
const scopes = new Map();
|
|
4504
|
+
let openSource = -1;
|
|
4505
|
+
/** @type {SourceScope | undefined} */
|
|
4506
|
+
let openScope;
|
|
4507
|
+
/**
|
|
4508
|
+
* @param {number} line generated line the run ends at
|
|
4509
|
+
* @param {number} column generated column the run ends at
|
|
4510
|
+
* @returns {void}
|
|
4511
|
+
*/
|
|
4512
|
+
const closeRun = (line, column) => {
|
|
4513
|
+
if (openScope === undefined) return;
|
|
4514
|
+
openScope.rangeEnds.push({ line, column });
|
|
4515
|
+
openScope = undefined;
|
|
4516
|
+
openSource = -1;
|
|
4517
|
+
};
|
|
4518
|
+
return {
|
|
4519
|
+
add(generatedLine, generatedColumn, sourceIndex, originalLine) {
|
|
4520
|
+
// A segment naming no source reports -1, which is also what no open
|
|
4521
|
+
// run reports, so the run has to be there before it is extended.
|
|
4522
|
+
if (openScope !== undefined && sourceIndex === openSource) {
|
|
4523
|
+
openScope.originalEnd.line = Math.max(
|
|
4524
|
+
openScope.originalEnd.line,
|
|
4525
|
+
originalLine + 1,
|
|
4526
|
+
);
|
|
4527
|
+
return;
|
|
4528
|
+
}
|
|
4529
|
+
closeRun(generatedLine, generatedColumn);
|
|
4530
|
+
if (
|
|
4531
|
+
sourceIndex < 0 ||
|
|
4532
|
+
(sourceCount !== undefined && sourceIndex >= sourceCount)
|
|
4533
|
+
) {
|
|
4534
|
+
return;
|
|
4535
|
+
}
|
|
4536
|
+
let scope = scopes.get(sourceIndex);
|
|
4537
|
+
if (scope === undefined) {
|
|
4538
|
+
scope = {
|
|
4539
|
+
sourceIndex,
|
|
4540
|
+
variables: [],
|
|
4541
|
+
values: [],
|
|
4542
|
+
originalEnd: { line: originalLine + 1, column: 0 },
|
|
4543
|
+
rangeStarts: [],
|
|
4544
|
+
rangeEnds: [],
|
|
4545
|
+
};
|
|
4546
|
+
scopes.set(sourceIndex, scope);
|
|
4547
|
+
} else {
|
|
4548
|
+
scope.originalEnd.line = Math.max(
|
|
4549
|
+
scope.originalEnd.line,
|
|
4550
|
+
originalLine + 1,
|
|
4551
|
+
);
|
|
4552
|
+
}
|
|
4553
|
+
scope.rangeStarts.push({ line: generatedLine, column: generatedColumn });
|
|
4554
|
+
openScope = scope;
|
|
4555
|
+
openSource = sourceIndex;
|
|
4556
|
+
},
|
|
4557
|
+
finish(lastLine, lastColumn = 0) {
|
|
4558
|
+
closeRun(lastLine, lastColumn);
|
|
4559
|
+
return [...scopes.values()].sort((a, b) => a.sourceIndex - b.sourceIndex);
|
|
4560
|
+
},
|
|
4561
|
+
};
|
|
4562
|
+
};
|
|
4563
|
+
|
|
4564
|
+
/**
|
|
4565
|
+
* Groups a finished map's segments into one entry per source. Prefer the
|
|
4566
|
+
* collector when the segments are still being written, which saves decoding
|
|
4567
|
+
* back what was just encoded.
|
|
4568
|
+
* @param {string} mappings the map's `mappings` field
|
|
4569
|
+
* @param {number} sourceCount number of entries in the map's `sources`
|
|
4570
|
+
* @returns {SourceScope[]} one entry per source that the mappings reach, in source order
|
|
4571
|
+
*/
|
|
4572
|
+
const collectSourceScopes = (mappings, sourceCount) => {
|
|
4573
|
+
const collector = createScopeCollector(sourceCount);
|
|
4574
|
+
const lastLine = forEachMapping(mappings, collector.add);
|
|
4575
|
+
return collector.finish(lastLine + 1);
|
|
4576
|
+
};
|
|
4577
|
+
|
|
4578
|
+
/**
|
|
4579
|
+
* Encodes the scope tree into the `scopes` field of the proposal, appending any
|
|
4580
|
+
* name it needs to the map's `names`.
|
|
4581
|
+
* @param {SourceScope[]} scopes the scopes to encode, in source order
|
|
4582
|
+
* @param {number} sourceCount number of entries in the map's `sources`
|
|
4583
|
+
* @param {string[]} names the map's `names`, extended in place
|
|
4584
|
+
* @returns {string} the encoded `scopes` field
|
|
4585
|
+
*/
|
|
4586
|
+
const encodeScopes = (scopes, sourceCount, names) => {
|
|
4587
|
+
/** @type {Map<string, number>} */
|
|
4588
|
+
const nameToIndex = new Map();
|
|
4589
|
+
for (let index = 0; index < names.length; index++) {
|
|
4590
|
+
if (!nameToIndex.has(names[index])) nameToIndex.set(names[index], index);
|
|
4591
|
+
}
|
|
4592
|
+
/**
|
|
4593
|
+
* @param {string} name the name to resolve
|
|
4594
|
+
* @returns {number} its index in `names`
|
|
4595
|
+
*/
|
|
4596
|
+
const nameIndex = (name) => {
|
|
4597
|
+
const existing = nameToIndex.get(name);
|
|
4598
|
+
if (existing !== undefined) return existing;
|
|
4599
|
+
const added = names.length;
|
|
4600
|
+
names.push(name);
|
|
4601
|
+
nameToIndex.set(name, added);
|
|
4602
|
+
return added;
|
|
4603
|
+
};
|
|
4604
|
+
|
|
4605
|
+
/** @type {Map<number, SourceScope>} */
|
|
4606
|
+
const scopeBySource = new Map();
|
|
4607
|
+
for (const scope of scopes) scopeBySource.set(scope.sourceIndex, scope);
|
|
4608
|
+
|
|
4609
|
+
/** @type {string[]} */
|
|
4610
|
+
const items = [];
|
|
4611
|
+
// The three running indices the proposal encodes names and definitions
|
|
4612
|
+
// against. Only the position pair restarts per source.
|
|
4613
|
+
let lastKind = 0;
|
|
4614
|
+
let lastVariable = 0;
|
|
4615
|
+
let lastDefinition = 0;
|
|
4616
|
+
let scopeCount = 0;
|
|
4617
|
+
/** @type {Map<number, number>} */
|
|
4618
|
+
const scopeIndexBySource = new Map();
|
|
4619
|
+
|
|
4620
|
+
for (let sourceIndex = 0; sourceIndex < sourceCount; sourceIndex++) {
|
|
4621
|
+
const scope = scopeBySource.get(sourceIndex);
|
|
4622
|
+
if (scope === undefined || scope.variables.length === 0) {
|
|
4623
|
+
items.push(TAG_EMPTY);
|
|
4624
|
+
continue;
|
|
4625
|
+
}
|
|
4626
|
+
const kind = nameIndex(MODULE_SCOPE_KIND);
|
|
4627
|
+
items.push(
|
|
4628
|
+
TAG_ORIGINAL_SCOPE_START +
|
|
4629
|
+
encodeUnsigned(ORIGINAL_SCOPE_FLAG_HAS_KIND) +
|
|
4630
|
+
encodeUnsigned(0) +
|
|
4631
|
+
encodeUnsigned(0) +
|
|
4632
|
+
encodeSigned(kind - lastKind),
|
|
4633
|
+
);
|
|
4634
|
+
lastKind = kind;
|
|
4635
|
+
let variables = TAG_ORIGINAL_SCOPE_VARIABLES;
|
|
4636
|
+
for (const variable of scope.variables) {
|
|
4637
|
+
const index = nameIndex(variable);
|
|
4638
|
+
variables += encodeSigned(index - lastVariable);
|
|
4639
|
+
lastVariable = index;
|
|
4640
|
+
}
|
|
4641
|
+
items.push(variables);
|
|
4642
|
+
items.push(
|
|
4643
|
+
TAG_ORIGINAL_SCOPE_END +
|
|
4644
|
+
encodeUnsigned(scope.originalEnd.line) +
|
|
4645
|
+
encodeUnsigned(scope.originalEnd.column),
|
|
4646
|
+
);
|
|
4647
|
+
scopeIndexBySource.set(sourceIndex, scopeCount++);
|
|
4648
|
+
}
|
|
4649
|
+
|
|
4650
|
+
/** @type {{ start: ScopePosition, end: ScopePosition, scope: SourceScope }[]} */
|
|
4651
|
+
const ranges = [];
|
|
4652
|
+
for (const scope of scopes) {
|
|
4653
|
+
if (!scopeIndexBySource.has(scope.sourceIndex)) continue;
|
|
4654
|
+
for (let index = 0; index < scope.rangeStarts.length; index++) {
|
|
4655
|
+
ranges.push({
|
|
4656
|
+
start: scope.rangeStarts[index],
|
|
4657
|
+
end: scope.rangeEnds[index],
|
|
4658
|
+
scope,
|
|
4659
|
+
});
|
|
4660
|
+
}
|
|
4661
|
+
}
|
|
4662
|
+
ranges.sort(
|
|
4663
|
+
(a, b) => a.start.line - b.start.line || a.start.column - b.start.column,
|
|
4664
|
+
);
|
|
4665
|
+
|
|
4666
|
+
let lastLine = 0;
|
|
4667
|
+
let lastColumn = 0;
|
|
4668
|
+
/**
|
|
4669
|
+
* Encodes a position against the running one, reporting whether it needed a
|
|
4670
|
+
* line of its own. A line is only carried when it moved forward, and then
|
|
4671
|
+
* the column is absolute rather than relative.
|
|
4672
|
+
* @param {ScopePosition} position the position to encode
|
|
4673
|
+
* @returns {[boolean, string]} whether a line is carried, and the digits
|
|
4674
|
+
*/
|
|
4675
|
+
const encodePosition = (position) => {
|
|
4676
|
+
const line = position.line - lastLine;
|
|
4677
|
+
const carriesLine = line > 0;
|
|
4678
|
+
const column = carriesLine ? position.column : position.column - lastColumn;
|
|
4679
|
+
lastLine = position.line;
|
|
4680
|
+
lastColumn = position.column;
|
|
4681
|
+
return [
|
|
4682
|
+
carriesLine,
|
|
4683
|
+
(carriesLine ? encodeUnsigned(line) : "") + encodeUnsigned(column),
|
|
4684
|
+
];
|
|
4685
|
+
};
|
|
4686
|
+
|
|
4687
|
+
for (const { start, end, scope } of ranges) {
|
|
4688
|
+
const definition =
|
|
4689
|
+
/** @type {number} */
|
|
4690
|
+
(scopeIndexBySource.get(scope.sourceIndex));
|
|
4691
|
+
const [startCarriesLine, startDigits] = encodePosition(start);
|
|
4692
|
+
items.push(
|
|
4693
|
+
TAG_GENERATED_RANGE_START +
|
|
4694
|
+
encodeUnsigned(
|
|
4695
|
+
GENERATED_RANGE_FLAG_HAS_DEFINITION |
|
|
4696
|
+
(startCarriesLine ? GENERATED_RANGE_FLAG_HAS_LINE : 0),
|
|
4697
|
+
) +
|
|
4698
|
+
startDigits +
|
|
4699
|
+
encodeSigned(definition - lastDefinition),
|
|
4700
|
+
);
|
|
4701
|
+
lastDefinition = definition;
|
|
4702
|
+
let bindings = TAG_GENERATED_RANGE_BINDINGS;
|
|
4703
|
+
for (const value of scope.values) {
|
|
4704
|
+
bindings += encodeUnsigned(value === "" ? 0 : nameIndex(value) + 1);
|
|
4705
|
+
}
|
|
4706
|
+
items.push(bindings);
|
|
4707
|
+
// An end item carries no flags: one digit is a column, two a line and a
|
|
4708
|
+
// column, which is what tells the reader whether the line moved.
|
|
4709
|
+
items.push(TAG_GENERATED_RANGE_END + encodePosition(end)[1]);
|
|
4710
|
+
}
|
|
4711
|
+
return items.join(",");
|
|
4712
|
+
};
|
|
4713
|
+
|
|
4714
|
+
/**
|
|
4715
|
+
* Adds the `scopes` field of the "Scopes" proposal to a source map, naming for
|
|
4716
|
+
* each source the bindings a debugger cannot resolve on its own and the
|
|
4717
|
+
* generated expression each one evaluates to. Does nothing when no source
|
|
4718
|
+
* contributes a binding.
|
|
4719
|
+
* @param {RawSourceMap} sourceMap the map to extend in place
|
|
4720
|
+
* @param {(sourceIndex: number) => Map<string, string> | undefined} getBindings binding expressions per source
|
|
4721
|
+
* @returns {void}
|
|
4722
|
+
*/
|
|
4723
|
+
const addScopesToSourceMap = (sourceMap, getBindings) => {
|
|
4724
|
+
if (!sourceMap.mappings || !sourceMap.sources) return;
|
|
4725
|
+
const sourceCount = sourceMap.sources.length;
|
|
4726
|
+
const scopes = collectSourceScopes(sourceMap.mappings, sourceCount);
|
|
4727
|
+
let any = false;
|
|
4728
|
+
for (const scope of scopes) {
|
|
4729
|
+
const bindings = getBindings(scope.sourceIndex);
|
|
4730
|
+
if (bindings === undefined || bindings.size === 0) continue;
|
|
4731
|
+
for (const [name, value] of bindings) {
|
|
4732
|
+
scope.variables.push(name);
|
|
4733
|
+
scope.values.push(value);
|
|
4734
|
+
}
|
|
4735
|
+
any = true;
|
|
4736
|
+
}
|
|
4737
|
+
if (!any) return;
|
|
4738
|
+
const names = sourceMap.names || (sourceMap.names = []);
|
|
4739
|
+
sourceMap.scopes = encodeScopes(scopes, sourceCount, names);
|
|
4740
|
+
};
|
|
4741
|
+
|
|
4742
|
+
/**
|
|
4743
|
+
* Builds the `scopes` field while a map is being written, so the segments are
|
|
4744
|
+
* read as they are produced rather than decoded back out of `mappings`. Lines
|
|
4745
|
+
* are the one-based ones the chunk stream reports; `finish` takes the position
|
|
4746
|
+
* the generated code ends at, where the last range closes.
|
|
4747
|
+
* @returns {{ add: (generatedLine: number, generatedColumn: number, sourceIndex: number, originalLine: number) => void, addSource: (sourceIndex: number, scopeBindings?: ScopeBindings) => void, finish: (map: RawSourceMap, generatedLine: number, generatedColumn?: number) => void }} writer
|
|
4748
|
+
*/
|
|
4749
|
+
const createScopesWriter = () => {
|
|
4750
|
+
const collector = createScopeCollector();
|
|
4751
|
+
/** @type {Map<number, ScopeBindings>} */
|
|
4752
|
+
const bindingsBySource = new Map();
|
|
4753
|
+
return {
|
|
4754
|
+
add(generatedLine, generatedColumn, sourceIndex, originalLine) {
|
|
4755
|
+
collector.add(
|
|
4756
|
+
generatedLine - 1,
|
|
4757
|
+
generatedColumn,
|
|
4758
|
+
sourceIndex,
|
|
4759
|
+
originalLine - 1,
|
|
4760
|
+
);
|
|
4761
|
+
},
|
|
4762
|
+
addSource(sourceIndex, scopeBindings) {
|
|
4763
|
+
if (scopeBindings !== undefined && scopeBindings.size > 0) {
|
|
4764
|
+
bindingsBySource.set(sourceIndex, scopeBindings);
|
|
4765
|
+
}
|
|
4766
|
+
},
|
|
4767
|
+
finish(map, generatedLine, generatedColumn = 0) {
|
|
4768
|
+
if (bindingsBySource.size === 0) return;
|
|
4769
|
+
const scopes = collector.finish(generatedLine - 1, generatedColumn);
|
|
4770
|
+
let any = false;
|
|
4771
|
+
for (const scope of scopes) {
|
|
4772
|
+
const bindings = bindingsBySource.get(scope.sourceIndex);
|
|
4773
|
+
if (bindings === undefined) continue;
|
|
4774
|
+
for (const [name, value] of bindings) {
|
|
4775
|
+
scope.variables.push(name);
|
|
4776
|
+
scope.values.push(value);
|
|
4777
|
+
}
|
|
4778
|
+
any = true;
|
|
4779
|
+
}
|
|
4780
|
+
if (!any) return;
|
|
4781
|
+
const names = map.names || (map.names = []);
|
|
4782
|
+
map.scopes = encodeScopes(scopes, map.sources.length, names);
|
|
4783
|
+
},
|
|
4784
|
+
};
|
|
4785
|
+
};
|
|
4786
|
+
|
|
4787
|
+
module.exports.addScopesToSourceMap = addScopesToSourceMap;
|
|
4788
|
+
module.exports.collectSourceScopes = collectSourceScopes;
|
|
4789
|
+
module.exports.createScopeCollector = createScopeCollector;
|
|
4790
|
+
module.exports.createScopesWriter = createScopesWriter;
|
|
4791
|
+
module.exports.encodeScopes = encodeScopes;
|
|
4792
|
+
|
|
4793
|
+
|
|
4794
|
+
/***/ }),
|
|
4795
|
+
|
|
4796
|
+
/***/ 416:
|
|
4199
4797
|
/***/ ((module) => {
|
|
4200
4798
|
|
|
4201
4799
|
/*
|
|
@@ -4236,7 +4834,7 @@ module.exports = splitIntoLines;
|
|
|
4236
4834
|
|
|
4237
4835
|
/***/ }),
|
|
4238
4836
|
|
|
4239
|
-
/***/
|
|
4837
|
+
/***/ 919:
|
|
4240
4838
|
/***/ ((module) => {
|
|
4241
4839
|
|
|
4242
4840
|
/*
|
|
@@ -4369,7 +4967,7 @@ module.exports.eachPotentialToken = eachPotentialToken;
|
|
|
4369
4967
|
|
|
4370
4968
|
/***/ }),
|
|
4371
4969
|
|
|
4372
|
-
/***/
|
|
4970
|
+
/***/ 658:
|
|
4373
4971
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4374
4972
|
|
|
4375
4973
|
/*
|
|
@@ -4379,8 +4977,8 @@ module.exports.eachPotentialToken = eachPotentialToken;
|
|
|
4379
4977
|
|
|
4380
4978
|
|
|
4381
4979
|
|
|
4382
|
-
const { createMappingsWriter } = __nccwpck_require__(
|
|
4383
|
-
const streamChunks = __nccwpck_require__(
|
|
4980
|
+
const { createMappingsWriter } = __nccwpck_require__(818);
|
|
4981
|
+
const streamChunks = __nccwpck_require__(487);
|
|
4384
4982
|
|
|
4385
4983
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
4386
4984
|
/** @typedef {import("./streamChunks").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
@@ -4390,6 +4988,20 @@ const streamChunks = __nccwpck_require__(169);
|
|
|
4390
4988
|
/** @typedef {import("./streamChunks").Options} Options */
|
|
4391
4989
|
/** @typedef {import("./streamChunks").SourceMaybeWithStreamChunksFunction} SourceMaybeWithStreamChunksFunction */
|
|
4392
4990
|
|
|
4991
|
+
/** @type {typeof import("./scopes") | undefined} */
|
|
4992
|
+
let scopesHelpers;
|
|
4993
|
+
|
|
4994
|
+
/**
|
|
4995
|
+
* Loads the scopes helpers on first use. They are only reachable through the
|
|
4996
|
+
* `scopes` option, so requiring them eagerly would put the encoder in the
|
|
4997
|
+
* module graph of every caller that never asks for the field.
|
|
4998
|
+
* @returns {ReturnType<typeof import("./scopes").createScopesWriter>} writer
|
|
4999
|
+
*/
|
|
5000
|
+
const createScopesWriter = () => {
|
|
5001
|
+
if (scopesHelpers === undefined) scopesHelpers = __nccwpck_require__(928);
|
|
5002
|
+
return scopesHelpers.createScopesWriter();
|
|
5003
|
+
};
|
|
5004
|
+
|
|
4393
5005
|
/**
|
|
4394
5006
|
* @param {SourceMaybeWithStreamChunksFunction} inputSource input source
|
|
4395
5007
|
* @param {Options} options options
|
|
@@ -4414,6 +5026,8 @@ const streamAndGetSourceAndMap = (
|
|
|
4414
5026
|
const potentialNames = [];
|
|
4415
5027
|
const mappingsWriter = createMappingsWriter({ ...options, columns: true });
|
|
4416
5028
|
const addMapping = mappingsWriter.add;
|
|
5029
|
+
const scopesWriter =
|
|
5030
|
+
options && options.scopes ? createScopesWriter() : undefined;
|
|
4417
5031
|
const finalSource = Boolean(options && options.finalSource);
|
|
4418
5032
|
// The caller may have passed `source: false` (getMap does), but this
|
|
4419
5033
|
// helper caches the source text, so the inner stream must produce it.
|
|
@@ -4442,6 +5056,14 @@ const streamAndGetSourceAndMap = (
|
|
|
4442
5056
|
originalColumn,
|
|
4443
5057
|
nameIndex,
|
|
4444
5058
|
);
|
|
5059
|
+
if (scopesWriter !== undefined) {
|
|
5060
|
+
scopesWriter.add(
|
|
5061
|
+
generatedLine,
|
|
5062
|
+
generatedColumn,
|
|
5063
|
+
sourceIndex,
|
|
5064
|
+
originalLine,
|
|
5065
|
+
);
|
|
5066
|
+
}
|
|
4445
5067
|
return onChunk(
|
|
4446
5068
|
finalSource ? undefined : chunk,
|
|
4447
5069
|
generatedLine,
|
|
@@ -4452,7 +5074,7 @@ const streamAndGetSourceAndMap = (
|
|
|
4452
5074
|
nameIndex,
|
|
4453
5075
|
);
|
|
4454
5076
|
},
|
|
4455
|
-
(sourceIndex, source, sourceContent) => {
|
|
5077
|
+
(sourceIndex, source, sourceContent, scopeBindings) => {
|
|
4456
5078
|
while (potentialSources.length < sourceIndex) {
|
|
4457
5079
|
potentialSources.push(null);
|
|
4458
5080
|
}
|
|
@@ -4463,7 +5085,10 @@ const streamAndGetSourceAndMap = (
|
|
|
4463
5085
|
}
|
|
4464
5086
|
potentialSourcesContent[sourceIndex] = sourceContent;
|
|
4465
5087
|
}
|
|
4466
|
-
|
|
5088
|
+
if (scopesWriter !== undefined) {
|
|
5089
|
+
scopesWriter.addSource(sourceIndex, scopeBindings);
|
|
5090
|
+
}
|
|
5091
|
+
return onSource(sourceIndex, source, sourceContent, scopeBindings);
|
|
4467
5092
|
},
|
|
4468
5093
|
(nameIndex, name) => {
|
|
4469
5094
|
while (potentialNames.length < nameIndex) {
|
|
@@ -4475,6 +5100,25 @@ const streamAndGetSourceAndMap = (
|
|
|
4475
5100
|
);
|
|
4476
5101
|
const resultSource = source !== undefined ? source : code;
|
|
4477
5102
|
const mappings = mappingsWriter.finish();
|
|
5103
|
+
/** @type {RawSourceMap | null} */
|
|
5104
|
+
let map = null;
|
|
5105
|
+
if (mappings.length > 0) {
|
|
5106
|
+
map = {
|
|
5107
|
+
version: 3,
|
|
5108
|
+
file: "x",
|
|
5109
|
+
mappings,
|
|
5110
|
+
// We handle broken sources as `null`, in spec this field should be string, but no information what we should do in such cases if we change type it will be breaking change
|
|
5111
|
+
sources: /** @type {string[]} */ (potentialSources),
|
|
5112
|
+
sourcesContent:
|
|
5113
|
+
potentialSourcesContent.length > 0
|
|
5114
|
+
? /** @type {string[]} */ (potentialSourcesContent)
|
|
5115
|
+
: undefined,
|
|
5116
|
+
names: /** @type {string[]} */ (potentialNames),
|
|
5117
|
+
};
|
|
5118
|
+
if (scopesWriter !== undefined) {
|
|
5119
|
+
scopesWriter.finish(map, generatedLine || 0, generatedColumn || 0);
|
|
5120
|
+
}
|
|
5121
|
+
}
|
|
4478
5122
|
|
|
4479
5123
|
return {
|
|
4480
5124
|
result: {
|
|
@@ -4483,21 +5127,7 @@ const streamAndGetSourceAndMap = (
|
|
|
4483
5127
|
source: finalSource ? resultSource : undefined,
|
|
4484
5128
|
},
|
|
4485
5129
|
source: resultSource,
|
|
4486
|
-
map
|
|
4487
|
-
mappings.length > 0
|
|
4488
|
-
? {
|
|
4489
|
-
version: 3,
|
|
4490
|
-
file: "x",
|
|
4491
|
-
mappings,
|
|
4492
|
-
// We handle broken sources as `null`, in spec this field should be string, but no information what we should do in such cases if we change type it will be breaking change
|
|
4493
|
-
sources: /** @type {string[]} */ (potentialSources),
|
|
4494
|
-
sourcesContent:
|
|
4495
|
-
potentialSourcesContent.length > 0
|
|
4496
|
-
? /** @type {string[]} */ (potentialSourcesContent)
|
|
4497
|
-
: undefined,
|
|
4498
|
-
names: /** @type {string[]} */ (potentialNames),
|
|
4499
|
-
}
|
|
4500
|
-
: null,
|
|
5130
|
+
map,
|
|
4501
5131
|
};
|
|
4502
5132
|
};
|
|
4503
5133
|
|
|
@@ -4506,7 +5136,7 @@ module.exports = streamAndGetSourceAndMap;
|
|
|
4506
5136
|
|
|
4507
5137
|
/***/ }),
|
|
4508
5138
|
|
|
4509
|
-
/***/
|
|
5139
|
+
/***/ 487:
|
|
4510
5140
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4511
5141
|
|
|
4512
5142
|
/*
|
|
@@ -4516,16 +5146,17 @@ module.exports = streamAndGetSourceAndMap;
|
|
|
4516
5146
|
|
|
4517
5147
|
|
|
4518
5148
|
|
|
4519
|
-
const streamChunksOfRawSource = __nccwpck_require__(
|
|
4520
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
|
5149
|
+
const streamChunksOfRawSource = __nccwpck_require__(543);
|
|
5150
|
+
const streamChunksOfSourceMap = __nccwpck_require__(637);
|
|
4521
5151
|
|
|
4522
5152
|
/** @typedef {import("../Source")} Source */
|
|
4523
5153
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
4524
5154
|
/** @typedef {(chunk: string | undefined, generatedLine: number, generatedColumn: number, sourceIndex: number, originalLine: number, originalColumn: number, nameIndex: number) => void} OnChunk */
|
|
4525
|
-
/** @typedef {
|
|
5155
|
+
/** @typedef {Map<string, string>} ScopeBindings */
|
|
5156
|
+
/** @typedef {(sourceIndex: number, source: string | null, sourceContent: string | undefined, scopeBindings?: ScopeBindings) => void} OnSource */
|
|
4526
5157
|
/** @typedef {(nameIndex: number, name: string) => void} OnName */
|
|
4527
5158
|
|
|
4528
|
-
/** @typedef {{ source?: boolean, finalSource?: boolean, columns?: boolean }} Options */
|
|
5159
|
+
/** @typedef {{ source?: boolean, finalSource?: boolean, columns?: boolean, scopes?: boolean }} Options */
|
|
4529
5160
|
|
|
4530
5161
|
/**
|
|
4531
5162
|
* @callback StreamChunksFunction
|
|
@@ -4575,7 +5206,7 @@ module.exports = (source, options, onChunk, onSource, onName) => {
|
|
|
4575
5206
|
|
|
4576
5207
|
/***/ }),
|
|
4577
5208
|
|
|
4578
|
-
/***/
|
|
5209
|
+
/***/ 808:
|
|
4579
5210
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4580
5211
|
|
|
4581
5212
|
/*
|
|
@@ -4585,8 +5216,8 @@ module.exports = (source, options, onChunk, onSource, onName) => {
|
|
|
4585
5216
|
|
|
4586
5217
|
|
|
4587
5218
|
|
|
4588
|
-
const splitIntoLines = __nccwpck_require__(
|
|
4589
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
|
5219
|
+
const splitIntoLines = __nccwpck_require__(416);
|
|
5220
|
+
const streamChunksOfSourceMap = __nccwpck_require__(637);
|
|
4590
5221
|
|
|
4591
5222
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
4592
5223
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
@@ -4881,7 +5512,7 @@ const streamChunksOfCombinedSourceMap = (
|
|
|
4881
5512
|
);
|
|
4882
5513
|
}
|
|
4883
5514
|
},
|
|
4884
|
-
(i, source, sourceContent) => {
|
|
5515
|
+
(i, source, sourceContent, scopeBindings) => {
|
|
4885
5516
|
if (source === innerSourceName) {
|
|
4886
5517
|
outerSourceIndex = i;
|
|
4887
5518
|
if (innerSource !== undefined) sourceContent = innerSource;
|
|
@@ -4933,7 +5564,7 @@ const streamChunksOfCombinedSourceMap = (
|
|
|
4933
5564
|
let globalIndex = sourceMapping.get(source);
|
|
4934
5565
|
if (globalIndex === undefined) {
|
|
4935
5566
|
sourceMapping.set(source, (globalIndex = sourceMapping.size));
|
|
4936
|
-
onSource(globalIndex, source, sourceContent);
|
|
5567
|
+
onSource(globalIndex, source, sourceContent, scopeBindings);
|
|
4937
5568
|
}
|
|
4938
5569
|
sourceIndexMapping[i] = globalIndex;
|
|
4939
5570
|
}
|
|
@@ -4952,7 +5583,7 @@ module.exports = streamChunksOfCombinedSourceMap;
|
|
|
4952
5583
|
|
|
4953
5584
|
/***/ }),
|
|
4954
5585
|
|
|
4955
|
-
/***/
|
|
5586
|
+
/***/ 543:
|
|
4956
5587
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4957
5588
|
|
|
4958
5589
|
/*
|
|
@@ -4962,7 +5593,7 @@ module.exports = streamChunksOfCombinedSourceMap;
|
|
|
4962
5593
|
|
|
4963
5594
|
|
|
4964
5595
|
|
|
4965
|
-
const getGeneratedSourceInfo = __nccwpck_require__(
|
|
5596
|
+
const getGeneratedSourceInfo = __nccwpck_require__(769);
|
|
4966
5597
|
|
|
4967
5598
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
4968
5599
|
/** @typedef {import("./streamChunks").OnChunk} OnChunk */
|
|
@@ -5021,7 +5652,7 @@ module.exports = (source, onChunk, onSource, onName, finalSource) =>
|
|
|
5021
5652
|
|
|
5022
5653
|
/***/ }),
|
|
5023
5654
|
|
|
5024
|
-
/***/
|
|
5655
|
+
/***/ 637:
|
|
5025
5656
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5026
5657
|
|
|
5027
5658
|
/*
|
|
@@ -5031,10 +5662,10 @@ module.exports = (source, onChunk, onSource, onName, finalSource) =>
|
|
|
5031
5662
|
|
|
5032
5663
|
|
|
5033
5664
|
|
|
5034
|
-
const getGeneratedSourceInfo = __nccwpck_require__(
|
|
5035
|
-
const getSource = __nccwpck_require__(
|
|
5036
|
-
const readMappings = __nccwpck_require__(
|
|
5037
|
-
const splitIntoLines = __nccwpck_require__(
|
|
5665
|
+
const getGeneratedSourceInfo = __nccwpck_require__(769);
|
|
5666
|
+
const getSource = __nccwpck_require__(292);
|
|
5667
|
+
const readMappings = __nccwpck_require__(674);
|
|
5668
|
+
const splitIntoLines = __nccwpck_require__(416);
|
|
5038
5669
|
|
|
5039
5670
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
5040
5671
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
@@ -5535,7 +6166,7 @@ module.exports = (
|
|
|
5535
6166
|
|
|
5536
6167
|
/***/ }),
|
|
5537
6168
|
|
|
5538
|
-
/***/
|
|
6169
|
+
/***/ 345:
|
|
5539
6170
|
/***/ ((module) => {
|
|
5540
6171
|
|
|
5541
6172
|
/*
|
|
@@ -5659,7 +6290,7 @@ module.exports = {
|
|
|
5659
6290
|
|
|
5660
6291
|
/***/ }),
|
|
5661
6292
|
|
|
5662
|
-
/***/
|
|
6293
|
+
/***/ 751:
|
|
5663
6294
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5664
6295
|
|
|
5665
6296
|
/*
|
|
@@ -5746,38 +6377,41 @@ module.exports = mergeExports(
|
|
|
5746
6377
|
{},
|
|
5747
6378
|
{
|
|
5748
6379
|
get Source() {
|
|
5749
|
-
return __nccwpck_require__(
|
|
6380
|
+
return __nccwpck_require__(290);
|
|
5750
6381
|
},
|
|
5751
6382
|
get RawSource() {
|
|
5752
|
-
return __nccwpck_require__(
|
|
6383
|
+
return __nccwpck_require__(132);
|
|
5753
6384
|
},
|
|
5754
6385
|
get OriginalSource() {
|
|
5755
|
-
return __nccwpck_require__(
|
|
6386
|
+
return __nccwpck_require__(169);
|
|
5756
6387
|
},
|
|
5757
6388
|
get SourceMapSource() {
|
|
5758
|
-
return __nccwpck_require__(
|
|
6389
|
+
return __nccwpck_require__(471);
|
|
5759
6390
|
},
|
|
5760
6391
|
get CachedSource() {
|
|
5761
|
-
return __nccwpck_require__(
|
|
6392
|
+
return __nccwpck_require__(384);
|
|
5762
6393
|
},
|
|
5763
6394
|
get ConcatSource() {
|
|
5764
|
-
return __nccwpck_require__(
|
|
6395
|
+
return __nccwpck_require__(698);
|
|
5765
6396
|
},
|
|
5766
6397
|
get ReplaceSource() {
|
|
5767
|
-
return __nccwpck_require__(
|
|
6398
|
+
return __nccwpck_require__(522);
|
|
5768
6399
|
},
|
|
5769
6400
|
get PrefixSource() {
|
|
5770
|
-
return __nccwpck_require__(
|
|
6401
|
+
return __nccwpck_require__(814);
|
|
5771
6402
|
},
|
|
5772
6403
|
get SizeOnlySource() {
|
|
5773
|
-
return __nccwpck_require__(
|
|
6404
|
+
return __nccwpck_require__(317);
|
|
5774
6405
|
},
|
|
5775
6406
|
get CompatSource() {
|
|
5776
|
-
return __nccwpck_require__(
|
|
6407
|
+
return __nccwpck_require__(912);
|
|
5777
6408
|
},
|
|
5778
6409
|
util: {
|
|
6410
|
+
get scopes() {
|
|
6411
|
+
return __nccwpck_require__(928);
|
|
6412
|
+
},
|
|
5779
6413
|
get stringBufferUtils() {
|
|
5780
|
-
return __nccwpck_require__(
|
|
6414
|
+
return __nccwpck_require__(345);
|
|
5781
6415
|
},
|
|
5782
6416
|
},
|
|
5783
6417
|
},
|
|
@@ -5828,7 +6462,7 @@ module.exports = mergeExports(
|
|
|
5828
6462
|
/******/ // startup
|
|
5829
6463
|
/******/ // Load entry module and return exports
|
|
5830
6464
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
5831
|
-
/******/ var __webpack_exports__ = __nccwpck_require__(
|
|
6465
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(751);
|
|
5832
6466
|
/******/ module.exports = __webpack_exports__;
|
|
5833
6467
|
/******/
|
|
5834
6468
|
/******/ })()
|