@rspack/core 1.4.4 → 1.4.6
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/compiled/watchpack/index.d.ts +1 -0
- package/compiled/webpack-sources/index.js +623 -648
- package/compiled/webpack-sources/package.json +1 -1
- package/compiled/webpack-sources/types.d.ts +162 -26
- package/dist/ChunkGraph.d.ts +1 -0
- package/dist/Compilation.d.ts +2 -0
- package/dist/FileSystem.d.ts +2 -0
- package/dist/builtin-loader/swc/types.d.ts +0 -399
- package/dist/exports.d.ts +1 -1
- package/dist/index.js +221 -249
- package/dist/loader-runner/service.d.ts +1 -1
- package/dist/{config/zod.d.ts → schema/config.d.ts} +14 -13
- package/dist/schema/loaders.d.ts +400 -0
- package/dist/schema/plugins.d.ts +163 -0
- package/dist/{config → schema}/utils.d.ts +1 -0
- package/dist/{util → schema}/validate.d.ts +1 -0
- package/dist/stats/StatsFactory.d.ts +1 -1
- package/dist/util/bindingVersionCheck.d.ts +1 -1
- package/dist/util/fs.d.ts +1 -0
- package/hot/lazy-compilation-node.js +1 -1
- package/hot/lazy-compilation-web.js +10 -16
- package/package.json +5 -7
@@ -2,7 +2,7 @@
|
|
2
2
|
/******/ "use strict";
|
3
3
|
/******/ var __webpack_modules__ = ({
|
4
4
|
|
5
|
-
/***/
|
5
|
+
/***/ 863:
|
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__(733);
|
16
|
+
const streamAndGetSourceAndMap = __nccwpck_require__(545);
|
17
|
+
const streamChunksOfRawSource = __nccwpck_require__(518);
|
18
|
+
const streamChunksOfSourceMap = __nccwpck_require__(16);
|
19
19
|
const {
|
20
|
-
isDualStringBufferCachingEnabled
|
21
|
-
} = __nccwpck_require__(
|
20
|
+
isDualStringBufferCachingEnabled,
|
21
|
+
} = __nccwpck_require__(780);
|
22
22
|
|
23
23
|
/** @typedef {import("./Source").HashLike} HashLike */
|
24
24
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
@@ -33,13 +33,13 @@ const {
|
|
33
33
|
|
34
34
|
/**
|
35
35
|
* @typedef {object} BufferedMap
|
36
|
-
* @property {number} version
|
37
|
-
* @property {string[]} sources
|
38
|
-
* @property {string[]} names
|
39
|
-
* @property {string=} sourceRoot
|
40
|
-
* @property {(Buffer | "")[]=} sourcesContent
|
41
|
-
* @property {Buffer=} mappings
|
42
|
-
* @property {string} file
|
36
|
+
* @property {number} version version
|
37
|
+
* @property {string[]} sources sources
|
38
|
+
* @property {string[]} names name
|
39
|
+
* @property {string=} sourceRoot source root
|
40
|
+
* @property {(Buffer | "")[]=} sourcesContent sources content
|
41
|
+
* @property {Buffer=} mappings mappings
|
42
|
+
* @property {string} file file
|
43
43
|
*/
|
44
44
|
|
45
45
|
/**
|
@@ -48,14 +48,15 @@ const {
|
|
48
48
|
*/
|
49
49
|
const mapToBufferedMap = (map) => {
|
50
50
|
if (typeof map !== "object" || !map) return map;
|
51
|
-
|
52
|
-
|
51
|
+
const bufferedMap =
|
52
|
+
/** @type {BufferedMap} */
|
53
|
+
(/** @type {unknown} */ ({ ...map }));
|
53
54
|
if (map.mappings) {
|
54
|
-
bufferedMap.mappings = Buffer.from(map.mappings, "
|
55
|
+
bufferedMap.mappings = Buffer.from(map.mappings, "utf8");
|
55
56
|
}
|
56
57
|
if (map.sourcesContent) {
|
57
58
|
bufferedMap.sourcesContent = map.sourcesContent.map(
|
58
|
-
(str) => str && Buffer.from(str, "
|
59
|
+
(str) => str && Buffer.from(str, "utf8"),
|
59
60
|
);
|
60
61
|
}
|
61
62
|
return bufferedMap;
|
@@ -67,14 +68,15 @@ const mapToBufferedMap = (map) => {
|
|
67
68
|
*/
|
68
69
|
const bufferedMapToMap = (bufferedMap) => {
|
69
70
|
if (typeof bufferedMap !== "object" || !bufferedMap) return bufferedMap;
|
70
|
-
|
71
|
-
|
71
|
+
const map =
|
72
|
+
/** @type {RawSourceMap} */
|
73
|
+
(/** @type {unknown} */ ({ ...bufferedMap }));
|
72
74
|
if (bufferedMap.mappings) {
|
73
|
-
map.mappings = bufferedMap.mappings.toString("
|
75
|
+
map.mappings = bufferedMap.mappings.toString("utf8");
|
74
76
|
}
|
75
77
|
if (bufferedMap.sourcesContent) {
|
76
78
|
map.sourcesContent = bufferedMap.sourcesContent.map(
|
77
|
-
(buffer) => buffer && buffer.toString("
|
79
|
+
(buffer) => buffer && buffer.toString("utf8"),
|
78
80
|
);
|
79
81
|
}
|
80
82
|
return map;
|
@@ -85,15 +87,14 @@ const bufferedMapToMap = (bufferedMap) => {
|
|
85
87
|
|
86
88
|
/**
|
87
89
|
* @typedef {object} CachedData
|
88
|
-
* @property {boolean=} source
|
89
|
-
* @property {Buffer} buffer
|
90
|
-
* @property {number=} size
|
91
|
-
* @property {BufferedMaps} maps
|
92
|
-
* @property {(string | Buffer)[]=} hash
|
90
|
+
* @property {boolean=} source source
|
91
|
+
* @property {Buffer} buffer buffer
|
92
|
+
* @property {number=} size size
|
93
|
+
* @property {BufferedMaps} maps maps
|
94
|
+
* @property {(string | Buffer)[]=} hash hash
|
93
95
|
*/
|
94
96
|
|
95
97
|
class CachedSource extends Source {
|
96
|
-
// eslint-disable-next-line valid-jsdoc
|
97
98
|
/**
|
98
99
|
* @param {Source | (() => Source)} source source
|
99
100
|
* @param {CachedData=} cachedData cached data
|
@@ -124,15 +125,15 @@ class CachedSource extends Source {
|
|
124
125
|
/** @type {BufferedMaps} */
|
125
126
|
const bufferedMaps = new Map();
|
126
127
|
for (const pair of this._cachedMaps) {
|
127
|
-
|
128
|
+
const [, cacheEntry] = pair;
|
128
129
|
if (cacheEntry.bufferedMap === undefined) {
|
129
130
|
cacheEntry.bufferedMap = mapToBufferedMap(
|
130
|
-
this._getMapFromCacheEntry(cacheEntry)
|
131
|
+
this._getMapFromCacheEntry(cacheEntry),
|
131
132
|
);
|
132
133
|
}
|
133
134
|
bufferedMaps.set(pair[0], {
|
134
135
|
map: undefined,
|
135
|
-
bufferedMap: cacheEntry.bufferedMap
|
136
|
+
bufferedMap: cacheEntry.bufferedMap,
|
136
137
|
});
|
137
138
|
}
|
138
139
|
return {
|
@@ -147,13 +148,13 @@ class CachedSource extends Source {
|
|
147
148
|
this._cachedSourceType !== undefined
|
148
149
|
? this._cachedSourceType
|
149
150
|
: typeof this._cachedSource === "string"
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
151
|
+
? true
|
152
|
+
: Buffer.isBuffer(this._cachedSource)
|
153
|
+
? false
|
154
|
+
: undefined,
|
154
155
|
size: this._cachedSize,
|
155
156
|
maps: bufferedMaps,
|
156
|
-
hash: this._cachedHashUpdate
|
157
|
+
hash: this._cachedHashUpdate,
|
157
158
|
};
|
158
159
|
}
|
159
160
|
|
@@ -200,7 +201,7 @@ class CachedSource extends Source {
|
|
200
201
|
if (this._cachedSource !== undefined) return this._cachedSource;
|
201
202
|
if (this._cachedBuffer && this._cachedSourceType !== undefined) {
|
202
203
|
const value = this._cachedSourceType
|
203
|
-
? this._cachedBuffer.toString("
|
204
|
+
? this._cachedBuffer.toString("utf8")
|
204
205
|
: this._cachedBuffer;
|
205
206
|
if (isDualStringBufferCachingEnabled()) {
|
206
207
|
this._cachedSource = /** @type {string} */ (value);
|
@@ -217,7 +218,7 @@ class CachedSource extends Source {
|
|
217
218
|
if (this._cachedSource !== undefined) {
|
218
219
|
const value = Buffer.isBuffer(this._cachedSource)
|
219
220
|
? this._cachedSource
|
220
|
-
: Buffer.from(this._cachedSource, "
|
221
|
+
: Buffer.from(this._cachedSource, "utf8");
|
221
222
|
if (isDualStringBufferCachingEnabled()) {
|
222
223
|
this._cachedBuffer = value;
|
223
224
|
}
|
@@ -230,7 +231,7 @@ class CachedSource extends Source {
|
|
230
231
|
if (Buffer.isBuffer(bufferOrString)) {
|
231
232
|
return (this._cachedBuffer = bufferOrString);
|
232
233
|
}
|
233
|
-
const value = Buffer.from(bufferOrString, "
|
234
|
+
const value = Buffer.from(bufferOrString, "utf8");
|
234
235
|
if (isDualStringBufferCachingEnabled()) {
|
235
236
|
this._cachedBuffer = value;
|
236
237
|
}
|
@@ -282,7 +283,7 @@ class CachedSource extends Source {
|
|
282
283
|
}
|
283
284
|
this._cachedMaps.set(key, {
|
284
285
|
map,
|
285
|
-
bufferedMap: undefined
|
286
|
+
bufferedMap: undefined,
|
286
287
|
});
|
287
288
|
return { source, map };
|
288
289
|
}
|
@@ -309,33 +310,32 @@ class CachedSource extends Source {
|
|
309
310
|
onChunk,
|
310
311
|
onSource,
|
311
312
|
onName,
|
312
|
-
|
313
|
-
true
|
314
|
-
);
|
315
|
-
} else {
|
316
|
-
return streamChunksOfRawSource(
|
317
|
-
/** @type {string} */
|
318
|
-
(source),
|
319
|
-
onChunk,
|
320
|
-
onSource,
|
321
|
-
onName,
|
322
|
-
!!(options && options.finalSource)
|
313
|
+
Boolean(options && options.finalSource),
|
314
|
+
true,
|
323
315
|
);
|
324
316
|
}
|
317
|
+
return streamChunksOfRawSource(
|
318
|
+
/** @type {string} */
|
319
|
+
(source),
|
320
|
+
onChunk,
|
321
|
+
onSource,
|
322
|
+
onName,
|
323
|
+
Boolean(options && options.finalSource),
|
324
|
+
);
|
325
325
|
}
|
326
|
-
const
|
326
|
+
const sourceAndMap = streamAndGetSourceAndMap(
|
327
327
|
this.original(),
|
328
328
|
options,
|
329
329
|
onChunk,
|
330
330
|
onSource,
|
331
|
-
onName
|
331
|
+
onName,
|
332
332
|
);
|
333
|
-
this._cachedSource = source;
|
333
|
+
this._cachedSource = sourceAndMap.source;
|
334
334
|
this._cachedMaps.set(key, {
|
335
|
-
map: /** @type {RawSourceMap} */ (map),
|
336
|
-
bufferedMap: undefined
|
335
|
+
map: /** @type {RawSourceMap} */ (sourceAndMap.map),
|
336
|
+
bufferedMap: undefined,
|
337
337
|
});
|
338
|
-
return result;
|
338
|
+
return sourceAndMap.result;
|
339
339
|
}
|
340
340
|
|
341
341
|
/**
|
@@ -351,7 +351,7 @@ class CachedSource extends Source {
|
|
351
351
|
const map = this.original().map(options);
|
352
352
|
this._cachedMaps.set(key, {
|
353
353
|
map,
|
354
|
-
bufferedMap: undefined
|
354
|
+
bufferedMap: undefined,
|
355
355
|
});
|
356
356
|
return map;
|
357
357
|
}
|
@@ -368,7 +368,7 @@ class CachedSource extends Source {
|
|
368
368
|
/** @type {(string | Buffer)[]} */
|
369
369
|
const update = [];
|
370
370
|
/** @type {string | undefined} */
|
371
|
-
let currentString
|
371
|
+
let currentString;
|
372
372
|
const tracker = {
|
373
373
|
/**
|
374
374
|
* @param {string | Buffer} item item
|
@@ -392,7 +392,7 @@ class CachedSource extends Source {
|
|
392
392
|
}
|
393
393
|
update.push(item);
|
394
394
|
}
|
395
|
-
}
|
395
|
+
},
|
396
396
|
};
|
397
397
|
this.original().updateHash(/** @type {HashLike} */ (tracker));
|
398
398
|
if (currentString !== undefined) {
|
@@ -408,7 +408,7 @@ module.exports = CachedSource;
|
|
408
408
|
|
409
409
|
/***/ }),
|
410
410
|
|
411
|
-
/***/
|
411
|
+
/***/ 931:
|
412
412
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
413
413
|
|
414
414
|
/*
|
@@ -418,7 +418,7 @@ module.exports = CachedSource;
|
|
418
418
|
|
419
419
|
|
420
420
|
|
421
|
-
const Source = __nccwpck_require__(
|
421
|
+
const Source = __nccwpck_require__(733);
|
422
422
|
|
423
423
|
/** @typedef {import("./Source").HashLike} HashLike */
|
424
424
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
@@ -428,12 +428,12 @@ const Source = __nccwpck_require__(140);
|
|
428
428
|
|
429
429
|
/**
|
430
430
|
* @typedef {object} SourceLike
|
431
|
-
* @property {() => SourceValue} source
|
432
|
-
* @property {(() => Buffer)=} buffer
|
433
|
-
* @property {(() => number)=} size
|
434
|
-
* @property {((options?: MapOptions) => RawSourceMap | null)=} map
|
435
|
-
* @property {((options?: MapOptions) => SourceAndMap)=} sourceAndMap
|
436
|
-
* @property {((hash: HashLike) => void)=} updateHash
|
431
|
+
* @property {() => SourceValue} source source
|
432
|
+
* @property {(() => Buffer)=} buffer buffer
|
433
|
+
* @property {(() => number)=} size size
|
434
|
+
* @property {((options?: MapOptions) => RawSourceMap | null)=} map map
|
435
|
+
* @property {((options?: MapOptions) => SourceAndMap)=} sourceAndMap source and map
|
436
|
+
* @property {((hash: HashLike) => void)=} updateHash hash updater
|
437
437
|
*/
|
438
438
|
|
439
439
|
class CompatSource extends Source {
|
@@ -508,7 +508,7 @@ class CompatSource extends Source {
|
|
508
508
|
}
|
509
509
|
if (typeof this._sourceLike.map === "function") {
|
510
510
|
throw new Error(
|
511
|
-
"A Source-like object with a 'map' method must also provide an 'updateHash' method"
|
511
|
+
"A Source-like object with a 'map' method must also provide an 'updateHash' method",
|
512
512
|
);
|
513
513
|
}
|
514
514
|
hash.update(this.buffer());
|
@@ -520,7 +520,7 @@ module.exports = CompatSource;
|
|
520
520
|
|
521
521
|
/***/ }),
|
522
522
|
|
523
|
-
/***/
|
523
|
+
/***/ 21:
|
524
524
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
525
525
|
|
526
526
|
/*
|
@@ -530,10 +530,10 @@ module.exports = CompatSource;
|
|
530
530
|
|
531
531
|
|
532
532
|
|
533
|
-
const RawSource = __nccwpck_require__(
|
534
|
-
const Source = __nccwpck_require__(
|
535
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
536
|
-
const streamChunks = __nccwpck_require__(
|
533
|
+
const RawSource = __nccwpck_require__(117);
|
534
|
+
const Source = __nccwpck_require__(733);
|
535
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(546);
|
536
|
+
const streamChunks = __nccwpck_require__(576);
|
537
537
|
|
538
538
|
/** @typedef {import("./CompatSource").SourceLike} SourceLike */
|
539
539
|
/** @typedef {import("./Source").HashLike} HashLike */
|
@@ -553,7 +553,6 @@ const stringsAsRawSources = new WeakSet();
|
|
553
553
|
|
554
554
|
class ConcatSource extends Source {
|
555
555
|
/**
|
556
|
-
*
|
557
556
|
* @param {Child[]} args children
|
558
557
|
*/
|
559
558
|
constructor(...args) {
|
@@ -564,8 +563,7 @@ class ConcatSource extends Source {
|
|
564
563
|
*/
|
565
564
|
this._children = [];
|
566
565
|
|
567
|
-
for (
|
568
|
-
const item = args[i];
|
566
|
+
for (const item of args) {
|
569
567
|
if (item instanceof ConcatSource) {
|
570
568
|
for (const child of item._children) {
|
571
569
|
this._children.push(child);
|
@@ -624,7 +622,7 @@ class ConcatSource extends Source {
|
|
624
622
|
buffers.push(bufferOrString);
|
625
623
|
} else {
|
626
624
|
// This will not happen
|
627
|
-
buffers.push(Buffer.from(bufferOrString, "
|
625
|
+
buffers.push(Buffer.from(bufferOrString, "utf8"));
|
628
626
|
}
|
629
627
|
}
|
630
628
|
}
|
@@ -682,14 +680,14 @@ class ConcatSource extends Source {
|
|
682
680
|
options,
|
683
681
|
onChunk,
|
684
682
|
onSource,
|
685
|
-
onName
|
683
|
+
onName,
|
686
684
|
);
|
687
685
|
}
|
688
686
|
let currentLineOffset = 0;
|
689
687
|
let currentColumnOffset = 0;
|
690
|
-
|
691
|
-
|
692
|
-
const finalSource =
|
688
|
+
const sourceMapping = new Map();
|
689
|
+
const nameMapping = new Map();
|
690
|
+
const finalSource = Boolean(options && options.finalSource);
|
693
691
|
let code = "";
|
694
692
|
let needToCloseMapping = false;
|
695
693
|
for (const item of /** @type {Source[]} */ (this._children)) {
|
@@ -709,7 +707,7 @@ class ConcatSource extends Source {
|
|
709
707
|
sourceIndex,
|
710
708
|
originalLine,
|
711
709
|
originalColumn,
|
712
|
-
nameIndex
|
710
|
+
nameIndex,
|
713
711
|
) => {
|
714
712
|
const line = generatedLine + currentLineOffset;
|
715
713
|
const column =
|
@@ -725,7 +723,7 @@ class ConcatSource extends Source {
|
|
725
723
|
-1,
|
726
724
|
-1,
|
727
725
|
-1,
|
728
|
-
-1
|
726
|
+
-1,
|
729
727
|
);
|
730
728
|
}
|
731
729
|
needToCloseMapping = false;
|
@@ -739,33 +737,25 @@ class ConcatSource extends Source {
|
|
739
737
|
? -1
|
740
738
|
: nameIndexMapping[nameIndex];
|
741
739
|
lastMappingLine = resultSourceIndex < 0 ? 0 : generatedLine;
|
740
|
+
let _chunk;
|
741
|
+
// When using finalSource, we process the entire source code at once at the end, rather than chunk by chunk
|
742
742
|
if (finalSource) {
|
743
743
|
if (chunk !== undefined) code += chunk;
|
744
|
-
if (resultSourceIndex >= 0) {
|
745
|
-
onChunk(
|
746
|
-
undefined,
|
747
|
-
line,
|
748
|
-
column,
|
749
|
-
resultSourceIndex,
|
750
|
-
originalLine,
|
751
|
-
originalColumn,
|
752
|
-
resultNameIndex
|
753
|
-
);
|
754
|
-
}
|
755
744
|
} else {
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
745
|
+
_chunk = chunk;
|
746
|
+
}
|
747
|
+
if (resultSourceIndex < 0) {
|
748
|
+
onChunk(_chunk, line, column, -1, -1, -1, -1);
|
749
|
+
} else {
|
750
|
+
onChunk(
|
751
|
+
_chunk,
|
752
|
+
line,
|
753
|
+
column,
|
754
|
+
resultSourceIndex,
|
755
|
+
originalLine,
|
756
|
+
originalColumn,
|
757
|
+
resultNameIndex,
|
758
|
+
);
|
769
759
|
}
|
770
760
|
},
|
771
761
|
(i, source, sourceContent) => {
|
@@ -783,22 +773,23 @@ class ConcatSource extends Source {
|
|
783
773
|
onName(globalIndex, name);
|
784
774
|
}
|
785
775
|
nameIndexMapping[i] = globalIndex;
|
786
|
-
}
|
776
|
+
},
|
787
777
|
);
|
788
778
|
if (source !== undefined) code += source;
|
789
|
-
if (
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
779
|
+
if (
|
780
|
+
needToCloseMapping &&
|
781
|
+
(generatedLine !== 1 || generatedColumn !== 0)
|
782
|
+
) {
|
783
|
+
onChunk(
|
784
|
+
undefined,
|
785
|
+
currentLineOffset + 1,
|
786
|
+
currentColumnOffset,
|
787
|
+
-1,
|
788
|
+
-1,
|
789
|
+
-1,
|
790
|
+
-1,
|
791
|
+
);
|
792
|
+
needToCloseMapping = false;
|
802
793
|
}
|
803
794
|
if (/** @type {number} */ (generatedLine) > 1) {
|
804
795
|
currentColumnOffset = /** @type {number} */ (generatedColumn);
|
@@ -813,7 +804,7 @@ class ConcatSource extends Source {
|
|
813
804
|
return {
|
814
805
|
generatedLine: currentLineOffset + 1,
|
815
806
|
generatedColumn: currentColumnOffset,
|
816
|
-
source: finalSource ? code : undefined
|
807
|
+
source: finalSource ? code : undefined,
|
817
808
|
};
|
818
809
|
}
|
819
810
|
|
@@ -832,9 +823,9 @@ class ConcatSource extends Source {
|
|
832
823
|
|
833
824
|
_optimize() {
|
834
825
|
const newChildren = [];
|
835
|
-
let currentString
|
826
|
+
let currentString;
|
836
827
|
/** @type {undefined | string | [string, string] | SourceLike} */
|
837
|
-
let currentRawSources
|
828
|
+
let currentRawSources;
|
838
829
|
/**
|
839
830
|
* @param {string} string string
|
840
831
|
* @returns {void}
|
@@ -849,7 +840,7 @@ class ConcatSource extends Source {
|
|
849
840
|
typeof currentRawSources === "string"
|
850
841
|
? currentRawSources
|
851
842
|
: /** @type {string} */ (currentRawSources.source()),
|
852
|
-
string
|
843
|
+
string,
|
853
844
|
];
|
854
845
|
}
|
855
846
|
};
|
@@ -863,7 +854,7 @@ class ConcatSource extends Source {
|
|
863
854
|
} else if (Array.isArray(currentRawSources)) {
|
864
855
|
currentRawSources.push(
|
865
856
|
/** @type {string} */
|
866
|
-
(source.source())
|
857
|
+
(source.source()),
|
867
858
|
);
|
868
859
|
} else {
|
869
860
|
currentRawSources = [
|
@@ -871,7 +862,7 @@ class ConcatSource extends Source {
|
|
871
862
|
? currentRawSources
|
872
863
|
: /** @type {string} */ (currentRawSources.source()),
|
873
864
|
/** @type {string} */
|
874
|
-
(source.source())
|
865
|
+
(source.source()),
|
875
866
|
];
|
876
867
|
}
|
877
868
|
};
|
@@ -903,7 +894,7 @@ class ConcatSource extends Source {
|
|
903
894
|
if (stringsAsRawSources.has(child)) {
|
904
895
|
addSourceToRawSources(
|
905
896
|
/** @type {SourceLike} */
|
906
|
-
(child)
|
897
|
+
(child),
|
907
898
|
);
|
908
899
|
} else {
|
909
900
|
if (currentRawSources !== undefined) {
|
@@ -930,7 +921,7 @@ module.exports = ConcatSource;
|
|
930
921
|
|
931
922
|
/***/ }),
|
932
923
|
|
933
|
-
/***/
|
924
|
+
/***/ 2:
|
934
925
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
935
926
|
|
936
927
|
/*
|
@@ -940,14 +931,14 @@ module.exports = ConcatSource;
|
|
940
931
|
|
941
932
|
|
942
933
|
|
943
|
-
const Source = __nccwpck_require__(
|
944
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
945
|
-
const getGeneratedSourceInfo = __nccwpck_require__(
|
946
|
-
const splitIntoLines = __nccwpck_require__(
|
947
|
-
const splitIntoPotentialTokens = __nccwpck_require__(
|
934
|
+
const Source = __nccwpck_require__(733);
|
935
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(546);
|
936
|
+
const getGeneratedSourceInfo = __nccwpck_require__(42);
|
937
|
+
const splitIntoLines = __nccwpck_require__(319);
|
938
|
+
const splitIntoPotentialTokens = __nccwpck_require__(12);
|
948
939
|
const {
|
949
|
-
isDualStringBufferCachingEnabled
|
950
|
-
} = __nccwpck_require__(
|
940
|
+
isDualStringBufferCachingEnabled,
|
941
|
+
} = __nccwpck_require__(780);
|
951
942
|
|
952
943
|
/** @typedef {import("./Source").HashLike} HashLike */
|
953
944
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
@@ -994,7 +985,7 @@ class OriginalSource extends Source {
|
|
994
985
|
if (this._value === undefined) {
|
995
986
|
const value =
|
996
987
|
/** @type {Buffer} */
|
997
|
-
(this._valueAsBuffer).toString("
|
988
|
+
(this._valueAsBuffer).toString("utf8");
|
998
989
|
if (isDualStringBufferCachingEnabled()) {
|
999
990
|
this._value = value;
|
1000
991
|
}
|
@@ -1005,7 +996,7 @@ class OriginalSource extends Source {
|
|
1005
996
|
|
1006
997
|
buffer() {
|
1007
998
|
if (this._valueAsBuffer === undefined) {
|
1008
|
-
const value = Buffer.from(/** @type {string} */ (this._value), "
|
999
|
+
const value = Buffer.from(/** @type {string} */ (this._value), "utf8");
|
1009
1000
|
if (isDualStringBufferCachingEnabled()) {
|
1010
1001
|
this._valueAsBuffer = value;
|
1011
1002
|
}
|
@@ -1034,17 +1025,17 @@ class OriginalSource extends Source {
|
|
1034
1025
|
* @param {Options} options options
|
1035
1026
|
* @param {OnChunk} onChunk called for each chunk of code
|
1036
1027
|
* @param {OnSource} onSource called for each source
|
1037
|
-
* @param {OnName}
|
1028
|
+
* @param {OnName} _onName called for each name
|
1038
1029
|
* @returns {GeneratedSourceInfo} generated source info
|
1039
1030
|
*/
|
1040
|
-
streamChunks(options, onChunk, onSource,
|
1031
|
+
streamChunks(options, onChunk, onSource, _onName) {
|
1041
1032
|
if (this._value === undefined) {
|
1042
1033
|
this._value =
|
1043
1034
|
/** @type {Buffer} */
|
1044
|
-
(this._valueAsBuffer).toString("
|
1035
|
+
(this._valueAsBuffer).toString("utf8");
|
1045
1036
|
}
|
1046
1037
|
onSource(0, this._name, this._value);
|
1047
|
-
const finalSource =
|
1038
|
+
const finalSource = Boolean(options && options.finalSource);
|
1048
1039
|
if (!options || options.columns !== false) {
|
1049
1040
|
// With column info we need to read all lines and split them
|
1050
1041
|
const matches = splitIntoPotentialTokens(this._value);
|
@@ -1070,7 +1061,7 @@ class OriginalSource extends Source {
|
|
1070
1061
|
return {
|
1071
1062
|
generatedLine: line,
|
1072
1063
|
generatedColumn: column,
|
1073
|
-
source: finalSource ? this._value : undefined
|
1064
|
+
source: finalSource ? this._value : undefined,
|
1074
1065
|
};
|
1075
1066
|
} else if (finalSource) {
|
1076
1067
|
// Without column info and with final source we only
|
@@ -1078,41 +1069,45 @@ class OriginalSource extends Source {
|
|
1078
1069
|
const result = getGeneratedSourceInfo(this._value);
|
1079
1070
|
const { generatedLine, generatedColumn } = result;
|
1080
1071
|
if (generatedColumn === 0) {
|
1081
|
-
for (
|
1072
|
+
for (
|
1073
|
+
let line = 1;
|
1074
|
+
line < /** @type {number} */ (generatedLine);
|
1075
|
+
line++
|
1076
|
+
) {
|
1082
1077
|
onChunk(undefined, line, 0, 0, line, 0, -1);
|
1078
|
+
}
|
1083
1079
|
} else {
|
1084
1080
|
for (
|
1085
1081
|
let line = 1;
|
1086
1082
|
line <= /** @type {number} */ (generatedLine);
|
1087
1083
|
line++
|
1088
|
-
)
|
1084
|
+
) {
|
1089
1085
|
onChunk(undefined, line, 0, 0, line, 0, -1);
|
1086
|
+
}
|
1090
1087
|
}
|
1091
1088
|
return result;
|
1092
|
-
} else {
|
1093
|
-
// Without column info, but also without final source
|
1094
|
-
// we need to split source by lines
|
1095
|
-
let line = 1;
|
1096
|
-
const matches = splitIntoLines(this._value);
|
1097
|
-
/** @type {string | undefined} */
|
1098
|
-
let match;
|
1099
|
-
for (match of matches) {
|
1100
|
-
onChunk(finalSource ? undefined : match, line, 0, 0, line, 0, -1);
|
1101
|
-
line++;
|
1102
|
-
}
|
1103
|
-
return matches.length === 0 ||
|
1104
|
-
/** @type {string} */ (match).endsWith("\n")
|
1105
|
-
? {
|
1106
|
-
generatedLine: matches.length + 1,
|
1107
|
-
generatedColumn: 0,
|
1108
|
-
source: finalSource ? this._value : undefined
|
1109
|
-
}
|
1110
|
-
: {
|
1111
|
-
generatedLine: matches.length,
|
1112
|
-
generatedColumn: /** @type {string} */ (match).length,
|
1113
|
-
source: finalSource ? this._value : undefined
|
1114
|
-
};
|
1115
1089
|
}
|
1090
|
+
// Without column info, but also without final source
|
1091
|
+
// we need to split source by lines
|
1092
|
+
let line = 1;
|
1093
|
+
const matches = splitIntoLines(this._value);
|
1094
|
+
/** @type {string | undefined} */
|
1095
|
+
let match;
|
1096
|
+
for (match of matches) {
|
1097
|
+
onChunk(finalSource ? undefined : match, line, 0, 0, line, 0, -1);
|
1098
|
+
line++;
|
1099
|
+
}
|
1100
|
+
return matches.length === 0 || /** @type {string} */ (match).endsWith("\n")
|
1101
|
+
? {
|
1102
|
+
generatedLine: matches.length + 1,
|
1103
|
+
generatedColumn: 0,
|
1104
|
+
source: finalSource ? this._value : undefined,
|
1105
|
+
}
|
1106
|
+
: {
|
1107
|
+
generatedLine: matches.length,
|
1108
|
+
generatedColumn: /** @type {string} */ (match).length,
|
1109
|
+
source: finalSource ? this._value : undefined,
|
1110
|
+
};
|
1116
1111
|
}
|
1117
1112
|
|
1118
1113
|
/**
|
@@ -1131,7 +1126,7 @@ module.exports = OriginalSource;
|
|
1131
1126
|
|
1132
1127
|
/***/ }),
|
1133
1128
|
|
1134
|
-
/***/
|
1129
|
+
/***/ 665:
|
1135
1130
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
1136
1131
|
|
1137
1132
|
/*
|
@@ -1141,10 +1136,10 @@ module.exports = OriginalSource;
|
|
1141
1136
|
|
1142
1137
|
|
1143
1138
|
|
1144
|
-
const RawSource = __nccwpck_require__(
|
1145
|
-
const Source = __nccwpck_require__(
|
1146
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
1147
|
-
const streamChunks = __nccwpck_require__(
|
1139
|
+
const RawSource = __nccwpck_require__(117);
|
1140
|
+
const Source = __nccwpck_require__(733);
|
1141
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(546);
|
1142
|
+
const streamChunks = __nccwpck_require__(576);
|
1148
1143
|
|
1149
1144
|
/** @typedef {import("./Source").HashLike} HashLike */
|
1150
1145
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
@@ -1191,7 +1186,7 @@ class PrefixSource extends Source {
|
|
1191
1186
|
source() {
|
1192
1187
|
const node = /** @type {string} */ (this._source.source());
|
1193
1188
|
const prefix = this._prefix;
|
1194
|
-
return prefix + node.replace(REPLACE_REGEX,
|
1189
|
+
return prefix + node.replace(REPLACE_REGEX, `\n${prefix}`);
|
1195
1190
|
}
|
1196
1191
|
|
1197
1192
|
// TODO efficient buffer() implementation
|
@@ -1222,7 +1217,7 @@ class PrefixSource extends Source {
|
|
1222
1217
|
streamChunks(options, onChunk, onSource, onName) {
|
1223
1218
|
const prefix = this._prefix;
|
1224
1219
|
const prefixOffset = prefix.length;
|
1225
|
-
const linesOnly =
|
1220
|
+
const linesOnly = Boolean(options && options.columns === false);
|
1226
1221
|
const { generatedLine, generatedColumn, source } = streamChunks(
|
1227
1222
|
this._source,
|
1228
1223
|
options,
|
@@ -1233,7 +1228,7 @@ class PrefixSource extends Source {
|
|
1233
1228
|
sourceIndex,
|
1234
1229
|
originalLine,
|
1235
1230
|
originalColumn,
|
1236
|
-
nameIndex
|
1231
|
+
nameIndex,
|
1237
1232
|
) => {
|
1238
1233
|
if (generatedColumn !== 0) {
|
1239
1234
|
// In the middle of the line, we just adject the column
|
@@ -1261,11 +1256,11 @@ class PrefixSource extends Source {
|
|
1261
1256
|
sourceIndex,
|
1262
1257
|
originalLine,
|
1263
1258
|
originalColumn,
|
1264
|
-
nameIndex
|
1259
|
+
nameIndex,
|
1265
1260
|
);
|
1266
1261
|
},
|
1267
1262
|
onSource,
|
1268
|
-
onName
|
1263
|
+
onName,
|
1269
1264
|
);
|
1270
1265
|
return {
|
1271
1266
|
generatedLine,
|
@@ -1275,8 +1270,8 @@ class PrefixSource extends Source {
|
|
1275
1270
|
: prefixOffset + /** @type {number} */ (generatedColumn),
|
1276
1271
|
source:
|
1277
1272
|
source !== undefined
|
1278
|
-
? prefix + source.replace(REPLACE_REGEX,
|
1279
|
-
: undefined
|
1273
|
+
? prefix + source.replace(REPLACE_REGEX, `\n${prefix}`)
|
1274
|
+
: undefined,
|
1280
1275
|
};
|
1281
1276
|
}
|
1282
1277
|
|
@@ -1296,7 +1291,7 @@ module.exports = PrefixSource;
|
|
1296
1291
|
|
1297
1292
|
/***/ }),
|
1298
1293
|
|
1299
|
-
/***/
|
1294
|
+
/***/ 117:
|
1300
1295
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
1301
1296
|
|
1302
1297
|
/*
|
@@ -1306,12 +1301,12 @@ module.exports = PrefixSource;
|
|
1306
1301
|
|
1307
1302
|
|
1308
1303
|
|
1309
|
-
const Source = __nccwpck_require__(
|
1310
|
-
const streamChunksOfRawSource = __nccwpck_require__(
|
1304
|
+
const Source = __nccwpck_require__(733);
|
1305
|
+
const streamChunksOfRawSource = __nccwpck_require__(518);
|
1311
1306
|
const {
|
1312
1307
|
internString,
|
1313
|
-
isDualStringBufferCachingEnabled
|
1314
|
-
} = __nccwpck_require__(
|
1308
|
+
isDualStringBufferCachingEnabled,
|
1309
|
+
} = __nccwpck_require__(780);
|
1315
1310
|
|
1316
1311
|
/** @typedef {import("./Source").HashLike} HashLike */
|
1317
1312
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
@@ -1345,8 +1340,8 @@ class RawSource extends Source {
|
|
1345
1340
|
convertToString && isBuffer
|
1346
1341
|
? undefined
|
1347
1342
|
: typeof value === "string"
|
1348
|
-
|
1349
|
-
|
1343
|
+
? internedString
|
1344
|
+
: value;
|
1350
1345
|
/**
|
1351
1346
|
* @private
|
1352
1347
|
* @type {undefined | Buffer}
|
@@ -1370,7 +1365,7 @@ class RawSource extends Source {
|
|
1370
1365
|
if (this._value === undefined) {
|
1371
1366
|
const value =
|
1372
1367
|
/** @type {Buffer} */
|
1373
|
-
(this._valueAsBuffer).toString("
|
1368
|
+
(this._valueAsBuffer).toString("utf8");
|
1374
1369
|
if (isDualStringBufferCachingEnabled()) {
|
1375
1370
|
this._value = internString(value);
|
1376
1371
|
}
|
@@ -1381,7 +1376,7 @@ class RawSource extends Source {
|
|
1381
1376
|
|
1382
1377
|
buffer() {
|
1383
1378
|
if (this._valueAsBuffer === undefined) {
|
1384
|
-
const value = Buffer.from(/** @type {string} */ (this._value), "
|
1379
|
+
const value = Buffer.from(/** @type {string} */ (this._value), "utf8");
|
1385
1380
|
if (isDualStringBufferCachingEnabled()) {
|
1386
1381
|
this._valueAsBuffer = value;
|
1387
1382
|
}
|
@@ -1394,6 +1389,7 @@ class RawSource extends Source {
|
|
1394
1389
|
* @param {MapOptions=} options map options
|
1395
1390
|
* @returns {RawSourceMap | null} map
|
1396
1391
|
*/
|
1392
|
+
// eslint-disable-next-line no-unused-vars
|
1397
1393
|
map(options) {
|
1398
1394
|
return null;
|
1399
1395
|
}
|
@@ -1409,7 +1405,7 @@ class RawSource extends Source {
|
|
1409
1405
|
let strValue = this._valueAsString;
|
1410
1406
|
if (strValue === undefined) {
|
1411
1407
|
const value = this.source();
|
1412
|
-
strValue = typeof value === "string" ? value : value.toString("
|
1408
|
+
strValue = typeof value === "string" ? value : value.toString("utf8");
|
1413
1409
|
if (isDualStringBufferCachingEnabled()) {
|
1414
1410
|
this._valueAsString = internString(strValue);
|
1415
1411
|
}
|
@@ -1419,7 +1415,7 @@ class RawSource extends Source {
|
|
1419
1415
|
onChunk,
|
1420
1416
|
onSource,
|
1421
1417
|
onName,
|
1422
|
-
|
1418
|
+
Boolean(options && options.finalSource),
|
1423
1419
|
);
|
1424
1420
|
}
|
1425
1421
|
|
@@ -1438,7 +1434,7 @@ module.exports = RawSource;
|
|
1438
1434
|
|
1439
1435
|
/***/ }),
|
1440
1436
|
|
1441
|
-
/***/
|
1437
|
+
/***/ 779:
|
1442
1438
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
1443
1439
|
|
1444
1440
|
/*
|
@@ -1448,10 +1444,10 @@ module.exports = RawSource;
|
|
1448
1444
|
|
1449
1445
|
|
1450
1446
|
|
1451
|
-
const Source = __nccwpck_require__(
|
1452
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
1453
|
-
const splitIntoLines = __nccwpck_require__(
|
1454
|
-
const streamChunks = __nccwpck_require__(
|
1447
|
+
const Source = __nccwpck_require__(733);
|
1448
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(546);
|
1449
|
+
const splitIntoLines = __nccwpck_require__(319);
|
1450
|
+
const streamChunks = __nccwpck_require__(576);
|
1455
1451
|
|
1456
1452
|
/** @typedef {import("./Source").HashLike} HashLike */
|
1457
1453
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
@@ -1523,10 +1519,11 @@ class ReplaceSource extends Source {
|
|
1523
1519
|
* @returns {void}
|
1524
1520
|
*/
|
1525
1521
|
replace(start, end, newValue, name) {
|
1526
|
-
if (typeof newValue !== "string")
|
1522
|
+
if (typeof newValue !== "string") {
|
1527
1523
|
throw new Error(
|
1528
|
-
|
1524
|
+
`insertion must be a string, but is a ${typeof newValue}`,
|
1529
1525
|
);
|
1526
|
+
}
|
1530
1527
|
this._replacements.push(new Replacement(start, end, newValue, name));
|
1531
1528
|
this._isSorted = false;
|
1532
1529
|
}
|
@@ -1538,13 +1535,11 @@ class ReplaceSource extends Source {
|
|
1538
1535
|
* @returns {void}
|
1539
1536
|
*/
|
1540
1537
|
insert(pos, newValue, name) {
|
1541
|
-
if (typeof newValue !== "string")
|
1538
|
+
if (typeof newValue !== "string") {
|
1542
1539
|
throw new Error(
|
1543
|
-
|
1544
|
-
typeof newValue +
|
1545
|
-
": " +
|
1546
|
-
newValue
|
1540
|
+
`insertion must be a string, but is a ${typeof newValue}: ${newValue}`,
|
1547
1541
|
);
|
1542
|
+
}
|
1548
1543
|
this._replacements.push(new Replacement(pos, pos - 1, newValue, name));
|
1549
1544
|
this._isSorted = false;
|
1550
1545
|
}
|
@@ -1610,7 +1605,7 @@ class ReplaceSource extends Source {
|
|
1610
1605
|
_sortReplacements() {
|
1611
1606
|
if (this._isSorted) return;
|
1612
1607
|
if (hasStableSort) {
|
1613
|
-
this._replacements.sort(
|
1608
|
+
this._replacements.sort((a, b) => {
|
1614
1609
|
const diff1 = a.start - b.start;
|
1615
1610
|
if (diff1 !== 0) return diff1;
|
1616
1611
|
const diff2 = a.end - b.end;
|
@@ -1618,8 +1613,8 @@ class ReplaceSource extends Source {
|
|
1618
1613
|
return 0;
|
1619
1614
|
});
|
1620
1615
|
} else {
|
1621
|
-
this._replacements.
|
1622
|
-
this._replacements.sort(
|
1616
|
+
for (const [i, repl] of this._replacements.entries()) repl.index = i;
|
1617
|
+
this._replacements.sort((a, b) => {
|
1623
1618
|
const diff1 = a.start - b.start;
|
1624
1619
|
if (diff1 !== 0) return diff1;
|
1625
1620
|
const diff2 = a.end - b.end;
|
@@ -1644,7 +1639,7 @@ class ReplaceSource extends Source {
|
|
1644
1639
|
const replacements = this._replacements;
|
1645
1640
|
let pos = 0;
|
1646
1641
|
let i = 0;
|
1647
|
-
let
|
1642
|
+
let replacementEnd = -1;
|
1648
1643
|
let nextReplacement =
|
1649
1644
|
i < replacements.length
|
1650
1645
|
? Math.floor(replacements[i].start)
|
@@ -1683,9 +1678,9 @@ class ReplaceSource extends Source {
|
|
1683
1678
|
expectedChunk
|
1684
1679
|
);
|
1685
1680
|
};
|
1686
|
-
|
1681
|
+
const { generatedLine, generatedColumn } = streamChunks(
|
1687
1682
|
this._source,
|
1688
|
-
|
1683
|
+
{ ...options, finalSource: false },
|
1689
1684
|
(
|
1690
1685
|
_chunk,
|
1691
1686
|
generatedLine,
|
@@ -1693,16 +1688,16 @@ class ReplaceSource extends Source {
|
|
1693
1688
|
sourceIndex,
|
1694
1689
|
originalLine,
|
1695
1690
|
originalColumn,
|
1696
|
-
nameIndex
|
1691
|
+
nameIndex,
|
1697
1692
|
) => {
|
1698
1693
|
let chunkPos = 0;
|
1699
1694
|
const chunk = /** @type {string} */ (_chunk);
|
1700
|
-
|
1695
|
+
const endPos = pos + chunk.length;
|
1701
1696
|
|
1702
1697
|
// Skip over when it has been replaced
|
1703
|
-
if (
|
1698
|
+
if (replacementEnd > pos) {
|
1704
1699
|
// Skip over the whole chunk
|
1705
|
-
if (
|
1700
|
+
if (replacementEnd >= endPos) {
|
1706
1701
|
const line = generatedLine + generatedLineOffset;
|
1707
1702
|
if (chunk.endsWith("\n")) {
|
1708
1703
|
generatedLineOffset--;
|
@@ -1721,13 +1716,13 @@ class ReplaceSource extends Source {
|
|
1721
1716
|
}
|
1722
1717
|
|
1723
1718
|
// Partially skip over chunk
|
1724
|
-
chunkPos =
|
1719
|
+
chunkPos = replacementEnd - pos;
|
1725
1720
|
if (
|
1726
1721
|
checkOriginalContent(
|
1727
1722
|
sourceIndex,
|
1728
1723
|
originalLine,
|
1729
1724
|
originalColumn,
|
1730
|
-
chunk.slice(0, chunkPos)
|
1725
|
+
chunk.slice(0, chunkPos),
|
1731
1726
|
)
|
1732
1727
|
) {
|
1733
1728
|
originalColumn += chunkPos;
|
@@ -1763,7 +1758,7 @@ class ReplaceSource extends Source {
|
|
1763
1758
|
originalColumn,
|
1764
1759
|
nameIndex < 0 || nameIndex >= nameIndexMapping.length
|
1765
1760
|
? -1
|
1766
|
-
: nameIndexMapping[nameIndex]
|
1761
|
+
: nameIndexMapping[nameIndex],
|
1767
1762
|
);
|
1768
1763
|
generatedColumn += offset;
|
1769
1764
|
chunkPos += offset;
|
@@ -1773,7 +1768,7 @@ class ReplaceSource extends Source {
|
|
1773
1768
|
sourceIndex,
|
1774
1769
|
originalLine,
|
1775
1770
|
originalColumn,
|
1776
|
-
chunkSlice
|
1771
|
+
chunkSlice,
|
1777
1772
|
)
|
1778
1773
|
) {
|
1779
1774
|
originalColumn += chunkSlice.length;
|
@@ -1782,7 +1777,7 @@ class ReplaceSource extends Source {
|
|
1782
1777
|
|
1783
1778
|
// Insert replacement content splitted into chunks by lines
|
1784
1779
|
const { content, name } = replacements[i];
|
1785
|
-
|
1780
|
+
const matches = splitIntoLines(content);
|
1786
1781
|
let replacementNameIndex = nameIndex;
|
1787
1782
|
if (sourceIndex >= 0 && name) {
|
1788
1783
|
let globalIndex = nameMapping.get(name);
|
@@ -1805,7 +1800,7 @@ class ReplaceSource extends Source {
|
|
1805
1800
|
sourceIndex,
|
1806
1801
|
originalLine,
|
1807
1802
|
originalColumn,
|
1808
|
-
replacementNameIndex
|
1803
|
+
replacementNameIndex,
|
1809
1804
|
);
|
1810
1805
|
|
1811
1806
|
// Only the first chunk has name assigned
|
@@ -1827,12 +1822,12 @@ class ReplaceSource extends Source {
|
|
1827
1822
|
}
|
1828
1823
|
|
1829
1824
|
// Remove replaced content by settings this variable
|
1830
|
-
|
1831
|
-
|
1832
|
-
Math.floor(replacements[i].end + 1)
|
1825
|
+
replacementEnd = Math.max(
|
1826
|
+
replacementEnd,
|
1827
|
+
Math.floor(replacements[i].end + 1),
|
1833
1828
|
);
|
1834
1829
|
|
1835
|
-
// Move to next
|
1830
|
+
// Move to next replacement
|
1836
1831
|
i++;
|
1837
1832
|
nextReplacement =
|
1838
1833
|
i < replacements.length
|
@@ -1840,11 +1835,11 @@ class ReplaceSource extends Source {
|
|
1840
1835
|
: MAX_SOURCE_POSITION;
|
1841
1836
|
|
1842
1837
|
// Skip over when it has been replaced
|
1843
|
-
const offset = chunk.length - endPos +
|
1838
|
+
const offset = chunk.length - endPos + replacementEnd - chunkPos;
|
1844
1839
|
if (offset > 0) {
|
1845
1840
|
// Skip over whole chunk
|
1846
|
-
if (
|
1847
|
-
|
1841
|
+
if (replacementEnd >= endPos) {
|
1842
|
+
const line = generatedLine + generatedLineOffset;
|
1848
1843
|
if (chunk.endsWith("\n")) {
|
1849
1844
|
generatedLineOffset--;
|
1850
1845
|
if (generatedColumnOffsetLine === line) {
|
@@ -1868,7 +1863,7 @@ class ReplaceSource extends Source {
|
|
1868
1863
|
sourceIndex,
|
1869
1864
|
originalLine,
|
1870
1865
|
originalColumn,
|
1871
|
-
chunk.slice(chunkPos, chunkPos + offset)
|
1866
|
+
chunk.slice(chunkPos, chunkPos + offset),
|
1872
1867
|
)
|
1873
1868
|
) {
|
1874
1869
|
originalColumn += offset;
|
@@ -1898,14 +1893,15 @@ class ReplaceSource extends Source {
|
|
1898
1893
|
sourceIndex,
|
1899
1894
|
originalLine,
|
1900
1895
|
originalColumn,
|
1901
|
-
nameIndex < 0 ? -1 : nameIndexMapping[nameIndex]
|
1896
|
+
nameIndex < 0 ? -1 : nameIndexMapping[nameIndex],
|
1902
1897
|
);
|
1903
1898
|
}
|
1904
1899
|
pos = endPos;
|
1905
1900
|
},
|
1906
1901
|
(sourceIndex, source, sourceContent) => {
|
1907
|
-
while (sourceContents.length < sourceIndex)
|
1902
|
+
while (sourceContents.length < sourceIndex) {
|
1908
1903
|
sourceContents.push(undefined);
|
1904
|
+
}
|
1909
1905
|
sourceContents[sourceIndex] = sourceContent;
|
1910
1906
|
onSource(sourceIndex, source, sourceContent);
|
1911
1907
|
},
|
@@ -1917,7 +1913,7 @@ class ReplaceSource extends Source {
|
|
1917
1913
|
onName(globalIndex, name);
|
1918
1914
|
}
|
1919
1915
|
nameIndexMapping[nameIndex] = globalIndex;
|
1920
|
-
}
|
1916
|
+
},
|
1921
1917
|
);
|
1922
1918
|
|
1923
1919
|
// Handle remaining replacements
|
@@ -1928,7 +1924,7 @@ class ReplaceSource extends Source {
|
|
1928
1924
|
|
1929
1925
|
// Insert remaining replacements content splitted into chunks by lines
|
1930
1926
|
let line = /** @type {number} */ (generatedLine) + generatedLineOffset;
|
1931
|
-
|
1927
|
+
const matches = splitIntoLines(remainer);
|
1932
1928
|
for (let m = 0; m < matches.length; m++) {
|
1933
1929
|
const contentLine = matches[m];
|
1934
1930
|
onChunk(
|
@@ -1940,7 +1936,7 @@ class ReplaceSource extends Source {
|
|
1940
1936
|
-1,
|
1941
1937
|
-1,
|
1942
1938
|
-1,
|
1943
|
-
-1
|
1939
|
+
-1,
|
1944
1940
|
);
|
1945
1941
|
|
1946
1942
|
if (m === matches.length - 1 && !contentLine.endsWith("\n")) {
|
@@ -1963,7 +1959,7 @@ class ReplaceSource extends Source {
|
|
1963
1959
|
generatedColumn:
|
1964
1960
|
/** @type {number} */
|
1965
1961
|
(generatedColumn) +
|
1966
|
-
(line === generatedColumnOffsetLine ? generatedColumnOffset : 0)
|
1962
|
+
(line === generatedColumnOffsetLine ? generatedColumnOffset : 0),
|
1967
1963
|
};
|
1968
1964
|
}
|
1969
1965
|
|
@@ -1978,7 +1974,7 @@ class ReplaceSource extends Source {
|
|
1978
1974
|
hash.update(this._name || "");
|
1979
1975
|
for (const repl of this._replacements) {
|
1980
1976
|
hash.update(
|
1981
|
-
`${repl.start}${repl.end}${repl.content}${repl.name ? repl.name : ""}
|
1977
|
+
`${repl.start}${repl.end}${repl.content}${repl.name ? repl.name : ""}`,
|
1982
1978
|
);
|
1983
1979
|
}
|
1984
1980
|
}
|
@@ -1990,7 +1986,7 @@ module.exports.Replacement = Replacement;
|
|
1990
1986
|
|
1991
1987
|
/***/ }),
|
1992
1988
|
|
1993
|
-
/***/
|
1989
|
+
/***/ 702:
|
1994
1990
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
1995
1991
|
|
1996
1992
|
/*
|
@@ -2000,7 +1996,7 @@ module.exports.Replacement = Replacement;
|
|
2000
1996
|
|
2001
1997
|
|
2002
1998
|
|
2003
|
-
const Source = __nccwpck_require__(
|
1999
|
+
const Source = __nccwpck_require__(733);
|
2004
2000
|
|
2005
2001
|
/** @typedef {import("./Source").HashLike} HashLike */
|
2006
2002
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
@@ -2018,7 +2014,7 @@ class SizeOnlySource extends Source {
|
|
2018
2014
|
|
2019
2015
|
_error() {
|
2020
2016
|
return new Error(
|
2021
|
-
"Content and Map of this Source is not available (only size() is supported)"
|
2017
|
+
"Content and Map of this Source is not available (only size() is supported)",
|
2022
2018
|
);
|
2023
2019
|
}
|
2024
2020
|
|
@@ -2044,6 +2040,7 @@ class SizeOnlySource extends Source {
|
|
2044
2040
|
* @param {MapOptions=} options map options
|
2045
2041
|
* @returns {RawSourceMap | null} map
|
2046
2042
|
*/
|
2043
|
+
// eslint-disable-next-line no-unused-vars
|
2047
2044
|
map(options) {
|
2048
2045
|
throw this._error();
|
2049
2046
|
}
|
@@ -2052,6 +2049,7 @@ class SizeOnlySource extends Source {
|
|
2052
2049
|
* @param {HashLike} hash hash
|
2053
2050
|
* @returns {void}
|
2054
2051
|
*/
|
2052
|
+
// eslint-disable-next-line no-unused-vars
|
2055
2053
|
updateHash(hash) {
|
2056
2054
|
throw this._error();
|
2057
2055
|
}
|
@@ -2062,7 +2060,7 @@ module.exports = SizeOnlySource;
|
|
2062
2060
|
|
2063
2061
|
/***/ }),
|
2064
2062
|
|
2065
|
-
/***/
|
2063
|
+
/***/ 733:
|
2066
2064
|
/***/ ((module) => {
|
2067
2065
|
|
2068
2066
|
/*
|
@@ -2074,35 +2072,35 @@ module.exports = SizeOnlySource;
|
|
2074
2072
|
|
2075
2073
|
/**
|
2076
2074
|
* @typedef {object} MapOptions
|
2077
|
-
* @property {boolean=} columns
|
2078
|
-
* @property {boolean=} module
|
2075
|
+
* @property {boolean=} columns need columns?
|
2076
|
+
* @property {boolean=} module is module
|
2079
2077
|
*/
|
2080
2078
|
|
2081
2079
|
/**
|
2082
2080
|
* @typedef {object} RawSourceMap
|
2083
|
-
* @property {number} version
|
2084
|
-
* @property {string[]} sources
|
2085
|
-
* @property {string[]} names
|
2086
|
-
* @property {string=} sourceRoot
|
2087
|
-
* @property {string[]=} sourcesContent
|
2088
|
-
* @property {string} mappings
|
2089
|
-
* @property {string} file
|
2090
|
-
* @property {string=} debugId
|
2091
|
-
* @property {number[]=} ignoreList
|
2081
|
+
* @property {number} version version
|
2082
|
+
* @property {string[]} sources sources
|
2083
|
+
* @property {string[]} names names
|
2084
|
+
* @property {string=} sourceRoot source root
|
2085
|
+
* @property {string[]=} sourcesContent sources content
|
2086
|
+
* @property {string} mappings mappings
|
2087
|
+
* @property {string} file file
|
2088
|
+
* @property {string=} debugId debug id
|
2089
|
+
* @property {number[]=} ignoreList ignore list
|
2092
2090
|
*/
|
2093
2091
|
|
2094
2092
|
/** @typedef {string | Buffer} SourceValue */
|
2095
2093
|
|
2096
2094
|
/**
|
2097
2095
|
* @typedef {object} SourceAndMap
|
2098
|
-
* @property {SourceValue} source
|
2099
|
-
* @property {RawSourceMap | null} map
|
2096
|
+
* @property {SourceValue} source source
|
2097
|
+
* @property {RawSourceMap | null} map map
|
2100
2098
|
*/
|
2101
2099
|
|
2102
2100
|
/**
|
2103
2101
|
* @typedef {object} HashLike
|
2104
|
-
* @property {(data: string | Buffer, inputEncoding?: string) => HashLike} update
|
2105
|
-
* @property {(encoding?: string) => string | Buffer} digest
|
2102
|
+
* @property {(data: string | Buffer, inputEncoding?: string) => HashLike} update make hash update
|
2103
|
+
* @property {(encoding?: string) => string | Buffer} digest get hash digest
|
2106
2104
|
*/
|
2107
2105
|
|
2108
2106
|
class Source {
|
@@ -2116,7 +2114,7 @@ class Source {
|
|
2116
2114
|
buffer() {
|
2117
2115
|
const source = this.source();
|
2118
2116
|
if (Buffer.isBuffer(source)) return source;
|
2119
|
-
return Buffer.from(source, "
|
2117
|
+
return Buffer.from(source, "utf8");
|
2120
2118
|
}
|
2121
2119
|
|
2122
2120
|
size() {
|
@@ -2127,6 +2125,7 @@ class Source {
|
|
2127
2125
|
* @param {MapOptions=} options map options
|
2128
2126
|
* @returns {RawSourceMap | null} map
|
2129
2127
|
*/
|
2128
|
+
// eslint-disable-next-line no-unused-vars
|
2130
2129
|
map(options) {
|
2131
2130
|
return null;
|
2132
2131
|
}
|
@@ -2138,7 +2137,7 @@ class Source {
|
|
2138
2137
|
sourceAndMap(options) {
|
2139
2138
|
return {
|
2140
2139
|
source: this.source(),
|
2141
|
-
map: this.map(options)
|
2140
|
+
map: this.map(options),
|
2142
2141
|
};
|
2143
2142
|
}
|
2144
2143
|
|
@@ -2146,6 +2145,7 @@ class Source {
|
|
2146
2145
|
* @param {HashLike} hash hash
|
2147
2146
|
* @returns {void}
|
2148
2147
|
*/
|
2148
|
+
// eslint-disable-next-line no-unused-vars
|
2149
2149
|
updateHash(hash) {
|
2150
2150
|
throw new Error("Abstract");
|
2151
2151
|
}
|
@@ -2156,7 +2156,7 @@ module.exports = Source;
|
|
2156
2156
|
|
2157
2157
|
/***/ }),
|
2158
2158
|
|
2159
|
-
/***/
|
2159
|
+
/***/ 58:
|
2160
2160
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
2161
2161
|
|
2162
2162
|
/*
|
@@ -2166,13 +2166,13 @@ module.exports = Source;
|
|
2166
2166
|
|
2167
2167
|
|
2168
2168
|
|
2169
|
-
const Source = __nccwpck_require__(
|
2170
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
2171
|
-
const streamChunksOfCombinedSourceMap = __nccwpck_require__(
|
2172
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
2169
|
+
const Source = __nccwpck_require__(733);
|
2170
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(546);
|
2171
|
+
const streamChunksOfCombinedSourceMap = __nccwpck_require__(713);
|
2172
|
+
const streamChunksOfSourceMap = __nccwpck_require__(16);
|
2173
2173
|
const {
|
2174
|
-
isDualStringBufferCachingEnabled
|
2175
|
-
} = __nccwpck_require__(
|
2174
|
+
isDualStringBufferCachingEnabled,
|
2175
|
+
} = __nccwpck_require__(780);
|
2176
2176
|
|
2177
2177
|
/** @typedef {import("./Source").HashLike} HashLike */
|
2178
2178
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
@@ -2200,7 +2200,7 @@ class SourceMapSource extends Source {
|
|
2200
2200
|
sourceMap,
|
2201
2201
|
originalSource,
|
2202
2202
|
innerSourceMap,
|
2203
|
-
removeOriginalSource
|
2203
|
+
removeOriginalSource,
|
2204
2204
|
) {
|
2205
2205
|
super();
|
2206
2206
|
const valueIsBuffer = Buffer.isBuffer(value);
|
@@ -2217,7 +2217,7 @@ class SourceMapSource extends Source {
|
|
2217
2217
|
|
2218
2218
|
this._name = name;
|
2219
2219
|
|
2220
|
-
this._hasSourceMap =
|
2220
|
+
this._hasSourceMap = Boolean(sourceMap);
|
2221
2221
|
const sourceMapIsBuffer = Buffer.isBuffer(sourceMap);
|
2222
2222
|
const sourceMapIsString = typeof sourceMap === "string";
|
2223
2223
|
/**
|
@@ -2237,7 +2237,7 @@ class SourceMapSource extends Source {
|
|
2237
2237
|
*/
|
2238
2238
|
this._sourceMapAsBuffer = sourceMapIsBuffer ? sourceMap : undefined;
|
2239
2239
|
|
2240
|
-
this._hasOriginalSource =
|
2240
|
+
this._hasOriginalSource = Boolean(originalSource);
|
2241
2241
|
const originalSourceIsBuffer = Buffer.isBuffer(originalSource);
|
2242
2242
|
this._originalSourceAsString = originalSourceIsBuffer
|
2243
2243
|
? undefined
|
@@ -2246,7 +2246,7 @@ class SourceMapSource extends Source {
|
|
2246
2246
|
? originalSource
|
2247
2247
|
: undefined;
|
2248
2248
|
|
2249
|
-
this._hasInnerSourceMap =
|
2249
|
+
this._hasInnerSourceMap = Boolean(innerSourceMap);
|
2250
2250
|
const innerSourceMapIsBuffer = Buffer.isBuffer(innerSourceMap);
|
2251
2251
|
const innerSourceMapIsString = typeof innerSourceMap === "string";
|
2252
2252
|
/**
|
@@ -2275,7 +2275,6 @@ class SourceMapSource extends Source {
|
|
2275
2275
|
this._removeOriginalSource = removeOriginalSource;
|
2276
2276
|
}
|
2277
2277
|
|
2278
|
-
// eslint-disable-next-line valid-jsdoc
|
2279
2278
|
/**
|
2280
2279
|
* @returns {[Buffer, string, Buffer, Buffer | undefined, Buffer | undefined, boolean | undefined]} args
|
2281
2280
|
*/
|
@@ -2286,7 +2285,7 @@ class SourceMapSource extends Source {
|
|
2286
2285
|
this._sourceMapBuffer(),
|
2287
2286
|
this._originalSourceBuffer(),
|
2288
2287
|
this._innerSourceMapBuffer(),
|
2289
|
-
this._removeOriginalSource
|
2288
|
+
this._removeOriginalSource,
|
2290
2289
|
];
|
2291
2290
|
}
|
2292
2291
|
|
@@ -2294,7 +2293,7 @@ class SourceMapSource extends Source {
|
|
2294
2293
|
if (this._valueAsBuffer === undefined) {
|
2295
2294
|
const value = Buffer.from(
|
2296
2295
|
/** @type {string} */ (this._valueAsString),
|
2297
|
-
"
|
2296
|
+
"utf8",
|
2298
2297
|
);
|
2299
2298
|
if (isDualStringBufferCachingEnabled()) {
|
2300
2299
|
this._valueAsBuffer = value;
|
@@ -2311,7 +2310,7 @@ class SourceMapSource extends Source {
|
|
2311
2310
|
if (this._valueAsString === undefined) {
|
2312
2311
|
const value =
|
2313
2312
|
/** @type {Buffer} */
|
2314
|
-
(this._valueAsBuffer).toString("
|
2313
|
+
(this._valueAsBuffer).toString("utf8");
|
2315
2314
|
if (isDualStringBufferCachingEnabled()) {
|
2316
2315
|
this._valueAsString = value;
|
2317
2316
|
}
|
@@ -2329,7 +2328,7 @@ class SourceMapSource extends Source {
|
|
2329
2328
|
const value = Buffer.from(
|
2330
2329
|
/** @type {string} */
|
2331
2330
|
(this._originalSourceAsString),
|
2332
|
-
"
|
2331
|
+
"utf8",
|
2333
2332
|
);
|
2334
2333
|
if (isDualStringBufferCachingEnabled()) {
|
2335
2334
|
this._originalSourceAsBuffer = value;
|
@@ -2343,7 +2342,7 @@ class SourceMapSource extends Source {
|
|
2343
2342
|
if (this._originalSourceAsString === undefined && this._hasOriginalSource) {
|
2344
2343
|
const value =
|
2345
2344
|
/** @type {Buffer} */
|
2346
|
-
(this._originalSourceAsBuffer).toString("
|
2345
|
+
(this._originalSourceAsBuffer).toString("utf8");
|
2347
2346
|
if (isDualStringBufferCachingEnabled()) {
|
2348
2347
|
this._originalSourceAsString = value;
|
2349
2348
|
}
|
@@ -2365,7 +2364,7 @@ class SourceMapSource extends Source {
|
|
2365
2364
|
|
2366
2365
|
_innerSourceMapBuffer() {
|
2367
2366
|
if (this._innerSourceMapAsBuffer === undefined && this._hasInnerSourceMap) {
|
2368
|
-
const value = Buffer.from(this._innerSourceMapString(), "
|
2367
|
+
const value = Buffer.from(this._innerSourceMapString(), "utf8");
|
2369
2368
|
if (isDualStringBufferCachingEnabled()) {
|
2370
2369
|
this._innerSourceMapAsBuffer = value;
|
2371
2370
|
}
|
@@ -2381,18 +2380,17 @@ class SourceMapSource extends Source {
|
|
2381
2380
|
_innerSourceMapString() {
|
2382
2381
|
if (this._innerSourceMapAsString === undefined && this._hasInnerSourceMap) {
|
2383
2382
|
if (this._innerSourceMapAsBuffer !== undefined) {
|
2384
|
-
const value = this._innerSourceMapAsBuffer.toString("
|
2385
|
-
if (isDualStringBufferCachingEnabled()) {
|
2386
|
-
this._innerSourceMapAsString = value;
|
2387
|
-
}
|
2388
|
-
return value;
|
2389
|
-
} else {
|
2390
|
-
const value = JSON.stringify(this._innerSourceMapAsObject);
|
2383
|
+
const value = this._innerSourceMapAsBuffer.toString("utf8");
|
2391
2384
|
if (isDualStringBufferCachingEnabled()) {
|
2392
2385
|
this._innerSourceMapAsString = value;
|
2393
2386
|
}
|
2394
2387
|
return value;
|
2395
2388
|
}
|
2389
|
+
const value = JSON.stringify(this._innerSourceMapAsObject);
|
2390
|
+
if (isDualStringBufferCachingEnabled()) {
|
2391
|
+
this._innerSourceMapAsString = value;
|
2392
|
+
}
|
2393
|
+
return value;
|
2396
2394
|
}
|
2397
2395
|
return /** @type {string} */ (this._innerSourceMapAsString);
|
2398
2396
|
}
|
@@ -2410,7 +2408,7 @@ class SourceMapSource extends Source {
|
|
2410
2408
|
|
2411
2409
|
_sourceMapBuffer() {
|
2412
2410
|
if (this._sourceMapAsBuffer === undefined) {
|
2413
|
-
const value = Buffer.from(this._sourceMapString(), "
|
2411
|
+
const value = Buffer.from(this._sourceMapString(), "utf8");
|
2414
2412
|
if (isDualStringBufferCachingEnabled()) {
|
2415
2413
|
this._sourceMapAsBuffer = value;
|
2416
2414
|
}
|
@@ -2422,18 +2420,17 @@ class SourceMapSource extends Source {
|
|
2422
2420
|
_sourceMapString() {
|
2423
2421
|
if (this._sourceMapAsString === undefined) {
|
2424
2422
|
if (this._sourceMapAsBuffer !== undefined) {
|
2425
|
-
const value = this._sourceMapAsBuffer.toString("
|
2426
|
-
if (isDualStringBufferCachingEnabled()) {
|
2427
|
-
this._sourceMapAsString = value;
|
2428
|
-
}
|
2429
|
-
return value;
|
2430
|
-
} else {
|
2431
|
-
const value = JSON.stringify(this._sourceMapAsObject);
|
2423
|
+
const value = this._sourceMapAsBuffer.toString("utf8");
|
2432
2424
|
if (isDualStringBufferCachingEnabled()) {
|
2433
2425
|
this._sourceMapAsString = value;
|
2434
2426
|
}
|
2435
2427
|
return value;
|
2436
2428
|
}
|
2429
|
+
const value = JSON.stringify(this._sourceMapAsObject);
|
2430
|
+
if (isDualStringBufferCachingEnabled()) {
|
2431
|
+
this._sourceMapAsString = value;
|
2432
|
+
}
|
2433
|
+
return value;
|
2437
2434
|
}
|
2438
2435
|
return this._sourceMapAsString;
|
2439
2436
|
}
|
@@ -2457,7 +2454,7 @@ class SourceMapSource extends Source {
|
|
2457
2454
|
if (!this._hasInnerSourceMap) {
|
2458
2455
|
return {
|
2459
2456
|
source: this.source(),
|
2460
|
-
map: this._sourceMapObject()
|
2457
|
+
map: this._sourceMapObject(),
|
2461
2458
|
};
|
2462
2459
|
}
|
2463
2460
|
return getSourceAndMap(this, options);
|
@@ -2484,21 +2481,20 @@ class SourceMapSource extends Source {
|
|
2484
2481
|
onChunk,
|
2485
2482
|
onSource,
|
2486
2483
|
onName,
|
2487
|
-
|
2488
|
-
|
2489
|
-
);
|
2490
|
-
} else {
|
2491
|
-
return streamChunksOfSourceMap(
|
2492
|
-
/** @type {string} */
|
2493
|
-
(this.source()),
|
2494
|
-
this._sourceMapObject(),
|
2495
|
-
onChunk,
|
2496
|
-
onSource,
|
2497
|
-
onName,
|
2498
|
-
!!(options && options.finalSource),
|
2499
|
-
!!(options && options.columns !== false)
|
2484
|
+
Boolean(options && options.finalSource),
|
2485
|
+
Boolean(options && options.columns !== false),
|
2500
2486
|
);
|
2501
2487
|
}
|
2488
|
+
return streamChunksOfSourceMap(
|
2489
|
+
/** @type {string} */
|
2490
|
+
(this.source()),
|
2491
|
+
this._sourceMapObject(),
|
2492
|
+
onChunk,
|
2493
|
+
onSource,
|
2494
|
+
onName,
|
2495
|
+
Boolean(options && options.finalSource),
|
2496
|
+
Boolean(options && options.columns !== false),
|
2497
|
+
);
|
2502
2498
|
}
|
2503
2499
|
|
2504
2500
|
/**
|
@@ -2513,14 +2509,14 @@ class SourceMapSource extends Source {
|
|
2513
2509
|
if (this._hasOriginalSource) {
|
2514
2510
|
hash.update(
|
2515
2511
|
/** @type {Buffer} */
|
2516
|
-
(this._originalSourceBuffer())
|
2512
|
+
(this._originalSourceBuffer()),
|
2517
2513
|
);
|
2518
2514
|
}
|
2519
2515
|
|
2520
2516
|
if (this._hasInnerSourceMap) {
|
2521
2517
|
hash.update(
|
2522
2518
|
/** @type {Buffer} */
|
2523
|
-
(this._innerSourceMapBuffer())
|
2519
|
+
(this._innerSourceMapBuffer()),
|
2524
2520
|
);
|
2525
2521
|
}
|
2526
2522
|
|
@@ -2533,7 +2529,7 @@ module.exports = SourceMapSource;
|
|
2533
2529
|
|
2534
2530
|
/***/ }),
|
2535
2531
|
|
2536
|
-
/***/
|
2532
|
+
/***/ 97:
|
2537
2533
|
/***/ ((module) => {
|
2538
2534
|
|
2539
2535
|
/*
|
@@ -2543,11 +2539,6 @@ module.exports = SourceMapSource;
|
|
2543
2539
|
|
2544
2540
|
|
2545
2541
|
|
2546
|
-
const ALPHABET =
|
2547
|
-
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
2548
|
-
|
2549
|
-
const CONTINUATION_BIT = 0x20;
|
2550
|
-
|
2551
2542
|
/**
|
2552
2543
|
* @callback MappingsSerializer
|
2553
2544
|
* @param {number} generatedLine generated line
|
@@ -2559,17 +2550,11 @@ const CONTINUATION_BIT = 0x20;
|
|
2559
2550
|
* @returns {string} result
|
2560
2551
|
*/
|
2561
2552
|
|
2562
|
-
|
2563
|
-
|
2564
|
-
|
2565
|
-
|
2566
|
-
|
2567
|
-
const createMappingsSerializer = (options) => {
|
2568
|
-
const linesOnly = options && options.columns === false;
|
2569
|
-
return linesOnly
|
2570
|
-
? createLinesOnlyMappingsSerializer()
|
2571
|
-
: createFullMappingsSerializer();
|
2572
|
-
};
|
2553
|
+
const ALPHABET = [
|
2554
|
+
..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
|
2555
|
+
];
|
2556
|
+
|
2557
|
+
const CONTINUATION_BIT = 0x20;
|
2573
2558
|
|
2574
2559
|
const createFullMappingsSerializer = () => {
|
2575
2560
|
let currentLine = 1;
|
@@ -2581,7 +2566,6 @@ const createFullMappingsSerializer = () => {
|
|
2581
2566
|
let activeMapping = false;
|
2582
2567
|
let activeName = false;
|
2583
2568
|
let initial = true;
|
2584
|
-
// eslint-disable-next-line valid-jsdoc
|
2585
2569
|
/** @type {MappingsSerializer} */
|
2586
2570
|
return (
|
2587
2571
|
generatedLine,
|
@@ -2589,7 +2573,7 @@ const createFullMappingsSerializer = () => {
|
|
2589
2573
|
sourceIndex,
|
2590
2574
|
originalLine,
|
2591
2575
|
originalColumn,
|
2592
|
-
nameIndex
|
2576
|
+
nameIndex,
|
2593
2577
|
) => {
|
2594
2578
|
if (activeMapping && currentLine === generatedLine) {
|
2595
2579
|
// A mapping is still active
|
@@ -2603,12 +2587,11 @@ const createFullMappingsSerializer = () => {
|
|
2603
2587
|
// avoid repeating the same original mapping
|
2604
2588
|
return "";
|
2605
2589
|
}
|
2606
|
-
}
|
2607
|
-
|
2608
|
-
|
2609
|
-
|
2610
|
-
|
2611
|
-
}
|
2590
|
+
}
|
2591
|
+
// No mapping is active
|
2592
|
+
else if (sourceIndex < 0) {
|
2593
|
+
// avoid writing unneccessary generated mappings
|
2594
|
+
return "";
|
2612
2595
|
}
|
2613
2596
|
|
2614
2597
|
/** @type {undefined | string} */
|
@@ -2682,7 +2665,6 @@ const createLinesOnlyMappingsSerializer = () => {
|
|
2682
2665
|
let currentLine = 1;
|
2683
2666
|
let currentSourceIndex = 0;
|
2684
2667
|
let currentOriginalLine = 1;
|
2685
|
-
// eslint-disable-next-line valid-jsdoc
|
2686
2668
|
/** @type {MappingsSerializer} */
|
2687
2669
|
return (
|
2688
2670
|
generatedLine,
|
@@ -2690,7 +2672,7 @@ const createLinesOnlyMappingsSerializer = () => {
|
|
2690
2672
|
sourceIndex,
|
2691
2673
|
originalLine,
|
2692
2674
|
_originalColumn,
|
2693
|
-
_nameIndex
|
2675
|
+
_nameIndex,
|
2694
2676
|
) => {
|
2695
2677
|
if (sourceIndex < 0) {
|
2696
2678
|
// avoid writing generated mappings at all
|
@@ -2729,52 +2711,58 @@ const createLinesOnlyMappingsSerializer = () => {
|
|
2729
2711
|
if (originalLine === currentOriginalLine + 1) {
|
2730
2712
|
currentOriginalLine = originalLine;
|
2731
2713
|
return ";AACA";
|
2732
|
-
} else {
|
2733
|
-
str = ";AA";
|
2734
|
-
writeValue(originalLine - currentOriginalLine);
|
2735
|
-
currentOriginalLine = originalLine;
|
2736
|
-
return str + "A";
|
2737
2714
|
}
|
2738
|
-
|
2739
|
-
str = ";A";
|
2740
|
-
writeValue(sourceIndex - currentSourceIndex);
|
2741
|
-
currentSourceIndex = sourceIndex;
|
2715
|
+
str = ";AA";
|
2742
2716
|
writeValue(originalLine - currentOriginalLine);
|
2743
2717
|
currentOriginalLine = originalLine;
|
2744
|
-
return str
|
2718
|
+
return `${str}A`;
|
2745
2719
|
}
|
2746
|
-
|
2747
|
-
|
2748
|
-
|
2749
|
-
|
2750
|
-
|
2751
|
-
|
2752
|
-
|
2753
|
-
|
2754
|
-
|
2755
|
-
|
2756
|
-
|
2757
|
-
return str + "A";
|
2758
|
-
}
|
2759
|
-
} else {
|
2760
|
-
str += "A";
|
2761
|
-
writeValue(sourceIndex - currentSourceIndex);
|
2762
|
-
currentSourceIndex = sourceIndex;
|
2763
|
-
writeValue(originalLine - currentOriginalLine);
|
2720
|
+
str = ";A";
|
2721
|
+
writeValue(sourceIndex - currentSourceIndex);
|
2722
|
+
currentSourceIndex = sourceIndex;
|
2723
|
+
writeValue(originalLine - currentOriginalLine);
|
2724
|
+
currentOriginalLine = originalLine;
|
2725
|
+
return `${str}A`;
|
2726
|
+
}
|
2727
|
+
str = ";".repeat(generatedLine - currentLine);
|
2728
|
+
currentLine = generatedLine;
|
2729
|
+
if (sourceIndex === currentSourceIndex) {
|
2730
|
+
if (originalLine === currentOriginalLine + 1) {
|
2764
2731
|
currentOriginalLine = originalLine;
|
2765
|
-
return str
|
2732
|
+
return `${str}AACA`;
|
2766
2733
|
}
|
2734
|
+
str += "AA";
|
2735
|
+
writeValue(originalLine - currentOriginalLine);
|
2736
|
+
currentOriginalLine = originalLine;
|
2737
|
+
return `${str}A`;
|
2767
2738
|
}
|
2739
|
+
str += "A";
|
2740
|
+
writeValue(sourceIndex - currentSourceIndex);
|
2741
|
+
currentSourceIndex = sourceIndex;
|
2742
|
+
writeValue(originalLine - currentOriginalLine);
|
2743
|
+
currentOriginalLine = originalLine;
|
2744
|
+
return `${str}A`;
|
2768
2745
|
};
|
2769
2746
|
};
|
2770
2747
|
|
2748
|
+
/**
|
2749
|
+
* @param {{ columns?: boolean }=} options options
|
2750
|
+
* @returns {MappingsSerializer} mappings serializer
|
2751
|
+
*/
|
2752
|
+
const createMappingsSerializer = (options) => {
|
2753
|
+
const linesOnly = options && options.columns === false;
|
2754
|
+
return linesOnly
|
2755
|
+
? createLinesOnlyMappingsSerializer()
|
2756
|
+
: createFullMappingsSerializer();
|
2757
|
+
};
|
2758
|
+
|
2771
2759
|
module.exports = createMappingsSerializer;
|
2772
2760
|
|
2773
2761
|
|
2774
2762
|
/***/ }),
|
2775
2763
|
|
2776
|
-
/***/
|
2777
|
-
/***/ ((
|
2764
|
+
/***/ 546:
|
2765
|
+
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
2778
2766
|
|
2779
2767
|
/*
|
2780
2768
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
@@ -2783,7 +2771,7 @@ module.exports = createMappingsSerializer;
|
|
2783
2771
|
|
2784
2772
|
|
2785
2773
|
|
2786
|
-
const createMappingsSerializer = __nccwpck_require__(
|
2774
|
+
const createMappingsSerializer = __nccwpck_require__(97);
|
2787
2775
|
|
2788
2776
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
2789
2777
|
/** @typedef {import("../Source").SourceAndMap} SourceAndMap */
|
@@ -2797,18 +2785,18 @@ const createMappingsSerializer = __nccwpck_require__(108);
|
|
2797
2785
|
* @param {Options=} options options
|
2798
2786
|
* @returns {SourceAndMap} map
|
2799
2787
|
*/
|
2800
|
-
exports.getSourceAndMap = (inputSource, options) => {
|
2788
|
+
module.exports.getSourceAndMap = (inputSource, options) => {
|
2801
2789
|
let code = "";
|
2802
2790
|
let mappings = "";
|
2803
2791
|
/** @type {(string | null)[]} */
|
2804
|
-
|
2792
|
+
const potentialSources = [];
|
2805
2793
|
/** @type {(string | null)[]} */
|
2806
|
-
|
2794
|
+
const potentialSourcesContent = [];
|
2807
2795
|
/** @type {(string | null)[]} */
|
2808
|
-
|
2796
|
+
const potentialNames = [];
|
2809
2797
|
const addMapping = createMappingsSerializer(options);
|
2810
2798
|
const { source } = inputSource.streamChunks(
|
2811
|
-
|
2799
|
+
{ ...options, finalSource: true },
|
2812
2800
|
(
|
2813
2801
|
chunk,
|
2814
2802
|
generatedLine,
|
@@ -2816,7 +2804,7 @@ exports.getSourceAndMap = (inputSource, options) => {
|
|
2816
2804
|
sourceIndex,
|
2817
2805
|
originalLine,
|
2818
2806
|
originalColumn,
|
2819
|
-
nameIndex
|
2807
|
+
nameIndex,
|
2820
2808
|
) => {
|
2821
2809
|
if (chunk !== undefined) code += chunk;
|
2822
2810
|
mappings += addMapping(
|
@@ -2825,27 +2813,27 @@ exports.getSourceAndMap = (inputSource, options) => {
|
|
2825
2813
|
sourceIndex,
|
2826
2814
|
originalLine,
|
2827
2815
|
originalColumn,
|
2828
|
-
nameIndex
|
2816
|
+
nameIndex,
|
2829
2817
|
);
|
2830
2818
|
},
|
2831
2819
|
(sourceIndex, source, sourceContent) => {
|
2832
|
-
while (
|
2833
|
-
|
2820
|
+
while (potentialSources.length < sourceIndex) {
|
2821
|
+
potentialSources.push(null);
|
2834
2822
|
}
|
2835
|
-
|
2823
|
+
potentialSources[sourceIndex] = source;
|
2836
2824
|
if (sourceContent !== undefined) {
|
2837
|
-
while (
|
2838
|
-
|
2825
|
+
while (potentialSourcesContent.length < sourceIndex) {
|
2826
|
+
potentialSourcesContent.push(null);
|
2839
2827
|
}
|
2840
|
-
|
2828
|
+
potentialSourcesContent[sourceIndex] = sourceContent;
|
2841
2829
|
}
|
2842
2830
|
},
|
2843
2831
|
(nameIndex, name) => {
|
2844
|
-
while (
|
2845
|
-
|
2832
|
+
while (potentialNames.length < nameIndex) {
|
2833
|
+
potentialNames.push(null);
|
2846
2834
|
}
|
2847
|
-
|
2848
|
-
}
|
2835
|
+
potentialNames[nameIndex] = name;
|
2836
|
+
},
|
2849
2837
|
);
|
2850
2838
|
return {
|
2851
2839
|
source: source !== undefined ? source : code,
|
@@ -2856,14 +2844,14 @@ exports.getSourceAndMap = (inputSource, options) => {
|
|
2856
2844
|
file: "x",
|
2857
2845
|
mappings,
|
2858
2846
|
// 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
|
2859
|
-
sources: /** @type {string[]} */ (
|
2847
|
+
sources: /** @type {string[]} */ (potentialSources),
|
2860
2848
|
sourcesContent:
|
2861
|
-
|
2862
|
-
? /** @type {string[]} */ (
|
2849
|
+
potentialSourcesContent.length > 0
|
2850
|
+
? /** @type {string[]} */ (potentialSourcesContent)
|
2863
2851
|
: undefined,
|
2864
|
-
names: /** @type {string[]} */ (
|
2865
|
-
|
2866
|
-
: null
|
2852
|
+
names: /** @type {string[]} */ (potentialNames),
|
2853
|
+
}
|
2854
|
+
: null,
|
2867
2855
|
};
|
2868
2856
|
};
|
2869
2857
|
|
@@ -2872,17 +2860,17 @@ exports.getSourceAndMap = (inputSource, options) => {
|
|
2872
2860
|
* @param {Options=} options options
|
2873
2861
|
* @returns {RawSourceMap | null} map
|
2874
2862
|
*/
|
2875
|
-
exports.getMap = (source, options) => {
|
2863
|
+
module.exports.getMap = (source, options) => {
|
2876
2864
|
let mappings = "";
|
2877
2865
|
/** @type {(string | null)[]} */
|
2878
|
-
|
2866
|
+
const potentialSources = [];
|
2879
2867
|
/** @type {(string | null)[]} */
|
2880
|
-
|
2868
|
+
const potentialSourcesContent = [];
|
2881
2869
|
/** @type {(string | null)[]} */
|
2882
|
-
|
2870
|
+
const potentialNames = [];
|
2883
2871
|
const addMapping = createMappingsSerializer(options);
|
2884
2872
|
source.streamChunks(
|
2885
|
-
|
2873
|
+
{ ...options, source: false, finalSource: true },
|
2886
2874
|
(
|
2887
2875
|
chunk,
|
2888
2876
|
generatedLine,
|
@@ -2890,7 +2878,7 @@ exports.getMap = (source, options) => {
|
|
2890
2878
|
sourceIndex,
|
2891
2879
|
originalLine,
|
2892
2880
|
originalColumn,
|
2893
|
-
nameIndex
|
2881
|
+
nameIndex,
|
2894
2882
|
) => {
|
2895
2883
|
mappings += addMapping(
|
2896
2884
|
generatedLine,
|
@@ -2898,27 +2886,27 @@ exports.getMap = (source, options) => {
|
|
2898
2886
|
sourceIndex,
|
2899
2887
|
originalLine,
|
2900
2888
|
originalColumn,
|
2901
|
-
nameIndex
|
2889
|
+
nameIndex,
|
2902
2890
|
);
|
2903
2891
|
},
|
2904
2892
|
(sourceIndex, source, sourceContent) => {
|
2905
|
-
while (
|
2906
|
-
|
2893
|
+
while (potentialSources.length < sourceIndex) {
|
2894
|
+
potentialSources.push(null);
|
2907
2895
|
}
|
2908
|
-
|
2896
|
+
potentialSources[sourceIndex] = source;
|
2909
2897
|
if (sourceContent !== undefined) {
|
2910
|
-
while (
|
2911
|
-
|
2898
|
+
while (potentialSourcesContent.length < sourceIndex) {
|
2899
|
+
potentialSourcesContent.push(null);
|
2912
2900
|
}
|
2913
|
-
|
2901
|
+
potentialSourcesContent[sourceIndex] = sourceContent;
|
2914
2902
|
}
|
2915
2903
|
},
|
2916
2904
|
(nameIndex, name) => {
|
2917
|
-
while (
|
2918
|
-
|
2905
|
+
while (potentialNames.length < nameIndex) {
|
2906
|
+
potentialNames.push(null);
|
2919
2907
|
}
|
2920
|
-
|
2921
|
-
}
|
2908
|
+
potentialNames[nameIndex] = name;
|
2909
|
+
},
|
2922
2910
|
);
|
2923
2911
|
return mappings.length > 0
|
2924
2912
|
? {
|
@@ -2926,20 +2914,20 @@ exports.getMap = (source, options) => {
|
|
2926
2914
|
file: "x",
|
2927
2915
|
mappings,
|
2928
2916
|
// 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
|
2929
|
-
sources: /** @type {string[]} */ (
|
2917
|
+
sources: /** @type {string[]} */ (potentialSources),
|
2930
2918
|
sourcesContent:
|
2931
|
-
|
2932
|
-
? /** @type {string[]} */ (
|
2919
|
+
potentialSourcesContent.length > 0
|
2920
|
+
? /** @type {string[]} */ (potentialSourcesContent)
|
2933
2921
|
: undefined,
|
2934
|
-
names: /** @type {string[]} */ (
|
2935
|
-
|
2922
|
+
names: /** @type {string[]} */ (potentialNames),
|
2923
|
+
}
|
2936
2924
|
: null;
|
2937
2925
|
};
|
2938
2926
|
|
2939
2927
|
|
2940
2928
|
/***/ }),
|
2941
2929
|
|
2942
|
-
/***/
|
2930
|
+
/***/ 42:
|
2943
2931
|
/***/ ((module) => {
|
2944
2932
|
|
2945
2933
|
/*
|
@@ -2953,9 +2941,9 @@ const CHAR_CODE_NEW_LINE = "\n".charCodeAt(0);
|
|
2953
2941
|
|
2954
2942
|
/**
|
2955
2943
|
* @typedef {object} GeneratedSourceInfo
|
2956
|
-
* @property {number=} generatedLine
|
2957
|
-
* @property {number=} generatedColumn
|
2958
|
-
* @property {string=} source
|
2944
|
+
* @property {number=} generatedLine generated line
|
2945
|
+
* @property {number=} generatedColumn generated column
|
2946
|
+
* @property {string=} source source
|
2959
2947
|
*/
|
2960
2948
|
|
2961
2949
|
/**
|
@@ -2971,7 +2959,7 @@ const getGeneratedSourceInfo = (source) => {
|
|
2971
2959
|
return {
|
2972
2960
|
generatedLine: 1,
|
2973
2961
|
generatedColumn: source.length,
|
2974
|
-
source
|
2962
|
+
source,
|
2975
2963
|
};
|
2976
2964
|
}
|
2977
2965
|
let generatedLine = 2;
|
@@ -2981,7 +2969,7 @@ const getGeneratedSourceInfo = (source) => {
|
|
2981
2969
|
return {
|
2982
2970
|
generatedLine,
|
2983
2971
|
generatedColumn: source.length - lastLineStart - 1,
|
2984
|
-
source
|
2972
|
+
source,
|
2985
2973
|
};
|
2986
2974
|
};
|
2987
2975
|
|
@@ -2990,7 +2978,7 @@ module.exports = getGeneratedSourceInfo;
|
|
2990
2978
|
|
2991
2979
|
/***/ }),
|
2992
2980
|
|
2993
|
-
/***/
|
2981
|
+
/***/ 333:
|
2994
2982
|
/***/ ((module) => {
|
2995
2983
|
|
2996
2984
|
/*
|
@@ -3013,7 +3001,7 @@ const getSource = (sourceMap, index) => {
|
|
3013
3001
|
const source = sources[index];
|
3014
3002
|
if (!sourceRoot) return source;
|
3015
3003
|
if (sourceRoot.endsWith("/")) return sourceRoot + source;
|
3016
|
-
return sourceRoot
|
3004
|
+
return `${sourceRoot}/${source}`;
|
3017
3005
|
};
|
3018
3006
|
|
3019
3007
|
module.exports = getSource;
|
@@ -3021,7 +3009,7 @@ module.exports = getSource;
|
|
3021
3009
|
|
3022
3010
|
/***/ }),
|
3023
3011
|
|
3024
|
-
/***/
|
3012
|
+
/***/ 125:
|
3025
3013
|
/***/ ((module) => {
|
3026
3014
|
|
3027
3015
|
/*
|
@@ -3041,17 +3029,19 @@ const INVALID = END_SEGMENT_BIT | 0x02;
|
|
3041
3029
|
const DATA_MASK = 0x1f;
|
3042
3030
|
|
3043
3031
|
const ccToValue = new Uint8Array("z".charCodeAt(0) + 1);
|
3044
|
-
|
3045
|
-
|
3046
|
-
|
3047
|
-
|
3048
|
-
|
3049
|
-
ccToValue[",".charCodeAt(0)] = END_SEGMENT_BIT;
|
3050
|
-
ccToValue[";".charCodeAt(0)] = NEXT_LINE;
|
3032
|
+
|
3033
|
+
ccToValue.fill(INVALID);
|
3034
|
+
|
3035
|
+
for (let i = 0; i < ALPHABET.length; i++) {
|
3036
|
+
ccToValue[ALPHABET.charCodeAt(i)] = i;
|
3051
3037
|
}
|
3038
|
+
|
3039
|
+
ccToValue[",".charCodeAt(0)] = END_SEGMENT_BIT;
|
3040
|
+
ccToValue[";".charCodeAt(0)] = NEXT_LINE;
|
3041
|
+
|
3052
3042
|
const ccMax = ccToValue.length - 1;
|
3053
3043
|
|
3054
|
-
/** @typedef {
|
3044
|
+
/** @typedef {(generatedLine: number, generatedColumn: number, sourceIndex: number, originalLine: number, originalColumn: number, nameIndex: number) => void} OnMapping */
|
3055
3045
|
|
3056
3046
|
/**
|
3057
3047
|
* @param {string} mappings the mappings string
|
@@ -3083,7 +3073,7 @@ const readMappings = (mappings, onMapping) => {
|
|
3083
3073
|
currentData[1],
|
3084
3074
|
currentData[2],
|
3085
3075
|
currentData[3],
|
3086
|
-
-1
|
3076
|
+
-1,
|
3087
3077
|
);
|
3088
3078
|
} else if (currentDataPos === 5) {
|
3089
3079
|
onMapping(
|
@@ -3092,10 +3082,10 @@ const readMappings = (mappings, onMapping) => {
|
|
3092
3082
|
currentData[1],
|
3093
3083
|
currentData[2],
|
3094
3084
|
currentData[3],
|
3095
|
-
currentData[4]
|
3085
|
+
currentData[4],
|
3096
3086
|
);
|
3097
3087
|
}
|
3098
|
-
generatedColumn = currentData
|
3088
|
+
[generatedColumn] = currentData;
|
3099
3089
|
}
|
3100
3090
|
currentDataPos = 0;
|
3101
3091
|
if (value === NEXT_LINE) {
|
@@ -3127,7 +3117,7 @@ const readMappings = (mappings, onMapping) => {
|
|
3127
3117
|
currentData[1],
|
3128
3118
|
currentData[2],
|
3129
3119
|
currentData[3],
|
3130
|
-
-1
|
3120
|
+
-1,
|
3131
3121
|
);
|
3132
3122
|
} else if (currentDataPos === 5) {
|
3133
3123
|
onMapping(
|
@@ -3136,7 +3126,7 @@ const readMappings = (mappings, onMapping) => {
|
|
3136
3126
|
currentData[1],
|
3137
3127
|
currentData[2],
|
3138
3128
|
currentData[3],
|
3139
|
-
currentData[4]
|
3129
|
+
currentData[4],
|
3140
3130
|
);
|
3141
3131
|
}
|
3142
3132
|
};
|
@@ -3146,7 +3136,7 @@ module.exports = readMappings;
|
|
3146
3136
|
|
3147
3137
|
/***/ }),
|
3148
3138
|
|
3149
|
-
/***/
|
3139
|
+
/***/ 319:
|
3150
3140
|
/***/ ((module) => {
|
3151
3141
|
|
3152
3142
|
/*
|
@@ -3164,7 +3154,7 @@ const splitIntoLines = (str) => {
|
|
3164
3154
|
const results = [];
|
3165
3155
|
const len = str.length;
|
3166
3156
|
let i = 0;
|
3167
|
-
|
3157
|
+
while (i < len) {
|
3168
3158
|
const cc = str.charCodeAt(i);
|
3169
3159
|
// 10 is "\n".charCodeAt(0)
|
3170
3160
|
if (cc === 10) {
|
@@ -3186,7 +3176,7 @@ module.exports = splitIntoLines;
|
|
3186
3176
|
|
3187
3177
|
/***/ }),
|
3188
3178
|
|
3189
|
-
/***/
|
3179
|
+
/***/ 12:
|
3190
3180
|
/***/ ((module) => {
|
3191
3181
|
|
3192
3182
|
/*
|
@@ -3213,8 +3203,8 @@ const splitIntoPotentialTokens = (str) => {
|
|
3213
3203
|
if (len === 0) return null;
|
3214
3204
|
const results = [];
|
3215
3205
|
let i = 0;
|
3216
|
-
|
3217
|
-
const
|
3206
|
+
while (i < len) {
|
3207
|
+
const start = i;
|
3218
3208
|
block: {
|
3219
3209
|
let cc = str.charCodeAt(i);
|
3220
3210
|
while (cc !== 10 && cc !== 59 && cc !== 123 && cc !== 125) {
|
@@ -3236,7 +3226,7 @@ const splitIntoPotentialTokens = (str) => {
|
|
3236
3226
|
i++;
|
3237
3227
|
}
|
3238
3228
|
}
|
3239
|
-
results.push(str.slice(
|
3229
|
+
results.push(str.slice(start, i));
|
3240
3230
|
}
|
3241
3231
|
return results;
|
3242
3232
|
};
|
@@ -3246,7 +3236,7 @@ module.exports = splitIntoPotentialTokens;
|
|
3246
3236
|
|
3247
3237
|
/***/ }),
|
3248
3238
|
|
3249
|
-
/***/
|
3239
|
+
/***/ 545:
|
3250
3240
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
3251
3241
|
|
3252
3242
|
/*
|
@@ -3256,8 +3246,8 @@ module.exports = splitIntoPotentialTokens;
|
|
3256
3246
|
|
3257
3247
|
|
3258
3248
|
|
3259
|
-
const createMappingsSerializer = __nccwpck_require__(
|
3260
|
-
const streamChunks = __nccwpck_require__(
|
3249
|
+
const createMappingsSerializer = __nccwpck_require__(97);
|
3250
|
+
const streamChunks = __nccwpck_require__(576);
|
3261
3251
|
|
3262
3252
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
3263
3253
|
/** @typedef {import("./streamChunks").GeneratedSourceInfo} GeneratedSourceInfo */
|
@@ -3267,7 +3257,6 @@ const streamChunks = __nccwpck_require__(789);
|
|
3267
3257
|
/** @typedef {import("./streamChunks").Options} Options */
|
3268
3258
|
/** @typedef {import("./streamChunks").SourceMaybeWithStreamChunksFunction} SourceMaybeWithStreamChunksFunction */
|
3269
3259
|
|
3270
|
-
// eslint-disable-next-line valid-jsdoc
|
3271
3260
|
/**
|
3272
3261
|
* @param {SourceMaybeWithStreamChunksFunction} inputSource input source
|
3273
3262
|
* @param {Options} options options
|
@@ -3281,20 +3270,18 @@ const streamAndGetSourceAndMap = (
|
|
3281
3270
|
options,
|
3282
3271
|
onChunk,
|
3283
3272
|
onSource,
|
3284
|
-
onName
|
3273
|
+
onName,
|
3285
3274
|
) => {
|
3286
3275
|
let code = "";
|
3287
3276
|
let mappings = "";
|
3288
3277
|
/** @type {(string | null)[]} */
|
3289
|
-
|
3278
|
+
const potentialSources = [];
|
3290
3279
|
/** @type {(string | null)[]} */
|
3291
|
-
|
3280
|
+
const potentialSourcesContent = [];
|
3292
3281
|
/** @type {(string | null)[]} */
|
3293
|
-
|
3294
|
-
const addMapping = createMappingsSerializer(
|
3295
|
-
|
3296
|
-
);
|
3297
|
-
const finalSource = !!(options && options.finalSource);
|
3282
|
+
const potentialNames = [];
|
3283
|
+
const addMapping = createMappingsSerializer({ ...options, columns: true });
|
3284
|
+
const finalSource = Boolean(options && options.finalSource);
|
3298
3285
|
const { generatedLine, generatedColumn, source } = streamChunks(
|
3299
3286
|
inputSource,
|
3300
3287
|
options,
|
@@ -3305,7 +3292,7 @@ const streamAndGetSourceAndMap = (
|
|
3305
3292
|
sourceIndex,
|
3306
3293
|
originalLine,
|
3307
3294
|
originalColumn,
|
3308
|
-
nameIndex
|
3295
|
+
nameIndex,
|
3309
3296
|
) => {
|
3310
3297
|
if (chunk !== undefined) code += chunk;
|
3311
3298
|
mappings += addMapping(
|
@@ -3314,7 +3301,7 @@ const streamAndGetSourceAndMap = (
|
|
3314
3301
|
sourceIndex,
|
3315
3302
|
originalLine,
|
3316
3303
|
originalColumn,
|
3317
|
-
nameIndex
|
3304
|
+
nameIndex,
|
3318
3305
|
);
|
3319
3306
|
return onChunk(
|
3320
3307
|
finalSource ? undefined : chunk,
|
@@ -3323,29 +3310,29 @@ const streamAndGetSourceAndMap = (
|
|
3323
3310
|
sourceIndex,
|
3324
3311
|
originalLine,
|
3325
3312
|
originalColumn,
|
3326
|
-
nameIndex
|
3313
|
+
nameIndex,
|
3327
3314
|
);
|
3328
3315
|
},
|
3329
3316
|
(sourceIndex, source, sourceContent) => {
|
3330
|
-
while (
|
3331
|
-
|
3317
|
+
while (potentialSources.length < sourceIndex) {
|
3318
|
+
potentialSources.push(null);
|
3332
3319
|
}
|
3333
|
-
|
3320
|
+
potentialSources[sourceIndex] = source;
|
3334
3321
|
if (sourceContent !== undefined) {
|
3335
|
-
while (
|
3336
|
-
|
3322
|
+
while (potentialSourcesContent.length < sourceIndex) {
|
3323
|
+
potentialSourcesContent.push(null);
|
3337
3324
|
}
|
3338
|
-
|
3325
|
+
potentialSourcesContent[sourceIndex] = sourceContent;
|
3339
3326
|
}
|
3340
3327
|
return onSource(sourceIndex, source, sourceContent);
|
3341
3328
|
},
|
3342
3329
|
(nameIndex, name) => {
|
3343
|
-
while (
|
3344
|
-
|
3330
|
+
while (potentialNames.length < nameIndex) {
|
3331
|
+
potentialNames.push(null);
|
3345
3332
|
}
|
3346
|
-
|
3333
|
+
potentialNames[nameIndex] = name;
|
3347
3334
|
return onName(nameIndex, name);
|
3348
|
-
}
|
3335
|
+
},
|
3349
3336
|
);
|
3350
3337
|
const resultSource = source !== undefined ? source : code;
|
3351
3338
|
|
@@ -3353,7 +3340,7 @@ const streamAndGetSourceAndMap = (
|
|
3353
3340
|
result: {
|
3354
3341
|
generatedLine,
|
3355
3342
|
generatedColumn,
|
3356
|
-
source: finalSource ? resultSource : undefined
|
3343
|
+
source: finalSource ? resultSource : undefined,
|
3357
3344
|
},
|
3358
3345
|
source: resultSource,
|
3359
3346
|
map:
|
@@ -3363,14 +3350,14 @@ const streamAndGetSourceAndMap = (
|
|
3363
3350
|
file: "x",
|
3364
3351
|
mappings,
|
3365
3352
|
// 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
|
3366
|
-
sources: /** @type {string[]} */ (
|
3353
|
+
sources: /** @type {string[]} */ (potentialSources),
|
3367
3354
|
sourcesContent:
|
3368
|
-
|
3369
|
-
? /** @type {string[]} */ (
|
3355
|
+
potentialSourcesContent.length > 0
|
3356
|
+
? /** @type {string[]} */ (potentialSourcesContent)
|
3370
3357
|
: undefined,
|
3371
|
-
names: /** @type {string[]} */ (
|
3372
|
-
|
3373
|
-
: null
|
3358
|
+
names: /** @type {string[]} */ (potentialNames),
|
3359
|
+
}
|
3360
|
+
: null,
|
3374
3361
|
};
|
3375
3362
|
};
|
3376
3363
|
|
@@ -3379,7 +3366,7 @@ module.exports = streamAndGetSourceAndMap;
|
|
3379
3366
|
|
3380
3367
|
/***/ }),
|
3381
3368
|
|
3382
|
-
/***/
|
3369
|
+
/***/ 576:
|
3383
3370
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
3384
3371
|
|
3385
3372
|
/*
|
@@ -3389,8 +3376,8 @@ module.exports = streamAndGetSourceAndMap;
|
|
3389
3376
|
|
3390
3377
|
|
3391
3378
|
|
3392
|
-
const streamChunksOfRawSource = __nccwpck_require__(
|
3393
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
3379
|
+
const streamChunksOfRawSource = __nccwpck_require__(518);
|
3380
|
+
const streamChunksOfSourceMap = __nccwpck_require__(16);
|
3394
3381
|
|
3395
3382
|
/** @typedef {import("../Source")} Source */
|
3396
3383
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
@@ -3421,36 +3408,34 @@ const streamChunksOfSourceMap = __nccwpck_require__(991);
|
|
3421
3408
|
module.exports = (source, options, onChunk, onSource, onName) => {
|
3422
3409
|
if (typeof source.streamChunks === "function") {
|
3423
3410
|
return source.streamChunks(options, onChunk, onSource, onName);
|
3424
|
-
} else {
|
3425
|
-
const sourceAndMap = source.sourceAndMap(options);
|
3426
|
-
if (sourceAndMap.map) {
|
3427
|
-
return streamChunksOfSourceMap(
|
3428
|
-
/** @type {string} */
|
3429
|
-
(sourceAndMap.source),
|
3430
|
-
sourceAndMap.map,
|
3431
|
-
onChunk,
|
3432
|
-
onSource,
|
3433
|
-
onName,
|
3434
|
-
!!(options && options.finalSource),
|
3435
|
-
!!(options && options.columns !== false)
|
3436
|
-
);
|
3437
|
-
} else {
|
3438
|
-
return streamChunksOfRawSource(
|
3439
|
-
/** @type {string} */
|
3440
|
-
(sourceAndMap.source),
|
3441
|
-
onChunk,
|
3442
|
-
onSource,
|
3443
|
-
onName,
|
3444
|
-
!!(options && options.finalSource)
|
3445
|
-
);
|
3446
|
-
}
|
3447
3411
|
}
|
3412
|
+
const sourceAndMap = source.sourceAndMap(options);
|
3413
|
+
if (sourceAndMap.map) {
|
3414
|
+
return streamChunksOfSourceMap(
|
3415
|
+
/** @type {string} */
|
3416
|
+
(sourceAndMap.source),
|
3417
|
+
sourceAndMap.map,
|
3418
|
+
onChunk,
|
3419
|
+
onSource,
|
3420
|
+
onName,
|
3421
|
+
Boolean(options && options.finalSource),
|
3422
|
+
Boolean(options && options.columns !== false),
|
3423
|
+
);
|
3424
|
+
}
|
3425
|
+
return streamChunksOfRawSource(
|
3426
|
+
/** @type {string} */
|
3427
|
+
(sourceAndMap.source),
|
3428
|
+
onChunk,
|
3429
|
+
onSource,
|
3430
|
+
onName,
|
3431
|
+
Boolean(options && options.finalSource),
|
3432
|
+
);
|
3448
3433
|
};
|
3449
3434
|
|
3450
3435
|
|
3451
3436
|
/***/ }),
|
3452
3437
|
|
3453
|
-
/***/
|
3438
|
+
/***/ 713:
|
3454
3439
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
3455
3440
|
|
3456
3441
|
/*
|
@@ -3460,8 +3445,8 @@ module.exports = (source, options, onChunk, onSource, onName) => {
|
|
3460
3445
|
|
3461
3446
|
|
3462
3447
|
|
3463
|
-
const splitIntoLines = __nccwpck_require__(
|
3464
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
3448
|
+
const splitIntoLines = __nccwpck_require__(319);
|
3449
|
+
const streamChunksOfSourceMap = __nccwpck_require__(16);
|
3465
3450
|
|
3466
3451
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
3467
3452
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
@@ -3494,19 +3479,19 @@ const streamChunksOfCombinedSourceMap = (
|
|
3494
3479
|
onSource,
|
3495
3480
|
onName,
|
3496
3481
|
finalSource,
|
3497
|
-
columns
|
3482
|
+
columns,
|
3498
3483
|
) => {
|
3499
3484
|
/** @type {Map<string | null, number>} */
|
3500
|
-
|
3485
|
+
const sourceMapping = new Map();
|
3501
3486
|
/** @type {Map<string, number>} */
|
3502
|
-
|
3487
|
+
const nameMapping = new Map();
|
3503
3488
|
/** @type {number[]} */
|
3504
3489
|
const sourceIndexMapping = [];
|
3505
3490
|
/** @type {number[]} */
|
3506
3491
|
const nameIndexMapping = [];
|
3507
3492
|
/** @type {string[]} */
|
3508
3493
|
const nameIndexValueMapping = [];
|
3509
|
-
let
|
3494
|
+
let outerSourceIndex = -2;
|
3510
3495
|
/** @type {number[]} */
|
3511
3496
|
const innerSourceIndexMapping = [];
|
3512
3497
|
/** @type {[string | null, string | undefined][]} */
|
@@ -3519,7 +3504,7 @@ const streamChunksOfCombinedSourceMap = (
|
|
3519
3504
|
const innerNameIndexMapping = [];
|
3520
3505
|
/** @type {string[]} */
|
3521
3506
|
const innerNameIndexValueMapping = [];
|
3522
|
-
/** @typedef {[number, number, number, number, number]} MappingsData */
|
3507
|
+
/** @typedef {[number, number, number, number, number] | number[]} MappingsData */
|
3523
3508
|
/** @type {{ chunks: string[], mappingsData: MappingsData }[]} */
|
3524
3509
|
const innerSourceMapLineData = [];
|
3525
3510
|
/**
|
@@ -3533,7 +3518,7 @@ const streamChunksOfCombinedSourceMap = (
|
|
3533
3518
|
let l = 0;
|
3534
3519
|
let r = mappingsData.length / 5;
|
3535
3520
|
while (l < r) {
|
3536
|
-
|
3521
|
+
const m = (l + r) >> 1;
|
3537
3522
|
if (mappingsData[m * 5] <= column) {
|
3538
3523
|
l = m + 1;
|
3539
3524
|
} else {
|
@@ -3553,10 +3538,10 @@ const streamChunksOfCombinedSourceMap = (
|
|
3553
3538
|
sourceIndex,
|
3554
3539
|
originalLine,
|
3555
3540
|
originalColumn,
|
3556
|
-
nameIndex
|
3541
|
+
nameIndex,
|
3557
3542
|
) => {
|
3558
3543
|
// Check if this is a mapping to the inner source
|
3559
|
-
if (sourceIndex ===
|
3544
|
+
if (sourceIndex === outerSourceIndex) {
|
3560
3545
|
// Check if there is a mapping in the inner source
|
3561
3546
|
const idx = findInnerMapping(originalLine, originalColumn);
|
3562
3547
|
if (idx !== -1) {
|
@@ -3590,8 +3575,8 @@ const streamChunksOfCombinedSourceMap = (
|
|
3590
3575
|
innerOriginalLine <= originalSourceLines.length
|
3591
3576
|
? originalSourceLines[innerOriginalLine - 1].slice(
|
3592
3577
|
innerOriginalColumn,
|
3593
|
-
innerOriginalColumn + locationInChunk
|
3594
|
-
|
3578
|
+
innerOriginalColumn + locationInChunk,
|
3579
|
+
)
|
3595
3580
|
: "";
|
3596
3581
|
if (innerChunk.slice(0, locationInChunk) === originalChunk) {
|
3597
3582
|
innerOriginalColumn += locationInChunk;
|
@@ -3665,8 +3650,8 @@ const streamChunksOfCombinedSourceMap = (
|
|
3665
3650
|
innerOriginalLine <= originalSourceLines.length
|
3666
3651
|
? originalSourceLines[innerOriginalLine - 1].slice(
|
3667
3652
|
innerOriginalColumn,
|
3668
|
-
innerOriginalColumn + name.length
|
3669
|
-
|
3653
|
+
innerOriginalColumn + name.length,
|
3654
|
+
)
|
3670
3655
|
: "";
|
3671
3656
|
if (name === originalName) {
|
3672
3657
|
finalNameIndex =
|
@@ -3697,7 +3682,7 @@ const streamChunksOfCombinedSourceMap = (
|
|
3697
3682
|
sourceIndex,
|
3698
3683
|
innerOriginalLine,
|
3699
3684
|
innerOriginalColumn,
|
3700
|
-
finalNameIndex
|
3685
|
+
finalNameIndex,
|
3701
3686
|
);
|
3702
3687
|
return;
|
3703
3688
|
}
|
@@ -3707,15 +3692,14 @@ const streamChunksOfCombinedSourceMap = (
|
|
3707
3692
|
if (removeInnerSource) {
|
3708
3693
|
onChunk(chunk, generatedLine, generatedColumn, -1, -1, -1, -1);
|
3709
3694
|
return;
|
3710
|
-
}
|
3711
|
-
|
3712
|
-
|
3713
|
-
|
3714
|
-
|
3715
|
-
|
3716
|
-
}
|
3717
|
-
sourceIndexMapping[sourceIndex] = globalIndex;
|
3695
|
+
}
|
3696
|
+
if (sourceIndexMapping[sourceIndex] === -2) {
|
3697
|
+
let globalIndex = sourceMapping.get(innerSourceName);
|
3698
|
+
if (globalIndex === undefined) {
|
3699
|
+
sourceMapping.set(source, (globalIndex = sourceMapping.size));
|
3700
|
+
onSource(globalIndex, innerSourceName, innerSource);
|
3718
3701
|
}
|
3702
|
+
sourceIndexMapping[sourceIndex] = globalIndex;
|
3719
3703
|
}
|
3720
3704
|
}
|
3721
3705
|
|
@@ -3749,13 +3733,13 @@ const streamChunksOfCombinedSourceMap = (
|
|
3749
3733
|
finalSourceIndex,
|
3750
3734
|
originalLine,
|
3751
3735
|
originalColumn,
|
3752
|
-
finalNameIndex
|
3736
|
+
finalNameIndex,
|
3753
3737
|
);
|
3754
3738
|
}
|
3755
3739
|
},
|
3756
3740
|
(i, source, sourceContent) => {
|
3757
3741
|
if (source === innerSourceName) {
|
3758
|
-
|
3742
|
+
outerSourceIndex = i;
|
3759
3743
|
if (innerSource !== undefined) sourceContent = innerSource;
|
3760
3744
|
else innerSource = /** @type {string} */ (sourceContent);
|
3761
3745
|
sourceIndexMapping[i] = -2;
|
@@ -3770,12 +3754,12 @@ const streamChunksOfCombinedSourceMap = (
|
|
3770
3754
|
sourceIndex,
|
3771
3755
|
originalLine,
|
3772
3756
|
originalColumn,
|
3773
|
-
nameIndex
|
3757
|
+
nameIndex,
|
3774
3758
|
) => {
|
3775
3759
|
while (innerSourceMapLineData.length < generatedLine) {
|
3776
3760
|
innerSourceMapLineData.push({
|
3777
|
-
mappingsData:
|
3778
|
-
chunks: []
|
3761
|
+
mappingsData: [],
|
3762
|
+
chunks: [],
|
3779
3763
|
});
|
3780
3764
|
}
|
3781
3765
|
const data = innerSourceMapLineData[generatedLine - 1];
|
@@ -3784,7 +3768,7 @@ const streamChunksOfCombinedSourceMap = (
|
|
3784
3768
|
sourceIndex,
|
3785
3769
|
originalLine,
|
3786
3770
|
originalColumn,
|
3787
|
-
nameIndex
|
3771
|
+
nameIndex,
|
3788
3772
|
);
|
3789
3773
|
data.chunks.push(/** @type {string} */ (chunk));
|
3790
3774
|
},
|
@@ -3799,7 +3783,7 @@ const streamChunksOfCombinedSourceMap = (
|
|
3799
3783
|
innerNameIndexValueMapping[i] = name;
|
3800
3784
|
},
|
3801
3785
|
false,
|
3802
|
-
columns
|
3786
|
+
columns,
|
3803
3787
|
);
|
3804
3788
|
} else {
|
3805
3789
|
let globalIndex = sourceMapping.get(source);
|
@@ -3815,7 +3799,7 @@ const streamChunksOfCombinedSourceMap = (
|
|
3815
3799
|
nameIndexValueMapping[i] = name;
|
3816
3800
|
},
|
3817
3801
|
finalSource,
|
3818
|
-
columns
|
3802
|
+
columns,
|
3819
3803
|
);
|
3820
3804
|
};
|
3821
3805
|
|
@@ -3824,7 +3808,7 @@ module.exports = streamChunksOfCombinedSourceMap;
|
|
3824
3808
|
|
3825
3809
|
/***/ }),
|
3826
3810
|
|
3827
|
-
/***/
|
3811
|
+
/***/ 518:
|
3828
3812
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
3829
3813
|
|
3830
3814
|
/*
|
@@ -3834,8 +3818,8 @@ module.exports = streamChunksOfCombinedSourceMap;
|
|
3834
3818
|
|
3835
3819
|
|
3836
3820
|
|
3837
|
-
const getGeneratedSourceInfo = __nccwpck_require__(
|
3838
|
-
const splitIntoLines = __nccwpck_require__(
|
3821
|
+
const getGeneratedSourceInfo = __nccwpck_require__(42);
|
3822
|
+
const splitIntoLines = __nccwpck_require__(319);
|
3839
3823
|
|
3840
3824
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
3841
3825
|
/** @typedef {import("./streamChunks").OnChunk} OnChunk */
|
@@ -3845,11 +3829,11 @@ const splitIntoLines = __nccwpck_require__(498);
|
|
3845
3829
|
/**
|
3846
3830
|
* @param {string} source source
|
3847
3831
|
* @param {OnChunk} onChunk on chunk
|
3848
|
-
* @param {OnSource}
|
3849
|
-
* @param {OnName}
|
3832
|
+
* @param {OnSource} _onSource on source
|
3833
|
+
* @param {OnName} _onName on name
|
3850
3834
|
* @returns {GeneratedSourceInfo} source info
|
3851
3835
|
*/
|
3852
|
-
const streamChunksOfRawSource = (source, onChunk,
|
3836
|
+
const streamChunksOfRawSource = (source, onChunk, _onSource, _onName) => {
|
3853
3837
|
let line = 1;
|
3854
3838
|
const matches = splitIntoLines(source);
|
3855
3839
|
/** @type {undefined | string} */
|
@@ -3861,12 +3845,12 @@ const streamChunksOfRawSource = (source, onChunk, onSource, onName) => {
|
|
3861
3845
|
return matches.length === 0 || /** @type {string} */ (match).endsWith("\n")
|
3862
3846
|
? {
|
3863
3847
|
generatedLine: matches.length + 1,
|
3864
|
-
generatedColumn: 0
|
3865
|
-
|
3848
|
+
generatedColumn: 0,
|
3849
|
+
}
|
3866
3850
|
: {
|
3867
3851
|
generatedLine: matches.length,
|
3868
|
-
generatedColumn: /** @type {string} */ (match).length
|
3869
|
-
|
3852
|
+
generatedColumn: /** @type {string} */ (match).length,
|
3853
|
+
};
|
3870
3854
|
};
|
3871
3855
|
|
3872
3856
|
/**
|
@@ -3877,16 +3861,15 @@ const streamChunksOfRawSource = (source, onChunk, onSource, onName) => {
|
|
3877
3861
|
* @param {boolean} finalSource is final source
|
3878
3862
|
* @returns {GeneratedSourceInfo} source info
|
3879
3863
|
*/
|
3880
|
-
module.exports = (source, onChunk, onSource, onName, finalSource) =>
|
3881
|
-
|
3864
|
+
module.exports = (source, onChunk, onSource, onName, finalSource) =>
|
3865
|
+
finalSource
|
3882
3866
|
? getGeneratedSourceInfo(source)
|
3883
3867
|
: streamChunksOfRawSource(source, onChunk, onSource, onName);
|
3884
|
-
};
|
3885
3868
|
|
3886
3869
|
|
3887
3870
|
/***/ }),
|
3888
3871
|
|
3889
|
-
/***/
|
3872
|
+
/***/ 16:
|
3890
3873
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
3891
3874
|
|
3892
3875
|
/*
|
@@ -3896,10 +3879,10 @@ module.exports = (source, onChunk, onSource, onName, finalSource) => {
|
|
3896
3879
|
|
3897
3880
|
|
3898
3881
|
|
3899
|
-
const getGeneratedSourceInfo = __nccwpck_require__(
|
3900
|
-
const getSource = __nccwpck_require__(
|
3901
|
-
const readMappings = __nccwpck_require__(
|
3902
|
-
const splitIntoLines = __nccwpck_require__(
|
3882
|
+
const getGeneratedSourceInfo = __nccwpck_require__(42);
|
3883
|
+
const getSource = __nccwpck_require__(333);
|
3884
|
+
const readMappings = __nccwpck_require__(125);
|
3885
|
+
const splitIntoLines = __nccwpck_require__(319);
|
3903
3886
|
|
3904
3887
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
3905
3888
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
@@ -3920,13 +3903,13 @@ const streamChunksOfSourceMapFull = (
|
|
3920
3903
|
sourceMap,
|
3921
3904
|
onChunk,
|
3922
3905
|
onSource,
|
3923
|
-
onName
|
3906
|
+
onName,
|
3924
3907
|
) => {
|
3925
3908
|
const lines = splitIntoLines(source);
|
3926
3909
|
if (lines.length === 0) {
|
3927
3910
|
return {
|
3928
3911
|
generatedLine: 1,
|
3929
|
-
generatedColumn: 0
|
3912
|
+
generatedColumn: 0,
|
3930
3913
|
};
|
3931
3914
|
}
|
3932
3915
|
const { sources, sourcesContent, names, mappings } = sourceMap;
|
@@ -3934,7 +3917,7 @@ const streamChunksOfSourceMapFull = (
|
|
3934
3917
|
onSource(
|
3935
3918
|
i,
|
3936
3919
|
getSource(sourceMap, i),
|
3937
|
-
(sourcesContent && sourcesContent[i]) || undefined
|
3920
|
+
(sourcesContent && sourcesContent[i]) || undefined,
|
3938
3921
|
);
|
3939
3922
|
}
|
3940
3923
|
if (names) {
|
@@ -3972,7 +3955,7 @@ const streamChunksOfSourceMapFull = (
|
|
3972
3955
|
sourceIndex,
|
3973
3956
|
originalLine,
|
3974
3957
|
originalColumn,
|
3975
|
-
nameIndex
|
3958
|
+
nameIndex,
|
3976
3959
|
) => {
|
3977
3960
|
if (mappingActive && currentGeneratedLine <= lines.length) {
|
3978
3961
|
let chunk;
|
@@ -3995,7 +3978,7 @@ const streamChunksOfSourceMapFull = (
|
|
3995
3978
|
activeMappingSourceIndex,
|
3996
3979
|
activeMappingOriginalLine,
|
3997
3980
|
activeMappingOriginalColumn,
|
3998
|
-
activeMappingNameIndex
|
3981
|
+
activeMappingNameIndex,
|
3999
3982
|
);
|
4000
3983
|
}
|
4001
3984
|
mappingActive = false;
|
@@ -4003,7 +3986,7 @@ const streamChunksOfSourceMapFull = (
|
|
4003
3986
|
if (generatedLine > currentGeneratedLine && currentGeneratedColumn > 0) {
|
4004
3987
|
if (currentGeneratedLine <= lines.length) {
|
4005
3988
|
const chunk = lines[currentGeneratedLine - 1].slice(
|
4006
|
-
currentGeneratedColumn
|
3989
|
+
currentGeneratedColumn,
|
4007
3990
|
);
|
4008
3991
|
onChunk(
|
4009
3992
|
chunk,
|
@@ -4012,7 +3995,7 @@ const streamChunksOfSourceMapFull = (
|
|
4012
3995
|
-1,
|
4013
3996
|
-1,
|
4014
3997
|
-1,
|
4015
|
-
-1
|
3998
|
+
-1,
|
4016
3999
|
);
|
4017
4000
|
}
|
4018
4001
|
currentGeneratedLine++;
|
@@ -4027,7 +4010,7 @@ const streamChunksOfSourceMapFull = (
|
|
4027
4010
|
-1,
|
4028
4011
|
-1,
|
4029
4012
|
-1,
|
4030
|
-
-1
|
4013
|
+
-1,
|
4031
4014
|
);
|
4032
4015
|
}
|
4033
4016
|
currentGeneratedLine++;
|
@@ -4036,7 +4019,7 @@ const streamChunksOfSourceMapFull = (
|
|
4036
4019
|
if (currentGeneratedLine <= lines.length) {
|
4037
4020
|
const chunk = lines[currentGeneratedLine - 1].slice(
|
4038
4021
|
currentGeneratedColumn,
|
4039
|
-
generatedColumn
|
4022
|
+
generatedColumn,
|
4040
4023
|
);
|
4041
4024
|
onChunk(
|
4042
4025
|
chunk,
|
@@ -4045,7 +4028,7 @@ const streamChunksOfSourceMapFull = (
|
|
4045
4028
|
-1,
|
4046
4029
|
-1,
|
4047
4030
|
-1,
|
4048
|
-
-1
|
4031
|
+
-1,
|
4049
4032
|
);
|
4050
4033
|
}
|
4051
4034
|
currentGeneratedColumn = generatedColumn;
|
@@ -4066,7 +4049,7 @@ const streamChunksOfSourceMapFull = (
|
|
4066
4049
|
onMapping(finalLine, finalColumn, -1, -1, -1, -1);
|
4067
4050
|
return {
|
4068
4051
|
generatedLine: finalLine,
|
4069
|
-
generatedColumn: finalColumn
|
4052
|
+
generatedColumn: finalColumn,
|
4070
4053
|
};
|
4071
4054
|
};
|
4072
4055
|
|
@@ -4083,13 +4066,13 @@ const streamChunksOfSourceMapLinesFull = (
|
|
4083
4066
|
sourceMap,
|
4084
4067
|
onChunk,
|
4085
4068
|
onSource,
|
4086
|
-
_onName
|
4069
|
+
_onName,
|
4087
4070
|
) => {
|
4088
4071
|
const lines = splitIntoLines(source);
|
4089
4072
|
if (lines.length === 0) {
|
4090
4073
|
return {
|
4091
4074
|
generatedLine: 1,
|
4092
|
-
generatedColumn: 0
|
4075
|
+
generatedColumn: 0,
|
4093
4076
|
};
|
4094
4077
|
}
|
4095
4078
|
const { sources, sourcesContent, mappings } = sourceMap;
|
@@ -4097,7 +4080,7 @@ const streamChunksOfSourceMapLinesFull = (
|
|
4097
4080
|
onSource(
|
4098
4081
|
i,
|
4099
4082
|
getSource(sourceMap, i),
|
4100
|
-
(sourcesContent && sourcesContent[i]) || undefined
|
4083
|
+
(sourcesContent && sourcesContent[i]) || undefined,
|
4101
4084
|
);
|
4102
4085
|
}
|
4103
4086
|
|
@@ -4118,7 +4101,7 @@ const streamChunksOfSourceMapLinesFull = (
|
|
4118
4101
|
sourceIndex,
|
4119
4102
|
originalLine,
|
4120
4103
|
originalColumn,
|
4121
|
-
_nameIndex
|
4104
|
+
_nameIndex,
|
4122
4105
|
) => {
|
4123
4106
|
if (
|
4124
4107
|
sourceIndex < 0 ||
|
@@ -4136,7 +4119,7 @@ const streamChunksOfSourceMapLinesFull = (
|
|
4136
4119
|
-1,
|
4137
4120
|
-1,
|
4138
4121
|
-1,
|
4139
|
-
-1
|
4122
|
+
-1,
|
4140
4123
|
);
|
4141
4124
|
}
|
4142
4125
|
currentGeneratedLine++;
|
@@ -4149,7 +4132,7 @@ const streamChunksOfSourceMapLinesFull = (
|
|
4149
4132
|
sourceIndex,
|
4150
4133
|
originalLine,
|
4151
4134
|
originalColumn,
|
4152
|
-
-1
|
4135
|
+
-1,
|
4153
4136
|
);
|
4154
4137
|
currentGeneratedLine++;
|
4155
4138
|
}
|
@@ -4163,7 +4146,7 @@ const streamChunksOfSourceMapLinesFull = (
|
|
4163
4146
|
-1,
|
4164
4147
|
-1,
|
4165
4148
|
-1,
|
4166
|
-
-1
|
4149
|
+
-1,
|
4167
4150
|
);
|
4168
4151
|
}
|
4169
4152
|
|
@@ -4175,7 +4158,7 @@ const streamChunksOfSourceMapLinesFull = (
|
|
4175
4158
|
|
4176
4159
|
return {
|
4177
4160
|
generatedLine: finalLine,
|
4178
|
-
generatedColumn: finalColumn
|
4161
|
+
generatedColumn: finalColumn,
|
4179
4162
|
};
|
4180
4163
|
};
|
4181
4164
|
|
@@ -4192,7 +4175,7 @@ const streamChunksOfSourceMapFinal = (
|
|
4192
4175
|
sourceMap,
|
4193
4176
|
onChunk,
|
4194
4177
|
onSource,
|
4195
|
-
onName
|
4178
|
+
onName,
|
4196
4179
|
) => {
|
4197
4180
|
const result = getGeneratedSourceInfo(source);
|
4198
4181
|
const { generatedLine: finalLine, generatedColumn: finalColumn } = result;
|
@@ -4203,7 +4186,7 @@ const streamChunksOfSourceMapFinal = (
|
|
4203
4186
|
onSource(
|
4204
4187
|
i,
|
4205
4188
|
getSource(sourceMap, i),
|
4206
|
-
(sourcesContent && sourcesContent[i]) || undefined
|
4189
|
+
(sourcesContent && sourcesContent[i]) || undefined,
|
4207
4190
|
);
|
4208
4191
|
}
|
4209
4192
|
if (names) {
|
@@ -4229,7 +4212,7 @@ const streamChunksOfSourceMapFinal = (
|
|
4229
4212
|
sourceIndex,
|
4230
4213
|
originalLine,
|
4231
4214
|
originalColumn,
|
4232
|
-
nameIndex
|
4215
|
+
nameIndex,
|
4233
4216
|
) => {
|
4234
4217
|
if (
|
4235
4218
|
generatedLine >= /** @type {number} */ (finalLine) &&
|
@@ -4246,7 +4229,7 @@ const streamChunksOfSourceMapFinal = (
|
|
4246
4229
|
sourceIndex,
|
4247
4230
|
originalLine,
|
4248
4231
|
originalColumn,
|
4249
|
-
nameIndex
|
4232
|
+
nameIndex,
|
4250
4233
|
);
|
4251
4234
|
mappingActiveLine = generatedLine;
|
4252
4235
|
} else if (mappingActiveLine === generatedLine) {
|
@@ -4271,14 +4254,14 @@ const streamChunksOfSourceMapLinesFinal = (
|
|
4271
4254
|
sourceMap,
|
4272
4255
|
onChunk,
|
4273
4256
|
onSource,
|
4274
|
-
_onName
|
4257
|
+
_onName,
|
4275
4258
|
) => {
|
4276
4259
|
const result = getGeneratedSourceInfo(source);
|
4277
4260
|
const { generatedLine, generatedColumn } = result;
|
4278
4261
|
if (generatedLine === 1 && generatedColumn === 0) {
|
4279
4262
|
return {
|
4280
4263
|
generatedLine: 1,
|
4281
|
-
generatedColumn: 0
|
4264
|
+
generatedColumn: 0,
|
4282
4265
|
};
|
4283
4266
|
}
|
4284
4267
|
|
@@ -4287,7 +4270,7 @@ const streamChunksOfSourceMapLinesFinal = (
|
|
4287
4270
|
onSource(
|
4288
4271
|
i,
|
4289
4272
|
getSource(sourceMap, i),
|
4290
|
-
(sourcesContent && sourcesContent[i]) || undefined
|
4273
|
+
(sourcesContent && sourcesContent[i]) || undefined,
|
4291
4274
|
);
|
4292
4275
|
}
|
4293
4276
|
|
@@ -4313,7 +4296,7 @@ const streamChunksOfSourceMapLinesFinal = (
|
|
4313
4296
|
sourceIndex,
|
4314
4297
|
originalLine,
|
4315
4298
|
originalColumn,
|
4316
|
-
_nameIndex
|
4299
|
+
_nameIndex,
|
4317
4300
|
) => {
|
4318
4301
|
if (
|
4319
4302
|
sourceIndex >= 0 &&
|
@@ -4327,7 +4310,7 @@ const streamChunksOfSourceMapLinesFinal = (
|
|
4327
4310
|
sourceIndex,
|
4328
4311
|
originalLine,
|
4329
4312
|
originalColumn,
|
4330
|
-
-1
|
4313
|
+
-1,
|
4331
4314
|
);
|
4332
4315
|
currentGeneratedLine = generatedLine + 1;
|
4333
4316
|
}
|
@@ -4353,7 +4336,7 @@ module.exports = (
|
|
4353
4336
|
onSource,
|
4354
4337
|
onName,
|
4355
4338
|
finalSource,
|
4356
|
-
columns
|
4339
|
+
columns,
|
4357
4340
|
) => {
|
4358
4341
|
if (columns) {
|
4359
4342
|
return finalSource
|
@@ -4362,38 +4345,37 @@ module.exports = (
|
|
4362
4345
|
sourceMap,
|
4363
4346
|
onChunk,
|
4364
4347
|
onSource,
|
4365
|
-
onName
|
4366
|
-
|
4348
|
+
onName,
|
4349
|
+
)
|
4367
4350
|
: streamChunksOfSourceMapFull(
|
4368
4351
|
source,
|
4369
4352
|
sourceMap,
|
4370
4353
|
onChunk,
|
4371
4354
|
onSource,
|
4372
|
-
onName
|
4373
|
-
|
4374
|
-
} else {
|
4375
|
-
return finalSource
|
4376
|
-
? streamChunksOfSourceMapLinesFinal(
|
4377
|
-
source,
|
4378
|
-
sourceMap,
|
4379
|
-
onChunk,
|
4380
|
-
onSource,
|
4381
|
-
onName
|
4382
|
-
)
|
4383
|
-
: streamChunksOfSourceMapLinesFull(
|
4384
|
-
source,
|
4385
|
-
sourceMap,
|
4386
|
-
onChunk,
|
4387
|
-
onSource,
|
4388
|
-
onName
|
4389
|
-
);
|
4355
|
+
onName,
|
4356
|
+
);
|
4390
4357
|
}
|
4358
|
+
return finalSource
|
4359
|
+
? streamChunksOfSourceMapLinesFinal(
|
4360
|
+
source,
|
4361
|
+
sourceMap,
|
4362
|
+
onChunk,
|
4363
|
+
onSource,
|
4364
|
+
onName,
|
4365
|
+
)
|
4366
|
+
: streamChunksOfSourceMapLinesFull(
|
4367
|
+
source,
|
4368
|
+
sourceMap,
|
4369
|
+
onChunk,
|
4370
|
+
onSource,
|
4371
|
+
onName,
|
4372
|
+
);
|
4391
4373
|
};
|
4392
4374
|
|
4393
4375
|
|
4394
4376
|
/***/ }),
|
4395
4377
|
|
4396
|
-
/***/
|
4378
|
+
/***/ 780:
|
4397
4379
|
/***/ ((module) => {
|
4398
4380
|
|
4399
4381
|
/*
|
@@ -4420,7 +4402,6 @@ function isDualStringBufferCachingEnabled() {
|
|
4420
4402
|
* repeat conversions between the two formats when they are requested. This
|
4421
4403
|
* is enabled by default. This option can improve performance but can consume
|
4422
4404
|
* additional memory since values are stored twice.
|
4423
|
-
*
|
4424
4405
|
* @returns {void}
|
4425
4406
|
*/
|
4426
4407
|
function enableDualStringBufferCaching() {
|
@@ -4431,7 +4412,6 @@ function enableDualStringBufferCaching() {
|
|
4431
4412
|
* Disables the optimization to save both string and buffer in memory. This
|
4432
4413
|
* may increase performance but should reduce memory usage in the Webpack
|
4433
4414
|
* compiler.
|
4434
|
-
*
|
4435
4415
|
* @returns {void}
|
4436
4416
|
*/
|
4437
4417
|
function disableDualStringBufferCaching() {
|
@@ -4440,33 +4420,6 @@ function disableDualStringBufferCaching() {
|
|
4440
4420
|
|
4441
4421
|
const interningStringMap = new Map();
|
4442
4422
|
|
4443
|
-
/**
|
4444
|
-
* Saves the string in a map to ensure that only one copy of the string exists
|
4445
|
-
* in memory at a given time. This is controlled by {@link enableStringInterning}
|
4446
|
-
* and {@link disableStringInterning}. Callers are expect to manage the memory
|
4447
|
-
* of the interned strings by calling {@link disableStringInterning} after the
|
4448
|
-
* compiler no longer needs to save the interned memory.
|
4449
|
-
*
|
4450
|
-
* @param {string} str A string to be interned.
|
4451
|
-
* @returns {string} The original string or a reference to an existing string of the same value if it has already been interned.
|
4452
|
-
*/
|
4453
|
-
function internString(str) {
|
4454
|
-
if (
|
4455
|
-
!isStringInterningEnabled() ||
|
4456
|
-
!str ||
|
4457
|
-
str.length < 128 ||
|
4458
|
-
typeof str !== "string"
|
4459
|
-
) {
|
4460
|
-
return str;
|
4461
|
-
}
|
4462
|
-
let internedString = interningStringMap.get(str);
|
4463
|
-
if (internedString === undefined) {
|
4464
|
-
internedString = str;
|
4465
|
-
interningStringMap.set(str, internedString);
|
4466
|
-
}
|
4467
|
-
return internedString;
|
4468
|
-
}
|
4469
|
-
|
4470
4423
|
let enableStringInterningRefCount = 0;
|
4471
4424
|
|
4472
4425
|
/**
|
@@ -4488,7 +4441,6 @@ function isStringInterningEnabled() {
|
|
4488
4441
|
* this method may not immediately free all the memory until
|
4489
4442
|
* {@link exitStringInterningRange} has been called to end all string
|
4490
4443
|
* interning ranges.
|
4491
|
-
*
|
4492
4444
|
* @returns {void}
|
4493
4445
|
*/
|
4494
4446
|
function enterStringInterningRange() {
|
@@ -4500,7 +4452,6 @@ function enterStringInterningRange() {
|
|
4500
4452
|
* have been exited, this method will free all the memory used by the interned
|
4501
4453
|
* strings. This method should be called once for each time that
|
4502
4454
|
* {@link enterStringInterningRange} was called.
|
4503
|
-
*
|
4504
4455
|
* @returns {void}
|
4505
4456
|
*/
|
4506
4457
|
function exitStringInterningRange() {
|
@@ -4510,19 +4461,45 @@ function exitStringInterningRange() {
|
|
4510
4461
|
}
|
4511
4462
|
}
|
4512
4463
|
|
4464
|
+
/**
|
4465
|
+
* Saves the string in a map to ensure that only one copy of the string exists
|
4466
|
+
* in memory at a given time. This is controlled by {@link enableStringInterning}
|
4467
|
+
* and {@link disableStringInterning}. Callers are expect to manage the memory
|
4468
|
+
* of the interned strings by calling {@link disableStringInterning} after the
|
4469
|
+
* compiler no longer needs to save the interned memory.
|
4470
|
+
* @param {string} str A string to be interned.
|
4471
|
+
* @returns {string} The original string or a reference to an existing string of the same value if it has already been interned.
|
4472
|
+
*/
|
4473
|
+
function internString(str) {
|
4474
|
+
if (
|
4475
|
+
!isStringInterningEnabled() ||
|
4476
|
+
!str ||
|
4477
|
+
str.length < 128 ||
|
4478
|
+
typeof str !== "string"
|
4479
|
+
) {
|
4480
|
+
return str;
|
4481
|
+
}
|
4482
|
+
let internedString = interningStringMap.get(str);
|
4483
|
+
if (internedString === undefined) {
|
4484
|
+
internedString = str;
|
4485
|
+
interningStringMap.set(str, internedString);
|
4486
|
+
}
|
4487
|
+
return internedString;
|
4488
|
+
}
|
4489
|
+
|
4513
4490
|
module.exports = {
|
4514
4491
|
disableDualStringBufferCaching,
|
4515
4492
|
enableDualStringBufferCaching,
|
4516
4493
|
internString,
|
4517
4494
|
isDualStringBufferCachingEnabled,
|
4518
4495
|
enterStringInterningRange,
|
4519
|
-
exitStringInterningRange
|
4496
|
+
exitStringInterningRange,
|
4520
4497
|
};
|
4521
4498
|
|
4522
4499
|
|
4523
4500
|
/***/ }),
|
4524
4501
|
|
4525
|
-
/***/
|
4502
|
+
/***/ 366:
|
4526
4503
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
4527
4504
|
|
4528
4505
|
/*
|
@@ -4547,7 +4524,6 @@ module.exports = {
|
|
4547
4524
|
/** @typedef {import("./helpers/streamChunks").OnSource} OnSource */
|
4548
4525
|
/** @typedef {import("./helpers/streamChunks").Options} StreamChunksOptions */
|
4549
4526
|
|
4550
|
-
// eslint-disable-next-line valid-jsdoc
|
4551
4527
|
/**
|
4552
4528
|
* @template T
|
4553
4529
|
* @param {() => T} fn memorized function
|
@@ -4572,7 +4548,6 @@ const memoize = (fn) => {
|
|
4572
4548
|
};
|
4573
4549
|
};
|
4574
4550
|
|
4575
|
-
// eslint-disable-next-line valid-jsdoc
|
4576
4551
|
/**
|
4577
4552
|
* @template A
|
4578
4553
|
* @template B
|
@@ -4589,18 +4564,18 @@ const mergeExports = (obj, exports) => {
|
|
4589
4564
|
Object.defineProperty(obj, name, {
|
4590
4565
|
configurable: false,
|
4591
4566
|
enumerable: true,
|
4592
|
-
get: memoize(fn)
|
4567
|
+
get: memoize(fn),
|
4593
4568
|
});
|
4594
4569
|
} else if (typeof descriptor.value === "object") {
|
4595
4570
|
Object.defineProperty(obj, name, {
|
4596
4571
|
configurable: false,
|
4597
4572
|
enumerable: true,
|
4598
4573
|
writable: false,
|
4599
|
-
value: mergeExports({}, descriptor.value)
|
4574
|
+
value: mergeExports({}, descriptor.value),
|
4600
4575
|
});
|
4601
4576
|
} else {
|
4602
4577
|
throw new Error(
|
4603
|
-
"Exposed values must be either a getter or an nested object"
|
4578
|
+
"Exposed values must be either a getter or an nested object",
|
4604
4579
|
);
|
4605
4580
|
}
|
4606
4581
|
}
|
@@ -4611,41 +4586,41 @@ module.exports = mergeExports(
|
|
4611
4586
|
{},
|
4612
4587
|
{
|
4613
4588
|
get Source() {
|
4614
|
-
return __nccwpck_require__(
|
4589
|
+
return __nccwpck_require__(733);
|
4615
4590
|
},
|
4616
4591
|
get RawSource() {
|
4617
|
-
return __nccwpck_require__(
|
4592
|
+
return __nccwpck_require__(117);
|
4618
4593
|
},
|
4619
4594
|
get OriginalSource() {
|
4620
|
-
return __nccwpck_require__(
|
4595
|
+
return __nccwpck_require__(2);
|
4621
4596
|
},
|
4622
4597
|
get SourceMapSource() {
|
4623
|
-
return __nccwpck_require__(
|
4598
|
+
return __nccwpck_require__(58);
|
4624
4599
|
},
|
4625
4600
|
get CachedSource() {
|
4626
|
-
return __nccwpck_require__(
|
4601
|
+
return __nccwpck_require__(863);
|
4627
4602
|
},
|
4628
4603
|
get ConcatSource() {
|
4629
|
-
return __nccwpck_require__(
|
4604
|
+
return __nccwpck_require__(21);
|
4630
4605
|
},
|
4631
4606
|
get ReplaceSource() {
|
4632
|
-
return __nccwpck_require__(
|
4607
|
+
return __nccwpck_require__(779);
|
4633
4608
|
},
|
4634
4609
|
get PrefixSource() {
|
4635
|
-
return __nccwpck_require__(
|
4610
|
+
return __nccwpck_require__(665);
|
4636
4611
|
},
|
4637
4612
|
get SizeOnlySource() {
|
4638
|
-
return __nccwpck_require__(
|
4613
|
+
return __nccwpck_require__(702);
|
4639
4614
|
},
|
4640
4615
|
get CompatSource() {
|
4641
|
-
return __nccwpck_require__(
|
4616
|
+
return __nccwpck_require__(931);
|
4642
4617
|
},
|
4643
4618
|
util: {
|
4644
4619
|
get stringBufferUtils() {
|
4645
|
-
return __nccwpck_require__(
|
4646
|
-
}
|
4647
|
-
}
|
4648
|
-
}
|
4620
|
+
return __nccwpck_require__(780);
|
4621
|
+
},
|
4622
|
+
},
|
4623
|
+
},
|
4649
4624
|
);
|
4650
4625
|
|
4651
4626
|
|
@@ -4693,7 +4668,7 @@ module.exports = mergeExports(
|
|
4693
4668
|
/******/ // startup
|
4694
4669
|
/******/ // Load entry module and return exports
|
4695
4670
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
4696
|
-
/******/ var __webpack_exports__ = __nccwpck_require__(
|
4671
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(366);
|
4697
4672
|
/******/ module.exports = __webpack_exports__;
|
4698
4673
|
/******/
|
4699
4674
|
/******/ })()
|