@vuebro/loader-sfc 2.2.1 → 2.2.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/dist/loader-sfc.d.ts +2 -1
- package/dist/loader-sfc.esm-browser.prod.js +760 -756
- package/dist/loader-sfc.js +28 -19
- package/package.json +1 -1
|
@@ -1376,13 +1376,13 @@ var ac = class {
|
|
|
1376
1376
|
return F._indexes[q];
|
|
1377
1377
|
})(N, j);
|
|
1378
1378
|
if (U !== void 0) return U;
|
|
1379
|
-
const { array: X, _indexes:
|
|
1380
|
-
return
|
|
1379
|
+
const { array: X, _indexes: z } = N, H = X.push(j);
|
|
1380
|
+
return z[j] = H - 1;
|
|
1381
1381
|
})(b, T), D = -1;
|
|
1382
|
-
if (O === E.length && (E[O] = null), !(function(N, j, U, X,
|
|
1382
|
+
if (O === E.length && (E[O] = null), !(function(N, j, U, X, z, H) {
|
|
1383
1383
|
if (j === 0) return !1;
|
|
1384
1384
|
const F = N[j - 1];
|
|
1385
|
-
return F.length !== 1 && U === F[1] && X === F[2] &&
|
|
1385
|
+
return F.length !== 1 && U === F[1] && X === F[2] && z === F[3] && H === (F.length === 5 ? F[4] : -1);
|
|
1386
1386
|
})(C, A, O, m, y, D))
|
|
1387
1387
|
return h1(C, A, [f, O, m, y]);
|
|
1388
1388
|
})(0, e, t, s, n, i, o);
|
|
@@ -1700,7 +1700,7 @@ function y1() {
|
|
|
1700
1700
|
return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(G, ee) {
|
|
1701
1701
|
G.__proto__ = ee;
|
|
1702
1702
|
} || function(G, ee) {
|
|
1703
|
-
for (var
|
|
1703
|
+
for (var ae in ee) ee.hasOwnProperty(ae) && (G[ae] = ee[ae]);
|
|
1704
1704
|
}, t(F, q);
|
|
1705
1705
|
}, function(F, q) {
|
|
1706
1706
|
function G() {
|
|
@@ -1728,10 +1728,10 @@ function y1() {
|
|
|
1728
1728
|
var ee = F.call(this) || this;
|
|
1729
1729
|
return ee.name = G, ee._failMsg = "is not a " + G, ee;
|
|
1730
1730
|
}
|
|
1731
|
-
return s(q, F), q.prototype.getChecker = function(G, ee,
|
|
1732
|
-
var
|
|
1733
|
-
return
|
|
1734
|
-
return !!le(J, $) || $.fail(null,
|
|
1731
|
+
return s(q, F), q.prototype.getChecker = function(G, ee, ae) {
|
|
1732
|
+
var fe = this, Y = c(G, this.name), le = Y.getChecker(G, ee, ae);
|
|
1733
|
+
return Y instanceof N || Y instanceof q ? le : function(J, $) {
|
|
1734
|
+
return !!le(J, $) || $.fail(null, fe._failMsg, 0);
|
|
1735
1735
|
};
|
|
1736
1736
|
}, q;
|
|
1737
1737
|
})(i);
|
|
@@ -1744,9 +1744,9 @@ function y1() {
|
|
|
1744
1744
|
return ee.value = G, ee.name = JSON.stringify(G), ee._failMsg = "is not " + ee.name, ee;
|
|
1745
1745
|
}
|
|
1746
1746
|
return s(q, F), q.prototype.getChecker = function(G, ee) {
|
|
1747
|
-
var
|
|
1748
|
-
return function(
|
|
1749
|
-
return
|
|
1747
|
+
var ae = this;
|
|
1748
|
+
return function(fe, Y) {
|
|
1749
|
+
return fe === ae.value || Y.fail(null, ae._failMsg, -1);
|
|
1750
1750
|
};
|
|
1751
1751
|
}, q;
|
|
1752
1752
|
})(i);
|
|
@@ -1759,11 +1759,11 @@ function y1() {
|
|
|
1759
1759
|
return ee.ttype = G, ee;
|
|
1760
1760
|
}
|
|
1761
1761
|
return s(q, F), q.prototype.getChecker = function(G, ee) {
|
|
1762
|
-
var
|
|
1763
|
-
return function(
|
|
1764
|
-
if (!Array.isArray(
|
|
1765
|
-
for (var le = 0; le <
|
|
1766
|
-
if (!
|
|
1762
|
+
var ae = this.ttype.getChecker(G, ee);
|
|
1763
|
+
return function(fe, Y) {
|
|
1764
|
+
if (!Array.isArray(fe)) return Y.fail(null, "is not an array", 0);
|
|
1765
|
+
for (var le = 0; le < fe.length; le++)
|
|
1766
|
+
if (!ae(fe[le], Y)) return Y.fail(le, null, 1);
|
|
1767
1767
|
return !0;
|
|
1768
1768
|
};
|
|
1769
1769
|
}, q;
|
|
@@ -1780,17 +1780,17 @@ function y1() {
|
|
|
1780
1780
|
return ee.ttypes = G, ee;
|
|
1781
1781
|
}
|
|
1782
1782
|
return s(q, F), q.prototype.getChecker = function(G, ee) {
|
|
1783
|
-
var
|
|
1784
|
-
return
|
|
1785
|
-
}),
|
|
1786
|
-
if (!Array.isArray(
|
|
1787
|
-
for (var J = 0; J <
|
|
1788
|
-
if (!
|
|
1783
|
+
var ae = this.ttypes.map(function(Y) {
|
|
1784
|
+
return Y.getChecker(G, ee);
|
|
1785
|
+
}), fe = function(Y, le) {
|
|
1786
|
+
if (!Array.isArray(Y)) return le.fail(null, "is not an array", 0);
|
|
1787
|
+
for (var J = 0; J < ae.length; J++)
|
|
1788
|
+
if (!ae[J](Y[J], le)) return le.fail(J, null, 1);
|
|
1789
1789
|
return !0;
|
|
1790
1790
|
};
|
|
1791
|
-
return ee ? function(
|
|
1792
|
-
return !!
|
|
1793
|
-
} :
|
|
1791
|
+
return ee ? function(Y, le) {
|
|
1792
|
+
return !!fe(Y, le) && (Y.length <= ae.length || le.fail(ae.length, "is extraneous", 2));
|
|
1793
|
+
} : fe;
|
|
1794
1794
|
}, q;
|
|
1795
1795
|
})(i);
|
|
1796
1796
|
e.TTuple = f, e.union = function() {
|
|
@@ -1803,21 +1803,21 @@ function y1() {
|
|
|
1803
1803
|
function q(G) {
|
|
1804
1804
|
var ee = F.call(this) || this;
|
|
1805
1805
|
ee.ttypes = G;
|
|
1806
|
-
var
|
|
1807
|
-
return
|
|
1808
|
-
}).filter(function(
|
|
1809
|
-
return
|
|
1810
|
-
}),
|
|
1811
|
-
return
|
|
1806
|
+
var ae = G.map(function(Y) {
|
|
1807
|
+
return Y instanceof p || Y instanceof d ? Y.name : null;
|
|
1808
|
+
}).filter(function(Y) {
|
|
1809
|
+
return Y;
|
|
1810
|
+
}), fe = G.length - ae.length;
|
|
1811
|
+
return ae.length ? (fe > 0 && ae.push(fe + " more"), ee._failMsg = "is none of " + ae.join(", ")) : ee._failMsg = "is none of " + fe + " types", ee;
|
|
1812
1812
|
}
|
|
1813
1813
|
return s(q, F), q.prototype.getChecker = function(G, ee) {
|
|
1814
|
-
var
|
|
1815
|
-
return
|
|
1814
|
+
var ae = this, fe = this.ttypes.map(function(Y) {
|
|
1815
|
+
return Y.getChecker(G, ee);
|
|
1816
1816
|
});
|
|
1817
|
-
return function(
|
|
1818
|
-
for (var J = le.unionResolver(), $ = 0; $ <
|
|
1819
|
-
if (
|
|
1820
|
-
return le.resolveUnion(J), le.fail(null,
|
|
1817
|
+
return function(Y, le) {
|
|
1818
|
+
for (var J = le.unionResolver(), $ = 0; $ < fe.length; $++)
|
|
1819
|
+
if (fe[$](Y, J.createContext())) return !0;
|
|
1820
|
+
return le.resolveUnion(J), le.fail(null, ae._failMsg, 0);
|
|
1821
1821
|
};
|
|
1822
1822
|
}, q;
|
|
1823
1823
|
})(i);
|
|
@@ -1833,12 +1833,12 @@ function y1() {
|
|
|
1833
1833
|
return ee.ttypes = G, ee;
|
|
1834
1834
|
}
|
|
1835
1835
|
return s(q, F), q.prototype.getChecker = function(G, ee) {
|
|
1836
|
-
var
|
|
1837
|
-
return
|
|
1836
|
+
var ae = /* @__PURE__ */ new Set(), fe = this.ttypes.map(function(Y) {
|
|
1837
|
+
return Y.getChecker(G, ee, ae);
|
|
1838
1838
|
});
|
|
1839
|
-
return function(
|
|
1840
|
-
return !!
|
|
1841
|
-
return J(
|
|
1839
|
+
return function(Y, le) {
|
|
1840
|
+
return !!fe.every(function(J) {
|
|
1841
|
+
return J(Y, le);
|
|
1842
1842
|
}) || le.fail(null, null, 0);
|
|
1843
1843
|
};
|
|
1844
1844
|
}, q;
|
|
@@ -1849,14 +1849,14 @@ function y1() {
|
|
|
1849
1849
|
var y = (function(F) {
|
|
1850
1850
|
function q(G) {
|
|
1851
1851
|
var ee = F.call(this) || this;
|
|
1852
|
-
return ee.members = G, ee.validValues = /* @__PURE__ */ new Set(), ee._failMsg = "is not a valid enum value", ee.validValues = new Set(Object.keys(G).map(function(
|
|
1853
|
-
return G[
|
|
1852
|
+
return ee.members = G, ee.validValues = /* @__PURE__ */ new Set(), ee._failMsg = "is not a valid enum value", ee.validValues = new Set(Object.keys(G).map(function(ae) {
|
|
1853
|
+
return G[ae];
|
|
1854
1854
|
})), ee;
|
|
1855
1855
|
}
|
|
1856
1856
|
return s(q, F), q.prototype.getChecker = function(G, ee) {
|
|
1857
|
-
var
|
|
1858
|
-
return function(
|
|
1859
|
-
return !!
|
|
1857
|
+
var ae = this;
|
|
1858
|
+
return function(fe, Y) {
|
|
1859
|
+
return !!ae.validValues.has(fe) || Y.fail(null, ae._failMsg, 0);
|
|
1860
1860
|
};
|
|
1861
1861
|
}, q;
|
|
1862
1862
|
})(i);
|
|
@@ -1865,16 +1865,16 @@ function y1() {
|
|
|
1865
1865
|
};
|
|
1866
1866
|
var v = (function(F) {
|
|
1867
1867
|
function q(G, ee) {
|
|
1868
|
-
var
|
|
1869
|
-
return
|
|
1868
|
+
var ae = F.call(this) || this;
|
|
1869
|
+
return ae.enumName = G, ae.prop = ee, ae._failMsg = "is not " + G + "." + ee, ae;
|
|
1870
1870
|
}
|
|
1871
1871
|
return s(q, F), q.prototype.getChecker = function(G, ee) {
|
|
1872
|
-
var
|
|
1873
|
-
if (!(
|
|
1874
|
-
var
|
|
1875
|
-
if (!
|
|
1872
|
+
var ae = this, fe = c(G, this.enumName);
|
|
1873
|
+
if (!(fe instanceof y)) throw new Error("Type " + this.enumName + " used in enumlit is not an enum type");
|
|
1874
|
+
var Y = fe.members[this.prop];
|
|
1875
|
+
if (!fe.members.hasOwnProperty(this.prop)) throw new Error("Unknown value " + this.enumName + "." + this.prop + " used in enumlit");
|
|
1876
1876
|
return function(le, J) {
|
|
1877
|
-
return le ===
|
|
1877
|
+
return le === Y || J.fail(null, ae._failMsg, -1);
|
|
1878
1878
|
};
|
|
1879
1879
|
}, q;
|
|
1880
1880
|
})(i);
|
|
@@ -1890,36 +1890,36 @@ function y1() {
|
|
|
1890
1890
|
};
|
|
1891
1891
|
var E = (function(F) {
|
|
1892
1892
|
function q(G, ee) {
|
|
1893
|
-
var
|
|
1894
|
-
return
|
|
1895
|
-
return
|
|
1896
|
-
})),
|
|
1897
|
-
}
|
|
1898
|
-
return s(q, F), q.prototype.getChecker = function(G, ee,
|
|
1899
|
-
var
|
|
1900
|
-
return c(G,
|
|
1901
|
-
}), le = this.props.map(function(
|
|
1902
|
-
return
|
|
1903
|
-
}), J = new n.NoopContext(), $ = this.props.map(function(
|
|
1904
|
-
return !
|
|
1905
|
-
}),
|
|
1906
|
-
if (typeof
|
|
1907
|
-
for (var
|
|
1908
|
-
for (
|
|
1909
|
-
var ce =
|
|
1910
|
-
if (
|
|
1911
|
-
if ($[
|
|
1912
|
-
} else if (!le[
|
|
1893
|
+
var ae = F.call(this) || this;
|
|
1894
|
+
return ae.bases = G, ae.props = ee, ae.propSet = new Set(ee.map(function(fe) {
|
|
1895
|
+
return fe.name;
|
|
1896
|
+
})), ae;
|
|
1897
|
+
}
|
|
1898
|
+
return s(q, F), q.prototype.getChecker = function(G, ee, ae) {
|
|
1899
|
+
var fe = this, Y = this.bases.map(function(se) {
|
|
1900
|
+
return c(G, se).getChecker(G, ee);
|
|
1901
|
+
}), le = this.props.map(function(se) {
|
|
1902
|
+
return se.ttype.getChecker(G, ee);
|
|
1903
|
+
}), J = new n.NoopContext(), $ = this.props.map(function(se, W) {
|
|
1904
|
+
return !se.isOpt && !le[W](void 0, J);
|
|
1905
|
+
}), oe = function(se, W) {
|
|
1906
|
+
if (typeof se != "object" || se === null) return W.fail(null, "is not an object", 0);
|
|
1907
|
+
for (var ie = 0; ie < Y.length; ie++) if (!Y[ie](se, W)) return !1;
|
|
1908
|
+
for (ie = 0; ie < le.length; ie++) {
|
|
1909
|
+
var ce = fe.props[ie].name, ye = se[ce];
|
|
1910
|
+
if (ye === void 0) {
|
|
1911
|
+
if ($[ie]) return W.fail(ce, "is missing", 1);
|
|
1912
|
+
} else if (!le[ie](ye, W)) return W.fail(ce, null, 1);
|
|
1913
1913
|
}
|
|
1914
1914
|
return !0;
|
|
1915
1915
|
};
|
|
1916
|
-
if (!ee) return
|
|
1917
|
-
var
|
|
1918
|
-
return
|
|
1919
|
-
return
|
|
1920
|
-
}),
|
|
1921
|
-
if (!
|
|
1922
|
-
for (var
|
|
1916
|
+
if (!ee) return oe;
|
|
1917
|
+
var Q = this.propSet;
|
|
1918
|
+
return ae && (this.propSet.forEach(function(se) {
|
|
1919
|
+
return ae.add(se);
|
|
1920
|
+
}), Q = ae), function(se, W) {
|
|
1921
|
+
if (!oe(se, W)) return !1;
|
|
1922
|
+
for (var ie in se) if (!Q.has(ie)) return W.fail(ie, "is extraneous", 2);
|
|
1923
1923
|
return !0;
|
|
1924
1924
|
};
|
|
1925
1925
|
}, q;
|
|
@@ -1933,9 +1933,9 @@ function y1() {
|
|
|
1933
1933
|
return ee.ttype = G, ee;
|
|
1934
1934
|
}
|
|
1935
1935
|
return s(q, F), q.prototype.getChecker = function(G, ee) {
|
|
1936
|
-
var
|
|
1937
|
-
return function(
|
|
1938
|
-
return
|
|
1936
|
+
var ae = this.ttype.getChecker(G, ee);
|
|
1937
|
+
return function(fe, Y) {
|
|
1938
|
+
return fe === void 0 || ae(fe, Y);
|
|
1939
1939
|
};
|
|
1940
1940
|
}, q;
|
|
1941
1941
|
})(i);
|
|
@@ -1949,12 +1949,12 @@ function y1() {
|
|
|
1949
1949
|
};
|
|
1950
1950
|
var A = (function(F) {
|
|
1951
1951
|
function q(G, ee) {
|
|
1952
|
-
var
|
|
1953
|
-
return
|
|
1952
|
+
var ae = F.call(this) || this;
|
|
1953
|
+
return ae.paramList = G, ae.result = ee, ae;
|
|
1954
1954
|
}
|
|
1955
1955
|
return s(q, F), q.prototype.getChecker = function(G, ee) {
|
|
1956
|
-
return function(
|
|
1957
|
-
return typeof
|
|
1956
|
+
return function(ae, fe) {
|
|
1957
|
+
return typeof ae == "function" || fe.fail(null, "is not a function", 0);
|
|
1958
1958
|
};
|
|
1959
1959
|
}, q;
|
|
1960
1960
|
})(i);
|
|
@@ -1971,35 +1971,35 @@ function y1() {
|
|
|
1971
1971
|
return ee.params = G, ee;
|
|
1972
1972
|
}
|
|
1973
1973
|
return s(q, F), q.prototype.getChecker = function(G, ee) {
|
|
1974
|
-
var
|
|
1974
|
+
var ae = this, fe = this.params.map(function($) {
|
|
1975
1975
|
return $.ttype.getChecker(G, ee);
|
|
1976
|
-
}),
|
|
1977
|
-
return !$.isOpt && !
|
|
1978
|
-
}), J = function($,
|
|
1979
|
-
if (!Array.isArray($)) return
|
|
1980
|
-
for (var
|
|
1981
|
-
var
|
|
1982
|
-
if ($[
|
|
1983
|
-
if (le[
|
|
1984
|
-
} else if (!
|
|
1976
|
+
}), Y = new n.NoopContext(), le = this.params.map(function($, oe) {
|
|
1977
|
+
return !$.isOpt && !fe[oe](void 0, Y);
|
|
1978
|
+
}), J = function($, oe) {
|
|
1979
|
+
if (!Array.isArray($)) return oe.fail(null, "is not an array", 0);
|
|
1980
|
+
for (var Q = 0; Q < fe.length; Q++) {
|
|
1981
|
+
var se = ae.params[Q];
|
|
1982
|
+
if ($[Q] === void 0) {
|
|
1983
|
+
if (le[Q]) return oe.fail(se.name, "is missing", 1);
|
|
1984
|
+
} else if (!fe[Q]($[Q], oe)) return oe.fail(se.name, null, 1);
|
|
1985
1985
|
}
|
|
1986
1986
|
return !0;
|
|
1987
1987
|
};
|
|
1988
|
-
return ee ? function($,
|
|
1989
|
-
return !!J($,
|
|
1988
|
+
return ee ? function($, oe) {
|
|
1989
|
+
return !!J($, oe) && ($.length <= fe.length || oe.fail(fe.length, "is extraneous", 2));
|
|
1990
1990
|
} : J;
|
|
1991
1991
|
}, q;
|
|
1992
1992
|
})(i);
|
|
1993
1993
|
e.TParamList = D;
|
|
1994
1994
|
var N = (function(F) {
|
|
1995
1995
|
function q(G, ee) {
|
|
1996
|
-
var
|
|
1997
|
-
return
|
|
1996
|
+
var ae = F.call(this) || this;
|
|
1997
|
+
return ae.validator = G, ae.message = ee, ae;
|
|
1998
1998
|
}
|
|
1999
1999
|
return s(q, F), q.prototype.getChecker = function(G, ee) {
|
|
2000
|
-
var
|
|
2001
|
-
return function(
|
|
2002
|
-
return !!
|
|
2000
|
+
var ae = this;
|
|
2001
|
+
return function(fe, Y) {
|
|
2002
|
+
return !!ae.validator(fe) || Y.fail(null, ae.message, 0);
|
|
2003
2003
|
};
|
|
2004
2004
|
}, q;
|
|
2005
2005
|
})(i);
|
|
@@ -2037,8 +2037,8 @@ function y1() {
|
|
|
2037
2037
|
e.basicTypes[F.name] = new N(function(q) {
|
|
2038
2038
|
return q instanceof F;
|
|
2039
2039
|
}, "is not a " + F.name);
|
|
2040
|
-
},
|
|
2041
|
-
X(H[
|
|
2040
|
+
}, z = 0, H = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, ArrayBuffer]; z < H.length; z++)
|
|
2041
|
+
X(H[z]);
|
|
2042
2042
|
})(Mi)), Mi;
|
|
2043
2043
|
}
|
|
2044
2044
|
var ze = (g1 || (g1 = 1, (function(e) {
|
|
@@ -5358,8 +5358,8 @@ function kk() {
|
|
|
5358
5358
|
const R = new SyntaxError();
|
|
5359
5359
|
return R.code = r, R.reasonCode = a, R.loc = _, R.pos = _.index, R.syntaxPlugin = u, x && (R.missingPlugin = I.missingPlugin), m(R, "clone", function(M = {}) {
|
|
5360
5360
|
var K;
|
|
5361
|
-
const { line:
|
|
5362
|
-
return S(new t(
|
|
5361
|
+
const { line: ne, column: ve, index: de } = (K = M.loc) != null ? K : _;
|
|
5362
|
+
return S(new t(ne, ve, de), Object.assign({}, I, M.details));
|
|
5363
5363
|
}), m(R, "details", I), Object.defineProperty(R, "message", { configurable: !0, get() {
|
|
5364
5364
|
const M = `${P(I)} (${_.line}:${_.column})`;
|
|
5365
5365
|
return this.message = M, M;
|
|
@@ -5391,7 +5391,7 @@ function kk() {
|
|
|
5391
5391
|
const O = { brace: new A("{"), j_oTag: new A("<tag"), j_cTag: new A("</tag"), j_expr: new A("<tag>...</tag>", !0) };
|
|
5392
5392
|
O.template = new A("`", !0);
|
|
5393
5393
|
const D = !0, N = !0, j = !0, U = !0, X = !0;
|
|
5394
|
-
class
|
|
5394
|
+
class z {
|
|
5395
5395
|
constructor(r, a = {}) {
|
|
5396
5396
|
this.label = void 0, this.keyword = void 0, this.beforeExpr = void 0, this.startsExpr = void 0, this.rightAssociative = void 0, this.isLoop = void 0, this.isAssign = void 0, this.prefix = void 0, this.postfix = void 0, this.binop = void 0, this.label = r, this.keyword = a.keyword, this.beforeExpr = !!a.beforeExpr, this.startsExpr = !!a.startsExpr, this.rightAssociative = !!a.rightAssociative, this.isLoop = !!a.isLoop, this.isAssign = !!a.isAssign, this.prefix = !!a.prefix, this.postfix = !!a.postfix, this.binop = a.binop != null ? a.binop : null, this.updateContext = null;
|
|
5397
5397
|
}
|
|
@@ -5406,42 +5406,42 @@ function kk() {
|
|
|
5406
5406
|
return $(P, { beforeExpr: D, binop: r });
|
|
5407
5407
|
}
|
|
5408
5408
|
let G = -1;
|
|
5409
|
-
const ee = [],
|
|
5409
|
+
const ee = [], ae = [], fe = [], Y = [], le = [], J = [];
|
|
5410
5410
|
function $(P, r = {}) {
|
|
5411
5411
|
var a, u, x, S;
|
|
5412
|
-
return ++G,
|
|
5412
|
+
return ++G, ae.push(P), fe.push((a = r.binop) != null ? a : -1), Y.push((u = r.beforeExpr) != null && u), le.push((x = r.startsExpr) != null && x), J.push((S = r.prefix) != null && S), ee.push(new z(P, r)), G;
|
|
5413
5413
|
}
|
|
5414
|
-
function
|
|
5414
|
+
function oe(P, r = {}) {
|
|
5415
5415
|
var a, u, x, S;
|
|
5416
|
-
return ++G, H.set(P, G),
|
|
5416
|
+
return ++G, H.set(P, G), ae.push(P), fe.push((a = r.binop) != null ? a : -1), Y.push((u = r.beforeExpr) != null && u), le.push((x = r.startsExpr) != null && x), J.push((S = r.prefix) != null && S), ee.push(new z("name", r)), G;
|
|
5417
5417
|
}
|
|
5418
|
-
const
|
|
5419
|
-
function
|
|
5418
|
+
const Q = { bracketL: $("[", { beforeExpr: D, startsExpr: N }), bracketHashL: $("#[", { beforeExpr: D, startsExpr: N }), bracketBarL: $("[|", { beforeExpr: D, startsExpr: N }), bracketR: $("]"), bracketBarR: $("|]"), braceL: $("{", { beforeExpr: D, startsExpr: N }), braceBarL: $("{|", { beforeExpr: D, startsExpr: N }), braceHashL: $("#{", { beforeExpr: D, startsExpr: N }), braceR: $("}"), braceBarR: $("|}"), parenL: $("(", { beforeExpr: D, startsExpr: N }), parenR: $(")"), comma: $(",", { beforeExpr: D }), semi: $(";", { beforeExpr: D }), colon: $(":", { beforeExpr: D }), doubleColon: $("::", { beforeExpr: D }), dot: $("."), question: $("?", { beforeExpr: D }), questionDot: $("?."), arrow: $("=>", { beforeExpr: D }), template: $("template"), ellipsis: $("...", { beforeExpr: D }), backQuote: $("`", { startsExpr: N }), dollarBraceL: $("${", { beforeExpr: D, startsExpr: N }), templateTail: $("...`", { startsExpr: N }), templateNonTail: $("...${", { beforeExpr: D, startsExpr: N }), at: $("@"), hash: $("#", { startsExpr: N }), interpreterDirective: $("#!..."), eq: $("=", { beforeExpr: D, isAssign: U }), assign: $("_=", { beforeExpr: D, isAssign: U }), slashAssign: $("_=", { beforeExpr: D, isAssign: U }), xorAssign: $("_=", { beforeExpr: D, isAssign: U }), moduloAssign: $("_=", { beforeExpr: D, isAssign: U }), incDec: $("++/--", { prefix: X, postfix: !0, startsExpr: N }), bang: $("!", { beforeExpr: D, prefix: X, startsExpr: N }), tilde: $("~", { beforeExpr: D, prefix: X, startsExpr: N }), doubleCaret: $("^^", { startsExpr: N }), doubleAt: $("@@", { startsExpr: N }), pipeline: q("|>", 0), nullishCoalescing: q("??", 1), logicalOR: q("||", 1), logicalAND: q("&&", 2), bitwiseOR: q("|", 3), bitwiseXOR: q("^", 4), bitwiseAND: q("&", 5), equality: q("==/!=/===/!==", 6), lt: q("</>/<=/>=", 7), gt: q("</>/<=/>=", 7), relational: q("</>/<=/>=", 7), bitShift: q("<</>>/>>>", 8), bitShiftL: q("<</>>/>>>", 8), bitShiftR: q("<</>>/>>>", 8), plusMin: $("+/-", { beforeExpr: D, binop: 9, prefix: X, startsExpr: N }), modulo: $("%", { binop: 10, startsExpr: N }), star: $("*", { binop: 10 }), slash: q("/", 10), exponent: $("**", { beforeExpr: D, binop: 11, rightAssociative: !0 }), _in: F("in", { beforeExpr: D, binop: 7 }), _instanceof: F("instanceof", { beforeExpr: D, binop: 7 }), _break: F("break"), _case: F("case", { beforeExpr: D }), _catch: F("catch"), _continue: F("continue"), _debugger: F("debugger"), _default: F("default", { beforeExpr: D }), _else: F("else", { beforeExpr: D }), _finally: F("finally"), _function: F("function", { startsExpr: N }), _if: F("if"), _return: F("return", { beforeExpr: D }), _switch: F("switch"), _throw: F("throw", { beforeExpr: D, prefix: X, startsExpr: N }), _try: F("try"), _var: F("var"), _const: F("const"), _with: F("with"), _new: F("new", { beforeExpr: D, startsExpr: N }), _this: F("this", { startsExpr: N }), _super: F("super", { startsExpr: N }), _class: F("class", { startsExpr: N }), _extends: F("extends", { beforeExpr: D }), _export: F("export"), _import: F("import", { startsExpr: N }), _null: F("null", { startsExpr: N }), _true: F("true", { startsExpr: N }), _false: F("false", { startsExpr: N }), _typeof: F("typeof", { beforeExpr: D, prefix: X, startsExpr: N }), _void: F("void", { beforeExpr: D, prefix: X, startsExpr: N }), _delete: F("delete", { beforeExpr: D, prefix: X, startsExpr: N }), _do: F("do", { isLoop: j, beforeExpr: D }), _for: F("for", { isLoop: j }), _while: F("while", { isLoop: j }), _as: oe("as", { startsExpr: N }), _assert: oe("assert", { startsExpr: N }), _async: oe("async", { startsExpr: N }), _await: oe("await", { startsExpr: N }), _defer: oe("defer", { startsExpr: N }), _from: oe("from", { startsExpr: N }), _get: oe("get", { startsExpr: N }), _let: oe("let", { startsExpr: N }), _meta: oe("meta", { startsExpr: N }), _of: oe("of", { startsExpr: N }), _sent: oe("sent", { startsExpr: N }), _set: oe("set", { startsExpr: N }), _source: oe("source", { startsExpr: N }), _static: oe("static", { startsExpr: N }), _using: oe("using", { startsExpr: N }), _yield: oe("yield", { startsExpr: N }), _asserts: oe("asserts", { startsExpr: N }), _checks: oe("checks", { startsExpr: N }), _exports: oe("exports", { startsExpr: N }), _global: oe("global", { startsExpr: N }), _implements: oe("implements", { startsExpr: N }), _intrinsic: oe("intrinsic", { startsExpr: N }), _infer: oe("infer", { startsExpr: N }), _is: oe("is", { startsExpr: N }), _mixins: oe("mixins", { startsExpr: N }), _proto: oe("proto", { startsExpr: N }), _require: oe("require", { startsExpr: N }), _satisfies: oe("satisfies", { startsExpr: N }), _keyof: oe("keyof", { startsExpr: N }), _readonly: oe("readonly", { startsExpr: N }), _unique: oe("unique", { startsExpr: N }), _abstract: oe("abstract", { startsExpr: N }), _declare: oe("declare", { startsExpr: N }), _enum: oe("enum", { startsExpr: N }), _module: oe("module", { startsExpr: N }), _namespace: oe("namespace", { startsExpr: N }), _interface: oe("interface", { startsExpr: N }), _type: oe("type", { startsExpr: N }), _opaque: oe("opaque", { startsExpr: N }), name: $("name", { startsExpr: N }), placeholder: $("%%", { startsExpr: N }), string: $("string", { startsExpr: N }), num: $("num", { startsExpr: N }), bigint: $("bigint", { startsExpr: N }), decimal: $("decimal", { startsExpr: N }), regexp: $("regexp", { startsExpr: N }), privateName: $("#name", { startsExpr: N }), eof: $("eof"), jsxName: $("jsxName"), jsxText: $("jsxText", { beforeExpr: D }), jsxTagStart: $("jsxTagStart", { startsExpr: N }), jsxTagEnd: $("jsxTagEnd") };
|
|
5419
|
+
function se(P) {
|
|
5420
5420
|
return P >= 93 && P <= 133;
|
|
5421
5421
|
}
|
|
5422
|
-
function
|
|
5422
|
+
function W(P) {
|
|
5423
5423
|
return P >= 58 && P <= 133;
|
|
5424
5424
|
}
|
|
5425
|
-
function
|
|
5425
|
+
function ie(P) {
|
|
5426
5426
|
return P >= 58 && P <= 137;
|
|
5427
5427
|
}
|
|
5428
5428
|
function ce(P) {
|
|
5429
5429
|
return le[P];
|
|
5430
5430
|
}
|
|
5431
|
-
function
|
|
5431
|
+
function ye(P) {
|
|
5432
5432
|
return P >= 129 && P <= 131;
|
|
5433
5433
|
}
|
|
5434
5434
|
function Ee(P) {
|
|
5435
5435
|
return P >= 58 && P <= 92;
|
|
5436
5436
|
}
|
|
5437
|
-
function
|
|
5437
|
+
function me(P) {
|
|
5438
5438
|
return P === 34;
|
|
5439
5439
|
}
|
|
5440
|
-
function
|
|
5441
|
-
return
|
|
5440
|
+
function ge(P) {
|
|
5441
|
+
return ae[P];
|
|
5442
5442
|
}
|
|
5443
5443
|
function Oe(P) {
|
|
5444
|
-
return
|
|
5444
|
+
return fe[P];
|
|
5445
5445
|
}
|
|
5446
5446
|
function qe(P) {
|
|
5447
5447
|
return P >= 24 && P <= 25;
|
|
@@ -5981,24 +5981,24 @@ function kk() {
|
|
|
5981
5981
|
const Bu = { decBinOct: /* @__PURE__ */ new Set([46, 66, 69, 79, 95, 98, 101, 111]), hex: /* @__PURE__ */ new Set([46, 88, 95, 120]) }, Ci = { bin: (P) => P === 48 || P === 49, oct: (P) => P >= 48 && P <= 55, dec: (P) => P >= 48 && P <= 57, hex: (P) => P >= 48 && P <= 57 || P >= 65 && P <= 70 || P >= 97 && P <= 102 };
|
|
5982
5982
|
function Uu(P, r, a, u, x, S) {
|
|
5983
5983
|
const _ = a, I = u, R = x;
|
|
5984
|
-
let M = "", K = null,
|
|
5984
|
+
let M = "", K = null, ne = a;
|
|
5985
5985
|
const { length: ve } = r;
|
|
5986
5986
|
for (; ; ) {
|
|
5987
5987
|
if (a >= ve) {
|
|
5988
|
-
S.unterminated(_, I, R), M += r.slice(
|
|
5988
|
+
S.unterminated(_, I, R), M += r.slice(ne, a);
|
|
5989
5989
|
break;
|
|
5990
5990
|
}
|
|
5991
5991
|
const de = r.charCodeAt(a);
|
|
5992
5992
|
if (rT(P, de, r, a)) {
|
|
5993
|
-
M += r.slice(
|
|
5993
|
+
M += r.slice(ne, a);
|
|
5994
5994
|
break;
|
|
5995
5995
|
}
|
|
5996
5996
|
if (de === 92) {
|
|
5997
|
-
M += r.slice(
|
|
5997
|
+
M += r.slice(ne, a);
|
|
5998
5998
|
const Pe = sT(r, a, u, x, P === "template", S);
|
|
5999
|
-
Pe.ch !== null || K ? M += Pe.ch : K = { pos: a, lineStart: u, curLine: x }, { pos: a, lineStart: u, curLine: x } = Pe,
|
|
6000
|
-
} else de === 8232 || de === 8233 ? (++x, u = ++a) : de === 10 || de === 13 ? P === "template" ? (M += r.slice(
|
|
6001
|
-
`, ++a, de === 13 && r.charCodeAt(a) === 10 && ++a, ++x,
|
|
5999
|
+
Pe.ch !== null || K ? M += Pe.ch : K = { pos: a, lineStart: u, curLine: x }, { pos: a, lineStart: u, curLine: x } = Pe, ne = a;
|
|
6000
|
+
} else de === 8232 || de === 8233 ? (++x, u = ++a) : de === 10 || de === 13 ? P === "template" ? (M += r.slice(ne, a) + `
|
|
6001
|
+
`, ++a, de === 13 && r.charCodeAt(a) === 10 && ++a, ++x, ne = u = a) : S.unterminated(_, I, R) : ++a;
|
|
6002
6002
|
}
|
|
6003
6003
|
return { pos: a, str: M, firstInvalidLoc: K, lineStart: u, curLine: x, containsInvalid: !!K };
|
|
6004
6004
|
}
|
|
@@ -6045,14 +6045,14 @@ function kk() {
|
|
|
6045
6045
|
default:
|
|
6046
6046
|
if (R >= 48 && R <= 55) {
|
|
6047
6047
|
const M = r - 1;
|
|
6048
|
-
let K = /^[0-7]+/.exec(P.slice(M, r + 2))[0],
|
|
6049
|
-
|
|
6048
|
+
let K = /^[0-7]+/.exec(P.slice(M, r + 2))[0], ne = parseInt(K, 8);
|
|
6049
|
+
ne > 255 && (K = K.slice(0, -1), ne = parseInt(K, 8)), r += K.length - 1;
|
|
6050
6050
|
const ve = P.charCodeAt(r);
|
|
6051
6051
|
if (K !== "0" || ve === 56 || ve === 57) {
|
|
6052
6052
|
if (x) return I(null);
|
|
6053
6053
|
S.strictNumericEscape(M, a, u);
|
|
6054
6054
|
}
|
|
6055
|
-
return I(String.fromCharCode(
|
|
6055
|
+
return I(String.fromCharCode(ne));
|
|
6056
6056
|
}
|
|
6057
6057
|
return I(String.fromCharCode(R));
|
|
6058
6058
|
}
|
|
@@ -6063,7 +6063,7 @@ function kk() {
|
|
|
6063
6063
|
return { n: M, pos: r } = $u(P, r, a, u, 16, x, S, !1, I, !_), M === null && (_ ? I.invalidEscapeSequence(R, a, u) : r = R - 1), { code: M, pos: r };
|
|
6064
6064
|
}
|
|
6065
6065
|
function $u(P, r, a, u, x, S, _, I, R, M) {
|
|
6066
|
-
const K = r,
|
|
6066
|
+
const K = r, ne = x === 16 ? Bu.hex : Bu.decBinOct, ve = x === 16 ? Ci.hex : x === 10 ? Ci.dec : x === 8 ? Ci.oct : Ci.bin;
|
|
6067
6067
|
let de = !1, Pe = 0;
|
|
6068
6068
|
for (let He = 0, ct = S ?? 1 / 0; He < ct; ++He) {
|
|
6069
6069
|
const Re = P.charCodeAt(r);
|
|
@@ -6071,7 +6071,7 @@ function kk() {
|
|
|
6071
6071
|
if (Re === 95 && I !== "bail") {
|
|
6072
6072
|
const En = P.charCodeAt(r - 1), nc = P.charCodeAt(r + 1);
|
|
6073
6073
|
if (I) {
|
|
6074
|
-
if (Number.isNaN(nc) || !ve(nc) ||
|
|
6074
|
+
if (Number.isNaN(nc) || !ve(nc) || ne.has(En) || ne.has(nc)) {
|
|
6075
6075
|
if (M) return { n: null, pos: r };
|
|
6076
6076
|
R.unexpectedNumericSeparator(r, a, u);
|
|
6077
6077
|
}
|
|
@@ -6509,10 +6509,10 @@ function kk() {
|
|
|
6509
6509
|
var K = !0;
|
|
6510
6510
|
}
|
|
6511
6511
|
if (er(this.codePointAtPos(this.state.pos))) throw this.raise(b.NumberIdentifier, this.state.curPosition());
|
|
6512
|
-
const
|
|
6513
|
-
if (S) return void this.finishToken(136,
|
|
6514
|
-
if (K) return void this.finishToken(137,
|
|
6515
|
-
const ve = I ? parseInt(
|
|
6512
|
+
const ne = this.input.slice(a, this.state.pos).replace(/[_mn]/g, "");
|
|
6513
|
+
if (S) return void this.finishToken(136, ne);
|
|
6514
|
+
if (K) return void this.finishToken(137, ne);
|
|
6515
|
+
const ve = I ? parseInt(ne, 8) : parseFloat(ne);
|
|
6516
6516
|
this.finishToken(135, ve);
|
|
6517
6517
|
}
|
|
6518
6518
|
readCodePoint(r) {
|
|
@@ -6561,11 +6561,11 @@ function kk() {
|
|
|
6561
6561
|
}
|
|
6562
6562
|
readWord(r) {
|
|
6563
6563
|
const a = this.readWord1(r), u = H.get(a);
|
|
6564
|
-
u !== void 0 ? this.finishToken(u,
|
|
6564
|
+
u !== void 0 ? this.finishToken(u, ge(u)) : this.finishToken(132, a);
|
|
6565
6565
|
}
|
|
6566
6566
|
checkKeywordEscapes() {
|
|
6567
6567
|
const { type: r } = this.state;
|
|
6568
|
-
Ee(r) && this.state.containsEsc && this.raise(b.InvalidEscapedReservedWord, this.state.startLoc, { reservedWord:
|
|
6568
|
+
Ee(r) && this.state.containsEsc && this.raise(b.InvalidEscapedReservedWord, this.state.startLoc, { reservedWord: ge(r) });
|
|
6569
6569
|
}
|
|
6570
6570
|
raise(r, a, u = {}) {
|
|
6571
6571
|
const x = r(a instanceof t ? a : a.loc.start, u);
|
|
@@ -6584,7 +6584,7 @@ function kk() {
|
|
|
6584
6584
|
updateContext(r) {
|
|
6585
6585
|
}
|
|
6586
6586
|
unexpected(r, a) {
|
|
6587
|
-
throw this.raise(b.UnexpectedToken, r ?? this.state.startLoc, { expected: a ?
|
|
6587
|
+
throw this.raise(b.UnexpectedToken, r ?? this.state.startLoc, { expected: a ? ge(a) : null });
|
|
6588
6588
|
}
|
|
6589
6589
|
expectPlugin(r, a) {
|
|
6590
6590
|
if (this.hasPlugin(r)) return !0;
|
|
@@ -6775,7 +6775,7 @@ function kk() {
|
|
|
6775
6775
|
u != null && this.raise(b.InvalidCoverInitializedName, u), x != null && this.raise(b.DuplicateProto, x), S != null && this.raise(b.UnexpectedPrivateField, S), _ != null && this.unexpected(_), I != null && this.raise(b.InvalidCoverDiscardElement, I);
|
|
6776
6776
|
}
|
|
6777
6777
|
isLiteralPropertyName() {
|
|
6778
|
-
return
|
|
6778
|
+
return ie(this.state.type);
|
|
6779
6779
|
}
|
|
6780
6780
|
isPrivateName(r) {
|
|
6781
6781
|
return r.type === "PrivateName";
|
|
@@ -6897,8 +6897,8 @@ function kk() {
|
|
|
6897
6897
|
this.castNodeTo(r, "ObjectPattern");
|
|
6898
6898
|
for (let I = 0, R = r.properties.length, M = R - 1; I < R; I++) {
|
|
6899
6899
|
var _;
|
|
6900
|
-
const K = r.properties[I],
|
|
6901
|
-
this.toAssignableObjectExpressionProp(K,
|
|
6900
|
+
const K = r.properties[I], ne = I === M;
|
|
6901
|
+
this.toAssignableObjectExpressionProp(K, ne, a), ne && K.type === "RestElement" && (_ = r.extra) != null && _.trailingCommaLoc && this.raise(b.RestTrailingComma, r.extra.trailingCommaLoc);
|
|
6902
6902
|
}
|
|
6903
6903
|
break;
|
|
6904
6904
|
case "ObjectProperty": {
|
|
@@ -7082,9 +7082,9 @@ function kk() {
|
|
|
7082
7082
|
const He = u === 64 ? b.InvalidLhs : b.InvalidLhsBinding;
|
|
7083
7083
|
return void this.raise(He, r, { ancestor: a });
|
|
7084
7084
|
}
|
|
7085
|
-
let
|
|
7086
|
-
typeof K == "string" ? (
|
|
7087
|
-
const de = R === "ArrayPattern" || R === "ObjectPattern" ? { type: R } : a, Pe = r[
|
|
7085
|
+
let ne, ve;
|
|
7086
|
+
typeof K == "string" ? (ne = K, ve = R === "ParenthesizedExpression") : [ne, ve] = K;
|
|
7087
|
+
const de = R === "ArrayPattern" || R === "ObjectPattern" ? { type: R } : a, Pe = r[ne];
|
|
7088
7088
|
if (Array.isArray(Pe)) for (const He of Pe) He && this.checkLVal(He, de, u, x, S, ve);
|
|
7089
7089
|
else Pe && this.checkLVal(Pe, de, u, x, S, ve);
|
|
7090
7090
|
}
|
|
@@ -7116,7 +7116,7 @@ function kk() {
|
|
|
7116
7116
|
function Wu(P) {
|
|
7117
7117
|
if (!P) throw new Error("Assert fail");
|
|
7118
7118
|
}
|
|
7119
|
-
const
|
|
7119
|
+
const xe = v`typescript`({ AbstractMethodHasImplementation: ({ methodName: P }) => `Method '${P}' cannot have an implementation because it is marked abstract.`, AbstractPropertyHasInitializer: ({ propertyName: P }) => `Property '${P}' cannot have an initializer because it is marked abstract.`, AccessorCannotBeOptional: "An 'accessor' property cannot be declared optional.", AccessorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.", AccessorCannotHaveTypeParameters: "An accessor cannot have type parameters.", ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.", ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.", ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.", DeclareAccessor: ({ kind: P }) => `'declare' is not allowed in ${P}ters.`, DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.", DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.", DuplicateAccessibilityModifier: ({ modifier: P }) => `Accessibility modifier already seen: '${P}'.`, DuplicateModifier: ({ modifier: P }) => `Duplicate modifier: '${P}'.`, EmptyHeritageClauseType: ({ token: P }) => `'${P}' list cannot be empty.`, EmptyTypeArguments: "Type argument list cannot be empty.", EmptyTypeParameters: "Type parameter list cannot be empty.", ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.", ImportAliasHasImportType: "An import alias can not use 'import type'.", ImportReflectionHasImportType: "An `import module` declaration can not use `type` modifier", IncompatibleModifiers: ({ modifiers: P }) => `'${P[0]}' modifier cannot be used with '${P[1]}' modifier.`, IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.", IndexSignatureHasAccessibility: ({ modifier: P }) => `Index signatures cannot have an accessibility modifier ('${P}').`, IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.", IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.", IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.", InitializerNotAllowedInAmbientContext: "Initializers are not allowed in ambient contexts.", InvalidHeritageClauseType: ({ token: P }) => `'${P}' list can only include identifiers or qualified-names with optional type arguments.`, InvalidModifierOnAwaitUsingDeclaration: (P) => `'${P}' modifier cannot appear on an await using declaration.`, InvalidModifierOnTypeMember: ({ modifier: P }) => `'${P}' modifier cannot appear on a type member.`, InvalidModifierOnTypeParameter: ({ modifier: P }) => `'${P}' modifier cannot appear on a type parameter.`, InvalidModifierOnTypeParameterPositions: ({ modifier: P }) => `'${P}' modifier can only appear on a type parameter of a class, interface or type alias.`, InvalidModifierOnUsingDeclaration: (P) => `'${P}' modifier cannot appear on a using declaration.`, InvalidModifiersOrder: ({ orderedModifiers: P }) => `'${P[0]}' modifier must precede '${P[1]}' modifier.`, InvalidPropertyAccessAfterInstantiationExpression: "Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.", InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.", MissingInterfaceName: "'interface' declarations must be followed by an identifier.", NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.", NonClassMethodPropertyHasAbstractModifier: "'abstract' modifier can only appear on a class, method, or property declaration.", OptionalTypeBeforeRequired: "A required element cannot follow an optional element.", OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.", PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.", PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.", PrivateElementHasAccessibility: ({ modifier: P }) => `Private elements cannot have an accessibility modifier ('${P}').`, ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.", ReservedArrowTypeParam: "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.", ReservedTypeAssertion: "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.", SetAccessorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.", SetAccessorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.", SetAccessorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.", SingleTypeParameterWithoutTrailingComma: ({ typeParameterName: P }) => `Single type parameter ${P} should have a trailing comma. Example usage: <${P},>.`, StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", TupleOptionalAfterType: "A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).", TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.", TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.", TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.", UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.", UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.", UnexpectedTypeAnnotation: "Did not expect a type annotation here.", UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.", UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.", UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.", UnsupportedSignatureParameterKind: ({ type: P }) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${P}.`, UsingDeclarationInAmbientContext: (P) => `'${P}' declarations are not allowed in ambient contexts.` });
|
|
7120
7120
|
function Gu(P) {
|
|
7121
7121
|
return P === "private" || P === "public" || P === "protected";
|
|
7122
7122
|
}
|
|
@@ -7426,7 +7426,7 @@ function kk() {
|
|
|
7426
7426
|
}
|
|
7427
7427
|
jsxParseIdentifier() {
|
|
7428
7428
|
const r = this.startNode();
|
|
7429
|
-
return this.match(141) ? r.name = this.state.value : Ee(this.state.type) ? r.name =
|
|
7429
|
+
return this.match(141) ? r.name = this.state.value : Ee(this.state.type) ? r.name = ge(this.state.type) : this.unexpected(), this.next(), this.finishNode(r, "JSXIdentifier");
|
|
7430
7430
|
}
|
|
7431
7431
|
jsxParseNamespacedName() {
|
|
7432
7432
|
const r = this.state.startLoc, a = this.jsxParseIdentifier();
|
|
@@ -7549,7 +7549,7 @@ function kk() {
|
|
|
7549
7549
|
else if (u === 144) {
|
|
7550
7550
|
const x = a[a.length - 1];
|
|
7551
7551
|
x === O.j_oTag && r === 56 || x === O.j_cTag ? (a.pop(), this.state.canStartJSXElement = a[a.length - 1] === O.j_expr) : (this.setContext(O.j_expr), this.state.canStartJSXElement = !0);
|
|
7552
|
-
} else this.state.canStartJSXElement =
|
|
7552
|
+
} else this.state.canStartJSXElement = Y[u];
|
|
7553
7553
|
}
|
|
7554
7554
|
}, flow: (P) => class extends P {
|
|
7555
7555
|
constructor(...r) {
|
|
@@ -7773,15 +7773,15 @@ function kk() {
|
|
|
7773
7773
|
else if (this.match(10) || this.match(47)) de != null && this.unexpected(de), ct && this.unexpected(ct.loc.start), I.callProperties.push(this.flowParseObjectTypeCallProperty(He, ve));
|
|
7774
7774
|
else {
|
|
7775
7775
|
let Re = "init";
|
|
7776
|
-
(this.isContextual(99) || this.isContextual(104)) &&
|
|
7776
|
+
(this.isContextual(99) || this.isContextual(104)) && ie(this.lookahead().type) && (Re = this.state.value, this.next());
|
|
7777
7777
|
const nt = this.flowParseObjectTypeProperty(He, ve, de, ct, Re, u, S ?? !M);
|
|
7778
7778
|
nt === null ? (K = !0, Pe = this.state.lastTokStartLoc) : I.properties.push(nt);
|
|
7779
7779
|
}
|
|
7780
7780
|
this.flowObjectTypeSemicolon(), !Pe || this.match(8) || this.match(9) || this.raise(Se.UnexpectedExplicitInexactInObject, Pe);
|
|
7781
7781
|
}
|
|
7782
7782
|
this.expect(R), u && (I.inexact = K);
|
|
7783
|
-
const
|
|
7784
|
-
return this.state.inType = _,
|
|
7783
|
+
const ne = this.finishNode(I, "ObjectTypeAnnotation");
|
|
7784
|
+
return this.state.inType = _, ne;
|
|
7785
7785
|
}
|
|
7786
7786
|
flowParseObjectTypeProperty(r, a, u, x, S, _, I) {
|
|
7787
7787
|
if (this.eat(21))
|
|
@@ -7873,7 +7873,7 @@ function kk() {
|
|
|
7873
7873
|
}
|
|
7874
7874
|
case 10: {
|
|
7875
7875
|
const I = this.startNode();
|
|
7876
|
-
if (this.next(), !this.match(11) && !this.match(21)) if (
|
|
7876
|
+
if (this.next(), !this.match(11) && !this.match(21)) if (se(this.state.type) || this.match(78)) {
|
|
7877
7877
|
const R = this.lookahead().type;
|
|
7878
7878
|
S = R !== 17 && R !== 14;
|
|
7879
7879
|
} else S = !0;
|
|
@@ -7911,10 +7911,10 @@ function kk() {
|
|
|
7911
7911
|
return this.flowParseTypeofType();
|
|
7912
7912
|
default:
|
|
7913
7913
|
if (Ee(this.state.type)) {
|
|
7914
|
-
const I =
|
|
7914
|
+
const I = ge(this.state.type);
|
|
7915
7915
|
return this.next(), super.createIdentifier(a, I);
|
|
7916
7916
|
}
|
|
7917
|
-
if (
|
|
7917
|
+
if (se(this.state.type)) return this.isContextual(129) ? this.flowParseInterfaceType() : this.flowIdentToTypeAnnotation(r, a, this.parseIdentifier());
|
|
7918
7918
|
}
|
|
7919
7919
|
this.unexpected();
|
|
7920
7920
|
}
|
|
@@ -7993,7 +7993,7 @@ function kk() {
|
|
|
7993
7993
|
}
|
|
7994
7994
|
parseStatementLike(r) {
|
|
7995
7995
|
if (this.state.strict && this.isContextual(129)) {
|
|
7996
|
-
if (
|
|
7996
|
+
if (W(this.lookahead().type)) {
|
|
7997
7997
|
const u = this.startNode();
|
|
7998
7998
|
return this.next(), this.flowParseInterface(u);
|
|
7999
7999
|
}
|
|
@@ -8007,8 +8007,8 @@ function kk() {
|
|
|
8007
8007
|
parseExpressionStatement(r, a, u) {
|
|
8008
8008
|
if (a.type === "Identifier") {
|
|
8009
8009
|
if (a.name === "declare") {
|
|
8010
|
-
if (this.match(80) ||
|
|
8011
|
-
} else if (
|
|
8010
|
+
if (this.match(80) || se(this.state.type) || this.match(68) || this.match(74) || this.match(82)) return this.flowParseDeclare(r);
|
|
8011
|
+
} else if (se(this.state.type)) {
|
|
8012
8012
|
if (a.name === "interface") return this.flowParseInterface(r);
|
|
8013
8013
|
if (a.name === "type") return this.flowParseTypeAlias(r);
|
|
8014
8014
|
if (a.name === "opaque") return this.flowParseOpaqueType(r, !1);
|
|
@@ -8018,11 +8018,11 @@ function kk() {
|
|
|
8018
8018
|
}
|
|
8019
8019
|
shouldParseExportDeclaration() {
|
|
8020
8020
|
const { type: r } = this.state;
|
|
8021
|
-
return r === 126 ||
|
|
8021
|
+
return r === 126 || ye(r) ? !this.state.containsEsc : super.shouldParseExportDeclaration();
|
|
8022
8022
|
}
|
|
8023
8023
|
isExportDefaultSpecifier() {
|
|
8024
8024
|
const { type: r } = this.state;
|
|
8025
|
-
return r === 126 ||
|
|
8025
|
+
return r === 126 || ye(r) ? this.state.containsEsc : super.isExportDefaultSpecifier();
|
|
8026
8026
|
}
|
|
8027
8027
|
parseExportDefaultExpression() {
|
|
8028
8028
|
if (this.isContextual(126)) {
|
|
@@ -8034,20 +8034,20 @@ function kk() {
|
|
|
8034
8034
|
parseConditional(r, a, u) {
|
|
8035
8035
|
if (!this.match(17)) return r;
|
|
8036
8036
|
if (this.state.maybeInArrowParameters) {
|
|
8037
|
-
const
|
|
8038
|
-
if (
|
|
8037
|
+
const ne = this.lookaheadCharCode();
|
|
8038
|
+
if (ne === 44 || ne === 61 || ne === 58 || ne === 41) return this.setOptionalParametersError(u), r;
|
|
8039
8039
|
}
|
|
8040
8040
|
this.expect(17);
|
|
8041
8041
|
const x = this.state.clone(), S = this.state.noArrowAt, _ = this.startNodeAt(a);
|
|
8042
8042
|
let { consequent: I, failed: R } = this.tryParseConditionalConsequent(), [M, K] = this.getArrowLikeExpressions(I);
|
|
8043
8043
|
if (R || K.length > 0) {
|
|
8044
|
-
const
|
|
8044
|
+
const ne = [...S];
|
|
8045
8045
|
if (K.length > 0) {
|
|
8046
|
-
this.state = x, this.state.noArrowAt =
|
|
8047
|
-
for (let ve = 0; ve < K.length; ve++)
|
|
8046
|
+
this.state = x, this.state.noArrowAt = ne;
|
|
8047
|
+
for (let ve = 0; ve < K.length; ve++) ne.push(K[ve].start);
|
|
8048
8048
|
({ consequent: I, failed: R } = this.tryParseConditionalConsequent()), [M, K] = this.getArrowLikeExpressions(I);
|
|
8049
8049
|
}
|
|
8050
|
-
R && M.length > 1 && this.raise(Se.AmbiguousConditionalArrow, x.startLoc), R && M.length === 1 && (this.state = x,
|
|
8050
|
+
R && M.length > 1 && this.raise(Se.AmbiguousConditionalArrow, x.startLoc), R && M.length === 1 && (this.state = x, ne.push(M[0].start), this.state.noArrowAt = ne, { consequent: I, failed: R } = this.tryParseConditionalConsequent());
|
|
8051
8051
|
}
|
|
8052
8052
|
return this.getArrowLikeExpressions(I, !0), this.state.noArrowAt = S, this.expect(14), _.test = r, _.consequent = I, _.alternate = this.forwardNoArrowParamsConversionAt(_, () => this.parseMaybeAssign(void 0, void 0)), this.finishNode(_, "ConditionalExpression");
|
|
8053
8053
|
}
|
|
@@ -8258,9 +8258,9 @@ function kk() {
|
|
|
8258
8258
|
let R = !1;
|
|
8259
8259
|
if (this.isContextual(93) && !this.isLookaheadContextual("as")) {
|
|
8260
8260
|
const K = this.parseIdentifier(!0);
|
|
8261
|
-
I === null ||
|
|
8261
|
+
I === null || W(this.state.type) ? (r.imported = _, r.importKind = null, r.local = this.parseIdentifier()) : (r.imported = K, r.importKind = I, r.local = this.cloneIdentifier(K));
|
|
8262
8262
|
} else {
|
|
8263
|
-
if (I !== null &&
|
|
8263
|
+
if (I !== null && W(this.state.type)) r.imported = this.parseIdentifier(!0), r.importKind = I;
|
|
8264
8264
|
else {
|
|
8265
8265
|
if (a) throw this.raise(b.ImportBindingIsString, r, { importName: _.value });
|
|
8266
8266
|
r.imported = _, r.importKind = null;
|
|
@@ -8302,16 +8302,16 @@ function kk() {
|
|
|
8302
8302
|
var _, I;
|
|
8303
8303
|
let R;
|
|
8304
8304
|
S = S || this.state.clone();
|
|
8305
|
-
const M = this.tryParse((
|
|
8305
|
+
const M = this.tryParse((ne) => {
|
|
8306
8306
|
var ve;
|
|
8307
8307
|
R = this.flowParseTypeParameterDeclaration();
|
|
8308
8308
|
const de = this.forwardNoArrowParamsConversionAt(R, () => {
|
|
8309
8309
|
const He = super.parseMaybeAssign(r, a);
|
|
8310
8310
|
return this.resetStartLocationFromNode(He, R), He;
|
|
8311
8311
|
});
|
|
8312
|
-
(ve = de.extra) != null && ve.parenthesized &&
|
|
8312
|
+
(ve = de.extra) != null && ve.parenthesized && ne();
|
|
8313
8313
|
const Pe = this.maybeUnwrapTypeCastExpression(de);
|
|
8314
|
-
return Pe.type !== "ArrowFunctionExpression" &&
|
|
8314
|
+
return Pe.type !== "ArrowFunctionExpression" && ne(), Pe.typeParameters = R, this.resetStartLocationFromNode(Pe, R), de;
|
|
8315
8315
|
}, S);
|
|
8316
8316
|
let K = null;
|
|
8317
8317
|
if (M.node && this.maybeUnwrapTypeCastExpression(M.node).type === "ArrowFunctionExpression") {
|
|
@@ -8516,7 +8516,7 @@ function kk() {
|
|
|
8516
8516
|
}
|
|
8517
8517
|
flowEnumParseExplicitType({ enumName: r }) {
|
|
8518
8518
|
if (!this.eatContextual(102)) return null;
|
|
8519
|
-
if (!
|
|
8519
|
+
if (!se(this.state.type)) throw this.raise(Se.EnumInvalidExplicitTypeUnknownSupplied, this.state.startLoc, { enumName: r });
|
|
8520
8520
|
const { value: a } = this.state;
|
|
8521
8521
|
return this.next(), a !== "boolean" && a !== "number" && a !== "string" && a !== "symbol" && this.raise(Se.EnumInvalidExplicitType, this.state.startLoc, { enumName: r, invalidEnumType: a }), a;
|
|
8522
8522
|
}
|
|
@@ -8536,14 +8536,14 @@ function kk() {
|
|
|
8536
8536
|
default: {
|
|
8537
8537
|
const R = () => (r.members = [], this.expect(8), this.finishNode(r, "EnumStringBody"));
|
|
8538
8538
|
r.explicitType = !1;
|
|
8539
|
-
const M = _.booleanMembers.length, K = _.numberMembers.length,
|
|
8540
|
-
if (M || K ||
|
|
8539
|
+
const M = _.booleanMembers.length, K = _.numberMembers.length, ne = _.stringMembers.length, ve = _.defaultedMembers.length;
|
|
8540
|
+
if (M || K || ne || ve) {
|
|
8541
8541
|
if (M || K) {
|
|
8542
|
-
if (!K && !
|
|
8542
|
+
if (!K && !ne && M >= ve) {
|
|
8543
8543
|
for (const de of _.defaultedMembers) this.flowEnumErrorBooleanMemberNotInitialized(de.loc.start, { enumName: u, memberName: de.id.name });
|
|
8544
8544
|
return r.members = _.booleanMembers, this.expect(8), this.finishNode(r, "EnumBooleanBody");
|
|
8545
8545
|
}
|
|
8546
|
-
if (!M && !
|
|
8546
|
+
if (!M && !ne && K >= ve) {
|
|
8547
8547
|
for (const de of _.defaultedMembers) this.flowEnumErrorNumberMemberNotInitialized(de.loc.start, { enumName: u, memberName: de.id.name });
|
|
8548
8548
|
return r.members = _.numberMembers, this.expect(8), this.finishNode(r, "EnumNumberBody");
|
|
8549
8549
|
}
|
|
@@ -8583,13 +8583,13 @@ function kk() {
|
|
|
8583
8583
|
}
|
|
8584
8584
|
}, typescript: (P) => class extends P {
|
|
8585
8585
|
constructor(...r) {
|
|
8586
|
-
super(...r), this.tsParseInOutModifiers = this.tsParseModifiers.bind(this, { allowedModifiers: ["in", "out"], disallowedModifiers: ["const", "public", "private", "protected", "readonly", "declare", "abstract", "override"], errorTemplate:
|
|
8586
|
+
super(...r), this.tsParseInOutModifiers = this.tsParseModifiers.bind(this, { allowedModifiers: ["in", "out"], disallowedModifiers: ["const", "public", "private", "protected", "readonly", "declare", "abstract", "override"], errorTemplate: xe.InvalidModifierOnTypeParameter }), this.tsParseConstModifier = this.tsParseModifiers.bind(this, { allowedModifiers: ["const"], disallowedModifiers: ["in", "out"], errorTemplate: xe.InvalidModifierOnTypeParameterPositions }), this.tsParseInOutConstModifiers = this.tsParseModifiers.bind(this, { allowedModifiers: ["in", "out", "const"], disallowedModifiers: ["public", "private", "protected", "readonly", "declare", "abstract", "override"], errorTemplate: xe.InvalidModifierOnTypeParameter });
|
|
8587
8587
|
}
|
|
8588
8588
|
getScopeHandler() {
|
|
8589
8589
|
return Y0;
|
|
8590
8590
|
}
|
|
8591
8591
|
tsIsIdentifier() {
|
|
8592
|
-
return
|
|
8592
|
+
return se(this.state.type);
|
|
8593
8593
|
}
|
|
8594
8594
|
tsTokenCanFollowModifier() {
|
|
8595
8595
|
return this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(139) || this.isLiteralPropertyName();
|
|
@@ -8601,23 +8601,23 @@ function kk() {
|
|
|
8601
8601
|
return this.match(106) ? (this.next(), this.tsTokenCanFollowModifier()) : this.tsNextTokenOnSameLineAndCanFollowModifier();
|
|
8602
8602
|
}
|
|
8603
8603
|
tsParseModifier(r, a, u) {
|
|
8604
|
-
if (!
|
|
8604
|
+
if (!se(this.state.type) && this.state.type !== 58 && this.state.type !== 75) return;
|
|
8605
8605
|
const x = this.state.value;
|
|
8606
8606
|
if (r.includes(x)) {
|
|
8607
8607
|
if (u && this.match(106) || a && this.tsIsStartOfStaticBlocks()) return;
|
|
8608
8608
|
if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) return x;
|
|
8609
8609
|
}
|
|
8610
8610
|
}
|
|
8611
|
-
tsParseModifiers({ allowedModifiers: r, disallowedModifiers: a, stopOnStartOfClassStaticBlock: u, errorTemplate: x =
|
|
8612
|
-
const _ = (R, M, K,
|
|
8613
|
-
M === K && S[
|
|
8614
|
-
}, I = (R, M, K,
|
|
8615
|
-
(S[K] && M ===
|
|
8611
|
+
tsParseModifiers({ allowedModifiers: r, disallowedModifiers: a, stopOnStartOfClassStaticBlock: u, errorTemplate: x = xe.InvalidModifierOnTypeMember }, S) {
|
|
8612
|
+
const _ = (R, M, K, ne) => {
|
|
8613
|
+
M === K && S[ne] && this.raise(xe.InvalidModifiersOrder, R, { orderedModifiers: [K, ne] });
|
|
8614
|
+
}, I = (R, M, K, ne) => {
|
|
8615
|
+
(S[K] && M === ne || S[ne] && M === K) && this.raise(xe.IncompatibleModifiers, R, { modifiers: [K, ne] });
|
|
8616
8616
|
};
|
|
8617
8617
|
for (; ; ) {
|
|
8618
8618
|
const { startLoc: R } = this.state, M = this.tsParseModifier(r.concat(a ?? []), u, S.static);
|
|
8619
8619
|
if (!M) break;
|
|
8620
|
-
Gu(M) ? S.accessibility ? this.raise(
|
|
8620
|
+
Gu(M) ? S.accessibility ? this.raise(xe.DuplicateAccessibilityModifier, R, { modifier: M }) : (_(R, M, M, "override"), _(R, M, M, "static"), _(R, M, M, "readonly"), S.accessibility = M) : uT(M) ? (S[M] && this.raise(xe.DuplicateModifier, R, { modifier: M }), S[M] = !0, _(R, M, "in", "out")) : (hasOwnProperty.call(S, M) ? this.raise(xe.DuplicateModifier, R, { modifier: M }) : (_(R, M, "static", "readonly"), _(R, M, "static", "override"), _(R, M, "override", "readonly"), _(R, M, "abstract", "override"), I(R, M, "declare", "override"), I(R, M, "static", "abstract")), S[M] = !0), a != null && a.includes(M) && this.raise(x, R, { modifier: M });
|
|
8621
8621
|
}
|
|
8622
8622
|
}
|
|
8623
8623
|
tsIsListTerminator(r) {
|
|
@@ -8666,7 +8666,7 @@ function kk() {
|
|
|
8666
8666
|
}
|
|
8667
8667
|
tsParseImportType() {
|
|
8668
8668
|
const r = this.startNode();
|
|
8669
|
-
return this.expect(83), this.expect(10), this.match(134) ? r.argument = this.parseStringLiteral(this.state.value) : (this.raise(
|
|
8669
|
+
return this.expect(83), this.expect(10), this.match(134) ? r.argument = this.parseStringLiteral(this.state.value) : (this.raise(xe.UnsupportedImportTypeArgument, this.state.startLoc), r.argument = super.parseExprAtom()), this.eat(12) ? r.options = this.tsParseImportTypeOptions() : r.options = null, this.expect(11), this.eat(16) && (r.qualifier = this.tsParseEntityName(3)), this.match(47) && (r.typeParameters = this.tsParseTypeArguments()), this.finishNode(r, "TSImportType");
|
|
8670
8670
|
}
|
|
8671
8671
|
tsParseImportTypeOptions() {
|
|
8672
8672
|
const r = this.startNode();
|
|
@@ -8678,7 +8678,7 @@ function kk() {
|
|
|
8678
8678
|
const r = this.startNode(), a = [];
|
|
8679
8679
|
for (this.expect(5); !this.match(8); ) {
|
|
8680
8680
|
const u = this.state.type;
|
|
8681
|
-
|
|
8681
|
+
se(u) || u === 134 ? a.push(super.parsePropertyDefinition(null)) : this.unexpected(), this.eat(12);
|
|
8682
8682
|
}
|
|
8683
8683
|
return r.properties = a, this.next(), this.finishNode(r, "ObjectExpression");
|
|
8684
8684
|
}
|
|
@@ -8724,7 +8724,7 @@ function kk() {
|
|
|
8724
8724
|
const a = this.startNode();
|
|
8725
8725
|
this.match(47) || this.match(143) ? this.next() : this.unexpected();
|
|
8726
8726
|
const u = { value: -1 };
|
|
8727
|
-
return a.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, r), !1, !0, u), a.params.length === 0 && this.raise(
|
|
8727
|
+
return a.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, r), !1, !0, u), a.params.length === 0 && this.raise(xe.EmptyTypeParameters, a), u.value !== -1 && this.addExtra(a, "trailingComma", u.value), this.finishNode(a, "TSTypeParameterDeclaration");
|
|
8728
8728
|
}
|
|
8729
8729
|
tsFillSignature(r, a) {
|
|
8730
8730
|
const u = r === 19, x = "typeAnnotation";
|
|
@@ -8734,7 +8734,7 @@ function kk() {
|
|
|
8734
8734
|
const r = super.parseBindingList(11, 41, 2);
|
|
8735
8735
|
for (const a of r) {
|
|
8736
8736
|
const { type: u } = a;
|
|
8737
|
-
u !== "AssignmentPattern" && u !== "TSParameterProperty" || this.raise(
|
|
8737
|
+
u !== "AssignmentPattern" && u !== "TSParameterProperty" || this.raise(xe.UnsupportedSignatureParameterKind, a, { type: u });
|
|
8738
8738
|
}
|
|
8739
8739
|
return r;
|
|
8740
8740
|
}
|
|
@@ -8745,7 +8745,7 @@ function kk() {
|
|
|
8745
8745
|
return this.tsFillSignature(14, a), this.tsParseTypeMemberSemicolon(), this.finishNode(a, r);
|
|
8746
8746
|
}
|
|
8747
8747
|
tsIsUnambiguouslyIndexSignature() {
|
|
8748
|
-
return this.next(), !!
|
|
8748
|
+
return this.next(), !!se(this.state.type) && (this.next(), this.match(14));
|
|
8749
8749
|
}
|
|
8750
8750
|
tsTryParseIndexSignature(r) {
|
|
8751
8751
|
if (!this.match(0) || !this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))) return;
|
|
@@ -8757,18 +8757,18 @@ function kk() {
|
|
|
8757
8757
|
}
|
|
8758
8758
|
tsParsePropertyOrMethodSignature(r, a) {
|
|
8759
8759
|
if (this.eat(17) && (r.optional = !0), this.match(10) || this.match(47)) {
|
|
8760
|
-
a && this.raise(
|
|
8760
|
+
a && this.raise(xe.ReadonlyForMethodSignature, r);
|
|
8761
8761
|
const u = r;
|
|
8762
|
-
u.kind && this.match(47) && this.raise(
|
|
8762
|
+
u.kind && this.match(47) && this.raise(xe.AccessorCannotHaveTypeParameters, this.state.curPosition()), this.tsFillSignature(14, u), this.tsParseTypeMemberSemicolon();
|
|
8763
8763
|
const x = "parameters", S = "typeAnnotation";
|
|
8764
|
-
if (u.kind === "get") u[x].length > 0 && (this.raise(b.BadGetterArity, this.state.curPosition()), this.isThisParam(u[x][0]) && this.raise(
|
|
8764
|
+
if (u.kind === "get") u[x].length > 0 && (this.raise(b.BadGetterArity, this.state.curPosition()), this.isThisParam(u[x][0]) && this.raise(xe.AccessorCannotDeclareThisParameter, this.state.curPosition()));
|
|
8765
8765
|
else if (u.kind === "set") {
|
|
8766
8766
|
if (u[x].length !== 1) this.raise(b.BadSetterArity, this.state.curPosition());
|
|
8767
8767
|
else {
|
|
8768
8768
|
const _ = u[x][0];
|
|
8769
|
-
this.isThisParam(_) && this.raise(
|
|
8769
|
+
this.isThisParam(_) && this.raise(xe.AccessorCannotDeclareThisParameter, this.state.curPosition()), _.type === "Identifier" && _.optional && this.raise(xe.SetAccessorCannotHaveOptionalParameter, this.state.curPosition()), _.type === "RestElement" && this.raise(xe.SetAccessorCannotHaveRestParameter, this.state.curPosition());
|
|
8770
8770
|
}
|
|
8771
|
-
u[S] && this.raise(
|
|
8771
|
+
u[S] && this.raise(xe.SetAccessorCannotHaveReturnType, u[S]);
|
|
8772
8772
|
} else u.kind = "method";
|
|
8773
8773
|
return this.finishNode(u, "TSMethodSignature");
|
|
8774
8774
|
}
|
|
@@ -8815,13 +8815,13 @@ function kk() {
|
|
|
8815
8815
|
let a = !1;
|
|
8816
8816
|
return r.elementTypes.forEach((u) => {
|
|
8817
8817
|
const { type: x } = u;
|
|
8818
|
-
!a || x === "TSRestType" || x === "TSOptionalType" || x === "TSNamedTupleMember" && u.optional || this.raise(
|
|
8818
|
+
!a || x === "TSRestType" || x === "TSOptionalType" || x === "TSNamedTupleMember" && u.optional || this.raise(xe.OptionalTypeBeforeRequired, u), a || (a = x === "TSNamedTupleMember" && u.optional || x === "TSOptionalType");
|
|
8819
8819
|
}), this.finishNode(r, "TSTupleType");
|
|
8820
8820
|
}
|
|
8821
8821
|
tsParseTupleElementType() {
|
|
8822
8822
|
const r = this.state.startLoc, a = this.eat(21), { startLoc: u } = this.state;
|
|
8823
8823
|
let x, S, _, I;
|
|
8824
|
-
const R =
|
|
8824
|
+
const R = W(this.state.type) ? this.lookaheadCharCode() : null;
|
|
8825
8825
|
if (R === 58) x = !0, _ = !1, S = this.parseIdentifier(!0), this.expect(14), I = this.tsParseType();
|
|
8826
8826
|
else if (R === 63) {
|
|
8827
8827
|
_ = !0;
|
|
@@ -8830,7 +8830,7 @@ function kk() {
|
|
|
8830
8830
|
} else I = this.tsParseType(), _ = this.eat(17), x = this.eat(14);
|
|
8831
8831
|
if (x) {
|
|
8832
8832
|
let M;
|
|
8833
|
-
S ? (M = this.startNodeAt(u), M.optional = _, M.label = S, M.elementType = I, this.eat(17) && (M.optional = !0, this.raise(
|
|
8833
|
+
S ? (M = this.startNodeAt(u), M.optional = _, M.label = S, M.elementType = I, this.eat(17) && (M.optional = !0, this.raise(xe.TupleOptionalAfterType, this.state.lastTokStartLoc))) : (M = this.startNodeAt(u), M.optional = _, this.raise(xe.InvalidTupleMemberLabel, I), M.label = I, M.elementType = this.tsParseType()), I = this.finishNode(M, "TSNamedTupleMember");
|
|
8834
8834
|
} else if (_) {
|
|
8835
8835
|
const M = this.startNodeAt(u);
|
|
8836
8836
|
M.typeAnnotation = I, I = this.finishNode(M, "TSOptionalType");
|
|
@@ -8908,7 +8908,7 @@ function kk() {
|
|
|
8908
8908
|
return this.tsParseTemplateLiteralType();
|
|
8909
8909
|
default: {
|
|
8910
8910
|
const { type: r } = this.state;
|
|
8911
|
-
if (
|
|
8911
|
+
if (se(r) || r === 88 || r === 84) {
|
|
8912
8912
|
const a = r === 88 ? "TSVoidKeyword" : r === 84 ? "TSNullKeyword" : (function(u) {
|
|
8913
8913
|
switch (u) {
|
|
8914
8914
|
case "any":
|
|
@@ -8967,7 +8967,7 @@ function kk() {
|
|
|
8967
8967
|
case "TSArrayType":
|
|
8968
8968
|
return;
|
|
8969
8969
|
default:
|
|
8970
|
-
this.raise(
|
|
8970
|
+
this.raise(xe.UnexpectedReadonly, r);
|
|
8971
8971
|
}
|
|
8972
8972
|
}
|
|
8973
8973
|
tsParseInferType() {
|
|
@@ -9003,7 +9003,7 @@ function kk() {
|
|
|
9003
9003
|
return !!this.match(47) || this.match(10) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
|
|
9004
9004
|
}
|
|
9005
9005
|
tsSkipParameterStart() {
|
|
9006
|
-
if (
|
|
9006
|
+
if (se(this.state.type) || this.match(78)) return this.next(), !0;
|
|
9007
9007
|
if (this.match(5)) {
|
|
9008
9008
|
const { errors: r } = this.state, a = r.length;
|
|
9009
9009
|
try {
|
|
@@ -9057,7 +9057,7 @@ function kk() {
|
|
|
9057
9057
|
tsParseTypePredicateAsserts() {
|
|
9058
9058
|
if (this.state.type !== 109) return !1;
|
|
9059
9059
|
const r = this.state.containsEsc;
|
|
9060
|
-
return this.next(), !(!
|
|
9060
|
+
return this.next(), !(!se(this.state.type) && !this.match(78)) && (r && this.raise(b.InvalidEscapedReservedWord, this.state.lastTokStartLoc, { reservedWord: "asserts" }), !0);
|
|
9061
9061
|
}
|
|
9062
9062
|
tsParseTypeAnnotation(r = !0, a = this.startNode()) {
|
|
9063
9063
|
return this.tsInType(() => {
|
|
@@ -9078,7 +9078,7 @@ function kk() {
|
|
|
9078
9078
|
return this.tsIsStartOfFunctionType() ? this.tsParseFunctionOrConstructorType("TSFunctionType") : this.match(77) ? this.tsParseFunctionOrConstructorType("TSConstructorType") : this.isAbstractConstructorSignature() ? this.tsParseFunctionOrConstructorType("TSConstructorType", !0) : this.tsParseUnionTypeOrHigher();
|
|
9079
9079
|
}
|
|
9080
9080
|
tsParseTypeAssertion() {
|
|
9081
|
-
this.getPluginOption("typescript", "disallowAmbiguousJSXLike") && this.raise(
|
|
9081
|
+
this.getPluginOption("typescript", "disallowAmbiguousJSXLike") && this.raise(xe.ReservedTypeAssertion, this.state.startLoc);
|
|
9082
9082
|
const r = this.startNode();
|
|
9083
9083
|
return r.typeAnnotation = this.tsInType(() => (this.next(), this.match(75) ? this.tsParseTypeReference() : this.tsParseType())), this.expect(48), r.expression = this.parseMaybeUnary(), this.finishNode(r, "TSTypeAssertion");
|
|
9084
9084
|
}
|
|
@@ -9089,11 +9089,11 @@ function kk() {
|
|
|
9089
9089
|
return x.expression = this.tsParseEntityName(3), this.match(47) && (x.typeParameters = this.tsParseTypeArguments()), this.finishNode(x, "TSExpressionWithTypeArguments");
|
|
9090
9090
|
}
|
|
9091
9091
|
});
|
|
9092
|
-
return u.length || this.raise(
|
|
9092
|
+
return u.length || this.raise(xe.EmptyHeritageClauseType, a, { token: r }), u;
|
|
9093
9093
|
}
|
|
9094
9094
|
tsParseInterfaceDeclaration(r, a = {}) {
|
|
9095
9095
|
if (this.hasFollowingLineBreak()) return null;
|
|
9096
|
-
this.expectContextual(129), a.declare && (r.declare = !0),
|
|
9096
|
+
this.expectContextual(129), a.declare && (r.declare = !0), se(this.state.type) ? (r.id = this.parseIdentifier(), this.checkIdentifier(r.id, 130)) : (r.id = null, this.raise(xe.MissingInterfaceName, this.state.startLoc)), r.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers), this.eat(81) && (r.extends = this.tsParseHeritageClause("extends"));
|
|
9097
9097
|
const u = this.startNode();
|
|
9098
9098
|
return u.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)), r.body = this.finishNode(u, "TSInterfaceBody"), this.finishNode(r, "TSInterfaceDeclaration");
|
|
9099
9099
|
}
|
|
@@ -9182,7 +9182,7 @@ function kk() {
|
|
|
9182
9182
|
tsParseImportEqualsDeclaration(r, a, u) {
|
|
9183
9183
|
r.isExport = u || !1, r.id = a || this.parseIdentifier(), this.checkIdentifier(r.id, 4096), this.expect(29);
|
|
9184
9184
|
const x = this.tsParseModuleReference();
|
|
9185
|
-
return r.importKind === "type" && x.type !== "TSExternalModuleReference" && this.raise(
|
|
9185
|
+
return r.importKind === "type" && x.type !== "TSExternalModuleReference" && this.raise(xe.ImportAliasHasImportType, x), r.moduleReference = x, this.semicolon(), this.finishNode(r, "TSImportEqualsDeclaration");
|
|
9186
9186
|
}
|
|
9187
9187
|
tsIsExternalModuleReference() {
|
|
9188
9188
|
return this.isContextual(119) && this.lookaheadCharCode() === 40;
|
|
@@ -9226,17 +9226,17 @@ function kk() {
|
|
|
9226
9226
|
case 74:
|
|
9227
9227
|
return this.match(75) && this.isLookaheadContextual("enum") ? (this.expect(75), this.tsParseEnumDeclaration(r, { const: !0, declare: !0 })) : (r.declare = !0, this.parseVarStatement(r, this.state.value, !0));
|
|
9228
9228
|
case 107:
|
|
9229
|
-
if (this.isUsing()) return this.raise(
|
|
9229
|
+
if (this.isUsing()) return this.raise(xe.InvalidModifierOnUsingDeclaration, this.state.startLoc, "declare"), r.declare = !0, this.parseVarStatement(r, "using", !0);
|
|
9230
9230
|
break;
|
|
9231
9231
|
case 96:
|
|
9232
|
-
if (this.isAwaitUsing()) return this.raise(
|
|
9232
|
+
if (this.isAwaitUsing()) return this.raise(xe.InvalidModifierOnAwaitUsingDeclaration, this.state.startLoc, "declare"), r.declare = !0, this.next(), this.parseVarStatement(r, "await using", !0);
|
|
9233
9233
|
break;
|
|
9234
9234
|
case 129: {
|
|
9235
9235
|
const u = this.tsParseInterfaceDeclaration(r, { declare: !0 });
|
|
9236
9236
|
if (u) return u;
|
|
9237
9237
|
}
|
|
9238
9238
|
default:
|
|
9239
|
-
if (
|
|
9239
|
+
if (se(a)) return this.tsParseDeclaration(r, this.state.value, !0, null);
|
|
9240
9240
|
}
|
|
9241
9241
|
});
|
|
9242
9242
|
}
|
|
@@ -9263,19 +9263,19 @@ function kk() {
|
|
|
9263
9263
|
tsParseDeclaration(r, a, u, x) {
|
|
9264
9264
|
switch (a) {
|
|
9265
9265
|
case "abstract":
|
|
9266
|
-
if (this.tsCheckLineTerminator(u) && (this.match(80) ||
|
|
9266
|
+
if (this.tsCheckLineTerminator(u) && (this.match(80) || se(this.state.type))) return this.tsParseAbstractDeclaration(r, x);
|
|
9267
9267
|
break;
|
|
9268
9268
|
case "module":
|
|
9269
9269
|
if (this.tsCheckLineTerminator(u)) {
|
|
9270
9270
|
if (this.match(134)) return this.tsParseAmbientExternalModuleDeclaration(r);
|
|
9271
|
-
if (
|
|
9271
|
+
if (se(this.state.type)) return r.kind = "module", this.tsParseModuleOrNamespaceDeclaration(r);
|
|
9272
9272
|
}
|
|
9273
9273
|
break;
|
|
9274
9274
|
case "namespace":
|
|
9275
|
-
if (this.tsCheckLineTerminator(u) &&
|
|
9275
|
+
if (this.tsCheckLineTerminator(u) && se(this.state.type)) return r.kind = "namespace", this.tsParseModuleOrNamespaceDeclaration(r);
|
|
9276
9276
|
break;
|
|
9277
9277
|
case "type":
|
|
9278
|
-
if (this.tsCheckLineTerminator(u) &&
|
|
9278
|
+
if (this.tsCheckLineTerminator(u) && se(this.state.type)) return this.tsParseTypeAliasDeclaration(r);
|
|
9279
9279
|
}
|
|
9280
9280
|
}
|
|
9281
9281
|
tsCheckLineTerminator(r) {
|
|
@@ -9296,7 +9296,7 @@ function kk() {
|
|
|
9296
9296
|
}
|
|
9297
9297
|
tsParseTypeArguments() {
|
|
9298
9298
|
const r = this.startNode();
|
|
9299
|
-
return r.params = this.tsInType(() => this.tsInTopLevelContext(() => (this.expect(47), this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this))))), r.params.length === 0 ? this.raise(
|
|
9299
|
+
return r.params = this.tsInType(() => this.tsInTopLevelContext(() => (this.expect(47), this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this))))), r.params.length === 0 ? this.raise(xe.EmptyTypeArguments, r) : this.state.inType || this.curContext() !== O.brace || this.reScan_lt_gt(), this.expect(48), this.finishNode(r, "TSTypeParameterInstantiation");
|
|
9300
9300
|
}
|
|
9301
9301
|
tsIsDeclarationStart() {
|
|
9302
9302
|
return (r = this.state.type) >= 124 && r <= 130;
|
|
@@ -9309,13 +9309,13 @@ function kk() {
|
|
|
9309
9309
|
const u = a.length ? a[0].loc.start : this.state.startLoc, x = {};
|
|
9310
9310
|
this.tsParseModifiers({ allowedModifiers: ["public", "private", "protected", "override", "readonly"] }, x);
|
|
9311
9311
|
const S = x.accessibility, _ = x.override, I = x.readonly;
|
|
9312
|
-
4 & r || !(S || I || _) || this.raise(
|
|
9312
|
+
4 & r || !(S || I || _) || this.raise(xe.UnexpectedParameterModifier, u);
|
|
9313
9313
|
const R = this.parseMaybeDefault();
|
|
9314
9314
|
2 & r && this.parseFunctionParamType(R);
|
|
9315
9315
|
const M = this.parseMaybeDefault(R.loc.start, R);
|
|
9316
9316
|
if (S || I || _) {
|
|
9317
9317
|
const K = this.startNodeAt(u);
|
|
9318
|
-
return a.length && (K.decorators = a), S && (K.accessibility = S), I && (K.readonly = I), _ && (K.override = _), M.type !== "Identifier" && M.type !== "AssignmentPattern" && this.raise(
|
|
9318
|
+
return a.length && (K.decorators = a), S && (K.accessibility = S), I && (K.readonly = I), _ && (K.override = _), M.type !== "Identifier" && M.type !== "AssignmentPattern" && this.raise(xe.UnsupportedParameterPropertyKind, K), K.parameter = M, this.finishNode(K, "TSParameterProperty");
|
|
9319
9319
|
}
|
|
9320
9320
|
return a.length && (R.decorators = a), M;
|
|
9321
9321
|
}
|
|
@@ -9323,7 +9323,7 @@ function kk() {
|
|
|
9323
9323
|
return r.type === "TSParameterProperty" && super.isSimpleParameter(r.parameter) || super.isSimpleParameter(r);
|
|
9324
9324
|
}
|
|
9325
9325
|
tsDisallowOptionalPattern(r) {
|
|
9326
|
-
for (const a of r.params) a.type !== "Identifier" && a.optional && !this.state.isAmbientContext && this.raise(
|
|
9326
|
+
for (const a of r.params) a.type !== "Identifier" && a.optional && !this.state.isAmbientContext && this.raise(xe.PatternIsOptional, a);
|
|
9327
9327
|
}
|
|
9328
9328
|
setArrowFunctionParameters(r, a, u) {
|
|
9329
9329
|
super.setArrowFunctionParameters(r, a, u), this.tsDisallowOptionalPattern(r);
|
|
@@ -9331,14 +9331,14 @@ function kk() {
|
|
|
9331
9331
|
parseFunctionBodyAndFinish(r, a, u = !1) {
|
|
9332
9332
|
this.match(14) && (r.returnType = this.tsParseTypeOrTypePredicateAnnotation(14));
|
|
9333
9333
|
const x = a === "FunctionDeclaration" ? "TSDeclareFunction" : a === "ClassMethod" || a === "ClassPrivateMethod" ? "TSDeclareMethod" : void 0;
|
|
9334
|
-
return x && !this.match(5) && this.isLineTerminator() ? this.finishNode(r, x) : x === "TSDeclareFunction" && this.state.isAmbientContext && (this.raise(
|
|
9334
|
+
return x && !this.match(5) && this.isLineTerminator() ? this.finishNode(r, x) : x === "TSDeclareFunction" && this.state.isAmbientContext && (this.raise(xe.DeclareFunctionHasImplementation, r), r.declare) ? super.parseFunctionBodyAndFinish(r, x, u) : (this.tsDisallowOptionalPattern(r), super.parseFunctionBodyAndFinish(r, a, u));
|
|
9335
9335
|
}
|
|
9336
9336
|
registerFunctionStatementId(r) {
|
|
9337
9337
|
!r.body && r.id ? this.checkIdentifier(r.id, 1024) : super.registerFunctionStatementId(r);
|
|
9338
9338
|
}
|
|
9339
9339
|
tsCheckForInvalidTypeCasts(r) {
|
|
9340
9340
|
r.forEach((a) => {
|
|
9341
|
-
a?.type === "TSTypeCastExpression" && this.raise(
|
|
9341
|
+
a?.type === "TSTypeCastExpression" && this.raise(xe.UnexpectedTypeAnnotation, a.typeAnnotation);
|
|
9342
9342
|
});
|
|
9343
9343
|
}
|
|
9344
9344
|
toReferencedList(r, a) {
|
|
@@ -9363,26 +9363,26 @@ function kk() {
|
|
|
9363
9363
|
let _;
|
|
9364
9364
|
const I = this.tsTryParseAndCatch(() => {
|
|
9365
9365
|
if (!u && this.atPossibleAsyncArrow(r)) {
|
|
9366
|
-
const
|
|
9367
|
-
if (
|
|
9366
|
+
const ne = this.tsTryParseGenericAsyncArrowFunction(a);
|
|
9367
|
+
if (ne) return x.stop = !0, ne;
|
|
9368
9368
|
}
|
|
9369
9369
|
const R = this.tsParseTypeArgumentsInExpression();
|
|
9370
9370
|
if (!R) return;
|
|
9371
9371
|
if (S && !this.match(10)) return void (_ = this.state.curPosition());
|
|
9372
9372
|
if (qe(this.state.type)) {
|
|
9373
|
-
const
|
|
9374
|
-
return
|
|
9373
|
+
const ne = super.parseTaggedTemplateExpression(r, a, x);
|
|
9374
|
+
return ne.typeParameters = R, ne;
|
|
9375
9375
|
}
|
|
9376
9376
|
if (!u && this.eat(10)) {
|
|
9377
|
-
const
|
|
9378
|
-
return
|
|
9377
|
+
const ne = this.startNodeAt(a);
|
|
9378
|
+
return ne.callee = r, ne.arguments = this.parseCallExpressionArguments(), this.tsCheckForInvalidTypeCasts(ne.arguments), ne.typeParameters = R, x.optionalChainMember && (ne.optional = S), this.finishCallExpression(ne, x.optionalChainMember);
|
|
9379
9379
|
}
|
|
9380
9380
|
const M = this.state.type;
|
|
9381
9381
|
if (M === 48 || M === 52 || M !== 10 && ce(M) && !this.hasPrecedingLineBreak()) return;
|
|
9382
9382
|
const K = this.startNodeAt(a);
|
|
9383
9383
|
return K.expression = r, K.typeParameters = R, this.finishNode(K, "TSInstantiationExpression");
|
|
9384
9384
|
});
|
|
9385
|
-
if (_ && this.unexpected(_, 10), I) return I.type === "TSInstantiationExpression" && ((this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40) && this.raise(
|
|
9385
|
+
if (_ && this.unexpected(_, 10), I) return I.type === "TSInstantiationExpression" && ((this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40) && this.raise(xe.InvalidPropertyAccessAfterInstantiationExpression, this.state.startLoc), this.match(16) || this.match(18) || (I.expression = super.stopParseSubscript(r, x))), I;
|
|
9386
9386
|
}
|
|
9387
9387
|
return super.parseSubscript(r, a, u, x);
|
|
9388
9388
|
}
|
|
@@ -9404,7 +9404,7 @@ function kk() {
|
|
|
9404
9404
|
this.state.isAmbientContext || super.checkReservedWord(r, a, u, x);
|
|
9405
9405
|
}
|
|
9406
9406
|
checkImportReflection(r) {
|
|
9407
|
-
super.checkImportReflection(r), r.module && r.importKind !== "value" && this.raise(
|
|
9407
|
+
super.checkImportReflection(r), r.module && r.importKind !== "value" && this.raise(xe.ImportReflectionHasImportType, r.specifiers[0].loc.start);
|
|
9408
9408
|
}
|
|
9409
9409
|
checkDuplicateExports() {
|
|
9410
9410
|
}
|
|
@@ -9422,13 +9422,13 @@ function kk() {
|
|
|
9422
9422
|
parseImport(r) {
|
|
9423
9423
|
if (this.match(134)) return r.importKind = "value", super.parseImport(r);
|
|
9424
9424
|
let a;
|
|
9425
|
-
if (
|
|
9425
|
+
if (se(this.state.type) && this.lookaheadCharCode() === 61) return r.importKind = "value", this.tsParseImportEqualsDeclaration(r);
|
|
9426
9426
|
if (this.isContextual(130)) {
|
|
9427
9427
|
const u = this.parseMaybeImportPhase(r, !1);
|
|
9428
9428
|
if (this.lookaheadCharCode() === 61) return this.tsParseImportEqualsDeclaration(r, u);
|
|
9429
9429
|
a = super.parseImportSpecifiersAndAfter(r, u);
|
|
9430
9430
|
} else a = super.parseImport(r);
|
|
9431
|
-
return a.importKind === "type" && a.specifiers.length > 1 && a.specifiers[0].type === "ImportDefaultSpecifier" && this.raise(
|
|
9431
|
+
return a.importKind === "type" && a.specifiers.length > 1 && a.specifiers[0].type === "ImportDefaultSpecifier" && this.raise(xe.TypeImportCannotSpecifyDefaultAndNamed, a), a;
|
|
9432
9432
|
}
|
|
9433
9433
|
parseExport(r, a) {
|
|
9434
9434
|
if (this.match(83)) {
|
|
@@ -9464,8 +9464,8 @@ function kk() {
|
|
|
9464
9464
|
parseVarStatement(r, a, u = !1) {
|
|
9465
9465
|
const { isAmbientContext: x } = this.state, S = super.parseVarStatement(r, a, u || x);
|
|
9466
9466
|
if (!x) return S;
|
|
9467
|
-
if (!r.declare && (a === "using" || a === "await using")) return this.raiseOverwrite(
|
|
9468
|
-
for (const { id: _, init: I } of S.declarations) I && (a === "var" || a === "let" || _.typeAnnotation ? this.raise(
|
|
9467
|
+
if (!r.declare && (a === "using" || a === "await using")) return this.raiseOverwrite(xe.UsingDeclarationInAmbientContext, r, a), S;
|
|
9468
|
+
for (const { id: _, init: I } of S.declarations) I && (a === "var" || a === "let" || _.typeAnnotation ? this.raise(xe.InitializerNotAllowedInAmbientContext, I) : fT(I, this.hasPlugin("estree")) || this.raise(xe.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference, I));
|
|
9469
9469
|
return S;
|
|
9470
9470
|
}
|
|
9471
9471
|
parseStatementContent(r, a) {
|
|
@@ -9491,19 +9491,19 @@ function kk() {
|
|
|
9491
9491
|
}
|
|
9492
9492
|
parseClassMember(r, a, u) {
|
|
9493
9493
|
const x = ["declare", "private", "public", "protected", "override", "abstract", "readonly", "static"];
|
|
9494
|
-
this.tsParseModifiers({ allowedModifiers: x, disallowedModifiers: ["in", "out"], stopOnStartOfClassStaticBlock: !0, errorTemplate:
|
|
9494
|
+
this.tsParseModifiers({ allowedModifiers: x, disallowedModifiers: ["in", "out"], stopOnStartOfClassStaticBlock: !0, errorTemplate: xe.InvalidModifierOnTypeParameterPositions }, a);
|
|
9495
9495
|
const S = () => {
|
|
9496
|
-
this.tsIsStartOfStaticBlocks() ? (this.next(), this.next(), this.tsHasSomeModifiers(a, x) && this.raise(
|
|
9496
|
+
this.tsIsStartOfStaticBlocks() ? (this.next(), this.next(), this.tsHasSomeModifiers(a, x) && this.raise(xe.StaticBlockCannotHaveModifier, this.state.curPosition()), super.parseClassStaticBlock(r, a)) : this.parseClassMemberWithIsStatic(r, a, u, !!a.static);
|
|
9497
9497
|
};
|
|
9498
9498
|
a.declare ? this.tsInAmbientContext(S) : S();
|
|
9499
9499
|
}
|
|
9500
9500
|
parseClassMemberWithIsStatic(r, a, u, x) {
|
|
9501
9501
|
const S = this.tsTryParseIndexSignature(a);
|
|
9502
|
-
if (S) return r.body.push(S), a.abstract && this.raise(
|
|
9503
|
-
!this.state.inAbstractClass && a.abstract && this.raise(
|
|
9502
|
+
if (S) return r.body.push(S), a.abstract && this.raise(xe.IndexSignatureHasAbstract, a), a.accessibility && this.raise(xe.IndexSignatureHasAccessibility, a, { modifier: a.accessibility }), a.declare && this.raise(xe.IndexSignatureHasDeclare, a), void (a.override && this.raise(xe.IndexSignatureHasOverride, a));
|
|
9503
|
+
!this.state.inAbstractClass && a.abstract && this.raise(xe.NonAbstractClassHasAbstractMethod, a), a.override && (u.hadSuperClass || this.raise(xe.OverrideNotInSubClass, a)), super.parseClassMemberWithIsStatic(r, a, u, x);
|
|
9504
9504
|
}
|
|
9505
9505
|
parsePostMemberNameModifiers(r) {
|
|
9506
|
-
this.eat(17) && (r.optional = !0), r.readonly && this.match(10) && this.raise(
|
|
9506
|
+
this.eat(17) && (r.optional = !0), r.readonly && this.match(10) && this.raise(xe.ClassMethodHasReadonly, r), r.declare && this.match(10) && this.raise(xe.ClassMethodHasDeclare, r);
|
|
9507
9507
|
}
|
|
9508
9508
|
parseExpressionStatement(r, a, u) {
|
|
9509
9509
|
return (a.type === "Identifier" ? this.tsParseExpressionStatement(r, a, u) : void 0) || super.parseExpressionStatement(r, a, u);
|
|
@@ -9530,8 +9530,8 @@ function kk() {
|
|
|
9530
9530
|
parseExportDeclaration(r) {
|
|
9531
9531
|
if (!this.state.isAmbientContext && this.isContextual(125)) return this.tsInAmbientContext(() => this.parseExportDeclaration(r));
|
|
9532
9532
|
const a = this.state.startLoc, u = this.eatContextual(125);
|
|
9533
|
-
if (u && (this.isContextual(125) || !this.shouldParseExportDeclaration())) throw this.raise(
|
|
9534
|
-
const x =
|
|
9533
|
+
if (u && (this.isContextual(125) || !this.shouldParseExportDeclaration())) throw this.raise(xe.ExpectedAmbientAfterExportDeclare, this.state.startLoc);
|
|
9534
|
+
const x = se(this.state.type) && this.tsTryParseExportDeclaration() || super.parseExportDeclaration(r);
|
|
9535
9535
|
return x ? ((x.type === "TSInterfaceDeclaration" || x.type === "TSTypeAliasDeclaration" || u) && (r.exportKind = "type"), u && x.type !== "TSImportEqualsDeclaration" && (this.resetStartLocation(x, a), x.declare = !0), x) : null;
|
|
9536
9536
|
}
|
|
9537
9537
|
parseClassId(r, a, u, x) {
|
|
@@ -9546,23 +9546,23 @@ function kk() {
|
|
|
9546
9546
|
a && (r.typeAnnotation = a);
|
|
9547
9547
|
}
|
|
9548
9548
|
parseClassProperty(r) {
|
|
9549
|
-
if (this.parseClassPropertyAnnotation(r), this.state.isAmbientContext && (!r.readonly || r.typeAnnotation) && this.match(29) && this.raise(
|
|
9549
|
+
if (this.parseClassPropertyAnnotation(r), this.state.isAmbientContext && (!r.readonly || r.typeAnnotation) && this.match(29) && this.raise(xe.DeclareClassFieldHasInitializer, this.state.startLoc), r.abstract && this.match(29)) {
|
|
9550
9550
|
const { key: a } = r;
|
|
9551
|
-
this.raise(
|
|
9551
|
+
this.raise(xe.AbstractPropertyHasInitializer, this.state.startLoc, { propertyName: a.type !== "Identifier" || r.computed ? `[${this.input.slice(this.offsetToSourcePos(a.start), this.offsetToSourcePos(a.end))}]` : a.name });
|
|
9552
9552
|
}
|
|
9553
9553
|
return super.parseClassProperty(r);
|
|
9554
9554
|
}
|
|
9555
9555
|
parseClassPrivateProperty(r) {
|
|
9556
|
-
return r.abstract && this.raise(
|
|
9556
|
+
return r.abstract && this.raise(xe.PrivateElementHasAbstract, r), r.accessibility && this.raise(xe.PrivateElementHasAccessibility, r, { modifier: r.accessibility }), this.parseClassPropertyAnnotation(r), super.parseClassPrivateProperty(r);
|
|
9557
9557
|
}
|
|
9558
9558
|
parseClassAccessorProperty(r) {
|
|
9559
|
-
return this.parseClassPropertyAnnotation(r), r.optional && this.raise(
|
|
9559
|
+
return this.parseClassPropertyAnnotation(r), r.optional && this.raise(xe.AccessorCannotBeOptional, r), super.parseClassAccessorProperty(r);
|
|
9560
9560
|
}
|
|
9561
9561
|
pushClassMethod(r, a, u, x, S, _) {
|
|
9562
9562
|
const I = this.tsTryParseTypeParameters(this.tsParseConstModifier);
|
|
9563
|
-
I && S && this.raise(
|
|
9563
|
+
I && S && this.raise(xe.ConstructorHasTypeParameters, I);
|
|
9564
9564
|
const { declare: R = !1, kind: M } = a;
|
|
9565
|
-
!R || M !== "get" && M !== "set" || this.raise(
|
|
9565
|
+
!R || M !== "get" && M !== "set" || this.raise(xe.DeclareAccessor, a, { kind: M }), I && (a.typeParameters = I), super.pushClassMethod(r, a, u, x, S, _);
|
|
9566
9566
|
}
|
|
9567
9567
|
pushClassPrivateMethod(r, a, u, x) {
|
|
9568
9568
|
const S = this.tsTryParseTypeParameters(this.tsParseConstModifier);
|
|
@@ -9592,7 +9592,7 @@ function kk() {
|
|
|
9592
9592
|
}
|
|
9593
9593
|
parseMaybeAssign(r, a) {
|
|
9594
9594
|
var u, x, S, _, I;
|
|
9595
|
-
let R, M, K,
|
|
9595
|
+
let R, M, K, ne;
|
|
9596
9596
|
if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
|
|
9597
9597
|
if (R = this.state.clone(), M = this.tryParse(() => super.parseMaybeAssign(r, a), R), !M.error) return M.node;
|
|
9598
9598
|
const { context: de } = this.state, Pe = de[de.length - 1];
|
|
@@ -9602,20 +9602,20 @@ function kk() {
|
|
|
9602
9602
|
R && R !== this.state || (R = this.state.clone());
|
|
9603
9603
|
const ve = this.tryParse((de) => {
|
|
9604
9604
|
var Pe, He;
|
|
9605
|
-
|
|
9605
|
+
ne = this.tsParseTypeParameters(this.tsParseConstModifier);
|
|
9606
9606
|
const ct = super.parseMaybeAssign(r, a);
|
|
9607
|
-
return (ct.type !== "ArrowFunctionExpression" || (Pe = ct.extra) != null && Pe.parenthesized) && de(), ((He =
|
|
9607
|
+
return (ct.type !== "ArrowFunctionExpression" || (Pe = ct.extra) != null && Pe.parenthesized) && de(), ((He = ne) == null ? void 0 : He.params.length) !== 0 && this.resetStartLocationFromNode(ct, ne), ct.typeParameters = ne, ct;
|
|
9608
9608
|
}, R);
|
|
9609
|
-
if (!ve.error && !ve.aborted) return
|
|
9609
|
+
if (!ve.error && !ve.aborted) return ne && this.reportReservedArrowTypeParam(ne), ve.node;
|
|
9610
9610
|
if (!M && (Wu(!this.hasPlugin("jsx")), K = this.tryParse(() => super.parseMaybeAssign(r, a), R), !K.error)) return K.node;
|
|
9611
9611
|
if ((x = M) != null && x.node) return this.state = M.failState, M.node;
|
|
9612
|
-
if (ve.node) return this.state = ve.failState,
|
|
9612
|
+
if (ve.node) return this.state = ve.failState, ne && this.reportReservedArrowTypeParam(ne), ve.node;
|
|
9613
9613
|
if ((S = K) != null && S.node) return this.state = K.failState, K.node;
|
|
9614
9614
|
throw ((_ = M) == null ? void 0 : _.error) || ve.error || ((I = K) == null ? void 0 : I.error);
|
|
9615
9615
|
}
|
|
9616
9616
|
reportReservedArrowTypeParam(r) {
|
|
9617
9617
|
var a;
|
|
9618
|
-
r.params.length !== 1 || r.params[0].constraint || (a = r.extra) != null && a.trailingComma || !this.getPluginOption("typescript", "disallowAmbiguousJSXLike") || this.raise(
|
|
9618
|
+
r.params.length !== 1 || r.params[0].constraint || (a = r.extra) != null && a.trailingComma || !this.getPluginOption("typescript", "disallowAmbiguousJSXLike") || this.raise(xe.ReservedArrowTypeParam, r);
|
|
9619
9619
|
}
|
|
9620
9620
|
parseMaybeUnary(r, a) {
|
|
9621
9621
|
return !this.hasPlugin("jsx") && this.match(47) ? this.tsParseTypeAssertion() : super.parseMaybeUnary(r, a);
|
|
@@ -9655,7 +9655,7 @@ function kk() {
|
|
|
9655
9655
|
case "TSSatisfiesExpression":
|
|
9656
9656
|
case "TSNonNullExpression":
|
|
9657
9657
|
case "TSTypeAssertion":
|
|
9658
|
-
a ? this.expressionScope.recordArrowParameterBindingError(
|
|
9658
|
+
a ? this.expressionScope.recordArrowParameterBindingError(xe.UnexpectedTypeCastInParameter, r) : this.raise(xe.UnexpectedTypeCastInParameter, r), this.toAssignable(r.expression, a);
|
|
9659
9659
|
break;
|
|
9660
9660
|
case "AssignmentExpression":
|
|
9661
9661
|
a || r.left.type !== "TSTypeCastExpression" || (r.left = this.typeCastToParameter(r.left));
|
|
@@ -9729,7 +9729,7 @@ function kk() {
|
|
|
9729
9729
|
}
|
|
9730
9730
|
parseMaybeDefault(r, a) {
|
|
9731
9731
|
const u = super.parseMaybeDefault(r, a);
|
|
9732
|
-
return u.type === "AssignmentPattern" && u.typeAnnotation && u.right.start < u.typeAnnotation.start && this.raise(
|
|
9732
|
+
return u.type === "AssignmentPattern" && u.typeAnnotation && u.right.start < u.typeAnnotation.start && this.raise(xe.TypeAnnotationAfterAssign, u.typeAnnotation), u;
|
|
9733
9733
|
}
|
|
9734
9734
|
getTokenFromCode(r) {
|
|
9735
9735
|
if (this.state.inType) {
|
|
@@ -9798,14 +9798,14 @@ function kk() {
|
|
|
9798
9798
|
tsParseAbstractDeclaration(r, a) {
|
|
9799
9799
|
if (this.match(80)) return r.abstract = !0, this.maybeTakeDecorators(a, this.parseClass(r, !0, !1));
|
|
9800
9800
|
if (this.isContextual(129)) {
|
|
9801
|
-
if (!this.hasFollowingLineBreak()) return r.abstract = !0, this.raise(
|
|
9801
|
+
if (!this.hasFollowingLineBreak()) return r.abstract = !0, this.raise(xe.NonClassMethodPropertyHasAbstractModifier, r), this.tsParseInterfaceDeclaration(r);
|
|
9802
9802
|
} else this.unexpected(null, 80);
|
|
9803
9803
|
}
|
|
9804
9804
|
parseMethod(r, a, u, x, S, _, I) {
|
|
9805
9805
|
const R = super.parseMethod(r, a, u, x, S, _, I);
|
|
9806
9806
|
if ((R.abstract || R.type === "TSAbstractMethodDefinition") && (this.hasPlugin("estree") ? R.value : R).body) {
|
|
9807
9807
|
const { key: M } = R;
|
|
9808
|
-
this.raise(
|
|
9808
|
+
this.raise(xe.AbstractMethodHasImplementation, R, { methodName: M.type !== "Identifier" || R.computed ? `[${this.input.slice(this.offsetToSourcePos(M.start), this.offsetToSourcePos(M.end))}]` : M.name });
|
|
9809
9809
|
}
|
|
9810
9810
|
return R;
|
|
9811
9811
|
}
|
|
@@ -9832,13 +9832,13 @@ function kk() {
|
|
|
9832
9832
|
let _, I = r[x], R = !1, M = !0;
|
|
9833
9833
|
const K = I.loc.start;
|
|
9834
9834
|
if (this.isContextual(93)) {
|
|
9835
|
-
const
|
|
9835
|
+
const ne = this.parseIdentifier();
|
|
9836
9836
|
if (this.isContextual(93)) {
|
|
9837
9837
|
const ve = this.parseIdentifier();
|
|
9838
|
-
|
|
9839
|
-
} else
|
|
9840
|
-
} else
|
|
9841
|
-
R && u && this.raise(a ?
|
|
9838
|
+
W(this.state.type) ? (R = !0, I = ne, _ = a ? this.parseIdentifier() : this.parseModuleExportName(), M = !1) : (_ = ve, M = !1);
|
|
9839
|
+
} else W(this.state.type) ? (M = !1, _ = a ? this.parseIdentifier() : this.parseModuleExportName()) : (R = !0, I = ne);
|
|
9840
|
+
} else W(this.state.type) && (R = !0, a ? (I = this.parseIdentifier(!0), this.isContextual(93) || this.checkReservedWord(I.name, I.loc.start, !0, !0)) : I = this.parseModuleExportName());
|
|
9841
|
+
R && u && this.raise(a ? xe.TypeModifierIsUsedInTypeImports : xe.TypeModifierIsUsedInTypeExports, K), r[x] = I, r[S] = _, r[a ? "importKind" : "exportKind"] = R ? "type" : "value", M && this.eatContextual(93) && (r[S] = a ? this.parseIdentifier() : this.parseModuleExportName()), r[S] || (r[S] = this.cloneIdentifier(r[x])), a && this.checkIdentifier(r[S], R ? 4098 : 4096);
|
|
9842
9842
|
}
|
|
9843
9843
|
fillOptionalPropertiesForTSESLint(r) {
|
|
9844
9844
|
switch (r.type) {
|
|
@@ -9905,7 +9905,7 @@ function kk() {
|
|
|
9905
9905
|
parseV8Intrinsic() {
|
|
9906
9906
|
if (this.match(54)) {
|
|
9907
9907
|
const r = this.state.startLoc, a = this.startNode();
|
|
9908
|
-
if (this.next(),
|
|
9908
|
+
if (this.next(), se(this.state.type)) {
|
|
9909
9909
|
const u = this.parseIdentifierName(), x = this.createIdentifier(a, u);
|
|
9910
9910
|
if (this.castNodeTo(x, "V8IntrinsicIdentifier"), this.match(10)) return x;
|
|
9911
9911
|
}
|
|
@@ -10004,7 +10004,7 @@ function kk() {
|
|
|
10004
10004
|
isExportDefaultSpecifier() {
|
|
10005
10005
|
if (this.match(65)) {
|
|
10006
10006
|
const r = this.nextTokenStart();
|
|
10007
|
-
if (this.isUnparsedContextual(r, "from") && this.input.startsWith(
|
|
10007
|
+
if (this.isUnparsedContextual(r, "from") && this.input.startsWith(ge(133), this.nextTokenStartSince(r + 4))) return !0;
|
|
10008
10008
|
}
|
|
10009
10009
|
return super.isExportDefaultSpecifier();
|
|
10010
10010
|
}
|
|
@@ -10076,14 +10076,14 @@ function kk() {
|
|
|
10076
10076
|
let S;
|
|
10077
10077
|
r ? S = !1 : (r = new Ni(), S = !0);
|
|
10078
10078
|
const { type: _ } = this.state;
|
|
10079
|
-
(_ === 10 ||
|
|
10079
|
+
(_ === 10 || se(_)) && (this.state.potentialArrowAt = this.state.start);
|
|
10080
10080
|
let I = this.parseMaybeConditional(r);
|
|
10081
10081
|
if (a && (I = a.call(this, I, u)), (R = this.state.type) >= 29 && R <= 33) {
|
|
10082
10082
|
const M = this.startNodeAt(u), K = this.state.value;
|
|
10083
10083
|
if (M.operator = K, this.match(29)) {
|
|
10084
10084
|
this.toAssignable(I, !0), M.left = I;
|
|
10085
|
-
const
|
|
10086
|
-
r.doubleProtoLoc != null && r.doubleProtoLoc.index >=
|
|
10085
|
+
const ne = u.index;
|
|
10086
|
+
r.doubleProtoLoc != null && r.doubleProtoLoc.index >= ne && (r.doubleProtoLoc = null), r.shorthandAssignLoc != null && r.shorthandAssignLoc.index >= ne && (r.shorthandAssignLoc = null), r.privateKeyLoc != null && r.privateKeyLoc.index >= ne && (this.checkDestructuringPrivate(r), r.privateKeyLoc = null), r.voidPatternLoc != null && r.voidPatternLoc.index >= ne && (r.voidPatternLoc = null);
|
|
10087
10087
|
} else M.left = I;
|
|
10088
10088
|
return this.next(), M.right = this.parseMaybeAssign(), this.checkLVal(I, this.finishNode(M, "AssignmentExpression")), M;
|
|
10089
10089
|
}
|
|
@@ -10130,8 +10130,8 @@ function kk() {
|
|
|
10130
10130
|
const R = x === 41 || x === 42, M = x === 40;
|
|
10131
10131
|
if (M && (_ = Oe(42)), this.next(), x === 39 && this.hasPlugin(["pipelineOperator", { proposal: "minimal" }]) && this.state.type === 96 && this.prodParam.hasAwait) throw this.raise(b.UnexpectedAwaitAfterPipelineBody, this.state.startLoc);
|
|
10132
10132
|
I.right = this.parseExprOpRightExpr(x, _);
|
|
10133
|
-
const K = this.finishNode(I, R || M ? "LogicalExpression" : "BinaryExpression"),
|
|
10134
|
-
if (M && (
|
|
10133
|
+
const K = this.finishNode(I, R || M ? "LogicalExpression" : "BinaryExpression"), ne = this.state.type;
|
|
10134
|
+
if (M && (ne === 41 || ne === 42) || R && ne === 40) throw this.raise(b.MixingCoalesceWithLogical, this.state.startLoc);
|
|
10135
10135
|
return this.parseExprOp(K, a, u);
|
|
10136
10136
|
}
|
|
10137
10137
|
}
|
|
@@ -10199,7 +10199,7 @@ function kk() {
|
|
|
10199
10199
|
const x = this.state.startLoc;
|
|
10200
10200
|
let S = this.parseExprSubscripts(u);
|
|
10201
10201
|
if (this.checkExpressionErrors(u, !1)) return S;
|
|
10202
|
-
for (;
|
|
10202
|
+
for (; me(this.state.type) && !this.canInsertSemicolon(); ) {
|
|
10203
10203
|
const _ = this.startNodeAt(x);
|
|
10204
10204
|
_.operator = this.state.value, _.prefix = !1, _.argument = S, this.next(), this.checkLVal(S, S = this.finishNode(_, "UpdateExpression"));
|
|
10205
10205
|
}
|
|
@@ -10371,13 +10371,13 @@ function kk() {
|
|
|
10371
10371
|
if (x === 137) return this.parseDecimalLiteral(this.state.value);
|
|
10372
10372
|
if (x === 2 || x === 1) return this.parseArrayLike(this.state.type === 2 ? 4 : 3, !1, !0);
|
|
10373
10373
|
if (x === 6 || x === 7) return this.parseObjectLike(this.state.type === 6 ? 9 : 8, !1, !0);
|
|
10374
|
-
if (
|
|
10374
|
+
if (se(x)) {
|
|
10375
10375
|
if (this.isContextual(127) && this.lookaheadInLineCharCode() === 123) return this.parseModuleExpression();
|
|
10376
10376
|
const S = this.state.potentialArrowAt === this.state.start, _ = this.state.containsEsc, I = this.parseIdentifier();
|
|
10377
10377
|
if (!_ && I.name === "async" && !this.canInsertSemicolon()) {
|
|
10378
10378
|
const { type: R } = this.state;
|
|
10379
10379
|
if (R === 68) return this.resetPreviousNodeTrailingComments(I), this.next(), this.parseAsyncFunctionExpression(this.startNodeAtNode(I));
|
|
10380
|
-
if (
|
|
10380
|
+
if (se(R)) return this.lookaheadCharCode() === 61 ? this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(I)) : I;
|
|
10381
10381
|
if (R === 90) return this.resetPreviousNodeTrailingComments(I), this.parseDo(this.startNodeAtNode(I), !0);
|
|
10382
10382
|
}
|
|
10383
10383
|
return S && this.match(19) && !this.canInsertSemicolon() ? (this.next(), this.parseArrowExpression(this.startNodeAtNode(I), [I], !1)) : I;
|
|
@@ -10396,12 +10396,12 @@ function kk() {
|
|
|
10396
10396
|
}
|
|
10397
10397
|
finishTopicReference(r, a, u, x) {
|
|
10398
10398
|
if (this.testTopicReferenceConfiguration(u, a, x)) return u === "hack" ? (this.topicReferenceIsAllowedInCurrentContext() || this.raise(b.PipeTopicUnbound, a), this.registerTopicReference(), this.finishNode(r, "TopicReference")) : (this.topicReferenceIsAllowedInCurrentContext() || this.raise(b.PrimaryTopicNotAllowed, a), this.registerTopicReference(), this.finishNode(r, "PipelinePrimaryTopicReference"));
|
|
10399
|
-
throw this.raise(b.PipeTopicUnconfiguredToken, a, { token:
|
|
10399
|
+
throw this.raise(b.PipeTopicUnconfiguredToken, a, { token: ge(x) });
|
|
10400
10400
|
}
|
|
10401
10401
|
testTopicReferenceConfiguration(r, a, u) {
|
|
10402
10402
|
switch (r) {
|
|
10403
10403
|
case "hack":
|
|
10404
|
-
return this.hasPlugin(["pipelineOperator", { topicToken:
|
|
10404
|
+
return this.hasPlugin(["pipelineOperator", { topicToken: ge(u) }]);
|
|
10405
10405
|
case "smart":
|
|
10406
10406
|
return u === 27;
|
|
10407
10407
|
default:
|
|
@@ -10487,9 +10487,9 @@ function kk() {
|
|
|
10487
10487
|
const x = this.state.maybeInArrowParameters, S = this.state.inFSharpPipelineDirectBody;
|
|
10488
10488
|
this.state.maybeInArrowParameters = !0, this.state.inFSharpPipelineDirectBody = !1;
|
|
10489
10489
|
const _ = this.state.startLoc, I = [], R = new Ni();
|
|
10490
|
-
let M, K,
|
|
10490
|
+
let M, K, ne = !0;
|
|
10491
10491
|
for (; !this.match(11); ) {
|
|
10492
|
-
if (
|
|
10492
|
+
if (ne) ne = !1;
|
|
10493
10493
|
else if (this.expect(12, R.optionalParametersLoc === null ? null : R.optionalParametersLoc), this.match(11)) {
|
|
10494
10494
|
K = this.state.startLoc;
|
|
10495
10495
|
break;
|
|
@@ -10545,8 +10545,8 @@ function kk() {
|
|
|
10545
10545
|
const R = this.match(24), M = R ? -1 : -2, K = x + M;
|
|
10546
10546
|
I.value = { raw: this.input.slice(_, K).replace(/\r\n?/g, `
|
|
10547
10547
|
`), cooked: S === null ? null : S.slice(1, M) }, I.tail = R, this.next();
|
|
10548
|
-
const
|
|
10549
|
-
return this.resetEndLocation(
|
|
10548
|
+
const ne = this.finishNode(I, "TemplateElement");
|
|
10549
|
+
return this.resetEndLocation(ne, n(this.state.lastTokEndLoc, M)), ne;
|
|
10550
10550
|
}
|
|
10551
10551
|
parseTemplate(r) {
|
|
10552
10552
|
const a = this.startNode();
|
|
@@ -10640,7 +10640,7 @@ function kk() {
|
|
|
10640
10640
|
else {
|
|
10641
10641
|
const { type: u, value: x } = this.state;
|
|
10642
10642
|
let S;
|
|
10643
|
-
if (
|
|
10643
|
+
if (W(u)) S = this.parseIdentifier(!0);
|
|
10644
10644
|
else switch (u) {
|
|
10645
10645
|
case 135:
|
|
10646
10646
|
S = this.parseNumericLiteral(x);
|
|
@@ -10758,7 +10758,7 @@ function kk() {
|
|
|
10758
10758
|
parseIdentifierName(r) {
|
|
10759
10759
|
let a;
|
|
10760
10760
|
const { startLoc: u, type: x } = this.state;
|
|
10761
|
-
|
|
10761
|
+
W(x) ? a = this.state.value : this.unexpected();
|
|
10762
10762
|
const S = x <= 92;
|
|
10763
10763
|
return r ? S && this.replaceToken(132) : this.checkReservedWord(a, u, S, !1), this.next(), a;
|
|
10764
10764
|
}
|
|
@@ -10959,14 +10959,14 @@ function kk() {
|
|
|
10959
10959
|
const I = u[_], { type: R } = I;
|
|
10960
10960
|
if (typeof R == "number") {
|
|
10961
10961
|
if (R === 139) {
|
|
10962
|
-
const { loc: M, start: K, value:
|
|
10963
|
-
u.splice(_, 1, new Br({ type: Me(27), value: "#", start: K, end: de, startLoc: M.start, endLoc: Pe }), new Br({ type: Me(132), value:
|
|
10962
|
+
const { loc: M, start: K, value: ne, end: ve } = I, de = K + 1, Pe = n(M.start, 1);
|
|
10963
|
+
u.splice(_, 1, new Br({ type: Me(27), value: "#", start: K, end: de, startLoc: M.start, endLoc: Pe }), new Br({ type: Me(132), value: ne, start: de, end: ve, startLoc: Pe, endLoc: M.end })), _++;
|
|
10964
10964
|
continue;
|
|
10965
10965
|
}
|
|
10966
10966
|
if (qe(R)) {
|
|
10967
|
-
const { loc: M, start: K, value:
|
|
10967
|
+
const { loc: M, start: K, value: ne, end: ve } = I, de = K + 1, Pe = n(M.start, 1);
|
|
10968
10968
|
let He, ct, Re, nt, En;
|
|
10969
|
-
He = x.charCodeAt(K - S) === 96 ? new Br({ type: Me(22), value: "`", start: K, end: de, startLoc: M.start, endLoc: Pe }) : new Br({ type: Me(8), value: "}", start: K, end: de, startLoc: M.start, endLoc: Pe }), R === 24 ? (Re = ve - 1, nt = n(M.end, -1), ct =
|
|
10969
|
+
He = x.charCodeAt(K - S) === 96 ? new Br({ type: Me(22), value: "`", start: K, end: de, startLoc: M.start, endLoc: Pe }) : new Br({ type: Me(8), value: "}", start: K, end: de, startLoc: M.start, endLoc: Pe }), R === 24 ? (Re = ve - 1, nt = n(M.end, -1), ct = ne === null ? null : ne.slice(1, -1), En = new Br({ type: Me(22), value: "`", start: Re, end: ve, startLoc: nt, endLoc: M.end })) : (Re = ve - 2, nt = n(M.end, -2), ct = ne === null ? null : ne.slice(1, -2), En = new Br({ type: Me(23), value: "${", start: Re, end: ve, startLoc: nt, endLoc: M.end })), u.splice(_, 1, He, new Br({ type: Me(20), value: ct, start: de, end: Re, startLoc: Pe, endLoc: nt }), En), _ += 2;
|
|
10970
10970
|
continue;
|
|
10971
10971
|
}
|
|
10972
10972
|
I.type = Me(R);
|
|
@@ -11096,8 +11096,8 @@ function kk() {
|
|
|
11096
11096
|
return this.allowsUsing() ? S || this.raise(b.UnexpectedLexicalDeclaration, this.state.startLoc) : this.raise(b.UnexpectedUsingDeclaration, this.state.startLoc), this.parseVarStatement(x, "using");
|
|
11097
11097
|
case 100: {
|
|
11098
11098
|
if (this.state.containsEsc) break;
|
|
11099
|
-
const K = this.nextTokenStart(),
|
|
11100
|
-
if (
|
|
11099
|
+
const K = this.nextTokenStart(), ne = this.codePointAtPos(K);
|
|
11100
|
+
if (ne !== 91 && (!S && this.hasFollowingLineBreak() || !this.chStartsBindingIdentifier(ne, K) && ne !== 123))
|
|
11101
11101
|
break;
|
|
11102
11102
|
}
|
|
11103
11103
|
case 75:
|
|
@@ -11126,7 +11126,7 @@ function kk() {
|
|
|
11126
11126
|
if (this.isAsyncFunction()) return S || this.raise(b.AsyncFunctionInSingleStatementContext, this.state.startLoc), this.next(), this.parseFunctionStatement(x, !0, !S && _);
|
|
11127
11127
|
}
|
|
11128
11128
|
const R = this.state.value, M = this.parseExpression();
|
|
11129
|
-
return
|
|
11129
|
+
return se(u) && M.type === "Identifier" && this.eat(14) ? this.parseLabeledStatement(x, R, M, r) : this.parseExpressionStatement(x, M, a);
|
|
11130
11130
|
}
|
|
11131
11131
|
assertModuleNodeAllowed(r) {
|
|
11132
11132
|
8 & this.optionFlags || this.inModule || this.raise(b.ImportOutsideModule, r);
|
|
@@ -11212,10 +11212,10 @@ function kk() {
|
|
|
11212
11212
|
{
|
|
11213
11213
|
const R = this.isAwaitUsing(), M = R || this.isForUsing(), K = u && this.hasFollowingBindingAtom() || M;
|
|
11214
11214
|
if (this.match(74) || this.match(75) || K) {
|
|
11215
|
-
const
|
|
11215
|
+
const ne = this.startNode();
|
|
11216
11216
|
let ve;
|
|
11217
|
-
R ? (ve = "await using", this.recordAwaitIfAllowed() || this.raise(b.AwaitUsingNotInAsyncContext, this.state.startLoc), this.next()) : ve = this.state.value, this.next(), this.parseVar(
|
|
11218
|
-
const de = this.finishNode(
|
|
11217
|
+
R ? (ve = "await using", this.recordAwaitIfAllowed() || this.raise(b.AwaitUsingNotInAsyncContext, this.state.startLoc), this.next()) : ve = this.state.value, this.next(), this.parseVar(ne, !0, ve);
|
|
11218
|
+
const de = this.finishNode(ne, "VariableDeclaration"), Pe = this.match(58);
|
|
11219
11219
|
return Pe && M && this.raise(b.ForInUsing, de), (Pe || this.isContextual(102)) && de.declarations.length === 1 ? this.parseForIn(r, de, a) : (a !== null && this.unexpected(a), this.parseFor(r, de));
|
|
11220
11220
|
}
|
|
11221
11221
|
}
|
|
@@ -11346,7 +11346,7 @@ function kk() {
|
|
|
11346
11346
|
}), this.prodParam.exit(), this.scope.exit(), x && !u && this.registerFunctionStatementId(r), this.state.maybeInArrowParameters = I, r;
|
|
11347
11347
|
}
|
|
11348
11348
|
parseFunctionId(r) {
|
|
11349
|
-
return r ||
|
|
11349
|
+
return r || se(this.state.type) ? this.parseIdentifier() : null;
|
|
11350
11350
|
}
|
|
11351
11351
|
parseFunctionParams(r, a) {
|
|
11352
11352
|
this.expect(10), this.expressionScope.enter(new Ii(3)), r.params = this.parseBindingList(11, 41, 2 | (a ? 4 : 0)), this.expressionScope.exit();
|
|
@@ -11413,14 +11413,14 @@ function kk() {
|
|
|
11413
11413
|
this.parseClassMemberWithIsStatic(r, a, u, x);
|
|
11414
11414
|
}
|
|
11415
11415
|
parseClassMemberWithIsStatic(r, a, u, x) {
|
|
11416
|
-
const S = a, _ = a, I = a, R = a, M = a, K = S,
|
|
11416
|
+
const S = a, _ = a, I = a, R = a, M = a, K = S, ne = S;
|
|
11417
11417
|
if (a.static = x, this.parsePropertyNamePrefixOperator(a), this.eat(55)) {
|
|
11418
11418
|
K.kind = "method";
|
|
11419
11419
|
const Re = this.match(139);
|
|
11420
11420
|
return this.parseClassElementName(K), this.parsePostMemberNameModifiers(K), Re ? void this.pushClassPrivateMethod(r, _, !0, !1) : (this.isNonstaticConstructor(S) && this.raise(b.ConstructorIsGenerator, S.key), void this.pushClassMethod(r, S, !0, !1, !1, !1));
|
|
11421
11421
|
}
|
|
11422
|
-
const ve = !this.state.containsEsc &&
|
|
11423
|
-
if (this.parsePostMemberNameModifiers(
|
|
11422
|
+
const ve = !this.state.containsEsc && se(this.state.type), de = this.parseClassElementName(a), Pe = ve ? de.name : null, He = this.isPrivateName(de), ct = this.state.startLoc;
|
|
11423
|
+
if (this.parsePostMemberNameModifiers(ne), this.isClassMethod()) {
|
|
11424
11424
|
if (K.kind = "method", He) return void this.pushClassPrivateMethod(r, _, !1, !1);
|
|
11425
11425
|
const Re = this.isNonstaticConstructor(S);
|
|
11426
11426
|
let nt = !1;
|
|
@@ -11440,9 +11440,9 @@ function kk() {
|
|
|
11440
11440
|
else {
|
|
11441
11441
|
this.resetPreviousNodeTrailingComments(de);
|
|
11442
11442
|
const Re = this.eat(55);
|
|
11443
|
-
|
|
11443
|
+
ne.optional && this.unexpected(ct), K.kind = "method";
|
|
11444
11444
|
const nt = this.match(139);
|
|
11445
|
-
this.parseClassElementName(K), this.parsePostMemberNameModifiers(
|
|
11445
|
+
this.parseClassElementName(K), this.parsePostMemberNameModifiers(ne), nt ? this.pushClassPrivateMethod(r, _, Re, !0) : (this.isNonstaticConstructor(S) && this.raise(b.ConstructorIsAsync, S.key), this.pushClassMethod(r, S, Re, !0, !1, !1));
|
|
11446
11446
|
}
|
|
11447
11447
|
}
|
|
11448
11448
|
parseClassElementName(r) {
|
|
@@ -11501,7 +11501,7 @@ function kk() {
|
|
|
11501
11501
|
this.scope.enter(592), this.expressionScope.enter(Hu()), this.prodParam.enter(0), r.value = this.eat(29) ? this.parseMaybeAssignAllowIn() : null, this.expressionScope.exit(), this.prodParam.exit(), this.scope.exit();
|
|
11502
11502
|
}
|
|
11503
11503
|
parseClassId(r, a, u, x = 8331) {
|
|
11504
|
-
if (
|
|
11504
|
+
if (se(this.state.type)) r.id = this.parseIdentifier(), a && this.declareNameFromIdentifier(r.id, x);
|
|
11505
11505
|
else {
|
|
11506
11506
|
if (!u && a) throw this.raise(b.MissingClassName, this.state.startLoc);
|
|
11507
11507
|
r.id = null;
|
|
@@ -11517,12 +11517,12 @@ function kk() {
|
|
|
11517
11517
|
return this.parseExportFrom(r, !0), this.sawUnambiguousESM = !0, this.finishNode(r, "ExportAllDeclaration");
|
|
11518
11518
|
}
|
|
11519
11519
|
const K = this.maybeParseExportNamedSpecifiers(r);
|
|
11520
|
-
let
|
|
11520
|
+
let ne;
|
|
11521
11521
|
if (x && S && !_ && !K && this.unexpected(null, 5), I && R && this.unexpected(null, 98), M || K) {
|
|
11522
|
-
if (
|
|
11522
|
+
if (ne = !1, a) throw this.raise(b.UnsupportedDecoratorExport, r);
|
|
11523
11523
|
this.parseExportFrom(r, M);
|
|
11524
|
-
} else
|
|
11525
|
-
if (M || K ||
|
|
11524
|
+
} else ne = this.maybeParseExportDeclaration(r);
|
|
11525
|
+
if (M || K || ne) {
|
|
11526
11526
|
var ve;
|
|
11527
11527
|
const de = r;
|
|
11528
11528
|
if (this.checkExport(de, !0, !1, !!de.source), ((ve = de.declaration) == null ? void 0 : ve.type) === "ClassDeclaration") this.maybeTakeDecorators(a, de.declaration, de);
|
|
@@ -11589,7 +11589,7 @@ function kk() {
|
|
|
11589
11589
|
}
|
|
11590
11590
|
isExportDefaultSpecifier() {
|
|
11591
11591
|
const { type: r } = this.state;
|
|
11592
|
-
if (
|
|
11592
|
+
if (se(r)) {
|
|
11593
11593
|
if (r === 95 && !this.state.containsEsc || r === 100) return !1;
|
|
11594
11594
|
if ((r === 130 || r === 129) && !this.state.containsEsc) {
|
|
11595
11595
|
const x = this.nextTokenStart(), S = this.input.charCodeAt(x);
|
|
@@ -11597,7 +11597,7 @@ function kk() {
|
|
|
11597
11597
|
}
|
|
11598
11598
|
} else if (!this.match(65)) return !1;
|
|
11599
11599
|
const a = this.nextTokenStart(), u = this.isUnparsedContextual(a, "from");
|
|
11600
|
-
if (this.input.charCodeAt(a) === 44 ||
|
|
11600
|
+
if (this.input.charCodeAt(a) === 44 || se(this.state.type) && u) return !0;
|
|
11601
11601
|
if (this.match(65) && u) {
|
|
11602
11602
|
const x = this.input.charCodeAt(this.nextTokenStartSince(a + 4));
|
|
11603
11603
|
return x === 34 || x === 39;
|
|
@@ -11700,11 +11700,11 @@ function kk() {
|
|
|
11700
11700
|
parseMaybeImportPhase(r, a) {
|
|
11701
11701
|
if (!this.isPotentialImportPhase(a)) return this.applyImportPhase(r, a, null), null;
|
|
11702
11702
|
const u = this.startNode(), x = this.parseIdentifierName(!0), { type: S } = this.state;
|
|
11703
|
-
return (
|
|
11703
|
+
return (W(S) ? S !== 98 || this.lookaheadCharCode() === 102 : S !== 12) ? (this.applyImportPhase(r, a, x, u.loc.start), null) : (this.applyImportPhase(r, a, null), this.createIdentifier(u, x));
|
|
11704
11704
|
}
|
|
11705
11705
|
isPrecedingIdImportPhase(r) {
|
|
11706
11706
|
const { type: a } = this.state;
|
|
11707
|
-
return
|
|
11707
|
+
return se(a) ? a !== 98 || this.lookaheadCharCode() === 102 : a !== 12;
|
|
11708
11708
|
}
|
|
11709
11709
|
parseImport(r) {
|
|
11710
11710
|
return this.match(134) ? this.parseImportSourceAndAttributes(r) : this.parseImportSpecifiersAndAfter(r, this.parseMaybeImportPhase(r, !1));
|
|
@@ -11760,7 +11760,7 @@ function kk() {
|
|
|
11760
11760
|
const u = this.startNodeAtNode(a);
|
|
11761
11761
|
return u.local = a, r.specifiers.push(this.finishImportSpecifier(u, "ImportDefaultSpecifier")), !0;
|
|
11762
11762
|
}
|
|
11763
|
-
return !!
|
|
11763
|
+
return !!W(this.state.type) && (this.parseImportSpecifierLocal(r, this.startNode(), "ImportDefaultSpecifier"), !0);
|
|
11764
11764
|
}
|
|
11765
11765
|
maybeParseStarImportSpecifier(r) {
|
|
11766
11766
|
if (this.match(55)) {
|
|
@@ -11828,7 +11828,7 @@ function kk() {
|
|
|
11828
11828
|
const r = {};
|
|
11829
11829
|
for (const a of Object.keys(P)) r[a] = Me(P[a]);
|
|
11830
11830
|
return r;
|
|
11831
|
-
})(
|
|
11831
|
+
})(Q);
|
|
11832
11832
|
function Sn(P, r) {
|
|
11833
11833
|
let a = e1;
|
|
11834
11834
|
const u = /* @__PURE__ */ new Map();
|
|
@@ -12992,42 +12992,42 @@ function xx(e) {
|
|
|
12992
12992
|
if (t.type === 13) return t.props;
|
|
12993
12993
|
}
|
|
12994
12994
|
function ki(e, { filename: t = "", prefixIdentifiers: s = !1, hoistStatic: n = !1, hmr: i = !1, cacheHandlers: o = !1, nodeTransforms: c = [], directiveTransforms: l = {}, transformHoist: p = null, isBuiltInComponent: d = fc, isCustomElement: g = fc, expressionPlugins: f = [], scopeId: T = null, slotted: m = !0, ssr: y = !1, inSSR: v = !1, ssrCssVars: b = "", bindingMetadata: E = Wv, inline: w = !1, isTS: C = !1, onError: A = fh, onWarn: O = Zy, compatConfig: D }) {
|
|
12995
|
-
const N = t.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/), j = { filename: t, selfName: N && Qr(Ft(N[1])), prefixIdentifiers: s, hoistStatic: n, hmr: i, cacheHandlers: o, nodeTransforms: c, directiveTransforms: l, transformHoist: p, isBuiltInComponent: d, isCustomElement: g, expressionPlugins: f, scopeId: T, slotted: m, ssr: y, inSSR: v, ssrCssVars: b, bindingMetadata: E, inline: w, isTS: C, onError: A, onWarn: O, compatConfig: D, root: e, helpers: /* @__PURE__ */ new Map(), components: /* @__PURE__ */ new Set(), directives: /* @__PURE__ */ new Set(), hoists: [], imports: [], cached: [], constantCache: /* @__PURE__ */ new WeakMap(), temps: 0, identifiers: /* @__PURE__ */ Object.create(null), scopes: { vFor: 0, vSlot: 0, vPre: 0, vOnce: 0 }, parent: null, grandParent: null, currentNode: e, childIndex: 0, inVOnce: !1, helper(
|
|
12996
|
-
const H = j.helpers.get(
|
|
12997
|
-
return j.helpers.set(
|
|
12998
|
-
}, removeHelper(
|
|
12999
|
-
const H = j.helpers.get(
|
|
12995
|
+
const N = t.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/), j = { filename: t, selfName: N && Qr(Ft(N[1])), prefixIdentifiers: s, hoistStatic: n, hmr: i, cacheHandlers: o, nodeTransforms: c, directiveTransforms: l, transformHoist: p, isBuiltInComponent: d, isCustomElement: g, expressionPlugins: f, scopeId: T, slotted: m, ssr: y, inSSR: v, ssrCssVars: b, bindingMetadata: E, inline: w, isTS: C, onError: A, onWarn: O, compatConfig: D, root: e, helpers: /* @__PURE__ */ new Map(), components: /* @__PURE__ */ new Set(), directives: /* @__PURE__ */ new Set(), hoists: [], imports: [], cached: [], constantCache: /* @__PURE__ */ new WeakMap(), temps: 0, identifiers: /* @__PURE__ */ Object.create(null), scopes: { vFor: 0, vSlot: 0, vPre: 0, vOnce: 0 }, parent: null, grandParent: null, currentNode: e, childIndex: 0, inVOnce: !1, helper(z) {
|
|
12996
|
+
const H = j.helpers.get(z) || 0;
|
|
12997
|
+
return j.helpers.set(z, H + 1), z;
|
|
12998
|
+
}, removeHelper(z) {
|
|
12999
|
+
const H = j.helpers.get(z);
|
|
13000
13000
|
if (H) {
|
|
13001
13001
|
const F = H - 1;
|
|
13002
|
-
F ? j.helpers.set(
|
|
13002
|
+
F ? j.helpers.set(z, F) : j.helpers.delete(z);
|
|
13003
13003
|
}
|
|
13004
|
-
}, helperString: (
|
|
13004
|
+
}, helperString: (z) => `_${Mt[j.helper(z)]}`, replaceNode(z) {
|
|
13005
13005
|
if (!j.currentNode) throw new Error("Node being replaced is already removed.");
|
|
13006
13006
|
if (!j.parent) throw new Error("Cannot replace root node.");
|
|
13007
|
-
j.parent.children[j.childIndex] = j.currentNode =
|
|
13008
|
-
}, removeNode(
|
|
13007
|
+
j.parent.children[j.childIndex] = j.currentNode = z;
|
|
13008
|
+
}, removeNode(z) {
|
|
13009
13009
|
if (!j.parent) throw new Error("Cannot remove root node.");
|
|
13010
|
-
const H = j.parent.children, F =
|
|
13010
|
+
const H = j.parent.children, F = z ? H.indexOf(z) : j.currentNode ? j.childIndex : -1;
|
|
13011
13011
|
if (F < 0) throw new Error("node being removed is not a child of current parent");
|
|
13012
|
-
|
|
13013
|
-
}, onNodeRemoved: fc, addIdentifiers(
|
|
13014
|
-
De(
|
|
13015
|
-
}, removeIdentifiers(
|
|
13016
|
-
De(
|
|
13017
|
-
}, hoist(
|
|
13018
|
-
De(
|
|
13019
|
-
const H = ue(`_hoisted_${j.hoists.length}`, !1,
|
|
13020
|
-
return H.hoisted =
|
|
13021
|
-
}, cache(
|
|
13022
|
-
const q = Gy(j.cached.length,
|
|
13012
|
+
z && z !== j.currentNode ? j.childIndex > F && (j.childIndex--, j.onNodeRemoved()) : (j.currentNode = null, j.onNodeRemoved()), j.parent.children.splice(F, 1);
|
|
13013
|
+
}, onNodeRemoved: fc, addIdentifiers(z) {
|
|
13014
|
+
De(z) ? U(z) : z.identifiers ? z.identifiers.forEach(U) : z.type === 4 && U(z.content);
|
|
13015
|
+
}, removeIdentifiers(z) {
|
|
13016
|
+
De(z) ? X(z) : z.identifiers ? z.identifiers.forEach(X) : z.type === 4 && X(z.content);
|
|
13017
|
+
}, hoist(z) {
|
|
13018
|
+
De(z) && (z = ue(z)), j.hoists.push(z);
|
|
13019
|
+
const H = ue(`_hoisted_${j.hoists.length}`, !1, z.loc, 2);
|
|
13020
|
+
return H.hoisted = z, H;
|
|
13021
|
+
}, cache(z, H = !1, F = !1) {
|
|
13022
|
+
const q = Gy(j.cached.length, z, H, F);
|
|
13023
13023
|
return j.cached.push(q), q;
|
|
13024
13024
|
} };
|
|
13025
|
-
function U(
|
|
13025
|
+
function U(z) {
|
|
13026
13026
|
const { identifiers: H } = j;
|
|
13027
|
-
H[
|
|
13027
|
+
H[z] === void 0 && (H[z] = 0), H[z]++;
|
|
13028
13028
|
}
|
|
13029
|
-
function X(
|
|
13030
|
-
j.identifiers[
|
|
13029
|
+
function X(z) {
|
|
13030
|
+
j.identifiers[z]--;
|
|
13031
13031
|
}
|
|
13032
13032
|
return j;
|
|
13033
13033
|
}
|
|
@@ -13532,22 +13532,22 @@ function qk() {
|
|
|
13532
13532
|
});
|
|
13533
13533
|
}
|
|
13534
13534
|
return c.prototype._parseMappings = function(f, T) {
|
|
13535
|
-
var m, y, v, b, E = 1, w = 0, C = 0, A = 0, O = 0, D = 0, N = f.length, j = 0, U = {}, X = [],
|
|
13535
|
+
var m, y, v, b, E = 1, w = 0, C = 0, A = 0, O = 0, D = 0, N = f.length, j = 0, U = {}, X = [], z = [];
|
|
13536
13536
|
let H = 0;
|
|
13537
|
-
for (; j < N; ) if (f.charAt(j) === ";") E++, j++, w = 0, d(
|
|
13537
|
+
for (; j < N; ) if (f.charAt(j) === ";") E++, j++, w = 0, d(z, H), H = z.length;
|
|
13538
13538
|
else if (f.charAt(j) === ",") j++;
|
|
13539
13539
|
else {
|
|
13540
13540
|
for ((m = new l()).generatedLine = E, v = j; v < N && !this._charIsMappingSeparator(f, v); v++) ;
|
|
13541
13541
|
for (f.slice(j, v), y = []; j < v; ) n.decode(f, j, U), b = U.value, j = U.rest, y.push(b);
|
|
13542
13542
|
if (y.length === 2) throw new Error("Found a source, but no line and column");
|
|
13543
13543
|
if (y.length === 3) throw new Error("Found a source and line, but no column");
|
|
13544
|
-
if (m.generatedColumn = w + y[0], w = m.generatedColumn, y.length > 1 && (m.source = O + y[1], O += y[1], m.originalLine = C + y[2], C = m.originalLine, m.originalLine += 1, m.originalColumn = A + y[3], A = m.originalColumn, y.length > 4 && (m.name = D + y[4], D += y[4])),
|
|
13544
|
+
if (m.generatedColumn = w + y[0], w = m.generatedColumn, y.length > 1 && (m.source = O + y[1], O += y[1], m.originalLine = C + y[2], C = m.originalLine, m.originalLine += 1, m.originalColumn = A + y[3], A = m.originalColumn, y.length > 4 && (m.name = D + y[4], D += y[4])), z.push(m), typeof m.originalLine == "number") {
|
|
13545
13545
|
let q = m.source;
|
|
13546
13546
|
for (; X.length <= q; ) X.push(null);
|
|
13547
13547
|
X[q] === null && (X[q] = []), X[q].push(m);
|
|
13548
13548
|
}
|
|
13549
13549
|
}
|
|
13550
|
-
d(
|
|
13550
|
+
d(z, H), this.__generatedMappings = z;
|
|
13551
13551
|
for (var F = 0; F < X.length; F++) X[F] != null && i(X[F], e.compareByOriginalPositionsNoSource);
|
|
13552
13552
|
this.__originalMappings = [].concat(...X);
|
|
13553
13553
|
}, c.prototype._findMapping = function(f, T, m, y, v, b) {
|
|
@@ -13774,7 +13774,7 @@ function wh(e, t = {}) {
|
|
|
13774
13774
|
t.onContextCreated && t.onContextCreated(s);
|
|
13775
13775
|
const { mode: n, push: i, prefixIdentifiers: o, indent: c, deindent: l, newline: p, scopeId: d, ssr: g } = s, f = Array.from(e.helpers), T = f.length > 0, m = !o && n !== "module", y = !!t.inline, v = y ? hd(e, t) : s;
|
|
13776
13776
|
n === "module" ? (function(C, A, O, D) {
|
|
13777
|
-
const { push: N, newline: j, optimizeImports: U, runtimeModuleName: X, ssrRuntimeModuleName:
|
|
13777
|
+
const { push: N, newline: j, optimizeImports: U, runtimeModuleName: X, ssrRuntimeModuleName: z } = A;
|
|
13778
13778
|
if (C.helpers.size) {
|
|
13779
13779
|
const H = Array.from(C.helpers);
|
|
13780
13780
|
U ? (N(`import { ${H.map((F) => Mt[F]).join(", ")} } from ${JSON.stringify(X)}
|
|
@@ -13784,18 +13784,18 @@ const ${H.map((F) => `_${Mt[F]} = ${Mt[F]}`).join(", ")}
|
|
|
13784
13784
|
`, -1)) : N(`import { ${H.map((F) => `${Mt[F]} as _${Mt[F]}`).join(", ")} } from ${JSON.stringify(X)}
|
|
13785
13785
|
`, -1);
|
|
13786
13786
|
}
|
|
13787
|
-
C.ssrHelpers && C.ssrHelpers.length && N(`import { ${C.ssrHelpers.map((H) => `${Mt[H]} as _${Mt[H]}`).join(", ")} } from "${
|
|
13787
|
+
C.ssrHelpers && C.ssrHelpers.length && N(`import { ${C.ssrHelpers.map((H) => `${Mt[H]} as _${Mt[H]}`).join(", ")} } from "${z}"
|
|
13788
13788
|
`, -1), C.imports.length && ((function(H, F) {
|
|
13789
13789
|
H.length && H.forEach((q) => {
|
|
13790
13790
|
F.push("import "), Qe(q.exp, F), F.push(` from '${q.path}'`), F.newline();
|
|
13791
13791
|
});
|
|
13792
13792
|
})(C.imports, A), j()), dd(C.hoists, A), j(), D || N("export ");
|
|
13793
13793
|
})(e, v, 0, y) : (function(C, A) {
|
|
13794
|
-
const { ssr: O, prefixIdentifiers: D, push: N, newline: j, runtimeModuleName: U, runtimeGlobalName: X, ssrRuntimeModuleName:
|
|
13794
|
+
const { ssr: O, prefixIdentifiers: D, push: N, newline: j, runtimeModuleName: U, runtimeGlobalName: X, ssrRuntimeModuleName: z } = A, H = O ? `require(${JSON.stringify(U)})` : X, F = Array.from(C.helpers);
|
|
13795
13795
|
F.length > 0 && (D ? N(`const { ${F.map(zi).join(", ")} } = ${H}
|
|
13796
13796
|
`, -1) : (N(`const _Vue = ${H}
|
|
13797
13797
|
`, -1), C.hoists.length && N(`const { ${[xi, pa, gn, ha, ua].filter((q) => F.includes(q)).map(zi).join(", ")} } = _Vue
|
|
13798
|
-
`, -1))), C.ssrHelpers && C.ssrHelpers.length && N(`const { ${C.ssrHelpers.map(zi).join(", ")} } = require("${
|
|
13798
|
+
`, -1))), C.ssrHelpers && C.ssrHelpers.length && N(`const { ${C.ssrHelpers.map(zi).join(", ")} } = require("${z}")
|
|
13799
13799
|
`, -1), dd(C.hoists, A), j(), N("return ");
|
|
13800
13800
|
})(e, v);
|
|
13801
13801
|
const b = g ? "ssrRender" : "render", E = g ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"];
|
|
@@ -14032,9 +14032,9 @@ function yt(e, t, s = !1, n = !1, i = Object.create(t.identifiers)) {
|
|
|
14032
14032
|
}
|
|
14033
14033
|
if (A) {
|
|
14034
14034
|
E.start = b.start, E.end = b.end;
|
|
14035
|
-
const { prefix: j, operator: U } = b, X = j ? U : "",
|
|
14035
|
+
const { prefix: j, operator: U } = b, X = j ? U : "", z = j ? "" : U;
|
|
14036
14036
|
return `${t.helperString(oi)}(${v})${t.isTS ? ` //@ts-ignore
|
|
14037
|
-
` : ""} ? ${X}${v}.value${
|
|
14037
|
+
` : ""} ? ${X}${v}.value${z} : ${X}${v}${z}`;
|
|
14038
14038
|
}
|
|
14039
14039
|
return O ? v : N(v);
|
|
14040
14040
|
}
|
|
@@ -14276,8 +14276,8 @@ function Vn(e, t, s = Kk) {
|
|
|
14276
14276
|
let j;
|
|
14277
14277
|
vt(O) ? j = O ? O.content : "default" : l = !0;
|
|
14278
14278
|
const U = rt(E, "for"), X = s(D, U, C, A);
|
|
14279
|
-
let
|
|
14280
|
-
if (
|
|
14279
|
+
let z, H;
|
|
14280
|
+
if (z = rt(E, "if")) l = !0, c.push(or(z.exp, Wi(O, X, m++), bd));
|
|
14281
14281
|
else if (H = rt(E, /^else(?:-if)?$/, !0)) {
|
|
14282
14282
|
let F, q = b;
|
|
14283
14283
|
for (; q-- && (F = n[q], F.type === 3 || !hp(F)); ) ;
|
|
@@ -14398,52 +14398,52 @@ function un(e, t, s = e.props, n, i, o = !1) {
|
|
|
14398
14398
|
d.length && (g.push(jt(Td(d), l)), d = []), X && g.push(X);
|
|
14399
14399
|
}, N = () => {
|
|
14400
14400
|
t.scopes.vFor > 0 && d.push(Ve(ue("ref_for", !0), ue("true")));
|
|
14401
|
-
}, j = ({ key: X, value:
|
|
14401
|
+
}, j = ({ key: X, value: z }) => {
|
|
14402
14402
|
if (vt(X)) {
|
|
14403
14403
|
const H = X.content, F = Oy(H);
|
|
14404
|
-
if (!F || n && !i || H.toLowerCase() === "onclick" || H === "onUpdate:modelValue" || q1(H) || (w = !0), F && q1(H) && (A = !0), F &&
|
|
14404
|
+
if (!F || n && !i || H.toLowerCase() === "onclick" || H === "onUpdate:modelValue" || q1(H) || (w = !0), F && q1(H) && (A = !0), F && z.type === 14 && (z = z.arguments[0]), z.type === 20 || (z.type === 4 || z.type === 8) && Bt(z, t) > 0) return;
|
|
14405
14405
|
H === "ref" ? v = !0 : H === "class" ? b = !0 : H === "style" ? E = !0 : H === "key" || O.includes(H) || O.push(H), !n || H !== "class" && H !== "style" || O.includes(H) || O.push(H);
|
|
14406
14406
|
} else C = !0;
|
|
14407
14407
|
};
|
|
14408
14408
|
for (let X = 0; X < s.length; X++) {
|
|
14409
|
-
const
|
|
14410
|
-
if (
|
|
14411
|
-
const { loc: H, name: F, nameLoc: q, value: G } =
|
|
14409
|
+
const z = s[X];
|
|
14410
|
+
if (z.type === 6) {
|
|
14411
|
+
const { loc: H, name: F, nameLoc: q, value: G } = z;
|
|
14412
14412
|
let ee = !0;
|
|
14413
14413
|
if (F === "ref" && (v = !0, N(), G && t.inline)) {
|
|
14414
|
-
const
|
|
14415
|
-
|
|
14414
|
+
const ae = t.bindingMetadata[G.content];
|
|
14415
|
+
ae !== "setup-let" && ae !== "setup-ref" && ae !== "setup-maybe-ref" || (ee = !1, d.push(Ve(ue("ref_key", !0), ue(G.content, !0, G.loc))));
|
|
14416
14416
|
}
|
|
14417
14417
|
if (F === "is" && (dp(c) || G && G.content.startsWith("vue:"))) continue;
|
|
14418
14418
|
d.push(Ve(ue(F, !0, q), ue(G ? G.content : "", ee, G ? G.loc : H)));
|
|
14419
14419
|
} else {
|
|
14420
|
-
const { name: H, arg: F, exp: q, loc: G, modifiers: ee } =
|
|
14420
|
+
const { name: H, arg: F, exp: q, loc: G, modifiers: ee } = z, ae = H === "bind", fe = H === "on";
|
|
14421
14421
|
if (H === "slot") {
|
|
14422
14422
|
n || t.onError($e(40, G));
|
|
14423
14423
|
continue;
|
|
14424
14424
|
}
|
|
14425
|
-
if (H === "once" || H === "memo" || H === "is" ||
|
|
14426
|
-
if ((
|
|
14427
|
-
C = !0, q ?
|
|
14425
|
+
if (H === "once" || H === "memo" || H === "is" || ae && br(F, "is") && dp(c) || fe && o) continue;
|
|
14426
|
+
if ((ae && br(F, "key") || fe && T && br(F, "vue:before-update")) && (m = !0), ae && br(F, "ref") && N(), !F && (ae || fe)) {
|
|
14427
|
+
C = !0, q ? ae ? (N(), D(), g.push(q)) : D({ type: 14, loc: G, callee: t.helper(xa), arguments: n ? [q] : [q, "true"] }) : t.onError($e(ae ? 34 : 35, G));
|
|
14428
14428
|
continue;
|
|
14429
14429
|
}
|
|
14430
|
-
|
|
14431
|
-
const
|
|
14432
|
-
if (
|
|
14433
|
-
const { props: le, needRuntime: J } =
|
|
14434
|
-
!o && le.forEach(j),
|
|
14435
|
-
} else ih(H) || (f.push(
|
|
14430
|
+
ae && ee.some((le) => le.content === "prop") && (y |= 32);
|
|
14431
|
+
const Y = t.directiveTransforms[H];
|
|
14432
|
+
if (Y) {
|
|
14433
|
+
const { props: le, needRuntime: J } = Y(z, e, t);
|
|
14434
|
+
!o && le.forEach(j), fe && F && !vt(F) ? D(jt(le, l)) : d.push(...le), J && (f.push(z), ss(J) && Ex.set(z, J));
|
|
14435
|
+
} else ih(H) || (f.push(z), T && (m = !0));
|
|
14436
14436
|
}
|
|
14437
14437
|
}
|
|
14438
14438
|
let U;
|
|
14439
14439
|
if (g.length ? (D(), U = g.length > 1 ? we(t.helper(Ps), g, l) : g[0]) : d.length && (U = jt(Td(d), l)), C ? y |= 16 : (b && !n && (y |= 2), E && !n && (y |= 4), O.length && (y |= 8), w && (y |= 32)), m || y !== 0 && y !== 32 || !(v || A || f.length > 0) || (y |= 512), !t.inSSR && U) switch (U.type) {
|
|
14440
14440
|
case 15:
|
|
14441
|
-
let X = -1,
|
|
14441
|
+
let X = -1, z = -1, H = !1;
|
|
14442
14442
|
for (let G = 0; G < U.properties.length; G++) {
|
|
14443
14443
|
const ee = U.properties[G].key;
|
|
14444
|
-
vt(ee) ? ee.content === "class" ? X = G : ee.content === "style" && (
|
|
14444
|
+
vt(ee) ? ee.content === "class" ? X = G : ee.content === "style" && (z = G) : ee.isHandlerKey || (H = !0);
|
|
14445
14445
|
}
|
|
14446
|
-
const F = U.properties[X], q = U.properties[
|
|
14446
|
+
const F = U.properties[X], q = U.properties[z];
|
|
14447
14447
|
H ? U = we(t.helper(on), [U]) : (F && !vt(F.value) && (F.value = we(t.helper(ga), [F.value])), q && (E || q.value.type === 4 && q.value.content.trim()[0] === "[" || q.value.type === 17) && (q.value = we(t.helper(ya), [q.value])));
|
|
14448
14448
|
break;
|
|
14449
14449
|
case 14:
|
|
@@ -15167,10 +15167,10 @@ function Ux(e, t = {}) {
|
|
|
15167
15167
|
const E = (w, C = 0) => {
|
|
15168
15168
|
w && !w.src && (w.map = (function(A, O, D, N, j, U) {
|
|
15169
15169
|
const X = new ks.SourceMapGenerator({ file: A.replace(/\\/g, "/"), sourceRoot: N.replace(/\\/g, "/") });
|
|
15170
|
-
return X.setSourceContent(A, O), X._sources.add(A), D.split($x).forEach((
|
|
15171
|
-
if (!CS.test(
|
|
15170
|
+
return X.setSourceContent(A, O), X._sources.add(A), D.split($x).forEach((z, H) => {
|
|
15171
|
+
if (!CS.test(z)) {
|
|
15172
15172
|
const F = H + 1 + j, q = H + 1;
|
|
15173
|
-
for (let G = 0; G <
|
|
15173
|
+
for (let G = 0; G < z.length; G++) /\s/.test(z[G]) || X._mappings.add({ originalLine: F, originalColumn: G + U, generatedLine: q, generatedColumn: G, source: A, name: null });
|
|
15174
15174
|
}
|
|
15175
15175
|
}), X.toJSON();
|
|
15176
15176
|
})(c, e, w.content, l, p && w.type !== "template" ? 0 : w.loc.start.line - 1, C));
|
|
@@ -16319,8 +16319,8 @@ function db(e, t, s, n) {
|
|
|
16319
16319
|
if (O && !O.match(Zd)) {
|
|
16320
16320
|
for (var D = "", N = 0, j = O.length; N < j; N++) O.charCodeAt(N) > 127 ? D += "x" : D += O[N];
|
|
16321
16321
|
if (!D.match(Zd)) {
|
|
16322
|
-
var U = A.slice(0, d), X = A.slice(d + 1),
|
|
16323
|
-
|
|
16322
|
+
var U = A.slice(0, d), X = A.slice(d + 1), z = O.match(yE);
|
|
16323
|
+
z && (U.push(z[1]), X.unshift(z[2])), X.length && (l = "/" + X.join(".") + l), e.hostname = U.join(".");
|
|
16324
16324
|
break;
|
|
16325
16325
|
}
|
|
16326
16326
|
}
|
|
@@ -16342,8 +16342,8 @@ function db(e, t, s, n) {
|
|
|
16342
16342
|
var ee = l.indexOf("?");
|
|
16343
16343
|
if (ee !== -1 ? (e.search = l.substr(ee), e.query = l.substr(ee + 1), s && (e.query = Jd(e.query)), l = l.slice(0, ee)) : s && (e.search = "", e.query = {}), l && (e.pathname = l), Qs[y] && e.hostname && !e.pathname && (e.pathname = "/"), e.pathname || e.search) {
|
|
16344
16344
|
T = e.pathname || "";
|
|
16345
|
-
var
|
|
16346
|
-
e.path = T +
|
|
16345
|
+
var ae = e.search || "";
|
|
16346
|
+
e.path = T + ae;
|
|
16347
16347
|
}
|
|
16348
16348
|
return e.href = cu(e), e;
|
|
16349
16349
|
}
|
|
@@ -16733,12 +16733,12 @@ const Bb = /* @__PURE__ */ new WeakMap(), Ub = Symbol(), $b = /* @__PURE__ */ ne
|
|
|
16733
16733
|
var C, A;
|
|
16734
16734
|
return T && w.push({ type: 7, name: "slot", exp: T, arg: void 0, modifiers: [], loc: tt }), m && w.push(Sr({}, m)), (function(D, N, j) {
|
|
16735
16735
|
const U = Os([D]), X = ki(U, N);
|
|
16736
|
-
X.ssr = !1, X.scopes = gs({}, j.scopes), X.identifiers = gs({}, j.identifiers), X.imports = j.imports, hn(U, X), ["helpers", "components", "directives"].forEach((
|
|
16737
|
-
X[
|
|
16738
|
-
if (
|
|
16736
|
+
X.ssr = !1, X.scopes = gs({}, j.scopes), X.identifiers = gs({}, j.identifiers), X.imports = j.imports, hn(U, X), ["helpers", "components", "directives"].forEach((z) => {
|
|
16737
|
+
X[z].forEach((H, F) => {
|
|
16738
|
+
if (z === "helpers") {
|
|
16739
16739
|
const q = j.helpers.get(F);
|
|
16740
16740
|
q === void 0 ? j.helpers.set(F, H) : j.helpers.set(F, H + q);
|
|
16741
|
-
} else j[
|
|
16741
|
+
} else j[z].add(H);
|
|
16742
16742
|
});
|
|
16743
16743
|
});
|
|
16744
16744
|
})({ type: 1, ns: 0, tag: "template", tagType: 3, props: w, children: y, loc: tt, codegenNode: void 0 }, E, v), Ky(y);
|
|
@@ -17014,7 +17014,7 @@ function mf({ filename: e, id: t, scoped: s, slotted: n, inMap: i, source: o, as
|
|
|
17014
17014
|
let v = [];
|
|
17015
17015
|
if (ns(T)) {
|
|
17016
17016
|
const U = PE(T);
|
|
17017
|
-
v = [(b = U, (X,
|
|
17017
|
+
v = [(b = U, (X, z) => rf(X, z, b)), IE(U)];
|
|
17018
17018
|
} else T !== !1 && (v = [rf, vb]);
|
|
17019
17019
|
var b;
|
|
17020
17020
|
l && !p && Xn("compileTemplate is called with `ssr: true` but no corresponding `cssVars` option."), t || (Xn("compileTemplate now requires the `id` option."), t = "");
|
|
@@ -17027,20 +17027,20 @@ function mf({ filename: e, id: t, scoped: s, slotted: n, inMap: i, source: o, as
|
|
|
17027
17027
|
i && !c && (N && (N = (function(U, X) {
|
|
17028
17028
|
if (!U) return X;
|
|
17029
17029
|
if (!X) return U;
|
|
17030
|
-
const
|
|
17030
|
+
const z = new ks.SourceMapConsumer(U), H = new ks.SourceMapConsumer(X), F = new ks.SourceMapGenerator();
|
|
17031
17031
|
H.eachMapping((G) => {
|
|
17032
17032
|
if (G.originalLine == null) return;
|
|
17033
|
-
const ee =
|
|
17033
|
+
const ee = z.originalPositionFor({ line: G.originalLine, column: G.originalColumn });
|
|
17034
17034
|
ee.source != null && F.addMapping({ generated: { line: G.generatedLine, column: G.generatedColumn }, original: { line: ee.line, column: G.originalColumn }, source: ee.source, name: ee.name });
|
|
17035
17035
|
});
|
|
17036
17036
|
const q = F;
|
|
17037
|
-
return
|
|
17037
|
+
return z.sources.forEach((G) => {
|
|
17038
17038
|
q._sources.add(G);
|
|
17039
|
-
const ee =
|
|
17039
|
+
const ee = z.sourceContentFor(G);
|
|
17040
17040
|
ee != null && F.setSourceContent(G, ee);
|
|
17041
17041
|
}), q._sourceRoot = U.sourceRoot, q._file = U.file, q.toJSON();
|
|
17042
|
-
})(i, N)), m.length && (function(U, X,
|
|
17043
|
-
const H =
|
|
17042
|
+
})(i, N)), m.length && (function(U, X, z) {
|
|
17043
|
+
const H = z.sourcesContent[0], F = H.indexOf(X), q = H.slice(0, F).split(/\r?\n/).length - 1;
|
|
17044
17044
|
U.forEach((G) => {
|
|
17045
17045
|
G.loc && (G.loc.start.line += q, G.loc.start.offset += F, G.loc.end !== G.loc.start && (G.loc.end.line += q, G.loc.end.offset += F));
|
|
17046
17046
|
});
|
|
@@ -17076,19 +17076,19 @@ function Wb() {
|
|
|
17076
17076
|
yf = 1;
|
|
17077
17077
|
const e = 39, t = 34, s = 92, n = 47, i = 10, o = 32, c = 12, l = 9, p = 13, d = 91, g = 93, f = 40, T = 41, m = 123, y = 125, v = 59, b = 42, E = 58, w = 64, C = /[\t\n\f\r "#'()/;[\\\]{}]/g, A = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, O = /.[\r\n"'(/\\]/, D = /[\da-f]/i;
|
|
17078
17078
|
return Mc = function(N, j = {}) {
|
|
17079
|
-
let U, X,
|
|
17080
|
-
function
|
|
17081
|
-
throw N.error("Unclosed " +
|
|
17079
|
+
let U, X, z, H, F, q, G, ee, ae, fe, Y = N.css.valueOf(), le = j.ignoreErrors, J = Y.length, $ = 0, oe = [], Q = [];
|
|
17080
|
+
function se(W) {
|
|
17081
|
+
throw N.error("Unclosed " + W, $);
|
|
17082
17082
|
}
|
|
17083
|
-
return { back: function(
|
|
17084
|
-
|
|
17083
|
+
return { back: function(W) {
|
|
17084
|
+
Q.push(W);
|
|
17085
17085
|
}, endOfFile: function() {
|
|
17086
|
-
return
|
|
17087
|
-
}, nextToken: function(
|
|
17088
|
-
if (
|
|
17086
|
+
return Q.length === 0 && $ >= J;
|
|
17087
|
+
}, nextToken: function(W) {
|
|
17088
|
+
if (Q.length) return Q.pop();
|
|
17089
17089
|
if ($ >= J) return;
|
|
17090
|
-
let
|
|
17091
|
-
switch (U =
|
|
17090
|
+
let ie = !!W && W.ignoreUnclosed;
|
|
17091
|
+
switch (U = Y.charCodeAt($), U) {
|
|
17092
17092
|
case i:
|
|
17093
17093
|
case o:
|
|
17094
17094
|
case l:
|
|
@@ -17096,9 +17096,9 @@ function Wb() {
|
|
|
17096
17096
|
case c:
|
|
17097
17097
|
H = $;
|
|
17098
17098
|
do
|
|
17099
|
-
H += 1, U =
|
|
17099
|
+
H += 1, U = Y.charCodeAt(H);
|
|
17100
17100
|
while (U === o || U === i || U === l || U === p || U === c);
|
|
17101
|
-
q = ["space",
|
|
17101
|
+
q = ["space", Y.slice($, H)], $ = H - 1;
|
|
17102
17102
|
break;
|
|
17103
17103
|
case d:
|
|
17104
17104
|
case g:
|
|
@@ -17112,49 +17112,49 @@ function Wb() {
|
|
|
17112
17112
|
break;
|
|
17113
17113
|
}
|
|
17114
17114
|
case f:
|
|
17115
|
-
if (
|
|
17115
|
+
if (fe = oe.length ? oe.pop()[1] : "", ae = Y.charCodeAt($ + 1), fe === "url" && ae !== e && ae !== t && ae !== o && ae !== i && ae !== l && ae !== c && ae !== p) {
|
|
17116
17116
|
H = $;
|
|
17117
17117
|
do {
|
|
17118
|
-
if (G = !1, H =
|
|
17119
|
-
if (le ||
|
|
17118
|
+
if (G = !1, H = Y.indexOf(")", H + 1), H === -1) {
|
|
17119
|
+
if (le || ie) {
|
|
17120
17120
|
H = $;
|
|
17121
17121
|
break;
|
|
17122
17122
|
}
|
|
17123
|
-
|
|
17123
|
+
se("bracket");
|
|
17124
17124
|
}
|
|
17125
|
-
for (ee = H;
|
|
17125
|
+
for (ee = H; Y.charCodeAt(ee - 1) === s; ) ee -= 1, G = !G;
|
|
17126
17126
|
} while (G);
|
|
17127
|
-
q = ["brackets",
|
|
17128
|
-
} else H =
|
|
17127
|
+
q = ["brackets", Y.slice($, H + 1), $, H], $ = H;
|
|
17128
|
+
} else H = Y.indexOf(")", $ + 1), X = Y.slice($, H + 1), H === -1 || O.test(X) ? q = ["(", "(", $] : (q = ["brackets", X, $, H], $ = H);
|
|
17129
17129
|
break;
|
|
17130
17130
|
case e:
|
|
17131
17131
|
case t:
|
|
17132
17132
|
F = U === e ? "'" : '"', H = $;
|
|
17133
17133
|
do {
|
|
17134
|
-
if (G = !1, H =
|
|
17135
|
-
if (le ||
|
|
17134
|
+
if (G = !1, H = Y.indexOf(F, H + 1), H === -1) {
|
|
17135
|
+
if (le || ie) {
|
|
17136
17136
|
H = $ + 1;
|
|
17137
17137
|
break;
|
|
17138
17138
|
}
|
|
17139
|
-
|
|
17139
|
+
se("string");
|
|
17140
17140
|
}
|
|
17141
|
-
for (ee = H;
|
|
17141
|
+
for (ee = H; Y.charCodeAt(ee - 1) === s; ) ee -= 1, G = !G;
|
|
17142
17142
|
} while (G);
|
|
17143
|
-
q = ["string",
|
|
17143
|
+
q = ["string", Y.slice($, H + 1), $, H], $ = H;
|
|
17144
17144
|
break;
|
|
17145
17145
|
case w:
|
|
17146
|
-
C.lastIndex = $ + 1, C.test(
|
|
17146
|
+
C.lastIndex = $ + 1, C.test(Y), H = C.lastIndex === 0 ? Y.length - 1 : C.lastIndex - 2, q = ["at-word", Y.slice($, H + 1), $, H], $ = H;
|
|
17147
17147
|
break;
|
|
17148
17148
|
case s:
|
|
17149
|
-
for (H = $,
|
|
17150
|
-
if (U =
|
|
17151
|
-
for (; D.test(
|
|
17152
|
-
|
|
17149
|
+
for (H = $, z = !0; Y.charCodeAt(H + 1) === s; ) H += 1, z = !z;
|
|
17150
|
+
if (U = Y.charCodeAt(H + 1), z && U !== n && U !== o && U !== i && U !== l && U !== p && U !== c && (H += 1, D.test(Y.charAt(H)))) {
|
|
17151
|
+
for (; D.test(Y.charAt(H + 1)); ) H += 1;
|
|
17152
|
+
Y.charCodeAt(H + 1) === o && (H += 1);
|
|
17153
17153
|
}
|
|
17154
|
-
q = ["word",
|
|
17154
|
+
q = ["word", Y.slice($, H + 1), $, H], $ = H;
|
|
17155
17155
|
break;
|
|
17156
17156
|
default:
|
|
17157
|
-
U === n &&
|
|
17157
|
+
U === n && Y.charCodeAt($ + 1) === b ? (H = Y.indexOf("*/", $ + 2) + 1, H === 0 && (le || ie ? H = Y.length : se("comment")), q = ["comment", Y.slice($, H + 1), $, H], $ = H) : (A.lastIndex = $ + 1, A.test(Y), H = A.lastIndex === 0 ? Y.length - 1 : A.lastIndex - 2, q = ["word", Y.slice($, H + 1), $, H], oe.push(q), $ = H);
|
|
17158
17158
|
}
|
|
17159
17159
|
return $++, q;
|
|
17160
17160
|
}, position: function() {
|
|
@@ -17930,17 +17930,17 @@ function $a() {
|
|
|
17930
17930
|
error(b, E, w, C = {}) {
|
|
17931
17931
|
let A, O, D, N, j;
|
|
17932
17932
|
if (E && typeof E == "object") {
|
|
17933
|
-
let X = E,
|
|
17933
|
+
let X = E, z = w;
|
|
17934
17934
|
if (typeof X.offset == "number") {
|
|
17935
17935
|
N = X.offset;
|
|
17936
17936
|
let H = this.fromOffset(N);
|
|
17937
17937
|
E = H.line, w = H.col;
|
|
17938
17938
|
} else E = X.line, w = X.column, N = this.fromLineAndColumn(E, w);
|
|
17939
|
-
if (typeof
|
|
17940
|
-
D =
|
|
17939
|
+
if (typeof z.offset == "number") {
|
|
17940
|
+
D = z.offset;
|
|
17941
17941
|
let H = this.fromOffset(D);
|
|
17942
17942
|
O = H.line, A = H.col;
|
|
17943
|
-
} else O =
|
|
17943
|
+
} else O = z.line, A = z.column, D = this.fromLineAndColumn(z.line, z.column);
|
|
17944
17944
|
} else if (w) N = this.fromLineAndColumn(E, w);
|
|
17945
17945
|
else {
|
|
17946
17946
|
N = E;
|
|
@@ -18612,8 +18612,8 @@ function t0() {
|
|
|
18612
18612
|
try {
|
|
18613
18613
|
if (O && O.addToError(A), this.error = A, A.name !== "CssSyntaxError" || A.plugin) {
|
|
18614
18614
|
if (D.postcssVersion && $t.env.NODE_ENV !== "production") {
|
|
18615
|
-
let N = D.postcssPlugin, j = D.postcssVersion, U = this.result.processor.version, X = j.split("."),
|
|
18616
|
-
(X[0] !==
|
|
18615
|
+
let N = D.postcssPlugin, j = D.postcssVersion, U = this.result.processor.version, X = j.split("."), z = U.split(".");
|
|
18616
|
+
(X[0] !== z[0] || parseInt(X[1]) > parseInt(z[1])) && console.error("Unknown error from PostCSS plugin. Your current PostCSS version is " + U + ", but " + N + " uses " + j + ". Perhaps this is the source of the error below.");
|
|
18617
18617
|
}
|
|
18618
18618
|
} else A.plugin = D.postcssPlugin, A.setMessage();
|
|
18619
18619
|
} catch (N) {
|
|
@@ -18737,8 +18737,8 @@ function t0() {
|
|
|
18737
18737
|
O.visitorIndex += 1, O.visitorIndex === N.length && (O.visitors = [], O.visitorIndex = 0), this.result.lastPlugin = U;
|
|
18738
18738
|
try {
|
|
18739
18739
|
return X(D.toProxy(), this.helpers);
|
|
18740
|
-
} catch (
|
|
18741
|
-
throw this.handleError(
|
|
18740
|
+
} catch (z) {
|
|
18741
|
+
throw this.handleError(z, D);
|
|
18742
18742
|
}
|
|
18743
18743
|
}
|
|
18744
18744
|
if (O.iterator !== 0) {
|
|
@@ -19606,8 +19606,8 @@ function u0() {
|
|
|
19606
19606
|
return N === void 0 && (N = {}), j = w.call(this, (function(U) {
|
|
19607
19607
|
if (U.quoteMark !== void 0 || U.value === void 0) return U;
|
|
19608
19608
|
m();
|
|
19609
|
-
var X = y(U.value),
|
|
19610
|
-
return U.raws || (U.raws = {}), U.raws.value === void 0 && (U.raws.value = U.value), U.value = H, U.quoteMark =
|
|
19609
|
+
var X = y(U.value), z = X.quoteMark, H = X.unescaped;
|
|
19610
|
+
return U.raws || (U.raws = {}), U.raws.value === void 0 && (U.raws.value = U.value), U.value = H, U.quoteMark = z, U;
|
|
19611
19611
|
})(N)) || this, j.type = o.ATTRIBUTE, j.raws = j.raws || {}, Object.defineProperty(j.raws, "unquoted", { get: d(function() {
|
|
19612
19612
|
return j.value;
|
|
19613
19613
|
}, "attr.raws.unquoted is deprecated. Call attr.value instead."), set: d(function() {
|
|
@@ -19627,12 +19627,12 @@ function u0() {
|
|
|
19627
19627
|
}, D.smartQuoteMark = function(N) {
|
|
19628
19628
|
var j = this.value, U = j.replace(/[^']/g, "").length, X = j.replace(/[^"]/g, "").length;
|
|
19629
19629
|
if (U + X === 0) {
|
|
19630
|
-
var
|
|
19631
|
-
if (
|
|
19630
|
+
var z = (0, s.default)(j, { isIdentifier: !0 });
|
|
19631
|
+
if (z === j) return O.NO_QUOTE;
|
|
19632
19632
|
var H = this.preferredQuoteMark(N);
|
|
19633
19633
|
if (H === O.NO_QUOTE) {
|
|
19634
19634
|
var F = this.quoteMark || N.quoteMark || O.DOUBLE_QUOTE, q = b[F];
|
|
19635
|
-
if ((0, s.default)(j, q).length <
|
|
19635
|
+
if ((0, s.default)(j, q).length < z.length) return F;
|
|
19636
19636
|
}
|
|
19637
19637
|
return H;
|
|
19638
19638
|
}
|
|
@@ -19662,9 +19662,9 @@ function u0() {
|
|
|
19662
19662
|
j += this.stringifyProperty("attribute").length, j += U.after.length;
|
|
19663
19663
|
var X = this._spacesFor("operator");
|
|
19664
19664
|
j += X.before.length;
|
|
19665
|
-
var
|
|
19666
|
-
if (N === "operator") return
|
|
19667
|
-
j +=
|
|
19665
|
+
var z = this.stringifyProperty("operator");
|
|
19666
|
+
if (N === "operator") return z ? j : -1;
|
|
19667
|
+
j += z.length, j += X.after.length;
|
|
19668
19668
|
var H = this._spacesFor("value");
|
|
19669
19669
|
j += H.before.length;
|
|
19670
19670
|
var F = this.stringifyProperty("value");
|
|
@@ -19691,9 +19691,9 @@ function u0() {
|
|
|
19691
19691
|
return this._value;
|
|
19692
19692
|
}, set: function(N) {
|
|
19693
19693
|
if (this._constructed) {
|
|
19694
|
-
var j = y(N), U = j.deprecatedUsage, X = j.unescaped,
|
|
19695
|
-
if (U && f(), X === this._value &&
|
|
19696
|
-
this._value = X, this._quoteMark =
|
|
19694
|
+
var j = y(N), U = j.deprecatedUsage, X = j.unescaped, z = j.quoteMark;
|
|
19695
|
+
if (U && f(), X === this._value && z === this._quoteMark) return;
|
|
19696
|
+
this._value = X, this._quoteMark = z, this._syncRawValue();
|
|
19697
19697
|
} else this._value = N;
|
|
19698
19698
|
} }, { key: "insensitive", get: function() {
|
|
19699
19699
|
return this._insensitive;
|
|
@@ -19791,12 +19791,12 @@ function g0() {
|
|
|
19791
19791
|
function Cw() {
|
|
19792
19792
|
return km || (km = 1, (function(e) {
|
|
19793
19793
|
e.__esModule = !0, e.FIELDS = void 0, e.default = function(T) {
|
|
19794
|
-
var m, y, v, b, E, w, C, A, O, D, N, j, U = [], X = T.css.valueOf(),
|
|
19795
|
-
function ee(
|
|
19796
|
-
if (!T.safe) throw T.error("Unclosed " +
|
|
19797
|
-
A = (X +=
|
|
19794
|
+
var m, y, v, b, E, w, C, A, O, D, N, j, U = [], X = T.css.valueOf(), z = X.length, H = -1, F = 1, q = 0, G = 0;
|
|
19795
|
+
function ee(ae, fe) {
|
|
19796
|
+
if (!T.safe) throw T.error("Unclosed " + ae, F, q - H, q);
|
|
19797
|
+
A = (X += fe).length - 1;
|
|
19798
19798
|
}
|
|
19799
|
-
for (; q <
|
|
19799
|
+
for (; q < z; ) {
|
|
19800
19800
|
switch ((m = X.charCodeAt(q)) === n.newline && (H = q, F += 1), m) {
|
|
19801
19801
|
case n.space:
|
|
19802
19802
|
case n.tab:
|
|
@@ -19896,185 +19896,185 @@ function Iw() {
|
|
|
19896
19896
|
return Sm || (Sm = 1, (function(e, t) {
|
|
19897
19897
|
t.__esModule = !0, t.default = void 0;
|
|
19898
19898
|
var s, n, i = N(n0()), o = N(i0()), c = N(o0()), l = N(a0()), p = N(c0()), d = N(l0()), g = N(p0()), f = N(h0()), T = D(u0()), m = N(d0()), y = N(f0()), v = N(m0()), b = N(Aw()), E = D(Cw()), w = D(g0()), C = D(Ct()), A = qa();
|
|
19899
|
-
function O(
|
|
19899
|
+
function O(Y) {
|
|
19900
19900
|
if (typeof WeakMap != "function") return null;
|
|
19901
19901
|
var le = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap();
|
|
19902
19902
|
return (O = function($) {
|
|
19903
19903
|
return $ ? J : le;
|
|
19904
|
-
})(
|
|
19904
|
+
})(Y);
|
|
19905
19905
|
}
|
|
19906
|
-
function D(
|
|
19907
|
-
if (
|
|
19908
|
-
if (
|
|
19906
|
+
function D(Y, le) {
|
|
19907
|
+
if (Y && Y.__esModule) return Y;
|
|
19908
|
+
if (Y === null || typeof Y != "object" && typeof Y != "function") return { default: Y };
|
|
19909
19909
|
var J = O(le);
|
|
19910
|
-
if (J && J.has(
|
|
19911
|
-
var $ = {},
|
|
19912
|
-
for (var
|
|
19913
|
-
var
|
|
19914
|
-
|
|
19915
|
-
}
|
|
19916
|
-
return $.default =
|
|
19917
|
-
}
|
|
19918
|
-
function N(
|
|
19919
|
-
return
|
|
19920
|
-
}
|
|
19921
|
-
function j(
|
|
19922
|
-
return le && (function($,
|
|
19923
|
-
for (var
|
|
19924
|
-
var
|
|
19925
|
-
|
|
19910
|
+
if (J && J.has(Y)) return J.get(Y);
|
|
19911
|
+
var $ = {}, oe = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
19912
|
+
for (var Q in Y) if (Q !== "default" && Object.prototype.hasOwnProperty.call(Y, Q)) {
|
|
19913
|
+
var se = oe ? Object.getOwnPropertyDescriptor(Y, Q) : null;
|
|
19914
|
+
se && (se.get || se.set) ? Object.defineProperty($, Q, se) : $[Q] = Y[Q];
|
|
19915
|
+
}
|
|
19916
|
+
return $.default = Y, J && J.set(Y, $), $;
|
|
19917
|
+
}
|
|
19918
|
+
function N(Y) {
|
|
19919
|
+
return Y && Y.__esModule ? Y : { default: Y };
|
|
19920
|
+
}
|
|
19921
|
+
function j(Y, le, J) {
|
|
19922
|
+
return le && (function($, oe) {
|
|
19923
|
+
for (var Q = 0; Q < oe.length; Q++) {
|
|
19924
|
+
var se = oe[Q];
|
|
19925
|
+
se.enumerable = se.enumerable || !1, se.configurable = !0, "value" in se && (se.writable = !0), Object.defineProperty($, se.key, se);
|
|
19926
19926
|
}
|
|
19927
|
-
})(
|
|
19927
|
+
})(Y.prototype, le), Object.defineProperty(Y, "prototype", { writable: !1 }), Y;
|
|
19928
19928
|
}
|
|
19929
19929
|
var U = ((s = {})[w.space] = !0, s[w.cr] = !0, s[w.feed] = !0, s[w.newline] = !0, s[w.tab] = !0, s), X = Object.assign({}, U, ((n = {})[w.comment] = !0, n));
|
|
19930
|
-
function
|
|
19931
|
-
return { line:
|
|
19930
|
+
function z(Y) {
|
|
19931
|
+
return { line: Y[E.FIELDS.START_LINE], column: Y[E.FIELDS.START_COL] };
|
|
19932
19932
|
}
|
|
19933
|
-
function H(
|
|
19934
|
-
return { line:
|
|
19933
|
+
function H(Y) {
|
|
19934
|
+
return { line: Y[E.FIELDS.END_LINE], column: Y[E.FIELDS.END_COL] };
|
|
19935
19935
|
}
|
|
19936
|
-
function F(
|
|
19937
|
-
return { start: { line:
|
|
19936
|
+
function F(Y, le, J, $) {
|
|
19937
|
+
return { start: { line: Y, column: le }, end: { line: J, column: $ } };
|
|
19938
19938
|
}
|
|
19939
|
-
function q(
|
|
19940
|
-
return F(
|
|
19939
|
+
function q(Y) {
|
|
19940
|
+
return F(Y[E.FIELDS.START_LINE], Y[E.FIELDS.START_COL], Y[E.FIELDS.END_LINE], Y[E.FIELDS.END_COL]);
|
|
19941
19941
|
}
|
|
19942
|
-
function G(
|
|
19943
|
-
if (
|
|
19942
|
+
function G(Y, le) {
|
|
19943
|
+
if (Y) return F(Y[E.FIELDS.START_LINE], Y[E.FIELDS.START_COL], le[E.FIELDS.END_LINE], le[E.FIELDS.END_COL]);
|
|
19944
19944
|
}
|
|
19945
|
-
function ee(
|
|
19946
|
-
var J =
|
|
19947
|
-
if (typeof J == "string") return J.indexOf("\\") !== -1 && ((0, A.ensureObject)(
|
|
19945
|
+
function ee(Y, le) {
|
|
19946
|
+
var J = Y[le];
|
|
19947
|
+
if (typeof J == "string") return J.indexOf("\\") !== -1 && ((0, A.ensureObject)(Y, "raws"), Y[le] = (0, A.unesc)(J), Y.raws[le] === void 0 && (Y.raws[le] = J)), Y;
|
|
19948
19948
|
}
|
|
19949
|
-
function
|
|
19950
|
-
for (var J = -1, $ = []; (J =
|
|
19949
|
+
function ae(Y, le) {
|
|
19950
|
+
for (var J = -1, $ = []; (J = Y.indexOf(le, J + 1)) !== -1; ) $.push(J);
|
|
19951
19951
|
return $;
|
|
19952
19952
|
}
|
|
19953
|
-
var
|
|
19954
|
-
function
|
|
19953
|
+
var fe = (function() {
|
|
19954
|
+
function Y(J, $) {
|
|
19955
19955
|
$ === void 0 && ($ = {}), this.rule = J, this.options = Object.assign({ lossy: !1, safe: !1 }, $), this.position = 0, this.css = typeof this.rule == "string" ? this.rule : this.rule.selector, this.tokens = (0, E.default)({ css: this.css, error: this._errorGenerator(), safe: this.options.safe });
|
|
19956
|
-
var
|
|
19957
|
-
this.root = new i.default({ source:
|
|
19958
|
-
var
|
|
19959
|
-
this.root.append(
|
|
19956
|
+
var oe = G(this.tokens[0], this.tokens[this.tokens.length - 1]);
|
|
19957
|
+
this.root = new i.default({ source: oe }), this.root.errorGenerator = this._errorGenerator();
|
|
19958
|
+
var Q = new o.default({ source: { start: { line: 1, column: 1 } }, sourceIndex: 0 });
|
|
19959
|
+
this.root.append(Q), this.current = Q, this.loop();
|
|
19960
19960
|
}
|
|
19961
|
-
var le =
|
|
19961
|
+
var le = Y.prototype;
|
|
19962
19962
|
return le._errorGenerator = function() {
|
|
19963
19963
|
var J = this;
|
|
19964
|
-
return function($,
|
|
19965
|
-
return typeof J.rule == "string" ? new Error($) : J.rule.error($,
|
|
19964
|
+
return function($, oe) {
|
|
19965
|
+
return typeof J.rule == "string" ? new Error($) : J.rule.error($, oe);
|
|
19966
19966
|
};
|
|
19967
19967
|
}, le.attribute = function() {
|
|
19968
19968
|
var J = [], $ = this.currToken;
|
|
19969
19969
|
for (this.position++; this.position < this.tokens.length && this.currToken[E.FIELDS.TYPE] !== w.closeSquare; ) J.push(this.currToken), this.position++;
|
|
19970
19970
|
if (this.currToken[E.FIELDS.TYPE] !== w.closeSquare) return this.expected("closing square bracket", this.currToken[E.FIELDS.START_POS]);
|
|
19971
|
-
var
|
|
19972
|
-
if (
|
|
19973
|
-
for (var
|
|
19974
|
-
var Ee = J[
|
|
19971
|
+
var oe = J.length, Q = { source: F($[1], $[2], this.currToken[3], this.currToken[4]), sourceIndex: $[E.FIELDS.START_POS] };
|
|
19972
|
+
if (oe === 1 && !~[w.word].indexOf(J[0][E.FIELDS.TYPE])) return this.expected("attribute", J[0][E.FIELDS.START_POS]);
|
|
19973
|
+
for (var se = 0, W = "", ie = "", ce = null, ye = !1; se < oe; ) {
|
|
19974
|
+
var Ee = J[se], me = this.content(Ee), ge = J[se + 1];
|
|
19975
19975
|
switch (Ee[E.FIELDS.TYPE]) {
|
|
19976
19976
|
case w.space:
|
|
19977
|
-
if (
|
|
19977
|
+
if (ye = !0, this.options.lossy) break;
|
|
19978
19978
|
if (ce) {
|
|
19979
|
-
(0, A.ensureObject)(
|
|
19980
|
-
var Oe =
|
|
19981
|
-
|
|
19982
|
-
var qe = (0, A.getProp)(
|
|
19983
|
-
qe && (
|
|
19984
|
-
} else
|
|
19979
|
+
(0, A.ensureObject)(Q, "spaces", ce);
|
|
19980
|
+
var Oe = Q.spaces[ce].after || "";
|
|
19981
|
+
Q.spaces[ce].after = Oe + me;
|
|
19982
|
+
var qe = (0, A.getProp)(Q, "raws", "spaces", ce, "after") || null;
|
|
19983
|
+
qe && (Q.raws.spaces[ce].after = qe + me);
|
|
19984
|
+
} else W += me, ie += me;
|
|
19985
19985
|
break;
|
|
19986
19986
|
case w.asterisk:
|
|
19987
|
-
|
|
19987
|
+
ge[E.FIELDS.TYPE] === w.equals ? (Q.operator = me, ce = "operator") : (!Q.namespace || ce === "namespace" && !ye) && ge && (W && ((0, A.ensureObject)(Q, "spaces", "attribute"), Q.spaces.attribute.before = W, W = ""), ie && ((0, A.ensureObject)(Q, "raws", "spaces", "attribute"), Q.raws.spaces.attribute.before = W, ie = ""), Q.namespace = (Q.namespace || "") + me, (0, A.getProp)(Q, "raws", "namespace") && (Q.raws.namespace += me), ce = "namespace"), ye = !1;
|
|
19988
19988
|
break;
|
|
19989
19989
|
case w.dollar:
|
|
19990
19990
|
if (ce === "value") {
|
|
19991
|
-
var Me = (0, A.getProp)(
|
|
19992
|
-
|
|
19991
|
+
var Me = (0, A.getProp)(Q, "raws", "value");
|
|
19992
|
+
Q.value += "$", Me && (Q.raws.value = Me + "$");
|
|
19993
19993
|
break;
|
|
19994
19994
|
}
|
|
19995
19995
|
case w.caret:
|
|
19996
|
-
|
|
19996
|
+
ge[E.FIELDS.TYPE] === w.equals && (Q.operator = me, ce = "operator"), ye = !1;
|
|
19997
19997
|
break;
|
|
19998
19998
|
case w.combinator:
|
|
19999
|
-
if (
|
|
20000
|
-
|
|
19999
|
+
if (me === "~" && ge[E.FIELDS.TYPE] === w.equals && (Q.operator = me, ce = "operator"), me !== "|") {
|
|
20000
|
+
ye = !1;
|
|
20001
20001
|
break;
|
|
20002
20002
|
}
|
|
20003
|
-
|
|
20003
|
+
ge[E.FIELDS.TYPE] === w.equals ? (Q.operator = me, ce = "operator") : Q.namespace || Q.attribute || (Q.namespace = !0), ye = !1;
|
|
20004
20004
|
break;
|
|
20005
20005
|
case w.word:
|
|
20006
|
-
if (
|
|
20007
|
-
else if (!
|
|
20008
|
-
|
|
20009
|
-
else if (!
|
|
20010
|
-
var at = (0, A.unesc)(
|
|
20011
|
-
|
|
20006
|
+
if (ge && this.content(ge) === "|" && J[se + 2] && J[se + 2][E.FIELDS.TYPE] !== w.equals && !Q.operator && !Q.namespace) Q.namespace = me, ce = "namespace";
|
|
20007
|
+
else if (!Q.attribute || ce === "attribute" && !ye)
|
|
20008
|
+
W && ((0, A.ensureObject)(Q, "spaces", "attribute"), Q.spaces.attribute.before = W, W = ""), ie && ((0, A.ensureObject)(Q, "raws", "spaces", "attribute"), Q.raws.spaces.attribute.before = ie, ie = ""), Q.attribute = (Q.attribute || "") + me, (0, A.getProp)(Q, "raws", "attribute") && (Q.raws.attribute += me), ce = "attribute";
|
|
20009
|
+
else if (!Q.value && Q.value !== "" || ce === "value" && !ye && !Q.quoteMark) {
|
|
20010
|
+
var at = (0, A.unesc)(me), St = (0, A.getProp)(Q, "raws", "value") || "", Zt = Q.value || "";
|
|
20011
|
+
Q.value = Zt + at, Q.quoteMark = null, (at !== me || St) && ((0, A.ensureObject)(Q, "raws"), Q.raws.value = (St || Zt) + me), ce = "value";
|
|
20012
20012
|
} else {
|
|
20013
|
-
var hr =
|
|
20014
|
-
!
|
|
20013
|
+
var hr = me === "i" || me === "I";
|
|
20014
|
+
!Q.value && Q.value !== "" || !Q.quoteMark && !ye ? (Q.value || Q.value === "") && (ce = "value", Q.value += me, Q.raws.value && (Q.raws.value += me)) : (Q.insensitive = hr, hr && me !== "I" || ((0, A.ensureObject)(Q, "raws"), Q.raws.insensitiveFlag = me), ce = "insensitive", W && ((0, A.ensureObject)(Q, "spaces", "insensitive"), Q.spaces.insensitive.before = W, W = ""), ie && ((0, A.ensureObject)(Q, "raws", "spaces", "insensitive"), Q.raws.spaces.insensitive.before = ie, ie = ""));
|
|
20015
20015
|
}
|
|
20016
|
-
|
|
20016
|
+
ye = !1;
|
|
20017
20017
|
break;
|
|
20018
20018
|
case w.str:
|
|
20019
|
-
if (!
|
|
20020
|
-
var os = (0, T.unescapeValue)(
|
|
20021
|
-
|
|
20019
|
+
if (!Q.attribute || !Q.operator) return this.error("Expected an attribute followed by an operator preceding the string.", { index: Ee[E.FIELDS.START_POS] });
|
|
20020
|
+
var os = (0, T.unescapeValue)(me), Tn = os.unescaped, Dr = os.quoteMark;
|
|
20021
|
+
Q.value = Tn, Q.quoteMark = Dr, ce = "value", (0, A.ensureObject)(Q, "raws"), Q.raws.value = me, ye = !1;
|
|
20022
20022
|
break;
|
|
20023
20023
|
case w.equals:
|
|
20024
|
-
if (!
|
|
20025
|
-
if (
|
|
20026
|
-
|
|
20024
|
+
if (!Q.attribute) return this.expected("attribute", Ee[E.FIELDS.START_POS], me);
|
|
20025
|
+
if (Q.value) return this.error('Unexpected "=" found; an operator was already defined.', { index: Ee[E.FIELDS.START_POS] });
|
|
20026
|
+
Q.operator = Q.operator ? Q.operator + me : me, ce = "operator", ye = !1;
|
|
20027
20027
|
break;
|
|
20028
20028
|
case w.comment:
|
|
20029
|
-
if (ce) if (
|
|
20030
|
-
var er = (0, A.getProp)(
|
|
20031
|
-
(0, A.ensureObject)(
|
|
20029
|
+
if (ce) if (ye || ge && ge[E.FIELDS.TYPE] === w.space || ce === "insensitive") {
|
|
20030
|
+
var er = (0, A.getProp)(Q, "spaces", ce, "after") || "", Fr = (0, A.getProp)(Q, "raws", "spaces", ce, "after") || er;
|
|
20031
|
+
(0, A.ensureObject)(Q, "raws", "spaces", ce), Q.raws.spaces[ce].after = Fr + me;
|
|
20032
20032
|
} else {
|
|
20033
|
-
var Ga =
|
|
20034
|
-
(0, A.ensureObject)(
|
|
20033
|
+
var Ga = Q[ce] || "", Xa = (0, A.getProp)(Q, "raws", ce) || Ga;
|
|
20034
|
+
(0, A.ensureObject)(Q, "raws"), Q.raws[ce] = Xa + me;
|
|
20035
20035
|
}
|
|
20036
|
-
else
|
|
20036
|
+
else ie += me;
|
|
20037
20037
|
break;
|
|
20038
20038
|
default:
|
|
20039
|
-
return this.error('Unexpected "' +
|
|
20039
|
+
return this.error('Unexpected "' + me + '" found.', { index: Ee[E.FIELDS.START_POS] });
|
|
20040
20040
|
}
|
|
20041
|
-
|
|
20041
|
+
se++;
|
|
20042
20042
|
}
|
|
20043
|
-
ee(
|
|
20043
|
+
ee(Q, "attribute"), ee(Q, "namespace"), this.newNode(new T.default(Q)), this.position++;
|
|
20044
20044
|
}, le.parseWhitespaceEquivalentTokens = function(J) {
|
|
20045
20045
|
J < 0 && (J = this.tokens.length);
|
|
20046
|
-
var $ = this.position,
|
|
20046
|
+
var $ = this.position, oe = [], Q = "", se = void 0;
|
|
20047
20047
|
do
|
|
20048
|
-
if (U[this.currToken[E.FIELDS.TYPE]]) this.options.lossy || (
|
|
20048
|
+
if (U[this.currToken[E.FIELDS.TYPE]]) this.options.lossy || (Q += this.content());
|
|
20049
20049
|
else if (this.currToken[E.FIELDS.TYPE] === w.comment) {
|
|
20050
|
-
var
|
|
20051
|
-
|
|
20050
|
+
var W = {};
|
|
20051
|
+
Q && (W.before = Q, Q = ""), se = new l.default({ value: this.content(), source: q(this.currToken), sourceIndex: this.currToken[E.FIELDS.START_POS], spaces: W }), oe.push(se);
|
|
20052
20052
|
}
|
|
20053
20053
|
while (++this.position < J);
|
|
20054
|
-
if (
|
|
20055
|
-
if (
|
|
20054
|
+
if (Q) {
|
|
20055
|
+
if (se) se.spaces.after = Q;
|
|
20056
20056
|
else if (!this.options.lossy) {
|
|
20057
|
-
var
|
|
20058
|
-
|
|
20057
|
+
var ie = this.tokens[$], ce = this.tokens[this.position - 1];
|
|
20058
|
+
oe.push(new g.default({ value: "", source: F(ie[E.FIELDS.START_LINE], ie[E.FIELDS.START_COL], ce[E.FIELDS.END_LINE], ce[E.FIELDS.END_COL]), sourceIndex: ie[E.FIELDS.START_POS], spaces: { before: Q, after: "" } }));
|
|
20059
20059
|
}
|
|
20060
20060
|
}
|
|
20061
|
-
return
|
|
20061
|
+
return oe;
|
|
20062
20062
|
}, le.convertWhitespaceNodesToSpace = function(J, $) {
|
|
20063
|
-
var
|
|
20063
|
+
var oe = this;
|
|
20064
20064
|
$ === void 0 && ($ = !1);
|
|
20065
|
-
var
|
|
20066
|
-
return J.forEach(function(
|
|
20067
|
-
var
|
|
20068
|
-
|
|
20069
|
-
}),
|
|
20065
|
+
var Q = "", se = "";
|
|
20066
|
+
return J.forEach(function(W) {
|
|
20067
|
+
var ie = oe.lossySpace(W.spaces.before, $), ce = oe.lossySpace(W.rawSpaceBefore, $);
|
|
20068
|
+
Q += ie + oe.lossySpace(W.spaces.after, $ && ie.length === 0), se += ie + W.value + oe.lossySpace(W.rawSpaceAfter, $ && ce.length === 0);
|
|
20069
|
+
}), se === Q && (se = void 0), { space: Q, rawSpace: se };
|
|
20070
20070
|
}, le.isNamedCombinator = function(J) {
|
|
20071
20071
|
return J === void 0 && (J = this.position), this.tokens[J + 0] && this.tokens[J + 0][E.FIELDS.TYPE] === w.slash && this.tokens[J + 1] && this.tokens[J + 1][E.FIELDS.TYPE] === w.word && this.tokens[J + 2] && this.tokens[J + 2][E.FIELDS.TYPE] === w.slash;
|
|
20072
20072
|
}, le.namedCombinator = function() {
|
|
20073
20073
|
if (this.isNamedCombinator()) {
|
|
20074
|
-
var J = this.content(this.tokens[this.position + 1]), $ = (0, A.unesc)(J).toLowerCase(),
|
|
20075
|
-
$ !== J && (
|
|
20076
|
-
var
|
|
20077
|
-
return this.position = this.position + 3,
|
|
20074
|
+
var J = this.content(this.tokens[this.position + 1]), $ = (0, A.unesc)(J).toLowerCase(), oe = {};
|
|
20075
|
+
$ !== J && (oe.value = "/" + J + "/");
|
|
20076
|
+
var Q = new y.default({ value: "/" + $ + "/", source: F(this.currToken[E.FIELDS.START_LINE], this.currToken[E.FIELDS.START_COL], this.tokens[this.position + 2][E.FIELDS.END_LINE], this.tokens[this.position + 2][E.FIELDS.END_COL]), sourceIndex: this.currToken[E.FIELDS.START_POS], raws: oe });
|
|
20077
|
+
return this.position = this.position + 3, Q;
|
|
20078
20078
|
}
|
|
20079
20079
|
this.unexpected();
|
|
20080
20080
|
}, le.combinator = function() {
|
|
@@ -20082,19 +20082,19 @@ function Iw() {
|
|
|
20082
20082
|
if (this.content() === "|") return this.namespace();
|
|
20083
20083
|
var $ = this.locateNextMeaningfulToken(this.position);
|
|
20084
20084
|
if (!($ < 0 || this.tokens[$][E.FIELDS.TYPE] === w.comma || this.tokens[$][E.FIELDS.TYPE] === w.closeParenthesis)) {
|
|
20085
|
-
var
|
|
20086
|
-
if ($ > this.position && (
|
|
20087
|
-
if (
|
|
20088
|
-
var
|
|
20089
|
-
|
|
20085
|
+
var oe, Q = this.currToken, se = void 0;
|
|
20086
|
+
if ($ > this.position && (se = this.parseWhitespaceEquivalentTokens($)), this.isNamedCombinator() ? oe = this.namedCombinator() : this.currToken[E.FIELDS.TYPE] === w.combinator ? (oe = new y.default({ value: this.content(), source: q(this.currToken), sourceIndex: this.currToken[E.FIELDS.START_POS] }), this.position++) : U[this.currToken[E.FIELDS.TYPE]] || se || this.unexpected(), oe) {
|
|
20087
|
+
if (se) {
|
|
20088
|
+
var W = this.convertWhitespaceNodesToSpace(se), ie = W.space, ce = W.rawSpace;
|
|
20089
|
+
oe.spaces.before = ie, oe.rawSpaceBefore = ce;
|
|
20090
20090
|
}
|
|
20091
20091
|
} else {
|
|
20092
|
-
var
|
|
20093
|
-
|
|
20094
|
-
var
|
|
20095
|
-
Ee.endsWith(" ") &&
|
|
20092
|
+
var ye = this.convertWhitespaceNodesToSpace(se, !0), Ee = ye.space, me = ye.rawSpace;
|
|
20093
|
+
me || (me = Ee);
|
|
20094
|
+
var ge = {}, Oe = { spaces: {} };
|
|
20095
|
+
Ee.endsWith(" ") && me.endsWith(" ") ? (ge.before = Ee.slice(0, Ee.length - 1), Oe.spaces.before = me.slice(0, me.length - 1)) : Ee.startsWith(" ") && me.startsWith(" ") ? (ge.after = Ee.slice(1), Oe.spaces.after = me.slice(1)) : Oe.value = me, oe = new y.default({ value: " ", source: G(Q, this.tokens[this.position - 1]), sourceIndex: Q[E.FIELDS.START_POS], spaces: ge, raws: Oe });
|
|
20096
20096
|
}
|
|
20097
|
-
return this.currToken && this.currToken[E.FIELDS.TYPE] === w.space && (
|
|
20097
|
+
return this.currToken && this.currToken[E.FIELDS.TYPE] === w.space && (oe.spaces.after = this.optionalSpace(this.content()), this.position++), this.newNode(oe);
|
|
20098
20098
|
}
|
|
20099
20099
|
var qe = this.parseWhitespaceEquivalentTokens($);
|
|
20100
20100
|
if (qe.length > 0) {
|
|
@@ -20109,7 +20109,7 @@ function Iw() {
|
|
|
20109
20109
|
}, le.comma = function() {
|
|
20110
20110
|
if (this.position === this.tokens.length - 1) return this.root.trailingComma = !0, void this.position++;
|
|
20111
20111
|
this.current._inferEndPosition();
|
|
20112
|
-
var J = new o.default({ source: { start:
|
|
20112
|
+
var J = new o.default({ source: { start: z(this.tokens[this.position + 1]) }, sourceIndex: this.tokens[this.position + 1][E.FIELDS.START_POS] });
|
|
20113
20113
|
this.current.parent.append(J), this.current = J, this.position++;
|
|
20114
20114
|
}, le.comment = function() {
|
|
20115
20115
|
var J = this.currToken;
|
|
@@ -20136,18 +20136,18 @@ function Iw() {
|
|
|
20136
20136
|
}, le.parentheses = function() {
|
|
20137
20137
|
var J = this.current.last, $ = 1;
|
|
20138
20138
|
if (this.position++, J && J.type === C.PSEUDO) {
|
|
20139
|
-
var
|
|
20140
|
-
for (J.append(
|
|
20141
|
-
this.current =
|
|
20139
|
+
var oe = new o.default({ source: { start: z(this.tokens[this.position]) }, sourceIndex: this.tokens[this.position][E.FIELDS.START_POS] }), Q = this.current;
|
|
20140
|
+
for (J.append(oe), this.current = oe; this.position < this.tokens.length && $; ) this.currToken[E.FIELDS.TYPE] === w.openParenthesis && $++, this.currToken[E.FIELDS.TYPE] === w.closeParenthesis && $--, $ ? this.parse() : (this.current.source.end = H(this.currToken), this.current.parent.source.end = H(this.currToken), this.position++);
|
|
20141
|
+
this.current = Q;
|
|
20142
20142
|
} else {
|
|
20143
|
-
for (var
|
|
20144
|
-
J ? J.appendToPropertyAndEscape("value",
|
|
20143
|
+
for (var se, W = this.currToken, ie = "("; this.position < this.tokens.length && $; ) this.currToken[E.FIELDS.TYPE] === w.openParenthesis && $++, this.currToken[E.FIELDS.TYPE] === w.closeParenthesis && $--, se = this.currToken, ie += this.parseParenthesisToken(this.currToken), this.position++;
|
|
20144
|
+
J ? J.appendToPropertyAndEscape("value", ie, ie) : this.newNode(new g.default({ value: ie, source: F(W[E.FIELDS.START_LINE], W[E.FIELDS.START_COL], se[E.FIELDS.END_LINE], se[E.FIELDS.END_COL]), sourceIndex: W[E.FIELDS.START_POS] }));
|
|
20145
20145
|
}
|
|
20146
20146
|
if ($) return this.expected("closing parenthesis", this.currToken[E.FIELDS.START_POS]);
|
|
20147
20147
|
}, le.pseudo = function() {
|
|
20148
|
-
for (var J = this, $ = "",
|
|
20149
|
-
return this.currToken ? this.currToken[E.FIELDS.TYPE] !== w.word ? this.expected(["pseudo-class", "pseudo-element"], this.currToken[E.FIELDS.START_POS]) : void this.splitWord(!1, function(
|
|
20150
|
-
$ +=
|
|
20148
|
+
for (var J = this, $ = "", oe = this.currToken; this.currToken && this.currToken[E.FIELDS.TYPE] === w.colon; ) $ += this.content(), this.position++;
|
|
20149
|
+
return this.currToken ? this.currToken[E.FIELDS.TYPE] !== w.word ? this.expected(["pseudo-class", "pseudo-element"], this.currToken[E.FIELDS.START_POS]) : void this.splitWord(!1, function(Q, se) {
|
|
20150
|
+
$ += Q, J.newNode(new f.default({ value: $, source: G(oe, J.currToken), sourceIndex: oe[E.FIELDS.START_POS] })), se > 1 && J.nextToken && J.nextToken[E.FIELDS.TYPE] === w.openParenthesis && J.error("Misplaced parenthesis.", { index: J.nextToken[E.FIELDS.START_POS] });
|
|
20151
20151
|
}) : this.expected(["pseudo-class", "pseudo-element"], this.position - 1);
|
|
20152
20152
|
}, le.space = function() {
|
|
20153
20153
|
var J = this.content();
|
|
@@ -20160,48 +20160,48 @@ function Iw() {
|
|
|
20160
20160
|
}, le.universal = function(J) {
|
|
20161
20161
|
var $ = this.nextToken;
|
|
20162
20162
|
if ($ && this.content($) === "|") return this.position++, this.namespace();
|
|
20163
|
-
var
|
|
20164
|
-
this.newNode(new m.default({ value: this.content(), source: q(
|
|
20163
|
+
var oe = this.currToken;
|
|
20164
|
+
this.newNode(new m.default({ value: this.content(), source: q(oe), sourceIndex: oe[E.FIELDS.START_POS] }), J), this.position++;
|
|
20165
20165
|
}, le.splitWord = function(J, $) {
|
|
20166
|
-
for (var
|
|
20166
|
+
for (var oe = this, Q = this.nextToken, se = this.content(); Q && ~[w.dollar, w.caret, w.equals, w.word].indexOf(Q[E.FIELDS.TYPE]); ) {
|
|
20167
20167
|
this.position++;
|
|
20168
|
-
var
|
|
20169
|
-
if (
|
|
20170
|
-
var
|
|
20171
|
-
|
|
20168
|
+
var W = this.content();
|
|
20169
|
+
if (se += W, W.lastIndexOf("\\") === W.length - 1) {
|
|
20170
|
+
var ie = this.nextToken;
|
|
20171
|
+
ie && ie[E.FIELDS.TYPE] === w.space && (se += this.requiredSpace(this.content(ie)), this.position++);
|
|
20172
20172
|
}
|
|
20173
|
-
|
|
20173
|
+
Q = this.nextToken;
|
|
20174
20174
|
}
|
|
20175
|
-
var ce = se
|
|
20176
|
-
var Oe =
|
|
20175
|
+
var ce = ae(se, ".").filter(function(ge) {
|
|
20176
|
+
var Oe = se[ge - 1] === "\\", qe = /^\d+\.\d+%$/.test(se);
|
|
20177
20177
|
return !Oe && !qe;
|
|
20178
|
-
}),
|
|
20179
|
-
return
|
|
20180
|
-
}), Ee = se
|
|
20181
|
-
Ee.length && (
|
|
20182
|
-
return !~Ee.indexOf(
|
|
20178
|
+
}), ye = ae(se, "#").filter(function(ge) {
|
|
20179
|
+
return se[ge - 1] !== "\\";
|
|
20180
|
+
}), Ee = ae(se, "#{");
|
|
20181
|
+
Ee.length && (ye = ye.filter(function(ge) {
|
|
20182
|
+
return !~Ee.indexOf(ge);
|
|
20183
20183
|
}));
|
|
20184
|
-
var
|
|
20185
|
-
var
|
|
20186
|
-
return
|
|
20187
|
-
return qe ===
|
|
20184
|
+
var me = (0, b.default)((function() {
|
|
20185
|
+
var ge = Array.prototype.concat.apply([], arguments);
|
|
20186
|
+
return ge.filter(function(Oe, qe) {
|
|
20187
|
+
return qe === ge.indexOf(Oe);
|
|
20188
20188
|
});
|
|
20189
|
-
})([0].concat(ce,
|
|
20190
|
-
|
|
20191
|
-
var qe, Me =
|
|
20192
|
-
if (Oe === 0 && $) return $.call(
|
|
20193
|
-
var St =
|
|
20194
|
-
if (~ce.indexOf(
|
|
20189
|
+
})([0].concat(ce, ye)));
|
|
20190
|
+
me.forEach(function(ge, Oe) {
|
|
20191
|
+
var qe, Me = me[Oe + 1] || se.length, at = se.slice(ge, Me);
|
|
20192
|
+
if (Oe === 0 && $) return $.call(oe, at, me.length);
|
|
20193
|
+
var St = oe.currToken, Zt = St[E.FIELDS.START_POS] + me[Oe], hr = F(St[1], St[2] + ge, St[3], St[2] + (Me - 1));
|
|
20194
|
+
if (~ce.indexOf(ge)) {
|
|
20195
20195
|
var os = { value: at.slice(1), source: hr, sourceIndex: Zt };
|
|
20196
20196
|
qe = new c.default(ee(os, "value"));
|
|
20197
|
-
} else if (~
|
|
20197
|
+
} else if (~ye.indexOf(ge)) {
|
|
20198
20198
|
var Tn = { value: at.slice(1), source: hr, sourceIndex: Zt };
|
|
20199
20199
|
qe = new p.default(ee(Tn, "value"));
|
|
20200
20200
|
} else {
|
|
20201
20201
|
var Dr = { value: at, source: hr, sourceIndex: Zt };
|
|
20202
20202
|
ee(Dr, "value"), qe = new d.default(Dr);
|
|
20203
20203
|
}
|
|
20204
|
-
|
|
20204
|
+
oe.newNode(qe, J), J = null;
|
|
20205
20205
|
}), this.position++;
|
|
20206
20206
|
}, le.word = function(J) {
|
|
20207
20207
|
var $ = this.nextToken;
|
|
@@ -20258,13 +20258,13 @@ function Iw() {
|
|
|
20258
20258
|
default:
|
|
20259
20259
|
this.unexpected();
|
|
20260
20260
|
}
|
|
20261
|
-
}, le.expected = function(J, $,
|
|
20261
|
+
}, le.expected = function(J, $, oe) {
|
|
20262
20262
|
if (Array.isArray(J)) {
|
|
20263
|
-
var
|
|
20264
|
-
J = J.join(", ") + " or " +
|
|
20263
|
+
var Q = J.pop();
|
|
20264
|
+
J = J.join(", ") + " or " + Q;
|
|
20265
20265
|
}
|
|
20266
|
-
var
|
|
20267
|
-
return
|
|
20266
|
+
var se = /^[aeiou]/.test(J[0]) ? "an" : "a";
|
|
20267
|
+
return oe ? this.error("Expected " + se + " " + J + ', found "' + oe + '" instead.', { index: $ }) : this.error("Expected " + se + " " + J + ".", { index: $ });
|
|
20268
20268
|
}, le.requiredSpace = function(J) {
|
|
20269
20269
|
return this.options.lossy ? " " : J;
|
|
20270
20270
|
}, le.optionalSpace = function(J) {
|
|
@@ -20285,15 +20285,15 @@ function Iw() {
|
|
|
20285
20285
|
$++;
|
|
20286
20286
|
}
|
|
20287
20287
|
return -1;
|
|
20288
|
-
}, j(
|
|
20288
|
+
}, j(Y, [{ key: "currToken", get: function() {
|
|
20289
20289
|
return this.tokens[this.position];
|
|
20290
20290
|
} }, { key: "nextToken", get: function() {
|
|
20291
20291
|
return this.tokens[this.position + 1];
|
|
20292
20292
|
} }, { key: "prevToken", get: function() {
|
|
20293
20293
|
return this.tokens[this.position - 1];
|
|
20294
|
-
} }]),
|
|
20294
|
+
} }]), Y;
|
|
20295
20295
|
})();
|
|
20296
|
-
t.default =
|
|
20296
|
+
t.default = fe, e.exports = t.default;
|
|
20297
20297
|
})(pl, pl.exports)), pl.exports;
|
|
20298
20298
|
}
|
|
20299
20299
|
function Nw() {
|
|
@@ -20960,7 +20960,7 @@ function qw() {
|
|
|
20960
20960
|
}, c.prototype._version = 3, Object.defineProperty(c.prototype, "sources", { get: function() {
|
|
20961
20961
|
return this._absoluteSources.slice();
|
|
20962
20962
|
} }), c.prototype._parseMappings = function(d, g) {
|
|
20963
|
-
for (var f, T, m, y, v, b = 1, E = 0, w = 0, C = 0, A = 0, O = 0, D = d.length, N = 0, j = {}, U = {}, X = [],
|
|
20963
|
+
for (var f, T, m, y, v, b = 1, E = 0, w = 0, C = 0, A = 0, O = 0, D = d.length, N = 0, j = {}, U = {}, X = [], z = []; N < D; ) if (d.charAt(N) === ";") b++, N++, E = 0;
|
|
20964
20964
|
else if (d.charAt(N) === ",") N++;
|
|
20965
20965
|
else {
|
|
20966
20966
|
for ((f = new l()).generatedLine = b, y = N; y < D && !this._charIsMappingSeparator(d, y); y++) ;
|
|
@@ -20971,9 +20971,9 @@ function qw() {
|
|
|
20971
20971
|
if (m.length === 3) throw new Error("Found a source and line, but no column");
|
|
20972
20972
|
j[T] = m;
|
|
20973
20973
|
}
|
|
20974
|
-
f.generatedColumn = E + m[0], E = f.generatedColumn, m.length > 1 && (f.source = A + m[1], A += m[1], f.originalLine = w + m[2], w = f.originalLine, f.originalLine += 1, f.originalColumn = C + m[3], C = f.originalColumn, m.length > 4 && (f.name = O + m[4], O += m[4])),
|
|
20974
|
+
f.generatedColumn = E + m[0], E = f.generatedColumn, m.length > 1 && (f.source = A + m[1], A += m[1], f.originalLine = w + m[2], w = f.originalLine, f.originalLine += 1, f.originalColumn = C + m[3], C = f.originalColumn, m.length > 4 && (f.name = O + m[4], O += m[4])), z.push(f), typeof f.originalLine == "number" && X.push(f);
|
|
20975
20975
|
}
|
|
20976
|
-
i(
|
|
20976
|
+
i(z, e.compareByGeneratedPositionsDeflated), this.__generatedMappings = z, i(X, e.compareByOriginalPositions), this.__originalMappings = X;
|
|
20977
20977
|
}, c.prototype._findMapping = function(d, g, f, T, m, y) {
|
|
20978
20978
|
if (d[f] <= 0) throw new TypeError("Line must be greater than or equal to 1, got " + d[f]);
|
|
20979
20979
|
if (d[T] < 0) throw new TypeError("Column must be greater than or equal to 0, got " + d[T]);
|
|
@@ -21233,9 +21233,9 @@ var Qw = Object.defineProperty, Zw = Object.defineProperties, e_ = Object.getOwn
|
|
|
21233
21233
|
}, rg = (e, t) => Zw(e, e_(t));
|
|
21234
21234
|
function s_(e) {
|
|
21235
21235
|
return (function(t) {
|
|
21236
|
-
const { filename: s, id: n, scoped: i = !1, trim: o = !0, isProd: c = !1, modules: l = !1, modulesOptions: p = {}, preprocessLang: d, postcssOptions: g, postcssPlugins: f } = t, T = d && Yw[d], m = T && (function(
|
|
21237
|
-
if (!
|
|
21238
|
-
return H(
|
|
21236
|
+
const { filename: s, id: n, scoped: i = !1, trim: o = !0, isProd: c = !1, modules: l = !1, modulesOptions: p = {}, preprocessLang: d, postcssOptions: g, postcssPlugins: f } = t, T = d && Yw[d], m = T && (function(z, H) {
|
|
21237
|
+
if (!z.preprocessCustomRequire) throw new Error("[@vue/compiler-sfc] Style preprocessing in the browser build must provide the `preprocessCustomRequire` option to return the in-browser version of the preprocessor.");
|
|
21238
|
+
return H(z.source, z.inMap || z.map, Ml({ filename: z.filename }, z.preprocessOptions), z.preprocessCustomRequire);
|
|
21239
21239
|
})(t, T), y = m ? m.map : t.inMap || t.map, v = m ? m.code : t.source, b = n.replace(/^data-v-/, ""), E = `data-v-${b}`, w = (f || []).slice();
|
|
21240
21240
|
w.unshift(Nx({ id: b, isProd: c })), o && w.push(r0()), i && w.push(y0(E));
|
|
21241
21241
|
let C;
|
|
@@ -21247,14 +21247,14 @@ function s_(e) {
|
|
|
21247
21247
|
j.delete(s);
|
|
21248
21248
|
const U = [];
|
|
21249
21249
|
m && m.errors.length && U.push(...m.errors);
|
|
21250
|
-
const X = (
|
|
21250
|
+
const X = (z) => (z.forEach((H) => {
|
|
21251
21251
|
H.type === "dependency" && j.add(H.file);
|
|
21252
21252
|
}), j);
|
|
21253
21253
|
try {
|
|
21254
|
-
if (O = Je(w).process(v, A), t.isAsync) return O.then((
|
|
21254
|
+
if (O = Je(w).process(v, A), t.isAsync) return O.then((z) => ({ code: z.css || "", map: z.map && z.map.toJSON(), errors: U, modules: C, rawResult: z, dependencies: X(z.messages) })).catch((z) => ({ code: "", map: void 0, errors: [...U, z], rawResult: void 0, dependencies: j }));
|
|
21255
21255
|
X(O.messages), D = O.css, N = O.map;
|
|
21256
|
-
} catch (
|
|
21257
|
-
U.push(
|
|
21256
|
+
} catch (z) {
|
|
21257
|
+
U.push(z);
|
|
21258
21258
|
}
|
|
21259
21259
|
return { code: D || "", map: N && N.toJSON(), errors: U, rawResult: O, dependencies: j };
|
|
21260
21260
|
})(rg(Ml({}, e), { isAsync: !0 }));
|
|
@@ -22971,206 +22971,206 @@ function W_(e, t) {
|
|
|
22971
22971
|
const y = new cg(e, t), v = /* @__PURE__ */ Object.create(null), b = /* @__PURE__ */ Object.create(null);
|
|
22972
22972
|
let E, w = !1, C = !1;
|
|
22973
22973
|
const A = y.startOffset, O = y.endOffset, D = o && o.loc.start.offset, N = o && o.loc.end.offset;
|
|
22974
|
-
function j(
|
|
22975
|
-
const
|
|
22976
|
-
let ce =
|
|
22977
|
-
for (
|
|
22978
|
-
y.s.move(
|
|
22979
|
-
}
|
|
22980
|
-
function U(
|
|
22981
|
-
let
|
|
22982
|
-
|
|
22983
|
-
}
|
|
22984
|
-
function X(
|
|
22985
|
-
|
|
22986
|
-
const
|
|
22987
|
-
|
|
22974
|
+
function j(W) {
|
|
22975
|
+
const ie = W.start + A;
|
|
22976
|
+
let ce = W.end + A;
|
|
22977
|
+
for (W.trailingComments && W.trailingComments.length > 0 && (ce = W.trailingComments[W.trailingComments.length - 1].end + A); ce <= l.length && /\s/.test(l.charAt(ce)); ) ce++;
|
|
22978
|
+
y.s.move(ie, ce, 0);
|
|
22979
|
+
}
|
|
22980
|
+
function U(W, ie, ce, ye, Ee, me) {
|
|
22981
|
+
let ge = me;
|
|
22982
|
+
me && y.isTS && e.template && !e.template.src && !e.template.lang && (ge = jx(ie, e)), y.userImports[ie] = { isType: ye, imported: ce, local: ie, source: W, isFromSetup: Ee, isUsedInTemplate: ge };
|
|
22983
|
+
}
|
|
22984
|
+
function X(W, ie) {
|
|
22985
|
+
W && Ea(W, (ce) => {
|
|
22986
|
+
const ye = b[ce.name];
|
|
22987
|
+
ye && ye !== "literal-const" && y.error(`\`${ie}()\` in <script setup> cannot reference locally declared variables because it will be hoisted outside of the setup() function. If your component options require initialization in the module scope, use a separate normal <script> to export the options instead.`, ce);
|
|
22988
22988
|
});
|
|
22989
22989
|
}
|
|
22990
|
-
const
|
|
22991
|
-
if (
|
|
22992
|
-
for (const
|
|
22993
|
-
const ce = Ip(
|
|
22994
|
-
U(
|
|
22995
|
-
}
|
|
22996
|
-
}
|
|
22997
|
-
for (const
|
|
22998
|
-
j(
|
|
22999
|
-
let
|
|
23000
|
-
const ce = (
|
|
23001
|
-
const Ee =
|
|
23002
|
-
|
|
23003
|
-
const
|
|
23004
|
-
y.s.remove(Ee ?
|
|
22990
|
+
const z = y.scriptAst, H = y.scriptSetupAst;
|
|
22991
|
+
if (z) {
|
|
22992
|
+
for (const W of z.body) if (W.type === "ImportDeclaration") for (const ie of W.specifiers) {
|
|
22993
|
+
const ce = Ip(ie);
|
|
22994
|
+
U(W.source.value, ie.local.name, ce, W.importKind === "type" || ie.type === "ImportSpecifier" && ie.importKind === "type", !1, !t.inlineTemplate);
|
|
22995
|
+
}
|
|
22996
|
+
}
|
|
22997
|
+
for (const W of H.body) if (W.type === "ImportDeclaration") {
|
|
22998
|
+
j(W);
|
|
22999
|
+
let ie = 0;
|
|
23000
|
+
const ce = (ye) => {
|
|
23001
|
+
const Ee = ye > ie;
|
|
23002
|
+
ie++;
|
|
23003
|
+
const me = W.specifiers[ye], ge = W.specifiers[ye + 1];
|
|
23004
|
+
y.s.remove(Ee ? W.specifiers[ye - 1].end + A : me.start + A, ge && !Ee ? ge.start + A : me.end + A);
|
|
23005
23005
|
};
|
|
23006
|
-
for (let
|
|
23007
|
-
const Ee =
|
|
23008
|
-
Oe === "vue" && z_.includes(
|
|
23006
|
+
for (let ye = 0; ye < W.specifiers.length; ye++) {
|
|
23007
|
+
const Ee = W.specifiers[ye], me = Ee.local.name, ge = Ip(Ee), Oe = W.source.value, qe = y.userImports[me];
|
|
23008
|
+
Oe === "vue" && z_.includes(ge) ? (me === ge ? Xn(`\`${ge}\` is a compiler macro and no longer needs to be imported.`) : y.error(`\`${ge}\` is a compiler macro and cannot be aliased to a different name.`, Ee), ce(ye)) : qe ? qe.source === Oe && qe.imported === ge ? ce(ye) : y.error("different imports aliased to same local name.", Ee) : U(Oe, me, ge, W.importKind === "type" || Ee.type === "ImportSpecifier" && Ee.importKind === "type", !0, !t.inlineTemplate);
|
|
23009
23009
|
}
|
|
23010
|
-
|
|
23010
|
+
W.specifiers.length && ie === W.specifiers.length && y.s.remove(W.start + A, W.end + A);
|
|
23011
23011
|
}
|
|
23012
23012
|
const F = {};
|
|
23013
|
-
for (const
|
|
23014
|
-
const { source:
|
|
23015
|
-
|
|
23016
|
-
}
|
|
23017
|
-
if (o &&
|
|
23018
|
-
for (const
|
|
23019
|
-
let
|
|
23020
|
-
if (E =
|
|
23021
|
-
const ce =
|
|
23022
|
-
y.s.overwrite(ce,
|
|
23023
|
-
} else if (
|
|
23024
|
-
const
|
|
23025
|
-
|
|
23013
|
+
for (const W in y.userImports) {
|
|
23014
|
+
const { source: ie, imported: ce, local: ye } = y.userImports[W];
|
|
23015
|
+
ie === "vue" && (F[ce] = ye);
|
|
23016
|
+
}
|
|
23017
|
+
if (o && z) {
|
|
23018
|
+
for (const W of z.body) if (W.type === "ExportDefaultDeclaration") {
|
|
23019
|
+
let ie;
|
|
23020
|
+
if (E = W, E.declaration.type === "ObjectExpression" ? ie = E.declaration.properties : E.declaration.type === "CallExpression" && E.declaration.arguments[0] && E.declaration.arguments[0].type === "ObjectExpression" && (ie = E.declaration.arguments[0].properties), ie) for (const Ee of ie) Ee.type === "ObjectProperty" && Ee.key.type === "Identifier" && Ee.key.name === "name" && (y.hasDefaultExportName = !0), Ee.type !== "ObjectMethod" && Ee.type !== "ObjectProperty" || Ee.key.type !== "Identifier" || Ee.key.name !== "render" || (y.hasDefaultExportRender = !0);
|
|
23021
|
+
const ce = W.start + D, ye = W.declaration.start + D;
|
|
23022
|
+
y.s.overwrite(ce, ye, `const ${Ws} = `);
|
|
23023
|
+
} else if (W.type === "ExportNamedDeclaration") {
|
|
23024
|
+
const ie = W.specifiers.find((ce) => ce.exported.type === "Identifier" && ce.exported.name === "default");
|
|
23025
|
+
ie && (E = W, W.specifiers.length > 1 ? y.s.remove(ie.start + D, ie.end + D) : y.s.remove(W.start + D, W.end + D), W.source ? y.s.prepend(`import { ${ie.local.name} as ${Ws} } from '${W.source.value}'
|
|
23026
23026
|
`) : y.s.appendLeft(N, `
|
|
23027
|
-
const ${Ws} = ${
|
|
23028
|
-
`)),
|
|
23029
|
-
} else
|
|
23027
|
+
const ${Ws} = ${ie.local.name}
|
|
23028
|
+
`)), W.declaration && Bl("script", W.declaration, v, F, d);
|
|
23029
|
+
} else W.type !== "VariableDeclaration" && W.type !== "FunctionDeclaration" && W.type !== "ClassDeclaration" && W.type !== "TSEnumDeclaration" || W.declare || Bl("script", W, v, F, d);
|
|
23030
23030
|
D > A && (/\n$/.test(o.content.trim()) || y.s.appendLeft(N, `
|
|
23031
23031
|
`), y.s.move(D, N, 0));
|
|
23032
23032
|
}
|
|
23033
|
-
for (const
|
|
23034
|
-
if (
|
|
23035
|
-
const ce = Gt(
|
|
23036
|
-
if (Mp(y, ce) || kg(y, ce) || wg(y, ce) || Eg(y, ce)) y.s.remove(
|
|
23033
|
+
for (const W of H.body) {
|
|
23034
|
+
if (W.type === "ExpressionStatement") {
|
|
23035
|
+
const ce = Gt(W.expression);
|
|
23036
|
+
if (Mp(y, ce) || kg(y, ce) || wg(y, ce) || Eg(y, ce)) y.s.remove(W.start + A, W.end + A);
|
|
23037
23037
|
else if (j_(y, ce)) {
|
|
23038
|
-
const
|
|
23039
|
-
y.s.overwrite(
|
|
23038
|
+
const ye = ce.callee;
|
|
23039
|
+
y.s.overwrite(ye.start + A, ye.end + A, "__expose");
|
|
23040
23040
|
} else vg(y, ce);
|
|
23041
23041
|
}
|
|
23042
|
-
if (
|
|
23043
|
-
const ce =
|
|
23044
|
-
let
|
|
23045
|
-
for (let
|
|
23046
|
-
const
|
|
23042
|
+
if (W.type === "VariableDeclaration" && !W.declare) {
|
|
23043
|
+
const ce = W.declarations.length;
|
|
23044
|
+
let ye, Ee = ce;
|
|
23045
|
+
for (let me = 0; me < ce; me++) {
|
|
23046
|
+
const ge = W.declarations[me], Oe = ge.init && Gt(ge.init);
|
|
23047
23047
|
if (Oe) {
|
|
23048
|
-
wg(y, Oe) && y.error(`${dr}() has no returning value, it cannot be assigned.`,
|
|
23049
|
-
const qe = Mp(y, Oe,
|
|
23048
|
+
wg(y, Oe) && y.error(`${dr}() has no returning value, it cannot be assigned.`, W);
|
|
23049
|
+
const qe = Mp(y, Oe, ge.id);
|
|
23050
23050
|
y.propsDestructureRestId && (b[y.propsDestructureRestId] = "setup-reactive-const");
|
|
23051
|
-
const Me = !qe && kg(y, Oe,
|
|
23052
|
-
if (!Me && (Eg(y, Oe,
|
|
23051
|
+
const Me = !qe && kg(y, Oe, ge.id);
|
|
23052
|
+
if (!Me && (Eg(y, Oe, ge.id) || vg(y, Oe, ge.id)), qe && !y.propsDestructureRestId && y.propsDestructureDecl) if (Ee === 1) y.s.remove(W.start + A, W.end + A);
|
|
23053
23053
|
else {
|
|
23054
|
-
let at =
|
|
23055
|
-
|
|
23054
|
+
let at = ge.start + A, St = ge.end + A;
|
|
23055
|
+
me === ce - 1 ? at = W.declarations[ye].end + A : St = W.declarations[me + 1].start + A, y.s.remove(at, St), Ee--;
|
|
23056
23056
|
}
|
|
23057
|
-
else Me ? y.s.overwrite(A + Oe.start, A + Oe.end, "__emit") :
|
|
23057
|
+
else Me ? y.s.overwrite(A + Oe.start, A + Oe.end, "__emit") : ye = me;
|
|
23058
23058
|
}
|
|
23059
23059
|
}
|
|
23060
23060
|
}
|
|
23061
|
-
let
|
|
23062
|
-
if (
|
|
23061
|
+
let ie = !1;
|
|
23062
|
+
if (W.type !== "VariableDeclaration" && W.type !== "FunctionDeclaration" && W.type !== "ClassDeclaration" && W.type !== "TSEnumDeclaration" || W.declare || (ie = Bl("scriptSetup", W, b, F, d, !!y.propsDestructureDecl)), d && ie && j(W), W.type === "VariableDeclaration" && !W.declare || W.type.endsWith("Statement")) {
|
|
23063
23063
|
const ce = [H.body];
|
|
23064
|
-
gh(
|
|
23065
|
-
if (Kr(
|
|
23064
|
+
gh(W, { enter(ye, Ee) {
|
|
23065
|
+
if (Kr(ye) && this.skip(), ye.type === "BlockStatement" && ce.push(ye.body), ye.type === "AwaitExpression") {
|
|
23066
23066
|
w = !0;
|
|
23067
|
-
const
|
|
23068
|
-
B_(y,
|
|
23067
|
+
const me = ce[ce.length - 1].some((ge, Oe) => (ce.length === 1 || Oe > 0) && ge.type === "ExpressionStatement" && ge.start === ye.start);
|
|
23068
|
+
B_(y, ye, me, Ee.type === "ExpressionStatement");
|
|
23069
23069
|
}
|
|
23070
|
-
}, exit(
|
|
23071
|
-
|
|
23070
|
+
}, exit(ye) {
|
|
23071
|
+
ye.type === "BlockStatement" && ce.pop();
|
|
23072
23072
|
} });
|
|
23073
23073
|
}
|
|
23074
|
-
(
|
|
23074
|
+
(W.type === "ExportNamedDeclaration" && W.exportKind !== "type" || W.type === "ExportAllDeclaration" || W.type === "ExportDefaultDeclaration") && y.error("<script setup> cannot contain ES module exports. If you are using a previous version of <script setup>, please consult the updated RFC at https://github.com/vuejs/rfcs/pull/227.", W), y.isTS && (W.type.startsWith("TS") || W.type === "ExportNamedDeclaration" && W.exportKind === "type" || W.type === "VariableDeclaration" && W.declare) && W.type !== "TSEnumDeclaration" && j(W);
|
|
23075
23075
|
}
|
|
23076
23076
|
y.propsDestructureDecl && D_(y, F), X(y.propsRuntimeDecl, Tt), X(y.propsRuntimeDefaults, Tt), X(y.propsDestructureDecl, Tt), X(y.emitsRuntimeDecl, Ss), X(y.optionsRuntimeDecl, dr);
|
|
23077
|
-
for (const { runtimeOptionNodes:
|
|
23078
|
-
o ? A < D ? (y.s.remove(0, A), y.s.remove(O, D), y.s.remove(N, l.length)) : (y.s.remove(0, D), y.s.remove(N, A), y.s.remove(O, l.length)) : (y.s.remove(0, A), y.s.remove(O, l.length)),
|
|
23079
|
-
for (const [
|
|
23080
|
-
for (const
|
|
23081
|
-
for (const
|
|
23077
|
+
for (const { runtimeOptionNodes: W } of Object.values(y.modelDecls)) for (const ie of W) X(ie, Wa);
|
|
23078
|
+
o ? A < D ? (y.s.remove(0, A), y.s.remove(O, D), y.s.remove(N, l.length)) : (y.s.remove(0, D), y.s.remove(N, A), y.s.remove(O, l.length)) : (y.s.remove(0, A), y.s.remove(O, l.length)), z && Object.assign(y.bindingMetadata, P0(z.body));
|
|
23079
|
+
for (const [W, { isType: ie, imported: ce, source: ye }] of Object.entries(y.userImports)) ie || (y.bindingMetadata[W] = ce === "*" || ce === "default" && ye.endsWith(".vue") || ye === "vue" ? "setup-const" : "setup-maybe-ref");
|
|
23080
|
+
for (const W in v) y.bindingMetadata[W] = v[W];
|
|
23081
|
+
for (const W in b) y.bindingMetadata[W] = b[W];
|
|
23082
23082
|
e.cssVars.length && !((s = t.templateOptions) != null && s.ssr) && (y.helperImports.add(qo), y.helperImports.add("unref"), y.s.prependLeft(A, `
|
|
23083
23083
|
${Ox(e.cssVars, y.bindingMetadata, g, !!t.isProd)}
|
|
23084
23084
|
`));
|
|
23085
23085
|
let q = "__props";
|
|
23086
23086
|
if (y.propsTypeDecl && (q += ": any"), y.propsDecl && (y.propsDestructureRestId ? (y.s.overwrite(A + y.propsCall.start, A + y.propsCall.end, `${y.helper("createPropsRestProxy")}(__props, ${JSON.stringify(Object.keys(y.propsDestructuredBindings))})`), y.s.overwrite(A + y.propsDestructureDecl.start, A + y.propsDestructureDecl.end, y.propsDestructureRestId)) : y.propsDestructureDecl || y.s.overwrite(A + y.propsCall.start, A + y.propsCall.end, "__props")), w) {
|
|
23087
|
-
const
|
|
23087
|
+
const W = y.isTS ? ": any" : "";
|
|
23088
23088
|
y.s.prependLeft(A, `
|
|
23089
|
-
let __temp${
|
|
23089
|
+
let __temp${W}, __restore${W}
|
|
23090
23090
|
`);
|
|
23091
23091
|
}
|
|
23092
23092
|
const G = y.hasDefineExposeCall || !t.inlineTemplate ? ["expose: __expose"] : [];
|
|
23093
|
-
let ee,
|
|
23093
|
+
let ee, ae;
|
|
23094
23094
|
y.emitDecl && G.push("emit: __emit"), G.length && (q += `, { ${G.join(", ")} }`);
|
|
23095
|
-
const
|
|
23095
|
+
const fe = R_(y);
|
|
23096
23096
|
if (!t.inlineTemplate || !e.template && y.hasDefaultExportRender) {
|
|
23097
|
-
const
|
|
23098
|
-
for (const
|
|
23099
|
-
|
|
23100
|
-
for (const
|
|
23101
|
-
const ce =
|
|
23102
|
-
|
|
23103
|
-
} else
|
|
23104
|
-
else
|
|
23105
|
-
|
|
23097
|
+
const W = Rn(Rn({}, v), b);
|
|
23098
|
+
for (const ie in y.userImports) !y.userImports[ie].isType && y.userImports[ie].isUsedInTemplate && (W[ie] = !0);
|
|
23099
|
+
ae = "{ ";
|
|
23100
|
+
for (const ie in W) if (W[ie] !== !0 || y.userImports[ie].source === "vue" || y.userImports[ie].source.endsWith(".vue")) if (y.bindingMetadata[ie] === "setup-let") {
|
|
23101
|
+
const ce = ie === "v" ? "_v" : "v";
|
|
23102
|
+
ae += `get ${ie}() { return ${ie} }, set ${ie}(${ce}) { ${ie} = ${ce} }, `;
|
|
23103
|
+
} else ae += `${ie}, `;
|
|
23104
|
+
else ae += `get ${ie}() { return ${ie} }, `;
|
|
23105
|
+
ae = ae.replace(/, $/, "") + " }";
|
|
23106
23106
|
} else if (e.template && !e.template.src) {
|
|
23107
23107
|
t.templateOptions && t.templateOptions.ssr && (C = !0);
|
|
23108
|
-
const { code:
|
|
23109
|
-
ee =
|
|
23110
|
-
const
|
|
23111
|
-
if (typeof
|
|
23112
|
-
if (
|
|
23108
|
+
const { code: W, ast: ie, preamble: ce, tips: ye, errors: Ee, map: me } = Hb(jl(Rn({ filename: p, ast: e.template.ast, source: e.template.content, inMap: e.template.map }, t.templateOptions), { id: g, scoped: e.styles.some((Oe) => Oe.scoped), isProd: t.isProd, ssrCssVars: e.cssVars, compilerOptions: jl(Rn({}, t.templateOptions && t.templateOptions.compilerOptions), { inline: !0, isTS: y.isTS, bindingMetadata: y.bindingMetadata }) }));
|
|
23109
|
+
ee = me, ye.length && ye.forEach(Xn);
|
|
23110
|
+
const ge = Ee[0];
|
|
23111
|
+
if (typeof ge == "string") throw new Error(ge);
|
|
23112
|
+
if (ge) throw ge.loc && (ge.message += `
|
|
23113
23113
|
|
|
23114
23114
|
` + e.filename + `
|
|
23115
|
-
` + yi(l,
|
|
23116
|
-
`),
|
|
23117
|
-
ce && y.s.prepend(ce),
|
|
23118
|
-
} else
|
|
23115
|
+
` + yi(l, ge.loc.start.offset, ge.loc.end.offset) + `
|
|
23116
|
+
`), ge;
|
|
23117
|
+
ce && y.s.prepend(ce), ie && ie.helpers.has(an) && y.helperImports.delete("unref"), ae = W;
|
|
23118
|
+
} else ae = "() => {}";
|
|
23119
23119
|
t.inlineTemplate ? y.s.appendRight(O, `
|
|
23120
|
-
return ${
|
|
23120
|
+
return ${ae}
|
|
23121
23121
|
}
|
|
23122
23122
|
|
|
23123
23123
|
`) : y.s.appendRight(O, `
|
|
23124
|
-
const __returned__ = ${
|
|
23124
|
+
const __returned__ = ${ae}
|
|
23125
23125
|
Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })
|
|
23126
23126
|
return __returned__
|
|
23127
23127
|
}
|
|
23128
23128
|
|
|
23129
23129
|
`);
|
|
23130
|
-
const
|
|
23130
|
+
const Y = t.genDefaultAs ? `const ${t.genDefaultAs} =` : "export default";
|
|
23131
23131
|
let le = "";
|
|
23132
23132
|
if (!y.hasDefaultExportName && p && p !== Bx) {
|
|
23133
|
-
const
|
|
23134
|
-
|
|
23135
|
-
__name: '${
|
|
23133
|
+
const W = p.match(/([^/\\]+)\.\w+$/);
|
|
23134
|
+
W && (le += `
|
|
23135
|
+
__name: '${W[1]}',`);
|
|
23136
23136
|
}
|
|
23137
23137
|
C && (le += `
|
|
23138
|
-
__ssrInlineRender: true,`),
|
|
23139
|
-
props: ${
|
|
23138
|
+
__ssrInlineRender: true,`), fe && (le += `
|
|
23139
|
+
props: ${fe},`);
|
|
23140
23140
|
const J = F_(y);
|
|
23141
23141
|
J && (le += `
|
|
23142
23142
|
emits: ${J},`);
|
|
23143
23143
|
let $ = "";
|
|
23144
23144
|
y.optionsRuntimeDecl && ($ = c.content.slice(y.optionsRuntimeDecl.start, y.optionsRuntimeDecl.end).trim());
|
|
23145
|
-
const
|
|
23145
|
+
const oe = y.hasDefineExposeCall || t.inlineTemplate ? "" : ` __expose();
|
|
23146
23146
|
`;
|
|
23147
23147
|
if (y.isTS) {
|
|
23148
|
-
const
|
|
23148
|
+
const W = (E ? `
|
|
23149
23149
|
...${Ws},` : "") + ($ ? `
|
|
23150
23150
|
...${$},` : "");
|
|
23151
23151
|
y.s.prependLeft(A, `
|
|
23152
|
-
${
|
|
23152
|
+
${Y} /*@__PURE__*/${y.helper("defineComponent")}({${W}${le}
|
|
23153
23153
|
${w ? "async " : ""}setup(${q}) {
|
|
23154
|
-
${
|
|
23154
|
+
${oe}`), y.s.appendRight(O, "})");
|
|
23155
23155
|
} else E || $ ? (y.s.prependLeft(A, `
|
|
23156
|
-
${
|
|
23156
|
+
${Y} /*@__PURE__*/Object.assign(${E ? `${Ws}, ` : ""}${$ ? `${$}, ` : ""}{${le}
|
|
23157
23157
|
${w ? "async " : ""}setup(${q}) {
|
|
23158
|
-
${
|
|
23159
|
-
${
|
|
23158
|
+
${oe}`), y.s.appendRight(O, "})")) : (y.s.prependLeft(A, `
|
|
23159
|
+
${Y} {${le}
|
|
23160
23160
|
${w ? "async " : ""}setup(${q}) {
|
|
23161
|
-
${
|
|
23161
|
+
${oe}`), y.s.appendRight(O, "}"));
|
|
23162
23162
|
if (y.helperImports.size > 0) {
|
|
23163
|
-
const
|
|
23164
|
-
y.s.prepend(`import { ${[...y.helperImports].map((ce) => `${ce} as _${ce}`).join(", ")} } from ${
|
|
23163
|
+
const W = (i = (n = t.templateOptions) == null ? void 0 : n.compilerOptions) == null ? void 0 : i.runtimeModuleName, ie = W ? JSON.stringify(W) : "'vue'";
|
|
23164
|
+
y.s.prepend(`import { ${[...y.helperImports].map((ce) => `${ce} as _${ce}`).join(", ")} } from ${ie}
|
|
23165
23165
|
`);
|
|
23166
23166
|
}
|
|
23167
|
-
const
|
|
23168
|
-
let
|
|
23169
|
-
if (ee &&
|
|
23170
|
-
const
|
|
23171
|
-
|
|
23172
|
-
const Ee = new ks.SourceMapGenerator(),
|
|
23173
|
-
const qe = new ks.SourceMapConsumer(
|
|
23167
|
+
const Q = y.s.toString();
|
|
23168
|
+
let se = t.sourceMap !== !1 ? y.s.generateMap({ source: p, hires: !0, includeContent: !0 }) : void 0;
|
|
23169
|
+
if (ee && se) {
|
|
23170
|
+
const W = Q.indexOf(ae);
|
|
23171
|
+
se = (function(ie, ce, ye) {
|
|
23172
|
+
const Ee = new ks.SourceMapGenerator(), me = (ge, Oe = 0) => {
|
|
23173
|
+
const qe = new ks.SourceMapConsumer(ge);
|
|
23174
23174
|
qe.sources.forEach((Me) => {
|
|
23175
23175
|
Ee._sources.add(Me);
|
|
23176
23176
|
const at = qe.sourceContentFor(Me);
|
|
@@ -23179,10 +23179,10 @@ ${ae}`), y.s.appendRight(O, "}"));
|
|
|
23179
23179
|
Me.originalLine != null && Ee.addMapping({ generated: { line: Me.generatedLine + Oe, column: Me.generatedColumn }, original: { line: Me.originalLine, column: Me.originalColumn }, source: Me.source, name: Me.name });
|
|
23180
23180
|
});
|
|
23181
23181
|
};
|
|
23182
|
-
return
|
|
23183
|
-
})(
|
|
23182
|
+
return me(ie), me(ce, ye), Ee._sourceRoot = ie.sourceRoot, Ee._file = ie.file, Ee.toJSON();
|
|
23183
|
+
})(se, ee, Q.slice(0, W).split(/\r?\n/).length - 1);
|
|
23184
23184
|
}
|
|
23185
|
-
return jl(Rn({}, c), { bindings: y.bindingMetadata, imports: y.userImports, content:
|
|
23185
|
+
return jl(Rn({}, c), { bindings: y.bindingMetadata, imports: y.userImports, content: Q, map: se, scriptAst: z?.body, scriptSetupAst: H?.body, deps: y.deps ? [...y.deps] : void 0 });
|
|
23186
23186
|
}
|
|
23187
23187
|
function tn(e, t, s) {
|
|
23188
23188
|
e[t.name] = s;
|
|
@@ -23295,25 +23295,29 @@ const Ng = async (e) => {
|
|
|
23295
23295
|
URL.revokeObjectURL(t);
|
|
23296
23296
|
}
|
|
23297
23297
|
}, J_ = async (e, t) => {
|
|
23298
|
-
const s = [], {
|
|
23299
|
-
let
|
|
23300
|
-
const
|
|
23301
|
-
const { lang:
|
|
23302
|
-
return [.../[jt]sx$/.test(
|
|
23303
|
-
})),
|
|
23304
|
-
const
|
|
23305
|
-
|
|
23306
|
-
|
|
23307
|
-
|
|
23308
|
-
|
|
23298
|
+
const s = [], { compiler: { expressionPlugins: n, ...i } = {} } = t ?? {}, { descriptor: o, errors: c } = Ux(await (await Ng(e)).text() || "<template></template>", t?.parse), { script: l, scriptSetup: p, slotted: d, styles: g, template: f } = o;
|
|
23299
|
+
let T = "";
|
|
23300
|
+
const m = `data-v-${ST(e)}`, y = new Set([l, p].flatMap((fe) => {
|
|
23301
|
+
const { lang: Y = "js" } = fe ?? {};
|
|
23302
|
+
return [.../[jt]sx$/.test(Y) ? ["jsx"] : [], .../tsx?$/.test(Y) ? ["typescript"] : []];
|
|
23303
|
+
})), v = { expressionPlugins: [.../* @__PURE__ */ new Set([...n ?? [], ...y])], scopeId: m, slotted: d, ...i }, b = g.some(({ scoped: fe }) => fe), E = b ? { __scopeId: m } : {}, w = { compilerOptions: v, scoped: b, slotted: d }, C = { id: m, templateOptions: w, ...t?.script }, A = document.getElementById(m) instanceof HTMLStyleElement ? Promise.resolve([]) : Promise.all(g.map(async ({ content: fe, module: Y, scoped: le = !1, src: J }) => {
|
|
23304
|
+
const $ = !!Y;
|
|
23305
|
+
if ($) return T = "<style module> is not supported in the playground.", "";
|
|
23306
|
+
{
|
|
23307
|
+
const { code: oe, errors: Q } = await s_({ filename: e, id: m, modules: $, scoped: le, source: J ? await (await Ng(J)).text() : fe, ...t?.style });
|
|
23308
|
+
return s.push(...Q), oe;
|
|
23309
|
+
}
|
|
23310
|
+
})), O = { jsxRuntime: "preserve", transforms: [...y] }, { ast: D, content: N = "" } = f ?? {}, { bindings: j, content: U, warnings: X } = l || p ? W_(o, C) : {};
|
|
23311
|
+
j && (v.bindingMetadata = j);
|
|
23312
|
+
const { code: z, errors: H, tips: F } = !f || p && C.inlineTemplate ? {} : Hb({ ...D, filename: e, id: m, source: N, ...w, ...t?.template }), [q, G, ee] = await Promise.all([A, U ? Og(y.size ? $1(U, O).code : U) : Promise.resolve(void 0), z ? Og(y.size ? $1(z, O).code : z) : Promise.resolve(void 0)]), ae = q.join(`
|
|
23309
23313
|
`).trim();
|
|
23310
|
-
if (
|
|
23311
|
-
const
|
|
23312
|
-
|
|
23314
|
+
if (ae) {
|
|
23315
|
+
const fe = document.createElement("style");
|
|
23316
|
+
fe.id = m, fe.textContent = ae, document.head.appendChild(fe);
|
|
23313
23317
|
}
|
|
23314
|
-
return Object.assign(
|
|
23315
|
-
console.log(
|
|
23316
|
-
}),
|
|
23318
|
+
return Object.assign(E, G?.default), Object.assign(E, ee), [...c, ...X ?? [], ...F ?? [], ...H ?? [], ...s, ...T ? [T] : []].forEach((fe) => {
|
|
23319
|
+
console.log(fe);
|
|
23320
|
+
}), E;
|
|
23317
23321
|
};
|
|
23318
23322
|
export {
|
|
23319
23323
|
J_ as default
|