@vitest/browser 3.0.9 → 3.1.0-beta.2
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/context.d.ts +22 -0
- package/dist/client/.vite/manifest.json +1 -1
- package/dist/client/__vitest__/assets/{index-CsZqQx26.js → index-C3wX9Cb1.js} +1 -1
- package/dist/client/__vitest__/index.html +1 -1
- package/dist/client/__vitest_browser__/{tester-lo_P6U-u.js → tester-DRF-LncV.js} +1112 -324
- package/dist/client/tester/tester.html +1 -1
- package/dist/client.js +91 -105
- package/dist/context.js +374 -390
- package/dist/index-VvsEiykv.js +327 -0
- package/dist/index.js +1914 -1885
- package/dist/locators/index.d.ts +3 -0
- package/dist/locators/index.js +2 -2
- package/dist/locators/playwright.js +99 -108
- package/dist/locators/preview.js +71 -78
- package/dist/locators/webdriverio.js +135 -138
- package/dist/providers.js +34 -37
- package/dist/{public-utils-J4vwTaki.js → public-utils-4WiYB3_6.js} +38 -40
- package/dist/state.js +170 -1
- package/dist/utils.js +1 -1
- package/dist/webdriver-BP2w_ajA.js +271 -0
- package/package.json +8 -8
- package/dist/index-DrTP5i7N.js +0 -195
- package/dist/utils-VCysLhWp.js +0 -115
- package/dist/webdriver-C5-VI7VH.js +0 -275
|
@@ -74,7 +74,7 @@ const __vitePreload = function preload(baseModule, deps, importerUrl) {
|
|
|
74
74
|
};
|
|
75
75
|
function showPopupWarning(name, value, defaultValue) {
|
|
76
76
|
return (...params) => {
|
|
77
|
-
const formattedParams = params.map((
|
|
77
|
+
const formattedParams = params.map((p2) => JSON.stringify(p2)).join(", ");
|
|
78
78
|
console.warn(`Vitest encountered a \`${name}(${formattedParams})\` call that it cannot handle by default, so it returned \`${value}\`. Read more in https://vitest.dev/guide/browser/#thread-blocking-dialogs.
|
|
79
79
|
If needed, mock the \`${name}\` call manually like:
|
|
80
80
|
|
|
@@ -94,7 +94,7 @@ function setupDialogsSpy() {
|
|
|
94
94
|
globalThis.prompt = showPopupWarning("prompt", null, "your value");
|
|
95
95
|
}
|
|
96
96
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
97
|
-
function getDefaultExportFromCjs(x) {
|
|
97
|
+
function getDefaultExportFromCjs$1(x) {
|
|
98
98
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
99
99
|
}
|
|
100
100
|
var minIndent;
|
|
@@ -107,7 +107,7 @@ function requireMinIndent() {
|
|
|
107
107
|
if (!match) {
|
|
108
108
|
return 0;
|
|
109
109
|
}
|
|
110
|
-
return match.reduce((r,
|
|
110
|
+
return match.reduce((r, a2) => Math.min(r, a2.length), Infinity);
|
|
111
111
|
};
|
|
112
112
|
return minIndent;
|
|
113
113
|
}
|
|
@@ -172,9 +172,9 @@ function requireRedent() {
|
|
|
172
172
|
return redent$1;
|
|
173
173
|
}
|
|
174
174
|
var redentExports = requireRedent();
|
|
175
|
-
const redent = /* @__PURE__ */ getDefaultExportFromCjs(redentExports);
|
|
176
|
-
function $parcel$defineInteropFlag(
|
|
177
|
-
Object.defineProperty(
|
|
175
|
+
const redent = /* @__PURE__ */ getDefaultExportFromCjs$1(redentExports);
|
|
176
|
+
function $parcel$defineInteropFlag(a2) {
|
|
177
|
+
Object.defineProperty(a2, "__esModule", { value: true, configurable: true });
|
|
178
178
|
}
|
|
179
179
|
function $parcel$export(e, n, v, s) {
|
|
180
180
|
Object.defineProperty(e, n, { get: v, set: s, enumerable: true, configurable: true });
|
|
@@ -638,13 +638,13 @@ function toLength(value) {
|
|
|
638
638
|
return Math.min(Math.max(len, 0), maxSafeInteger);
|
|
639
639
|
}
|
|
640
640
|
function arrayFrom(arrayLike, mapFn) {
|
|
641
|
-
var
|
|
641
|
+
var C2 = Array;
|
|
642
642
|
var items = Object(arrayLike);
|
|
643
643
|
if (arrayLike == null) {
|
|
644
644
|
throw new TypeError("Array.from requires an array-like object - not null or undefined");
|
|
645
645
|
}
|
|
646
646
|
var len = toLength(items.length);
|
|
647
|
-
var A = isCallable(
|
|
647
|
+
var A = isCallable(C2) ? Object(new C2(len)) : new Array(len);
|
|
648
648
|
var k = 0;
|
|
649
649
|
var kValue;
|
|
650
650
|
while (k < len) {
|
|
@@ -1466,15 +1466,15 @@ function requireIteratorProxy() {
|
|
|
1466
1466
|
iteratorProxy.default = void 0;
|
|
1467
1467
|
function iteratorProxy$1() {
|
|
1468
1468
|
var values = this;
|
|
1469
|
-
var
|
|
1469
|
+
var index2 = 0;
|
|
1470
1470
|
var iter = {
|
|
1471
1471
|
"@@iterator": function iterator() {
|
|
1472
1472
|
return iter;
|
|
1473
1473
|
},
|
|
1474
1474
|
next: function next() {
|
|
1475
|
-
if (
|
|
1476
|
-
var value = values[
|
|
1477
|
-
|
|
1475
|
+
if (index2 < values.length) {
|
|
1476
|
+
var value = values[index2];
|
|
1477
|
+
index2 = index2 + 1;
|
|
1478
1478
|
return {
|
|
1479
1479
|
done: false,
|
|
1480
1480
|
value
|
|
@@ -1594,7 +1594,7 @@ function requireAriaPropsMap() {
|
|
|
1594
1594
|
}, e: function e(_e3) {
|
|
1595
1595
|
didErr = true;
|
|
1596
1596
|
err = _e3;
|
|
1597
|
-
}, f: function
|
|
1597
|
+
}, f: function f2() {
|
|
1598
1598
|
try {
|
|
1599
1599
|
if (!normalCompletion && it.return != null) it.return();
|
|
1600
1600
|
} finally {
|
|
@@ -1850,7 +1850,7 @@ function requireDomMap() {
|
|
|
1850
1850
|
}, e: function e(_e3) {
|
|
1851
1851
|
didErr = true;
|
|
1852
1852
|
err = _e3;
|
|
1853
|
-
}, f: function
|
|
1853
|
+
}, f: function f2() {
|
|
1854
1854
|
try {
|
|
1855
1855
|
if (!normalCompletion && it.return != null) it.return();
|
|
1856
1856
|
} finally {
|
|
@@ -7925,7 +7925,7 @@ function requireRolesMap() {
|
|
|
7925
7925
|
}, e: function e(_e3) {
|
|
7926
7926
|
didErr = true;
|
|
7927
7927
|
err = _e3;
|
|
7928
|
-
}, f: function
|
|
7928
|
+
}, f: function f2() {
|
|
7929
7929
|
try {
|
|
7930
7930
|
if (!normalCompletion && it.return != null) it.return();
|
|
7931
7931
|
} finally {
|
|
@@ -8175,7 +8175,7 @@ function requireElementRoleMap() {
|
|
|
8175
8175
|
}, e: function e(_e3) {
|
|
8176
8176
|
didErr = true;
|
|
8177
8177
|
err = _e3;
|
|
8178
|
-
}, f: function
|
|
8178
|
+
}, f: function f2() {
|
|
8179
8179
|
try {
|
|
8180
8180
|
if (!normalCompletion && it.return != null) it.return();
|
|
8181
8181
|
} finally {
|
|
@@ -8355,7 +8355,7 @@ function requireRoleElementMap() {
|
|
|
8355
8355
|
}, e: function e(_e3) {
|
|
8356
8356
|
didErr = true;
|
|
8357
8357
|
err = _e3;
|
|
8358
|
-
}, f: function
|
|
8358
|
+
}, f: function f2() {
|
|
8359
8359
|
try {
|
|
8360
8360
|
if (!normalCompletion && it.return != null) it.return();
|
|
8361
8361
|
} finally {
|
|
@@ -8682,20 +8682,20 @@ function requireConversions() {
|
|
|
8682
8682
|
const min = Math.min(r, g, b);
|
|
8683
8683
|
const max = Math.max(r, g, b);
|
|
8684
8684
|
const delta = max - min;
|
|
8685
|
-
let
|
|
8685
|
+
let h2;
|
|
8686
8686
|
let s;
|
|
8687
8687
|
if (max === min) {
|
|
8688
|
-
|
|
8688
|
+
h2 = 0;
|
|
8689
8689
|
} else if (r === max) {
|
|
8690
|
-
|
|
8690
|
+
h2 = (g - b) / delta;
|
|
8691
8691
|
} else if (g === max) {
|
|
8692
|
-
|
|
8692
|
+
h2 = 2 + (b - r) / delta;
|
|
8693
8693
|
} else if (b === max) {
|
|
8694
|
-
|
|
8694
|
+
h2 = 4 + (r - g) / delta;
|
|
8695
8695
|
}
|
|
8696
|
-
|
|
8697
|
-
if (
|
|
8698
|
-
|
|
8696
|
+
h2 = Math.min(h2 * 60, 360);
|
|
8697
|
+
if (h2 < 0) {
|
|
8698
|
+
h2 += 360;
|
|
8699
8699
|
}
|
|
8700
8700
|
const l = (min + max) / 2;
|
|
8701
8701
|
if (max === min) {
|
|
@@ -8705,13 +8705,13 @@ function requireConversions() {
|
|
|
8705
8705
|
} else {
|
|
8706
8706
|
s = delta / (2 - max - min);
|
|
8707
8707
|
}
|
|
8708
|
-
return [
|
|
8708
|
+
return [h2, s * 100, l * 100];
|
|
8709
8709
|
};
|
|
8710
8710
|
convert.rgb.hsv = function(rgb) {
|
|
8711
8711
|
let rdif;
|
|
8712
8712
|
let gdif;
|
|
8713
8713
|
let bdif;
|
|
8714
|
-
let
|
|
8714
|
+
let h2;
|
|
8715
8715
|
let s;
|
|
8716
8716
|
const r = rgb[0] / 255;
|
|
8717
8717
|
const g = rgb[1] / 255;
|
|
@@ -8722,7 +8722,7 @@ function requireConversions() {
|
|
|
8722
8722
|
return (v - c) / 6 / diff + 1 / 2;
|
|
8723
8723
|
};
|
|
8724
8724
|
if (diff === 0) {
|
|
8725
|
-
|
|
8725
|
+
h2 = 0;
|
|
8726
8726
|
s = 0;
|
|
8727
8727
|
} else {
|
|
8728
8728
|
s = diff / v;
|
|
@@ -8730,20 +8730,20 @@ function requireConversions() {
|
|
|
8730
8730
|
gdif = diffc(g);
|
|
8731
8731
|
bdif = diffc(b);
|
|
8732
8732
|
if (r === v) {
|
|
8733
|
-
|
|
8733
|
+
h2 = bdif - gdif;
|
|
8734
8734
|
} else if (g === v) {
|
|
8735
|
-
|
|
8735
|
+
h2 = 1 / 3 + rdif - bdif;
|
|
8736
8736
|
} else if (b === v) {
|
|
8737
|
-
|
|
8737
|
+
h2 = 2 / 3 + gdif - rdif;
|
|
8738
8738
|
}
|
|
8739
|
-
if (
|
|
8740
|
-
|
|
8741
|
-
} else if (
|
|
8742
|
-
|
|
8739
|
+
if (h2 < 0) {
|
|
8740
|
+
h2 += 1;
|
|
8741
|
+
} else if (h2 > 1) {
|
|
8742
|
+
h2 -= 1;
|
|
8743
8743
|
}
|
|
8744
8744
|
}
|
|
8745
8745
|
return [
|
|
8746
|
-
|
|
8746
|
+
h2 * 360,
|
|
8747
8747
|
s * 100,
|
|
8748
8748
|
v * 100
|
|
8749
8749
|
];
|
|
@@ -8752,10 +8752,10 @@ function requireConversions() {
|
|
|
8752
8752
|
const r = rgb[0];
|
|
8753
8753
|
const g = rgb[1];
|
|
8754
8754
|
let b = rgb[2];
|
|
8755
|
-
const
|
|
8755
|
+
const h2 = convert.rgb.hsl(rgb)[0];
|
|
8756
8756
|
const w = 1 / 255 * Math.min(r, Math.min(g, b));
|
|
8757
8757
|
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
|
8758
|
-
return [
|
|
8758
|
+
return [h2, w * 100, b * 100];
|
|
8759
8759
|
};
|
|
8760
8760
|
convert.rgb.cmyk = function(rgb) {
|
|
8761
8761
|
const r = rgb[0] / 255;
|
|
@@ -8814,12 +8814,12 @@ function requireConversions() {
|
|
|
8814
8814
|
y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
8815
8815
|
z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
8816
8816
|
const l = 116 * y - 16;
|
|
8817
|
-
const
|
|
8817
|
+
const a2 = 500 * (x - y);
|
|
8818
8818
|
const b = 200 * (y - z);
|
|
8819
|
-
return [l,
|
|
8819
|
+
return [l, a2, b];
|
|
8820
8820
|
};
|
|
8821
8821
|
convert.hsl.rgb = function(hsl) {
|
|
8822
|
-
const
|
|
8822
|
+
const h2 = hsl[0] / 360;
|
|
8823
8823
|
const s = hsl[1] / 100;
|
|
8824
8824
|
const l = hsl[2] / 100;
|
|
8825
8825
|
let t2;
|
|
@@ -8837,7 +8837,7 @@ function requireConversions() {
|
|
|
8837
8837
|
const t1 = 2 * l - t2;
|
|
8838
8838
|
const rgb = [0, 0, 0];
|
|
8839
8839
|
for (let i = 0; i < 3; i++) {
|
|
8840
|
-
t3 =
|
|
8840
|
+
t3 = h2 + 1 / 3 * -(i - 1);
|
|
8841
8841
|
if (t3 < 0) {
|
|
8842
8842
|
t3++;
|
|
8843
8843
|
}
|
|
@@ -8858,7 +8858,7 @@ function requireConversions() {
|
|
|
8858
8858
|
return rgb;
|
|
8859
8859
|
};
|
|
8860
8860
|
convert.hsl.hsv = function(hsl) {
|
|
8861
|
-
const
|
|
8861
|
+
const h2 = hsl[0];
|
|
8862
8862
|
let s = hsl[1] / 100;
|
|
8863
8863
|
let l = hsl[2] / 100;
|
|
8864
8864
|
let smin = s;
|
|
@@ -8868,35 +8868,35 @@ function requireConversions() {
|
|
|
8868
8868
|
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
|
8869
8869
|
const v = (l + s) / 2;
|
|
8870
8870
|
const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
|
|
8871
|
-
return [
|
|
8871
|
+
return [h2, sv * 100, v * 100];
|
|
8872
8872
|
};
|
|
8873
8873
|
convert.hsv.rgb = function(hsv) {
|
|
8874
|
-
const
|
|
8874
|
+
const h2 = hsv[0] / 60;
|
|
8875
8875
|
const s = hsv[1] / 100;
|
|
8876
8876
|
let v = hsv[2] / 100;
|
|
8877
|
-
const hi = Math.floor(
|
|
8878
|
-
const
|
|
8879
|
-
const
|
|
8880
|
-
const q = 255 * v * (1 - s *
|
|
8881
|
-
const t = 255 * v * (1 - s * (1 -
|
|
8877
|
+
const hi = Math.floor(h2) % 6;
|
|
8878
|
+
const f2 = h2 - Math.floor(h2);
|
|
8879
|
+
const p2 = 255 * v * (1 - s);
|
|
8880
|
+
const q = 255 * v * (1 - s * f2);
|
|
8881
|
+
const t = 255 * v * (1 - s * (1 - f2));
|
|
8882
8882
|
v *= 255;
|
|
8883
8883
|
switch (hi) {
|
|
8884
8884
|
case 0:
|
|
8885
|
-
return [v, t,
|
|
8885
|
+
return [v, t, p2];
|
|
8886
8886
|
case 1:
|
|
8887
|
-
return [q, v,
|
|
8887
|
+
return [q, v, p2];
|
|
8888
8888
|
case 2:
|
|
8889
|
-
return [
|
|
8889
|
+
return [p2, v, t];
|
|
8890
8890
|
case 3:
|
|
8891
|
-
return [
|
|
8891
|
+
return [p2, q, v];
|
|
8892
8892
|
case 4:
|
|
8893
|
-
return [t,
|
|
8893
|
+
return [t, p2, v];
|
|
8894
8894
|
case 5:
|
|
8895
|
-
return [v,
|
|
8895
|
+
return [v, p2, q];
|
|
8896
8896
|
}
|
|
8897
8897
|
};
|
|
8898
8898
|
convert.hsv.hsl = function(hsv) {
|
|
8899
|
-
const
|
|
8899
|
+
const h2 = hsv[0];
|
|
8900
8900
|
const s = hsv[1] / 100;
|
|
8901
8901
|
const v = hsv[2] / 100;
|
|
8902
8902
|
const vmin = Math.max(v, 0.01);
|
|
@@ -8908,25 +8908,25 @@ function requireConversions() {
|
|
|
8908
8908
|
sl /= lmin <= 1 ? lmin : 2 - lmin;
|
|
8909
8909
|
sl = sl || 0;
|
|
8910
8910
|
l /= 2;
|
|
8911
|
-
return [
|
|
8911
|
+
return [h2, sl * 100, l * 100];
|
|
8912
8912
|
};
|
|
8913
8913
|
convert.hwb.rgb = function(hwb) {
|
|
8914
|
-
const
|
|
8914
|
+
const h2 = hwb[0] / 360;
|
|
8915
8915
|
let wh = hwb[1] / 100;
|
|
8916
8916
|
let bl = hwb[2] / 100;
|
|
8917
8917
|
const ratio = wh + bl;
|
|
8918
|
-
let
|
|
8918
|
+
let f2;
|
|
8919
8919
|
if (ratio > 1) {
|
|
8920
8920
|
wh /= ratio;
|
|
8921
8921
|
bl /= ratio;
|
|
8922
8922
|
}
|
|
8923
|
-
const i = Math.floor(6 *
|
|
8923
|
+
const i = Math.floor(6 * h2);
|
|
8924
8924
|
const v = 1 - bl;
|
|
8925
|
-
|
|
8925
|
+
f2 = 6 * h2 - i;
|
|
8926
8926
|
if ((i & 1) !== 0) {
|
|
8927
|
-
|
|
8927
|
+
f2 = 1 - f2;
|
|
8928
8928
|
}
|
|
8929
|
-
const n = wh +
|
|
8929
|
+
const n = wh + f2 * (v - wh);
|
|
8930
8930
|
let r;
|
|
8931
8931
|
let g;
|
|
8932
8932
|
let b;
|
|
@@ -9005,19 +9005,19 @@ function requireConversions() {
|
|
|
9005
9005
|
y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
9006
9006
|
z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
9007
9007
|
const l = 116 * y - 16;
|
|
9008
|
-
const
|
|
9008
|
+
const a2 = 500 * (x - y);
|
|
9009
9009
|
const b = 200 * (y - z);
|
|
9010
|
-
return [l,
|
|
9010
|
+
return [l, a2, b];
|
|
9011
9011
|
};
|
|
9012
9012
|
convert.lab.xyz = function(lab) {
|
|
9013
9013
|
const l = lab[0];
|
|
9014
|
-
const
|
|
9014
|
+
const a2 = lab[1];
|
|
9015
9015
|
const b = lab[2];
|
|
9016
9016
|
let x;
|
|
9017
9017
|
let y;
|
|
9018
9018
|
let z;
|
|
9019
9019
|
y = (l + 16) / 116;
|
|
9020
|
-
x =
|
|
9020
|
+
x = a2 / 500 + y;
|
|
9021
9021
|
z = y - b / 200;
|
|
9022
9022
|
const y2 = y ** 3;
|
|
9023
9023
|
const x2 = x ** 3;
|
|
@@ -9032,25 +9032,25 @@ function requireConversions() {
|
|
|
9032
9032
|
};
|
|
9033
9033
|
convert.lab.lch = function(lab) {
|
|
9034
9034
|
const l = lab[0];
|
|
9035
|
-
const
|
|
9035
|
+
const a2 = lab[1];
|
|
9036
9036
|
const b = lab[2];
|
|
9037
|
-
let
|
|
9038
|
-
const hr = Math.atan2(b,
|
|
9039
|
-
|
|
9040
|
-
if (
|
|
9041
|
-
|
|
9037
|
+
let h2;
|
|
9038
|
+
const hr = Math.atan2(b, a2);
|
|
9039
|
+
h2 = hr * 360 / 2 / Math.PI;
|
|
9040
|
+
if (h2 < 0) {
|
|
9041
|
+
h2 += 360;
|
|
9042
9042
|
}
|
|
9043
|
-
const c = Math.sqrt(
|
|
9044
|
-
return [l, c,
|
|
9043
|
+
const c = Math.sqrt(a2 * a2 + b * b);
|
|
9044
|
+
return [l, c, h2];
|
|
9045
9045
|
};
|
|
9046
9046
|
convert.lch.lab = function(lch) {
|
|
9047
9047
|
const l = lch[0];
|
|
9048
9048
|
const c = lch[1];
|
|
9049
|
-
const
|
|
9050
|
-
const hr =
|
|
9051
|
-
const
|
|
9049
|
+
const h2 = lch[2];
|
|
9050
|
+
const hr = h2 / 360 * 2 * Math.PI;
|
|
9051
|
+
const a2 = c * Math.cos(hr);
|
|
9052
9052
|
const b = c * Math.sin(hr);
|
|
9053
|
-
return [l,
|
|
9053
|
+
return [l, a2, b];
|
|
9054
9054
|
};
|
|
9055
9055
|
convert.rgb.ansi16 = function(args, saturation = null) {
|
|
9056
9056
|
const [r, g, b] = args;
|
|
@@ -9164,31 +9164,31 @@ function requireConversions() {
|
|
|
9164
9164
|
const s = hsl[1] / 100;
|
|
9165
9165
|
const l = hsl[2] / 100;
|
|
9166
9166
|
const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
|
|
9167
|
-
let
|
|
9167
|
+
let f2 = 0;
|
|
9168
9168
|
if (c < 1) {
|
|
9169
|
-
|
|
9169
|
+
f2 = (l - 0.5 * c) / (1 - c);
|
|
9170
9170
|
}
|
|
9171
|
-
return [hsl[0], c * 100,
|
|
9171
|
+
return [hsl[0], c * 100, f2 * 100];
|
|
9172
9172
|
};
|
|
9173
9173
|
convert.hsv.hcg = function(hsv) {
|
|
9174
9174
|
const s = hsv[1] / 100;
|
|
9175
9175
|
const v = hsv[2] / 100;
|
|
9176
9176
|
const c = s * v;
|
|
9177
|
-
let
|
|
9177
|
+
let f2 = 0;
|
|
9178
9178
|
if (c < 1) {
|
|
9179
|
-
|
|
9179
|
+
f2 = (v - c) / (1 - c);
|
|
9180
9180
|
}
|
|
9181
|
-
return [hsv[0], c * 100,
|
|
9181
|
+
return [hsv[0], c * 100, f2 * 100];
|
|
9182
9182
|
};
|
|
9183
9183
|
convert.hcg.rgb = function(hcg) {
|
|
9184
|
-
const
|
|
9184
|
+
const h2 = hcg[0] / 360;
|
|
9185
9185
|
const c = hcg[1] / 100;
|
|
9186
9186
|
const g = hcg[2] / 100;
|
|
9187
9187
|
if (c === 0) {
|
|
9188
9188
|
return [g * 255, g * 255, g * 255];
|
|
9189
9189
|
}
|
|
9190
9190
|
const pure = [0, 0, 0];
|
|
9191
|
-
const hi =
|
|
9191
|
+
const hi = h2 % 1 * 6;
|
|
9192
9192
|
const v = hi % 1;
|
|
9193
9193
|
const w = 1 - v;
|
|
9194
9194
|
let mg = 0;
|
|
@@ -9234,11 +9234,11 @@ function requireConversions() {
|
|
|
9234
9234
|
const c = hcg[1] / 100;
|
|
9235
9235
|
const g = hcg[2] / 100;
|
|
9236
9236
|
const v = c + g * (1 - c);
|
|
9237
|
-
let
|
|
9237
|
+
let f2 = 0;
|
|
9238
9238
|
if (v > 0) {
|
|
9239
|
-
|
|
9239
|
+
f2 = c / v;
|
|
9240
9240
|
}
|
|
9241
|
-
return [hcg[0],
|
|
9241
|
+
return [hcg[0], f2 * 100, v * 100];
|
|
9242
9242
|
};
|
|
9243
9243
|
convert.hcg.hsl = function(hcg) {
|
|
9244
9244
|
const c = hcg[1] / 100;
|
|
@@ -9597,30 +9597,30 @@ function requireUtil() {
|
|
|
9597
9597
|
if (hasRequiredUtil) return util;
|
|
9598
9598
|
hasRequiredUtil = 1;
|
|
9599
9599
|
const stringReplaceAll = (string, substring, replacer) => {
|
|
9600
|
-
let
|
|
9601
|
-
if (
|
|
9600
|
+
let index2 = string.indexOf(substring);
|
|
9601
|
+
if (index2 === -1) {
|
|
9602
9602
|
return string;
|
|
9603
9603
|
}
|
|
9604
9604
|
const substringLength = substring.length;
|
|
9605
9605
|
let endIndex = 0;
|
|
9606
9606
|
let returnValue = "";
|
|
9607
9607
|
do {
|
|
9608
|
-
returnValue += string.substr(endIndex,
|
|
9609
|
-
endIndex =
|
|
9610
|
-
|
|
9611
|
-
} while (
|
|
9608
|
+
returnValue += string.substr(endIndex, index2 - endIndex) + substring + replacer;
|
|
9609
|
+
endIndex = index2 + substringLength;
|
|
9610
|
+
index2 = string.indexOf(substring, endIndex);
|
|
9611
|
+
} while (index2 !== -1);
|
|
9612
9612
|
returnValue += string.substr(endIndex);
|
|
9613
9613
|
return returnValue;
|
|
9614
9614
|
};
|
|
9615
|
-
const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix,
|
|
9615
|
+
const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index2) => {
|
|
9616
9616
|
let endIndex = 0;
|
|
9617
9617
|
let returnValue = "";
|
|
9618
9618
|
do {
|
|
9619
|
-
const gotCR = string[
|
|
9620
|
-
returnValue += string.substr(endIndex, (gotCR ?
|
|
9621
|
-
endIndex =
|
|
9622
|
-
|
|
9623
|
-
} while (
|
|
9619
|
+
const gotCR = string[index2 - 1] === "\r";
|
|
9620
|
+
returnValue += string.substr(endIndex, (gotCR ? index2 - 1 : index2) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
9621
|
+
endIndex = index2 + 1;
|
|
9622
|
+
index2 = string.indexOf("\n", endIndex);
|
|
9623
|
+
} while (index2 !== -1);
|
|
9624
9624
|
returnValue += string.substr(endIndex);
|
|
9625
9625
|
return returnValue;
|
|
9626
9626
|
};
|
|
@@ -9929,7 +9929,7 @@ function requireSource() {
|
|
|
9929
9929
|
return source;
|
|
9930
9930
|
}
|
|
9931
9931
|
var sourceExports = requireSource();
|
|
9932
|
-
const chalk = /* @__PURE__ */ getDefaultExportFromCjs(sourceExports);
|
|
9932
|
+
const chalk = /* @__PURE__ */ getDefaultExportFromCjs$1(sourceExports);
|
|
9933
9933
|
var _listCacheClear;
|
|
9934
9934
|
var hasRequired_listCacheClear;
|
|
9935
9935
|
function require_listCacheClear() {
|
|
@@ -9980,15 +9980,15 @@ function require_listCacheDelete() {
|
|
|
9980
9980
|
var arrayProto = Array.prototype;
|
|
9981
9981
|
var splice = arrayProto.splice;
|
|
9982
9982
|
function listCacheDelete(key) {
|
|
9983
|
-
var data = this.__data__,
|
|
9984
|
-
if (
|
|
9983
|
+
var data = this.__data__, index2 = assocIndexOf(data, key);
|
|
9984
|
+
if (index2 < 0) {
|
|
9985
9985
|
return false;
|
|
9986
9986
|
}
|
|
9987
9987
|
var lastIndex = data.length - 1;
|
|
9988
|
-
if (
|
|
9988
|
+
if (index2 == lastIndex) {
|
|
9989
9989
|
data.pop();
|
|
9990
9990
|
} else {
|
|
9991
|
-
splice.call(data,
|
|
9991
|
+
splice.call(data, index2, 1);
|
|
9992
9992
|
}
|
|
9993
9993
|
--this.size;
|
|
9994
9994
|
return true;
|
|
@@ -10003,8 +10003,8 @@ function require_listCacheGet() {
|
|
|
10003
10003
|
hasRequired_listCacheGet = 1;
|
|
10004
10004
|
var assocIndexOf = require_assocIndexOf();
|
|
10005
10005
|
function listCacheGet(key) {
|
|
10006
|
-
var data = this.__data__,
|
|
10007
|
-
return
|
|
10006
|
+
var data = this.__data__, index2 = assocIndexOf(data, key);
|
|
10007
|
+
return index2 < 0 ? void 0 : data[index2][1];
|
|
10008
10008
|
}
|
|
10009
10009
|
_listCacheGet = listCacheGet;
|
|
10010
10010
|
return _listCacheGet;
|
|
@@ -10028,12 +10028,12 @@ function require_listCacheSet() {
|
|
|
10028
10028
|
hasRequired_listCacheSet = 1;
|
|
10029
10029
|
var assocIndexOf = require_assocIndexOf();
|
|
10030
10030
|
function listCacheSet(key, value) {
|
|
10031
|
-
var data = this.__data__,
|
|
10032
|
-
if (
|
|
10031
|
+
var data = this.__data__, index2 = assocIndexOf(data, key);
|
|
10032
|
+
if (index2 < 0) {
|
|
10033
10033
|
++this.size;
|
|
10034
10034
|
data.push([key, value]);
|
|
10035
10035
|
} else {
|
|
10036
|
-
data[
|
|
10036
|
+
data[index2][1] = value;
|
|
10037
10037
|
}
|
|
10038
10038
|
return this;
|
|
10039
10039
|
}
|
|
@@ -10047,10 +10047,10 @@ function require_ListCache() {
|
|
|
10047
10047
|
hasRequired_ListCache = 1;
|
|
10048
10048
|
var listCacheClear = require_listCacheClear(), listCacheDelete = require_listCacheDelete(), listCacheGet = require_listCacheGet(), listCacheHas = require_listCacheHas(), listCacheSet = require_listCacheSet();
|
|
10049
10049
|
function ListCache(entries) {
|
|
10050
|
-
var
|
|
10050
|
+
var index2 = -1, length = entries == null ? 0 : entries.length;
|
|
10051
10051
|
this.clear();
|
|
10052
|
-
while (++
|
|
10053
|
-
var entry = entries[
|
|
10052
|
+
while (++index2 < length) {
|
|
10053
|
+
var entry = entries[index2];
|
|
10054
10054
|
this.set(entry[0], entry[1]);
|
|
10055
10055
|
}
|
|
10056
10056
|
}
|
|
@@ -10430,10 +10430,10 @@ function require_Hash() {
|
|
|
10430
10430
|
hasRequired_Hash = 1;
|
|
10431
10431
|
var hashClear = require_hashClear(), hashDelete = require_hashDelete(), hashGet = require_hashGet(), hashHas = require_hashHas(), hashSet = require_hashSet();
|
|
10432
10432
|
function Hash(entries) {
|
|
10433
|
-
var
|
|
10433
|
+
var index2 = -1, length = entries == null ? 0 : entries.length;
|
|
10434
10434
|
this.clear();
|
|
10435
|
-
while (++
|
|
10436
|
-
var entry = entries[
|
|
10435
|
+
while (++index2 < length) {
|
|
10436
|
+
var entry = entries[index2];
|
|
10437
10437
|
this.set(entry[0], entry[1]);
|
|
10438
10438
|
}
|
|
10439
10439
|
}
|
|
@@ -10547,10 +10547,10 @@ function require_MapCache() {
|
|
|
10547
10547
|
hasRequired_MapCache = 1;
|
|
10548
10548
|
var mapCacheClear = require_mapCacheClear(), mapCacheDelete = require_mapCacheDelete(), mapCacheGet = require_mapCacheGet(), mapCacheHas = require_mapCacheHas(), mapCacheSet = require_mapCacheSet();
|
|
10549
10549
|
function MapCache(entries) {
|
|
10550
|
-
var
|
|
10550
|
+
var index2 = -1, length = entries == null ? 0 : entries.length;
|
|
10551
10551
|
this.clear();
|
|
10552
|
-
while (++
|
|
10553
|
-
var entry = entries[
|
|
10552
|
+
while (++index2 < length) {
|
|
10553
|
+
var entry = entries[index2];
|
|
10554
10554
|
this.set(entry[0], entry[1]);
|
|
10555
10555
|
}
|
|
10556
10556
|
}
|
|
@@ -10636,10 +10636,10 @@ function require_SetCache() {
|
|
|
10636
10636
|
hasRequired_SetCache = 1;
|
|
10637
10637
|
var MapCache = require_MapCache(), setCacheAdd = require_setCacheAdd(), setCacheHas = require_setCacheHas();
|
|
10638
10638
|
function SetCache(values) {
|
|
10639
|
-
var
|
|
10639
|
+
var index2 = -1, length = values == null ? 0 : values.length;
|
|
10640
10640
|
this.__data__ = new MapCache();
|
|
10641
|
-
while (++
|
|
10642
|
-
this.add(values[
|
|
10641
|
+
while (++index2 < length) {
|
|
10642
|
+
this.add(values[index2]);
|
|
10643
10643
|
}
|
|
10644
10644
|
}
|
|
10645
10645
|
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
@@ -10653,9 +10653,9 @@ function require_arraySome() {
|
|
|
10653
10653
|
if (hasRequired_arraySome) return _arraySome;
|
|
10654
10654
|
hasRequired_arraySome = 1;
|
|
10655
10655
|
function arraySome(array, predicate) {
|
|
10656
|
-
var
|
|
10657
|
-
while (++
|
|
10658
|
-
if (predicate(array[
|
|
10656
|
+
var index2 = -1, length = array == null ? 0 : array.length;
|
|
10657
|
+
while (++index2 < length) {
|
|
10658
|
+
if (predicate(array[index2], index2, array)) {
|
|
10659
10659
|
return true;
|
|
10660
10660
|
}
|
|
10661
10661
|
}
|
|
@@ -10692,13 +10692,13 @@ function require_equalArrays() {
|
|
|
10692
10692
|
if (arrStacked && othStacked) {
|
|
10693
10693
|
return arrStacked == other && othStacked == array;
|
|
10694
10694
|
}
|
|
10695
|
-
var
|
|
10695
|
+
var index2 = -1, result = true, seen2 = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0;
|
|
10696
10696
|
stack.set(array, other);
|
|
10697
10697
|
stack.set(other, array);
|
|
10698
|
-
while (++
|
|
10699
|
-
var arrValue = array[
|
|
10698
|
+
while (++index2 < arrLength) {
|
|
10699
|
+
var arrValue = array[index2], othValue = other[index2];
|
|
10700
10700
|
if (customizer) {
|
|
10701
|
-
var compared = isPartial ? customizer(othValue, arrValue,
|
|
10701
|
+
var compared = isPartial ? customizer(othValue, arrValue, index2, other, array, stack) : customizer(arrValue, othValue, index2, array, other, stack);
|
|
10702
10702
|
}
|
|
10703
10703
|
if (compared !== void 0) {
|
|
10704
10704
|
if (compared) {
|
|
@@ -10744,9 +10744,9 @@ function require_mapToArray() {
|
|
|
10744
10744
|
if (hasRequired_mapToArray) return _mapToArray;
|
|
10745
10745
|
hasRequired_mapToArray = 1;
|
|
10746
10746
|
function mapToArray(map) {
|
|
10747
|
-
var
|
|
10747
|
+
var index2 = -1, result = Array(map.size);
|
|
10748
10748
|
map.forEach(function(value, key) {
|
|
10749
|
-
result[++
|
|
10749
|
+
result[++index2] = [key, value];
|
|
10750
10750
|
});
|
|
10751
10751
|
return result;
|
|
10752
10752
|
}
|
|
@@ -10759,9 +10759,9 @@ function require_setToArray() {
|
|
|
10759
10759
|
if (hasRequired_setToArray) return _setToArray;
|
|
10760
10760
|
hasRequired_setToArray = 1;
|
|
10761
10761
|
function setToArray(set) {
|
|
10762
|
-
var
|
|
10762
|
+
var index2 = -1, result = Array(set.size);
|
|
10763
10763
|
set.forEach(function(value) {
|
|
10764
|
-
result[++
|
|
10764
|
+
result[++index2] = value;
|
|
10765
10765
|
});
|
|
10766
10766
|
return result;
|
|
10767
10767
|
}
|
|
@@ -10833,9 +10833,9 @@ function require_arrayPush() {
|
|
|
10833
10833
|
if (hasRequired_arrayPush) return _arrayPush;
|
|
10834
10834
|
hasRequired_arrayPush = 1;
|
|
10835
10835
|
function arrayPush(array, values) {
|
|
10836
|
-
var
|
|
10837
|
-
while (++
|
|
10838
|
-
array[offset +
|
|
10836
|
+
var index2 = -1, length = values.length, offset = array.length;
|
|
10837
|
+
while (++index2 < length) {
|
|
10838
|
+
array[offset + index2] = values[index2];
|
|
10839
10839
|
}
|
|
10840
10840
|
return array;
|
|
10841
10841
|
}
|
|
@@ -10870,10 +10870,10 @@ function require_arrayFilter() {
|
|
|
10870
10870
|
if (hasRequired_arrayFilter) return _arrayFilter;
|
|
10871
10871
|
hasRequired_arrayFilter = 1;
|
|
10872
10872
|
function arrayFilter(array, predicate) {
|
|
10873
|
-
var
|
|
10874
|
-
while (++
|
|
10875
|
-
var value = array[
|
|
10876
|
-
if (predicate(value,
|
|
10873
|
+
var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
10874
|
+
while (++index2 < length) {
|
|
10875
|
+
var value = array[index2];
|
|
10876
|
+
if (predicate(value, index2, array)) {
|
|
10877
10877
|
result[resIndex++] = value;
|
|
10878
10878
|
}
|
|
10879
10879
|
}
|
|
@@ -10920,9 +10920,9 @@ function require_baseTimes() {
|
|
|
10920
10920
|
if (hasRequired_baseTimes) return _baseTimes;
|
|
10921
10921
|
hasRequired_baseTimes = 1;
|
|
10922
10922
|
function baseTimes(n, iteratee) {
|
|
10923
|
-
var
|
|
10924
|
-
while (++
|
|
10925
|
-
result[
|
|
10923
|
+
var index2 = -1, result = Array(n);
|
|
10924
|
+
while (++index2 < n) {
|
|
10925
|
+
result[index2] = iteratee(index2);
|
|
10926
10926
|
}
|
|
10927
10927
|
return result;
|
|
10928
10928
|
}
|
|
@@ -11226,9 +11226,9 @@ function require_equalObjects() {
|
|
|
11226
11226
|
if (objLength != othLength && !isPartial) {
|
|
11227
11227
|
return false;
|
|
11228
11228
|
}
|
|
11229
|
-
var
|
|
11230
|
-
while (
|
|
11231
|
-
var key = objProps[
|
|
11229
|
+
var index2 = objLength;
|
|
11230
|
+
while (index2--) {
|
|
11231
|
+
var key = objProps[index2];
|
|
11232
11232
|
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
|
11233
11233
|
return false;
|
|
11234
11234
|
}
|
|
@@ -11242,8 +11242,8 @@ function require_equalObjects() {
|
|
|
11242
11242
|
stack.set(object, other);
|
|
11243
11243
|
stack.set(other, object);
|
|
11244
11244
|
var skipCtor = isPartial;
|
|
11245
|
-
while (++
|
|
11246
|
-
key = objProps[
|
|
11245
|
+
while (++index2 < objLength) {
|
|
11246
|
+
key = objProps[index2];
|
|
11247
11247
|
var objValue = object[key], othValue = other[key];
|
|
11248
11248
|
if (customizer) {
|
|
11249
11249
|
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
@@ -11416,7 +11416,7 @@ function requireIsEqualWith() {
|
|
|
11416
11416
|
return isEqualWith_1;
|
|
11417
11417
|
}
|
|
11418
11418
|
var isEqualWithExports = requireIsEqualWith();
|
|
11419
|
-
const isEqualWith = /* @__PURE__ */ getDefaultExportFromCjs(isEqualWithExports);
|
|
11419
|
+
const isEqualWith = /* @__PURE__ */ getDefaultExportFromCjs$1(isEqualWithExports);
|
|
11420
11420
|
var css_escape$1 = { exports: {} };
|
|
11421
11421
|
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
|
|
11422
11422
|
var css_escape = css_escape$1.exports;
|
|
@@ -11439,12 +11439,12 @@ function requireCss_escape() {
|
|
|
11439
11439
|
}
|
|
11440
11440
|
var string = String(value);
|
|
11441
11441
|
var length = string.length;
|
|
11442
|
-
var
|
|
11442
|
+
var index2 = -1;
|
|
11443
11443
|
var codeUnit;
|
|
11444
11444
|
var result = "";
|
|
11445
11445
|
var firstCodeUnit = string.charCodeAt(0);
|
|
11446
|
-
while (++
|
|
11447
|
-
codeUnit = string.charCodeAt(
|
|
11446
|
+
while (++index2 < length) {
|
|
11447
|
+
codeUnit = string.charCodeAt(index2);
|
|
11448
11448
|
if (codeUnit == 0) {
|
|
11449
11449
|
result += "�";
|
|
11450
11450
|
continue;
|
|
@@ -11454,9 +11454,9 @@ function requireCss_escape() {
|
|
|
11454
11454
|
// U+007F, […]
|
|
11455
11455
|
codeUnit >= 1 && codeUnit <= 31 || codeUnit == 127 || // If the character is the first character and is in the range [0-9]
|
|
11456
11456
|
// (U+0030 to U+0039), […]
|
|
11457
|
-
|
|
11457
|
+
index2 == 0 && codeUnit >= 48 && codeUnit <= 57 || // If the character is the second character and is in the range [0-9]
|
|
11458
11458
|
// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
|
|
11459
|
-
|
|
11459
|
+
index2 == 1 && codeUnit >= 48 && codeUnit <= 57 && firstCodeUnit == 45
|
|
11460
11460
|
) {
|
|
11461
11461
|
result += "\\" + codeUnit.toString(16) + " ";
|
|
11462
11462
|
continue;
|
|
@@ -11464,16 +11464,16 @@ function requireCss_escape() {
|
|
|
11464
11464
|
if (
|
|
11465
11465
|
// If the character is the first character and is a `-` (U+002D), and
|
|
11466
11466
|
// there is no second character, […]
|
|
11467
|
-
|
|
11467
|
+
index2 == 0 && length == 1 && codeUnit == 45
|
|
11468
11468
|
) {
|
|
11469
|
-
result += "\\" + string.charAt(
|
|
11469
|
+
result += "\\" + string.charAt(index2);
|
|
11470
11470
|
continue;
|
|
11471
11471
|
}
|
|
11472
11472
|
if (codeUnit >= 128 || codeUnit == 45 || codeUnit == 95 || codeUnit >= 48 && codeUnit <= 57 || codeUnit >= 65 && codeUnit <= 90 || codeUnit >= 97 && codeUnit <= 122) {
|
|
11473
|
-
result += string.charAt(
|
|
11473
|
+
result += string.charAt(index2);
|
|
11474
11474
|
continue;
|
|
11475
11475
|
}
|
|
11476
|
-
result += "\\" + string.charAt(
|
|
11476
|
+
result += "\\" + string.charAt(index2);
|
|
11477
11477
|
}
|
|
11478
11478
|
return result;
|
|
11479
11479
|
};
|
|
@@ -11487,7 +11487,7 @@ function requireCss_escape() {
|
|
|
11487
11487
|
return css_escape$1.exports;
|
|
11488
11488
|
}
|
|
11489
11489
|
var css_escapeExports = requireCss_escape();
|
|
11490
|
-
const escape = /* @__PURE__ */ getDefaultExportFromCjs(css_escapeExports);
|
|
11490
|
+
const escape = /* @__PURE__ */ getDefaultExportFromCjs$1(css_escapeExports);
|
|
11491
11491
|
class GenericTypeError extends Error {
|
|
11492
11492
|
constructor(expectedString, received, matcherFn, context) {
|
|
11493
11493
|
super();
|
|
@@ -13001,11 +13001,11 @@ function withSafeTimers(getTimers, fn) {
|
|
|
13001
13001
|
const promises = /* @__PURE__ */ new Set();
|
|
13002
13002
|
function createSafeRpc(client2) {
|
|
13003
13003
|
return new Proxy(client2.rpc, {
|
|
13004
|
-
get(target,
|
|
13005
|
-
if (
|
|
13004
|
+
get(target, p2, handler) {
|
|
13005
|
+
if (p2 === "then") {
|
|
13006
13006
|
return;
|
|
13007
13007
|
}
|
|
13008
|
-
const sendCall = get(target,
|
|
13008
|
+
const sendCall = get(target, p2, handler);
|
|
13009
13009
|
const safeSendCall = (...args) => withSafeTimers(getSafeTimers, async () => {
|
|
13010
13010
|
const result = sendCall(...args);
|
|
13011
13011
|
promises.add(result);
|
|
@@ -13165,9 +13165,7 @@ class MockerRegistry {
|
|
|
13165
13165
|
if (typeof typeOrEvent === "object") {
|
|
13166
13166
|
const event = typeOrEvent;
|
|
13167
13167
|
if (event instanceof AutomockedModule || event instanceof AutospiedModule || event instanceof ManualMockedModule || event instanceof RedirectedModule) {
|
|
13168
|
-
throw new TypeError(
|
|
13169
|
-
`[vitest] Cannot register a mock that is already defined. Expected a JSON representation from \`MockedModule.toJSON\`, instead got "${event.type}". Use "registry.add()" to update a mock instead.`
|
|
13170
|
-
);
|
|
13168
|
+
throw new TypeError(`[vitest] Cannot register a mock that is already defined. Expected a JSON representation from \`MockedModule.toJSON\`, instead got "${event.type}". Use "registry.add()" to update a mock instead.`);
|
|
13171
13169
|
}
|
|
13172
13170
|
if (event.type === "automock") {
|
|
13173
13171
|
const module = AutomockedModule.fromJSON(event);
|
|
@@ -13294,16 +13292,12 @@ class ManualMockedModule {
|
|
|
13294
13292
|
try {
|
|
13295
13293
|
exports = await this.factory();
|
|
13296
13294
|
} catch (err) {
|
|
13297
|
-
const vitestError = new Error(
|
|
13298
|
-
'[vitest] There was an error when mocking a module. If you are using "vi.mock" factory, make sure there are no top level variables inside, since this call is hoisted to top of the file. Read more: https://vitest.dev/api/vi.html#vi-mock'
|
|
13299
|
-
);
|
|
13295
|
+
const vitestError = new Error('[vitest] There was an error when mocking a module. If you are using "vi.mock" factory, make sure there are no top level variables inside, since this call is hoisted to top of the file. Read more: https://vitest.dev/api/vi.html#vi-mock');
|
|
13300
13296
|
vitestError.cause = err;
|
|
13301
13297
|
throw vitestError;
|
|
13302
13298
|
}
|
|
13303
13299
|
if (exports === null || typeof exports !== "object" || Array.isArray(exports)) {
|
|
13304
|
-
throw new TypeError(
|
|
13305
|
-
`[vitest] vi.mock("${this.raw}", factory?: () => unknown) is not returning an object. Did you mean to return an object with a "default" key?`
|
|
13306
|
-
);
|
|
13300
|
+
throw new TypeError(`[vitest] vi.mock("${this.raw}", factory?: () => unknown) is not returning an object. Did you mean to return an object with a "default" key?`);
|
|
13307
13301
|
}
|
|
13308
13302
|
return this.cache = exports;
|
|
13309
13303
|
}
|
|
@@ -13332,11 +13326,7 @@ function mockObject(options, object, mockExports = {}) {
|
|
|
13332
13326
|
const mockPropertiesOf = (container, newContainer) => {
|
|
13333
13327
|
const containerType = getType(container);
|
|
13334
13328
|
const isModule = containerType === "Module" || !!container.__esModule;
|
|
13335
|
-
for (const { key: property, descriptor } of getAllMockableProperties(
|
|
13336
|
-
container,
|
|
13337
|
-
isModule,
|
|
13338
|
-
options.globalConstructors
|
|
13339
|
-
)) {
|
|
13329
|
+
for (const { key: property, descriptor } of getAllMockableProperties(container, isModule, options.globalConstructors)) {
|
|
13340
13330
|
if (!isModule && descriptor.get) {
|
|
13341
13331
|
try {
|
|
13342
13332
|
Object.defineProperty(newContainer, property, descriptor);
|
|
@@ -13350,9 +13340,7 @@ function mockObject(options, object, mockExports = {}) {
|
|
|
13350
13340
|
const value = container[property];
|
|
13351
13341
|
const refId = refs.getId(value);
|
|
13352
13342
|
if (refId !== void 0) {
|
|
13353
|
-
finalizers.push(
|
|
13354
|
-
() => define(newContainer, property, refs.getMockedValue(refId))
|
|
13355
|
-
);
|
|
13343
|
+
finalizers.push(() => define(newContainer, property, refs.getMockedValue(refId)));
|
|
13356
13344
|
continue;
|
|
13357
13345
|
}
|
|
13358
13346
|
const type = getType(value);
|
|
@@ -13369,13 +13357,9 @@ function mockObject(options, object, mockExports = {}) {
|
|
|
13369
13357
|
continue;
|
|
13370
13358
|
}
|
|
13371
13359
|
if (isFunction) {
|
|
13372
|
-
let
|
|
13360
|
+
let mockFunction = function() {
|
|
13373
13361
|
if (this instanceof newContainer[property]) {
|
|
13374
|
-
for (const { key, descriptor: descriptor2 } of getAllMockableProperties(
|
|
13375
|
-
this,
|
|
13376
|
-
false,
|
|
13377
|
-
options.globalConstructors
|
|
13378
|
-
)) {
|
|
13362
|
+
for (const { key, descriptor: descriptor2 } of getAllMockableProperties(this, false, options.globalConstructors)) {
|
|
13379
13363
|
if (descriptor2.get) {
|
|
13380
13364
|
continue;
|
|
13381
13365
|
}
|
|
@@ -13396,18 +13380,16 @@ function mockObject(options, object, mockExports = {}) {
|
|
|
13396
13380
|
}
|
|
13397
13381
|
};
|
|
13398
13382
|
if (!options.spyOn) {
|
|
13399
|
-
throw new Error(
|
|
13400
|
-
"[@vitest/mocker] `spyOn` is not defined. This is a Vitest error. Please open a new issue with reproduction."
|
|
13401
|
-
);
|
|
13383
|
+
throw new Error("[@vitest/mocker] `spyOn` is not defined. This is a Vitest error. Please open a new issue with reproduction.");
|
|
13402
13384
|
}
|
|
13403
13385
|
const spyOn = options.spyOn;
|
|
13404
13386
|
const mock = spyOn(newContainer, property);
|
|
13405
13387
|
if (options.type === "automock") {
|
|
13406
|
-
mock.mockImplementation(
|
|
13388
|
+
mock.mockImplementation(mockFunction);
|
|
13407
13389
|
const origMockReset = mock.mockReset;
|
|
13408
13390
|
mock.mockRestore = mock.mockReset = () => {
|
|
13409
13391
|
origMockReset.call(mock);
|
|
13410
|
-
mock.mockImplementation(
|
|
13392
|
+
mock.mockImplementation(mockFunction);
|
|
13411
13393
|
return mock;
|
|
13412
13394
|
};
|
|
13413
13395
|
}
|
|
@@ -13446,7 +13428,13 @@ function getType(value) {
|
|
|
13446
13428
|
return Object.prototype.toString.apply(value).slice(8, -1);
|
|
13447
13429
|
}
|
|
13448
13430
|
function isSpecialProp(prop, parentType) {
|
|
13449
|
-
return parentType.includes("Function") && typeof prop === "string" && [
|
|
13431
|
+
return parentType.includes("Function") && typeof prop === "string" && [
|
|
13432
|
+
"arguments",
|
|
13433
|
+
"callee",
|
|
13434
|
+
"caller",
|
|
13435
|
+
"length",
|
|
13436
|
+
"name"
|
|
13437
|
+
].includes(prop);
|
|
13450
13438
|
}
|
|
13451
13439
|
function getAllMockableProperties(obj, isModule, constructors) {
|
|
13452
13440
|
const { Map: Map2, Object: Object2, Function: Function2, RegExp: RegExp2, Array: Array2 } = constructors;
|
|
@@ -13459,14 +13447,20 @@ function getAllMockableProperties(obj, isModule, constructors) {
|
|
|
13459
13447
|
collectOwnProperties(curr, (key) => {
|
|
13460
13448
|
const descriptor = Object2.getOwnPropertyDescriptor(curr, key);
|
|
13461
13449
|
if (descriptor) {
|
|
13462
|
-
allProps.set(key, {
|
|
13450
|
+
allProps.set(key, {
|
|
13451
|
+
key,
|
|
13452
|
+
descriptor
|
|
13453
|
+
});
|
|
13463
13454
|
}
|
|
13464
13455
|
});
|
|
13465
13456
|
} while (curr = Object2.getPrototypeOf(curr));
|
|
13466
13457
|
if (isModule && !allProps.has("default") && "default" in obj) {
|
|
13467
13458
|
const descriptor = Object2.getOwnPropertyDescriptor(obj, "default");
|
|
13468
13459
|
if (descriptor) {
|
|
13469
|
-
allProps.set("default", {
|
|
13460
|
+
allProps.set("default", {
|
|
13461
|
+
key: "default",
|
|
13462
|
+
descriptor
|
|
13463
|
+
});
|
|
13470
13464
|
}
|
|
13471
13465
|
}
|
|
13472
13466
|
return Array2.from(allProps.values());
|
|
@@ -13543,16 +13537,16 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
13543
13537
|
let lastSlash = -1;
|
|
13544
13538
|
let dots = 0;
|
|
13545
13539
|
let char = null;
|
|
13546
|
-
for (let
|
|
13547
|
-
if (
|
|
13548
|
-
char = path[
|
|
13540
|
+
for (let index2 = 0; index2 <= path.length; ++index2) {
|
|
13541
|
+
if (index2 < path.length) {
|
|
13542
|
+
char = path[index2];
|
|
13549
13543
|
} else if (char === "/") {
|
|
13550
13544
|
break;
|
|
13551
13545
|
} else {
|
|
13552
13546
|
char = "/";
|
|
13553
13547
|
}
|
|
13554
13548
|
if (char === "/") {
|
|
13555
|
-
if (lastSlash ===
|
|
13549
|
+
if (lastSlash === index2 - 1 || dots === 1) ;
|
|
13556
13550
|
else if (dots === 2) {
|
|
13557
13551
|
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
13558
13552
|
if (res.length > 2) {
|
|
@@ -13564,13 +13558,13 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
13564
13558
|
res = res.slice(0, lastSlashIndex);
|
|
13565
13559
|
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
13566
13560
|
}
|
|
13567
|
-
lastSlash =
|
|
13561
|
+
lastSlash = index2;
|
|
13568
13562
|
dots = 0;
|
|
13569
13563
|
continue;
|
|
13570
13564
|
} else if (res.length > 0) {
|
|
13571
13565
|
res = "";
|
|
13572
13566
|
lastSegmentLength = 0;
|
|
13573
|
-
lastSlash =
|
|
13567
|
+
lastSlash = index2;
|
|
13574
13568
|
dots = 0;
|
|
13575
13569
|
continue;
|
|
13576
13570
|
}
|
|
@@ -13581,13 +13575,13 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
13581
13575
|
}
|
|
13582
13576
|
} else {
|
|
13583
13577
|
if (res.length > 0) {
|
|
13584
|
-
res += `/${path.slice(lastSlash + 1,
|
|
13578
|
+
res += `/${path.slice(lastSlash + 1, index2)}`;
|
|
13585
13579
|
} else {
|
|
13586
|
-
res = path.slice(lastSlash + 1,
|
|
13580
|
+
res = path.slice(lastSlash + 1, index2);
|
|
13587
13581
|
}
|
|
13588
|
-
lastSegmentLength =
|
|
13582
|
+
lastSegmentLength = index2 - lastSlash - 1;
|
|
13589
13583
|
}
|
|
13590
|
-
lastSlash =
|
|
13584
|
+
lastSlash = index2;
|
|
13591
13585
|
dots = 0;
|
|
13592
13586
|
} else if (char === "." && dots !== -1) {
|
|
13593
13587
|
++dots;
|
|
@@ -13597,14 +13591,831 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
13597
13591
|
}
|
|
13598
13592
|
return res;
|
|
13599
13593
|
}
|
|
13600
|
-
const isAbsolute = function(
|
|
13601
|
-
return _IS_ABSOLUTE_RE.test(
|
|
13594
|
+
const isAbsolute = function(p2) {
|
|
13595
|
+
return _IS_ABSOLUTE_RE.test(p2);
|
|
13602
13596
|
};
|
|
13603
|
-
const extname = function(
|
|
13604
|
-
if (
|
|
13605
|
-
const match = _EXTNAME_RE.exec(normalizeWindowsPath(
|
|
13597
|
+
const extname = function(p2) {
|
|
13598
|
+
if (p2 === "..") return "";
|
|
13599
|
+
const match = _EXTNAME_RE.exec(normalizeWindowsPath(p2));
|
|
13606
13600
|
return match && match[1] || "";
|
|
13607
13601
|
};
|
|
13602
|
+
var f = {
|
|
13603
|
+
reset: [0, 0],
|
|
13604
|
+
bold: [1, 22, "\x1B[22m\x1B[1m"],
|
|
13605
|
+
dim: [2, 22, "\x1B[22m\x1B[2m"],
|
|
13606
|
+
italic: [3, 23],
|
|
13607
|
+
underline: [4, 24],
|
|
13608
|
+
inverse: [7, 27],
|
|
13609
|
+
hidden: [8, 28],
|
|
13610
|
+
strikethrough: [9, 29],
|
|
13611
|
+
black: [30, 39],
|
|
13612
|
+
red: [31, 39],
|
|
13613
|
+
green: [32, 39],
|
|
13614
|
+
yellow: [33, 39],
|
|
13615
|
+
blue: [34, 39],
|
|
13616
|
+
magenta: [35, 39],
|
|
13617
|
+
cyan: [36, 39],
|
|
13618
|
+
white: [37, 39],
|
|
13619
|
+
gray: [90, 39],
|
|
13620
|
+
bgBlack: [40, 49],
|
|
13621
|
+
bgRed: [41, 49],
|
|
13622
|
+
bgGreen: [42, 49],
|
|
13623
|
+
bgYellow: [43, 49],
|
|
13624
|
+
bgBlue: [44, 49],
|
|
13625
|
+
bgMagenta: [45, 49],
|
|
13626
|
+
bgCyan: [46, 49],
|
|
13627
|
+
bgWhite: [47, 49],
|
|
13628
|
+
blackBright: [90, 39],
|
|
13629
|
+
redBright: [91, 39],
|
|
13630
|
+
greenBright: [92, 39],
|
|
13631
|
+
yellowBright: [93, 39],
|
|
13632
|
+
blueBright: [94, 39],
|
|
13633
|
+
magentaBright: [95, 39],
|
|
13634
|
+
cyanBright: [96, 39],
|
|
13635
|
+
whiteBright: [97, 39],
|
|
13636
|
+
bgBlackBright: [100, 49],
|
|
13637
|
+
bgRedBright: [101, 49],
|
|
13638
|
+
bgGreenBright: [102, 49],
|
|
13639
|
+
bgYellowBright: [103, 49],
|
|
13640
|
+
bgBlueBright: [104, 49],
|
|
13641
|
+
bgMagentaBright: [105, 49],
|
|
13642
|
+
bgCyanBright: [106, 49],
|
|
13643
|
+
bgWhiteBright: [107, 49]
|
|
13644
|
+
}, h = Object.entries(f);
|
|
13645
|
+
function a(n) {
|
|
13646
|
+
return String(n);
|
|
13647
|
+
}
|
|
13648
|
+
a.open = "";
|
|
13649
|
+
a.close = "";
|
|
13650
|
+
function C(n = false) {
|
|
13651
|
+
let e = typeof process != "undefined" ? process : void 0, i = (e == null ? void 0 : e.env) || {}, g = (e == null ? void 0 : e.argv) || [];
|
|
13652
|
+
return !("NO_COLOR" in i || g.includes("--no-color")) && ("FORCE_COLOR" in i || g.includes("--color") || (e == null ? void 0 : e.platform) === "win32" || n && i.TERM !== "dumb" || "CI" in i) || typeof window != "undefined" && !!window.chrome;
|
|
13653
|
+
}
|
|
13654
|
+
function p(n = false) {
|
|
13655
|
+
let e = C(n), i = (r, t, c, o) => {
|
|
13656
|
+
let l = "", s = 0;
|
|
13657
|
+
do
|
|
13658
|
+
l += r.substring(s, o) + c, s = o + t.length, o = r.indexOf(t, s);
|
|
13659
|
+
while (~o);
|
|
13660
|
+
return l + r.substring(s);
|
|
13661
|
+
}, g = (r, t, c = r) => {
|
|
13662
|
+
let o = (l) => {
|
|
13663
|
+
let s = String(l), b = s.indexOf(t, r.length);
|
|
13664
|
+
return ~b ? r + i(s, t, c, b) + t : r + s + t;
|
|
13665
|
+
};
|
|
13666
|
+
return o.open = r, o.close = t, o;
|
|
13667
|
+
}, u = {
|
|
13668
|
+
isColorSupported: e
|
|
13669
|
+
}, d = (r) => `\x1B[${r}m`;
|
|
13670
|
+
for (let [r, t] of h)
|
|
13671
|
+
u[r] = e ? g(
|
|
13672
|
+
d(t[0]),
|
|
13673
|
+
d(t[1]),
|
|
13674
|
+
t[2]
|
|
13675
|
+
) : a;
|
|
13676
|
+
return u;
|
|
13677
|
+
}
|
|
13678
|
+
p();
|
|
13679
|
+
function _mergeNamespaces(n, m) {
|
|
13680
|
+
m.forEach(function(e) {
|
|
13681
|
+
e && typeof e !== "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
|
|
13682
|
+
if (k !== "default" && !(k in n)) {
|
|
13683
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13684
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13685
|
+
enumerable: true,
|
|
13686
|
+
get: function() {
|
|
13687
|
+
return e[k];
|
|
13688
|
+
}
|
|
13689
|
+
});
|
|
13690
|
+
}
|
|
13691
|
+
});
|
|
13692
|
+
});
|
|
13693
|
+
return Object.freeze(n);
|
|
13694
|
+
}
|
|
13695
|
+
function getDefaultExportFromCjs(x) {
|
|
13696
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
13697
|
+
}
|
|
13698
|
+
var reactIs$1 = { exports: {} };
|
|
13699
|
+
var reactIs_production = {};
|
|
13700
|
+
/**
|
|
13701
|
+
* @license React
|
|
13702
|
+
* react-is.production.js
|
|
13703
|
+
*
|
|
13704
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
13705
|
+
*
|
|
13706
|
+
* This source code is licensed under the MIT license found in the
|
|
13707
|
+
* LICENSE file in the root directory of this source tree.
|
|
13708
|
+
*/
|
|
13709
|
+
var hasRequiredReactIs_production;
|
|
13710
|
+
function requireReactIs_production() {
|
|
13711
|
+
if (hasRequiredReactIs_production) return reactIs_production;
|
|
13712
|
+
hasRequiredReactIs_production = 1;
|
|
13713
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
13714
|
+
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
|
|
13715
|
+
function typeOf(object) {
|
|
13716
|
+
if ("object" === typeof object && null !== object) {
|
|
13717
|
+
var $$typeof = object.$$typeof;
|
|
13718
|
+
switch ($$typeof) {
|
|
13719
|
+
case REACT_ELEMENT_TYPE:
|
|
13720
|
+
switch (object = object.type, object) {
|
|
13721
|
+
case REACT_FRAGMENT_TYPE:
|
|
13722
|
+
case REACT_PROFILER_TYPE:
|
|
13723
|
+
case REACT_STRICT_MODE_TYPE:
|
|
13724
|
+
case REACT_SUSPENSE_TYPE:
|
|
13725
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
13726
|
+
return object;
|
|
13727
|
+
default:
|
|
13728
|
+
switch (object = object && object.$$typeof, object) {
|
|
13729
|
+
case REACT_CONTEXT_TYPE:
|
|
13730
|
+
case REACT_FORWARD_REF_TYPE:
|
|
13731
|
+
case REACT_LAZY_TYPE:
|
|
13732
|
+
case REACT_MEMO_TYPE:
|
|
13733
|
+
return object;
|
|
13734
|
+
case REACT_CONSUMER_TYPE:
|
|
13735
|
+
return object;
|
|
13736
|
+
default:
|
|
13737
|
+
return $$typeof;
|
|
13738
|
+
}
|
|
13739
|
+
}
|
|
13740
|
+
case REACT_PORTAL_TYPE:
|
|
13741
|
+
return $$typeof;
|
|
13742
|
+
}
|
|
13743
|
+
}
|
|
13744
|
+
}
|
|
13745
|
+
reactIs_production.ContextConsumer = REACT_CONSUMER_TYPE;
|
|
13746
|
+
reactIs_production.ContextProvider = REACT_CONTEXT_TYPE;
|
|
13747
|
+
reactIs_production.Element = REACT_ELEMENT_TYPE;
|
|
13748
|
+
reactIs_production.ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
13749
|
+
reactIs_production.Fragment = REACT_FRAGMENT_TYPE;
|
|
13750
|
+
reactIs_production.Lazy = REACT_LAZY_TYPE;
|
|
13751
|
+
reactIs_production.Memo = REACT_MEMO_TYPE;
|
|
13752
|
+
reactIs_production.Portal = REACT_PORTAL_TYPE;
|
|
13753
|
+
reactIs_production.Profiler = REACT_PROFILER_TYPE;
|
|
13754
|
+
reactIs_production.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
13755
|
+
reactIs_production.Suspense = REACT_SUSPENSE_TYPE;
|
|
13756
|
+
reactIs_production.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
13757
|
+
reactIs_production.isContextConsumer = function(object) {
|
|
13758
|
+
return typeOf(object) === REACT_CONSUMER_TYPE;
|
|
13759
|
+
};
|
|
13760
|
+
reactIs_production.isContextProvider = function(object) {
|
|
13761
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
13762
|
+
};
|
|
13763
|
+
reactIs_production.isElement = function(object) {
|
|
13764
|
+
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
13765
|
+
};
|
|
13766
|
+
reactIs_production.isForwardRef = function(object) {
|
|
13767
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
13768
|
+
};
|
|
13769
|
+
reactIs_production.isFragment = function(object) {
|
|
13770
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
13771
|
+
};
|
|
13772
|
+
reactIs_production.isLazy = function(object) {
|
|
13773
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
13774
|
+
};
|
|
13775
|
+
reactIs_production.isMemo = function(object) {
|
|
13776
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
13777
|
+
};
|
|
13778
|
+
reactIs_production.isPortal = function(object) {
|
|
13779
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
13780
|
+
};
|
|
13781
|
+
reactIs_production.isProfiler = function(object) {
|
|
13782
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
13783
|
+
};
|
|
13784
|
+
reactIs_production.isStrictMode = function(object) {
|
|
13785
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
13786
|
+
};
|
|
13787
|
+
reactIs_production.isSuspense = function(object) {
|
|
13788
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
13789
|
+
};
|
|
13790
|
+
reactIs_production.isSuspenseList = function(object) {
|
|
13791
|
+
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
|
13792
|
+
};
|
|
13793
|
+
reactIs_production.isValidElementType = function(type) {
|
|
13794
|
+
return "string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_OFFSCREEN_TYPE || "object" === typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type.getModuleId) ? true : false;
|
|
13795
|
+
};
|
|
13796
|
+
reactIs_production.typeOf = typeOf;
|
|
13797
|
+
return reactIs_production;
|
|
13798
|
+
}
|
|
13799
|
+
var hasRequiredReactIs$1;
|
|
13800
|
+
function requireReactIs$1() {
|
|
13801
|
+
if (hasRequiredReactIs$1) return reactIs$1.exports;
|
|
13802
|
+
hasRequiredReactIs$1 = 1;
|
|
13803
|
+
{
|
|
13804
|
+
reactIs$1.exports = requireReactIs_production();
|
|
13805
|
+
}
|
|
13806
|
+
return reactIs$1.exports;
|
|
13807
|
+
}
|
|
13808
|
+
var reactIsExports$1 = requireReactIs$1();
|
|
13809
|
+
var index$1 = /* @__PURE__ */ getDefaultExportFromCjs(reactIsExports$1);
|
|
13810
|
+
var ReactIs19 = /* @__PURE__ */ _mergeNamespaces({
|
|
13811
|
+
__proto__: null,
|
|
13812
|
+
default: index$1
|
|
13813
|
+
}, [reactIsExports$1]);
|
|
13814
|
+
var reactIs = { exports: {} };
|
|
13815
|
+
var reactIs_production_min = {};
|
|
13816
|
+
/**
|
|
13817
|
+
* @license React
|
|
13818
|
+
* react-is.production.min.js
|
|
13819
|
+
*
|
|
13820
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
13821
|
+
*
|
|
13822
|
+
* This source code is licensed under the MIT license found in the
|
|
13823
|
+
* LICENSE file in the root directory of this source tree.
|
|
13824
|
+
*/
|
|
13825
|
+
var hasRequiredReactIs_production_min;
|
|
13826
|
+
function requireReactIs_production_min() {
|
|
13827
|
+
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
13828
|
+
hasRequiredReactIs_production_min = 1;
|
|
13829
|
+
var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f2 = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h2 = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p2 = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u;
|
|
13830
|
+
u = Symbol.for("react.module.reference");
|
|
13831
|
+
function v(a2) {
|
|
13832
|
+
if ("object" === typeof a2 && null !== a2) {
|
|
13833
|
+
var r = a2.$$typeof;
|
|
13834
|
+
switch (r) {
|
|
13835
|
+
case b:
|
|
13836
|
+
switch (a2 = a2.type, a2) {
|
|
13837
|
+
case d:
|
|
13838
|
+
case f2:
|
|
13839
|
+
case e:
|
|
13840
|
+
case m:
|
|
13841
|
+
case n:
|
|
13842
|
+
return a2;
|
|
13843
|
+
default:
|
|
13844
|
+
switch (a2 = a2 && a2.$$typeof, a2) {
|
|
13845
|
+
case k:
|
|
13846
|
+
case h2:
|
|
13847
|
+
case l:
|
|
13848
|
+
case q:
|
|
13849
|
+
case p2:
|
|
13850
|
+
case g:
|
|
13851
|
+
return a2;
|
|
13852
|
+
default:
|
|
13853
|
+
return r;
|
|
13854
|
+
}
|
|
13855
|
+
}
|
|
13856
|
+
case c:
|
|
13857
|
+
return r;
|
|
13858
|
+
}
|
|
13859
|
+
}
|
|
13860
|
+
}
|
|
13861
|
+
reactIs_production_min.ContextConsumer = h2;
|
|
13862
|
+
reactIs_production_min.ContextProvider = g;
|
|
13863
|
+
reactIs_production_min.Element = b;
|
|
13864
|
+
reactIs_production_min.ForwardRef = l;
|
|
13865
|
+
reactIs_production_min.Fragment = d;
|
|
13866
|
+
reactIs_production_min.Lazy = q;
|
|
13867
|
+
reactIs_production_min.Memo = p2;
|
|
13868
|
+
reactIs_production_min.Portal = c;
|
|
13869
|
+
reactIs_production_min.Profiler = f2;
|
|
13870
|
+
reactIs_production_min.StrictMode = e;
|
|
13871
|
+
reactIs_production_min.Suspense = m;
|
|
13872
|
+
reactIs_production_min.SuspenseList = n;
|
|
13873
|
+
reactIs_production_min.isAsyncMode = function() {
|
|
13874
|
+
return false;
|
|
13875
|
+
};
|
|
13876
|
+
reactIs_production_min.isConcurrentMode = function() {
|
|
13877
|
+
return false;
|
|
13878
|
+
};
|
|
13879
|
+
reactIs_production_min.isContextConsumer = function(a2) {
|
|
13880
|
+
return v(a2) === h2;
|
|
13881
|
+
};
|
|
13882
|
+
reactIs_production_min.isContextProvider = function(a2) {
|
|
13883
|
+
return v(a2) === g;
|
|
13884
|
+
};
|
|
13885
|
+
reactIs_production_min.isElement = function(a2) {
|
|
13886
|
+
return "object" === typeof a2 && null !== a2 && a2.$$typeof === b;
|
|
13887
|
+
};
|
|
13888
|
+
reactIs_production_min.isForwardRef = function(a2) {
|
|
13889
|
+
return v(a2) === l;
|
|
13890
|
+
};
|
|
13891
|
+
reactIs_production_min.isFragment = function(a2) {
|
|
13892
|
+
return v(a2) === d;
|
|
13893
|
+
};
|
|
13894
|
+
reactIs_production_min.isLazy = function(a2) {
|
|
13895
|
+
return v(a2) === q;
|
|
13896
|
+
};
|
|
13897
|
+
reactIs_production_min.isMemo = function(a2) {
|
|
13898
|
+
return v(a2) === p2;
|
|
13899
|
+
};
|
|
13900
|
+
reactIs_production_min.isPortal = function(a2) {
|
|
13901
|
+
return v(a2) === c;
|
|
13902
|
+
};
|
|
13903
|
+
reactIs_production_min.isProfiler = function(a2) {
|
|
13904
|
+
return v(a2) === f2;
|
|
13905
|
+
};
|
|
13906
|
+
reactIs_production_min.isStrictMode = function(a2) {
|
|
13907
|
+
return v(a2) === e;
|
|
13908
|
+
};
|
|
13909
|
+
reactIs_production_min.isSuspense = function(a2) {
|
|
13910
|
+
return v(a2) === m;
|
|
13911
|
+
};
|
|
13912
|
+
reactIs_production_min.isSuspenseList = function(a2) {
|
|
13913
|
+
return v(a2) === n;
|
|
13914
|
+
};
|
|
13915
|
+
reactIs_production_min.isValidElementType = function(a2) {
|
|
13916
|
+
return "string" === typeof a2 || "function" === typeof a2 || a2 === d || a2 === f2 || a2 === e || a2 === m || a2 === n || a2 === t || "object" === typeof a2 && null !== a2 && (a2.$$typeof === q || a2.$$typeof === p2 || a2.$$typeof === g || a2.$$typeof === h2 || a2.$$typeof === l || a2.$$typeof === u || void 0 !== a2.getModuleId) ? true : false;
|
|
13917
|
+
};
|
|
13918
|
+
reactIs_production_min.typeOf = v;
|
|
13919
|
+
return reactIs_production_min;
|
|
13920
|
+
}
|
|
13921
|
+
var hasRequiredReactIs;
|
|
13922
|
+
function requireReactIs() {
|
|
13923
|
+
if (hasRequiredReactIs) return reactIs.exports;
|
|
13924
|
+
hasRequiredReactIs = 1;
|
|
13925
|
+
{
|
|
13926
|
+
reactIs.exports = requireReactIs_production_min();
|
|
13927
|
+
}
|
|
13928
|
+
return reactIs.exports;
|
|
13929
|
+
}
|
|
13930
|
+
var reactIsExports = requireReactIs();
|
|
13931
|
+
var index = /* @__PURE__ */ getDefaultExportFromCjs(reactIsExports);
|
|
13932
|
+
var ReactIs18 = /* @__PURE__ */ _mergeNamespaces({
|
|
13933
|
+
__proto__: null,
|
|
13934
|
+
default: index
|
|
13935
|
+
}, [reactIsExports]);
|
|
13936
|
+
const reactIsMethods = [
|
|
13937
|
+
"isAsyncMode",
|
|
13938
|
+
"isConcurrentMode",
|
|
13939
|
+
"isContextConsumer",
|
|
13940
|
+
"isContextProvider",
|
|
13941
|
+
"isElement",
|
|
13942
|
+
"isForwardRef",
|
|
13943
|
+
"isFragment",
|
|
13944
|
+
"isLazy",
|
|
13945
|
+
"isMemo",
|
|
13946
|
+
"isPortal",
|
|
13947
|
+
"isProfiler",
|
|
13948
|
+
"isStrictMode",
|
|
13949
|
+
"isSuspense",
|
|
13950
|
+
"isSuspenseList",
|
|
13951
|
+
"isValidElementType"
|
|
13952
|
+
];
|
|
13953
|
+
Object.fromEntries(reactIsMethods.map((m) => [m, (v) => ReactIs18[m](v) || ReactIs19[m](v)]));
|
|
13954
|
+
let getPromiseValue = () => "Promise{…}";
|
|
13955
|
+
try {
|
|
13956
|
+
const { getPromiseDetails, kPending, kRejected } = process.binding("util");
|
|
13957
|
+
if (Array.isArray(getPromiseDetails(Promise.resolve()))) {
|
|
13958
|
+
getPromiseValue = (value, options) => {
|
|
13959
|
+
const [state, innerValue] = getPromiseDetails(value);
|
|
13960
|
+
if (state === kPending) {
|
|
13961
|
+
return "Promise{<pending>}";
|
|
13962
|
+
}
|
|
13963
|
+
return `Promise${state === kRejected ? "!" : ""}{${options.inspect(innerValue, options)}}`;
|
|
13964
|
+
};
|
|
13965
|
+
}
|
|
13966
|
+
} catch (notNode) {
|
|
13967
|
+
}
|
|
13968
|
+
let nodeInspect = false;
|
|
13969
|
+
try {
|
|
13970
|
+
const nodeUtil = require("util");
|
|
13971
|
+
nodeInspect = nodeUtil.inspect ? nodeUtil.inspect.custom : false;
|
|
13972
|
+
} catch (noNodeInspect) {
|
|
13973
|
+
nodeInspect = false;
|
|
13974
|
+
}
|
|
13975
|
+
var jsTokens_1;
|
|
13976
|
+
var hasRequiredJsTokens;
|
|
13977
|
+
function requireJsTokens() {
|
|
13978
|
+
if (hasRequiredJsTokens) return jsTokens_1;
|
|
13979
|
+
hasRequiredJsTokens = 1;
|
|
13980
|
+
var Identifier, JSXIdentifier, JSXPunctuator, JSXString, JSXText, KeywordsWithExpressionAfter, KeywordsWithNoLineTerminatorAfter, LineTerminatorSequence, MultiLineComment, Newline, NumericLiteral, Punctuator, RegularExpressionLiteral, SingleLineComment, StringLiteral, Template, TokensNotPrecedingObjectLiteral, TokensPrecedingExpression, WhiteSpace;
|
|
13981
|
+
RegularExpressionLiteral = /\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy;
|
|
13982
|
+
Punctuator = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;
|
|
13983
|
+
Identifier = /(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/uy;
|
|
13984
|
+
StringLiteral = /(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y;
|
|
13985
|
+
NumericLiteral = /(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y;
|
|
13986
|
+
Template = /[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y;
|
|
13987
|
+
WhiteSpace = /[\t\v\f\ufeff\p{Zs}]+/uy;
|
|
13988
|
+
LineTerminatorSequence = /\r?\n|[\r\u2028\u2029]/y;
|
|
13989
|
+
MultiLineComment = /\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y;
|
|
13990
|
+
SingleLineComment = /\/\/.*/y;
|
|
13991
|
+
JSXPunctuator = /[<>.:={}]|\/(?![\/*])/y;
|
|
13992
|
+
JSXIdentifier = /[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/uy;
|
|
13993
|
+
JSXString = /(['"])(?:(?!\1)[^])*(\1)?/y;
|
|
13994
|
+
JSXText = /[^<>{}]+/y;
|
|
13995
|
+
TokensPrecedingExpression = /^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;
|
|
13996
|
+
TokensNotPrecedingObjectLiteral = /^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;
|
|
13997
|
+
KeywordsWithExpressionAfter = /^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;
|
|
13998
|
+
KeywordsWithNoLineTerminatorAfter = /^(?:return|throw|yield)$/;
|
|
13999
|
+
Newline = RegExp(LineTerminatorSequence.source);
|
|
14000
|
+
jsTokens_1 = function* (input, { jsx = false } = {}) {
|
|
14001
|
+
var braces, firstCodePoint, isExpression, lastIndex, lastSignificantToken, length, match, mode, nextLastIndex, nextLastSignificantToken, parenNesting, postfixIncDec, punctuator, stack;
|
|
14002
|
+
({ length } = input);
|
|
14003
|
+
lastIndex = 0;
|
|
14004
|
+
lastSignificantToken = "";
|
|
14005
|
+
stack = [{ tag: "JS" }];
|
|
14006
|
+
braces = [];
|
|
14007
|
+
parenNesting = 0;
|
|
14008
|
+
postfixIncDec = false;
|
|
14009
|
+
while (lastIndex < length) {
|
|
14010
|
+
mode = stack[stack.length - 1];
|
|
14011
|
+
switch (mode.tag) {
|
|
14012
|
+
case "JS":
|
|
14013
|
+
case "JSNonExpressionParen":
|
|
14014
|
+
case "InterpolationInTemplate":
|
|
14015
|
+
case "InterpolationInJSX":
|
|
14016
|
+
if (input[lastIndex] === "/" && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) {
|
|
14017
|
+
RegularExpressionLiteral.lastIndex = lastIndex;
|
|
14018
|
+
if (match = RegularExpressionLiteral.exec(input)) {
|
|
14019
|
+
lastIndex = RegularExpressionLiteral.lastIndex;
|
|
14020
|
+
lastSignificantToken = match[0];
|
|
14021
|
+
postfixIncDec = true;
|
|
14022
|
+
yield {
|
|
14023
|
+
type: "RegularExpressionLiteral",
|
|
14024
|
+
value: match[0],
|
|
14025
|
+
closed: match[1] !== void 0 && match[1] !== "\\"
|
|
14026
|
+
};
|
|
14027
|
+
continue;
|
|
14028
|
+
}
|
|
14029
|
+
}
|
|
14030
|
+
Punctuator.lastIndex = lastIndex;
|
|
14031
|
+
if (match = Punctuator.exec(input)) {
|
|
14032
|
+
punctuator = match[0];
|
|
14033
|
+
nextLastIndex = Punctuator.lastIndex;
|
|
14034
|
+
nextLastSignificantToken = punctuator;
|
|
14035
|
+
switch (punctuator) {
|
|
14036
|
+
case "(":
|
|
14037
|
+
if (lastSignificantToken === "?NonExpressionParenKeyword") {
|
|
14038
|
+
stack.push({
|
|
14039
|
+
tag: "JSNonExpressionParen",
|
|
14040
|
+
nesting: parenNesting
|
|
14041
|
+
});
|
|
14042
|
+
}
|
|
14043
|
+
parenNesting++;
|
|
14044
|
+
postfixIncDec = false;
|
|
14045
|
+
break;
|
|
14046
|
+
case ")":
|
|
14047
|
+
parenNesting--;
|
|
14048
|
+
postfixIncDec = true;
|
|
14049
|
+
if (mode.tag === "JSNonExpressionParen" && parenNesting === mode.nesting) {
|
|
14050
|
+
stack.pop();
|
|
14051
|
+
nextLastSignificantToken = "?NonExpressionParenEnd";
|
|
14052
|
+
postfixIncDec = false;
|
|
14053
|
+
}
|
|
14054
|
+
break;
|
|
14055
|
+
case "{":
|
|
14056
|
+
Punctuator.lastIndex = 0;
|
|
14057
|
+
isExpression = !TokensNotPrecedingObjectLiteral.test(lastSignificantToken) && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken));
|
|
14058
|
+
braces.push(isExpression);
|
|
14059
|
+
postfixIncDec = false;
|
|
14060
|
+
break;
|
|
14061
|
+
case "}":
|
|
14062
|
+
switch (mode.tag) {
|
|
14063
|
+
case "InterpolationInTemplate":
|
|
14064
|
+
if (braces.length === mode.nesting) {
|
|
14065
|
+
Template.lastIndex = lastIndex;
|
|
14066
|
+
match = Template.exec(input);
|
|
14067
|
+
lastIndex = Template.lastIndex;
|
|
14068
|
+
lastSignificantToken = match[0];
|
|
14069
|
+
if (match[1] === "${") {
|
|
14070
|
+
lastSignificantToken = "?InterpolationInTemplate";
|
|
14071
|
+
postfixIncDec = false;
|
|
14072
|
+
yield {
|
|
14073
|
+
type: "TemplateMiddle",
|
|
14074
|
+
value: match[0]
|
|
14075
|
+
};
|
|
14076
|
+
} else {
|
|
14077
|
+
stack.pop();
|
|
14078
|
+
postfixIncDec = true;
|
|
14079
|
+
yield {
|
|
14080
|
+
type: "TemplateTail",
|
|
14081
|
+
value: match[0],
|
|
14082
|
+
closed: match[1] === "`"
|
|
14083
|
+
};
|
|
14084
|
+
}
|
|
14085
|
+
continue;
|
|
14086
|
+
}
|
|
14087
|
+
break;
|
|
14088
|
+
case "InterpolationInJSX":
|
|
14089
|
+
if (braces.length === mode.nesting) {
|
|
14090
|
+
stack.pop();
|
|
14091
|
+
lastIndex += 1;
|
|
14092
|
+
lastSignificantToken = "}";
|
|
14093
|
+
yield {
|
|
14094
|
+
type: "JSXPunctuator",
|
|
14095
|
+
value: "}"
|
|
14096
|
+
};
|
|
14097
|
+
continue;
|
|
14098
|
+
}
|
|
14099
|
+
}
|
|
14100
|
+
postfixIncDec = braces.pop();
|
|
14101
|
+
nextLastSignificantToken = postfixIncDec ? "?ExpressionBraceEnd" : "}";
|
|
14102
|
+
break;
|
|
14103
|
+
case "]":
|
|
14104
|
+
postfixIncDec = true;
|
|
14105
|
+
break;
|
|
14106
|
+
case "++":
|
|
14107
|
+
case "--":
|
|
14108
|
+
nextLastSignificantToken = postfixIncDec ? "?PostfixIncDec" : "?UnaryIncDec";
|
|
14109
|
+
break;
|
|
14110
|
+
case "<":
|
|
14111
|
+
if (jsx && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) {
|
|
14112
|
+
stack.push({ tag: "JSXTag" });
|
|
14113
|
+
lastIndex += 1;
|
|
14114
|
+
lastSignificantToken = "<";
|
|
14115
|
+
yield {
|
|
14116
|
+
type: "JSXPunctuator",
|
|
14117
|
+
value: punctuator
|
|
14118
|
+
};
|
|
14119
|
+
continue;
|
|
14120
|
+
}
|
|
14121
|
+
postfixIncDec = false;
|
|
14122
|
+
break;
|
|
14123
|
+
default:
|
|
14124
|
+
postfixIncDec = false;
|
|
14125
|
+
}
|
|
14126
|
+
lastIndex = nextLastIndex;
|
|
14127
|
+
lastSignificantToken = nextLastSignificantToken;
|
|
14128
|
+
yield {
|
|
14129
|
+
type: "Punctuator",
|
|
14130
|
+
value: punctuator
|
|
14131
|
+
};
|
|
14132
|
+
continue;
|
|
14133
|
+
}
|
|
14134
|
+
Identifier.lastIndex = lastIndex;
|
|
14135
|
+
if (match = Identifier.exec(input)) {
|
|
14136
|
+
lastIndex = Identifier.lastIndex;
|
|
14137
|
+
nextLastSignificantToken = match[0];
|
|
14138
|
+
switch (match[0]) {
|
|
14139
|
+
case "for":
|
|
14140
|
+
case "if":
|
|
14141
|
+
case "while":
|
|
14142
|
+
case "with":
|
|
14143
|
+
if (lastSignificantToken !== "." && lastSignificantToken !== "?.") {
|
|
14144
|
+
nextLastSignificantToken = "?NonExpressionParenKeyword";
|
|
14145
|
+
}
|
|
14146
|
+
}
|
|
14147
|
+
lastSignificantToken = nextLastSignificantToken;
|
|
14148
|
+
postfixIncDec = !KeywordsWithExpressionAfter.test(match[0]);
|
|
14149
|
+
yield {
|
|
14150
|
+
type: match[1] === "#" ? "PrivateIdentifier" : "IdentifierName",
|
|
14151
|
+
value: match[0]
|
|
14152
|
+
};
|
|
14153
|
+
continue;
|
|
14154
|
+
}
|
|
14155
|
+
StringLiteral.lastIndex = lastIndex;
|
|
14156
|
+
if (match = StringLiteral.exec(input)) {
|
|
14157
|
+
lastIndex = StringLiteral.lastIndex;
|
|
14158
|
+
lastSignificantToken = match[0];
|
|
14159
|
+
postfixIncDec = true;
|
|
14160
|
+
yield {
|
|
14161
|
+
type: "StringLiteral",
|
|
14162
|
+
value: match[0],
|
|
14163
|
+
closed: match[2] !== void 0
|
|
14164
|
+
};
|
|
14165
|
+
continue;
|
|
14166
|
+
}
|
|
14167
|
+
NumericLiteral.lastIndex = lastIndex;
|
|
14168
|
+
if (match = NumericLiteral.exec(input)) {
|
|
14169
|
+
lastIndex = NumericLiteral.lastIndex;
|
|
14170
|
+
lastSignificantToken = match[0];
|
|
14171
|
+
postfixIncDec = true;
|
|
14172
|
+
yield {
|
|
14173
|
+
type: "NumericLiteral",
|
|
14174
|
+
value: match[0]
|
|
14175
|
+
};
|
|
14176
|
+
continue;
|
|
14177
|
+
}
|
|
14178
|
+
Template.lastIndex = lastIndex;
|
|
14179
|
+
if (match = Template.exec(input)) {
|
|
14180
|
+
lastIndex = Template.lastIndex;
|
|
14181
|
+
lastSignificantToken = match[0];
|
|
14182
|
+
if (match[1] === "${") {
|
|
14183
|
+
lastSignificantToken = "?InterpolationInTemplate";
|
|
14184
|
+
stack.push({
|
|
14185
|
+
tag: "InterpolationInTemplate",
|
|
14186
|
+
nesting: braces.length
|
|
14187
|
+
});
|
|
14188
|
+
postfixIncDec = false;
|
|
14189
|
+
yield {
|
|
14190
|
+
type: "TemplateHead",
|
|
14191
|
+
value: match[0]
|
|
14192
|
+
};
|
|
14193
|
+
} else {
|
|
14194
|
+
postfixIncDec = true;
|
|
14195
|
+
yield {
|
|
14196
|
+
type: "NoSubstitutionTemplate",
|
|
14197
|
+
value: match[0],
|
|
14198
|
+
closed: match[1] === "`"
|
|
14199
|
+
};
|
|
14200
|
+
}
|
|
14201
|
+
continue;
|
|
14202
|
+
}
|
|
14203
|
+
break;
|
|
14204
|
+
case "JSXTag":
|
|
14205
|
+
case "JSXTagEnd":
|
|
14206
|
+
JSXPunctuator.lastIndex = lastIndex;
|
|
14207
|
+
if (match = JSXPunctuator.exec(input)) {
|
|
14208
|
+
lastIndex = JSXPunctuator.lastIndex;
|
|
14209
|
+
nextLastSignificantToken = match[0];
|
|
14210
|
+
switch (match[0]) {
|
|
14211
|
+
case "<":
|
|
14212
|
+
stack.push({ tag: "JSXTag" });
|
|
14213
|
+
break;
|
|
14214
|
+
case ">":
|
|
14215
|
+
stack.pop();
|
|
14216
|
+
if (lastSignificantToken === "/" || mode.tag === "JSXTagEnd") {
|
|
14217
|
+
nextLastSignificantToken = "?JSX";
|
|
14218
|
+
postfixIncDec = true;
|
|
14219
|
+
} else {
|
|
14220
|
+
stack.push({ tag: "JSXChildren" });
|
|
14221
|
+
}
|
|
14222
|
+
break;
|
|
14223
|
+
case "{":
|
|
14224
|
+
stack.push({
|
|
14225
|
+
tag: "InterpolationInJSX",
|
|
14226
|
+
nesting: braces.length
|
|
14227
|
+
});
|
|
14228
|
+
nextLastSignificantToken = "?InterpolationInJSX";
|
|
14229
|
+
postfixIncDec = false;
|
|
14230
|
+
break;
|
|
14231
|
+
case "/":
|
|
14232
|
+
if (lastSignificantToken === "<") {
|
|
14233
|
+
stack.pop();
|
|
14234
|
+
if (stack[stack.length - 1].tag === "JSXChildren") {
|
|
14235
|
+
stack.pop();
|
|
14236
|
+
}
|
|
14237
|
+
stack.push({ tag: "JSXTagEnd" });
|
|
14238
|
+
}
|
|
14239
|
+
}
|
|
14240
|
+
lastSignificantToken = nextLastSignificantToken;
|
|
14241
|
+
yield {
|
|
14242
|
+
type: "JSXPunctuator",
|
|
14243
|
+
value: match[0]
|
|
14244
|
+
};
|
|
14245
|
+
continue;
|
|
14246
|
+
}
|
|
14247
|
+
JSXIdentifier.lastIndex = lastIndex;
|
|
14248
|
+
if (match = JSXIdentifier.exec(input)) {
|
|
14249
|
+
lastIndex = JSXIdentifier.lastIndex;
|
|
14250
|
+
lastSignificantToken = match[0];
|
|
14251
|
+
yield {
|
|
14252
|
+
type: "JSXIdentifier",
|
|
14253
|
+
value: match[0]
|
|
14254
|
+
};
|
|
14255
|
+
continue;
|
|
14256
|
+
}
|
|
14257
|
+
JSXString.lastIndex = lastIndex;
|
|
14258
|
+
if (match = JSXString.exec(input)) {
|
|
14259
|
+
lastIndex = JSXString.lastIndex;
|
|
14260
|
+
lastSignificantToken = match[0];
|
|
14261
|
+
yield {
|
|
14262
|
+
type: "JSXString",
|
|
14263
|
+
value: match[0],
|
|
14264
|
+
closed: match[2] !== void 0
|
|
14265
|
+
};
|
|
14266
|
+
continue;
|
|
14267
|
+
}
|
|
14268
|
+
break;
|
|
14269
|
+
case "JSXChildren":
|
|
14270
|
+
JSXText.lastIndex = lastIndex;
|
|
14271
|
+
if (match = JSXText.exec(input)) {
|
|
14272
|
+
lastIndex = JSXText.lastIndex;
|
|
14273
|
+
lastSignificantToken = match[0];
|
|
14274
|
+
yield {
|
|
14275
|
+
type: "JSXText",
|
|
14276
|
+
value: match[0]
|
|
14277
|
+
};
|
|
14278
|
+
continue;
|
|
14279
|
+
}
|
|
14280
|
+
switch (input[lastIndex]) {
|
|
14281
|
+
case "<":
|
|
14282
|
+
stack.push({ tag: "JSXTag" });
|
|
14283
|
+
lastIndex++;
|
|
14284
|
+
lastSignificantToken = "<";
|
|
14285
|
+
yield {
|
|
14286
|
+
type: "JSXPunctuator",
|
|
14287
|
+
value: "<"
|
|
14288
|
+
};
|
|
14289
|
+
continue;
|
|
14290
|
+
case "{":
|
|
14291
|
+
stack.push({
|
|
14292
|
+
tag: "InterpolationInJSX",
|
|
14293
|
+
nesting: braces.length
|
|
14294
|
+
});
|
|
14295
|
+
lastIndex++;
|
|
14296
|
+
lastSignificantToken = "?InterpolationInJSX";
|
|
14297
|
+
postfixIncDec = false;
|
|
14298
|
+
yield {
|
|
14299
|
+
type: "JSXPunctuator",
|
|
14300
|
+
value: "{"
|
|
14301
|
+
};
|
|
14302
|
+
continue;
|
|
14303
|
+
}
|
|
14304
|
+
}
|
|
14305
|
+
WhiteSpace.lastIndex = lastIndex;
|
|
14306
|
+
if (match = WhiteSpace.exec(input)) {
|
|
14307
|
+
lastIndex = WhiteSpace.lastIndex;
|
|
14308
|
+
yield {
|
|
14309
|
+
type: "WhiteSpace",
|
|
14310
|
+
value: match[0]
|
|
14311
|
+
};
|
|
14312
|
+
continue;
|
|
14313
|
+
}
|
|
14314
|
+
LineTerminatorSequence.lastIndex = lastIndex;
|
|
14315
|
+
if (match = LineTerminatorSequence.exec(input)) {
|
|
14316
|
+
lastIndex = LineTerminatorSequence.lastIndex;
|
|
14317
|
+
postfixIncDec = false;
|
|
14318
|
+
if (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) {
|
|
14319
|
+
lastSignificantToken = "?NoLineTerminatorHere";
|
|
14320
|
+
}
|
|
14321
|
+
yield {
|
|
14322
|
+
type: "LineTerminatorSequence",
|
|
14323
|
+
value: match[0]
|
|
14324
|
+
};
|
|
14325
|
+
continue;
|
|
14326
|
+
}
|
|
14327
|
+
MultiLineComment.lastIndex = lastIndex;
|
|
14328
|
+
if (match = MultiLineComment.exec(input)) {
|
|
14329
|
+
lastIndex = MultiLineComment.lastIndex;
|
|
14330
|
+
if (Newline.test(match[0])) {
|
|
14331
|
+
postfixIncDec = false;
|
|
14332
|
+
if (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) {
|
|
14333
|
+
lastSignificantToken = "?NoLineTerminatorHere";
|
|
14334
|
+
}
|
|
14335
|
+
}
|
|
14336
|
+
yield {
|
|
14337
|
+
type: "MultiLineComment",
|
|
14338
|
+
value: match[0],
|
|
14339
|
+
closed: match[1] !== void 0
|
|
14340
|
+
};
|
|
14341
|
+
continue;
|
|
14342
|
+
}
|
|
14343
|
+
SingleLineComment.lastIndex = lastIndex;
|
|
14344
|
+
if (match = SingleLineComment.exec(input)) {
|
|
14345
|
+
lastIndex = SingleLineComment.lastIndex;
|
|
14346
|
+
postfixIncDec = false;
|
|
14347
|
+
yield {
|
|
14348
|
+
type: "SingleLineComment",
|
|
14349
|
+
value: match[0]
|
|
14350
|
+
};
|
|
14351
|
+
continue;
|
|
14352
|
+
}
|
|
14353
|
+
firstCodePoint = String.fromCodePoint(input.codePointAt(lastIndex));
|
|
14354
|
+
lastIndex += firstCodePoint.length;
|
|
14355
|
+
lastSignificantToken = firstCodePoint;
|
|
14356
|
+
postfixIncDec = false;
|
|
14357
|
+
yield {
|
|
14358
|
+
type: mode.tag.startsWith("JSX") ? "JSXInvalid" : "Invalid",
|
|
14359
|
+
value: firstCodePoint
|
|
14360
|
+
};
|
|
14361
|
+
}
|
|
14362
|
+
return void 0;
|
|
14363
|
+
};
|
|
14364
|
+
return jsTokens_1;
|
|
14365
|
+
}
|
|
14366
|
+
requireJsTokens();
|
|
14367
|
+
var reservedWords = {
|
|
14368
|
+
keyword: [
|
|
14369
|
+
"break",
|
|
14370
|
+
"case",
|
|
14371
|
+
"catch",
|
|
14372
|
+
"continue",
|
|
14373
|
+
"debugger",
|
|
14374
|
+
"default",
|
|
14375
|
+
"do",
|
|
14376
|
+
"else",
|
|
14377
|
+
"finally",
|
|
14378
|
+
"for",
|
|
14379
|
+
"function",
|
|
14380
|
+
"if",
|
|
14381
|
+
"return",
|
|
14382
|
+
"switch",
|
|
14383
|
+
"throw",
|
|
14384
|
+
"try",
|
|
14385
|
+
"var",
|
|
14386
|
+
"const",
|
|
14387
|
+
"while",
|
|
14388
|
+
"with",
|
|
14389
|
+
"new",
|
|
14390
|
+
"this",
|
|
14391
|
+
"super",
|
|
14392
|
+
"class",
|
|
14393
|
+
"extends",
|
|
14394
|
+
"export",
|
|
14395
|
+
"import",
|
|
14396
|
+
"null",
|
|
14397
|
+
"true",
|
|
14398
|
+
"false",
|
|
14399
|
+
"in",
|
|
14400
|
+
"instanceof",
|
|
14401
|
+
"typeof",
|
|
14402
|
+
"void",
|
|
14403
|
+
"delete"
|
|
14404
|
+
],
|
|
14405
|
+
strict: [
|
|
14406
|
+
"implements",
|
|
14407
|
+
"interface",
|
|
14408
|
+
"let",
|
|
14409
|
+
"package",
|
|
14410
|
+
"private",
|
|
14411
|
+
"protected",
|
|
14412
|
+
"public",
|
|
14413
|
+
"static",
|
|
14414
|
+
"yield"
|
|
14415
|
+
]
|
|
14416
|
+
};
|
|
14417
|
+
new Set(reservedWords.keyword);
|
|
14418
|
+
new Set(reservedWords.strict);
|
|
13608
14419
|
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
13609
14420
|
const intToChar = new Uint8Array(64);
|
|
13610
14421
|
const charToInt = new Uint8Array(128);
|
|
@@ -13670,9 +14481,7 @@ class ModuleMocker {
|
|
|
13670
14481
|
async importActual(id, importer) {
|
|
13671
14482
|
const resolved = await this.rpc.resolveId(id, importer);
|
|
13672
14483
|
if (resolved == null) {
|
|
13673
|
-
throw new Error(
|
|
13674
|
-
`[vitest] Cannot resolve "${id}" imported from "${importer}"`
|
|
13675
|
-
);
|
|
14484
|
+
throw new Error(`[vitest] Cannot resolve "${id}" imported from "${importer}"`);
|
|
13676
14485
|
}
|
|
13677
14486
|
const ext = extname(resolved.id);
|
|
13678
14487
|
const url2 = new URL(resolved.url, location.href);
|
|
@@ -13686,16 +14495,15 @@ class ModuleMocker {
|
|
|
13686
14495
|
return mod;
|
|
13687
14496
|
}
|
|
13688
14497
|
const m = mod.default;
|
|
13689
|
-
return (m
|
|
14498
|
+
return (m === null || m === void 0 ? void 0 : m.__esModule) ? m : {
|
|
14499
|
+
...typeof m === "object" && !Array.isArray(m) || typeof m === "function" ? m : {},
|
|
14500
|
+
default: m
|
|
14501
|
+
};
|
|
13690
14502
|
});
|
|
13691
14503
|
}
|
|
13692
14504
|
async importMock(rawId, importer) {
|
|
13693
14505
|
await this.prepare();
|
|
13694
|
-
const { resolvedId, resolvedUrl, redirectUrl } = await this.rpc.resolveMock(
|
|
13695
|
-
rawId,
|
|
13696
|
-
importer,
|
|
13697
|
-
{ mock: "auto" }
|
|
13698
|
-
);
|
|
14506
|
+
const { resolvedId, resolvedUrl, redirectUrl } = await this.rpc.resolveMock(rawId, importer, { mock: "auto" });
|
|
13699
14507
|
const mockUrl = this.resolveMockPath(cleanVersion(resolvedUrl));
|
|
13700
14508
|
let mock = this.registry.get(mockUrl);
|
|
13701
14509
|
if (!mock) {
|
|
@@ -13737,9 +14545,7 @@ class ModuleMocker {
|
|
|
13737
14545
|
}, object);
|
|
13738
14546
|
}
|
|
13739
14547
|
queueMock(rawId, importer, factoryOrOptions) {
|
|
13740
|
-
const promise = this.rpc.resolveMock(rawId, importer, {
|
|
13741
|
-
mock: typeof factoryOrOptions === "function" ? "factory" : (factoryOrOptions == null ? void 0 : factoryOrOptions.spy) ? "spy" : "auto"
|
|
13742
|
-
}).then(async ({ redirectUrl, resolvedId, resolvedUrl, needsInterop, mockType }) => {
|
|
14548
|
+
const promise = this.rpc.resolveMock(rawId, importer, { mock: typeof factoryOrOptions === "function" ? "factory" : (factoryOrOptions === null || factoryOrOptions === void 0 ? void 0 : factoryOrOptions.spy) ? "spy" : "auto" }).then(async ({ redirectUrl, resolvedId, resolvedUrl, needsInterop, mockType }) => {
|
|
13743
14549
|
const mockUrl = this.resolveMockPath(cleanVersion(resolvedUrl));
|
|
13744
14550
|
this.mockedIds.add(resolvedId);
|
|
13745
14551
|
const factory = typeof factoryOrOptions === "function" ? async () => {
|
|
@@ -13777,8 +14583,6 @@ class ModuleMocker {
|
|
|
13777
14583
|
});
|
|
13778
14584
|
this.queue.add(promise);
|
|
13779
14585
|
}
|
|
13780
|
-
// We need to await mock registration before importing the actual module
|
|
13781
|
-
// In case there is a mocked module in the import chain
|
|
13782
14586
|
wrapDynamicImport(moduleFactory) {
|
|
13783
14587
|
if (typeof moduleFactory === "function") {
|
|
13784
14588
|
const promise = new Promise((resolve2, reject) => {
|
|
@@ -13842,11 +14646,7 @@ class ModuleMockerMSWInterceptor {
|
|
|
13842
14646
|
}).join("\n");
|
|
13843
14647
|
const text = `${module}
|
|
13844
14648
|
${keys}`;
|
|
13845
|
-
return new Response(text, {
|
|
13846
|
-
headers: {
|
|
13847
|
-
"Content-Type": "application/javascript"
|
|
13848
|
-
}
|
|
13849
|
-
});
|
|
14649
|
+
return new Response(text, { headers: { "Content-Type": "application/javascript" } });
|
|
13850
14650
|
}
|
|
13851
14651
|
async init() {
|
|
13852
14652
|
if (this.worker) {
|
|
@@ -13856,35 +14656,28 @@ ${keys}`;
|
|
|
13856
14656
|
return this.startPromise;
|
|
13857
14657
|
}
|
|
13858
14658
|
const worker = this.options.mswWorker;
|
|
13859
|
-
this.startPromise = Promise.all([
|
|
13860
|
-
worker
|
|
13861
|
-
|
|
13862
|
-
|
|
13863
|
-
|
|
14659
|
+
this.startPromise = Promise.all([worker ? { setupWorker(handler) {
|
|
14660
|
+
worker.use(handler);
|
|
14661
|
+
return worker;
|
|
14662
|
+
} } : __vitePreload(() => import("msw/browser"), true ? [] : void 0), __vitePreload(() => import("msw/core/http"), true ? [] : void 0)]).then(([{ setupWorker }, { http }]) => {
|
|
14663
|
+
const worker2 = setupWorker(http.get(/.+/, async ({ request }) => {
|
|
14664
|
+
const path = cleanQuery(request.url.slice(location.origin.length));
|
|
14665
|
+
if (!this.mocks.has(path)) {
|
|
14666
|
+
return passthrough();
|
|
13864
14667
|
}
|
|
13865
|
-
|
|
13866
|
-
|
|
13867
|
-
|
|
13868
|
-
|
|
13869
|
-
|
|
13870
|
-
|
|
13871
|
-
|
|
13872
|
-
|
|
13873
|
-
|
|
13874
|
-
|
|
13875
|
-
|
|
13876
|
-
|
|
13877
|
-
|
|
13878
|
-
case "automock":
|
|
13879
|
-
case "autospy":
|
|
13880
|
-
return Response.redirect(injectQuery(path, `mock=${mock.type}`));
|
|
13881
|
-
case "redirect":
|
|
13882
|
-
return Response.redirect(mock.redirect);
|
|
13883
|
-
default:
|
|
13884
|
-
throw new Error(`Unknown mock type: ${mock.type}`);
|
|
13885
|
-
}
|
|
13886
|
-
})
|
|
13887
|
-
);
|
|
14668
|
+
const mock = this.mocks.get(path);
|
|
14669
|
+
switch (mock.type) {
|
|
14670
|
+
case "manual":
|
|
14671
|
+
return this.resolveManualMock(mock);
|
|
14672
|
+
case "automock":
|
|
14673
|
+
case "autospy":
|
|
14674
|
+
return Response.redirect(injectQuery(path, `mock=${mock.type}`));
|
|
14675
|
+
case "redirect":
|
|
14676
|
+
return Response.redirect(mock.redirect);
|
|
14677
|
+
default:
|
|
14678
|
+
throw new Error(`Unknown mock type: ${mock.type}`);
|
|
14679
|
+
}
|
|
14680
|
+
}));
|
|
13888
14681
|
return worker2.start(this.options.mswOptions).then(() => worker2);
|
|
13889
14682
|
}).finally(() => {
|
|
13890
14683
|
this.worker = worker;
|
|
@@ -13903,17 +14696,12 @@ function passthrough() {
|
|
|
13903
14696
|
return new Response(null, {
|
|
13904
14697
|
status: 302,
|
|
13905
14698
|
statusText: "Passthrough",
|
|
13906
|
-
headers: {
|
|
13907
|
-
"x-msw-intention": "passthrough"
|
|
13908
|
-
}
|
|
14699
|
+
headers: { "x-msw-intention": "passthrough" }
|
|
13909
14700
|
});
|
|
13910
14701
|
}
|
|
13911
14702
|
const replacePercentageRE = /%/g;
|
|
13912
14703
|
function injectQuery(url2, queryToInject) {
|
|
13913
|
-
const resolvedUrl = new URL(
|
|
13914
|
-
url2.replace(replacePercentageRE, "%25"),
|
|
13915
|
-
location.href
|
|
13916
|
-
);
|
|
14704
|
+
const resolvedUrl = new URL(url2.replace(replacePercentageRE, "%25"), location.href);
|
|
13917
14705
|
const { search, hash } = resolvedUrl;
|
|
13918
14706
|
const pathname = cleanUrl(url2);
|
|
13919
14707
|
return `${pathname}?${queryToInject}${search ? `&${search.slice(1)}` : ""}${hash ?? ""}`;
|
|
@@ -14090,10 +14878,10 @@ function requireSourcemapCodec_umd() {
|
|
|
14090
14878
|
}
|
|
14091
14879
|
return writer.flush();
|
|
14092
14880
|
}
|
|
14093
|
-
function _encodeOriginalScopes(scopes,
|
|
14094
|
-
const scope = scopes[
|
|
14881
|
+
function _encodeOriginalScopes(scopes, index2, writer, state) {
|
|
14882
|
+
const scope = scopes[index2];
|
|
14095
14883
|
const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;
|
|
14096
|
-
if (
|
|
14884
|
+
if (index2 > 0)
|
|
14097
14885
|
writer.write(comma);
|
|
14098
14886
|
state[0] = encodeInteger(writer, startLine, state[0]);
|
|
14099
14887
|
encodeInteger(writer, startColumn, 0);
|
|
@@ -14105,18 +14893,18 @@ function requireSourcemapCodec_umd() {
|
|
|
14105
14893
|
for (const v of vars) {
|
|
14106
14894
|
encodeInteger(writer, v, 0);
|
|
14107
14895
|
}
|
|
14108
|
-
for (
|
|
14109
|
-
const next = scopes[
|
|
14896
|
+
for (index2++; index2 < scopes.length; ) {
|
|
14897
|
+
const next = scopes[index2];
|
|
14110
14898
|
const { 0: l, 1: c } = next;
|
|
14111
14899
|
if (l > endLine || l === endLine && c >= endColumn) {
|
|
14112
14900
|
break;
|
|
14113
14901
|
}
|
|
14114
|
-
|
|
14902
|
+
index2 = _encodeOriginalScopes(scopes, index2, writer, state);
|
|
14115
14903
|
}
|
|
14116
14904
|
writer.write(comma);
|
|
14117
14905
|
state[0] = encodeInteger(writer, endLine, state[0]);
|
|
14118
14906
|
encodeInteger(writer, endColumn, 0);
|
|
14119
|
-
return
|
|
14907
|
+
return index2;
|
|
14120
14908
|
}
|
|
14121
14909
|
function decodeGeneratedRanges(input) {
|
|
14122
14910
|
const { length } = input;
|
|
@@ -14208,14 +14996,14 @@ function requireSourcemapCodec_umd() {
|
|
|
14208
14996
|
}
|
|
14209
14997
|
return writer.flush();
|
|
14210
14998
|
}
|
|
14211
|
-
function _encodeGeneratedRanges(ranges,
|
|
14212
|
-
const range = ranges[
|
|
14999
|
+
function _encodeGeneratedRanges(ranges, index2, writer, state) {
|
|
15000
|
+
const range = ranges[index2];
|
|
14213
15001
|
const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, isScope, callsite, bindings } = range;
|
|
14214
15002
|
if (state[0] < startLine) {
|
|
14215
15003
|
catchupLine(writer, state[0], startLine);
|
|
14216
15004
|
state[0] = startLine;
|
|
14217
15005
|
state[1] = 0;
|
|
14218
|
-
} else if (
|
|
15006
|
+
} else if (index2 > 0) {
|
|
14219
15007
|
writer.write(comma);
|
|
14220
15008
|
}
|
|
14221
15009
|
state[1] = encodeInteger(writer, range[1], state[1]);
|
|
@@ -14257,13 +15045,13 @@ function requireSourcemapCodec_umd() {
|
|
|
14257
15045
|
}
|
|
14258
15046
|
}
|
|
14259
15047
|
}
|
|
14260
|
-
for (
|
|
14261
|
-
const next = ranges[
|
|
15048
|
+
for (index2++; index2 < ranges.length; ) {
|
|
15049
|
+
const next = ranges[index2];
|
|
14262
15050
|
const { 0: l, 1: c } = next;
|
|
14263
15051
|
if (l > endLine || l === endLine && c >= endColumn) {
|
|
14264
15052
|
break;
|
|
14265
15053
|
}
|
|
14266
|
-
|
|
15054
|
+
index2 = _encodeGeneratedRanges(ranges, index2, writer, state);
|
|
14267
15055
|
}
|
|
14268
15056
|
if (state[0] < endLine) {
|
|
14269
15057
|
catchupLine(writer, state[0], endLine);
|
|
@@ -14273,7 +15061,7 @@ function requireSourcemapCodec_umd() {
|
|
|
14273
15061
|
writer.write(comma);
|
|
14274
15062
|
}
|
|
14275
15063
|
state[1] = encodeInteger(writer, endColumn, state[1]);
|
|
14276
|
-
return
|
|
15064
|
+
return index2;
|
|
14277
15065
|
}
|
|
14278
15066
|
function catchupLine(writer, lastLine, line) {
|
|
14279
15067
|
do {
|
|
@@ -14327,8 +15115,8 @@ function requireSourcemapCodec_umd() {
|
|
|
14327
15115
|
function sort(line) {
|
|
14328
15116
|
line.sort(sortComparator);
|
|
14329
15117
|
}
|
|
14330
|
-
function sortComparator(
|
|
14331
|
-
return
|
|
15118
|
+
function sortComparator(a2, b) {
|
|
15119
|
+
return a2[0] - b[0];
|
|
14332
15120
|
}
|
|
14333
15121
|
function encode(decoded) {
|
|
14334
15122
|
const writer = new StringWriter();
|
|
@@ -14457,8 +15245,8 @@ function requireResolveUri_umd() {
|
|
|
14457
15245
|
function stripPathFilename(path) {
|
|
14458
15246
|
if (path.endsWith("/.."))
|
|
14459
15247
|
return path;
|
|
14460
|
-
const
|
|
14461
|
-
return path.slice(0,
|
|
15248
|
+
const index2 = path.lastIndexOf("/");
|
|
15249
|
+
return path.slice(0, index2 + 1);
|
|
14462
15250
|
}
|
|
14463
15251
|
function mergePaths(url2, base) {
|
|
14464
15252
|
normalizePath(base, base.type);
|
|
@@ -14580,8 +15368,8 @@ function requireTraceMapping_umd() {
|
|
|
14580
15368
|
function stripFilename(path) {
|
|
14581
15369
|
if (!path)
|
|
14582
15370
|
return "";
|
|
14583
|
-
const
|
|
14584
|
-
return path.slice(0,
|
|
15371
|
+
const index2 = path.lastIndexOf("/");
|
|
15372
|
+
return path.slice(0, index2 + 1);
|
|
14585
15373
|
}
|
|
14586
15374
|
const COLUMN = 0;
|
|
14587
15375
|
const SOURCES_INDEX = 1;
|
|
@@ -14621,8 +15409,8 @@ function requireTraceMapping_umd() {
|
|
|
14621
15409
|
line = line.slice();
|
|
14622
15410
|
return line.sort(sortComparator);
|
|
14623
15411
|
}
|
|
14624
|
-
function sortComparator(
|
|
14625
|
-
return
|
|
15412
|
+
function sortComparator(a2, b) {
|
|
15413
|
+
return a2[COLUMN] - b[COLUMN];
|
|
14626
15414
|
}
|
|
14627
15415
|
let found = false;
|
|
14628
15416
|
function binarySearch(haystack, needle, low, high) {
|
|
@@ -14642,19 +15430,19 @@ function requireTraceMapping_umd() {
|
|
|
14642
15430
|
found = false;
|
|
14643
15431
|
return low - 1;
|
|
14644
15432
|
}
|
|
14645
|
-
function upperBound(haystack, needle,
|
|
14646
|
-
for (let i =
|
|
15433
|
+
function upperBound(haystack, needle, index2) {
|
|
15434
|
+
for (let i = index2 + 1; i < haystack.length; index2 = i++) {
|
|
14647
15435
|
if (haystack[i][COLUMN] !== needle)
|
|
14648
15436
|
break;
|
|
14649
15437
|
}
|
|
14650
|
-
return
|
|
15438
|
+
return index2;
|
|
14651
15439
|
}
|
|
14652
|
-
function lowerBound(haystack, needle,
|
|
14653
|
-
for (let i =
|
|
15440
|
+
function lowerBound(haystack, needle, index2) {
|
|
15441
|
+
for (let i = index2 - 1; i >= 0; index2 = i--) {
|
|
14654
15442
|
if (haystack[i][COLUMN] !== needle)
|
|
14655
15443
|
break;
|
|
14656
15444
|
}
|
|
14657
|
-
return
|
|
15445
|
+
return index2;
|
|
14658
15446
|
}
|
|
14659
15447
|
function memoizedState() {
|
|
14660
15448
|
return {
|
|
@@ -14696,18 +15484,18 @@ function requireTraceMapping_umd() {
|
|
|
14696
15484
|
const originalSource = sources[sourceIndex2];
|
|
14697
15485
|
const originalLine = originalSource[sourceLine] || (originalSource[sourceLine] = []);
|
|
14698
15486
|
const memo = memos[sourceIndex2];
|
|
14699
|
-
let
|
|
14700
|
-
memo.lastIndex = ++
|
|
14701
|
-
insert(originalLine,
|
|
15487
|
+
let index2 = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine));
|
|
15488
|
+
memo.lastIndex = ++index2;
|
|
15489
|
+
insert(originalLine, index2, [sourceColumn, i, seg[COLUMN]]);
|
|
14702
15490
|
}
|
|
14703
15491
|
}
|
|
14704
15492
|
return sources;
|
|
14705
15493
|
}
|
|
14706
|
-
function insert(array,
|
|
14707
|
-
for (let i = array.length; i >
|
|
15494
|
+
function insert(array, index2, value) {
|
|
15495
|
+
for (let i = array.length; i > index2; i--) {
|
|
14708
15496
|
array[i] = array[i - 1];
|
|
14709
15497
|
}
|
|
14710
|
-
array[
|
|
15498
|
+
array[index2] = value;
|
|
14711
15499
|
}
|
|
14712
15500
|
function buildNullArray() {
|
|
14713
15501
|
return { __proto__: null };
|
|
@@ -14801,10 +15589,10 @@ function requireTraceMapping_umd() {
|
|
|
14801
15589
|
for (let i = 0; i < other.length; i++)
|
|
14802
15590
|
arr.push(other[i]);
|
|
14803
15591
|
}
|
|
14804
|
-
function getLine(arr,
|
|
14805
|
-
for (let i = arr.length; i <=
|
|
15592
|
+
function getLine(arr, index2) {
|
|
15593
|
+
for (let i = arr.length; i <= index2; i++)
|
|
14806
15594
|
arr[i] = [];
|
|
14807
|
-
return arr[
|
|
15595
|
+
return arr[index2];
|
|
14808
15596
|
}
|
|
14809
15597
|
const LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)";
|
|
14810
15598
|
const COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)";
|
|
@@ -14856,8 +15644,8 @@ function requireTraceMapping_umd() {
|
|
|
14856
15644
|
if (line >= decoded.length)
|
|
14857
15645
|
return null;
|
|
14858
15646
|
const segments = decoded[line];
|
|
14859
|
-
const
|
|
14860
|
-
return
|
|
15647
|
+
const index2 = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, GREATEST_LOWER_BOUND);
|
|
15648
|
+
return index2 === -1 ? null : segments[index2];
|
|
14861
15649
|
}
|
|
14862
15650
|
function originalPositionFor2(map, needle) {
|
|
14863
15651
|
let { line, column, bias } = needle;
|
|
@@ -14870,10 +15658,10 @@ function requireTraceMapping_umd() {
|
|
|
14870
15658
|
if (line >= decoded.length)
|
|
14871
15659
|
return OMapping(null, null, null, null);
|
|
14872
15660
|
const segments = decoded[line];
|
|
14873
|
-
const
|
|
14874
|
-
if (
|
|
15661
|
+
const index2 = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
|
|
15662
|
+
if (index2 === -1)
|
|
14875
15663
|
return OMapping(null, null, null, null);
|
|
14876
|
-
const segment = segments[
|
|
15664
|
+
const segment = segments[index2];
|
|
14877
15665
|
if (segment.length === 1)
|
|
14878
15666
|
return OMapping(null, null, null, null);
|
|
14879
15667
|
const { names, resolvedSources } = map;
|
|
@@ -14920,24 +15708,24 @@ function requireTraceMapping_umd() {
|
|
|
14920
15708
|
}
|
|
14921
15709
|
function sourceIndex(map, source2) {
|
|
14922
15710
|
const { sources, resolvedSources } = map;
|
|
14923
|
-
let
|
|
14924
|
-
if (
|
|
14925
|
-
|
|
14926
|
-
return
|
|
15711
|
+
let index2 = sources.indexOf(source2);
|
|
15712
|
+
if (index2 === -1)
|
|
15713
|
+
index2 = resolvedSources.indexOf(source2);
|
|
15714
|
+
return index2;
|
|
14927
15715
|
}
|
|
14928
15716
|
function sourceContentFor(map, source2) {
|
|
14929
15717
|
const { sourcesContent } = map;
|
|
14930
15718
|
if (sourcesContent == null)
|
|
14931
15719
|
return null;
|
|
14932
|
-
const
|
|
14933
|
-
return
|
|
15720
|
+
const index2 = sourceIndex(map, source2);
|
|
15721
|
+
return index2 === -1 ? null : sourcesContent[index2];
|
|
14934
15722
|
}
|
|
14935
15723
|
function isIgnored(map, source2) {
|
|
14936
15724
|
const { ignoreList } = map;
|
|
14937
15725
|
if (ignoreList == null)
|
|
14938
15726
|
return false;
|
|
14939
|
-
const
|
|
14940
|
-
return
|
|
15727
|
+
const index2 = sourceIndex(map, source2);
|
|
15728
|
+
return index2 === -1 ? false : ignoreList.includes(index2);
|
|
14941
15729
|
}
|
|
14942
15730
|
function presortedDecodedMap(map, mapUrl) {
|
|
14943
15731
|
const tracer = new TraceMap2(clone(map, []), mapUrl);
|
|
@@ -14969,14 +15757,14 @@ function requireTraceMapping_umd() {
|
|
|
14969
15757
|
return { line, column };
|
|
14970
15758
|
}
|
|
14971
15759
|
function traceSegmentInternal(segments, memo, line, column, bias) {
|
|
14972
|
-
let
|
|
15760
|
+
let index2 = memoizedBinarySearch(segments, column, memo, line);
|
|
14973
15761
|
if (found) {
|
|
14974
|
-
|
|
15762
|
+
index2 = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index2);
|
|
14975
15763
|
} else if (bias === LEAST_UPPER_BOUND)
|
|
14976
|
-
|
|
14977
|
-
if (
|
|
15764
|
+
index2++;
|
|
15765
|
+
if (index2 === -1 || index2 === segments.length)
|
|
14978
15766
|
return -1;
|
|
14979
|
-
return
|
|
15767
|
+
return index2;
|
|
14980
15768
|
}
|
|
14981
15769
|
function sliceGeneratedPositions(segments, memo, line, column, bias) {
|
|
14982
15770
|
let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);
|
|
@@ -15015,10 +15803,10 @@ function requireTraceMapping_umd() {
|
|
|
15015
15803
|
const memo = cast(map)._bySourceMemos[sourceIndex2];
|
|
15016
15804
|
if (all)
|
|
15017
15805
|
return sliceGeneratedPositions(segments, memo, line, column, bias);
|
|
15018
|
-
const
|
|
15019
|
-
if (
|
|
15806
|
+
const index2 = traceSegmentInternal(segments, memo, line, column, bias);
|
|
15807
|
+
if (index2 === -1)
|
|
15020
15808
|
return GMapping(null, null);
|
|
15021
|
-
const segment = segments[
|
|
15809
|
+
const segment = segments[index2];
|
|
15022
15810
|
return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
|
|
15023
15811
|
}
|
|
15024
15812
|
exports2.AnyMap = AnyMap;
|
|
@@ -15203,7 +15991,7 @@ function parseStacktrace(stack, options = {}) {
|
|
|
15203
15991
|
}).filter((s) => s != null);
|
|
15204
15992
|
}
|
|
15205
15993
|
function shouldFilter(ignoreStackEntries, file) {
|
|
15206
|
-
return ignoreStackEntries.some((
|
|
15994
|
+
return ignoreStackEntries.some((p2) => file.match(p2));
|
|
15207
15995
|
}
|
|
15208
15996
|
function parseFFOrSafariStackTrace(stack) {
|
|
15209
15997
|
return stack.split("\n").map((line) => parseSingleFFOrSafariStack(line)).filter(notNullish);
|