@datapos/datapos-development 0.3.250 → 0.3.252
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.
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { promises as Pe } from "node:fs";
|
|
2
|
-
import { nanoid as
|
|
3
|
-
import { promisify as
|
|
4
|
-
import { exec as
|
|
5
|
-
var
|
|
2
|
+
import { nanoid as Lr } from "nanoid";
|
|
3
|
+
import { promisify as Or } from "node:util";
|
|
4
|
+
import { exec as Mr, spawn as Rr } from "node:child_process";
|
|
5
|
+
var Dr = [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], bs = [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], zr = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", ks = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", ei = {
|
|
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",
|
|
9
9
|
strict: "implements interface let package private protected public static yield",
|
|
10
10
|
strictBind: "eval arguments"
|
|
11
|
-
}, ti = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",
|
|
11
|
+
}, ti = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this", Vr = {
|
|
12
12
|
5: ti,
|
|
13
13
|
"5module": ti + " export import",
|
|
14
14
|
6: ti + " const class extends export import super"
|
|
15
|
-
},
|
|
15
|
+
}, jr = /^in(stanceof)?$/, Fr = new RegExp("[" + ks + "]"), Br = new RegExp("[" + ks + zr + "]");
|
|
16
16
|
function oi(e, t) {
|
|
17
17
|
for (var i = 65536, s = 0; s < t.length; s += 2) {
|
|
18
18
|
if (i += t[s], i > e)
|
|
@@ -23,10 +23,10 @@ function oi(e, t) {
|
|
|
23
23
|
return !1;
|
|
24
24
|
}
|
|
25
25
|
function Ae(e, t) {
|
|
26
|
-
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
26
|
+
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && Fr.test(String.fromCharCode(e)) : t === !1 ? !1 : oi(e, bs);
|
|
27
27
|
}
|
|
28
28
|
function Re(e, t) {
|
|
29
|
-
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
29
|
+
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && Br.test(String.fromCharCode(e)) : t === !1 ? !1 : oi(e, bs) || oi(e, Dr);
|
|
30
30
|
}
|
|
31
31
|
var V = function(t, i) {
|
|
32
32
|
i === void 0 && (i = {}), this.label = t, this.keyword = i.keyword, this.beforeExpr = !!i.beforeExpr, this.startsExpr = !!i.startsExpr, this.isLoop = !!i.isLoop, this.isAssign = !!i.isAssign, this.prefix = !!i.prefix, this.postfix = !!i.postfix, this.binop = i.binop || null, this.updateContext = null;
|
|
@@ -34,16 +34,16 @@ var V = function(t, i) {
|
|
|
34
34
|
function be(e, t) {
|
|
35
35
|
return new V(e, { beforeExpr: !0, binop: t });
|
|
36
36
|
}
|
|
37
|
-
var ke = { beforeExpr: !0 },
|
|
37
|
+
var ke = { beforeExpr: !0 }, pe = { startsExpr: !0 }, rt = {};
|
|
38
38
|
function F(e, t) {
|
|
39
39
|
return t === void 0 && (t = {}), t.keyword = e, rt[e] = new V(e, t);
|
|
40
40
|
}
|
|
41
41
|
var p = {
|
|
42
|
-
num: new V("num",
|
|
43
|
-
regexp: new V("regexp",
|
|
44
|
-
string: new V("string",
|
|
45
|
-
name: new V("name",
|
|
46
|
-
privateId: new V("privateId",
|
|
42
|
+
num: new V("num", pe),
|
|
43
|
+
regexp: new V("regexp", pe),
|
|
44
|
+
string: new V("string", pe),
|
|
45
|
+
name: new V("name", pe),
|
|
46
|
+
privateId: new V("privateId", pe),
|
|
47
47
|
eof: new V("eof"),
|
|
48
48
|
// Punctuation token types.
|
|
49
49
|
bracketL: new V("[", { beforeExpr: !0, startsExpr: !0 }),
|
|
@@ -62,7 +62,7 @@ var p = {
|
|
|
62
62
|
template: new V("template"),
|
|
63
63
|
invalidTemplate: new V("invalidTemplate"),
|
|
64
64
|
ellipsis: new V("...", ke),
|
|
65
|
-
backQuote: new V("`",
|
|
65
|
+
backQuote: new V("`", pe),
|
|
66
66
|
dollarBraceL: new V("${", { beforeExpr: !0, startsExpr: !0 }),
|
|
67
67
|
// Operators. These carry several kinds of properties to help the
|
|
68
68
|
// parser use them properly (the presence of these properties is
|
|
@@ -106,7 +106,7 @@ var p = {
|
|
|
106
106
|
_else: F("else", ke),
|
|
107
107
|
_finally: F("finally"),
|
|
108
108
|
_for: F("for", { isLoop: !0 }),
|
|
109
|
-
_function: F("function",
|
|
109
|
+
_function: F("function", pe),
|
|
110
110
|
_if: F("if"),
|
|
111
111
|
_return: F("return", ke),
|
|
112
112
|
_switch: F("switch"),
|
|
@@ -117,25 +117,25 @@ var p = {
|
|
|
117
117
|
_while: F("while", { isLoop: !0 }),
|
|
118
118
|
_with: F("with"),
|
|
119
119
|
_new: F("new", { beforeExpr: !0, startsExpr: !0 }),
|
|
120
|
-
_this: F("this",
|
|
121
|
-
_super: F("super",
|
|
122
|
-
_class: F("class",
|
|
120
|
+
_this: F("this", pe),
|
|
121
|
+
_super: F("super", pe),
|
|
122
|
+
_class: F("class", pe),
|
|
123
123
|
_extends: F("extends", ke),
|
|
124
124
|
_export: F("export"),
|
|
125
|
-
_import: F("import",
|
|
126
|
-
_null: F("null",
|
|
127
|
-
_true: F("true",
|
|
128
|
-
_false: F("false",
|
|
125
|
+
_import: F("import", pe),
|
|
126
|
+
_null: F("null", pe),
|
|
127
|
+
_true: F("true", pe),
|
|
128
|
+
_false: F("false", pe),
|
|
129
129
|
_in: F("in", { beforeExpr: !0, binop: 7 }),
|
|
130
130
|
_instanceof: F("instanceof", { beforeExpr: !0, binop: 7 }),
|
|
131
131
|
_typeof: F("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
132
132
|
_void: F("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
133
133
|
_delete: F("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
134
|
-
}, ue = /\r\n?|\n|\u2028|\u2029/,
|
|
134
|
+
}, ue = /\r\n?|\n|\u2028|\u2029/, ws = new RegExp(ue.source, "g");
|
|
135
135
|
function Je(e) {
|
|
136
136
|
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Ts(e, t, i) {
|
|
139
139
|
i === void 0 && (i = e.length);
|
|
140
140
|
for (var s = t; s < i; s++) {
|
|
141
141
|
var a = e.charCodeAt(s);
|
|
@@ -144,10 +144,10 @@ function ws(e, t, i) {
|
|
|
144
144
|
}
|
|
145
145
|
return -1;
|
|
146
146
|
}
|
|
147
|
-
var mi = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,
|
|
148
|
-
return
|
|
147
|
+
var mi = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, ae = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, Ss = Object.prototype, $r = Ss.hasOwnProperty, Ur = Ss.toString, ht = Object.hasOwn || (function(e, t) {
|
|
148
|
+
return $r.call(e, t);
|
|
149
149
|
}), Ri = Array.isArray || (function(e) {
|
|
150
|
-
return
|
|
150
|
+
return Ur.call(e) === "[object Array]";
|
|
151
151
|
}), Di = /* @__PURE__ */ Object.create(null);
|
|
152
152
|
function Ue(e) {
|
|
153
153
|
return Di[e] || (Di[e] = new RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
|
|
@@ -155,7 +155,7 @@ function Ue(e) {
|
|
|
155
155
|
function De(e) {
|
|
156
156
|
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320));
|
|
157
157
|
}
|
|
158
|
-
var
|
|
158
|
+
var Zr = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, at = function(t, i) {
|
|
159
159
|
this.line = t, this.column = i;
|
|
160
160
|
};
|
|
161
161
|
at.prototype.offset = function(t) {
|
|
@@ -166,7 +166,7 @@ var kt = function(t, i, s) {
|
|
|
166
166
|
};
|
|
167
167
|
function yi(e, t) {
|
|
168
168
|
for (var i = 1, s = 0; ; ) {
|
|
169
|
-
var a =
|
|
169
|
+
var a = Ts(e, s, t);
|
|
170
170
|
if (a < 0)
|
|
171
171
|
return new at(i, t - s);
|
|
172
172
|
++i, s = a;
|
|
@@ -269,7 +269,7 @@ var Mt = {
|
|
|
269
269
|
// (non-standard) ParenthesizedExpression nodes
|
|
270
270
|
preserveParens: !1
|
|
271
271
|
}, zi = !1;
|
|
272
|
-
function
|
|
272
|
+
function qr(e) {
|
|
273
273
|
var t = {};
|
|
274
274
|
for (var i in Mt)
|
|
275
275
|
t[i] = e && ht(e, i) ? e[i] : Mt[i];
|
|
@@ -280,9 +280,9 @@ Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion
|
|
|
280
280
|
return s.push(a);
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
|
-
return Ri(t.onComment) && (t.onComment =
|
|
283
|
+
return Ri(t.onComment) && (t.onComment = Hr(t, t.onComment)), t;
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function Hr(e, t) {
|
|
286
286
|
return function(i, s, a, o, h, d) {
|
|
287
287
|
var y = {
|
|
288
288
|
type: i ? "Block" : "Line",
|
|
@@ -293,12 +293,12 @@ function qr(e, t) {
|
|
|
293
293
|
e.locations && (y.loc = new kt(this, h, d)), e.ranges && (y.range = [a, o]), t.push(y);
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
|
-
var gt = 1, pt = 2, vi = 4,
|
|
296
|
+
var gt = 1, pt = 2, vi = 4, _s = 8, xi = 16, Ps = 32, Ut = 64, As = 128, Xe = 256, wt = 512, Zt = gt | pt | Xe;
|
|
297
297
|
function gi(e, t) {
|
|
298
|
-
return pt | (e ? vi : 0) | (t ?
|
|
298
|
+
return pt | (e ? vi : 0) | (t ? _s : 0);
|
|
299
299
|
}
|
|
300
|
-
var Rt = 0, bi = 1, je = 2,
|
|
301
|
-
this.options = t =
|
|
300
|
+
var Rt = 0, bi = 1, je = 2, Cs = 3, Es = 4, Is = 5, J = function(t, i, s) {
|
|
301
|
+
this.options = t = qr(t), this.sourceFile = t.sourceFile, this.keywords = Ue(Vr[t.ecmaVersion >= 6 ? 6 : t.sourceType === "module" ? "5module" : 5]);
|
|
302
302
|
var a = "";
|
|
303
303
|
t.allowReserved !== !0 && (a = ei[t.ecmaVersion >= 6 ? 6 : t.ecmaVersion === 5 ? 5 : 3], t.sourceType === "module" && (a += " await")), this.reservedWords = Ue(a);
|
|
304
304
|
var o = (a ? a + " " : "") + ei.strict;
|
|
@@ -313,7 +313,7 @@ Ie.inFunction.get = function() {
|
|
|
313
313
|
return (this.currentVarScope().flags & pt) > 0;
|
|
314
314
|
};
|
|
315
315
|
Ie.inGenerator.get = function() {
|
|
316
|
-
return (this.currentVarScope().flags &
|
|
316
|
+
return (this.currentVarScope().flags & _s) > 0;
|
|
317
317
|
};
|
|
318
318
|
Ie.inAsync.get = function() {
|
|
319
319
|
return (this.currentVarScope().flags & vi) > 0;
|
|
@@ -333,7 +333,7 @@ Ie.allowSuper.get = function() {
|
|
|
333
333
|
return (t & Ut) > 0 || this.options.allowSuperOutsideMethod;
|
|
334
334
|
};
|
|
335
335
|
Ie.allowDirectSuper.get = function() {
|
|
336
|
-
return (this.currentThisScope().flags &
|
|
336
|
+
return (this.currentThisScope().flags & As) > 0;
|
|
337
337
|
};
|
|
338
338
|
Ie.treatFunctionsAsVar.get = function() {
|
|
339
339
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
@@ -366,21 +366,21 @@ J.tokenizer = function(t, i) {
|
|
|
366
366
|
return new this(i, t);
|
|
367
367
|
};
|
|
368
368
|
Object.defineProperties(J.prototype, Ie);
|
|
369
|
-
var ce = J.prototype,
|
|
369
|
+
var ce = J.prototype, Wr = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
370
370
|
ce.strictDirective = function(e) {
|
|
371
371
|
if (this.options.ecmaVersion < 5)
|
|
372
372
|
return !1;
|
|
373
373
|
for (; ; ) {
|
|
374
|
-
|
|
375
|
-
var t =
|
|
374
|
+
ae.lastIndex = e, e += ae.exec(this.input)[0].length;
|
|
375
|
+
var t = Wr.exec(this.input.slice(e));
|
|
376
376
|
if (!t)
|
|
377
377
|
return !1;
|
|
378
378
|
if ((t[1] || t[2]) === "use strict") {
|
|
379
|
-
|
|
380
|
-
var i =
|
|
379
|
+
ae.lastIndex = e + t[0].length;
|
|
380
|
+
var i = ae.exec(this.input), s = i.index + i[0].length, a = this.input.charAt(s);
|
|
381
381
|
return a === ";" || a === "}" || ue.test(i[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(a) || a === "!" && this.input.charAt(s + 1) === "=");
|
|
382
382
|
}
|
|
383
|
-
e += t[0].length,
|
|
383
|
+
e += t[0].length, ae.lastIndex = e, e += ae.exec(this.input)[0].length, this.input[e] === ";" && e++;
|
|
384
384
|
}
|
|
385
385
|
};
|
|
386
386
|
ce.eat = function(e) {
|
|
@@ -453,12 +453,12 @@ C.parseTopLevel = function(e) {
|
|
|
453
453
|
}
|
|
454
454
|
return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType, this.finishNode(e, "Program");
|
|
455
455
|
};
|
|
456
|
-
var ki = { kind: "loop" },
|
|
456
|
+
var ki = { kind: "loop" }, Kr = { kind: "switch" };
|
|
457
457
|
C.isLet = function(e) {
|
|
458
458
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
|
|
459
459
|
return !1;
|
|
460
|
-
|
|
461
|
-
var t =
|
|
460
|
+
ae.lastIndex = this.pos;
|
|
461
|
+
var t = ae.exec(this.input), i = this.pos + t[0].length, s = this.input.charCodeAt(i);
|
|
462
462
|
if (s === 91 || s === 92)
|
|
463
463
|
return !0;
|
|
464
464
|
if (e)
|
|
@@ -471,7 +471,7 @@ C.isLet = function(e) {
|
|
|
471
471
|
if (s === 92 || s > 55295 && s < 56320)
|
|
472
472
|
return !0;
|
|
473
473
|
var o = this.input.slice(i, a);
|
|
474
|
-
if (!
|
|
474
|
+
if (!jr.test(o))
|
|
475
475
|
return !0;
|
|
476
476
|
}
|
|
477
477
|
return !1;
|
|
@@ -479,23 +479,23 @@ C.isLet = function(e) {
|
|
|
479
479
|
C.isAsyncFunction = function() {
|
|
480
480
|
if (this.options.ecmaVersion < 8 || !this.isContextual("async"))
|
|
481
481
|
return !1;
|
|
482
|
-
|
|
483
|
-
var e =
|
|
482
|
+
ae.lastIndex = this.pos;
|
|
483
|
+
var e = ae.exec(this.input), t = this.pos + e[0].length, i;
|
|
484
484
|
return !ue.test(this.input.slice(this.pos, t)) && this.input.slice(t, t + 8) === "function" && (t + 8 === this.input.length || !(Re(i = this.input.charCodeAt(t + 8)) || i > 55295 && i < 56320));
|
|
485
485
|
};
|
|
486
486
|
C.isUsingKeyword = function(e, t) {
|
|
487
487
|
if (this.options.ecmaVersion < 17 || !this.isContextual(e ? "await" : "using"))
|
|
488
488
|
return !1;
|
|
489
|
-
|
|
490
|
-
var i =
|
|
489
|
+
ae.lastIndex = this.pos;
|
|
490
|
+
var i = ae.exec(this.input), s = this.pos + i[0].length;
|
|
491
491
|
if (ue.test(this.input.slice(this.pos, s)))
|
|
492
492
|
return !1;
|
|
493
493
|
if (e) {
|
|
494
494
|
var a = s + 5, o;
|
|
495
495
|
if (this.input.slice(s, a) !== "using" || a === this.input.length || Re(o = this.input.charCodeAt(a)) || o > 55295 && o < 56320)
|
|
496
496
|
return !1;
|
|
497
|
-
|
|
498
|
-
var h =
|
|
497
|
+
ae.lastIndex = a;
|
|
498
|
+
var h = ae.exec(this.input);
|
|
499
499
|
if (h && ue.test(this.input.slice(a, a + h[0].length)))
|
|
500
500
|
return !1;
|
|
501
501
|
}
|
|
@@ -553,8 +553,8 @@ C.parseStatement = function(e, t, i) {
|
|
|
553
553
|
case p._export:
|
|
554
554
|
case p._import:
|
|
555
555
|
if (this.options.ecmaVersion > 10 && s === p._import) {
|
|
556
|
-
|
|
557
|
-
var h =
|
|
556
|
+
ae.lastIndex = this.pos;
|
|
557
|
+
var h = ae.exec(this.input), d = this.pos + h[0].length, y = this.input.charCodeAt(d);
|
|
558
558
|
if (y === 40 || y === 46)
|
|
559
559
|
return this.parseExpressionStatement(a, this.parseExpression());
|
|
560
560
|
}
|
|
@@ -570,8 +570,8 @@ C.parseStatement = function(e, t, i) {
|
|
|
570
570
|
var u = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null;
|
|
571
571
|
if (u)
|
|
572
572
|
return t && this.options.sourceType === "script" && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), u === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(a, !1, u), this.semicolon(), this.finishNode(a, "VariableDeclaration");
|
|
573
|
-
var T = this.value,
|
|
574
|
-
return s === p.name &&
|
|
573
|
+
var T = this.value, E = this.parseExpression();
|
|
574
|
+
return s === p.name && E.type === "Identifier" && this.eat(p.colon) ? this.parseLabeledStatement(a, T, E, e) : this.parseExpressionStatement(a, E);
|
|
575
575
|
}
|
|
576
576
|
};
|
|
577
577
|
C.parseBreakContinueStatement = function(e, t) {
|
|
@@ -605,8 +605,8 @@ C.parseForStatement = function(e) {
|
|
|
605
605
|
var y = this.startNode();
|
|
606
606
|
return this.next(), d === "await using" && this.next(), this.parseVar(y, !0, d), this.finishNode(y, "VariableDeclaration"), this.parseForAfterInit(e, y, t);
|
|
607
607
|
}
|
|
608
|
-
var u = this.containsEsc, T = new qt(),
|
|
609
|
-
return this.type === p._in || (h = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === p._in && this.unexpected(t), e.await = !0) : h && this.options.ecmaVersion >= 8 && (R.start ===
|
|
608
|
+
var u = this.containsEsc, T = new qt(), E = this.start, R = t > -1 ? this.parseExprSubscripts(T, "await") : this.parseExpression(!0, T);
|
|
609
|
+
return this.type === p._in || (h = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === p._in && this.unexpected(t), e.await = !0) : h && this.options.ecmaVersion >= 8 && (R.start === E && !u && R.type === "Identifier" && R.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = !1)), o && h && this.raise(R.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(R, !1, T), this.checkLValPattern(R), this.parseForIn(e, R)) : (this.checkExpressionErrors(T, !0), t > -1 && this.unexpected(t), this.parseFor(e, R));
|
|
610
610
|
};
|
|
611
611
|
C.parseForAfterInit = function(e, t, i) {
|
|
612
612
|
return (this.type === p._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && t.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === p._in ? i > -1 && this.unexpected(i) : e.await = i > -1), this.parseForIn(e, t)) : (i > -1 && this.unexpected(i), this.parseFor(e, t));
|
|
@@ -621,7 +621,7 @@ C.parseReturnStatement = function(e) {
|
|
|
621
621
|
return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(p.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()), this.finishNode(e, "ReturnStatement");
|
|
622
622
|
};
|
|
623
623
|
C.parseSwitchStatement = function(e) {
|
|
624
|
-
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(p.braceL), this.labels.push(
|
|
624
|
+
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(p.braceL), this.labels.push(Kr), this.enterScope(0);
|
|
625
625
|
for (var t, i = !1; this.type !== p.braceR; )
|
|
626
626
|
if (this.type === p._case || this.type === p._default) {
|
|
627
627
|
var s = this.type === p._case;
|
|
@@ -633,10 +633,10 @@ C.parseSwitchStatement = function(e) {
|
|
|
633
633
|
C.parseThrowStatement = function(e) {
|
|
634
634
|
return this.next(), ue.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), e.argument = this.parseExpression(), this.semicolon(), this.finishNode(e, "ThrowStatement");
|
|
635
635
|
};
|
|
636
|
-
var
|
|
636
|
+
var Gr = [];
|
|
637
637
|
C.parseCatchClauseParam = function() {
|
|
638
638
|
var e = this.parseBindingAtom(), t = e.type === "Identifier";
|
|
639
|
-
return this.enterScope(t ?
|
|
639
|
+
return this.enterScope(t ? Ps : 0), this.checkLValPattern(e, t ? Es : je), this.expect(p.parenR), e;
|
|
640
640
|
};
|
|
641
641
|
C.parseTryStatement = function(e) {
|
|
642
642
|
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === p._catch) {
|
|
@@ -702,9 +702,9 @@ C.parseVar = function(e, t, i, s) {
|
|
|
702
702
|
C.parseVarId = function(e, t) {
|
|
703
703
|
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? bi : je, !1);
|
|
704
704
|
};
|
|
705
|
-
var vt = 1, ui = 2,
|
|
705
|
+
var vt = 1, ui = 2, Ns = 4;
|
|
706
706
|
C.parseFunction = function(e, t, i, s, a) {
|
|
707
|
-
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !s) && (this.type === p.star && t & ui && this.unexpected(), e.generator = this.eat(p.star)), this.options.ecmaVersion >= 8 && (e.async = !!s), t & vt && (e.id = t &
|
|
707
|
+
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !s) && (this.type === p.star && t & ui && this.unexpected(), e.generator = this.eat(p.star)), this.options.ecmaVersion >= 8 && (e.async = !!s), t & vt && (e.id = t & Ns && this.type !== p.name ? null : this.parseIdent(), e.id && !(t & ui) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? bi : je : Cs));
|
|
708
708
|
var o = this.yieldPos, h = this.awaitPos, d = this.awaitIdentPos;
|
|
709
709
|
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(gi(e.async, e.generator)), t & vt || (e.id = this.type === p.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, i, !1, a), this.yieldPos = o, this.awaitPos = h, this.awaitIdentPos = d, this.finishNode(e, t & vt ? "FunctionDeclaration" : "FunctionExpression");
|
|
710
710
|
};
|
|
@@ -718,7 +718,7 @@ C.parseClass = function(e, t) {
|
|
|
718
718
|
var s = this.enterClassBody(), a = this.startNode(), o = !1;
|
|
719
719
|
for (a.body = [], this.expect(p.braceL); this.type !== p.braceR; ) {
|
|
720
720
|
var h = this.parseClassElement(e.superClass !== null);
|
|
721
|
-
h && (a.body.push(h), h.type === "MethodDefinition" && h.kind === "constructor" ? (o && this.raiseRecoverable(h.start, "Duplicate constructor in the same class"), o = !0) : h.key && h.key.type === "PrivateIdentifier" &&
|
|
721
|
+
h && (a.body.push(h), h.type === "MethodDefinition" && h.kind === "constructor" ? (o && this.raiseRecoverable(h.start, "Duplicate constructor in the same class"), o = !0) : h.key && h.key.type === "PrivateIdentifier" && Jr(s, h) && this.raiseRecoverable(h.key.start, "Identifier '#" + h.key.name + "' has already been declared"));
|
|
722
722
|
}
|
|
723
723
|
return this.strict = i, this.next(), e.body = this.finishNode(a, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
724
724
|
};
|
|
@@ -784,7 +784,7 @@ C.exitClassBody = function() {
|
|
|
784
784
|
ht(t, h.name) || (a ? a.used.push(h) : this.raiseRecoverable(h.start, "Private field '#" + h.name + "' must be declared in an enclosing class"));
|
|
785
785
|
}
|
|
786
786
|
};
|
|
787
|
-
function
|
|
787
|
+
function Jr(e, t) {
|
|
788
788
|
var i = t.key.name, s = e[i], a = "true";
|
|
789
789
|
return t.type === "MethodDefinition" && (t.kind === "get" || t.kind === "set") && (a = (t.static ? "s" : "i") + t.kind), s === "iget" && a === "iset" || s === "iset" && a === "iget" || s === "sget" && a === "sset" || s === "sset" && a === "sget" ? (e[i] = "true", !1) : s ? !0 : (e[i] = a, !1);
|
|
790
790
|
}
|
|
@@ -823,7 +823,7 @@ C.parseExportDefaultDeclaration = function() {
|
|
|
823
823
|
var e;
|
|
824
824
|
if (this.type === p._function || (e = this.isAsyncFunction())) {
|
|
825
825
|
var t = this.startNode();
|
|
826
|
-
return this.next(), e && this.next(), this.parseFunction(t, vt |
|
|
826
|
+
return this.next(), e && this.next(), this.parseFunction(t, vt | Ns, !1, e);
|
|
827
827
|
} else if (this.type === p._class) {
|
|
828
828
|
var i = this.startNode();
|
|
829
829
|
return this.parseClass(i, "nullableID");
|
|
@@ -881,7 +881,7 @@ C.parseExportSpecifiers = function(e) {
|
|
|
881
881
|
return t;
|
|
882
882
|
};
|
|
883
883
|
C.parseImport = function(e) {
|
|
884
|
-
return this.next(), this.type === p.string ? (e.specifiers =
|
|
884
|
+
return this.next(), this.type === p.string ? (e.specifiers = Gr, e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === p.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ImportDeclaration");
|
|
885
885
|
};
|
|
886
886
|
C.parseImportSpecifier = function() {
|
|
887
887
|
var e = this.startNode();
|
|
@@ -932,7 +932,7 @@ C.parseImportAttribute = function() {
|
|
|
932
932
|
C.parseModuleExportName = function() {
|
|
933
933
|
if (this.options.ecmaVersion >= 13 && this.type === p.string) {
|
|
934
934
|
var e = this.parseLiteral(this.value);
|
|
935
|
-
return
|
|
935
|
+
return Zr.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e;
|
|
936
936
|
}
|
|
937
937
|
return this.parseIdent(!0);
|
|
938
938
|
};
|
|
@@ -1054,7 +1054,7 @@ Se.checkLValSimple = function(e, t, i) {
|
|
|
1054
1054
|
var s = t !== Rt;
|
|
1055
1055
|
switch (e.type) {
|
|
1056
1056
|
case "Identifier":
|
|
1057
|
-
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (s ? "Binding " : "Assigning to ") + e.name + " in strict mode"), s && (t === je && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), i && (ht(i, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), i[e.name] = !0), t !==
|
|
1057
|
+
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (s ? "Binding " : "Assigning to ") + e.name + " in strict mode"), s && (t === je && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), i && (ht(i, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), i[e.name] = !0), t !== Is && this.declareName(e.name, t, e.start));
|
|
1058
1058
|
break;
|
|
1059
1059
|
case "ChainExpression":
|
|
1060
1060
|
this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -1101,21 +1101,21 @@ Se.checkLValInnerPattern = function(e, t, i) {
|
|
|
1101
1101
|
this.checkLValPattern(e, t, i);
|
|
1102
1102
|
}
|
|
1103
1103
|
};
|
|
1104
|
-
var
|
|
1104
|
+
var oe = function(t, i, s, a, o) {
|
|
1105
1105
|
this.token = t, this.isExpr = !!i, this.preserveSpace = !!s, this.override = a, this.generator = !!o;
|
|
1106
1106
|
}, Z = {
|
|
1107
|
-
b_stat: new
|
|
1108
|
-
b_expr: new
|
|
1109
|
-
b_tmpl: new
|
|
1110
|
-
p_stat: new
|
|
1111
|
-
p_expr: new
|
|
1112
|
-
q_tmpl: new
|
|
1107
|
+
b_stat: new oe("{", !1),
|
|
1108
|
+
b_expr: new oe("{", !0),
|
|
1109
|
+
b_tmpl: new oe("${", !1),
|
|
1110
|
+
p_stat: new oe("(", !1),
|
|
1111
|
+
p_expr: new oe("(", !0),
|
|
1112
|
+
q_tmpl: new oe("`", !0, !0, function(e) {
|
|
1113
1113
|
return e.tryReadTemplateToken();
|
|
1114
1114
|
}),
|
|
1115
|
-
f_stat: new
|
|
1116
|
-
f_expr: new
|
|
1117
|
-
f_expr_gen: new
|
|
1118
|
-
f_gen: new
|
|
1115
|
+
f_stat: new oe("function", !1),
|
|
1116
|
+
f_expr: new oe("function", !0),
|
|
1117
|
+
f_expr_gen: new oe("function", !0, !1, null, !0),
|
|
1118
|
+
f_gen: new oe("function", !1, !1, null, !0)
|
|
1119
1119
|
}, lt = J.prototype;
|
|
1120
1120
|
lt.initialContext = function() {
|
|
1121
1121
|
return [Z.b_stat];
|
|
@@ -1264,7 +1264,7 @@ D.parseExprOp = function(e, t, i, s, a) {
|
|
|
1264
1264
|
d && (o = p.logicalAND.binop);
|
|
1265
1265
|
var y = this.value;
|
|
1266
1266
|
this.next();
|
|
1267
|
-
var u = this.start, T = this.startLoc,
|
|
1267
|
+
var u = this.start, T = this.startLoc, E = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, a), u, T, o, a), R = this.buildBinary(t, i, e, E, y, h || d);
|
|
1268
1268
|
return (h && this.type === p.coalesce || d && (this.type === p.logicalOR || this.type === p.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(R, t, i, s, a);
|
|
1269
1269
|
}
|
|
1270
1270
|
return e;
|
|
@@ -1280,7 +1280,7 @@ D.parseMaybeUnary = function(e, t, i, s) {
|
|
|
1280
1280
|
h = this.parseAwait(s), t = !0;
|
|
1281
1281
|
else if (this.type.prefix) {
|
|
1282
1282
|
var d = this.startNode(), y = this.type === p.incDec;
|
|
1283
|
-
d.operator = this.value, d.prefix = !0, this.next(), d.argument = this.parseMaybeUnary(null, !0, y, s), this.checkExpressionErrors(e, !0), y ? this.checkLValSimple(d.argument) : this.strict && d.operator === "delete" &&
|
|
1283
|
+
d.operator = this.value, d.prefix = !0, this.next(), d.argument = this.parseMaybeUnary(null, !0, y, s), this.checkExpressionErrors(e, !0), y ? this.checkLValSimple(d.argument) : this.strict && d.operator === "delete" && Ls(d.argument) ? this.raiseRecoverable(d.start, "Deleting local variable in strict mode") : d.operator === "delete" && ci(d.argument) ? this.raiseRecoverable(d.start, "Private fields can not be deleted") : t = !0, h = this.finishNode(d, y ? "UpdateExpression" : "UnaryExpression");
|
|
1284
1284
|
} else if (!t && this.type === p.privateId)
|
|
1285
1285
|
(s || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), h = this.parsePrivateIdent(), this.type !== p._in && this.unexpected();
|
|
1286
1286
|
else {
|
|
@@ -1299,8 +1299,8 @@ D.parseMaybeUnary = function(e, t, i, s) {
|
|
|
1299
1299
|
else
|
|
1300
1300
|
return h;
|
|
1301
1301
|
};
|
|
1302
|
-
function
|
|
1303
|
-
return e.type === "Identifier" || e.type === "ParenthesizedExpression" &&
|
|
1302
|
+
function Ls(e) {
|
|
1303
|
+
return e.type === "Identifier" || e.type === "ParenthesizedExpression" && Ls(e.expression);
|
|
1304
1304
|
}
|
|
1305
1305
|
function ci(e) {
|
|
1306
1306
|
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" && ci(e.expression) || e.type === "ParenthesizedExpression" && ci(e.expression);
|
|
@@ -1339,18 +1339,18 @@ D.parseSubscript = function(e, t, i, s, a, o, h) {
|
|
|
1339
1339
|
var T = this.startNodeAt(t, i);
|
|
1340
1340
|
T.object = e, u ? (T.property = this.parseExpression(), this.expect(p.bracketR)) : this.type === p.privateId && e.type !== "Super" ? T.property = this.parsePrivateIdent() : T.property = this.parseIdent(this.options.allowReserved !== "never"), T.computed = !!u, d && (T.optional = y), e = this.finishNode(T, "MemberExpression");
|
|
1341
1341
|
} else if (!s && this.eat(p.parenL)) {
|
|
1342
|
-
var
|
|
1342
|
+
var E = new qt(), R = this.yieldPos, W = this.awaitPos, xe = this.awaitIdentPos;
|
|
1343
1343
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
1344
|
-
var Me = this.parseExprList(p.parenR, this.options.ecmaVersion >= 8, !1,
|
|
1344
|
+
var Me = this.parseExprList(p.parenR, this.options.ecmaVersion >= 8, !1, E);
|
|
1345
1345
|
if (a && !y && this.shouldParseAsyncArrow())
|
|
1346
|
-
return this.checkPatternErrors(
|
|
1347
|
-
this.checkExpressionErrors(
|
|
1346
|
+
return this.checkPatternErrors(E, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = R, this.awaitPos = W, this.awaitIdentPos = xe, this.parseSubscriptAsyncArrow(t, i, Me, h);
|
|
1347
|
+
this.checkExpressionErrors(E, !0), this.yieldPos = R || this.yieldPos, this.awaitPos = W || this.awaitPos, this.awaitIdentPos = xe || this.awaitIdentPos;
|
|
1348
1348
|
var M = this.startNodeAt(t, i);
|
|
1349
1349
|
M.callee = e, M.arguments = Me, d && (M.optional = y), e = this.finishNode(M, "CallExpression");
|
|
1350
1350
|
} else if (this.type === p.backQuote) {
|
|
1351
1351
|
(y || o) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
1352
|
-
var
|
|
1353
|
-
|
|
1352
|
+
var re = this.startNodeAt(t, i);
|
|
1353
|
+
re.tag = e, re.quasi = this.parseTemplate({ isTagged: !0 }), e = this.finishNode(re, "TaggedTemplateExpression");
|
|
1354
1354
|
}
|
|
1355
1355
|
return e;
|
|
1356
1356
|
};
|
|
@@ -1384,8 +1384,8 @@ D.parseExprAtom = function(e, t, i) {
|
|
|
1384
1384
|
case p._false:
|
|
1385
1385
|
return s = this.startNode(), s.value = this.type === p._null ? null : this.type === p._true, s.raw = this.type.keyword, this.next(), this.finishNode(s, "Literal");
|
|
1386
1386
|
case p.parenL:
|
|
1387
|
-
var T = this.start,
|
|
1388
|
-
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(
|
|
1387
|
+
var T = this.start, E = this.parseParenAndDistinguishExpression(a, t);
|
|
1388
|
+
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(E) && (e.parenthesizedAssign = T), e.parenthesizedBind < 0 && (e.parenthesizedBind = T)), E;
|
|
1389
1389
|
case p.bracketL:
|
|
1390
1390
|
return s = this.startNode(), this.next(), s.elements = this.parseExprList(p.bracketR, !0, !0, e), this.finishNode(s, "ArrayExpression");
|
|
1391
1391
|
case p.braceL:
|
|
@@ -1447,28 +1447,28 @@ D.parseParenAndDistinguishExpression = function(e, t) {
|
|
|
1447
1447
|
var i = this.start, s = this.startLoc, a, o = this.options.ecmaVersion >= 8;
|
|
1448
1448
|
if (this.options.ecmaVersion >= 6) {
|
|
1449
1449
|
this.next();
|
|
1450
|
-
var h = this.start, d = this.startLoc, y = [], u = !0, T = !1,
|
|
1450
|
+
var h = this.start, d = this.startLoc, y = [], u = !0, T = !1, E = new qt(), R = this.yieldPos, W = this.awaitPos, xe;
|
|
1451
1451
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== p.parenR; )
|
|
1452
1452
|
if (u ? u = !1 : this.expect(p.comma), o && this.afterTrailingComma(p.parenR, !0)) {
|
|
1453
1453
|
T = !0;
|
|
1454
1454
|
break;
|
|
1455
1455
|
} else if (this.type === p.ellipsis) {
|
|
1456
|
-
|
|
1456
|
+
xe = this.start, y.push(this.parseParenItem(this.parseRestBinding())), this.type === p.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
|
-
y.push(this.parseMaybeAssign(!1,
|
|
1462
|
+
y.push(this.parseMaybeAssign(!1, E, this.parseParenItem));
|
|
1463
1463
|
var Me = this.lastTokEnd, M = this.lastTokEndLoc;
|
|
1464
1464
|
if (this.expect(p.parenR), e && this.shouldParseArrow(y) && this.eat(p.arrow))
|
|
1465
|
-
return this.checkPatternErrors(
|
|
1466
|
-
(!y.length || T) && this.unexpected(this.lastTokStart),
|
|
1465
|
+
return this.checkPatternErrors(E, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = R, this.awaitPos = W, this.parseParenArrowList(i, s, y, t);
|
|
1466
|
+
(!y.length || T) && this.unexpected(this.lastTokStart), xe && this.unexpected(xe), this.checkExpressionErrors(E, !0), this.yieldPos = R || this.yieldPos, this.awaitPos = W || this.awaitPos, y.length > 1 ? (a = this.startNodeAt(h, d), a.expressions = y, this.finishNodeAt(a, "SequenceExpression", Me, M)) : a = y[0];
|
|
1467
1467
|
} else
|
|
1468
1468
|
a = this.parseParenExpression();
|
|
1469
1469
|
if (this.options.preserveParens) {
|
|
1470
|
-
var
|
|
1471
|
-
return
|
|
1470
|
+
var re = this.startNodeAt(i, s);
|
|
1471
|
+
return re.expression = a, this.finishNode(re, "ParenthesizedExpression");
|
|
1472
1472
|
} else
|
|
1473
1473
|
return a;
|
|
1474
1474
|
};
|
|
@@ -1478,7 +1478,7 @@ D.parseParenItem = function(e) {
|
|
|
1478
1478
|
D.parseParenArrowList = function(e, t, i, s) {
|
|
1479
1479
|
return this.parseArrowExpression(this.startNodeAt(e, t), i, !1, s);
|
|
1480
1480
|
};
|
|
1481
|
-
var
|
|
1481
|
+
var Xr = [];
|
|
1482
1482
|
D.parseNew = function() {
|
|
1483
1483
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
1484
1484
|
var e = this.startNode();
|
|
@@ -1489,7 +1489,7 @@ D.parseNew = function() {
|
|
|
1489
1489
|
return e.property = this.parseIdent(!0), e.property.name !== "target" && this.raiseRecoverable(e.property.start, "The only valid meta property for new is 'new.target'"), i && this.raiseRecoverable(e.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(e.start, "'new.target' can only be used in functions and class static block"), this.finishNode(e, "MetaProperty");
|
|
1490
1490
|
}
|
|
1491
1491
|
var s = this.start, a = this.startLoc;
|
|
1492
|
-
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), s, a, !0, !1), this.eat(p.parenL) ? e.arguments = this.parseExprList(p.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments =
|
|
1492
|
+
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), s, a, !0, !1), this.eat(p.parenL) ? e.arguments = this.parseExprList(p.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments = Xr, this.finishNode(e, "NewExpression");
|
|
1493
1493
|
};
|
|
1494
1494
|
D.parseTemplateElement = function(e) {
|
|
1495
1495
|
var t = e.isTagged, i = this.startNode();
|
|
@@ -1563,7 +1563,7 @@ D.initFunction = function(e) {
|
|
|
1563
1563
|
};
|
|
1564
1564
|
D.parseMethod = function(e, t, i) {
|
|
1565
1565
|
var s = this.startNode(), a = this.yieldPos, o = this.awaitPos, h = this.awaitIdentPos;
|
|
1566
|
-
return this.initFunction(s), this.options.ecmaVersion >= 6 && (s.generator = e), this.options.ecmaVersion >= 8 && (s.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(gi(t, s.generator) | Ut | (i ?
|
|
1566
|
+
return this.initFunction(s), this.options.ecmaVersion >= 6 && (s.generator = e), this.options.ecmaVersion >= 8 && (s.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(gi(t, s.generator) | Ut | (i ? As : 0)), this.expect(p.parenL), s.params = this.parseBindingList(p.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(s, !1, !0, !1), this.yieldPos = a, this.awaitPos = o, this.awaitIdentPos = h, this.finishNode(s, "FunctionExpression");
|
|
1567
1567
|
};
|
|
1568
1568
|
D.parseArrowExpression = function(e, t, i, s) {
|
|
1569
1569
|
var a = this.yieldPos, o = this.awaitPos, h = this.awaitIdentPos;
|
|
@@ -1577,7 +1577,7 @@ D.parseFunctionBody = function(e, t, i, s) {
|
|
|
1577
1577
|
var d = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e.params);
|
|
1578
1578
|
(!o || d) && (h = this.strictDirective(this.end), h && d && this.raiseRecoverable(e.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
|
|
1579
1579
|
var y = this.labels;
|
|
1580
|
-
this.labels = [], h && (this.strict = !0), this.checkParams(e, !o && !h && !t && !i && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id,
|
|
1580
|
+
this.labels = [], h && (this.strict = !0), this.checkParams(e, !o && !h && !t && !i && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id, Is), e.body = this.parseBlock(!1, void 0, h && !o), e.expression = !1, this.adaptDirectivePrologue(e.body.body), this.labels = y;
|
|
1581
1581
|
}
|
|
1582
1582
|
this.exitScope();
|
|
1583
1583
|
};
|
|
@@ -1647,11 +1647,11 @@ zt.curPosition = function() {
|
|
|
1647
1647
|
if (this.options.locations)
|
|
1648
1648
|
return new at(this.curLine, this.pos - this.lineStart);
|
|
1649
1649
|
};
|
|
1650
|
-
var We = J.prototype,
|
|
1650
|
+
var We = J.prototype, Qr = function(t) {
|
|
1651
1651
|
this.flags = t, this.var = [], this.lexical = [], this.functions = [];
|
|
1652
1652
|
};
|
|
1653
1653
|
We.enterScope = function(e) {
|
|
1654
|
-
this.scopeStack.push(new
|
|
1654
|
+
this.scopeStack.push(new Qr(e));
|
|
1655
1655
|
};
|
|
1656
1656
|
We.exitScope = function() {
|
|
1657
1657
|
this.scopeStack.pop();
|
|
@@ -1664,16 +1664,16 @@ We.declareName = function(e, t, i) {
|
|
|
1664
1664
|
if (t === je) {
|
|
1665
1665
|
var a = this.currentScope();
|
|
1666
1666
|
s = a.lexical.indexOf(e) > -1 || a.functions.indexOf(e) > -1 || a.var.indexOf(e) > -1, a.lexical.push(e), this.inModule && a.flags & gt && delete this.undefinedExports[e];
|
|
1667
|
-
} else if (t ===
|
|
1667
|
+
} else if (t === Es) {
|
|
1668
1668
|
var o = this.currentScope();
|
|
1669
1669
|
o.lexical.push(e);
|
|
1670
|
-
} else if (t ===
|
|
1670
|
+
} else if (t === Cs) {
|
|
1671
1671
|
var h = this.currentScope();
|
|
1672
1672
|
this.treatFunctionsAsVar ? s = h.lexical.indexOf(e) > -1 : s = h.lexical.indexOf(e) > -1 || h.var.indexOf(e) > -1, h.functions.push(e);
|
|
1673
1673
|
} else
|
|
1674
1674
|
for (var d = this.scopeStack.length - 1; d >= 0; --d) {
|
|
1675
1675
|
var y = this.scopeStack[d];
|
|
1676
|
-
if (y.lexical.indexOf(e) > -1 && !(y.flags &
|
|
1676
|
+
if (y.lexical.indexOf(e) > -1 && !(y.flags & Ps && y.lexical[0] === e) || !this.treatFunctionsAsVarInScope(y) && y.functions.indexOf(e) > -1) {
|
|
1677
1677
|
s = !0;
|
|
1678
1678
|
break;
|
|
1679
1679
|
}
|
|
@@ -1711,14 +1711,14 @@ St.startNode = function() {
|
|
|
1711
1711
|
St.startNodeAt = function(e, t) {
|
|
1712
1712
|
return new Tt(this, e, t);
|
|
1713
1713
|
};
|
|
1714
|
-
function
|
|
1714
|
+
function Os(e, t, i, s) {
|
|
1715
1715
|
return e.type = t, e.end = i, this.options.locations && (e.loc.end = s), this.options.ranges && (e.range[1] = i), e;
|
|
1716
1716
|
}
|
|
1717
1717
|
St.finishNode = function(e, t) {
|
|
1718
|
-
return
|
|
1718
|
+
return Os.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc);
|
|
1719
1719
|
};
|
|
1720
1720
|
St.finishNodeAt = function(e, t, i, s) {
|
|
1721
|
-
return
|
|
1721
|
+
return Os.call(this, e, t, i, s);
|
|
1722
1722
|
};
|
|
1723
1723
|
St.copyNode = function(e) {
|
|
1724
1724
|
var t = new Tt(this, e.start, this.startLoc);
|
|
@@ -1726,42 +1726,42 @@ St.copyNode = function(e) {
|
|
|
1726
1726
|
t[i] = e[i];
|
|
1727
1727
|
return t;
|
|
1728
1728
|
};
|
|
1729
|
-
var
|
|
1730
|
-
9:
|
|
1731
|
-
10:
|
|
1732
|
-
11:
|
|
1733
|
-
12:
|
|
1734
|
-
13:
|
|
1735
|
-
14:
|
|
1736
|
-
},
|
|
1729
|
+
var Yr = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz", Ms = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", Rs = Ms + " Extended_Pictographic", Ds = Rs, zs = Ds + " EBase EComp EMod EPres ExtPict", Vs = zs, ea = Vs, ta = {
|
|
1730
|
+
9: Ms,
|
|
1731
|
+
10: Rs,
|
|
1732
|
+
11: Ds,
|
|
1733
|
+
12: zs,
|
|
1734
|
+
13: Vs,
|
|
1735
|
+
14: ea
|
|
1736
|
+
}, ia = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji", sa = {
|
|
1737
1737
|
9: "",
|
|
1738
1738
|
10: "",
|
|
1739
1739
|
11: "",
|
|
1740
1740
|
12: "",
|
|
1741
1741
|
13: "",
|
|
1742
|
-
14:
|
|
1743
|
-
}, Vi = "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",
|
|
1744
|
-
9:
|
|
1745
|
-
10:
|
|
1746
|
-
11:
|
|
1747
|
-
12:
|
|
1748
|
-
13:
|
|
1749
|
-
14:
|
|
1750
|
-
},
|
|
1751
|
-
function
|
|
1752
|
-
var t =
|
|
1753
|
-
binary: Ue(
|
|
1754
|
-
binaryOfStrings: Ue(
|
|
1742
|
+
14: ia
|
|
1743
|
+
}, Vi = "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", js = "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", Fs = js + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", Bs = Fs + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", $s = Bs + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", Us = $s + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", ra = Us + " " + Yr, aa = {
|
|
1744
|
+
9: js,
|
|
1745
|
+
10: Fs,
|
|
1746
|
+
11: Bs,
|
|
1747
|
+
12: $s,
|
|
1748
|
+
13: Us,
|
|
1749
|
+
14: ra
|
|
1750
|
+
}, Zs = {};
|
|
1751
|
+
function na(e) {
|
|
1752
|
+
var t = Zs[e] = {
|
|
1753
|
+
binary: Ue(ta[e] + " " + Vi),
|
|
1754
|
+
binaryOfStrings: Ue(sa[e]),
|
|
1755
1755
|
nonBinary: {
|
|
1756
1756
|
General_Category: Ue(Vi),
|
|
1757
|
-
Script: Ue(
|
|
1757
|
+
Script: Ue(aa[e])
|
|
1758
1758
|
}
|
|
1759
1759
|
};
|
|
1760
1760
|
t.nonBinary.Script_Extensions = t.nonBinary.Script, t.nonBinary.gc = t.nonBinary.General_Category, t.nonBinary.sc = t.nonBinary.Script, t.nonBinary.scx = t.nonBinary.Script_Extensions;
|
|
1761
1761
|
}
|
|
1762
1762
|
for (var ii = 0, ji = [9, 10, 11, 12, 13, 14]; ii < ji.length; ii += 1) {
|
|
1763
|
-
var
|
|
1764
|
-
|
|
1763
|
+
var oa = ji[ii];
|
|
1764
|
+
na(oa);
|
|
1765
1765
|
}
|
|
1766
1766
|
var P = J.prototype, Vt = function(t, i) {
|
|
1767
1767
|
this.parent = t, this.base = i || this;
|
|
@@ -1777,7 +1777,7 @@ Vt.prototype.sibling = function() {
|
|
|
1777
1777
|
return new Vt(this.parent, this.base);
|
|
1778
1778
|
};
|
|
1779
1779
|
var Ne = function(t) {
|
|
1780
|
-
this.parser = t, this.validFlags = "gim" + (t.options.ecmaVersion >= 6 ? "uy" : "") + (t.options.ecmaVersion >= 9 ? "s" : "") + (t.options.ecmaVersion >= 13 ? "d" : "") + (t.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties =
|
|
1780
|
+
this.parser = t, this.validFlags = "gim" + (t.options.ecmaVersion >= 6 ? "uy" : "") + (t.options.ecmaVersion >= 9 ? "s" : "") + (t.options.ecmaVersion >= 13 ? "d" : "") + (t.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = Zs[t.options.ecmaVersion >= 14 ? 14 : t.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = /* @__PURE__ */ Object.create(null), this.backReferenceNames = [], this.branchID = null;
|
|
1781
1781
|
};
|
|
1782
1782
|
Ne.prototype.reset = function(t, i, s) {
|
|
1783
1783
|
var a = s.indexOf("v") !== -1, o = s.indexOf("u") !== -1;
|
|
@@ -1834,13 +1834,13 @@ P.validateRegExpFlags = function(e) {
|
|
|
1834
1834
|
}
|
|
1835
1835
|
this.options.ecmaVersion >= 15 && s && a && this.raise(e.start, "Invalid regular expression flag");
|
|
1836
1836
|
};
|
|
1837
|
-
function
|
|
1837
|
+
function ua(e) {
|
|
1838
1838
|
for (var t in e)
|
|
1839
1839
|
return !0;
|
|
1840
1840
|
return !1;
|
|
1841
1841
|
}
|
|
1842
1842
|
P.validateRegExpPattern = function(e) {
|
|
1843
|
-
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 &&
|
|
1843
|
+
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && ua(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e));
|
|
1844
1844
|
};
|
|
1845
1845
|
P.regexp_pattern = function(e) {
|
|
1846
1846
|
e.pos = 0, e.lastIntValue = 0, e.lastStringValue = "", e.lastAssertionIsQuantifiable = !1, e.numCapturingParens = 0, e.maxBackReference = 0, e.groupNames = /* @__PURE__ */ Object.create(null), e.backReferenceNames.length = 0, e.branchID = null, this.regexp_disjunction(e), e.pos !== e.source.length && (e.eat(
|
|
@@ -2042,11 +2042,11 @@ P.regexp_eatCapturingGroup = function(e) {
|
|
|
2042
2042
|
return !1;
|
|
2043
2043
|
};
|
|
2044
2044
|
P.regexp_eatModifiers = function(e) {
|
|
2045
|
-
for (var t = "", i = 0; (i = e.current()) !== -1 &&
|
|
2045
|
+
for (var t = "", i = 0; (i = e.current()) !== -1 && ca(i); )
|
|
2046
2046
|
t += De(i), e.advance();
|
|
2047
2047
|
return t;
|
|
2048
2048
|
};
|
|
2049
|
-
function
|
|
2049
|
+
function ca(e) {
|
|
2050
2050
|
return e === 105 || e === 109 || e === 115;
|
|
2051
2051
|
}
|
|
2052
2052
|
P.regexp_eatExtendedAtom = function(e) {
|
|
@@ -2060,13 +2060,13 @@ P.regexp_eatInvalidBracedQuantifier = function(e) {
|
|
|
2060
2060
|
};
|
|
2061
2061
|
P.regexp_eatSyntaxCharacter = function(e) {
|
|
2062
2062
|
var t = e.current();
|
|
2063
|
-
return
|
|
2063
|
+
return qs(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2064
2064
|
};
|
|
2065
|
-
function
|
|
2065
|
+
function qs(e) {
|
|
2066
2066
|
return e === 36 || e >= 40 && e <= 43 || e === 46 || e === 63 || e >= 91 && e <= 94 || e >= 123 && e <= 125;
|
|
2067
2067
|
}
|
|
2068
2068
|
P.regexp_eatPatternCharacters = function(e) {
|
|
2069
|
-
for (var t = e.pos, i = 0; (i = e.current()) !== -1 && !
|
|
2069
|
+
for (var t = e.pos, i = 0; (i = e.current()) !== -1 && !qs(i); )
|
|
2070
2070
|
e.advance();
|
|
2071
2071
|
return e.pos !== t;
|
|
2072
2072
|
};
|
|
@@ -2116,16 +2116,16 @@ P.regexp_eatRegExpIdentifierName = function(e) {
|
|
|
2116
2116
|
};
|
|
2117
2117
|
P.regexp_eatRegExpIdentifierStart = function(e) {
|
|
2118
2118
|
var t = e.pos, i = this.options.ecmaVersion >= 11, s = e.current(i);
|
|
2119
|
-
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue),
|
|
2119
|
+
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue), ha(s) ? (e.lastIntValue = s, !0) : (e.pos = t, !1);
|
|
2120
2120
|
};
|
|
2121
|
-
function
|
|
2121
|
+
function ha(e) {
|
|
2122
2122
|
return Ae(e, !0) || e === 36 || e === 95;
|
|
2123
2123
|
}
|
|
2124
2124
|
P.regexp_eatRegExpIdentifierPart = function(e) {
|
|
2125
2125
|
var t = e.pos, i = this.options.ecmaVersion >= 11, s = e.current(i);
|
|
2126
|
-
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue),
|
|
2126
|
+
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue), pa(s) ? (e.lastIntValue = s, !0) : (e.pos = t, !1);
|
|
2127
2127
|
};
|
|
2128
|
-
function
|
|
2128
|
+
function pa(e) {
|
|
2129
2129
|
return Re(e, !0) || e === 36 || e === 95 || e === 8204 || e === 8205;
|
|
2130
2130
|
}
|
|
2131
2131
|
P.regexp_eatAtomEscape = function(e) {
|
|
@@ -2178,9 +2178,9 @@ P.regexp_eatControlEscape = function(e) {
|
|
|
2178
2178
|
};
|
|
2179
2179
|
P.regexp_eatControlLetter = function(e) {
|
|
2180
2180
|
var t = e.current();
|
|
2181
|
-
return
|
|
2181
|
+
return Hs(t) ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
2182
2182
|
};
|
|
2183
|
-
function
|
|
2183
|
+
function Hs(e) {
|
|
2184
2184
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
2185
2185
|
}
|
|
2186
2186
|
P.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
@@ -2215,13 +2215,13 @@ P.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
|
2215
2215
|
) && this.regexp_eatHexDigits(e) && e.eat(
|
|
2216
2216
|
125
|
|
2217
2217
|
/* } */
|
|
2218
|
-
) &&
|
|
2218
|
+
) && la(e.lastIntValue))
|
|
2219
2219
|
return !0;
|
|
2220
2220
|
s && e.raise("Invalid unicode escape"), e.pos = i;
|
|
2221
2221
|
}
|
|
2222
2222
|
return !1;
|
|
2223
2223
|
};
|
|
2224
|
-
function
|
|
2224
|
+
function la(e) {
|
|
2225
2225
|
return e >= 0 && e <= 1114111;
|
|
2226
2226
|
}
|
|
2227
2227
|
P.regexp_eatIdentityEscape = function(e) {
|
|
@@ -2244,10 +2244,10 @@ P.regexp_eatDecimalEscape = function(e) {
|
|
|
2244
2244
|
}
|
|
2245
2245
|
return !1;
|
|
2246
2246
|
};
|
|
2247
|
-
var
|
|
2247
|
+
var Ws = 0, ze = 1, we = 2;
|
|
2248
2248
|
P.regexp_eatCharacterClassEscape = function(e) {
|
|
2249
2249
|
var t = e.current();
|
|
2250
|
-
if (
|
|
2250
|
+
if (fa(t))
|
|
2251
2251
|
return e.lastIntValue = -1, e.advance(), ze;
|
|
2252
2252
|
var i = !1;
|
|
2253
2253
|
if (e.switchU && this.options.ecmaVersion >= 9 && ((i = t === 80) || t === 112)) {
|
|
@@ -2263,9 +2263,9 @@ P.regexp_eatCharacterClassEscape = function(e) {
|
|
|
2263
2263
|
return i && s === we && e.raise("Invalid property name"), s;
|
|
2264
2264
|
e.raise("Invalid property name");
|
|
2265
2265
|
}
|
|
2266
|
-
return
|
|
2266
|
+
return Ws;
|
|
2267
2267
|
};
|
|
2268
|
-
function
|
|
2268
|
+
function fa(e) {
|
|
2269
2269
|
return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87;
|
|
2270
2270
|
}
|
|
2271
2271
|
P.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
@@ -2284,7 +2284,7 @@ P.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
|
2284
2284
|
var a = e.lastStringValue;
|
|
2285
2285
|
return this.regexp_validateUnicodePropertyNameOrValue(e, a);
|
|
2286
2286
|
}
|
|
2287
|
-
return
|
|
2287
|
+
return Ws;
|
|
2288
2288
|
};
|
|
2289
2289
|
P.regexp_validateUnicodePropertyNameAndValue = function(e, t, i) {
|
|
2290
2290
|
ht(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(i) || e.raise("Invalid property value");
|
|
@@ -2298,21 +2298,21 @@ P.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
|
2298
2298
|
};
|
|
2299
2299
|
P.regexp_eatUnicodePropertyName = function(e) {
|
|
2300
2300
|
var t = 0;
|
|
2301
|
-
for (e.lastStringValue = "";
|
|
2301
|
+
for (e.lastStringValue = ""; Ks(t = e.current()); )
|
|
2302
2302
|
e.lastStringValue += De(t), e.advance();
|
|
2303
2303
|
return e.lastStringValue !== "";
|
|
2304
2304
|
};
|
|
2305
|
-
function
|
|
2306
|
-
return
|
|
2305
|
+
function Ks(e) {
|
|
2306
|
+
return Hs(e) || e === 95;
|
|
2307
2307
|
}
|
|
2308
2308
|
P.regexp_eatUnicodePropertyValue = function(e) {
|
|
2309
2309
|
var t = 0;
|
|
2310
|
-
for (e.lastStringValue = "";
|
|
2310
|
+
for (e.lastStringValue = ""; da(t = e.current()); )
|
|
2311
2311
|
e.lastStringValue += De(t), e.advance();
|
|
2312
2312
|
return e.lastStringValue !== "";
|
|
2313
2313
|
};
|
|
2314
|
-
function
|
|
2315
|
-
return
|
|
2314
|
+
function da(e) {
|
|
2315
|
+
return Ks(e) || Ht(e);
|
|
2316
2316
|
}
|
|
2317
2317
|
P.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
2318
2318
|
return this.regexp_eatUnicodePropertyValue(e);
|
|
@@ -2358,7 +2358,7 @@ P.regexp_eatClassAtom = function(e) {
|
|
|
2358
2358
|
return !0;
|
|
2359
2359
|
if (e.switchU) {
|
|
2360
2360
|
var i = e.current();
|
|
2361
|
-
(i === 99 ||
|
|
2361
|
+
(i === 99 || Xs(i)) && e.raise("Invalid class escape"), e.raise("Invalid escape");
|
|
2362
2362
|
}
|
|
2363
2363
|
e.pos = t;
|
|
2364
2364
|
}
|
|
@@ -2511,19 +2511,19 @@ P.regexp_eatClassSetCharacter = function(e) {
|
|
|
2511
2511
|
/* b */
|
|
2512
2512
|
) ? (e.lastIntValue = 8, !0) : (e.pos = t, !1);
|
|
2513
2513
|
var i = e.current();
|
|
2514
|
-
return i < 0 || i === e.lookahead() &&
|
|
2514
|
+
return i < 0 || i === e.lookahead() && ma(i) || ya(i) ? !1 : (e.advance(), e.lastIntValue = i, !0);
|
|
2515
2515
|
};
|
|
2516
|
-
function
|
|
2516
|
+
function ma(e) {
|
|
2517
2517
|
return e === 33 || e >= 35 && e <= 38 || e >= 42 && e <= 44 || e === 46 || e >= 58 && e <= 64 || e === 94 || e === 96 || e === 126;
|
|
2518
2518
|
}
|
|
2519
|
-
function
|
|
2519
|
+
function ya(e) {
|
|
2520
2520
|
return e === 40 || e === 41 || e === 45 || e === 47 || e >= 91 && e <= 93 || e >= 123 && e <= 125;
|
|
2521
2521
|
}
|
|
2522
2522
|
P.regexp_eatClassSetReservedPunctuator = function(e) {
|
|
2523
2523
|
var t = e.current();
|
|
2524
|
-
return
|
|
2524
|
+
return va(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2525
2525
|
};
|
|
2526
|
-
function
|
|
2526
|
+
function va(e) {
|
|
2527
2527
|
return e === 33 || e === 35 || e === 37 || e === 38 || e === 44 || e === 45 || e >= 58 && e <= 62 || e === 64 || e === 96 || e === 126;
|
|
2528
2528
|
}
|
|
2529
2529
|
P.regexp_eatClassControlLetter = function(e) {
|
|
@@ -2553,14 +2553,14 @@ function Ht(e) {
|
|
|
2553
2553
|
}
|
|
2554
2554
|
P.regexp_eatHexDigits = function(e) {
|
|
2555
2555
|
var t = e.pos, i = 0;
|
|
2556
|
-
for (e.lastIntValue = 0;
|
|
2557
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
2556
|
+
for (e.lastIntValue = 0; Gs(i = e.current()); )
|
|
2557
|
+
e.lastIntValue = 16 * e.lastIntValue + Js(i), e.advance();
|
|
2558
2558
|
return e.pos !== t;
|
|
2559
2559
|
};
|
|
2560
|
-
function
|
|
2560
|
+
function Gs(e) {
|
|
2561
2561
|
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
2562
2562
|
}
|
|
2563
|
-
function
|
|
2563
|
+
function Js(e) {
|
|
2564
2564
|
return e >= 65 && e <= 70 ? 10 + (e - 65) : e >= 97 && e <= 102 ? 10 + (e - 97) : e - 48;
|
|
2565
2565
|
}
|
|
2566
2566
|
P.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
@@ -2577,9 +2577,9 @@ P.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
|
2577
2577
|
};
|
|
2578
2578
|
P.regexp_eatOctalDigit = function(e) {
|
|
2579
2579
|
var t = e.current();
|
|
2580
|
-
return
|
|
2580
|
+
return Xs(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1);
|
|
2581
2581
|
};
|
|
2582
|
-
function
|
|
2582
|
+
function Xs(e) {
|
|
2583
2583
|
return e >= 48 && e <= 55;
|
|
2584
2584
|
}
|
|
2585
2585
|
P.regexp_eatFixedHexDigits = function(e, t) {
|
|
@@ -2587,9 +2587,9 @@ P.regexp_eatFixedHexDigits = function(e, t) {
|
|
|
2587
2587
|
e.lastIntValue = 0;
|
|
2588
2588
|
for (var s = 0; s < t; ++s) {
|
|
2589
2589
|
var a = e.current();
|
|
2590
|
-
if (!
|
|
2590
|
+
if (!Gs(a))
|
|
2591
2591
|
return e.pos = i, !1;
|
|
2592
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
2592
|
+
e.lastIntValue = 16 * e.lastIntValue + Js(a), e.advance();
|
|
2593
2593
|
}
|
|
2594
2594
|
return !0;
|
|
2595
2595
|
};
|
|
@@ -2635,7 +2635,7 @@ j.fullCharCodeAtPos = function() {
|
|
|
2635
2635
|
j.skipBlockComment = function() {
|
|
2636
2636
|
var e = this.options.onComment && this.curPosition(), t = this.pos, i = this.input.indexOf("*/", this.pos += 2);
|
|
2637
2637
|
if (i === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = i + 2, this.options.locations)
|
|
2638
|
-
for (var s = void 0, a = t; (s =
|
|
2638
|
+
for (var s = void 0, a = t; (s = Ts(this.input, a, this.pos)) > -1; )
|
|
2639
2639
|
++this.curLine, a = this.lineStart = s;
|
|
2640
2640
|
this.options.onComment && this.options.onComment(
|
|
2641
2641
|
!0,
|
|
@@ -2890,28 +2890,28 @@ j.readRegexp = function() {
|
|
|
2890
2890
|
};
|
|
2891
2891
|
j.readInt = function(e, t, i) {
|
|
2892
2892
|
for (var s = this.options.ecmaVersion >= 12 && t === void 0, a = i && this.input.charCodeAt(this.pos) === 48, o = this.pos, h = 0, d = 0, y = 0, u = t ?? 1 / 0; y < u; ++y, ++this.pos) {
|
|
2893
|
-
var T = this.input.charCodeAt(this.pos),
|
|
2893
|
+
var T = this.input.charCodeAt(this.pos), E = void 0;
|
|
2894
2894
|
if (s && T === 95) {
|
|
2895
2895
|
a && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), d === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), y === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), d = T;
|
|
2896
2896
|
continue;
|
|
2897
2897
|
}
|
|
2898
|
-
if (T >= 97 ?
|
|
2898
|
+
if (T >= 97 ? E = T - 97 + 10 : T >= 65 ? E = T - 65 + 10 : T >= 48 && T <= 57 ? E = T - 48 : E = 1 / 0, E >= e)
|
|
2899
2899
|
break;
|
|
2900
|
-
d = T, h = h * e +
|
|
2900
|
+
d = T, h = h * e + E;
|
|
2901
2901
|
}
|
|
2902
2902
|
return s && d === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === o || t != null && this.pos - o !== t ? null : h;
|
|
2903
2903
|
};
|
|
2904
|
-
function
|
|
2904
|
+
function xa(e, t) {
|
|
2905
2905
|
return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, ""));
|
|
2906
2906
|
}
|
|
2907
|
-
function
|
|
2907
|
+
function Qs(e) {
|
|
2908
2908
|
return typeof BigInt != "function" ? null : BigInt(e.replace(/_/g, ""));
|
|
2909
2909
|
}
|
|
2910
2910
|
j.readRadixNumber = function(e) {
|
|
2911
2911
|
var t = this.pos;
|
|
2912
2912
|
this.pos += 2;
|
|
2913
2913
|
var i = this.readInt(e);
|
|
2914
|
-
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i =
|
|
2914
|
+
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i = Qs(this.input.slice(t, this.pos)), ++this.pos) : Ae(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(p.num, i);
|
|
2915
2915
|
};
|
|
2916
2916
|
j.readNumber = function(e) {
|
|
2917
2917
|
var t = this.pos;
|
|
@@ -2920,11 +2920,11 @@ j.readNumber = function(e) {
|
|
|
2920
2920
|
i && this.strict && this.raise(t, "Invalid number");
|
|
2921
2921
|
var s = this.input.charCodeAt(this.pos);
|
|
2922
2922
|
if (!i && !e && this.options.ecmaVersion >= 11 && s === 110) {
|
|
2923
|
-
var a =
|
|
2923
|
+
var a = Qs(this.input.slice(t, this.pos));
|
|
2924
2924
|
return ++this.pos, Ae(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(p.num, a);
|
|
2925
2925
|
}
|
|
2926
2926
|
i && /[89]/.test(this.input.slice(t, this.pos)) && (i = !1), s === 46 && !i && (++this.pos, this.readInt(10), s = this.input.charCodeAt(this.pos)), (s === 69 || s === 101) && !i && (s = this.input.charCodeAt(++this.pos), (s === 43 || s === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")), Ae(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
2927
|
-
var o =
|
|
2927
|
+
var o = xa(this.input.slice(t, this.pos), i);
|
|
2928
2928
|
return this.finishToken(p.num, o);
|
|
2929
2929
|
};
|
|
2930
2930
|
j.readCodePoint = function() {
|
|
@@ -2947,13 +2947,13 @@ j.readString = function(e) {
|
|
|
2947
2947
|
}
|
|
2948
2948
|
return t += this.input.slice(i, this.pos++), this.finishToken(p.string, t);
|
|
2949
2949
|
};
|
|
2950
|
-
var
|
|
2950
|
+
var Ys = {};
|
|
2951
2951
|
j.tryReadTemplateToken = function() {
|
|
2952
2952
|
this.inTemplateElement = !0;
|
|
2953
2953
|
try {
|
|
2954
2954
|
this.readTmplToken();
|
|
2955
2955
|
} catch (e) {
|
|
2956
|
-
if (e ===
|
|
2956
|
+
if (e === Ys)
|
|
2957
2957
|
this.readInvalidTemplateToken();
|
|
2958
2958
|
else
|
|
2959
2959
|
throw e;
|
|
@@ -2962,7 +2962,7 @@ j.tryReadTemplateToken = function() {
|
|
|
2962
2962
|
};
|
|
2963
2963
|
j.invalidStringToken = function(e, t) {
|
|
2964
2964
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9)
|
|
2965
|
-
throw
|
|
2965
|
+
throw Ys;
|
|
2966
2966
|
this.raise(e, t);
|
|
2967
2967
|
};
|
|
2968
2968
|
j.readTmplToken = function() {
|
|
@@ -3097,10 +3097,10 @@ j.readWord = function() {
|
|
|
3097
3097
|
var e = this.readWord1(), t = p.name;
|
|
3098
3098
|
return this.keywords.test(e) && (t = rt[e]), this.finishToken(t, e);
|
|
3099
3099
|
};
|
|
3100
|
-
var
|
|
3100
|
+
var er = "8.15.0";
|
|
3101
3101
|
J.acorn = {
|
|
3102
3102
|
Parser: J,
|
|
3103
|
-
version:
|
|
3103
|
+
version: er,
|
|
3104
3104
|
defaultOptions: Mt,
|
|
3105
3105
|
Position: at,
|
|
3106
3106
|
SourceLocation: kt,
|
|
@@ -3109,32 +3109,32 @@ J.acorn = {
|
|
|
3109
3109
|
TokenType: V,
|
|
3110
3110
|
tokTypes: p,
|
|
3111
3111
|
keywordTypes: rt,
|
|
3112
|
-
TokContext:
|
|
3112
|
+
TokContext: oe,
|
|
3113
3113
|
tokContexts: Z,
|
|
3114
3114
|
isIdentifierChar: Re,
|
|
3115
3115
|
isIdentifierStart: Ae,
|
|
3116
3116
|
Token: Wt,
|
|
3117
3117
|
isNewLine: Je,
|
|
3118
3118
|
lineBreak: ue,
|
|
3119
|
-
lineBreakG:
|
|
3119
|
+
lineBreakG: ws,
|
|
3120
3120
|
nonASCIIwhitespace: mi
|
|
3121
3121
|
};
|
|
3122
|
-
function
|
|
3122
|
+
function ga(e, t) {
|
|
3123
3123
|
return J.parse(e, t);
|
|
3124
3124
|
}
|
|
3125
|
-
function
|
|
3125
|
+
function ba(e, t, i) {
|
|
3126
3126
|
return J.parseExpressionAt(e, t, i);
|
|
3127
3127
|
}
|
|
3128
|
-
function
|
|
3128
|
+
function ka(e, t) {
|
|
3129
3129
|
return J.tokenizer(e, t);
|
|
3130
3130
|
}
|
|
3131
|
-
const
|
|
3131
|
+
const wa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3132
3132
|
__proto__: null,
|
|
3133
3133
|
Node: Tt,
|
|
3134
3134
|
Parser: J,
|
|
3135
3135
|
Position: at,
|
|
3136
3136
|
SourceLocation: kt,
|
|
3137
|
-
TokContext:
|
|
3137
|
+
TokContext: oe,
|
|
3138
3138
|
Token: Wt,
|
|
3139
3139
|
TokenType: V,
|
|
3140
3140
|
defaultOptions: Mt,
|
|
@@ -3144,14 +3144,14 @@ const ka = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3144
3144
|
isNewLine: Je,
|
|
3145
3145
|
keywordTypes: rt,
|
|
3146
3146
|
lineBreak: ue,
|
|
3147
|
-
lineBreakG:
|
|
3147
|
+
lineBreakG: ws,
|
|
3148
3148
|
nonASCIIwhitespace: mi,
|
|
3149
|
-
parse:
|
|
3150
|
-
parseExpressionAt:
|
|
3149
|
+
parse: ga,
|
|
3150
|
+
parseExpressionAt: ba,
|
|
3151
3151
|
tokContexts: Z,
|
|
3152
3152
|
tokTypes: p,
|
|
3153
|
-
tokenizer:
|
|
3154
|
-
version:
|
|
3153
|
+
tokenizer: ka,
|
|
3154
|
+
version: er
|
|
3155
3155
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3156
3156
|
function Fi(e, t) {
|
|
3157
3157
|
for (var i = 0; i < t.length; i++) {
|
|
@@ -3210,15 +3210,15 @@ function $i(e, t) {
|
|
|
3210
3210
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3211
3211
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3212
3212
|
}
|
|
3213
|
-
var
|
|
3214
|
-
function
|
|
3213
|
+
var me = !0;
|
|
3214
|
+
function ye(e, t) {
|
|
3215
3215
|
return t === void 0 && (t = {}), new V("name", t);
|
|
3216
3216
|
}
|
|
3217
|
-
var
|
|
3218
|
-
function
|
|
3219
|
-
var t =
|
|
3217
|
+
var Ta = /* @__PURE__ */ new WeakMap();
|
|
3218
|
+
function Sa(e) {
|
|
3219
|
+
var t = Ta.get(e.Parser.acorn || e);
|
|
3220
3220
|
if (!t) {
|
|
3221
|
-
var i = { assert:
|
|
3221
|
+
var i = { assert: ye(0, { startsExpr: me }), asserts: ye(0, { startsExpr: me }), global: ye(0, { startsExpr: me }), keyof: ye(0, { startsExpr: me }), readonly: ye(0, { startsExpr: me }), unique: ye(0, { startsExpr: me }), abstract: ye(0, { startsExpr: me }), declare: ye(0, { startsExpr: me }), enum: ye(0, { startsExpr: me }), module: ye(0, { startsExpr: me }), namespace: ye(0, { startsExpr: me }), interface: ye(0, { startsExpr: me }), type: ye(0, { startsExpr: me }) }, s = { at: new V("@"), jsxName: new V("jsxName"), jsxText: new V("jsxText", { beforeExpr: !0 }), jsxTagStart: new V("jsxTagStart", { startsExpr: !0 }), jsxTagEnd: new V("jsxTagEnd") }, a = { tc_oTag: new oe("<tag", !1, !1), tc_cTag: new oe("</tag", !1, !1), tc_expr: new oe("<tag>...</tag>", !0, !0) }, o = new RegExp("^(?:" + Object.keys(i).join("|") + ")$");
|
|
3222
3222
|
s.jsxTagStart.updateContext = function() {
|
|
3223
3223
|
this.context.push(a.tc_expr), this.context.push(a.tc_oTag), this.exprAllowed = !1;
|
|
3224
3224
|
}, s.jsxTagEnd.updateContext = function(h) {
|
|
@@ -3240,10 +3240,10 @@ function Ta(e) {
|
|
|
3240
3240
|
}
|
|
3241
3241
|
return t;
|
|
3242
3242
|
}
|
|
3243
|
-
var mt = 1024,
|
|
3243
|
+
var mt = 1024, _a = new RegExp("(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*", "y"), Ui = new RegExp("(?=(" + _a.source + "))\\1" + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, "y"), yt = function() {
|
|
3244
3244
|
this.shorthandAssign = void 0, this.trailingComma = void 0, this.parenthesizedAssign = void 0, this.parenthesizedBind = void 0, this.doubleProto = void 0, this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
3245
3245
|
};
|
|
3246
|
-
function
|
|
3246
|
+
function Pa(e, t) {
|
|
3247
3247
|
var i = t.key.name, s = e[i], a = "true";
|
|
3248
3248
|
return t.type !== "MethodDefinition" || t.kind !== "get" && t.kind !== "set" || (a = (t.static ? "s" : "i") + t.kind), s === "iget" && a === "iset" || s === "iset" && a === "iget" || s === "sget" && a === "sset" || s === "sset" && a === "sget" ? (e[i] = "true", !1) : !!s || (e[i] = a, !1);
|
|
3249
3249
|
}
|
|
@@ -3251,7 +3251,7 @@ function Zi(e, t) {
|
|
|
3251
3251
|
var i = e.key;
|
|
3252
3252
|
return !e.computed && (i.type === "Identifier" && i.name === t || i.type === "Literal" && i.value === t);
|
|
3253
3253
|
}
|
|
3254
|
-
var
|
|
3254
|
+
var I = { AbstractMethodHasImplementation: function(e) {
|
|
3255
3255
|
return "Method '" + e.methodName + "' cannot have an implementation because it is marked abstract.";
|
|
3256
3256
|
}, AbstractPropertyHasInitializer: function(e) {
|
|
3257
3257
|
return "Property '" + e.propertyName + "' cannot have an initializer because it is marked abstract.";
|
|
@@ -3288,7 +3288,7 @@ var E = { AbstractMethodHasImplementation: function(e) {
|
|
|
3288
3288
|
return "Single type parameter " + t + " should have a trailing comma. Example usage: <" + t + ",>.";
|
|
3289
3289
|
}, StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", 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.", GenericsEndWithComma: "Trailing comma is not allowed at the end of generics.", 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: function(e) {
|
|
3290
3290
|
return "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got " + e.type + ".";
|
|
3291
|
-
}, LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." },
|
|
3291
|
+
}, LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." }, Aa = { quot: '"', amp: "&", apos: "'", lt: "<", gt: ">", nbsp: " ", iexcl: "¡", cent: "¢", pound: "£", curren: "¤", yen: "¥", brvbar: "¦", sect: "§", uml: "¨", copy: "©", ordf: "ª", laquo: "«", not: "¬", shy: "", reg: "®", macr: "¯", deg: "°", plusmn: "±", sup2: "²", sup3: "³", acute: "´", micro: "µ", para: "¶", middot: "·", cedil: "¸", sup1: "¹", ordm: "º", raquo: "»", frac14: "¼", frac12: "½", frac34: "¾", iquest: "¿", Agrave: "À", Aacute: "Á", Acirc: "Â", Atilde: "Ã", Auml: "Ä", Aring: "Å", AElig: "Æ", Ccedil: "Ç", Egrave: "È", Eacute: "É", Ecirc: "Ê", Euml: "Ë", Igrave: "Ì", Iacute: "Í", Icirc: "Î", Iuml: "Ï", ETH: "Ð", Ntilde: "Ñ", Ograve: "Ò", Oacute: "Ó", Ocirc: "Ô", Otilde: "Õ", Ouml: "Ö", times: "×", Oslash: "Ø", Ugrave: "Ù", Uacute: "Ú", Ucirc: "Û", Uuml: "Ü", Yacute: "Ý", THORN: "Þ", szlig: "ß", agrave: "à", aacute: "á", acirc: "â", atilde: "ã", auml: "ä", aring: "å", aelig: "æ", ccedil: "ç", egrave: "è", eacute: "é", ecirc: "ê", euml: "ë", igrave: "ì", iacute: "í", icirc: "î", iuml: "ï", eth: "ð", ntilde: "ñ", ograve: "ò", oacute: "ó", ocirc: "ô", otilde: "õ", ouml: "ö", divide: "÷", oslash: "ø", ugrave: "ù", uacute: "ú", ucirc: "û", uuml: "ü", yacute: "ý", thorn: "þ", yuml: "ÿ", OElig: "Œ", oelig: "œ", Scaron: "Š", scaron: "š", Yuml: "Ÿ", fnof: "ƒ", circ: "ˆ", tilde: "˜", Alpha: "Α", Beta: "Β", Gamma: "Γ", Delta: "Δ", Epsilon: "Ε", Zeta: "Ζ", Eta: "Η", Theta: "Θ", Iota: "Ι", Kappa: "Κ", Lambda: "Λ", Mu: "Μ", Nu: "Ν", Xi: "Ξ", Omicron: "Ο", Pi: "Π", Rho: "Ρ", Sigma: "Σ", Tau: "Τ", Upsilon: "Υ", Phi: "Φ", Chi: "Χ", Psi: "Ψ", Omega: "Ω", alpha: "α", beta: "β", gamma: "γ", delta: "δ", epsilon: "ε", zeta: "ζ", eta: "η", theta: "θ", iota: "ι", kappa: "κ", lambda: "λ", mu: "μ", nu: "ν", xi: "ξ", omicron: "ο", pi: "π", rho: "ρ", sigmaf: "ς", sigma: "σ", tau: "τ", upsilon: "υ", phi: "φ", chi: "χ", psi: "ψ", omega: "ω", thetasym: "ϑ", upsih: "ϒ", piv: "ϖ", ensp: " ", emsp: " ", thinsp: " ", zwnj: "", zwj: "", lrm: "", rlm: "", ndash: "–", mdash: "—", lsquo: "‘", rsquo: "’", sbquo: "‚", ldquo: "“", rdquo: "”", bdquo: "„", dagger: "†", Dagger: "‡", bull: "•", hellip: "…", permil: "‰", prime: "′", Prime: "″", lsaquo: "‹", rsaquo: "›", oline: "‾", frasl: "⁄", euro: "€", image: "ℑ", weierp: "℘", real: "ℜ", trade: "™", alefsym: "ℵ", larr: "←", uarr: "↑", rarr: "→", darr: "↓", harr: "↔", crarr: "↵", lArr: "⇐", uArr: "⇑", rArr: "⇒", dArr: "⇓", hArr: "⇔", forall: "∀", part: "∂", exist: "∃", empty: "∅", nabla: "∇", isin: "∈", notin: "∉", ni: "∋", prod: "∏", sum: "∑", minus: "−", lowast: "∗", radic: "√", prop: "∝", infin: "∞", ang: "∠", and: "∧", or: "∨", cap: "∩", cup: "∪", int: "∫", there4: "∴", sim: "∼", cong: "≅", asymp: "≈", ne: "≠", equiv: "≡", le: "≤", ge: "≥", sub: "⊂", sup: "⊃", nsub: "⊄", sube: "⊆", supe: "⊇", oplus: "⊕", otimes: "⊗", perp: "⊥", sdot: "⋅", lceil: "⌈", rceil: "⌉", lfloor: "⌊", rfloor: "⌋", lang: "〈", rang: "〉", loz: "◊", spades: "♠", clubs: "♣", hearts: "♥", diams: "♦" }, Ca = /^[\da-fA-F]+$/, Ea = /^\d+$/;
|
|
3292
3292
|
function xt(e) {
|
|
3293
3293
|
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ? xt(e.object) + "." + xt(e.property) : void 0);
|
|
3294
3294
|
}
|
|
@@ -3296,40 +3296,40 @@ var si = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
|
3296
3296
|
function qi(e) {
|
|
3297
3297
|
if (!e) throw new Error("Assert fail");
|
|
3298
3298
|
}
|
|
3299
|
-
function
|
|
3299
|
+
function Ia(e) {
|
|
3300
3300
|
return e === "accessor";
|
|
3301
3301
|
}
|
|
3302
|
-
function
|
|
3302
|
+
function Na(e) {
|
|
3303
3303
|
return e === "in" || e === "out";
|
|
3304
3304
|
}
|
|
3305
3305
|
function ri(e, t) {
|
|
3306
3306
|
return 2 | (e ? 4 : 0) | (t ? 8 : 0);
|
|
3307
3307
|
}
|
|
3308
|
-
function
|
|
3308
|
+
function La(e) {
|
|
3309
3309
|
if (e.type !== "MemberExpression") return !1;
|
|
3310
3310
|
var t = e.property;
|
|
3311
|
-
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) &&
|
|
3311
|
+
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) && tr(e.object);
|
|
3312
3312
|
}
|
|
3313
|
-
function
|
|
3314
|
-
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed &&
|
|
3313
|
+
function tr(e) {
|
|
3314
|
+
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed && tr(e.object);
|
|
3315
3315
|
}
|
|
3316
3316
|
function Hi(e) {
|
|
3317
3317
|
return e === "private" || e === "public" || e === "protected";
|
|
3318
3318
|
}
|
|
3319
|
-
function
|
|
3319
|
+
function Oa(e) {
|
|
3320
3320
|
var t = {}, i = t.dts, s = i !== void 0 && i, a = t.allowSatisfies, o = a !== void 0 && a;
|
|
3321
3321
|
return function(h) {
|
|
3322
|
-
var d = h.acorn ||
|
|
3323
|
-
function
|
|
3324
|
-
|
|
3325
|
-
for (var ee =
|
|
3322
|
+
var d = h.acorn || wa, y = Sa(d), u = d.tokTypes, T = d.keywordTypes, E = d.isIdentifierStart, R = d.lineBreak, W = d.isNewLine, xe = d.tokContexts, Me = d.isIdentifierChar, M = y.tokTypes, re = y.tokContexts, fe = y.keywordsRegExp, ge = y.tokenIsLiteralPropertyName, Ge = y.tokenIsTemplate, Cr = y.tokenIsTSDeclarationStart, U = y.tokenIsIdentifier, Pt = y.tokenIsKeywordOrIdentifier, Er = y.tokenIsTSTypeOperator;
|
|
3323
|
+
function Ir(_, he, ne) {
|
|
3324
|
+
ne === void 0 && (ne = _.length);
|
|
3325
|
+
for (var ee = he; ee < ne; ee++) {
|
|
3326
3326
|
var B = _.charCodeAt(ee);
|
|
3327
|
-
if (W(B)) return ee <
|
|
3327
|
+
if (W(B)) return ee < ne - 1 && B === 13 && _.charCodeAt(ee + 1) === 10 ? ee + 2 : ee + 1;
|
|
3328
3328
|
}
|
|
3329
3329
|
return -1;
|
|
3330
3330
|
}
|
|
3331
|
-
h = (function(_,
|
|
3332
|
-
var ee =
|
|
3331
|
+
h = (function(_, he, ne) {
|
|
3332
|
+
var ee = ne.tokTypes, B = he.tokTypes;
|
|
3333
3333
|
return (function(f) {
|
|
3334
3334
|
function r() {
|
|
3335
3335
|
return f.apply(this, arguments) || this;
|
|
@@ -3368,8 +3368,8 @@ function La(e) {
|
|
|
3368
3368
|
return c;
|
|
3369
3369
|
}, r;
|
|
3370
3370
|
})(_);
|
|
3371
|
-
})(h, y, d), h = (function(_,
|
|
3372
|
-
var B = _.tokTypes, f =
|
|
3371
|
+
})(h, y, d), h = (function(_, he, ne, ee) {
|
|
3372
|
+
var B = _.tokTypes, f = he.tokTypes, r = _.isNewLine, n = _.isIdentifierChar, c = Object.assign({ allowNamespaces: !0, allowNamespacedObjects: !0 }, {});
|
|
3373
3373
|
return (function(l) {
|
|
3374
3374
|
function m() {
|
|
3375
3375
|
return l.apply(this, arguments) || this;
|
|
@@ -3412,7 +3412,7 @@ function La(e) {
|
|
|
3412
3412
|
S !== "&" && this.raise(this.pos, "Entity must start with an ampersand");
|
|
3413
3413
|
for (var N = ++this.pos; this.pos < this.input.length && k++ < 10; ) {
|
|
3414
3414
|
if ((S = this.input[this.pos++]) === ";") {
|
|
3415
|
-
b[0] === "#" ? b[1] === "x" ? (b = b.substr(2),
|
|
3415
|
+
b[0] === "#" ? b[1] === "x" ? (b = b.substr(2), Ca.test(b) && (x = String.fromCharCode(parseInt(b, 16)))) : (b = b.substr(1), Ea.test(b) && (x = String.fromCharCode(parseInt(b, 10)))) : x = Aa[b];
|
|
3416
3416
|
break;
|
|
3417
3417
|
}
|
|
3418
3418
|
b += S;
|
|
@@ -3500,9 +3500,9 @@ function La(e) {
|
|
|
3500
3500
|
var x = this.start, b = this.startLoc;
|
|
3501
3501
|
return this.next(), this.jsx_parseElementAt(x, b);
|
|
3502
3502
|
}, m;
|
|
3503
|
-
})(
|
|
3504
|
-
})(d, y, h), h = (function(_,
|
|
3505
|
-
var ee =
|
|
3503
|
+
})(ne);
|
|
3504
|
+
})(d, y, h), h = (function(_, he, ne) {
|
|
3505
|
+
var ee = he.tokTypes, B = ne.tokTypes;
|
|
3506
3506
|
return (function(f) {
|
|
3507
3507
|
function r() {
|
|
3508
3508
|
return f.apply(this, arguments) || this;
|
|
@@ -3530,26 +3530,26 @@ function La(e) {
|
|
|
3530
3530
|
}, r;
|
|
3531
3531
|
})(_);
|
|
3532
3532
|
})(h, y, d);
|
|
3533
|
-
var
|
|
3534
|
-
function
|
|
3533
|
+
var Nr = /* @__PURE__ */ (function(_) {
|
|
3534
|
+
function he(r, n, c) {
|
|
3535
3535
|
var l;
|
|
3536
3536
|
return (l = _.call(this, r, n, c) || this).preValue = null, l.preToken = null, l.isLookahead = !1, l.isAmbientContext = !1, l.inAbstractClass = !1, l.inType = !1, l.inDisallowConditionalTypesContext = !1, l.maybeInArrowParameters = !1, l.shouldParseArrowReturnType = void 0, l.shouldParseAsyncArrowReturnType = void 0, l.decoratorStack = [[]], l.importsStack = [[]], l.importOrExportOuterKind = void 0, l.tsParseConstModifier = l.tsParseModifiers.bind((function(m) {
|
|
3537
3537
|
if (m === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3538
3538
|
return m;
|
|
3539
|
-
})(l), { allowedModifiers: ["const"], disallowedModifiers: ["in", "out"], errorTemplate:
|
|
3539
|
+
})(l), { allowedModifiers: ["const"], disallowedModifiers: ["in", "out"], errorTemplate: I.InvalidModifierOnTypeParameterPositions }), l;
|
|
3540
3540
|
}
|
|
3541
|
-
Et(
|
|
3542
|
-
var
|
|
3541
|
+
Et(he, _);
|
|
3542
|
+
var ne, ee, B, f = he.prototype;
|
|
3543
3543
|
return f.getTokenFromCodeInType = function(r) {
|
|
3544
3544
|
return r === 62 || r === 60 ? this.finishOp(u.relational, 1) : _.prototype.getTokenFromCode.call(this, r);
|
|
3545
3545
|
}, f.readToken = function(r) {
|
|
3546
3546
|
if (!this.inType) {
|
|
3547
3547
|
var n = this.curContext();
|
|
3548
|
-
if (n ===
|
|
3549
|
-
if (n ===
|
|
3550
|
-
if (
|
|
3548
|
+
if (n === re.tc_expr) return this.jsx_readToken();
|
|
3549
|
+
if (n === re.tc_oTag || n === re.tc_cTag) {
|
|
3550
|
+
if (E(r)) return this.jsx_readWord();
|
|
3551
3551
|
if (r == 62) return ++this.pos, this.finishToken(M.jsxTagEnd);
|
|
3552
|
-
if ((r === 34 || r === 39) && n ==
|
|
3552
|
+
if ((r === 34 || r === 39) && n == re.tc_oTag) return this.jsx_readString(r);
|
|
3553
3553
|
}
|
|
3554
3554
|
if (r === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) return ++this.pos, this.finishToken(M.jsxTagStart);
|
|
3555
3555
|
}
|
|
@@ -3596,7 +3596,7 @@ function La(e) {
|
|
|
3596
3596
|
}, f.tsCheckForInvalidTypeCasts = function(r) {
|
|
3597
3597
|
var n = this;
|
|
3598
3598
|
r.forEach(function(c) {
|
|
3599
|
-
c?.type === "TSTypeCastExpression" && n.raise(c.typeAnnotation.start,
|
|
3599
|
+
c?.type === "TSTypeCastExpression" && n.raise(c.typeAnnotation.start, I.UnexpectedTypeAnnotation);
|
|
3600
3600
|
});
|
|
3601
3601
|
}, f.atPossibleAsyncArrow = function(r) {
|
|
3602
3602
|
return r.type === "Identifier" && r.name === "async" && this.lastTokEndLoc.column === r.end && !this.canInsertSemicolon() && r.end - r.start == 5 && r.start === this.potentialArrowAt;
|
|
@@ -3666,12 +3666,12 @@ function La(e) {
|
|
|
3666
3666
|
return this.setLookaheadState(n), l;
|
|
3667
3667
|
}, f.readWord = function() {
|
|
3668
3668
|
var r = this.readWord1(), n = u.name;
|
|
3669
|
-
return this.keywords.test(r) ? n = T[r] : new RegExp(
|
|
3669
|
+
return this.keywords.test(r) ? n = T[r] : new RegExp(fe).test(r) && (n = M[r]), this.finishToken(n, r);
|
|
3670
3670
|
}, f.skipBlockComment = function() {
|
|
3671
3671
|
var r;
|
|
3672
3672
|
this.isLookahead || (r = this.options.onComment && this.curPosition());
|
|
3673
3673
|
var n = this.pos, c = this.input.indexOf("*/", this.pos += 2);
|
|
3674
|
-
if (c === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = c + 2, this.options.locations) for (var l, m = n; (l =
|
|
3674
|
+
if (c === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = c + 2, this.options.locations) for (var l, m = n; (l = Ir(this.input, m, this.pos)) > -1; ) ++this.curLine, m = this.lineStart = l;
|
|
3675
3675
|
this.isLookahead || this.options.onComment && this.options.onComment(!0, this.input.slice(n + 2, c), n, this.pos, r, this.curPosition());
|
|
3676
3676
|
}, f.skipLineComment = function(r) {
|
|
3677
3677
|
var n, c = this.pos;
|
|
@@ -3737,7 +3737,7 @@ function La(e) {
|
|
|
3737
3737
|
}
|
|
3738
3738
|
return !1;
|
|
3739
3739
|
}, f.ts_eatContextualWithState = function(r, n, c) {
|
|
3740
|
-
if (
|
|
3740
|
+
if (fe.test(r)) {
|
|
3741
3741
|
if (this.ts_isContextualWithState(c, M[r])) {
|
|
3742
3742
|
for (var l = 0; l < n; l++) this.next();
|
|
3743
3743
|
return !0;
|
|
@@ -3750,7 +3750,7 @@ function La(e) {
|
|
|
3750
3750
|
}, f.canHaveLeadingDecorator = function() {
|
|
3751
3751
|
return this.match(u._class);
|
|
3752
3752
|
}, f.eatContextual = function(r) {
|
|
3753
|
-
return
|
|
3753
|
+
return fe.test(r) ? !!this.ts_isContextual(M[r]) && (this.next(), !0) : _.prototype.eatContextual.call(this, r);
|
|
3754
3754
|
}, f.tsIsExternalModuleReference = function() {
|
|
3755
3755
|
return this.isContextual("require") && this.lookaheadCharCode() === 40;
|
|
3756
3756
|
}, f.tsParseExternalModuleReference = function() {
|
|
@@ -3877,7 +3877,7 @@ function La(e) {
|
|
|
3877
3877
|
}, f.tsParseBindingListForSignature = function() {
|
|
3878
3878
|
var r = this;
|
|
3879
3879
|
return _.prototype.parseBindingList.call(this, u.parenR, !0, !0).map(function(n) {
|
|
3880
|
-
return n.type !== "Identifier" && n.type !== "RestElement" && n.type !== "ObjectPattern" && n.type !== "ArrayPattern" && r.raise(n.start,
|
|
3880
|
+
return n.type !== "Identifier" && n.type !== "RestElement" && n.type !== "ObjectPattern" && n.type !== "ArrayPattern" && r.raise(n.start, I.UnsupportedSignatureParameterKind(n.type)), n;
|
|
3881
3881
|
});
|
|
3882
3882
|
}, f.tsParseTypePredicateAsserts = function() {
|
|
3883
3883
|
if (this.type !== M.asserts) return !1;
|
|
@@ -3923,7 +3923,7 @@ function La(e) {
|
|
|
3923
3923
|
if (this.lookahead().type !== u._const) return null;
|
|
3924
3924
|
this.next();
|
|
3925
3925
|
var r = this.tsParseTypeReference();
|
|
3926
|
-
return r.typeParameters && this.raise(r.typeName.start,
|
|
3926
|
+
return r.typeParameters && this.raise(r.typeName.start, I.CannotFindName({ name: "const" })), r;
|
|
3927
3927
|
}, f.tsParseFunctionOrConstructorType = function(r, n) {
|
|
3928
3928
|
var c = this, l = this.startNode();
|
|
3929
3929
|
return r === "TSConstructorType" && (l.abstract = !!n, n && this.next(), this.next()), this.tsInAllowConditionalTypesContext(function() {
|
|
@@ -3941,7 +3941,7 @@ function La(e) {
|
|
|
3941
3941
|
case "TSArrayType":
|
|
3942
3942
|
return;
|
|
3943
3943
|
default:
|
|
3944
|
-
this.raise(r.start,
|
|
3944
|
+
this.raise(r.start, I.UnexpectedReadonly);
|
|
3945
3945
|
}
|
|
3946
3946
|
}, f.tsParseTypeOperator = function() {
|
|
3947
3947
|
var r = this.startNode(), n = this.value;
|
|
@@ -3976,7 +3976,7 @@ function La(e) {
|
|
|
3976
3976
|
})(), this.finishNode(n, "TSLiteralType");
|
|
3977
3977
|
}, f.tsParseImportType = function() {
|
|
3978
3978
|
var r = this.startNode();
|
|
3979
|
-
return this.expect(u._import), this.expect(u.parenL), this.match(u.string) || this.raise(this.start,
|
|
3979
|
+
return this.expect(u._import), this.expect(u.parenL), this.match(u.string) || this.raise(this.start, I.UnsupportedImportTypeArgument), r.argument = this.parseExprAtom(), this.expect(u.parenR), this.eat(u.dot) && (r.qualifier = this.tsParseEntityName()), this.tsMatchLeftRelational() && (r.typeParameters = this.tsParseTypeArguments()), this.finishNode(r, "TSImportType");
|
|
3980
3980
|
}, f.tsParseTypeQuery = function() {
|
|
3981
3981
|
var r = this.startNode();
|
|
3982
3982
|
return this.expect(u._typeof), r.exprName = this.match(u._import) ? this.tsParseImportType() : this.tsParseEntityName(), !this.hasPrecedingLineBreak() && this.tsMatchLeftRelational() && (r.typeParameters = this.tsParseTypeArguments()), this.finishNode(r, "TSTypeQuery");
|
|
@@ -3993,7 +3993,7 @@ function La(e) {
|
|
|
3993
3993
|
var r = this.startLoc, n = this.start, c = this.eat(u.ellipsis), l = this.tsParseType(), m = this.eat(u.question);
|
|
3994
3994
|
if (this.eat(u.colon)) {
|
|
3995
3995
|
var v = this.startNodeAtNode(l);
|
|
3996
|
-
v.optional = m, l.type !== "TSTypeReference" || l.typeParameters || l.typeName.type !== "Identifier" ? (this.raise(l.start,
|
|
3996
|
+
v.optional = m, l.type !== "TSTypeReference" || l.typeParameters || l.typeName.type !== "Identifier" ? (this.raise(l.start, I.InvalidTupleMemberLabel), v.label = l) : v.label = l.typeName, v.elementType = this.tsParseType(), l = this.finishNode(v, "TSNamedTupleMember");
|
|
3997
3997
|
} else if (m) {
|
|
3998
3998
|
var x = this.startNodeAtNode(l);
|
|
3999
3999
|
x.typeAnnotation = l, l = this.finishNode(x, "TSOptionalType");
|
|
@@ -4009,11 +4009,11 @@ function La(e) {
|
|
|
4009
4009
|
var c = !1, l = null;
|
|
4010
4010
|
return n.elementTypes.forEach(function(m) {
|
|
4011
4011
|
var v = m.type;
|
|
4012
|
-
!c || v === "TSRestType" || v === "TSOptionalType" || v === "TSNamedTupleMember" && m.optional || r.raise(m.start,
|
|
4012
|
+
!c || v === "TSRestType" || v === "TSOptionalType" || v === "TSNamedTupleMember" && m.optional || r.raise(m.start, I.OptionalTypeBeforeRequired), c || (c = v === "TSNamedTupleMember" && m.optional || v === "TSOptionalType");
|
|
4013
4013
|
var x = v;
|
|
4014
4014
|
v === "TSRestType" && (x = (m = m.typeAnnotation).type);
|
|
4015
4015
|
var b = x === "TSNamedTupleMember";
|
|
4016
|
-
l != null || (l = b), l !== b && r.raise(m.start,
|
|
4016
|
+
l != null || (l = b), l !== b && r.raise(m.start, I.MixedLabeledAndUnlabeledElements);
|
|
4017
4017
|
}), this.finishNode(n, "TSTupleType");
|
|
4018
4018
|
}, f.tsParseTemplateLiteralType = function() {
|
|
4019
4019
|
var r = this.startNode();
|
|
@@ -4104,7 +4104,7 @@ function La(e) {
|
|
|
4104
4104
|
return r;
|
|
4105
4105
|
}, f.tsParseTypeOperatorOrHigher = function() {
|
|
4106
4106
|
var r = this;
|
|
4107
|
-
return
|
|
4107
|
+
return Er(this.type) && !this.containsEsc ? this.tsParseTypeOperator() : this.isContextual("infer") ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(function() {
|
|
4108
4108
|
return r.tsParseArrayTypeOrHigher();
|
|
4109
4109
|
});
|
|
4110
4110
|
}, f.tsParseIntersectionTypeOrHigher = function() {
|
|
@@ -4145,7 +4145,7 @@ function La(e) {
|
|
|
4145
4145
|
return c && (r.typeAnnotation = c), this.tsParseTypeMemberSemicolon(), this.finishNode(r, "TSIndexSignature");
|
|
4146
4146
|
}
|
|
4147
4147
|
}, f.tsParseNoneModifiers = function(r) {
|
|
4148
|
-
this.tsParseModifiers({ modified: r, allowedModifiers: [], disallowedModifiers: ["in", "out"], errorTemplate:
|
|
4148
|
+
this.tsParseModifiers({ modified: r, allowedModifiers: [], disallowedModifiers: ["in", "out"], errorTemplate: I.InvalidModifierOnTypeParameterPositions });
|
|
4149
4149
|
}, f.tsParseTypeParameter = function(r) {
|
|
4150
4150
|
r === void 0 && (r = this.tsParseNoneModifiers.bind(this));
|
|
4151
4151
|
var n = this.startNode();
|
|
@@ -4154,7 +4154,7 @@ function La(e) {
|
|
|
4154
4154
|
var n = this.startNode();
|
|
4155
4155
|
this.tsMatchLeftRelational() || this.matchJsx("jsxTagStart") ? this.next() : this.unexpected();
|
|
4156
4156
|
var c = { value: -1 };
|
|
4157
|
-
return n.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, r), !1, !0, c), n.params.length === 0 && this.raise(this.start,
|
|
4157
|
+
return n.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, r), !1, !0, c), n.params.length === 0 && this.raise(this.start, I.EmptyTypeParameters), c.value !== -1 && this.addExtra(n, "trailingComma", c.value), this.finishNode(n, "TSTypeParameterDeclaration");
|
|
4158
4158
|
}, f.tsTryParseTypeParameters = function(r) {
|
|
4159
4159
|
if (this.tsMatchLeftRelational()) return this.tsParseTypeParameters(r);
|
|
4160
4160
|
}, f.tsTryParse = function(r) {
|
|
@@ -4178,31 +4178,31 @@ function La(e) {
|
|
|
4178
4178
|
n[v] = c[v];
|
|
4179
4179
|
}
|
|
4180
4180
|
}, f.tsParseModifiers = function(r) {
|
|
4181
|
-
for (var n = this, c = r.modified, l = r.allowedModifiers, m = r.disallowedModifiers, v = r.stopOnStartOfClassStaticBlock, x = r.errorTemplate, b = x === void 0 ?
|
|
4182
|
-
q === G && c[te] && n.raise(K.column,
|
|
4181
|
+
for (var n = this, c = r.modified, l = r.allowedModifiers, m = r.disallowedModifiers, v = r.stopOnStartOfClassStaticBlock, x = r.errorTemplate, b = x === void 0 ? I.InvalidModifierOnTypeMember : x, k = {}, S = function(K, q, G, te) {
|
|
4182
|
+
q === G && c[te] && n.raise(K.column, I.InvalidModifiersOrder({ orderedModifiers: [G, te] }));
|
|
4183
4183
|
}, N = function(K, q, G, te) {
|
|
4184
|
-
(c[G] && q === te || c[te] && q === G) && n.raise(K.column,
|
|
4184
|
+
(c[G] && q === te || c[te] && q === G) && n.raise(K.column, I.IncompatibleModifiers({ modifiers: [G, te] }));
|
|
4185
4185
|
}; ; ) {
|
|
4186
4186
|
var z = this.startLoc, A = this.tsParseModifier(l.concat(m ?? []), v);
|
|
4187
4187
|
if (!A) break;
|
|
4188
|
-
Hi(A) ? c.accessibility ? this.raise(this.start,
|
|
4188
|
+
Hi(A) ? c.accessibility ? this.raise(this.start, I.DuplicateAccessibilityModifier()) : (S(z, A, A, "override"), S(z, A, A, "static"), S(z, A, A, "readonly"), S(z, A, A, "accessor"), k.accessibility = A, c.accessibility = A) : Na(A) ? c[A] ? this.raise(this.start, I.DuplicateModifier({ modifier: A })) : (S(z, A, "in", "out"), k[A] = A, c[A] = !0) : Ia(A) ? c[A] ? this.raise(this.start, I.DuplicateModifier({ modifier: A })) : (N(z, A, "accessor", "readonly"), N(z, A, "accessor", "static"), N(z, A, "accessor", "override"), k[A] = A, c[A] = !0) : Object.hasOwnProperty.call(c, A) ? this.raise(this.start, I.DuplicateModifier({ modifier: A })) : (S(z, A, "static", "readonly"), S(z, A, "static", "override"), S(z, A, "override", "readonly"), S(z, A, "abstract", "override"), N(z, A, "declare", "override"), N(z, A, "static", "abstract"), k[A] = A, c[A] = !0), m != null && m.includes(A) && this.raise(this.start, b);
|
|
4189
4189
|
}
|
|
4190
4190
|
return k;
|
|
4191
4191
|
}, f.tsParseInOutModifiers = function(r) {
|
|
4192
|
-
this.tsParseModifiers({ modified: r, allowedModifiers: ["in", "out"], disallowedModifiers: ["public", "private", "protected", "readonly", "declare", "abstract", "override"], errorTemplate:
|
|
4192
|
+
this.tsParseModifiers({ modified: r, allowedModifiers: ["in", "out"], disallowedModifiers: ["public", "private", "protected", "readonly", "declare", "abstract", "override"], errorTemplate: I.InvalidModifierOnTypeParameter });
|
|
4193
4193
|
}, f.tsParseTypeArguments = function() {
|
|
4194
4194
|
var r = this, n = this.startNode();
|
|
4195
4195
|
return n.params = this.tsInType(function() {
|
|
4196
4196
|
return r.tsInNoContext(function() {
|
|
4197
4197
|
return r.expect(u.relational), r.tsParseDelimitedList("TypeParametersOrArguments", r.tsParseType.bind(r));
|
|
4198
4198
|
});
|
|
4199
|
-
}), n.params.length === 0 && this.raise(this.start,
|
|
4199
|
+
}), n.params.length === 0 && this.raise(this.start, I.EmptyTypeArguments), this.exprAllowed = !1, this.expect(u.relational), this.finishNode(n, "TSTypeParameterInstantiation");
|
|
4200
4200
|
}, f.tsParseHeritageClause = function(r) {
|
|
4201
4201
|
var n = this, c = this.start, l = this.tsParseDelimitedList("HeritageClauseElement", function() {
|
|
4202
4202
|
var m = n.startNode();
|
|
4203
4203
|
return m.expression = n.tsParseEntityName(), n.tsMatchLeftRelational() && (m.typeParameters = n.tsParseTypeArguments()), n.finishNode(m, "TSExpressionWithTypeArguments");
|
|
4204
4204
|
});
|
|
4205
|
-
return l.length || this.raise(c,
|
|
4205
|
+
return l.length || this.raise(c, I.EmptyHeritageClauseType({ token: r })), l;
|
|
4206
4206
|
}, f.tsParseTypeMemberSemicolon = function() {
|
|
4207
4207
|
this.eat(u.comma) || this.isLineTerminator() || this.expect(u.semi);
|
|
4208
4208
|
}, f.tsTryParseAndCatch = function(r) {
|
|
@@ -4216,18 +4216,18 @@ function La(e) {
|
|
|
4216
4216
|
this.eat(u.question) && (r.optional = !0);
|
|
4217
4217
|
var c = r;
|
|
4218
4218
|
if (this.match(u.parenL) || this.tsMatchLeftRelational()) {
|
|
4219
|
-
n && this.raise(r.start,
|
|
4219
|
+
n && this.raise(r.start, I.ReadonlyForMethodSignature);
|
|
4220
4220
|
var l = c;
|
|
4221
|
-
l.kind && this.tsMatchLeftRelational() && this.raise(this.start,
|
|
4221
|
+
l.kind && this.tsMatchLeftRelational() && this.raise(this.start, I.AccesorCannotHaveTypeParameters), this.tsFillSignature(u.colon, l), this.tsParseTypeMemberSemicolon();
|
|
4222
4222
|
var m = "parameters", v = "typeAnnotation";
|
|
4223
|
-
if (l.kind === "get") l[m].length > 0 && (this.raise(this.start, "A 'get' accesor must not have any formal parameters."), this.isThisParam(l[m][0]) && this.raise(this.start,
|
|
4223
|
+
if (l.kind === "get") l[m].length > 0 && (this.raise(this.start, "A 'get' accesor must not have any formal parameters."), this.isThisParam(l[m][0]) && this.raise(this.start, I.AccesorCannotDeclareThisParameter));
|
|
4224
4224
|
else if (l.kind === "set") {
|
|
4225
4225
|
if (l[m].length !== 1) this.raise(this.start, "A 'get' accesor must not have any formal parameters.");
|
|
4226
4226
|
else {
|
|
4227
4227
|
var x = l[m][0];
|
|
4228
|
-
this.isThisParam(x) && this.raise(this.start,
|
|
4228
|
+
this.isThisParam(x) && this.raise(this.start, I.AccesorCannotDeclareThisParameter), x.type === "Identifier" && x.optional && this.raise(this.start, I.SetAccesorCannotHaveOptionalParameter), x.type === "RestElement" && this.raise(this.start, I.SetAccesorCannotHaveRestParameter);
|
|
4229
4229
|
}
|
|
4230
|
-
l[v] && this.raise(l[v].start,
|
|
4230
|
+
l[v] && this.raise(l[v].start, I.SetAccesorCannotHaveReturnType);
|
|
4231
4231
|
} else l.kind = "method";
|
|
4232
4232
|
return this.finishNode(l, "TSMethodSignature");
|
|
4233
4233
|
}
|
|
@@ -4252,7 +4252,7 @@ function La(e) {
|
|
|
4252
4252
|
return this.expect(u.braceR), r;
|
|
4253
4253
|
}, f.tsParseInterfaceDeclaration = function(r, n) {
|
|
4254
4254
|
if (n === void 0 && (n = {}), this.hasFollowingLineBreak()) return null;
|
|
4255
|
-
this.expectContextual("interface"), n.declare && (r.declare = !0), U(this.type) ? (r.id = this.parseIdent(), this.checkLValSimple(r.id, 7)) : (r.id = null, this.raise(this.start,
|
|
4255
|
+
this.expectContextual("interface"), n.declare && (r.declare = !0), U(this.type) ? (r.id = this.parseIdent(), this.checkLValSimple(r.id, 7)) : (r.id = null, this.raise(this.start, I.MissingInterfaceName)), r.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)), this.eat(u._extends) && (r.extends = this.tsParseHeritageClause("extends"));
|
|
4256
4256
|
var c = this.startNode();
|
|
4257
4257
|
return c.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)), r.body = this.finishNode(c, "TSInterfaceBody"), this.finishNode(r, "TSInterfaceDeclaration");
|
|
4258
4258
|
}, f.tsParseAbstractDeclaration = function(r) {
|
|
@@ -4261,7 +4261,7 @@ function La(e) {
|
|
|
4261
4261
|
if (!this.hasFollowingLineBreak()) return r.abstract = !0, this.tsParseInterfaceDeclaration(r);
|
|
4262
4262
|
} else this.unexpected(r.start);
|
|
4263
4263
|
}, f.tsIsDeclarationStart = function() {
|
|
4264
|
-
return
|
|
4264
|
+
return Cr(this.type);
|
|
4265
4265
|
}, f.tsParseExpressionStatement = function(r, n) {
|
|
4266
4266
|
switch (n.name) {
|
|
4267
4267
|
case "declare":
|
|
@@ -4345,7 +4345,7 @@ function La(e) {
|
|
|
4345
4345
|
}, f.tsParseImportEqualsDeclaration = function(r, n) {
|
|
4346
4346
|
r.isExport = n || !1, r.id = this.parseIdent(), this.checkLValSimple(r.id, 2), _.prototype.expect.call(this, u.eq);
|
|
4347
4347
|
var c = this.tsParseModuleReference();
|
|
4348
|
-
return r.importKind === "type" && c.type !== "TSExternalModuleReference" && this.raise(c.start,
|
|
4348
|
+
return r.importKind === "type" && c.type !== "TSExternalModuleReference" && this.raise(c.start, I.ImportAliasHasImportType), r.moduleReference = c, _.prototype.semicolon.call(this), this.finishNode(r, "TSImportEqualsDeclaration");
|
|
4349
4349
|
}, f.isExportDefaultSpecifier = function() {
|
|
4350
4350
|
if (this.tsIsDeclarationStart()) return !1;
|
|
4351
4351
|
var r = this.type;
|
|
@@ -4378,7 +4378,7 @@ function La(e) {
|
|
|
4378
4378
|
}, f.parseFunctionBody = function(r, n, c, l, m) {
|
|
4379
4379
|
n === void 0 && (n = !1), c === void 0 && (c = !1), l === void 0 && (l = !1), this.match(u.colon) && (r.returnType = this.tsParseTypeOrTypePredicateAnnotation(u.colon));
|
|
4380
4380
|
var v = m != null && m.isFunctionDeclaration ? "TSDeclareFunction" : m != null && m.isClassMethod ? "TSDeclareMethod" : void 0;
|
|
4381
|
-
return v && !this.match(u.braceL) && this.isLineTerminator() ? this.finishNode(r, v) : v === "TSDeclareFunction" && this.isAmbientContext && (this.raise(r.start,
|
|
4381
|
+
return v && !this.match(u.braceL) && this.isLineTerminator() ? this.finishNode(r, v) : v === "TSDeclareFunction" && this.isAmbientContext && (this.raise(r.start, I.DeclareFunctionHasImplementation), r.declare) ? (_.prototype.parseFunctionBody.call(this, r, n, c, !1), this.finishNode(r, v)) : (_.prototype.parseFunctionBody.call(this, r, n, c, l), r);
|
|
4382
4382
|
}, f.parseNew = function() {
|
|
4383
4383
|
var r;
|
|
4384
4384
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
@@ -4421,7 +4421,7 @@ function La(e) {
|
|
|
4421
4421
|
return this.importOrExportOuterKind = "value", l;
|
|
4422
4422
|
}
|
|
4423
4423
|
}
|
|
4424
|
-
return this.next(), this.type === u.string ? (r.specifiers = [], r.source = this.parseExprAtom()) : (r.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), r.source = this.type === u.string ? this.parseExprAtom() : this.unexpected()), this.parseMaybeImportAttributes(r), this.semicolon(), this.finishNode(r, "ImportDeclaration"), this.importOrExportOuterKind = "value", r.importKind === "type" && r.specifiers.length > 1 && r.specifiers[0].type === "ImportDefaultSpecifier" && this.raise(r.start,
|
|
4424
|
+
return this.next(), this.type === u.string ? (r.specifiers = [], r.source = this.parseExprAtom()) : (r.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), r.source = this.type === u.string ? this.parseExprAtom() : this.unexpected()), this.parseMaybeImportAttributes(r), this.semicolon(), this.finishNode(r, "ImportDeclaration"), this.importOrExportOuterKind = "value", r.importKind === "type" && r.specifiers.length > 1 && r.specifiers[0].type === "ImportDefaultSpecifier" && this.raise(r.start, I.TypeImportCannotSpecifyDefaultAndNamed), r;
|
|
4425
4425
|
}, f.parseExportDefaultDeclaration = function() {
|
|
4426
4426
|
if (this.isAbstractClass()) {
|
|
4427
4427
|
var r = this.startNode();
|
|
@@ -4478,7 +4478,7 @@ function La(e) {
|
|
|
4478
4478
|
r && (typeof n != "string" && (n = n.type === "Identifier" ? n.name : n.value), r[n] = !0);
|
|
4479
4479
|
}, f.parseMaybeDefault = function(r, n, c) {
|
|
4480
4480
|
var l = _.prototype.parseMaybeDefault.call(this, r, n, c);
|
|
4481
|
-
return l.type === "AssignmentPattern" && l.typeAnnotation && l.right.start < l.typeAnnotation.start && this.raise(l.typeAnnotation.start,
|
|
4481
|
+
return l.type === "AssignmentPattern" && l.typeAnnotation && l.right.start < l.typeAnnotation.start && this.raise(l.typeAnnotation.start, I.TypeAnnotationAfterAssign), l;
|
|
4482
4482
|
}, f.typeCastToParameter = function(r) {
|
|
4483
4483
|
return r.expression.typeAnnotation = r.typeAnnotation, this.resetEndLocation(r.expression, r.typeAnnotation.end), r.expression;
|
|
4484
4484
|
}, f.toAssignableList = function(r, n) {
|
|
@@ -4494,7 +4494,7 @@ function La(e) {
|
|
|
4494
4494
|
if (this.type === M.at) return this.parseDecorators(), this.parseExprAtom();
|
|
4495
4495
|
if (U(this.type)) {
|
|
4496
4496
|
var l = this.potentialArrowAt === this.start, m = this.start, v = this.startLoc, x = this.containsEsc, b = this.parseIdent(!1);
|
|
4497
|
-
if (this.options.ecmaVersion >= 8 && !x && b.name === "async" && !this.canInsertSemicolon() && this.eat(u._function)) return this.overrideContext(
|
|
4497
|
+
if (this.options.ecmaVersion >= 8 && !x && b.name === "async" && !this.canInsertSemicolon() && this.eat(u._function)) return this.overrideContext(xe.f_expr), this.parseFunction(this.startNodeAt(m, v), 0, !1, !0, n);
|
|
4498
4498
|
if (l && !this.canInsertSemicolon()) {
|
|
4499
4499
|
if (this.eat(u.arrow)) return this.parseArrowExpression(this.startNodeAt(m, v), [b], !1, n);
|
|
4500
4500
|
if (this.options.ecmaVersion >= 8 && b.name === "async" && this.type === u.name && !x && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) return b = this.parseIdent(!1), !this.canInsertSemicolon() && this.eat(u.arrow) || this.unexpected(), this.parseArrowExpression(this.startNodeAt(m, v), [b], !0, n);
|
|
@@ -4530,7 +4530,7 @@ function La(e) {
|
|
|
4530
4530
|
if (!l) return m;
|
|
4531
4531
|
for (var v, x = $i(m.declarations); !(v = x()).done; ) {
|
|
4532
4532
|
var b = v.value, k = b.init;
|
|
4533
|
-
k && (n !== "const" || b.id.typeAnnotation ? this.raise(k.start,
|
|
4533
|
+
k && (n !== "const" || b.id.typeAnnotation ? this.raise(k.start, I.InitializerNotAllowedInAmbientContext) : k.type !== "StringLiteral" && k.type !== "BooleanLiteral" && k.type !== "NumericLiteral" && k.type !== "BigIntLiteral" && (k.type !== "TemplateLiteral" || k.expressions.length > 0) && !La(k) && this.raise(k.start, I.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference));
|
|
4534
4534
|
}
|
|
4535
4535
|
return m;
|
|
4536
4536
|
}, f.parseStatement = function(r, n, c) {
|
|
@@ -4547,7 +4547,7 @@ function La(e) {
|
|
|
4547
4547
|
}, f.parseAccessModifier = function() {
|
|
4548
4548
|
return this.tsParseModifier(["public", "protected", "private"]);
|
|
4549
4549
|
}, f.parsePostMemberNameModifiers = function(r) {
|
|
4550
|
-
this.eat(u.question) && (r.optional = !0), r.readonly && this.match(u.parenL) && this.raise(r.start,
|
|
4550
|
+
this.eat(u.question) && (r.optional = !0), r.readonly && this.match(u.parenL) && this.raise(r.start, I.ClassMethodHasReadonly), r.declare && this.match(u.parenL) && this.raise(r.start, I.ClassMethodHasDeclare);
|
|
4551
4551
|
}, f.parseExpressionStatement = function(r, n) {
|
|
4552
4552
|
return (n.type === "Identifier" ? this.tsParseExpressionStatement(r, n) : void 0) || _.prototype.parseExpressionStatement.call(this, r, n);
|
|
4553
4553
|
}, f.shouldParseExportStatement = function() {
|
|
@@ -4579,7 +4579,7 @@ function La(e) {
|
|
|
4579
4579
|
return n.parseExportDeclaration(r);
|
|
4580
4580
|
});
|
|
4581
4581
|
var c = this.start, l = this.startLoc, m = this.eatContextual("declare");
|
|
4582
|
-
!m || !this.ts_isContextual(M.declare) && this.shouldParseExportStatement() || this.raise(this.start,
|
|
4582
|
+
!m || !this.ts_isContextual(M.declare) && this.shouldParseExportStatement() || this.raise(this.start, I.ExpectedAmbientAfterExportDeclare);
|
|
4583
4583
|
var v = U(this.type) && this.tsTryParseExportDeclaration() || this.parseStatement(null);
|
|
4584
4584
|
return v ? ((v.type === "TSInterfaceDeclaration" || v.type === "TSTypeAliasDeclaration" || m) && (r.exportKind = "type"), m && (this.resetStartLocation(v, c, l), v.declare = !0), v) : null;
|
|
4585
4585
|
}, f.parseClassId = function(r, n) {
|
|
@@ -4593,17 +4593,17 @@ function La(e) {
|
|
|
4593
4593
|
var n = this.tsTryParseTypeAnnotation();
|
|
4594
4594
|
n && (r.typeAnnotation = n);
|
|
4595
4595
|
}, f.parseClassField = function(r) {
|
|
4596
|
-
if (r.key.type === "PrivateIdentifier") r.abstract && this.raise(r.start,
|
|
4597
|
-
else if (this.parseClassPropertyAnnotation(r), this.isAmbientContext && (!r.readonly || r.typeAnnotation) && this.match(u.eq) && this.raise(this.start,
|
|
4596
|
+
if (r.key.type === "PrivateIdentifier") r.abstract && this.raise(r.start, I.PrivateElementHasAbstract), r.accessibility && this.raise(r.start, I.PrivateElementHasAccessibility({ modifier: r.accessibility })), this.parseClassPropertyAnnotation(r);
|
|
4597
|
+
else if (this.parseClassPropertyAnnotation(r), this.isAmbientContext && (!r.readonly || r.typeAnnotation) && this.match(u.eq) && this.raise(this.start, I.DeclareClassFieldHasInitializer), r.abstract && this.match(u.eq)) {
|
|
4598
4598
|
var n = r.key;
|
|
4599
|
-
this.raise(this.start,
|
|
4599
|
+
this.raise(this.start, I.AbstractPropertyHasInitializer({ propertyName: n.type !== "Identifier" || r.computed ? "[" + this.input.slice(n.start, n.end) + "]" : n.name }));
|
|
4600
4600
|
}
|
|
4601
4601
|
return _.prototype.parseClassField.call(this, r);
|
|
4602
4602
|
}, f.parseClassMethod = function(r, n, c, l) {
|
|
4603
4603
|
var m = r.kind === "constructor", v = r.key.type === "PrivateIdentifier", x = this.tsTryParseTypeParameters();
|
|
4604
|
-
v ? (x && (r.typeParameters = x), r.accessibility && this.raise(r.start,
|
|
4604
|
+
v ? (x && (r.typeParameters = x), r.accessibility && this.raise(r.start, I.PrivateMethodsHasAccessibility({ modifier: r.accessibility }))) : x && m && this.raise(x.start, I.ConstructorHasTypeParameters);
|
|
4605
4605
|
var b = r.declare, k = r.kind;
|
|
4606
|
-
!(b !== void 0 && b) || k !== "get" && k !== "set" || this.raise(r.start,
|
|
4606
|
+
!(b !== void 0 && b) || k !== "get" && k !== "set" || this.raise(r.start, I.DeclareAccessor({ kind: k })), x && (r.typeParameters = x);
|
|
4607
4607
|
var S = r.key;
|
|
4608
4608
|
r.kind === "constructor" ? (n && this.raise(S.start, "Constructor can't be a generator"), c && this.raise(S.start, "Constructor can't be an async method")) : r.static && Zi(r, "prototype") && this.raise(S.start, "Classes may not have a static property named prototype");
|
|
4609
4609
|
var N = r.value = this.parseMethod(n, c, l, !0, r);
|
|
@@ -4613,13 +4613,13 @@ function La(e) {
|
|
|
4613
4613
|
}, f.parseClassElement = function(r) {
|
|
4614
4614
|
var n = this;
|
|
4615
4615
|
if (this.eat(u.semi)) return null;
|
|
4616
|
-
var c, l = this.options.ecmaVersion, m = this.startNode(), v = "", x = !1, b = !1, k = "method", S = ["declare", "private", "public", "protected", "accessor", "override", "abstract", "readonly", "static"], N = this.tsParseModifiers({ modified: m, allowedModifiers: S, disallowedModifiers: ["in", "out"], stopOnStartOfClassStaticBlock: !0, errorTemplate:
|
|
4616
|
+
var c, l = this.options.ecmaVersion, m = this.startNode(), v = "", x = !1, b = !1, k = "method", S = ["declare", "private", "public", "protected", "accessor", "override", "abstract", "readonly", "static"], N = this.tsParseModifiers({ modified: m, allowedModifiers: S, disallowedModifiers: ["in", "out"], stopOnStartOfClassStaticBlock: !0, errorTemplate: I.InvalidModifierOnTypeParameterPositions });
|
|
4617
4617
|
c = !!N.static;
|
|
4618
4618
|
var z = function() {
|
|
4619
4619
|
if (!n.tsIsStartOfStaticBlocks()) {
|
|
4620
4620
|
var A = n.tsTryParseIndexSignature(m);
|
|
4621
|
-
if (A) return m.abstract && n.raise(m.start,
|
|
4622
|
-
if (!n.inAbstractClass && m.abstract && n.raise(m.start,
|
|
4621
|
+
if (A) return m.abstract && n.raise(m.start, I.IndexSignatureHasAbstract), m.accessibility && n.raise(m.start, I.IndexSignatureHasAccessibility({ modifier: m.accessibility })), m.declare && n.raise(m.start, I.IndexSignatureHasDeclare), m.override && n.raise(m.start, I.IndexSignatureHasOverride), A;
|
|
4622
|
+
if (!n.inAbstractClass && m.abstract && n.raise(m.start, I.NonAbstractClassHasAbstractMethod), m.override && r && n.raise(m.start, I.OverrideNotInSubClass), m.static = c, c && (n.isClassElementNameStart() || n.type === u.star || (v = "static")), !v && l >= 8 && n.eatContextual("async") && (!n.isClassElementNameStart() && n.type !== u.star || n.canInsertSemicolon() ? v = "async" : b = !0), !v && (l >= 9 || !b) && n.eat(u.star) && (x = !0), !v && !b && !x) {
|
|
4623
4623
|
var K = n.value;
|
|
4624
4624
|
(n.eatContextual("get") || n.eatContextual("set")) && (n.isClassElementNameStart() ? k = K : v = K);
|
|
4625
4625
|
}
|
|
@@ -4629,7 +4629,7 @@ function La(e) {
|
|
|
4629
4629
|
} else n.parseClassField(m);
|
|
4630
4630
|
return m;
|
|
4631
4631
|
}
|
|
4632
|
-
if (n.next(), n.next(), n.tsHasSomeModifiers(m, S) && n.raise(n.start,
|
|
4632
|
+
if (n.next(), n.next(), n.tsHasSomeModifiers(m, S) && n.raise(n.start, I.StaticBlockCannotHaveModifier), l >= 13) return _.prototype.parseClassStaticBlock.call(n, m), m;
|
|
4633
4633
|
};
|
|
4634
4634
|
return m.declare ? this.tsInAmbientContext(z) : z(), m;
|
|
4635
4635
|
}, f.isClassElementNameStart = function() {
|
|
@@ -4675,39 +4675,39 @@ function La(e) {
|
|
|
4675
4675
|
}
|
|
4676
4676
|
if (!((l = z) != null && l.error || this.tsMatchLeftRelational())) return this.parseMaybeAssignOrigin(r, n, c);
|
|
4677
4677
|
N && !this.compareLookaheadState(N, this.getCurLookaheadState()) || (N = this.cloneCurLookaheadState());
|
|
4678
|
-
var
|
|
4678
|
+
var de = this.tryParse(function(Be) {
|
|
4679
4679
|
var ft, dt;
|
|
4680
4680
|
K = q.tsParseTypeParameters();
|
|
4681
4681
|
var $e = q.parseMaybeAssignOrigin(r, n, c);
|
|
4682
4682
|
return ($e.type !== "ArrowFunctionExpression" || (ft = $e.extra) != null && ft.parenthesized) && Be(), ((dt = K) == null ? void 0 : dt.params.length) !== 0 && q.resetStartLocationFromNode($e, K), $e.typeParameters = K, $e;
|
|
4683
4683
|
}, N);
|
|
4684
|
-
if (!
|
|
4684
|
+
if (!de.error && !de.aborted) return K && this.reportReservedArrowTypeParam(K), de.node;
|
|
4685
4685
|
if (!z && (qi(!0), !(A = this.tryParse(function() {
|
|
4686
4686
|
return q.parseMaybeAssignOrigin(r, n, c);
|
|
4687
4687
|
}, N)).error)) return A.node;
|
|
4688
4688
|
if ((m = z) != null && m.node) return this.setLookaheadState(z.failState), z.node;
|
|
4689
|
-
if (
|
|
4689
|
+
if (de.node) return this.setLookaheadState(de.failState), K && this.reportReservedArrowTypeParam(K), de.node;
|
|
4690
4690
|
if ((v = A) != null && v.node) return this.setLookaheadState(A.failState), A.node;
|
|
4691
|
-
throw (x = z) != null && x.thrown ? z.error :
|
|
4691
|
+
throw (x = z) != null && x.thrown ? z.error : de.thrown ? de.error : (b = A) != null && b.thrown ? A.error : ((k = z) == null ? void 0 : k.error) || de.error || ((S = A) == null ? void 0 : S.error);
|
|
4692
4692
|
}, f.parseAssignableListItem = function(r) {
|
|
4693
4693
|
for (var n = []; this.match(M.at); ) n.push(this.parseDecorator());
|
|
4694
4694
|
var c, l = this.start, m = this.startLoc, v = !1, x = !1;
|
|
4695
4695
|
if (r !== void 0) {
|
|
4696
4696
|
var b = {};
|
|
4697
|
-
this.tsParseModifiers({ modified: b, allowedModifiers: ["public", "private", "protected", "override", "readonly"] }), c = b.accessibility, x = b.override, v = b.readonly, r === !1 && (c || v || x) && this.raise(m.start,
|
|
4697
|
+
this.tsParseModifiers({ modified: b, allowedModifiers: ["public", "private", "protected", "override", "readonly"] }), c = b.accessibility, x = b.override, v = b.readonly, r === !1 && (c || v || x) && this.raise(m.start, I.UnexpectedParameterModifier);
|
|
4698
4698
|
}
|
|
4699
4699
|
var k = this.parseMaybeDefault(l, m);
|
|
4700
4700
|
this.parseBindingListItem(k);
|
|
4701
4701
|
var S = this.parseMaybeDefault(k.start, k.loc, k);
|
|
4702
4702
|
if (n.length && (S.decorators = n), c || v || x) {
|
|
4703
4703
|
var N = this.startNodeAt(l, m);
|
|
4704
|
-
return c && (N.accessibility = c), v && (N.readonly = v), x && (N.override = x), S.type !== "Identifier" && S.type !== "AssignmentPattern" && this.raise(N.start,
|
|
4704
|
+
return c && (N.accessibility = c), v && (N.readonly = v), x && (N.override = x), S.type !== "Identifier" && S.type !== "AssignmentPattern" && this.raise(N.start, I.UnsupportedParameterPropertyKind), N.parameter = S, this.finishNode(N, "TSParameterProperty");
|
|
4705
4705
|
}
|
|
4706
4706
|
return S;
|
|
4707
4707
|
}, f.checkLValInnerPattern = function(r, n, c) {
|
|
4708
4708
|
n === void 0 && (n = 0), r.type === "TSParameterProperty" ? this.checkLValInnerPattern(r.parameter, n, c) : _.prototype.checkLValInnerPattern.call(this, r, n, c);
|
|
4709
4709
|
}, f.parseBindingListItem = function(r) {
|
|
4710
|
-
this.eat(u.question) && (r.type === "Identifier" || this.isAmbientContext || this.inType || this.raise(r.start,
|
|
4710
|
+
this.eat(u.question) && (r.type === "Identifier" || this.isAmbientContext || this.inType || this.raise(r.start, I.PatternIsOptional), r.optional = !0);
|
|
4711
4711
|
var n = this.tsTryParseTypeAnnotation();
|
|
4712
4712
|
return n && (r.typeAnnotation = n), this.resetEndLocation(r), r;
|
|
4713
4713
|
}, f.isAssignable = function(r, n) {
|
|
@@ -4754,7 +4754,7 @@ function La(e) {
|
|
|
4754
4754
|
case "TSSatisfiesExpression":
|
|
4755
4755
|
case "TSNonNullExpression":
|
|
4756
4756
|
case "TSTypeAssertion":
|
|
4757
|
-
return n || this.raise(r.start,
|
|
4757
|
+
return n || this.raise(r.start, I.UnexpectedTypeCastInParameter), this.toAssignable(r.expression, n, c);
|
|
4758
4758
|
case "MemberExpression":
|
|
4759
4759
|
break;
|
|
4760
4760
|
case "AssignmentExpression":
|
|
@@ -4824,9 +4824,9 @@ function La(e) {
|
|
|
4824
4824
|
}
|
|
4825
4825
|
N.push(this.parseMaybeAssign(n, K, this.parseParenItem));
|
|
4826
4826
|
}
|
|
4827
|
-
var te = this.lastTokEnd,
|
|
4827
|
+
var te = this.lastTokEnd, de = this.lastTokEndLoc;
|
|
4828
4828
|
if (this.expect(u.parenR), this.maybeInArrowParameters = x, r && this.shouldParseArrow(N) && this.eat(u.arrow)) return this.checkPatternErrors(K, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = q, this.awaitPos = G, this.parseParenArrowList(l, m, N, n);
|
|
4829
|
-
N.length && !A || this.unexpected(this.lastTokStart), b && this.unexpected(b), this.checkExpressionErrors(K, !0), this.yieldPos = q || this.yieldPos, this.awaitPos = G || this.awaitPos, N.length > 1 ? ((c = this.startNodeAt(k, S)).expressions = N, this.finishNodeAt(c, "SequenceExpression", te,
|
|
4829
|
+
N.length && !A || this.unexpected(this.lastTokStart), b && this.unexpected(b), this.checkExpressionErrors(K, !0), this.yieldPos = q || this.yieldPos, this.awaitPos = G || this.awaitPos, N.length > 1 ? ((c = this.startNodeAt(k, S)).expressions = N, this.finishNodeAt(c, "SequenceExpression", te, de)) : c = N[0];
|
|
4830
4830
|
} else c = this.parseParenExpression();
|
|
4831
4831
|
if (this.options.preserveParens) {
|
|
4832
4832
|
var Be = this.startNodeAt(l, m);
|
|
@@ -4890,7 +4890,7 @@ function La(e) {
|
|
|
4890
4890
|
return Yt.expression = r, Yt.typeParameters = Ct, b.finishNode(Yt, "TSInstantiationExpression");
|
|
4891
4891
|
}
|
|
4892
4892
|
});
|
|
4893
|
-
if (z && this.unexpected(z), A) return A.type === "TSInstantiationExpression" && (this.match(u.dot) || this.match(u.questionDot) && this.lookaheadCharCode() !== 40) && this.raise(this.start,
|
|
4893
|
+
if (z && this.unexpected(z), A) return A.type === "TSInstantiationExpression" && (this.match(u.dot) || this.match(u.questionDot) && this.lookaheadCharCode() !== 40) && this.raise(this.start, I.InvalidPropertyAccessAfterInstantiationExpression), r = A;
|
|
4894
4894
|
}
|
|
4895
4895
|
var K = this.options.ecmaVersion >= 11, q = K && this.eat(u.questionDot);
|
|
4896
4896
|
l && q && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
@@ -4899,7 +4899,7 @@ function La(e) {
|
|
|
4899
4899
|
var te = this.startNodeAt(n, c);
|
|
4900
4900
|
te.object = r, G ? (te.property = this.parseExpression(), this.expect(u.bracketR)) : te.property = this.type === u.privateId && r.type !== "Super" ? this.parsePrivateIdent() : this.parseIdent(this.options.allowReserved !== "never"), te.computed = !!G, K && (te.optional = q), r = this.finishNode(te, "MemberExpression");
|
|
4901
4901
|
} else if (!l && this.eat(u.parenL)) {
|
|
4902
|
-
var
|
|
4902
|
+
var de = this.maybeInArrowParameters;
|
|
4903
4903
|
this.maybeInArrowParameters = !0;
|
|
4904
4904
|
var Be = new yt(), ft = this.yieldPos, dt = this.awaitPos, $e = this.awaitIdentPos;
|
|
4905
4905
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
@@ -4910,7 +4910,7 @@ function La(e) {
|
|
|
4910
4910
|
var At = this.startNodeAt(n, c);
|
|
4911
4911
|
At.callee = r, At.arguments = Ii, K && (At.optional = q), r = this.finishNode(At, "CallExpression");
|
|
4912
4912
|
}
|
|
4913
|
-
this.maybeInArrowParameters =
|
|
4913
|
+
this.maybeInArrowParameters = de;
|
|
4914
4914
|
} else if (this.type === u.backQuote) {
|
|
4915
4915
|
(q || k) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
4916
4916
|
var Xt = this.startNodeAt(n, c);
|
|
@@ -4947,7 +4947,7 @@ function La(e) {
|
|
|
4947
4947
|
for (this.expect(u.braceL); this.type !== u.braceR; ) if (this.match(M.at)) b.push(this.parseDecorator());
|
|
4948
4948
|
else {
|
|
4949
4949
|
var k = this.parseClassElement(r.superClass !== null);
|
|
4950
|
-
b.length && (k.decorators = b, this.resetStartLocationFromNode(k, b[0]), b = []), k && (v.body.push(k), k.type === "MethodDefinition" && k.kind === "constructor" && k.value.type === "FunctionExpression" ? (x && this.raiseRecoverable(k.start, "Duplicate constructor in the same class"), x = !0, k.decorators && k.decorators.length > 0 && this.raise(k.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")) : k.key && k.key.type === "PrivateIdentifier" &&
|
|
4950
|
+
b.length && (k.decorators = b, this.resetStartLocationFromNode(k, b[0]), b = []), k && (v.body.push(k), k.type === "MethodDefinition" && k.kind === "constructor" && k.value.type === "FunctionExpression" ? (x && this.raiseRecoverable(k.start, "Duplicate constructor in the same class"), x = !0, k.decorators && k.decorators.length > 0 && this.raise(k.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")) : k.key && k.key.type === "PrivateIdentifier" && Pa(m, k) && this.raiseRecoverable(k.key.start, "Identifier '#" + k.key.name + "' has already been declared"));
|
|
4951
4951
|
}
|
|
4952
4952
|
return this.strict = l, this.next(), b.length && this.raise(this.start, "Decorators must be attached to a class element."), r.body = this.finishNode(v, "ClassBody"), this.exitClassBody(), this.finishNode(r, n ? "ClassDeclaration" : "ClassExpression");
|
|
4953
4953
|
} finally {
|
|
@@ -4960,15 +4960,15 @@ function La(e) {
|
|
|
4960
4960
|
var v = this.startNode(), x = this.yieldPos, b = this.awaitPos, k = this.awaitIdentPos;
|
|
4961
4961
|
if (this.initFunction(v), this.options.ecmaVersion >= 6 && (v.generator = r), this.options.ecmaVersion >= 8 && (v.async = !!n), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 | ri(n, v.generator) | (c ? 128 : 0)), this.expect(u.parenL), v.params = this.parseClassFunctionParams(), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(v, !1, !0, !1, { isClassMethod: l }), this.yieldPos = x, this.awaitPos = b, this.awaitIdentPos = k, m && m.abstract && v.body) {
|
|
4962
4962
|
var S = m.key;
|
|
4963
|
-
this.raise(m.start,
|
|
4963
|
+
this.raise(m.start, I.AbstractMethodHasImplementation({ methodName: S.type !== "Identifier" || m.computed ? "[" + this.input.slice(S.start, S.end) + "]" : S.name }));
|
|
4964
4964
|
}
|
|
4965
4965
|
return this.finishNode(v, "FunctionExpression");
|
|
4966
|
-
},
|
|
4966
|
+
}, he.parse = function(r, n) {
|
|
4967
4967
|
if (n.locations === !1) throw new Error("You have to enable options.locations while using acorn-typescript");
|
|
4968
4968
|
n.locations = !0;
|
|
4969
4969
|
var c = new this(n, r);
|
|
4970
4970
|
return s && (c.isAmbientContext = !0), c.parse();
|
|
4971
|
-
},
|
|
4971
|
+
}, he.parseExpressionAt = function(r, n, c) {
|
|
4972
4972
|
if (c.locations === !1) throw new Error("You have to enable options.locations while using acorn-typescript");
|
|
4973
4973
|
c.locations = !0;
|
|
4974
4974
|
var l = new this(c, r, n);
|
|
@@ -4997,7 +4997,7 @@ function La(e) {
|
|
|
4997
4997
|
Pt(this.type) ? (b = !0, x = N, l = n ? this.parseIdent() : this.parseModuleExportName(), k = !1) : (l = z, k = !1);
|
|
4998
4998
|
} else Pt(this.type) ? (k = !1, l = n ? this.parseIdent() : this.parseModuleExportName()) : (b = !0, x = N);
|
|
4999
4999
|
} else Pt(this.type) && (b = !0, n ? (x = _.prototype.parseIdent.call(this, !0), this.isContextual("as") || this.checkUnreserved(x)) : x = this.parseModuleExportName());
|
|
5000
|
-
b && c && this.raise(S, n ?
|
|
5000
|
+
b && c && this.raise(S, n ? I.TypeModifierIsUsedInTypeImports : I.TypeModifierIsUsedInTypeExports), r[m] = x, r[v] = l, r[n ? "importKind" : "exportKind"] = b ? "type" : "value", k && this.eatContextual("as") && (r[v] = n ? this.parseIdent() : this.parseModuleExportName()), r[v] || (r[v] = this.copyNode(r[m])), n && this.checkLValSimple(r[v], 2);
|
|
5001
5001
|
}, f.raiseCommonCheck = function(r, n, c) {
|
|
5002
5002
|
return n === "Comma is not permitted after the rest element" ? this.isAmbientContext && this.match(u.comma) && this.lookaheadCharCode() === 41 ? void this.next() : _.prototype.raise.call(this, r, n) : c ? _.prototype.raiseRecoverable.call(this, r, n) : _.prototype.raise.call(this, r, n);
|
|
5003
5003
|
}, f.raiseRecoverable = function(r, n) {
|
|
@@ -5008,10 +5008,10 @@ function La(e) {
|
|
|
5008
5008
|
var n = this.type;
|
|
5009
5009
|
if (n == u.braceL) {
|
|
5010
5010
|
var c = this.curContext();
|
|
5011
|
-
c ==
|
|
5011
|
+
c == re.tc_oTag ? this.context.push(xe.b_expr) : c == re.tc_expr ? this.context.push(xe.b_tmpl) : _.prototype.updateContext.call(this, r), this.exprAllowed = !0;
|
|
5012
5012
|
} else {
|
|
5013
5013
|
if (n !== u.slash || r !== M.jsxTagStart) return _.prototype.updateContext.call(this, r);
|
|
5014
|
-
this.context.length -= 2, this.context.push(
|
|
5014
|
+
this.context.length -= 2, this.context.push(re.tc_cTag), this.exprAllowed = !1;
|
|
5015
5015
|
}
|
|
5016
5016
|
}, f.jsx_parseOpeningElementAt = function(r, n) {
|
|
5017
5017
|
var c = this, l = this.startNodeAt(r, n), m = this.jsx_parseElementName();
|
|
@@ -5056,18 +5056,18 @@ function La(e) {
|
|
|
5056
5056
|
}
|
|
5057
5057
|
_.prototype.checkLocalExport.call(this, r);
|
|
5058
5058
|
}
|
|
5059
|
-
},
|
|
5059
|
+
}, ne = he, B = [{ key: "acornTypeScript", get: function() {
|
|
5060
5060
|
return y;
|
|
5061
5061
|
} }], (ee = [{ key: "acornTypeScript", get: function() {
|
|
5062
5062
|
return y;
|
|
5063
|
-
} }]) && Fi(
|
|
5063
|
+
} }]) && Fi(ne.prototype, ee), B && Fi(ne, B), Object.defineProperty(ne, "prototype", { writable: !1 }), he;
|
|
5064
5064
|
})(h);
|
|
5065
|
-
return
|
|
5065
|
+
return Nr;
|
|
5066
5066
|
};
|
|
5067
5067
|
}
|
|
5068
|
-
const
|
|
5068
|
+
const Ma = Or(Mr);
|
|
5069
5069
|
function wi(e) {
|
|
5070
|
-
const i = J.extend(
|
|
5070
|
+
const i = J.extend(Oa()).parse(e, {
|
|
5071
5071
|
ecmaVersion: "latest",
|
|
5072
5072
|
sourceType: "module",
|
|
5073
5073
|
locations: !0
|
|
@@ -5082,15 +5082,15 @@ function wi(e) {
|
|
|
5082
5082
|
}
|
|
5083
5083
|
async function Te(e, t, i = [], s) {
|
|
5084
5084
|
const a = `${t} ${i.join(" ")}`;
|
|
5085
|
-
e !== void 0 &&
|
|
5086
|
-
const { stdout: o, stderr: h } = await
|
|
5085
|
+
e !== void 0 && se(`${e} - exec(${a})`);
|
|
5086
|
+
const { stdout: o, stderr: h } = await Ma(a);
|
|
5087
5087
|
s === void 0 ? o.trim() && console.log(o.trim()) : await Pe.writeFile(s, o.trim(), "utf8"), h.trim() && console.error(h.trim());
|
|
5088
5088
|
}
|
|
5089
|
-
async function
|
|
5089
|
+
async function Ra(e, t) {
|
|
5090
5090
|
return Pe.readdir(e, t);
|
|
5091
5091
|
}
|
|
5092
|
-
async function
|
|
5093
|
-
|
|
5092
|
+
async function Da() {
|
|
5093
|
+
se("Load environment variables"), (await import("dotenv")).config();
|
|
5094
5094
|
}
|
|
5095
5095
|
function Le(e) {
|
|
5096
5096
|
const t = "\x1B[36m", i = "\x1B[0m", s = "─".repeat(Math.max(e.length + 60, 60));
|
|
@@ -5102,7 +5102,7 @@ function Fe(e) {
|
|
|
5102
5102
|
✅ ${e}
|
|
5103
5103
|
`);
|
|
5104
5104
|
}
|
|
5105
|
-
function
|
|
5105
|
+
function se(e) {
|
|
5106
5106
|
console.info(`
|
|
5107
5107
|
${e}
|
|
5108
5108
|
`);
|
|
@@ -5114,8 +5114,8 @@ async function nt(e) {
|
|
|
5114
5114
|
return await Pe.readFile(e, "utf8");
|
|
5115
5115
|
}
|
|
5116
5116
|
async function Ee(e, t, i = [], s = !1) {
|
|
5117
|
-
return
|
|
5118
|
-
|
|
5117
|
+
return se(`${e} - spawn(${t} ${i.join(" ")})`), new Promise((a, o) => {
|
|
5118
|
+
Rr(t, i, { stdio: "inherit" }).on("close", (d) => {
|
|
5119
5119
|
d === 0 || s ? a() : o(new Error(`${t} exited with code ${d}`));
|
|
5120
5120
|
});
|
|
5121
5121
|
});
|
|
@@ -5123,7 +5123,7 @@ async function Ee(e, t, i = [], s = !1) {
|
|
|
5123
5123
|
async function ot(e, t) {
|
|
5124
5124
|
await Pe.writeFile(e, JSON.stringify(t, void 0, 4), "utf8");
|
|
5125
5125
|
}
|
|
5126
|
-
async function
|
|
5126
|
+
async function ir(e, t) {
|
|
5127
5127
|
await Pe.writeFile(e, t, "utf8");
|
|
5128
5128
|
}
|
|
5129
5129
|
function pi(e, t) {
|
|
@@ -5139,7 +5139,7 @@ function pi(e, t) {
|
|
|
5139
5139
|
else a && typeof a == "object" && typeof a.type == "string" && pi(a, t);
|
|
5140
5140
|
}
|
|
5141
5141
|
}
|
|
5142
|
-
const
|
|
5142
|
+
const za = ["createObject", "dropObject", "removeRecords", "upsertRecords"], Va = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
|
|
5143
5143
|
function w(e, t, i) {
|
|
5144
5144
|
function s(d, y) {
|
|
5145
5145
|
var u;
|
|
@@ -5172,16 +5172,16 @@ class st extends Error {
|
|
|
5172
5172
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
5173
5173
|
}
|
|
5174
5174
|
}
|
|
5175
|
-
class
|
|
5175
|
+
class sr extends Error {
|
|
5176
5176
|
constructor(t) {
|
|
5177
5177
|
super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
|
|
5178
5178
|
}
|
|
5179
5179
|
}
|
|
5180
|
-
const
|
|
5180
|
+
const rr = {};
|
|
5181
5181
|
function Ze(e) {
|
|
5182
|
-
return
|
|
5182
|
+
return rr;
|
|
5183
5183
|
}
|
|
5184
|
-
function
|
|
5184
|
+
function ja(e) {
|
|
5185
5185
|
const t = Object.values(e).filter((i) => typeof i == "number");
|
|
5186
5186
|
return Object.entries(e).filter(([i, s]) => t.indexOf(+i) === -1).map(([i, s]) => s);
|
|
5187
5187
|
}
|
|
@@ -5205,7 +5205,7 @@ function _i(e) {
|
|
|
5205
5205
|
const t = e.startsWith("^") ? 1 : 0, i = e.endsWith("$") ? e.length - 1 : e.length;
|
|
5206
5206
|
return e.slice(t, i);
|
|
5207
5207
|
}
|
|
5208
|
-
function
|
|
5208
|
+
function Fa(e, t) {
|
|
5209
5209
|
const i = (e.toString().split(".")[1] || "").length, s = t.toString();
|
|
5210
5210
|
let a = (s.split(".")[1] || "").length;
|
|
5211
5211
|
if (a === 0 && /\d?e-\d?/.test(s)) {
|
|
@@ -5251,12 +5251,12 @@ function Ye(...e) {
|
|
|
5251
5251
|
function Ki(e) {
|
|
5252
5252
|
return JSON.stringify(e);
|
|
5253
5253
|
}
|
|
5254
|
-
const
|
|
5254
|
+
const ar = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
5255
5255
|
};
|
|
5256
5256
|
function Ft(e) {
|
|
5257
5257
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
5258
5258
|
}
|
|
5259
|
-
const
|
|
5259
|
+
const Ba = Ti(() => {
|
|
5260
5260
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
5261
5261
|
return !1;
|
|
5262
5262
|
try {
|
|
@@ -5275,10 +5275,10 @@ function ut(e) {
|
|
|
5275
5275
|
const i = t.prototype;
|
|
5276
5276
|
return !(Ft(i) === !1 || Object.prototype.hasOwnProperty.call(i, "isPrototypeOf") === !1);
|
|
5277
5277
|
}
|
|
5278
|
-
function
|
|
5278
|
+
function nr(e) {
|
|
5279
5279
|
return ut(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
5280
5280
|
}
|
|
5281
|
-
const
|
|
5281
|
+
const $a = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
5282
5282
|
function ct(e) {
|
|
5283
5283
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5284
5284
|
}
|
|
@@ -5299,17 +5299,17 @@ function O(e) {
|
|
|
5299
5299
|
}
|
|
5300
5300
|
return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
|
|
5301
5301
|
}
|
|
5302
|
-
function
|
|
5302
|
+
function Ua(e) {
|
|
5303
5303
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
5304
5304
|
}
|
|
5305
|
-
const
|
|
5305
|
+
const Za = {
|
|
5306
5306
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
5307
5307
|
int32: [-2147483648, 2147483647],
|
|
5308
5308
|
uint32: [0, 4294967295],
|
|
5309
5309
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
5310
5310
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
5311
5311
|
};
|
|
5312
|
-
function
|
|
5312
|
+
function qa(e, t) {
|
|
5313
5313
|
const i = e._zod.def, s = Ye(e._zod.def, {
|
|
5314
5314
|
get shape() {
|
|
5315
5315
|
const a = {};
|
|
@@ -5324,7 +5324,7 @@ function Za(e, t) {
|
|
|
5324
5324
|
});
|
|
5325
5325
|
return Ke(e, s);
|
|
5326
5326
|
}
|
|
5327
|
-
function
|
|
5327
|
+
function Ha(e, t) {
|
|
5328
5328
|
const i = e._zod.def, s = Ye(e._zod.def, {
|
|
5329
5329
|
get shape() {
|
|
5330
5330
|
const a = { ...e._zod.def.shape };
|
|
@@ -5339,7 +5339,7 @@ function qa(e, t) {
|
|
|
5339
5339
|
});
|
|
5340
5340
|
return Ke(e, s);
|
|
5341
5341
|
}
|
|
5342
|
-
function
|
|
5342
|
+
function Wa(e, t) {
|
|
5343
5343
|
if (!ut(t))
|
|
5344
5344
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
5345
5345
|
const i = e._zod.def.checks;
|
|
@@ -5354,7 +5354,7 @@ function Ha(e, t) {
|
|
|
5354
5354
|
});
|
|
5355
5355
|
return Ke(e, s);
|
|
5356
5356
|
}
|
|
5357
|
-
function
|
|
5357
|
+
function Ka(e, t) {
|
|
5358
5358
|
if (!ut(t))
|
|
5359
5359
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
5360
5360
|
const i = {
|
|
@@ -5367,7 +5367,7 @@ function Wa(e, t) {
|
|
|
5367
5367
|
};
|
|
5368
5368
|
return Ke(e, i);
|
|
5369
5369
|
}
|
|
5370
|
-
function
|
|
5370
|
+
function Ga(e, t) {
|
|
5371
5371
|
const i = Ye(e._zod.def, {
|
|
5372
5372
|
get shape() {
|
|
5373
5373
|
const s = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
@@ -5381,7 +5381,7 @@ function Ka(e, t) {
|
|
|
5381
5381
|
});
|
|
5382
5382
|
return Ke(e, i);
|
|
5383
5383
|
}
|
|
5384
|
-
function
|
|
5384
|
+
function Ja(e, t, i) {
|
|
5385
5385
|
const s = Ye(t._zod.def, {
|
|
5386
5386
|
get shape() {
|
|
5387
5387
|
const a = t._zod.def.shape, o = { ...a };
|
|
@@ -5406,7 +5406,7 @@ function Ga(e, t, i) {
|
|
|
5406
5406
|
});
|
|
5407
5407
|
return Ke(t, s);
|
|
5408
5408
|
}
|
|
5409
|
-
function
|
|
5409
|
+
function Xa(e, t, i) {
|
|
5410
5410
|
const s = Ye(t._zod.def, {
|
|
5411
5411
|
get shape() {
|
|
5412
5412
|
const a = t._zod.def.shape, o = { ...a };
|
|
@@ -5468,7 +5468,7 @@ function bt(...e) {
|
|
|
5468
5468
|
inst: s
|
|
5469
5469
|
} : { ...t };
|
|
5470
5470
|
}
|
|
5471
|
-
const
|
|
5471
|
+
const or = (e, t) => {
|
|
5472
5472
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
5473
5473
|
value: e._zod,
|
|
5474
5474
|
enumerable: !1
|
|
@@ -5479,14 +5479,14 @@ const nr = (e, t) => {
|
|
|
5479
5479
|
value: () => e.message,
|
|
5480
5480
|
enumerable: !1
|
|
5481
5481
|
});
|
|
5482
|
-
},
|
|
5483
|
-
function
|
|
5482
|
+
}, ur = w("$ZodError", or), cr = w("$ZodError", or, { Parent: Error });
|
|
5483
|
+
function Qa(e, t = (i) => i.message) {
|
|
5484
5484
|
const i = {}, s = [];
|
|
5485
5485
|
for (const a of e.issues)
|
|
5486
5486
|
a.path.length > 0 ? (i[a.path[0]] = i[a.path[0]] || [], i[a.path[0]].push(t(a))) : s.push(t(a));
|
|
5487
5487
|
return { formErrors: s, fieldErrors: i };
|
|
5488
5488
|
}
|
|
5489
|
-
function
|
|
5489
|
+
function Ya(e, t = (i) => i.message) {
|
|
5490
5490
|
const i = { _errors: [] }, s = (a) => {
|
|
5491
5491
|
for (const o of a.issues)
|
|
5492
5492
|
if (o.code === "invalid_union" && o.errors.length)
|
|
@@ -5513,7 +5513,7 @@ const Ai = (e) => (t, i, s, a) => {
|
|
|
5513
5513
|
throw new st();
|
|
5514
5514
|
if (h.issues.length) {
|
|
5515
5515
|
const d = new (a?.Err ?? e)(h.issues.map((y) => qe(y, o, Ze())));
|
|
5516
|
-
throw
|
|
5516
|
+
throw ar(d, a?.callee), d;
|
|
5517
5517
|
}
|
|
5518
5518
|
return h.value;
|
|
5519
5519
|
}, Ci = (e) => async (t, i, s, a) => {
|
|
@@ -5521,7 +5521,7 @@ const Ai = (e) => (t, i, s, a) => {
|
|
|
5521
5521
|
let h = t._zod.run({ value: i, issues: [] }, o);
|
|
5522
5522
|
if (h instanceof Promise && (h = await h), h.issues.length) {
|
|
5523
5523
|
const d = new (a?.Err ?? e)(h.issues.map((y) => qe(y, o, Ze())));
|
|
5524
|
-
throw
|
|
5524
|
+
throw ar(d, a?.callee), d;
|
|
5525
5525
|
}
|
|
5526
5526
|
return h.value;
|
|
5527
5527
|
}, Kt = (e) => (t, i, s) => {
|
|
@@ -5530,58 +5530,58 @@ const Ai = (e) => (t, i, s, a) => {
|
|
|
5530
5530
|
throw new st();
|
|
5531
5531
|
return o.issues.length ? {
|
|
5532
5532
|
success: !1,
|
|
5533
|
-
error: new (e ??
|
|
5533
|
+
error: new (e ?? ur)(o.issues.map((h) => qe(h, a, Ze())))
|
|
5534
5534
|
} : { success: !0, data: o.value };
|
|
5535
|
-
},
|
|
5535
|
+
}, en = /* @__PURE__ */ Kt(cr), Gt = (e) => async (t, i, s) => {
|
|
5536
5536
|
const a = s ? Object.assign(s, { async: !0 }) : { async: !0 };
|
|
5537
5537
|
let o = t._zod.run({ value: i, issues: [] }, a);
|
|
5538
5538
|
return o instanceof Promise && (o = await o), o.issues.length ? {
|
|
5539
5539
|
success: !1,
|
|
5540
5540
|
error: new e(o.issues.map((h) => qe(h, a, Ze())))
|
|
5541
5541
|
} : { success: !0, data: o.value };
|
|
5542
|
-
},
|
|
5542
|
+
}, tn = /* @__PURE__ */ Gt(cr), sn = (e) => (t, i, s) => {
|
|
5543
5543
|
const a = s ? Object.assign(s, { direction: "backward" }) : { direction: "backward" };
|
|
5544
5544
|
return Ai(e)(t, i, a);
|
|
5545
|
-
},
|
|
5545
|
+
}, rn = (e) => (t, i, s) => Ai(e)(t, i, s), an = (e) => async (t, i, s) => {
|
|
5546
5546
|
const a = s ? Object.assign(s, { direction: "backward" }) : { direction: "backward" };
|
|
5547
5547
|
return Ci(e)(t, i, a);
|
|
5548
|
-
},
|
|
5548
|
+
}, nn = (e) => async (t, i, s) => Ci(e)(t, i, s), on = (e) => (t, i, s) => {
|
|
5549
5549
|
const a = s ? Object.assign(s, { direction: "backward" }) : { direction: "backward" };
|
|
5550
5550
|
return Kt(e)(t, i, a);
|
|
5551
|
-
},
|
|
5551
|
+
}, un = (e) => (t, i, s) => Kt(e)(t, i, s), cn = (e) => async (t, i, s) => {
|
|
5552
5552
|
const a = s ? Object.assign(s, { direction: "backward" }) : { direction: "backward" };
|
|
5553
5553
|
return Gt(e)(t, i, a);
|
|
5554
|
-
},
|
|
5555
|
-
function
|
|
5556
|
-
return new RegExp(
|
|
5554
|
+
}, hn = (e) => async (t, i, s) => Gt(e)(t, i, s), pn = /^[cC][^\s-]{8,}$/, ln = /^[0-9a-z]+$/, fn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, dn = /^[0-9a-vA-V]{20}$/, mn = /^[A-Za-z0-9]{27}$/, yn = /^[a-zA-Z0-9_-]{21}$/, vn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, xn = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, Gi = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, gn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, bn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
5555
|
+
function kn() {
|
|
5556
|
+
return new RegExp(bn, "u");
|
|
5557
5557
|
}
|
|
5558
|
-
const
|
|
5559
|
-
function
|
|
5558
|
+
const wn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Tn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, Sn = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, _n = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Pn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, hr = /^[A-Za-z0-9_-]*$/, An = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, Cn = /^\+(?:[0-9]){6,14}[0-9]$/, pr = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", En = /* @__PURE__ */ new RegExp(`^${pr}$`);
|
|
5559
|
+
function lr(e) {
|
|
5560
5560
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
5561
5561
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
5562
5562
|
}
|
|
5563
|
-
function En(e) {
|
|
5564
|
-
return new RegExp(`^${pr(e)}$`);
|
|
5565
|
-
}
|
|
5566
5563
|
function In(e) {
|
|
5567
|
-
|
|
5564
|
+
return new RegExp(`^${lr(e)}$`);
|
|
5565
|
+
}
|
|
5566
|
+
function Nn(e) {
|
|
5567
|
+
const t = lr({ precision: e.precision }), i = ["Z"];
|
|
5568
5568
|
e.local && i.push(""), e.offset && i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
5569
5569
|
const s = `${t}(?:${i.join("|")})`;
|
|
5570
|
-
return new RegExp(`^${
|
|
5570
|
+
return new RegExp(`^${pr}T(?:${s})$`);
|
|
5571
5571
|
}
|
|
5572
|
-
const
|
|
5572
|
+
const Ln = (e) => {
|
|
5573
5573
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
5574
5574
|
return new RegExp(`^${t}$`);
|
|
5575
|
-
},
|
|
5575
|
+
}, On = /^-?\d+$/, Mn = /^-?\d+(?:\.\d+)?/, Rn = /^(?:true|false)$/i, Dn = /^[^A-Z]*$/, zn = /^[^a-z]*$/, le = /* @__PURE__ */ w("$ZodCheck", (e, t) => {
|
|
5576
5576
|
var i;
|
|
5577
5577
|
e._zod ?? (e._zod = {}), e._zod.def = t, (i = e._zod).onattach ?? (i.onattach = []);
|
|
5578
|
-
}),
|
|
5578
|
+
}), fr = {
|
|
5579
5579
|
number: "number",
|
|
5580
5580
|
bigint: "bigint",
|
|
5581
5581
|
object: "date"
|
|
5582
|
-
},
|
|
5583
|
-
|
|
5584
|
-
const i =
|
|
5582
|
+
}, dr = /* @__PURE__ */ w("$ZodCheckLessThan", (e, t) => {
|
|
5583
|
+
le.init(e, t);
|
|
5584
|
+
const i = fr[typeof t.value];
|
|
5585
5585
|
e._zod.onattach.push((s) => {
|
|
5586
5586
|
const a = s._zod.bag, o = (t.inclusive ? a.maximum : a.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
5587
5587
|
t.value < o && (t.inclusive ? a.maximum = t.value : a.exclusiveMaximum = t.value);
|
|
@@ -5596,9 +5596,9 @@ const Nn = (e) => {
|
|
|
5596
5596
|
continue: !t.abort
|
|
5597
5597
|
});
|
|
5598
5598
|
};
|
|
5599
|
-
}),
|
|
5600
|
-
|
|
5601
|
-
const i =
|
|
5599
|
+
}), mr = /* @__PURE__ */ w("$ZodCheckGreaterThan", (e, t) => {
|
|
5600
|
+
le.init(e, t);
|
|
5601
|
+
const i = fr[typeof t.value];
|
|
5602
5602
|
e._zod.onattach.push((s) => {
|
|
5603
5603
|
const a = s._zod.bag, o = (t.inclusive ? a.minimum : a.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
5604
5604
|
t.value > o && (t.inclusive ? a.minimum = t.value : a.exclusiveMinimum = t.value);
|
|
@@ -5613,14 +5613,14 @@ const Nn = (e) => {
|
|
|
5613
5613
|
continue: !t.abort
|
|
5614
5614
|
});
|
|
5615
5615
|
};
|
|
5616
|
-
}),
|
|
5617
|
-
|
|
5616
|
+
}), Vn = /* @__PURE__ */ w("$ZodCheckMultipleOf", (e, t) => {
|
|
5617
|
+
le.init(e, t), e._zod.onattach.push((i) => {
|
|
5618
5618
|
var s;
|
|
5619
5619
|
(s = i._zod.bag).multipleOf ?? (s.multipleOf = t.value);
|
|
5620
5620
|
}), e._zod.check = (i) => {
|
|
5621
5621
|
if (typeof i.value != typeof t.value)
|
|
5622
5622
|
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
5623
|
-
(typeof i.value == "bigint" ? i.value % t.value === BigInt(0) :
|
|
5623
|
+
(typeof i.value == "bigint" ? i.value % t.value === BigInt(0) : Fa(i.value, t.value) === 0) || i.issues.push({
|
|
5624
5624
|
origin: typeof i.value,
|
|
5625
5625
|
code: "not_multiple_of",
|
|
5626
5626
|
divisor: t.value,
|
|
@@ -5629,12 +5629,12 @@ const Nn = (e) => {
|
|
|
5629
5629
|
continue: !t.abort
|
|
5630
5630
|
});
|
|
5631
5631
|
};
|
|
5632
|
-
}),
|
|
5633
|
-
|
|
5634
|
-
const i = t.format?.includes("int"), s = i ? "int" : "number", [a, o] =
|
|
5632
|
+
}), jn = /* @__PURE__ */ w("$ZodCheckNumberFormat", (e, t) => {
|
|
5633
|
+
le.init(e, t), t.format = t.format || "float64";
|
|
5634
|
+
const i = t.format?.includes("int"), s = i ? "int" : "number", [a, o] = Za[t.format];
|
|
5635
5635
|
e._zod.onattach.push((h) => {
|
|
5636
5636
|
const d = h._zod.bag;
|
|
5637
|
-
d.format = t.format, d.minimum = a, d.maximum = o, i && (d.pattern =
|
|
5637
|
+
d.format = t.format, d.minimum = a, d.maximum = o, i && (d.pattern = On);
|
|
5638
5638
|
}), e._zod.check = (h) => {
|
|
5639
5639
|
const d = h.value;
|
|
5640
5640
|
if (i) {
|
|
@@ -5686,9 +5686,9 @@ const Nn = (e) => {
|
|
|
5686
5686
|
inst: e
|
|
5687
5687
|
});
|
|
5688
5688
|
};
|
|
5689
|
-
}),
|
|
5689
|
+
}), Fn = /* @__PURE__ */ w("$ZodCheckMaxLength", (e, t) => {
|
|
5690
5690
|
var i;
|
|
5691
|
-
|
|
5691
|
+
le.init(e, t), (i = e._zod.def).when ?? (i.when = (s) => {
|
|
5692
5692
|
const a = s.value;
|
|
5693
5693
|
return !Si(a) && a.length !== void 0;
|
|
5694
5694
|
}), e._zod.onattach.push((s) => {
|
|
@@ -5709,9 +5709,9 @@ const Nn = (e) => {
|
|
|
5709
5709
|
continue: !t.abort
|
|
5710
5710
|
});
|
|
5711
5711
|
};
|
|
5712
|
-
}),
|
|
5712
|
+
}), Bn = /* @__PURE__ */ w("$ZodCheckMinLength", (e, t) => {
|
|
5713
5713
|
var i;
|
|
5714
|
-
|
|
5714
|
+
le.init(e, t), (i = e._zod.def).when ?? (i.when = (s) => {
|
|
5715
5715
|
const a = s.value;
|
|
5716
5716
|
return !Si(a) && a.length !== void 0;
|
|
5717
5717
|
}), e._zod.onattach.push((s) => {
|
|
@@ -5732,9 +5732,9 @@ const Nn = (e) => {
|
|
|
5732
5732
|
continue: !t.abort
|
|
5733
5733
|
});
|
|
5734
5734
|
};
|
|
5735
|
-
}),
|
|
5735
|
+
}), $n = /* @__PURE__ */ w("$ZodCheckLengthEquals", (e, t) => {
|
|
5736
5736
|
var i;
|
|
5737
|
-
|
|
5737
|
+
le.init(e, t), (i = e._zod.def).when ?? (i.when = (s) => {
|
|
5738
5738
|
const a = s.value;
|
|
5739
5739
|
return !Si(a) && a.length !== void 0;
|
|
5740
5740
|
}), e._zod.onattach.push((s) => {
|
|
@@ -5757,7 +5757,7 @@ const Nn = (e) => {
|
|
|
5757
5757
|
};
|
|
5758
5758
|
}), Jt = /* @__PURE__ */ w("$ZodCheckStringFormat", (e, t) => {
|
|
5759
5759
|
var i, s;
|
|
5760
|
-
|
|
5760
|
+
le.init(e, t), e._zod.onattach.push((a) => {
|
|
5761
5761
|
const o = a._zod.bag;
|
|
5762
5762
|
o.format = t.format, t.pattern && (o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(t.pattern));
|
|
5763
5763
|
}), t.pattern ? (i = e._zod).check ?? (i.check = (a) => {
|
|
@@ -5772,7 +5772,7 @@ const Nn = (e) => {
|
|
|
5772
5772
|
});
|
|
5773
5773
|
}) : (s = e._zod).check ?? (s.check = () => {
|
|
5774
5774
|
});
|
|
5775
|
-
}),
|
|
5775
|
+
}), Un = /* @__PURE__ */ w("$ZodCheckRegex", (e, t) => {
|
|
5776
5776
|
Jt.init(e, t), e._zod.check = (i) => {
|
|
5777
5777
|
t.pattern.lastIndex = 0, !t.pattern.test(i.value) && i.issues.push({
|
|
5778
5778
|
origin: "string",
|
|
@@ -5784,12 +5784,12 @@ const Nn = (e) => {
|
|
|
5784
5784
|
continue: !t.abort
|
|
5785
5785
|
});
|
|
5786
5786
|
};
|
|
5787
|
-
}),
|
|
5788
|
-
t.pattern ?? (t.pattern = Rn), Jt.init(e, t);
|
|
5789
|
-
}), Zn = /* @__PURE__ */ w("$ZodCheckUpperCase", (e, t) => {
|
|
5787
|
+
}), Zn = /* @__PURE__ */ w("$ZodCheckLowerCase", (e, t) => {
|
|
5790
5788
|
t.pattern ?? (t.pattern = Dn), Jt.init(e, t);
|
|
5791
|
-
}), qn = /* @__PURE__ */ w("$
|
|
5792
|
-
|
|
5789
|
+
}), qn = /* @__PURE__ */ w("$ZodCheckUpperCase", (e, t) => {
|
|
5790
|
+
t.pattern ?? (t.pattern = zn), Jt.init(e, t);
|
|
5791
|
+
}), Hn = /* @__PURE__ */ w("$ZodCheckIncludes", (e, t) => {
|
|
5792
|
+
le.init(e, t);
|
|
5793
5793
|
const i = ct(t.includes), s = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${i}` : i);
|
|
5794
5794
|
t.pattern = s, e._zod.onattach.push((a) => {
|
|
5795
5795
|
const o = a._zod.bag;
|
|
@@ -5805,8 +5805,8 @@ const Nn = (e) => {
|
|
|
5805
5805
|
continue: !t.abort
|
|
5806
5806
|
});
|
|
5807
5807
|
};
|
|
5808
|
-
}),
|
|
5809
|
-
|
|
5808
|
+
}), Wn = /* @__PURE__ */ w("$ZodCheckStartsWith", (e, t) => {
|
|
5809
|
+
le.init(e, t);
|
|
5810
5810
|
const i = new RegExp(`^${ct(t.prefix)}.*`);
|
|
5811
5811
|
t.pattern ?? (t.pattern = i), e._zod.onattach.push((s) => {
|
|
5812
5812
|
const a = s._zod.bag;
|
|
@@ -5822,8 +5822,8 @@ const Nn = (e) => {
|
|
|
5822
5822
|
continue: !t.abort
|
|
5823
5823
|
});
|
|
5824
5824
|
};
|
|
5825
|
-
}),
|
|
5826
|
-
|
|
5825
|
+
}), Kn = /* @__PURE__ */ w("$ZodCheckEndsWith", (e, t) => {
|
|
5826
|
+
le.init(e, t);
|
|
5827
5827
|
const i = new RegExp(`.*${ct(t.suffix)}$`);
|
|
5828
5828
|
t.pattern ?? (t.pattern = i), e._zod.onattach.push((s) => {
|
|
5829
5829
|
const a = s._zod.bag;
|
|
@@ -5839,12 +5839,12 @@ const Nn = (e) => {
|
|
|
5839
5839
|
continue: !t.abort
|
|
5840
5840
|
});
|
|
5841
5841
|
};
|
|
5842
|
-
}),
|
|
5843
|
-
|
|
5842
|
+
}), Gn = /* @__PURE__ */ w("$ZodCheckOverwrite", (e, t) => {
|
|
5843
|
+
le.init(e, t), e._zod.check = (i) => {
|
|
5844
5844
|
i.value = t.tx(i.value);
|
|
5845
5845
|
};
|
|
5846
5846
|
});
|
|
5847
|
-
class
|
|
5847
|
+
class Jn {
|
|
5848
5848
|
constructor(t = []) {
|
|
5849
5849
|
this.content = [], this.indent = 0, this && (this.args = t);
|
|
5850
5850
|
}
|
|
@@ -5867,13 +5867,13 @@ class Gn {
|
|
|
5867
5867
|
`));
|
|
5868
5868
|
}
|
|
5869
5869
|
}
|
|
5870
|
-
const
|
|
5870
|
+
const Xn = {
|
|
5871
5871
|
major: 4,
|
|
5872
5872
|
minor: 1,
|
|
5873
5873
|
patch: 12
|
|
5874
5874
|
}, X = /* @__PURE__ */ w("$ZodType", (e, t) => {
|
|
5875
5875
|
var i;
|
|
5876
|
-
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
5876
|
+
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Xn;
|
|
5877
5877
|
const s = [...e._zod.def.checks ?? []];
|
|
5878
5878
|
e._zod.traits.has("$ZodCheck") && s.unshift(e);
|
|
5879
5879
|
for (const a of s)
|
|
@@ -5886,13 +5886,13 @@ const Jn = {
|
|
|
5886
5886
|
else {
|
|
5887
5887
|
const a = (h, d, y) => {
|
|
5888
5888
|
let u = tt(h), T;
|
|
5889
|
-
for (const
|
|
5890
|
-
if (
|
|
5891
|
-
if (!
|
|
5889
|
+
for (const E of d) {
|
|
5890
|
+
if (E._zod.def.when) {
|
|
5891
|
+
if (!E._zod.def.when(h))
|
|
5892
5892
|
continue;
|
|
5893
5893
|
} else if (u)
|
|
5894
5894
|
continue;
|
|
5895
|
-
const R = h.issues.length, W =
|
|
5895
|
+
const R = h.issues.length, W = E._zod.check(h);
|
|
5896
5896
|
if (W instanceof Promise && y?.async === !1)
|
|
5897
5897
|
throw new st();
|
|
5898
5898
|
if (T || W instanceof Promise)
|
|
@@ -5936,17 +5936,17 @@ const Jn = {
|
|
|
5936
5936
|
e["~standard"] = {
|
|
5937
5937
|
validate: (a) => {
|
|
5938
5938
|
try {
|
|
5939
|
-
const o =
|
|
5939
|
+
const o = en(e, a);
|
|
5940
5940
|
return o.success ? { value: o.data } : { issues: o.error?.issues };
|
|
5941
5941
|
} catch {
|
|
5942
|
-
return
|
|
5942
|
+
return tn(e, a).then((o) => o.success ? { value: o.data } : { issues: o.error?.issues });
|
|
5943
5943
|
}
|
|
5944
5944
|
},
|
|
5945
5945
|
vendor: "zod",
|
|
5946
5946
|
version: 1
|
|
5947
5947
|
};
|
|
5948
5948
|
}), Ei = /* @__PURE__ */ w("$ZodString", (e, t) => {
|
|
5949
|
-
X.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ??
|
|
5949
|
+
X.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Ln(e._zod.bag), e._zod.parse = (i, s) => {
|
|
5950
5950
|
if (t.coerce)
|
|
5951
5951
|
try {
|
|
5952
5952
|
i.value = String(i.value);
|
|
@@ -5961,9 +5961,9 @@ const Jn = {
|
|
|
5961
5961
|
};
|
|
5962
5962
|
}), H = /* @__PURE__ */ w("$ZodStringFormat", (e, t) => {
|
|
5963
5963
|
Jt.init(e, t), Ei.init(e, t);
|
|
5964
|
-
}),
|
|
5965
|
-
t.pattern ?? (t.pattern =
|
|
5966
|
-
}),
|
|
5964
|
+
}), Qn = /* @__PURE__ */ w("$ZodGUID", (e, t) => {
|
|
5965
|
+
t.pattern ?? (t.pattern = xn), H.init(e, t);
|
|
5966
|
+
}), Yn = /* @__PURE__ */ w("$ZodUUID", (e, t) => {
|
|
5967
5967
|
if (t.version) {
|
|
5968
5968
|
const i = {
|
|
5969
5969
|
v1: 1,
|
|
@@ -5981,9 +5981,9 @@ const Jn = {
|
|
|
5981
5981
|
} else
|
|
5982
5982
|
t.pattern ?? (t.pattern = Gi());
|
|
5983
5983
|
H.init(e, t);
|
|
5984
|
-
}),
|
|
5985
|
-
t.pattern ?? (t.pattern =
|
|
5986
|
-
}),
|
|
5984
|
+
}), eo = /* @__PURE__ */ w("$ZodEmail", (e, t) => {
|
|
5985
|
+
t.pattern ?? (t.pattern = gn), H.init(e, t);
|
|
5986
|
+
}), to = /* @__PURE__ */ w("$ZodURL", (e, t) => {
|
|
5987
5987
|
H.init(e, t), e._zod.check = (i) => {
|
|
5988
5988
|
try {
|
|
5989
5989
|
const s = i.value.trim(), a = new URL(s);
|
|
@@ -5991,7 +5991,7 @@ const Jn = {
|
|
|
5991
5991
|
code: "invalid_format",
|
|
5992
5992
|
format: "url",
|
|
5993
5993
|
note: "Invalid hostname",
|
|
5994
|
-
pattern:
|
|
5994
|
+
pattern: An.source,
|
|
5995
5995
|
input: i.value,
|
|
5996
5996
|
inst: e,
|
|
5997
5997
|
continue: !t.abort
|
|
@@ -6015,35 +6015,35 @@ const Jn = {
|
|
|
6015
6015
|
});
|
|
6016
6016
|
}
|
|
6017
6017
|
};
|
|
6018
|
-
}),
|
|
6019
|
-
t.pattern ?? (t.pattern =
|
|
6020
|
-
}),
|
|
6021
|
-
t.pattern ?? (t.pattern =
|
|
6022
|
-
}),
|
|
6023
|
-
t.pattern ?? (t.pattern = hn), H.init(e, t);
|
|
6024
|
-
}), ro = /* @__PURE__ */ w("$ZodCUID2", (e, t) => {
|
|
6018
|
+
}), io = /* @__PURE__ */ w("$ZodEmoji", (e, t) => {
|
|
6019
|
+
t.pattern ?? (t.pattern = kn()), H.init(e, t);
|
|
6020
|
+
}), so = /* @__PURE__ */ w("$ZodNanoID", (e, t) => {
|
|
6021
|
+
t.pattern ?? (t.pattern = yn), H.init(e, t);
|
|
6022
|
+
}), ro = /* @__PURE__ */ w("$ZodCUID", (e, t) => {
|
|
6025
6023
|
t.pattern ?? (t.pattern = pn), H.init(e, t);
|
|
6026
|
-
}), ao = /* @__PURE__ */ w("$
|
|
6024
|
+
}), ao = /* @__PURE__ */ w("$ZodCUID2", (e, t) => {
|
|
6027
6025
|
t.pattern ?? (t.pattern = ln), H.init(e, t);
|
|
6028
|
-
}), no = /* @__PURE__ */ w("$
|
|
6026
|
+
}), no = /* @__PURE__ */ w("$ZodULID", (e, t) => {
|
|
6029
6027
|
t.pattern ?? (t.pattern = fn), H.init(e, t);
|
|
6030
|
-
}), oo = /* @__PURE__ */ w("$
|
|
6028
|
+
}), oo = /* @__PURE__ */ w("$ZodXID", (e, t) => {
|
|
6031
6029
|
t.pattern ?? (t.pattern = dn), H.init(e, t);
|
|
6032
|
-
}), uo = /* @__PURE__ */ w("$
|
|
6030
|
+
}), uo = /* @__PURE__ */ w("$ZodKSUID", (e, t) => {
|
|
6031
|
+
t.pattern ?? (t.pattern = mn), H.init(e, t);
|
|
6032
|
+
}), co = /* @__PURE__ */ w("$ZodISODateTime", (e, t) => {
|
|
6033
|
+
t.pattern ?? (t.pattern = Nn(t)), H.init(e, t);
|
|
6034
|
+
}), ho = /* @__PURE__ */ w("$ZodISODate", (e, t) => {
|
|
6035
|
+
t.pattern ?? (t.pattern = En), H.init(e, t);
|
|
6036
|
+
}), po = /* @__PURE__ */ w("$ZodISOTime", (e, t) => {
|
|
6033
6037
|
t.pattern ?? (t.pattern = In(t)), H.init(e, t);
|
|
6034
|
-
}),
|
|
6035
|
-
t.pattern ?? (t.pattern =
|
|
6036
|
-
}),
|
|
6037
|
-
t.pattern ?? (t.pattern =
|
|
6038
|
-
}), po = /* @__PURE__ */ w("$ZodISODuration", (e, t) => {
|
|
6039
|
-
t.pattern ?? (t.pattern = yn), H.init(e, t);
|
|
6040
|
-
}), lo = /* @__PURE__ */ w("$ZodIPv4", (e, t) => {
|
|
6041
|
-
t.pattern ?? (t.pattern = kn), H.init(e, t), e._zod.onattach.push((i) => {
|
|
6038
|
+
}), lo = /* @__PURE__ */ w("$ZodISODuration", (e, t) => {
|
|
6039
|
+
t.pattern ?? (t.pattern = vn), H.init(e, t);
|
|
6040
|
+
}), fo = /* @__PURE__ */ w("$ZodIPv4", (e, t) => {
|
|
6041
|
+
t.pattern ?? (t.pattern = wn), H.init(e, t), e._zod.onattach.push((i) => {
|
|
6042
6042
|
const s = i._zod.bag;
|
|
6043
6043
|
s.format = "ipv4";
|
|
6044
6044
|
});
|
|
6045
|
-
}),
|
|
6046
|
-
t.pattern ?? (t.pattern =
|
|
6045
|
+
}), mo = /* @__PURE__ */ w("$ZodIPv6", (e, t) => {
|
|
6046
|
+
t.pattern ?? (t.pattern = Tn), H.init(e, t), e._zod.onattach.push((i) => {
|
|
6047
6047
|
const s = i._zod.bag;
|
|
6048
6048
|
s.format = "ipv6";
|
|
6049
6049
|
}), e._zod.check = (i) => {
|
|
@@ -6059,10 +6059,10 @@ const Jn = {
|
|
|
6059
6059
|
});
|
|
6060
6060
|
}
|
|
6061
6061
|
};
|
|
6062
|
-
}),
|
|
6063
|
-
t.pattern ?? (t.pattern =
|
|
6064
|
-
}),
|
|
6065
|
-
t.pattern ?? (t.pattern =
|
|
6062
|
+
}), yo = /* @__PURE__ */ w("$ZodCIDRv4", (e, t) => {
|
|
6063
|
+
t.pattern ?? (t.pattern = Sn), H.init(e, t);
|
|
6064
|
+
}), vo = /* @__PURE__ */ w("$ZodCIDRv6", (e, t) => {
|
|
6065
|
+
t.pattern ?? (t.pattern = _n), H.init(e, t), e._zod.check = (i) => {
|
|
6066
6066
|
const s = i.value.split("/");
|
|
6067
6067
|
try {
|
|
6068
6068
|
if (s.length !== 2)
|
|
@@ -6087,7 +6087,7 @@ const Jn = {
|
|
|
6087
6087
|
}
|
|
6088
6088
|
};
|
|
6089
6089
|
});
|
|
6090
|
-
function
|
|
6090
|
+
function yr(e) {
|
|
6091
6091
|
if (e === "")
|
|
6092
6092
|
return !0;
|
|
6093
6093
|
if (e.length % 4 !== 0)
|
|
@@ -6098,11 +6098,11 @@ function mr(e) {
|
|
|
6098
6098
|
return !1;
|
|
6099
6099
|
}
|
|
6100
6100
|
}
|
|
6101
|
-
const
|
|
6102
|
-
t.pattern ?? (t.pattern =
|
|
6101
|
+
const xo = /* @__PURE__ */ w("$ZodBase64", (e, t) => {
|
|
6102
|
+
t.pattern ?? (t.pattern = Pn), H.init(e, t), e._zod.onattach.push((i) => {
|
|
6103
6103
|
i._zod.bag.contentEncoding = "base64";
|
|
6104
6104
|
}), e._zod.check = (i) => {
|
|
6105
|
-
|
|
6105
|
+
yr(i.value) || i.issues.push({
|
|
6106
6106
|
code: "invalid_format",
|
|
6107
6107
|
format: "base64",
|
|
6108
6108
|
input: i.value,
|
|
@@ -6111,17 +6111,17 @@ const vo = /* @__PURE__ */ w("$ZodBase64", (e, t) => {
|
|
|
6111
6111
|
});
|
|
6112
6112
|
};
|
|
6113
6113
|
});
|
|
6114
|
-
function
|
|
6115
|
-
if (!
|
|
6114
|
+
function go(e) {
|
|
6115
|
+
if (!hr.test(e))
|
|
6116
6116
|
return !1;
|
|
6117
6117
|
const t = e.replace(/[-_]/g, (s) => s === "-" ? "+" : "/"), i = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
6118
|
-
return
|
|
6118
|
+
return yr(i);
|
|
6119
6119
|
}
|
|
6120
|
-
const
|
|
6121
|
-
t.pattern ?? (t.pattern =
|
|
6120
|
+
const bo = /* @__PURE__ */ w("$ZodBase64URL", (e, t) => {
|
|
6121
|
+
t.pattern ?? (t.pattern = hr), H.init(e, t), e._zod.onattach.push((i) => {
|
|
6122
6122
|
i._zod.bag.contentEncoding = "base64url";
|
|
6123
6123
|
}), e._zod.check = (i) => {
|
|
6124
|
-
|
|
6124
|
+
go(i.value) || i.issues.push({
|
|
6125
6125
|
code: "invalid_format",
|
|
6126
6126
|
format: "base64url",
|
|
6127
6127
|
input: i.value,
|
|
@@ -6129,10 +6129,10 @@ const go = /* @__PURE__ */ w("$ZodBase64URL", (e, t) => {
|
|
|
6129
6129
|
continue: !t.abort
|
|
6130
6130
|
});
|
|
6131
6131
|
};
|
|
6132
|
-
}),
|
|
6133
|
-
t.pattern ?? (t.pattern =
|
|
6132
|
+
}), ko = /* @__PURE__ */ w("$ZodE164", (e, t) => {
|
|
6133
|
+
t.pattern ?? (t.pattern = Cn), H.init(e, t);
|
|
6134
6134
|
});
|
|
6135
|
-
function
|
|
6135
|
+
function wo(e, t = null) {
|
|
6136
6136
|
try {
|
|
6137
6137
|
const i = e.split(".");
|
|
6138
6138
|
if (i.length !== 3)
|
|
@@ -6146,9 +6146,9 @@ function ko(e, t = null) {
|
|
|
6146
6146
|
return !1;
|
|
6147
6147
|
}
|
|
6148
6148
|
}
|
|
6149
|
-
const
|
|
6149
|
+
const To = /* @__PURE__ */ w("$ZodJWT", (e, t) => {
|
|
6150
6150
|
H.init(e, t), e._zod.check = (i) => {
|
|
6151
|
-
|
|
6151
|
+
wo(i.value, t.alg) || i.issues.push({
|
|
6152
6152
|
code: "invalid_format",
|
|
6153
6153
|
format: "jwt",
|
|
6154
6154
|
input: i.value,
|
|
@@ -6156,8 +6156,8 @@ const wo = /* @__PURE__ */ w("$ZodJWT", (e, t) => {
|
|
|
6156
6156
|
continue: !t.abort
|
|
6157
6157
|
});
|
|
6158
6158
|
};
|
|
6159
|
-
}),
|
|
6160
|
-
X.init(e, t), e._zod.pattern = e._zod.bag.pattern ??
|
|
6159
|
+
}), vr = /* @__PURE__ */ w("$ZodNumber", (e, t) => {
|
|
6160
|
+
X.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Mn, e._zod.parse = (i, s) => {
|
|
6161
6161
|
if (t.coerce)
|
|
6162
6162
|
try {
|
|
6163
6163
|
i.value = Number(i.value);
|
|
@@ -6175,10 +6175,10 @@ const wo = /* @__PURE__ */ w("$ZodJWT", (e, t) => {
|
|
|
6175
6175
|
...o ? { received: o } : {}
|
|
6176
6176
|
}), i;
|
|
6177
6177
|
};
|
|
6178
|
-
}),
|
|
6179
|
-
|
|
6180
|
-
}),
|
|
6181
|
-
X.init(e, t), e._zod.pattern =
|
|
6178
|
+
}), So = /* @__PURE__ */ w("$ZodNumber", (e, t) => {
|
|
6179
|
+
jn.init(e, t), vr.init(e, t);
|
|
6180
|
+
}), _o = /* @__PURE__ */ w("$ZodBoolean", (e, t) => {
|
|
6181
|
+
X.init(e, t), e._zod.pattern = Rn, e._zod.parse = (i, s) => {
|
|
6182
6182
|
if (t.coerce)
|
|
6183
6183
|
try {
|
|
6184
6184
|
i.value = !!i.value;
|
|
@@ -6192,9 +6192,9 @@ const wo = /* @__PURE__ */ w("$ZodJWT", (e, t) => {
|
|
|
6192
6192
|
inst: e
|
|
6193
6193
|
}), i;
|
|
6194
6194
|
};
|
|
6195
|
-
}),
|
|
6195
|
+
}), Po = /* @__PURE__ */ w("$ZodUnknown", (e, t) => {
|
|
6196
6196
|
X.init(e, t), e._zod.parse = (i) => i;
|
|
6197
|
-
}),
|
|
6197
|
+
}), Ao = /* @__PURE__ */ w("$ZodNever", (e, t) => {
|
|
6198
6198
|
X.init(e, t), e._zod.parse = (i, s) => (i.issues.push({
|
|
6199
6199
|
expected: "never",
|
|
6200
6200
|
code: "invalid_type",
|
|
@@ -6205,7 +6205,7 @@ const wo = /* @__PURE__ */ w("$ZodJWT", (e, t) => {
|
|
|
6205
6205
|
function Ji(e, t, i) {
|
|
6206
6206
|
e.issues.length && t.issues.push(...it(i, e.issues)), t.value[i] = e.value;
|
|
6207
6207
|
}
|
|
6208
|
-
const
|
|
6208
|
+
const Co = /* @__PURE__ */ w("$ZodArray", (e, t) => {
|
|
6209
6209
|
X.init(e, t), e._zod.parse = (i, s) => {
|
|
6210
6210
|
const a = i.value;
|
|
6211
6211
|
if (!Array.isArray(a))
|
|
@@ -6230,12 +6230,12 @@ const Ao = /* @__PURE__ */ w("$ZodArray", (e, t) => {
|
|
|
6230
6230
|
function Bt(e, t, i, s) {
|
|
6231
6231
|
e.issues.length && t.issues.push(...it(i, e.issues)), e.value === void 0 ? i in s && (t.value[i] = void 0) : t.value[i] = e.value;
|
|
6232
6232
|
}
|
|
6233
|
-
function
|
|
6233
|
+
function xr(e) {
|
|
6234
6234
|
const t = Object.keys(e.shape);
|
|
6235
6235
|
for (const s of t)
|
|
6236
6236
|
if (!e.shape?.[s]?._zod?.traits?.has("$ZodType"))
|
|
6237
6237
|
throw new Error(`Invalid element at key "${s}": expected a Zod schema`);
|
|
6238
|
-
const i =
|
|
6238
|
+
const i = Ua(e.shape);
|
|
6239
6239
|
return {
|
|
6240
6240
|
...e,
|
|
6241
6241
|
keys: t,
|
|
@@ -6244,7 +6244,7 @@ function vr(e) {
|
|
|
6244
6244
|
optionalKeys: new Set(i)
|
|
6245
6245
|
};
|
|
6246
6246
|
}
|
|
6247
|
-
function
|
|
6247
|
+
function gr(e, t, i, s, a, o) {
|
|
6248
6248
|
const h = [], d = a.keySet, y = a.catchall._zod, u = y.def.type;
|
|
6249
6249
|
for (const T of Object.keys(t)) {
|
|
6250
6250
|
if (d.has(T))
|
|
@@ -6253,8 +6253,8 @@ function xr(e, t, i, s, a, o) {
|
|
|
6253
6253
|
h.push(T);
|
|
6254
6254
|
continue;
|
|
6255
6255
|
}
|
|
6256
|
-
const
|
|
6257
|
-
|
|
6256
|
+
const E = y.run({ value: t[T], issues: [] }, s);
|
|
6257
|
+
E instanceof Promise ? e.push(E.then((R) => Bt(R, i, T, t))) : Bt(E, i, T, t);
|
|
6258
6258
|
}
|
|
6259
6259
|
return h.length && i.issues.push({
|
|
6260
6260
|
code: "unrecognized_keys",
|
|
@@ -6263,7 +6263,7 @@ function xr(e, t, i, s, a, o) {
|
|
|
6263
6263
|
inst: o
|
|
6264
6264
|
}), e.length ? Promise.all(e).then(() => i) : i;
|
|
6265
6265
|
}
|
|
6266
|
-
const
|
|
6266
|
+
const Eo = /* @__PURE__ */ w("$ZodObject", (e, t) => {
|
|
6267
6267
|
if (X.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
6268
6268
|
const h = t.shape;
|
|
6269
6269
|
Object.defineProperty(t, "shape", {
|
|
@@ -6275,7 +6275,7 @@ const Co = /* @__PURE__ */ w("$ZodObject", (e, t) => {
|
|
|
6275
6275
|
}
|
|
6276
6276
|
});
|
|
6277
6277
|
}
|
|
6278
|
-
const i = Ti(() =>
|
|
6278
|
+
const i = Ti(() => xr(t));
|
|
6279
6279
|
$(e._zod, "propValues", () => {
|
|
6280
6280
|
const h = t.shape, d = {};
|
|
6281
6281
|
for (const y in h) {
|
|
@@ -6302,28 +6302,28 @@ const Co = /* @__PURE__ */ w("$ZodObject", (e, t) => {
|
|
|
6302
6302
|
}), h;
|
|
6303
6303
|
h.value = {};
|
|
6304
6304
|
const u = [], T = o.shape;
|
|
6305
|
-
for (const
|
|
6306
|
-
const R = T[
|
|
6307
|
-
R instanceof Promise ? u.push(R.then((W) => Bt(W, h,
|
|
6305
|
+
for (const E of o.keys) {
|
|
6306
|
+
const R = T[E]._zod.run({ value: y[E], issues: [] }, d);
|
|
6307
|
+
R instanceof Promise ? u.push(R.then((W) => Bt(W, h, E, y))) : Bt(R, h, E, y);
|
|
6308
6308
|
}
|
|
6309
|
-
return a ?
|
|
6309
|
+
return a ? gr(u, y, h, d, i.value, e) : u.length ? Promise.all(u).then(() => h) : h;
|
|
6310
6310
|
};
|
|
6311
|
-
}),
|
|
6312
|
-
|
|
6313
|
-
const i = e._zod.parse, s = Ti(() =>
|
|
6314
|
-
const R = new
|
|
6315
|
-
const ge = Ki(
|
|
6311
|
+
}), Io = /* @__PURE__ */ w("$ZodObjectJIT", (e, t) => {
|
|
6312
|
+
Eo.init(e, t);
|
|
6313
|
+
const i = e._zod.parse, s = Ti(() => xr(t)), a = (E) => {
|
|
6314
|
+
const R = new Jn(["shape", "payload", "ctx"]), W = s.value, xe = (fe) => {
|
|
6315
|
+
const ge = Ki(fe);
|
|
6316
6316
|
return `shape[${ge}]._zod.run({ value: input[${ge}], issues: [] }, ctx)`;
|
|
6317
6317
|
};
|
|
6318
6318
|
R.write("const input = payload.value;");
|
|
6319
6319
|
const Me = /* @__PURE__ */ Object.create(null);
|
|
6320
6320
|
let M = 0;
|
|
6321
|
-
for (const
|
|
6322
|
-
Me[
|
|
6321
|
+
for (const fe of W.keys)
|
|
6322
|
+
Me[fe] = `key_${M++}`;
|
|
6323
6323
|
R.write("const newResult = {};");
|
|
6324
|
-
for (const
|
|
6325
|
-
const ge = Me[
|
|
6326
|
-
R.write(`const ${ge} = ${
|
|
6324
|
+
for (const fe of W.keys) {
|
|
6325
|
+
const ge = Me[fe], Ge = Ki(fe);
|
|
6326
|
+
R.write(`const ${ge} = ${xe(fe)};`), R.write(`
|
|
6327
6327
|
if (${ge}.issues.length) {
|
|
6328
6328
|
payload.issues = payload.issues.concat(${ge}.issues.map(iss => ({
|
|
6329
6329
|
...iss,
|
|
@@ -6343,21 +6343,21 @@ const Co = /* @__PURE__ */ w("$ZodObject", (e, t) => {
|
|
|
6343
6343
|
`);
|
|
6344
6344
|
}
|
|
6345
6345
|
R.write("payload.value = newResult;"), R.write("return payload;");
|
|
6346
|
-
const
|
|
6347
|
-
return (
|
|
6346
|
+
const re = R.compile();
|
|
6347
|
+
return (fe, ge) => re(E, fe, ge);
|
|
6348
6348
|
};
|
|
6349
6349
|
let o;
|
|
6350
|
-
const h = Ft, d = !
|
|
6350
|
+
const h = Ft, d = !rr.jitless, y = d && Ba.value, u = t.catchall;
|
|
6351
6351
|
let T;
|
|
6352
|
-
e._zod.parse = (
|
|
6352
|
+
e._zod.parse = (E, R) => {
|
|
6353
6353
|
T ?? (T = s.value);
|
|
6354
|
-
const W =
|
|
6355
|
-
return h(W) ? d && y && R?.async === !1 && R.jitless !== !0 ? (o || (o = a(t.shape)),
|
|
6354
|
+
const W = E.value;
|
|
6355
|
+
return h(W) ? d && y && R?.async === !1 && R.jitless !== !0 ? (o || (o = a(t.shape)), E = o(E, R), u ? gr([], W, E, R, T, e) : E) : i(E, R) : (E.issues.push({
|
|
6356
6356
|
expected: "object",
|
|
6357
6357
|
code: "invalid_type",
|
|
6358
6358
|
input: W,
|
|
6359
6359
|
inst: e
|
|
6360
|
-
}),
|
|
6360
|
+
}), E);
|
|
6361
6361
|
};
|
|
6362
6362
|
});
|
|
6363
6363
|
function Xi(e, t, i, s) {
|
|
@@ -6372,7 +6372,7 @@ function Xi(e, t, i, s) {
|
|
|
6372
6372
|
errors: e.map((o) => o.issues.map((h) => qe(h, s, Ze())))
|
|
6373
6373
|
}), t);
|
|
6374
6374
|
}
|
|
6375
|
-
const
|
|
6375
|
+
const No = /* @__PURE__ */ w("$ZodUnion", (e, t) => {
|
|
6376
6376
|
X.init(e, t), $(e._zod, "optin", () => t.options.some((a) => a._zod.optin === "optional") ? "optional" : void 0), $(e._zod, "optout", () => t.options.some((a) => a._zod.optout === "optional") ? "optional" : void 0), $(e._zod, "values", () => {
|
|
6377
6377
|
if (t.options.every((a) => a._zod.values))
|
|
6378
6378
|
return new Set(t.options.flatMap((a) => Array.from(a._zod.values)));
|
|
@@ -6403,7 +6403,7 @@ const Io = /* @__PURE__ */ w("$ZodUnion", (e, t) => {
|
|
|
6403
6403
|
}
|
|
6404
6404
|
return h ? Promise.all(d).then((y) => Xi(y, a, e, o)) : Xi(d, a, e, o);
|
|
6405
6405
|
};
|
|
6406
|
-
}),
|
|
6406
|
+
}), Lo = /* @__PURE__ */ w("$ZodIntersection", (e, t) => {
|
|
6407
6407
|
X.init(e, t), e._zod.parse = (i, s) => {
|
|
6408
6408
|
const a = i.value, o = t.left._zod.run({ value: a, issues: [] }, s), h = t.right._zod.run({ value: a, issues: [] }, s);
|
|
6409
6409
|
return o instanceof Promise || h instanceof Promise ? Promise.all([o, h]).then(([d, y]) => Qi(i, d, y)) : Qi(i, o, h);
|
|
@@ -6452,7 +6452,7 @@ function Qi(e, t, i) {
|
|
|
6452
6452
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);
|
|
6453
6453
|
return e.value = s.data, e;
|
|
6454
6454
|
}
|
|
6455
|
-
const
|
|
6455
|
+
const Oo = /* @__PURE__ */ w("$ZodRecord", (e, t) => {
|
|
6456
6456
|
X.init(e, t), e._zod.parse = (i, s) => {
|
|
6457
6457
|
const a = i.value;
|
|
6458
6458
|
if (!ut(a))
|
|
@@ -6509,10 +6509,10 @@ const Lo = /* @__PURE__ */ w("$ZodRecord", (e, t) => {
|
|
|
6509
6509
|
}
|
|
6510
6510
|
return o.length ? Promise.all(o).then(() => i) : i;
|
|
6511
6511
|
};
|
|
6512
|
-
}),
|
|
6512
|
+
}), Mo = /* @__PURE__ */ w("$ZodEnum", (e, t) => {
|
|
6513
6513
|
X.init(e, t);
|
|
6514
|
-
const i =
|
|
6515
|
-
e._zod.values = s, e._zod.pattern = new RegExp(`^(${i.filter((a) =>
|
|
6514
|
+
const i = ja(t.entries), s = new Set(i);
|
|
6515
|
+
e._zod.values = s, e._zod.pattern = new RegExp(`^(${i.filter((a) => $a.has(typeof a)).map((a) => typeof a == "string" ? ct(a) : a.toString()).join("|")})$`), e._zod.parse = (a, o) => {
|
|
6516
6516
|
const h = a.value;
|
|
6517
6517
|
return s.has(h) || a.issues.push({
|
|
6518
6518
|
code: "invalid_value",
|
|
@@ -6521,7 +6521,7 @@ const Lo = /* @__PURE__ */ w("$ZodRecord", (e, t) => {
|
|
|
6521
6521
|
inst: e
|
|
6522
6522
|
}), a;
|
|
6523
6523
|
};
|
|
6524
|
-
}),
|
|
6524
|
+
}), Ro = /* @__PURE__ */ w("$ZodLiteral", (e, t) => {
|
|
6525
6525
|
if (X.init(e, t), t.values.length === 0)
|
|
6526
6526
|
throw new Error("Cannot create literal schema with no valid values");
|
|
6527
6527
|
e._zod.values = new Set(t.values), e._zod.pattern = new RegExp(`^(${t.values.map((i) => typeof i == "string" ? ct(i) : i ? ct(i.toString()) : String(i)).join("|")})$`), e._zod.parse = (i, s) => {
|
|
@@ -6533,10 +6533,10 @@ const Lo = /* @__PURE__ */ w("$ZodRecord", (e, t) => {
|
|
|
6533
6533
|
inst: e
|
|
6534
6534
|
}), i;
|
|
6535
6535
|
};
|
|
6536
|
-
}),
|
|
6536
|
+
}), Do = /* @__PURE__ */ w("$ZodTransform", (e, t) => {
|
|
6537
6537
|
X.init(e, t), e._zod.parse = (i, s) => {
|
|
6538
6538
|
if (s.direction === "backward")
|
|
6539
|
-
throw new
|
|
6539
|
+
throw new sr(e.constructor.name);
|
|
6540
6540
|
const a = t.transform(i.value, i);
|
|
6541
6541
|
if (s.async)
|
|
6542
6542
|
return (a instanceof Promise ? a : Promise.resolve(a)).then((o) => (i.value = o, i));
|
|
@@ -6548,7 +6548,7 @@ const Lo = /* @__PURE__ */ w("$ZodRecord", (e, t) => {
|
|
|
6548
6548
|
function Yi(e, t) {
|
|
6549
6549
|
return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
|
|
6550
6550
|
}
|
|
6551
|
-
const
|
|
6551
|
+
const zo = /* @__PURE__ */ w("$ZodOptional", (e, t) => {
|
|
6552
6552
|
X.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", $(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), $(e._zod, "pattern", () => {
|
|
6553
6553
|
const i = t.innerType._zod.pattern;
|
|
6554
6554
|
return i ? new RegExp(`^(${_i(i.source)})?$`) : void 0;
|
|
@@ -6559,12 +6559,12 @@ const Do = /* @__PURE__ */ w("$ZodOptional", (e, t) => {
|
|
|
6559
6559
|
}
|
|
6560
6560
|
return i.value === void 0 ? i : t.innerType._zod.run(i, s);
|
|
6561
6561
|
};
|
|
6562
|
-
}),
|
|
6562
|
+
}), Vo = /* @__PURE__ */ w("$ZodNullable", (e, t) => {
|
|
6563
6563
|
X.init(e, t), $(e._zod, "optin", () => t.innerType._zod.optin), $(e._zod, "optout", () => t.innerType._zod.optout), $(e._zod, "pattern", () => {
|
|
6564
6564
|
const i = t.innerType._zod.pattern;
|
|
6565
6565
|
return i ? new RegExp(`^(${_i(i.source)}|null)$`) : void 0;
|
|
6566
6566
|
}), $(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (i, s) => i.value === null ? i : t.innerType._zod.run(i, s);
|
|
6567
|
-
}),
|
|
6567
|
+
}), jo = /* @__PURE__ */ w("$ZodDefault", (e, t) => {
|
|
6568
6568
|
X.init(e, t), e._zod.optin = "optional", $(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (i, s) => {
|
|
6569
6569
|
if (s.direction === "backward")
|
|
6570
6570
|
return t.innerType._zod.run(i, s);
|
|
@@ -6577,9 +6577,9 @@ const Do = /* @__PURE__ */ w("$ZodOptional", (e, t) => {
|
|
|
6577
6577
|
function es(e, t) {
|
|
6578
6578
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
6579
6579
|
}
|
|
6580
|
-
const
|
|
6580
|
+
const Fo = /* @__PURE__ */ w("$ZodPrefault", (e, t) => {
|
|
6581
6581
|
X.init(e, t), e._zod.optin = "optional", $(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (i, s) => (s.direction === "backward" || i.value === void 0 && (i.value = t.defaultValue), t.innerType._zod.run(i, s));
|
|
6582
|
-
}),
|
|
6582
|
+
}), Bo = /* @__PURE__ */ w("$ZodNonOptional", (e, t) => {
|
|
6583
6583
|
X.init(e, t), $(e._zod, "values", () => {
|
|
6584
6584
|
const i = t.innerType._zod.values;
|
|
6585
6585
|
return i ? new Set([...i].filter((s) => s !== void 0)) : void 0;
|
|
@@ -6596,7 +6596,7 @@ function ts(e, t) {
|
|
|
6596
6596
|
inst: t
|
|
6597
6597
|
}), e;
|
|
6598
6598
|
}
|
|
6599
|
-
const
|
|
6599
|
+
const $o = /* @__PURE__ */ w("$ZodCatch", (e, t) => {
|
|
6600
6600
|
X.init(e, t), $(e._zod, "optin", () => t.innerType._zod.optin), $(e._zod, "optout", () => t.innerType._zod.optout), $(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (i, s) => {
|
|
6601
6601
|
if (s.direction === "backward")
|
|
6602
6602
|
return t.innerType._zod.run(i, s);
|
|
@@ -6615,7 +6615,7 @@ const Bo = /* @__PURE__ */ w("$ZodCatch", (e, t) => {
|
|
|
6615
6615
|
input: i.value
|
|
6616
6616
|
}), i.issues = []), i);
|
|
6617
6617
|
};
|
|
6618
|
-
}),
|
|
6618
|
+
}), Uo = /* @__PURE__ */ w("$ZodPipe", (e, t) => {
|
|
6619
6619
|
X.init(e, t), $(e._zod, "values", () => t.in._zod.values), $(e._zod, "optin", () => t.in._zod.optin), $(e._zod, "optout", () => t.out._zod.optout), $(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (i, s) => {
|
|
6620
6620
|
if (s.direction === "backward") {
|
|
6621
6621
|
const o = t.out._zod.run(i, s);
|
|
@@ -6628,7 +6628,7 @@ const Bo = /* @__PURE__ */ w("$ZodCatch", (e, t) => {
|
|
|
6628
6628
|
function Nt(e, t, i) {
|
|
6629
6629
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, i);
|
|
6630
6630
|
}
|
|
6631
|
-
const
|
|
6631
|
+
const Zo = /* @__PURE__ */ w("$ZodReadonly", (e, t) => {
|
|
6632
6632
|
X.init(e, t), $(e._zod, "propValues", () => t.innerType._zod.propValues), $(e._zod, "values", () => t.innerType._zod.values), $(e._zod, "optin", () => t.innerType._zod.optin), $(e._zod, "optout", () => t.innerType._zod.optout), e._zod.parse = (i, s) => {
|
|
6633
6633
|
if (s.direction === "backward")
|
|
6634
6634
|
return t.innerType._zod.run(i, s);
|
|
@@ -6639,8 +6639,8 @@ const Uo = /* @__PURE__ */ w("$ZodReadonly", (e, t) => {
|
|
|
6639
6639
|
function is(e) {
|
|
6640
6640
|
return e.value = Object.freeze(e.value), e;
|
|
6641
6641
|
}
|
|
6642
|
-
const
|
|
6643
|
-
|
|
6642
|
+
const qo = /* @__PURE__ */ w("$ZodCustom", (e, t) => {
|
|
6643
|
+
le.init(e, t), X.init(e, t), e._zod.parse = (i, s) => i, e._zod.check = (i) => {
|
|
6644
6644
|
const s = i.value, a = t.fn(s);
|
|
6645
6645
|
if (a instanceof Promise)
|
|
6646
6646
|
return a.then((o) => ss(o, i, s, e));
|
|
@@ -6662,7 +6662,7 @@ function ss(e, t, i, s) {
|
|
|
6662
6662
|
s._zod.def.params && (a.params = s._zod.def.params), t.issues.push(bt(a));
|
|
6663
6663
|
}
|
|
6664
6664
|
}
|
|
6665
|
-
class
|
|
6665
|
+
class Ho {
|
|
6666
6666
|
constructor() {
|
|
6667
6667
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
6668
6668
|
}
|
|
@@ -6696,17 +6696,17 @@ class qo {
|
|
|
6696
6696
|
return this._map.has(t);
|
|
6697
6697
|
}
|
|
6698
6698
|
}
|
|
6699
|
-
function
|
|
6700
|
-
return new
|
|
6699
|
+
function Wo() {
|
|
6700
|
+
return new Ho();
|
|
6701
6701
|
}
|
|
6702
|
-
const Lt = /* @__PURE__ */
|
|
6703
|
-
function
|
|
6702
|
+
const Lt = /* @__PURE__ */ Wo();
|
|
6703
|
+
function Ko(e, t) {
|
|
6704
6704
|
return new e({
|
|
6705
6705
|
type: "string",
|
|
6706
6706
|
...O(t)
|
|
6707
6707
|
});
|
|
6708
6708
|
}
|
|
6709
|
-
function
|
|
6709
|
+
function Go(e, t) {
|
|
6710
6710
|
return new e({
|
|
6711
6711
|
type: "string",
|
|
6712
6712
|
format: "email",
|
|
@@ -6724,7 +6724,7 @@ function rs(e, t) {
|
|
|
6724
6724
|
...O(t)
|
|
6725
6725
|
});
|
|
6726
6726
|
}
|
|
6727
|
-
function
|
|
6727
|
+
function Jo(e, t) {
|
|
6728
6728
|
return new e({
|
|
6729
6729
|
type: "string",
|
|
6730
6730
|
format: "uuid",
|
|
@@ -6733,7 +6733,7 @@ function Go(e, t) {
|
|
|
6733
6733
|
...O(t)
|
|
6734
6734
|
});
|
|
6735
6735
|
}
|
|
6736
|
-
function
|
|
6736
|
+
function Xo(e, t) {
|
|
6737
6737
|
return new e({
|
|
6738
6738
|
type: "string",
|
|
6739
6739
|
format: "uuid",
|
|
@@ -6743,7 +6743,7 @@ function Jo(e, t) {
|
|
|
6743
6743
|
...O(t)
|
|
6744
6744
|
});
|
|
6745
6745
|
}
|
|
6746
|
-
function
|
|
6746
|
+
function Qo(e, t) {
|
|
6747
6747
|
return new e({
|
|
6748
6748
|
type: "string",
|
|
6749
6749
|
format: "uuid",
|
|
@@ -6753,7 +6753,7 @@ function Xo(e, t) {
|
|
|
6753
6753
|
...O(t)
|
|
6754
6754
|
});
|
|
6755
6755
|
}
|
|
6756
|
-
function
|
|
6756
|
+
function Yo(e, t) {
|
|
6757
6757
|
return new e({
|
|
6758
6758
|
type: "string",
|
|
6759
6759
|
format: "uuid",
|
|
@@ -6763,7 +6763,7 @@ function Qo(e, t) {
|
|
|
6763
6763
|
...O(t)
|
|
6764
6764
|
});
|
|
6765
6765
|
}
|
|
6766
|
-
function
|
|
6766
|
+
function eu(e, t) {
|
|
6767
6767
|
return new e({
|
|
6768
6768
|
type: "string",
|
|
6769
6769
|
format: "url",
|
|
@@ -6772,7 +6772,7 @@ function Yo(e, t) {
|
|
|
6772
6772
|
...O(t)
|
|
6773
6773
|
});
|
|
6774
6774
|
}
|
|
6775
|
-
function
|
|
6775
|
+
function tu(e, t) {
|
|
6776
6776
|
return new e({
|
|
6777
6777
|
type: "string",
|
|
6778
6778
|
format: "emoji",
|
|
@@ -6781,7 +6781,7 @@ function eu(e, t) {
|
|
|
6781
6781
|
...O(t)
|
|
6782
6782
|
});
|
|
6783
6783
|
}
|
|
6784
|
-
function
|
|
6784
|
+
function iu(e, t) {
|
|
6785
6785
|
return new e({
|
|
6786
6786
|
type: "string",
|
|
6787
6787
|
format: "nanoid",
|
|
@@ -6790,7 +6790,7 @@ function tu(e, t) {
|
|
|
6790
6790
|
...O(t)
|
|
6791
6791
|
});
|
|
6792
6792
|
}
|
|
6793
|
-
function
|
|
6793
|
+
function su(e, t) {
|
|
6794
6794
|
return new e({
|
|
6795
6795
|
type: "string",
|
|
6796
6796
|
format: "cuid",
|
|
@@ -6799,7 +6799,7 @@ function iu(e, t) {
|
|
|
6799
6799
|
...O(t)
|
|
6800
6800
|
});
|
|
6801
6801
|
}
|
|
6802
|
-
function
|
|
6802
|
+
function ru(e, t) {
|
|
6803
6803
|
return new e({
|
|
6804
6804
|
type: "string",
|
|
6805
6805
|
format: "cuid2",
|
|
@@ -6808,7 +6808,7 @@ function su(e, t) {
|
|
|
6808
6808
|
...O(t)
|
|
6809
6809
|
});
|
|
6810
6810
|
}
|
|
6811
|
-
function
|
|
6811
|
+
function au(e, t) {
|
|
6812
6812
|
return new e({
|
|
6813
6813
|
type: "string",
|
|
6814
6814
|
format: "ulid",
|
|
@@ -6817,7 +6817,7 @@ function ru(e, t) {
|
|
|
6817
6817
|
...O(t)
|
|
6818
6818
|
});
|
|
6819
6819
|
}
|
|
6820
|
-
function
|
|
6820
|
+
function nu(e, t) {
|
|
6821
6821
|
return new e({
|
|
6822
6822
|
type: "string",
|
|
6823
6823
|
format: "xid",
|
|
@@ -6826,7 +6826,7 @@ function au(e, t) {
|
|
|
6826
6826
|
...O(t)
|
|
6827
6827
|
});
|
|
6828
6828
|
}
|
|
6829
|
-
function
|
|
6829
|
+
function ou(e, t) {
|
|
6830
6830
|
return new e({
|
|
6831
6831
|
type: "string",
|
|
6832
6832
|
format: "ksuid",
|
|
@@ -6835,7 +6835,7 @@ function nu(e, t) {
|
|
|
6835
6835
|
...O(t)
|
|
6836
6836
|
});
|
|
6837
6837
|
}
|
|
6838
|
-
function
|
|
6838
|
+
function uu(e, t) {
|
|
6839
6839
|
return new e({
|
|
6840
6840
|
type: "string",
|
|
6841
6841
|
format: "ipv4",
|
|
@@ -6844,7 +6844,7 @@ function ou(e, t) {
|
|
|
6844
6844
|
...O(t)
|
|
6845
6845
|
});
|
|
6846
6846
|
}
|
|
6847
|
-
function
|
|
6847
|
+
function cu(e, t) {
|
|
6848
6848
|
return new e({
|
|
6849
6849
|
type: "string",
|
|
6850
6850
|
format: "ipv6",
|
|
@@ -6853,7 +6853,7 @@ function uu(e, t) {
|
|
|
6853
6853
|
...O(t)
|
|
6854
6854
|
});
|
|
6855
6855
|
}
|
|
6856
|
-
function
|
|
6856
|
+
function hu(e, t) {
|
|
6857
6857
|
return new e({
|
|
6858
6858
|
type: "string",
|
|
6859
6859
|
format: "cidrv4",
|
|
@@ -6862,7 +6862,7 @@ function cu(e, t) {
|
|
|
6862
6862
|
...O(t)
|
|
6863
6863
|
});
|
|
6864
6864
|
}
|
|
6865
|
-
function
|
|
6865
|
+
function pu(e, t) {
|
|
6866
6866
|
return new e({
|
|
6867
6867
|
type: "string",
|
|
6868
6868
|
format: "cidrv6",
|
|
@@ -6871,7 +6871,7 @@ function hu(e, t) {
|
|
|
6871
6871
|
...O(t)
|
|
6872
6872
|
});
|
|
6873
6873
|
}
|
|
6874
|
-
function
|
|
6874
|
+
function lu(e, t) {
|
|
6875
6875
|
return new e({
|
|
6876
6876
|
type: "string",
|
|
6877
6877
|
format: "base64",
|
|
@@ -6880,7 +6880,7 @@ function pu(e, t) {
|
|
|
6880
6880
|
...O(t)
|
|
6881
6881
|
});
|
|
6882
6882
|
}
|
|
6883
|
-
function
|
|
6883
|
+
function fu(e, t) {
|
|
6884
6884
|
return new e({
|
|
6885
6885
|
type: "string",
|
|
6886
6886
|
format: "base64url",
|
|
@@ -6889,7 +6889,7 @@ function lu(e, t) {
|
|
|
6889
6889
|
...O(t)
|
|
6890
6890
|
});
|
|
6891
6891
|
}
|
|
6892
|
-
function
|
|
6892
|
+
function du(e, t) {
|
|
6893
6893
|
return new e({
|
|
6894
6894
|
type: "string",
|
|
6895
6895
|
format: "e164",
|
|
@@ -6898,7 +6898,7 @@ function fu(e, t) {
|
|
|
6898
6898
|
...O(t)
|
|
6899
6899
|
});
|
|
6900
6900
|
}
|
|
6901
|
-
function
|
|
6901
|
+
function mu(e, t) {
|
|
6902
6902
|
return new e({
|
|
6903
6903
|
type: "string",
|
|
6904
6904
|
format: "jwt",
|
|
@@ -6907,7 +6907,7 @@ function du(e, t) {
|
|
|
6907
6907
|
...O(t)
|
|
6908
6908
|
});
|
|
6909
6909
|
}
|
|
6910
|
-
function
|
|
6910
|
+
function yu(e, t) {
|
|
6911
6911
|
return new e({
|
|
6912
6912
|
type: "string",
|
|
6913
6913
|
format: "datetime",
|
|
@@ -6918,7 +6918,7 @@ function mu(e, t) {
|
|
|
6918
6918
|
...O(t)
|
|
6919
6919
|
});
|
|
6920
6920
|
}
|
|
6921
|
-
function
|
|
6921
|
+
function vu(e, t) {
|
|
6922
6922
|
return new e({
|
|
6923
6923
|
type: "string",
|
|
6924
6924
|
format: "date",
|
|
@@ -6926,7 +6926,7 @@ function yu(e, t) {
|
|
|
6926
6926
|
...O(t)
|
|
6927
6927
|
});
|
|
6928
6928
|
}
|
|
6929
|
-
function
|
|
6929
|
+
function xu(e, t) {
|
|
6930
6930
|
return new e({
|
|
6931
6931
|
type: "string",
|
|
6932
6932
|
format: "time",
|
|
@@ -6935,7 +6935,7 @@ function vu(e, t) {
|
|
|
6935
6935
|
...O(t)
|
|
6936
6936
|
});
|
|
6937
6937
|
}
|
|
6938
|
-
function
|
|
6938
|
+
function gu(e, t) {
|
|
6939
6939
|
return new e({
|
|
6940
6940
|
type: "string",
|
|
6941
6941
|
format: "duration",
|
|
@@ -6943,14 +6943,14 @@ function xu(e, t) {
|
|
|
6943
6943
|
...O(t)
|
|
6944
6944
|
});
|
|
6945
6945
|
}
|
|
6946
|
-
function
|
|
6946
|
+
function bu(e, t) {
|
|
6947
6947
|
return new e({
|
|
6948
6948
|
type: "number",
|
|
6949
6949
|
checks: [],
|
|
6950
6950
|
...O(t)
|
|
6951
6951
|
});
|
|
6952
6952
|
}
|
|
6953
|
-
function
|
|
6953
|
+
function ku(e, t) {
|
|
6954
6954
|
return new e({
|
|
6955
6955
|
type: "number",
|
|
6956
6956
|
check: "number_format",
|
|
@@ -6959,25 +6959,25 @@ function bu(e, t) {
|
|
|
6959
6959
|
...O(t)
|
|
6960
6960
|
});
|
|
6961
6961
|
}
|
|
6962
|
-
function
|
|
6962
|
+
function wu(e, t) {
|
|
6963
6963
|
return new e({
|
|
6964
6964
|
type: "boolean",
|
|
6965
6965
|
...O(t)
|
|
6966
6966
|
});
|
|
6967
6967
|
}
|
|
6968
|
-
function
|
|
6968
|
+
function Tu(e) {
|
|
6969
6969
|
return new e({
|
|
6970
6970
|
type: "unknown"
|
|
6971
6971
|
});
|
|
6972
6972
|
}
|
|
6973
|
-
function
|
|
6973
|
+
function Su(e, t) {
|
|
6974
6974
|
return new e({
|
|
6975
6975
|
type: "never",
|
|
6976
6976
|
...O(t)
|
|
6977
6977
|
});
|
|
6978
6978
|
}
|
|
6979
6979
|
function as(e, t) {
|
|
6980
|
-
return new
|
|
6980
|
+
return new dr({
|
|
6981
6981
|
check: "less_than",
|
|
6982
6982
|
...O(t),
|
|
6983
6983
|
value: e,
|
|
@@ -6985,7 +6985,7 @@ function as(e, t) {
|
|
|
6985
6985
|
});
|
|
6986
6986
|
}
|
|
6987
6987
|
function ai(e, t) {
|
|
6988
|
-
return new
|
|
6988
|
+
return new dr({
|
|
6989
6989
|
check: "less_than",
|
|
6990
6990
|
...O(t),
|
|
6991
6991
|
value: e,
|
|
@@ -6993,7 +6993,7 @@ function ai(e, t) {
|
|
|
6993
6993
|
});
|
|
6994
6994
|
}
|
|
6995
6995
|
function ns(e, t) {
|
|
6996
|
-
return new
|
|
6996
|
+
return new mr({
|
|
6997
6997
|
check: "greater_than",
|
|
6998
6998
|
...O(t),
|
|
6999
6999
|
value: e,
|
|
@@ -7001,7 +7001,7 @@ function ns(e, t) {
|
|
|
7001
7001
|
});
|
|
7002
7002
|
}
|
|
7003
7003
|
function ni(e, t) {
|
|
7004
|
-
return new
|
|
7004
|
+
return new mr({
|
|
7005
7005
|
check: "greater_than",
|
|
7006
7006
|
...O(t),
|
|
7007
7007
|
value: e,
|
|
@@ -7009,73 +7009,73 @@ function ni(e, t) {
|
|
|
7009
7009
|
});
|
|
7010
7010
|
}
|
|
7011
7011
|
function os(e, t) {
|
|
7012
|
-
return new
|
|
7012
|
+
return new Vn({
|
|
7013
7013
|
check: "multiple_of",
|
|
7014
7014
|
...O(t),
|
|
7015
7015
|
value: e
|
|
7016
7016
|
});
|
|
7017
7017
|
}
|
|
7018
|
-
function
|
|
7019
|
-
return new
|
|
7018
|
+
function br(e, t) {
|
|
7019
|
+
return new Fn({
|
|
7020
7020
|
check: "max_length",
|
|
7021
7021
|
...O(t),
|
|
7022
7022
|
maximum: e
|
|
7023
7023
|
});
|
|
7024
7024
|
}
|
|
7025
7025
|
function $t(e, t) {
|
|
7026
|
-
return new
|
|
7026
|
+
return new Bn({
|
|
7027
7027
|
check: "min_length",
|
|
7028
7028
|
...O(t),
|
|
7029
7029
|
minimum: e
|
|
7030
7030
|
});
|
|
7031
7031
|
}
|
|
7032
|
-
function
|
|
7033
|
-
return new
|
|
7032
|
+
function kr(e, t) {
|
|
7033
|
+
return new $n({
|
|
7034
7034
|
check: "length_equals",
|
|
7035
7035
|
...O(t),
|
|
7036
7036
|
length: e
|
|
7037
7037
|
});
|
|
7038
7038
|
}
|
|
7039
|
-
function
|
|
7040
|
-
return new
|
|
7039
|
+
function _u(e, t) {
|
|
7040
|
+
return new Un({
|
|
7041
7041
|
check: "string_format",
|
|
7042
7042
|
format: "regex",
|
|
7043
7043
|
...O(t),
|
|
7044
7044
|
pattern: e
|
|
7045
7045
|
});
|
|
7046
7046
|
}
|
|
7047
|
-
function
|
|
7048
|
-
return new
|
|
7047
|
+
function Pu(e) {
|
|
7048
|
+
return new Zn({
|
|
7049
7049
|
check: "string_format",
|
|
7050
7050
|
format: "lowercase",
|
|
7051
7051
|
...O(e)
|
|
7052
7052
|
});
|
|
7053
7053
|
}
|
|
7054
|
-
function
|
|
7055
|
-
return new
|
|
7054
|
+
function Au(e) {
|
|
7055
|
+
return new qn({
|
|
7056
7056
|
check: "string_format",
|
|
7057
7057
|
format: "uppercase",
|
|
7058
7058
|
...O(e)
|
|
7059
7059
|
});
|
|
7060
7060
|
}
|
|
7061
|
-
function
|
|
7062
|
-
return new
|
|
7061
|
+
function Cu(e, t) {
|
|
7062
|
+
return new Hn({
|
|
7063
7063
|
check: "string_format",
|
|
7064
7064
|
format: "includes",
|
|
7065
7065
|
...O(t),
|
|
7066
7066
|
includes: e
|
|
7067
7067
|
});
|
|
7068
7068
|
}
|
|
7069
|
-
function
|
|
7070
|
-
return new
|
|
7069
|
+
function Eu(e, t) {
|
|
7070
|
+
return new Wn({
|
|
7071
7071
|
check: "string_format",
|
|
7072
7072
|
format: "starts_with",
|
|
7073
7073
|
...O(t),
|
|
7074
7074
|
prefix: e
|
|
7075
7075
|
});
|
|
7076
7076
|
}
|
|
7077
|
-
function
|
|
7078
|
-
return new
|
|
7077
|
+
function Iu(e, t) {
|
|
7078
|
+
return new Kn({
|
|
7079
7079
|
check: "string_format",
|
|
7080
7080
|
format: "ends_with",
|
|
7081
7081
|
...O(t),
|
|
@@ -7083,24 +7083,24 @@ function Eu(e, t) {
|
|
|
7083
7083
|
});
|
|
7084
7084
|
}
|
|
7085
7085
|
function _t(e) {
|
|
7086
|
-
return new
|
|
7086
|
+
return new Gn({
|
|
7087
7087
|
check: "overwrite",
|
|
7088
7088
|
tx: e
|
|
7089
7089
|
});
|
|
7090
7090
|
}
|
|
7091
|
-
function
|
|
7091
|
+
function Nu(e) {
|
|
7092
7092
|
return _t((t) => t.normalize(e));
|
|
7093
7093
|
}
|
|
7094
|
-
function
|
|
7094
|
+
function Lu() {
|
|
7095
7095
|
return _t((e) => e.trim());
|
|
7096
7096
|
}
|
|
7097
|
-
function
|
|
7097
|
+
function Ou() {
|
|
7098
7098
|
return _t((e) => e.toLowerCase());
|
|
7099
7099
|
}
|
|
7100
|
-
function
|
|
7100
|
+
function Mu() {
|
|
7101
7101
|
return _t((e) => e.toUpperCase());
|
|
7102
7102
|
}
|
|
7103
|
-
function
|
|
7103
|
+
function Ru(e, t, i) {
|
|
7104
7104
|
return new e({
|
|
7105
7105
|
type: "array",
|
|
7106
7106
|
element: t,
|
|
@@ -7110,7 +7110,7 @@ function Mu(e, t, i) {
|
|
|
7110
7110
|
...O(i)
|
|
7111
7111
|
});
|
|
7112
7112
|
}
|
|
7113
|
-
function
|
|
7113
|
+
function Du(e, t, i) {
|
|
7114
7114
|
return new e({
|
|
7115
7115
|
type: "custom",
|
|
7116
7116
|
check: "custom",
|
|
@@ -7118,8 +7118,8 @@ function Ru(e, t, i) {
|
|
|
7118
7118
|
...O(i)
|
|
7119
7119
|
});
|
|
7120
7120
|
}
|
|
7121
|
-
function
|
|
7122
|
-
const t =
|
|
7121
|
+
function zu(e) {
|
|
7122
|
+
const t = Vu((i) => (i.addIssue = (s) => {
|
|
7123
7123
|
if (typeof s == "string")
|
|
7124
7124
|
i.issues.push(bt(s, i.value, t._zod.def));
|
|
7125
7125
|
else {
|
|
@@ -7129,45 +7129,45 @@ function Du(e) {
|
|
|
7129
7129
|
}, e(i.value, i)));
|
|
7130
7130
|
return t;
|
|
7131
7131
|
}
|
|
7132
|
-
function
|
|
7133
|
-
const i = new
|
|
7132
|
+
function Vu(e, t) {
|
|
7133
|
+
const i = new le({
|
|
7134
7134
|
check: "custom",
|
|
7135
7135
|
...O(t)
|
|
7136
7136
|
});
|
|
7137
7137
|
return i._zod.check = e, i;
|
|
7138
7138
|
}
|
|
7139
|
-
const
|
|
7140
|
-
uo.init(e, t), Q.init(e, t);
|
|
7141
|
-
});
|
|
7142
|
-
function ju(e) {
|
|
7143
|
-
return mu(Vu, e);
|
|
7144
|
-
}
|
|
7145
|
-
const Fu = /* @__PURE__ */ w("ZodISODate", (e, t) => {
|
|
7139
|
+
const ju = /* @__PURE__ */ w("ZodISODateTime", (e, t) => {
|
|
7146
7140
|
co.init(e, t), Q.init(e, t);
|
|
7147
7141
|
});
|
|
7148
|
-
function
|
|
7149
|
-
return yu(
|
|
7142
|
+
function Fu(e) {
|
|
7143
|
+
return yu(ju, e);
|
|
7150
7144
|
}
|
|
7151
|
-
const
|
|
7145
|
+
const Bu = /* @__PURE__ */ w("ZodISODate", (e, t) => {
|
|
7152
7146
|
ho.init(e, t), Q.init(e, t);
|
|
7153
7147
|
});
|
|
7154
|
-
function
|
|
7155
|
-
return vu(
|
|
7148
|
+
function $u(e) {
|
|
7149
|
+
return vu(Bu, e);
|
|
7156
7150
|
}
|
|
7157
|
-
const
|
|
7151
|
+
const Uu = /* @__PURE__ */ w("ZodISOTime", (e, t) => {
|
|
7158
7152
|
po.init(e, t), Q.init(e, t);
|
|
7159
7153
|
});
|
|
7160
|
-
function
|
|
7161
|
-
return xu(
|
|
7154
|
+
function Zu(e) {
|
|
7155
|
+
return xu(Uu, e);
|
|
7162
7156
|
}
|
|
7163
|
-
const
|
|
7164
|
-
|
|
7157
|
+
const qu = /* @__PURE__ */ w("ZodISODuration", (e, t) => {
|
|
7158
|
+
lo.init(e, t), Q.init(e, t);
|
|
7159
|
+
});
|
|
7160
|
+
function Hu(e) {
|
|
7161
|
+
return gu(qu, e);
|
|
7162
|
+
}
|
|
7163
|
+
const Wu = (e, t) => {
|
|
7164
|
+
ur.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
7165
7165
|
format: {
|
|
7166
|
-
value: (i) =>
|
|
7166
|
+
value: (i) => Ya(e, i)
|
|
7167
7167
|
// enumerable: false,
|
|
7168
7168
|
},
|
|
7169
7169
|
flatten: {
|
|
7170
|
-
value: (i) =>
|
|
7170
|
+
value: (i) => Qa(e, i)
|
|
7171
7171
|
// enumerable: false,
|
|
7172
7172
|
},
|
|
7173
7173
|
addIssue: {
|
|
@@ -7189,14 +7189,14 @@ const Hu = (e, t) => {
|
|
|
7189
7189
|
// enumerable: false,
|
|
7190
7190
|
}
|
|
7191
7191
|
});
|
|
7192
|
-
}, _e = w("ZodError",
|
|
7192
|
+
}, _e = w("ZodError", Wu, {
|
|
7193
7193
|
Parent: Error
|
|
7194
|
-
}),
|
|
7194
|
+
}), Ku = /* @__PURE__ */ Ai(_e), Gu = /* @__PURE__ */ Ci(_e), Ju = /* @__PURE__ */ Kt(_e), Xu = /* @__PURE__ */ Gt(_e), Qu = /* @__PURE__ */ sn(_e), Yu = /* @__PURE__ */ rn(_e), ec = /* @__PURE__ */ an(_e), tc = /* @__PURE__ */ nn(_e), ic = /* @__PURE__ */ on(_e), sc = /* @__PURE__ */ un(_e), rc = /* @__PURE__ */ cn(_e), ac = /* @__PURE__ */ hn(_e), Y = /* @__PURE__ */ w("ZodType", (e, t) => (X.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...i) => e.clone(Ye(t, {
|
|
7195
7195
|
checks: [
|
|
7196
7196
|
...t.checks ?? [],
|
|
7197
7197
|
...i.map((s) => typeof s == "function" ? { _zod: { check: s, def: { check: "custom" }, onattach: [] } } : s)
|
|
7198
7198
|
]
|
|
7199
|
-
})), e.clone = (i, s) => Ke(e, i, s), e.brand = () => e, e.register = (i, s) => (i.add(e, s), e), e.parse = (i, s) =>
|
|
7199
|
+
})), e.clone = (i, s) => Ke(e, i, s), e.brand = () => e, e.register = (i, s) => (i.add(e, s), e), e.parse = (i, s) => Ku(e, i, s, { callee: e.parse }), e.safeParse = (i, s) => Ju(e, i, s), e.parseAsync = async (i, s) => Gu(e, i, s, { callee: e.parseAsync }), e.safeParseAsync = async (i, s) => Xu(e, i, s), e.spa = e.safeParseAsync, e.encode = (i, s) => Qu(e, i, s), e.decode = (i, s) => Yu(e, i, s), e.encodeAsync = async (i, s) => ec(e, i, s), e.decodeAsync = async (i, s) => tc(e, i, s), e.safeEncode = (i, s) => ic(e, i, s), e.safeDecode = (i, s) => sc(e, i, s), e.safeEncodeAsync = async (i, s) => rc(e, i, s), e.safeDecodeAsync = async (i, s) => ac(e, i, s), e.refine = (i, s) => e.check(Qc(i, s)), e.superRefine = (i) => e.check(Yc(i)), e.overwrite = (i) => e.check(_t(i)), e.optional = () => ps(e), e.nullable = () => ls(e), e.nullish = () => ps(ls(e)), e.nonoptional = (i) => qc(e, i), e.array = () => He(e), e.or = (i) => ie([e, i]), e.and = (i) => Mc(e, i), e.transform = (i) => fs(e, jc(i)), e.default = (i) => $c(e, i), e.prefault = (i) => Zc(e, i), e.catch = (i) => Wc(e, i), e.pipe = (i) => fs(e, i), e.readonly = () => Jc(e), e.describe = (i) => {
|
|
7200
7200
|
const s = e.clone();
|
|
7201
7201
|
return Lt.add(s, { description: i }), s;
|
|
7202
7202
|
}, Object.defineProperty(e, "description", {
|
|
@@ -7209,96 +7209,96 @@ const Hu = (e, t) => {
|
|
|
7209
7209
|
return Lt.get(e);
|
|
7210
7210
|
const s = e.clone();
|
|
7211
7211
|
return Lt.add(s, i[0]), s;
|
|
7212
|
-
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)),
|
|
7212
|
+
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), wr = /* @__PURE__ */ w("_ZodString", (e, t) => {
|
|
7213
7213
|
Ei.init(e, t), Y.init(e, t);
|
|
7214
7214
|
const i = e._zod.bag;
|
|
7215
|
-
e.format = i.format ?? null, e.minLength = i.minimum ?? null, e.maxLength = i.maximum ?? null, e.regex = (...s) => e.check(
|
|
7216
|
-
}),
|
|
7217
|
-
Ei.init(e, t),
|
|
7215
|
+
e.format = i.format ?? null, e.minLength = i.minimum ?? null, e.maxLength = i.maximum ?? null, e.regex = (...s) => e.check(_u(...s)), e.includes = (...s) => e.check(Cu(...s)), e.startsWith = (...s) => e.check(Eu(...s)), e.endsWith = (...s) => e.check(Iu(...s)), e.min = (...s) => e.check($t(...s)), e.max = (...s) => e.check(br(...s)), e.length = (...s) => e.check(kr(...s)), e.nonempty = (...s) => e.check($t(1, ...s)), e.lowercase = (s) => e.check(Pu(s)), e.uppercase = (s) => e.check(Au(s)), e.trim = () => e.check(Lu()), e.normalize = (...s) => e.check(Nu(...s)), e.toLowerCase = () => e.check(Ou()), e.toUpperCase = () => e.check(Mu());
|
|
7216
|
+
}), nc = /* @__PURE__ */ w("ZodString", (e, t) => {
|
|
7217
|
+
Ei.init(e, t), wr.init(e, t), e.email = (i) => e.check(Go(oc, i)), e.url = (i) => e.check(eu(uc, i)), e.jwt = (i) => e.check(mu(Tc, i)), e.emoji = (i) => e.check(tu(cc, i)), e.guid = (i) => e.check(rs(us, i)), e.uuid = (i) => e.check(Jo(Ot, i)), e.uuidv4 = (i) => e.check(Xo(Ot, i)), e.uuidv6 = (i) => e.check(Qo(Ot, i)), e.uuidv7 = (i) => e.check(Yo(Ot, i)), e.nanoid = (i) => e.check(iu(hc, i)), e.guid = (i) => e.check(rs(us, i)), e.cuid = (i) => e.check(su(pc, i)), e.cuid2 = (i) => e.check(ru(lc, i)), e.ulid = (i) => e.check(au(fc, i)), e.base64 = (i) => e.check(lu(bc, i)), e.base64url = (i) => e.check(fu(kc, i)), e.xid = (i) => e.check(nu(dc, i)), e.ksuid = (i) => e.check(ou(mc, i)), e.ipv4 = (i) => e.check(uu(yc, i)), e.ipv6 = (i) => e.check(cu(vc, i)), e.cidrv4 = (i) => e.check(hu(xc, i)), e.cidrv6 = (i) => e.check(pu(gc, i)), e.e164 = (i) => e.check(du(wc, i)), e.datetime = (i) => e.check(Fu(i)), e.date = (i) => e.check($u(i)), e.time = (i) => e.check(Zu(i)), e.duration = (i) => e.check(Hu(i));
|
|
7218
7218
|
});
|
|
7219
7219
|
function L(e) {
|
|
7220
|
-
return
|
|
7220
|
+
return Ko(nc, e);
|
|
7221
7221
|
}
|
|
7222
7222
|
const Q = /* @__PURE__ */ w("ZodStringFormat", (e, t) => {
|
|
7223
|
-
H.init(e, t),
|
|
7224
|
-
}),
|
|
7225
|
-
|
|
7223
|
+
H.init(e, t), wr.init(e, t);
|
|
7224
|
+
}), oc = /* @__PURE__ */ w("ZodEmail", (e, t) => {
|
|
7225
|
+
eo.init(e, t), Q.init(e, t);
|
|
7226
7226
|
}), us = /* @__PURE__ */ w("ZodGUID", (e, t) => {
|
|
7227
|
-
Xn.init(e, t), Q.init(e, t);
|
|
7228
|
-
}), Ot = /* @__PURE__ */ w("ZodUUID", (e, t) => {
|
|
7229
7227
|
Qn.init(e, t), Q.init(e, t);
|
|
7230
|
-
}),
|
|
7231
|
-
|
|
7232
|
-
}), uc = /* @__PURE__ */ w("
|
|
7228
|
+
}), Ot = /* @__PURE__ */ w("ZodUUID", (e, t) => {
|
|
7229
|
+
Yn.init(e, t), Q.init(e, t);
|
|
7230
|
+
}), uc = /* @__PURE__ */ w("ZodURL", (e, t) => {
|
|
7233
7231
|
to.init(e, t), Q.init(e, t);
|
|
7234
|
-
}), cc = /* @__PURE__ */ w("
|
|
7232
|
+
}), cc = /* @__PURE__ */ w("ZodEmoji", (e, t) => {
|
|
7235
7233
|
io.init(e, t), Q.init(e, t);
|
|
7236
|
-
}), hc = /* @__PURE__ */ w("
|
|
7234
|
+
}), hc = /* @__PURE__ */ w("ZodNanoID", (e, t) => {
|
|
7237
7235
|
so.init(e, t), Q.init(e, t);
|
|
7238
|
-
}), pc = /* @__PURE__ */ w("
|
|
7236
|
+
}), pc = /* @__PURE__ */ w("ZodCUID", (e, t) => {
|
|
7239
7237
|
ro.init(e, t), Q.init(e, t);
|
|
7240
|
-
}), lc = /* @__PURE__ */ w("
|
|
7238
|
+
}), lc = /* @__PURE__ */ w("ZodCUID2", (e, t) => {
|
|
7241
7239
|
ao.init(e, t), Q.init(e, t);
|
|
7242
|
-
}), fc = /* @__PURE__ */ w("
|
|
7240
|
+
}), fc = /* @__PURE__ */ w("ZodULID", (e, t) => {
|
|
7243
7241
|
no.init(e, t), Q.init(e, t);
|
|
7244
|
-
}), dc = /* @__PURE__ */ w("
|
|
7242
|
+
}), dc = /* @__PURE__ */ w("ZodXID", (e, t) => {
|
|
7245
7243
|
oo.init(e, t), Q.init(e, t);
|
|
7246
|
-
}), mc = /* @__PURE__ */ w("
|
|
7247
|
-
|
|
7248
|
-
}), yc = /* @__PURE__ */ w("
|
|
7244
|
+
}), mc = /* @__PURE__ */ w("ZodKSUID", (e, t) => {
|
|
7245
|
+
uo.init(e, t), Q.init(e, t);
|
|
7246
|
+
}), yc = /* @__PURE__ */ w("ZodIPv4", (e, t) => {
|
|
7249
7247
|
fo.init(e, t), Q.init(e, t);
|
|
7250
|
-
}), vc = /* @__PURE__ */ w("
|
|
7248
|
+
}), vc = /* @__PURE__ */ w("ZodIPv6", (e, t) => {
|
|
7251
7249
|
mo.init(e, t), Q.init(e, t);
|
|
7252
|
-
}), xc = /* @__PURE__ */ w("
|
|
7250
|
+
}), xc = /* @__PURE__ */ w("ZodCIDRv4", (e, t) => {
|
|
7253
7251
|
yo.init(e, t), Q.init(e, t);
|
|
7254
|
-
}), gc = /* @__PURE__ */ w("
|
|
7252
|
+
}), gc = /* @__PURE__ */ w("ZodCIDRv6", (e, t) => {
|
|
7255
7253
|
vo.init(e, t), Q.init(e, t);
|
|
7256
|
-
}), bc = /* @__PURE__ */ w("
|
|
7257
|
-
|
|
7258
|
-
}), kc = /* @__PURE__ */ w("
|
|
7254
|
+
}), bc = /* @__PURE__ */ w("ZodBase64", (e, t) => {
|
|
7255
|
+
xo.init(e, t), Q.init(e, t);
|
|
7256
|
+
}), kc = /* @__PURE__ */ w("ZodBase64URL", (e, t) => {
|
|
7259
7257
|
bo.init(e, t), Q.init(e, t);
|
|
7260
|
-
}), wc = /* @__PURE__ */ w("
|
|
7261
|
-
|
|
7262
|
-
}),
|
|
7263
|
-
|
|
7258
|
+
}), wc = /* @__PURE__ */ w("ZodE164", (e, t) => {
|
|
7259
|
+
ko.init(e, t), Q.init(e, t);
|
|
7260
|
+
}), Tc = /* @__PURE__ */ w("ZodJWT", (e, t) => {
|
|
7261
|
+
To.init(e, t), Q.init(e, t);
|
|
7262
|
+
}), Tr = /* @__PURE__ */ w("ZodNumber", (e, t) => {
|
|
7263
|
+
vr.init(e, t), Y.init(e, t), e.gt = (s, a) => e.check(ns(s, a)), e.gte = (s, a) => e.check(ni(s, a)), e.min = (s, a) => e.check(ni(s, a)), e.lt = (s, a) => e.check(as(s, a)), e.lte = (s, a) => e.check(ai(s, a)), e.max = (s, a) => e.check(ai(s, a)), e.int = (s) => e.check(cs(s)), e.safe = (s) => e.check(cs(s)), e.positive = (s) => e.check(ns(0, s)), e.nonnegative = (s) => e.check(ni(0, s)), e.negative = (s) => e.check(as(0, s)), e.nonpositive = (s) => e.check(ai(0, s)), e.multipleOf = (s, a) => e.check(os(s, a)), e.step = (s, a) => e.check(os(s, a)), e.finite = () => e;
|
|
7264
7264
|
const i = e._zod.bag;
|
|
7265
7265
|
e.minValue = Math.max(i.minimum ?? Number.NEGATIVE_INFINITY, i.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(i.maximum ?? Number.POSITIVE_INFINITY, i.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (i.format ?? "").includes("int") || Number.isSafeInteger(i.multipleOf ?? 0.5), e.isFinite = !0, e.format = i.format ?? null;
|
|
7266
7266
|
});
|
|
7267
7267
|
function Ve(e) {
|
|
7268
|
-
return
|
|
7268
|
+
return bu(Tr, e);
|
|
7269
7269
|
}
|
|
7270
|
-
const
|
|
7271
|
-
|
|
7270
|
+
const Sc = /* @__PURE__ */ w("ZodNumberFormat", (e, t) => {
|
|
7271
|
+
So.init(e, t), Tr.init(e, t);
|
|
7272
7272
|
});
|
|
7273
7273
|
function cs(e) {
|
|
7274
|
-
return bu(Tc, e);
|
|
7275
|
-
}
|
|
7276
|
-
const Sc = /* @__PURE__ */ w("ZodBoolean", (e, t) => {
|
|
7277
|
-
So.init(e, t), Y.init(e, t);
|
|
7278
|
-
});
|
|
7279
|
-
function _c(e) {
|
|
7280
7274
|
return ku(Sc, e);
|
|
7281
7275
|
}
|
|
7282
|
-
const
|
|
7276
|
+
const _c = /* @__PURE__ */ w("ZodBoolean", (e, t) => {
|
|
7283
7277
|
_o.init(e, t), Y.init(e, t);
|
|
7284
7278
|
});
|
|
7285
|
-
function
|
|
7286
|
-
return wu(
|
|
7279
|
+
function Pc(e) {
|
|
7280
|
+
return wu(_c, e);
|
|
7287
7281
|
}
|
|
7288
|
-
const Ac = /* @__PURE__ */ w("
|
|
7282
|
+
const Ac = /* @__PURE__ */ w("ZodUnknown", (e, t) => {
|
|
7289
7283
|
Po.init(e, t), Y.init(e, t);
|
|
7290
7284
|
});
|
|
7291
|
-
function
|
|
7292
|
-
return Tu(Ac
|
|
7285
|
+
function hs() {
|
|
7286
|
+
return Tu(Ac);
|
|
7287
|
+
}
|
|
7288
|
+
const Cc = /* @__PURE__ */ w("ZodNever", (e, t) => {
|
|
7289
|
+
Ao.init(e, t), Y.init(e, t);
|
|
7290
|
+
});
|
|
7291
|
+
function Ec(e) {
|
|
7292
|
+
return Su(Cc, e);
|
|
7293
7293
|
}
|
|
7294
|
-
const
|
|
7295
|
-
|
|
7294
|
+
const Ic = /* @__PURE__ */ w("ZodArray", (e, t) => {
|
|
7295
|
+
Co.init(e, t), Y.init(e, t), e.element = t.element, e.min = (i, s) => e.check($t(i, s)), e.nonempty = (i) => e.check($t(1, i)), e.max = (i, s) => e.check(br(i, s)), e.length = (i, s) => e.check(kr(i, s)), e.unwrap = () => e.element;
|
|
7296
7296
|
});
|
|
7297
7297
|
function He(e, t) {
|
|
7298
|
-
return
|
|
7298
|
+
return Ru(Ic, e, t);
|
|
7299
7299
|
}
|
|
7300
|
-
const
|
|
7301
|
-
|
|
7300
|
+
const Nc = /* @__PURE__ */ w("ZodObject", (e, t) => {
|
|
7301
|
+
Io.init(e, t), Y.init(e, t), $(e, "shape", () => t.shape), e.keyof = () => Dc(Object.keys(e._zod.def.shape)), e.catchall = (i) => e.clone({ ...e._zod.def, catchall: i }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: hs() }), e.loose = () => e.clone({ ...e._zod.def, catchall: hs() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Ec() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (i) => Wa(e, i), e.safeExtend = (i) => Ka(e, i), e.merge = (i) => Ga(e, i), e.pick = (i) => qa(e, i), e.omit = (i) => Ha(e, i), e.partial = (...i) => Ja(Sr, e, i[0]), e.required = (...i) => Xa(_r, e, i[0]);
|
|
7302
7302
|
});
|
|
7303
7303
|
function Oe(e, t) {
|
|
7304
7304
|
const i = {
|
|
@@ -7306,33 +7306,33 @@ function Oe(e, t) {
|
|
|
7306
7306
|
shape: e ?? {},
|
|
7307
7307
|
...O(t)
|
|
7308
7308
|
};
|
|
7309
|
-
return new
|
|
7309
|
+
return new Nc(i);
|
|
7310
7310
|
}
|
|
7311
|
-
const
|
|
7312
|
-
|
|
7311
|
+
const Lc = /* @__PURE__ */ w("ZodUnion", (e, t) => {
|
|
7312
|
+
No.init(e, t), Y.init(e, t), e.options = t.options;
|
|
7313
7313
|
});
|
|
7314
7314
|
function ie(e, t) {
|
|
7315
|
-
return new
|
|
7315
|
+
return new Lc({
|
|
7316
7316
|
type: "union",
|
|
7317
7317
|
options: e,
|
|
7318
7318
|
...O(t)
|
|
7319
7319
|
});
|
|
7320
7320
|
}
|
|
7321
|
-
const
|
|
7322
|
-
|
|
7321
|
+
const Oc = /* @__PURE__ */ w("ZodIntersection", (e, t) => {
|
|
7322
|
+
Lo.init(e, t), Y.init(e, t);
|
|
7323
7323
|
});
|
|
7324
|
-
function
|
|
7325
|
-
return new
|
|
7324
|
+
function Mc(e, t) {
|
|
7325
|
+
return new Oc({
|
|
7326
7326
|
type: "intersection",
|
|
7327
7327
|
left: e,
|
|
7328
7328
|
right: t
|
|
7329
7329
|
});
|
|
7330
7330
|
}
|
|
7331
|
-
const
|
|
7332
|
-
|
|
7331
|
+
const Rc = /* @__PURE__ */ w("ZodRecord", (e, t) => {
|
|
7332
|
+
Oo.init(e, t), Y.init(e, t), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
7333
7333
|
});
|
|
7334
|
-
function
|
|
7335
|
-
return new
|
|
7334
|
+
function ve(e, t, i) {
|
|
7335
|
+
return new Rc({
|
|
7336
7336
|
type: "record",
|
|
7337
7337
|
keyType: e,
|
|
7338
7338
|
valueType: t,
|
|
@@ -7340,7 +7340,7 @@ function xe(e, t, i) {
|
|
|
7340
7340
|
});
|
|
7341
7341
|
}
|
|
7342
7342
|
const di = /* @__PURE__ */ w("ZodEnum", (e, t) => {
|
|
7343
|
-
|
|
7343
|
+
Mo.init(e, t), Y.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
7344
7344
|
const i = new Set(Object.keys(t.entries));
|
|
7345
7345
|
e.extract = (s, a) => {
|
|
7346
7346
|
const o = {};
|
|
@@ -7370,7 +7370,7 @@ const di = /* @__PURE__ */ w("ZodEnum", (e, t) => {
|
|
|
7370
7370
|
});
|
|
7371
7371
|
};
|
|
7372
7372
|
});
|
|
7373
|
-
function
|
|
7373
|
+
function Dc(e, t) {
|
|
7374
7374
|
const i = Array.isArray(e) ? Object.fromEntries(e.map((s) => [s, s])) : e;
|
|
7375
7375
|
return new di({
|
|
7376
7376
|
type: "enum",
|
|
@@ -7378,8 +7378,8 @@ function Rc(e, t) {
|
|
|
7378
7378
|
...O(t)
|
|
7379
7379
|
});
|
|
7380
7380
|
}
|
|
7381
|
-
const
|
|
7382
|
-
|
|
7381
|
+
const zc = /* @__PURE__ */ w("ZodLiteral", (e, t) => {
|
|
7382
|
+
Ro.init(e, t), Y.init(e, t), e.values = new Set(t.values), Object.defineProperty(e, "value", {
|
|
7383
7383
|
get() {
|
|
7384
7384
|
if (t.values.length > 1)
|
|
7385
7385
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -7388,16 +7388,16 @@ const Dc = /* @__PURE__ */ w("ZodLiteral", (e, t) => {
|
|
|
7388
7388
|
});
|
|
7389
7389
|
});
|
|
7390
7390
|
function g(e, t) {
|
|
7391
|
-
return new
|
|
7391
|
+
return new zc({
|
|
7392
7392
|
type: "literal",
|
|
7393
7393
|
values: Array.isArray(e) ? e : [e],
|
|
7394
7394
|
...O(t)
|
|
7395
7395
|
});
|
|
7396
7396
|
}
|
|
7397
|
-
const
|
|
7398
|
-
|
|
7397
|
+
const Vc = /* @__PURE__ */ w("ZodTransform", (e, t) => {
|
|
7398
|
+
Do.init(e, t), Y.init(e, t), e._zod.parse = (i, s) => {
|
|
7399
7399
|
if (s.direction === "backward")
|
|
7400
|
-
throw new
|
|
7400
|
+
throw new sr(e.constructor.name);
|
|
7401
7401
|
i.addIssue = (o) => {
|
|
7402
7402
|
if (typeof o == "string")
|
|
7403
7403
|
i.issues.push(bt(o, i.value, t));
|
|
@@ -7410,104 +7410,104 @@ const zc = /* @__PURE__ */ w("ZodTransform", (e, t) => {
|
|
|
7410
7410
|
return a instanceof Promise ? a.then((o) => (i.value = o, i)) : (i.value = a, i);
|
|
7411
7411
|
};
|
|
7412
7412
|
});
|
|
7413
|
-
function
|
|
7414
|
-
return new
|
|
7413
|
+
function jc(e) {
|
|
7414
|
+
return new Vc({
|
|
7415
7415
|
type: "transform",
|
|
7416
7416
|
transform: e
|
|
7417
7417
|
});
|
|
7418
7418
|
}
|
|
7419
|
-
const
|
|
7420
|
-
|
|
7419
|
+
const Sr = /* @__PURE__ */ w("ZodOptional", (e, t) => {
|
|
7420
|
+
zo.init(e, t), Y.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
7421
7421
|
});
|
|
7422
7422
|
function ps(e) {
|
|
7423
|
-
return new
|
|
7423
|
+
return new Sr({
|
|
7424
7424
|
type: "optional",
|
|
7425
7425
|
innerType: e
|
|
7426
7426
|
});
|
|
7427
7427
|
}
|
|
7428
|
-
const
|
|
7429
|
-
|
|
7428
|
+
const Fc = /* @__PURE__ */ w("ZodNullable", (e, t) => {
|
|
7429
|
+
Vo.init(e, t), Y.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
7430
7430
|
});
|
|
7431
7431
|
function ls(e) {
|
|
7432
|
-
return new
|
|
7432
|
+
return new Fc({
|
|
7433
7433
|
type: "nullable",
|
|
7434
7434
|
innerType: e
|
|
7435
7435
|
});
|
|
7436
7436
|
}
|
|
7437
|
-
const
|
|
7438
|
-
|
|
7437
|
+
const Bc = /* @__PURE__ */ w("ZodDefault", (e, t) => {
|
|
7438
|
+
jo.init(e, t), Y.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
7439
7439
|
});
|
|
7440
|
-
function
|
|
7441
|
-
return new
|
|
7440
|
+
function $c(e, t) {
|
|
7441
|
+
return new Bc({
|
|
7442
7442
|
type: "default",
|
|
7443
7443
|
innerType: e,
|
|
7444
7444
|
get defaultValue() {
|
|
7445
|
-
return typeof t == "function" ? t() :
|
|
7445
|
+
return typeof t == "function" ? t() : nr(t);
|
|
7446
7446
|
}
|
|
7447
7447
|
});
|
|
7448
7448
|
}
|
|
7449
|
-
const
|
|
7450
|
-
|
|
7449
|
+
const Uc = /* @__PURE__ */ w("ZodPrefault", (e, t) => {
|
|
7450
|
+
Fo.init(e, t), Y.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
7451
7451
|
});
|
|
7452
|
-
function
|
|
7453
|
-
return new
|
|
7452
|
+
function Zc(e, t) {
|
|
7453
|
+
return new Uc({
|
|
7454
7454
|
type: "prefault",
|
|
7455
7455
|
innerType: e,
|
|
7456
7456
|
get defaultValue() {
|
|
7457
|
-
return typeof t == "function" ? t() :
|
|
7457
|
+
return typeof t == "function" ? t() : nr(t);
|
|
7458
7458
|
}
|
|
7459
7459
|
});
|
|
7460
7460
|
}
|
|
7461
|
-
const
|
|
7462
|
-
|
|
7461
|
+
const _r = /* @__PURE__ */ w("ZodNonOptional", (e, t) => {
|
|
7462
|
+
Bo.init(e, t), Y.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
7463
7463
|
});
|
|
7464
|
-
function
|
|
7465
|
-
return new
|
|
7464
|
+
function qc(e, t) {
|
|
7465
|
+
return new _r({
|
|
7466
7466
|
type: "nonoptional",
|
|
7467
7467
|
innerType: e,
|
|
7468
7468
|
...O(t)
|
|
7469
7469
|
});
|
|
7470
7470
|
}
|
|
7471
|
-
const
|
|
7472
|
-
|
|
7471
|
+
const Hc = /* @__PURE__ */ w("ZodCatch", (e, t) => {
|
|
7472
|
+
$o.init(e, t), Y.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
7473
7473
|
});
|
|
7474
|
-
function
|
|
7475
|
-
return new
|
|
7474
|
+
function Wc(e, t) {
|
|
7475
|
+
return new Hc({
|
|
7476
7476
|
type: "catch",
|
|
7477
7477
|
innerType: e,
|
|
7478
7478
|
catchValue: typeof t == "function" ? t : () => t
|
|
7479
7479
|
});
|
|
7480
7480
|
}
|
|
7481
|
-
const
|
|
7482
|
-
|
|
7481
|
+
const Kc = /* @__PURE__ */ w("ZodPipe", (e, t) => {
|
|
7482
|
+
Uo.init(e, t), Y.init(e, t), e.in = t.in, e.out = t.out;
|
|
7483
7483
|
});
|
|
7484
7484
|
function fs(e, t) {
|
|
7485
|
-
return new
|
|
7485
|
+
return new Kc({
|
|
7486
7486
|
type: "pipe",
|
|
7487
7487
|
in: e,
|
|
7488
7488
|
out: t
|
|
7489
7489
|
// ...util.normalizeParams(params),
|
|
7490
7490
|
});
|
|
7491
7491
|
}
|
|
7492
|
-
const
|
|
7493
|
-
|
|
7492
|
+
const Gc = /* @__PURE__ */ w("ZodReadonly", (e, t) => {
|
|
7493
|
+
Zo.init(e, t), Y.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
7494
7494
|
});
|
|
7495
|
-
function
|
|
7496
|
-
return new
|
|
7495
|
+
function Jc(e) {
|
|
7496
|
+
return new Gc({
|
|
7497
7497
|
type: "readonly",
|
|
7498
7498
|
innerType: e
|
|
7499
7499
|
});
|
|
7500
7500
|
}
|
|
7501
|
-
const
|
|
7502
|
-
|
|
7501
|
+
const Xc = /* @__PURE__ */ w("ZodCustom", (e, t) => {
|
|
7502
|
+
qo.init(e, t), Y.init(e, t);
|
|
7503
7503
|
});
|
|
7504
|
-
function
|
|
7505
|
-
return
|
|
7504
|
+
function Qc(e, t = {}) {
|
|
7505
|
+
return Du(Xc, e, t);
|
|
7506
7506
|
}
|
|
7507
|
-
function
|
|
7508
|
-
return
|
|
7507
|
+
function Yc(e) {
|
|
7508
|
+
return zu(e);
|
|
7509
7509
|
}
|
|
7510
|
-
const
|
|
7510
|
+
const eh = ie([g("amber"), g("green"), g("red"), g("other")]), th = ie([
|
|
7511
7511
|
g("alpha"),
|
|
7512
7512
|
g("beta"),
|
|
7513
7513
|
g("generalAvailability"),
|
|
@@ -7517,7 +7517,7 @@ const Yc = ie([g("amber"), g("green"), g("red"), g("other")]), eh = ie([
|
|
|
7517
7517
|
g("releaseCandidate"),
|
|
7518
7518
|
g("unavailable"),
|
|
7519
7519
|
g("underReview")
|
|
7520
|
-
]),
|
|
7520
|
+
]), ih = ie([
|
|
7521
7521
|
g("app"),
|
|
7522
7522
|
g("connector"),
|
|
7523
7523
|
g("connectorConnection"),
|
|
@@ -7541,33 +7541,33 @@ const Yc = ie([g("amber"), g("green"), g("red"), g("other")]), eh = ie([
|
|
|
7541
7541
|
g("presenter"),
|
|
7542
7542
|
g("presenterPresentation"),
|
|
7543
7543
|
g("tool")
|
|
7544
|
-
]),
|
|
7544
|
+
]), sh = ie([g("en-au"), g("en-gb"), g("en-us"), g("es-es")]), rh = ve(sh, L()), ah = Oe({
|
|
7545
7545
|
id: L(),
|
|
7546
|
-
color:
|
|
7546
|
+
color: eh,
|
|
7547
7547
|
label: L()
|
|
7548
|
-
}),
|
|
7548
|
+
}), nh = Oe({
|
|
7549
7549
|
id: L(),
|
|
7550
|
-
label:
|
|
7551
|
-
description:
|
|
7550
|
+
label: ve(L(), L()),
|
|
7551
|
+
description: ve(L(), L()),
|
|
7552
7552
|
firstCreatedAt: Ve().optional(),
|
|
7553
7553
|
icon: L().optional(),
|
|
7554
7554
|
iconDark: L().optional(),
|
|
7555
7555
|
lastUpdatedAt: Ve().optional(),
|
|
7556
|
-
status:
|
|
7557
|
-
statusId:
|
|
7558
|
-
typeId:
|
|
7559
|
-
}),
|
|
7556
|
+
status: ah.nullable().optional(),
|
|
7557
|
+
statusId: th,
|
|
7558
|
+
typeId: ih
|
|
7559
|
+
}), oh = ie([g("app"), g("engine"), g("connector"), g("context"), g("presenter"), g("tool")]), uh = Oe({
|
|
7560
7560
|
id: L(),
|
|
7561
7561
|
label: L()
|
|
7562
|
-
}),
|
|
7562
|
+
}), ch = Oe({
|
|
7563
7563
|
activeConnectionCount: Ve().optional(),
|
|
7564
|
-
canDescribe:
|
|
7564
|
+
canDescribe: Pc().optional(),
|
|
7565
7565
|
id: L().optional(),
|
|
7566
7566
|
authMethodId: ie([g("apiKey"), g("disabled"), g("oAuth2"), g("none")]),
|
|
7567
|
-
label:
|
|
7567
|
+
label: rh.optional(),
|
|
7568
7568
|
maxConnectionCount: Ve().optional(),
|
|
7569
|
-
params: He(
|
|
7570
|
-
}),
|
|
7569
|
+
params: He(ve(L(), L())).optional()
|
|
7570
|
+
}), hh = ie([g("application"), g("curatedDataset"), g("database"), g("fileStore")]), ph = ie([
|
|
7571
7571
|
g("abortOperation"),
|
|
7572
7572
|
g("authenticateConnection"),
|
|
7573
7573
|
g("createObject"),
|
|
@@ -7580,20 +7580,20 @@ const Yc = ie([g("amber"), g("green"), g("red"), g("other")]), eh = ie([
|
|
|
7580
7580
|
g("removeRecords"),
|
|
7581
7581
|
g("retrieveRecords"),
|
|
7582
7582
|
g("upsertRecords")
|
|
7583
|
-
]),
|
|
7584
|
-
typeId:
|
|
7583
|
+
]), lh = ie([g("bidirectional"), g("destination"), g("source"), g("unknown")]), fh = nh.extend({
|
|
7584
|
+
typeId: oh,
|
|
7585
7585
|
version: L()
|
|
7586
|
-
}),
|
|
7587
|
-
category:
|
|
7588
|
-
categoryId:
|
|
7589
|
-
implementations:
|
|
7590
|
-
operations: He(
|
|
7586
|
+
}), dh = fh.extend({
|
|
7587
|
+
category: uh.optional(),
|
|
7588
|
+
categoryId: hh,
|
|
7589
|
+
implementations: ve(L(), ch),
|
|
7590
|
+
operations: He(ph),
|
|
7591
7591
|
typeId: g("connector"),
|
|
7592
|
-
usageId:
|
|
7592
|
+
usageId: lh,
|
|
7593
7593
|
vendorAccountURL: L().nullable().optional(),
|
|
7594
7594
|
vendorDocumentationURL: L().nullable().optional(),
|
|
7595
7595
|
vendorHomeURL: L().nullable().optional()
|
|
7596
|
-
}),
|
|
7596
|
+
}), mh = ie([g("amber"), g("green"), g("red"), g("other")]), yh = ie([
|
|
7597
7597
|
g("alpha"),
|
|
7598
7598
|
g("beta"),
|
|
7599
7599
|
g("generalAvailability"),
|
|
@@ -7603,7 +7603,7 @@ const Yc = ie([g("amber"), g("green"), g("red"), g("other")]), eh = ie([
|
|
|
7603
7603
|
g("releaseCandidate"),
|
|
7604
7604
|
g("unavailable"),
|
|
7605
7605
|
g("underReview")
|
|
7606
|
-
]),
|
|
7606
|
+
]), vh = ie([
|
|
7607
7607
|
g("app"),
|
|
7608
7608
|
g("connector"),
|
|
7609
7609
|
g("connectorConnection"),
|
|
@@ -7627,71 +7627,71 @@ const Yc = ie([g("amber"), g("green"), g("red"), g("other")]), eh = ie([
|
|
|
7627
7627
|
g("presenter"),
|
|
7628
7628
|
g("presenterPresentation"),
|
|
7629
7629
|
g("tool")
|
|
7630
|
-
]), ds = Ve(),
|
|
7630
|
+
]), ds = Ve(), xh = Oe({
|
|
7631
7631
|
id: L(),
|
|
7632
|
-
color:
|
|
7632
|
+
color: mh,
|
|
7633
7633
|
label: L()
|
|
7634
|
-
}),
|
|
7634
|
+
}), gh = Oe({
|
|
7635
7635
|
id: L(),
|
|
7636
|
-
label:
|
|
7637
|
-
description:
|
|
7636
|
+
label: ve(L(), L()),
|
|
7637
|
+
description: ve(L(), L()),
|
|
7638
7638
|
icon: L().optional(),
|
|
7639
7639
|
iconDark: L().optional(),
|
|
7640
7640
|
order: Ve(),
|
|
7641
7641
|
path: L()
|
|
7642
|
-
}),
|
|
7642
|
+
}), Pr = Oe({
|
|
7643
7643
|
id: L(),
|
|
7644
|
-
label:
|
|
7645
|
-
description:
|
|
7644
|
+
label: ve(L(), L()),
|
|
7645
|
+
description: ve(L(), L()),
|
|
7646
7646
|
firstCreatedAt: ds.optional(),
|
|
7647
7647
|
icon: L().optional(),
|
|
7648
7648
|
iconDark: L().optional(),
|
|
7649
7649
|
lastUpdatedAt: ds.optional(),
|
|
7650
|
-
status:
|
|
7651
|
-
statusId:
|
|
7652
|
-
typeId:
|
|
7653
|
-
}),
|
|
7654
|
-
typeId:
|
|
7650
|
+
status: xh.optional(),
|
|
7651
|
+
statusId: yh,
|
|
7652
|
+
typeId: vh
|
|
7653
|
+
}), bh = ie([g("app"), g("engine"), g("connector"), g("context"), g("presenter"), g("tool")]), kh = Pr.extend({
|
|
7654
|
+
typeId: bh,
|
|
7655
7655
|
version: L()
|
|
7656
|
-
}),
|
|
7657
|
-
modelRefs: He(
|
|
7656
|
+
}), wh = Pr.extend({
|
|
7657
|
+
modelRefs: He(gh),
|
|
7658
7658
|
order: Ve()
|
|
7659
|
-
}),
|
|
7660
|
-
models: He(
|
|
7661
|
-
operations: He(
|
|
7659
|
+
}), Th = g("list"), Sh = kh.extend({
|
|
7660
|
+
models: He(wh),
|
|
7661
|
+
operations: He(Th),
|
|
7662
7662
|
typeId: g("context")
|
|
7663
|
-
}),
|
|
7663
|
+
}), _h = ie([g("amber"), g("green"), g("red"), g("other")]), Ph = ie([g("alpha"), g("beta"), g("generalAvailability"), g("notApplicable"), g("preAlpha"), g("proposed"), g("releaseCandidate"), g("unavailable"), g("underReview")]), Ah = ie([g("app"), g("connector"), g("connectorConnection"), g("context"), g("contextModelGroup"), g("contextModel"), g("contextModelDimensionGroup"), g("contextModelDimension"), g("contextModelDimensionHierarchy"), g("contextModelEntityGroup"), g("contextModelEntity"), g("contextModelEntityDataItem"), g("contextModelEntityEvent"), g("contextModelEntityPrimaryMeasure"), g("contextModelSecondaryMeasureGroup"), g("contextModelSecondaryMeasure"), g("dataView"), g("dimension"), g("engine"), g("eventQuery"), g("presenter"), g("presenterPresentation"), g("tool")]), ms = Ve(), Ch = Oe({
|
|
7664
7664
|
id: L(),
|
|
7665
|
-
color:
|
|
7665
|
+
color: _h,
|
|
7666
7666
|
label: L()
|
|
7667
|
-
}),
|
|
7667
|
+
}), Eh = Oe({
|
|
7668
7668
|
id: L(),
|
|
7669
|
-
label:
|
|
7670
|
-
description:
|
|
7669
|
+
label: ve(L(), L()),
|
|
7670
|
+
description: ve(L(), L()),
|
|
7671
7671
|
icon: L().optional(),
|
|
7672
7672
|
iconDark: L().optional(),
|
|
7673
7673
|
order: Ve(),
|
|
7674
7674
|
path: L()
|
|
7675
|
-
}),
|
|
7675
|
+
}), Ih = Oe({
|
|
7676
7676
|
id: L(),
|
|
7677
|
-
label:
|
|
7678
|
-
description:
|
|
7677
|
+
label: ve(L(), L()),
|
|
7678
|
+
description: ve(L(), L()),
|
|
7679
7679
|
firstCreatedAt: ms.optional(),
|
|
7680
7680
|
icon: L().optional(),
|
|
7681
7681
|
iconDark: L().optional(),
|
|
7682
7682
|
lastUpdatedAt: ms.optional(),
|
|
7683
|
-
status:
|
|
7684
|
-
statusId:
|
|
7685
|
-
typeId:
|
|
7686
|
-
}),
|
|
7687
|
-
typeId:
|
|
7683
|
+
status: Ch.optional(),
|
|
7684
|
+
statusId: Ph,
|
|
7685
|
+
typeId: Ah
|
|
7686
|
+
}), Nh = ie([g("app"), g("engine"), g("connector"), g("context"), g("presenter"), g("tool")]), Lh = Ih.extend({
|
|
7687
|
+
typeId: Nh,
|
|
7688
7688
|
version: L()
|
|
7689
|
-
}),
|
|
7690
|
-
presentations: He(
|
|
7691
|
-
operations: He(
|
|
7689
|
+
}), Oh = ie([g("list"), g("render"), g("setColorMode")]), Mh = Lh.extend({
|
|
7690
|
+
presentations: He(Eh),
|
|
7691
|
+
operations: He(Oh),
|
|
7692
7692
|
typeId: g("presenter")
|
|
7693
7693
|
});
|
|
7694
|
-
async function
|
|
7694
|
+
async function Rh() {
|
|
7695
7695
|
const e = await Ce("config.json"), t = {
|
|
7696
7696
|
body: JSON.stringify(e),
|
|
7697
7697
|
headers: { "Content-Type": "application/json" },
|
|
@@ -7710,52 +7710,52 @@ async function ys() {
|
|
|
7710
7710
|
async function vs(e) {
|
|
7711
7711
|
const i = `v${JSON.parse(await Pe.readFile("package.json", "utf8")).version}`;
|
|
7712
7712
|
async function s(a, o = "") {
|
|
7713
|
-
const h = await
|
|
7713
|
+
const h = await Ra(a, { withFileTypes: !0 });
|
|
7714
7714
|
for (const d of h) {
|
|
7715
7715
|
const y = `${a}/${d.name}`, u = o ? `${o}/${d.name}` : d.name;
|
|
7716
7716
|
if (d.isDirectory()) continue;
|
|
7717
|
-
const T = `${e}_${i}/${u}`.replaceAll("\\", "/"),
|
|
7717
|
+
const T = `${e}_${i}/${u}`.replaceAll("\\", "/"), E = d.name.endsWith(".css") ? "text/css" : "application/octet-stream", R = d.name.endsWith(".js") ? "application/javascript" : E;
|
|
7718
7718
|
console.info(`⚙️ Uploading '${u}' → '${T}'...`), await Te(void 0, `wrangler r2 object put "${T}" --file="${y}" --content-type ${R} --jurisdiction=eu --remote`);
|
|
7719
7719
|
}
|
|
7720
7720
|
}
|
|
7721
7721
|
await s("dist");
|
|
7722
7722
|
}
|
|
7723
|
-
async function
|
|
7723
|
+
async function tp() {
|
|
7724
7724
|
try {
|
|
7725
7725
|
Le("Build Project"), await Ee("1️⃣ Bundle project", "vite", ["build"]), Fe("Project built.");
|
|
7726
7726
|
} catch (e) {
|
|
7727
7727
|
console.error("❌ Error building project.", e), process.exit(1);
|
|
7728
7728
|
}
|
|
7729
7729
|
}
|
|
7730
|
-
async function
|
|
7730
|
+
async function ip() {
|
|
7731
7731
|
try {
|
|
7732
7732
|
Le("Release Project");
|
|
7733
7733
|
const e = await Ce("package.json"), t = await Ce("config.json");
|
|
7734
|
-
await
|
|
7735
|
-
const i =
|
|
7734
|
+
await Ar("1️⃣", e);
|
|
7735
|
+
const i = Dh(e);
|
|
7736
7736
|
switch (i) {
|
|
7737
7737
|
case "connector":
|
|
7738
|
-
await
|
|
7738
|
+
await Vh("2️⃣", e);
|
|
7739
7739
|
break;
|
|
7740
7740
|
case "context":
|
|
7741
|
-
await
|
|
7741
|
+
await jh("2️⃣", e);
|
|
7742
7742
|
break;
|
|
7743
7743
|
case "presenter":
|
|
7744
|
-
await
|
|
7744
|
+
await Fh("2️⃣", e);
|
|
7745
7745
|
break;
|
|
7746
7746
|
default:
|
|
7747
|
-
await
|
|
7747
|
+
await zh("2️⃣", e);
|
|
7748
7748
|
}
|
|
7749
7749
|
await Ee("3️⃣ Bundle project", "vite", ["build"]), await Te("4️⃣ Stage changes", "git", ["add", "."]), await Te("5️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await Te("6️⃣ Push changes", "git", ["push", "origin", "main:main"]);
|
|
7750
|
-
const s =
|
|
7750
|
+
const s = $h(i);
|
|
7751
7751
|
if (i === "app")
|
|
7752
|
-
|
|
7752
|
+
se("7️⃣ Register module"), await Rh();
|
|
7753
7753
|
else if (i === "engine")
|
|
7754
|
-
|
|
7754
|
+
se("7️⃣ Register module"), await ys(), await vs("datapos-engine-eu");
|
|
7755
7755
|
else if (s === void 0)
|
|
7756
|
-
|
|
7756
|
+
se("7️⃣ Registration NOT required.");
|
|
7757
7757
|
else {
|
|
7758
|
-
|
|
7758
|
+
se("7️⃣ Register module"), await ys();
|
|
7759
7759
|
const a = t.id.slice(Math.max(0, t.id.lastIndexOf("-") + 1));
|
|
7760
7760
|
await vs(`datapos-engine-eu/${s}/${a}`);
|
|
7761
7761
|
}
|
|
@@ -7764,20 +7764,20 @@ async function ep() {
|
|
|
7764
7764
|
console.error("❌ Error releasing project.", e), process.exit(1);
|
|
7765
7765
|
}
|
|
7766
7766
|
}
|
|
7767
|
-
function
|
|
7767
|
+
function Dh(e) {
|
|
7768
7768
|
const t = e.name ?? "";
|
|
7769
7769
|
return t === "datapos-app" ? "app" : t === "datapos-engine" ? "engine" : t.includes("datapos-connector") ? "connector" : t.includes("datapos-context") ? "context" : t.includes("datapos-presenter") ? "presenter" : t.includes("datapos-tool") ? "tool" : "other";
|
|
7770
7770
|
}
|
|
7771
|
-
async function
|
|
7771
|
+
async function sp() {
|
|
7772
7772
|
try {
|
|
7773
7773
|
Le("Synchronise Project with GitHub");
|
|
7774
7774
|
const e = await Ce("package.json");
|
|
7775
|
-
|
|
7775
|
+
se("Bump project version"), await Ar("1️⃣", e), await Te("2️⃣ Stage changes", "git", ["add", "."]), await Te("3️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await Te("4️⃣ Push changes", "git", ["push", "origin", "main:main"]), Fe(`Project version '${e.version}' synchronised with GitHub.`);
|
|
7776
7776
|
} catch (e) {
|
|
7777
7777
|
console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
|
|
7778
7778
|
}
|
|
7779
7779
|
}
|
|
7780
|
-
function
|
|
7780
|
+
function rp() {
|
|
7781
7781
|
try {
|
|
7782
7782
|
Le("Test Project"), console.log(`
|
|
7783
7783
|
❌ Test project is not implemented. No 'vitest' command.
|
|
@@ -7786,24 +7786,24 @@ function ip() {
|
|
|
7786
7786
|
console.error("❌ Error testing project.", e), process.exit(1);
|
|
7787
7787
|
}
|
|
7788
7788
|
}
|
|
7789
|
-
async function
|
|
7790
|
-
|
|
7789
|
+
async function zh(e, t) {
|
|
7790
|
+
se(`${e} Build project configuration`);
|
|
7791
7791
|
const i = await Ce("config.json");
|
|
7792
7792
|
t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), await ot("config.json", i);
|
|
7793
7793
|
}
|
|
7794
|
-
async function
|
|
7795
|
-
|
|
7796
|
-
const [i, s] = await Promise.all([Ce("config.json"), nt("src/index.ts")]), a =
|
|
7794
|
+
async function Vh(e, t) {
|
|
7795
|
+
se(`${e} Build connector project configuration`);
|
|
7796
|
+
const [i, s] = await Promise.all([Ce("config.json"), nt("src/index.ts")]), a = dh.safeParse(i);
|
|
7797
7797
|
if (!a.success) {
|
|
7798
7798
|
console.log("❌ Configuration is invalid:"), console.table(a.error.issues);
|
|
7799
7799
|
return;
|
|
7800
7800
|
}
|
|
7801
|
-
const o = wi(s), h =
|
|
7801
|
+
const o = wi(s), h = Bh(o);
|
|
7802
7802
|
o.length > 0 ? (console.info(`ℹ️ Implements ${o.length} operations:`), console.table(o)) : console.warn("⚠️ Implements no operations."), h === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${h}' usage.`), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = o, i.usageId = h, await ot("config.json", i);
|
|
7803
7803
|
}
|
|
7804
|
-
async function
|
|
7805
|
-
|
|
7806
|
-
const [i, s] = await Promise.all([Ce("config.json"), nt("src/index.ts")]), a =
|
|
7804
|
+
async function jh(e, t) {
|
|
7805
|
+
se(`${e} Build context project configuration`);
|
|
7806
|
+
const [i, s] = await Promise.all([Ce("config.json"), nt("src/index.ts")]), a = Sh.safeParse(i);
|
|
7807
7807
|
if (!a.success) {
|
|
7808
7808
|
console.log("❌ Configuration is invalid:"), console.table(a.error.issues);
|
|
7809
7809
|
return;
|
|
@@ -7811,9 +7811,9 @@ async function Vh(e, t) {
|
|
|
7811
7811
|
const o = wi(s);
|
|
7812
7812
|
o.length > 0 ? (console.info(`ℹ️ Implements ${o.length} operations:`), console.table(o)) : console.warn("⚠️ Implements no operations."), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = o, await ot("config.json", i);
|
|
7813
7813
|
}
|
|
7814
|
-
async function
|
|
7815
|
-
|
|
7816
|
-
const [i, s] = await Promise.all([Ce("config.json"), nt("src/index.ts")]), a =
|
|
7814
|
+
async function Fh(e, t) {
|
|
7815
|
+
se(`${e} Build presenter project configuration`);
|
|
7816
|
+
const [i, s] = await Promise.all([Ce("config.json"), nt("src/index.ts")]), a = Mh.safeParse(i);
|
|
7817
7817
|
if (!a.success) {
|
|
7818
7818
|
console.log("❌ Configuration is invalid:"), console.table(a.error.issues);
|
|
7819
7819
|
return;
|
|
@@ -7821,21 +7821,21 @@ async function jh(e, t) {
|
|
|
7821
7821
|
const o = wi(s);
|
|
7822
7822
|
o.length > 0 ? (console.info(`ℹ️ Implements ${o.length} operations:`), console.table(o)) : console.warn("⚠️ Implements no operations."), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = o, await ot("config.json", i);
|
|
7823
7823
|
}
|
|
7824
|
-
async function
|
|
7825
|
-
if (
|
|
7824
|
+
async function Ar(e, t, i = "./") {
|
|
7825
|
+
if (se(`${e} Bump project version`), t.version == null)
|
|
7826
7826
|
t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`), await ot(`${i}package.json`, t);
|
|
7827
7827
|
else {
|
|
7828
7828
|
const s = t.version, a = t.version.split(".");
|
|
7829
7829
|
t.version = `${a[0]}.${a[1]}.${Number(a[2]) + 1}`, console.info(`Project version bumped from '${s}' to '${t.version}'.`), await ot(`${i}package.json`, t);
|
|
7830
7830
|
}
|
|
7831
7831
|
}
|
|
7832
|
-
function
|
|
7832
|
+
function Bh(e) {
|
|
7833
7833
|
let t = !1, i = !1;
|
|
7834
7834
|
for (const s of e)
|
|
7835
|
-
|
|
7835
|
+
Va.includes(s) && (t = !0), za.includes(s) && (i = !0);
|
|
7836
7836
|
return t && i ? "bidirectional" : t ? "source" : i ? "destination" : "unknown";
|
|
7837
7837
|
}
|
|
7838
|
-
function
|
|
7838
|
+
function $h(e) {
|
|
7839
7839
|
switch (e) {
|
|
7840
7840
|
case "connector":
|
|
7841
7841
|
return "connectors";
|
|
@@ -7849,120 +7849,121 @@ function Bh(e) {
|
|
|
7849
7849
|
return;
|
|
7850
7850
|
}
|
|
7851
7851
|
}
|
|
7852
|
-
const
|
|
7852
|
+
const Uh = ["critical", "high", "moderate", "low", "unknown"], Zh = {
|
|
7853
7853
|
critical: { color: "D32F2F", label: "critical" },
|
|
7854
7854
|
high: { color: "EF6C00", label: "high" },
|
|
7855
7855
|
moderate: { color: "FBC02D", label: "moderate" },
|
|
7856
7856
|
low: { color: "6D8C31", label: "low" },
|
|
7857
7857
|
unknown: { color: "616161", label: "unknown" }
|
|
7858
7858
|
// See sample badges in ~/tests/sampleBadges.md. Also included 'info' colouring.
|
|
7859
|
-
};
|
|
7860
|
-
async function
|
|
7859
|
+
}, xs = "<!-- OWASP_BADGES_START -->", qh = "<!-- OWASP_BADGES_END -->";
|
|
7860
|
+
async function ap() {
|
|
7861
7861
|
try {
|
|
7862
|
-
Le("Audit Dependencies"), await
|
|
7862
|
+
Le("Audit Dependencies"), await Da(), await Ee("1️⃣", "owasp-dependency-check", [
|
|
7863
7863
|
"--project",
|
|
7864
7864
|
"@datapos/datapos-development",
|
|
7865
7865
|
"--enableRetired",
|
|
7866
7866
|
"--nodePackageSkipDevDependencies",
|
|
7867
7867
|
"--nvdApiKey",
|
|
7868
7868
|
process.env.NVD_API_KEY ?? ""
|
|
7869
|
-
]),
|
|
7869
|
+
]), await Hh("2️⃣"), await Ee("3️⃣", "npm", ["audit"]), Fe("Dependencies audited.");
|
|
7870
7870
|
} catch (e) {
|
|
7871
7871
|
console.error("❌ Error auditing dependencies.", e), process.exit(1);
|
|
7872
7872
|
}
|
|
7873
7873
|
}
|
|
7874
|
-
async function
|
|
7875
|
-
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7874
|
+
async function Hh(e) {
|
|
7875
|
+
se(`${e} Insert OWASP Badge(s) into 'README.md'`);
|
|
7876
|
+
const t = await Ce("./dependency-check-reports/dependency-check-report.json"), i = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
|
|
7877
|
+
for (const u of t.dependencies)
|
|
7878
|
+
if (u.vulnerabilities != null)
|
|
7879
|
+
for (const T of u.vulnerabilities) {
|
|
7880
|
+
const E = T.severity?.toLowerCase() ?? "unknown";
|
|
7881
|
+
if (E in i) {
|
|
7882
|
+
const R = Uh.find((W) => W === E);
|
|
7883
|
+
i[R ?? "unknown"]++;
|
|
7883
7884
|
} else
|
|
7884
|
-
|
|
7885
|
+
i.unknown++;
|
|
7885
7886
|
}
|
|
7886
|
-
const
|
|
7887
|
-
if (
|
|
7887
|
+
const s = await Wh(i), a = await nt("./README.md"), o = a.indexOf(xs), h = a.indexOf(qh);
|
|
7888
|
+
if (o === -1 || h === -1) {
|
|
7888
7889
|
console.error("❌ No OWASP badge markers found in 'README.md'.");
|
|
7889
7890
|
return;
|
|
7890
7891
|
}
|
|
7891
|
-
const
|
|
7892
|
-
await
|
|
7892
|
+
const d = s.join(" "), y = a.slice(0, Math.max(0, o + xs.length)) + d + a.slice(Math.max(0, h));
|
|
7893
|
+
await ir("README.md", y), console.info("OWASP audit badge(s) inserted into 'README.md'");
|
|
7893
7894
|
}
|
|
7894
|
-
async function
|
|
7895
|
+
async function Wh(e) {
|
|
7895
7896
|
const t = await Ce("config.json"), i = [];
|
|
7896
7897
|
if (Object.values(e).reduce((a, o) => a + o, 0) === 0)
|
|
7897
7898
|
console.info("No vulnerabilities found."), i.push(`[](https://data-positioning.github.io/${t.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
7898
7899
|
else
|
|
7899
7900
|
for (const [a, o] of Object.entries(e)) {
|
|
7900
|
-
const h =
|
|
7901
|
+
const h = Zh[a];
|
|
7901
7902
|
if (console.warn(`⚠️ ${o} ${h.label} vulnerability(ies) found.`), o === 0) continue;
|
|
7902
7903
|
const d = `https://img.shields.io/badge/OWASP-${o}%20${h.label}-${h.color}`;
|
|
7903
7904
|
i.push(`[](https://data-positioning.github.io/${t.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
7904
7905
|
}
|
|
7905
7906
|
return i;
|
|
7906
7907
|
}
|
|
7907
|
-
async function
|
|
7908
|
+
async function np() {
|
|
7908
7909
|
try {
|
|
7909
|
-
Le("Check Dependencies"), await Ee("1
|
|
7910
|
+
Le("Check Dependencies"), await Ee("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), await Ee("2️⃣ Check using 'npm-check-updates'", "npm-check-updates", ["-i"]), Fe("Dependencies checked.");
|
|
7910
7911
|
} catch (e) {
|
|
7911
7912
|
console.error("❌ Error checking dependencies.", e), process.exit(1);
|
|
7912
7913
|
}
|
|
7913
7914
|
}
|
|
7914
|
-
const
|
|
7915
|
-
async function
|
|
7915
|
+
const gs = "<!-- DEPENDENCY_LICENSES_START -->", Kh = "<!-- DEPENDENCY_LICENSES_END -->";
|
|
7916
|
+
async function op(e = [], t = !1) {
|
|
7916
7917
|
try {
|
|
7917
7918
|
Le("Document Dependencies");
|
|
7918
|
-
const
|
|
7919
|
+
const i = e.flatMap((s) => ["--allowed", s]);
|
|
7919
7920
|
await Te(
|
|
7920
7921
|
"1️⃣ Generate 'licenses.json' file",
|
|
7921
7922
|
"license-report",
|
|
7922
7923
|
["--only=prod,peer", "--output=json", "--department.value=n/a", "--licensePeriod=n/a", "--material=n/a", "--relatedTo.value=n/a"],
|
|
7923
7924
|
"licenses.json"
|
|
7924
|
-
), await Te("2️⃣ Generate 'licenses.md' file", "license-report", ["--config", "license-report-config.json", "--only=prod,peer", "--output=markdown"], "licenses.md"), await Te("3
|
|
7925
|
+
), await Te("2️⃣ Generate 'licenses.md' file", "license-report", ["--config", "license-report-config.json", "--only=prod,peer", "--output=markdown"], "licenses.md"), await Te("3️⃣ Check 'licenses.json' file", "license-report-check", ["--source", "./licenses.json", "--output=table", ...i]), t ? (await Te(
|
|
7925
7926
|
"4️⃣ Generate 'licenseTree.json' file",
|
|
7926
7927
|
"license-report-recursive",
|
|
7927
7928
|
["--only=prod,peer", "--output=tree", " --recurse", "--department.value=n/a", "--licensePeriod=n/a", "--material=n/a", "--relatedTo.value=n/a"],
|
|
7928
7929
|
"licenseTree.json"
|
|
7929
|
-
), await Te("5
|
|
7930
|
-
} catch (
|
|
7931
|
-
console.error("❌ Error documenting dependencies.",
|
|
7930
|
+
), await Te("5️⃣ Check 'licenseTree.json' file", "license-report-check", ["--source", "./licenseTree.json", "--output=table", ...i])) : (se("4️⃣ Skip 'licenseTree.json' file generate"), se("5️⃣ Skip 'licenseTree.json' file check")), await Gh("6️⃣"), Fe("Dependencies documented.");
|
|
7931
|
+
} catch (i) {
|
|
7932
|
+
console.error("❌ Error documenting dependencies.", i), process.exit(1);
|
|
7932
7933
|
}
|
|
7933
7934
|
}
|
|
7934
|
-
async function
|
|
7935
|
-
|
|
7936
|
-
const i = (await nt("./licenses.md")).trim(), s = await nt("./README.md"), a = s.indexOf(
|
|
7935
|
+
async function Gh(e) {
|
|
7936
|
+
se(`${e} Insert licenses into 'README.md'`);
|
|
7937
|
+
const i = (await nt("./licenses.md")).trim(), s = await nt("./README.md"), a = s.indexOf(gs), o = s.indexOf(Kh);
|
|
7937
7938
|
if (a === -1 || o === -1) {
|
|
7938
7939
|
console.error("❌ No dependency license markers found in 'README.md'.");
|
|
7939
7940
|
return;
|
|
7940
7941
|
}
|
|
7941
|
-
const h = `${s.slice(0, Math.max(0, a +
|
|
7942
|
+
const h = `${s.slice(0, Math.max(0, a + gs.length))}
|
|
7942
7943
|
${i}
|
|
7943
7944
|
${s.slice(Math.max(0, o))}`;
|
|
7944
|
-
await
|
|
7945
|
+
await ir("README.md", h);
|
|
7945
7946
|
}
|
|
7946
|
-
async function
|
|
7947
|
+
async function up() {
|
|
7947
7948
|
try {
|
|
7948
|
-
Le("Format Code"), await Ee("1
|
|
7949
|
+
Le("Format Code"), await Ee("1️⃣ Format", "prettier", ["--write", "src/"]), Fe("Code formatted.");
|
|
7949
7950
|
} catch (e) {
|
|
7950
7951
|
console.error("❌ Error formatting code.", e), process.exit(1);
|
|
7951
7952
|
}
|
|
7952
7953
|
}
|
|
7953
|
-
async function
|
|
7954
|
+
async function cp() {
|
|
7954
7955
|
try {
|
|
7955
7956
|
Le("Lint Code"), await Ee("1️⃣ Lint", "eslint", []), Fe("Code linted.");
|
|
7956
7957
|
} catch (e) {
|
|
7957
7958
|
console.error("❌ Error linting code.", e), process.exit(1);
|
|
7958
7959
|
}
|
|
7959
7960
|
}
|
|
7960
|
-
const
|
|
7961
|
-
async function
|
|
7961
|
+
const Jh = ["1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣", "6️⃣", "7️⃣", "8️⃣", "9️⃣"];
|
|
7962
|
+
async function hp(e = []) {
|
|
7962
7963
|
try {
|
|
7963
7964
|
Le("Update '@datapos/datapos' Dependencies");
|
|
7964
7965
|
for (const [t, i] of e.entries()) {
|
|
7965
|
-
const s =
|
|
7966
|
+
const s = Jh.at(t) ?? "🔢";
|
|
7966
7967
|
await Ee(`${s} Update '${i}'`, "npm", ["install", `@datapos/datapos-${i}@latest`]);
|
|
7967
7968
|
}
|
|
7968
7969
|
Fe("'@datapos/datapos' dependencies updated.");
|
|
@@ -7970,7 +7971,7 @@ async function up(e) {
|
|
|
7970
7971
|
console.error("❌ Error updating '@datapos/datapos' dependencies.", t), process.exit(1);
|
|
7971
7972
|
}
|
|
7972
7973
|
}
|
|
7973
|
-
async function
|
|
7974
|
+
async function pp(e) {
|
|
7974
7975
|
try {
|
|
7975
7976
|
console.info(`🚀 Building public directory index for identifier '${e}'...`);
|
|
7976
7977
|
const t = {};
|
|
@@ -7983,11 +7984,11 @@ async function cp(e) {
|
|
|
7983
7984
|
try {
|
|
7984
7985
|
const T = await Pe.stat(u);
|
|
7985
7986
|
if (T.isDirectory()) {
|
|
7986
|
-
const
|
|
7987
|
-
h.push(R), await i(u,
|
|
7987
|
+
const E = await Pe.readdir(u), R = { childCount: E.length, name: y, typeId: "folder" };
|
|
7988
|
+
h.push(R), await i(u, E);
|
|
7988
7989
|
} else {
|
|
7989
|
-
const
|
|
7990
|
-
h.push(
|
|
7990
|
+
const E = { id: Lr(), lastModifiedAt: T.mtimeMs, name: y, size: T.size, typeId: "object" };
|
|
7991
|
+
h.push(E);
|
|
7991
7992
|
}
|
|
7992
7993
|
} catch (T) {
|
|
7993
7994
|
throw new Error(`Unable to get information for '${y}' in 'buildPublicDirectoryIndex'. ${String(T)}`);
|
|
@@ -8005,15 +8006,15 @@ async function cp(e) {
|
|
|
8005
8006
|
}
|
|
8006
8007
|
}
|
|
8007
8008
|
export {
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8009
|
+
ap as auditDependencies,
|
|
8010
|
+
tp as buildProject,
|
|
8011
|
+
pp as buildPublicDirectoryIndex,
|
|
8012
|
+
np as checkDependencies,
|
|
8013
|
+
op as documentDependencies,
|
|
8014
|
+
up as formatCode,
|
|
8015
|
+
cp as lintCode,
|
|
8016
|
+
ip as releaseProject,
|
|
8017
|
+
sp as syncProjectWithGitHub,
|
|
8018
|
+
rp as testProject,
|
|
8019
|
+
hp as updateDataPosDependencies
|
|
8019
8020
|
};
|