unplugin-version-injector 2.0.0-beta.2 → 2.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/webpack.js +2681 -4
- package/dist/webpack.mjs +2681 -4
- package/package.json +5 -3
package/dist/webpack.mjs
CHANGED
@@ -1,7 +1,2684 @@
|
|
1
1
|
import fs from 'fs';
|
2
2
|
import path from 'path';
|
3
3
|
|
4
|
-
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __commonJS = (cb, mod) => function __require() {
|
6
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
7
|
+
};
|
8
|
+
|
9
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/Source.js
|
10
|
+
var require_Source = __commonJS({
|
11
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/Source.js"(exports, module) {
|
12
|
+
var Source = class {
|
13
|
+
source() {
|
14
|
+
throw new Error("Abstract");
|
15
|
+
}
|
16
|
+
buffer() {
|
17
|
+
const source = this.source();
|
18
|
+
if (Buffer.isBuffer(source)) return source;
|
19
|
+
return Buffer.from(source, "utf-8");
|
20
|
+
}
|
21
|
+
size() {
|
22
|
+
return this.buffer().length;
|
23
|
+
}
|
24
|
+
map(options) {
|
25
|
+
return null;
|
26
|
+
}
|
27
|
+
sourceAndMap(options) {
|
28
|
+
return {
|
29
|
+
source: this.source(),
|
30
|
+
map: this.map(options)
|
31
|
+
};
|
32
|
+
}
|
33
|
+
updateHash(hash) {
|
34
|
+
throw new Error("Abstract");
|
35
|
+
}
|
36
|
+
};
|
37
|
+
module.exports = Source;
|
38
|
+
}
|
39
|
+
});
|
40
|
+
|
41
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/getGeneratedSourceInfo.js
|
42
|
+
var require_getGeneratedSourceInfo = __commonJS({
|
43
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/getGeneratedSourceInfo.js"(exports, module) {
|
44
|
+
var CHAR_CODE_NEW_LINE = "\n".charCodeAt(0);
|
45
|
+
var getGeneratedSourceInfo = (source) => {
|
46
|
+
if (source === void 0) {
|
47
|
+
return {};
|
48
|
+
}
|
49
|
+
const lastLineStart = source.lastIndexOf("\n");
|
50
|
+
if (lastLineStart === -1) {
|
51
|
+
return {
|
52
|
+
generatedLine: 1,
|
53
|
+
generatedColumn: source.length,
|
54
|
+
source
|
55
|
+
};
|
56
|
+
}
|
57
|
+
let generatedLine = 2;
|
58
|
+
for (let i = 0; i < lastLineStart; i++) {
|
59
|
+
if (source.charCodeAt(i) === CHAR_CODE_NEW_LINE) generatedLine++;
|
60
|
+
}
|
61
|
+
return {
|
62
|
+
generatedLine,
|
63
|
+
generatedColumn: source.length - lastLineStart - 1,
|
64
|
+
source
|
65
|
+
};
|
66
|
+
};
|
67
|
+
module.exports = getGeneratedSourceInfo;
|
68
|
+
}
|
69
|
+
});
|
70
|
+
|
71
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/splitIntoLines.js
|
72
|
+
var require_splitIntoLines = __commonJS({
|
73
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/splitIntoLines.js"(exports, module) {
|
74
|
+
var splitIntoLines = (str) => {
|
75
|
+
const results = [];
|
76
|
+
const len = str.length;
|
77
|
+
let i = 0;
|
78
|
+
for (; i < len; ) {
|
79
|
+
const cc = str.charCodeAt(i);
|
80
|
+
if (cc === 10) {
|
81
|
+
results.push("\n");
|
82
|
+
i++;
|
83
|
+
} else {
|
84
|
+
let j = i + 1;
|
85
|
+
while (j < len && str.charCodeAt(j) !== 10) j++;
|
86
|
+
results.push(str.slice(i, j + 1));
|
87
|
+
i = j + 1;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
return results;
|
91
|
+
};
|
92
|
+
module.exports = splitIntoLines;
|
93
|
+
}
|
94
|
+
});
|
95
|
+
|
96
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/streamChunksOfRawSource.js
|
97
|
+
var require_streamChunksOfRawSource = __commonJS({
|
98
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/streamChunksOfRawSource.js"(exports, module) {
|
99
|
+
var getGeneratedSourceInfo = require_getGeneratedSourceInfo();
|
100
|
+
var splitIntoLines = require_splitIntoLines();
|
101
|
+
var streamChunksOfRawSource = (source, onChunk, onSource, onName) => {
|
102
|
+
let line = 1;
|
103
|
+
const matches = splitIntoLines(source);
|
104
|
+
let match;
|
105
|
+
for (match of matches) {
|
106
|
+
onChunk(match, line, 0, -1, -1, -1, -1);
|
107
|
+
line++;
|
108
|
+
}
|
109
|
+
return matches.length === 0 || match.endsWith("\n") ? {
|
110
|
+
generatedLine: matches.length + 1,
|
111
|
+
generatedColumn: 0
|
112
|
+
} : {
|
113
|
+
generatedLine: matches.length,
|
114
|
+
generatedColumn: match.length
|
115
|
+
};
|
116
|
+
};
|
117
|
+
module.exports = (source, onChunk, onSource, onName, finalSource) => {
|
118
|
+
return finalSource ? getGeneratedSourceInfo(source) : streamChunksOfRawSource(source, onChunk);
|
119
|
+
};
|
120
|
+
}
|
121
|
+
});
|
122
|
+
|
123
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/RawSource.js
|
124
|
+
var require_RawSource = __commonJS({
|
125
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/RawSource.js"(exports, module) {
|
126
|
+
var streamChunksOfRawSource = require_streamChunksOfRawSource();
|
127
|
+
var Source = require_Source();
|
128
|
+
var RawSource = class extends Source {
|
129
|
+
constructor(value, convertToString = false) {
|
130
|
+
super();
|
131
|
+
const isBuffer = Buffer.isBuffer(value);
|
132
|
+
if (!isBuffer && typeof value !== "string") {
|
133
|
+
throw new TypeError("argument 'value' must be either string of Buffer");
|
134
|
+
}
|
135
|
+
this._valueIsBuffer = !convertToString && isBuffer;
|
136
|
+
this._value = convertToString && isBuffer ? void 0 : value;
|
137
|
+
this._valueAsBuffer = isBuffer ? value : void 0;
|
138
|
+
this._valueAsString = isBuffer ? void 0 : value;
|
139
|
+
}
|
140
|
+
isBuffer() {
|
141
|
+
return this._valueIsBuffer;
|
142
|
+
}
|
143
|
+
source() {
|
144
|
+
if (this._value === void 0) {
|
145
|
+
this._value = this._valueAsBuffer.toString("utf-8");
|
146
|
+
}
|
147
|
+
return this._value;
|
148
|
+
}
|
149
|
+
buffer() {
|
150
|
+
if (this._valueAsBuffer === void 0) {
|
151
|
+
this._valueAsBuffer = Buffer.from(this._value, "utf-8");
|
152
|
+
}
|
153
|
+
return this._valueAsBuffer;
|
154
|
+
}
|
155
|
+
map(options) {
|
156
|
+
return null;
|
157
|
+
}
|
158
|
+
/**
|
159
|
+
* @param {object} options options
|
160
|
+
* @param {function(string, number, number, number, number, number, number): void} onChunk called for each chunk of code
|
161
|
+
* @param {function(number, string, string)} onSource called for each source
|
162
|
+
* @param {function(number, string)} onName called for each name
|
163
|
+
* @returns {void}
|
164
|
+
*/
|
165
|
+
streamChunks(options, onChunk, onSource, onName) {
|
166
|
+
if (this._value === void 0) {
|
167
|
+
this._value = Buffer.from(this._valueAsBuffer, "utf-8");
|
168
|
+
}
|
169
|
+
if (this._valueAsString === void 0) {
|
170
|
+
this._valueAsString = typeof this._value === "string" ? this._value : this._value.toString("utf-8");
|
171
|
+
}
|
172
|
+
return streamChunksOfRawSource(
|
173
|
+
this._valueAsString,
|
174
|
+
onChunk,
|
175
|
+
onSource,
|
176
|
+
onName,
|
177
|
+
!!(options && options.finalSource)
|
178
|
+
);
|
179
|
+
}
|
180
|
+
updateHash(hash) {
|
181
|
+
if (this._valueAsBuffer === void 0) {
|
182
|
+
this._valueAsBuffer = Buffer.from(this._value, "utf-8");
|
183
|
+
}
|
184
|
+
hash.update("RawSource");
|
185
|
+
hash.update(this._valueAsBuffer);
|
186
|
+
}
|
187
|
+
};
|
188
|
+
module.exports = RawSource;
|
189
|
+
}
|
190
|
+
});
|
191
|
+
|
192
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/createMappingsSerializer.js
|
193
|
+
var require_createMappingsSerializer = __commonJS({
|
194
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/createMappingsSerializer.js"(exports, module) {
|
195
|
+
var ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(
|
196
|
+
""
|
197
|
+
);
|
198
|
+
var CONTINUATION_BIT = 32;
|
199
|
+
var createMappingsSerializer = (options) => {
|
200
|
+
const linesOnly = options && options.columns === false;
|
201
|
+
return linesOnly ? createLinesOnlyMappingsSerializer() : createFullMappingsSerializer();
|
202
|
+
};
|
203
|
+
var createFullMappingsSerializer = () => {
|
204
|
+
let currentLine = 1;
|
205
|
+
let currentColumn = 0;
|
206
|
+
let currentSourceIndex = 0;
|
207
|
+
let currentOriginalLine = 1;
|
208
|
+
let currentOriginalColumn = 0;
|
209
|
+
let currentNameIndex = 0;
|
210
|
+
let activeMapping = false;
|
211
|
+
let activeName = false;
|
212
|
+
let initial = true;
|
213
|
+
return (generatedLine, generatedColumn, sourceIndex, originalLine, originalColumn, nameIndex) => {
|
214
|
+
if (activeMapping && currentLine === generatedLine) {
|
215
|
+
if (sourceIndex === currentSourceIndex && originalLine === currentOriginalLine && originalColumn === currentOriginalColumn && !activeName && nameIndex < 0) {
|
216
|
+
return "";
|
217
|
+
}
|
218
|
+
} else {
|
219
|
+
if (sourceIndex < 0) {
|
220
|
+
return "";
|
221
|
+
}
|
222
|
+
}
|
223
|
+
let str;
|
224
|
+
if (currentLine < generatedLine) {
|
225
|
+
str = ";".repeat(generatedLine - currentLine);
|
226
|
+
currentLine = generatedLine;
|
227
|
+
currentColumn = 0;
|
228
|
+
initial = false;
|
229
|
+
} else if (initial) {
|
230
|
+
str = "";
|
231
|
+
initial = false;
|
232
|
+
} else {
|
233
|
+
str = ",";
|
234
|
+
}
|
235
|
+
const writeValue = (value) => {
|
236
|
+
const sign = value >>> 31 & 1;
|
237
|
+
const mask = value >> 31;
|
238
|
+
const absValue = value + mask ^ mask;
|
239
|
+
let data = absValue << 1 | sign;
|
240
|
+
for (; ; ) {
|
241
|
+
const sextet = data & 31;
|
242
|
+
data >>= 5;
|
243
|
+
if (data === 0) {
|
244
|
+
str += ALPHABET[sextet];
|
245
|
+
break;
|
246
|
+
} else {
|
247
|
+
str += ALPHABET[sextet | CONTINUATION_BIT];
|
248
|
+
}
|
249
|
+
}
|
250
|
+
};
|
251
|
+
writeValue(generatedColumn - currentColumn);
|
252
|
+
currentColumn = generatedColumn;
|
253
|
+
if (sourceIndex >= 0) {
|
254
|
+
activeMapping = true;
|
255
|
+
if (sourceIndex === currentSourceIndex) {
|
256
|
+
str += "A";
|
257
|
+
} else {
|
258
|
+
writeValue(sourceIndex - currentSourceIndex);
|
259
|
+
currentSourceIndex = sourceIndex;
|
260
|
+
}
|
261
|
+
writeValue(originalLine - currentOriginalLine);
|
262
|
+
currentOriginalLine = originalLine;
|
263
|
+
if (originalColumn === currentOriginalColumn) {
|
264
|
+
str += "A";
|
265
|
+
} else {
|
266
|
+
writeValue(originalColumn - currentOriginalColumn);
|
267
|
+
currentOriginalColumn = originalColumn;
|
268
|
+
}
|
269
|
+
if (nameIndex >= 0) {
|
270
|
+
writeValue(nameIndex - currentNameIndex);
|
271
|
+
currentNameIndex = nameIndex;
|
272
|
+
activeName = true;
|
273
|
+
} else {
|
274
|
+
activeName = false;
|
275
|
+
}
|
276
|
+
} else {
|
277
|
+
activeMapping = false;
|
278
|
+
}
|
279
|
+
return str;
|
280
|
+
};
|
281
|
+
};
|
282
|
+
var createLinesOnlyMappingsSerializer = () => {
|
283
|
+
let lastWrittenLine = 0;
|
284
|
+
let currentLine = 1;
|
285
|
+
let currentSourceIndex = 0;
|
286
|
+
let currentOriginalLine = 1;
|
287
|
+
return (generatedLine, _generatedColumn, sourceIndex, originalLine, _originalColumn, _nameIndex) => {
|
288
|
+
if (sourceIndex < 0) {
|
289
|
+
return "";
|
290
|
+
}
|
291
|
+
if (lastWrittenLine === generatedLine) {
|
292
|
+
return "";
|
293
|
+
}
|
294
|
+
let str;
|
295
|
+
const writeValue = (value) => {
|
296
|
+
const sign = value >>> 31 & 1;
|
297
|
+
const mask = value >> 31;
|
298
|
+
const absValue = value + mask ^ mask;
|
299
|
+
let data = absValue << 1 | sign;
|
300
|
+
for (; ; ) {
|
301
|
+
const sextet = data & 31;
|
302
|
+
data >>= 5;
|
303
|
+
if (data === 0) {
|
304
|
+
str += ALPHABET[sextet];
|
305
|
+
break;
|
306
|
+
} else {
|
307
|
+
str += ALPHABET[sextet | CONTINUATION_BIT];
|
308
|
+
}
|
309
|
+
}
|
310
|
+
};
|
311
|
+
lastWrittenLine = generatedLine;
|
312
|
+
if (generatedLine === currentLine + 1) {
|
313
|
+
currentLine = generatedLine;
|
314
|
+
if (sourceIndex === currentSourceIndex) {
|
315
|
+
currentSourceIndex = sourceIndex;
|
316
|
+
if (originalLine === currentOriginalLine + 1) {
|
317
|
+
currentOriginalLine = originalLine;
|
318
|
+
return ";AACA";
|
319
|
+
} else {
|
320
|
+
str = ";AA";
|
321
|
+
writeValue(originalLine - currentOriginalLine);
|
322
|
+
currentOriginalLine = originalLine;
|
323
|
+
return str + "A";
|
324
|
+
}
|
325
|
+
} else {
|
326
|
+
str = ";A";
|
327
|
+
writeValue(sourceIndex - currentSourceIndex);
|
328
|
+
currentSourceIndex = sourceIndex;
|
329
|
+
writeValue(originalLine - currentOriginalLine);
|
330
|
+
currentOriginalLine = originalLine;
|
331
|
+
return str + "A";
|
332
|
+
}
|
333
|
+
} else {
|
334
|
+
str = ";".repeat(generatedLine - currentLine);
|
335
|
+
currentLine = generatedLine;
|
336
|
+
if (sourceIndex === currentSourceIndex) {
|
337
|
+
currentSourceIndex = sourceIndex;
|
338
|
+
if (originalLine === currentOriginalLine + 1) {
|
339
|
+
currentOriginalLine = originalLine;
|
340
|
+
return str + "AACA";
|
341
|
+
} else {
|
342
|
+
str += "AA";
|
343
|
+
writeValue(originalLine - currentOriginalLine);
|
344
|
+
currentOriginalLine = originalLine;
|
345
|
+
return str + "A";
|
346
|
+
}
|
347
|
+
} else {
|
348
|
+
str += "A";
|
349
|
+
writeValue(sourceIndex - currentSourceIndex);
|
350
|
+
currentSourceIndex = sourceIndex;
|
351
|
+
writeValue(originalLine - currentOriginalLine);
|
352
|
+
currentOriginalLine = originalLine;
|
353
|
+
return str + "A";
|
354
|
+
}
|
355
|
+
}
|
356
|
+
};
|
357
|
+
};
|
358
|
+
module.exports = createMappingsSerializer;
|
359
|
+
}
|
360
|
+
});
|
361
|
+
|
362
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/getFromStreamChunks.js
|
363
|
+
var require_getFromStreamChunks = __commonJS({
|
364
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/getFromStreamChunks.js"(exports) {
|
365
|
+
var createMappingsSerializer = require_createMappingsSerializer();
|
366
|
+
exports.getSourceAndMap = (inputSource, options) => {
|
367
|
+
let code = "";
|
368
|
+
let mappings = "";
|
369
|
+
let sources = [];
|
370
|
+
let sourcesContent = [];
|
371
|
+
let names = [];
|
372
|
+
const addMapping = createMappingsSerializer(options);
|
373
|
+
const { source } = inputSource.streamChunks(
|
374
|
+
Object.assign({}, options, { finalSource: true }),
|
375
|
+
(chunk, generatedLine, generatedColumn, sourceIndex, originalLine, originalColumn, nameIndex) => {
|
376
|
+
if (chunk !== void 0) code += chunk;
|
377
|
+
mappings += addMapping(
|
378
|
+
generatedLine,
|
379
|
+
generatedColumn,
|
380
|
+
sourceIndex,
|
381
|
+
originalLine,
|
382
|
+
originalColumn,
|
383
|
+
nameIndex
|
384
|
+
);
|
385
|
+
},
|
386
|
+
(sourceIndex, source2, sourceContent) => {
|
387
|
+
while (sources.length < sourceIndex) {
|
388
|
+
sources.push(null);
|
389
|
+
}
|
390
|
+
sources[sourceIndex] = source2;
|
391
|
+
if (sourceContent !== void 0) {
|
392
|
+
while (sourcesContent.length < sourceIndex) {
|
393
|
+
sourcesContent.push(null);
|
394
|
+
}
|
395
|
+
sourcesContent[sourceIndex] = sourceContent;
|
396
|
+
}
|
397
|
+
},
|
398
|
+
(nameIndex, name) => {
|
399
|
+
while (names.length < nameIndex) {
|
400
|
+
names.push(null);
|
401
|
+
}
|
402
|
+
names[nameIndex] = name;
|
403
|
+
}
|
404
|
+
);
|
405
|
+
return {
|
406
|
+
source: source !== void 0 ? source : code,
|
407
|
+
map: mappings.length > 0 ? {
|
408
|
+
version: 3,
|
409
|
+
file: "x",
|
410
|
+
mappings,
|
411
|
+
sources,
|
412
|
+
sourcesContent: sourcesContent.length > 0 ? sourcesContent : void 0,
|
413
|
+
names
|
414
|
+
} : null
|
415
|
+
};
|
416
|
+
};
|
417
|
+
exports.getMap = (source, options) => {
|
418
|
+
let mappings = "";
|
419
|
+
let sources = [];
|
420
|
+
let sourcesContent = [];
|
421
|
+
let names = [];
|
422
|
+
const addMapping = createMappingsSerializer(options);
|
423
|
+
source.streamChunks(
|
424
|
+
Object.assign({}, options, { source: false, finalSource: true }),
|
425
|
+
(chunk, generatedLine, generatedColumn, sourceIndex, originalLine, originalColumn, nameIndex) => {
|
426
|
+
mappings += addMapping(
|
427
|
+
generatedLine,
|
428
|
+
generatedColumn,
|
429
|
+
sourceIndex,
|
430
|
+
originalLine,
|
431
|
+
originalColumn,
|
432
|
+
nameIndex
|
433
|
+
);
|
434
|
+
},
|
435
|
+
(sourceIndex, source2, sourceContent) => {
|
436
|
+
while (sources.length < sourceIndex) {
|
437
|
+
sources.push(null);
|
438
|
+
}
|
439
|
+
sources[sourceIndex] = source2;
|
440
|
+
if (sourceContent !== void 0) {
|
441
|
+
while (sourcesContent.length < sourceIndex) {
|
442
|
+
sourcesContent.push(null);
|
443
|
+
}
|
444
|
+
sourcesContent[sourceIndex] = sourceContent;
|
445
|
+
}
|
446
|
+
},
|
447
|
+
(nameIndex, name) => {
|
448
|
+
while (names.length < nameIndex) {
|
449
|
+
names.push(null);
|
450
|
+
}
|
451
|
+
names[nameIndex] = name;
|
452
|
+
}
|
453
|
+
);
|
454
|
+
return mappings.length > 0 ? {
|
455
|
+
version: 3,
|
456
|
+
file: "x",
|
457
|
+
mappings,
|
458
|
+
sources,
|
459
|
+
sourcesContent: sourcesContent.length > 0 ? sourcesContent : void 0,
|
460
|
+
names
|
461
|
+
} : null;
|
462
|
+
};
|
463
|
+
}
|
464
|
+
});
|
465
|
+
|
466
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/splitIntoPotentialTokens.js
|
467
|
+
var require_splitIntoPotentialTokens = __commonJS({
|
468
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/splitIntoPotentialTokens.js"(exports, module) {
|
469
|
+
var splitIntoPotentialTokens = (str) => {
|
470
|
+
const len = str.length;
|
471
|
+
if (len === 0) return null;
|
472
|
+
const results = [];
|
473
|
+
let i = 0;
|
474
|
+
for (; i < len; ) {
|
475
|
+
const s = i;
|
476
|
+
block: {
|
477
|
+
let cc = str.charCodeAt(i);
|
478
|
+
while (cc !== 10 && cc !== 59 && cc !== 123 && cc !== 125) {
|
479
|
+
if (++i >= len) break block;
|
480
|
+
cc = str.charCodeAt(i);
|
481
|
+
}
|
482
|
+
while (cc === 59 || cc === 32 || cc === 123 || cc === 125 || cc === 13 || cc === 9) {
|
483
|
+
if (++i >= len) break block;
|
484
|
+
cc = str.charCodeAt(i);
|
485
|
+
}
|
486
|
+
if (cc === 10) {
|
487
|
+
i++;
|
488
|
+
}
|
489
|
+
}
|
490
|
+
results.push(str.slice(s, i));
|
491
|
+
}
|
492
|
+
return results;
|
493
|
+
};
|
494
|
+
module.exports = splitIntoPotentialTokens;
|
495
|
+
}
|
496
|
+
});
|
497
|
+
|
498
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/OriginalSource.js
|
499
|
+
var require_OriginalSource = __commonJS({
|
500
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/OriginalSource.js"(exports, module) {
|
501
|
+
var { getMap, getSourceAndMap } = require_getFromStreamChunks();
|
502
|
+
var splitIntoLines = require_splitIntoLines();
|
503
|
+
var getGeneratedSourceInfo = require_getGeneratedSourceInfo();
|
504
|
+
var Source = require_Source();
|
505
|
+
var splitIntoPotentialTokens = require_splitIntoPotentialTokens();
|
506
|
+
var OriginalSource = class extends Source {
|
507
|
+
constructor(value, name) {
|
508
|
+
super();
|
509
|
+
const isBuffer = Buffer.isBuffer(value);
|
510
|
+
this._value = isBuffer ? void 0 : value;
|
511
|
+
this._valueAsBuffer = isBuffer ? value : void 0;
|
512
|
+
this._name = name;
|
513
|
+
}
|
514
|
+
getName() {
|
515
|
+
return this._name;
|
516
|
+
}
|
517
|
+
source() {
|
518
|
+
if (this._value === void 0) {
|
519
|
+
this._value = this._valueAsBuffer.toString("utf-8");
|
520
|
+
}
|
521
|
+
return this._value;
|
522
|
+
}
|
523
|
+
buffer() {
|
524
|
+
if (this._valueAsBuffer === void 0) {
|
525
|
+
this._valueAsBuffer = Buffer.from(this._value, "utf-8");
|
526
|
+
}
|
527
|
+
return this._valueAsBuffer;
|
528
|
+
}
|
529
|
+
map(options) {
|
530
|
+
return getMap(this, options);
|
531
|
+
}
|
532
|
+
sourceAndMap(options) {
|
533
|
+
return getSourceAndMap(this, options);
|
534
|
+
}
|
535
|
+
/**
|
536
|
+
* @param {object} options options
|
537
|
+
* @param {function(string, number, number, number, number, number, number): void} onChunk called for each chunk of code
|
538
|
+
* @param {function(number, string, string)} onSource called for each source
|
539
|
+
* @param {function(number, string)} onName called for each name
|
540
|
+
* @returns {void}
|
541
|
+
*/
|
542
|
+
streamChunks(options, onChunk, onSource, onName) {
|
543
|
+
if (this._value === void 0) {
|
544
|
+
this._value = this._valueAsBuffer.toString("utf-8");
|
545
|
+
}
|
546
|
+
onSource(0, this._name, this._value);
|
547
|
+
const finalSource = !!(options && options.finalSource);
|
548
|
+
if (!options || options.columns !== false) {
|
549
|
+
const matches = splitIntoPotentialTokens(this._value);
|
550
|
+
let line = 1;
|
551
|
+
let column = 0;
|
552
|
+
if (matches !== null) {
|
553
|
+
for (const match of matches) {
|
554
|
+
const isEndOfLine = match.endsWith("\n");
|
555
|
+
if (isEndOfLine && match.length === 1) {
|
556
|
+
if (!finalSource) onChunk(match, line, column, -1, -1, -1, -1);
|
557
|
+
} else {
|
558
|
+
const chunk = finalSource ? void 0 : match;
|
559
|
+
onChunk(chunk, line, column, 0, line, column, -1);
|
560
|
+
}
|
561
|
+
if (isEndOfLine) {
|
562
|
+
line++;
|
563
|
+
column = 0;
|
564
|
+
} else {
|
565
|
+
column += match.length;
|
566
|
+
}
|
567
|
+
}
|
568
|
+
}
|
569
|
+
return {
|
570
|
+
generatedLine: line,
|
571
|
+
generatedColumn: column,
|
572
|
+
source: finalSource ? this._value : void 0
|
573
|
+
};
|
574
|
+
} else if (finalSource) {
|
575
|
+
const result = getGeneratedSourceInfo(this._value);
|
576
|
+
const { generatedLine, generatedColumn } = result;
|
577
|
+
if (generatedColumn === 0) {
|
578
|
+
for (let line = 1; line < generatedLine; line++)
|
579
|
+
onChunk(void 0, line, 0, 0, line, 0, -1);
|
580
|
+
} else {
|
581
|
+
for (let line = 1; line <= generatedLine; line++)
|
582
|
+
onChunk(void 0, line, 0, 0, line, 0, -1);
|
583
|
+
}
|
584
|
+
return result;
|
585
|
+
} else {
|
586
|
+
let line = 1;
|
587
|
+
const matches = splitIntoLines(this._value);
|
588
|
+
let match;
|
589
|
+
for (match of matches) {
|
590
|
+
onChunk(finalSource ? void 0 : match, line, 0, 0, line, 0, -1);
|
591
|
+
line++;
|
592
|
+
}
|
593
|
+
return matches.length === 0 || match.endsWith("\n") ? {
|
594
|
+
generatedLine: matches.length + 1,
|
595
|
+
generatedColumn: 0,
|
596
|
+
source: finalSource ? this._value : void 0
|
597
|
+
} : {
|
598
|
+
generatedLine: matches.length,
|
599
|
+
generatedColumn: match.length,
|
600
|
+
source: finalSource ? this._value : void 0
|
601
|
+
};
|
602
|
+
}
|
603
|
+
}
|
604
|
+
updateHash(hash) {
|
605
|
+
if (this._valueAsBuffer === void 0) {
|
606
|
+
this._valueAsBuffer = Buffer.from(this._value, "utf-8");
|
607
|
+
}
|
608
|
+
hash.update("OriginalSource");
|
609
|
+
hash.update(this._valueAsBuffer);
|
610
|
+
hash.update(this._name || "");
|
611
|
+
}
|
612
|
+
};
|
613
|
+
module.exports = OriginalSource;
|
614
|
+
}
|
615
|
+
});
|
616
|
+
|
617
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/getSource.js
|
618
|
+
var require_getSource = __commonJS({
|
619
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/getSource.js"(exports, module) {
|
620
|
+
var getSource = (sourceMap, index) => {
|
621
|
+
if (index < 0) return null;
|
622
|
+
const { sourceRoot, sources } = sourceMap;
|
623
|
+
const source = sources[index];
|
624
|
+
if (!sourceRoot) return source;
|
625
|
+
if (sourceRoot.endsWith("/")) return sourceRoot + source;
|
626
|
+
return sourceRoot + "/" + source;
|
627
|
+
};
|
628
|
+
module.exports = getSource;
|
629
|
+
}
|
630
|
+
});
|
631
|
+
|
632
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/readMappings.js
|
633
|
+
var require_readMappings = __commonJS({
|
634
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/readMappings.js"(exports, module) {
|
635
|
+
var ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
636
|
+
var CONTINUATION_BIT = 32;
|
637
|
+
var END_SEGMENT_BIT = 64;
|
638
|
+
var NEXT_LINE = END_SEGMENT_BIT | 1;
|
639
|
+
var INVALID = END_SEGMENT_BIT | 2;
|
640
|
+
var DATA_MASK = 31;
|
641
|
+
var ccToValue = new Uint8Array("z".charCodeAt(0) + 1);
|
642
|
+
{
|
643
|
+
ccToValue.fill(INVALID);
|
644
|
+
for (let i = 0; i < ALPHABET.length; i++) {
|
645
|
+
ccToValue[ALPHABET.charCodeAt(i)] = i;
|
646
|
+
}
|
647
|
+
ccToValue[",".charCodeAt(0)] = END_SEGMENT_BIT;
|
648
|
+
ccToValue[";".charCodeAt(0)] = NEXT_LINE;
|
649
|
+
}
|
650
|
+
var ccMax = ccToValue.length - 1;
|
651
|
+
var readMappings = (mappings, onMapping) => {
|
652
|
+
const currentData = new Uint32Array([0, 0, 1, 0, 0]);
|
653
|
+
let currentDataPos = 0;
|
654
|
+
let currentValue = 0;
|
655
|
+
let currentValuePos = 0;
|
656
|
+
let generatedLine = 1;
|
657
|
+
let generatedColumn = -1;
|
658
|
+
for (let i = 0; i < mappings.length; i++) {
|
659
|
+
const cc = mappings.charCodeAt(i);
|
660
|
+
if (cc > ccMax) continue;
|
661
|
+
const value = ccToValue[cc];
|
662
|
+
if ((value & END_SEGMENT_BIT) !== 0) {
|
663
|
+
if (currentData[0] > generatedColumn) {
|
664
|
+
if (currentDataPos === 1) {
|
665
|
+
onMapping(generatedLine, currentData[0], -1, -1, -1, -1);
|
666
|
+
} else if (currentDataPos === 4) {
|
667
|
+
onMapping(
|
668
|
+
generatedLine,
|
669
|
+
currentData[0],
|
670
|
+
currentData[1],
|
671
|
+
currentData[2],
|
672
|
+
currentData[3],
|
673
|
+
-1
|
674
|
+
);
|
675
|
+
} else if (currentDataPos === 5) {
|
676
|
+
onMapping(
|
677
|
+
generatedLine,
|
678
|
+
currentData[0],
|
679
|
+
currentData[1],
|
680
|
+
currentData[2],
|
681
|
+
currentData[3],
|
682
|
+
currentData[4]
|
683
|
+
);
|
684
|
+
}
|
685
|
+
generatedColumn = currentData[0];
|
686
|
+
}
|
687
|
+
currentDataPos = 0;
|
688
|
+
if (value === NEXT_LINE) {
|
689
|
+
generatedLine++;
|
690
|
+
currentData[0] = 0;
|
691
|
+
generatedColumn = -1;
|
692
|
+
}
|
693
|
+
} else if ((value & CONTINUATION_BIT) === 0) {
|
694
|
+
currentValue |= value << currentValuePos;
|
695
|
+
const finalValue = currentValue & 1 ? -(currentValue >> 1) : currentValue >> 1;
|
696
|
+
currentData[currentDataPos++] += finalValue;
|
697
|
+
currentValuePos = 0;
|
698
|
+
currentValue = 0;
|
699
|
+
} else {
|
700
|
+
currentValue |= (value & DATA_MASK) << currentValuePos;
|
701
|
+
currentValuePos += 5;
|
702
|
+
}
|
703
|
+
}
|
704
|
+
if (currentDataPos === 1) {
|
705
|
+
onMapping(generatedLine, currentData[0], -1, -1, -1, -1);
|
706
|
+
} else if (currentDataPos === 4) {
|
707
|
+
onMapping(
|
708
|
+
generatedLine,
|
709
|
+
currentData[0],
|
710
|
+
currentData[1],
|
711
|
+
currentData[2],
|
712
|
+
currentData[3],
|
713
|
+
-1
|
714
|
+
);
|
715
|
+
} else if (currentDataPos === 5) {
|
716
|
+
onMapping(
|
717
|
+
generatedLine,
|
718
|
+
currentData[0],
|
719
|
+
currentData[1],
|
720
|
+
currentData[2],
|
721
|
+
currentData[3],
|
722
|
+
currentData[4]
|
723
|
+
);
|
724
|
+
}
|
725
|
+
};
|
726
|
+
module.exports = readMappings;
|
727
|
+
}
|
728
|
+
});
|
729
|
+
|
730
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/streamChunksOfSourceMap.js
|
731
|
+
var require_streamChunksOfSourceMap = __commonJS({
|
732
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/streamChunksOfSourceMap.js"(exports, module) {
|
733
|
+
var getGeneratedSourceInfo = require_getGeneratedSourceInfo();
|
734
|
+
var getSource = require_getSource();
|
735
|
+
var readMappings = require_readMappings();
|
736
|
+
var splitIntoLines = require_splitIntoLines();
|
737
|
+
var streamChunksOfSourceMapFull = (source, sourceMap, onChunk, onSource, onName) => {
|
738
|
+
const lines = splitIntoLines(source);
|
739
|
+
if (lines.length === 0) {
|
740
|
+
return {
|
741
|
+
generatedLine: 1,
|
742
|
+
generatedColumn: 0
|
743
|
+
};
|
744
|
+
}
|
745
|
+
const { sources, sourcesContent, names, mappings } = sourceMap;
|
746
|
+
for (let i = 0; i < sources.length; i++) {
|
747
|
+
onSource(
|
748
|
+
i,
|
749
|
+
getSource(sourceMap, i),
|
750
|
+
sourcesContent && sourcesContent[i] || void 0
|
751
|
+
);
|
752
|
+
}
|
753
|
+
if (names) {
|
754
|
+
for (let i = 0; i < names.length; i++) {
|
755
|
+
onName(i, names[i]);
|
756
|
+
}
|
757
|
+
}
|
758
|
+
const lastLine = lines[lines.length - 1];
|
759
|
+
const lastNewLine = lastLine.endsWith("\n");
|
760
|
+
const finalLine = lastNewLine ? lines.length + 1 : lines.length;
|
761
|
+
const finalColumn = lastNewLine ? 0 : lastLine.length;
|
762
|
+
let currentGeneratedLine = 1;
|
763
|
+
let currentGeneratedColumn = 0;
|
764
|
+
let mappingActive = false;
|
765
|
+
let activeMappingSourceIndex = -1;
|
766
|
+
let activeMappingOriginalLine = -1;
|
767
|
+
let activeMappingOriginalColumn = -1;
|
768
|
+
let activeMappingNameIndex = -1;
|
769
|
+
const onMapping = (generatedLine, generatedColumn, sourceIndex, originalLine, originalColumn, nameIndex) => {
|
770
|
+
if (mappingActive && currentGeneratedLine <= lines.length) {
|
771
|
+
let chunk;
|
772
|
+
const mappingLine = currentGeneratedLine;
|
773
|
+
const mappingColumn = currentGeneratedColumn;
|
774
|
+
const line = lines[currentGeneratedLine - 1];
|
775
|
+
if (generatedLine !== currentGeneratedLine) {
|
776
|
+
chunk = line.slice(currentGeneratedColumn);
|
777
|
+
currentGeneratedLine++;
|
778
|
+
currentGeneratedColumn = 0;
|
779
|
+
} else {
|
780
|
+
chunk = line.slice(currentGeneratedColumn, generatedColumn);
|
781
|
+
currentGeneratedColumn = generatedColumn;
|
782
|
+
}
|
783
|
+
if (chunk) {
|
784
|
+
onChunk(
|
785
|
+
chunk,
|
786
|
+
mappingLine,
|
787
|
+
mappingColumn,
|
788
|
+
activeMappingSourceIndex,
|
789
|
+
activeMappingOriginalLine,
|
790
|
+
activeMappingOriginalColumn,
|
791
|
+
activeMappingNameIndex
|
792
|
+
);
|
793
|
+
}
|
794
|
+
mappingActive = false;
|
795
|
+
}
|
796
|
+
if (generatedLine > currentGeneratedLine && currentGeneratedColumn > 0) {
|
797
|
+
if (currentGeneratedLine <= lines.length) {
|
798
|
+
const chunk = lines[currentGeneratedLine - 1].slice(
|
799
|
+
currentGeneratedColumn
|
800
|
+
);
|
801
|
+
onChunk(
|
802
|
+
chunk,
|
803
|
+
currentGeneratedLine,
|
804
|
+
currentGeneratedColumn,
|
805
|
+
-1,
|
806
|
+
-1,
|
807
|
+
-1,
|
808
|
+
-1
|
809
|
+
);
|
810
|
+
}
|
811
|
+
currentGeneratedLine++;
|
812
|
+
currentGeneratedColumn = 0;
|
813
|
+
}
|
814
|
+
while (generatedLine > currentGeneratedLine) {
|
815
|
+
if (currentGeneratedLine <= lines.length) {
|
816
|
+
onChunk(
|
817
|
+
lines[currentGeneratedLine - 1],
|
818
|
+
currentGeneratedLine,
|
819
|
+
0,
|
820
|
+
-1,
|
821
|
+
-1,
|
822
|
+
-1,
|
823
|
+
-1
|
824
|
+
);
|
825
|
+
}
|
826
|
+
currentGeneratedLine++;
|
827
|
+
}
|
828
|
+
if (generatedColumn > currentGeneratedColumn) {
|
829
|
+
if (currentGeneratedLine <= lines.length) {
|
830
|
+
const chunk = lines[currentGeneratedLine - 1].slice(
|
831
|
+
currentGeneratedColumn,
|
832
|
+
generatedColumn
|
833
|
+
);
|
834
|
+
onChunk(
|
835
|
+
chunk,
|
836
|
+
currentGeneratedLine,
|
837
|
+
currentGeneratedColumn,
|
838
|
+
-1,
|
839
|
+
-1,
|
840
|
+
-1,
|
841
|
+
-1
|
842
|
+
);
|
843
|
+
}
|
844
|
+
currentGeneratedColumn = generatedColumn;
|
845
|
+
}
|
846
|
+
if (sourceIndex >= 0 && (generatedLine < finalLine || generatedLine === finalLine && generatedColumn < finalColumn)) {
|
847
|
+
mappingActive = true;
|
848
|
+
activeMappingSourceIndex = sourceIndex;
|
849
|
+
activeMappingOriginalLine = originalLine;
|
850
|
+
activeMappingOriginalColumn = originalColumn;
|
851
|
+
activeMappingNameIndex = nameIndex;
|
852
|
+
}
|
853
|
+
};
|
854
|
+
readMappings(mappings, onMapping);
|
855
|
+
onMapping(finalLine, finalColumn, -1, -1, -1, -1);
|
856
|
+
return {
|
857
|
+
generatedLine: finalLine,
|
858
|
+
generatedColumn: finalColumn
|
859
|
+
};
|
860
|
+
};
|
861
|
+
var streamChunksOfSourceMapLinesFull = (source, sourceMap, onChunk, onSource, _onName) => {
|
862
|
+
const lines = splitIntoLines(source);
|
863
|
+
if (lines.length === 0) {
|
864
|
+
return {
|
865
|
+
generatedLine: 1,
|
866
|
+
generatedColumn: 0
|
867
|
+
};
|
868
|
+
}
|
869
|
+
const { sources, sourcesContent, mappings } = sourceMap;
|
870
|
+
for (let i = 0; i < sources.length; i++) {
|
871
|
+
onSource(
|
872
|
+
i,
|
873
|
+
getSource(sourceMap, i),
|
874
|
+
sourcesContent && sourcesContent[i] || void 0
|
875
|
+
);
|
876
|
+
}
|
877
|
+
let currentGeneratedLine = 1;
|
878
|
+
const onMapping = (generatedLine, _generatedColumn, sourceIndex, originalLine, originalColumn, _nameIndex) => {
|
879
|
+
if (sourceIndex < 0 || generatedLine < currentGeneratedLine || generatedLine > lines.length) {
|
880
|
+
return;
|
881
|
+
}
|
882
|
+
while (generatedLine > currentGeneratedLine) {
|
883
|
+
if (currentGeneratedLine <= lines.length) {
|
884
|
+
onChunk(
|
885
|
+
lines[currentGeneratedLine - 1],
|
886
|
+
currentGeneratedLine,
|
887
|
+
0,
|
888
|
+
-1,
|
889
|
+
-1,
|
890
|
+
-1,
|
891
|
+
-1
|
892
|
+
);
|
893
|
+
}
|
894
|
+
currentGeneratedLine++;
|
895
|
+
}
|
896
|
+
if (generatedLine <= lines.length) {
|
897
|
+
onChunk(
|
898
|
+
lines[generatedLine - 1],
|
899
|
+
generatedLine,
|
900
|
+
0,
|
901
|
+
sourceIndex,
|
902
|
+
originalLine,
|
903
|
+
originalColumn,
|
904
|
+
-1
|
905
|
+
);
|
906
|
+
currentGeneratedLine++;
|
907
|
+
}
|
908
|
+
};
|
909
|
+
readMappings(mappings, onMapping);
|
910
|
+
for (; currentGeneratedLine <= lines.length; currentGeneratedLine++) {
|
911
|
+
onChunk(
|
912
|
+
lines[currentGeneratedLine - 1],
|
913
|
+
currentGeneratedLine,
|
914
|
+
0,
|
915
|
+
-1,
|
916
|
+
-1,
|
917
|
+
-1,
|
918
|
+
-1
|
919
|
+
);
|
920
|
+
}
|
921
|
+
const lastLine = lines[lines.length - 1];
|
922
|
+
const lastNewLine = lastLine.endsWith("\n");
|
923
|
+
const finalLine = lastNewLine ? lines.length + 1 : lines.length;
|
924
|
+
const finalColumn = lastNewLine ? 0 : lastLine.length;
|
925
|
+
return {
|
926
|
+
generatedLine: finalLine,
|
927
|
+
generatedColumn: finalColumn
|
928
|
+
};
|
929
|
+
};
|
930
|
+
var streamChunksOfSourceMapFinal = (source, sourceMap, onChunk, onSource, onName) => {
|
931
|
+
const result = getGeneratedSourceInfo(source);
|
932
|
+
const { generatedLine: finalLine, generatedColumn: finalColumn } = result;
|
933
|
+
if (finalLine === 1 && finalColumn === 0) return result;
|
934
|
+
const { sources, sourcesContent, names, mappings } = sourceMap;
|
935
|
+
for (let i = 0; i < sources.length; i++) {
|
936
|
+
onSource(
|
937
|
+
i,
|
938
|
+
getSource(sourceMap, i),
|
939
|
+
sourcesContent && sourcesContent[i] || void 0
|
940
|
+
);
|
941
|
+
}
|
942
|
+
if (names) {
|
943
|
+
for (let i = 0; i < names.length; i++) {
|
944
|
+
onName(i, names[i]);
|
945
|
+
}
|
946
|
+
}
|
947
|
+
let mappingActiveLine = 0;
|
948
|
+
const onMapping = (generatedLine, generatedColumn, sourceIndex, originalLine, originalColumn, nameIndex) => {
|
949
|
+
if (generatedLine >= finalLine && (generatedColumn >= finalColumn || generatedLine > finalLine)) {
|
950
|
+
return;
|
951
|
+
}
|
952
|
+
if (sourceIndex >= 0) {
|
953
|
+
onChunk(
|
954
|
+
void 0,
|
955
|
+
generatedLine,
|
956
|
+
generatedColumn,
|
957
|
+
sourceIndex,
|
958
|
+
originalLine,
|
959
|
+
originalColumn,
|
960
|
+
nameIndex
|
961
|
+
);
|
962
|
+
mappingActiveLine = generatedLine;
|
963
|
+
} else if (mappingActiveLine === generatedLine) {
|
964
|
+
onChunk(void 0, generatedLine, generatedColumn, -1, -1, -1, -1);
|
965
|
+
mappingActiveLine = 0;
|
966
|
+
}
|
967
|
+
};
|
968
|
+
readMappings(mappings, onMapping);
|
969
|
+
return result;
|
970
|
+
};
|
971
|
+
var streamChunksOfSourceMapLinesFinal = (source, sourceMap, onChunk, onSource, _onName) => {
|
972
|
+
const result = getGeneratedSourceInfo(source);
|
973
|
+
const { generatedLine, generatedColumn } = result;
|
974
|
+
if (generatedLine === 1 && generatedColumn === 0) {
|
975
|
+
return {
|
976
|
+
generatedLine: 1,
|
977
|
+
generatedColumn: 0
|
978
|
+
};
|
979
|
+
}
|
980
|
+
const { sources, sourcesContent, mappings } = sourceMap;
|
981
|
+
for (let i = 0; i < sources.length; i++) {
|
982
|
+
onSource(
|
983
|
+
i,
|
984
|
+
getSource(sourceMap, i),
|
985
|
+
sourcesContent && sourcesContent[i] || void 0
|
986
|
+
);
|
987
|
+
}
|
988
|
+
const finalLine = generatedColumn === 0 ? generatedLine - 1 : generatedLine;
|
989
|
+
let currentGeneratedLine = 1;
|
990
|
+
const onMapping = (generatedLine2, _generatedColumn, sourceIndex, originalLine, originalColumn, _nameIndex) => {
|
991
|
+
if (sourceIndex >= 0 && currentGeneratedLine <= generatedLine2 && generatedLine2 <= finalLine) {
|
992
|
+
onChunk(
|
993
|
+
void 0,
|
994
|
+
generatedLine2,
|
995
|
+
0,
|
996
|
+
sourceIndex,
|
997
|
+
originalLine,
|
998
|
+
originalColumn,
|
999
|
+
-1
|
1000
|
+
);
|
1001
|
+
currentGeneratedLine = generatedLine2 + 1;
|
1002
|
+
}
|
1003
|
+
};
|
1004
|
+
readMappings(mappings, onMapping);
|
1005
|
+
return result;
|
1006
|
+
};
|
1007
|
+
module.exports = (source, sourceMap, onChunk, onSource, onName, finalSource, columns) => {
|
1008
|
+
if (columns) {
|
1009
|
+
return finalSource ? streamChunksOfSourceMapFinal(
|
1010
|
+
source,
|
1011
|
+
sourceMap,
|
1012
|
+
onChunk,
|
1013
|
+
onSource,
|
1014
|
+
onName
|
1015
|
+
) : streamChunksOfSourceMapFull(
|
1016
|
+
source,
|
1017
|
+
sourceMap,
|
1018
|
+
onChunk,
|
1019
|
+
onSource,
|
1020
|
+
onName
|
1021
|
+
);
|
1022
|
+
} else {
|
1023
|
+
return finalSource ? streamChunksOfSourceMapLinesFinal(
|
1024
|
+
source,
|
1025
|
+
sourceMap,
|
1026
|
+
onChunk,
|
1027
|
+
onSource) : streamChunksOfSourceMapLinesFull(
|
1028
|
+
source,
|
1029
|
+
sourceMap,
|
1030
|
+
onChunk,
|
1031
|
+
onSource);
|
1032
|
+
}
|
1033
|
+
};
|
1034
|
+
}
|
1035
|
+
});
|
1036
|
+
|
1037
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/streamChunksOfCombinedSourceMap.js
|
1038
|
+
var require_streamChunksOfCombinedSourceMap = __commonJS({
|
1039
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/streamChunksOfCombinedSourceMap.js"(exports, module) {
|
1040
|
+
var streamChunksOfSourceMap = require_streamChunksOfSourceMap();
|
1041
|
+
var splitIntoLines = require_splitIntoLines();
|
1042
|
+
var streamChunksOfCombinedSourceMap = (source, sourceMap, innerSourceName, innerSource, innerSourceMap, removeInnerSource, onChunk, onSource, onName, finalSource, columns) => {
|
1043
|
+
let sourceMapping = /* @__PURE__ */ new Map();
|
1044
|
+
let nameMapping = /* @__PURE__ */ new Map();
|
1045
|
+
const sourceIndexMapping = [];
|
1046
|
+
const nameIndexMapping = [];
|
1047
|
+
const nameIndexValueMapping = [];
|
1048
|
+
let innerSourceIndex = -2;
|
1049
|
+
const innerSourceIndexMapping = [];
|
1050
|
+
const innerSourceIndexValueMapping = [];
|
1051
|
+
const innerSourceContents = [];
|
1052
|
+
const innerSourceContentLines = [];
|
1053
|
+
const innerNameIndexMapping = [];
|
1054
|
+
const innerNameIndexValueMapping = [];
|
1055
|
+
const innerSourceMapLineData = [];
|
1056
|
+
const findInnerMapping = (line, column) => {
|
1057
|
+
if (line > innerSourceMapLineData.length) return -1;
|
1058
|
+
const { mappingsData } = innerSourceMapLineData[line - 1];
|
1059
|
+
let l = 0;
|
1060
|
+
let r = mappingsData.length / 5;
|
1061
|
+
while (l < r) {
|
1062
|
+
let m = l + r >> 1;
|
1063
|
+
if (mappingsData[m * 5] <= column) {
|
1064
|
+
l = m + 1;
|
1065
|
+
} else {
|
1066
|
+
r = m;
|
1067
|
+
}
|
1068
|
+
}
|
1069
|
+
if (l === 0) return -1;
|
1070
|
+
return l - 1;
|
1071
|
+
};
|
1072
|
+
return streamChunksOfSourceMap(
|
1073
|
+
source,
|
1074
|
+
sourceMap,
|
1075
|
+
(chunk, generatedLine, generatedColumn, sourceIndex, originalLine, originalColumn, nameIndex) => {
|
1076
|
+
if (sourceIndex === innerSourceIndex) {
|
1077
|
+
const idx = findInnerMapping(originalLine, originalColumn);
|
1078
|
+
if (idx !== -1) {
|
1079
|
+
const { chunks, mappingsData } = innerSourceMapLineData[originalLine - 1];
|
1080
|
+
const mi = idx * 5;
|
1081
|
+
const innerSourceIndex2 = mappingsData[mi + 1];
|
1082
|
+
const innerOriginalLine = mappingsData[mi + 2];
|
1083
|
+
let innerOriginalColumn = mappingsData[mi + 3];
|
1084
|
+
let innerNameIndex = mappingsData[mi + 4];
|
1085
|
+
if (innerSourceIndex2 >= 0) {
|
1086
|
+
const innerChunk = chunks[idx];
|
1087
|
+
const innerGeneratedColumn = mappingsData[mi];
|
1088
|
+
const locationInChunk = originalColumn - innerGeneratedColumn;
|
1089
|
+
if (locationInChunk > 0) {
|
1090
|
+
let originalSourceLines = innerSourceIndex2 < innerSourceContentLines.length ? innerSourceContentLines[innerSourceIndex2] : null;
|
1091
|
+
if (originalSourceLines === void 0) {
|
1092
|
+
const originalSource = innerSourceContents[innerSourceIndex2];
|
1093
|
+
originalSourceLines = originalSource ? splitIntoLines(originalSource) : null;
|
1094
|
+
innerSourceContentLines[innerSourceIndex2] = originalSourceLines;
|
1095
|
+
}
|
1096
|
+
if (originalSourceLines !== null) {
|
1097
|
+
const originalChunk = innerOriginalLine <= originalSourceLines.length ? originalSourceLines[innerOriginalLine - 1].slice(
|
1098
|
+
innerOriginalColumn,
|
1099
|
+
innerOriginalColumn + locationInChunk
|
1100
|
+
) : "";
|
1101
|
+
if (innerChunk.slice(0, locationInChunk) === originalChunk) {
|
1102
|
+
innerOriginalColumn += locationInChunk;
|
1103
|
+
innerNameIndex = -1;
|
1104
|
+
}
|
1105
|
+
}
|
1106
|
+
}
|
1107
|
+
let sourceIndex2 = innerSourceIndex2 < innerSourceIndexMapping.length ? innerSourceIndexMapping[innerSourceIndex2] : -2;
|
1108
|
+
if (sourceIndex2 === -2) {
|
1109
|
+
const [source2, sourceContent] = innerSourceIndex2 < innerSourceIndexValueMapping.length ? innerSourceIndexValueMapping[innerSourceIndex2] : [null, void 0];
|
1110
|
+
let globalIndex = sourceMapping.get(source2);
|
1111
|
+
if (globalIndex === void 0) {
|
1112
|
+
sourceMapping.set(source2, globalIndex = sourceMapping.size);
|
1113
|
+
onSource(globalIndex, source2, sourceContent);
|
1114
|
+
}
|
1115
|
+
sourceIndex2 = globalIndex;
|
1116
|
+
innerSourceIndexMapping[innerSourceIndex2] = sourceIndex2;
|
1117
|
+
}
|
1118
|
+
let finalNameIndex = -1;
|
1119
|
+
if (innerNameIndex >= 0) {
|
1120
|
+
finalNameIndex = innerNameIndex < innerNameIndexMapping.length ? innerNameIndexMapping[innerNameIndex] : -2;
|
1121
|
+
if (finalNameIndex === -2) {
|
1122
|
+
const name = innerNameIndex < innerNameIndexValueMapping.length ? innerNameIndexValueMapping[innerNameIndex] : void 0;
|
1123
|
+
if (name) {
|
1124
|
+
let globalIndex = nameMapping.get(name);
|
1125
|
+
if (globalIndex === void 0) {
|
1126
|
+
nameMapping.set(name, globalIndex = nameMapping.size);
|
1127
|
+
onName(globalIndex, name);
|
1128
|
+
}
|
1129
|
+
finalNameIndex = globalIndex;
|
1130
|
+
} else {
|
1131
|
+
finalNameIndex = -1;
|
1132
|
+
}
|
1133
|
+
innerNameIndexMapping[innerNameIndex] = finalNameIndex;
|
1134
|
+
}
|
1135
|
+
} else if (nameIndex >= 0) {
|
1136
|
+
let originalSourceLines = innerSourceContentLines[innerSourceIndex2];
|
1137
|
+
if (originalSourceLines === void 0) {
|
1138
|
+
const originalSource = innerSourceContents[innerSourceIndex2];
|
1139
|
+
originalSourceLines = originalSource ? splitIntoLines(originalSource) : null;
|
1140
|
+
innerSourceContentLines[innerSourceIndex2] = originalSourceLines;
|
1141
|
+
}
|
1142
|
+
if (originalSourceLines !== null) {
|
1143
|
+
const name = nameIndexValueMapping[nameIndex];
|
1144
|
+
const originalName = innerOriginalLine <= originalSourceLines.length ? originalSourceLines[innerOriginalLine - 1].slice(
|
1145
|
+
innerOriginalColumn,
|
1146
|
+
innerOriginalColumn + name.length
|
1147
|
+
) : "";
|
1148
|
+
if (name === originalName) {
|
1149
|
+
finalNameIndex = nameIndex < nameIndexMapping.length ? nameIndexMapping[nameIndex] : -2;
|
1150
|
+
if (finalNameIndex === -2) {
|
1151
|
+
const name2 = nameIndexValueMapping[nameIndex];
|
1152
|
+
if (name2) {
|
1153
|
+
let globalIndex = nameMapping.get(name2);
|
1154
|
+
if (globalIndex === void 0) {
|
1155
|
+
nameMapping.set(name2, globalIndex = nameMapping.size);
|
1156
|
+
onName(globalIndex, name2);
|
1157
|
+
}
|
1158
|
+
finalNameIndex = globalIndex;
|
1159
|
+
} else {
|
1160
|
+
finalNameIndex = -1;
|
1161
|
+
}
|
1162
|
+
nameIndexMapping[nameIndex] = finalNameIndex;
|
1163
|
+
}
|
1164
|
+
}
|
1165
|
+
}
|
1166
|
+
}
|
1167
|
+
onChunk(
|
1168
|
+
chunk,
|
1169
|
+
generatedLine,
|
1170
|
+
generatedColumn,
|
1171
|
+
sourceIndex2,
|
1172
|
+
innerOriginalLine,
|
1173
|
+
innerOriginalColumn,
|
1174
|
+
finalNameIndex
|
1175
|
+
);
|
1176
|
+
return;
|
1177
|
+
}
|
1178
|
+
}
|
1179
|
+
if (removeInnerSource) {
|
1180
|
+
onChunk(chunk, generatedLine, generatedColumn, -1, -1, -1, -1);
|
1181
|
+
return;
|
1182
|
+
} else {
|
1183
|
+
if (sourceIndexMapping[sourceIndex] === -2) {
|
1184
|
+
let globalIndex = sourceMapping.get(innerSourceName);
|
1185
|
+
if (globalIndex === void 0) {
|
1186
|
+
sourceMapping.set(source, globalIndex = sourceMapping.size);
|
1187
|
+
onSource(globalIndex, innerSourceName, innerSource);
|
1188
|
+
}
|
1189
|
+
sourceIndexMapping[sourceIndex] = globalIndex;
|
1190
|
+
}
|
1191
|
+
}
|
1192
|
+
}
|
1193
|
+
const finalSourceIndex = sourceIndex < 0 || sourceIndex >= sourceIndexMapping.length ? -1 : sourceIndexMapping[sourceIndex];
|
1194
|
+
if (finalSourceIndex < 0) {
|
1195
|
+
onChunk(chunk, generatedLine, generatedColumn, -1, -1, -1, -1);
|
1196
|
+
} else {
|
1197
|
+
let finalNameIndex = -1;
|
1198
|
+
if (nameIndex >= 0 && nameIndex < nameIndexMapping.length) {
|
1199
|
+
finalNameIndex = nameIndexMapping[nameIndex];
|
1200
|
+
if (finalNameIndex === -2) {
|
1201
|
+
const name = nameIndexValueMapping[nameIndex];
|
1202
|
+
let globalIndex = nameMapping.get(name);
|
1203
|
+
if (globalIndex === void 0) {
|
1204
|
+
nameMapping.set(name, globalIndex = nameMapping.size);
|
1205
|
+
onName(globalIndex, name);
|
1206
|
+
}
|
1207
|
+
finalNameIndex = globalIndex;
|
1208
|
+
nameIndexMapping[nameIndex] = finalNameIndex;
|
1209
|
+
}
|
1210
|
+
}
|
1211
|
+
onChunk(
|
1212
|
+
chunk,
|
1213
|
+
generatedLine,
|
1214
|
+
generatedColumn,
|
1215
|
+
finalSourceIndex,
|
1216
|
+
originalLine,
|
1217
|
+
originalColumn,
|
1218
|
+
finalNameIndex
|
1219
|
+
);
|
1220
|
+
}
|
1221
|
+
},
|
1222
|
+
(i, source2, sourceContent) => {
|
1223
|
+
if (source2 === innerSourceName) {
|
1224
|
+
innerSourceIndex = i;
|
1225
|
+
if (innerSource !== void 0) sourceContent = innerSource;
|
1226
|
+
else innerSource = sourceContent;
|
1227
|
+
sourceIndexMapping[i] = -2;
|
1228
|
+
streamChunksOfSourceMap(
|
1229
|
+
sourceContent,
|
1230
|
+
innerSourceMap,
|
1231
|
+
(chunk, generatedLine, generatedColumn, sourceIndex, originalLine, originalColumn, nameIndex) => {
|
1232
|
+
while (innerSourceMapLineData.length < generatedLine) {
|
1233
|
+
innerSourceMapLineData.push({
|
1234
|
+
mappingsData: [],
|
1235
|
+
chunks: []
|
1236
|
+
});
|
1237
|
+
}
|
1238
|
+
const data = innerSourceMapLineData[generatedLine - 1];
|
1239
|
+
data.mappingsData.push(
|
1240
|
+
generatedColumn,
|
1241
|
+
sourceIndex,
|
1242
|
+
originalLine,
|
1243
|
+
originalColumn,
|
1244
|
+
nameIndex
|
1245
|
+
);
|
1246
|
+
data.chunks.push(chunk);
|
1247
|
+
},
|
1248
|
+
(i2, source3, sourceContent2) => {
|
1249
|
+
innerSourceContents[i2] = sourceContent2;
|
1250
|
+
innerSourceContentLines[i2] = void 0;
|
1251
|
+
innerSourceIndexMapping[i2] = -2;
|
1252
|
+
innerSourceIndexValueMapping[i2] = [source3, sourceContent2];
|
1253
|
+
},
|
1254
|
+
(i2, name) => {
|
1255
|
+
innerNameIndexMapping[i2] = -2;
|
1256
|
+
innerNameIndexValueMapping[i2] = name;
|
1257
|
+
},
|
1258
|
+
false,
|
1259
|
+
columns
|
1260
|
+
);
|
1261
|
+
} else {
|
1262
|
+
let globalIndex = sourceMapping.get(source2);
|
1263
|
+
if (globalIndex === void 0) {
|
1264
|
+
sourceMapping.set(source2, globalIndex = sourceMapping.size);
|
1265
|
+
onSource(globalIndex, source2, sourceContent);
|
1266
|
+
}
|
1267
|
+
sourceIndexMapping[i] = globalIndex;
|
1268
|
+
}
|
1269
|
+
},
|
1270
|
+
(i, name) => {
|
1271
|
+
nameIndexMapping[i] = -2;
|
1272
|
+
nameIndexValueMapping[i] = name;
|
1273
|
+
},
|
1274
|
+
finalSource,
|
1275
|
+
columns
|
1276
|
+
);
|
1277
|
+
};
|
1278
|
+
module.exports = streamChunksOfCombinedSourceMap;
|
1279
|
+
}
|
1280
|
+
});
|
1281
|
+
|
1282
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/SourceMapSource.js
|
1283
|
+
var require_SourceMapSource = __commonJS({
|
1284
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/SourceMapSource.js"(exports, module) {
|
1285
|
+
var Source = require_Source();
|
1286
|
+
var streamChunksOfSourceMap = require_streamChunksOfSourceMap();
|
1287
|
+
var streamChunksOfCombinedSourceMap = require_streamChunksOfCombinedSourceMap();
|
1288
|
+
var { getMap, getSourceAndMap } = require_getFromStreamChunks();
|
1289
|
+
var SourceMapSource = class extends Source {
|
1290
|
+
constructor(value, name, sourceMap, originalSource, innerSourceMap, removeOriginalSource) {
|
1291
|
+
super();
|
1292
|
+
const valueIsBuffer = Buffer.isBuffer(value);
|
1293
|
+
this._valueAsString = valueIsBuffer ? void 0 : value;
|
1294
|
+
this._valueAsBuffer = valueIsBuffer ? value : void 0;
|
1295
|
+
this._name = name;
|
1296
|
+
this._hasSourceMap = !!sourceMap;
|
1297
|
+
const sourceMapIsBuffer = Buffer.isBuffer(sourceMap);
|
1298
|
+
const sourceMapIsString = typeof sourceMap === "string";
|
1299
|
+
this._sourceMapAsObject = sourceMapIsBuffer || sourceMapIsString ? void 0 : sourceMap;
|
1300
|
+
this._sourceMapAsString = sourceMapIsString ? sourceMap : void 0;
|
1301
|
+
this._sourceMapAsBuffer = sourceMapIsBuffer ? sourceMap : void 0;
|
1302
|
+
this._hasOriginalSource = !!originalSource;
|
1303
|
+
const originalSourceIsBuffer = Buffer.isBuffer(originalSource);
|
1304
|
+
this._originalSourceAsString = originalSourceIsBuffer ? void 0 : originalSource;
|
1305
|
+
this._originalSourceAsBuffer = originalSourceIsBuffer ? originalSource : void 0;
|
1306
|
+
this._hasInnerSourceMap = !!innerSourceMap;
|
1307
|
+
const innerSourceMapIsBuffer = Buffer.isBuffer(innerSourceMap);
|
1308
|
+
const innerSourceMapIsString = typeof innerSourceMap === "string";
|
1309
|
+
this._innerSourceMapAsObject = innerSourceMapIsBuffer || innerSourceMapIsString ? void 0 : innerSourceMap;
|
1310
|
+
this._innerSourceMapAsString = innerSourceMapIsString ? innerSourceMap : void 0;
|
1311
|
+
this._innerSourceMapAsBuffer = innerSourceMapIsBuffer ? innerSourceMap : void 0;
|
1312
|
+
this._removeOriginalSource = removeOriginalSource;
|
1313
|
+
}
|
1314
|
+
_ensureValueBuffer() {
|
1315
|
+
if (this._valueAsBuffer === void 0) {
|
1316
|
+
this._valueAsBuffer = Buffer.from(this._valueAsString, "utf-8");
|
1317
|
+
}
|
1318
|
+
}
|
1319
|
+
_ensureValueString() {
|
1320
|
+
if (this._valueAsString === void 0) {
|
1321
|
+
this._valueAsString = this._valueAsBuffer.toString("utf-8");
|
1322
|
+
}
|
1323
|
+
}
|
1324
|
+
_ensureOriginalSourceBuffer() {
|
1325
|
+
if (this._originalSourceAsBuffer === void 0 && this._hasOriginalSource) {
|
1326
|
+
this._originalSourceAsBuffer = Buffer.from(
|
1327
|
+
this._originalSourceAsString,
|
1328
|
+
"utf-8"
|
1329
|
+
);
|
1330
|
+
}
|
1331
|
+
}
|
1332
|
+
_ensureOriginalSourceString() {
|
1333
|
+
if (this._originalSourceAsString === void 0 && this._hasOriginalSource) {
|
1334
|
+
this._originalSourceAsString = this._originalSourceAsBuffer.toString(
|
1335
|
+
"utf-8"
|
1336
|
+
);
|
1337
|
+
}
|
1338
|
+
}
|
1339
|
+
_ensureInnerSourceMapObject() {
|
1340
|
+
if (this._innerSourceMapAsObject === void 0 && this._hasInnerSourceMap) {
|
1341
|
+
this._ensureInnerSourceMapString();
|
1342
|
+
this._innerSourceMapAsObject = JSON.parse(this._innerSourceMapAsString);
|
1343
|
+
}
|
1344
|
+
}
|
1345
|
+
_ensureInnerSourceMapBuffer() {
|
1346
|
+
if (this._innerSourceMapAsBuffer === void 0 && this._hasInnerSourceMap) {
|
1347
|
+
this._ensureInnerSourceMapString();
|
1348
|
+
this._innerSourceMapAsBuffer = Buffer.from(
|
1349
|
+
this._innerSourceMapAsString,
|
1350
|
+
"utf-8"
|
1351
|
+
);
|
1352
|
+
}
|
1353
|
+
}
|
1354
|
+
_ensureInnerSourceMapString() {
|
1355
|
+
if (this._innerSourceMapAsString === void 0 && this._hasInnerSourceMap) {
|
1356
|
+
if (this._innerSourceMapAsBuffer !== void 0) {
|
1357
|
+
this._innerSourceMapAsString = this._innerSourceMapAsBuffer.toString(
|
1358
|
+
"utf-8"
|
1359
|
+
);
|
1360
|
+
} else {
|
1361
|
+
this._innerSourceMapAsString = JSON.stringify(
|
1362
|
+
this._innerSourceMapAsObject
|
1363
|
+
);
|
1364
|
+
}
|
1365
|
+
}
|
1366
|
+
}
|
1367
|
+
_ensureSourceMapObject() {
|
1368
|
+
if (this._sourceMapAsObject === void 0) {
|
1369
|
+
this._ensureSourceMapString();
|
1370
|
+
this._sourceMapAsObject = JSON.parse(this._sourceMapAsString);
|
1371
|
+
}
|
1372
|
+
}
|
1373
|
+
_ensureSourceMapBuffer() {
|
1374
|
+
if (this._sourceMapAsBuffer === void 0) {
|
1375
|
+
this._ensureSourceMapString();
|
1376
|
+
this._sourceMapAsBuffer = Buffer.from(this._sourceMapAsString, "utf-8");
|
1377
|
+
}
|
1378
|
+
}
|
1379
|
+
_ensureSourceMapString() {
|
1380
|
+
if (this._sourceMapAsString === void 0) {
|
1381
|
+
if (this._sourceMapAsBuffer !== void 0) {
|
1382
|
+
this._sourceMapAsString = this._sourceMapAsBuffer.toString("utf-8");
|
1383
|
+
} else {
|
1384
|
+
this._sourceMapAsString = JSON.stringify(this._sourceMapAsObject);
|
1385
|
+
}
|
1386
|
+
}
|
1387
|
+
}
|
1388
|
+
getArgsAsBuffers() {
|
1389
|
+
this._ensureValueBuffer();
|
1390
|
+
this._ensureSourceMapBuffer();
|
1391
|
+
this._ensureOriginalSourceBuffer();
|
1392
|
+
this._ensureInnerSourceMapBuffer();
|
1393
|
+
return [
|
1394
|
+
this._valueAsBuffer,
|
1395
|
+
this._name,
|
1396
|
+
this._sourceMapAsBuffer,
|
1397
|
+
this._originalSourceAsBuffer,
|
1398
|
+
this._innerSourceMapAsBuffer,
|
1399
|
+
this._removeOriginalSource
|
1400
|
+
];
|
1401
|
+
}
|
1402
|
+
buffer() {
|
1403
|
+
this._ensureValueBuffer();
|
1404
|
+
return this._valueAsBuffer;
|
1405
|
+
}
|
1406
|
+
source() {
|
1407
|
+
this._ensureValueString();
|
1408
|
+
return this._valueAsString;
|
1409
|
+
}
|
1410
|
+
map(options) {
|
1411
|
+
if (!this._hasInnerSourceMap) {
|
1412
|
+
this._ensureSourceMapObject();
|
1413
|
+
return this._sourceMapAsObject;
|
1414
|
+
}
|
1415
|
+
return getMap(this, options);
|
1416
|
+
}
|
1417
|
+
sourceAndMap(options) {
|
1418
|
+
if (!this._hasInnerSourceMap) {
|
1419
|
+
this._ensureValueString();
|
1420
|
+
this._ensureSourceMapObject();
|
1421
|
+
return {
|
1422
|
+
source: this._valueAsString,
|
1423
|
+
map: this._sourceMapAsObject
|
1424
|
+
};
|
1425
|
+
}
|
1426
|
+
return getSourceAndMap(this, options);
|
1427
|
+
}
|
1428
|
+
streamChunks(options, onChunk, onSource, onName) {
|
1429
|
+
this._ensureValueString();
|
1430
|
+
this._ensureSourceMapObject();
|
1431
|
+
this._ensureOriginalSourceString();
|
1432
|
+
if (this._hasInnerSourceMap) {
|
1433
|
+
this._ensureInnerSourceMapObject();
|
1434
|
+
return streamChunksOfCombinedSourceMap(
|
1435
|
+
this._valueAsString,
|
1436
|
+
this._sourceMapAsObject,
|
1437
|
+
this._name,
|
1438
|
+
this._originalSourceAsString,
|
1439
|
+
this._innerSourceMapAsObject,
|
1440
|
+
this._removeOriginalSource,
|
1441
|
+
onChunk,
|
1442
|
+
onSource,
|
1443
|
+
onName,
|
1444
|
+
!!(options && options.finalSource),
|
1445
|
+
!!(options && options.columns !== false)
|
1446
|
+
);
|
1447
|
+
} else {
|
1448
|
+
return streamChunksOfSourceMap(
|
1449
|
+
this._valueAsString,
|
1450
|
+
this._sourceMapAsObject,
|
1451
|
+
onChunk,
|
1452
|
+
onSource,
|
1453
|
+
onName,
|
1454
|
+
!!(options && options.finalSource),
|
1455
|
+
!!(options && options.columns !== false)
|
1456
|
+
);
|
1457
|
+
}
|
1458
|
+
}
|
1459
|
+
updateHash(hash) {
|
1460
|
+
this._ensureValueBuffer();
|
1461
|
+
this._ensureSourceMapBuffer();
|
1462
|
+
this._ensureOriginalSourceBuffer();
|
1463
|
+
this._ensureInnerSourceMapBuffer();
|
1464
|
+
hash.update("SourceMapSource");
|
1465
|
+
hash.update(this._valueAsBuffer);
|
1466
|
+
hash.update(this._sourceMapAsBuffer);
|
1467
|
+
if (this._hasOriginalSource) {
|
1468
|
+
hash.update(this._originalSourceAsBuffer);
|
1469
|
+
}
|
1470
|
+
if (this._hasInnerSourceMap) {
|
1471
|
+
hash.update(this._innerSourceMapAsBuffer);
|
1472
|
+
}
|
1473
|
+
hash.update(this._removeOriginalSource ? "true" : "false");
|
1474
|
+
}
|
1475
|
+
};
|
1476
|
+
module.exports = SourceMapSource;
|
1477
|
+
}
|
1478
|
+
});
|
1479
|
+
|
1480
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/streamChunks.js
|
1481
|
+
var require_streamChunks = __commonJS({
|
1482
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/streamChunks.js"(exports, module) {
|
1483
|
+
var streamChunksOfRawSource = require_streamChunksOfRawSource();
|
1484
|
+
var streamChunksOfSourceMap = require_streamChunksOfSourceMap();
|
1485
|
+
module.exports = (source, options, onChunk, onSource, onName) => {
|
1486
|
+
if (typeof source.streamChunks === "function") {
|
1487
|
+
return source.streamChunks(options, onChunk, onSource, onName);
|
1488
|
+
} else {
|
1489
|
+
const sourceAndMap = source.sourceAndMap(options);
|
1490
|
+
if (sourceAndMap.map) {
|
1491
|
+
return streamChunksOfSourceMap(
|
1492
|
+
sourceAndMap.source,
|
1493
|
+
sourceAndMap.map,
|
1494
|
+
onChunk,
|
1495
|
+
onSource,
|
1496
|
+
onName,
|
1497
|
+
!!(options && options.finalSource),
|
1498
|
+
!!(options && options.columns !== false)
|
1499
|
+
);
|
1500
|
+
} else {
|
1501
|
+
return streamChunksOfRawSource(
|
1502
|
+
sourceAndMap.source,
|
1503
|
+
onChunk,
|
1504
|
+
onSource,
|
1505
|
+
onName,
|
1506
|
+
!!(options && options.finalSource)
|
1507
|
+
);
|
1508
|
+
}
|
1509
|
+
}
|
1510
|
+
};
|
1511
|
+
}
|
1512
|
+
});
|
1513
|
+
|
1514
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/streamAndGetSourceAndMap.js
|
1515
|
+
var require_streamAndGetSourceAndMap = __commonJS({
|
1516
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/helpers/streamAndGetSourceAndMap.js"(exports, module) {
|
1517
|
+
var createMappingsSerializer = require_createMappingsSerializer();
|
1518
|
+
var streamChunks = require_streamChunks();
|
1519
|
+
var streamAndGetSourceAndMap = (inputSource, options, onChunk, onSource, onName) => {
|
1520
|
+
let code = "";
|
1521
|
+
let mappings = "";
|
1522
|
+
let sources = [];
|
1523
|
+
let sourcesContent = [];
|
1524
|
+
let names = [];
|
1525
|
+
const addMapping = createMappingsSerializer(
|
1526
|
+
Object.assign({}, options, { columns: true })
|
1527
|
+
);
|
1528
|
+
const finalSource = !!(options && options.finalSource);
|
1529
|
+
const { generatedLine, generatedColumn, source } = streamChunks(
|
1530
|
+
inputSource,
|
1531
|
+
options,
|
1532
|
+
(chunk, generatedLine2, generatedColumn2, sourceIndex, originalLine, originalColumn, nameIndex) => {
|
1533
|
+
if (chunk !== void 0) code += chunk;
|
1534
|
+
mappings += addMapping(
|
1535
|
+
generatedLine2,
|
1536
|
+
generatedColumn2,
|
1537
|
+
sourceIndex,
|
1538
|
+
originalLine,
|
1539
|
+
originalColumn,
|
1540
|
+
nameIndex
|
1541
|
+
);
|
1542
|
+
return onChunk(
|
1543
|
+
finalSource ? void 0 : chunk,
|
1544
|
+
generatedLine2,
|
1545
|
+
generatedColumn2,
|
1546
|
+
sourceIndex,
|
1547
|
+
originalLine,
|
1548
|
+
originalColumn,
|
1549
|
+
nameIndex
|
1550
|
+
);
|
1551
|
+
},
|
1552
|
+
(sourceIndex, source2, sourceContent) => {
|
1553
|
+
while (sources.length < sourceIndex) {
|
1554
|
+
sources.push(null);
|
1555
|
+
}
|
1556
|
+
sources[sourceIndex] = source2;
|
1557
|
+
if (sourceContent !== void 0) {
|
1558
|
+
while (sourcesContent.length < sourceIndex) {
|
1559
|
+
sourcesContent.push(null);
|
1560
|
+
}
|
1561
|
+
sourcesContent[sourceIndex] = sourceContent;
|
1562
|
+
}
|
1563
|
+
return onSource(sourceIndex, source2, sourceContent);
|
1564
|
+
},
|
1565
|
+
(nameIndex, name) => {
|
1566
|
+
while (names.length < nameIndex) {
|
1567
|
+
names.push(null);
|
1568
|
+
}
|
1569
|
+
names[nameIndex] = name;
|
1570
|
+
return onName(nameIndex, name);
|
1571
|
+
}
|
1572
|
+
);
|
1573
|
+
const resultSource = source !== void 0 ? source : code;
|
1574
|
+
return {
|
1575
|
+
result: {
|
1576
|
+
generatedLine,
|
1577
|
+
generatedColumn,
|
1578
|
+
source: finalSource ? resultSource : void 0
|
1579
|
+
},
|
1580
|
+
source: resultSource,
|
1581
|
+
map: mappings.length > 0 ? {
|
1582
|
+
version: 3,
|
1583
|
+
file: "x",
|
1584
|
+
mappings,
|
1585
|
+
sources,
|
1586
|
+
sourcesContent: sourcesContent.length > 0 ? sourcesContent : void 0,
|
1587
|
+
names
|
1588
|
+
} : null
|
1589
|
+
};
|
1590
|
+
};
|
1591
|
+
module.exports = streamAndGetSourceAndMap;
|
1592
|
+
}
|
1593
|
+
});
|
1594
|
+
|
1595
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/CachedSource.js
|
1596
|
+
var require_CachedSource = __commonJS({
|
1597
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/CachedSource.js"(exports, module) {
|
1598
|
+
var Source = require_Source();
|
1599
|
+
var streamChunksOfSourceMap = require_streamChunksOfSourceMap();
|
1600
|
+
var streamChunksOfRawSource = require_streamChunksOfRawSource();
|
1601
|
+
var streamAndGetSourceAndMap = require_streamAndGetSourceAndMap();
|
1602
|
+
var mapToBufferedMap = (map) => {
|
1603
|
+
if (typeof map !== "object" || !map) return map;
|
1604
|
+
const bufferedMap = Object.assign({}, map);
|
1605
|
+
if (map.mappings) {
|
1606
|
+
bufferedMap.mappings = Buffer.from(map.mappings, "utf-8");
|
1607
|
+
}
|
1608
|
+
if (map.sourcesContent) {
|
1609
|
+
bufferedMap.sourcesContent = map.sourcesContent.map(
|
1610
|
+
(str) => str && Buffer.from(str, "utf-8")
|
1611
|
+
);
|
1612
|
+
}
|
1613
|
+
return bufferedMap;
|
1614
|
+
};
|
1615
|
+
var bufferedMapToMap = (bufferedMap) => {
|
1616
|
+
if (typeof bufferedMap !== "object" || !bufferedMap) return bufferedMap;
|
1617
|
+
const map = Object.assign({}, bufferedMap);
|
1618
|
+
if (bufferedMap.mappings) {
|
1619
|
+
map.mappings = bufferedMap.mappings.toString("utf-8");
|
1620
|
+
}
|
1621
|
+
if (bufferedMap.sourcesContent) {
|
1622
|
+
map.sourcesContent = bufferedMap.sourcesContent.map(
|
1623
|
+
(buffer) => buffer && buffer.toString("utf-8")
|
1624
|
+
);
|
1625
|
+
}
|
1626
|
+
return map;
|
1627
|
+
};
|
1628
|
+
var CachedSource = class extends Source {
|
1629
|
+
constructor(source, cachedData) {
|
1630
|
+
super();
|
1631
|
+
this._source = source;
|
1632
|
+
this._cachedSourceType = cachedData ? cachedData.source : void 0;
|
1633
|
+
this._cachedSource = void 0;
|
1634
|
+
this._cachedBuffer = cachedData ? cachedData.buffer : void 0;
|
1635
|
+
this._cachedSize = cachedData ? cachedData.size : void 0;
|
1636
|
+
this._cachedMaps = cachedData ? cachedData.maps : /* @__PURE__ */ new Map();
|
1637
|
+
this._cachedHashUpdate = cachedData ? cachedData.hash : void 0;
|
1638
|
+
}
|
1639
|
+
getCachedData() {
|
1640
|
+
const bufferedMaps = /* @__PURE__ */ new Map();
|
1641
|
+
for (const pair of this._cachedMaps) {
|
1642
|
+
let cacheEntry = pair[1];
|
1643
|
+
if (cacheEntry.bufferedMap === void 0) {
|
1644
|
+
cacheEntry.bufferedMap = mapToBufferedMap(
|
1645
|
+
this._getMapFromCacheEntry(cacheEntry)
|
1646
|
+
);
|
1647
|
+
}
|
1648
|
+
bufferedMaps.set(pair[0], {
|
1649
|
+
map: void 0,
|
1650
|
+
bufferedMap: cacheEntry.bufferedMap
|
1651
|
+
});
|
1652
|
+
}
|
1653
|
+
if (this._cachedSource) {
|
1654
|
+
this.buffer();
|
1655
|
+
}
|
1656
|
+
return {
|
1657
|
+
buffer: this._cachedBuffer,
|
1658
|
+
source: this._cachedSourceType !== void 0 ? this._cachedSourceType : typeof this._cachedSource === "string" ? true : Buffer.isBuffer(this._cachedSource) ? false : void 0,
|
1659
|
+
size: this._cachedSize,
|
1660
|
+
maps: bufferedMaps,
|
1661
|
+
hash: this._cachedHashUpdate
|
1662
|
+
};
|
1663
|
+
}
|
1664
|
+
originalLazy() {
|
1665
|
+
return this._source;
|
1666
|
+
}
|
1667
|
+
original() {
|
1668
|
+
if (typeof this._source === "function") this._source = this._source();
|
1669
|
+
return this._source;
|
1670
|
+
}
|
1671
|
+
source() {
|
1672
|
+
const source = this._getCachedSource();
|
1673
|
+
if (source !== void 0) return source;
|
1674
|
+
return this._cachedSource = this.original().source();
|
1675
|
+
}
|
1676
|
+
_getMapFromCacheEntry(cacheEntry) {
|
1677
|
+
if (cacheEntry.map !== void 0) {
|
1678
|
+
return cacheEntry.map;
|
1679
|
+
} else if (cacheEntry.bufferedMap !== void 0) {
|
1680
|
+
return cacheEntry.map = bufferedMapToMap(cacheEntry.bufferedMap);
|
1681
|
+
}
|
1682
|
+
}
|
1683
|
+
_getCachedSource() {
|
1684
|
+
if (this._cachedSource !== void 0) return this._cachedSource;
|
1685
|
+
if (this._cachedBuffer && this._cachedSourceType !== void 0) {
|
1686
|
+
return this._cachedSource = this._cachedSourceType ? this._cachedBuffer.toString("utf-8") : this._cachedBuffer;
|
1687
|
+
}
|
1688
|
+
}
|
1689
|
+
buffer() {
|
1690
|
+
if (this._cachedBuffer !== void 0) return this._cachedBuffer;
|
1691
|
+
if (this._cachedSource !== void 0) {
|
1692
|
+
if (Buffer.isBuffer(this._cachedSource)) {
|
1693
|
+
return this._cachedBuffer = this._cachedSource;
|
1694
|
+
}
|
1695
|
+
return this._cachedBuffer = Buffer.from(this._cachedSource, "utf-8");
|
1696
|
+
}
|
1697
|
+
if (typeof this.original().buffer === "function") {
|
1698
|
+
return this._cachedBuffer = this.original().buffer();
|
1699
|
+
}
|
1700
|
+
const bufferOrString = this.source();
|
1701
|
+
if (Buffer.isBuffer(bufferOrString)) {
|
1702
|
+
return this._cachedBuffer = bufferOrString;
|
1703
|
+
}
|
1704
|
+
return this._cachedBuffer = Buffer.from(bufferOrString, "utf-8");
|
1705
|
+
}
|
1706
|
+
size() {
|
1707
|
+
if (this._cachedSize !== void 0) return this._cachedSize;
|
1708
|
+
if (this._cachedBuffer !== void 0) {
|
1709
|
+
return this._cachedSize = this._cachedBuffer.length;
|
1710
|
+
}
|
1711
|
+
const source = this._getCachedSource();
|
1712
|
+
if (source !== void 0) {
|
1713
|
+
return this._cachedSize = Buffer.byteLength(source);
|
1714
|
+
}
|
1715
|
+
return this._cachedSize = this.original().size();
|
1716
|
+
}
|
1717
|
+
sourceAndMap(options) {
|
1718
|
+
const key = options ? JSON.stringify(options) : "{}";
|
1719
|
+
const cacheEntry = this._cachedMaps.get(key);
|
1720
|
+
if (cacheEntry !== void 0) {
|
1721
|
+
const map2 = this._getMapFromCacheEntry(cacheEntry);
|
1722
|
+
return { source: this.source(), map: map2 };
|
1723
|
+
}
|
1724
|
+
let source = this._getCachedSource();
|
1725
|
+
let map;
|
1726
|
+
if (source !== void 0) {
|
1727
|
+
map = this.original().map(options);
|
1728
|
+
} else {
|
1729
|
+
const sourceAndMap = this.original().sourceAndMap(options);
|
1730
|
+
source = sourceAndMap.source;
|
1731
|
+
map = sourceAndMap.map;
|
1732
|
+
this._cachedSource = source;
|
1733
|
+
}
|
1734
|
+
this._cachedMaps.set(key, {
|
1735
|
+
map,
|
1736
|
+
bufferedMap: void 0
|
1737
|
+
});
|
1738
|
+
return { source, map };
|
1739
|
+
}
|
1740
|
+
streamChunks(options, onChunk, onSource, onName) {
|
1741
|
+
const key = options ? JSON.stringify(options) : "{}";
|
1742
|
+
if (this._cachedMaps.has(key) && (this._cachedBuffer !== void 0 || this._cachedSource !== void 0)) {
|
1743
|
+
const { source: source2, map: map2 } = this.sourceAndMap(options);
|
1744
|
+
if (map2) {
|
1745
|
+
return streamChunksOfSourceMap(
|
1746
|
+
source2,
|
1747
|
+
map2,
|
1748
|
+
onChunk,
|
1749
|
+
onSource,
|
1750
|
+
onName,
|
1751
|
+
!!(options && options.finalSource),
|
1752
|
+
true
|
1753
|
+
);
|
1754
|
+
} else {
|
1755
|
+
return streamChunksOfRawSource(
|
1756
|
+
source2,
|
1757
|
+
onChunk,
|
1758
|
+
onSource,
|
1759
|
+
onName,
|
1760
|
+
!!(options && options.finalSource)
|
1761
|
+
);
|
1762
|
+
}
|
1763
|
+
}
|
1764
|
+
const { result, source, map } = streamAndGetSourceAndMap(
|
1765
|
+
this.original(),
|
1766
|
+
options,
|
1767
|
+
onChunk,
|
1768
|
+
onSource,
|
1769
|
+
onName
|
1770
|
+
);
|
1771
|
+
this._cachedSource = source;
|
1772
|
+
this._cachedMaps.set(key, {
|
1773
|
+
map,
|
1774
|
+
bufferedMap: void 0
|
1775
|
+
});
|
1776
|
+
return result;
|
1777
|
+
}
|
1778
|
+
map(options) {
|
1779
|
+
const key = options ? JSON.stringify(options) : "{}";
|
1780
|
+
const cacheEntry = this._cachedMaps.get(key);
|
1781
|
+
if (cacheEntry !== void 0) {
|
1782
|
+
return this._getMapFromCacheEntry(cacheEntry);
|
1783
|
+
}
|
1784
|
+
const map = this.original().map(options);
|
1785
|
+
this._cachedMaps.set(key, {
|
1786
|
+
map,
|
1787
|
+
bufferedMap: void 0
|
1788
|
+
});
|
1789
|
+
return map;
|
1790
|
+
}
|
1791
|
+
updateHash(hash) {
|
1792
|
+
if (this._cachedHashUpdate !== void 0) {
|
1793
|
+
for (const item of this._cachedHashUpdate) hash.update(item);
|
1794
|
+
return;
|
1795
|
+
}
|
1796
|
+
const update = [];
|
1797
|
+
let currentString = void 0;
|
1798
|
+
const tracker = {
|
1799
|
+
update: (item) => {
|
1800
|
+
if (typeof item === "string" && item.length < 10240) {
|
1801
|
+
if (currentString === void 0) {
|
1802
|
+
currentString = item;
|
1803
|
+
} else {
|
1804
|
+
currentString += item;
|
1805
|
+
if (currentString.length > 102400) {
|
1806
|
+
update.push(Buffer.from(currentString));
|
1807
|
+
currentString = void 0;
|
1808
|
+
}
|
1809
|
+
}
|
1810
|
+
} else {
|
1811
|
+
if (currentString !== void 0) {
|
1812
|
+
update.push(Buffer.from(currentString));
|
1813
|
+
currentString = void 0;
|
1814
|
+
}
|
1815
|
+
update.push(item);
|
1816
|
+
}
|
1817
|
+
}
|
1818
|
+
};
|
1819
|
+
this.original().updateHash(tracker);
|
1820
|
+
if (currentString !== void 0) {
|
1821
|
+
update.push(Buffer.from(currentString));
|
1822
|
+
}
|
1823
|
+
for (const item of update) hash.update(item);
|
1824
|
+
this._cachedHashUpdate = update;
|
1825
|
+
}
|
1826
|
+
};
|
1827
|
+
module.exports = CachedSource;
|
1828
|
+
}
|
1829
|
+
});
|
1830
|
+
|
1831
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/ConcatSource.js
|
1832
|
+
var require_ConcatSource = __commonJS({
|
1833
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/ConcatSource.js"(exports, module) {
|
1834
|
+
var Source = require_Source();
|
1835
|
+
var RawSource = require_RawSource();
|
1836
|
+
var streamChunks = require_streamChunks();
|
1837
|
+
var { getMap, getSourceAndMap } = require_getFromStreamChunks();
|
1838
|
+
var stringsAsRawSources = /* @__PURE__ */ new WeakSet();
|
1839
|
+
var ConcatSource = class _ConcatSource extends Source {
|
1840
|
+
constructor() {
|
1841
|
+
super();
|
1842
|
+
this._children = [];
|
1843
|
+
for (let i = 0; i < arguments.length; i++) {
|
1844
|
+
const item = arguments[i];
|
1845
|
+
if (item instanceof _ConcatSource) {
|
1846
|
+
for (const child of item._children) {
|
1847
|
+
this._children.push(child);
|
1848
|
+
}
|
1849
|
+
} else {
|
1850
|
+
this._children.push(item);
|
1851
|
+
}
|
1852
|
+
}
|
1853
|
+
this._isOptimized = arguments.length === 0;
|
1854
|
+
}
|
1855
|
+
getChildren() {
|
1856
|
+
if (!this._isOptimized) this._optimize();
|
1857
|
+
return this._children;
|
1858
|
+
}
|
1859
|
+
add(item) {
|
1860
|
+
if (item instanceof _ConcatSource) {
|
1861
|
+
for (const child of item._children) {
|
1862
|
+
this._children.push(child);
|
1863
|
+
}
|
1864
|
+
} else {
|
1865
|
+
this._children.push(item);
|
1866
|
+
}
|
1867
|
+
this._isOptimized = false;
|
1868
|
+
}
|
1869
|
+
addAllSkipOptimizing(items) {
|
1870
|
+
for (const item of items) {
|
1871
|
+
this._children.push(item);
|
1872
|
+
}
|
1873
|
+
}
|
1874
|
+
buffer() {
|
1875
|
+
if (!this._isOptimized) this._optimize();
|
1876
|
+
const buffers = [];
|
1877
|
+
for (const child of this._children) {
|
1878
|
+
if (typeof child.buffer === "function") {
|
1879
|
+
buffers.push(child.buffer());
|
1880
|
+
} else {
|
1881
|
+
const bufferOrString = child.source();
|
1882
|
+
if (Buffer.isBuffer(bufferOrString)) {
|
1883
|
+
buffers.push(bufferOrString);
|
1884
|
+
} else {
|
1885
|
+
buffers.push(Buffer.from(bufferOrString, "utf-8"));
|
1886
|
+
}
|
1887
|
+
}
|
1888
|
+
}
|
1889
|
+
return Buffer.concat(buffers);
|
1890
|
+
}
|
1891
|
+
source() {
|
1892
|
+
if (!this._isOptimized) this._optimize();
|
1893
|
+
let source = "";
|
1894
|
+
for (const child of this._children) {
|
1895
|
+
source += child.source();
|
1896
|
+
}
|
1897
|
+
return source;
|
1898
|
+
}
|
1899
|
+
size() {
|
1900
|
+
if (!this._isOptimized) this._optimize();
|
1901
|
+
let size = 0;
|
1902
|
+
for (const child of this._children) {
|
1903
|
+
size += child.size();
|
1904
|
+
}
|
1905
|
+
return size;
|
1906
|
+
}
|
1907
|
+
map(options) {
|
1908
|
+
return getMap(this, options);
|
1909
|
+
}
|
1910
|
+
sourceAndMap(options) {
|
1911
|
+
return getSourceAndMap(this, options);
|
1912
|
+
}
|
1913
|
+
streamChunks(options, onChunk, onSource, onName) {
|
1914
|
+
if (!this._isOptimized) this._optimize();
|
1915
|
+
if (this._children.length === 1)
|
1916
|
+
return this._children[0].streamChunks(options, onChunk, onSource, onName);
|
1917
|
+
let currentLineOffset = 0;
|
1918
|
+
let currentColumnOffset = 0;
|
1919
|
+
let sourceMapping = /* @__PURE__ */ new Map();
|
1920
|
+
let nameMapping = /* @__PURE__ */ new Map();
|
1921
|
+
const finalSource = !!(options && options.finalSource);
|
1922
|
+
let code = "";
|
1923
|
+
let needToCloseMapping = false;
|
1924
|
+
for (const item of this._children) {
|
1925
|
+
const sourceIndexMapping = [];
|
1926
|
+
const nameIndexMapping = [];
|
1927
|
+
let lastMappingLine = 0;
|
1928
|
+
const { generatedLine, generatedColumn, source } = streamChunks(
|
1929
|
+
item,
|
1930
|
+
options,
|
1931
|
+
// eslint-disable-next-line no-loop-func
|
1932
|
+
(chunk, generatedLine2, generatedColumn2, sourceIndex, originalLine, originalColumn, nameIndex) => {
|
1933
|
+
const line = generatedLine2 + currentLineOffset;
|
1934
|
+
const column = generatedLine2 === 1 ? generatedColumn2 + currentColumnOffset : generatedColumn2;
|
1935
|
+
if (needToCloseMapping) {
|
1936
|
+
if (generatedLine2 !== 1 || generatedColumn2 !== 0) {
|
1937
|
+
onChunk(
|
1938
|
+
void 0,
|
1939
|
+
currentLineOffset + 1,
|
1940
|
+
currentColumnOffset,
|
1941
|
+
-1,
|
1942
|
+
-1,
|
1943
|
+
-1,
|
1944
|
+
-1
|
1945
|
+
);
|
1946
|
+
}
|
1947
|
+
needToCloseMapping = false;
|
1948
|
+
}
|
1949
|
+
const resultSourceIndex = sourceIndex < 0 || sourceIndex >= sourceIndexMapping.length ? -1 : sourceIndexMapping[sourceIndex];
|
1950
|
+
const resultNameIndex = nameIndex < 0 || nameIndex >= nameIndexMapping.length ? -1 : nameIndexMapping[nameIndex];
|
1951
|
+
lastMappingLine = resultSourceIndex < 0 ? 0 : generatedLine2;
|
1952
|
+
if (finalSource) {
|
1953
|
+
if (chunk !== void 0) code += chunk;
|
1954
|
+
if (resultSourceIndex >= 0) {
|
1955
|
+
onChunk(
|
1956
|
+
void 0,
|
1957
|
+
line,
|
1958
|
+
column,
|
1959
|
+
resultSourceIndex,
|
1960
|
+
originalLine,
|
1961
|
+
originalColumn,
|
1962
|
+
resultNameIndex
|
1963
|
+
);
|
1964
|
+
}
|
1965
|
+
} else {
|
1966
|
+
if (resultSourceIndex < 0) {
|
1967
|
+
onChunk(chunk, line, column, -1, -1, -1, -1);
|
1968
|
+
} else {
|
1969
|
+
onChunk(
|
1970
|
+
chunk,
|
1971
|
+
line,
|
1972
|
+
column,
|
1973
|
+
resultSourceIndex,
|
1974
|
+
originalLine,
|
1975
|
+
originalColumn,
|
1976
|
+
resultNameIndex
|
1977
|
+
);
|
1978
|
+
}
|
1979
|
+
}
|
1980
|
+
},
|
1981
|
+
(i, source2, sourceContent) => {
|
1982
|
+
let globalIndex = sourceMapping.get(source2);
|
1983
|
+
if (globalIndex === void 0) {
|
1984
|
+
sourceMapping.set(source2, globalIndex = sourceMapping.size);
|
1985
|
+
onSource(globalIndex, source2, sourceContent);
|
1986
|
+
}
|
1987
|
+
sourceIndexMapping[i] = globalIndex;
|
1988
|
+
},
|
1989
|
+
(i, name) => {
|
1990
|
+
let globalIndex = nameMapping.get(name);
|
1991
|
+
if (globalIndex === void 0) {
|
1992
|
+
nameMapping.set(name, globalIndex = nameMapping.size);
|
1993
|
+
onName(globalIndex, name);
|
1994
|
+
}
|
1995
|
+
nameIndexMapping[i] = globalIndex;
|
1996
|
+
}
|
1997
|
+
);
|
1998
|
+
if (source !== void 0) code += source;
|
1999
|
+
if (needToCloseMapping) {
|
2000
|
+
if (generatedLine !== 1 || generatedColumn !== 0) {
|
2001
|
+
onChunk(
|
2002
|
+
void 0,
|
2003
|
+
currentLineOffset + 1,
|
2004
|
+
currentColumnOffset,
|
2005
|
+
-1,
|
2006
|
+
-1,
|
2007
|
+
-1,
|
2008
|
+
-1
|
2009
|
+
);
|
2010
|
+
needToCloseMapping = false;
|
2011
|
+
}
|
2012
|
+
}
|
2013
|
+
if (generatedLine > 1) {
|
2014
|
+
currentColumnOffset = generatedColumn;
|
2015
|
+
} else {
|
2016
|
+
currentColumnOffset += generatedColumn;
|
2017
|
+
}
|
2018
|
+
needToCloseMapping = needToCloseMapping || finalSource && lastMappingLine === generatedLine;
|
2019
|
+
currentLineOffset += generatedLine - 1;
|
2020
|
+
}
|
2021
|
+
return {
|
2022
|
+
generatedLine: currentLineOffset + 1,
|
2023
|
+
generatedColumn: currentColumnOffset,
|
2024
|
+
source: finalSource ? code : void 0
|
2025
|
+
};
|
2026
|
+
}
|
2027
|
+
updateHash(hash) {
|
2028
|
+
if (!this._isOptimized) this._optimize();
|
2029
|
+
hash.update("ConcatSource");
|
2030
|
+
for (const item of this._children) {
|
2031
|
+
item.updateHash(hash);
|
2032
|
+
}
|
2033
|
+
}
|
2034
|
+
_optimize() {
|
2035
|
+
const newChildren = [];
|
2036
|
+
let currentString = void 0;
|
2037
|
+
let currentRawSources = void 0;
|
2038
|
+
const addStringToRawSources = (string) => {
|
2039
|
+
if (currentRawSources === void 0) {
|
2040
|
+
currentRawSources = string;
|
2041
|
+
} else if (Array.isArray(currentRawSources)) {
|
2042
|
+
currentRawSources.push(string);
|
2043
|
+
} else {
|
2044
|
+
currentRawSources = [
|
2045
|
+
typeof currentRawSources === "string" ? currentRawSources : currentRawSources.source(),
|
2046
|
+
string
|
2047
|
+
];
|
2048
|
+
}
|
2049
|
+
};
|
2050
|
+
const addSourceToRawSources = (source) => {
|
2051
|
+
if (currentRawSources === void 0) {
|
2052
|
+
currentRawSources = source;
|
2053
|
+
} else if (Array.isArray(currentRawSources)) {
|
2054
|
+
currentRawSources.push(source.source());
|
2055
|
+
} else {
|
2056
|
+
currentRawSources = [
|
2057
|
+
typeof currentRawSources === "string" ? currentRawSources : currentRawSources.source(),
|
2058
|
+
source.source()
|
2059
|
+
];
|
2060
|
+
}
|
2061
|
+
};
|
2062
|
+
const mergeRawSources = () => {
|
2063
|
+
if (Array.isArray(currentRawSources)) {
|
2064
|
+
const rawSource = new RawSource(currentRawSources.join(""));
|
2065
|
+
stringsAsRawSources.add(rawSource);
|
2066
|
+
newChildren.push(rawSource);
|
2067
|
+
} else if (typeof currentRawSources === "string") {
|
2068
|
+
const rawSource = new RawSource(currentRawSources);
|
2069
|
+
stringsAsRawSources.add(rawSource);
|
2070
|
+
newChildren.push(rawSource);
|
2071
|
+
} else {
|
2072
|
+
newChildren.push(currentRawSources);
|
2073
|
+
}
|
2074
|
+
};
|
2075
|
+
for (const child of this._children) {
|
2076
|
+
if (typeof child === "string") {
|
2077
|
+
if (currentString === void 0) {
|
2078
|
+
currentString = child;
|
2079
|
+
} else {
|
2080
|
+
currentString += child;
|
2081
|
+
}
|
2082
|
+
} else {
|
2083
|
+
if (currentString !== void 0) {
|
2084
|
+
addStringToRawSources(currentString);
|
2085
|
+
currentString = void 0;
|
2086
|
+
}
|
2087
|
+
if (stringsAsRawSources.has(child)) {
|
2088
|
+
addSourceToRawSources(child);
|
2089
|
+
} else {
|
2090
|
+
if (currentRawSources !== void 0) {
|
2091
|
+
mergeRawSources();
|
2092
|
+
currentRawSources = void 0;
|
2093
|
+
}
|
2094
|
+
newChildren.push(child);
|
2095
|
+
}
|
2096
|
+
}
|
2097
|
+
}
|
2098
|
+
if (currentString !== void 0) {
|
2099
|
+
addStringToRawSources(currentString);
|
2100
|
+
}
|
2101
|
+
if (currentRawSources !== void 0) {
|
2102
|
+
mergeRawSources();
|
2103
|
+
}
|
2104
|
+
this._children = newChildren;
|
2105
|
+
this._isOptimized = true;
|
2106
|
+
}
|
2107
|
+
};
|
2108
|
+
module.exports = ConcatSource;
|
2109
|
+
}
|
2110
|
+
});
|
2111
|
+
|
2112
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/ReplaceSource.js
|
2113
|
+
var require_ReplaceSource = __commonJS({
|
2114
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/ReplaceSource.js"(exports, module) {
|
2115
|
+
var { getMap, getSourceAndMap } = require_getFromStreamChunks();
|
2116
|
+
var streamChunks = require_streamChunks();
|
2117
|
+
var Source = require_Source();
|
2118
|
+
var splitIntoLines = require_splitIntoLines();
|
2119
|
+
var hasStableSort = typeof process === "object" && process.versions && typeof process.versions.v8 === "string" && !/^[0-6]\./.test(process.versions.v8);
|
2120
|
+
var MAX_SOURCE_POSITION = 536870912;
|
2121
|
+
var Replacement = class {
|
2122
|
+
constructor(start, end, content, name) {
|
2123
|
+
this.start = start;
|
2124
|
+
this.end = end;
|
2125
|
+
this.content = content;
|
2126
|
+
this.name = name;
|
2127
|
+
if (!hasStableSort) {
|
2128
|
+
this.index = -1;
|
2129
|
+
}
|
2130
|
+
}
|
2131
|
+
};
|
2132
|
+
var ReplaceSource = class extends Source {
|
2133
|
+
constructor(source, name) {
|
2134
|
+
super();
|
2135
|
+
this._source = source;
|
2136
|
+
this._name = name;
|
2137
|
+
this._replacements = [];
|
2138
|
+
this._isSorted = true;
|
2139
|
+
}
|
2140
|
+
getName() {
|
2141
|
+
return this._name;
|
2142
|
+
}
|
2143
|
+
getReplacements() {
|
2144
|
+
this._sortReplacements();
|
2145
|
+
return this._replacements;
|
2146
|
+
}
|
2147
|
+
replace(start, end, newValue, name) {
|
2148
|
+
if (typeof newValue !== "string")
|
2149
|
+
throw new Error(
|
2150
|
+
"insertion must be a string, but is a " + typeof newValue
|
2151
|
+
);
|
2152
|
+
this._replacements.push(new Replacement(start, end, newValue, name));
|
2153
|
+
this._isSorted = false;
|
2154
|
+
}
|
2155
|
+
insert(pos, newValue, name) {
|
2156
|
+
if (typeof newValue !== "string")
|
2157
|
+
throw new Error(
|
2158
|
+
"insertion must be a string, but is a " + typeof newValue + ": " + newValue
|
2159
|
+
);
|
2160
|
+
this._replacements.push(new Replacement(pos, pos - 1, newValue, name));
|
2161
|
+
this._isSorted = false;
|
2162
|
+
}
|
2163
|
+
source() {
|
2164
|
+
if (this._replacements.length === 0) {
|
2165
|
+
return this._source.source();
|
2166
|
+
}
|
2167
|
+
let current = this._source.source();
|
2168
|
+
let pos = 0;
|
2169
|
+
const result = [];
|
2170
|
+
this._sortReplacements();
|
2171
|
+
for (const replacement of this._replacements) {
|
2172
|
+
const start = Math.floor(replacement.start);
|
2173
|
+
const end = Math.floor(replacement.end + 1);
|
2174
|
+
if (pos < start) {
|
2175
|
+
const offset = start - pos;
|
2176
|
+
result.push(current.slice(0, offset));
|
2177
|
+
current = current.slice(offset);
|
2178
|
+
pos = start;
|
2179
|
+
}
|
2180
|
+
result.push(replacement.content);
|
2181
|
+
if (pos < end) {
|
2182
|
+
const offset = end - pos;
|
2183
|
+
current = current.slice(offset);
|
2184
|
+
pos = end;
|
2185
|
+
}
|
2186
|
+
}
|
2187
|
+
result.push(current);
|
2188
|
+
return result.join("");
|
2189
|
+
}
|
2190
|
+
map(options) {
|
2191
|
+
if (this._replacements.length === 0) {
|
2192
|
+
return this._source.map(options);
|
2193
|
+
}
|
2194
|
+
return getMap(this, options);
|
2195
|
+
}
|
2196
|
+
sourceAndMap(options) {
|
2197
|
+
if (this._replacements.length === 0) {
|
2198
|
+
return this._source.sourceAndMap(options);
|
2199
|
+
}
|
2200
|
+
return getSourceAndMap(this, options);
|
2201
|
+
}
|
2202
|
+
original() {
|
2203
|
+
return this._source;
|
2204
|
+
}
|
2205
|
+
_sortReplacements() {
|
2206
|
+
if (this._isSorted) return;
|
2207
|
+
if (hasStableSort) {
|
2208
|
+
this._replacements.sort(function(a, b) {
|
2209
|
+
const diff1 = a.start - b.start;
|
2210
|
+
if (diff1 !== 0) return diff1;
|
2211
|
+
const diff2 = a.end - b.end;
|
2212
|
+
if (diff2 !== 0) return diff2;
|
2213
|
+
return 0;
|
2214
|
+
});
|
2215
|
+
} else {
|
2216
|
+
this._replacements.forEach((repl, i) => repl.index = i);
|
2217
|
+
this._replacements.sort(function(a, b) {
|
2218
|
+
const diff1 = a.start - b.start;
|
2219
|
+
if (diff1 !== 0) return diff1;
|
2220
|
+
const diff2 = a.end - b.end;
|
2221
|
+
if (diff2 !== 0) return diff2;
|
2222
|
+
return a.index - b.index;
|
2223
|
+
});
|
2224
|
+
}
|
2225
|
+
this._isSorted = true;
|
2226
|
+
}
|
2227
|
+
streamChunks(options, onChunk, onSource, onName) {
|
2228
|
+
this._sortReplacements();
|
2229
|
+
const repls = this._replacements;
|
2230
|
+
let pos = 0;
|
2231
|
+
let i = 0;
|
2232
|
+
let replacmentEnd = -1;
|
2233
|
+
let nextReplacement = i < repls.length ? Math.floor(repls[i].start) : MAX_SOURCE_POSITION;
|
2234
|
+
let generatedLineOffset = 0;
|
2235
|
+
let generatedColumnOffset = 0;
|
2236
|
+
let generatedColumnOffsetLine = 0;
|
2237
|
+
const sourceContents = [];
|
2238
|
+
const nameMapping = /* @__PURE__ */ new Map();
|
2239
|
+
const nameIndexMapping = [];
|
2240
|
+
const checkOriginalContent = (sourceIndex, line2, column, expectedChunk) => {
|
2241
|
+
let content = sourceIndex < sourceContents.length ? sourceContents[sourceIndex] : void 0;
|
2242
|
+
if (content === void 0) return false;
|
2243
|
+
if (typeof content === "string") {
|
2244
|
+
content = splitIntoLines(content);
|
2245
|
+
sourceContents[sourceIndex] = content;
|
2246
|
+
}
|
2247
|
+
const contentLine = line2 <= content.length ? content[line2 - 1] : null;
|
2248
|
+
if (contentLine === null) return false;
|
2249
|
+
return contentLine.slice(column, column + expectedChunk.length) === expectedChunk;
|
2250
|
+
};
|
2251
|
+
let { generatedLine, generatedColumn } = streamChunks(
|
2252
|
+
this._source,
|
2253
|
+
Object.assign({}, options, { finalSource: false }),
|
2254
|
+
(chunk, generatedLine2, generatedColumn2, sourceIndex, originalLine, originalColumn, nameIndex) => {
|
2255
|
+
let chunkPos = 0;
|
2256
|
+
let endPos = pos + chunk.length;
|
2257
|
+
if (replacmentEnd > pos) {
|
2258
|
+
if (replacmentEnd >= endPos) {
|
2259
|
+
const line3 = generatedLine2 + generatedLineOffset;
|
2260
|
+
if (chunk.endsWith("\n")) {
|
2261
|
+
generatedLineOffset--;
|
2262
|
+
if (generatedColumnOffsetLine === line3) {
|
2263
|
+
generatedColumnOffset += generatedColumn2;
|
2264
|
+
}
|
2265
|
+
} else if (generatedColumnOffsetLine === line3) {
|
2266
|
+
generatedColumnOffset -= chunk.length;
|
2267
|
+
} else {
|
2268
|
+
generatedColumnOffset = -chunk.length;
|
2269
|
+
generatedColumnOffsetLine = line3;
|
2270
|
+
}
|
2271
|
+
pos = endPos;
|
2272
|
+
return;
|
2273
|
+
}
|
2274
|
+
chunkPos = replacmentEnd - pos;
|
2275
|
+
if (checkOriginalContent(
|
2276
|
+
sourceIndex,
|
2277
|
+
originalLine,
|
2278
|
+
originalColumn,
|
2279
|
+
chunk.slice(0, chunkPos)
|
2280
|
+
)) {
|
2281
|
+
originalColumn += chunkPos;
|
2282
|
+
}
|
2283
|
+
pos += chunkPos;
|
2284
|
+
const line2 = generatedLine2 + generatedLineOffset;
|
2285
|
+
if (generatedColumnOffsetLine === line2) {
|
2286
|
+
generatedColumnOffset -= chunkPos;
|
2287
|
+
} else {
|
2288
|
+
generatedColumnOffset = -chunkPos;
|
2289
|
+
generatedColumnOffsetLine = line2;
|
2290
|
+
}
|
2291
|
+
generatedColumn2 += chunkPos;
|
2292
|
+
}
|
2293
|
+
if (nextReplacement < endPos) {
|
2294
|
+
do {
|
2295
|
+
let line2 = generatedLine2 + generatedLineOffset;
|
2296
|
+
if (nextReplacement > pos) {
|
2297
|
+
const offset2 = nextReplacement - pos;
|
2298
|
+
const chunkSlice = chunk.slice(chunkPos, chunkPos + offset2);
|
2299
|
+
onChunk(
|
2300
|
+
chunkSlice,
|
2301
|
+
line2,
|
2302
|
+
generatedColumn2 + (line2 === generatedColumnOffsetLine ? generatedColumnOffset : 0),
|
2303
|
+
sourceIndex,
|
2304
|
+
originalLine,
|
2305
|
+
originalColumn,
|
2306
|
+
nameIndex < 0 || nameIndex >= nameIndexMapping.length ? -1 : nameIndexMapping[nameIndex]
|
2307
|
+
);
|
2308
|
+
generatedColumn2 += offset2;
|
2309
|
+
chunkPos += offset2;
|
2310
|
+
pos = nextReplacement;
|
2311
|
+
if (checkOriginalContent(
|
2312
|
+
sourceIndex,
|
2313
|
+
originalLine,
|
2314
|
+
originalColumn,
|
2315
|
+
chunkSlice
|
2316
|
+
)) {
|
2317
|
+
originalColumn += chunkSlice.length;
|
2318
|
+
}
|
2319
|
+
}
|
2320
|
+
const { content, name } = repls[i];
|
2321
|
+
let matches2 = splitIntoLines(content);
|
2322
|
+
let replacementNameIndex = nameIndex;
|
2323
|
+
if (sourceIndex >= 0 && name) {
|
2324
|
+
let globalIndex = nameMapping.get(name);
|
2325
|
+
if (globalIndex === void 0) {
|
2326
|
+
globalIndex = nameMapping.size;
|
2327
|
+
nameMapping.set(name, globalIndex);
|
2328
|
+
onName(globalIndex, name);
|
2329
|
+
}
|
2330
|
+
replacementNameIndex = globalIndex;
|
2331
|
+
}
|
2332
|
+
for (let m = 0; m < matches2.length; m++) {
|
2333
|
+
const contentLine = matches2[m];
|
2334
|
+
onChunk(
|
2335
|
+
contentLine,
|
2336
|
+
line2,
|
2337
|
+
generatedColumn2 + (line2 === generatedColumnOffsetLine ? generatedColumnOffset : 0),
|
2338
|
+
sourceIndex,
|
2339
|
+
originalLine,
|
2340
|
+
originalColumn,
|
2341
|
+
replacementNameIndex
|
2342
|
+
);
|
2343
|
+
replacementNameIndex = -1;
|
2344
|
+
if (m === matches2.length - 1 && !contentLine.endsWith("\n")) {
|
2345
|
+
if (generatedColumnOffsetLine === line2) {
|
2346
|
+
generatedColumnOffset += contentLine.length;
|
2347
|
+
} else {
|
2348
|
+
generatedColumnOffset = contentLine.length;
|
2349
|
+
generatedColumnOffsetLine = line2;
|
2350
|
+
}
|
2351
|
+
} else {
|
2352
|
+
generatedLineOffset++;
|
2353
|
+
line2++;
|
2354
|
+
generatedColumnOffset = -generatedColumn2;
|
2355
|
+
generatedColumnOffsetLine = line2;
|
2356
|
+
}
|
2357
|
+
}
|
2358
|
+
replacmentEnd = Math.max(
|
2359
|
+
replacmentEnd,
|
2360
|
+
Math.floor(repls[i].end + 1)
|
2361
|
+
);
|
2362
|
+
i++;
|
2363
|
+
nextReplacement = i < repls.length ? Math.floor(repls[i].start) : MAX_SOURCE_POSITION;
|
2364
|
+
const offset = chunk.length - endPos + replacmentEnd - chunkPos;
|
2365
|
+
if (offset > 0) {
|
2366
|
+
if (replacmentEnd >= endPos) {
|
2367
|
+
let line4 = generatedLine2 + generatedLineOffset;
|
2368
|
+
if (chunk.endsWith("\n")) {
|
2369
|
+
generatedLineOffset--;
|
2370
|
+
if (generatedColumnOffsetLine === line4) {
|
2371
|
+
generatedColumnOffset += generatedColumn2;
|
2372
|
+
}
|
2373
|
+
} else if (generatedColumnOffsetLine === line4) {
|
2374
|
+
generatedColumnOffset -= chunk.length - chunkPos;
|
2375
|
+
} else {
|
2376
|
+
generatedColumnOffset = chunkPos - chunk.length;
|
2377
|
+
generatedColumnOffsetLine = line4;
|
2378
|
+
}
|
2379
|
+
pos = endPos;
|
2380
|
+
return;
|
2381
|
+
}
|
2382
|
+
const line3 = generatedLine2 + generatedLineOffset;
|
2383
|
+
if (checkOriginalContent(
|
2384
|
+
sourceIndex,
|
2385
|
+
originalLine,
|
2386
|
+
originalColumn,
|
2387
|
+
chunk.slice(chunkPos, chunkPos + offset)
|
2388
|
+
)) {
|
2389
|
+
originalColumn += offset;
|
2390
|
+
}
|
2391
|
+
chunkPos += offset;
|
2392
|
+
pos += offset;
|
2393
|
+
if (generatedColumnOffsetLine === line3) {
|
2394
|
+
generatedColumnOffset -= offset;
|
2395
|
+
} else {
|
2396
|
+
generatedColumnOffset = -offset;
|
2397
|
+
generatedColumnOffsetLine = line3;
|
2398
|
+
}
|
2399
|
+
generatedColumn2 += offset;
|
2400
|
+
}
|
2401
|
+
} while (nextReplacement < endPos);
|
2402
|
+
}
|
2403
|
+
if (chunkPos < chunk.length) {
|
2404
|
+
const chunkSlice = chunkPos === 0 ? chunk : chunk.slice(chunkPos);
|
2405
|
+
const line2 = generatedLine2 + generatedLineOffset;
|
2406
|
+
onChunk(
|
2407
|
+
chunkSlice,
|
2408
|
+
line2,
|
2409
|
+
generatedColumn2 + (line2 === generatedColumnOffsetLine ? generatedColumnOffset : 0),
|
2410
|
+
sourceIndex,
|
2411
|
+
originalLine,
|
2412
|
+
originalColumn,
|
2413
|
+
nameIndex < 0 ? -1 : nameIndexMapping[nameIndex]
|
2414
|
+
);
|
2415
|
+
}
|
2416
|
+
pos = endPos;
|
2417
|
+
},
|
2418
|
+
(sourceIndex, source, sourceContent) => {
|
2419
|
+
while (sourceContents.length < sourceIndex)
|
2420
|
+
sourceContents.push(void 0);
|
2421
|
+
sourceContents[sourceIndex] = sourceContent;
|
2422
|
+
onSource(sourceIndex, source, sourceContent);
|
2423
|
+
},
|
2424
|
+
(nameIndex, name) => {
|
2425
|
+
let globalIndex = nameMapping.get(name);
|
2426
|
+
if (globalIndex === void 0) {
|
2427
|
+
globalIndex = nameMapping.size;
|
2428
|
+
nameMapping.set(name, globalIndex);
|
2429
|
+
onName(globalIndex, name);
|
2430
|
+
}
|
2431
|
+
nameIndexMapping[nameIndex] = globalIndex;
|
2432
|
+
}
|
2433
|
+
);
|
2434
|
+
let remainer = "";
|
2435
|
+
for (; i < repls.length; i++) {
|
2436
|
+
remainer += repls[i].content;
|
2437
|
+
}
|
2438
|
+
let line = generatedLine + generatedLineOffset;
|
2439
|
+
let matches = splitIntoLines(remainer);
|
2440
|
+
for (let m = 0; m < matches.length; m++) {
|
2441
|
+
const contentLine = matches[m];
|
2442
|
+
onChunk(
|
2443
|
+
contentLine,
|
2444
|
+
line,
|
2445
|
+
generatedColumn + (line === generatedColumnOffsetLine ? generatedColumnOffset : 0),
|
2446
|
+
-1,
|
2447
|
+
-1,
|
2448
|
+
-1,
|
2449
|
+
-1
|
2450
|
+
);
|
2451
|
+
if (m === matches.length - 1 && !contentLine.endsWith("\n")) {
|
2452
|
+
if (generatedColumnOffsetLine === line) {
|
2453
|
+
generatedColumnOffset += contentLine.length;
|
2454
|
+
} else {
|
2455
|
+
generatedColumnOffset = contentLine.length;
|
2456
|
+
generatedColumnOffsetLine = line;
|
2457
|
+
}
|
2458
|
+
} else {
|
2459
|
+
generatedLineOffset++;
|
2460
|
+
line++;
|
2461
|
+
generatedColumnOffset = -generatedColumn;
|
2462
|
+
generatedColumnOffsetLine = line;
|
2463
|
+
}
|
2464
|
+
}
|
2465
|
+
return {
|
2466
|
+
generatedLine: line,
|
2467
|
+
generatedColumn: generatedColumn + (line === generatedColumnOffsetLine ? generatedColumnOffset : 0)
|
2468
|
+
};
|
2469
|
+
}
|
2470
|
+
updateHash(hash) {
|
2471
|
+
this._sortReplacements();
|
2472
|
+
hash.update("ReplaceSource");
|
2473
|
+
this._source.updateHash(hash);
|
2474
|
+
hash.update(this._name || "");
|
2475
|
+
for (const repl of this._replacements) {
|
2476
|
+
hash.update(`${repl.start}${repl.end}${repl.content}${repl.name}`);
|
2477
|
+
}
|
2478
|
+
}
|
2479
|
+
};
|
2480
|
+
module.exports = ReplaceSource;
|
2481
|
+
}
|
2482
|
+
});
|
2483
|
+
|
2484
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/PrefixSource.js
|
2485
|
+
var require_PrefixSource = __commonJS({
|
2486
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/PrefixSource.js"(exports, module) {
|
2487
|
+
var Source = require_Source();
|
2488
|
+
var RawSource = require_RawSource();
|
2489
|
+
var streamChunks = require_streamChunks();
|
2490
|
+
var { getMap, getSourceAndMap } = require_getFromStreamChunks();
|
2491
|
+
var REPLACE_REGEX = /\n(?=.|\s)/g;
|
2492
|
+
var PrefixSource = class extends Source {
|
2493
|
+
constructor(prefix, source) {
|
2494
|
+
super();
|
2495
|
+
this._source = typeof source === "string" || Buffer.isBuffer(source) ? new RawSource(source, true) : source;
|
2496
|
+
this._prefix = prefix;
|
2497
|
+
}
|
2498
|
+
getPrefix() {
|
2499
|
+
return this._prefix;
|
2500
|
+
}
|
2501
|
+
original() {
|
2502
|
+
return this._source;
|
2503
|
+
}
|
2504
|
+
source() {
|
2505
|
+
const node = this._source.source();
|
2506
|
+
const prefix = this._prefix;
|
2507
|
+
return prefix + node.replace(REPLACE_REGEX, "\n" + prefix);
|
2508
|
+
}
|
2509
|
+
// TODO efficient buffer() implementation
|
2510
|
+
map(options) {
|
2511
|
+
return getMap(this, options);
|
2512
|
+
}
|
2513
|
+
sourceAndMap(options) {
|
2514
|
+
return getSourceAndMap(this, options);
|
2515
|
+
}
|
2516
|
+
streamChunks(options, onChunk, onSource, onName) {
|
2517
|
+
const prefix = this._prefix;
|
2518
|
+
const prefixOffset = prefix.length;
|
2519
|
+
const linesOnly = !!(options && options.columns === false);
|
2520
|
+
const { generatedLine, generatedColumn, source } = streamChunks(
|
2521
|
+
this._source,
|
2522
|
+
options,
|
2523
|
+
(chunk, generatedLine2, generatedColumn2, sourceIndex, originalLine, originalColumn, nameIndex) => {
|
2524
|
+
if (generatedColumn2 !== 0) {
|
2525
|
+
generatedColumn2 += prefixOffset;
|
2526
|
+
} else if (chunk !== void 0) {
|
2527
|
+
if (linesOnly || sourceIndex < 0) {
|
2528
|
+
chunk = prefix + chunk;
|
2529
|
+
} else if (prefixOffset > 0) {
|
2530
|
+
onChunk(prefix, generatedLine2, generatedColumn2, -1, -1, -1, -1);
|
2531
|
+
generatedColumn2 += prefixOffset;
|
2532
|
+
}
|
2533
|
+
} else if (!linesOnly) {
|
2534
|
+
generatedColumn2 += prefixOffset;
|
2535
|
+
}
|
2536
|
+
onChunk(
|
2537
|
+
chunk,
|
2538
|
+
generatedLine2,
|
2539
|
+
generatedColumn2,
|
2540
|
+
sourceIndex,
|
2541
|
+
originalLine,
|
2542
|
+
originalColumn,
|
2543
|
+
nameIndex
|
2544
|
+
);
|
2545
|
+
},
|
2546
|
+
onSource,
|
2547
|
+
onName
|
2548
|
+
);
|
2549
|
+
return {
|
2550
|
+
generatedLine,
|
2551
|
+
generatedColumn: generatedColumn === 0 ? 0 : prefixOffset + generatedColumn,
|
2552
|
+
source: source !== void 0 ? prefix + source.replace(REPLACE_REGEX, "\n" + prefix) : void 0
|
2553
|
+
};
|
2554
|
+
}
|
2555
|
+
updateHash(hash) {
|
2556
|
+
hash.update("PrefixSource");
|
2557
|
+
this._source.updateHash(hash);
|
2558
|
+
hash.update(this._prefix);
|
2559
|
+
}
|
2560
|
+
};
|
2561
|
+
module.exports = PrefixSource;
|
2562
|
+
}
|
2563
|
+
});
|
2564
|
+
|
2565
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/SizeOnlySource.js
|
2566
|
+
var require_SizeOnlySource = __commonJS({
|
2567
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/SizeOnlySource.js"(exports, module) {
|
2568
|
+
var Source = require_Source();
|
2569
|
+
var SizeOnlySource = class extends Source {
|
2570
|
+
constructor(size) {
|
2571
|
+
super();
|
2572
|
+
this._size = size;
|
2573
|
+
}
|
2574
|
+
_error() {
|
2575
|
+
return new Error(
|
2576
|
+
"Content and Map of this Source is not available (only size() is supported)"
|
2577
|
+
);
|
2578
|
+
}
|
2579
|
+
size() {
|
2580
|
+
return this._size;
|
2581
|
+
}
|
2582
|
+
source() {
|
2583
|
+
throw this._error();
|
2584
|
+
}
|
2585
|
+
buffer() {
|
2586
|
+
throw this._error();
|
2587
|
+
}
|
2588
|
+
map(options) {
|
2589
|
+
throw this._error();
|
2590
|
+
}
|
2591
|
+
updateHash() {
|
2592
|
+
throw this._error();
|
2593
|
+
}
|
2594
|
+
};
|
2595
|
+
module.exports = SizeOnlySource;
|
2596
|
+
}
|
2597
|
+
});
|
2598
|
+
|
2599
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/CompatSource.js
|
2600
|
+
var require_CompatSource = __commonJS({
|
2601
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/CompatSource.js"(exports, module) {
|
2602
|
+
var Source = require_Source();
|
2603
|
+
var CompatSource = class _CompatSource extends Source {
|
2604
|
+
static from(sourceLike) {
|
2605
|
+
return sourceLike instanceof Source ? sourceLike : new _CompatSource(sourceLike);
|
2606
|
+
}
|
2607
|
+
constructor(sourceLike) {
|
2608
|
+
super();
|
2609
|
+
this._sourceLike = sourceLike;
|
2610
|
+
}
|
2611
|
+
source() {
|
2612
|
+
return this._sourceLike.source();
|
2613
|
+
}
|
2614
|
+
buffer() {
|
2615
|
+
if (typeof this._sourceLike.buffer === "function") {
|
2616
|
+
return this._sourceLike.buffer();
|
2617
|
+
}
|
2618
|
+
return super.buffer();
|
2619
|
+
}
|
2620
|
+
size() {
|
2621
|
+
if (typeof this._sourceLike.size === "function") {
|
2622
|
+
return this._sourceLike.size();
|
2623
|
+
}
|
2624
|
+
return super.size();
|
2625
|
+
}
|
2626
|
+
map(options) {
|
2627
|
+
if (typeof this._sourceLike.map === "function") {
|
2628
|
+
return this._sourceLike.map(options);
|
2629
|
+
}
|
2630
|
+
return super.map(options);
|
2631
|
+
}
|
2632
|
+
sourceAndMap(options) {
|
2633
|
+
if (typeof this._sourceLike.sourceAndMap === "function") {
|
2634
|
+
return this._sourceLike.sourceAndMap(options);
|
2635
|
+
}
|
2636
|
+
return super.sourceAndMap(options);
|
2637
|
+
}
|
2638
|
+
updateHash(hash) {
|
2639
|
+
if (typeof this._sourceLike.updateHash === "function") {
|
2640
|
+
return this._sourceLike.updateHash(hash);
|
2641
|
+
}
|
2642
|
+
if (typeof this._sourceLike.map === "function") {
|
2643
|
+
throw new Error(
|
2644
|
+
"A Source-like object with a 'map' method must also provide an 'updateHash' method"
|
2645
|
+
);
|
2646
|
+
}
|
2647
|
+
hash.update(this.buffer());
|
2648
|
+
}
|
2649
|
+
};
|
2650
|
+
module.exports = CompatSource;
|
2651
|
+
}
|
2652
|
+
});
|
2653
|
+
|
2654
|
+
// node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/index.js
|
2655
|
+
var require_lib = __commonJS({
|
2656
|
+
"node_modules/.pnpm/webpack-sources@3.2.3/node_modules/webpack-sources/lib/index.js"(exports) {
|
2657
|
+
var defineExport = (name, fn) => {
|
2658
|
+
let value;
|
2659
|
+
Object.defineProperty(exports, name, {
|
2660
|
+
get: () => {
|
2661
|
+
if (fn !== void 0) {
|
2662
|
+
value = fn();
|
2663
|
+
fn = void 0;
|
2664
|
+
}
|
2665
|
+
return value;
|
2666
|
+
},
|
2667
|
+
configurable: true
|
2668
|
+
});
|
2669
|
+
};
|
2670
|
+
defineExport("Source", () => require_Source());
|
2671
|
+
defineExport("RawSource", () => require_RawSource());
|
2672
|
+
defineExport("OriginalSource", () => require_OriginalSource());
|
2673
|
+
defineExport("SourceMapSource", () => require_SourceMapSource());
|
2674
|
+
defineExport("CachedSource", () => require_CachedSource());
|
2675
|
+
defineExport("ConcatSource", () => require_ConcatSource());
|
2676
|
+
defineExport("ReplaceSource", () => require_ReplaceSource());
|
2677
|
+
defineExport("PrefixSource", () => require_PrefixSource());
|
2678
|
+
defineExport("SizeOnlySource", () => require_SizeOnlySource());
|
2679
|
+
defineExport("CompatSource", () => require_CompatSource());
|
2680
|
+
}
|
2681
|
+
});
|
5
2682
|
function getPackageVersion(startDir) {
|
6
2683
|
try {
|
7
2684
|
let dir = startDir || process.cwd();
|
@@ -53,7 +2730,7 @@ function versionInjectorPlugin(options = {}) {
|
|
53
2730
|
var _a, _b;
|
54
2731
|
const isWebpack5 = Boolean((_b = (_a = compiler.webpack) == null ? void 0 : _a.version) == null ? void 0 : _b.startsWith("5"));
|
55
2732
|
compiler.hooks.compilation.tap("webpack-version-injector", (compilation) => {
|
56
|
-
if (isWebpack5) {
|
2733
|
+
if (isWebpack5 && compiler.webpack) {
|
57
2734
|
const { Compilation, sources } = compiler.webpack;
|
58
2735
|
compilation.hooks.processAssets.tap(
|
59
2736
|
{
|
@@ -71,13 +2748,13 @@ function versionInjectorPlugin(options = {}) {
|
|
71
2748
|
}
|
72
2749
|
);
|
73
2750
|
} else {
|
2751
|
+
const RawSourceLegacy = require_lib().RawSource;
|
74
2752
|
compiler.hooks.emit.tapAsync("webpack-version-injector", (compilation2, callback) => {
|
75
2753
|
for (const name in compilation2.assets) {
|
76
2754
|
if (name.endsWith(".html")) {
|
77
2755
|
const html = compilation2.assets[name].source().toString();
|
78
2756
|
const result = inject(html);
|
79
|
-
|
80
|
-
compilation2.assets[name] = new sources.RawSource(result);
|
2757
|
+
compilation2.assets[name] = new RawSourceLegacy(result);
|
81
2758
|
}
|
82
2759
|
}
|
83
2760
|
callback();
|