@formatjs/cli 5.0.9 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/formatjs +1 -2219
- package/package.json +2 -2
package/bin/formatjs
CHANGED
|
@@ -6569,2224 +6569,6 @@ var require_tslib = __commonJS({
|
|
|
6569
6569
|
}
|
|
6570
6570
|
});
|
|
6571
6571
|
|
|
6572
|
-
// ../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/base64.js
|
|
6573
|
-
var require_base64 = __commonJS({
|
|
6574
|
-
"../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/base64.js"(exports) {
|
|
6575
|
-
var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
6576
|
-
exports.encode = function(number) {
|
|
6577
|
-
if (0 <= number && number < intToCharMap.length) {
|
|
6578
|
-
return intToCharMap[number];
|
|
6579
|
-
}
|
|
6580
|
-
throw new TypeError("Must be between 0 and 63: " + number);
|
|
6581
|
-
};
|
|
6582
|
-
exports.decode = function(charCode) {
|
|
6583
|
-
var bigA = 65;
|
|
6584
|
-
var bigZ = 90;
|
|
6585
|
-
var littleA = 97;
|
|
6586
|
-
var littleZ = 122;
|
|
6587
|
-
var zero = 48;
|
|
6588
|
-
var nine = 57;
|
|
6589
|
-
var plus = 43;
|
|
6590
|
-
var slash = 47;
|
|
6591
|
-
var littleOffset = 26;
|
|
6592
|
-
var numberOffset = 52;
|
|
6593
|
-
if (bigA <= charCode && charCode <= bigZ) {
|
|
6594
|
-
return charCode - bigA;
|
|
6595
|
-
}
|
|
6596
|
-
if (littleA <= charCode && charCode <= littleZ) {
|
|
6597
|
-
return charCode - littleA + littleOffset;
|
|
6598
|
-
}
|
|
6599
|
-
if (zero <= charCode && charCode <= nine) {
|
|
6600
|
-
return charCode - zero + numberOffset;
|
|
6601
|
-
}
|
|
6602
|
-
if (charCode == plus) {
|
|
6603
|
-
return 62;
|
|
6604
|
-
}
|
|
6605
|
-
if (charCode == slash) {
|
|
6606
|
-
return 63;
|
|
6607
|
-
}
|
|
6608
|
-
return -1;
|
|
6609
|
-
};
|
|
6610
|
-
}
|
|
6611
|
-
});
|
|
6612
|
-
|
|
6613
|
-
// ../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/base64-vlq.js
|
|
6614
|
-
var require_base64_vlq = __commonJS({
|
|
6615
|
-
"../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/base64-vlq.js"(exports) {
|
|
6616
|
-
var base64 = require_base64();
|
|
6617
|
-
var VLQ_BASE_SHIFT = 5;
|
|
6618
|
-
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
|
|
6619
|
-
var VLQ_BASE_MASK = VLQ_BASE - 1;
|
|
6620
|
-
var VLQ_CONTINUATION_BIT = VLQ_BASE;
|
|
6621
|
-
function toVLQSigned(aValue) {
|
|
6622
|
-
return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
|
|
6623
|
-
}
|
|
6624
|
-
function fromVLQSigned(aValue) {
|
|
6625
|
-
var isNegative = (aValue & 1) === 1;
|
|
6626
|
-
var shifted = aValue >> 1;
|
|
6627
|
-
return isNegative ? -shifted : shifted;
|
|
6628
|
-
}
|
|
6629
|
-
exports.encode = function base64VLQ_encode(aValue) {
|
|
6630
|
-
var encoded = "";
|
|
6631
|
-
var digit;
|
|
6632
|
-
var vlq = toVLQSigned(aValue);
|
|
6633
|
-
do {
|
|
6634
|
-
digit = vlq & VLQ_BASE_MASK;
|
|
6635
|
-
vlq >>>= VLQ_BASE_SHIFT;
|
|
6636
|
-
if (vlq > 0) {
|
|
6637
|
-
digit |= VLQ_CONTINUATION_BIT;
|
|
6638
|
-
}
|
|
6639
|
-
encoded += base64.encode(digit);
|
|
6640
|
-
} while (vlq > 0);
|
|
6641
|
-
return encoded;
|
|
6642
|
-
};
|
|
6643
|
-
exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
|
|
6644
|
-
var strLen = aStr.length;
|
|
6645
|
-
var result = 0;
|
|
6646
|
-
var shift = 0;
|
|
6647
|
-
var continuation, digit;
|
|
6648
|
-
do {
|
|
6649
|
-
if (aIndex >= strLen) {
|
|
6650
|
-
throw new Error("Expected more digits in base 64 VLQ value.");
|
|
6651
|
-
}
|
|
6652
|
-
digit = base64.decode(aStr.charCodeAt(aIndex++));
|
|
6653
|
-
if (digit === -1) {
|
|
6654
|
-
throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
|
|
6655
|
-
}
|
|
6656
|
-
continuation = !!(digit & VLQ_CONTINUATION_BIT);
|
|
6657
|
-
digit &= VLQ_BASE_MASK;
|
|
6658
|
-
result = result + (digit << shift);
|
|
6659
|
-
shift += VLQ_BASE_SHIFT;
|
|
6660
|
-
} while (continuation);
|
|
6661
|
-
aOutParam.value = fromVLQSigned(result);
|
|
6662
|
-
aOutParam.rest = aIndex;
|
|
6663
|
-
};
|
|
6664
|
-
}
|
|
6665
|
-
});
|
|
6666
|
-
|
|
6667
|
-
// ../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/util.js
|
|
6668
|
-
var require_util2 = __commonJS({
|
|
6669
|
-
"../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/util.js"(exports) {
|
|
6670
|
-
function getArg(aArgs, aName, aDefaultValue) {
|
|
6671
|
-
if (aName in aArgs) {
|
|
6672
|
-
return aArgs[aName];
|
|
6673
|
-
} else if (arguments.length === 3) {
|
|
6674
|
-
return aDefaultValue;
|
|
6675
|
-
} else {
|
|
6676
|
-
throw new Error('"' + aName + '" is a required argument.');
|
|
6677
|
-
}
|
|
6678
|
-
}
|
|
6679
|
-
exports.getArg = getArg;
|
|
6680
|
-
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
|
|
6681
|
-
var dataUrlRegexp = /^data:.+\,.+$/;
|
|
6682
|
-
function urlParse(aUrl) {
|
|
6683
|
-
var match = aUrl.match(urlRegexp);
|
|
6684
|
-
if (!match) {
|
|
6685
|
-
return null;
|
|
6686
|
-
}
|
|
6687
|
-
return {
|
|
6688
|
-
scheme: match[1],
|
|
6689
|
-
auth: match[2],
|
|
6690
|
-
host: match[3],
|
|
6691
|
-
port: match[4],
|
|
6692
|
-
path: match[5]
|
|
6693
|
-
};
|
|
6694
|
-
}
|
|
6695
|
-
exports.urlParse = urlParse;
|
|
6696
|
-
function urlGenerate(aParsedUrl) {
|
|
6697
|
-
var url = "";
|
|
6698
|
-
if (aParsedUrl.scheme) {
|
|
6699
|
-
url += aParsedUrl.scheme + ":";
|
|
6700
|
-
}
|
|
6701
|
-
url += "//";
|
|
6702
|
-
if (aParsedUrl.auth) {
|
|
6703
|
-
url += aParsedUrl.auth + "@";
|
|
6704
|
-
}
|
|
6705
|
-
if (aParsedUrl.host) {
|
|
6706
|
-
url += aParsedUrl.host;
|
|
6707
|
-
}
|
|
6708
|
-
if (aParsedUrl.port) {
|
|
6709
|
-
url += ":" + aParsedUrl.port;
|
|
6710
|
-
}
|
|
6711
|
-
if (aParsedUrl.path) {
|
|
6712
|
-
url += aParsedUrl.path;
|
|
6713
|
-
}
|
|
6714
|
-
return url;
|
|
6715
|
-
}
|
|
6716
|
-
exports.urlGenerate = urlGenerate;
|
|
6717
|
-
function normalize(aPath) {
|
|
6718
|
-
var path = aPath;
|
|
6719
|
-
var url = urlParse(aPath);
|
|
6720
|
-
if (url) {
|
|
6721
|
-
if (!url.path) {
|
|
6722
|
-
return aPath;
|
|
6723
|
-
}
|
|
6724
|
-
path = url.path;
|
|
6725
|
-
}
|
|
6726
|
-
var isAbsolute = exports.isAbsolute(path);
|
|
6727
|
-
var parts = path.split(/\/+/);
|
|
6728
|
-
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
|
|
6729
|
-
part = parts[i];
|
|
6730
|
-
if (part === ".") {
|
|
6731
|
-
parts.splice(i, 1);
|
|
6732
|
-
} else if (part === "..") {
|
|
6733
|
-
up++;
|
|
6734
|
-
} else if (up > 0) {
|
|
6735
|
-
if (part === "") {
|
|
6736
|
-
parts.splice(i + 1, up);
|
|
6737
|
-
up = 0;
|
|
6738
|
-
} else {
|
|
6739
|
-
parts.splice(i, 2);
|
|
6740
|
-
up--;
|
|
6741
|
-
}
|
|
6742
|
-
}
|
|
6743
|
-
}
|
|
6744
|
-
path = parts.join("/");
|
|
6745
|
-
if (path === "") {
|
|
6746
|
-
path = isAbsolute ? "/" : ".";
|
|
6747
|
-
}
|
|
6748
|
-
if (url) {
|
|
6749
|
-
url.path = path;
|
|
6750
|
-
return urlGenerate(url);
|
|
6751
|
-
}
|
|
6752
|
-
return path;
|
|
6753
|
-
}
|
|
6754
|
-
exports.normalize = normalize;
|
|
6755
|
-
function join2(aRoot, aPath) {
|
|
6756
|
-
if (aRoot === "") {
|
|
6757
|
-
aRoot = ".";
|
|
6758
|
-
}
|
|
6759
|
-
if (aPath === "") {
|
|
6760
|
-
aPath = ".";
|
|
6761
|
-
}
|
|
6762
|
-
var aPathUrl = urlParse(aPath);
|
|
6763
|
-
var aRootUrl = urlParse(aRoot);
|
|
6764
|
-
if (aRootUrl) {
|
|
6765
|
-
aRoot = aRootUrl.path || "/";
|
|
6766
|
-
}
|
|
6767
|
-
if (aPathUrl && !aPathUrl.scheme) {
|
|
6768
|
-
if (aRootUrl) {
|
|
6769
|
-
aPathUrl.scheme = aRootUrl.scheme;
|
|
6770
|
-
}
|
|
6771
|
-
return urlGenerate(aPathUrl);
|
|
6772
|
-
}
|
|
6773
|
-
if (aPathUrl || aPath.match(dataUrlRegexp)) {
|
|
6774
|
-
return aPath;
|
|
6775
|
-
}
|
|
6776
|
-
if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
|
|
6777
|
-
aRootUrl.host = aPath;
|
|
6778
|
-
return urlGenerate(aRootUrl);
|
|
6779
|
-
}
|
|
6780
|
-
var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath);
|
|
6781
|
-
if (aRootUrl) {
|
|
6782
|
-
aRootUrl.path = joined;
|
|
6783
|
-
return urlGenerate(aRootUrl);
|
|
6784
|
-
}
|
|
6785
|
-
return joined;
|
|
6786
|
-
}
|
|
6787
|
-
exports.join = join2;
|
|
6788
|
-
exports.isAbsolute = function(aPath) {
|
|
6789
|
-
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
6790
|
-
};
|
|
6791
|
-
function relative(aRoot, aPath) {
|
|
6792
|
-
if (aRoot === "") {
|
|
6793
|
-
aRoot = ".";
|
|
6794
|
-
}
|
|
6795
|
-
aRoot = aRoot.replace(/\/$/, "");
|
|
6796
|
-
var level = 0;
|
|
6797
|
-
while (aPath.indexOf(aRoot + "/") !== 0) {
|
|
6798
|
-
var index = aRoot.lastIndexOf("/");
|
|
6799
|
-
if (index < 0) {
|
|
6800
|
-
return aPath;
|
|
6801
|
-
}
|
|
6802
|
-
aRoot = aRoot.slice(0, index);
|
|
6803
|
-
if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
|
|
6804
|
-
return aPath;
|
|
6805
|
-
}
|
|
6806
|
-
++level;
|
|
6807
|
-
}
|
|
6808
|
-
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
|
6809
|
-
}
|
|
6810
|
-
exports.relative = relative;
|
|
6811
|
-
var supportsNullProto = function() {
|
|
6812
|
-
var obj = /* @__PURE__ */ Object.create(null);
|
|
6813
|
-
return !("__proto__" in obj);
|
|
6814
|
-
}();
|
|
6815
|
-
function identity(s) {
|
|
6816
|
-
return s;
|
|
6817
|
-
}
|
|
6818
|
-
function toSetString(aStr) {
|
|
6819
|
-
if (isProtoString(aStr)) {
|
|
6820
|
-
return "$" + aStr;
|
|
6821
|
-
}
|
|
6822
|
-
return aStr;
|
|
6823
|
-
}
|
|
6824
|
-
exports.toSetString = supportsNullProto ? identity : toSetString;
|
|
6825
|
-
function fromSetString(aStr) {
|
|
6826
|
-
if (isProtoString(aStr)) {
|
|
6827
|
-
return aStr.slice(1);
|
|
6828
|
-
}
|
|
6829
|
-
return aStr;
|
|
6830
|
-
}
|
|
6831
|
-
exports.fromSetString = supportsNullProto ? identity : fromSetString;
|
|
6832
|
-
function isProtoString(s) {
|
|
6833
|
-
if (!s) {
|
|
6834
|
-
return false;
|
|
6835
|
-
}
|
|
6836
|
-
var length = s.length;
|
|
6837
|
-
if (length < 9) {
|
|
6838
|
-
return false;
|
|
6839
|
-
}
|
|
6840
|
-
if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) {
|
|
6841
|
-
return false;
|
|
6842
|
-
}
|
|
6843
|
-
for (var i = length - 10; i >= 0; i--) {
|
|
6844
|
-
if (s.charCodeAt(i) !== 36) {
|
|
6845
|
-
return false;
|
|
6846
|
-
}
|
|
6847
|
-
}
|
|
6848
|
-
return true;
|
|
6849
|
-
}
|
|
6850
|
-
function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
|
|
6851
|
-
var cmp = strcmp(mappingA.source, mappingB.source);
|
|
6852
|
-
if (cmp !== 0) {
|
|
6853
|
-
return cmp;
|
|
6854
|
-
}
|
|
6855
|
-
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
6856
|
-
if (cmp !== 0) {
|
|
6857
|
-
return cmp;
|
|
6858
|
-
}
|
|
6859
|
-
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
6860
|
-
if (cmp !== 0 || onlyCompareOriginal) {
|
|
6861
|
-
return cmp;
|
|
6862
|
-
}
|
|
6863
|
-
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
6864
|
-
if (cmp !== 0) {
|
|
6865
|
-
return cmp;
|
|
6866
|
-
}
|
|
6867
|
-
cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
6868
|
-
if (cmp !== 0) {
|
|
6869
|
-
return cmp;
|
|
6870
|
-
}
|
|
6871
|
-
return strcmp(mappingA.name, mappingB.name);
|
|
6872
|
-
}
|
|
6873
|
-
exports.compareByOriginalPositions = compareByOriginalPositions;
|
|
6874
|
-
function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
|
|
6875
|
-
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
6876
|
-
if (cmp !== 0) {
|
|
6877
|
-
return cmp;
|
|
6878
|
-
}
|
|
6879
|
-
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
6880
|
-
if (cmp !== 0 || onlyCompareGenerated) {
|
|
6881
|
-
return cmp;
|
|
6882
|
-
}
|
|
6883
|
-
cmp = strcmp(mappingA.source, mappingB.source);
|
|
6884
|
-
if (cmp !== 0) {
|
|
6885
|
-
return cmp;
|
|
6886
|
-
}
|
|
6887
|
-
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
6888
|
-
if (cmp !== 0) {
|
|
6889
|
-
return cmp;
|
|
6890
|
-
}
|
|
6891
|
-
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
6892
|
-
if (cmp !== 0) {
|
|
6893
|
-
return cmp;
|
|
6894
|
-
}
|
|
6895
|
-
return strcmp(mappingA.name, mappingB.name);
|
|
6896
|
-
}
|
|
6897
|
-
exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
|
|
6898
|
-
function strcmp(aStr1, aStr2) {
|
|
6899
|
-
if (aStr1 === aStr2) {
|
|
6900
|
-
return 0;
|
|
6901
|
-
}
|
|
6902
|
-
if (aStr1 === null) {
|
|
6903
|
-
return 1;
|
|
6904
|
-
}
|
|
6905
|
-
if (aStr2 === null) {
|
|
6906
|
-
return -1;
|
|
6907
|
-
}
|
|
6908
|
-
if (aStr1 > aStr2) {
|
|
6909
|
-
return 1;
|
|
6910
|
-
}
|
|
6911
|
-
return -1;
|
|
6912
|
-
}
|
|
6913
|
-
function compareByGeneratedPositionsInflated(mappingA, mappingB) {
|
|
6914
|
-
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
6915
|
-
if (cmp !== 0) {
|
|
6916
|
-
return cmp;
|
|
6917
|
-
}
|
|
6918
|
-
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
6919
|
-
if (cmp !== 0) {
|
|
6920
|
-
return cmp;
|
|
6921
|
-
}
|
|
6922
|
-
cmp = strcmp(mappingA.source, mappingB.source);
|
|
6923
|
-
if (cmp !== 0) {
|
|
6924
|
-
return cmp;
|
|
6925
|
-
}
|
|
6926
|
-
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
6927
|
-
if (cmp !== 0) {
|
|
6928
|
-
return cmp;
|
|
6929
|
-
}
|
|
6930
|
-
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
6931
|
-
if (cmp !== 0) {
|
|
6932
|
-
return cmp;
|
|
6933
|
-
}
|
|
6934
|
-
return strcmp(mappingA.name, mappingB.name);
|
|
6935
|
-
}
|
|
6936
|
-
exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
|
|
6937
|
-
function parseSourceMapInput(str) {
|
|
6938
|
-
return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
|
|
6939
|
-
}
|
|
6940
|
-
exports.parseSourceMapInput = parseSourceMapInput;
|
|
6941
|
-
function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
|
|
6942
|
-
sourceURL = sourceURL || "";
|
|
6943
|
-
if (sourceRoot) {
|
|
6944
|
-
if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") {
|
|
6945
|
-
sourceRoot += "/";
|
|
6946
|
-
}
|
|
6947
|
-
sourceURL = sourceRoot + sourceURL;
|
|
6948
|
-
}
|
|
6949
|
-
if (sourceMapURL) {
|
|
6950
|
-
var parsed = urlParse(sourceMapURL);
|
|
6951
|
-
if (!parsed) {
|
|
6952
|
-
throw new Error("sourceMapURL could not be parsed");
|
|
6953
|
-
}
|
|
6954
|
-
if (parsed.path) {
|
|
6955
|
-
var index = parsed.path.lastIndexOf("/");
|
|
6956
|
-
if (index >= 0) {
|
|
6957
|
-
parsed.path = parsed.path.substring(0, index + 1);
|
|
6958
|
-
}
|
|
6959
|
-
}
|
|
6960
|
-
sourceURL = join2(urlGenerate(parsed), sourceURL);
|
|
6961
|
-
}
|
|
6962
|
-
return normalize(sourceURL);
|
|
6963
|
-
}
|
|
6964
|
-
exports.computeSourceURL = computeSourceURL;
|
|
6965
|
-
}
|
|
6966
|
-
});
|
|
6967
|
-
|
|
6968
|
-
// ../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/array-set.js
|
|
6969
|
-
var require_array_set = __commonJS({
|
|
6970
|
-
"../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/array-set.js"(exports) {
|
|
6971
|
-
var util = require_util2();
|
|
6972
|
-
var has = Object.prototype.hasOwnProperty;
|
|
6973
|
-
var hasNativeMap = typeof Map !== "undefined";
|
|
6974
|
-
function ArraySet() {
|
|
6975
|
-
this._array = [];
|
|
6976
|
-
this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
|
6977
|
-
}
|
|
6978
|
-
ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
|
|
6979
|
-
var set = new ArraySet();
|
|
6980
|
-
for (var i = 0, len = aArray.length; i < len; i++) {
|
|
6981
|
-
set.add(aArray[i], aAllowDuplicates);
|
|
6982
|
-
}
|
|
6983
|
-
return set;
|
|
6984
|
-
};
|
|
6985
|
-
ArraySet.prototype.size = function ArraySet_size() {
|
|
6986
|
-
return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
|
|
6987
|
-
};
|
|
6988
|
-
ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
|
|
6989
|
-
var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
|
|
6990
|
-
var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
|
|
6991
|
-
var idx = this._array.length;
|
|
6992
|
-
if (!isDuplicate || aAllowDuplicates) {
|
|
6993
|
-
this._array.push(aStr);
|
|
6994
|
-
}
|
|
6995
|
-
if (!isDuplicate) {
|
|
6996
|
-
if (hasNativeMap) {
|
|
6997
|
-
this._set.set(aStr, idx);
|
|
6998
|
-
} else {
|
|
6999
|
-
this._set[sStr] = idx;
|
|
7000
|
-
}
|
|
7001
|
-
}
|
|
7002
|
-
};
|
|
7003
|
-
ArraySet.prototype.has = function ArraySet_has(aStr) {
|
|
7004
|
-
if (hasNativeMap) {
|
|
7005
|
-
return this._set.has(aStr);
|
|
7006
|
-
} else {
|
|
7007
|
-
var sStr = util.toSetString(aStr);
|
|
7008
|
-
return has.call(this._set, sStr);
|
|
7009
|
-
}
|
|
7010
|
-
};
|
|
7011
|
-
ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
|
|
7012
|
-
if (hasNativeMap) {
|
|
7013
|
-
var idx = this._set.get(aStr);
|
|
7014
|
-
if (idx >= 0) {
|
|
7015
|
-
return idx;
|
|
7016
|
-
}
|
|
7017
|
-
} else {
|
|
7018
|
-
var sStr = util.toSetString(aStr);
|
|
7019
|
-
if (has.call(this._set, sStr)) {
|
|
7020
|
-
return this._set[sStr];
|
|
7021
|
-
}
|
|
7022
|
-
}
|
|
7023
|
-
throw new Error('"' + aStr + '" is not in the set.');
|
|
7024
|
-
};
|
|
7025
|
-
ArraySet.prototype.at = function ArraySet_at(aIdx) {
|
|
7026
|
-
if (aIdx >= 0 && aIdx < this._array.length) {
|
|
7027
|
-
return this._array[aIdx];
|
|
7028
|
-
}
|
|
7029
|
-
throw new Error("No element indexed by " + aIdx);
|
|
7030
|
-
};
|
|
7031
|
-
ArraySet.prototype.toArray = function ArraySet_toArray() {
|
|
7032
|
-
return this._array.slice();
|
|
7033
|
-
};
|
|
7034
|
-
exports.ArraySet = ArraySet;
|
|
7035
|
-
}
|
|
7036
|
-
});
|
|
7037
|
-
|
|
7038
|
-
// ../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/mapping-list.js
|
|
7039
|
-
var require_mapping_list = __commonJS({
|
|
7040
|
-
"../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/mapping-list.js"(exports) {
|
|
7041
|
-
var util = require_util2();
|
|
7042
|
-
function generatedPositionAfter(mappingA, mappingB) {
|
|
7043
|
-
var lineA = mappingA.generatedLine;
|
|
7044
|
-
var lineB = mappingB.generatedLine;
|
|
7045
|
-
var columnA = mappingA.generatedColumn;
|
|
7046
|
-
var columnB = mappingB.generatedColumn;
|
|
7047
|
-
return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
|
|
7048
|
-
}
|
|
7049
|
-
function MappingList() {
|
|
7050
|
-
this._array = [];
|
|
7051
|
-
this._sorted = true;
|
|
7052
|
-
this._last = { generatedLine: -1, generatedColumn: 0 };
|
|
7053
|
-
}
|
|
7054
|
-
MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
|
|
7055
|
-
this._array.forEach(aCallback, aThisArg);
|
|
7056
|
-
};
|
|
7057
|
-
MappingList.prototype.add = function MappingList_add(aMapping) {
|
|
7058
|
-
if (generatedPositionAfter(this._last, aMapping)) {
|
|
7059
|
-
this._last = aMapping;
|
|
7060
|
-
this._array.push(aMapping);
|
|
7061
|
-
} else {
|
|
7062
|
-
this._sorted = false;
|
|
7063
|
-
this._array.push(aMapping);
|
|
7064
|
-
}
|
|
7065
|
-
};
|
|
7066
|
-
MappingList.prototype.toArray = function MappingList_toArray() {
|
|
7067
|
-
if (!this._sorted) {
|
|
7068
|
-
this._array.sort(util.compareByGeneratedPositionsInflated);
|
|
7069
|
-
this._sorted = true;
|
|
7070
|
-
}
|
|
7071
|
-
return this._array;
|
|
7072
|
-
};
|
|
7073
|
-
exports.MappingList = MappingList;
|
|
7074
|
-
}
|
|
7075
|
-
});
|
|
7076
|
-
|
|
7077
|
-
// ../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/source-map-generator.js
|
|
7078
|
-
var require_source_map_generator = __commonJS({
|
|
7079
|
-
"../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/source-map-generator.js"(exports) {
|
|
7080
|
-
var base64VLQ = require_base64_vlq();
|
|
7081
|
-
var util = require_util2();
|
|
7082
|
-
var ArraySet = require_array_set().ArraySet;
|
|
7083
|
-
var MappingList = require_mapping_list().MappingList;
|
|
7084
|
-
function SourceMapGenerator(aArgs) {
|
|
7085
|
-
if (!aArgs) {
|
|
7086
|
-
aArgs = {};
|
|
7087
|
-
}
|
|
7088
|
-
this._file = util.getArg(aArgs, "file", null);
|
|
7089
|
-
this._sourceRoot = util.getArg(aArgs, "sourceRoot", null);
|
|
7090
|
-
this._skipValidation = util.getArg(aArgs, "skipValidation", false);
|
|
7091
|
-
this._sources = new ArraySet();
|
|
7092
|
-
this._names = new ArraySet();
|
|
7093
|
-
this._mappings = new MappingList();
|
|
7094
|
-
this._sourcesContents = null;
|
|
7095
|
-
}
|
|
7096
|
-
SourceMapGenerator.prototype._version = 3;
|
|
7097
|
-
SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
|
|
7098
|
-
var sourceRoot = aSourceMapConsumer.sourceRoot;
|
|
7099
|
-
var generator = new SourceMapGenerator({
|
|
7100
|
-
file: aSourceMapConsumer.file,
|
|
7101
|
-
sourceRoot
|
|
7102
|
-
});
|
|
7103
|
-
aSourceMapConsumer.eachMapping(function(mapping) {
|
|
7104
|
-
var newMapping = {
|
|
7105
|
-
generated: {
|
|
7106
|
-
line: mapping.generatedLine,
|
|
7107
|
-
column: mapping.generatedColumn
|
|
7108
|
-
}
|
|
7109
|
-
};
|
|
7110
|
-
if (mapping.source != null) {
|
|
7111
|
-
newMapping.source = mapping.source;
|
|
7112
|
-
if (sourceRoot != null) {
|
|
7113
|
-
newMapping.source = util.relative(sourceRoot, newMapping.source);
|
|
7114
|
-
}
|
|
7115
|
-
newMapping.original = {
|
|
7116
|
-
line: mapping.originalLine,
|
|
7117
|
-
column: mapping.originalColumn
|
|
7118
|
-
};
|
|
7119
|
-
if (mapping.name != null) {
|
|
7120
|
-
newMapping.name = mapping.name;
|
|
7121
|
-
}
|
|
7122
|
-
}
|
|
7123
|
-
generator.addMapping(newMapping);
|
|
7124
|
-
});
|
|
7125
|
-
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
|
7126
|
-
var sourceRelative = sourceFile;
|
|
7127
|
-
if (sourceRoot !== null) {
|
|
7128
|
-
sourceRelative = util.relative(sourceRoot, sourceFile);
|
|
7129
|
-
}
|
|
7130
|
-
if (!generator._sources.has(sourceRelative)) {
|
|
7131
|
-
generator._sources.add(sourceRelative);
|
|
7132
|
-
}
|
|
7133
|
-
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
|
7134
|
-
if (content != null) {
|
|
7135
|
-
generator.setSourceContent(sourceFile, content);
|
|
7136
|
-
}
|
|
7137
|
-
});
|
|
7138
|
-
return generator;
|
|
7139
|
-
};
|
|
7140
|
-
SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
|
|
7141
|
-
var generated = util.getArg(aArgs, "generated");
|
|
7142
|
-
var original = util.getArg(aArgs, "original", null);
|
|
7143
|
-
var source = util.getArg(aArgs, "source", null);
|
|
7144
|
-
var name = util.getArg(aArgs, "name", null);
|
|
7145
|
-
if (!this._skipValidation) {
|
|
7146
|
-
this._validateMapping(generated, original, source, name);
|
|
7147
|
-
}
|
|
7148
|
-
if (source != null) {
|
|
7149
|
-
source = String(source);
|
|
7150
|
-
if (!this._sources.has(source)) {
|
|
7151
|
-
this._sources.add(source);
|
|
7152
|
-
}
|
|
7153
|
-
}
|
|
7154
|
-
if (name != null) {
|
|
7155
|
-
name = String(name);
|
|
7156
|
-
if (!this._names.has(name)) {
|
|
7157
|
-
this._names.add(name);
|
|
7158
|
-
}
|
|
7159
|
-
}
|
|
7160
|
-
this._mappings.add({
|
|
7161
|
-
generatedLine: generated.line,
|
|
7162
|
-
generatedColumn: generated.column,
|
|
7163
|
-
originalLine: original != null && original.line,
|
|
7164
|
-
originalColumn: original != null && original.column,
|
|
7165
|
-
source,
|
|
7166
|
-
name
|
|
7167
|
-
});
|
|
7168
|
-
};
|
|
7169
|
-
SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
|
|
7170
|
-
var source = aSourceFile;
|
|
7171
|
-
if (this._sourceRoot != null) {
|
|
7172
|
-
source = util.relative(this._sourceRoot, source);
|
|
7173
|
-
}
|
|
7174
|
-
if (aSourceContent != null) {
|
|
7175
|
-
if (!this._sourcesContents) {
|
|
7176
|
-
this._sourcesContents = /* @__PURE__ */ Object.create(null);
|
|
7177
|
-
}
|
|
7178
|
-
this._sourcesContents[util.toSetString(source)] = aSourceContent;
|
|
7179
|
-
} else if (this._sourcesContents) {
|
|
7180
|
-
delete this._sourcesContents[util.toSetString(source)];
|
|
7181
|
-
if (Object.keys(this._sourcesContents).length === 0) {
|
|
7182
|
-
this._sourcesContents = null;
|
|
7183
|
-
}
|
|
7184
|
-
}
|
|
7185
|
-
};
|
|
7186
|
-
SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
|
|
7187
|
-
var sourceFile = aSourceFile;
|
|
7188
|
-
if (aSourceFile == null) {
|
|
7189
|
-
if (aSourceMapConsumer.file == null) {
|
|
7190
|
-
throw new Error(
|
|
7191
|
-
`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`
|
|
7192
|
-
);
|
|
7193
|
-
}
|
|
7194
|
-
sourceFile = aSourceMapConsumer.file;
|
|
7195
|
-
}
|
|
7196
|
-
var sourceRoot = this._sourceRoot;
|
|
7197
|
-
if (sourceRoot != null) {
|
|
7198
|
-
sourceFile = util.relative(sourceRoot, sourceFile);
|
|
7199
|
-
}
|
|
7200
|
-
var newSources = new ArraySet();
|
|
7201
|
-
var newNames = new ArraySet();
|
|
7202
|
-
this._mappings.unsortedForEach(function(mapping) {
|
|
7203
|
-
if (mapping.source === sourceFile && mapping.originalLine != null) {
|
|
7204
|
-
var original = aSourceMapConsumer.originalPositionFor({
|
|
7205
|
-
line: mapping.originalLine,
|
|
7206
|
-
column: mapping.originalColumn
|
|
7207
|
-
});
|
|
7208
|
-
if (original.source != null) {
|
|
7209
|
-
mapping.source = original.source;
|
|
7210
|
-
if (aSourceMapPath != null) {
|
|
7211
|
-
mapping.source = util.join(aSourceMapPath, mapping.source);
|
|
7212
|
-
}
|
|
7213
|
-
if (sourceRoot != null) {
|
|
7214
|
-
mapping.source = util.relative(sourceRoot, mapping.source);
|
|
7215
|
-
}
|
|
7216
|
-
mapping.originalLine = original.line;
|
|
7217
|
-
mapping.originalColumn = original.column;
|
|
7218
|
-
if (original.name != null) {
|
|
7219
|
-
mapping.name = original.name;
|
|
7220
|
-
}
|
|
7221
|
-
}
|
|
7222
|
-
}
|
|
7223
|
-
var source = mapping.source;
|
|
7224
|
-
if (source != null && !newSources.has(source)) {
|
|
7225
|
-
newSources.add(source);
|
|
7226
|
-
}
|
|
7227
|
-
var name = mapping.name;
|
|
7228
|
-
if (name != null && !newNames.has(name)) {
|
|
7229
|
-
newNames.add(name);
|
|
7230
|
-
}
|
|
7231
|
-
}, this);
|
|
7232
|
-
this._sources = newSources;
|
|
7233
|
-
this._names = newNames;
|
|
7234
|
-
aSourceMapConsumer.sources.forEach(function(sourceFile2) {
|
|
7235
|
-
var content = aSourceMapConsumer.sourceContentFor(sourceFile2);
|
|
7236
|
-
if (content != null) {
|
|
7237
|
-
if (aSourceMapPath != null) {
|
|
7238
|
-
sourceFile2 = util.join(aSourceMapPath, sourceFile2);
|
|
7239
|
-
}
|
|
7240
|
-
if (sourceRoot != null) {
|
|
7241
|
-
sourceFile2 = util.relative(sourceRoot, sourceFile2);
|
|
7242
|
-
}
|
|
7243
|
-
this.setSourceContent(sourceFile2, content);
|
|
7244
|
-
}
|
|
7245
|
-
}, this);
|
|
7246
|
-
};
|
|
7247
|
-
SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
|
|
7248
|
-
if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
|
|
7249
|
-
throw new Error(
|
|
7250
|
-
"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."
|
|
7251
|
-
);
|
|
7252
|
-
}
|
|
7253
|
-
if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
|
|
7254
|
-
return;
|
|
7255
|
-
} else 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) {
|
|
7256
|
-
return;
|
|
7257
|
-
} else {
|
|
7258
|
-
throw new Error("Invalid mapping: " + JSON.stringify({
|
|
7259
|
-
generated: aGenerated,
|
|
7260
|
-
source: aSource,
|
|
7261
|
-
original: aOriginal,
|
|
7262
|
-
name: aName
|
|
7263
|
-
}));
|
|
7264
|
-
}
|
|
7265
|
-
};
|
|
7266
|
-
SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
|
|
7267
|
-
var previousGeneratedColumn = 0;
|
|
7268
|
-
var previousGeneratedLine = 1;
|
|
7269
|
-
var previousOriginalColumn = 0;
|
|
7270
|
-
var previousOriginalLine = 0;
|
|
7271
|
-
var previousName = 0;
|
|
7272
|
-
var previousSource = 0;
|
|
7273
|
-
var result = "";
|
|
7274
|
-
var next;
|
|
7275
|
-
var mapping;
|
|
7276
|
-
var nameIdx;
|
|
7277
|
-
var sourceIdx;
|
|
7278
|
-
var mappings = this._mappings.toArray();
|
|
7279
|
-
for (var i = 0, len = mappings.length; i < len; i++) {
|
|
7280
|
-
mapping = mappings[i];
|
|
7281
|
-
next = "";
|
|
7282
|
-
if (mapping.generatedLine !== previousGeneratedLine) {
|
|
7283
|
-
previousGeneratedColumn = 0;
|
|
7284
|
-
while (mapping.generatedLine !== previousGeneratedLine) {
|
|
7285
|
-
next += ";";
|
|
7286
|
-
previousGeneratedLine++;
|
|
7287
|
-
}
|
|
7288
|
-
} else {
|
|
7289
|
-
if (i > 0) {
|
|
7290
|
-
if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
|
|
7291
|
-
continue;
|
|
7292
|
-
}
|
|
7293
|
-
next += ",";
|
|
7294
|
-
}
|
|
7295
|
-
}
|
|
7296
|
-
next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
|
|
7297
|
-
previousGeneratedColumn = mapping.generatedColumn;
|
|
7298
|
-
if (mapping.source != null) {
|
|
7299
|
-
sourceIdx = this._sources.indexOf(mapping.source);
|
|
7300
|
-
next += base64VLQ.encode(sourceIdx - previousSource);
|
|
7301
|
-
previousSource = sourceIdx;
|
|
7302
|
-
next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
|
|
7303
|
-
previousOriginalLine = mapping.originalLine - 1;
|
|
7304
|
-
next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
|
|
7305
|
-
previousOriginalColumn = mapping.originalColumn;
|
|
7306
|
-
if (mapping.name != null) {
|
|
7307
|
-
nameIdx = this._names.indexOf(mapping.name);
|
|
7308
|
-
next += base64VLQ.encode(nameIdx - previousName);
|
|
7309
|
-
previousName = nameIdx;
|
|
7310
|
-
}
|
|
7311
|
-
}
|
|
7312
|
-
result += next;
|
|
7313
|
-
}
|
|
7314
|
-
return result;
|
|
7315
|
-
};
|
|
7316
|
-
SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
|
|
7317
|
-
return aSources.map(function(source) {
|
|
7318
|
-
if (!this._sourcesContents) {
|
|
7319
|
-
return null;
|
|
7320
|
-
}
|
|
7321
|
-
if (aSourceRoot != null) {
|
|
7322
|
-
source = util.relative(aSourceRoot, source);
|
|
7323
|
-
}
|
|
7324
|
-
var key = util.toSetString(source);
|
|
7325
|
-
return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
|
|
7326
|
-
}, this);
|
|
7327
|
-
};
|
|
7328
|
-
SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
|
|
7329
|
-
var map = {
|
|
7330
|
-
version: this._version,
|
|
7331
|
-
sources: this._sources.toArray(),
|
|
7332
|
-
names: this._names.toArray(),
|
|
7333
|
-
mappings: this._serializeMappings()
|
|
7334
|
-
};
|
|
7335
|
-
if (this._file != null) {
|
|
7336
|
-
map.file = this._file;
|
|
7337
|
-
}
|
|
7338
|
-
if (this._sourceRoot != null) {
|
|
7339
|
-
map.sourceRoot = this._sourceRoot;
|
|
7340
|
-
}
|
|
7341
|
-
if (this._sourcesContents) {
|
|
7342
|
-
map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
|
|
7343
|
-
}
|
|
7344
|
-
return map;
|
|
7345
|
-
};
|
|
7346
|
-
SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
7347
|
-
return JSON.stringify(this.toJSON());
|
|
7348
|
-
};
|
|
7349
|
-
exports.SourceMapGenerator = SourceMapGenerator;
|
|
7350
|
-
}
|
|
7351
|
-
});
|
|
7352
|
-
|
|
7353
|
-
// ../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/binary-search.js
|
|
7354
|
-
var require_binary_search = __commonJS({
|
|
7355
|
-
"../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/binary-search.js"(exports) {
|
|
7356
|
-
exports.GREATEST_LOWER_BOUND = 1;
|
|
7357
|
-
exports.LEAST_UPPER_BOUND = 2;
|
|
7358
|
-
function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
|
|
7359
|
-
var mid = Math.floor((aHigh - aLow) / 2) + aLow;
|
|
7360
|
-
var cmp = aCompare(aNeedle, aHaystack[mid], true);
|
|
7361
|
-
if (cmp === 0) {
|
|
7362
|
-
return mid;
|
|
7363
|
-
} else if (cmp > 0) {
|
|
7364
|
-
if (aHigh - mid > 1) {
|
|
7365
|
-
return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
|
|
7366
|
-
}
|
|
7367
|
-
if (aBias == exports.LEAST_UPPER_BOUND) {
|
|
7368
|
-
return aHigh < aHaystack.length ? aHigh : -1;
|
|
7369
|
-
} else {
|
|
7370
|
-
return mid;
|
|
7371
|
-
}
|
|
7372
|
-
} else {
|
|
7373
|
-
if (mid - aLow > 1) {
|
|
7374
|
-
return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
|
|
7375
|
-
}
|
|
7376
|
-
if (aBias == exports.LEAST_UPPER_BOUND) {
|
|
7377
|
-
return mid;
|
|
7378
|
-
} else {
|
|
7379
|
-
return aLow < 0 ? -1 : aLow;
|
|
7380
|
-
}
|
|
7381
|
-
}
|
|
7382
|
-
}
|
|
7383
|
-
exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
|
|
7384
|
-
if (aHaystack.length === 0) {
|
|
7385
|
-
return -1;
|
|
7386
|
-
}
|
|
7387
|
-
var index = recursiveSearch(
|
|
7388
|
-
-1,
|
|
7389
|
-
aHaystack.length,
|
|
7390
|
-
aNeedle,
|
|
7391
|
-
aHaystack,
|
|
7392
|
-
aCompare,
|
|
7393
|
-
aBias || exports.GREATEST_LOWER_BOUND
|
|
7394
|
-
);
|
|
7395
|
-
if (index < 0) {
|
|
7396
|
-
return -1;
|
|
7397
|
-
}
|
|
7398
|
-
while (index - 1 >= 0) {
|
|
7399
|
-
if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
|
|
7400
|
-
break;
|
|
7401
|
-
}
|
|
7402
|
-
--index;
|
|
7403
|
-
}
|
|
7404
|
-
return index;
|
|
7405
|
-
};
|
|
7406
|
-
}
|
|
7407
|
-
});
|
|
7408
|
-
|
|
7409
|
-
// ../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/quick-sort.js
|
|
7410
|
-
var require_quick_sort = __commonJS({
|
|
7411
|
-
"../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/quick-sort.js"(exports) {
|
|
7412
|
-
function swap(ary, x, y) {
|
|
7413
|
-
var temp = ary[x];
|
|
7414
|
-
ary[x] = ary[y];
|
|
7415
|
-
ary[y] = temp;
|
|
7416
|
-
}
|
|
7417
|
-
function randomIntInRange(low, high) {
|
|
7418
|
-
return Math.round(low + Math.random() * (high - low));
|
|
7419
|
-
}
|
|
7420
|
-
function doQuickSort(ary, comparator, p, r) {
|
|
7421
|
-
if (p < r) {
|
|
7422
|
-
var pivotIndex = randomIntInRange(p, r);
|
|
7423
|
-
var i = p - 1;
|
|
7424
|
-
swap(ary, pivotIndex, r);
|
|
7425
|
-
var pivot = ary[r];
|
|
7426
|
-
for (var j = p; j < r; j++) {
|
|
7427
|
-
if (comparator(ary[j], pivot) <= 0) {
|
|
7428
|
-
i += 1;
|
|
7429
|
-
swap(ary, i, j);
|
|
7430
|
-
}
|
|
7431
|
-
}
|
|
7432
|
-
swap(ary, i + 1, j);
|
|
7433
|
-
var q = i + 1;
|
|
7434
|
-
doQuickSort(ary, comparator, p, q - 1);
|
|
7435
|
-
doQuickSort(ary, comparator, q + 1, r);
|
|
7436
|
-
}
|
|
7437
|
-
}
|
|
7438
|
-
exports.quickSort = function(ary, comparator) {
|
|
7439
|
-
doQuickSort(ary, comparator, 0, ary.length - 1);
|
|
7440
|
-
};
|
|
7441
|
-
}
|
|
7442
|
-
});
|
|
7443
|
-
|
|
7444
|
-
// ../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/source-map-consumer.js
|
|
7445
|
-
var require_source_map_consumer = __commonJS({
|
|
7446
|
-
"../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/source-map-consumer.js"(exports) {
|
|
7447
|
-
var util = require_util2();
|
|
7448
|
-
var binarySearch = require_binary_search();
|
|
7449
|
-
var ArraySet = require_array_set().ArraySet;
|
|
7450
|
-
var base64VLQ = require_base64_vlq();
|
|
7451
|
-
var quickSort = require_quick_sort().quickSort;
|
|
7452
|
-
function SourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
7453
|
-
var sourceMap = aSourceMap;
|
|
7454
|
-
if (typeof aSourceMap === "string") {
|
|
7455
|
-
sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
7456
|
-
}
|
|
7457
|
-
return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
|
|
7458
|
-
}
|
|
7459
|
-
SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
|
|
7460
|
-
return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
|
|
7461
|
-
};
|
|
7462
|
-
SourceMapConsumer.prototype._version = 3;
|
|
7463
|
-
SourceMapConsumer.prototype.__generatedMappings = null;
|
|
7464
|
-
Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", {
|
|
7465
|
-
configurable: true,
|
|
7466
|
-
enumerable: true,
|
|
7467
|
-
get: function() {
|
|
7468
|
-
if (!this.__generatedMappings) {
|
|
7469
|
-
this._parseMappings(this._mappings, this.sourceRoot);
|
|
7470
|
-
}
|
|
7471
|
-
return this.__generatedMappings;
|
|
7472
|
-
}
|
|
7473
|
-
});
|
|
7474
|
-
SourceMapConsumer.prototype.__originalMappings = null;
|
|
7475
|
-
Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", {
|
|
7476
|
-
configurable: true,
|
|
7477
|
-
enumerable: true,
|
|
7478
|
-
get: function() {
|
|
7479
|
-
if (!this.__originalMappings) {
|
|
7480
|
-
this._parseMappings(this._mappings, this.sourceRoot);
|
|
7481
|
-
}
|
|
7482
|
-
return this.__originalMappings;
|
|
7483
|
-
}
|
|
7484
|
-
});
|
|
7485
|
-
SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
|
|
7486
|
-
var c = aStr.charAt(index);
|
|
7487
|
-
return c === ";" || c === ",";
|
|
7488
|
-
};
|
|
7489
|
-
SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
7490
|
-
throw new Error("Subclasses must implement _parseMappings");
|
|
7491
|
-
};
|
|
7492
|
-
SourceMapConsumer.GENERATED_ORDER = 1;
|
|
7493
|
-
SourceMapConsumer.ORIGINAL_ORDER = 2;
|
|
7494
|
-
SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
|
|
7495
|
-
SourceMapConsumer.LEAST_UPPER_BOUND = 2;
|
|
7496
|
-
SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
|
|
7497
|
-
var context = aContext || null;
|
|
7498
|
-
var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
|
|
7499
|
-
var mappings;
|
|
7500
|
-
switch (order) {
|
|
7501
|
-
case SourceMapConsumer.GENERATED_ORDER:
|
|
7502
|
-
mappings = this._generatedMappings;
|
|
7503
|
-
break;
|
|
7504
|
-
case SourceMapConsumer.ORIGINAL_ORDER:
|
|
7505
|
-
mappings = this._originalMappings;
|
|
7506
|
-
break;
|
|
7507
|
-
default:
|
|
7508
|
-
throw new Error("Unknown order of iteration.");
|
|
7509
|
-
}
|
|
7510
|
-
var sourceRoot = this.sourceRoot;
|
|
7511
|
-
mappings.map(function(mapping) {
|
|
7512
|
-
var source = mapping.source === null ? null : this._sources.at(mapping.source);
|
|
7513
|
-
source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);
|
|
7514
|
-
return {
|
|
7515
|
-
source,
|
|
7516
|
-
generatedLine: mapping.generatedLine,
|
|
7517
|
-
generatedColumn: mapping.generatedColumn,
|
|
7518
|
-
originalLine: mapping.originalLine,
|
|
7519
|
-
originalColumn: mapping.originalColumn,
|
|
7520
|
-
name: mapping.name === null ? null : this._names.at(mapping.name)
|
|
7521
|
-
};
|
|
7522
|
-
}, this).forEach(aCallback, context);
|
|
7523
|
-
};
|
|
7524
|
-
SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
|
|
7525
|
-
var line = util.getArg(aArgs, "line");
|
|
7526
|
-
var needle = {
|
|
7527
|
-
source: util.getArg(aArgs, "source"),
|
|
7528
|
-
originalLine: line,
|
|
7529
|
-
originalColumn: util.getArg(aArgs, "column", 0)
|
|
7530
|
-
};
|
|
7531
|
-
needle.source = this._findSourceIndex(needle.source);
|
|
7532
|
-
if (needle.source < 0) {
|
|
7533
|
-
return [];
|
|
7534
|
-
}
|
|
7535
|
-
var mappings = [];
|
|
7536
|
-
var index = this._findMapping(
|
|
7537
|
-
needle,
|
|
7538
|
-
this._originalMappings,
|
|
7539
|
-
"originalLine",
|
|
7540
|
-
"originalColumn",
|
|
7541
|
-
util.compareByOriginalPositions,
|
|
7542
|
-
binarySearch.LEAST_UPPER_BOUND
|
|
7543
|
-
);
|
|
7544
|
-
if (index >= 0) {
|
|
7545
|
-
var mapping = this._originalMappings[index];
|
|
7546
|
-
if (aArgs.column === void 0) {
|
|
7547
|
-
var originalLine = mapping.originalLine;
|
|
7548
|
-
while (mapping && mapping.originalLine === originalLine) {
|
|
7549
|
-
mappings.push({
|
|
7550
|
-
line: util.getArg(mapping, "generatedLine", null),
|
|
7551
|
-
column: util.getArg(mapping, "generatedColumn", null),
|
|
7552
|
-
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
7553
|
-
});
|
|
7554
|
-
mapping = this._originalMappings[++index];
|
|
7555
|
-
}
|
|
7556
|
-
} else {
|
|
7557
|
-
var originalColumn = mapping.originalColumn;
|
|
7558
|
-
while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
|
|
7559
|
-
mappings.push({
|
|
7560
|
-
line: util.getArg(mapping, "generatedLine", null),
|
|
7561
|
-
column: util.getArg(mapping, "generatedColumn", null),
|
|
7562
|
-
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
7563
|
-
});
|
|
7564
|
-
mapping = this._originalMappings[++index];
|
|
7565
|
-
}
|
|
7566
|
-
}
|
|
7567
|
-
}
|
|
7568
|
-
return mappings;
|
|
7569
|
-
};
|
|
7570
|
-
exports.SourceMapConsumer = SourceMapConsumer;
|
|
7571
|
-
function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
7572
|
-
var sourceMap = aSourceMap;
|
|
7573
|
-
if (typeof aSourceMap === "string") {
|
|
7574
|
-
sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
7575
|
-
}
|
|
7576
|
-
var version = util.getArg(sourceMap, "version");
|
|
7577
|
-
var sources = util.getArg(sourceMap, "sources");
|
|
7578
|
-
var names = util.getArg(sourceMap, "names", []);
|
|
7579
|
-
var sourceRoot = util.getArg(sourceMap, "sourceRoot", null);
|
|
7580
|
-
var sourcesContent = util.getArg(sourceMap, "sourcesContent", null);
|
|
7581
|
-
var mappings = util.getArg(sourceMap, "mappings");
|
|
7582
|
-
var file = util.getArg(sourceMap, "file", null);
|
|
7583
|
-
if (version != this._version) {
|
|
7584
|
-
throw new Error("Unsupported version: " + version);
|
|
7585
|
-
}
|
|
7586
|
-
if (sourceRoot) {
|
|
7587
|
-
sourceRoot = util.normalize(sourceRoot);
|
|
7588
|
-
}
|
|
7589
|
-
sources = sources.map(String).map(util.normalize).map(function(source) {
|
|
7590
|
-
return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source;
|
|
7591
|
-
});
|
|
7592
|
-
this._names = ArraySet.fromArray(names.map(String), true);
|
|
7593
|
-
this._sources = ArraySet.fromArray(sources, true);
|
|
7594
|
-
this._absoluteSources = this._sources.toArray().map(function(s) {
|
|
7595
|
-
return util.computeSourceURL(sourceRoot, s, aSourceMapURL);
|
|
7596
|
-
});
|
|
7597
|
-
this.sourceRoot = sourceRoot;
|
|
7598
|
-
this.sourcesContent = sourcesContent;
|
|
7599
|
-
this._mappings = mappings;
|
|
7600
|
-
this._sourceMapURL = aSourceMapURL;
|
|
7601
|
-
this.file = file;
|
|
7602
|
-
}
|
|
7603
|
-
BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
|
|
7604
|
-
BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
|
|
7605
|
-
BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
|
|
7606
|
-
var relativeSource = aSource;
|
|
7607
|
-
if (this.sourceRoot != null) {
|
|
7608
|
-
relativeSource = util.relative(this.sourceRoot, relativeSource);
|
|
7609
|
-
}
|
|
7610
|
-
if (this._sources.has(relativeSource)) {
|
|
7611
|
-
return this._sources.indexOf(relativeSource);
|
|
7612
|
-
}
|
|
7613
|
-
var i;
|
|
7614
|
-
for (i = 0; i < this._absoluteSources.length; ++i) {
|
|
7615
|
-
if (this._absoluteSources[i] == aSource) {
|
|
7616
|
-
return i;
|
|
7617
|
-
}
|
|
7618
|
-
}
|
|
7619
|
-
return -1;
|
|
7620
|
-
};
|
|
7621
|
-
BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
|
|
7622
|
-
var smc = Object.create(BasicSourceMapConsumer.prototype);
|
|
7623
|
-
var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
|
|
7624
|
-
var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
|
|
7625
|
-
smc.sourceRoot = aSourceMap._sourceRoot;
|
|
7626
|
-
smc.sourcesContent = aSourceMap._generateSourcesContent(
|
|
7627
|
-
smc._sources.toArray(),
|
|
7628
|
-
smc.sourceRoot
|
|
7629
|
-
);
|
|
7630
|
-
smc.file = aSourceMap._file;
|
|
7631
|
-
smc._sourceMapURL = aSourceMapURL;
|
|
7632
|
-
smc._absoluteSources = smc._sources.toArray().map(function(s) {
|
|
7633
|
-
return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
|
|
7634
|
-
});
|
|
7635
|
-
var generatedMappings = aSourceMap._mappings.toArray().slice();
|
|
7636
|
-
var destGeneratedMappings = smc.__generatedMappings = [];
|
|
7637
|
-
var destOriginalMappings = smc.__originalMappings = [];
|
|
7638
|
-
for (var i = 0, length = generatedMappings.length; i < length; i++) {
|
|
7639
|
-
var srcMapping = generatedMappings[i];
|
|
7640
|
-
var destMapping = new Mapping();
|
|
7641
|
-
destMapping.generatedLine = srcMapping.generatedLine;
|
|
7642
|
-
destMapping.generatedColumn = srcMapping.generatedColumn;
|
|
7643
|
-
if (srcMapping.source) {
|
|
7644
|
-
destMapping.source = sources.indexOf(srcMapping.source);
|
|
7645
|
-
destMapping.originalLine = srcMapping.originalLine;
|
|
7646
|
-
destMapping.originalColumn = srcMapping.originalColumn;
|
|
7647
|
-
if (srcMapping.name) {
|
|
7648
|
-
destMapping.name = names.indexOf(srcMapping.name);
|
|
7649
|
-
}
|
|
7650
|
-
destOriginalMappings.push(destMapping);
|
|
7651
|
-
}
|
|
7652
|
-
destGeneratedMappings.push(destMapping);
|
|
7653
|
-
}
|
|
7654
|
-
quickSort(smc.__originalMappings, util.compareByOriginalPositions);
|
|
7655
|
-
return smc;
|
|
7656
|
-
};
|
|
7657
|
-
BasicSourceMapConsumer.prototype._version = 3;
|
|
7658
|
-
Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", {
|
|
7659
|
-
get: function() {
|
|
7660
|
-
return this._absoluteSources.slice();
|
|
7661
|
-
}
|
|
7662
|
-
});
|
|
7663
|
-
function Mapping() {
|
|
7664
|
-
this.generatedLine = 0;
|
|
7665
|
-
this.generatedColumn = 0;
|
|
7666
|
-
this.source = null;
|
|
7667
|
-
this.originalLine = null;
|
|
7668
|
-
this.originalColumn = null;
|
|
7669
|
-
this.name = null;
|
|
7670
|
-
}
|
|
7671
|
-
BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
7672
|
-
var generatedLine = 1;
|
|
7673
|
-
var previousGeneratedColumn = 0;
|
|
7674
|
-
var previousOriginalLine = 0;
|
|
7675
|
-
var previousOriginalColumn = 0;
|
|
7676
|
-
var previousSource = 0;
|
|
7677
|
-
var previousName = 0;
|
|
7678
|
-
var length = aStr.length;
|
|
7679
|
-
var index = 0;
|
|
7680
|
-
var cachedSegments = {};
|
|
7681
|
-
var temp = {};
|
|
7682
|
-
var originalMappings = [];
|
|
7683
|
-
var generatedMappings = [];
|
|
7684
|
-
var mapping, str, segment, end, value;
|
|
7685
|
-
while (index < length) {
|
|
7686
|
-
if (aStr.charAt(index) === ";") {
|
|
7687
|
-
generatedLine++;
|
|
7688
|
-
index++;
|
|
7689
|
-
previousGeneratedColumn = 0;
|
|
7690
|
-
} else if (aStr.charAt(index) === ",") {
|
|
7691
|
-
index++;
|
|
7692
|
-
} else {
|
|
7693
|
-
mapping = new Mapping();
|
|
7694
|
-
mapping.generatedLine = generatedLine;
|
|
7695
|
-
for (end = index; end < length; end++) {
|
|
7696
|
-
if (this._charIsMappingSeparator(aStr, end)) {
|
|
7697
|
-
break;
|
|
7698
|
-
}
|
|
7699
|
-
}
|
|
7700
|
-
str = aStr.slice(index, end);
|
|
7701
|
-
segment = cachedSegments[str];
|
|
7702
|
-
if (segment) {
|
|
7703
|
-
index += str.length;
|
|
7704
|
-
} else {
|
|
7705
|
-
segment = [];
|
|
7706
|
-
while (index < end) {
|
|
7707
|
-
base64VLQ.decode(aStr, index, temp);
|
|
7708
|
-
value = temp.value;
|
|
7709
|
-
index = temp.rest;
|
|
7710
|
-
segment.push(value);
|
|
7711
|
-
}
|
|
7712
|
-
if (segment.length === 2) {
|
|
7713
|
-
throw new Error("Found a source, but no line and column");
|
|
7714
|
-
}
|
|
7715
|
-
if (segment.length === 3) {
|
|
7716
|
-
throw new Error("Found a source and line, but no column");
|
|
7717
|
-
}
|
|
7718
|
-
cachedSegments[str] = segment;
|
|
7719
|
-
}
|
|
7720
|
-
mapping.generatedColumn = previousGeneratedColumn + segment[0];
|
|
7721
|
-
previousGeneratedColumn = mapping.generatedColumn;
|
|
7722
|
-
if (segment.length > 1) {
|
|
7723
|
-
mapping.source = previousSource + segment[1];
|
|
7724
|
-
previousSource += segment[1];
|
|
7725
|
-
mapping.originalLine = previousOriginalLine + segment[2];
|
|
7726
|
-
previousOriginalLine = mapping.originalLine;
|
|
7727
|
-
mapping.originalLine += 1;
|
|
7728
|
-
mapping.originalColumn = previousOriginalColumn + segment[3];
|
|
7729
|
-
previousOriginalColumn = mapping.originalColumn;
|
|
7730
|
-
if (segment.length > 4) {
|
|
7731
|
-
mapping.name = previousName + segment[4];
|
|
7732
|
-
previousName += segment[4];
|
|
7733
|
-
}
|
|
7734
|
-
}
|
|
7735
|
-
generatedMappings.push(mapping);
|
|
7736
|
-
if (typeof mapping.originalLine === "number") {
|
|
7737
|
-
originalMappings.push(mapping);
|
|
7738
|
-
}
|
|
7739
|
-
}
|
|
7740
|
-
}
|
|
7741
|
-
quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
|
|
7742
|
-
this.__generatedMappings = generatedMappings;
|
|
7743
|
-
quickSort(originalMappings, util.compareByOriginalPositions);
|
|
7744
|
-
this.__originalMappings = originalMappings;
|
|
7745
|
-
};
|
|
7746
|
-
BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
|
|
7747
|
-
if (aNeedle[aLineName] <= 0) {
|
|
7748
|
-
throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]);
|
|
7749
|
-
}
|
|
7750
|
-
if (aNeedle[aColumnName] < 0) {
|
|
7751
|
-
throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]);
|
|
7752
|
-
}
|
|
7753
|
-
return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
|
|
7754
|
-
};
|
|
7755
|
-
BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
|
|
7756
|
-
for (var index = 0; index < this._generatedMappings.length; ++index) {
|
|
7757
|
-
var mapping = this._generatedMappings[index];
|
|
7758
|
-
if (index + 1 < this._generatedMappings.length) {
|
|
7759
|
-
var nextMapping = this._generatedMappings[index + 1];
|
|
7760
|
-
if (mapping.generatedLine === nextMapping.generatedLine) {
|
|
7761
|
-
mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
|
|
7762
|
-
continue;
|
|
7763
|
-
}
|
|
7764
|
-
}
|
|
7765
|
-
mapping.lastGeneratedColumn = Infinity;
|
|
7766
|
-
}
|
|
7767
|
-
};
|
|
7768
|
-
BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
|
|
7769
|
-
var needle = {
|
|
7770
|
-
generatedLine: util.getArg(aArgs, "line"),
|
|
7771
|
-
generatedColumn: util.getArg(aArgs, "column")
|
|
7772
|
-
};
|
|
7773
|
-
var index = this._findMapping(
|
|
7774
|
-
needle,
|
|
7775
|
-
this._generatedMappings,
|
|
7776
|
-
"generatedLine",
|
|
7777
|
-
"generatedColumn",
|
|
7778
|
-
util.compareByGeneratedPositionsDeflated,
|
|
7779
|
-
util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
|
|
7780
|
-
);
|
|
7781
|
-
if (index >= 0) {
|
|
7782
|
-
var mapping = this._generatedMappings[index];
|
|
7783
|
-
if (mapping.generatedLine === needle.generatedLine) {
|
|
7784
|
-
var source = util.getArg(mapping, "source", null);
|
|
7785
|
-
if (source !== null) {
|
|
7786
|
-
source = this._sources.at(source);
|
|
7787
|
-
source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
|
|
7788
|
-
}
|
|
7789
|
-
var name = util.getArg(mapping, "name", null);
|
|
7790
|
-
if (name !== null) {
|
|
7791
|
-
name = this._names.at(name);
|
|
7792
|
-
}
|
|
7793
|
-
return {
|
|
7794
|
-
source,
|
|
7795
|
-
line: util.getArg(mapping, "originalLine", null),
|
|
7796
|
-
column: util.getArg(mapping, "originalColumn", null),
|
|
7797
|
-
name
|
|
7798
|
-
};
|
|
7799
|
-
}
|
|
7800
|
-
}
|
|
7801
|
-
return {
|
|
7802
|
-
source: null,
|
|
7803
|
-
line: null,
|
|
7804
|
-
column: null,
|
|
7805
|
-
name: null
|
|
7806
|
-
};
|
|
7807
|
-
};
|
|
7808
|
-
BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
|
|
7809
|
-
if (!this.sourcesContent) {
|
|
7810
|
-
return false;
|
|
7811
|
-
}
|
|
7812
|
-
return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) {
|
|
7813
|
-
return sc == null;
|
|
7814
|
-
});
|
|
7815
|
-
};
|
|
7816
|
-
BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
|
|
7817
|
-
if (!this.sourcesContent) {
|
|
7818
|
-
return null;
|
|
7819
|
-
}
|
|
7820
|
-
var index = this._findSourceIndex(aSource);
|
|
7821
|
-
if (index >= 0) {
|
|
7822
|
-
return this.sourcesContent[index];
|
|
7823
|
-
}
|
|
7824
|
-
var relativeSource = aSource;
|
|
7825
|
-
if (this.sourceRoot != null) {
|
|
7826
|
-
relativeSource = util.relative(this.sourceRoot, relativeSource);
|
|
7827
|
-
}
|
|
7828
|
-
var url;
|
|
7829
|
-
if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) {
|
|
7830
|
-
var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
|
|
7831
|
-
if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
|
|
7832
|
-
return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
|
|
7833
|
-
}
|
|
7834
|
-
if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) {
|
|
7835
|
-
return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
|
|
7836
|
-
}
|
|
7837
|
-
}
|
|
7838
|
-
if (nullOnMissing) {
|
|
7839
|
-
return null;
|
|
7840
|
-
} else {
|
|
7841
|
-
throw new Error('"' + relativeSource + '" is not in the SourceMap.');
|
|
7842
|
-
}
|
|
7843
|
-
};
|
|
7844
|
-
BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
|
|
7845
|
-
var source = util.getArg(aArgs, "source");
|
|
7846
|
-
source = this._findSourceIndex(source);
|
|
7847
|
-
if (source < 0) {
|
|
7848
|
-
return {
|
|
7849
|
-
line: null,
|
|
7850
|
-
column: null,
|
|
7851
|
-
lastColumn: null
|
|
7852
|
-
};
|
|
7853
|
-
}
|
|
7854
|
-
var needle = {
|
|
7855
|
-
source,
|
|
7856
|
-
originalLine: util.getArg(aArgs, "line"),
|
|
7857
|
-
originalColumn: util.getArg(aArgs, "column")
|
|
7858
|
-
};
|
|
7859
|
-
var index = this._findMapping(
|
|
7860
|
-
needle,
|
|
7861
|
-
this._originalMappings,
|
|
7862
|
-
"originalLine",
|
|
7863
|
-
"originalColumn",
|
|
7864
|
-
util.compareByOriginalPositions,
|
|
7865
|
-
util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
|
|
7866
|
-
);
|
|
7867
|
-
if (index >= 0) {
|
|
7868
|
-
var mapping = this._originalMappings[index];
|
|
7869
|
-
if (mapping.source === needle.source) {
|
|
7870
|
-
return {
|
|
7871
|
-
line: util.getArg(mapping, "generatedLine", null),
|
|
7872
|
-
column: util.getArg(mapping, "generatedColumn", null),
|
|
7873
|
-
lastColumn: util.getArg(mapping, "lastGeneratedColumn", null)
|
|
7874
|
-
};
|
|
7875
|
-
}
|
|
7876
|
-
}
|
|
7877
|
-
return {
|
|
7878
|
-
line: null,
|
|
7879
|
-
column: null,
|
|
7880
|
-
lastColumn: null
|
|
7881
|
-
};
|
|
7882
|
-
};
|
|
7883
|
-
exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
|
|
7884
|
-
function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
|
|
7885
|
-
var sourceMap = aSourceMap;
|
|
7886
|
-
if (typeof aSourceMap === "string") {
|
|
7887
|
-
sourceMap = util.parseSourceMapInput(aSourceMap);
|
|
7888
|
-
}
|
|
7889
|
-
var version = util.getArg(sourceMap, "version");
|
|
7890
|
-
var sections = util.getArg(sourceMap, "sections");
|
|
7891
|
-
if (version != this._version) {
|
|
7892
|
-
throw new Error("Unsupported version: " + version);
|
|
7893
|
-
}
|
|
7894
|
-
this._sources = new ArraySet();
|
|
7895
|
-
this._names = new ArraySet();
|
|
7896
|
-
var lastOffset = {
|
|
7897
|
-
line: -1,
|
|
7898
|
-
column: 0
|
|
7899
|
-
};
|
|
7900
|
-
this._sections = sections.map(function(s) {
|
|
7901
|
-
if (s.url) {
|
|
7902
|
-
throw new Error("Support for url field in sections not implemented.");
|
|
7903
|
-
}
|
|
7904
|
-
var offset = util.getArg(s, "offset");
|
|
7905
|
-
var offsetLine = util.getArg(offset, "line");
|
|
7906
|
-
var offsetColumn = util.getArg(offset, "column");
|
|
7907
|
-
if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
|
|
7908
|
-
throw new Error("Section offsets must be ordered and non-overlapping.");
|
|
7909
|
-
}
|
|
7910
|
-
lastOffset = offset;
|
|
7911
|
-
return {
|
|
7912
|
-
generatedOffset: {
|
|
7913
|
-
generatedLine: offsetLine + 1,
|
|
7914
|
-
generatedColumn: offsetColumn + 1
|
|
7915
|
-
},
|
|
7916
|
-
consumer: new SourceMapConsumer(util.getArg(s, "map"), aSourceMapURL)
|
|
7917
|
-
};
|
|
7918
|
-
});
|
|
7919
|
-
}
|
|
7920
|
-
IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
|
|
7921
|
-
IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
|
|
7922
|
-
IndexedSourceMapConsumer.prototype._version = 3;
|
|
7923
|
-
Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", {
|
|
7924
|
-
get: function() {
|
|
7925
|
-
var sources = [];
|
|
7926
|
-
for (var i = 0; i < this._sections.length; i++) {
|
|
7927
|
-
for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
|
|
7928
|
-
sources.push(this._sections[i].consumer.sources[j]);
|
|
7929
|
-
}
|
|
7930
|
-
}
|
|
7931
|
-
return sources;
|
|
7932
|
-
}
|
|
7933
|
-
});
|
|
7934
|
-
IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
|
|
7935
|
-
var needle = {
|
|
7936
|
-
generatedLine: util.getArg(aArgs, "line"),
|
|
7937
|
-
generatedColumn: util.getArg(aArgs, "column")
|
|
7938
|
-
};
|
|
7939
|
-
var sectionIndex = binarySearch.search(
|
|
7940
|
-
needle,
|
|
7941
|
-
this._sections,
|
|
7942
|
-
function(needle2, section2) {
|
|
7943
|
-
var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine;
|
|
7944
|
-
if (cmp) {
|
|
7945
|
-
return cmp;
|
|
7946
|
-
}
|
|
7947
|
-
return needle2.generatedColumn - section2.generatedOffset.generatedColumn;
|
|
7948
|
-
}
|
|
7949
|
-
);
|
|
7950
|
-
var section = this._sections[sectionIndex];
|
|
7951
|
-
if (!section) {
|
|
7952
|
-
return {
|
|
7953
|
-
source: null,
|
|
7954
|
-
line: null,
|
|
7955
|
-
column: null,
|
|
7956
|
-
name: null
|
|
7957
|
-
};
|
|
7958
|
-
}
|
|
7959
|
-
return section.consumer.originalPositionFor({
|
|
7960
|
-
line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
|
|
7961
|
-
column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
|
|
7962
|
-
bias: aArgs.bias
|
|
7963
|
-
});
|
|
7964
|
-
};
|
|
7965
|
-
IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
|
|
7966
|
-
return this._sections.every(function(s) {
|
|
7967
|
-
return s.consumer.hasContentsOfAllSources();
|
|
7968
|
-
});
|
|
7969
|
-
};
|
|
7970
|
-
IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
|
|
7971
|
-
for (var i = 0; i < this._sections.length; i++) {
|
|
7972
|
-
var section = this._sections[i];
|
|
7973
|
-
var content = section.consumer.sourceContentFor(aSource, true);
|
|
7974
|
-
if (content) {
|
|
7975
|
-
return content;
|
|
7976
|
-
}
|
|
7977
|
-
}
|
|
7978
|
-
if (nullOnMissing) {
|
|
7979
|
-
return null;
|
|
7980
|
-
} else {
|
|
7981
|
-
throw new Error('"' + aSource + '" is not in the SourceMap.');
|
|
7982
|
-
}
|
|
7983
|
-
};
|
|
7984
|
-
IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
|
|
7985
|
-
for (var i = 0; i < this._sections.length; i++) {
|
|
7986
|
-
var section = this._sections[i];
|
|
7987
|
-
if (section.consumer._findSourceIndex(util.getArg(aArgs, "source")) === -1) {
|
|
7988
|
-
continue;
|
|
7989
|
-
}
|
|
7990
|
-
var generatedPosition = section.consumer.generatedPositionFor(aArgs);
|
|
7991
|
-
if (generatedPosition) {
|
|
7992
|
-
var ret = {
|
|
7993
|
-
line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
|
|
7994
|
-
column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
|
|
7995
|
-
};
|
|
7996
|
-
return ret;
|
|
7997
|
-
}
|
|
7998
|
-
}
|
|
7999
|
-
return {
|
|
8000
|
-
line: null,
|
|
8001
|
-
column: null
|
|
8002
|
-
};
|
|
8003
|
-
};
|
|
8004
|
-
IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
|
|
8005
|
-
this.__generatedMappings = [];
|
|
8006
|
-
this.__originalMappings = [];
|
|
8007
|
-
for (var i = 0; i < this._sections.length; i++) {
|
|
8008
|
-
var section = this._sections[i];
|
|
8009
|
-
var sectionMappings = section.consumer._generatedMappings;
|
|
8010
|
-
for (var j = 0; j < sectionMappings.length; j++) {
|
|
8011
|
-
var mapping = sectionMappings[j];
|
|
8012
|
-
var source = section.consumer._sources.at(mapping.source);
|
|
8013
|
-
source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
|
|
8014
|
-
this._sources.add(source);
|
|
8015
|
-
source = this._sources.indexOf(source);
|
|
8016
|
-
var name = null;
|
|
8017
|
-
if (mapping.name) {
|
|
8018
|
-
name = section.consumer._names.at(mapping.name);
|
|
8019
|
-
this._names.add(name);
|
|
8020
|
-
name = this._names.indexOf(name);
|
|
8021
|
-
}
|
|
8022
|
-
var adjustedMapping = {
|
|
8023
|
-
source,
|
|
8024
|
-
generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
|
|
8025
|
-
generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
|
|
8026
|
-
originalLine: mapping.originalLine,
|
|
8027
|
-
originalColumn: mapping.originalColumn,
|
|
8028
|
-
name
|
|
8029
|
-
};
|
|
8030
|
-
this.__generatedMappings.push(adjustedMapping);
|
|
8031
|
-
if (typeof adjustedMapping.originalLine === "number") {
|
|
8032
|
-
this.__originalMappings.push(adjustedMapping);
|
|
8033
|
-
}
|
|
8034
|
-
}
|
|
8035
|
-
}
|
|
8036
|
-
quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
|
|
8037
|
-
quickSort(this.__originalMappings, util.compareByOriginalPositions);
|
|
8038
|
-
};
|
|
8039
|
-
exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
|
|
8040
|
-
}
|
|
8041
|
-
});
|
|
8042
|
-
|
|
8043
|
-
// ../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/source-node.js
|
|
8044
|
-
var require_source_node = __commonJS({
|
|
8045
|
-
"../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/lib/source-node.js"(exports) {
|
|
8046
|
-
var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
8047
|
-
var util = require_util2();
|
|
8048
|
-
var REGEX_NEWLINE = /(\r?\n)/;
|
|
8049
|
-
var NEWLINE_CODE = 10;
|
|
8050
|
-
var isSourceNode = "$$$isSourceNode$$$";
|
|
8051
|
-
function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
|
|
8052
|
-
this.children = [];
|
|
8053
|
-
this.sourceContents = {};
|
|
8054
|
-
this.line = aLine == null ? null : aLine;
|
|
8055
|
-
this.column = aColumn == null ? null : aColumn;
|
|
8056
|
-
this.source = aSource == null ? null : aSource;
|
|
8057
|
-
this.name = aName == null ? null : aName;
|
|
8058
|
-
this[isSourceNode] = true;
|
|
8059
|
-
if (aChunks != null)
|
|
8060
|
-
this.add(aChunks);
|
|
8061
|
-
}
|
|
8062
|
-
SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
|
|
8063
|
-
var node = new SourceNode();
|
|
8064
|
-
var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
|
|
8065
|
-
var remainingLinesIndex = 0;
|
|
8066
|
-
var shiftNextLine = function() {
|
|
8067
|
-
var lineContents = getNextLine();
|
|
8068
|
-
var newLine = getNextLine() || "";
|
|
8069
|
-
return lineContents + newLine;
|
|
8070
|
-
function getNextLine() {
|
|
8071
|
-
return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0;
|
|
8072
|
-
}
|
|
8073
|
-
};
|
|
8074
|
-
var lastGeneratedLine = 1, lastGeneratedColumn = 0;
|
|
8075
|
-
var lastMapping = null;
|
|
8076
|
-
aSourceMapConsumer.eachMapping(function(mapping) {
|
|
8077
|
-
if (lastMapping !== null) {
|
|
8078
|
-
if (lastGeneratedLine < mapping.generatedLine) {
|
|
8079
|
-
addMappingWithCode(lastMapping, shiftNextLine());
|
|
8080
|
-
lastGeneratedLine++;
|
|
8081
|
-
lastGeneratedColumn = 0;
|
|
8082
|
-
} else {
|
|
8083
|
-
var nextLine = remainingLines[remainingLinesIndex] || "";
|
|
8084
|
-
var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
|
|
8085
|
-
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
|
|
8086
|
-
lastGeneratedColumn = mapping.generatedColumn;
|
|
8087
|
-
addMappingWithCode(lastMapping, code);
|
|
8088
|
-
lastMapping = mapping;
|
|
8089
|
-
return;
|
|
8090
|
-
}
|
|
8091
|
-
}
|
|
8092
|
-
while (lastGeneratedLine < mapping.generatedLine) {
|
|
8093
|
-
node.add(shiftNextLine());
|
|
8094
|
-
lastGeneratedLine++;
|
|
8095
|
-
}
|
|
8096
|
-
if (lastGeneratedColumn < mapping.generatedColumn) {
|
|
8097
|
-
var nextLine = remainingLines[remainingLinesIndex] || "";
|
|
8098
|
-
node.add(nextLine.substr(0, mapping.generatedColumn));
|
|
8099
|
-
remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
|
|
8100
|
-
lastGeneratedColumn = mapping.generatedColumn;
|
|
8101
|
-
}
|
|
8102
|
-
lastMapping = mapping;
|
|
8103
|
-
}, this);
|
|
8104
|
-
if (remainingLinesIndex < remainingLines.length) {
|
|
8105
|
-
if (lastMapping) {
|
|
8106
|
-
addMappingWithCode(lastMapping, shiftNextLine());
|
|
8107
|
-
}
|
|
8108
|
-
node.add(remainingLines.splice(remainingLinesIndex).join(""));
|
|
8109
|
-
}
|
|
8110
|
-
aSourceMapConsumer.sources.forEach(function(sourceFile) {
|
|
8111
|
-
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
|
8112
|
-
if (content != null) {
|
|
8113
|
-
if (aRelativePath != null) {
|
|
8114
|
-
sourceFile = util.join(aRelativePath, sourceFile);
|
|
8115
|
-
}
|
|
8116
|
-
node.setSourceContent(sourceFile, content);
|
|
8117
|
-
}
|
|
8118
|
-
});
|
|
8119
|
-
return node;
|
|
8120
|
-
function addMappingWithCode(mapping, code) {
|
|
8121
|
-
if (mapping === null || mapping.source === void 0) {
|
|
8122
|
-
node.add(code);
|
|
8123
|
-
} else {
|
|
8124
|
-
var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
|
|
8125
|
-
node.add(new SourceNode(
|
|
8126
|
-
mapping.originalLine,
|
|
8127
|
-
mapping.originalColumn,
|
|
8128
|
-
source,
|
|
8129
|
-
code,
|
|
8130
|
-
mapping.name
|
|
8131
|
-
));
|
|
8132
|
-
}
|
|
8133
|
-
}
|
|
8134
|
-
};
|
|
8135
|
-
SourceNode.prototype.add = function SourceNode_add(aChunk) {
|
|
8136
|
-
if (Array.isArray(aChunk)) {
|
|
8137
|
-
aChunk.forEach(function(chunk) {
|
|
8138
|
-
this.add(chunk);
|
|
8139
|
-
}, this);
|
|
8140
|
-
} else if (aChunk[isSourceNode] || typeof aChunk === "string") {
|
|
8141
|
-
if (aChunk) {
|
|
8142
|
-
this.children.push(aChunk);
|
|
8143
|
-
}
|
|
8144
|
-
} else {
|
|
8145
|
-
throw new TypeError(
|
|
8146
|
-
"Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
|
|
8147
|
-
);
|
|
8148
|
-
}
|
|
8149
|
-
return this;
|
|
8150
|
-
};
|
|
8151
|
-
SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
|
|
8152
|
-
if (Array.isArray(aChunk)) {
|
|
8153
|
-
for (var i = aChunk.length - 1; i >= 0; i--) {
|
|
8154
|
-
this.prepend(aChunk[i]);
|
|
8155
|
-
}
|
|
8156
|
-
} else if (aChunk[isSourceNode] || typeof aChunk === "string") {
|
|
8157
|
-
this.children.unshift(aChunk);
|
|
8158
|
-
} else {
|
|
8159
|
-
throw new TypeError(
|
|
8160
|
-
"Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
|
|
8161
|
-
);
|
|
8162
|
-
}
|
|
8163
|
-
return this;
|
|
8164
|
-
};
|
|
8165
|
-
SourceNode.prototype.walk = function SourceNode_walk(aFn) {
|
|
8166
|
-
var chunk;
|
|
8167
|
-
for (var i = 0, len = this.children.length; i < len; i++) {
|
|
8168
|
-
chunk = this.children[i];
|
|
8169
|
-
if (chunk[isSourceNode]) {
|
|
8170
|
-
chunk.walk(aFn);
|
|
8171
|
-
} else {
|
|
8172
|
-
if (chunk !== "") {
|
|
8173
|
-
aFn(chunk, {
|
|
8174
|
-
source: this.source,
|
|
8175
|
-
line: this.line,
|
|
8176
|
-
column: this.column,
|
|
8177
|
-
name: this.name
|
|
8178
|
-
});
|
|
8179
|
-
}
|
|
8180
|
-
}
|
|
8181
|
-
}
|
|
8182
|
-
};
|
|
8183
|
-
SourceNode.prototype.join = function SourceNode_join(aSep) {
|
|
8184
|
-
var newChildren;
|
|
8185
|
-
var i;
|
|
8186
|
-
var len = this.children.length;
|
|
8187
|
-
if (len > 0) {
|
|
8188
|
-
newChildren = [];
|
|
8189
|
-
for (i = 0; i < len - 1; i++) {
|
|
8190
|
-
newChildren.push(this.children[i]);
|
|
8191
|
-
newChildren.push(aSep);
|
|
8192
|
-
}
|
|
8193
|
-
newChildren.push(this.children[i]);
|
|
8194
|
-
this.children = newChildren;
|
|
8195
|
-
}
|
|
8196
|
-
return this;
|
|
8197
|
-
};
|
|
8198
|
-
SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
|
|
8199
|
-
var lastChild = this.children[this.children.length - 1];
|
|
8200
|
-
if (lastChild[isSourceNode]) {
|
|
8201
|
-
lastChild.replaceRight(aPattern, aReplacement);
|
|
8202
|
-
} else if (typeof lastChild === "string") {
|
|
8203
|
-
this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
|
|
8204
|
-
} else {
|
|
8205
|
-
this.children.push("".replace(aPattern, aReplacement));
|
|
8206
|
-
}
|
|
8207
|
-
return this;
|
|
8208
|
-
};
|
|
8209
|
-
SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
|
|
8210
|
-
this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
|
|
8211
|
-
};
|
|
8212
|
-
SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
|
|
8213
|
-
for (var i = 0, len = this.children.length; i < len; i++) {
|
|
8214
|
-
if (this.children[i][isSourceNode]) {
|
|
8215
|
-
this.children[i].walkSourceContents(aFn);
|
|
8216
|
-
}
|
|
8217
|
-
}
|
|
8218
|
-
var sources = Object.keys(this.sourceContents);
|
|
8219
|
-
for (var i = 0, len = sources.length; i < len; i++) {
|
|
8220
|
-
aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
|
|
8221
|
-
}
|
|
8222
|
-
};
|
|
8223
|
-
SourceNode.prototype.toString = function SourceNode_toString() {
|
|
8224
|
-
var str = "";
|
|
8225
|
-
this.walk(function(chunk) {
|
|
8226
|
-
str += chunk;
|
|
8227
|
-
});
|
|
8228
|
-
return str;
|
|
8229
|
-
};
|
|
8230
|
-
SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
|
|
8231
|
-
var generated = {
|
|
8232
|
-
code: "",
|
|
8233
|
-
line: 1,
|
|
8234
|
-
column: 0
|
|
8235
|
-
};
|
|
8236
|
-
var map = new SourceMapGenerator(aArgs);
|
|
8237
|
-
var sourceMappingActive = false;
|
|
8238
|
-
var lastOriginalSource = null;
|
|
8239
|
-
var lastOriginalLine = null;
|
|
8240
|
-
var lastOriginalColumn = null;
|
|
8241
|
-
var lastOriginalName = null;
|
|
8242
|
-
this.walk(function(chunk, original) {
|
|
8243
|
-
generated.code += chunk;
|
|
8244
|
-
if (original.source !== null && original.line !== null && original.column !== null) {
|
|
8245
|
-
if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
|
|
8246
|
-
map.addMapping({
|
|
8247
|
-
source: original.source,
|
|
8248
|
-
original: {
|
|
8249
|
-
line: original.line,
|
|
8250
|
-
column: original.column
|
|
8251
|
-
},
|
|
8252
|
-
generated: {
|
|
8253
|
-
line: generated.line,
|
|
8254
|
-
column: generated.column
|
|
8255
|
-
},
|
|
8256
|
-
name: original.name
|
|
8257
|
-
});
|
|
8258
|
-
}
|
|
8259
|
-
lastOriginalSource = original.source;
|
|
8260
|
-
lastOriginalLine = original.line;
|
|
8261
|
-
lastOriginalColumn = original.column;
|
|
8262
|
-
lastOriginalName = original.name;
|
|
8263
|
-
sourceMappingActive = true;
|
|
8264
|
-
} else if (sourceMappingActive) {
|
|
8265
|
-
map.addMapping({
|
|
8266
|
-
generated: {
|
|
8267
|
-
line: generated.line,
|
|
8268
|
-
column: generated.column
|
|
8269
|
-
}
|
|
8270
|
-
});
|
|
8271
|
-
lastOriginalSource = null;
|
|
8272
|
-
sourceMappingActive = false;
|
|
8273
|
-
}
|
|
8274
|
-
for (var idx = 0, length = chunk.length; idx < length; idx++) {
|
|
8275
|
-
if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
|
|
8276
|
-
generated.line++;
|
|
8277
|
-
generated.column = 0;
|
|
8278
|
-
if (idx + 1 === length) {
|
|
8279
|
-
lastOriginalSource = null;
|
|
8280
|
-
sourceMappingActive = false;
|
|
8281
|
-
} else if (sourceMappingActive) {
|
|
8282
|
-
map.addMapping({
|
|
8283
|
-
source: original.source,
|
|
8284
|
-
original: {
|
|
8285
|
-
line: original.line,
|
|
8286
|
-
column: original.column
|
|
8287
|
-
},
|
|
8288
|
-
generated: {
|
|
8289
|
-
line: generated.line,
|
|
8290
|
-
column: generated.column
|
|
8291
|
-
},
|
|
8292
|
-
name: original.name
|
|
8293
|
-
});
|
|
8294
|
-
}
|
|
8295
|
-
} else {
|
|
8296
|
-
generated.column++;
|
|
8297
|
-
}
|
|
8298
|
-
}
|
|
8299
|
-
});
|
|
8300
|
-
this.walkSourceContents(function(sourceFile, sourceContent) {
|
|
8301
|
-
map.setSourceContent(sourceFile, sourceContent);
|
|
8302
|
-
});
|
|
8303
|
-
return { code: generated.code, map };
|
|
8304
|
-
};
|
|
8305
|
-
exports.SourceNode = SourceNode;
|
|
8306
|
-
}
|
|
8307
|
-
});
|
|
8308
|
-
|
|
8309
|
-
// ../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/source-map.js
|
|
8310
|
-
var require_source_map = __commonJS({
|
|
8311
|
-
"../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/node_modules/source-map/source-map.js"(exports) {
|
|
8312
|
-
exports.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
|
|
8313
|
-
exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
|
|
8314
|
-
exports.SourceNode = require_source_node().SourceNode;
|
|
8315
|
-
}
|
|
8316
|
-
});
|
|
8317
|
-
|
|
8318
|
-
// ../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/buffer-from/index.js
|
|
8319
|
-
var require_buffer_from = __commonJS({
|
|
8320
|
-
"../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/buffer-from/index.js"(exports, module2) {
|
|
8321
|
-
var toString = Object.prototype.toString;
|
|
8322
|
-
var isModern = typeof Buffer.alloc === "function" && typeof Buffer.allocUnsafe === "function" && typeof Buffer.from === "function";
|
|
8323
|
-
function isArrayBuffer(input) {
|
|
8324
|
-
return toString.call(input).slice(8, -1) === "ArrayBuffer";
|
|
8325
|
-
}
|
|
8326
|
-
function fromArrayBuffer(obj, byteOffset, length) {
|
|
8327
|
-
byteOffset >>>= 0;
|
|
8328
|
-
var maxLength = obj.byteLength - byteOffset;
|
|
8329
|
-
if (maxLength < 0) {
|
|
8330
|
-
throw new RangeError("'offset' is out of bounds");
|
|
8331
|
-
}
|
|
8332
|
-
if (length === void 0) {
|
|
8333
|
-
length = maxLength;
|
|
8334
|
-
} else {
|
|
8335
|
-
length >>>= 0;
|
|
8336
|
-
if (length > maxLength) {
|
|
8337
|
-
throw new RangeError("'length' is out of bounds");
|
|
8338
|
-
}
|
|
8339
|
-
}
|
|
8340
|
-
return isModern ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length)));
|
|
8341
|
-
}
|
|
8342
|
-
function fromString(string, encoding) {
|
|
8343
|
-
if (typeof encoding !== "string" || encoding === "") {
|
|
8344
|
-
encoding = "utf8";
|
|
8345
|
-
}
|
|
8346
|
-
if (!Buffer.isEncoding(encoding)) {
|
|
8347
|
-
throw new TypeError('"encoding" must be a valid string encoding');
|
|
8348
|
-
}
|
|
8349
|
-
return isModern ? Buffer.from(string, encoding) : new Buffer(string, encoding);
|
|
8350
|
-
}
|
|
8351
|
-
function bufferFrom(value, encodingOrOffset, length) {
|
|
8352
|
-
if (typeof value === "number") {
|
|
8353
|
-
throw new TypeError('"value" argument must not be a number');
|
|
8354
|
-
}
|
|
8355
|
-
if (isArrayBuffer(value)) {
|
|
8356
|
-
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
8357
|
-
}
|
|
8358
|
-
if (typeof value === "string") {
|
|
8359
|
-
return fromString(value, encodingOrOffset);
|
|
8360
|
-
}
|
|
8361
|
-
return isModern ? Buffer.from(value) : new Buffer(value);
|
|
8362
|
-
}
|
|
8363
|
-
module2.exports = bufferFrom;
|
|
8364
|
-
}
|
|
8365
|
-
});
|
|
8366
|
-
|
|
8367
|
-
// ../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/source-map-support.js
|
|
8368
|
-
var require_source_map_support = __commonJS({
|
|
8369
|
-
"../../../../../../../../../../../../../Users/long.ho/src/formatjs/node_modules/source-map-support/source-map-support.js"(exports) {
|
|
8370
|
-
var SourceMapConsumer = require_source_map().SourceMapConsumer;
|
|
8371
|
-
var path = require("path");
|
|
8372
|
-
var fs;
|
|
8373
|
-
try {
|
|
8374
|
-
fs = require("fs");
|
|
8375
|
-
if (!fs.existsSync || !fs.readFileSync) {
|
|
8376
|
-
fs = null;
|
|
8377
|
-
}
|
|
8378
|
-
} catch (err) {
|
|
8379
|
-
}
|
|
8380
|
-
var bufferFrom = require_buffer_from();
|
|
8381
|
-
var errorFormatterInstalled = false;
|
|
8382
|
-
var uncaughtShimInstalled = false;
|
|
8383
|
-
var emptyCacheBetweenOperations = false;
|
|
8384
|
-
var environment = "auto";
|
|
8385
|
-
var fileContentsCache = {};
|
|
8386
|
-
var sourceMapCache = {};
|
|
8387
|
-
var reSourceMap = /^data:application\/json[^,]+base64,/;
|
|
8388
|
-
var retrieveFileHandlers = [];
|
|
8389
|
-
var retrieveMapHandlers = [];
|
|
8390
|
-
function isInBrowser() {
|
|
8391
|
-
if (environment === "browser")
|
|
8392
|
-
return true;
|
|
8393
|
-
if (environment === "node")
|
|
8394
|
-
return false;
|
|
8395
|
-
return typeof window !== "undefined" && typeof XMLHttpRequest === "function" && !(window.require && window.module && window.process && window.process.type === "renderer");
|
|
8396
|
-
}
|
|
8397
|
-
function hasGlobalProcessEventEmitter() {
|
|
8398
|
-
return typeof process === "object" && process !== null && typeof process.on === "function";
|
|
8399
|
-
}
|
|
8400
|
-
function handlerExec(list) {
|
|
8401
|
-
return function(arg) {
|
|
8402
|
-
for (var i = 0; i < list.length; i++) {
|
|
8403
|
-
var ret = list[i](arg);
|
|
8404
|
-
if (ret) {
|
|
8405
|
-
return ret;
|
|
8406
|
-
}
|
|
8407
|
-
}
|
|
8408
|
-
return null;
|
|
8409
|
-
};
|
|
8410
|
-
}
|
|
8411
|
-
var retrieveFile = handlerExec(retrieveFileHandlers);
|
|
8412
|
-
retrieveFileHandlers.push(function(path2) {
|
|
8413
|
-
path2 = path2.trim();
|
|
8414
|
-
if (/^file:/.test(path2)) {
|
|
8415
|
-
path2 = path2.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
|
|
8416
|
-
return drive ? "" : "/";
|
|
8417
|
-
});
|
|
8418
|
-
}
|
|
8419
|
-
if (path2 in fileContentsCache) {
|
|
8420
|
-
return fileContentsCache[path2];
|
|
8421
|
-
}
|
|
8422
|
-
var contents = "";
|
|
8423
|
-
try {
|
|
8424
|
-
if (!fs) {
|
|
8425
|
-
var xhr = new XMLHttpRequest();
|
|
8426
|
-
xhr.open("GET", path2, false);
|
|
8427
|
-
xhr.send(null);
|
|
8428
|
-
if (xhr.readyState === 4 && xhr.status === 200) {
|
|
8429
|
-
contents = xhr.responseText;
|
|
8430
|
-
}
|
|
8431
|
-
} else if (fs.existsSync(path2)) {
|
|
8432
|
-
contents = fs.readFileSync(path2, "utf8");
|
|
8433
|
-
}
|
|
8434
|
-
} catch (er) {
|
|
8435
|
-
}
|
|
8436
|
-
return fileContentsCache[path2] = contents;
|
|
8437
|
-
});
|
|
8438
|
-
function supportRelativeURL(file, url) {
|
|
8439
|
-
if (!file)
|
|
8440
|
-
return url;
|
|
8441
|
-
var dir = path.dirname(file);
|
|
8442
|
-
var match = /^\w+:\/\/[^\/]*/.exec(dir);
|
|
8443
|
-
var protocol = match ? match[0] : "";
|
|
8444
|
-
var startPath = dir.slice(protocol.length);
|
|
8445
|
-
if (protocol && /^\/\w\:/.test(startPath)) {
|
|
8446
|
-
protocol += "/";
|
|
8447
|
-
return protocol + path.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
|
|
8448
|
-
}
|
|
8449
|
-
return protocol + path.resolve(dir.slice(protocol.length), url);
|
|
8450
|
-
}
|
|
8451
|
-
function retrieveSourceMapURL(source) {
|
|
8452
|
-
var fileData;
|
|
8453
|
-
if (isInBrowser()) {
|
|
8454
|
-
try {
|
|
8455
|
-
var xhr = new XMLHttpRequest();
|
|
8456
|
-
xhr.open("GET", source, false);
|
|
8457
|
-
xhr.send(null);
|
|
8458
|
-
fileData = xhr.readyState === 4 ? xhr.responseText : null;
|
|
8459
|
-
var sourceMapHeader = xhr.getResponseHeader("SourceMap") || xhr.getResponseHeader("X-SourceMap");
|
|
8460
|
-
if (sourceMapHeader) {
|
|
8461
|
-
return sourceMapHeader;
|
|
8462
|
-
}
|
|
8463
|
-
} catch (e) {
|
|
8464
|
-
}
|
|
8465
|
-
}
|
|
8466
|
-
fileData = retrieveFile(source);
|
|
8467
|
-
var re = /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/mg;
|
|
8468
|
-
var lastMatch, match;
|
|
8469
|
-
while (match = re.exec(fileData))
|
|
8470
|
-
lastMatch = match;
|
|
8471
|
-
if (!lastMatch)
|
|
8472
|
-
return null;
|
|
8473
|
-
return lastMatch[1];
|
|
8474
|
-
}
|
|
8475
|
-
var retrieveSourceMap = handlerExec(retrieveMapHandlers);
|
|
8476
|
-
retrieveMapHandlers.push(function(source) {
|
|
8477
|
-
var sourceMappingURL = retrieveSourceMapURL(source);
|
|
8478
|
-
if (!sourceMappingURL)
|
|
8479
|
-
return null;
|
|
8480
|
-
var sourceMapData;
|
|
8481
|
-
if (reSourceMap.test(sourceMappingURL)) {
|
|
8482
|
-
var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(",") + 1);
|
|
8483
|
-
sourceMapData = bufferFrom(rawData, "base64").toString();
|
|
8484
|
-
sourceMappingURL = source;
|
|
8485
|
-
} else {
|
|
8486
|
-
sourceMappingURL = supportRelativeURL(source, sourceMappingURL);
|
|
8487
|
-
sourceMapData = retrieveFile(sourceMappingURL);
|
|
8488
|
-
}
|
|
8489
|
-
if (!sourceMapData) {
|
|
8490
|
-
return null;
|
|
8491
|
-
}
|
|
8492
|
-
return {
|
|
8493
|
-
url: sourceMappingURL,
|
|
8494
|
-
map: sourceMapData
|
|
8495
|
-
};
|
|
8496
|
-
});
|
|
8497
|
-
function mapSourcePosition(position) {
|
|
8498
|
-
var sourceMap = sourceMapCache[position.source];
|
|
8499
|
-
if (!sourceMap) {
|
|
8500
|
-
var urlAndMap = retrieveSourceMap(position.source);
|
|
8501
|
-
if (urlAndMap) {
|
|
8502
|
-
sourceMap = sourceMapCache[position.source] = {
|
|
8503
|
-
url: urlAndMap.url,
|
|
8504
|
-
map: new SourceMapConsumer(urlAndMap.map)
|
|
8505
|
-
};
|
|
8506
|
-
if (sourceMap.map.sourcesContent) {
|
|
8507
|
-
sourceMap.map.sources.forEach(function(source, i) {
|
|
8508
|
-
var contents = sourceMap.map.sourcesContent[i];
|
|
8509
|
-
if (contents) {
|
|
8510
|
-
var url = supportRelativeURL(sourceMap.url, source);
|
|
8511
|
-
fileContentsCache[url] = contents;
|
|
8512
|
-
}
|
|
8513
|
-
});
|
|
8514
|
-
}
|
|
8515
|
-
} else {
|
|
8516
|
-
sourceMap = sourceMapCache[position.source] = {
|
|
8517
|
-
url: null,
|
|
8518
|
-
map: null
|
|
8519
|
-
};
|
|
8520
|
-
}
|
|
8521
|
-
}
|
|
8522
|
-
if (sourceMap && sourceMap.map) {
|
|
8523
|
-
var originalPosition = sourceMap.map.originalPositionFor(position);
|
|
8524
|
-
if (originalPosition.source !== null) {
|
|
8525
|
-
originalPosition.source = supportRelativeURL(
|
|
8526
|
-
sourceMap.url,
|
|
8527
|
-
originalPosition.source
|
|
8528
|
-
);
|
|
8529
|
-
return originalPosition;
|
|
8530
|
-
}
|
|
8531
|
-
}
|
|
8532
|
-
return position;
|
|
8533
|
-
}
|
|
8534
|
-
function mapEvalOrigin(origin) {
|
|
8535
|
-
var match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin);
|
|
8536
|
-
if (match) {
|
|
8537
|
-
var position = mapSourcePosition({
|
|
8538
|
-
source: match[2],
|
|
8539
|
-
line: +match[3],
|
|
8540
|
-
column: match[4] - 1
|
|
8541
|
-
});
|
|
8542
|
-
return "eval at " + match[1] + " (" + position.source + ":" + position.line + ":" + (position.column + 1) + ")";
|
|
8543
|
-
}
|
|
8544
|
-
match = /^eval at ([^(]+) \((.+)\)$/.exec(origin);
|
|
8545
|
-
if (match) {
|
|
8546
|
-
return "eval at " + match[1] + " (" + mapEvalOrigin(match[2]) + ")";
|
|
8547
|
-
}
|
|
8548
|
-
return origin;
|
|
8549
|
-
}
|
|
8550
|
-
function CallSiteToString() {
|
|
8551
|
-
var fileName;
|
|
8552
|
-
var fileLocation = "";
|
|
8553
|
-
if (this.isNative()) {
|
|
8554
|
-
fileLocation = "native";
|
|
8555
|
-
} else {
|
|
8556
|
-
fileName = this.getScriptNameOrSourceURL();
|
|
8557
|
-
if (!fileName && this.isEval()) {
|
|
8558
|
-
fileLocation = this.getEvalOrigin();
|
|
8559
|
-
fileLocation += ", ";
|
|
8560
|
-
}
|
|
8561
|
-
if (fileName) {
|
|
8562
|
-
fileLocation += fileName;
|
|
8563
|
-
} else {
|
|
8564
|
-
fileLocation += "<anonymous>";
|
|
8565
|
-
}
|
|
8566
|
-
var lineNumber = this.getLineNumber();
|
|
8567
|
-
if (lineNumber != null) {
|
|
8568
|
-
fileLocation += ":" + lineNumber;
|
|
8569
|
-
var columnNumber = this.getColumnNumber();
|
|
8570
|
-
if (columnNumber) {
|
|
8571
|
-
fileLocation += ":" + columnNumber;
|
|
8572
|
-
}
|
|
8573
|
-
}
|
|
8574
|
-
}
|
|
8575
|
-
var line = "";
|
|
8576
|
-
var functionName = this.getFunctionName();
|
|
8577
|
-
var addSuffix = true;
|
|
8578
|
-
var isConstructor = this.isConstructor();
|
|
8579
|
-
var isMethodCall = !(this.isToplevel() || isConstructor);
|
|
8580
|
-
if (isMethodCall) {
|
|
8581
|
-
var typeName = this.getTypeName();
|
|
8582
|
-
if (typeName === "[object Object]") {
|
|
8583
|
-
typeName = "null";
|
|
8584
|
-
}
|
|
8585
|
-
var methodName = this.getMethodName();
|
|
8586
|
-
if (functionName) {
|
|
8587
|
-
if (typeName && functionName.indexOf(typeName) != 0) {
|
|
8588
|
-
line += typeName + ".";
|
|
8589
|
-
}
|
|
8590
|
-
line += functionName;
|
|
8591
|
-
if (methodName && functionName.indexOf("." + methodName) != functionName.length - methodName.length - 1) {
|
|
8592
|
-
line += " [as " + methodName + "]";
|
|
8593
|
-
}
|
|
8594
|
-
} else {
|
|
8595
|
-
line += typeName + "." + (methodName || "<anonymous>");
|
|
8596
|
-
}
|
|
8597
|
-
} else if (isConstructor) {
|
|
8598
|
-
line += "new " + (functionName || "<anonymous>");
|
|
8599
|
-
} else if (functionName) {
|
|
8600
|
-
line += functionName;
|
|
8601
|
-
} else {
|
|
8602
|
-
line += fileLocation;
|
|
8603
|
-
addSuffix = false;
|
|
8604
|
-
}
|
|
8605
|
-
if (addSuffix) {
|
|
8606
|
-
line += " (" + fileLocation + ")";
|
|
8607
|
-
}
|
|
8608
|
-
return line;
|
|
8609
|
-
}
|
|
8610
|
-
function cloneCallSite(frame) {
|
|
8611
|
-
var object = {};
|
|
8612
|
-
Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) {
|
|
8613
|
-
object[name] = /^(?:is|get)/.test(name) ? function() {
|
|
8614
|
-
return frame[name].call(frame);
|
|
8615
|
-
} : frame[name];
|
|
8616
|
-
});
|
|
8617
|
-
object.toString = CallSiteToString;
|
|
8618
|
-
return object;
|
|
8619
|
-
}
|
|
8620
|
-
function wrapCallSite(frame) {
|
|
8621
|
-
if (frame.isNative()) {
|
|
8622
|
-
return frame;
|
|
8623
|
-
}
|
|
8624
|
-
var source = frame.getFileName() || frame.getScriptNameOrSourceURL();
|
|
8625
|
-
if (source) {
|
|
8626
|
-
var line = frame.getLineNumber();
|
|
8627
|
-
var column = frame.getColumnNumber() - 1;
|
|
8628
|
-
var headerLength = 62;
|
|
8629
|
-
if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) {
|
|
8630
|
-
column -= headerLength;
|
|
8631
|
-
}
|
|
8632
|
-
var position = mapSourcePosition({
|
|
8633
|
-
source,
|
|
8634
|
-
line,
|
|
8635
|
-
column
|
|
8636
|
-
});
|
|
8637
|
-
frame = cloneCallSite(frame);
|
|
8638
|
-
var originalFunctionName = frame.getFunctionName;
|
|
8639
|
-
frame.getFunctionName = function() {
|
|
8640
|
-
return position.name || originalFunctionName();
|
|
8641
|
-
};
|
|
8642
|
-
frame.getFileName = function() {
|
|
8643
|
-
return position.source;
|
|
8644
|
-
};
|
|
8645
|
-
frame.getLineNumber = function() {
|
|
8646
|
-
return position.line;
|
|
8647
|
-
};
|
|
8648
|
-
frame.getColumnNumber = function() {
|
|
8649
|
-
return position.column + 1;
|
|
8650
|
-
};
|
|
8651
|
-
frame.getScriptNameOrSourceURL = function() {
|
|
8652
|
-
return position.source;
|
|
8653
|
-
};
|
|
8654
|
-
return frame;
|
|
8655
|
-
}
|
|
8656
|
-
var origin = frame.isEval() && frame.getEvalOrigin();
|
|
8657
|
-
if (origin) {
|
|
8658
|
-
origin = mapEvalOrigin(origin);
|
|
8659
|
-
frame = cloneCallSite(frame);
|
|
8660
|
-
frame.getEvalOrigin = function() {
|
|
8661
|
-
return origin;
|
|
8662
|
-
};
|
|
8663
|
-
return frame;
|
|
8664
|
-
}
|
|
8665
|
-
return frame;
|
|
8666
|
-
}
|
|
8667
|
-
function prepareStackTrace(error, stack) {
|
|
8668
|
-
if (emptyCacheBetweenOperations) {
|
|
8669
|
-
fileContentsCache = {};
|
|
8670
|
-
sourceMapCache = {};
|
|
8671
|
-
}
|
|
8672
|
-
return error + stack.map(function(frame) {
|
|
8673
|
-
return "\n at " + wrapCallSite(frame);
|
|
8674
|
-
}).join("");
|
|
8675
|
-
}
|
|
8676
|
-
function getErrorSource(error) {
|
|
8677
|
-
var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack);
|
|
8678
|
-
if (match) {
|
|
8679
|
-
var source = match[1];
|
|
8680
|
-
var line = +match[2];
|
|
8681
|
-
var column = +match[3];
|
|
8682
|
-
var contents = fileContentsCache[source];
|
|
8683
|
-
if (!contents && fs && fs.existsSync(source)) {
|
|
8684
|
-
try {
|
|
8685
|
-
contents = fs.readFileSync(source, "utf8");
|
|
8686
|
-
} catch (er) {
|
|
8687
|
-
contents = "";
|
|
8688
|
-
}
|
|
8689
|
-
}
|
|
8690
|
-
if (contents) {
|
|
8691
|
-
var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1];
|
|
8692
|
-
if (code) {
|
|
8693
|
-
return source + ":" + line + "\n" + code + "\n" + new Array(column).join(" ") + "^";
|
|
8694
|
-
}
|
|
8695
|
-
}
|
|
8696
|
-
}
|
|
8697
|
-
return null;
|
|
8698
|
-
}
|
|
8699
|
-
function printErrorAndExit(error) {
|
|
8700
|
-
var source = getErrorSource(error);
|
|
8701
|
-
if (process.stderr._handle && process.stderr._handle.setBlocking) {
|
|
8702
|
-
process.stderr._handle.setBlocking(true);
|
|
8703
|
-
}
|
|
8704
|
-
if (source) {
|
|
8705
|
-
console.error();
|
|
8706
|
-
console.error(source);
|
|
8707
|
-
}
|
|
8708
|
-
console.error(error.stack);
|
|
8709
|
-
process.exit(1);
|
|
8710
|
-
}
|
|
8711
|
-
function shimEmitUncaughtException() {
|
|
8712
|
-
var origEmit = process.emit;
|
|
8713
|
-
process.emit = function(type) {
|
|
8714
|
-
if (type === "uncaughtException") {
|
|
8715
|
-
var hasStack = arguments[1] && arguments[1].stack;
|
|
8716
|
-
var hasListeners = this.listeners(type).length > 0;
|
|
8717
|
-
if (hasStack && !hasListeners) {
|
|
8718
|
-
return printErrorAndExit(arguments[1]);
|
|
8719
|
-
}
|
|
8720
|
-
}
|
|
8721
|
-
return origEmit.apply(this, arguments);
|
|
8722
|
-
};
|
|
8723
|
-
}
|
|
8724
|
-
var originalRetrieveFileHandlers = retrieveFileHandlers.slice(0);
|
|
8725
|
-
var originalRetrieveMapHandlers = retrieveMapHandlers.slice(0);
|
|
8726
|
-
exports.wrapCallSite = wrapCallSite;
|
|
8727
|
-
exports.getErrorSource = getErrorSource;
|
|
8728
|
-
exports.mapSourcePosition = mapSourcePosition;
|
|
8729
|
-
exports.retrieveSourceMap = retrieveSourceMap;
|
|
8730
|
-
exports.install = function(options) {
|
|
8731
|
-
options = options || {};
|
|
8732
|
-
if (options.environment) {
|
|
8733
|
-
environment = options.environment;
|
|
8734
|
-
if (["node", "browser", "auto"].indexOf(environment) === -1) {
|
|
8735
|
-
throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}");
|
|
8736
|
-
}
|
|
8737
|
-
}
|
|
8738
|
-
if (options.retrieveFile) {
|
|
8739
|
-
if (options.overrideRetrieveFile) {
|
|
8740
|
-
retrieveFileHandlers.length = 0;
|
|
8741
|
-
}
|
|
8742
|
-
retrieveFileHandlers.unshift(options.retrieveFile);
|
|
8743
|
-
}
|
|
8744
|
-
if (options.retrieveSourceMap) {
|
|
8745
|
-
if (options.overrideRetrieveSourceMap) {
|
|
8746
|
-
retrieveMapHandlers.length = 0;
|
|
8747
|
-
}
|
|
8748
|
-
retrieveMapHandlers.unshift(options.retrieveSourceMap);
|
|
8749
|
-
}
|
|
8750
|
-
if (options.hookRequire && !isInBrowser()) {
|
|
8751
|
-
var Module;
|
|
8752
|
-
try {
|
|
8753
|
-
Module = require("module");
|
|
8754
|
-
} catch (err) {
|
|
8755
|
-
}
|
|
8756
|
-
var $compile = Module.prototype._compile;
|
|
8757
|
-
if (!$compile.__sourceMapSupport) {
|
|
8758
|
-
Module.prototype._compile = function(content, filename) {
|
|
8759
|
-
fileContentsCache[filename] = content;
|
|
8760
|
-
sourceMapCache[filename] = void 0;
|
|
8761
|
-
return $compile.call(this, content, filename);
|
|
8762
|
-
};
|
|
8763
|
-
Module.prototype._compile.__sourceMapSupport = true;
|
|
8764
|
-
}
|
|
8765
|
-
}
|
|
8766
|
-
if (!emptyCacheBetweenOperations) {
|
|
8767
|
-
emptyCacheBetweenOperations = "emptyCacheBetweenOperations" in options ? options.emptyCacheBetweenOperations : false;
|
|
8768
|
-
}
|
|
8769
|
-
if (!errorFormatterInstalled) {
|
|
8770
|
-
errorFormatterInstalled = true;
|
|
8771
|
-
Error.prepareStackTrace = prepareStackTrace;
|
|
8772
|
-
}
|
|
8773
|
-
if (!uncaughtShimInstalled) {
|
|
8774
|
-
var installHandler = "handleUncaughtExceptions" in options ? options.handleUncaughtExceptions : true;
|
|
8775
|
-
if (installHandler && hasGlobalProcessEventEmitter()) {
|
|
8776
|
-
uncaughtShimInstalled = true;
|
|
8777
|
-
shimEmitUncaughtException();
|
|
8778
|
-
}
|
|
8779
|
-
}
|
|
8780
|
-
};
|
|
8781
|
-
exports.resetRetrieveHandlers = function() {
|
|
8782
|
-
retrieveFileHandlers.length = 0;
|
|
8783
|
-
retrieveMapHandlers.length = 0;
|
|
8784
|
-
retrieveFileHandlers = originalRetrieveFileHandlers.slice(0);
|
|
8785
|
-
retrieveMapHandlers = originalRetrieveMapHandlers.slice(0);
|
|
8786
|
-
};
|
|
8787
|
-
}
|
|
8788
|
-
});
|
|
8789
|
-
|
|
8790
6572
|
// ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/typescript@4.7.4/node_modules/typescript/lib/typescript.js
|
|
8791
6573
|
var require_typescript = __commonJS({
|
|
8792
6574
|
"../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/typescript@4.7.4/node_modules/typescript/lib/typescript.js"(exports, module2) {
|
|
@@ -14967,7 +12749,7 @@ var require_typescript = __commonJS({
|
|
|
14967
12749
|
}),
|
|
14968
12750
|
tryEnableSourceMapsForHost: function() {
|
|
14969
12751
|
try {
|
|
14970
|
-
|
|
12752
|
+
require("source-map-support").install();
|
|
14971
12753
|
} catch (_a2) {
|
|
14972
12754
|
}
|
|
14973
12755
|
},
|