@datapos/datapos-development 0.3.154 → 0.3.155
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/datapos-development.es.js +210 -215
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { exec as Ei } from "node:child_process";
|
|
2
2
|
import { promises as R } from "node:fs";
|
|
3
3
|
import { nanoid as Ii } from "nanoid";
|
|
4
|
-
import { promisify as
|
|
5
|
-
var
|
|
4
|
+
import { promisify as _i } from "node:util";
|
|
5
|
+
var Ni = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239], je = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], Li = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", Ue = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", oe = {
|
|
6
6
|
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
|
|
7
7
|
5: "class enum extends super const export import",
|
|
8
8
|
6: "enum",
|
|
@@ -26,7 +26,7 @@ function pt(t, e) {
|
|
|
26
26
|
return t < 65 ? t === 36 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 && Mi.test(String.fromCharCode(t)) : e === !1 ? !1 : le(t, je);
|
|
27
27
|
}
|
|
28
28
|
function dt(t, e) {
|
|
29
|
-
return t < 48 ? t === 36 : t < 58 ? !0 : t < 65 ? !1 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 && Di.test(String.fromCharCode(t)) : e === !1 ? !1 : le(t, je) || le(t,
|
|
29
|
+
return t < 48 ? t === 36 : t < 58 ? !0 : t < 65 ? !1 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 && Di.test(String.fromCharCode(t)) : e === !1 ? !1 : le(t, je) || le(t, Ni);
|
|
30
30
|
}
|
|
31
31
|
var O = function(e, r) {
|
|
32
32
|
r === void 0 && (r = {}), this.label = e, this.keyword = r.keyword, this.beforeExpr = !!r.beforeExpr, this.startsExpr = !!r.startsExpr, this.isLoop = !!r.isLoop, this.isAssign = !!r.isAssign, this.prefix = !!r.prefix, this.postfix = !!r.postfix, this.binop = r.binop || null, this.updateContext = null;
|
|
@@ -35,7 +35,7 @@ function ot(t, e) {
|
|
|
35
35
|
return new O(t, { beforeExpr: !0, binop: e });
|
|
36
36
|
}
|
|
37
37
|
var ht = { beforeExpr: !0 }, st = { startsExpr: !0 }, kt = {};
|
|
38
|
-
function
|
|
38
|
+
function V(t, e) {
|
|
39
39
|
return e === void 0 && (e = {}), e.keyword = t, kt[t] = new O(t, e);
|
|
40
40
|
}
|
|
41
41
|
var h = {
|
|
@@ -96,41 +96,41 @@ var h = {
|
|
|
96
96
|
starstar: new O("**", { beforeExpr: !0 }),
|
|
97
97
|
coalesce: ot("??", 1),
|
|
98
98
|
// Keyword token types.
|
|
99
|
-
_break:
|
|
100
|
-
_case:
|
|
101
|
-
_catch:
|
|
102
|
-
_continue:
|
|
103
|
-
_debugger:
|
|
104
|
-
_default:
|
|
105
|
-
_do:
|
|
106
|
-
_else:
|
|
107
|
-
_finally:
|
|
108
|
-
_for:
|
|
109
|
-
_function:
|
|
110
|
-
_if:
|
|
111
|
-
_return:
|
|
112
|
-
_switch:
|
|
113
|
-
_throw:
|
|
114
|
-
_try:
|
|
115
|
-
_var:
|
|
116
|
-
_const:
|
|
117
|
-
_while:
|
|
118
|
-
_with:
|
|
119
|
-
_new:
|
|
120
|
-
_this:
|
|
121
|
-
_super:
|
|
122
|
-
_class:
|
|
123
|
-
_extends:
|
|
124
|
-
_export:
|
|
125
|
-
_import:
|
|
126
|
-
_null:
|
|
127
|
-
_true:
|
|
128
|
-
_false:
|
|
129
|
-
_in:
|
|
130
|
-
_instanceof:
|
|
131
|
-
_typeof:
|
|
132
|
-
_void:
|
|
133
|
-
_delete:
|
|
99
|
+
_break: V("break"),
|
|
100
|
+
_case: V("case", ht),
|
|
101
|
+
_catch: V("catch"),
|
|
102
|
+
_continue: V("continue"),
|
|
103
|
+
_debugger: V("debugger"),
|
|
104
|
+
_default: V("default", ht),
|
|
105
|
+
_do: V("do", { isLoop: !0, beforeExpr: !0 }),
|
|
106
|
+
_else: V("else", ht),
|
|
107
|
+
_finally: V("finally"),
|
|
108
|
+
_for: V("for", { isLoop: !0 }),
|
|
109
|
+
_function: V("function", st),
|
|
110
|
+
_if: V("if"),
|
|
111
|
+
_return: V("return", ht),
|
|
112
|
+
_switch: V("switch"),
|
|
113
|
+
_throw: V("throw", ht),
|
|
114
|
+
_try: V("try"),
|
|
115
|
+
_var: V("var"),
|
|
116
|
+
_const: V("const"),
|
|
117
|
+
_while: V("while", { isLoop: !0 }),
|
|
118
|
+
_with: V("with"),
|
|
119
|
+
_new: V("new", { beforeExpr: !0, startsExpr: !0 }),
|
|
120
|
+
_this: V("this", st),
|
|
121
|
+
_super: V("super", st),
|
|
122
|
+
_class: V("class", st),
|
|
123
|
+
_extends: V("extends", ht),
|
|
124
|
+
_export: V("export"),
|
|
125
|
+
_import: V("import", st),
|
|
126
|
+
_null: V("null", st),
|
|
127
|
+
_true: V("true", st),
|
|
128
|
+
_false: V("false", st),
|
|
129
|
+
_in: V("in", { beforeExpr: !0, binop: 7 }),
|
|
130
|
+
_instanceof: V("instanceof", { beforeExpr: !0, binop: 7 }),
|
|
131
|
+
_typeof: V("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
132
|
+
_void: V("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
133
|
+
_delete: V("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
134
134
|
}, Z = /\r\n?|\n|\u2028|\u2029/, qe = new RegExp(Z.source, "g");
|
|
135
135
|
function Tt(t) {
|
|
136
136
|
return t === 10 || t === 13 || t === 8232 || t === 8233;
|
|
@@ -268,12 +268,12 @@ var Kt = {
|
|
|
268
268
|
// When enabled, parenthesized expressions are represented by
|
|
269
269
|
// (non-standard) ParenthesizedExpression nodes
|
|
270
270
|
preserveParens: !1
|
|
271
|
-
},
|
|
271
|
+
}, _e = !1;
|
|
272
272
|
function ji(t) {
|
|
273
273
|
var e = {};
|
|
274
274
|
for (var r in Kt)
|
|
275
275
|
e[r] = t && wt(t, r) ? t[r] : Kt[r];
|
|
276
|
-
if (e.ecmaVersion === "latest" ? e.ecmaVersion = 1e8 : e.ecmaVersion == null ? (!
|
|
276
|
+
if (e.ecmaVersion === "latest" ? e.ecmaVersion = 1e8 : e.ecmaVersion == null ? (!_e && typeof console == "object" && console.warn && (_e = !0, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
277
277
|
Defaulting to 2020, but this will stop working in the future.`)), e.ecmaVersion = 11) : e.ecmaVersion >= 2015 && (e.ecmaVersion -= 2009), e.allowReserved == null && (e.allowReserved = e.ecmaVersion < 5), (!t || t.allowHashBang == null) && (e.allowHashBang = e.ecmaVersion >= 14), Ee(e.onToken)) {
|
|
278
278
|
var a = e.onToken;
|
|
279
279
|
e.onToken = function(u) {
|
|
@@ -570,8 +570,8 @@ k.parseStatement = function(t, e, r) {
|
|
|
570
570
|
var o = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null;
|
|
571
571
|
if (o)
|
|
572
572
|
return e && this.options.sourceType === "script" && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), o === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(u, !1, o), this.semicolon(), this.finishNode(u, "VariableDeclaration");
|
|
573
|
-
var w = this.value,
|
|
574
|
-
return a === h.name &&
|
|
573
|
+
var w = this.value, N = this.parseExpression();
|
|
574
|
+
return a === h.name && N.type === "Identifier" && this.eat(h.colon) ? this.parseLabeledStatement(u, w, N, t) : this.parseExpressionStatement(u, N);
|
|
575
575
|
}
|
|
576
576
|
};
|
|
577
577
|
k.parseBreakContinueStatement = function(t, e) {
|
|
@@ -605,8 +605,8 @@ k.parseForStatement = function(t) {
|
|
|
605
605
|
var g = this.startNode();
|
|
606
606
|
return this.next(), v === "await using" && this.next(), this.parseVar(g, !0, v), this.finishNode(g, "VariableDeclaration"), this.parseForAfterInit(t, g, e);
|
|
607
607
|
}
|
|
608
|
-
var o = this.containsEsc, w = new te(),
|
|
609
|
-
return this.type === h._in || (d = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (e > -1 ? (this.type === h._in && this.unexpected(e), t.await = !0) : d && this.options.ecmaVersion >= 8 && (M.start ===
|
|
608
|
+
var o = this.containsEsc, w = new te(), N = this.start, M = e > -1 ? this.parseExprSubscripts(w, "await") : this.parseExpression(!0, w);
|
|
609
|
+
return this.type === h._in || (d = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (e > -1 ? (this.type === h._in && this.unexpected(e), t.await = !0) : d && this.options.ecmaVersion >= 8 && (M.start === N && !o && M.type === "Identifier" && M.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (t.await = !1)), f && d && this.raise(M.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(M, !1, w), this.checkLValPattern(M), this.parseForIn(t, M)) : (this.checkExpressionErrors(w, !0), e > -1 && this.unexpected(e), this.parseFor(t, M));
|
|
610
610
|
};
|
|
611
611
|
k.parseForAfterInit = function(t, e, r) {
|
|
612
612
|
return (this.type === h._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && e.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === h._in ? r > -1 && this.unexpected(r) : t.await = r > -1), this.parseForIn(t, e)) : (r > -1 && this.unexpected(r), this.parseFor(t, e));
|
|
@@ -1182,8 +1182,8 @@ h.name.updateContext = function(t) {
|
|
|
1182
1182
|
var e = !1;
|
|
1183
1183
|
this.options.ecmaVersion >= 6 && t !== h.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (e = !0), this.exprAllowed = e;
|
|
1184
1184
|
};
|
|
1185
|
-
var
|
|
1186
|
-
|
|
1185
|
+
var _ = K.prototype;
|
|
1186
|
+
_.checkPropClash = function(t, e, r) {
|
|
1187
1187
|
if (!(this.options.ecmaVersion >= 9 && t.type === "SpreadElement") && !(this.options.ecmaVersion >= 6 && (t.computed || t.method || t.shorthand))) {
|
|
1188
1188
|
var a = t.key, u;
|
|
1189
1189
|
switch (a.type) {
|
|
@@ -1215,7 +1215,7 @@ N.checkPropClash = function(t, e, r) {
|
|
|
1215
1215
|
d[f] = !0;
|
|
1216
1216
|
}
|
|
1217
1217
|
};
|
|
1218
|
-
|
|
1218
|
+
_.parseExpression = function(t, e) {
|
|
1219
1219
|
var r = this.start, a = this.startLoc, u = this.parseMaybeAssign(t, e);
|
|
1220
1220
|
if (this.type === h.comma) {
|
|
1221
1221
|
var f = this.startNodeAt(r, a);
|
|
@@ -1225,7 +1225,7 @@ N.parseExpression = function(t, e) {
|
|
|
1225
1225
|
}
|
|
1226
1226
|
return u;
|
|
1227
1227
|
};
|
|
1228
|
-
|
|
1228
|
+
_.parseMaybeAssign = function(t, e, r) {
|
|
1229
1229
|
if (this.isContextual("yield")) {
|
|
1230
1230
|
if (this.inGenerator)
|
|
1231
1231
|
return this.parseYield(t);
|
|
@@ -1243,7 +1243,7 @@ N.parseMaybeAssign = function(t, e, r) {
|
|
|
1243
1243
|
a && this.checkExpressionErrors(e, !0);
|
|
1244
1244
|
return u > -1 && (e.parenthesizedAssign = u), f > -1 && (e.trailingComma = f), o;
|
|
1245
1245
|
};
|
|
1246
|
-
|
|
1246
|
+
_.parseMaybeConditional = function(t, e) {
|
|
1247
1247
|
var r = this.start, a = this.startLoc, u = this.parseExprOps(t, e);
|
|
1248
1248
|
if (this.checkExpressionErrors(e))
|
|
1249
1249
|
return u;
|
|
@@ -1253,28 +1253,28 @@ N.parseMaybeConditional = function(t, e) {
|
|
|
1253
1253
|
}
|
|
1254
1254
|
return u;
|
|
1255
1255
|
};
|
|
1256
|
-
|
|
1256
|
+
_.parseExprOps = function(t, e) {
|
|
1257
1257
|
var r = this.start, a = this.startLoc, u = this.parseMaybeUnary(e, !1, !1, t);
|
|
1258
1258
|
return this.checkExpressionErrors(e) || u.start === r && u.type === "ArrowFunctionExpression" ? u : this.parseExprOp(u, r, a, -1, t);
|
|
1259
1259
|
};
|
|
1260
|
-
|
|
1260
|
+
_.parseExprOp = function(t, e, r, a, u) {
|
|
1261
1261
|
var f = this.type.binop;
|
|
1262
1262
|
if (f != null && (!u || this.type !== h._in) && f > a) {
|
|
1263
1263
|
var d = this.type === h.logicalOR || this.type === h.logicalAND, v = this.type === h.coalesce;
|
|
1264
1264
|
v && (f = h.logicalAND.binop);
|
|
1265
1265
|
var g = this.value;
|
|
1266
1266
|
this.next();
|
|
1267
|
-
var o = this.start, w = this.startLoc,
|
|
1267
|
+
var o = this.start, w = this.startLoc, N = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, u), o, w, f, u), M = this.buildBinary(e, r, t, N, g, d || v);
|
|
1268
1268
|
return (d && this.type === h.coalesce || v && (this.type === h.logicalOR || this.type === h.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(M, e, r, a, u);
|
|
1269
1269
|
}
|
|
1270
1270
|
return t;
|
|
1271
1271
|
};
|
|
1272
|
-
|
|
1272
|
+
_.buildBinary = function(t, e, r, a, u, f) {
|
|
1273
1273
|
a.type === "PrivateIdentifier" && this.raise(a.start, "Private identifier can only be left side of binary expression");
|
|
1274
1274
|
var d = this.startNodeAt(t, e);
|
|
1275
1275
|
return d.left = r, d.operator = u, d.right = a, this.finishNode(d, f ? "LogicalExpression" : "BinaryExpression");
|
|
1276
1276
|
};
|
|
1277
|
-
|
|
1277
|
+
_.parseMaybeUnary = function(t, e, r, a) {
|
|
1278
1278
|
var u = this.start, f = this.startLoc, d;
|
|
1279
1279
|
if (this.isContextual("await") && this.canAwait)
|
|
1280
1280
|
d = this.parseAwait(a), e = !0;
|
|
@@ -1305,14 +1305,14 @@ function Ye(t) {
|
|
|
1305
1305
|
function de(t) {
|
|
1306
1306
|
return t.type === "MemberExpression" && t.property.type === "PrivateIdentifier" || t.type === "ChainExpression" && de(t.expression) || t.type === "ParenthesizedExpression" && de(t.expression);
|
|
1307
1307
|
}
|
|
1308
|
-
|
|
1308
|
+
_.parseExprSubscripts = function(t, e) {
|
|
1309
1309
|
var r = this.start, a = this.startLoc, u = this.parseExprAtom(t, e);
|
|
1310
1310
|
if (u.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")")
|
|
1311
1311
|
return u;
|
|
1312
1312
|
var f = this.parseSubscripts(u, r, a, !1, e);
|
|
1313
1313
|
return t && f.type === "MemberExpression" && (t.parenthesizedAssign >= f.start && (t.parenthesizedAssign = -1), t.parenthesizedBind >= f.start && (t.parenthesizedBind = -1), t.trailingComma >= f.start && (t.trailingComma = -1)), f;
|
|
1314
1314
|
};
|
|
1315
|
-
|
|
1315
|
+
_.parseSubscripts = function(t, e, r, a, u) {
|
|
1316
1316
|
for (var f = this.options.ecmaVersion >= 8 && t.type === "Identifier" && t.name === "async" && this.lastTokEnd === t.end && !this.canInsertSemicolon() && t.end - t.start === 5 && this.potentialArrowAt === t.start, d = !1; ; ) {
|
|
1317
1317
|
var v = this.parseSubscript(t, e, r, a, f, d, u);
|
|
1318
1318
|
if (v.optional && (d = !0), v === t || v.type === "ArrowFunctionExpression") {
|
|
@@ -1325,13 +1325,13 @@ N.parseSubscripts = function(t, e, r, a, u) {
|
|
|
1325
1325
|
t = v;
|
|
1326
1326
|
}
|
|
1327
1327
|
};
|
|
1328
|
-
|
|
1328
|
+
_.shouldParseAsyncArrow = function() {
|
|
1329
1329
|
return !this.canInsertSemicolon() && this.eat(h.arrow);
|
|
1330
1330
|
};
|
|
1331
|
-
|
|
1331
|
+
_.parseSubscriptAsyncArrow = function(t, e, r, a) {
|
|
1332
1332
|
return this.parseArrowExpression(this.startNodeAt(t, e), r, !0, a);
|
|
1333
1333
|
};
|
|
1334
|
-
|
|
1334
|
+
_.parseSubscript = function(t, e, r, a, u, f, d) {
|
|
1335
1335
|
var v = this.options.ecmaVersion >= 11, g = v && this.eat(h.questionDot);
|
|
1336
1336
|
a && g && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
1337
1337
|
var o = this.eat(h.bracketL);
|
|
@@ -1339,12 +1339,12 @@ N.parseSubscript = function(t, e, r, a, u, f, d) {
|
|
|
1339
1339
|
var w = this.startNodeAt(e, r);
|
|
1340
1340
|
w.object = t, o ? (w.property = this.parseExpression(), this.expect(h.bracketR)) : this.type === h.privateId && t.type !== "Super" ? w.property = this.parsePrivateIdent() : w.property = this.parseIdent(this.options.allowReserved !== "never"), w.computed = !!o, v && (w.optional = g), t = this.finishNode(w, "MemberExpression");
|
|
1341
1341
|
} else if (!a && this.eat(h.parenL)) {
|
|
1342
|
-
var
|
|
1342
|
+
var N = new te(), M = this.yieldPos, j = this.awaitPos, B = this.awaitIdentPos;
|
|
1343
1343
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
1344
|
-
var J = this.parseExprList(h.parenR, this.options.ecmaVersion >= 8, !1,
|
|
1344
|
+
var J = this.parseExprList(h.parenR, this.options.ecmaVersion >= 8, !1, N);
|
|
1345
1345
|
if (u && !g && this.shouldParseAsyncArrow())
|
|
1346
|
-
return this.checkPatternErrors(
|
|
1347
|
-
this.checkExpressionErrors(
|
|
1346
|
+
return this.checkPatternErrors(N, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = M, this.awaitPos = j, this.awaitIdentPos = B, this.parseSubscriptAsyncArrow(e, r, J, d);
|
|
1347
|
+
this.checkExpressionErrors(N, !0), this.yieldPos = M || this.yieldPos, this.awaitPos = j || this.awaitPos, this.awaitIdentPos = B || this.awaitIdentPos;
|
|
1348
1348
|
var I = this.startNodeAt(e, r);
|
|
1349
1349
|
I.callee = t, I.arguments = J, v && (I.optional = g), t = this.finishNode(I, "CallExpression");
|
|
1350
1350
|
} else if (this.type === h.backQuote) {
|
|
@@ -1354,7 +1354,7 @@ N.parseSubscript = function(t, e, r, a, u, f, d) {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
return t;
|
|
1356
1356
|
};
|
|
1357
|
-
|
|
1357
|
+
_.parseExprAtom = function(t, e, r) {
|
|
1358
1358
|
this.type === h.slash && this.readRegexp();
|
|
1359
1359
|
var a, u = this.potentialArrowAt === this.start;
|
|
1360
1360
|
switch (this.type) {
|
|
@@ -1384,8 +1384,8 @@ N.parseExprAtom = function(t, e, r) {
|
|
|
1384
1384
|
case h._false:
|
|
1385
1385
|
return a = this.startNode(), a.value = this.type === h._null ? null : this.type === h._true, a.raw = this.type.keyword, this.next(), this.finishNode(a, "Literal");
|
|
1386
1386
|
case h.parenL:
|
|
1387
|
-
var w = this.start,
|
|
1388
|
-
return t && (t.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(
|
|
1387
|
+
var w = this.start, N = this.parseParenAndDistinguishExpression(u, e);
|
|
1388
|
+
return t && (t.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(N) && (t.parenthesizedAssign = w), t.parenthesizedBind < 0 && (t.parenthesizedBind = w)), N;
|
|
1389
1389
|
case h.bracketL:
|
|
1390
1390
|
return a = this.startNode(), this.next(), a.elements = this.parseExprList(h.bracketR, !0, !0, t), this.finishNode(a, "ArrayExpression");
|
|
1391
1391
|
case h.braceL:
|
|
@@ -1404,10 +1404,10 @@ N.parseExprAtom = function(t, e, r) {
|
|
|
1404
1404
|
return this.parseExprAtomDefault();
|
|
1405
1405
|
}
|
|
1406
1406
|
};
|
|
1407
|
-
|
|
1407
|
+
_.parseExprAtomDefault = function() {
|
|
1408
1408
|
this.unexpected();
|
|
1409
1409
|
};
|
|
1410
|
-
|
|
1410
|
+
_.parseExprImport = function(t) {
|
|
1411
1411
|
var e = this.startNode();
|
|
1412
1412
|
if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type === h.parenL && !t)
|
|
1413
1413
|
return this.parseDynamicImport(e);
|
|
@@ -1417,7 +1417,7 @@ N.parseExprImport = function(t) {
|
|
|
1417
1417
|
} else
|
|
1418
1418
|
this.unexpected();
|
|
1419
1419
|
};
|
|
1420
|
-
|
|
1420
|
+
_.parseDynamicImport = function(t) {
|
|
1421
1421
|
if (this.next(), t.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16)
|
|
1422
1422
|
this.eat(h.parenR) ? t.options = null : (this.expect(h.comma), this.afterTrailingComma(h.parenR) ? t.options = null : (t.options = this.parseMaybeAssign(), this.eat(h.parenR) || (this.expect(h.comma), this.afterTrailingComma(h.parenR) || this.unexpected())));
|
|
1423
1423
|
else if (!this.eat(h.parenR)) {
|
|
@@ -1426,44 +1426,44 @@ N.parseDynamicImport = function(t) {
|
|
|
1426
1426
|
}
|
|
1427
1427
|
return this.finishNode(t, "ImportExpression");
|
|
1428
1428
|
};
|
|
1429
|
-
|
|
1429
|
+
_.parseImportMeta = function(t) {
|
|
1430
1430
|
this.next();
|
|
1431
1431
|
var e = this.containsEsc;
|
|
1432
1432
|
return t.property = this.parseIdent(!0), t.property.name !== "meta" && this.raiseRecoverable(t.property.start, "The only valid meta property for import is 'import.meta'"), e && this.raiseRecoverable(t.start, "'import.meta' must not contain escaped characters"), this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere && this.raiseRecoverable(t.start, "Cannot use 'import.meta' outside a module"), this.finishNode(t, "MetaProperty");
|
|
1433
1433
|
};
|
|
1434
|
-
|
|
1434
|
+
_.parseLiteral = function(t) {
|
|
1435
1435
|
var e = this.startNode();
|
|
1436
1436
|
return e.value = t, e.raw = this.input.slice(this.start, this.end), e.raw.charCodeAt(e.raw.length - 1) === 110 && (e.bigint = e.value != null ? e.value.toString() : e.raw.slice(0, -1).replace(/_/g, "")), this.next(), this.finishNode(e, "Literal");
|
|
1437
1437
|
};
|
|
1438
|
-
|
|
1438
|
+
_.parseParenExpression = function() {
|
|
1439
1439
|
this.expect(h.parenL);
|
|
1440
1440
|
var t = this.parseExpression();
|
|
1441
1441
|
return this.expect(h.parenR), t;
|
|
1442
1442
|
};
|
|
1443
|
-
|
|
1443
|
+
_.shouldParseArrow = function(t) {
|
|
1444
1444
|
return !this.canInsertSemicolon();
|
|
1445
1445
|
};
|
|
1446
|
-
|
|
1446
|
+
_.parseParenAndDistinguishExpression = function(t, e) {
|
|
1447
1447
|
var r = this.start, a = this.startLoc, u, f = this.options.ecmaVersion >= 8;
|
|
1448
1448
|
if (this.options.ecmaVersion >= 6) {
|
|
1449
1449
|
this.next();
|
|
1450
|
-
var d = this.start, v = this.startLoc, g = [], o = !0, w = !1,
|
|
1450
|
+
var d = this.start, v = this.startLoc, g = [], o = !0, w = !1, N = new te(), M = this.yieldPos, j = this.awaitPos, B;
|
|
1451
1451
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== h.parenR; )
|
|
1452
1452
|
if (o ? o = !1 : this.expect(h.comma), f && this.afterTrailingComma(h.parenR, !0)) {
|
|
1453
1453
|
w = !0;
|
|
1454
1454
|
break;
|
|
1455
1455
|
} else if (this.type === h.ellipsis) {
|
|
1456
|
-
|
|
1456
|
+
B = this.start, g.push(this.parseParenItem(this.parseRestBinding())), this.type === h.comma && this.raiseRecoverable(
|
|
1457
1457
|
this.start,
|
|
1458
1458
|
"Comma is not permitted after the rest element"
|
|
1459
1459
|
);
|
|
1460
1460
|
break;
|
|
1461
1461
|
} else
|
|
1462
|
-
g.push(this.parseMaybeAssign(!1,
|
|
1462
|
+
g.push(this.parseMaybeAssign(!1, N, this.parseParenItem));
|
|
1463
1463
|
var J = this.lastTokEnd, I = this.lastTokEndLoc;
|
|
1464
1464
|
if (this.expect(h.parenR), t && this.shouldParseArrow(g) && this.eat(h.arrow))
|
|
1465
|
-
return this.checkPatternErrors(
|
|
1466
|
-
(!g.length || w) && this.unexpected(this.lastTokStart),
|
|
1465
|
+
return this.checkPatternErrors(N, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = M, this.awaitPos = j, this.parseParenArrowList(r, a, g, e);
|
|
1466
|
+
(!g.length || w) && this.unexpected(this.lastTokStart), B && this.unexpected(B), this.checkExpressionErrors(N, !0), this.yieldPos = M || this.yieldPos, this.awaitPos = j || this.awaitPos, g.length > 1 ? (u = this.startNodeAt(d, v), u.expressions = g, this.finishNodeAt(u, "SequenceExpression", J, I)) : u = g[0];
|
|
1467
1467
|
} else
|
|
1468
1468
|
u = this.parseParenExpression();
|
|
1469
1469
|
if (this.options.preserveParens) {
|
|
@@ -1472,14 +1472,14 @@ N.parseParenAndDistinguishExpression = function(t, e) {
|
|
|
1472
1472
|
} else
|
|
1473
1473
|
return u;
|
|
1474
1474
|
};
|
|
1475
|
-
|
|
1475
|
+
_.parseParenItem = function(t) {
|
|
1476
1476
|
return t;
|
|
1477
1477
|
};
|
|
1478
|
-
|
|
1478
|
+
_.parseParenArrowList = function(t, e, r, a) {
|
|
1479
1479
|
return this.parseArrowExpression(this.startNodeAt(t, e), r, !1, a);
|
|
1480
1480
|
};
|
|
1481
1481
|
var Ki = [];
|
|
1482
|
-
|
|
1482
|
+
_.parseNew = function() {
|
|
1483
1483
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
1484
1484
|
var t = this.startNode();
|
|
1485
1485
|
if (this.next(), this.options.ecmaVersion >= 6 && this.type === h.dot) {
|
|
@@ -1491,7 +1491,7 @@ N.parseNew = function() {
|
|
|
1491
1491
|
var a = this.start, u = this.startLoc;
|
|
1492
1492
|
return t.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), a, u, !0, !1), this.eat(h.parenL) ? t.arguments = this.parseExprList(h.parenR, this.options.ecmaVersion >= 8, !1) : t.arguments = Ki, this.finishNode(t, "NewExpression");
|
|
1493
1493
|
};
|
|
1494
|
-
|
|
1494
|
+
_.parseTemplateElement = function(t) {
|
|
1495
1495
|
var e = t.isTagged, r = this.startNode();
|
|
1496
1496
|
return this.type === h.invalidTemplate ? (e || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), r.value = {
|
|
1497
1497
|
raw: this.value.replace(/\r\n?/g, `
|
|
@@ -1503,7 +1503,7 @@ N.parseTemplateElement = function(t) {
|
|
|
1503
1503
|
cooked: this.value
|
|
1504
1504
|
}, this.next(), r.tail = this.type === h.backQuote, this.finishNode(r, "TemplateElement");
|
|
1505
1505
|
};
|
|
1506
|
-
|
|
1506
|
+
_.parseTemplate = function(t) {
|
|
1507
1507
|
t === void 0 && (t = {});
|
|
1508
1508
|
var e = t.isTagged;
|
|
1509
1509
|
e === void 0 && (e = !1);
|
|
@@ -1514,10 +1514,10 @@ N.parseTemplate = function(t) {
|
|
|
1514
1514
|
this.type === h.eof && this.raise(this.pos, "Unterminated template literal"), this.expect(h.dollarBraceL), r.expressions.push(this.parseExpression()), this.expect(h.braceR), r.quasis.push(a = this.parseTemplateElement({ isTagged: e }));
|
|
1515
1515
|
return this.next(), this.finishNode(r, "TemplateLiteral");
|
|
1516
1516
|
};
|
|
1517
|
-
|
|
1517
|
+
_.isAsyncProp = function(t) {
|
|
1518
1518
|
return !t.computed && t.key.type === "Identifier" && t.key.name === "async" && (this.type === h.name || this.type === h.num || this.type === h.string || this.type === h.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === h.star) && !Z.test(this.input.slice(this.lastTokEnd, this.start));
|
|
1519
1519
|
};
|
|
1520
|
-
|
|
1520
|
+
_.parseObj = function(t, e) {
|
|
1521
1521
|
var r = this.startNode(), a = !0, u = {};
|
|
1522
1522
|
for (r.properties = [], this.next(); !this.eat(h.braceR); ) {
|
|
1523
1523
|
if (a)
|
|
@@ -1529,7 +1529,7 @@ N.parseObj = function(t, e) {
|
|
|
1529
1529
|
}
|
|
1530
1530
|
return this.finishNode(r, t ? "ObjectPattern" : "ObjectExpression");
|
|
1531
1531
|
};
|
|
1532
|
-
|
|
1532
|
+
_.parseProperty = function(t, e) {
|
|
1533
1533
|
var r = this.startNode(), a, u, f, d;
|
|
1534
1534
|
if (this.options.ecmaVersion >= 9 && this.eat(h.ellipsis))
|
|
1535
1535
|
return t ? (r.argument = this.parseIdent(!1), this.type === h.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.finishNode(r, "RestElement")) : (r.argument = this.parseMaybeAssign(!1, e), this.type === h.comma && e && e.trailingComma < 0 && (e.trailingComma = this.start), this.finishNode(r, "SpreadElement"));
|
|
@@ -1537,7 +1537,7 @@ N.parseProperty = function(t, e) {
|
|
|
1537
1537
|
var v = this.containsEsc;
|
|
1538
1538
|
return this.parsePropertyName(r), !t && !v && this.options.ecmaVersion >= 8 && !a && this.isAsyncProp(r) ? (u = !0, a = this.options.ecmaVersion >= 9 && this.eat(h.star), this.parsePropertyName(r)) : u = !1, this.parsePropertyValue(r, t, a, u, f, d, e, v), this.finishNode(r, "Property");
|
|
1539
1539
|
};
|
|
1540
|
-
|
|
1540
|
+
_.parseGetterSetter = function(t) {
|
|
1541
1541
|
var e = t.key.name;
|
|
1542
1542
|
this.parsePropertyName(t), t.value = this.parseMethod(!1), t.kind = e;
|
|
1543
1543
|
var r = t.kind === "get" ? 0 : 1;
|
|
@@ -1547,10 +1547,10 @@ N.parseGetterSetter = function(t) {
|
|
|
1547
1547
|
} else
|
|
1548
1548
|
t.kind === "set" && t.value.params[0].type === "RestElement" && this.raiseRecoverable(t.value.params[0].start, "Setter cannot use rest params");
|
|
1549
1549
|
};
|
|
1550
|
-
|
|
1550
|
+
_.parsePropertyValue = function(t, e, r, a, u, f, d, v) {
|
|
1551
1551
|
(r || a) && this.type === h.colon && this.unexpected(), this.eat(h.colon) ? (t.value = e ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1, d), t.kind = "init") : this.options.ecmaVersion >= 6 && this.type === h.parenL ? (e && this.unexpected(), t.method = !0, t.value = this.parseMethod(r, a), t.kind = "init") : !e && !v && this.options.ecmaVersion >= 5 && !t.computed && t.key.type === "Identifier" && (t.key.name === "get" || t.key.name === "set") && this.type !== h.comma && this.type !== h.braceR && this.type !== h.eq ? ((r || a) && this.unexpected(), this.parseGetterSetter(t)) : this.options.ecmaVersion >= 6 && !t.computed && t.key.type === "Identifier" ? ((r || a) && this.unexpected(), this.checkUnreserved(t.key), t.key.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = u), e ? t.value = this.parseMaybeDefault(u, f, this.copyNode(t.key)) : this.type === h.eq && d ? (d.shorthandAssign < 0 && (d.shorthandAssign = this.start), t.value = this.parseMaybeDefault(u, f, this.copyNode(t.key))) : t.value = this.copyNode(t.key), t.kind = "init", t.shorthand = !0) : this.unexpected();
|
|
1552
1552
|
};
|
|
1553
|
-
|
|
1553
|
+
_.parsePropertyName = function(t) {
|
|
1554
1554
|
if (this.options.ecmaVersion >= 6) {
|
|
1555
1555
|
if (this.eat(h.bracketL))
|
|
1556
1556
|
return t.computed = !0, t.key = this.parseMaybeAssign(), this.expect(h.bracketR), t.key;
|
|
@@ -1558,18 +1558,18 @@ N.parsePropertyName = function(t) {
|
|
|
1558
1558
|
}
|
|
1559
1559
|
return t.key = this.type === h.num || this.type === h.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
|
|
1560
1560
|
};
|
|
1561
|
-
|
|
1561
|
+
_.initFunction = function(t) {
|
|
1562
1562
|
t.id = null, this.options.ecmaVersion >= 6 && (t.generator = t.expression = !1), this.options.ecmaVersion >= 8 && (t.async = !1);
|
|
1563
1563
|
};
|
|
1564
|
-
|
|
1564
|
+
_.parseMethod = function(t, e, r) {
|
|
1565
1565
|
var a = this.startNode(), u = this.yieldPos, f = this.awaitPos, d = this.awaitIdentPos;
|
|
1566
1566
|
return this.initFunction(a), this.options.ecmaVersion >= 6 && (a.generator = t), this.options.ecmaVersion >= 8 && (a.async = !!e), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(be(e, a.generator) | Yt | (r ? Je : 0)), this.expect(h.parenL), a.params = this.parseBindingList(h.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(a, !1, !0, !1), this.yieldPos = u, this.awaitPos = f, this.awaitIdentPos = d, this.finishNode(a, "FunctionExpression");
|
|
1567
1567
|
};
|
|
1568
|
-
|
|
1568
|
+
_.parseArrowExpression = function(t, e, r, a) {
|
|
1569
1569
|
var u = this.yieldPos, f = this.awaitPos, d = this.awaitIdentPos;
|
|
1570
1570
|
return this.enterScope(be(r, !1) | ge), this.initFunction(t), this.options.ecmaVersion >= 8 && (t.async = !!r), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, t.params = this.toAssignableList(e, !0), this.parseFunctionBody(t, !0, !1, a), this.yieldPos = u, this.awaitPos = f, this.awaitIdentPos = d, this.finishNode(t, "ArrowFunctionExpression");
|
|
1571
1571
|
};
|
|
1572
|
-
|
|
1572
|
+
_.parseFunctionBody = function(t, e, r, a) {
|
|
1573
1573
|
var u = e && this.type !== h.braceL, f = this.strict, d = !1;
|
|
1574
1574
|
if (u)
|
|
1575
1575
|
t.body = this.parseMaybeAssign(a), t.expression = !0, this.checkParams(t, !1);
|
|
@@ -1581,7 +1581,7 @@ N.parseFunctionBody = function(t, e, r, a) {
|
|
|
1581
1581
|
}
|
|
1582
1582
|
this.exitScope();
|
|
1583
1583
|
};
|
|
1584
|
-
|
|
1584
|
+
_.isSimpleParamList = function(t) {
|
|
1585
1585
|
for (var e = 0, r = t; e < r.length; e += 1) {
|
|
1586
1586
|
var a = r[e];
|
|
1587
1587
|
if (a.type !== "Identifier")
|
|
@@ -1589,13 +1589,13 @@ N.isSimpleParamList = function(t) {
|
|
|
1589
1589
|
}
|
|
1590
1590
|
return !0;
|
|
1591
1591
|
};
|
|
1592
|
-
|
|
1592
|
+
_.checkParams = function(t, e) {
|
|
1593
1593
|
for (var r = /* @__PURE__ */ Object.create(null), a = 0, u = t.params; a < u.length; a += 1) {
|
|
1594
1594
|
var f = u[a];
|
|
1595
1595
|
this.checkLValInnerPattern(f, Se, e ? null : r);
|
|
1596
1596
|
}
|
|
1597
1597
|
};
|
|
1598
|
-
|
|
1598
|
+
_.parseExprList = function(t, e, r, a) {
|
|
1599
1599
|
for (var u = [], f = !0; !this.eat(t); ) {
|
|
1600
1600
|
if (f)
|
|
1601
1601
|
f = !1;
|
|
@@ -1606,31 +1606,31 @@ N.parseExprList = function(t, e, r, a) {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
return u;
|
|
1608
1608
|
};
|
|
1609
|
-
|
|
1609
|
+
_.checkUnreserved = function(t) {
|
|
1610
1610
|
var e = t.start, r = t.end, a = t.name;
|
|
1611
1611
|
if (this.inGenerator && a === "yield" && this.raiseRecoverable(e, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && a === "await" && this.raiseRecoverable(e, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags & Zt) && a === "arguments" && this.raiseRecoverable(e, "Cannot use 'arguments' in class field initializer"), this.inClassStaticBlock && (a === "arguments" || a === "await") && this.raise(e, "Cannot use " + a + " in class static initialization block"), this.keywords.test(a) && this.raise(e, "Unexpected keyword '" + a + "'"), !(this.options.ecmaVersion < 6 && this.input.slice(e, r).indexOf("\\") !== -1)) {
|
|
1612
1612
|
var u = this.strict ? this.reservedWordsStrict : this.reservedWords;
|
|
1613
1613
|
u.test(a) && (!this.inAsync && a === "await" && this.raiseRecoverable(e, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(e, "The keyword '" + a + "' is reserved"));
|
|
1614
1614
|
}
|
|
1615
1615
|
};
|
|
1616
|
-
|
|
1616
|
+
_.parseIdent = function(t) {
|
|
1617
1617
|
var e = this.parseIdentNode();
|
|
1618
1618
|
return this.next(!!t), this.finishNode(e, "Identifier"), t || (this.checkUnreserved(e), e.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = e.start)), e;
|
|
1619
1619
|
};
|
|
1620
|
-
|
|
1620
|
+
_.parseIdentNode = function() {
|
|
1621
1621
|
var t = this.startNode();
|
|
1622
1622
|
return this.type === h.name ? t.name = this.value : this.type.keyword ? (t.name = this.type.keyword, (t.name === "class" || t.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46) && this.context.pop(), this.type = h.name) : this.unexpected(), t;
|
|
1623
1623
|
};
|
|
1624
|
-
|
|
1624
|
+
_.parsePrivateIdent = function() {
|
|
1625
1625
|
var t = this.startNode();
|
|
1626
1626
|
return this.type === h.privateId ? t.name = this.value : this.unexpected(), this.next(), this.finishNode(t, "PrivateIdentifier"), this.options.checkPrivateFields && (this.privateNameStack.length === 0 ? this.raise(t.start, "Private field '#" + t.name + "' must be declared in an enclosing class") : this.privateNameStack[this.privateNameStack.length - 1].used.push(t)), t;
|
|
1627
1627
|
};
|
|
1628
|
-
|
|
1628
|
+
_.parseYield = function(t) {
|
|
1629
1629
|
this.yieldPos || (this.yieldPos = this.start);
|
|
1630
1630
|
var e = this.startNode();
|
|
1631
1631
|
return this.next(), this.type === h.semi || this.canInsertSemicolon() || this.type !== h.star && !this.type.startsExpr ? (e.delegate = !1, e.argument = null) : (e.delegate = this.eat(h.star), e.argument = this.parseMaybeAssign(t)), this.finishNode(e, "YieldExpression");
|
|
1632
1632
|
};
|
|
1633
|
-
|
|
1633
|
+
_.parseAwait = function(t) {
|
|
1634
1634
|
this.awaitPos || (this.awaitPos = this.start);
|
|
1635
1635
|
var e = this.startNode();
|
|
1636
1636
|
return this.next(), e.argument = this.parseMaybeUnary(null, !0, !1, t), this.finishNode(e, "AwaitExpression");
|
|
@@ -1740,7 +1740,7 @@ var Gi = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai
|
|
|
1740
1740
|
12: "",
|
|
1741
1741
|
13: "",
|
|
1742
1742
|
14: Qi
|
|
1743
|
-
},
|
|
1743
|
+
}, Ne = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", ai = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", ni = ai + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", oi = ni + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", hi = oi + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", ui = hi + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", Zi = ui + " " + Gi, ts = {
|
|
1744
1744
|
9: ai,
|
|
1745
1745
|
10: ni,
|
|
1746
1746
|
11: oi,
|
|
@@ -1750,10 +1750,10 @@ var Gi = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai
|
|
|
1750
1750
|
}, ci = {};
|
|
1751
1751
|
function es(t) {
|
|
1752
1752
|
var e = ci[t] = {
|
|
1753
|
-
binary: bt(Xi[t] + " " +
|
|
1753
|
+
binary: bt(Xi[t] + " " + Ne),
|
|
1754
1754
|
binaryOfStrings: bt(Yi[t]),
|
|
1755
1755
|
nonBinary: {
|
|
1756
|
-
General_Category: bt(
|
|
1756
|
+
General_Category: bt(Ne),
|
|
1757
1757
|
Script: bt(ts[t])
|
|
1758
1758
|
}
|
|
1759
1759
|
};
|
|
@@ -2595,14 +2595,14 @@ P.regexp_eatFixedHexDigits = function(t, e) {
|
|
|
2595
2595
|
};
|
|
2596
2596
|
var ie = function(e) {
|
|
2597
2597
|
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new Ft(e, e.startLoc, e.endLoc)), e.options.ranges && (this.range = [e.start, e.end]);
|
|
2598
|
-
},
|
|
2599
|
-
|
|
2598
|
+
}, D = K.prototype;
|
|
2599
|
+
D.next = function(t) {
|
|
2600
2600
|
!t && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new ie(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
2601
2601
|
};
|
|
2602
|
-
|
|
2602
|
+
D.getToken = function() {
|
|
2603
2603
|
return this.next(), new ie(this);
|
|
2604
2604
|
};
|
|
2605
|
-
typeof Symbol < "u" && (
|
|
2605
|
+
typeof Symbol < "u" && (D[Symbol.iterator] = function() {
|
|
2606
2606
|
var t = this;
|
|
2607
2607
|
return {
|
|
2608
2608
|
next: function() {
|
|
@@ -2614,7 +2614,7 @@ typeof Symbol < "u" && (V[Symbol.iterator] = function() {
|
|
|
2614
2614
|
}
|
|
2615
2615
|
};
|
|
2616
2616
|
});
|
|
2617
|
-
|
|
2617
|
+
D.nextToken = function() {
|
|
2618
2618
|
var t = this.curContext();
|
|
2619
2619
|
if ((!t || !t.preserveSpace) && this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length)
|
|
2620
2620
|
return this.finishToken(h.eof);
|
|
@@ -2622,17 +2622,17 @@ V.nextToken = function() {
|
|
|
2622
2622
|
return t.override(this);
|
|
2623
2623
|
this.readToken(this.fullCharCodeAtPos());
|
|
2624
2624
|
};
|
|
2625
|
-
|
|
2625
|
+
D.readToken = function(t) {
|
|
2626
2626
|
return pt(t, this.options.ecmaVersion >= 6) || t === 92 ? this.readWord() : this.getTokenFromCode(t);
|
|
2627
2627
|
};
|
|
2628
|
-
|
|
2628
|
+
D.fullCharCodeAtPos = function() {
|
|
2629
2629
|
var t = this.input.charCodeAt(this.pos);
|
|
2630
2630
|
if (t <= 55295 || t >= 56320)
|
|
2631
2631
|
return t;
|
|
2632
2632
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2633
2633
|
return e <= 56319 || e >= 57344 ? t : (t << 10) + e - 56613888;
|
|
2634
2634
|
};
|
|
2635
|
-
|
|
2635
|
+
D.skipBlockComment = function() {
|
|
2636
2636
|
var t = this.options.onComment && this.curPosition(), e = this.pos, r = this.input.indexOf("*/", this.pos += 2);
|
|
2637
2637
|
if (r === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = r + 2, this.options.locations)
|
|
2638
2638
|
for (var a = void 0, u = e; (a = He(this.input, u, this.pos)) > -1; )
|
|
@@ -2646,7 +2646,7 @@ V.skipBlockComment = function() {
|
|
|
2646
2646
|
this.curPosition()
|
|
2647
2647
|
);
|
|
2648
2648
|
};
|
|
2649
|
-
|
|
2649
|
+
D.skipLineComment = function(t) {
|
|
2650
2650
|
for (var e = this.pos, r = this.options.onComment && this.curPosition(), a = this.input.charCodeAt(this.pos += t); this.pos < this.input.length && !Tt(a); )
|
|
2651
2651
|
a = this.input.charCodeAt(++this.pos);
|
|
2652
2652
|
this.options.onComment && this.options.onComment(
|
|
@@ -2658,7 +2658,7 @@ V.skipLineComment = function(t) {
|
|
|
2658
2658
|
this.curPosition()
|
|
2659
2659
|
);
|
|
2660
2660
|
};
|
|
2661
|
-
|
|
2661
|
+
D.skipSpace = function() {
|
|
2662
2662
|
t: for (; this.pos < this.input.length; ) {
|
|
2663
2663
|
var t = this.input.charCodeAt(this.pos);
|
|
2664
2664
|
switch (t) {
|
|
@@ -2693,27 +2693,27 @@ V.skipSpace = function() {
|
|
|
2693
2693
|
}
|
|
2694
2694
|
}
|
|
2695
2695
|
};
|
|
2696
|
-
|
|
2696
|
+
D.finishToken = function(t, e) {
|
|
2697
2697
|
this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
|
|
2698
2698
|
var r = this.type;
|
|
2699
2699
|
this.type = t, this.value = e, this.updateContext(r);
|
|
2700
2700
|
};
|
|
2701
|
-
|
|
2701
|
+
D.readToken_dot = function() {
|
|
2702
2702
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
2703
2703
|
if (t >= 48 && t <= 57)
|
|
2704
2704
|
return this.readNumber(!0);
|
|
2705
2705
|
var e = this.input.charCodeAt(this.pos + 2);
|
|
2706
2706
|
return this.options.ecmaVersion >= 6 && t === 46 && e === 46 ? (this.pos += 3, this.finishToken(h.ellipsis)) : (++this.pos, this.finishToken(h.dot));
|
|
2707
2707
|
};
|
|
2708
|
-
|
|
2708
|
+
D.readToken_slash = function() {
|
|
2709
2709
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
2710
2710
|
return this.exprAllowed ? (++this.pos, this.readRegexp()) : t === 61 ? this.finishOp(h.assign, 2) : this.finishOp(h.slash, 1);
|
|
2711
2711
|
};
|
|
2712
|
-
|
|
2712
|
+
D.readToken_mult_modulo_exp = function(t) {
|
|
2713
2713
|
var e = this.input.charCodeAt(this.pos + 1), r = 1, a = t === 42 ? h.star : h.modulo;
|
|
2714
2714
|
return this.options.ecmaVersion >= 7 && t === 42 && e === 42 && (++r, a = h.starstar, e = this.input.charCodeAt(this.pos + 2)), e === 61 ? this.finishOp(h.assign, r + 1) : this.finishOp(a, r);
|
|
2715
2715
|
};
|
|
2716
|
-
|
|
2716
|
+
D.readToken_pipe_amp = function(t) {
|
|
2717
2717
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2718
2718
|
if (e === t) {
|
|
2719
2719
|
if (this.options.ecmaVersion >= 12) {
|
|
@@ -2725,23 +2725,23 @@ V.readToken_pipe_amp = function(t) {
|
|
|
2725
2725
|
}
|
|
2726
2726
|
return e === 61 ? this.finishOp(h.assign, 2) : this.finishOp(t === 124 ? h.bitwiseOR : h.bitwiseAND, 1);
|
|
2727
2727
|
};
|
|
2728
|
-
|
|
2728
|
+
D.readToken_caret = function() {
|
|
2729
2729
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
2730
2730
|
return t === 61 ? this.finishOp(h.assign, 2) : this.finishOp(h.bitwiseXOR, 1);
|
|
2731
2731
|
};
|
|
2732
|
-
|
|
2732
|
+
D.readToken_plus_min = function(t) {
|
|
2733
2733
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2734
2734
|
return e === t ? e === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || Z.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(h.incDec, 2) : e === 61 ? this.finishOp(h.assign, 2) : this.finishOp(h.plusMin, 1);
|
|
2735
2735
|
};
|
|
2736
|
-
|
|
2736
|
+
D.readToken_lt_gt = function(t) {
|
|
2737
2737
|
var e = this.input.charCodeAt(this.pos + 1), r = 1;
|
|
2738
2738
|
return e === t ? (r = t === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2, this.input.charCodeAt(this.pos + r) === 61 ? this.finishOp(h.assign, r + 1) : this.finishOp(h.bitShift, r)) : e === 33 && t === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45 ? (this.skipLineComment(4), this.skipSpace(), this.nextToken()) : (e === 61 && (r = 2), this.finishOp(h.relational, r));
|
|
2739
2739
|
};
|
|
2740
|
-
|
|
2740
|
+
D.readToken_eq_excl = function(t) {
|
|
2741
2741
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2742
2742
|
return e === 61 ? this.finishOp(h.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) : t === 61 && e === 62 && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(h.arrow)) : this.finishOp(t === 61 ? h.eq : h.prefix, 1);
|
|
2743
2743
|
};
|
|
2744
|
-
|
|
2744
|
+
D.readToken_question = function() {
|
|
2745
2745
|
var t = this.options.ecmaVersion;
|
|
2746
2746
|
if (t >= 11) {
|
|
2747
2747
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
@@ -2761,13 +2761,13 @@ V.readToken_question = function() {
|
|
|
2761
2761
|
}
|
|
2762
2762
|
return this.finishOp(h.question, 1);
|
|
2763
2763
|
};
|
|
2764
|
-
|
|
2764
|
+
D.readToken_numberSign = function() {
|
|
2765
2765
|
var t = this.options.ecmaVersion, e = 35;
|
|
2766
2766
|
if (t >= 13 && (++this.pos, e = this.fullCharCodeAtPos(), pt(e, !0) || e === 92))
|
|
2767
2767
|
return this.finishToken(h.privateId, this.readWord1());
|
|
2768
2768
|
this.raise(this.pos, "Unexpected character '" + mt(e) + "'");
|
|
2769
2769
|
};
|
|
2770
|
-
|
|
2770
|
+
D.getTokenFromCode = function(t) {
|
|
2771
2771
|
switch (t) {
|
|
2772
2772
|
// The interpretation of a dot depends on whether it is followed
|
|
2773
2773
|
// by a digit or another two dots.
|
|
@@ -2854,11 +2854,11 @@ V.getTokenFromCode = function(t) {
|
|
|
2854
2854
|
}
|
|
2855
2855
|
this.raise(this.pos, "Unexpected character '" + mt(t) + "'");
|
|
2856
2856
|
};
|
|
2857
|
-
|
|
2857
|
+
D.finishOp = function(t, e) {
|
|
2858
2858
|
var r = this.input.slice(this.pos, this.pos + e);
|
|
2859
2859
|
return this.pos += e, this.finishToken(t, r);
|
|
2860
2860
|
};
|
|
2861
|
-
|
|
2861
|
+
D.readRegexp = function() {
|
|
2862
2862
|
for (var t, e, r = this.pos; ; ) {
|
|
2863
2863
|
this.pos >= this.input.length && this.raise(r, "Unterminated regular expression");
|
|
2864
2864
|
var a = this.input.charAt(this.pos);
|
|
@@ -2888,16 +2888,16 @@ V.readRegexp = function() {
|
|
|
2888
2888
|
}
|
|
2889
2889
|
return this.finishToken(h.regexp, { pattern: u, flags: d, value: g });
|
|
2890
2890
|
};
|
|
2891
|
-
|
|
2891
|
+
D.readInt = function(t, e, r) {
|
|
2892
2892
|
for (var a = this.options.ecmaVersion >= 12 && e === void 0, u = r && this.input.charCodeAt(this.pos) === 48, f = this.pos, d = 0, v = 0, g = 0, o = e ?? 1 / 0; g < o; ++g, ++this.pos) {
|
|
2893
|
-
var w = this.input.charCodeAt(this.pos),
|
|
2893
|
+
var w = this.input.charCodeAt(this.pos), N = void 0;
|
|
2894
2894
|
if (a && w === 95) {
|
|
2895
2895
|
u && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), v === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), g === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), v = w;
|
|
2896
2896
|
continue;
|
|
2897
2897
|
}
|
|
2898
|
-
if (w >= 97 ?
|
|
2898
|
+
if (w >= 97 ? N = w - 97 + 10 : w >= 65 ? N = w - 65 + 10 : w >= 48 && w <= 57 ? N = w - 48 : N = 1 / 0, N >= t)
|
|
2899
2899
|
break;
|
|
2900
|
-
v = w, d = d * t +
|
|
2900
|
+
v = w, d = d * t + N;
|
|
2901
2901
|
}
|
|
2902
2902
|
return a && v === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === f || e != null && this.pos - f !== e ? null : d;
|
|
2903
2903
|
};
|
|
@@ -2907,13 +2907,13 @@ function fs(t, e) {
|
|
|
2907
2907
|
function vi(t) {
|
|
2908
2908
|
return typeof BigInt != "function" ? null : BigInt(t.replace(/_/g, ""));
|
|
2909
2909
|
}
|
|
2910
|
-
|
|
2910
|
+
D.readRadixNumber = function(t) {
|
|
2911
2911
|
var e = this.pos;
|
|
2912
2912
|
this.pos += 2;
|
|
2913
2913
|
var r = this.readInt(t);
|
|
2914
2914
|
return r == null && this.raise(this.start + 2, "Expected number in radix " + t), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (r = vi(this.input.slice(e, this.pos)), ++this.pos) : pt(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(h.num, r);
|
|
2915
2915
|
};
|
|
2916
|
-
|
|
2916
|
+
D.readNumber = function(t) {
|
|
2917
2917
|
var e = this.pos;
|
|
2918
2918
|
!t && this.readInt(10, void 0, !0) === null && this.raise(e, "Invalid number");
|
|
2919
2919
|
var r = this.pos - e >= 2 && this.input.charCodeAt(e) === 48;
|
|
@@ -2927,7 +2927,7 @@ V.readNumber = function(t) {
|
|
|
2927
2927
|
var f = fs(this.input.slice(e, this.pos), r);
|
|
2928
2928
|
return this.finishToken(h.num, f);
|
|
2929
2929
|
};
|
|
2930
|
-
|
|
2930
|
+
D.readCodePoint = function() {
|
|
2931
2931
|
var t = this.input.charCodeAt(this.pos), e;
|
|
2932
2932
|
if (t === 123) {
|
|
2933
2933
|
this.options.ecmaVersion < 6 && this.unexpected();
|
|
@@ -2937,7 +2937,7 @@ V.readCodePoint = function() {
|
|
|
2937
2937
|
e = this.readHexChar(4);
|
|
2938
2938
|
return e;
|
|
2939
2939
|
};
|
|
2940
|
-
|
|
2940
|
+
D.readString = function(t) {
|
|
2941
2941
|
for (var e = "", r = ++this.pos; ; ) {
|
|
2942
2942
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
|
|
2943
2943
|
var a = this.input.charCodeAt(this.pos);
|
|
@@ -2948,7 +2948,7 @@ V.readString = function(t) {
|
|
|
2948
2948
|
return e += this.input.slice(r, this.pos++), this.finishToken(h.string, e);
|
|
2949
2949
|
};
|
|
2950
2950
|
var gi = {};
|
|
2951
|
-
|
|
2951
|
+
D.tryReadTemplateToken = function() {
|
|
2952
2952
|
this.inTemplateElement = !0;
|
|
2953
2953
|
try {
|
|
2954
2954
|
this.readTmplToken();
|
|
@@ -2960,12 +2960,12 @@ V.tryReadTemplateToken = function() {
|
|
|
2960
2960
|
}
|
|
2961
2961
|
this.inTemplateElement = !1;
|
|
2962
2962
|
};
|
|
2963
|
-
|
|
2963
|
+
D.invalidStringToken = function(t, e) {
|
|
2964
2964
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9)
|
|
2965
2965
|
throw gi;
|
|
2966
2966
|
this.raise(t, e);
|
|
2967
2967
|
};
|
|
2968
|
-
|
|
2968
|
+
D.readTmplToken = function() {
|
|
2969
2969
|
for (var t = "", e = this.pos; ; ) {
|
|
2970
2970
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
|
|
2971
2971
|
var r = this.input.charCodeAt(this.pos);
|
|
@@ -2990,7 +2990,7 @@ V.readTmplToken = function() {
|
|
|
2990
2990
|
++this.pos;
|
|
2991
2991
|
}
|
|
2992
2992
|
};
|
|
2993
|
-
|
|
2993
|
+
D.readInvalidTemplateToken = function() {
|
|
2994
2994
|
for (; this.pos < this.input.length; this.pos++)
|
|
2995
2995
|
switch (this.input[this.pos]) {
|
|
2996
2996
|
case "\\":
|
|
@@ -3015,7 +3015,7 @@ V.readInvalidTemplateToken = function() {
|
|
|
3015
3015
|
}
|
|
3016
3016
|
this.raise(this.start, "Unterminated template");
|
|
3017
3017
|
};
|
|
3018
|
-
|
|
3018
|
+
D.readEscapedChar = function(t) {
|
|
3019
3019
|
var e = this.input.charCodeAt(++this.pos);
|
|
3020
3020
|
switch (++this.pos, e) {
|
|
3021
3021
|
case 110:
|
|
@@ -3071,11 +3071,11 @@ V.readEscapedChar = function(t) {
|
|
|
3071
3071
|
return Tt(e) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(e);
|
|
3072
3072
|
}
|
|
3073
3073
|
};
|
|
3074
|
-
|
|
3074
|
+
D.readHexChar = function(t) {
|
|
3075
3075
|
var e = this.pos, r = this.readInt(16, t);
|
|
3076
3076
|
return r === null && this.invalidStringToken(e, "Bad character escape sequence"), r;
|
|
3077
3077
|
};
|
|
3078
|
-
|
|
3078
|
+
D.readWord1 = function() {
|
|
3079
3079
|
this.containsEsc = !1;
|
|
3080
3080
|
for (var t = "", e = !0, r = this.pos, a = this.options.ecmaVersion >= 6; this.pos < this.input.length; ) {
|
|
3081
3081
|
var u = this.fullCharCodeAtPos();
|
|
@@ -3093,7 +3093,7 @@ V.readWord1 = function() {
|
|
|
3093
3093
|
}
|
|
3094
3094
|
return t + this.input.slice(r, this.pos);
|
|
3095
3095
|
};
|
|
3096
|
-
|
|
3096
|
+
D.readWord = function() {
|
|
3097
3097
|
var t = this.readWord1(), e = h.name;
|
|
3098
3098
|
return this.keywords.test(t) && (e = kt[t]), this.finishToken(e, t);
|
|
3099
3099
|
};
|
|
@@ -3319,17 +3319,17 @@ function Be(t) {
|
|
|
3319
3319
|
function Es(t) {
|
|
3320
3320
|
var e = {}, r = e.dts, a = r !== void 0 && r, u = e.allowSatisfies, f = u !== void 0 && u;
|
|
3321
3321
|
return function(d) {
|
|
3322
|
-
var v = d.acorn || xs, g = gs(v), o = v.tokTypes, w = v.keywordTypes,
|
|
3322
|
+
var v = d.acorn || xs, g = gs(v), o = v.tokTypes, w = v.keywordTypes, N = v.isIdentifierStart, M = v.lineBreak, j = v.isNewLine, B = v.tokContexts, J = v.isIdentifierChar, I = g.tokTypes, et = g.tokContexts, se = g.keywordsRegExp, Ti = g.tokenIsLiteralPropertyName, Pi = g.tokenIsTemplate, Ci = g.tokenIsTSDeclarationStart, U = g.tokenIsIdentifier, qt = g.tokenIsKeywordOrIdentifier, ki = g.tokenIsTSTypeOperator;
|
|
3323
3323
|
function Ai(T, it, Q) {
|
|
3324
3324
|
Q === void 0 && (Q = T.length);
|
|
3325
3325
|
for (var G = it; G < Q; G++) {
|
|
3326
|
-
var
|
|
3327
|
-
if (j(
|
|
3326
|
+
var F = T.charCodeAt(G);
|
|
3327
|
+
if (j(F)) return G < Q - 1 && F === 13 && T.charCodeAt(G + 1) === 10 ? G + 2 : G + 1;
|
|
3328
3328
|
}
|
|
3329
3329
|
return -1;
|
|
3330
3330
|
}
|
|
3331
3331
|
d = (function(T, it, Q) {
|
|
3332
|
-
var G = Q.tokTypes,
|
|
3332
|
+
var G = Q.tokTypes, F = it.tokTypes;
|
|
3333
3333
|
return (function(p) {
|
|
3334
3334
|
function i() {
|
|
3335
3335
|
return p.apply(this, arguments) || this;
|
|
@@ -3340,7 +3340,7 @@ function Es(t) {
|
|
|
3340
3340
|
var c = this.decoratorStack[this.decoratorStack.length - 1];
|
|
3341
3341
|
c.length && (n.decorators = c, this.resetStartLocationFromNode(n, c[0]), this.decoratorStack[this.decoratorStack.length - 1] = []);
|
|
3342
3342
|
}, s.parseDecorators = function(n) {
|
|
3343
|
-
for (var c = this.decoratorStack[this.decoratorStack.length - 1]; this.match(
|
|
3343
|
+
for (var c = this.decoratorStack[this.decoratorStack.length - 1]; this.match(F.at); ) {
|
|
3344
3344
|
var l = this.parseDecorator();
|
|
3345
3345
|
c.push(l);
|
|
3346
3346
|
}
|
|
@@ -3369,7 +3369,7 @@ function Es(t) {
|
|
|
3369
3369
|
}, i;
|
|
3370
3370
|
})(T);
|
|
3371
3371
|
})(d, g, v), d = (function(T, it, Q, G) {
|
|
3372
|
-
var
|
|
3372
|
+
var F = T.tokTypes, p = it.tokTypes, i = T.isNewLine, s = T.isIdentifierChar, n = Object.assign({ allowNamespaces: !0, allowNamespacedObjects: !0 }, {});
|
|
3373
3373
|
return (function(c) {
|
|
3374
3374
|
function l() {
|
|
3375
3375
|
return c.apply(this, arguments) || this;
|
|
@@ -3406,7 +3406,7 @@ function Es(t) {
|
|
|
3406
3406
|
if (S === y) break;
|
|
3407
3407
|
S === 38 ? (x += this.input.slice(b, this.pos), x += this.jsx_readEntity(), b = this.pos) : i(S) ? (x += this.input.slice(b, this.pos), x += this.jsx_readNewLine(!1), b = this.pos) : ++this.pos;
|
|
3408
3408
|
}
|
|
3409
|
-
return x += this.input.slice(b, this.pos++), this.finishToken(
|
|
3409
|
+
return x += this.input.slice(b, this.pos++), this.finishToken(F.string, x);
|
|
3410
3410
|
}, m.jsx_readEntity = function() {
|
|
3411
3411
|
var y, x = "", b = 0, S = this.input[this.pos];
|
|
3412
3412
|
S !== "&" && this.raise(this.pos, "Entity must start with an ampersand");
|
|
@@ -3429,24 +3429,24 @@ function Es(t) {
|
|
|
3429
3429
|
return this.type === p.jsxName ? y.name = this.value : this.type.keyword ? y.name = this.type.keyword : this.unexpected(), this.next(), this.finishNode(y, "JSXIdentifier");
|
|
3430
3430
|
}, m.jsx_parseNamespacedName = function() {
|
|
3431
3431
|
var y = this.start, x = this.startLoc, b = this.jsx_parseIdentifier();
|
|
3432
|
-
if (!n.allowNamespaces || !this.eat(
|
|
3432
|
+
if (!n.allowNamespaces || !this.eat(F.colon)) return b;
|
|
3433
3433
|
var S = this.startNodeAt(y, x);
|
|
3434
3434
|
return S.namespace = b, S.name = this.jsx_parseIdentifier(), this.finishNode(S, "JSXNamespacedName");
|
|
3435
3435
|
}, m.jsx_parseElementName = function() {
|
|
3436
3436
|
if (this.type === p.jsxTagEnd) return "";
|
|
3437
3437
|
var y = this.start, x = this.startLoc, b = this.jsx_parseNamespacedName();
|
|
3438
|
-
for (this.type !==
|
|
3438
|
+
for (this.type !== F.dot || b.type !== "JSXNamespacedName" || n.allowNamespacedObjects || this.unexpected(); this.eat(F.dot); ) {
|
|
3439
3439
|
var S = this.startNodeAt(y, x);
|
|
3440
3440
|
S.object = b, S.property = this.jsx_parseIdentifier(), b = this.finishNode(S, "JSXMemberExpression");
|
|
3441
3441
|
}
|
|
3442
3442
|
return b;
|
|
3443
3443
|
}, m.jsx_parseAttributeValue = function() {
|
|
3444
3444
|
switch (this.type) {
|
|
3445
|
-
case
|
|
3445
|
+
case F.braceL:
|
|
3446
3446
|
var y = this.jsx_parseExpressionContainer();
|
|
3447
3447
|
return y.expression.type === "JSXEmptyExpression" && this.raise(y.start, "JSX attributes must only be assigned a non-empty expression"), y;
|
|
3448
3448
|
case p.jsxTagStart:
|
|
3449
|
-
case
|
|
3449
|
+
case F.string:
|
|
3450
3450
|
return this.parseExprAtom();
|
|
3451
3451
|
default:
|
|
3452
3452
|
this.raise(this.start, "JSX value should be either an expression or a quoted JSX text");
|
|
@@ -3456,16 +3456,16 @@ function Es(t) {
|
|
|
3456
3456
|
return this.finishNodeAt(y, "JSXEmptyExpression", this.start, this.startLoc);
|
|
3457
3457
|
}, m.jsx_parseExpressionContainer = function() {
|
|
3458
3458
|
var y = this.startNode();
|
|
3459
|
-
return this.next(), y.expression = this.type ===
|
|
3459
|
+
return this.next(), y.expression = this.type === F.braceR ? this.jsx_parseEmptyExpression() : this.parseExpression(), this.expect(F.braceR), this.finishNode(y, "JSXExpressionContainer");
|
|
3460
3460
|
}, m.jsx_parseAttribute = function() {
|
|
3461
3461
|
var y = this.startNode();
|
|
3462
|
-
return this.eat(
|
|
3462
|
+
return this.eat(F.braceL) ? (this.expect(F.ellipsis), y.argument = this.parseMaybeAssign(), this.expect(F.braceR), this.finishNode(y, "JSXSpreadAttribute")) : (y.name = this.jsx_parseNamespacedName(), y.value = this.eat(F.eq) ? this.jsx_parseAttributeValue() : null, this.finishNode(y, "JSXAttribute"));
|
|
3463
3463
|
}, m.jsx_parseOpeningElementAt = function(y, x) {
|
|
3464
3464
|
var b = this.startNodeAt(y, x);
|
|
3465
3465
|
b.attributes = [];
|
|
3466
3466
|
var S = this.jsx_parseElementName();
|
|
3467
|
-
for (S && (b.name = S); this.type !==
|
|
3468
|
-
return b.selfClosing = this.eat(
|
|
3467
|
+
for (S && (b.name = S); this.type !== F.slash && this.type !== p.jsxTagEnd; ) b.attributes.push(this.jsx_parseAttribute());
|
|
3468
|
+
return b.selfClosing = this.eat(F.slash), this.expect(p.jsxTagEnd), this.finishNode(b, S ? "JSXOpeningElement" : "JSXOpeningFragment");
|
|
3469
3469
|
}, m.jsx_parseClosingElementAt = function(y, x) {
|
|
3470
3470
|
var b = this.startNodeAt(y, x), S = this.jsx_parseElementName();
|
|
3471
3471
|
return S && (b.name = S), this.expect(p.jsxTagEnd), this.finishNode(b, S ? "JSXClosingElement" : "JSXClosingFragment");
|
|
@@ -3474,7 +3474,7 @@ function Es(t) {
|
|
|
3474
3474
|
if (!E.selfClosing) {
|
|
3475
3475
|
t: for (; ; ) switch (this.type) {
|
|
3476
3476
|
case p.jsxTagStart:
|
|
3477
|
-
if (y = this.start, x = this.startLoc, this.next(), this.eat(
|
|
3477
|
+
if (y = this.start, x = this.startLoc, this.next(), this.eat(F.slash)) {
|
|
3478
3478
|
L = this.jsx_parseClosingElementAt(y, x);
|
|
3479
3479
|
break t;
|
|
3480
3480
|
}
|
|
@@ -3483,7 +3483,7 @@ function Es(t) {
|
|
|
3483
3483
|
case p.jsxText:
|
|
3484
3484
|
S.push(this.parseExprAtom());
|
|
3485
3485
|
break;
|
|
3486
|
-
case
|
|
3486
|
+
case F.braceL:
|
|
3487
3487
|
S.push(this.jsx_parseExpressionContainer());
|
|
3488
3488
|
break;
|
|
3489
3489
|
default:
|
|
@@ -3492,7 +3492,7 @@ function Es(t) {
|
|
|
3492
3492
|
Mt(L.name) !== Mt(E.name) && this.raise(L.start, "Expected corresponding JSX closing tag for <" + Mt(E.name) + ">");
|
|
3493
3493
|
}
|
|
3494
3494
|
var C = E.name ? "Element" : "Fragment";
|
|
3495
|
-
return b["opening" + C] = E, b["closing" + C] = L, b.children = S, this.type ===
|
|
3495
|
+
return b["opening" + C] = E, b["closing" + C] = L, b.children = S, this.type === F.relational && this.value === "<" && this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"), this.finishNode(b, "JSX" + C);
|
|
3496
3496
|
}, m.jsx_parseText = function() {
|
|
3497
3497
|
var y = this.parseLiteral(this.value);
|
|
3498
3498
|
return y.type = "JSXText", y;
|
|
@@ -3502,7 +3502,7 @@ function Es(t) {
|
|
|
3502
3502
|
}, l;
|
|
3503
3503
|
})(Q);
|
|
3504
3504
|
})(v, g, d), d = (function(T, it, Q) {
|
|
3505
|
-
var G = it.tokTypes,
|
|
3505
|
+
var G = it.tokTypes, F = Q.tokTypes;
|
|
3506
3506
|
return (function(p) {
|
|
3507
3507
|
function i() {
|
|
3508
3508
|
return p.apply(this, arguments) || this;
|
|
@@ -3510,22 +3510,22 @@ function Es(t) {
|
|
|
3510
3510
|
Wt(i, p);
|
|
3511
3511
|
var s = i.prototype;
|
|
3512
3512
|
return s.parseMaybeImportAttributes = function(n) {
|
|
3513
|
-
if (this.type ===
|
|
3513
|
+
if (this.type === F._with || this.type === G.assert) {
|
|
3514
3514
|
this.next();
|
|
3515
3515
|
var c = this.parseImportAttributes();
|
|
3516
3516
|
c && (n.attributes = c);
|
|
3517
3517
|
}
|
|
3518
3518
|
}, s.parseImportAttributes = function() {
|
|
3519
|
-
this.expect(
|
|
3519
|
+
this.expect(F.braceL);
|
|
3520
3520
|
var n = this.parseWithEntries();
|
|
3521
|
-
return this.expect(
|
|
3521
|
+
return this.expect(F.braceR), n;
|
|
3522
3522
|
}, s.parseWithEntries = function() {
|
|
3523
3523
|
var n = [], c = /* @__PURE__ */ new Set();
|
|
3524
3524
|
do {
|
|
3525
|
-
if (this.type ===
|
|
3525
|
+
if (this.type === F.braceR) break;
|
|
3526
3526
|
var l, m = this.startNode();
|
|
3527
|
-
l = this.type ===
|
|
3528
|
-
} while (this.eat(
|
|
3527
|
+
l = this.type === F.string ? this.parseLiteral(this.value) : this.parseIdent(!0), this.next(), m.key = l, c.has(m.key.name) && this.raise(this.pos, "Duplicated key in attributes"), c.add(m.key.name), this.type !== F.string && this.raise(this.pos, "Only string is supported as an attribute value"), m.value = this.parseLiteral(this.value), n.push(this.finishNode(m, "ImportAttribute"));
|
|
3528
|
+
} while (this.eat(F.comma));
|
|
3529
3529
|
return n;
|
|
3530
3530
|
}, i;
|
|
3531
3531
|
})(T);
|
|
@@ -3539,7 +3539,7 @@ function Es(t) {
|
|
|
3539
3539
|
})(c), { allowedModifiers: ["const"], disallowedModifiers: ["in", "out"], errorTemplate: A.InvalidModifierOnTypeParameterPositions }), c;
|
|
3540
3540
|
}
|
|
3541
3541
|
Wt(it, T);
|
|
3542
|
-
var Q, G,
|
|
3542
|
+
var Q, G, F, p = it.prototype;
|
|
3543
3543
|
return p.getTokenFromCodeInType = function(i) {
|
|
3544
3544
|
return i === 62 || i === 60 ? this.finishOp(o.relational, 1) : T.prototype.getTokenFromCode.call(this, i);
|
|
3545
3545
|
}, p.readToken = function(i) {
|
|
@@ -3547,7 +3547,7 @@ function Es(t) {
|
|
|
3547
3547
|
var s = this.curContext();
|
|
3548
3548
|
if (s === et.tc_expr) return this.jsx_readToken();
|
|
3549
3549
|
if (s === et.tc_oTag || s === et.tc_cTag) {
|
|
3550
|
-
if (
|
|
3550
|
+
if (N(i)) return this.jsx_readWord();
|
|
3551
3551
|
if (i == 62) return ++this.pos, this.finishToken(I.jsxTagEnd);
|
|
3552
3552
|
if ((i === 34 || i === 39) && s == et.tc_oTag) return this.jsx_readString(i);
|
|
3553
3553
|
}
|
|
@@ -4494,7 +4494,7 @@ function Es(t) {
|
|
|
4494
4494
|
if (this.type === I.at) return this.parseDecorators(), this.parseExprAtom();
|
|
4495
4495
|
if (U(this.type)) {
|
|
4496
4496
|
var c = this.potentialArrowAt === this.start, l = this.start, m = this.startLoc, y = this.containsEsc, x = this.parseIdent(!1);
|
|
4497
|
-
if (this.options.ecmaVersion >= 8 && !y && x.name === "async" && !this.canInsertSemicolon() && this.eat(o._function)) return this.overrideContext(
|
|
4497
|
+
if (this.options.ecmaVersion >= 8 && !y && x.name === "async" && !this.canInsertSemicolon() && this.eat(o._function)) return this.overrideContext(B.f_expr), this.parseFunction(this.startNodeAt(l, m), 0, !1, !0, s);
|
|
4498
4498
|
if (c && !this.canInsertSemicolon()) {
|
|
4499
4499
|
if (this.eat(o.arrow)) return this.parseArrowExpression(this.startNodeAt(l, m), [x], !1, s);
|
|
4500
4500
|
if (this.options.ecmaVersion >= 8 && x.name === "async" && this.type === o.name && !y && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) return x = this.parseIdent(!1), !this.canInsertSemicolon() && this.eat(o.arrow) || this.unexpected(), this.parseArrowExpression(this.startNodeAt(l, m), [x], !0, s);
|
|
@@ -4676,10 +4676,10 @@ function Es(t) {
|
|
|
4676
4676
|
if (!((c = L) != null && c.error || this.tsMatchLeftRelational())) return this.parseMaybeAssignOrigin(i, s, n);
|
|
4677
4677
|
E && !this.compareLookaheadState(E, this.getCurLookaheadState()) || (E = this.cloneCurLookaheadState());
|
|
4678
4678
|
var rt = this.tryParse(function(vt) {
|
|
4679
|
-
var
|
|
4679
|
+
var _t, Nt;
|
|
4680
4680
|
z = H.tsParseTypeParameters();
|
|
4681
4681
|
var gt = H.parseMaybeAssignOrigin(i, s, n);
|
|
4682
|
-
return (gt.type !== "ArrowFunctionExpression" || (
|
|
4682
|
+
return (gt.type !== "ArrowFunctionExpression" || (_t = gt.extra) != null && _t.parenthesized) && vt(), ((Nt = z) == null ? void 0 : Nt.params.length) !== 0 && H.resetStartLocationFromNode(gt, z), gt.typeParameters = z, gt;
|
|
4683
4683
|
}, E);
|
|
4684
4684
|
if (!rt.error && !rt.aborted) return z && this.reportReservedArrowTypeParam(z), rt.node;
|
|
4685
4685
|
if (!L && (Fe(!0), !(C = this.tryParse(function() {
|
|
@@ -4901,12 +4901,12 @@ function Es(t) {
|
|
|
4901
4901
|
} else if (!c && this.eat(o.parenL)) {
|
|
4902
4902
|
var rt = this.maybeInArrowParameters;
|
|
4903
4903
|
this.maybeInArrowParameters = !0;
|
|
4904
|
-
var vt = new Ot(),
|
|
4904
|
+
var vt = new Ot(), _t = this.yieldPos, Nt = this.awaitPos, gt = this.awaitIdentPos;
|
|
4905
4905
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
4906
4906
|
var Pe = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1, vt);
|
|
4907
|
-
if (l && !H && this.shouldParseAsyncArrow()) this.checkPatternErrors(vt, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos =
|
|
4907
|
+
if (l && !H && this.shouldParseAsyncArrow()) this.checkPatternErrors(vt, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = _t, this.awaitPos = Nt, this.awaitIdentPos = gt, i = this.parseSubscriptAsyncArrow(s, n, Pe, y);
|
|
4908
4908
|
else {
|
|
4909
|
-
this.checkExpressionErrors(vt, !0), this.yieldPos =
|
|
4909
|
+
this.checkExpressionErrors(vt, !0), this.yieldPos = _t || this.yieldPos, this.awaitPos = Nt || this.awaitPos, this.awaitIdentPos = gt || this.awaitIdentPos;
|
|
4910
4910
|
var Ht = this.startNodeAt(s, n);
|
|
4911
4911
|
Ht.callee = i, Ht.arguments = Pe, z && (Ht.optional = H), i = this.finishNode(Ht, "CallExpression");
|
|
4912
4912
|
}
|
|
@@ -5008,7 +5008,7 @@ function Es(t) {
|
|
|
5008
5008
|
var s = this.type;
|
|
5009
5009
|
if (s == o.braceL) {
|
|
5010
5010
|
var n = this.curContext();
|
|
5011
|
-
n == et.tc_oTag ? this.context.push(
|
|
5011
|
+
n == et.tc_oTag ? this.context.push(B.b_expr) : n == et.tc_expr ? this.context.push(B.b_tmpl) : T.prototype.updateContext.call(this, i), this.exprAllowed = !0;
|
|
5012
5012
|
} else {
|
|
5013
5013
|
if (s !== o.slash || i !== I.jsxTagStart) return T.prototype.updateContext.call(this, i);
|
|
5014
5014
|
this.context.length -= 2, this.context.push(et.tc_cTag), this.exprAllowed = !1;
|
|
@@ -5056,16 +5056,16 @@ function Es(t) {
|
|
|
5056
5056
|
}
|
|
5057
5057
|
T.prototype.checkLocalExport.call(this, i);
|
|
5058
5058
|
}
|
|
5059
|
-
}, Q = it,
|
|
5059
|
+
}, Q = it, F = [{ key: "acornTypeScript", get: function() {
|
|
5060
5060
|
return g;
|
|
5061
5061
|
} }], (G = [{ key: "acornTypeScript", get: function() {
|
|
5062
5062
|
return g;
|
|
5063
|
-
} }]) && Oe(Q.prototype, G),
|
|
5063
|
+
} }]) && Oe(Q.prototype, G), F && Oe(Q, F), Object.defineProperty(Q, "prototype", { writable: !1 }), it;
|
|
5064
5064
|
})(d);
|
|
5065
5065
|
return wi;
|
|
5066
5066
|
};
|
|
5067
5067
|
}
|
|
5068
|
-
const Is = ["createObject", "dropObject", "removeRecords", "upsertRecords"],
|
|
5068
|
+
const Is = ["createObject", "dropObject", "removeRecords", "upsertRecords"], _s = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"], Dt = _i(Ei);
|
|
5069
5069
|
async function Ms() {
|
|
5070
5070
|
try {
|
|
5071
5071
|
console.info("🚀 Building configuration...");
|
|
@@ -5088,11 +5088,11 @@ async function Ds(t) {
|
|
|
5088
5088
|
try {
|
|
5089
5089
|
const w = await R.stat(o);
|
|
5090
5090
|
if (w.isDirectory()) {
|
|
5091
|
-
const
|
|
5092
|
-
d.push(M), await r(o,
|
|
5091
|
+
const N = await R.readdir(o), M = { childCount: N.length, name: g, typeId: "folder" };
|
|
5092
|
+
d.push(M), await r(o, N);
|
|
5093
5093
|
} else {
|
|
5094
|
-
const
|
|
5095
|
-
d.push(
|
|
5094
|
+
const N = { id: Ii(), lastModifiedAt: w.mtimeMs, name: g, size: w.size, typeId: "object" };
|
|
5095
|
+
d.push(N);
|
|
5096
5096
|
}
|
|
5097
5097
|
} catch (w) {
|
|
5098
5098
|
throw new Error(`Unable to get information for '${g}' in 'buildPublicDirectoryIndex'. ${String(w)}`);
|
|
@@ -5114,19 +5114,14 @@ async function Vs() {
|
|
|
5114
5114
|
let t = function(j) {
|
|
5115
5115
|
switch (j.type) {
|
|
5116
5116
|
case "FunctionDeclaration": {
|
|
5117
|
-
const
|
|
5118
|
-
|
|
5119
|
-
break;
|
|
5120
|
-
}
|
|
5121
|
-
case "MethodDefinition": {
|
|
5122
|
-
const D = j.key?.name, J = j.key?.type === "PrivateIdentifier";
|
|
5123
|
-
D && !J && !(D === "constructor") && d.add(D);
|
|
5117
|
+
const B = j;
|
|
5118
|
+
B.id?.name != null && d.add(B.id.name);
|
|
5124
5119
|
break;
|
|
5125
5120
|
}
|
|
5126
5121
|
}
|
|
5127
|
-
for (const
|
|
5128
|
-
if (
|
|
5129
|
-
const J = j[
|
|
5122
|
+
for (const B in j) {
|
|
5123
|
+
if (B === "loc" || B === "range" || B === "start" || B === "end" || B === "comments") continue;
|
|
5124
|
+
const J = j[B];
|
|
5130
5125
|
Array.isArray(J) ? J.forEach(t) : J && typeof J == "object" && typeof J.type == "string" && t(J);
|
|
5131
5126
|
}
|
|
5132
5127
|
};
|
|
@@ -5134,14 +5129,14 @@ async function Vs() {
|
|
|
5134
5129
|
const e = JSON.parse(await R.readFile("package.json", "utf8")), r = JSON.parse(await R.readFile("config.json", "utf8")), a = await R.readFile("src/index.ts", "utf8"), f = K.extend(Es()).parse(a, { ecmaVersion: "latest", sourceType: "module", locations: !0 }), d = /* @__PURE__ */ new Set();
|
|
5135
5130
|
t(f), console.log(`Extracted ${d.size} functions:`, Array.from(d));
|
|
5136
5131
|
let v = !1, g = !1;
|
|
5137
|
-
const o = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, w = [...a.matchAll(o)].filter((j) => j[1] == null && j[2] !== "constructor"),
|
|
5132
|
+
const o = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, w = [...a.matchAll(o)].filter((j) => j[1] == null && j[2] !== "constructor"), N = [];
|
|
5138
5133
|
for (const j of w) {
|
|
5139
|
-
const
|
|
5140
|
-
|
|
5134
|
+
const B = j[2];
|
|
5135
|
+
N.push(B), Is.includes(B) && (v = !0), _s.includes(B) && (g = !0);
|
|
5141
5136
|
}
|
|
5142
|
-
|
|
5137
|
+
N.length > 0 ? console.info(`ℹ️ Implements ${N.length} operations.`) : console.warn("⚠️ Implements no operations.");
|
|
5143
5138
|
let M;
|
|
5144
|
-
g && v ? M = "bidirectional" : g ? M = "source" : v ? M = "destination" : M = "unknown", M === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports ${M} usage.`), e.name != null && (r.id = e.name), r.operations =
|
|
5139
|
+
g && v ? M = "bidirectional" : g ? M = "source" : v ? M = "destination" : M = "unknown", M === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports ${M} usage.`), e.name != null && (r.id = e.name), r.operations = N, r.usageId = M, e.version != null && (r.version = e.version), await R.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8"), console.info("✅ Connector configuration built.");
|
|
5145
5140
|
} catch (t) {
|
|
5146
5141
|
console.error("❌ Error building connector configuration.", t);
|
|
5147
5142
|
}
|
|
@@ -5200,8 +5195,8 @@ async function Hs() {
|
|
|
5200
5195
|
const r = JSON.parse(await R.readFile("./dependency-check-reports/dependency-check-report.json", "utf-8")), a = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
|
|
5201
5196
|
for (const j of r.dependencies)
|
|
5202
5197
|
if (j.vulnerabilities != null)
|
|
5203
|
-
for (const
|
|
5204
|
-
const J =
|
|
5198
|
+
for (const B of j.vulnerabilities) {
|
|
5199
|
+
const J = B.severity?.toLowerCase() ?? "unknown";
|
|
5205
5200
|
J in a ? a[J]++ : a.unknown++;
|
|
5206
5201
|
}
|
|
5207
5202
|
const u = {
|
|
@@ -5211,18 +5206,18 @@ async function Hs() {
|
|
|
5211
5206
|
low: { color: "6D8C31", label: "low" },
|
|
5212
5207
|
unknown: { color: "616161", label: "unknown" }
|
|
5213
5208
|
}, f = JSON.parse(await R.readFile("config.json", "utf8")), d = [];
|
|
5214
|
-
if (Object.values(a).reduce((j,
|
|
5209
|
+
if (Object.values(a).reduce((j, B) => j + B, 0) === 0)
|
|
5215
5210
|
console.info("✅ No vulnerabilities found."), d.push(`[](https://data-positioning.github.io/${f.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
5216
5211
|
else
|
|
5217
|
-
for (const [j,
|
|
5212
|
+
for (const [j, B] of Object.entries(a)) {
|
|
5218
5213
|
const J = u[j];
|
|
5219
|
-
if (console.warn(`⚠️ ${
|
|
5220
|
-
const I = `https://img.shields.io/badge/OWASP-${
|
|
5214
|
+
if (console.warn(`⚠️ ${B} ${J.label} vulnerability(ies) found.`), B === 0) continue;
|
|
5215
|
+
const I = `https://img.shields.io/badge/OWASP-${B}%20${J.label}-${J.color}`;
|
|
5221
5216
|
d.push(`[](https://data-positioning.github.io/${f.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
5222
5217
|
}
|
|
5223
5218
|
const g = await R.readFile("./README.md", "utf8"), o = g.indexOf(t), w = g.indexOf(e);
|
|
5224
5219
|
(o === -1 || w === -1) && (console.error("❌ OWASP badge markers not found in README.md."), process.exit(1));
|
|
5225
|
-
const
|
|
5220
|
+
const N = d.join(" "), M = g.substring(0, o + t.length) + N + g.substring(w);
|
|
5226
5221
|
await R.writeFile("README.md", M, "utf8"), console.info("✅ OWASP dependency check badge(s) inserted into README.md");
|
|
5227
5222
|
} catch (r) {
|
|
5228
5223
|
console.error("❌ Error updating README with OWASP badges:", r), process.exit(1);
|
|
@@ -5258,11 +5253,11 @@ async function Ks(t, e) {
|
|
|
5258
5253
|
for (const v of d) {
|
|
5259
5254
|
const g = `${u}/${v}`, o = `${f}/${v}`;
|
|
5260
5255
|
if ((await R.stat(g)).isDirectory()) {
|
|
5261
|
-
const
|
|
5262
|
-
await r(g, o,
|
|
5256
|
+
const N = await R.readdir(g);
|
|
5257
|
+
await r(g, o, N);
|
|
5263
5258
|
} else {
|
|
5264
5259
|
console.info(`⚙️ Uploading '${u}/${v}'...`);
|
|
5265
|
-
const
|
|
5260
|
+
const N = `wrangler r2 object put "datapos-sample-data-eu/${f}/${v}" --file="${u}/${v}" --jurisdiction=eu --remote`, M = await Dt(N);
|
|
5266
5261
|
if (M.stderr) throw new Error(M.stderr);
|
|
5267
5262
|
}
|
|
5268
5263
|
}
|
|
@@ -5296,9 +5291,9 @@ async function Gs(t) {
|
|
|
5296
5291
|
for (const v of d) {
|
|
5297
5292
|
const g = `${u}/${v.name}`, o = f ? `${f}/${v.name}` : v.name;
|
|
5298
5293
|
if (!v.isDirectory()) {
|
|
5299
|
-
const w = `${t}_${r}/${o}`.replace(/\\/g, "/"),
|
|
5294
|
+
const w = `${t}_${r}/${o}`.replace(/\\/g, "/"), N = v.name.endsWith(".js") ? "application/javascript" : v.name.endsWith(".css") ? "text/css" : "application/octet-stream";
|
|
5300
5295
|
console.info(`⚙️ Uploading '${o}' → '${w}'...`);
|
|
5301
|
-
const { stderr: M } = await Dt(`wrangler r2 object put "${w}" --file="${g}" --content-type ${
|
|
5296
|
+
const { stderr: M } = await Dt(`wrangler r2 object put "${w}" --file="${g}" --content-type ${N} --jurisdiction=eu --remote`);
|
|
5302
5297
|
if (M) throw new Error(M);
|
|
5303
5298
|
}
|
|
5304
5299
|
}
|
package/package.json
CHANGED