@rstest/core 0.7.8 → 0.7.9
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/LICENSE.md +294 -0
- package/dist/0~130.js +2 -2
- package/dist/0~1472.js +48 -0
- package/dist/0~1981.js +3 -0
- package/dist/0~2173.js +25 -10
- package/dist/0~2255.js +2 -2
- package/dist/0~3062.js +0 -5
- package/dist/0~3919.js +1 -1
- package/dist/0~4403.js +6 -5
- package/dist/0~4809.js +1 -1
- package/dist/0~5835.js +2 -2
- package/dist/0~62.js +1 -1
- package/dist/0~6588.js +3 -3
- package/dist/0~6923.js +2 -2
- package/dist/0~7583.js +9 -8
- package/dist/0~7882.js +1144 -0
- package/dist/0~8426.js +1 -2
- package/dist/0~89.js +24 -21
- package/dist/0~9348.js +953 -0
- package/dist/0~9634.js +58 -10
- package/dist/1157.js +12 -117
- package/dist/{7913.js → 1294.js} +51 -1745
- package/dist/2672.js +647 -0
- package/dist/3278.js +3 -450
- package/dist/4484.js +38 -0
- package/dist/487.js +1739 -0
- package/dist/4899.js +11 -0
- package/dist/5734.js +1 -1
- package/dist/{0~6151.js → 6151.js} +169 -13
- package/dist/{0~6973.js → 6973.js} +5 -5
- package/dist/721.js +9 -0
- package/dist/9131.js +554 -502
- package/dist/browser-runtime/2~907.js +1211 -0
- package/dist/browser-runtime/2~907.js.map +1 -0
- package/dist/browser-runtime/389.js +22071 -0
- package/dist/browser-runtime/389.js.LICENSE.txt +329 -0
- package/dist/browser-runtime/389.js.map +1 -0
- package/dist/browser-runtime/index.d.ts +2806 -0
- package/dist/browser-runtime/index.js +1 -0
- package/dist/browser-runtime/rslib-runtime.js +50 -0
- package/dist/browser-runtime/rslib-runtime.js.map +1 -0
- package/dist/browser.d.ts +3329 -0
- package/dist/browser.js +14 -0
- package/dist/globalSetupWorker.js +3 -2
- package/dist/index.d.ts +58 -1
- package/dist/index.js +2 -1
- package/dist/rslib-runtime.js +27 -0
- package/dist/rstestSuppressWarnings.cjs +9 -0
- package/dist/worker.d.ts +57 -1
- package/dist/worker.js +415 -1
- package/package.json +28 -13
- package/dist/0~8957.js +0 -149
- package/dist/554.js +0 -417
- package/dist/5693.js +0 -91
- /package/dist/{7913.js.LICENSE.txt → 1294.js.LICENSE.txt} +0 -0
- /package/dist/{0~6151.js.LICENSE.txt → 6151.js.LICENSE.txt} +0 -0
package/dist/{7913.js → 1294.js}
RENAMED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/*! For license information please see
|
|
1
|
+
/*! For license information please see 1294.js.LICENSE.txt */
|
|
2
2
|
import 'module';
|
|
3
3
|
/*#__PURE__*/ import.meta.url;
|
|
4
4
|
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
5
|
-
import "./
|
|
6
|
-
import { createRequire } from "./4881.js";
|
|
5
|
+
import "./2672.js";
|
|
7
6
|
__webpack_require__.add({
|
|
8
7
|
"../../node_modules/.pnpm/@jest+diff-sequences@30.0.1/node_modules/@jest/diff-sequences/build/index.js" (module) {
|
|
9
8
|
/*!
|
|
@@ -869,36 +868,6 @@ __webpack_require__.add({
|
|
|
869
868
|
get: assembleStyles
|
|
870
869
|
});
|
|
871
870
|
},
|
|
872
|
-
"../../node_modules/.pnpm/buffer-from@1.1.2/node_modules/buffer-from/index.js" (module) {
|
|
873
|
-
var toString = Object.prototype.toString;
|
|
874
|
-
var isModern = "u" > typeof Buffer && 'function' == typeof Buffer.alloc && 'function' == typeof Buffer.allocUnsafe && 'function' == typeof Buffer.from;
|
|
875
|
-
function isArrayBuffer(input) {
|
|
876
|
-
return 'ArrayBuffer' === toString.call(input).slice(8, -1);
|
|
877
|
-
}
|
|
878
|
-
function fromArrayBuffer(obj, byteOffset, length) {
|
|
879
|
-
byteOffset >>>= 0;
|
|
880
|
-
var maxLength = obj.byteLength - byteOffset;
|
|
881
|
-
if (maxLength < 0) throw new RangeError("'offset' is out of bounds");
|
|
882
|
-
if (void 0 === length) length = maxLength;
|
|
883
|
-
else {
|
|
884
|
-
length >>>= 0;
|
|
885
|
-
if (length > maxLength) throw new RangeError("'length' is out of bounds");
|
|
886
|
-
}
|
|
887
|
-
return isModern ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length)));
|
|
888
|
-
}
|
|
889
|
-
function fromString(string, encoding) {
|
|
890
|
-
if ('string' != typeof encoding || '' === encoding) encoding = 'utf8';
|
|
891
|
-
if (!Buffer.isEncoding(encoding)) throw new TypeError('"encoding" must be a valid string encoding');
|
|
892
|
-
return isModern ? Buffer.from(string, encoding) : new Buffer(string, encoding);
|
|
893
|
-
}
|
|
894
|
-
function bufferFrom(value, encodingOrOffset, length) {
|
|
895
|
-
if ('number' == typeof value) throw new TypeError('"value" argument must not be a number');
|
|
896
|
-
if (isArrayBuffer(value)) return fromArrayBuffer(value, encodingOrOffset, length);
|
|
897
|
-
if ('string' == typeof value) return fromString(value, encodingOrOffset);
|
|
898
|
-
return isModern ? Buffer.from(value) : new Buffer(value);
|
|
899
|
-
}
|
|
900
|
-
module.exports = bufferFrom;
|
|
901
|
-
},
|
|
902
871
|
"../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
903
872
|
const ansiStyles = __webpack_require__("../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js");
|
|
904
873
|
const { stdout: stdoutColor, stderr: stderrColor } = __webpack_require__("../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js");
|
|
@@ -4851,1705 +4820,6 @@ __webpack_require__.add({
|
|
|
4851
4820
|
if ('production' === process.env.NODE_ENV) module.exports = __webpack_require__("../../node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/cjs/react-is.production.min.js");
|
|
4852
4821
|
else module.exports = __webpack_require__("../../node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/cjs/react-is.development.js");
|
|
4853
4822
|
},
|
|
4854
|
-
"../../node_modules/.pnpm/source-map-support@0.5.21/node_modules/source-map-support/source-map-support.js" (module, exports, __webpack_require__) {
|
|
4855
|
-
module = __webpack_require__.nmd(module);
|
|
4856
|
-
var SourceMapConsumer = __webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/source-map.js").SourceMapConsumer;
|
|
4857
|
-
var path = __webpack_require__("node:path");
|
|
4858
|
-
var fs;
|
|
4859
|
-
try {
|
|
4860
|
-
fs = __webpack_require__("node:fs");
|
|
4861
|
-
if (!fs.existsSync || !fs.readFileSync) fs = null;
|
|
4862
|
-
} catch (err) {}
|
|
4863
|
-
var bufferFrom = __webpack_require__("../../node_modules/.pnpm/buffer-from@1.1.2/node_modules/buffer-from/index.js");
|
|
4864
|
-
function dynamicRequire(mod, request) {
|
|
4865
|
-
return mod.require(request);
|
|
4866
|
-
}
|
|
4867
|
-
var errorFormatterInstalled = false;
|
|
4868
|
-
var uncaughtShimInstalled = false;
|
|
4869
|
-
var emptyCacheBetweenOperations = false;
|
|
4870
|
-
var environment = "auto";
|
|
4871
|
-
var fileContentsCache = {};
|
|
4872
|
-
var sourceMapCache = {};
|
|
4873
|
-
var reSourceMap = /^data:application\/json[^,]+base64,/;
|
|
4874
|
-
var retrieveFileHandlers = [];
|
|
4875
|
-
var retrieveMapHandlers = [];
|
|
4876
|
-
function isInBrowser() {
|
|
4877
|
-
if ("browser" === environment) return true;
|
|
4878
|
-
if ("node" === environment) return false;
|
|
4879
|
-
return "u" > typeof window && 'function' == typeof XMLHttpRequest && !(window.require && window.module && window.process && "renderer" === window.process.type);
|
|
4880
|
-
}
|
|
4881
|
-
function hasGlobalProcessEventEmitter() {
|
|
4882
|
-
return 'object' == typeof process && null !== process && 'function' == typeof process.on;
|
|
4883
|
-
}
|
|
4884
|
-
function globalProcessVersion() {
|
|
4885
|
-
if ('object' == typeof process && null !== process) return process.version;
|
|
4886
|
-
return '';
|
|
4887
|
-
}
|
|
4888
|
-
function globalProcessStderr() {
|
|
4889
|
-
if ('object' == typeof process && null !== process) return process.stderr;
|
|
4890
|
-
}
|
|
4891
|
-
function globalProcessExit(code) {
|
|
4892
|
-
if ('object' == typeof process && null !== process && 'function' == typeof process.exit) return process.exit(code);
|
|
4893
|
-
}
|
|
4894
|
-
function handlerExec(list) {
|
|
4895
|
-
return function(arg) {
|
|
4896
|
-
for(var i = 0; i < list.length; i++){
|
|
4897
|
-
var ret = list[i](arg);
|
|
4898
|
-
if (ret) return ret;
|
|
4899
|
-
}
|
|
4900
|
-
return null;
|
|
4901
|
-
};
|
|
4902
|
-
}
|
|
4903
|
-
var retrieveFile = handlerExec(retrieveFileHandlers);
|
|
4904
|
-
retrieveFileHandlers.push(function(path) {
|
|
4905
|
-
path = path.trim();
|
|
4906
|
-
if (/^file:/.test(path)) path = path.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
|
|
4907
|
-
return drive ? '' : '/';
|
|
4908
|
-
});
|
|
4909
|
-
if (path in fileContentsCache) return fileContentsCache[path];
|
|
4910
|
-
var contents = '';
|
|
4911
|
-
try {
|
|
4912
|
-
if (fs) {
|
|
4913
|
-
if (fs.existsSync(path)) contents = fs.readFileSync(path, 'utf8');
|
|
4914
|
-
} else {
|
|
4915
|
-
var xhr = new XMLHttpRequest();
|
|
4916
|
-
xhr.open('GET', path, false);
|
|
4917
|
-
xhr.send(null);
|
|
4918
|
-
if (4 === xhr.readyState && 200 === xhr.status) contents = xhr.responseText;
|
|
4919
|
-
}
|
|
4920
|
-
} catch (er) {}
|
|
4921
|
-
return fileContentsCache[path] = contents;
|
|
4922
|
-
});
|
|
4923
|
-
function supportRelativeURL(file, url) {
|
|
4924
|
-
if (!file) return url;
|
|
4925
|
-
var dir = path.dirname(file);
|
|
4926
|
-
var match = /^\w+:\/\/[^\/]*/.exec(dir);
|
|
4927
|
-
var protocol = match ? match[0] : '';
|
|
4928
|
-
var startPath = dir.slice(protocol.length);
|
|
4929
|
-
if (protocol && /^\/\w\:/.test(startPath)) {
|
|
4930
|
-
protocol += '/';
|
|
4931
|
-
return protocol + path.resolve(dir.slice(protocol.length), url).replace(/\\/g, '/');
|
|
4932
|
-
}
|
|
4933
|
-
return protocol + path.resolve(dir.slice(protocol.length), url);
|
|
4934
|
-
}
|
|
4935
|
-
function retrieveSourceMapURL(source) {
|
|
4936
|
-
var fileData;
|
|
4937
|
-
if (isInBrowser()) try {
|
|
4938
|
-
var xhr = new XMLHttpRequest();
|
|
4939
|
-
xhr.open('GET', source, false);
|
|
4940
|
-
xhr.send(null);
|
|
4941
|
-
fileData = 4 === xhr.readyState ? xhr.responseText : null;
|
|
4942
|
-
var sourceMapHeader = xhr.getResponseHeader("SourceMap") || xhr.getResponseHeader("X-SourceMap");
|
|
4943
|
-
if (sourceMapHeader) return sourceMapHeader;
|
|
4944
|
-
} catch (e) {}
|
|
4945
|
-
fileData = retrieveFile(source);
|
|
4946
|
-
var re = /(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg;
|
|
4947
|
-
var lastMatch, match;
|
|
4948
|
-
while(match = re.exec(fileData))lastMatch = match;
|
|
4949
|
-
if (!lastMatch) return null;
|
|
4950
|
-
return lastMatch[1];
|
|
4951
|
-
}
|
|
4952
|
-
var retrieveSourceMap = handlerExec(retrieveMapHandlers);
|
|
4953
|
-
retrieveMapHandlers.push(function(source) {
|
|
4954
|
-
var sourceMappingURL = retrieveSourceMapURL(source);
|
|
4955
|
-
if (!sourceMappingURL) return null;
|
|
4956
|
-
var sourceMapData;
|
|
4957
|
-
if (reSourceMap.test(sourceMappingURL)) {
|
|
4958
|
-
var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(',') + 1);
|
|
4959
|
-
sourceMapData = bufferFrom(rawData, "base64").toString();
|
|
4960
|
-
sourceMappingURL = source;
|
|
4961
|
-
} else {
|
|
4962
|
-
sourceMappingURL = supportRelativeURL(source, sourceMappingURL);
|
|
4963
|
-
sourceMapData = retrieveFile(sourceMappingURL);
|
|
4964
|
-
}
|
|
4965
|
-
if (!sourceMapData) return null;
|
|
4966
|
-
return {
|
|
4967
|
-
url: sourceMappingURL,
|
|
4968
|
-
map: sourceMapData
|
|
4969
|
-
};
|
|
4970
|
-
});
|
|
4971
|
-
function mapSourcePosition(position) {
|
|
4972
|
-
var sourceMap = sourceMapCache[position.source];
|
|
4973
|
-
if (!sourceMap) {
|
|
4974
|
-
var urlAndMap = retrieveSourceMap(position.source);
|
|
4975
|
-
if (urlAndMap) {
|
|
4976
|
-
sourceMap = sourceMapCache[position.source] = {
|
|
4977
|
-
url: urlAndMap.url,
|
|
4978
|
-
map: new SourceMapConsumer(urlAndMap.map)
|
|
4979
|
-
};
|
|
4980
|
-
if (sourceMap.map.sourcesContent) sourceMap.map.sources.forEach(function(source, i) {
|
|
4981
|
-
var contents = sourceMap.map.sourcesContent[i];
|
|
4982
|
-
if (contents) {
|
|
4983
|
-
var url = supportRelativeURL(sourceMap.url, source);
|
|
4984
|
-
fileContentsCache[url] = contents;
|
|
4985
|
-
}
|
|
4986
|
-
});
|
|
4987
|
-
} else sourceMap = sourceMapCache[position.source] = {
|
|
4988
|
-
url: null,
|
|
4989
|
-
map: null
|
|
4990
|
-
};
|
|
4991
|
-
}
|
|
4992
|
-
if (sourceMap && sourceMap.map && 'function' == typeof sourceMap.map.originalPositionFor) {
|
|
4993
|
-
var originalPosition = sourceMap.map.originalPositionFor(position);
|
|
4994
|
-
if (null !== originalPosition.source) {
|
|
4995
|
-
originalPosition.source = supportRelativeURL(sourceMap.url, originalPosition.source);
|
|
4996
|
-
return originalPosition;
|
|
4997
|
-
}
|
|
4998
|
-
}
|
|
4999
|
-
return position;
|
|
5000
|
-
}
|
|
5001
|
-
function mapEvalOrigin(origin) {
|
|
5002
|
-
var match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin);
|
|
5003
|
-
if (match) {
|
|
5004
|
-
var position = mapSourcePosition({
|
|
5005
|
-
source: match[2],
|
|
5006
|
-
line: +match[3],
|
|
5007
|
-
column: match[4] - 1
|
|
5008
|
-
});
|
|
5009
|
-
return 'eval at ' + match[1] + ' (' + position.source + ':' + position.line + ':' + (position.column + 1) + ')';
|
|
5010
|
-
}
|
|
5011
|
-
match = /^eval at ([^(]+) \((.+)\)$/.exec(origin);
|
|
5012
|
-
if (match) return 'eval at ' + match[1] + ' (' + mapEvalOrigin(match[2]) + ')';
|
|
5013
|
-
return origin;
|
|
5014
|
-
}
|
|
5015
|
-
function CallSiteToString() {
|
|
5016
|
-
var fileName;
|
|
5017
|
-
var fileLocation = "";
|
|
5018
|
-
if (this.isNative()) fileLocation = "native";
|
|
5019
|
-
else {
|
|
5020
|
-
fileName = this.getScriptNameOrSourceURL();
|
|
5021
|
-
if (!fileName && this.isEval()) {
|
|
5022
|
-
fileLocation = this.getEvalOrigin();
|
|
5023
|
-
fileLocation += ", ";
|
|
5024
|
-
}
|
|
5025
|
-
if (fileName) fileLocation += fileName;
|
|
5026
|
-
else fileLocation += "<anonymous>";
|
|
5027
|
-
var lineNumber = this.getLineNumber();
|
|
5028
|
-
if (null != lineNumber) {
|
|
5029
|
-
fileLocation += ":" + lineNumber;
|
|
5030
|
-
var columnNumber = this.getColumnNumber();
|
|
5031
|
-
if (columnNumber) fileLocation += ":" + columnNumber;
|
|
5032
|
-
}
|
|
5033
|
-
}
|
|
5034
|
-
var line = "";
|
|
5035
|
-
var functionName = this.getFunctionName();
|
|
5036
|
-
var addSuffix = true;
|
|
5037
|
-
var isConstructor = this.isConstructor();
|
|
5038
|
-
var isMethodCall = !(this.isToplevel() || isConstructor);
|
|
5039
|
-
if (isMethodCall) {
|
|
5040
|
-
var typeName = this.getTypeName();
|
|
5041
|
-
if ("[object Object]" === typeName) typeName = "null";
|
|
5042
|
-
var methodName = this.getMethodName();
|
|
5043
|
-
if (functionName) {
|
|
5044
|
-
if (typeName && 0 != functionName.indexOf(typeName)) line += typeName + ".";
|
|
5045
|
-
line += functionName;
|
|
5046
|
-
if (methodName && functionName.indexOf("." + methodName) != functionName.length - methodName.length - 1) line += " [as " + methodName + "]";
|
|
5047
|
-
} else line += typeName + "." + (methodName || "<anonymous>");
|
|
5048
|
-
} else if (isConstructor) line += "new " + (functionName || "<anonymous>");
|
|
5049
|
-
else if (functionName) line += functionName;
|
|
5050
|
-
else {
|
|
5051
|
-
line += fileLocation;
|
|
5052
|
-
addSuffix = false;
|
|
5053
|
-
}
|
|
5054
|
-
if (addSuffix) line += " (" + fileLocation + ")";
|
|
5055
|
-
return line;
|
|
5056
|
-
}
|
|
5057
|
-
function cloneCallSite(frame) {
|
|
5058
|
-
var object = {};
|
|
5059
|
-
Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) {
|
|
5060
|
-
object[name] = /^(?:is|get)/.test(name) ? function() {
|
|
5061
|
-
return frame[name].call(frame);
|
|
5062
|
-
} : frame[name];
|
|
5063
|
-
});
|
|
5064
|
-
object.toString = CallSiteToString;
|
|
5065
|
-
return object;
|
|
5066
|
-
}
|
|
5067
|
-
function wrapCallSite(frame, state) {
|
|
5068
|
-
if (void 0 === state) state = {
|
|
5069
|
-
nextPosition: null,
|
|
5070
|
-
curPosition: null
|
|
5071
|
-
};
|
|
5072
|
-
if (frame.isNative()) {
|
|
5073
|
-
state.curPosition = null;
|
|
5074
|
-
return frame;
|
|
5075
|
-
}
|
|
5076
|
-
var source = frame.getFileName() || frame.getScriptNameOrSourceURL();
|
|
5077
|
-
if (source) {
|
|
5078
|
-
var line = frame.getLineNumber();
|
|
5079
|
-
var column = frame.getColumnNumber() - 1;
|
|
5080
|
-
var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;
|
|
5081
|
-
var headerLength = noHeader.test(globalProcessVersion()) ? 0 : 62;
|
|
5082
|
-
if (1 === line && column > headerLength && !isInBrowser() && !frame.isEval()) column -= headerLength;
|
|
5083
|
-
var position = mapSourcePosition({
|
|
5084
|
-
source: source,
|
|
5085
|
-
line: line,
|
|
5086
|
-
column: column
|
|
5087
|
-
});
|
|
5088
|
-
state.curPosition = position;
|
|
5089
|
-
frame = cloneCallSite(frame);
|
|
5090
|
-
var originalFunctionName = frame.getFunctionName;
|
|
5091
|
-
frame.getFunctionName = function() {
|
|
5092
|
-
if (null == state.nextPosition) return originalFunctionName();
|
|
5093
|
-
return state.nextPosition.name || originalFunctionName();
|
|
5094
|
-
};
|
|
5095
|
-
frame.getFileName = function() {
|
|
5096
|
-
return position.source;
|
|
5097
|
-
};
|
|
5098
|
-
frame.getLineNumber = function() {
|
|
5099
|
-
return position.line;
|
|
5100
|
-
};
|
|
5101
|
-
frame.getColumnNumber = function() {
|
|
5102
|
-
return position.column + 1;
|
|
5103
|
-
};
|
|
5104
|
-
frame.getScriptNameOrSourceURL = function() {
|
|
5105
|
-
return position.source;
|
|
5106
|
-
};
|
|
5107
|
-
return frame;
|
|
5108
|
-
}
|
|
5109
|
-
var origin = frame.isEval() && frame.getEvalOrigin();
|
|
5110
|
-
if (origin) {
|
|
5111
|
-
origin = mapEvalOrigin(origin);
|
|
5112
|
-
frame = cloneCallSite(frame);
|
|
5113
|
-
frame.getEvalOrigin = function() {
|
|
5114
|
-
return origin;
|
|
5115
|
-
};
|
|
5116
|
-
}
|
|
5117
|
-
return frame;
|
|
5118
|
-
}
|
|
5119
|
-
function prepareStackTrace(error, stack) {
|
|
5120
|
-
if (emptyCacheBetweenOperations) {
|
|
5121
|
-
fileContentsCache = {};
|
|
5122
|
-
sourceMapCache = {};
|
|
5123
|
-
}
|
|
5124
|
-
var name = error.name || 'Error';
|
|
5125
|
-
var message = error.message || '';
|
|
5126
|
-
var errorString = name + ": " + message;
|
|
5127
|
-
var state = {
|
|
5128
|
-
nextPosition: null,
|
|
5129
|
-
curPosition: null
|
|
5130
|
-
};
|
|
5131
|
-
var processedStack = [];
|
|
5132
|
-
for(var i = stack.length - 1; i >= 0; i--){
|
|
5133
|
-
processedStack.push('\n at ' + wrapCallSite(stack[i], state));
|
|
5134
|
-
state.nextPosition = state.curPosition;
|
|
5135
|
-
}
|
|
5136
|
-
state.curPosition = state.nextPosition = null;
|
|
5137
|
-
return errorString + processedStack.reverse().join('');
|
|
5138
|
-
}
|
|
5139
|
-
function getErrorSource(error) {
|
|
5140
|
-
var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack);
|
|
5141
|
-
if (match) {
|
|
5142
|
-
var source = match[1];
|
|
5143
|
-
var line = +match[2];
|
|
5144
|
-
var column = +match[3];
|
|
5145
|
-
var contents = fileContentsCache[source];
|
|
5146
|
-
if (!contents && fs && fs.existsSync(source)) try {
|
|
5147
|
-
contents = fs.readFileSync(source, 'utf8');
|
|
5148
|
-
} catch (er) {
|
|
5149
|
-
contents = '';
|
|
5150
|
-
}
|
|
5151
|
-
if (contents) {
|
|
5152
|
-
var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1];
|
|
5153
|
-
if (code) return source + ':' + line + '\n' + code + '\n' + new Array(column).join(' ') + '^';
|
|
5154
|
-
}
|
|
5155
|
-
}
|
|
5156
|
-
return null;
|
|
5157
|
-
}
|
|
5158
|
-
function printErrorAndExit(error) {
|
|
5159
|
-
var source = getErrorSource(error);
|
|
5160
|
-
var stderr = globalProcessStderr();
|
|
5161
|
-
if (stderr && stderr._handle && stderr._handle.setBlocking) stderr._handle.setBlocking(true);
|
|
5162
|
-
if (source) {
|
|
5163
|
-
console.error();
|
|
5164
|
-
console.error(source);
|
|
5165
|
-
}
|
|
5166
|
-
console.error(error.stack);
|
|
5167
|
-
globalProcessExit(1);
|
|
5168
|
-
}
|
|
5169
|
-
function shimEmitUncaughtException() {
|
|
5170
|
-
var origEmit = process.emit;
|
|
5171
|
-
process.emit = function(type) {
|
|
5172
|
-
if ('uncaughtException' === type) {
|
|
5173
|
-
var hasStack = arguments[1] && arguments[1].stack;
|
|
5174
|
-
var hasListeners = this.listeners(type).length > 0;
|
|
5175
|
-
if (hasStack && !hasListeners) return printErrorAndExit(arguments[1]);
|
|
5176
|
-
}
|
|
5177
|
-
return origEmit.apply(this, arguments);
|
|
5178
|
-
};
|
|
5179
|
-
}
|
|
5180
|
-
var originalRetrieveFileHandlers = retrieveFileHandlers.slice(0);
|
|
5181
|
-
var originalRetrieveMapHandlers = retrieveMapHandlers.slice(0);
|
|
5182
|
-
exports.wrapCallSite = wrapCallSite;
|
|
5183
|
-
exports.getErrorSource = getErrorSource;
|
|
5184
|
-
exports.mapSourcePosition = mapSourcePosition;
|
|
5185
|
-
exports.retrieveSourceMap = retrieveSourceMap;
|
|
5186
|
-
exports.install = function(options) {
|
|
5187
|
-
options = options || {};
|
|
5188
|
-
if (options.environment) {
|
|
5189
|
-
environment = options.environment;
|
|
5190
|
-
if (-1 === [
|
|
5191
|
-
"node",
|
|
5192
|
-
"browser",
|
|
5193
|
-
"auto"
|
|
5194
|
-
].indexOf(environment)) throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}");
|
|
5195
|
-
}
|
|
5196
|
-
if (options.retrieveFile) {
|
|
5197
|
-
if (options.overrideRetrieveFile) retrieveFileHandlers.length = 0;
|
|
5198
|
-
retrieveFileHandlers.unshift(options.retrieveFile);
|
|
5199
|
-
}
|
|
5200
|
-
if (options.retrieveSourceMap) {
|
|
5201
|
-
if (options.overrideRetrieveSourceMap) retrieveMapHandlers.length = 0;
|
|
5202
|
-
retrieveMapHandlers.unshift(options.retrieveSourceMap);
|
|
5203
|
-
}
|
|
5204
|
-
if (options.hookRequire && !isInBrowser()) {
|
|
5205
|
-
var Module = dynamicRequire(module, 'module');
|
|
5206
|
-
var $compile = Module.prototype._compile;
|
|
5207
|
-
if (!$compile.__sourceMapSupport) {
|
|
5208
|
-
Module.prototype._compile = function(content, filename) {
|
|
5209
|
-
fileContentsCache[filename] = content;
|
|
5210
|
-
sourceMapCache[filename] = void 0;
|
|
5211
|
-
return $compile.call(this, content, filename);
|
|
5212
|
-
};
|
|
5213
|
-
Module.prototype._compile.__sourceMapSupport = true;
|
|
5214
|
-
}
|
|
5215
|
-
}
|
|
5216
|
-
if (!emptyCacheBetweenOperations) emptyCacheBetweenOperations = 'emptyCacheBetweenOperations' in options ? options.emptyCacheBetweenOperations : false;
|
|
5217
|
-
if (!errorFormatterInstalled) {
|
|
5218
|
-
errorFormatterInstalled = true;
|
|
5219
|
-
Error.prepareStackTrace = prepareStackTrace;
|
|
5220
|
-
}
|
|
5221
|
-
if (!uncaughtShimInstalled) {
|
|
5222
|
-
var installHandler = 'handleUncaughtExceptions' in options ? options.handleUncaughtExceptions : true;
|
|
5223
|
-
try {
|
|
5224
|
-
var worker_threads = dynamicRequire(module, 'worker_threads');
|
|
5225
|
-
if (false === worker_threads.isMainThread) installHandler = false;
|
|
5226
|
-
} catch (e) {}
|
|
5227
|
-
if (installHandler && hasGlobalProcessEventEmitter()) {
|
|
5228
|
-
uncaughtShimInstalled = true;
|
|
5229
|
-
shimEmitUncaughtException();
|
|
5230
|
-
}
|
|
5231
|
-
}
|
|
5232
|
-
};
|
|
5233
|
-
exports.resetRetrieveHandlers = function() {
|
|
5234
|
-
retrieveFileHandlers.length = 0;
|
|
5235
|
-
retrieveMapHandlers.length = 0;
|
|
5236
|
-
retrieveFileHandlers = originalRetrieveFileHandlers.slice(0);
|
|
5237
|
-
retrieveMapHandlers = originalRetrieveMapHandlers.slice(0);
|
|
5238
|
-
retrieveSourceMap = handlerExec(retrieveMapHandlers);
|
|
5239
|
-
retrieveFile = handlerExec(retrieveFileHandlers);
|
|
5240
|
-
};
|
|
5241
|
-
},
|
|
5242
|
-
"../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/array-set.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
5243
|
-
var util = __webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js");
|
|
5244
|
-
var has = Object.prototype.hasOwnProperty;
|
|
5245
|
-
var hasNativeMap = "u" > typeof Map;
|
|
5246
|
-
function ArraySet() {
|
|
5247
|
-
this._array = [];
|
|
5248
|
-
this._set = hasNativeMap ? new Map() : Object.create(null);
|
|
5249
|
-
}
|
|
5250
|
-
ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
|
|
5251
|
-
var set = new ArraySet();
|
|
5252
|
-
for(var i = 0, len = aArray.length; i < len; i++)set.add(aArray[i], aAllowDuplicates);
|
|
5253
|
-
return set;
|
|
5254
|
-
};
|
|
5255
|
-
ArraySet.prototype.size = function ArraySet_size() {
|
|
5256
|
-
return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
|
|
5257
|
-
};
|
|
5258
|
-
ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
|
|
5259
|
-
var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
|
|
5260
|
-
var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
|
|
5261
|
-
var idx = this._array.length;
|
|
5262
|
-
if (!isDuplicate || aAllowDuplicates) this._array.push(aStr);
|
|
5263
|
-
if (!isDuplicate) if (hasNativeMap) this._set.set(aStr, idx);
|
|
5264
|
-
else this._set[sStr] = idx;
|
|
5265
|
-
};
|
|
5266
|
-
ArraySet.prototype.has = function ArraySet_has(aStr) {
|
|
5267
|
-
if (hasNativeMap) return this._set.has(aStr);
|
|
5268
|
-
var sStr = util.toSetString(aStr);
|
|
5269
|
-
return has.call(this._set, sStr);
|
|
5270
|
-
};
|
|
5271
|
-
ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
|
|
5272
|
-
if (hasNativeMap) {
|
|
5273
|
-
var idx = this._set.get(aStr);
|
|
5274
|
-
if (idx >= 0) return idx;
|
|
5275
|
-
} else {
|
|
5276
|
-
var sStr = util.toSetString(aStr);
|
|
5277
|
-
if (has.call(this._set, sStr)) return this._set[sStr];
|
|
5278
|
-
}
|
|
5279
|
-
throw new Error('"' + aStr + '" is not in the set.');
|
|
5280
|
-
};
|
|
5281
|
-
ArraySet.prototype.at = function ArraySet_at(aIdx) {
|
|
5282
|
-
if (aIdx >= 0 && aIdx < this._array.length) return this._array[aIdx];
|
|
5283
|
-
throw new Error('No element indexed by ' + aIdx);
|
|
5284
|
-
};
|
|
5285
|
-
ArraySet.prototype.toArray = function ArraySet_toArray() {
|
|
5286
|
-
return this._array.slice();
|
|
5287
|
-
};
|
|
5288
|
-
exports.ArraySet = ArraySet;
|
|
5289
|
-
},
|
|
5290
|
-
"../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
5291
|
-
var base64 = __webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js");
|
|
5292
|
-
var VLQ_BASE_SHIFT = 5;
|
|
5293
|
-
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
|
|
5294
|
-
var VLQ_BASE_MASK = VLQ_BASE - 1;
|
|
5295
|
-
var VLQ_CONTINUATION_BIT = VLQ_BASE;
|
|
5296
|
-
function toVLQSigned(aValue) {
|
|
5297
|
-
return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
|
|
5298
|
-
}
|
|
5299
|
-
function fromVLQSigned(aValue) {
|
|
5300
|
-
var isNegative = (1 & aValue) === 1;
|
|
5301
|
-
var shifted = aValue >> 1;
|
|
5302
|
-
return isNegative ? -shifted : shifted;
|
|
5303
|
-
}
|
|
5304
|
-
exports.encode = function base64VLQ_encode(aValue) {
|
|
5305
|
-
var encoded = "";
|
|
5306
|
-
var digit;
|
|
5307
|
-
var vlq = toVLQSigned(aValue);
|
|
5308
|
-
do {
|
|
5309
|
-
digit = vlq & VLQ_BASE_MASK;
|
|
5310
|
-
vlq >>>= VLQ_BASE_SHIFT;
|
|
5311
|
-
if (vlq > 0) digit |= VLQ_CONTINUATION_BIT;
|
|
5312
|
-
encoded += base64.encode(digit);
|
|
5313
|
-
}while (vlq > 0);
|
|
5314
|
-
return encoded;
|
|
5315
|
-
};
|
|
5316
|
-
exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
|
|
5317
|
-
var strLen = aStr.length;
|
|
5318
|
-
var result = 0;
|
|
5319
|
-
var shift = 0;
|
|
5320
|
-
var continuation, digit;
|
|
5321
|
-
do {
|
|
5322
|
-
if (aIndex >= strLen) throw new Error("Expected more digits in base 64 VLQ value.");
|
|
5323
|
-
digit = base64.decode(aStr.charCodeAt(aIndex++));
|
|
5324
|
-
if (-1 === digit) throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
|
|
5325
|
-
continuation = !!(digit & VLQ_CONTINUATION_BIT);
|
|
5326
|
-
digit &= VLQ_BASE_MASK;
|
|
5327
|
-
result += digit << shift;
|
|
5328
|
-
shift += VLQ_BASE_SHIFT;
|
|
5329
|
-
}while (continuation);
|
|
5330
|
-
aOutParam.value = fromVLQSigned(result);
|
|
5331
|
-
aOutParam.rest = aIndex;
|
|
5332
|
-
};
|
|
5333
|
-
},
|
|
5334
|
-
"../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js" (__unused_rspack_module, exports) {
|
|
5335
|
-
var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
|
|
5336
|
-
exports.encode = function(number) {
|
|
5337
|
-
if (0 <= number && number < intToCharMap.length) return intToCharMap[number];
|
|
5338
|
-
throw new TypeError("Must be between 0 and 63: " + number);
|
|
5339
|
-
};
|
|
5340
|
-
exports.decode = function(charCode) {
|
|
5341
|
-
var bigA = 65;
|
|
5342
|
-
var bigZ = 90;
|
|
5343
|
-
var littleA = 97;
|
|
5344
|
-
var littleZ = 122;
|
|
5345
|
-
var zero = 48;
|
|
5346
|
-
var nine = 57;
|
|
5347
|
-
var plus = 43;
|
|
5348
|
-
var slash = 47;
|
|
5349
|
-
var littleOffset = 26;
|
|
5350
|
-
var numberOffset = 52;
|
|
5351
|
-
if (bigA <= charCode && charCode <= bigZ) return charCode - bigA;
|
|
5352
|
-
if (littleA <= charCode && charCode <= littleZ) return charCode - littleA + littleOffset;
|
|
5353
|
-
if (zero <= charCode && charCode <= nine) return charCode - zero + numberOffset;
|
|
5354
|
-
if (charCode == plus) return 62;
|
|
5355
|
-
if (charCode == slash) return 63;
|
|
5356
|
-
return -1;
|
|
5357
|
-
};
|
|
5358
|
-
},
|
|
5359
|
-
"../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/binary-search.js" (__unused_rspack_module, exports) {
|
|
5360
|
-
exports.GREATEST_LOWER_BOUND = 1;
|
|
5361
|
-
exports.LEAST_UPPER_BOUND = 2;
|
|
5362
|
-
function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
|
|
5363
|
-
var mid = Math.floor((aHigh - aLow) / 2) + aLow;
|
|
5364
|
-
var cmp = aCompare(aNeedle, aHaystack[mid], true);
|
|
5365
|
-
if (0 === cmp) return mid;
|
|
5366
|
-
if (cmp > 0) {
|
|
5367
|
-
if (aHigh - mid > 1) return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
|
|
5368
|
-
if (aBias == exports.LEAST_UPPER_BOUND) return aHigh < aHaystack.length ? aHigh : -1;
|
|
5369
|
-
return mid;
|
|
5370
|
-
}
|
|
5371
|
-
if (mid - aLow > 1) return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
|
|
5372
|
-
if (aBias == exports.LEAST_UPPER_BOUND) return mid;
|
|
5373
|
-
return aLow < 0 ? -1 : aLow;
|
|
5374
|
-
}
|
|
5375
|
-
exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
|
|
5376
|
-
if (0 === aHaystack.length) return -1;
|
|
5377
|
-
var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND);
|
|
5378
|
-
if (index < 0) return -1;
|
|
5379
|
-
while(index - 1 >= 0){
|
|
5380
|
-
if (0 !== aCompare(aHaystack[index], aHaystack[index - 1], true)) break;
|
|
5381
|
-
--index;
|
|
5382
|
-
}
|
|
5383
|
-
return index;
|
|
5384
|
-
};
|
|
5385
|
-
},
|
|
5386
|
-
"../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/mapping-list.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
5387
|
-
var util = __webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js");
|
|
5388
|
-
function generatedPositionAfter(mappingA, mappingB) {
|
|
5389
|
-
var lineA = mappingA.generatedLine;
|
|
5390
|
-
var lineB = mappingB.generatedLine;
|
|
5391
|
-
var columnA = mappingA.generatedColumn;
|
|
5392
|
-
var columnB = mappingB.generatedColumn;
|
|
5393
|
-
return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
|
|
5394
|
-
}
|
|
5395
|
-
function MappingList() {
|
|
5396
|
-
this._array = [];
|
|
5397
|
-
this._sorted = true;
|
|
5398
|
-
this._last = {
|
|
5399
|
-
generatedLine: -1,
|
|
5400
|
-
generatedColumn: 0
|
|
5401
|
-
};
|
|
5402
|
-
}
|
|
5403
|
-
MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
|
|
5404
|
-
this._array.forEach(aCallback, aThisArg);
|
|
5405
|
-
};
|
|
5406
|
-
MappingList.prototype.add = function MappingList_add(aMapping) {
|
|
5407
|
-
if (generatedPositionAfter(this._last, aMapping)) {
|
|
5408
|
-
this._last = aMapping;
|
|
5409
|
-
this._array.push(aMapping);
|
|
5410
|
-
} else {
|
|
5411
|
-
this._sorted = false;
|
|
5412
|
-
this._array.push(aMapping);
|
|
5413
|
-
}
|
|
5414
|
-
};
|
|
5415
|
-
MappingList.prototype.toArray = function MappingList_toArray() {
|
|
5416
|
-
if (!this._sorted) {
|
|
5417
|
-
this._array.sort(util.compareByGeneratedPositionsInflated);
|
|
5418
|
-
this._sorted = true;
|
|
5419
|
-
}
|
|
5420
|
-
return this._array;
|
|
5421
|
-
};
|
|
5422
|
-
exports.MappingList = MappingList;
|
|
5423
|
-
},
|
|
5424
|
-
"../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/quick-sort.js" (__unused_rspack_module, exports) {
|
|
5425
|
-
function swap(ary, x, y) {
|
|
5426
|
-
var temp = ary[x];
|
|
5427
|
-
ary[x] = ary[y];
|
|
5428
|
-
ary[y] = temp;
|
|
5429
|
-
}
|
|
5430
|
-
function randomIntInRange(low, high) {
|
|
5431
|
-
return Math.round(low + Math.random() * (high - low));
|
|
5432
|
-
}
|
|
5433
|
-
function doQuickSort(ary, comparator, p, r) {
|
|
5434
|
-
if (p < r) {
|
|
5435
|
-
var pivotIndex = randomIntInRange(p, r);
|
|
5436
|
-
var i = p - 1;
|
|
5437
|
-
swap(ary, pivotIndex, r);
|
|
5438
|
-
var pivot = ary[r];
|
|
5439
|
-
for(var j = p; j < r; j++)if (comparator(ary[j], pivot) <= 0) {
|
|
5440
|
-
i += 1;
|
|
5441
|
-
swap(ary, i, j);
|
|
5442
|
-
}
|
|
5443
|
-
swap(ary, i + 1, j);
|
|
5444
|
-
var q = i + 1;
|
|
5445
|
-
doQuickSort(ary, comparator, p, q - 1);
|
|
5446
|
-
doQuickSort(ary, comparator, q + 1, r);
|
|
5447
|
-
}
|
|
5448
|
-
}
|
|
5449
|
-
exports.quickSort = function(ary, comparator) {
|
|
5450
|
-
doQuickSort(ary, comparator, 0, ary.length - 1);
|
|
5451
|
-
};
|
|
5452
|
-
},
|
|
5453
|
-
"../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-consumer.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
5454
|
-
var util = __webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js");
|
|
5455
|
-
var binarySearch = __webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/binary-search.js");
|
|
5456
|
-
var ArraySet = __webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/array-set.js").ArraySet;
|
|
5457
|
-
var base64VLQ = __webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js");
|
|
5458
|
-
var quickSort = __webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/quick-sort.js").quickSort;
|
|
5459
|
-
function SourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
5460
|
-
var sourceMap = aSourceMap;
|
|
5461
|
-
if ('string' == typeof aSourceMap) sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
5462
|
-
return null != sourceMap.sections ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
|
|
5463
|
-
}
|
|
5464
|
-
SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
|
|
5465
|
-
return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
|
|
5466
|
-
};
|
|
5467
|
-
SourceMapConsumer.prototype._version = 3;
|
|
5468
|
-
SourceMapConsumer.prototype.__generatedMappings = null;
|
|
5469
|
-
Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
|
|
5470
|
-
configurable: true,
|
|
5471
|
-
enumerable: true,
|
|
5472
|
-
get: function() {
|
|
5473
|
-
if (!this.__generatedMappings) this._parseMappings(this._mappings, this.sourceRoot);
|
|
5474
|
-
return this.__generatedMappings;
|
|
5475
|
-
}
|
|
5476
|
-
});
|
|
5477
|
-
SourceMapConsumer.prototype.__originalMappings = null;
|
|
5478
|
-
Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
|
|
5479
|
-
configurable: true,
|
|
5480
|
-
enumerable: true,
|
|
5481
|
-
get: function() {
|
|
5482
|
-
if (!this.__originalMappings) this._parseMappings(this._mappings, this.sourceRoot);
|
|
5483
|
-
return this.__originalMappings;
|
|
5484
|
-
}
|
|
5485
|
-
});
|
|
5486
|
-
SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
|
|
5487
|
-
var c = aStr.charAt(index);
|
|
5488
|
-
return ";" === c || "," === c;
|
|
5489
|
-
};
|
|
5490
|
-
SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
5491
|
-
throw new Error("Subclasses must implement _parseMappings");
|
|
5492
|
-
};
|
|
5493
|
-
SourceMapConsumer.GENERATED_ORDER = 1;
|
|
5494
|
-
SourceMapConsumer.ORIGINAL_ORDER = 2;
|
|
5495
|
-
SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
|
|
5496
|
-
SourceMapConsumer.LEAST_UPPER_BOUND = 2;
|
|
5497
|
-
SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
|
|
5498
|
-
var context = aContext || null;
|
|
5499
|
-
var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
|
|
5500
|
-
var mappings;
|
|
5501
|
-
switch(order){
|
|
5502
|
-
case SourceMapConsumer.GENERATED_ORDER:
|
|
5503
|
-
mappings = this._generatedMappings;
|
|
5504
|
-
break;
|
|
5505
|
-
case SourceMapConsumer.ORIGINAL_ORDER:
|
|
5506
|
-
mappings = this._originalMappings;
|
|
5507
|
-
break;
|
|
5508
|
-
default:
|
|
5509
|
-
throw new Error("Unknown order of iteration.");
|
|
5510
|
-
}
|
|
5511
|
-
var sourceRoot = this.sourceRoot;
|
|
5512
|
-
mappings.map(function(mapping) {
|
|
5513
|
-
var source = null === mapping.source ? null : this._sources.at(mapping.source);
|
|
5514
|
-
source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);
|
|
5515
|
-
return {
|
|
5516
|
-
source: source,
|
|
5517
|
-
generatedLine: mapping.generatedLine,
|
|
5518
|
-
generatedColumn: mapping.generatedColumn,
|
|
5519
|
-
originalLine: mapping.originalLine,
|
|
5520
|
-
originalColumn: mapping.originalColumn,
|
|
5521
|
-
name: null === mapping.name ? null : this._names.at(mapping.name)
|
|
5522
|
-
};
|
|
5523
|
-
}, this).forEach(aCallback, context);
|
|
5524
|
-
};
|
|
5525
|
-
SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
|
|
5526
|
-
var line = util.getArg(aArgs, 'line');
|
|
5527
|
-
var needle = {
|
|
5528
|
-
source: util.getArg(aArgs, 'source'),
|
|
5529
|
-
originalLine: line,
|
|
5530
|
-
originalColumn: util.getArg(aArgs, 'column', 0)
|
|
5531
|
-
};
|
|
5532
|
-
needle.source = this._findSourceIndex(needle.source);
|
|
5533
|
-
if (needle.source < 0) return [];
|
|
5534
|
-
var mappings = [];
|
|
5535
|
-
var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND);
|
|
5536
|
-
if (index >= 0) {
|
|
5537
|
-
var mapping = this._originalMappings[index];
|
|
5538
|
-
if (void 0 === aArgs.column) {
|
|
5539
|
-
var originalLine = mapping.originalLine;
|
|
5540
|
-
while(mapping && mapping.originalLine === originalLine){
|
|
5541
|
-
mappings.push({
|
|
5542
|
-
line: util.getArg(mapping, 'generatedLine', null),
|
|
5543
|
-
column: util.getArg(mapping, 'generatedColumn', null),
|
|
5544
|
-
lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
|
|
5545
|
-
});
|
|
5546
|
-
mapping = this._originalMappings[++index];
|
|
5547
|
-
}
|
|
5548
|
-
} else {
|
|
5549
|
-
var originalColumn = mapping.originalColumn;
|
|
5550
|
-
while(mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn){
|
|
5551
|
-
mappings.push({
|
|
5552
|
-
line: util.getArg(mapping, 'generatedLine', null),
|
|
5553
|
-
column: util.getArg(mapping, 'generatedColumn', null),
|
|
5554
|
-
lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
|
|
5555
|
-
});
|
|
5556
|
-
mapping = this._originalMappings[++index];
|
|
5557
|
-
}
|
|
5558
|
-
}
|
|
5559
|
-
}
|
|
5560
|
-
return mappings;
|
|
5561
|
-
};
|
|
5562
|
-
exports.SourceMapConsumer = SourceMapConsumer;
|
|
5563
|
-
function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
5564
|
-
var sourceMap = aSourceMap;
|
|
5565
|
-
if ('string' == typeof aSourceMap) sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
5566
|
-
var version = util.getArg(sourceMap, 'version');
|
|
5567
|
-
var sources = util.getArg(sourceMap, 'sources');
|
|
5568
|
-
var names = util.getArg(sourceMap, 'names', []);
|
|
5569
|
-
var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
|
|
5570
|
-
var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
|
|
5571
|
-
var mappings = util.getArg(sourceMap, 'mappings');
|
|
5572
|
-
var file = util.getArg(sourceMap, 'file', null);
|
|
5573
|
-
if (version != this._version) throw new Error('Unsupported version: ' + version);
|
|
5574
|
-
if (sourceRoot) sourceRoot = util.normalize(sourceRoot);
|
|
5575
|
-
sources = sources.map(String).map(util.normalize).map(function(source) {
|
|
5576
|
-
return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source;
|
|
5577
|
-
});
|
|
5578
|
-
this._names = ArraySet.fromArray(names.map(String), true);
|
|
5579
|
-
this._sources = ArraySet.fromArray(sources, true);
|
|
5580
|
-
this._absoluteSources = this._sources.toArray().map(function(s) {
|
|
5581
|
-
return util.computeSourceURL(sourceRoot, s, aSourceMapURL);
|
|
5582
|
-
});
|
|
5583
|
-
this.sourceRoot = sourceRoot;
|
|
5584
|
-
this.sourcesContent = sourcesContent;
|
|
5585
|
-
this._mappings = mappings;
|
|
5586
|
-
this._sourceMapURL = aSourceMapURL;
|
|
5587
|
-
this.file = file;
|
|
5588
|
-
}
|
|
5589
|
-
BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
|
|
5590
|
-
BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
|
|
5591
|
-
BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
|
|
5592
|
-
var relativeSource = aSource;
|
|
5593
|
-
if (null != this.sourceRoot) relativeSource = util.relative(this.sourceRoot, relativeSource);
|
|
5594
|
-
if (this._sources.has(relativeSource)) return this._sources.indexOf(relativeSource);
|
|
5595
|
-
var i;
|
|
5596
|
-
for(i = 0; i < this._absoluteSources.length; ++i)if (this._absoluteSources[i] == aSource) return i;
|
|
5597
|
-
return -1;
|
|
5598
|
-
};
|
|
5599
|
-
BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
|
|
5600
|
-
var smc = Object.create(BasicSourceMapConsumer.prototype);
|
|
5601
|
-
var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
|
|
5602
|
-
var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
|
|
5603
|
-
smc.sourceRoot = aSourceMap._sourceRoot;
|
|
5604
|
-
smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);
|
|
5605
|
-
smc.file = aSourceMap._file;
|
|
5606
|
-
smc._sourceMapURL = aSourceMapURL;
|
|
5607
|
-
smc._absoluteSources = smc._sources.toArray().map(function(s) {
|
|
5608
|
-
return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
|
|
5609
|
-
});
|
|
5610
|
-
var generatedMappings = aSourceMap._mappings.toArray().slice();
|
|
5611
|
-
var destGeneratedMappings = smc.__generatedMappings = [];
|
|
5612
|
-
var destOriginalMappings = smc.__originalMappings = [];
|
|
5613
|
-
for(var i = 0, length = generatedMappings.length; i < length; i++){
|
|
5614
|
-
var srcMapping = generatedMappings[i];
|
|
5615
|
-
var destMapping = new Mapping;
|
|
5616
|
-
destMapping.generatedLine = srcMapping.generatedLine;
|
|
5617
|
-
destMapping.generatedColumn = srcMapping.generatedColumn;
|
|
5618
|
-
if (srcMapping.source) {
|
|
5619
|
-
destMapping.source = sources.indexOf(srcMapping.source);
|
|
5620
|
-
destMapping.originalLine = srcMapping.originalLine;
|
|
5621
|
-
destMapping.originalColumn = srcMapping.originalColumn;
|
|
5622
|
-
if (srcMapping.name) destMapping.name = names.indexOf(srcMapping.name);
|
|
5623
|
-
destOriginalMappings.push(destMapping);
|
|
5624
|
-
}
|
|
5625
|
-
destGeneratedMappings.push(destMapping);
|
|
5626
|
-
}
|
|
5627
|
-
quickSort(smc.__originalMappings, util.compareByOriginalPositions);
|
|
5628
|
-
return smc;
|
|
5629
|
-
};
|
|
5630
|
-
BasicSourceMapConsumer.prototype._version = 3;
|
|
5631
|
-
Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
|
|
5632
|
-
get: function() {
|
|
5633
|
-
return this._absoluteSources.slice();
|
|
5634
|
-
}
|
|
5635
|
-
});
|
|
5636
|
-
function Mapping() {
|
|
5637
|
-
this.generatedLine = 0;
|
|
5638
|
-
this.generatedColumn = 0;
|
|
5639
|
-
this.source = null;
|
|
5640
|
-
this.originalLine = null;
|
|
5641
|
-
this.originalColumn = null;
|
|
5642
|
-
this.name = null;
|
|
5643
|
-
}
|
|
5644
|
-
BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
5645
|
-
var generatedLine = 1;
|
|
5646
|
-
var previousGeneratedColumn = 0;
|
|
5647
|
-
var previousOriginalLine = 0;
|
|
5648
|
-
var previousOriginalColumn = 0;
|
|
5649
|
-
var previousSource = 0;
|
|
5650
|
-
var previousName = 0;
|
|
5651
|
-
var length = aStr.length;
|
|
5652
|
-
var index = 0;
|
|
5653
|
-
var cachedSegments = {};
|
|
5654
|
-
var temp = {};
|
|
5655
|
-
var originalMappings = [];
|
|
5656
|
-
var generatedMappings = [];
|
|
5657
|
-
var mapping, str, segment, end, value;
|
|
5658
|
-
while(index < length)if (';' === aStr.charAt(index)) {
|
|
5659
|
-
generatedLine++;
|
|
5660
|
-
index++;
|
|
5661
|
-
previousGeneratedColumn = 0;
|
|
5662
|
-
} else if (',' === aStr.charAt(index)) index++;
|
|
5663
|
-
else {
|
|
5664
|
-
mapping = new Mapping();
|
|
5665
|
-
mapping.generatedLine = generatedLine;
|
|
5666
|
-
for(end = index; end < length && !this._charIsMappingSeparator(aStr, end); end++);
|
|
5667
|
-
str = aStr.slice(index, end);
|
|
5668
|
-
segment = cachedSegments[str];
|
|
5669
|
-
if (segment) index += str.length;
|
|
5670
|
-
else {
|
|
5671
|
-
segment = [];
|
|
5672
|
-
while(index < end){
|
|
5673
|
-
base64VLQ.decode(aStr, index, temp);
|
|
5674
|
-
value = temp.value;
|
|
5675
|
-
index = temp.rest;
|
|
5676
|
-
segment.push(value);
|
|
5677
|
-
}
|
|
5678
|
-
if (2 === segment.length) throw new Error('Found a source, but no line and column');
|
|
5679
|
-
if (3 === segment.length) throw new Error('Found a source and line, but no column');
|
|
5680
|
-
cachedSegments[str] = segment;
|
|
5681
|
-
}
|
|
5682
|
-
mapping.generatedColumn = previousGeneratedColumn + segment[0];
|
|
5683
|
-
previousGeneratedColumn = mapping.generatedColumn;
|
|
5684
|
-
if (segment.length > 1) {
|
|
5685
|
-
mapping.source = previousSource + segment[1];
|
|
5686
|
-
previousSource += segment[1];
|
|
5687
|
-
mapping.originalLine = previousOriginalLine + segment[2];
|
|
5688
|
-
previousOriginalLine = mapping.originalLine;
|
|
5689
|
-
mapping.originalLine += 1;
|
|
5690
|
-
mapping.originalColumn = previousOriginalColumn + segment[3];
|
|
5691
|
-
previousOriginalColumn = mapping.originalColumn;
|
|
5692
|
-
if (segment.length > 4) {
|
|
5693
|
-
mapping.name = previousName + segment[4];
|
|
5694
|
-
previousName += segment[4];
|
|
5695
|
-
}
|
|
5696
|
-
}
|
|
5697
|
-
generatedMappings.push(mapping);
|
|
5698
|
-
if ('number' == typeof mapping.originalLine) originalMappings.push(mapping);
|
|
5699
|
-
}
|
|
5700
|
-
quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
|
|
5701
|
-
this.__generatedMappings = generatedMappings;
|
|
5702
|
-
quickSort(originalMappings, util.compareByOriginalPositions);
|
|
5703
|
-
this.__originalMappings = originalMappings;
|
|
5704
|
-
};
|
|
5705
|
-
BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
|
|
5706
|
-
if (aNeedle[aLineName] <= 0) throw new TypeError('Line must be greater than or equal to 1, got ' + aNeedle[aLineName]);
|
|
5707
|
-
if (aNeedle[aColumnName] < 0) throw new TypeError('Column must be greater than or equal to 0, got ' + aNeedle[aColumnName]);
|
|
5708
|
-
return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
|
|
5709
|
-
};
|
|
5710
|
-
BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
|
|
5711
|
-
for(var index = 0; index < this._generatedMappings.length; ++index){
|
|
5712
|
-
var mapping = this._generatedMappings[index];
|
|
5713
|
-
if (index + 1 < this._generatedMappings.length) {
|
|
5714
|
-
var nextMapping = this._generatedMappings[index + 1];
|
|
5715
|
-
if (mapping.generatedLine === nextMapping.generatedLine) {
|
|
5716
|
-
mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
|
|
5717
|
-
continue;
|
|
5718
|
-
}
|
|
5719
|
-
}
|
|
5720
|
-
mapping.lastGeneratedColumn = 1 / 0;
|
|
5721
|
-
}
|
|
5722
|
-
};
|
|
5723
|
-
BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
|
|
5724
|
-
var needle = {
|
|
5725
|
-
generatedLine: util.getArg(aArgs, 'line'),
|
|
5726
|
-
generatedColumn: util.getArg(aArgs, 'column')
|
|
5727
|
-
};
|
|
5728
|
-
var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND));
|
|
5729
|
-
if (index >= 0) {
|
|
5730
|
-
var mapping = this._generatedMappings[index];
|
|
5731
|
-
if (mapping.generatedLine === needle.generatedLine) {
|
|
5732
|
-
var source = util.getArg(mapping, 'source', null);
|
|
5733
|
-
if (null !== source) {
|
|
5734
|
-
source = this._sources.at(source);
|
|
5735
|
-
source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
|
|
5736
|
-
}
|
|
5737
|
-
var name = util.getArg(mapping, 'name', null);
|
|
5738
|
-
if (null !== name) name = this._names.at(name);
|
|
5739
|
-
return {
|
|
5740
|
-
source: source,
|
|
5741
|
-
line: util.getArg(mapping, 'originalLine', null),
|
|
5742
|
-
column: util.getArg(mapping, 'originalColumn', null),
|
|
5743
|
-
name: name
|
|
5744
|
-
};
|
|
5745
|
-
}
|
|
5746
|
-
}
|
|
5747
|
-
return {
|
|
5748
|
-
source: null,
|
|
5749
|
-
line: null,
|
|
5750
|
-
column: null,
|
|
5751
|
-
name: null
|
|
5752
|
-
};
|
|
5753
|
-
};
|
|
5754
|
-
BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
|
|
5755
|
-
if (!this.sourcesContent) return false;
|
|
5756
|
-
return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) {
|
|
5757
|
-
return null == sc;
|
|
5758
|
-
});
|
|
5759
|
-
};
|
|
5760
|
-
BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
|
|
5761
|
-
if (!this.sourcesContent) return null;
|
|
5762
|
-
var index = this._findSourceIndex(aSource);
|
|
5763
|
-
if (index >= 0) return this.sourcesContent[index];
|
|
5764
|
-
var relativeSource = aSource;
|
|
5765
|
-
if (null != this.sourceRoot) relativeSource = util.relative(this.sourceRoot, relativeSource);
|
|
5766
|
-
var url;
|
|
5767
|
-
if (null != this.sourceRoot && (url = util.urlParse(this.sourceRoot))) {
|
|
5768
|
-
var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
|
|
5769
|
-
if ("file" == url.scheme && this._sources.has(fileUriAbsPath)) return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
|
|
5770
|
-
if ((!url.path || "/" == url.path) && this._sources.has("/" + relativeSource)) return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
|
|
5771
|
-
}
|
|
5772
|
-
if (nullOnMissing) return null;
|
|
5773
|
-
throw new Error('"' + relativeSource + '" is not in the SourceMap.');
|
|
5774
|
-
};
|
|
5775
|
-
BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
|
|
5776
|
-
var source = util.getArg(aArgs, 'source');
|
|
5777
|
-
source = this._findSourceIndex(source);
|
|
5778
|
-
if (source < 0) return {
|
|
5779
|
-
line: null,
|
|
5780
|
-
column: null,
|
|
5781
|
-
lastColumn: null
|
|
5782
|
-
};
|
|
5783
|
-
var needle = {
|
|
5784
|
-
source: source,
|
|
5785
|
-
originalLine: util.getArg(aArgs, 'line'),
|
|
5786
|
-
originalColumn: util.getArg(aArgs, 'column')
|
|
5787
|
-
};
|
|
5788
|
-
var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND));
|
|
5789
|
-
if (index >= 0) {
|
|
5790
|
-
var mapping = this._originalMappings[index];
|
|
5791
|
-
if (mapping.source === needle.source) return {
|
|
5792
|
-
line: util.getArg(mapping, 'generatedLine', null),
|
|
5793
|
-
column: util.getArg(mapping, 'generatedColumn', null),
|
|
5794
|
-
lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
|
|
5795
|
-
};
|
|
5796
|
-
}
|
|
5797
|
-
return {
|
|
5798
|
-
line: null,
|
|
5799
|
-
column: null,
|
|
5800
|
-
lastColumn: null
|
|
5801
|
-
};
|
|
5802
|
-
};
|
|
5803
|
-
function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
5804
|
-
var sourceMap = aSourceMap;
|
|
5805
|
-
if ('string' == typeof aSourceMap) sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
5806
|
-
var version = util.getArg(sourceMap, 'version');
|
|
5807
|
-
var sections = util.getArg(sourceMap, 'sections');
|
|
5808
|
-
if (version != this._version) throw new Error('Unsupported version: ' + version);
|
|
5809
|
-
this._sources = new ArraySet();
|
|
5810
|
-
this._names = new ArraySet();
|
|
5811
|
-
var lastOffset = {
|
|
5812
|
-
line: -1,
|
|
5813
|
-
column: 0
|
|
5814
|
-
};
|
|
5815
|
-
this._sections = sections.map(function(s) {
|
|
5816
|
-
if (s.url) throw new Error('Support for url field in sections not implemented.');
|
|
5817
|
-
var offset = util.getArg(s, 'offset');
|
|
5818
|
-
var offsetLine = util.getArg(offset, 'line');
|
|
5819
|
-
var offsetColumn = util.getArg(offset, 'column');
|
|
5820
|
-
if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) throw new Error('Section offsets must be ordered and non-overlapping.');
|
|
5821
|
-
lastOffset = offset;
|
|
5822
|
-
return {
|
|
5823
|
-
generatedOffset: {
|
|
5824
|
-
generatedLine: offsetLine + 1,
|
|
5825
|
-
generatedColumn: offsetColumn + 1
|
|
5826
|
-
},
|
|
5827
|
-
consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)
|
|
5828
|
-
};
|
|
5829
|
-
});
|
|
5830
|
-
}
|
|
5831
|
-
IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
|
|
5832
|
-
IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
|
|
5833
|
-
IndexedSourceMapConsumer.prototype._version = 3;
|
|
5834
|
-
Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
|
|
5835
|
-
get: function() {
|
|
5836
|
-
var sources = [];
|
|
5837
|
-
for(var i = 0; i < this._sections.length; i++)for(var j = 0; j < this._sections[i].consumer.sources.length; j++)sources.push(this._sections[i].consumer.sources[j]);
|
|
5838
|
-
return sources;
|
|
5839
|
-
}
|
|
5840
|
-
});
|
|
5841
|
-
IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
|
|
5842
|
-
var needle = {
|
|
5843
|
-
generatedLine: util.getArg(aArgs, 'line'),
|
|
5844
|
-
generatedColumn: util.getArg(aArgs, 'column')
|
|
5845
|
-
};
|
|
5846
|
-
var sectionIndex = binarySearch.search(needle, this._sections, function(needle, section) {
|
|
5847
|
-
var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
|
|
5848
|
-
if (cmp) return cmp;
|
|
5849
|
-
return needle.generatedColumn - section.generatedOffset.generatedColumn;
|
|
5850
|
-
});
|
|
5851
|
-
var section = this._sections[sectionIndex];
|
|
5852
|
-
if (!section) return {
|
|
5853
|
-
source: null,
|
|
5854
|
-
line: null,
|
|
5855
|
-
column: null,
|
|
5856
|
-
name: null
|
|
5857
|
-
};
|
|
5858
|
-
return section.consumer.originalPositionFor({
|
|
5859
|
-
line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
|
|
5860
|
-
column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
|
|
5861
|
-
bias: aArgs.bias
|
|
5862
|
-
});
|
|
5863
|
-
};
|
|
5864
|
-
IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
|
|
5865
|
-
return this._sections.every(function(s) {
|
|
5866
|
-
return s.consumer.hasContentsOfAllSources();
|
|
5867
|
-
});
|
|
5868
|
-
};
|
|
5869
|
-
IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
|
|
5870
|
-
for(var i = 0; i < this._sections.length; i++){
|
|
5871
|
-
var section = this._sections[i];
|
|
5872
|
-
var content = section.consumer.sourceContentFor(aSource, true);
|
|
5873
|
-
if (content) return content;
|
|
5874
|
-
}
|
|
5875
|
-
if (nullOnMissing) return null;
|
|
5876
|
-
throw new Error('"' + aSource + '" is not in the SourceMap.');
|
|
5877
|
-
};
|
|
5878
|
-
IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
|
|
5879
|
-
for(var i = 0; i < this._sections.length; i++){
|
|
5880
|
-
var section = this._sections[i];
|
|
5881
|
-
if (-1 !== section.consumer._findSourceIndex(util.getArg(aArgs, 'source'))) {
|
|
5882
|
-
var generatedPosition = section.consumer.generatedPositionFor(aArgs);
|
|
5883
|
-
if (generatedPosition) {
|
|
5884
|
-
var ret = {
|
|
5885
|
-
line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
|
|
5886
|
-
column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
|
|
5887
|
-
};
|
|
5888
|
-
return ret;
|
|
5889
|
-
}
|
|
5890
|
-
}
|
|
5891
|
-
}
|
|
5892
|
-
return {
|
|
5893
|
-
line: null,
|
|
5894
|
-
column: null
|
|
5895
|
-
};
|
|
5896
|
-
};
|
|
5897
|
-
IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
5898
|
-
this.__generatedMappings = [];
|
|
5899
|
-
this.__originalMappings = [];
|
|
5900
|
-
for(var i = 0; i < this._sections.length; i++){
|
|
5901
|
-
var section = this._sections[i];
|
|
5902
|
-
var sectionMappings = section.consumer._generatedMappings;
|
|
5903
|
-
for(var j = 0; j < sectionMappings.length; j++){
|
|
5904
|
-
var mapping = sectionMappings[j];
|
|
5905
|
-
var source = section.consumer._sources.at(mapping.source);
|
|
5906
|
-
source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
|
|
5907
|
-
this._sources.add(source);
|
|
5908
|
-
source = this._sources.indexOf(source);
|
|
5909
|
-
var name = null;
|
|
5910
|
-
if (mapping.name) {
|
|
5911
|
-
name = section.consumer._names.at(mapping.name);
|
|
5912
|
-
this._names.add(name);
|
|
5913
|
-
name = this._names.indexOf(name);
|
|
5914
|
-
}
|
|
5915
|
-
var adjustedMapping = {
|
|
5916
|
-
source: source,
|
|
5917
|
-
generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
|
|
5918
|
-
generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
|
|
5919
|
-
originalLine: mapping.originalLine,
|
|
5920
|
-
originalColumn: mapping.originalColumn,
|
|
5921
|
-
name: name
|
|
5922
|
-
};
|
|
5923
|
-
this.__generatedMappings.push(adjustedMapping);
|
|
5924
|
-
if ('number' == typeof adjustedMapping.originalLine) this.__originalMappings.push(adjustedMapping);
|
|
5925
|
-
}
|
|
5926
|
-
}
|
|
5927
|
-
quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
|
|
5928
|
-
quickSort(this.__originalMappings, util.compareByOriginalPositions);
|
|
5929
|
-
};
|
|
5930
|
-
},
|
|
5931
|
-
"../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-generator.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
5932
|
-
var base64VLQ = __webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js");
|
|
5933
|
-
var util = __webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js");
|
|
5934
|
-
var ArraySet = __webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/array-set.js").ArraySet;
|
|
5935
|
-
var MappingList = __webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/mapping-list.js").MappingList;
|
|
5936
|
-
function SourceMapGenerator(aArgs) {
|
|
5937
|
-
if (!aArgs) aArgs = {};
|
|
5938
|
-
this._file = util.getArg(aArgs, 'file', null);
|
|
5939
|
-
this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
|
|
5940
|
-
this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
|
|
5941
|
-
this._sources = new ArraySet();
|
|
5942
|
-
this._names = new ArraySet();
|
|
5943
|
-
this._mappings = new MappingList();
|
|
5944
|
-
this._sourcesContents = null;
|
|
5945
|
-
}
|
|
5946
|
-
SourceMapGenerator.prototype._version = 3;
|
|
5947
|
-
SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
|
|
5948
|
-
var sourceRoot = aSourceMapConsumer.sourceRoot;
|
|
5949
|
-
var generator = new SourceMapGenerator({
|
|
5950
|
-
file: aSourceMapConsumer.file,
|
|
5951
|
-
sourceRoot: sourceRoot
|
|
5952
|
-
});
|
|
5953
|
-
aSourceMapConsumer.eachMapping(function(mapping) {
|
|
5954
|
-
var newMapping = {
|
|
5955
|
-
generated: {
|
|
5956
|
-
line: mapping.generatedLine,
|
|
5957
|
-
column: mapping.generatedColumn
|
|
5958
|
-
}
|
|
5959
|
-
};
|
|
5960
|
-
if (null != mapping.source) {
|
|
5961
|
-
newMapping.source = mapping.source;
|
|
5962
|
-
if (null != sourceRoot) newMapping.source = util.relative(sourceRoot, newMapping.source);
|
|
5963
|
-
newMapping.original = {
|
|
5964
|
-
line: mapping.originalLine,
|
|
5965
|
-
column: mapping.originalColumn
|
|
5966
|
-
};
|
|
5967
|
-
if (null != mapping.name) newMapping.name = mapping.name;
|
|
5968
|
-
}
|
|
5969
|
-
generator.addMapping(newMapping);
|
|
5970
|
-
});
|
|
5971
|
-
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
|
5972
|
-
var sourceRelative = sourceFile;
|
|
5973
|
-
if (null !== sourceRoot) sourceRelative = util.relative(sourceRoot, sourceFile);
|
|
5974
|
-
if (!generator._sources.has(sourceRelative)) generator._sources.add(sourceRelative);
|
|
5975
|
-
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
|
5976
|
-
if (null != content) generator.setSourceContent(sourceFile, content);
|
|
5977
|
-
});
|
|
5978
|
-
return generator;
|
|
5979
|
-
};
|
|
5980
|
-
SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
|
|
5981
|
-
var generated = util.getArg(aArgs, 'generated');
|
|
5982
|
-
var original = util.getArg(aArgs, 'original', null);
|
|
5983
|
-
var source = util.getArg(aArgs, 'source', null);
|
|
5984
|
-
var name = util.getArg(aArgs, 'name', null);
|
|
5985
|
-
if (!this._skipValidation) this._validateMapping(generated, original, source, name);
|
|
5986
|
-
if (null != source) {
|
|
5987
|
-
source = String(source);
|
|
5988
|
-
if (!this._sources.has(source)) this._sources.add(source);
|
|
5989
|
-
}
|
|
5990
|
-
if (null != name) {
|
|
5991
|
-
name = String(name);
|
|
5992
|
-
if (!this._names.has(name)) this._names.add(name);
|
|
5993
|
-
}
|
|
5994
|
-
this._mappings.add({
|
|
5995
|
-
generatedLine: generated.line,
|
|
5996
|
-
generatedColumn: generated.column,
|
|
5997
|
-
originalLine: null != original && original.line,
|
|
5998
|
-
originalColumn: null != original && original.column,
|
|
5999
|
-
source: source,
|
|
6000
|
-
name: name
|
|
6001
|
-
});
|
|
6002
|
-
};
|
|
6003
|
-
SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
|
|
6004
|
-
var source = aSourceFile;
|
|
6005
|
-
if (null != this._sourceRoot) source = util.relative(this._sourceRoot, source);
|
|
6006
|
-
if (null != aSourceContent) {
|
|
6007
|
-
if (!this._sourcesContents) this._sourcesContents = Object.create(null);
|
|
6008
|
-
this._sourcesContents[util.toSetString(source)] = aSourceContent;
|
|
6009
|
-
} else if (this._sourcesContents) {
|
|
6010
|
-
delete this._sourcesContents[util.toSetString(source)];
|
|
6011
|
-
if (0 === Object.keys(this._sourcesContents).length) this._sourcesContents = null;
|
|
6012
|
-
}
|
|
6013
|
-
};
|
|
6014
|
-
SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
|
|
6015
|
-
var sourceFile = aSourceFile;
|
|
6016
|
-
if (null == aSourceFile) {
|
|
6017
|
-
if (null == aSourceMapConsumer.file) throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');
|
|
6018
|
-
sourceFile = aSourceMapConsumer.file;
|
|
6019
|
-
}
|
|
6020
|
-
var sourceRoot = this._sourceRoot;
|
|
6021
|
-
if (null != sourceRoot) sourceFile = util.relative(sourceRoot, sourceFile);
|
|
6022
|
-
var newSources = new ArraySet();
|
|
6023
|
-
var newNames = new ArraySet();
|
|
6024
|
-
this._mappings.unsortedForEach(function(mapping) {
|
|
6025
|
-
if (mapping.source === sourceFile && null != mapping.originalLine) {
|
|
6026
|
-
var original = aSourceMapConsumer.originalPositionFor({
|
|
6027
|
-
line: mapping.originalLine,
|
|
6028
|
-
column: mapping.originalColumn
|
|
6029
|
-
});
|
|
6030
|
-
if (null != original.source) {
|
|
6031
|
-
mapping.source = original.source;
|
|
6032
|
-
if (null != aSourceMapPath) mapping.source = util.join(aSourceMapPath, mapping.source);
|
|
6033
|
-
if (null != sourceRoot) mapping.source = util.relative(sourceRoot, mapping.source);
|
|
6034
|
-
mapping.originalLine = original.line;
|
|
6035
|
-
mapping.originalColumn = original.column;
|
|
6036
|
-
if (null != original.name) mapping.name = original.name;
|
|
6037
|
-
}
|
|
6038
|
-
}
|
|
6039
|
-
var source = mapping.source;
|
|
6040
|
-
if (null != source && !newSources.has(source)) newSources.add(source);
|
|
6041
|
-
var name = mapping.name;
|
|
6042
|
-
if (null != name && !newNames.has(name)) newNames.add(name);
|
|
6043
|
-
}, this);
|
|
6044
|
-
this._sources = newSources;
|
|
6045
|
-
this._names = newNames;
|
|
6046
|
-
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
|
6047
|
-
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
|
6048
|
-
if (null != content) {
|
|
6049
|
-
if (null != aSourceMapPath) sourceFile = util.join(aSourceMapPath, sourceFile);
|
|
6050
|
-
if (null != sourceRoot) sourceFile = util.relative(sourceRoot, sourceFile);
|
|
6051
|
-
this.setSourceContent(sourceFile, content);
|
|
6052
|
-
}
|
|
6053
|
-
}, this);
|
|
6054
|
-
};
|
|
6055
|
-
SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
|
|
6056
|
-
if (aOriginal && 'number' != typeof aOriginal.line && 'number' != typeof aOriginal.column) throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");
|
|
6057
|
-
if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) return;
|
|
6058
|
-
if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aOriginal && 'line' in aOriginal && 'column' in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) return;
|
|
6059
|
-
throw new Error('Invalid mapping: ' + JSON.stringify({
|
|
6060
|
-
generated: aGenerated,
|
|
6061
|
-
source: aSource,
|
|
6062
|
-
original: aOriginal,
|
|
6063
|
-
name: aName
|
|
6064
|
-
}));
|
|
6065
|
-
};
|
|
6066
|
-
SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
|
|
6067
|
-
var previousGeneratedColumn = 0;
|
|
6068
|
-
var previousGeneratedLine = 1;
|
|
6069
|
-
var previousOriginalColumn = 0;
|
|
6070
|
-
var previousOriginalLine = 0;
|
|
6071
|
-
var previousName = 0;
|
|
6072
|
-
var previousSource = 0;
|
|
6073
|
-
var result = '';
|
|
6074
|
-
var next;
|
|
6075
|
-
var mapping;
|
|
6076
|
-
var nameIdx;
|
|
6077
|
-
var sourceIdx;
|
|
6078
|
-
var mappings = this._mappings.toArray();
|
|
6079
|
-
for(var i = 0, len = mappings.length; i < len; i++){
|
|
6080
|
-
mapping = mappings[i];
|
|
6081
|
-
next = '';
|
|
6082
|
-
if (mapping.generatedLine !== previousGeneratedLine) {
|
|
6083
|
-
previousGeneratedColumn = 0;
|
|
6084
|
-
while(mapping.generatedLine !== previousGeneratedLine){
|
|
6085
|
-
next += ';';
|
|
6086
|
-
previousGeneratedLine++;
|
|
6087
|
-
}
|
|
6088
|
-
} else if (i > 0) {
|
|
6089
|
-
if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) continue;
|
|
6090
|
-
next += ',';
|
|
6091
|
-
}
|
|
6092
|
-
next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
|
|
6093
|
-
previousGeneratedColumn = mapping.generatedColumn;
|
|
6094
|
-
if (null != mapping.source) {
|
|
6095
|
-
sourceIdx = this._sources.indexOf(mapping.source);
|
|
6096
|
-
next += base64VLQ.encode(sourceIdx - previousSource);
|
|
6097
|
-
previousSource = sourceIdx;
|
|
6098
|
-
next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
|
|
6099
|
-
previousOriginalLine = mapping.originalLine - 1;
|
|
6100
|
-
next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
|
|
6101
|
-
previousOriginalColumn = mapping.originalColumn;
|
|
6102
|
-
if (null != mapping.name) {
|
|
6103
|
-
nameIdx = this._names.indexOf(mapping.name);
|
|
6104
|
-
next += base64VLQ.encode(nameIdx - previousName);
|
|
6105
|
-
previousName = nameIdx;
|
|
6106
|
-
}
|
|
6107
|
-
}
|
|
6108
|
-
result += next;
|
|
6109
|
-
}
|
|
6110
|
-
return result;
|
|
6111
|
-
};
|
|
6112
|
-
SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
|
|
6113
|
-
return aSources.map(function(source) {
|
|
6114
|
-
if (!this._sourcesContents) return null;
|
|
6115
|
-
if (null != aSourceRoot) source = util.relative(aSourceRoot, source);
|
|
6116
|
-
var key = util.toSetString(source);
|
|
6117
|
-
return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
|
|
6118
|
-
}, this);
|
|
6119
|
-
};
|
|
6120
|
-
SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
|
|
6121
|
-
var map = {
|
|
6122
|
-
version: this._version,
|
|
6123
|
-
sources: this._sources.toArray(),
|
|
6124
|
-
names: this._names.toArray(),
|
|
6125
|
-
mappings: this._serializeMappings()
|
|
6126
|
-
};
|
|
6127
|
-
if (null != this._file) map.file = this._file;
|
|
6128
|
-
if (null != this._sourceRoot) map.sourceRoot = this._sourceRoot;
|
|
6129
|
-
if (this._sourcesContents) map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
|
|
6130
|
-
return map;
|
|
6131
|
-
};
|
|
6132
|
-
SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
6133
|
-
return JSON.stringify(this.toJSON());
|
|
6134
|
-
};
|
|
6135
|
-
exports.SourceMapGenerator = SourceMapGenerator;
|
|
6136
|
-
},
|
|
6137
|
-
"../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-node.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
6138
|
-
var SourceMapGenerator = __webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-generator.js").SourceMapGenerator;
|
|
6139
|
-
var util = __webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js");
|
|
6140
|
-
var REGEX_NEWLINE = /(\r?\n)/;
|
|
6141
|
-
var NEWLINE_CODE = 10;
|
|
6142
|
-
var isSourceNode = "$$$isSourceNode$$$";
|
|
6143
|
-
function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
|
|
6144
|
-
this.children = [];
|
|
6145
|
-
this.sourceContents = {};
|
|
6146
|
-
this.line = null == aLine ? null : aLine;
|
|
6147
|
-
this.column = null == aColumn ? null : aColumn;
|
|
6148
|
-
this.source = null == aSource ? null : aSource;
|
|
6149
|
-
this.name = null == aName ? null : aName;
|
|
6150
|
-
this[isSourceNode] = true;
|
|
6151
|
-
if (null != aChunks) this.add(aChunks);
|
|
6152
|
-
}
|
|
6153
|
-
SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
|
|
6154
|
-
var node = new SourceNode();
|
|
6155
|
-
var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
|
|
6156
|
-
var remainingLinesIndex = 0;
|
|
6157
|
-
var shiftNextLine = function() {
|
|
6158
|
-
var lineContents = getNextLine();
|
|
6159
|
-
var newLine = getNextLine() || "";
|
|
6160
|
-
return lineContents + newLine;
|
|
6161
|
-
function getNextLine() {
|
|
6162
|
-
return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0;
|
|
6163
|
-
}
|
|
6164
|
-
};
|
|
6165
|
-
var lastGeneratedLine = 1, lastGeneratedColumn = 0;
|
|
6166
|
-
var lastMapping = null;
|
|
6167
|
-
aSourceMapConsumer.eachMapping(function(mapping) {
|
|
6168
|
-
if (null !== lastMapping) if (lastGeneratedLine < mapping.generatedLine) {
|
|
6169
|
-
addMappingWithCode(lastMapping, shiftNextLine());
|
|
6170
|
-
lastGeneratedLine++;
|
|
6171
|
-
lastGeneratedColumn = 0;
|
|
6172
|
-
} else {
|
|
6173
|
-
var nextLine = remainingLines[remainingLinesIndex] || '';
|
|
6174
|
-
var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
|
|
6175
|
-
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
|
|
6176
|
-
lastGeneratedColumn = mapping.generatedColumn;
|
|
6177
|
-
addMappingWithCode(lastMapping, code);
|
|
6178
|
-
lastMapping = mapping;
|
|
6179
|
-
return;
|
|
6180
|
-
}
|
|
6181
|
-
while(lastGeneratedLine < mapping.generatedLine){
|
|
6182
|
-
node.add(shiftNextLine());
|
|
6183
|
-
lastGeneratedLine++;
|
|
6184
|
-
}
|
|
6185
|
-
if (lastGeneratedColumn < mapping.generatedColumn) {
|
|
6186
|
-
var nextLine = remainingLines[remainingLinesIndex] || '';
|
|
6187
|
-
node.add(nextLine.substr(0, mapping.generatedColumn));
|
|
6188
|
-
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
|
|
6189
|
-
lastGeneratedColumn = mapping.generatedColumn;
|
|
6190
|
-
}
|
|
6191
|
-
lastMapping = mapping;
|
|
6192
|
-
}, this);
|
|
6193
|
-
if (remainingLinesIndex < remainingLines.length) {
|
|
6194
|
-
if (lastMapping) addMappingWithCode(lastMapping, shiftNextLine());
|
|
6195
|
-
node.add(remainingLines.splice(remainingLinesIndex).join(""));
|
|
6196
|
-
}
|
|
6197
|
-
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
|
6198
|
-
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
|
6199
|
-
if (null != content) {
|
|
6200
|
-
if (null != aRelativePath) sourceFile = util.join(aRelativePath, sourceFile);
|
|
6201
|
-
node.setSourceContent(sourceFile, content);
|
|
6202
|
-
}
|
|
6203
|
-
});
|
|
6204
|
-
return node;
|
|
6205
|
-
function addMappingWithCode(mapping, code) {
|
|
6206
|
-
if (null === mapping || void 0 === mapping.source) node.add(code);
|
|
6207
|
-
else {
|
|
6208
|
-
var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
|
|
6209
|
-
node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name));
|
|
6210
|
-
}
|
|
6211
|
-
}
|
|
6212
|
-
};
|
|
6213
|
-
SourceNode.prototype.add = function SourceNode_add(aChunk) {
|
|
6214
|
-
if (Array.isArray(aChunk)) aChunk.forEach(function(chunk) {
|
|
6215
|
-
this.add(chunk);
|
|
6216
|
-
}, this);
|
|
6217
|
-
else if (aChunk[isSourceNode] || "string" == typeof aChunk) {
|
|
6218
|
-
if (aChunk) this.children.push(aChunk);
|
|
6219
|
-
} else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
|
|
6220
|
-
return this;
|
|
6221
|
-
};
|
|
6222
|
-
SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
|
|
6223
|
-
if (Array.isArray(aChunk)) for(var i = aChunk.length - 1; i >= 0; i--)this.prepend(aChunk[i]);
|
|
6224
|
-
else if (aChunk[isSourceNode] || "string" == typeof aChunk) this.children.unshift(aChunk);
|
|
6225
|
-
else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
|
|
6226
|
-
return this;
|
|
6227
|
-
};
|
|
6228
|
-
SourceNode.prototype.walk = function SourceNode_walk(aFn) {
|
|
6229
|
-
var chunk;
|
|
6230
|
-
for(var i = 0, len = this.children.length; i < len; i++){
|
|
6231
|
-
chunk = this.children[i];
|
|
6232
|
-
if (chunk[isSourceNode]) chunk.walk(aFn);
|
|
6233
|
-
else if ('' !== chunk) aFn(chunk, {
|
|
6234
|
-
source: this.source,
|
|
6235
|
-
line: this.line,
|
|
6236
|
-
column: this.column,
|
|
6237
|
-
name: this.name
|
|
6238
|
-
});
|
|
6239
|
-
}
|
|
6240
|
-
};
|
|
6241
|
-
SourceNode.prototype.join = function SourceNode_join(aSep) {
|
|
6242
|
-
var newChildren;
|
|
6243
|
-
var i;
|
|
6244
|
-
var len = this.children.length;
|
|
6245
|
-
if (len > 0) {
|
|
6246
|
-
newChildren = [];
|
|
6247
|
-
for(i = 0; i < len - 1; i++){
|
|
6248
|
-
newChildren.push(this.children[i]);
|
|
6249
|
-
newChildren.push(aSep);
|
|
6250
|
-
}
|
|
6251
|
-
newChildren.push(this.children[i]);
|
|
6252
|
-
this.children = newChildren;
|
|
6253
|
-
}
|
|
6254
|
-
return this;
|
|
6255
|
-
};
|
|
6256
|
-
SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
|
|
6257
|
-
var lastChild = this.children[this.children.length - 1];
|
|
6258
|
-
if (lastChild[isSourceNode]) lastChild.replaceRight(aPattern, aReplacement);
|
|
6259
|
-
else if ('string' == typeof lastChild) this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
|
|
6260
|
-
else this.children.push(''.replace(aPattern, aReplacement));
|
|
6261
|
-
return this;
|
|
6262
|
-
};
|
|
6263
|
-
SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
|
|
6264
|
-
this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
|
|
6265
|
-
};
|
|
6266
|
-
SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
|
|
6267
|
-
for(var i = 0, len = this.children.length; i < len; i++)if (this.children[i][isSourceNode]) this.children[i].walkSourceContents(aFn);
|
|
6268
|
-
var sources = Object.keys(this.sourceContents);
|
|
6269
|
-
for(var i = 0, len = sources.length; i < len; i++)aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
|
|
6270
|
-
};
|
|
6271
|
-
SourceNode.prototype.toString = function SourceNode_toString() {
|
|
6272
|
-
var str = "";
|
|
6273
|
-
this.walk(function(chunk) {
|
|
6274
|
-
str += chunk;
|
|
6275
|
-
});
|
|
6276
|
-
return str;
|
|
6277
|
-
};
|
|
6278
|
-
SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
|
|
6279
|
-
var generated = {
|
|
6280
|
-
code: "",
|
|
6281
|
-
line: 1,
|
|
6282
|
-
column: 0
|
|
6283
|
-
};
|
|
6284
|
-
var map = new SourceMapGenerator(aArgs);
|
|
6285
|
-
var sourceMappingActive = false;
|
|
6286
|
-
var lastOriginalSource = null;
|
|
6287
|
-
var lastOriginalLine = null;
|
|
6288
|
-
var lastOriginalColumn = null;
|
|
6289
|
-
var lastOriginalName = null;
|
|
6290
|
-
this.walk(function(chunk, original) {
|
|
6291
|
-
generated.code += chunk;
|
|
6292
|
-
if (null !== original.source && null !== original.line && null !== original.column) {
|
|
6293
|
-
if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) map.addMapping({
|
|
6294
|
-
source: original.source,
|
|
6295
|
-
original: {
|
|
6296
|
-
line: original.line,
|
|
6297
|
-
column: original.column
|
|
6298
|
-
},
|
|
6299
|
-
generated: {
|
|
6300
|
-
line: generated.line,
|
|
6301
|
-
column: generated.column
|
|
6302
|
-
},
|
|
6303
|
-
name: original.name
|
|
6304
|
-
});
|
|
6305
|
-
lastOriginalSource = original.source;
|
|
6306
|
-
lastOriginalLine = original.line;
|
|
6307
|
-
lastOriginalColumn = original.column;
|
|
6308
|
-
lastOriginalName = original.name;
|
|
6309
|
-
sourceMappingActive = true;
|
|
6310
|
-
} else if (sourceMappingActive) {
|
|
6311
|
-
map.addMapping({
|
|
6312
|
-
generated: {
|
|
6313
|
-
line: generated.line,
|
|
6314
|
-
column: generated.column
|
|
6315
|
-
}
|
|
6316
|
-
});
|
|
6317
|
-
lastOriginalSource = null;
|
|
6318
|
-
sourceMappingActive = false;
|
|
6319
|
-
}
|
|
6320
|
-
for(var idx = 0, length = chunk.length; idx < length; idx++)if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
|
|
6321
|
-
generated.line++;
|
|
6322
|
-
generated.column = 0;
|
|
6323
|
-
if (idx + 1 === length) {
|
|
6324
|
-
lastOriginalSource = null;
|
|
6325
|
-
sourceMappingActive = false;
|
|
6326
|
-
} else if (sourceMappingActive) map.addMapping({
|
|
6327
|
-
source: original.source,
|
|
6328
|
-
original: {
|
|
6329
|
-
line: original.line,
|
|
6330
|
-
column: original.column
|
|
6331
|
-
},
|
|
6332
|
-
generated: {
|
|
6333
|
-
line: generated.line,
|
|
6334
|
-
column: generated.column
|
|
6335
|
-
},
|
|
6336
|
-
name: original.name
|
|
6337
|
-
});
|
|
6338
|
-
} else generated.column++;
|
|
6339
|
-
});
|
|
6340
|
-
this.walkSourceContents(function(sourceFile, sourceContent) {
|
|
6341
|
-
map.setSourceContent(sourceFile, sourceContent);
|
|
6342
|
-
});
|
|
6343
|
-
return {
|
|
6344
|
-
code: generated.code,
|
|
6345
|
-
map: map
|
|
6346
|
-
};
|
|
6347
|
-
};
|
|
6348
|
-
},
|
|
6349
|
-
"../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js" (__unused_rspack_module, exports) {
|
|
6350
|
-
function getArg(aArgs, aName, aDefaultValue) {
|
|
6351
|
-
if (aName in aArgs) return aArgs[aName];
|
|
6352
|
-
if (3 === arguments.length) return aDefaultValue;
|
|
6353
|
-
throw new Error('"' + aName + '" is a required argument.');
|
|
6354
|
-
}
|
|
6355
|
-
exports.getArg = getArg;
|
|
6356
|
-
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
|
|
6357
|
-
var dataUrlRegexp = /^data:.+\,.+$/;
|
|
6358
|
-
function urlParse(aUrl) {
|
|
6359
|
-
var match = aUrl.match(urlRegexp);
|
|
6360
|
-
if (!match) return null;
|
|
6361
|
-
return {
|
|
6362
|
-
scheme: match[1],
|
|
6363
|
-
auth: match[2],
|
|
6364
|
-
host: match[3],
|
|
6365
|
-
port: match[4],
|
|
6366
|
-
path: match[5]
|
|
6367
|
-
};
|
|
6368
|
-
}
|
|
6369
|
-
exports.urlParse = urlParse;
|
|
6370
|
-
function urlGenerate(aParsedUrl) {
|
|
6371
|
-
var url = '';
|
|
6372
|
-
if (aParsedUrl.scheme) url += aParsedUrl.scheme + ':';
|
|
6373
|
-
url += '//';
|
|
6374
|
-
if (aParsedUrl.auth) url += aParsedUrl.auth + '@';
|
|
6375
|
-
if (aParsedUrl.host) url += aParsedUrl.host;
|
|
6376
|
-
if (aParsedUrl.port) url += ":" + aParsedUrl.port;
|
|
6377
|
-
if (aParsedUrl.path) url += aParsedUrl.path;
|
|
6378
|
-
return url;
|
|
6379
|
-
}
|
|
6380
|
-
exports.urlGenerate = urlGenerate;
|
|
6381
|
-
function normalize(aPath) {
|
|
6382
|
-
var path = aPath;
|
|
6383
|
-
var url = urlParse(aPath);
|
|
6384
|
-
if (url) {
|
|
6385
|
-
if (!url.path) return aPath;
|
|
6386
|
-
path = url.path;
|
|
6387
|
-
}
|
|
6388
|
-
var isAbsolute = exports.isAbsolute(path);
|
|
6389
|
-
var parts = path.split(/\/+/);
|
|
6390
|
-
for(var part, up = 0, i = parts.length - 1; i >= 0; i--){
|
|
6391
|
-
part = parts[i];
|
|
6392
|
-
if ('.' === part) parts.splice(i, 1);
|
|
6393
|
-
else if ('..' === part) up++;
|
|
6394
|
-
else if (up > 0) if ('' === part) {
|
|
6395
|
-
parts.splice(i + 1, up);
|
|
6396
|
-
up = 0;
|
|
6397
|
-
} else {
|
|
6398
|
-
parts.splice(i, 2);
|
|
6399
|
-
up--;
|
|
6400
|
-
}
|
|
6401
|
-
}
|
|
6402
|
-
path = parts.join('/');
|
|
6403
|
-
if ('' === path) path = isAbsolute ? '/' : '.';
|
|
6404
|
-
if (url) {
|
|
6405
|
-
url.path = path;
|
|
6406
|
-
return urlGenerate(url);
|
|
6407
|
-
}
|
|
6408
|
-
return path;
|
|
6409
|
-
}
|
|
6410
|
-
exports.normalize = normalize;
|
|
6411
|
-
function join(aRoot, aPath) {
|
|
6412
|
-
if ("" === aRoot) aRoot = ".";
|
|
6413
|
-
if ("" === aPath) aPath = ".";
|
|
6414
|
-
var aPathUrl = urlParse(aPath);
|
|
6415
|
-
var aRootUrl = urlParse(aRoot);
|
|
6416
|
-
if (aRootUrl) aRoot = aRootUrl.path || '/';
|
|
6417
|
-
if (aPathUrl && !aPathUrl.scheme) {
|
|
6418
|
-
if (aRootUrl) aPathUrl.scheme = aRootUrl.scheme;
|
|
6419
|
-
return urlGenerate(aPathUrl);
|
|
6420
|
-
}
|
|
6421
|
-
if (aPathUrl || aPath.match(dataUrlRegexp)) return aPath;
|
|
6422
|
-
if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
|
|
6423
|
-
aRootUrl.host = aPath;
|
|
6424
|
-
return urlGenerate(aRootUrl);
|
|
6425
|
-
}
|
|
6426
|
-
var joined = '/' === aPath.charAt(0) ? aPath : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
|
|
6427
|
-
if (aRootUrl) {
|
|
6428
|
-
aRootUrl.path = joined;
|
|
6429
|
-
return urlGenerate(aRootUrl);
|
|
6430
|
-
}
|
|
6431
|
-
return joined;
|
|
6432
|
-
}
|
|
6433
|
-
exports.join = join;
|
|
6434
|
-
exports.isAbsolute = function(aPath) {
|
|
6435
|
-
return '/' === aPath.charAt(0) || urlRegexp.test(aPath);
|
|
6436
|
-
};
|
|
6437
|
-
function relative(aRoot, aPath) {
|
|
6438
|
-
if ("" === aRoot) aRoot = ".";
|
|
6439
|
-
aRoot = aRoot.replace(/\/$/, '');
|
|
6440
|
-
var level = 0;
|
|
6441
|
-
while(0 !== aPath.indexOf(aRoot + '/')){
|
|
6442
|
-
var index = aRoot.lastIndexOf("/");
|
|
6443
|
-
if (index < 0) return aPath;
|
|
6444
|
-
aRoot = aRoot.slice(0, index);
|
|
6445
|
-
if (aRoot.match(/^([^\/]+:\/)?\/*$/)) return aPath;
|
|
6446
|
-
++level;
|
|
6447
|
-
}
|
|
6448
|
-
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
|
6449
|
-
}
|
|
6450
|
-
exports.relative = relative;
|
|
6451
|
-
var supportsNullProto = function() {
|
|
6452
|
-
var obj = Object.create(null);
|
|
6453
|
-
return !('__proto__' in obj);
|
|
6454
|
-
}();
|
|
6455
|
-
function identity(s) {
|
|
6456
|
-
return s;
|
|
6457
|
-
}
|
|
6458
|
-
function toSetString(aStr) {
|
|
6459
|
-
if (isProtoString(aStr)) return '$' + aStr;
|
|
6460
|
-
return aStr;
|
|
6461
|
-
}
|
|
6462
|
-
exports.toSetString = supportsNullProto ? identity : toSetString;
|
|
6463
|
-
function fromSetString(aStr) {
|
|
6464
|
-
if (isProtoString(aStr)) return aStr.slice(1);
|
|
6465
|
-
return aStr;
|
|
6466
|
-
}
|
|
6467
|
-
exports.fromSetString = supportsNullProto ? identity : fromSetString;
|
|
6468
|
-
function isProtoString(s) {
|
|
6469
|
-
if (!s) return false;
|
|
6470
|
-
var length = s.length;
|
|
6471
|
-
if (length < 9) return false;
|
|
6472
|
-
if (95 !== s.charCodeAt(length - 1) || 95 !== s.charCodeAt(length - 2) || 111 !== s.charCodeAt(length - 3) || 116 !== s.charCodeAt(length - 4) || 111 !== s.charCodeAt(length - 5) || 114 !== s.charCodeAt(length - 6) || 112 !== s.charCodeAt(length - 7) || 95 !== s.charCodeAt(length - 8) || 95 !== s.charCodeAt(length - 9)) return false;
|
|
6473
|
-
for(var i = length - 10; i >= 0; i--)if (36 !== s.charCodeAt(i)) return false;
|
|
6474
|
-
return true;
|
|
6475
|
-
}
|
|
6476
|
-
function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
|
|
6477
|
-
var cmp = strcmp(mappingA.source, mappingB.source);
|
|
6478
|
-
if (0 !== cmp) return cmp;
|
|
6479
|
-
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
6480
|
-
if (0 !== cmp) return cmp;
|
|
6481
|
-
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
6482
|
-
if (0 !== cmp || onlyCompareOriginal) return cmp;
|
|
6483
|
-
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
6484
|
-
if (0 !== cmp) return cmp;
|
|
6485
|
-
cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
6486
|
-
if (0 !== cmp) return cmp;
|
|
6487
|
-
return strcmp(mappingA.name, mappingB.name);
|
|
6488
|
-
}
|
|
6489
|
-
exports.compareByOriginalPositions = compareByOriginalPositions;
|
|
6490
|
-
function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
|
|
6491
|
-
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
6492
|
-
if (0 !== cmp) return cmp;
|
|
6493
|
-
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
6494
|
-
if (0 !== cmp || onlyCompareGenerated) return cmp;
|
|
6495
|
-
cmp = strcmp(mappingA.source, mappingB.source);
|
|
6496
|
-
if (0 !== cmp) return cmp;
|
|
6497
|
-
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
6498
|
-
if (0 !== cmp) return cmp;
|
|
6499
|
-
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
6500
|
-
if (0 !== cmp) return cmp;
|
|
6501
|
-
return strcmp(mappingA.name, mappingB.name);
|
|
6502
|
-
}
|
|
6503
|
-
exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
|
|
6504
|
-
function strcmp(aStr1, aStr2) {
|
|
6505
|
-
if (aStr1 === aStr2) return 0;
|
|
6506
|
-
if (null === aStr1) return 1;
|
|
6507
|
-
if (null === aStr2) return -1;
|
|
6508
|
-
if (aStr1 > aStr2) return 1;
|
|
6509
|
-
return -1;
|
|
6510
|
-
}
|
|
6511
|
-
function compareByGeneratedPositionsInflated(mappingA, mappingB) {
|
|
6512
|
-
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
6513
|
-
if (0 !== cmp) return cmp;
|
|
6514
|
-
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
6515
|
-
if (0 !== cmp) return cmp;
|
|
6516
|
-
cmp = strcmp(mappingA.source, mappingB.source);
|
|
6517
|
-
if (0 !== cmp) return cmp;
|
|
6518
|
-
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
6519
|
-
if (0 !== cmp) return cmp;
|
|
6520
|
-
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
6521
|
-
if (0 !== cmp) return cmp;
|
|
6522
|
-
return strcmp(mappingA.name, mappingB.name);
|
|
6523
|
-
}
|
|
6524
|
-
exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
|
|
6525
|
-
function parseSourceMapInput(str) {
|
|
6526
|
-
return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ''));
|
|
6527
|
-
}
|
|
6528
|
-
exports.parseSourceMapInput = parseSourceMapInput;
|
|
6529
|
-
function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
|
|
6530
|
-
sourceURL = sourceURL || '';
|
|
6531
|
-
if (sourceRoot) {
|
|
6532
|
-
if ('/' !== sourceRoot[sourceRoot.length - 1] && '/' !== sourceURL[0]) sourceRoot += '/';
|
|
6533
|
-
sourceURL = sourceRoot + sourceURL;
|
|
6534
|
-
}
|
|
6535
|
-
if (sourceMapURL) {
|
|
6536
|
-
var parsed = urlParse(sourceMapURL);
|
|
6537
|
-
if (!parsed) throw new Error("sourceMapURL could not be parsed");
|
|
6538
|
-
if (parsed.path) {
|
|
6539
|
-
var index = parsed.path.lastIndexOf('/');
|
|
6540
|
-
if (index >= 0) parsed.path = parsed.path.substring(0, index + 1);
|
|
6541
|
-
}
|
|
6542
|
-
sourceURL = join(urlGenerate(parsed), sourceURL);
|
|
6543
|
-
}
|
|
6544
|
-
return normalize(sourceURL);
|
|
6545
|
-
}
|
|
6546
|
-
exports.computeSourceURL = computeSourceURL;
|
|
6547
|
-
},
|
|
6548
|
-
"../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/source-map.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
6549
|
-
__webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-generator.js").SourceMapGenerator;
|
|
6550
|
-
exports.SourceMapConsumer = __webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-consumer.js").SourceMapConsumer;
|
|
6551
|
-
__webpack_require__("../../node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-node.js");
|
|
6552
|
-
},
|
|
6553
4823
|
"../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
6554
4824
|
const os = __webpack_require__("node:os");
|
|
6555
4825
|
const tty = __webpack_require__("node:tty");
|
|
@@ -6618,10 +4888,6 @@ __webpack_require__.add({
|
|
|
6618
4888
|
};
|
|
6619
4889
|
}
|
|
6620
4890
|
});
|
|
6621
|
-
const gracefulExit = process.execArgv.some((execArg)=>execArg.startsWith('--perf') || execArg.startsWith('--prof') || execArg.startsWith('--cpu-prof') || execArg.startsWith('--heap-prof') || execArg.startsWith('--diagnostic-dir'));
|
|
6622
|
-
if (gracefulExit) process.on('SIGTERM', ()=>{
|
|
6623
|
-
process.exit();
|
|
6624
|
-
});
|
|
6625
4891
|
const build_0 = __webpack_require__("../../node_modules/.pnpm/jest-diff@30.2.0/node_modules/jest-diff/build/index.js");
|
|
6626
4892
|
build_0.DIFF_DELETE;
|
|
6627
4893
|
build_0.DIFF_EQUAL;
|
|
@@ -6638,7 +4904,6 @@ build_1.DEFAULT_OPTIONS;
|
|
|
6638
4904
|
const format = build_1.format;
|
|
6639
4905
|
const plugins = build_1.plugins;
|
|
6640
4906
|
build_1["default"];
|
|
6641
|
-
const external_node_util_ = __webpack_require__("node:util");
|
|
6642
4907
|
const REAL_TIMERS = {};
|
|
6643
4908
|
const setRealTimers = ()=>{
|
|
6644
4909
|
REAL_TIMERS.setTimeout ??= globalThis.setTimeout.bind(globalThis);
|
|
@@ -6674,6 +4939,34 @@ const formatTestError = (err, test)=>{
|
|
|
6674
4939
|
});
|
|
6675
4940
|
};
|
|
6676
4941
|
const formatRegExp = /%[sdjifoOc%]/;
|
|
4942
|
+
const formatTemplate = (template, values)=>{
|
|
4943
|
+
if (!formatRegExp.test(template)) return template;
|
|
4944
|
+
let valueIndex = 0;
|
|
4945
|
+
return template.replace(/%[sdjifoOc%]/g, (specifier)=>{
|
|
4946
|
+
if ('%%' === specifier) return '%';
|
|
4947
|
+
const value = values[valueIndex++];
|
|
4948
|
+
switch(specifier){
|
|
4949
|
+
case '%s':
|
|
4950
|
+
case '%O':
|
|
4951
|
+
case '%o':
|
|
4952
|
+
case '%c':
|
|
4953
|
+
return String(value);
|
|
4954
|
+
case '%d':
|
|
4955
|
+
case '%i':
|
|
4956
|
+
return Number.parseInt(String(value), 10).toString();
|
|
4957
|
+
case '%f':
|
|
4958
|
+
return Number(value).toString();
|
|
4959
|
+
case '%j':
|
|
4960
|
+
try {
|
|
4961
|
+
return JSON.stringify(value);
|
|
4962
|
+
} catch {
|
|
4963
|
+
return '[Circular]';
|
|
4964
|
+
}
|
|
4965
|
+
default:
|
|
4966
|
+
return String(value ?? '');
|
|
4967
|
+
}
|
|
4968
|
+
});
|
|
4969
|
+
};
|
|
6677
4970
|
const formatName = (template, param, index)=>{
|
|
6678
4971
|
let templateStr = template;
|
|
6679
4972
|
if ([
|
|
@@ -6681,8 +4974,13 @@ const formatName = (template, param, index)=>{
|
|
|
6681
4974
|
'%#',
|
|
6682
4975
|
'%$'
|
|
6683
4976
|
].some((flag)=>templateStr.includes(flag))) templateStr = templateStr.replace(/%%/g, '__rstest_escaped_%__').replace(/%#/g, `${index}`).replace(/%\$/g, `${index + 1}`).replace(/__rstest_escaped_%__/g, '%%');
|
|
6684
|
-
if (Array.isArray(param))
|
|
6685
|
-
|
|
4977
|
+
if (Array.isArray(param)) {
|
|
4978
|
+
if (formatRegExp.test(templateStr)) return formatTemplate(templateStr, param);
|
|
4979
|
+
return templateStr;
|
|
4980
|
+
}
|
|
4981
|
+
if (formatRegExp.test(templateStr)) templateStr = formatTemplate(templateStr, [
|
|
4982
|
+
param
|
|
4983
|
+
]);
|
|
6686
4984
|
return templateStr.replace(/\$([$\w.]+)/g, (_, key)=>{
|
|
6687
4985
|
const value = getValue(param, key);
|
|
6688
4986
|
return value?.toString();
|
|
@@ -6703,14 +5001,22 @@ class RstestError extends Error {
|
|
|
6703
5001
|
fullStack;
|
|
6704
5002
|
}
|
|
6705
5003
|
function checkPkgInstalled(name) {
|
|
6706
|
-
|
|
5004
|
+
if ("u" < typeof process || !process.versions?.node) return;
|
|
5005
|
+
let resolveFn;
|
|
5006
|
+
try {
|
|
5007
|
+
const req = Function('return require')();
|
|
5008
|
+
resolveFn = req?.resolve?.bind(req);
|
|
5009
|
+
} catch {
|
|
5010
|
+
resolveFn = void 0;
|
|
5011
|
+
}
|
|
5012
|
+
if (!resolveFn) return;
|
|
6707
5013
|
try {
|
|
6708
|
-
|
|
5014
|
+
resolveFn(name);
|
|
6709
5015
|
} catch (error) {
|
|
6710
|
-
if ('MODULE_NOT_FOUND'
|
|
6711
|
-
const
|
|
6712
|
-
|
|
6713
|
-
throw
|
|
5016
|
+
if (error?.code === 'MODULE_NOT_FOUND') {
|
|
5017
|
+
const missingError = new RstestError(`Missing dependency "${name}". Please install it first.`);
|
|
5018
|
+
missingError.fullStack = true;
|
|
5019
|
+
throw missingError;
|
|
6714
5020
|
}
|
|
6715
5021
|
throw error;
|
|
6716
5022
|
}
|