@airalogy/aimd-editor 1.10.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AimdEditorTopBar.vue_vue_type_script_setup_true_lang-CODh6fyp.js → AimdEditorTopBar.vue_vue_type_script_setup_true_lang-CihhM95s.js} +2 -2
- package/dist/{AimdSourceEditor.vue_vue_type_script_setup_true_lang-DCbNbka1.js → AimdSourceEditor.vue_vue_type_script_setup_true_lang-DrXCKgVI.js} +1208 -1144
- package/dist/aimd-editor.css +1 -1
- package/dist/embedded.js +1 -1
- package/dist/index.js +3 -3
- package/dist/monaco.js +1 -1
- package/dist/{theme-Cu18_uZ_.js → theme-CB0dPzmd.js} +31 -16
- package/dist/vue.js +2 -2
- package/package.json +3 -3
- package/src/language-config.ts +16 -1
- package/src/vue/AimdEditor.vue +3 -1
- package/src/vue/AimdSourceEditor.vue +2 -0
- package/src/vue/useEditorContent.ts +1 -1
|
@@ -1,16 +1,76 @@
|
|
|
1
|
-
import { defineComponent as Hi, ref as Bt, onMounted as Qi, onBeforeUnmount as
|
|
2
|
-
var ts = [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], Zt = [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], is = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", Xt = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", lt = {
|
|
1
|
+
import { defineComponent as Hi, ref as Bt, onMounted as Qi, onBeforeUnmount as Xi, watch as lt, openBlock as jt, createElementBlock as $t, normalizeStyle as Yi, toDisplayString as Zi, createCommentVNode as es, createElementVNode as ts } from "vue";
|
|
2
|
+
const is = /* @__PURE__ */ JSON.parse('{"UserName":{"type_name":"UserName","import_from":"airalogy.types","storage_kind":"scalar","ui_kind":"current-user","type":"string","description":"The user name of the current Airalogy user"},"CurrentTime":{"type_name":"CurrentTime","import_from":"airalogy.types","storage_kind":"scalar","ui_kind":"current-time","type":"string","description":"The current time. The timezone is based on the user\'s browser."},"CurrentProtocolId":{"type_name":"CurrentProtocolId","import_from":"airalogy.types","storage_kind":"scalar","type":"string","description":"The ID of the current Airalogy Protocol."},"CurrentRecordId":{"type_name":"CurrentRecordId","import_from":"airalogy.types","storage_kind":"scalar","type":"string","description":"The ID of the current Airalogy Record."},"EntityRef":{"type_name":"EntityRef","import_from":"airalogy.types","storage_kind":"reference","ui_kind":"entity-ref","type":"object","title":"EntityRef","description":"Reference to a named entity in a connector-backed source.\\n\\n`entity` is the entity namespace, such as plasmid or strain. `id` is the\\nstable identifier inside that namespace/source. Extra fields are allowed so\\nhosts can retain display snapshots or source-specific reference metadata."},"Observation":{"type_name":"Observation","import_from":"airalogy.types","storage_kind":"structured","ui_kind":"observation","type":"object","title":"Observation","description":"A typed value with observation time, receipt time, and provenance."},"ObservationSeriesRef":{"type_name":"ObservationSeriesRef","import_from":"airalogy.types","storage_kind":"reference","ui_kind":"observation-series","type":"object","title":"ObservationSeriesRef","description":"Reference to a file-backed high-volume observation series."},"BloodType":{"type_name":"BloodType","import_from":"airalogy.types","storage_kind":"scalar","type":"string","title":"Blood type","description":"Common ABO blood group values. Values such as A+ or A- combine an ABO group with Rh positive or Rh negative status. Rh+ and Rh- are allowed when only Rh factor is recorded.","enum":["A","B","AB","O","A+","A-","B+","B-","AB+","AB-","O+","O-","Rh+","Rh-"]},"ChineseEducationLevel":{"type_name":"ChineseEducationLevel","import_from":"airalogy.types","storage_kind":"scalar","type":"string","title":"文化程度","description":"中国居民信息登记中常用的文化程度分类。","enum":["无学历","小学","初中","高中","中专","大专","本科","硕士","博士"]},"ChineseEthnicGroup":{"type_name":"ChineseEthnicGroup","import_from":"airalogy.types","storage_kind":"scalar","type":"string","title":"民族","description":"中国国务院公布的 56 个法定民族之一。","enum":["汉族","蒙古族","回族","藏族","维吾尔族","苗族","彝族","壮族","布依族","朝鲜族","满族","侗族","瑶族","白族","土家族","哈尼族","哈萨克族","傣族","黎族","傈僳族","佤族","畲族","高山族","拉祜族","水族","东乡族","纳西族","景颇族","柯尔克孜族","土族","达斡尔族","仫佬族","羌族","布朗族","撒拉族","毛南族","仡佬族","锡伯族","阿昌族","普米族","塔吉克族","怒族","乌孜别克族","俄罗斯族","鄂温克族","德昂族","保安族","裕固族","京族","塔塔尔族","独龙族","鄂伦春族","赫哲族","门巴族","珞巴族","基诺族"]},"ChineseGender":{"type_name":"ChineseGender","import_from":"airalogy.types","storage_kind":"scalar","type":"string","title":"性别","description":"中国居民信息登记中常用的性别分类。","enum":["男","女"]},"ChineseMaritalStatus":{"type_name":"ChineseMaritalStatus","import_from":"airalogy.types","storage_kind":"scalar","type":"string","title":"婚姻状况","description":"中国居民信息登记中常用的婚姻状况分类。","enum":["未婚","已婚","丧偶","离婚","再婚"]},"ChineseProvinceLevelRegion":{"type_name":"ChineseProvinceLevelRegion","import_from":"airalogy.types","storage_kind":"scalar","type":"string","title":"省级行政区","description":"中国现行省级行政区(省、自治区、直辖市、特别行政区)。","enum":["北京","天津","上海","重庆","河北","山西","辽宁","吉林","黑龙江","江苏","浙江","安徽","福建","江西","山东","河南","湖北","湖南","广东","海南","四川","贵州","云南","陕西","甘肃","青海","台湾","西藏","内蒙古","广西","宁夏","新疆","香港","澳门"]},"AiralogyMarkdown":{"type_name":"AiralogyMarkdown","import_from":"airalogy.types","storage_kind":"scalar","ui_kind":"markdown","type":"string","description":"An Airalogy Markdown string"},"RecordId":{"type_name":"RecordId","import_from":"airalogy.types","storage_kind":"scalar","type":"string"},"FileIdPNG":{"type_name":"FileIdPNG","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdPNG. This type allows users to upload a .png file and inject it into the related data field."},"FileIdJPG":{"type_name":"FileIdJPG","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdJPG. This type allows users to upload a .jpg file and inject it into the related data field."},"FileIdSVG":{"type_name":"FileIdSVG","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdSVG. This type allows users to upload a .svg file and inject it into the related data field."},"FileIdWEBP":{"type_name":"FileIdWEBP","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdWEBP. This type allows users to upload a .webp file and inject it into the related data field."},"FileIdTIFF":{"type_name":"FileIdTIFF","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdTIFF. This type allows users to upload a .tiff file and inject it into the related data field."},"FileIdMP4":{"type_name":"FileIdMP4","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdMP4. This type allows users to upload a .mp4 file and inject it into the related data field."},"FileIdMP3":{"type_name":"FileIdMP3","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdMP3. This type allows users to upload a .mp3 file and inject it into the related data field."},"FileIdAIMD":{"type_name":"FileIdAIMD","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdAIMD. This type allows users to upload a .aimd file and inject it into the related data field."},"FileIdMD":{"type_name":"FileIdMD","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdMD. This type allows users to upload a .md file and inject it into the related data field."},"FileIdTXT":{"type_name":"FileIdTXT","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdTXT. This type allows users to upload a .txt file and inject it into the related data field."},"FileIdCSV":{"type_name":"FileIdCSV","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdCSV. This type allows users to upload a .csv file and inject it into the related data field."},"FileIdJSON":{"type_name":"FileIdJSON","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdJSON. This type allows users to upload a .json file and inject it into the related data field."},"FileIdDOCX":{"type_name":"FileIdDOCX","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdDOCX. This type allows users to upload a .docx file and inject it into the related data field."},"FileIdXLSX":{"type_name":"FileIdXLSX","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdXLSX. This type allows users to upload a .xlsx file and inject it into the related data field."},"FileIdPPTX":{"type_name":"FileIdPPTX","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdPPTX. This type allows users to upload a .pptx file and inject it into the related data field."},"FileIdPDF":{"type_name":"FileIdPDF","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdPDF. This type allows users to upload a .pdf file and inject it into the related data field."},"FileIdDNA":{"type_name":"FileIdDNA","import_from":"airalogy.types","storage_kind":"file-id","ui_kind":"file","type":"string","description":"Airalogy built-in type: FileIdDNA. This type allows users to upload a .dna file and inject it into the related data field."},"Recommended":{"type_name":"Recommended","import_from":"airalogy.types","storage_kind":"scalar","type":"object"},"IgnoreStr":{"type_name":"IgnoreStr","import_from":"airalogy.types","storage_kind":"scalar","type":"string","description":"In an Airalogy Field of this type, a user may provide a string; however, when the Airalogy Record is submitted, the string is not persisted. This is intended for sensitive input (such as an API key) that the Airalogy Protocol Assigner can consume during processing but that should never be stored in the final Record."},"CodeStr":{"type_name":"CodeStr","import_from":"airalogy.types","storage_kind":"scalar","ui_kind":"code","type":"string","description":"Airalogy built-in type: CodeStr (plaintext). Strings of this type contain language-agnostic code or structured text and are rendered in a plain code editor."},"PyStr":{"type_name":"PyStr","import_from":"airalogy.types","storage_kind":"scalar","ui_kind":"code","type":"string","description":"Airalogy built-in type: CodeStr (python). Strings of this type contain python source code and are rendered in an editor with python syntax highlighting."},"JsStr":{"type_name":"JsStr","import_from":"airalogy.types","storage_kind":"scalar","ui_kind":"code","type":"string","description":"Airalogy built-in type: CodeStr (javascript). Strings of this type contain javascript source code and are rendered in an editor with javascript syntax highlighting."},"TsStr":{"type_name":"TsStr","import_from":"airalogy.types","storage_kind":"scalar","ui_kind":"code","type":"string","description":"Airalogy built-in type: CodeStr (typescript). Strings of this type contain typescript source code and are rendered in an editor with typescript syntax highlighting."},"JsonStr":{"type_name":"JsonStr","import_from":"airalogy.types","storage_kind":"scalar","ui_kind":"code","type":"string","description":"Airalogy built-in type: CodeStr (json). Strings of this type contain json source code and are rendered in an editor with json syntax highlighting."},"TomlStr":{"type_name":"TomlStr","import_from":"airalogy.types","storage_kind":"scalar","ui_kind":"code","type":"string","description":"Airalogy built-in type: CodeStr (toml). Strings of this type contain toml source code and are rendered in an editor with toml syntax highlighting."},"YamlStr":{"type_name":"YamlStr","import_from":"airalogy.types","storage_kind":"scalar","ui_kind":"code","type":"string","description":"Airalogy built-in type: CodeStr (yaml). Strings of this type contain yaml source code and are rendered in an editor with yaml syntax highlighting."},"ATCG":{"type_name":"ATCG","import_from":"airalogy.types","storage_kind":"scalar","ui_kind":"dna-text","type":"string"},"DNASequence":{"type_name":"DNASequence","import_from":"airalogy.types","storage_kind":"structured","ui_kind":"dna-sequence","type":"object","title":"DNASequence","description":"Structured DNA sequence value used by Airalogy\'s dedicated sequence editor.\\n\\nThis model intentionally stays simpler than full GenBank flatfiles while\\npreserving the core pieces needed for practical import/export alignment:\\nmulti-segment feature locations, partial flags, and qualifier rows."},"SnakeStr":{"type_name":"SnakeStr","import_from":"airalogy.types","storage_kind":"scalar","type":"string"},"VersionStr":{"type_name":"VersionStr","import_from":"airalogy.types","storage_kind":"scalar","type":"string"},"ProtocolId":{"type_name":"ProtocolId","import_from":"airalogy.types","storage_kind":"scalar","type":"string"}}'), ss = {
|
|
3
|
+
types: is
|
|
4
|
+
}, rs = ss, ns = Object.fromEntries(
|
|
5
|
+
Object.values(rs.types).flatMap((e) => [
|
|
6
|
+
[e.type_name, e],
|
|
7
|
+
...(e.aliases ?? []).map((t) => [t, e])
|
|
8
|
+
])
|
|
9
|
+
), as = /* @__PURE__ */ new Set(["None", "none", "null", "Null", "undefined"]);
|
|
10
|
+
function os(e) {
|
|
11
|
+
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
|
|
12
|
+
}
|
|
13
|
+
function us(e) {
|
|
14
|
+
return Array.isArray(e) ? e.filter(os) : [];
|
|
15
|
+
}
|
|
16
|
+
function ls(e) {
|
|
17
|
+
const t = e.trim();
|
|
18
|
+
if (!/^(?:(?:typing|typing_extensions|airalogy\.types)\.)?[A-Za-z_][A-Za-z0-9_]*$/.test(t))
|
|
19
|
+
return;
|
|
20
|
+
const i = t.split(".");
|
|
21
|
+
return i[i.length - 1];
|
|
22
|
+
}
|
|
23
|
+
function cs(e) {
|
|
24
|
+
const t = [];
|
|
25
|
+
let i = "", s = 0;
|
|
26
|
+
for (const n of e) {
|
|
27
|
+
if (n === "[") {
|
|
28
|
+
s += 1, i += n;
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
if (n === "]") {
|
|
32
|
+
s = Math.max(0, s - 1), i += n;
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if (n === "|" && s === 0) {
|
|
36
|
+
const o = i.trim();
|
|
37
|
+
o && t.push(o), i = "";
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
i += n;
|
|
41
|
+
}
|
|
42
|
+
const r = i.trim();
|
|
43
|
+
return r && t.push(r), t;
|
|
44
|
+
}
|
|
45
|
+
function hs(e) {
|
|
46
|
+
const t = e.trim().match(/^(?:(?:typing|typing_extensions)\.)?Optional\s*\[([\s\S]+)\]$/);
|
|
47
|
+
return t ? t[1].trim() : e.trim();
|
|
48
|
+
}
|
|
49
|
+
function fs(e) {
|
|
50
|
+
if (!e)
|
|
51
|
+
return;
|
|
52
|
+
const t = hs(e), i = cs(t), s = (i.length > 0 ? i : [t]).map(ls).filter((r) => typeof r == "string" && !as.has(r));
|
|
53
|
+
return s.length === 1 ? s[0] : void 0;
|
|
54
|
+
}
|
|
55
|
+
function ps(e) {
|
|
56
|
+
const t = fs(e);
|
|
57
|
+
return t ? ns[t] : void 0;
|
|
58
|
+
}
|
|
59
|
+
function ds(e) {
|
|
60
|
+
return us(ps(e)?.enum);
|
|
61
|
+
}
|
|
62
|
+
var ms = [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], Zt = [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], gs = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", ei = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", ct = {
|
|
3
63
|
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",
|
|
4
64
|
5: "class enum extends super const export import",
|
|
5
65
|
6: "enum",
|
|
6
66
|
strict: "implements interface let package private protected public static yield",
|
|
7
67
|
strictBind: "eval arguments"
|
|
8
|
-
},
|
|
9
|
-
5:
|
|
10
|
-
"5module":
|
|
11
|
-
6:
|
|
12
|
-
},
|
|
13
|
-
function
|
|
68
|
+
}, ht = "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", ys = {
|
|
69
|
+
5: ht,
|
|
70
|
+
"5module": ht + " export import",
|
|
71
|
+
6: ht + " const class extends export import super"
|
|
72
|
+
}, bs = /^in(stanceof)?$/, xs = new RegExp("[" + ei + "]"), vs = new RegExp("[" + ei + gs + "]");
|
|
73
|
+
function gt(e, t) {
|
|
14
74
|
for (var i = 65536, s = 0; s < t.length; s += 2) {
|
|
15
75
|
if (i += t[s], i > e)
|
|
16
76
|
return !1;
|
|
@@ -19,28 +79,28 @@ function mt(e, t) {
|
|
|
19
79
|
}
|
|
20
80
|
return !1;
|
|
21
81
|
}
|
|
22
|
-
function
|
|
23
|
-
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
82
|
+
function Q(e, t) {
|
|
83
|
+
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && xs.test(String.fromCharCode(e)) : t === !1 ? !1 : gt(e, Zt);
|
|
24
84
|
}
|
|
25
|
-
function
|
|
26
|
-
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 &&
|
|
85
|
+
function oe(e, t) {
|
|
86
|
+
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 && vs.test(String.fromCharCode(e)) : t === !1 ? !1 : gt(e, Zt) || gt(e, ms);
|
|
27
87
|
}
|
|
28
88
|
var C = function(t, i) {
|
|
29
89
|
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;
|
|
30
90
|
};
|
|
31
|
-
function
|
|
91
|
+
function G(e, t) {
|
|
32
92
|
return new C(e, { beforeExpr: !0, binop: t });
|
|
33
93
|
}
|
|
34
|
-
var W = { beforeExpr: !0 },
|
|
35
|
-
function
|
|
94
|
+
var W = { beforeExpr: !0 }, D = { startsExpr: !0 }, kt = {};
|
|
95
|
+
function k(e, t) {
|
|
36
96
|
return t === void 0 && (t = {}), t.keyword = e, kt[e] = new C(e, t);
|
|
37
97
|
}
|
|
38
98
|
var a = {
|
|
39
|
-
num: new C("num",
|
|
40
|
-
regexp: new C("regexp",
|
|
41
|
-
string: new C("string",
|
|
42
|
-
name: new C("name",
|
|
43
|
-
privateId: new C("privateId",
|
|
99
|
+
num: new C("num", D),
|
|
100
|
+
regexp: new C("regexp", D),
|
|
101
|
+
string: new C("string", D),
|
|
102
|
+
name: new C("name", D),
|
|
103
|
+
privateId: new C("privateId", D),
|
|
44
104
|
eof: new C("eof"),
|
|
45
105
|
// Punctuation token types.
|
|
46
106
|
bracketL: new C("[", { beforeExpr: !0, startsExpr: !0 }),
|
|
@@ -59,7 +119,7 @@ var a = {
|
|
|
59
119
|
template: new C("template"),
|
|
60
120
|
invalidTemplate: new C("invalidTemplate"),
|
|
61
121
|
ellipsis: new C("...", W),
|
|
62
|
-
backQuote: new C("`",
|
|
122
|
+
backQuote: new C("`", D),
|
|
63
123
|
dollarBraceL: new C("${", { beforeExpr: !0, startsExpr: !0 }),
|
|
64
124
|
// Operators. These carry several kinds of properties to help the
|
|
65
125
|
// parser use them properly (the presence of these properties is
|
|
@@ -78,98 +138,98 @@ var a = {
|
|
|
78
138
|
assign: new C("_=", { beforeExpr: !0, isAssign: !0 }),
|
|
79
139
|
incDec: new C("++/--", { prefix: !0, postfix: !0, startsExpr: !0 }),
|
|
80
140
|
prefix: new C("!/~", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
81
|
-
logicalOR:
|
|
82
|
-
logicalAND:
|
|
83
|
-
bitwiseOR:
|
|
84
|
-
bitwiseXOR:
|
|
85
|
-
bitwiseAND:
|
|
86
|
-
equality:
|
|
87
|
-
relational:
|
|
88
|
-
bitShift:
|
|
141
|
+
logicalOR: G("||", 1),
|
|
142
|
+
logicalAND: G("&&", 2),
|
|
143
|
+
bitwiseOR: G("|", 3),
|
|
144
|
+
bitwiseXOR: G("^", 4),
|
|
145
|
+
bitwiseAND: G("&", 5),
|
|
146
|
+
equality: G("==/!=/===/!==", 6),
|
|
147
|
+
relational: G("</>/<=/>=", 7),
|
|
148
|
+
bitShift: G("<</>>/>>>", 8),
|
|
89
149
|
plusMin: new C("+/-", { beforeExpr: !0, binop: 9, prefix: !0, startsExpr: !0 }),
|
|
90
|
-
modulo:
|
|
91
|
-
star:
|
|
92
|
-
slash:
|
|
150
|
+
modulo: G("%", 10),
|
|
151
|
+
star: G("*", 10),
|
|
152
|
+
slash: G("/", 10),
|
|
93
153
|
starstar: new C("**", { beforeExpr: !0 }),
|
|
94
|
-
coalesce:
|
|
154
|
+
coalesce: G("??", 1),
|
|
95
155
|
// Keyword token types.
|
|
96
|
-
_break:
|
|
97
|
-
_case:
|
|
98
|
-
_catch:
|
|
99
|
-
_continue:
|
|
100
|
-
_debugger:
|
|
101
|
-
_default:
|
|
102
|
-
_do:
|
|
103
|
-
_else:
|
|
104
|
-
_finally:
|
|
105
|
-
_for:
|
|
106
|
-
_function:
|
|
107
|
-
_if:
|
|
108
|
-
_return:
|
|
109
|
-
_switch:
|
|
110
|
-
_throw:
|
|
111
|
-
_try:
|
|
112
|
-
_var:
|
|
113
|
-
_const:
|
|
114
|
-
_while:
|
|
115
|
-
_with:
|
|
116
|
-
_new:
|
|
117
|
-
_this:
|
|
118
|
-
_super:
|
|
119
|
-
_class:
|
|
120
|
-
_extends:
|
|
121
|
-
_export:
|
|
122
|
-
_import:
|
|
123
|
-
_null:
|
|
124
|
-
_true:
|
|
125
|
-
_false:
|
|
126
|
-
_in:
|
|
127
|
-
_instanceof:
|
|
128
|
-
_typeof:
|
|
129
|
-
_void:
|
|
130
|
-
_delete:
|
|
131
|
-
},
|
|
132
|
-
function
|
|
156
|
+
_break: k("break"),
|
|
157
|
+
_case: k("case", W),
|
|
158
|
+
_catch: k("catch"),
|
|
159
|
+
_continue: k("continue"),
|
|
160
|
+
_debugger: k("debugger"),
|
|
161
|
+
_default: k("default", W),
|
|
162
|
+
_do: k("do", { isLoop: !0, beforeExpr: !0 }),
|
|
163
|
+
_else: k("else", W),
|
|
164
|
+
_finally: k("finally"),
|
|
165
|
+
_for: k("for", { isLoop: !0 }),
|
|
166
|
+
_function: k("function", D),
|
|
167
|
+
_if: k("if"),
|
|
168
|
+
_return: k("return", W),
|
|
169
|
+
_switch: k("switch"),
|
|
170
|
+
_throw: k("throw", W),
|
|
171
|
+
_try: k("try"),
|
|
172
|
+
_var: k("var"),
|
|
173
|
+
_const: k("const"),
|
|
174
|
+
_while: k("while", { isLoop: !0 }),
|
|
175
|
+
_with: k("with"),
|
|
176
|
+
_new: k("new", { beforeExpr: !0, startsExpr: !0 }),
|
|
177
|
+
_this: k("this", D),
|
|
178
|
+
_super: k("super", D),
|
|
179
|
+
_class: k("class", D),
|
|
180
|
+
_extends: k("extends", W),
|
|
181
|
+
_export: k("export"),
|
|
182
|
+
_import: k("import", D),
|
|
183
|
+
_null: k("null", D),
|
|
184
|
+
_true: k("true", D),
|
|
185
|
+
_false: k("false", D),
|
|
186
|
+
_in: k("in", { beforeExpr: !0, binop: 7 }),
|
|
187
|
+
_instanceof: k("instanceof", { beforeExpr: !0, binop: 7 }),
|
|
188
|
+
_typeof: k("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
189
|
+
_void: k("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
190
|
+
_delete: k("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
191
|
+
}, B = /\r\n?|\n|\u2028|\u2029/, _s = new RegExp(B.source, "g");
|
|
192
|
+
function _e(e) {
|
|
133
193
|
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
134
194
|
}
|
|
135
|
-
function
|
|
195
|
+
function ti(e, t, i) {
|
|
136
196
|
i === void 0 && (i = e.length);
|
|
137
197
|
for (var s = t; s < i; s++) {
|
|
138
198
|
var r = e.charCodeAt(s);
|
|
139
|
-
if (
|
|
199
|
+
if (_e(r))
|
|
140
200
|
return s < i - 1 && r === 13 && e.charCodeAt(s + 1) === 10 ? s + 2 : s + 1;
|
|
141
201
|
}
|
|
142
202
|
return -1;
|
|
143
203
|
}
|
|
144
|
-
var
|
|
145
|
-
return
|
|
146
|
-
}),
|
|
147
|
-
return
|
|
148
|
-
}),
|
|
149
|
-
function
|
|
150
|
-
return
|
|
204
|
+
var ii = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, R = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, si = Object.prototype, Ss = si.hasOwnProperty, ks = si.toString, Se = Object.hasOwn || (function(e, t) {
|
|
205
|
+
return Ss.call(e, t);
|
|
206
|
+
}), Ut = Array.isArray || (function(e) {
|
|
207
|
+
return ks.call(e) === "[object Array]";
|
|
208
|
+
}), qt = /* @__PURE__ */ Object.create(null);
|
|
209
|
+
function ae(e) {
|
|
210
|
+
return qt[e] || (qt[e] = new RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
|
|
151
211
|
}
|
|
152
|
-
function
|
|
212
|
+
function ie(e) {
|
|
153
213
|
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320));
|
|
154
214
|
}
|
|
155
|
-
var
|
|
215
|
+
var ws = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, Ne = function(t, i) {
|
|
156
216
|
this.line = t, this.column = i;
|
|
157
217
|
};
|
|
158
|
-
|
|
159
|
-
return new
|
|
218
|
+
Ne.prototype.offset = function(t) {
|
|
219
|
+
return new Ne(this.line, this.column + t);
|
|
160
220
|
};
|
|
161
|
-
var
|
|
221
|
+
var Xe = function(t, i, s) {
|
|
162
222
|
this.start = i, this.end = s, t.sourceFile !== null && (this.source = t.sourceFile);
|
|
163
223
|
};
|
|
164
|
-
function
|
|
224
|
+
function ri(e, t) {
|
|
165
225
|
for (var i = 1, s = 0; ; ) {
|
|
166
|
-
var r =
|
|
226
|
+
var r = ti(e, s, t);
|
|
167
227
|
if (r < 0)
|
|
168
|
-
return new
|
|
228
|
+
return new Ne(i, t - s);
|
|
169
229
|
++i, s = r;
|
|
170
230
|
}
|
|
171
231
|
}
|
|
172
|
-
var
|
|
232
|
+
var yt = {
|
|
173
233
|
// `ecmaVersion` indicates the ECMAScript version to parse. Must be
|
|
174
234
|
// either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
|
|
175
235
|
// (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
|
|
@@ -265,21 +325,21 @@ var gt = {
|
|
|
265
325
|
// When enabled, parenthesized expressions are represented by
|
|
266
326
|
// (non-standard) ParenthesizedExpression nodes
|
|
267
327
|
preserveParens: !1
|
|
268
|
-
},
|
|
269
|
-
function
|
|
328
|
+
}, Gt = !1;
|
|
329
|
+
function Cs(e) {
|
|
270
330
|
var t = {};
|
|
271
|
-
for (var i in
|
|
272
|
-
t[i] = e && Se(e, i) ? e[i] :
|
|
273
|
-
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!
|
|
274
|
-
Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved == null && (t.allowReserved = t.ecmaVersion < 5), (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14),
|
|
331
|
+
for (var i in yt)
|
|
332
|
+
t[i] = e && Se(e, i) ? e[i] : yt[i];
|
|
333
|
+
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!Gt && typeof console == "object" && console.warn && (Gt = !0, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
334
|
+
Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved == null && (t.allowReserved = t.ecmaVersion < 5), (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14), Ut(t.onToken)) {
|
|
275
335
|
var s = t.onToken;
|
|
276
336
|
t.onToken = function(r) {
|
|
277
337
|
return s.push(r);
|
|
278
338
|
};
|
|
279
339
|
}
|
|
280
|
-
return
|
|
340
|
+
return Ut(t.onComment) && (t.onComment = As(t, t.onComment)), t;
|
|
281
341
|
}
|
|
282
|
-
function
|
|
342
|
+
function As(e, t) {
|
|
283
343
|
return function(i, s, r, n, o, l) {
|
|
284
344
|
var u = {
|
|
285
345
|
type: i ? "Block" : "Line",
|
|
@@ -287,95 +347,95 @@ function fs(e, t) {
|
|
|
287
347
|
start: r,
|
|
288
348
|
end: n
|
|
289
349
|
};
|
|
290
|
-
e.locations && (u.loc = new
|
|
350
|
+
e.locations && (u.loc = new Xe(this, o, l)), e.ranges && (u.range = [r, n]), t.push(u);
|
|
291
351
|
};
|
|
292
352
|
}
|
|
293
|
-
var
|
|
294
|
-
function
|
|
295
|
-
return ke | (e ? wt : 0) | (t ?
|
|
353
|
+
var Pe = 1, ke = 2, wt = 4, ni = 8, Ct = 16, ai = 32, Ye = 64, oi = 128, de = 256, Oe = 512, Ze = Pe | ke | de;
|
|
354
|
+
function At(e, t) {
|
|
355
|
+
return ke | (e ? wt : 0) | (t ? ni : 0);
|
|
296
356
|
}
|
|
297
|
-
var
|
|
298
|
-
this.options = t =
|
|
357
|
+
var Ge = 0, Et = 1, re = 2, ui = 3, li = 4, ci = 5, V = function(t, i, s) {
|
|
358
|
+
this.options = t = Cs(t), this.sourceFile = t.sourceFile, this.keywords = ae(ys[t.ecmaVersion >= 6 ? 6 : t.sourceType === "module" ? "5module" : 5]);
|
|
299
359
|
var r = "";
|
|
300
|
-
t.allowReserved !== !0 && (r =
|
|
301
|
-
var n = (r ? r + " " : "") +
|
|
302
|
-
this.reservedWordsStrict =
|
|
303
|
-
`, s - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(
|
|
304
|
-
},
|
|
305
|
-
|
|
360
|
+
t.allowReserved !== !0 && (r = ct[t.ecmaVersion >= 6 ? 6 : t.ecmaVersion === 5 ? 5 : 3], t.sourceType === "module" && (r += " await")), this.reservedWords = ae(r);
|
|
361
|
+
var n = (r ? r + " " : "") + ct.strict;
|
|
362
|
+
this.reservedWordsStrict = ae(n), this.reservedWordsStrictBind = ae(n + " " + ct.strictBind), this.input = String(i), this.containsEsc = !1, s ? (this.pos = s, this.lineStart = this.input.lastIndexOf(`
|
|
363
|
+
`, s - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(B).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = a.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = t.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = /* @__PURE__ */ Object.create(null), this.pos === 0 && t.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(Pe), this.regexpState = null, this.privateNameStack = [];
|
|
364
|
+
}, X = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, canAwait: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 }, allowNewDotTarget: { configurable: !0 }, inClassStaticBlock: { configurable: !0 } };
|
|
365
|
+
V.prototype.parse = function() {
|
|
306
366
|
var t = this.options.program || this.startNode();
|
|
307
367
|
return this.nextToken(), this.parseTopLevel(t);
|
|
308
368
|
};
|
|
309
|
-
|
|
369
|
+
X.inFunction.get = function() {
|
|
310
370
|
return (this.currentVarScope().flags & ke) > 0;
|
|
311
371
|
};
|
|
312
|
-
|
|
313
|
-
return (this.currentVarScope().flags &
|
|
372
|
+
X.inGenerator.get = function() {
|
|
373
|
+
return (this.currentVarScope().flags & ni) > 0;
|
|
314
374
|
};
|
|
315
|
-
|
|
375
|
+
X.inAsync.get = function() {
|
|
316
376
|
return (this.currentVarScope().flags & wt) > 0;
|
|
317
377
|
};
|
|
318
|
-
|
|
378
|
+
X.canAwait.get = function() {
|
|
319
379
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
320
380
|
var t = this.scopeStack[e], i = t.flags;
|
|
321
|
-
if (i & (
|
|
381
|
+
if (i & (de | Oe))
|
|
322
382
|
return !1;
|
|
323
383
|
if (i & ke)
|
|
324
384
|
return (i & wt) > 0;
|
|
325
385
|
}
|
|
326
386
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
327
387
|
};
|
|
328
|
-
|
|
388
|
+
X.allowSuper.get = function() {
|
|
329
389
|
var e = this.currentThisScope(), t = e.flags;
|
|
330
390
|
return (t & Ye) > 0 || this.options.allowSuperOutsideMethod;
|
|
331
391
|
};
|
|
332
|
-
|
|
333
|
-
return (this.currentThisScope().flags &
|
|
392
|
+
X.allowDirectSuper.get = function() {
|
|
393
|
+
return (this.currentThisScope().flags & oi) > 0;
|
|
334
394
|
};
|
|
335
|
-
|
|
395
|
+
X.treatFunctionsAsVar.get = function() {
|
|
336
396
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
337
397
|
};
|
|
338
|
-
|
|
398
|
+
X.allowNewDotTarget.get = function() {
|
|
339
399
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
340
400
|
var t = this.scopeStack[e], i = t.flags;
|
|
341
|
-
if (i & (
|
|
401
|
+
if (i & (de | Oe) || i & ke && !(i & Ct))
|
|
342
402
|
return !0;
|
|
343
403
|
}
|
|
344
404
|
return !1;
|
|
345
405
|
};
|
|
346
|
-
|
|
347
|
-
return (this.currentVarScope().flags &
|
|
406
|
+
X.inClassStaticBlock.get = function() {
|
|
407
|
+
return (this.currentVarScope().flags & de) > 0;
|
|
348
408
|
};
|
|
349
|
-
|
|
409
|
+
V.extend = function() {
|
|
350
410
|
for (var t = [], i = arguments.length; i--; ) t[i] = arguments[i];
|
|
351
411
|
for (var s = this, r = 0; r < t.length; r++)
|
|
352
412
|
s = t[r](s);
|
|
353
413
|
return s;
|
|
354
414
|
};
|
|
355
|
-
|
|
415
|
+
V.parse = function(t, i) {
|
|
356
416
|
return new this(i, t).parse();
|
|
357
417
|
};
|
|
358
|
-
|
|
418
|
+
V.parseExpressionAt = function(t, i, s) {
|
|
359
419
|
var r = new this(s, t, i);
|
|
360
420
|
return r.nextToken(), r.parseExpression();
|
|
361
421
|
};
|
|
362
|
-
|
|
422
|
+
V.tokenizer = function(t, i) {
|
|
363
423
|
return new this(i, t);
|
|
364
424
|
};
|
|
365
|
-
Object.defineProperties(
|
|
366
|
-
var M =
|
|
425
|
+
Object.defineProperties(V.prototype, X);
|
|
426
|
+
var M = V.prototype, Es = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
367
427
|
M.strictDirective = function(e) {
|
|
368
428
|
if (this.options.ecmaVersion < 5)
|
|
369
429
|
return !1;
|
|
370
430
|
for (; ; ) {
|
|
371
431
|
R.lastIndex = e, e += R.exec(this.input)[0].length;
|
|
372
|
-
var t =
|
|
432
|
+
var t = Es.exec(this.input.slice(e));
|
|
373
433
|
if (!t)
|
|
374
434
|
return !1;
|
|
375
435
|
if ((t[1] || t[2]) === "use strict") {
|
|
376
436
|
R.lastIndex = e + t[0].length;
|
|
377
437
|
var i = R.exec(this.input), s = i.index + i[0].length, r = this.input.charAt(s);
|
|
378
|
-
return r === ";" || r === "}" ||
|
|
438
|
+
return r === ";" || r === "}" || B.test(i[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(r) || r === "!" && this.input.charAt(s + 1) === "=");
|
|
379
439
|
}
|
|
380
440
|
e += t[0].length, R.lastIndex = e, e += R.exec(this.input)[0].length, this.input[e] === ";" && e++;
|
|
381
441
|
}
|
|
@@ -393,7 +453,7 @@ M.expectContextual = function(e) {
|
|
|
393
453
|
this.eatContextual(e) || this.unexpected();
|
|
394
454
|
};
|
|
395
455
|
M.canInsertSemicolon = function() {
|
|
396
|
-
return this.type === a.eof || this.type === a.braceR ||
|
|
456
|
+
return this.type === a.eof || this.type === a.braceR || B.test(this.input.slice(this.lastTokEnd, this.start));
|
|
397
457
|
};
|
|
398
458
|
M.insertSemicolon = function() {
|
|
399
459
|
if (this.canInsertSemicolon())
|
|
@@ -412,7 +472,7 @@ M.expect = function(e) {
|
|
|
412
472
|
M.unexpected = function(e) {
|
|
413
473
|
this.raise(e ?? this.start, "Unexpected token");
|
|
414
474
|
};
|
|
415
|
-
var
|
|
475
|
+
var et = function() {
|
|
416
476
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
417
477
|
};
|
|
418
478
|
M.checkPatternErrors = function(e, t) {
|
|
@@ -436,8 +496,8 @@ M.checkYieldAwaitInDefaultParams = function() {
|
|
|
436
496
|
M.isSimpleAssignTarget = function(e) {
|
|
437
497
|
return e.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(e.expression) : e.type === "Identifier" || e.type === "MemberExpression";
|
|
438
498
|
};
|
|
439
|
-
var
|
|
440
|
-
|
|
499
|
+
var y = V.prototype;
|
|
500
|
+
y.parseTopLevel = function(e) {
|
|
441
501
|
var t = /* @__PURE__ */ Object.create(null);
|
|
442
502
|
for (e.body || (e.body = []); this.type !== a.eof; ) {
|
|
443
503
|
var i = this.parseStatement(null, !0, t);
|
|
@@ -450,8 +510,8 @@ g.parseTopLevel = function(e) {
|
|
|
450
510
|
}
|
|
451
511
|
return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType, this.finishNode(e, "Program");
|
|
452
512
|
};
|
|
453
|
-
var
|
|
454
|
-
|
|
513
|
+
var It = { kind: "loop" }, Is = { kind: "switch" };
|
|
514
|
+
y.isLet = function(e) {
|
|
455
515
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
|
|
456
516
|
return !1;
|
|
457
517
|
R.lastIndex = this.pos;
|
|
@@ -462,55 +522,55 @@ g.isLet = function(e) {
|
|
|
462
522
|
return !1;
|
|
463
523
|
if (s === 123 || s > 55295 && s < 56320)
|
|
464
524
|
return !0;
|
|
465
|
-
if (
|
|
466
|
-
for (var r = i + 1;
|
|
525
|
+
if (Q(s, !0)) {
|
|
526
|
+
for (var r = i + 1; oe(s = this.input.charCodeAt(r), !0); )
|
|
467
527
|
++r;
|
|
468
528
|
if (s === 92 || s > 55295 && s < 56320)
|
|
469
529
|
return !0;
|
|
470
530
|
var n = this.input.slice(i, r);
|
|
471
|
-
if (!
|
|
531
|
+
if (!bs.test(n))
|
|
472
532
|
return !0;
|
|
473
533
|
}
|
|
474
534
|
return !1;
|
|
475
535
|
};
|
|
476
|
-
|
|
536
|
+
y.isAsyncFunction = function() {
|
|
477
537
|
if (this.options.ecmaVersion < 8 || !this.isContextual("async"))
|
|
478
538
|
return !1;
|
|
479
539
|
R.lastIndex = this.pos;
|
|
480
540
|
var e = R.exec(this.input), t = this.pos + e[0].length, i;
|
|
481
|
-
return !
|
|
541
|
+
return !B.test(this.input.slice(this.pos, t)) && this.input.slice(t, t + 8) === "function" && (t + 8 === this.input.length || !(oe(i = this.input.charCodeAt(t + 8)) || i > 55295 && i < 56320));
|
|
482
542
|
};
|
|
483
|
-
|
|
543
|
+
y.isUsingKeyword = function(e, t) {
|
|
484
544
|
if (this.options.ecmaVersion < 17 || !this.isContextual(e ? "await" : "using"))
|
|
485
545
|
return !1;
|
|
486
546
|
R.lastIndex = this.pos;
|
|
487
547
|
var i = R.exec(this.input), s = this.pos + i[0].length;
|
|
488
|
-
if (
|
|
548
|
+
if (B.test(this.input.slice(this.pos, s)))
|
|
489
549
|
return !1;
|
|
490
550
|
if (e) {
|
|
491
551
|
var r = s + 5, n;
|
|
492
|
-
if (this.input.slice(s, r) !== "using" || r === this.input.length ||
|
|
552
|
+
if (this.input.slice(s, r) !== "using" || r === this.input.length || oe(n = this.input.charCodeAt(r)) || n > 55295 && n < 56320)
|
|
493
553
|
return !1;
|
|
494
554
|
R.lastIndex = r;
|
|
495
555
|
var o = R.exec(this.input);
|
|
496
|
-
if (o &&
|
|
556
|
+
if (o && B.test(this.input.slice(r, r + o[0].length)))
|
|
497
557
|
return !1;
|
|
498
558
|
}
|
|
499
559
|
if (t) {
|
|
500
560
|
var l = s + 2, u;
|
|
501
|
-
if (this.input.slice(s, l) === "of" && (l === this.input.length || !
|
|
561
|
+
if (this.input.slice(s, l) === "of" && (l === this.input.length || !oe(u = this.input.charCodeAt(l)) && !(u > 55295 && u < 56320)))
|
|
502
562
|
return !1;
|
|
503
563
|
}
|
|
504
564
|
var c = this.input.charCodeAt(s);
|
|
505
|
-
return
|
|
565
|
+
return Q(c, !0) || c === 92;
|
|
506
566
|
};
|
|
507
|
-
|
|
567
|
+
y.isAwaitUsing = function(e) {
|
|
508
568
|
return this.isUsingKeyword(!0, e);
|
|
509
569
|
};
|
|
510
|
-
|
|
570
|
+
y.isUsing = function(e) {
|
|
511
571
|
return this.isUsingKeyword(!1, e);
|
|
512
572
|
};
|
|
513
|
-
|
|
573
|
+
y.parseStatement = function(e, t, i) {
|
|
514
574
|
var s = this.type, r = this.startNode(), n;
|
|
515
575
|
switch (this.isLet(e) && (s = a._var, n = "let"), s) {
|
|
516
576
|
case a._break:
|
|
@@ -567,11 +627,11 @@ g.parseStatement = function(e, t, i) {
|
|
|
567
627
|
var c = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null;
|
|
568
628
|
if (c)
|
|
569
629
|
return t && this.options.sourceType === "script" && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), c === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(r, !1, c), this.semicolon(), this.finishNode(r, "VariableDeclaration");
|
|
570
|
-
var
|
|
571
|
-
return s === a.name &&
|
|
630
|
+
var p = this.value, f = this.parseExpression();
|
|
631
|
+
return s === a.name && f.type === "Identifier" && this.eat(a.colon) ? this.parseLabeledStatement(r, p, f, e) : this.parseExpressionStatement(r, f);
|
|
572
632
|
}
|
|
573
633
|
};
|
|
574
|
-
|
|
634
|
+
y.parseBreakContinueStatement = function(e, t) {
|
|
575
635
|
var i = t === "break";
|
|
576
636
|
this.next(), this.eat(a.semi) || this.insertSemicolon() ? e.label = null : this.type !== a.name ? this.unexpected() : (e.label = this.parseIdent(), this.semicolon());
|
|
577
637
|
for (var s = 0; s < this.labels.length; ++s) {
|
|
@@ -581,16 +641,16 @@ g.parseBreakContinueStatement = function(e, t) {
|
|
|
581
641
|
}
|
|
582
642
|
return s === this.labels.length && this.raise(e.start, "Unsyntactic " + t), this.finishNode(e, i ? "BreakStatement" : "ContinueStatement");
|
|
583
643
|
};
|
|
584
|
-
|
|
644
|
+
y.parseDebuggerStatement = function(e) {
|
|
585
645
|
return this.next(), this.semicolon(), this.finishNode(e, "DebuggerStatement");
|
|
586
646
|
};
|
|
587
|
-
|
|
588
|
-
return this.next(), this.labels.push(
|
|
647
|
+
y.parseDoStatement = function(e) {
|
|
648
|
+
return this.next(), this.labels.push(It), e.body = this.parseStatement("do"), this.labels.pop(), this.expect(a._while), e.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(a.semi) : this.semicolon(), this.finishNode(e, "DoWhileStatement");
|
|
589
649
|
};
|
|
590
|
-
|
|
650
|
+
y.parseForStatement = function(e) {
|
|
591
651
|
this.next();
|
|
592
652
|
var t = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
593
|
-
if (this.labels.push(
|
|
653
|
+
if (this.labels.push(It), this.enterScope(0), this.expect(a.parenL), this.type === a.semi)
|
|
594
654
|
return t > -1 && this.unexpected(t), this.parseFor(e, null);
|
|
595
655
|
var i = this.isLet();
|
|
596
656
|
if (this.type === a._var || this.type === a._const || i) {
|
|
@@ -602,23 +662,23 @@ g.parseForStatement = function(e) {
|
|
|
602
662
|
var u = this.startNode();
|
|
603
663
|
return this.next(), l === "await using" && this.next(), this.parseVar(u, !0, l), this.finishNode(u, "VariableDeclaration"), this.parseForAfterInit(e, u, t);
|
|
604
664
|
}
|
|
605
|
-
var c = this.containsEsc,
|
|
606
|
-
return this.type === a._in || (o = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === a._in && this.unexpected(t), e.await = !0) : o && this.options.ecmaVersion >= 8 && (
|
|
665
|
+
var c = this.containsEsc, p = new et(), f = this.start, h = t > -1 ? this.parseExprSubscripts(p, "await") : this.parseExpression(!0, p);
|
|
666
|
+
return this.type === a._in || (o = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === a._in && this.unexpected(t), e.await = !0) : o && this.options.ecmaVersion >= 8 && (h.start === f && !c && h.type === "Identifier" && h.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = !1)), n && o && this.raise(h.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(h, !1, p), this.checkLValPattern(h), this.parseForIn(e, h)) : (this.checkExpressionErrors(p, !0), t > -1 && this.unexpected(t), this.parseFor(e, h));
|
|
607
667
|
};
|
|
608
|
-
|
|
668
|
+
y.parseForAfterInit = function(e, t, i) {
|
|
609
669
|
return (this.type === a._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && t.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === a._in ? i > -1 && this.unexpected(i) : e.await = i > -1), this.parseForIn(e, t)) : (i > -1 && this.unexpected(i), this.parseFor(e, t));
|
|
610
670
|
};
|
|
611
|
-
|
|
612
|
-
return this.next(), this.parseFunction(e,
|
|
671
|
+
y.parseFunctionStatement = function(e, t, i) {
|
|
672
|
+
return this.next(), this.parseFunction(e, Ae | (i ? 0 : bt), !1, t);
|
|
613
673
|
};
|
|
614
|
-
|
|
674
|
+
y.parseIfStatement = function(e) {
|
|
615
675
|
return this.next(), e.test = this.parseParenExpression(), e.consequent = this.parseStatement("if"), e.alternate = this.eat(a._else) ? this.parseStatement("if") : null, this.finishNode(e, "IfStatement");
|
|
616
676
|
};
|
|
617
|
-
|
|
677
|
+
y.parseReturnStatement = function(e) {
|
|
618
678
|
return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(a.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()), this.finishNode(e, "ReturnStatement");
|
|
619
679
|
};
|
|
620
|
-
|
|
621
|
-
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(a.braceL), this.labels.push(
|
|
680
|
+
y.parseSwitchStatement = function(e) {
|
|
681
|
+
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(a.braceL), this.labels.push(Is), this.enterScope(0);
|
|
622
682
|
for (var t, i = !1; this.type !== a.braceR; )
|
|
623
683
|
if (this.type === a._case || this.type === a._default) {
|
|
624
684
|
var s = this.type === a._case;
|
|
@@ -627,34 +687,34 @@ g.parseSwitchStatement = function(e) {
|
|
|
627
687
|
t || this.unexpected(), t.consequent.push(this.parseStatement(null));
|
|
628
688
|
return this.exitScope(), t && this.finishNode(t, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(e, "SwitchStatement");
|
|
629
689
|
};
|
|
630
|
-
|
|
631
|
-
return this.next(),
|
|
690
|
+
y.parseThrowStatement = function(e) {
|
|
691
|
+
return this.next(), B.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");
|
|
632
692
|
};
|
|
633
|
-
var
|
|
634
|
-
|
|
693
|
+
var Ns = [];
|
|
694
|
+
y.parseCatchClauseParam = function() {
|
|
635
695
|
var e = this.parseBindingAtom(), t = e.type === "Identifier";
|
|
636
|
-
return this.enterScope(t ?
|
|
696
|
+
return this.enterScope(t ? ai : 0), this.checkLValPattern(e, t ? li : re), this.expect(a.parenR), e;
|
|
637
697
|
};
|
|
638
|
-
|
|
698
|
+
y.parseTryStatement = function(e) {
|
|
639
699
|
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === a._catch) {
|
|
640
700
|
var t = this.startNode();
|
|
641
701
|
this.next(), this.eat(a.parenL) ? t.param = this.parseCatchClauseParam() : (this.options.ecmaVersion < 10 && this.unexpected(), t.param = null, this.enterScope(0)), t.body = this.parseBlock(!1), this.exitScope(), e.handler = this.finishNode(t, "CatchClause");
|
|
642
702
|
}
|
|
643
703
|
return e.finalizer = this.eat(a._finally) ? this.parseBlock() : null, !e.handler && !e.finalizer && this.raise(e.start, "Missing catch or finally clause"), this.finishNode(e, "TryStatement");
|
|
644
704
|
};
|
|
645
|
-
|
|
705
|
+
y.parseVarStatement = function(e, t, i) {
|
|
646
706
|
return this.next(), this.parseVar(e, !1, t, i), this.semicolon(), this.finishNode(e, "VariableDeclaration");
|
|
647
707
|
};
|
|
648
|
-
|
|
649
|
-
return this.next(), e.test = this.parseParenExpression(), this.labels.push(
|
|
708
|
+
y.parseWhileStatement = function(e) {
|
|
709
|
+
return this.next(), e.test = this.parseParenExpression(), this.labels.push(It), e.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(e, "WhileStatement");
|
|
650
710
|
};
|
|
651
|
-
|
|
711
|
+
y.parseWithStatement = function(e) {
|
|
652
712
|
return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), e.object = this.parseParenExpression(), e.body = this.parseStatement("with"), this.finishNode(e, "WithStatement");
|
|
653
713
|
};
|
|
654
|
-
|
|
714
|
+
y.parseEmptyStatement = function(e) {
|
|
655
715
|
return this.next(), this.finishNode(e, "EmptyStatement");
|
|
656
716
|
};
|
|
657
|
-
|
|
717
|
+
y.parseLabeledStatement = function(e, t, i, s) {
|
|
658
718
|
for (var r = 0, n = this.labels; r < n.length; r += 1) {
|
|
659
719
|
var o = n[r];
|
|
660
720
|
o.name === t && this.raise(i.start, "Label '" + t + "' is already declared");
|
|
@@ -668,27 +728,27 @@ g.parseLabeledStatement = function(e, t, i, s) {
|
|
|
668
728
|
}
|
|
669
729
|
return this.labels.push({ name: t, kind: l, statementStart: this.start }), e.body = this.parseStatement(s ? s.indexOf("label") === -1 ? s + "label" : s : "label"), this.labels.pop(), e.label = i, this.finishNode(e, "LabeledStatement");
|
|
670
730
|
};
|
|
671
|
-
|
|
731
|
+
y.parseExpressionStatement = function(e, t) {
|
|
672
732
|
return e.expression = t, this.semicolon(), this.finishNode(e, "ExpressionStatement");
|
|
673
733
|
};
|
|
674
|
-
|
|
734
|
+
y.parseBlock = function(e, t, i) {
|
|
675
735
|
for (e === void 0 && (e = !0), t === void 0 && (t = this.startNode()), t.body = [], this.expect(a.braceL), e && this.enterScope(0); this.type !== a.braceR; ) {
|
|
676
736
|
var s = this.parseStatement(null);
|
|
677
737
|
t.body.push(s);
|
|
678
738
|
}
|
|
679
739
|
return i && (this.strict = !1), this.next(), e && this.exitScope(), this.finishNode(t, "BlockStatement");
|
|
680
740
|
};
|
|
681
|
-
|
|
741
|
+
y.parseFor = function(e, t) {
|
|
682
742
|
return e.init = t, this.expect(a.semi), e.test = this.type === a.semi ? null : this.parseExpression(), this.expect(a.semi), e.update = this.type === a.parenR ? null : this.parseExpression(), this.expect(a.parenR), e.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e, "ForStatement");
|
|
683
743
|
};
|
|
684
|
-
|
|
744
|
+
y.parseForIn = function(e, t) {
|
|
685
745
|
var i = this.type === a._in;
|
|
686
746
|
return this.next(), t.type === "VariableDeclaration" && t.declarations[0].init != null && (!i || this.options.ecmaVersion < 8 || this.strict || t.kind !== "var" || t.declarations[0].id.type !== "Identifier") && this.raise(
|
|
687
747
|
t.start,
|
|
688
748
|
(i ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"
|
|
689
749
|
), e.left = t, e.right = i ? this.parseExpression() : this.parseMaybeAssign(), this.expect(a.parenR), e.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e, i ? "ForInStatement" : "ForOfStatement");
|
|
690
750
|
};
|
|
691
|
-
|
|
751
|
+
y.parseVar = function(e, t, i, s) {
|
|
692
752
|
for (e.declarations = [], e.kind = i; ; ) {
|
|
693
753
|
var r = this.startNode();
|
|
694
754
|
if (this.parseVarId(r, i), this.eat(a.eq) ? r.init = this.parseMaybeAssign(t) : !s && i === "const" && !(this.type === a._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) ? this.unexpected() : !s && (i === "using" || i === "await using") && this.options.ecmaVersion >= 17 && this.type !== a._in && !this.isContextual("of") ? this.raise(this.lastTokEnd, "Missing initializer in " + i + " declaration") : !s && r.id.type !== "Identifier" && !(t && (this.type === a._in || this.isContextual("of"))) ? this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value") : r.init = null, e.declarations.push(this.finishNode(r, "VariableDeclarator")), !this.eat(a.comma))
|
|
@@ -696,30 +756,30 @@ g.parseVar = function(e, t, i, s) {
|
|
|
696
756
|
}
|
|
697
757
|
return e;
|
|
698
758
|
};
|
|
699
|
-
|
|
700
|
-
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? Et :
|
|
759
|
+
y.parseVarId = function(e, t) {
|
|
760
|
+
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? Et : re, !1);
|
|
701
761
|
};
|
|
702
|
-
var
|
|
703
|
-
|
|
704
|
-
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !s) && (this.type === a.star && t & bt && this.unexpected(), e.generator = this.eat(a.star)), this.options.ecmaVersion >= 8 && (e.async = !!s), t &
|
|
762
|
+
var Ae = 1, bt = 2, hi = 4;
|
|
763
|
+
y.parseFunction = function(e, t, i, s, r) {
|
|
764
|
+
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !s) && (this.type === a.star && t & bt && this.unexpected(), e.generator = this.eat(a.star)), this.options.ecmaVersion >= 8 && (e.async = !!s), t & Ae && (e.id = t & hi && this.type !== a.name ? null : this.parseIdent(), e.id && !(t & bt) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? Et : re : ui));
|
|
705
765
|
var n = this.yieldPos, o = this.awaitPos, l = this.awaitIdentPos;
|
|
706
|
-
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
766
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(At(e.async, e.generator)), t & Ae || (e.id = this.type === a.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, i, !1, r), this.yieldPos = n, this.awaitPos = o, this.awaitIdentPos = l, this.finishNode(e, t & Ae ? "FunctionDeclaration" : "FunctionExpression");
|
|
707
767
|
};
|
|
708
|
-
|
|
768
|
+
y.parseFunctionParams = function(e) {
|
|
709
769
|
this.expect(a.parenL), e.params = this.parseBindingList(a.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
710
770
|
};
|
|
711
|
-
|
|
771
|
+
y.parseClass = function(e, t) {
|
|
712
772
|
this.next();
|
|
713
773
|
var i = this.strict;
|
|
714
774
|
this.strict = !0, this.parseClassId(e, t), this.parseClassSuper(e);
|
|
715
775
|
var s = this.enterClassBody(), r = this.startNode(), n = !1;
|
|
716
776
|
for (r.body = [], this.expect(a.braceL); this.type !== a.braceR; ) {
|
|
717
777
|
var o = this.parseClassElement(e.superClass !== null);
|
|
718
|
-
o && (r.body.push(o), o.type === "MethodDefinition" && o.kind === "constructor" ? (n && this.raiseRecoverable(o.start, "Duplicate constructor in the same class"), n = !0) : o.key && o.key.type === "PrivateIdentifier" &&
|
|
778
|
+
o && (r.body.push(o), o.type === "MethodDefinition" && o.kind === "constructor" ? (n && this.raiseRecoverable(o.start, "Duplicate constructor in the same class"), n = !0) : o.key && o.key.type === "PrivateIdentifier" && Ps(s, o) && this.raiseRecoverable(o.key.start, "Identifier '#" + o.key.name + "' has already been declared"));
|
|
719
779
|
}
|
|
720
780
|
return this.strict = i, this.next(), e.body = this.finishNode(r, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
721
781
|
};
|
|
722
|
-
|
|
782
|
+
y.parseClassElement = function(e) {
|
|
723
783
|
if (this.eat(a.semi))
|
|
724
784
|
return null;
|
|
725
785
|
var t = this.options.ecmaVersion, i = this.startNode(), s = "", r = !1, n = !1, o = "method", l = !1;
|
|
@@ -733,47 +793,47 @@ g.parseClassElement = function(e) {
|
|
|
733
793
|
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? o = u : s = u);
|
|
734
794
|
}
|
|
735
795
|
if (s ? (i.computed = !1, i.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), i.key.name = s, this.finishNode(i.key, "Identifier")) : this.parseClassElementName(i), t < 13 || this.type === a.parenL || o !== "method" || r || n) {
|
|
736
|
-
var c = !i.static &&
|
|
737
|
-
c && o !== "method" && this.raise(i.key.start, "Constructor can't have get/set modifier"), i.kind = c ? "constructor" : o, this.parseClassMethod(i, r, n,
|
|
796
|
+
var c = !i.static && We(i, "constructor"), p = c && e;
|
|
797
|
+
c && o !== "method" && this.raise(i.key.start, "Constructor can't have get/set modifier"), i.kind = c ? "constructor" : o, this.parseClassMethod(i, r, n, p);
|
|
738
798
|
} else
|
|
739
799
|
this.parseClassField(i);
|
|
740
800
|
return i;
|
|
741
801
|
};
|
|
742
|
-
|
|
802
|
+
y.isClassElementNameStart = function() {
|
|
743
803
|
return this.type === a.name || this.type === a.privateId || this.type === a.num || this.type === a.string || this.type === a.bracketL || this.type.keyword;
|
|
744
804
|
};
|
|
745
|
-
|
|
805
|
+
y.parseClassElementName = function(e) {
|
|
746
806
|
this.type === a.privateId ? (this.value === "constructor" && this.raise(this.start, "Classes can't have an element named '#constructor'"), e.computed = !1, e.key = this.parsePrivateIdent()) : this.parsePropertyName(e);
|
|
747
807
|
};
|
|
748
|
-
|
|
808
|
+
y.parseClassMethod = function(e, t, i, s) {
|
|
749
809
|
var r = e.key;
|
|
750
|
-
e.kind === "constructor" ? (t && this.raise(r.start, "Constructor can't be a generator"), i && this.raise(r.start, "Constructor can't be an async method")) : e.static &&
|
|
810
|
+
e.kind === "constructor" ? (t && this.raise(r.start, "Constructor can't be a generator"), i && this.raise(r.start, "Constructor can't be an async method")) : e.static && We(e, "prototype") && this.raise(r.start, "Classes may not have a static property named prototype");
|
|
751
811
|
var n = e.value = this.parseMethod(t, i, s);
|
|
752
812
|
return e.kind === "get" && n.params.length !== 0 && this.raiseRecoverable(n.start, "getter should have no params"), e.kind === "set" && n.params.length !== 1 && this.raiseRecoverable(n.start, "setter should have exactly one param"), e.kind === "set" && n.params[0].type === "RestElement" && this.raiseRecoverable(n.params[0].start, "Setter cannot use rest params"), this.finishNode(e, "MethodDefinition");
|
|
753
813
|
};
|
|
754
|
-
|
|
755
|
-
return
|
|
814
|
+
y.parseClassField = function(e) {
|
|
815
|
+
return We(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && We(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(a.eq) ? (this.enterScope(Oe | Ye), e.value = this.parseMaybeAssign(), this.exitScope()) : e.value = null, this.semicolon(), this.finishNode(e, "PropertyDefinition");
|
|
756
816
|
};
|
|
757
|
-
|
|
817
|
+
y.parseClassStaticBlock = function(e) {
|
|
758
818
|
e.body = [];
|
|
759
819
|
var t = this.labels;
|
|
760
|
-
for (this.labels = [], this.enterScope(
|
|
820
|
+
for (this.labels = [], this.enterScope(de | Ye); this.type !== a.braceR; ) {
|
|
761
821
|
var i = this.parseStatement(null);
|
|
762
822
|
e.body.push(i);
|
|
763
823
|
}
|
|
764
824
|
return this.next(), this.exitScope(), this.labels = t, this.finishNode(e, "StaticBlock");
|
|
765
825
|
};
|
|
766
|
-
|
|
767
|
-
this.type === a.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id,
|
|
826
|
+
y.parseClassId = function(e, t) {
|
|
827
|
+
this.type === a.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id, re, !1)) : (t === !0 && this.unexpected(), e.id = null);
|
|
768
828
|
};
|
|
769
|
-
|
|
829
|
+
y.parseClassSuper = function(e) {
|
|
770
830
|
e.superClass = this.eat(a._extends) ? this.parseExprSubscripts(null, !1) : null;
|
|
771
831
|
};
|
|
772
|
-
|
|
832
|
+
y.enterClassBody = function() {
|
|
773
833
|
var e = { declared: /* @__PURE__ */ Object.create(null), used: [] };
|
|
774
834
|
return this.privateNameStack.push(e), e.declared;
|
|
775
835
|
};
|
|
776
|
-
|
|
836
|
+
y.exitClassBody = function() {
|
|
777
837
|
var e = this.privateNameStack.pop(), t = e.declared, i = e.used;
|
|
778
838
|
if (this.options.checkPrivateFields)
|
|
779
839
|
for (var s = this.privateNameStack.length, r = s === 0 ? null : this.privateNameStack[s - 1], n = 0; n < i.length; ++n) {
|
|
@@ -781,18 +841,18 @@ g.exitClassBody = function() {
|
|
|
781
841
|
Se(t, o.name) || (r ? r.used.push(o) : this.raiseRecoverable(o.start, "Private field '#" + o.name + "' must be declared in an enclosing class"));
|
|
782
842
|
}
|
|
783
843
|
};
|
|
784
|
-
function
|
|
844
|
+
function Ps(e, t) {
|
|
785
845
|
var i = t.key.name, s = e[i], r = "true";
|
|
786
846
|
return t.type === "MethodDefinition" && (t.kind === "get" || t.kind === "set") && (r = (t.static ? "s" : "i") + t.kind), s === "iget" && r === "iset" || s === "iset" && r === "iget" || s === "sget" && r === "sset" || s === "sset" && r === "sget" ? (e[i] = "true", !1) : s ? !0 : (e[i] = r, !1);
|
|
787
847
|
}
|
|
788
|
-
function
|
|
848
|
+
function We(e, t) {
|
|
789
849
|
var i = e.computed, s = e.key;
|
|
790
850
|
return !i && (s.type === "Identifier" && s.name === t || s.type === "Literal" && s.value === t);
|
|
791
851
|
}
|
|
792
|
-
|
|
852
|
+
y.parseExportAllDeclaration = function(e, t) {
|
|
793
853
|
return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (e.exported = this.parseModuleExportName(), this.checkExport(t, e.exported, this.lastTokStart)) : e.exported = null), this.expectContextual("from"), this.type !== a.string && this.unexpected(), e.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ExportAllDeclaration");
|
|
794
854
|
};
|
|
795
|
-
|
|
855
|
+
y.parseExport = function(e, t) {
|
|
796
856
|
if (this.next(), this.eat(a.star))
|
|
797
857
|
return this.parseExportAllDeclaration(e, t);
|
|
798
858
|
if (this.eat(a._default))
|
|
@@ -813,14 +873,14 @@ g.parseExport = function(e, t) {
|
|
|
813
873
|
}
|
|
814
874
|
return this.finishNode(e, "ExportNamedDeclaration");
|
|
815
875
|
};
|
|
816
|
-
|
|
876
|
+
y.parseExportDeclaration = function(e) {
|
|
817
877
|
return this.parseStatement(null);
|
|
818
878
|
};
|
|
819
|
-
|
|
879
|
+
y.parseExportDefaultDeclaration = function() {
|
|
820
880
|
var e;
|
|
821
881
|
if (this.type === a._function || (e = this.isAsyncFunction())) {
|
|
822
882
|
var t = this.startNode();
|
|
823
|
-
return this.next(), e && this.next(), this.parseFunction(t,
|
|
883
|
+
return this.next(), e && this.next(), this.parseFunction(t, Ae | hi, !1, e);
|
|
824
884
|
} else if (this.type === a._class) {
|
|
825
885
|
var i = this.startNode();
|
|
826
886
|
return this.parseClass(i, "nullableID");
|
|
@@ -829,10 +889,10 @@ g.parseExportDefaultDeclaration = function() {
|
|
|
829
889
|
return this.semicolon(), s;
|
|
830
890
|
}
|
|
831
891
|
};
|
|
832
|
-
|
|
892
|
+
y.checkExport = function(e, t, i) {
|
|
833
893
|
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value), Se(e, t) && this.raiseRecoverable(i, "Duplicate export '" + t + "'"), e[t] = !0);
|
|
834
894
|
};
|
|
835
|
-
|
|
895
|
+
y.checkPatternExport = function(e, t) {
|
|
836
896
|
var i = t.type;
|
|
837
897
|
if (i === "Identifier")
|
|
838
898
|
this.checkExport(e, t, t.start);
|
|
@@ -848,17 +908,17 @@ g.checkPatternExport = function(e, t) {
|
|
|
848
908
|
}
|
|
849
909
|
else i === "Property" ? this.checkPatternExport(e, t.value) : i === "AssignmentPattern" ? this.checkPatternExport(e, t.left) : i === "RestElement" && this.checkPatternExport(e, t.argument);
|
|
850
910
|
};
|
|
851
|
-
|
|
911
|
+
y.checkVariableExport = function(e, t) {
|
|
852
912
|
if (e)
|
|
853
913
|
for (var i = 0, s = t; i < s.length; i += 1) {
|
|
854
914
|
var r = s[i];
|
|
855
915
|
this.checkPatternExport(e, r.id);
|
|
856
916
|
}
|
|
857
917
|
};
|
|
858
|
-
|
|
918
|
+
y.shouldParseExportStatement = function() {
|
|
859
919
|
return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
|
|
860
920
|
};
|
|
861
|
-
|
|
921
|
+
y.parseExportSpecifier = function(e) {
|
|
862
922
|
var t = this.startNode();
|
|
863
923
|
return t.local = this.parseModuleExportName(), t.exported = this.eatContextual("as") ? this.parseModuleExportName() : t.local, this.checkExport(
|
|
864
924
|
e,
|
|
@@ -866,7 +926,7 @@ g.parseExportSpecifier = function(e) {
|
|
|
866
926
|
t.exported.start
|
|
867
927
|
), this.finishNode(t, "ExportSpecifier");
|
|
868
928
|
};
|
|
869
|
-
|
|
929
|
+
y.parseExportSpecifiers = function(e) {
|
|
870
930
|
var t = [], i = !0;
|
|
871
931
|
for (this.expect(a.braceL); !this.eat(a.braceR); ) {
|
|
872
932
|
if (i)
|
|
@@ -877,22 +937,22 @@ g.parseExportSpecifiers = function(e) {
|
|
|
877
937
|
}
|
|
878
938
|
return t;
|
|
879
939
|
};
|
|
880
|
-
|
|
881
|
-
return this.next(), this.type === a.string ? (e.specifiers =
|
|
940
|
+
y.parseImport = function(e) {
|
|
941
|
+
return this.next(), this.type === a.string ? (e.specifiers = Ns, e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === a.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ImportDeclaration");
|
|
882
942
|
};
|
|
883
|
-
|
|
943
|
+
y.parseImportSpecifier = function() {
|
|
884
944
|
var e = this.startNode();
|
|
885
|
-
return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local,
|
|
945
|
+
return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local, re), this.finishNode(e, "ImportSpecifier");
|
|
886
946
|
};
|
|
887
|
-
|
|
947
|
+
y.parseImportDefaultSpecifier = function() {
|
|
888
948
|
var e = this.startNode();
|
|
889
|
-
return e.local = this.parseIdent(), this.checkLValSimple(e.local,
|
|
949
|
+
return e.local = this.parseIdent(), this.checkLValSimple(e.local, re), this.finishNode(e, "ImportDefaultSpecifier");
|
|
890
950
|
};
|
|
891
|
-
|
|
951
|
+
y.parseImportNamespaceSpecifier = function() {
|
|
892
952
|
var e = this.startNode();
|
|
893
|
-
return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local,
|
|
953
|
+
return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local, re), this.finishNode(e, "ImportNamespaceSpecifier");
|
|
894
954
|
};
|
|
895
|
-
|
|
955
|
+
y.parseImportSpecifiers = function() {
|
|
896
956
|
var e = [], t = !0;
|
|
897
957
|
if (this.type === a.name && (e.push(this.parseImportDefaultSpecifier()), !this.eat(a.comma)))
|
|
898
958
|
return e;
|
|
@@ -907,7 +967,7 @@ g.parseImportSpecifiers = function() {
|
|
|
907
967
|
}
|
|
908
968
|
return e;
|
|
909
969
|
};
|
|
910
|
-
|
|
970
|
+
y.parseWithClause = function() {
|
|
911
971
|
var e = [];
|
|
912
972
|
if (!this.eat(a._with))
|
|
913
973
|
return e;
|
|
@@ -922,26 +982,26 @@ g.parseWithClause = function() {
|
|
|
922
982
|
}
|
|
923
983
|
return e;
|
|
924
984
|
};
|
|
925
|
-
|
|
985
|
+
y.parseImportAttribute = function() {
|
|
926
986
|
var e = this.startNode();
|
|
927
987
|
return e.key = this.type === a.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"), this.expect(a.colon), this.type !== a.string && this.unexpected(), e.value = this.parseExprAtom(), this.finishNode(e, "ImportAttribute");
|
|
928
988
|
};
|
|
929
|
-
|
|
989
|
+
y.parseModuleExportName = function() {
|
|
930
990
|
if (this.options.ecmaVersion >= 13 && this.type === a.string) {
|
|
931
991
|
var e = this.parseLiteral(this.value);
|
|
932
|
-
return
|
|
992
|
+
return ws.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e;
|
|
933
993
|
}
|
|
934
994
|
return this.parseIdent(!0);
|
|
935
995
|
};
|
|
936
|
-
|
|
996
|
+
y.adaptDirectivePrologue = function(e) {
|
|
937
997
|
for (var t = 0; t < e.length && this.isDirectiveCandidate(e[t]); ++t)
|
|
938
998
|
e[t].directive = e[t].expression.raw.slice(1, -1);
|
|
939
999
|
};
|
|
940
|
-
|
|
1000
|
+
y.isDirectiveCandidate = function(e) {
|
|
941
1001
|
return this.options.ecmaVersion >= 5 && e.type === "ExpressionStatement" && e.expression.type === "Literal" && typeof e.expression.value == "string" && // Reject parenthesized strings.
|
|
942
1002
|
(this.input[e.start] === '"' || this.input[e.start] === "'");
|
|
943
1003
|
};
|
|
944
|
-
var z =
|
|
1004
|
+
var z = V.prototype;
|
|
945
1005
|
z.toAssignable = function(e, t, i) {
|
|
946
1006
|
if (this.options.ecmaVersion >= 6 && e)
|
|
947
1007
|
switch (e.type) {
|
|
@@ -1047,11 +1107,11 @@ z.parseMaybeDefault = function(e, t, i) {
|
|
|
1047
1107
|
return s.left = i, s.right = this.parseMaybeAssign(), this.finishNode(s, "AssignmentPattern");
|
|
1048
1108
|
};
|
|
1049
1109
|
z.checkLValSimple = function(e, t, i) {
|
|
1050
|
-
t === void 0 && (t =
|
|
1051
|
-
var s = t !==
|
|
1110
|
+
t === void 0 && (t = Ge);
|
|
1111
|
+
var s = t !== Ge;
|
|
1052
1112
|
switch (e.type) {
|
|
1053
1113
|
case "Identifier":
|
|
1054
|
-
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (s ? "Binding " : "Assigning to ") + e.name + " in strict mode"), s && (t ===
|
|
1114
|
+
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (s ? "Binding " : "Assigning to ") + e.name + " in strict mode"), s && (t === re && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), i && (Se(i, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), i[e.name] = !0), t !== ci && this.declareName(e.name, t, e.start));
|
|
1055
1115
|
break;
|
|
1056
1116
|
case "ChainExpression":
|
|
1057
1117
|
this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -1066,7 +1126,7 @@ z.checkLValSimple = function(e, t, i) {
|
|
|
1066
1126
|
}
|
|
1067
1127
|
};
|
|
1068
1128
|
z.checkLValPattern = function(e, t, i) {
|
|
1069
|
-
switch (t === void 0 && (t =
|
|
1129
|
+
switch (t === void 0 && (t = Ge), e.type) {
|
|
1070
1130
|
case "ObjectPattern":
|
|
1071
1131
|
for (var s = 0, r = e.properties; s < r.length; s += 1) {
|
|
1072
1132
|
var n = r[s];
|
|
@@ -1084,7 +1144,7 @@ z.checkLValPattern = function(e, t, i) {
|
|
|
1084
1144
|
}
|
|
1085
1145
|
};
|
|
1086
1146
|
z.checkLValInnerPattern = function(e, t, i) {
|
|
1087
|
-
switch (t === void 0 && (t =
|
|
1147
|
+
switch (t === void 0 && (t = Ge), e.type) {
|
|
1088
1148
|
case "Property":
|
|
1089
1149
|
this.checkLValInnerPattern(e.value, t, i);
|
|
1090
1150
|
break;
|
|
@@ -1098,22 +1158,22 @@ z.checkLValInnerPattern = function(e, t, i) {
|
|
|
1098
1158
|
this.checkLValPattern(e, t, i);
|
|
1099
1159
|
}
|
|
1100
1160
|
};
|
|
1101
|
-
var
|
|
1161
|
+
var J = function(t, i, s, r, n) {
|
|
1102
1162
|
this.token = t, this.isExpr = !!i, this.preserveSpace = !!s, this.override = r, this.generator = !!n;
|
|
1103
1163
|
}, N = {
|
|
1104
|
-
b_stat: new
|
|
1105
|
-
b_expr: new
|
|
1106
|
-
b_tmpl: new
|
|
1107
|
-
p_stat: new
|
|
1108
|
-
p_expr: new
|
|
1109
|
-
q_tmpl: new
|
|
1164
|
+
b_stat: new J("{", !1),
|
|
1165
|
+
b_expr: new J("{", !0),
|
|
1166
|
+
b_tmpl: new J("${", !1),
|
|
1167
|
+
p_stat: new J("(", !1),
|
|
1168
|
+
p_expr: new J("(", !0),
|
|
1169
|
+
q_tmpl: new J("`", !0, !0, function(e) {
|
|
1110
1170
|
return e.tryReadTemplateToken();
|
|
1111
1171
|
}),
|
|
1112
|
-
f_stat: new
|
|
1113
|
-
f_expr: new
|
|
1114
|
-
f_expr_gen: new
|
|
1115
|
-
f_gen: new
|
|
1116
|
-
}, we =
|
|
1172
|
+
f_stat: new J("function", !1),
|
|
1173
|
+
f_expr: new J("function", !0),
|
|
1174
|
+
f_expr_gen: new J("function", !0, !1, null, !0),
|
|
1175
|
+
f_gen: new J("function", !1, !1, null, !0)
|
|
1176
|
+
}, we = V.prototype;
|
|
1117
1177
|
we.initialContext = function() {
|
|
1118
1178
|
return [N.b_stat];
|
|
1119
1179
|
};
|
|
@@ -1122,7 +1182,7 @@ we.curContext = function() {
|
|
|
1122
1182
|
};
|
|
1123
1183
|
we.braceIsBlock = function(e) {
|
|
1124
1184
|
var t = this.curContext();
|
|
1125
|
-
return t === N.f_expr || t === N.f_stat ? !0 : e === a.colon && (t === N.b_stat || t === N.b_expr) ? !t.isExpr : e === a._return || e === a.name && this.exprAllowed ?
|
|
1185
|
+
return t === N.f_expr || t === N.f_stat ? !0 : e === a.colon && (t === N.b_stat || t === N.b_expr) ? !t.isExpr : e === a._return || e === a.name && this.exprAllowed ? B.test(this.input.slice(this.lastTokEnd, this.start)) : e === a._else || e === a.semi || e === a.eof || e === a.parenR || e === a.arrow ? !0 : e === a.braceL ? t === N.b_stat : e === a._var || e === a._const || e === a.name ? !1 : !this.exprAllowed;
|
|
1126
1186
|
};
|
|
1127
1187
|
we.inGeneratorContext = function() {
|
|
1128
1188
|
for (var e = this.context.length - 1; e >= 1; e--) {
|
|
@@ -1160,7 +1220,7 @@ a.parenL.updateContext = function(e) {
|
|
|
1160
1220
|
a.incDec.updateContext = function() {
|
|
1161
1221
|
};
|
|
1162
1222
|
a._function.updateContext = a._class.updateContext = function(e) {
|
|
1163
|
-
e.beforeExpr && e !== a._else && !(e === a.semi && this.curContext() !== N.p_stat) && !(e === a._return &&
|
|
1223
|
+
e.beforeExpr && e !== a._else && !(e === a.semi && this.curContext() !== N.p_stat) && !(e === a._return && B.test(this.input.slice(this.lastTokEnd, this.start))) && !((e === a.colon || e === a.braceL) && this.curContext() === N.b_stat) ? this.context.push(N.f_expr) : this.context.push(N.f_stat), this.exprAllowed = !1;
|
|
1164
1224
|
};
|
|
1165
1225
|
a.colon.updateContext = function() {
|
|
1166
1226
|
this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
|
|
@@ -1179,8 +1239,8 @@ a.name.updateContext = function(e) {
|
|
|
1179
1239
|
var t = !1;
|
|
1180
1240
|
this.options.ecmaVersion >= 6 && e !== a.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (t = !0), this.exprAllowed = t;
|
|
1181
1241
|
};
|
|
1182
|
-
var
|
|
1183
|
-
|
|
1242
|
+
var v = V.prototype;
|
|
1243
|
+
v.checkPropClash = function(e, t, i) {
|
|
1184
1244
|
if (!(this.options.ecmaVersion >= 9 && e.type === "SpreadElement") && !(this.options.ecmaVersion >= 6 && (e.computed || e.method || e.shorthand))) {
|
|
1185
1245
|
var s = e.key, r;
|
|
1186
1246
|
switch (s.type) {
|
|
@@ -1212,7 +1272,7 @@ S.checkPropClash = function(e, t, i) {
|
|
|
1212
1272
|
o[n] = !0;
|
|
1213
1273
|
}
|
|
1214
1274
|
};
|
|
1215
|
-
|
|
1275
|
+
v.parseExpression = function(e, t) {
|
|
1216
1276
|
var i = this.start, s = this.startLoc, r = this.parseMaybeAssign(e, t);
|
|
1217
1277
|
if (this.type === a.comma) {
|
|
1218
1278
|
var n = this.startNodeAt(i, s);
|
|
@@ -1222,25 +1282,25 @@ S.parseExpression = function(e, t) {
|
|
|
1222
1282
|
}
|
|
1223
1283
|
return r;
|
|
1224
1284
|
};
|
|
1225
|
-
|
|
1285
|
+
v.parseMaybeAssign = function(e, t, i) {
|
|
1226
1286
|
if (this.isContextual("yield")) {
|
|
1227
1287
|
if (this.inGenerator)
|
|
1228
1288
|
return this.parseYield(e);
|
|
1229
1289
|
this.exprAllowed = !1;
|
|
1230
1290
|
}
|
|
1231
1291
|
var s = !1, r = -1, n = -1, o = -1;
|
|
1232
|
-
t ? (r = t.parenthesizedAssign, n = t.trailingComma, o = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new
|
|
1292
|
+
t ? (r = t.parenthesizedAssign, n = t.trailingComma, o = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new et(), s = !0);
|
|
1233
1293
|
var l = this.start, u = this.startLoc;
|
|
1234
1294
|
(this.type === a.parenL || this.type === a.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
1235
1295
|
var c = this.parseMaybeConditional(e, t);
|
|
1236
1296
|
if (i && (c = i.call(this, c, l, u)), this.type.isAssign) {
|
|
1237
|
-
var
|
|
1238
|
-
return
|
|
1297
|
+
var p = this.startNodeAt(l, u);
|
|
1298
|
+
return p.operator = this.value, this.type === a.eq && (c = this.toAssignable(c, !1, t)), s || (t.parenthesizedAssign = t.trailingComma = t.doubleProto = -1), t.shorthandAssign >= c.start && (t.shorthandAssign = -1), this.type === a.eq ? this.checkLValPattern(c) : this.checkLValSimple(c), p.left = c, this.next(), p.right = this.parseMaybeAssign(e), o > -1 && (t.doubleProto = o), this.finishNode(p, "AssignmentExpression");
|
|
1239
1299
|
} else
|
|
1240
1300
|
s && this.checkExpressionErrors(t, !0);
|
|
1241
1301
|
return r > -1 && (t.parenthesizedAssign = r), n > -1 && (t.trailingComma = n), c;
|
|
1242
1302
|
};
|
|
1243
|
-
|
|
1303
|
+
v.parseMaybeConditional = function(e, t) {
|
|
1244
1304
|
var i = this.start, s = this.startLoc, r = this.parseExprOps(e, t);
|
|
1245
1305
|
if (this.checkExpressionErrors(t))
|
|
1246
1306
|
return r;
|
|
@@ -1250,34 +1310,34 @@ S.parseMaybeConditional = function(e, t) {
|
|
|
1250
1310
|
}
|
|
1251
1311
|
return r;
|
|
1252
1312
|
};
|
|
1253
|
-
|
|
1313
|
+
v.parseExprOps = function(e, t) {
|
|
1254
1314
|
var i = this.start, s = this.startLoc, r = this.parseMaybeUnary(t, !1, !1, e);
|
|
1255
1315
|
return this.checkExpressionErrors(t) || r.start === i && r.type === "ArrowFunctionExpression" ? r : this.parseExprOp(r, i, s, -1, e);
|
|
1256
1316
|
};
|
|
1257
|
-
|
|
1317
|
+
v.parseExprOp = function(e, t, i, s, r) {
|
|
1258
1318
|
var n = this.type.binop;
|
|
1259
1319
|
if (n != null && (!r || this.type !== a._in) && n > s) {
|
|
1260
1320
|
var o = this.type === a.logicalOR || this.type === a.logicalAND, l = this.type === a.coalesce;
|
|
1261
1321
|
l && (n = a.logicalAND.binop);
|
|
1262
1322
|
var u = this.value;
|
|
1263
1323
|
this.next();
|
|
1264
|
-
var c = this.start,
|
|
1265
|
-
return (o && this.type === a.coalesce || l && (this.type === a.logicalOR || this.type === a.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(
|
|
1324
|
+
var c = this.start, p = this.startLoc, f = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, r), c, p, n, r), h = this.buildBinary(t, i, e, f, u, o || l);
|
|
1325
|
+
return (o && this.type === a.coalesce || l && (this.type === a.logicalOR || this.type === a.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(h, t, i, s, r);
|
|
1266
1326
|
}
|
|
1267
1327
|
return e;
|
|
1268
1328
|
};
|
|
1269
|
-
|
|
1329
|
+
v.buildBinary = function(e, t, i, s, r, n) {
|
|
1270
1330
|
s.type === "PrivateIdentifier" && this.raise(s.start, "Private identifier can only be left side of binary expression");
|
|
1271
1331
|
var o = this.startNodeAt(e, t);
|
|
1272
1332
|
return o.left = i, o.operator = r, o.right = s, this.finishNode(o, n ? "LogicalExpression" : "BinaryExpression");
|
|
1273
1333
|
};
|
|
1274
|
-
|
|
1334
|
+
v.parseMaybeUnary = function(e, t, i, s) {
|
|
1275
1335
|
var r = this.start, n = this.startLoc, o;
|
|
1276
1336
|
if (this.isContextual("await") && this.canAwait)
|
|
1277
1337
|
o = this.parseAwait(s), t = !0;
|
|
1278
1338
|
else if (this.type.prefix) {
|
|
1279
1339
|
var l = this.startNode(), u = this.type === a.incDec;
|
|
1280
|
-
l.operator = this.value, l.prefix = !0, this.next(), l.argument = this.parseMaybeUnary(null, !0, u, s), this.checkExpressionErrors(e, !0), u ? this.checkLValSimple(l.argument) : this.strict && l.operator === "delete" &&
|
|
1340
|
+
l.operator = this.value, l.prefix = !0, this.next(), l.argument = this.parseMaybeUnary(null, !0, u, s), this.checkExpressionErrors(e, !0), u ? this.checkLValSimple(l.argument) : this.strict && l.operator === "delete" && fi(l.argument) ? this.raiseRecoverable(l.start, "Deleting local variable in strict mode") : l.operator === "delete" && xt(l.argument) ? this.raiseRecoverable(l.start, "Private fields can not be deleted") : t = !0, o = this.finishNode(l, u ? "UpdateExpression" : "UnaryExpression");
|
|
1281
1341
|
} else if (!t && this.type === a.privateId)
|
|
1282
1342
|
(s || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), o = this.parsePrivateIdent(), this.type !== a._in && this.unexpected();
|
|
1283
1343
|
else {
|
|
@@ -1296,20 +1356,20 @@ S.parseMaybeUnary = function(e, t, i, s) {
|
|
|
1296
1356
|
else
|
|
1297
1357
|
return o;
|
|
1298
1358
|
};
|
|
1299
|
-
function
|
|
1300
|
-
return e.type === "Identifier" || e.type === "ParenthesizedExpression" &&
|
|
1359
|
+
function fi(e) {
|
|
1360
|
+
return e.type === "Identifier" || e.type === "ParenthesizedExpression" && fi(e.expression);
|
|
1301
1361
|
}
|
|
1302
1362
|
function xt(e) {
|
|
1303
1363
|
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" && xt(e.expression) || e.type === "ParenthesizedExpression" && xt(e.expression);
|
|
1304
1364
|
}
|
|
1305
|
-
|
|
1365
|
+
v.parseExprSubscripts = function(e, t) {
|
|
1306
1366
|
var i = this.start, s = this.startLoc, r = this.parseExprAtom(e, t);
|
|
1307
1367
|
if (r.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")")
|
|
1308
1368
|
return r;
|
|
1309
1369
|
var n = this.parseSubscripts(r, i, s, !1, t);
|
|
1310
1370
|
return e && n.type === "MemberExpression" && (e.parenthesizedAssign >= n.start && (e.parenthesizedAssign = -1), e.parenthesizedBind >= n.start && (e.parenthesizedBind = -1), e.trailingComma >= n.start && (e.trailingComma = -1)), n;
|
|
1311
1371
|
};
|
|
1312
|
-
|
|
1372
|
+
v.parseSubscripts = function(e, t, i, s, r) {
|
|
1313
1373
|
for (var n = this.options.ecmaVersion >= 8 && e.type === "Identifier" && e.name === "async" && this.lastTokEnd === e.end && !this.canInsertSemicolon() && e.end - e.start === 5 && this.potentialArrowAt === e.start, o = !1; ; ) {
|
|
1314
1374
|
var l = this.parseSubscript(e, t, i, s, n, o, r);
|
|
1315
1375
|
if (l.optional && (o = !0), l === e || l.type === "ArrowFunctionExpression") {
|
|
@@ -1322,36 +1382,36 @@ S.parseSubscripts = function(e, t, i, s, r) {
|
|
|
1322
1382
|
e = l;
|
|
1323
1383
|
}
|
|
1324
1384
|
};
|
|
1325
|
-
|
|
1385
|
+
v.shouldParseAsyncArrow = function() {
|
|
1326
1386
|
return !this.canInsertSemicolon() && this.eat(a.arrow);
|
|
1327
1387
|
};
|
|
1328
|
-
|
|
1388
|
+
v.parseSubscriptAsyncArrow = function(e, t, i, s) {
|
|
1329
1389
|
return this.parseArrowExpression(this.startNodeAt(e, t), i, !0, s);
|
|
1330
1390
|
};
|
|
1331
|
-
|
|
1391
|
+
v.parseSubscript = function(e, t, i, s, r, n, o) {
|
|
1332
1392
|
var l = this.options.ecmaVersion >= 11, u = l && this.eat(a.questionDot);
|
|
1333
1393
|
s && u && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
1334
1394
|
var c = this.eat(a.bracketL);
|
|
1335
1395
|
if (c || u && this.type !== a.parenL && this.type !== a.backQuote || this.eat(a.dot)) {
|
|
1336
|
-
var
|
|
1337
|
-
|
|
1396
|
+
var p = this.startNodeAt(t, i);
|
|
1397
|
+
p.object = e, c ? (p.property = this.parseExpression(), this.expect(a.bracketR)) : this.type === a.privateId && e.type !== "Super" ? p.property = this.parsePrivateIdent() : p.property = this.parseIdent(this.options.allowReserved !== "never"), p.computed = !!c, l && (p.optional = u), e = this.finishNode(p, "MemberExpression");
|
|
1338
1398
|
} else if (!s && this.eat(a.parenL)) {
|
|
1339
|
-
var
|
|
1399
|
+
var f = new et(), h = this.yieldPos, m = this.awaitPos, x = this.awaitIdentPos;
|
|
1340
1400
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
1341
|
-
var d = this.parseExprList(a.parenR, this.options.ecmaVersion >= 8, !1,
|
|
1401
|
+
var d = this.parseExprList(a.parenR, this.options.ecmaVersion >= 8, !1, f);
|
|
1342
1402
|
if (r && !u && this.shouldParseAsyncArrow())
|
|
1343
|
-
return this.checkPatternErrors(
|
|
1344
|
-
this.checkExpressionErrors(
|
|
1403
|
+
return this.checkPatternErrors(f, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = h, this.awaitPos = m, this.awaitIdentPos = x, this.parseSubscriptAsyncArrow(t, i, d, o);
|
|
1404
|
+
this.checkExpressionErrors(f, !0), this.yieldPos = h || this.yieldPos, this.awaitPos = m || this.awaitPos, this.awaitIdentPos = x || this.awaitIdentPos;
|
|
1345
1405
|
var b = this.startNodeAt(t, i);
|
|
1346
1406
|
b.callee = e, b.arguments = d, l && (b.optional = u), e = this.finishNode(b, "CallExpression");
|
|
1347
1407
|
} else if (this.type === a.backQuote) {
|
|
1348
1408
|
(u || n) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
1349
|
-
var
|
|
1350
|
-
|
|
1409
|
+
var w = this.startNodeAt(t, i);
|
|
1410
|
+
w.tag = e, w.quasi = this.parseTemplate({ isTagged: !0 }), e = this.finishNode(w, "TaggedTemplateExpression");
|
|
1351
1411
|
}
|
|
1352
1412
|
return e;
|
|
1353
1413
|
};
|
|
1354
|
-
|
|
1414
|
+
v.parseExprAtom = function(e, t, i) {
|
|
1355
1415
|
this.type === a.slash && this.readRegexp();
|
|
1356
1416
|
var s, r = this.potentialArrowAt === this.start;
|
|
1357
1417
|
switch (this.type) {
|
|
@@ -1381,8 +1441,8 @@ S.parseExprAtom = function(e, t, i) {
|
|
|
1381
1441
|
case a._false:
|
|
1382
1442
|
return s = this.startNode(), s.value = this.type === a._null ? null : this.type === a._true, s.raw = this.type.keyword, this.next(), this.finishNode(s, "Literal");
|
|
1383
1443
|
case a.parenL:
|
|
1384
|
-
var
|
|
1385
|
-
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(
|
|
1444
|
+
var p = this.start, f = this.parseParenAndDistinguishExpression(r, t);
|
|
1445
|
+
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(f) && (e.parenthesizedAssign = p), e.parenthesizedBind < 0 && (e.parenthesizedBind = p)), f;
|
|
1386
1446
|
case a.bracketL:
|
|
1387
1447
|
return s = this.startNode(), this.next(), s.elements = this.parseExprList(a.bracketR, !0, !0, e), this.finishNode(s, "ArrayExpression");
|
|
1388
1448
|
case a.braceL:
|
|
@@ -1401,10 +1461,10 @@ S.parseExprAtom = function(e, t, i) {
|
|
|
1401
1461
|
return this.parseExprAtomDefault();
|
|
1402
1462
|
}
|
|
1403
1463
|
};
|
|
1404
|
-
|
|
1464
|
+
v.parseExprAtomDefault = function() {
|
|
1405
1465
|
this.unexpected();
|
|
1406
1466
|
};
|
|
1407
|
-
|
|
1467
|
+
v.parseExprImport = function(e) {
|
|
1408
1468
|
var t = this.startNode();
|
|
1409
1469
|
if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type === a.parenL && !e)
|
|
1410
1470
|
return this.parseDynamicImport(t);
|
|
@@ -1414,7 +1474,7 @@ S.parseExprImport = function(e) {
|
|
|
1414
1474
|
} else
|
|
1415
1475
|
this.unexpected();
|
|
1416
1476
|
};
|
|
1417
|
-
|
|
1477
|
+
v.parseDynamicImport = function(e) {
|
|
1418
1478
|
if (this.next(), e.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16)
|
|
1419
1479
|
this.eat(a.parenR) ? e.options = null : (this.expect(a.comma), this.afterTrailingComma(a.parenR) ? e.options = null : (e.options = this.parseMaybeAssign(), this.eat(a.parenR) || (this.expect(a.comma), this.afterTrailingComma(a.parenR) || this.unexpected())));
|
|
1420
1480
|
else if (!this.eat(a.parenR)) {
|
|
@@ -1423,60 +1483,60 @@ S.parseDynamicImport = function(e) {
|
|
|
1423
1483
|
}
|
|
1424
1484
|
return this.finishNode(e, "ImportExpression");
|
|
1425
1485
|
};
|
|
1426
|
-
|
|
1486
|
+
v.parseImportMeta = function(e) {
|
|
1427
1487
|
this.next();
|
|
1428
1488
|
var t = this.containsEsc;
|
|
1429
1489
|
return e.property = this.parseIdent(!0), e.property.name !== "meta" && this.raiseRecoverable(e.property.start, "The only valid meta property for import is 'import.meta'"), t && this.raiseRecoverable(e.start, "'import.meta' must not contain escaped characters"), this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere && this.raiseRecoverable(e.start, "Cannot use 'import.meta' outside a module"), this.finishNode(e, "MetaProperty");
|
|
1430
1490
|
};
|
|
1431
|
-
|
|
1491
|
+
v.parseLiteral = function(e) {
|
|
1432
1492
|
var t = this.startNode();
|
|
1433
1493
|
return t.value = e, t.raw = this.input.slice(this.start, this.end), t.raw.charCodeAt(t.raw.length - 1) === 110 && (t.bigint = t.value != null ? t.value.toString() : t.raw.slice(0, -1).replace(/_/g, "")), this.next(), this.finishNode(t, "Literal");
|
|
1434
1494
|
};
|
|
1435
|
-
|
|
1495
|
+
v.parseParenExpression = function() {
|
|
1436
1496
|
this.expect(a.parenL);
|
|
1437
1497
|
var e = this.parseExpression();
|
|
1438
1498
|
return this.expect(a.parenR), e;
|
|
1439
1499
|
};
|
|
1440
|
-
|
|
1500
|
+
v.shouldParseArrow = function(e) {
|
|
1441
1501
|
return !this.canInsertSemicolon();
|
|
1442
1502
|
};
|
|
1443
|
-
|
|
1503
|
+
v.parseParenAndDistinguishExpression = function(e, t) {
|
|
1444
1504
|
var i = this.start, s = this.startLoc, r, n = this.options.ecmaVersion >= 8;
|
|
1445
1505
|
if (this.options.ecmaVersion >= 6) {
|
|
1446
1506
|
this.next();
|
|
1447
|
-
var o = this.start, l = this.startLoc, u = [], c = !0,
|
|
1507
|
+
var o = this.start, l = this.startLoc, u = [], c = !0, p = !1, f = new et(), h = this.yieldPos, m = this.awaitPos, x;
|
|
1448
1508
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== a.parenR; )
|
|
1449
1509
|
if (c ? c = !1 : this.expect(a.comma), n && this.afterTrailingComma(a.parenR, !0)) {
|
|
1450
|
-
|
|
1510
|
+
p = !0;
|
|
1451
1511
|
break;
|
|
1452
1512
|
} else if (this.type === a.ellipsis) {
|
|
1453
|
-
|
|
1513
|
+
x = this.start, u.push(this.parseParenItem(this.parseRestBinding())), this.type === a.comma && this.raiseRecoverable(
|
|
1454
1514
|
this.start,
|
|
1455
1515
|
"Comma is not permitted after the rest element"
|
|
1456
1516
|
);
|
|
1457
1517
|
break;
|
|
1458
1518
|
} else
|
|
1459
|
-
u.push(this.parseMaybeAssign(!1,
|
|
1519
|
+
u.push(this.parseMaybeAssign(!1, f, this.parseParenItem));
|
|
1460
1520
|
var d = this.lastTokEnd, b = this.lastTokEndLoc;
|
|
1461
1521
|
if (this.expect(a.parenR), e && this.shouldParseArrow(u) && this.eat(a.arrow))
|
|
1462
|
-
return this.checkPatternErrors(
|
|
1463
|
-
(!u.length ||
|
|
1522
|
+
return this.checkPatternErrors(f, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = h, this.awaitPos = m, this.parseParenArrowList(i, s, u, t);
|
|
1523
|
+
(!u.length || p) && this.unexpected(this.lastTokStart), x && this.unexpected(x), this.checkExpressionErrors(f, !0), this.yieldPos = h || this.yieldPos, this.awaitPos = m || this.awaitPos, u.length > 1 ? (r = this.startNodeAt(o, l), r.expressions = u, this.finishNodeAt(r, "SequenceExpression", d, b)) : r = u[0];
|
|
1464
1524
|
} else
|
|
1465
1525
|
r = this.parseParenExpression();
|
|
1466
1526
|
if (this.options.preserveParens) {
|
|
1467
|
-
var
|
|
1468
|
-
return
|
|
1527
|
+
var w = this.startNodeAt(i, s);
|
|
1528
|
+
return w.expression = r, this.finishNode(w, "ParenthesizedExpression");
|
|
1469
1529
|
} else
|
|
1470
1530
|
return r;
|
|
1471
1531
|
};
|
|
1472
|
-
|
|
1532
|
+
v.parseParenItem = function(e) {
|
|
1473
1533
|
return e;
|
|
1474
1534
|
};
|
|
1475
|
-
|
|
1535
|
+
v.parseParenArrowList = function(e, t, i, s) {
|
|
1476
1536
|
return this.parseArrowExpression(this.startNodeAt(e, t), i, !1, s);
|
|
1477
1537
|
};
|
|
1478
|
-
var
|
|
1479
|
-
|
|
1538
|
+
var Ts = [];
|
|
1539
|
+
v.parseNew = function() {
|
|
1480
1540
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
1481
1541
|
var e = this.startNode();
|
|
1482
1542
|
if (this.next(), this.options.ecmaVersion >= 6 && this.type === a.dot) {
|
|
@@ -1486,9 +1546,9 @@ S.parseNew = function() {
|
|
|
1486
1546
|
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");
|
|
1487
1547
|
}
|
|
1488
1548
|
var s = this.start, r = this.startLoc;
|
|
1489
|
-
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), s, r, !0, !1), this.eat(a.parenL) ? e.arguments = this.parseExprList(a.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments =
|
|
1549
|
+
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), s, r, !0, !1), this.eat(a.parenL) ? e.arguments = this.parseExprList(a.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments = Ts, this.finishNode(e, "NewExpression");
|
|
1490
1550
|
};
|
|
1491
|
-
|
|
1551
|
+
v.parseTemplateElement = function(e) {
|
|
1492
1552
|
var t = e.isTagged, i = this.startNode();
|
|
1493
1553
|
return this.type === a.invalidTemplate ? (t || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), i.value = {
|
|
1494
1554
|
raw: this.value.replace(/\r\n?/g, `
|
|
@@ -1500,7 +1560,7 @@ S.parseTemplateElement = function(e) {
|
|
|
1500
1560
|
cooked: this.value
|
|
1501
1561
|
}, this.next(), i.tail = this.type === a.backQuote, this.finishNode(i, "TemplateElement");
|
|
1502
1562
|
};
|
|
1503
|
-
|
|
1563
|
+
v.parseTemplate = function(e) {
|
|
1504
1564
|
e === void 0 && (e = {});
|
|
1505
1565
|
var t = e.isTagged;
|
|
1506
1566
|
t === void 0 && (t = !1);
|
|
@@ -1511,10 +1571,10 @@ S.parseTemplate = function(e) {
|
|
|
1511
1571
|
this.type === a.eof && this.raise(this.pos, "Unterminated template literal"), this.expect(a.dollarBraceL), i.expressions.push(this.parseExpression()), this.expect(a.braceR), i.quasis.push(s = this.parseTemplateElement({ isTagged: t }));
|
|
1512
1572
|
return this.next(), this.finishNode(i, "TemplateLiteral");
|
|
1513
1573
|
};
|
|
1514
|
-
|
|
1515
|
-
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === a.name || this.type === a.num || this.type === a.string || this.type === a.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === a.star) && !
|
|
1574
|
+
v.isAsyncProp = function(e) {
|
|
1575
|
+
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === a.name || this.type === a.num || this.type === a.string || this.type === a.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === a.star) && !B.test(this.input.slice(this.lastTokEnd, this.start));
|
|
1516
1576
|
};
|
|
1517
|
-
|
|
1577
|
+
v.parseObj = function(e, t) {
|
|
1518
1578
|
var i = this.startNode(), s = !0, r = {};
|
|
1519
1579
|
for (i.properties = [], this.next(); !this.eat(a.braceR); ) {
|
|
1520
1580
|
if (s)
|
|
@@ -1526,7 +1586,7 @@ S.parseObj = function(e, t) {
|
|
|
1526
1586
|
}
|
|
1527
1587
|
return this.finishNode(i, e ? "ObjectPattern" : "ObjectExpression");
|
|
1528
1588
|
};
|
|
1529
|
-
|
|
1589
|
+
v.parseProperty = function(e, t) {
|
|
1530
1590
|
var i = this.startNode(), s, r, n, o;
|
|
1531
1591
|
if (this.options.ecmaVersion >= 9 && this.eat(a.ellipsis))
|
|
1532
1592
|
return e ? (i.argument = this.parseIdent(!1), this.type === a.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.finishNode(i, "RestElement")) : (i.argument = this.parseMaybeAssign(!1, t), this.type === a.comma && t && t.trailingComma < 0 && (t.trailingComma = this.start), this.finishNode(i, "SpreadElement"));
|
|
@@ -1534,7 +1594,7 @@ S.parseProperty = function(e, t) {
|
|
|
1534
1594
|
var l = this.containsEsc;
|
|
1535
1595
|
return this.parsePropertyName(i), !e && !l && this.options.ecmaVersion >= 8 && !s && this.isAsyncProp(i) ? (r = !0, s = this.options.ecmaVersion >= 9 && this.eat(a.star), this.parsePropertyName(i)) : r = !1, this.parsePropertyValue(i, e, s, r, n, o, t, l), this.finishNode(i, "Property");
|
|
1536
1596
|
};
|
|
1537
|
-
|
|
1597
|
+
v.parseGetterSetter = function(e) {
|
|
1538
1598
|
var t = e.key.name;
|
|
1539
1599
|
this.parsePropertyName(e), e.value = this.parseMethod(!1), e.kind = t;
|
|
1540
1600
|
var i = e.kind === "get" ? 0 : 1;
|
|
@@ -1544,10 +1604,10 @@ S.parseGetterSetter = function(e) {
|
|
|
1544
1604
|
} else
|
|
1545
1605
|
e.kind === "set" && e.value.params[0].type === "RestElement" && this.raiseRecoverable(e.value.params[0].start, "Setter cannot use rest params");
|
|
1546
1606
|
};
|
|
1547
|
-
|
|
1607
|
+
v.parsePropertyValue = function(e, t, i, s, r, n, o, l) {
|
|
1548
1608
|
(i || s) && this.type === a.colon && this.unexpected(), this.eat(a.colon) ? (e.value = t ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1, o), e.kind = "init") : this.options.ecmaVersion >= 6 && this.type === a.parenL ? (t && this.unexpected(), e.method = !0, e.value = this.parseMethod(i, s), e.kind = "init") : !t && !l && this.options.ecmaVersion >= 5 && !e.computed && e.key.type === "Identifier" && (e.key.name === "get" || e.key.name === "set") && this.type !== a.comma && this.type !== a.braceR && this.type !== a.eq ? ((i || s) && this.unexpected(), this.parseGetterSetter(e)) : this.options.ecmaVersion >= 6 && !e.computed && e.key.type === "Identifier" ? ((i || s) && this.unexpected(), this.checkUnreserved(e.key), e.key.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = r), t ? e.value = this.parseMaybeDefault(r, n, this.copyNode(e.key)) : this.type === a.eq && o ? (o.shorthandAssign < 0 && (o.shorthandAssign = this.start), e.value = this.parseMaybeDefault(r, n, this.copyNode(e.key))) : e.value = this.copyNode(e.key), e.kind = "init", e.shorthand = !0) : this.unexpected();
|
|
1549
1609
|
};
|
|
1550
|
-
|
|
1610
|
+
v.parsePropertyName = function(e) {
|
|
1551
1611
|
if (this.options.ecmaVersion >= 6) {
|
|
1552
1612
|
if (this.eat(a.bracketL))
|
|
1553
1613
|
return e.computed = !0, e.key = this.parseMaybeAssign(), this.expect(a.bracketR), e.key;
|
|
@@ -1555,18 +1615,18 @@ S.parsePropertyName = function(e) {
|
|
|
1555
1615
|
}
|
|
1556
1616
|
return e.key = this.type === a.num || this.type === a.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
|
|
1557
1617
|
};
|
|
1558
|
-
|
|
1618
|
+
v.initFunction = function(e) {
|
|
1559
1619
|
e.id = null, this.options.ecmaVersion >= 6 && (e.generator = e.expression = !1), this.options.ecmaVersion >= 8 && (e.async = !1);
|
|
1560
1620
|
};
|
|
1561
|
-
|
|
1621
|
+
v.parseMethod = function(e, t, i) {
|
|
1562
1622
|
var s = this.startNode(), r = this.yieldPos, n = this.awaitPos, o = this.awaitIdentPos;
|
|
1563
|
-
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(
|
|
1623
|
+
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(At(t, s.generator) | Ye | (i ? oi : 0)), this.expect(a.parenL), s.params = this.parseBindingList(a.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(s, !1, !0, !1), this.yieldPos = r, this.awaitPos = n, this.awaitIdentPos = o, this.finishNode(s, "FunctionExpression");
|
|
1564
1624
|
};
|
|
1565
|
-
|
|
1625
|
+
v.parseArrowExpression = function(e, t, i, s) {
|
|
1566
1626
|
var r = this.yieldPos, n = this.awaitPos, o = this.awaitIdentPos;
|
|
1567
|
-
return this.enterScope(
|
|
1627
|
+
return this.enterScope(At(i, !1) | Ct), this.initFunction(e), this.options.ecmaVersion >= 8 && (e.async = !!i), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, e.params = this.toAssignableList(t, !0), this.parseFunctionBody(e, !0, !1, s), this.yieldPos = r, this.awaitPos = n, this.awaitIdentPos = o, this.finishNode(e, "ArrowFunctionExpression");
|
|
1568
1628
|
};
|
|
1569
|
-
|
|
1629
|
+
v.parseFunctionBody = function(e, t, i, s) {
|
|
1570
1630
|
var r = t && this.type !== a.braceL, n = this.strict, o = !1;
|
|
1571
1631
|
if (r)
|
|
1572
1632
|
e.body = this.parseMaybeAssign(s), e.expression = !0, this.checkParams(e, !1);
|
|
@@ -1574,11 +1634,11 @@ S.parseFunctionBody = function(e, t, i, s) {
|
|
|
1574
1634
|
var l = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e.params);
|
|
1575
1635
|
(!n || l) && (o = this.strictDirective(this.end), o && l && this.raiseRecoverable(e.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
|
|
1576
1636
|
var u = this.labels;
|
|
1577
|
-
this.labels = [], o && (this.strict = !0), this.checkParams(e, !n && !o && !t && !i && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id,
|
|
1637
|
+
this.labels = [], o && (this.strict = !0), this.checkParams(e, !n && !o && !t && !i && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id, ci), e.body = this.parseBlock(!1, void 0, o && !n), e.expression = !1, this.adaptDirectivePrologue(e.body.body), this.labels = u;
|
|
1578
1638
|
}
|
|
1579
1639
|
this.exitScope();
|
|
1580
1640
|
};
|
|
1581
|
-
|
|
1641
|
+
v.isSimpleParamList = function(e) {
|
|
1582
1642
|
for (var t = 0, i = e; t < i.length; t += 1) {
|
|
1583
1643
|
var s = i[t];
|
|
1584
1644
|
if (s.type !== "Identifier")
|
|
@@ -1586,13 +1646,13 @@ S.isSimpleParamList = function(e) {
|
|
|
1586
1646
|
}
|
|
1587
1647
|
return !0;
|
|
1588
1648
|
};
|
|
1589
|
-
|
|
1649
|
+
v.checkParams = function(e, t) {
|
|
1590
1650
|
for (var i = /* @__PURE__ */ Object.create(null), s = 0, r = e.params; s < r.length; s += 1) {
|
|
1591
1651
|
var n = r[s];
|
|
1592
1652
|
this.checkLValInnerPattern(n, Et, t ? null : i);
|
|
1593
1653
|
}
|
|
1594
1654
|
};
|
|
1595
|
-
|
|
1655
|
+
v.parseExprList = function(e, t, i, s) {
|
|
1596
1656
|
for (var r = [], n = !0; !this.eat(e); ) {
|
|
1597
1657
|
if (n)
|
|
1598
1658
|
n = !1;
|
|
@@ -1603,187 +1663,187 @@ S.parseExprList = function(e, t, i, s) {
|
|
|
1603
1663
|
}
|
|
1604
1664
|
return r;
|
|
1605
1665
|
};
|
|
1606
|
-
|
|
1666
|
+
v.checkUnreserved = function(e) {
|
|
1607
1667
|
var t = e.start, i = e.end, s = e.name;
|
|
1608
1668
|
if (this.inGenerator && s === "yield" && this.raiseRecoverable(t, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && s === "await" && this.raiseRecoverable(t, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags & Ze) && s === "arguments" && this.raiseRecoverable(t, "Cannot use 'arguments' in class field initializer"), this.inClassStaticBlock && (s === "arguments" || s === "await") && this.raise(t, "Cannot use " + s + " in class static initialization block"), this.keywords.test(s) && this.raise(t, "Unexpected keyword '" + s + "'"), !(this.options.ecmaVersion < 6 && this.input.slice(t, i).indexOf("\\") !== -1)) {
|
|
1609
1669
|
var r = this.strict ? this.reservedWordsStrict : this.reservedWords;
|
|
1610
1670
|
r.test(s) && (!this.inAsync && s === "await" && this.raiseRecoverable(t, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(t, "The keyword '" + s + "' is reserved"));
|
|
1611
1671
|
}
|
|
1612
1672
|
};
|
|
1613
|
-
|
|
1673
|
+
v.parseIdent = function(e) {
|
|
1614
1674
|
var t = this.parseIdentNode();
|
|
1615
1675
|
return this.next(!!e), this.finishNode(t, "Identifier"), e || (this.checkUnreserved(t), t.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = t.start)), t;
|
|
1616
1676
|
};
|
|
1617
|
-
|
|
1677
|
+
v.parseIdentNode = function() {
|
|
1618
1678
|
var e = this.startNode();
|
|
1619
1679
|
return this.type === a.name ? e.name = this.value : this.type.keyword ? (e.name = this.type.keyword, (e.name === "class" || e.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46) && this.context.pop(), this.type = a.name) : this.unexpected(), e;
|
|
1620
1680
|
};
|
|
1621
|
-
|
|
1681
|
+
v.parsePrivateIdent = function() {
|
|
1622
1682
|
var e = this.startNode();
|
|
1623
1683
|
return this.type === a.privateId ? e.name = this.value : this.unexpected(), this.next(), this.finishNode(e, "PrivateIdentifier"), this.options.checkPrivateFields && (this.privateNameStack.length === 0 ? this.raise(e.start, "Private field '#" + e.name + "' must be declared in an enclosing class") : this.privateNameStack[this.privateNameStack.length - 1].used.push(e)), e;
|
|
1624
1684
|
};
|
|
1625
|
-
|
|
1685
|
+
v.parseYield = function(e) {
|
|
1626
1686
|
this.yieldPos || (this.yieldPos = this.start);
|
|
1627
1687
|
var t = this.startNode();
|
|
1628
1688
|
return this.next(), this.type === a.semi || this.canInsertSemicolon() || this.type !== a.star && !this.type.startsExpr ? (t.delegate = !1, t.argument = null) : (t.delegate = this.eat(a.star), t.argument = this.parseMaybeAssign(e)), this.finishNode(t, "YieldExpression");
|
|
1629
1689
|
};
|
|
1630
|
-
|
|
1690
|
+
v.parseAwait = function(e) {
|
|
1631
1691
|
this.awaitPos || (this.awaitPos = this.start);
|
|
1632
1692
|
var t = this.startNode();
|
|
1633
1693
|
return this.next(), t.argument = this.parseMaybeUnary(null, !0, !1, e), this.finishNode(t, "AwaitExpression");
|
|
1634
1694
|
};
|
|
1635
|
-
var
|
|
1636
|
-
|
|
1637
|
-
var i =
|
|
1695
|
+
var Ke = V.prototype;
|
|
1696
|
+
Ke.raise = function(e, t) {
|
|
1697
|
+
var i = ri(this.input, e);
|
|
1638
1698
|
t += " (" + i.line + ":" + i.column + ")", this.sourceFile && (t += " in " + this.sourceFile);
|
|
1639
1699
|
var s = new SyntaxError(t);
|
|
1640
1700
|
throw s.pos = e, s.loc = i, s.raisedAt = this.pos, s;
|
|
1641
1701
|
};
|
|
1642
|
-
|
|
1643
|
-
|
|
1702
|
+
Ke.raiseRecoverable = Ke.raise;
|
|
1703
|
+
Ke.curPosition = function() {
|
|
1644
1704
|
if (this.options.locations)
|
|
1645
|
-
return new
|
|
1705
|
+
return new Ne(this.curLine, this.pos - this.lineStart);
|
|
1646
1706
|
};
|
|
1647
|
-
var
|
|
1707
|
+
var ue = V.prototype, Os = function(t) {
|
|
1648
1708
|
this.flags = t, this.var = [], this.lexical = [], this.functions = [];
|
|
1649
1709
|
};
|
|
1650
|
-
|
|
1651
|
-
this.scopeStack.push(new
|
|
1710
|
+
ue.enterScope = function(e) {
|
|
1711
|
+
this.scopeStack.push(new Os(e));
|
|
1652
1712
|
};
|
|
1653
|
-
|
|
1713
|
+
ue.exitScope = function() {
|
|
1654
1714
|
this.scopeStack.pop();
|
|
1655
1715
|
};
|
|
1656
|
-
|
|
1657
|
-
return e.flags & ke || !this.inModule && e.flags &
|
|
1716
|
+
ue.treatFunctionsAsVarInScope = function(e) {
|
|
1717
|
+
return e.flags & ke || !this.inModule && e.flags & Pe;
|
|
1658
1718
|
};
|
|
1659
|
-
|
|
1719
|
+
ue.declareName = function(e, t, i) {
|
|
1660
1720
|
var s = !1;
|
|
1661
|
-
if (t ===
|
|
1721
|
+
if (t === re) {
|
|
1662
1722
|
var r = this.currentScope();
|
|
1663
|
-
s = r.lexical.indexOf(e) > -1 || r.functions.indexOf(e) > -1 || r.var.indexOf(e) > -1, r.lexical.push(e), this.inModule && r.flags &
|
|
1664
|
-
} else if (t ===
|
|
1723
|
+
s = r.lexical.indexOf(e) > -1 || r.functions.indexOf(e) > -1 || r.var.indexOf(e) > -1, r.lexical.push(e), this.inModule && r.flags & Pe && delete this.undefinedExports[e];
|
|
1724
|
+
} else if (t === li) {
|
|
1665
1725
|
var n = this.currentScope();
|
|
1666
1726
|
n.lexical.push(e);
|
|
1667
|
-
} else if (t ===
|
|
1727
|
+
} else if (t === ui) {
|
|
1668
1728
|
var o = this.currentScope();
|
|
1669
1729
|
this.treatFunctionsAsVar ? s = o.lexical.indexOf(e) > -1 : s = o.lexical.indexOf(e) > -1 || o.var.indexOf(e) > -1, o.functions.push(e);
|
|
1670
1730
|
} else
|
|
1671
1731
|
for (var l = this.scopeStack.length - 1; l >= 0; --l) {
|
|
1672
1732
|
var u = this.scopeStack[l];
|
|
1673
|
-
if (u.lexical.indexOf(e) > -1 && !(u.flags &
|
|
1733
|
+
if (u.lexical.indexOf(e) > -1 && !(u.flags & ai && u.lexical[0] === e) || !this.treatFunctionsAsVarInScope(u) && u.functions.indexOf(e) > -1) {
|
|
1674
1734
|
s = !0;
|
|
1675
1735
|
break;
|
|
1676
1736
|
}
|
|
1677
|
-
if (u.var.push(e), this.inModule && u.flags &
|
|
1737
|
+
if (u.var.push(e), this.inModule && u.flags & Pe && delete this.undefinedExports[e], u.flags & Ze)
|
|
1678
1738
|
break;
|
|
1679
1739
|
}
|
|
1680
1740
|
s && this.raiseRecoverable(i, "Identifier '" + e + "' has already been declared");
|
|
1681
1741
|
};
|
|
1682
|
-
|
|
1742
|
+
ue.checkLocalExport = function(e) {
|
|
1683
1743
|
this.scopeStack[0].lexical.indexOf(e.name) === -1 && this.scopeStack[0].var.indexOf(e.name) === -1 && (this.undefinedExports[e.name] = e);
|
|
1684
1744
|
};
|
|
1685
|
-
|
|
1745
|
+
ue.currentScope = function() {
|
|
1686
1746
|
return this.scopeStack[this.scopeStack.length - 1];
|
|
1687
1747
|
};
|
|
1688
|
-
|
|
1748
|
+
ue.currentVarScope = function() {
|
|
1689
1749
|
for (var e = this.scopeStack.length - 1; ; e--) {
|
|
1690
1750
|
var t = this.scopeStack[e];
|
|
1691
|
-
if (t.flags & (Ze | Oe |
|
|
1751
|
+
if (t.flags & (Ze | Oe | de))
|
|
1692
1752
|
return t;
|
|
1693
1753
|
}
|
|
1694
1754
|
};
|
|
1695
|
-
|
|
1755
|
+
ue.currentThisScope = function() {
|
|
1696
1756
|
for (var e = this.scopeStack.length - 1; ; e--) {
|
|
1697
1757
|
var t = this.scopeStack[e];
|
|
1698
|
-
if (t.flags & (Ze | Oe |
|
|
1758
|
+
if (t.flags & (Ze | Oe | de) && !(t.flags & Ct))
|
|
1699
1759
|
return t;
|
|
1700
1760
|
}
|
|
1701
1761
|
};
|
|
1702
|
-
var
|
|
1703
|
-
this.type = "", this.start = i, this.end = 0, t.options.locations && (this.loc = new
|
|
1704
|
-
}, Ve =
|
|
1762
|
+
var tt = function(t, i, s) {
|
|
1763
|
+
this.type = "", this.start = i, this.end = 0, t.options.locations && (this.loc = new Xe(t, s)), t.options.directSourceFile && (this.sourceFile = t.options.directSourceFile), t.options.ranges && (this.range = [i, 0]);
|
|
1764
|
+
}, Ve = V.prototype;
|
|
1705
1765
|
Ve.startNode = function() {
|
|
1706
|
-
return new
|
|
1766
|
+
return new tt(this, this.start, this.startLoc);
|
|
1707
1767
|
};
|
|
1708
1768
|
Ve.startNodeAt = function(e, t) {
|
|
1709
|
-
return new
|
|
1769
|
+
return new tt(this, e, t);
|
|
1710
1770
|
};
|
|
1711
|
-
function
|
|
1771
|
+
function pi(e, t, i, s) {
|
|
1712
1772
|
return e.type = t, e.end = i, this.options.locations && (e.loc.end = s), this.options.ranges && (e.range[1] = i), e;
|
|
1713
1773
|
}
|
|
1714
1774
|
Ve.finishNode = function(e, t) {
|
|
1715
|
-
return
|
|
1775
|
+
return pi.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc);
|
|
1716
1776
|
};
|
|
1717
1777
|
Ve.finishNodeAt = function(e, t, i, s) {
|
|
1718
|
-
return
|
|
1778
|
+
return pi.call(this, e, t, i, s);
|
|
1719
1779
|
};
|
|
1720
1780
|
Ve.copyNode = function(e) {
|
|
1721
|
-
var t = new
|
|
1781
|
+
var t = new tt(this, e.start, this.startLoc);
|
|
1722
1782
|
for (var i in e)
|
|
1723
1783
|
t[i] = e[i];
|
|
1724
1784
|
return t;
|
|
1725
1785
|
};
|
|
1726
|
-
var
|
|
1727
|
-
9:
|
|
1728
|
-
10:
|
|
1729
|
-
11:
|
|
1730
|
-
12:
|
|
1786
|
+
var Vs = "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", di = "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", mi = di + " Extended_Pictographic", gi = mi, yi = gi + " EBase EComp EMod EPres ExtPict", bi = yi, Ls = bi, Rs = {
|
|
1787
|
+
9: di,
|
|
1788
|
+
10: mi,
|
|
1789
|
+
11: gi,
|
|
1790
|
+
12: yi,
|
|
1731
1791
|
13: bi,
|
|
1732
|
-
14:
|
|
1733
|
-
},
|
|
1792
|
+
14: Ls
|
|
1793
|
+
}, Fs = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji", Ms = {
|
|
1734
1794
|
9: "",
|
|
1735
1795
|
10: "",
|
|
1736
1796
|
11: "",
|
|
1737
1797
|
12: "",
|
|
1738
1798
|
13: "",
|
|
1739
|
-
14:
|
|
1740
|
-
},
|
|
1799
|
+
14: Fs
|
|
1800
|
+
}, Wt = "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", xi = "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", vi = xi + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", _i = vi + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", Si = _i + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", ki = Si + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", Ds = ki + " " + Vs, Bs = {
|
|
1741
1801
|
9: xi,
|
|
1742
|
-
10:
|
|
1743
|
-
11:
|
|
1802
|
+
10: vi,
|
|
1803
|
+
11: _i,
|
|
1744
1804
|
12: Si,
|
|
1745
1805
|
13: ki,
|
|
1746
|
-
14:
|
|
1806
|
+
14: Ds
|
|
1747
1807
|
}, wi = {};
|
|
1748
|
-
function
|
|
1808
|
+
function js(e) {
|
|
1749
1809
|
var t = wi[e] = {
|
|
1750
|
-
binary:
|
|
1751
|
-
binaryOfStrings:
|
|
1810
|
+
binary: ae(Rs[e] + " " + Wt),
|
|
1811
|
+
binaryOfStrings: ae(Ms[e]),
|
|
1752
1812
|
nonBinary: {
|
|
1753
|
-
General_Category:
|
|
1754
|
-
Script:
|
|
1813
|
+
General_Category: ae(Wt),
|
|
1814
|
+
Script: ae(Bs[e])
|
|
1755
1815
|
}
|
|
1756
1816
|
};
|
|
1757
1817
|
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;
|
|
1758
1818
|
}
|
|
1759
|
-
for (var
|
|
1760
|
-
var
|
|
1761
|
-
|
|
1819
|
+
for (var ft = 0, Kt = [9, 10, 11, 12, 13, 14]; ft < Kt.length; ft += 1) {
|
|
1820
|
+
var $s = Kt[ft];
|
|
1821
|
+
js($s);
|
|
1762
1822
|
}
|
|
1763
|
-
var
|
|
1823
|
+
var g = V.prototype, ze = function(t, i) {
|
|
1764
1824
|
this.parent = t, this.base = i || this;
|
|
1765
1825
|
};
|
|
1766
|
-
|
|
1826
|
+
ze.prototype.separatedFrom = function(t) {
|
|
1767
1827
|
for (var i = this; i; i = i.parent)
|
|
1768
1828
|
for (var s = t; s; s = s.parent)
|
|
1769
1829
|
if (i.base === s.base && i !== s)
|
|
1770
1830
|
return !0;
|
|
1771
1831
|
return !1;
|
|
1772
1832
|
};
|
|
1773
|
-
|
|
1774
|
-
return new
|
|
1833
|
+
ze.prototype.sibling = function() {
|
|
1834
|
+
return new ze(this.parent, this.base);
|
|
1775
1835
|
};
|
|
1776
|
-
var
|
|
1836
|
+
var Y = function(t) {
|
|
1777
1837
|
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 = wi[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;
|
|
1778
1838
|
};
|
|
1779
|
-
|
|
1839
|
+
Y.prototype.reset = function(t, i, s) {
|
|
1780
1840
|
var r = s.indexOf("v") !== -1, n = s.indexOf("u") !== -1;
|
|
1781
1841
|
this.start = t | 0, this.source = i + "", this.flags = s, r && this.parser.options.ecmaVersion >= 15 ? (this.switchU = !0, this.switchV = !0, this.switchN = !0) : (this.switchU = n && this.parser.options.ecmaVersion >= 6, this.switchV = !1, this.switchN = n && this.parser.options.ecmaVersion >= 9);
|
|
1782
1842
|
};
|
|
1783
|
-
|
|
1843
|
+
Y.prototype.raise = function(t) {
|
|
1784
1844
|
this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + t);
|
|
1785
1845
|
};
|
|
1786
|
-
|
|
1846
|
+
Y.prototype.at = function(t, i) {
|
|
1787
1847
|
i === void 0 && (i = !1);
|
|
1788
1848
|
var s = this.source, r = s.length;
|
|
1789
1849
|
if (t >= r)
|
|
@@ -1794,7 +1854,7 @@ Z.prototype.at = function(t, i) {
|
|
|
1794
1854
|
var o = s.charCodeAt(t + 1);
|
|
1795
1855
|
return o >= 56320 && o <= 57343 ? (n << 10) + o - 56613888 : n;
|
|
1796
1856
|
};
|
|
1797
|
-
|
|
1857
|
+
Y.prototype.nextIndex = function(t, i) {
|
|
1798
1858
|
i === void 0 && (i = !1);
|
|
1799
1859
|
var s = this.source, r = s.length;
|
|
1800
1860
|
if (t >= r)
|
|
@@ -1802,19 +1862,19 @@ Z.prototype.nextIndex = function(t, i) {
|
|
|
1802
1862
|
var n = s.charCodeAt(t), o;
|
|
1803
1863
|
return !(i || this.switchU) || n <= 55295 || n >= 57344 || t + 1 >= r || (o = s.charCodeAt(t + 1)) < 56320 || o > 57343 ? t + 1 : t + 2;
|
|
1804
1864
|
};
|
|
1805
|
-
|
|
1865
|
+
Y.prototype.current = function(t) {
|
|
1806
1866
|
return t === void 0 && (t = !1), this.at(this.pos, t);
|
|
1807
1867
|
};
|
|
1808
|
-
|
|
1868
|
+
Y.prototype.lookahead = function(t) {
|
|
1809
1869
|
return t === void 0 && (t = !1), this.at(this.nextIndex(this.pos, t), t);
|
|
1810
1870
|
};
|
|
1811
|
-
|
|
1871
|
+
Y.prototype.advance = function(t) {
|
|
1812
1872
|
t === void 0 && (t = !1), this.pos = this.nextIndex(this.pos, t);
|
|
1813
1873
|
};
|
|
1814
|
-
|
|
1874
|
+
Y.prototype.eat = function(t, i) {
|
|
1815
1875
|
return i === void 0 && (i = !1), this.current(i) === t ? (this.advance(i), !0) : !1;
|
|
1816
1876
|
};
|
|
1817
|
-
|
|
1877
|
+
Y.prototype.eatChars = function(t, i) {
|
|
1818
1878
|
i === void 0 && (i = !1);
|
|
1819
1879
|
for (var s = this.pos, r = 0, n = t; r < n.length; r += 1) {
|
|
1820
1880
|
var o = n[r], l = this.at(s, i);
|
|
@@ -1824,22 +1884,22 @@ Z.prototype.eatChars = function(t, i) {
|
|
|
1824
1884
|
}
|
|
1825
1885
|
return this.pos = s, !0;
|
|
1826
1886
|
};
|
|
1827
|
-
|
|
1887
|
+
g.validateRegExpFlags = function(e) {
|
|
1828
1888
|
for (var t = e.validFlags, i = e.flags, s = !1, r = !1, n = 0; n < i.length; n++) {
|
|
1829
1889
|
var o = i.charAt(n);
|
|
1830
1890
|
t.indexOf(o) === -1 && this.raise(e.start, "Invalid regular expression flag"), i.indexOf(o, n + 1) > -1 && this.raise(e.start, "Duplicate regular expression flag"), o === "u" && (s = !0), o === "v" && (r = !0);
|
|
1831
1891
|
}
|
|
1832
1892
|
this.options.ecmaVersion >= 15 && s && r && this.raise(e.start, "Invalid regular expression flag");
|
|
1833
1893
|
};
|
|
1834
|
-
function
|
|
1894
|
+
function Us(e) {
|
|
1835
1895
|
for (var t in e)
|
|
1836
1896
|
return !0;
|
|
1837
1897
|
return !1;
|
|
1838
1898
|
}
|
|
1839
|
-
|
|
1840
|
-
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 &&
|
|
1899
|
+
g.validateRegExpPattern = function(e) {
|
|
1900
|
+
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && Us(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e));
|
|
1841
1901
|
};
|
|
1842
|
-
|
|
1902
|
+
g.regexp_pattern = function(e) {
|
|
1843
1903
|
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(
|
|
1844
1904
|
41
|
|
1845
1905
|
/* ) */
|
|
@@ -1855,9 +1915,9 @@ m.regexp_pattern = function(e) {
|
|
|
1855
1915
|
e.groupNames[s] || e.raise("Invalid named capture referenced");
|
|
1856
1916
|
}
|
|
1857
1917
|
};
|
|
1858
|
-
|
|
1918
|
+
g.regexp_disjunction = function(e) {
|
|
1859
1919
|
var t = this.options.ecmaVersion >= 16;
|
|
1860
|
-
for (t && (e.branchID = new
|
|
1920
|
+
for (t && (e.branchID = new ze(e.branchID, null)), this.regexp_alternative(e); e.eat(
|
|
1861
1921
|
124
|
|
1862
1922
|
/* | */
|
|
1863
1923
|
); )
|
|
@@ -1867,14 +1927,14 @@ m.regexp_disjunction = function(e) {
|
|
|
1867
1927
|
/* { */
|
|
1868
1928
|
) && e.raise("Lone quantifier brackets");
|
|
1869
1929
|
};
|
|
1870
|
-
|
|
1930
|
+
g.regexp_alternative = function(e) {
|
|
1871
1931
|
for (; e.pos < e.source.length && this.regexp_eatTerm(e); )
|
|
1872
1932
|
;
|
|
1873
1933
|
};
|
|
1874
|
-
|
|
1934
|
+
g.regexp_eatTerm = function(e) {
|
|
1875
1935
|
return this.regexp_eatAssertion(e) ? (e.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(e) && e.switchU && e.raise("Invalid quantifier"), !0) : (e.switchU ? this.regexp_eatAtom(e) : this.regexp_eatExtendedAtom(e)) ? (this.regexp_eatQuantifier(e), !0) : !1;
|
|
1876
1936
|
};
|
|
1877
|
-
|
|
1937
|
+
g.regexp_eatAssertion = function(e) {
|
|
1878
1938
|
var t = e.pos;
|
|
1879
1939
|
if (e.lastAssertionIsQuantifiable = !1, e.eat(
|
|
1880
1940
|
94
|
|
@@ -1923,13 +1983,13 @@ m.regexp_eatAssertion = function(e) {
|
|
|
1923
1983
|
}
|
|
1924
1984
|
return e.pos = t, !1;
|
|
1925
1985
|
};
|
|
1926
|
-
|
|
1986
|
+
g.regexp_eatQuantifier = function(e, t) {
|
|
1927
1987
|
return t === void 0 && (t = !1), this.regexp_eatQuantifierPrefix(e, t) ? (e.eat(
|
|
1928
1988
|
63
|
|
1929
1989
|
/* ? */
|
|
1930
1990
|
), !0) : !1;
|
|
1931
1991
|
};
|
|
1932
|
-
|
|
1992
|
+
g.regexp_eatQuantifierPrefix = function(e, t) {
|
|
1933
1993
|
return e.eat(
|
|
1934
1994
|
42
|
|
1935
1995
|
/* * */
|
|
@@ -1941,7 +2001,7 @@ m.regexp_eatQuantifierPrefix = function(e, t) {
|
|
|
1941
2001
|
/* ? */
|
|
1942
2002
|
) || this.regexp_eatBracedQuantifier(e, t);
|
|
1943
2003
|
};
|
|
1944
|
-
|
|
2004
|
+
g.regexp_eatBracedQuantifier = function(e, t) {
|
|
1945
2005
|
var i = e.pos;
|
|
1946
2006
|
if (e.eat(
|
|
1947
2007
|
123
|
|
@@ -1960,13 +2020,13 @@ m.regexp_eatBracedQuantifier = function(e, t) {
|
|
|
1960
2020
|
}
|
|
1961
2021
|
return !1;
|
|
1962
2022
|
};
|
|
1963
|
-
|
|
2023
|
+
g.regexp_eatAtom = function(e) {
|
|
1964
2024
|
return this.regexp_eatPatternCharacters(e) || e.eat(
|
|
1965
2025
|
46
|
|
1966
2026
|
/* . */
|
|
1967
2027
|
) || this.regexp_eatReverseSolidusAtomEscape(e) || this.regexp_eatCharacterClass(e) || this.regexp_eatUncapturingGroup(e) || this.regexp_eatCapturingGroup(e);
|
|
1968
2028
|
};
|
|
1969
|
-
|
|
2029
|
+
g.regexp_eatReverseSolidusAtomEscape = function(e) {
|
|
1970
2030
|
var t = e.pos;
|
|
1971
2031
|
if (e.eat(
|
|
1972
2032
|
92
|
|
@@ -1978,7 +2038,7 @@ m.regexp_eatReverseSolidusAtomEscape = function(e) {
|
|
|
1978
2038
|
}
|
|
1979
2039
|
return !1;
|
|
1980
2040
|
};
|
|
1981
|
-
|
|
2041
|
+
g.regexp_eatUncapturingGroup = function(e) {
|
|
1982
2042
|
var t = e.pos;
|
|
1983
2043
|
if (e.eat(
|
|
1984
2044
|
40
|
|
@@ -2024,7 +2084,7 @@ m.regexp_eatUncapturingGroup = function(e) {
|
|
|
2024
2084
|
}
|
|
2025
2085
|
return !1;
|
|
2026
2086
|
};
|
|
2027
|
-
|
|
2087
|
+
g.regexp_eatCapturingGroup = function(e) {
|
|
2028
2088
|
if (e.eat(
|
|
2029
2089
|
40
|
|
2030
2090
|
/* ( */
|
|
@@ -2038,40 +2098,40 @@ m.regexp_eatCapturingGroup = function(e) {
|
|
|
2038
2098
|
}
|
|
2039
2099
|
return !1;
|
|
2040
2100
|
};
|
|
2041
|
-
|
|
2042
|
-
for (var t = "", i = 0; (i = e.current()) !== -1 &&
|
|
2043
|
-
t +=
|
|
2101
|
+
g.regexp_eatModifiers = function(e) {
|
|
2102
|
+
for (var t = "", i = 0; (i = e.current()) !== -1 && qs(i); )
|
|
2103
|
+
t += ie(i), e.advance();
|
|
2044
2104
|
return t;
|
|
2045
2105
|
};
|
|
2046
|
-
function
|
|
2106
|
+
function qs(e) {
|
|
2047
2107
|
return e === 105 || e === 109 || e === 115;
|
|
2048
2108
|
}
|
|
2049
|
-
|
|
2109
|
+
g.regexp_eatExtendedAtom = function(e) {
|
|
2050
2110
|
return e.eat(
|
|
2051
2111
|
46
|
|
2052
2112
|
/* . */
|
|
2053
2113
|
) || this.regexp_eatReverseSolidusAtomEscape(e) || this.regexp_eatCharacterClass(e) || this.regexp_eatUncapturingGroup(e) || this.regexp_eatCapturingGroup(e) || this.regexp_eatInvalidBracedQuantifier(e) || this.regexp_eatExtendedPatternCharacter(e);
|
|
2054
2114
|
};
|
|
2055
|
-
|
|
2115
|
+
g.regexp_eatInvalidBracedQuantifier = function(e) {
|
|
2056
2116
|
return this.regexp_eatBracedQuantifier(e, !0) && e.raise("Nothing to repeat"), !1;
|
|
2057
2117
|
};
|
|
2058
|
-
|
|
2118
|
+
g.regexp_eatSyntaxCharacter = function(e) {
|
|
2059
2119
|
var t = e.current();
|
|
2060
|
-
return
|
|
2120
|
+
return Ci(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2061
2121
|
};
|
|
2062
|
-
function
|
|
2122
|
+
function Ci(e) {
|
|
2063
2123
|
return e === 36 || e >= 40 && e <= 43 || e === 46 || e === 63 || e >= 91 && e <= 94 || e >= 123 && e <= 125;
|
|
2064
2124
|
}
|
|
2065
|
-
|
|
2066
|
-
for (var t = e.pos, i = 0; (i = e.current()) !== -1 && !
|
|
2125
|
+
g.regexp_eatPatternCharacters = function(e) {
|
|
2126
|
+
for (var t = e.pos, i = 0; (i = e.current()) !== -1 && !Ci(i); )
|
|
2067
2127
|
e.advance();
|
|
2068
2128
|
return e.pos !== t;
|
|
2069
2129
|
};
|
|
2070
|
-
|
|
2130
|
+
g.regexp_eatExtendedPatternCharacter = function(e) {
|
|
2071
2131
|
var t = e.current();
|
|
2072
2132
|
return t !== -1 && t !== 36 && !(t >= 40 && t <= 43) && t !== 46 && t !== 63 && t !== 91 && t !== 94 && t !== 124 ? (e.advance(), !0) : !1;
|
|
2073
2133
|
};
|
|
2074
|
-
|
|
2134
|
+
g.regexp_groupSpecifier = function(e) {
|
|
2075
2135
|
if (e.eat(
|
|
2076
2136
|
63
|
|
2077
2137
|
/* ? */
|
|
@@ -2089,7 +2149,7 @@ m.regexp_groupSpecifier = function(e) {
|
|
|
2089
2149
|
t ? (i || (e.groupNames[e.lastStringValue] = [])).push(e.branchID) : e.groupNames[e.lastStringValue] = !0;
|
|
2090
2150
|
}
|
|
2091
2151
|
};
|
|
2092
|
-
|
|
2152
|
+
g.regexp_eatGroupName = function(e) {
|
|
2093
2153
|
if (e.lastStringValue = "", e.eat(
|
|
2094
2154
|
60
|
|
2095
2155
|
/* < */
|
|
@@ -2103,32 +2163,32 @@ m.regexp_eatGroupName = function(e) {
|
|
|
2103
2163
|
}
|
|
2104
2164
|
return !1;
|
|
2105
2165
|
};
|
|
2106
|
-
|
|
2166
|
+
g.regexp_eatRegExpIdentifierName = function(e) {
|
|
2107
2167
|
if (e.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(e)) {
|
|
2108
|
-
for (e.lastStringValue +=
|
|
2109
|
-
e.lastStringValue +=
|
|
2168
|
+
for (e.lastStringValue += ie(e.lastIntValue); this.regexp_eatRegExpIdentifierPart(e); )
|
|
2169
|
+
e.lastStringValue += ie(e.lastIntValue);
|
|
2110
2170
|
return !0;
|
|
2111
2171
|
}
|
|
2112
2172
|
return !1;
|
|
2113
2173
|
};
|
|
2114
|
-
|
|
2174
|
+
g.regexp_eatRegExpIdentifierStart = function(e) {
|
|
2115
2175
|
var t = e.pos, i = this.options.ecmaVersion >= 11, s = e.current(i);
|
|
2116
|
-
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue),
|
|
2176
|
+
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue), Gs(s) ? (e.lastIntValue = s, !0) : (e.pos = t, !1);
|
|
2117
2177
|
};
|
|
2118
|
-
function
|
|
2119
|
-
return
|
|
2178
|
+
function Gs(e) {
|
|
2179
|
+
return Q(e, !0) || e === 36 || e === 95;
|
|
2120
2180
|
}
|
|
2121
|
-
|
|
2181
|
+
g.regexp_eatRegExpIdentifierPart = function(e) {
|
|
2122
2182
|
var t = e.pos, i = this.options.ecmaVersion >= 11, s = e.current(i);
|
|
2123
|
-
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue),
|
|
2183
|
+
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue), Ws(s) ? (e.lastIntValue = s, !0) : (e.pos = t, !1);
|
|
2124
2184
|
};
|
|
2125
|
-
function
|
|
2126
|
-
return
|
|
2185
|
+
function Ws(e) {
|
|
2186
|
+
return oe(e, !0) || e === 36 || e === 95 || e === 8204 || e === 8205;
|
|
2127
2187
|
}
|
|
2128
|
-
|
|
2188
|
+
g.regexp_eatAtomEscape = function(e) {
|
|
2129
2189
|
return this.regexp_eatBackReference(e) || this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e) || e.switchN && this.regexp_eatKGroupName(e) ? !0 : (e.switchU && (e.current() === 99 && e.raise("Invalid unicode escape"), e.raise("Invalid escape")), !1);
|
|
2130
2190
|
};
|
|
2131
|
-
|
|
2191
|
+
g.regexp_eatBackReference = function(e) {
|
|
2132
2192
|
var t = e.pos;
|
|
2133
2193
|
if (this.regexp_eatDecimalEscape(e)) {
|
|
2134
2194
|
var i = e.lastIntValue;
|
|
@@ -2140,7 +2200,7 @@ m.regexp_eatBackReference = function(e) {
|
|
|
2140
2200
|
}
|
|
2141
2201
|
return !1;
|
|
2142
2202
|
};
|
|
2143
|
-
|
|
2203
|
+
g.regexp_eatKGroupName = function(e) {
|
|
2144
2204
|
if (e.eat(
|
|
2145
2205
|
107
|
|
2146
2206
|
/* k */
|
|
@@ -2151,10 +2211,10 @@ m.regexp_eatKGroupName = function(e) {
|
|
|
2151
2211
|
}
|
|
2152
2212
|
return !1;
|
|
2153
2213
|
};
|
|
2154
|
-
|
|
2214
|
+
g.regexp_eatCharacterEscape = function(e) {
|
|
2155
2215
|
return this.regexp_eatControlEscape(e) || this.regexp_eatCControlLetter(e) || this.regexp_eatZero(e) || this.regexp_eatHexEscapeSequence(e) || this.regexp_eatRegExpUnicodeEscapeSequence(e, !1) || !e.switchU && this.regexp_eatLegacyOctalEscapeSequence(e) || this.regexp_eatIdentityEscape(e);
|
|
2156
2216
|
};
|
|
2157
|
-
|
|
2217
|
+
g.regexp_eatCControlLetter = function(e) {
|
|
2158
2218
|
var t = e.pos;
|
|
2159
2219
|
if (e.eat(
|
|
2160
2220
|
99
|
|
@@ -2166,21 +2226,21 @@ m.regexp_eatCControlLetter = function(e) {
|
|
|
2166
2226
|
}
|
|
2167
2227
|
return !1;
|
|
2168
2228
|
};
|
|
2169
|
-
|
|
2170
|
-
return e.current() === 48 && !
|
|
2229
|
+
g.regexp_eatZero = function(e) {
|
|
2230
|
+
return e.current() === 48 && !it(e.lookahead()) ? (e.lastIntValue = 0, e.advance(), !0) : !1;
|
|
2171
2231
|
};
|
|
2172
|
-
|
|
2232
|
+
g.regexp_eatControlEscape = function(e) {
|
|
2173
2233
|
var t = e.current();
|
|
2174
2234
|
return t === 116 ? (e.lastIntValue = 9, e.advance(), !0) : t === 110 ? (e.lastIntValue = 10, e.advance(), !0) : t === 118 ? (e.lastIntValue = 11, e.advance(), !0) : t === 102 ? (e.lastIntValue = 12, e.advance(), !0) : t === 114 ? (e.lastIntValue = 13, e.advance(), !0) : !1;
|
|
2175
2235
|
};
|
|
2176
|
-
|
|
2236
|
+
g.regexp_eatControlLetter = function(e) {
|
|
2177
2237
|
var t = e.current();
|
|
2178
|
-
return
|
|
2238
|
+
return Ai(t) ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
2179
2239
|
};
|
|
2180
|
-
function
|
|
2240
|
+
function Ai(e) {
|
|
2181
2241
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
2182
2242
|
}
|
|
2183
|
-
|
|
2243
|
+
g.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
2184
2244
|
t === void 0 && (t = !1);
|
|
2185
2245
|
var i = e.pos, s = t || e.switchU;
|
|
2186
2246
|
if (e.eat(
|
|
@@ -2212,16 +2272,16 @@ m.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
|
2212
2272
|
) && this.regexp_eatHexDigits(e) && e.eat(
|
|
2213
2273
|
125
|
|
2214
2274
|
/* } */
|
|
2215
|
-
) &&
|
|
2275
|
+
) && Ks(e.lastIntValue))
|
|
2216
2276
|
return !0;
|
|
2217
2277
|
s && e.raise("Invalid unicode escape"), e.pos = i;
|
|
2218
2278
|
}
|
|
2219
2279
|
return !1;
|
|
2220
2280
|
};
|
|
2221
|
-
function
|
|
2281
|
+
function Ks(e) {
|
|
2222
2282
|
return e >= 0 && e <= 1114111;
|
|
2223
2283
|
}
|
|
2224
|
-
|
|
2284
|
+
g.regexp_eatIdentityEscape = function(e) {
|
|
2225
2285
|
if (e.switchU)
|
|
2226
2286
|
return this.regexp_eatSyntaxCharacter(e) ? !0 : e.eat(
|
|
2227
2287
|
47
|
|
@@ -2230,7 +2290,7 @@ m.regexp_eatIdentityEscape = function(e) {
|
|
|
2230
2290
|
var t = e.current();
|
|
2231
2291
|
return t !== 99 && (!e.switchN || t !== 107) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2232
2292
|
};
|
|
2233
|
-
|
|
2293
|
+
g.regexp_eatDecimalEscape = function(e) {
|
|
2234
2294
|
e.lastIntValue = 0;
|
|
2235
2295
|
var t = e.current();
|
|
2236
2296
|
if (t >= 49 && t <= 57) {
|
|
@@ -2241,11 +2301,11 @@ m.regexp_eatDecimalEscape = function(e) {
|
|
|
2241
2301
|
}
|
|
2242
2302
|
return !1;
|
|
2243
2303
|
};
|
|
2244
|
-
var Ei = 0,
|
|
2245
|
-
|
|
2304
|
+
var Ei = 0, se = 1, K = 2;
|
|
2305
|
+
g.regexp_eatCharacterClassEscape = function(e) {
|
|
2246
2306
|
var t = e.current();
|
|
2247
|
-
if (
|
|
2248
|
-
return e.lastIntValue = -1, e.advance(),
|
|
2307
|
+
if (zs(t))
|
|
2308
|
+
return e.lastIntValue = -1, e.advance(), se;
|
|
2249
2309
|
var i = !1;
|
|
2250
2310
|
if (e.switchU && this.options.ecmaVersion >= 9 && ((i = t === 80) || t === 112)) {
|
|
2251
2311
|
e.lastIntValue = -1, e.advance();
|
|
@@ -2257,15 +2317,15 @@ m.regexp_eatCharacterClassEscape = function(e) {
|
|
|
2257
2317
|
125
|
|
2258
2318
|
/* } */
|
|
2259
2319
|
))
|
|
2260
|
-
return i && s ===
|
|
2320
|
+
return i && s === K && e.raise("Invalid property name"), s;
|
|
2261
2321
|
e.raise("Invalid property name");
|
|
2262
2322
|
}
|
|
2263
2323
|
return Ei;
|
|
2264
2324
|
};
|
|
2265
|
-
function
|
|
2325
|
+
function zs(e) {
|
|
2266
2326
|
return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87;
|
|
2267
2327
|
}
|
|
2268
|
-
|
|
2328
|
+
g.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
2269
2329
|
var t = e.pos;
|
|
2270
2330
|
if (this.regexp_eatUnicodePropertyName(e) && e.eat(
|
|
2271
2331
|
61
|
|
@@ -2274,7 +2334,7 @@ m.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
|
2274
2334
|
var i = e.lastStringValue;
|
|
2275
2335
|
if (this.regexp_eatUnicodePropertyValue(e)) {
|
|
2276
2336
|
var s = e.lastStringValue;
|
|
2277
|
-
return this.regexp_validateUnicodePropertyNameAndValue(e, i, s),
|
|
2337
|
+
return this.regexp_validateUnicodePropertyNameAndValue(e, i, s), se;
|
|
2278
2338
|
}
|
|
2279
2339
|
}
|
|
2280
2340
|
if (e.pos = t, this.regexp_eatLoneUnicodePropertyNameOrValue(e)) {
|
|
@@ -2283,38 +2343,38 @@ m.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
|
2283
2343
|
}
|
|
2284
2344
|
return Ei;
|
|
2285
2345
|
};
|
|
2286
|
-
|
|
2346
|
+
g.regexp_validateUnicodePropertyNameAndValue = function(e, t, i) {
|
|
2287
2347
|
Se(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(i) || e.raise("Invalid property value");
|
|
2288
2348
|
};
|
|
2289
|
-
|
|
2349
|
+
g.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
2290
2350
|
if (e.unicodeProperties.binary.test(t))
|
|
2291
|
-
return
|
|
2351
|
+
return se;
|
|
2292
2352
|
if (e.switchV && e.unicodeProperties.binaryOfStrings.test(t))
|
|
2293
|
-
return
|
|
2353
|
+
return K;
|
|
2294
2354
|
e.raise("Invalid property name");
|
|
2295
2355
|
};
|
|
2296
|
-
|
|
2356
|
+
g.regexp_eatUnicodePropertyName = function(e) {
|
|
2297
2357
|
var t = 0;
|
|
2298
|
-
for (e.lastStringValue = "";
|
|
2299
|
-
e.lastStringValue +=
|
|
2358
|
+
for (e.lastStringValue = ""; Ii(t = e.current()); )
|
|
2359
|
+
e.lastStringValue += ie(t), e.advance();
|
|
2300
2360
|
return e.lastStringValue !== "";
|
|
2301
2361
|
};
|
|
2302
|
-
function
|
|
2303
|
-
return
|
|
2362
|
+
function Ii(e) {
|
|
2363
|
+
return Ai(e) || e === 95;
|
|
2304
2364
|
}
|
|
2305
|
-
|
|
2365
|
+
g.regexp_eatUnicodePropertyValue = function(e) {
|
|
2306
2366
|
var t = 0;
|
|
2307
|
-
for (e.lastStringValue = "";
|
|
2308
|
-
e.lastStringValue +=
|
|
2367
|
+
for (e.lastStringValue = ""; Js(t = e.current()); )
|
|
2368
|
+
e.lastStringValue += ie(t), e.advance();
|
|
2309
2369
|
return e.lastStringValue !== "";
|
|
2310
2370
|
};
|
|
2311
|
-
function
|
|
2312
|
-
return
|
|
2371
|
+
function Js(e) {
|
|
2372
|
+
return Ii(e) || it(e);
|
|
2313
2373
|
}
|
|
2314
|
-
|
|
2374
|
+
g.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
2315
2375
|
return this.regexp_eatUnicodePropertyValue(e);
|
|
2316
2376
|
};
|
|
2317
|
-
|
|
2377
|
+
g.regexp_eatCharacterClass = function(e) {
|
|
2318
2378
|
if (e.eat(
|
|
2319
2379
|
91
|
|
2320
2380
|
/* [ */
|
|
@@ -2326,14 +2386,14 @@ m.regexp_eatCharacterClass = function(e) {
|
|
|
2326
2386
|
return e.eat(
|
|
2327
2387
|
93
|
|
2328
2388
|
/* ] */
|
|
2329
|
-
) || e.raise("Unterminated character class"), t && i ===
|
|
2389
|
+
) || e.raise("Unterminated character class"), t && i === K && e.raise("Negated character class may contain strings"), !0;
|
|
2330
2390
|
}
|
|
2331
2391
|
return !1;
|
|
2332
2392
|
};
|
|
2333
|
-
|
|
2334
|
-
return e.current() === 93 ?
|
|
2393
|
+
g.regexp_classContents = function(e) {
|
|
2394
|
+
return e.current() === 93 ? se : e.switchV ? this.regexp_classSetExpression(e) : (this.regexp_nonEmptyClassRanges(e), se);
|
|
2335
2395
|
};
|
|
2336
|
-
|
|
2396
|
+
g.regexp_nonEmptyClassRanges = function(e) {
|
|
2337
2397
|
for (; this.regexp_eatClassAtom(e); ) {
|
|
2338
2398
|
var t = e.lastIntValue;
|
|
2339
2399
|
if (e.eat(
|
|
@@ -2345,7 +2405,7 @@ m.regexp_nonEmptyClassRanges = function(e) {
|
|
|
2345
2405
|
}
|
|
2346
2406
|
}
|
|
2347
2407
|
};
|
|
2348
|
-
|
|
2408
|
+
g.regexp_eatClassAtom = function(e) {
|
|
2349
2409
|
var t = e.pos;
|
|
2350
2410
|
if (e.eat(
|
|
2351
2411
|
92
|
|
@@ -2355,14 +2415,14 @@ m.regexp_eatClassAtom = function(e) {
|
|
|
2355
2415
|
return !0;
|
|
2356
2416
|
if (e.switchU) {
|
|
2357
2417
|
var i = e.current();
|
|
2358
|
-
(i === 99 ||
|
|
2418
|
+
(i === 99 || Ti(i)) && e.raise("Invalid class escape"), e.raise("Invalid escape");
|
|
2359
2419
|
}
|
|
2360
2420
|
e.pos = t;
|
|
2361
2421
|
}
|
|
2362
2422
|
var s = e.current();
|
|
2363
2423
|
return s !== 93 ? (e.lastIntValue = s, e.advance(), !0) : !1;
|
|
2364
2424
|
};
|
|
2365
|
-
|
|
2425
|
+
g.regexp_eatClassEscape = function(e) {
|
|
2366
2426
|
var t = e.pos;
|
|
2367
2427
|
if (e.eat(
|
|
2368
2428
|
98
|
|
@@ -2384,16 +2444,16 @@ m.regexp_eatClassEscape = function(e) {
|
|
|
2384
2444
|
}
|
|
2385
2445
|
return this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e);
|
|
2386
2446
|
};
|
|
2387
|
-
|
|
2388
|
-
var t =
|
|
2447
|
+
g.regexp_classSetExpression = function(e) {
|
|
2448
|
+
var t = se, i;
|
|
2389
2449
|
if (!this.regexp_eatClassSetRange(e)) if (i = this.regexp_eatClassSetOperand(e)) {
|
|
2390
|
-
i ===
|
|
2450
|
+
i === K && (t = K);
|
|
2391
2451
|
for (var s = e.pos; e.eatChars(
|
|
2392
2452
|
[38, 38]
|
|
2393
2453
|
/* && */
|
|
2394
2454
|
); ) {
|
|
2395
2455
|
if (e.current() !== 38 && (i = this.regexp_eatClassSetOperand(e))) {
|
|
2396
|
-
i !==
|
|
2456
|
+
i !== K && (t = se);
|
|
2397
2457
|
continue;
|
|
2398
2458
|
}
|
|
2399
2459
|
e.raise("Invalid character in character class");
|
|
@@ -2413,10 +2473,10 @@ m.regexp_classSetExpression = function(e) {
|
|
|
2413
2473
|
if (!this.regexp_eatClassSetRange(e)) {
|
|
2414
2474
|
if (i = this.regexp_eatClassSetOperand(e), !i)
|
|
2415
2475
|
return t;
|
|
2416
|
-
i ===
|
|
2476
|
+
i === K && (t = K);
|
|
2417
2477
|
}
|
|
2418
2478
|
};
|
|
2419
|
-
|
|
2479
|
+
g.regexp_eatClassSetRange = function(e) {
|
|
2420
2480
|
var t = e.pos;
|
|
2421
2481
|
if (this.regexp_eatClassSetCharacter(e)) {
|
|
2422
2482
|
var i = e.lastIntValue;
|
|
@@ -2431,10 +2491,10 @@ m.regexp_eatClassSetRange = function(e) {
|
|
|
2431
2491
|
}
|
|
2432
2492
|
return !1;
|
|
2433
2493
|
};
|
|
2434
|
-
|
|
2435
|
-
return this.regexp_eatClassSetCharacter(e) ?
|
|
2494
|
+
g.regexp_eatClassSetOperand = function(e) {
|
|
2495
|
+
return this.regexp_eatClassSetCharacter(e) ? se : this.regexp_eatClassStringDisjunction(e) || this.regexp_eatNestedClass(e);
|
|
2436
2496
|
};
|
|
2437
|
-
|
|
2497
|
+
g.regexp_eatNestedClass = function(e) {
|
|
2438
2498
|
var t = e.pos;
|
|
2439
2499
|
if (e.eat(
|
|
2440
2500
|
91
|
|
@@ -2448,7 +2508,7 @@ m.regexp_eatNestedClass = function(e) {
|
|
|
2448
2508
|
93
|
|
2449
2509
|
/* ] */
|
|
2450
2510
|
))
|
|
2451
|
-
return i && s ===
|
|
2511
|
+
return i && s === K && e.raise("Negated character class may contain strings"), s;
|
|
2452
2512
|
e.pos = t;
|
|
2453
2513
|
}
|
|
2454
2514
|
if (e.eat(
|
|
@@ -2462,7 +2522,7 @@ m.regexp_eatNestedClass = function(e) {
|
|
|
2462
2522
|
}
|
|
2463
2523
|
return null;
|
|
2464
2524
|
};
|
|
2465
|
-
|
|
2525
|
+
g.regexp_eatClassStringDisjunction = function(e) {
|
|
2466
2526
|
var t = e.pos;
|
|
2467
2527
|
if (e.eatChars(
|
|
2468
2528
|
[92, 113]
|
|
@@ -2484,20 +2544,20 @@ m.regexp_eatClassStringDisjunction = function(e) {
|
|
|
2484
2544
|
}
|
|
2485
2545
|
return null;
|
|
2486
2546
|
};
|
|
2487
|
-
|
|
2547
|
+
g.regexp_classStringDisjunctionContents = function(e) {
|
|
2488
2548
|
for (var t = this.regexp_classString(e); e.eat(
|
|
2489
2549
|
124
|
|
2490
2550
|
/* | */
|
|
2491
2551
|
); )
|
|
2492
|
-
this.regexp_classString(e) ===
|
|
2552
|
+
this.regexp_classString(e) === K && (t = K);
|
|
2493
2553
|
return t;
|
|
2494
2554
|
};
|
|
2495
|
-
|
|
2555
|
+
g.regexp_classString = function(e) {
|
|
2496
2556
|
for (var t = 0; this.regexp_eatClassSetCharacter(e); )
|
|
2497
2557
|
t++;
|
|
2498
|
-
return t === 1 ?
|
|
2558
|
+
return t === 1 ? se : K;
|
|
2499
2559
|
};
|
|
2500
|
-
|
|
2560
|
+
g.regexp_eatClassSetCharacter = function(e) {
|
|
2501
2561
|
var t = e.pos;
|
|
2502
2562
|
if (e.eat(
|
|
2503
2563
|
92
|
|
@@ -2508,26 +2568,26 @@ m.regexp_eatClassSetCharacter = function(e) {
|
|
|
2508
2568
|
/* b */
|
|
2509
2569
|
) ? (e.lastIntValue = 8, !0) : (e.pos = t, !1);
|
|
2510
2570
|
var i = e.current();
|
|
2511
|
-
return i < 0 || i === e.lookahead() &&
|
|
2571
|
+
return i < 0 || i === e.lookahead() && Hs(i) || Qs(i) ? !1 : (e.advance(), e.lastIntValue = i, !0);
|
|
2512
2572
|
};
|
|
2513
|
-
function
|
|
2573
|
+
function Hs(e) {
|
|
2514
2574
|
return e === 33 || e >= 35 && e <= 38 || e >= 42 && e <= 44 || e === 46 || e >= 58 && e <= 64 || e === 94 || e === 96 || e === 126;
|
|
2515
2575
|
}
|
|
2516
|
-
function
|
|
2576
|
+
function Qs(e) {
|
|
2517
2577
|
return e === 40 || e === 41 || e === 45 || e === 47 || e >= 91 && e <= 93 || e >= 123 && e <= 125;
|
|
2518
2578
|
}
|
|
2519
|
-
|
|
2579
|
+
g.regexp_eatClassSetReservedPunctuator = function(e) {
|
|
2520
2580
|
var t = e.current();
|
|
2521
|
-
return
|
|
2581
|
+
return Xs(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2522
2582
|
};
|
|
2523
|
-
function
|
|
2583
|
+
function Xs(e) {
|
|
2524
2584
|
return e === 33 || e === 35 || e === 37 || e === 38 || e === 44 || e === 45 || e >= 58 && e <= 62 || e === 64 || e === 96 || e === 126;
|
|
2525
2585
|
}
|
|
2526
|
-
|
|
2586
|
+
g.regexp_eatClassControlLetter = function(e) {
|
|
2527
2587
|
var t = e.current();
|
|
2528
|
-
return
|
|
2588
|
+
return it(t) || t === 95 ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
2529
2589
|
};
|
|
2530
|
-
|
|
2590
|
+
g.regexp_eatHexEscapeSequence = function(e) {
|
|
2531
2591
|
var t = e.pos;
|
|
2532
2592
|
if (e.eat(
|
|
2533
2593
|
120
|
|
@@ -2539,28 +2599,28 @@ m.regexp_eatHexEscapeSequence = function(e) {
|
|
|
2539
2599
|
}
|
|
2540
2600
|
return !1;
|
|
2541
2601
|
};
|
|
2542
|
-
|
|
2602
|
+
g.regexp_eatDecimalDigits = function(e) {
|
|
2543
2603
|
var t = e.pos, i = 0;
|
|
2544
|
-
for (e.lastIntValue = 0;
|
|
2604
|
+
for (e.lastIntValue = 0; it(i = e.current()); )
|
|
2545
2605
|
e.lastIntValue = 10 * e.lastIntValue + (i - 48), e.advance();
|
|
2546
2606
|
return e.pos !== t;
|
|
2547
2607
|
};
|
|
2548
|
-
function
|
|
2608
|
+
function it(e) {
|
|
2549
2609
|
return e >= 48 && e <= 57;
|
|
2550
2610
|
}
|
|
2551
|
-
|
|
2611
|
+
g.regexp_eatHexDigits = function(e) {
|
|
2552
2612
|
var t = e.pos, i = 0;
|
|
2553
|
-
for (e.lastIntValue = 0;
|
|
2554
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
2613
|
+
for (e.lastIntValue = 0; Ni(i = e.current()); )
|
|
2614
|
+
e.lastIntValue = 16 * e.lastIntValue + Pi(i), e.advance();
|
|
2555
2615
|
return e.pos !== t;
|
|
2556
2616
|
};
|
|
2557
|
-
function
|
|
2617
|
+
function Ni(e) {
|
|
2558
2618
|
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
2559
2619
|
}
|
|
2560
|
-
function
|
|
2620
|
+
function Pi(e) {
|
|
2561
2621
|
return e >= 65 && e <= 70 ? 10 + (e - 65) : e >= 97 && e <= 102 ? 10 + (e - 97) : e - 48;
|
|
2562
2622
|
}
|
|
2563
|
-
|
|
2623
|
+
g.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
2564
2624
|
if (this.regexp_eatOctalDigit(e)) {
|
|
2565
2625
|
var t = e.lastIntValue;
|
|
2566
2626
|
if (this.regexp_eatOctalDigit(e)) {
|
|
@@ -2572,34 +2632,34 @@ m.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
|
2572
2632
|
}
|
|
2573
2633
|
return !1;
|
|
2574
2634
|
};
|
|
2575
|
-
|
|
2635
|
+
g.regexp_eatOctalDigit = function(e) {
|
|
2576
2636
|
var t = e.current();
|
|
2577
|
-
return
|
|
2637
|
+
return Ti(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1);
|
|
2578
2638
|
};
|
|
2579
|
-
function
|
|
2639
|
+
function Ti(e) {
|
|
2580
2640
|
return e >= 48 && e <= 55;
|
|
2581
2641
|
}
|
|
2582
|
-
|
|
2642
|
+
g.regexp_eatFixedHexDigits = function(e, t) {
|
|
2583
2643
|
var i = e.pos;
|
|
2584
2644
|
e.lastIntValue = 0;
|
|
2585
2645
|
for (var s = 0; s < t; ++s) {
|
|
2586
2646
|
var r = e.current();
|
|
2587
|
-
if (!
|
|
2647
|
+
if (!Ni(r))
|
|
2588
2648
|
return e.pos = i, !1;
|
|
2589
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
2649
|
+
e.lastIntValue = 16 * e.lastIntValue + Pi(r), e.advance();
|
|
2590
2650
|
}
|
|
2591
2651
|
return !0;
|
|
2592
2652
|
};
|
|
2593
|
-
var
|
|
2594
|
-
this.type = t.type, this.value = t.value, this.start = t.start, this.end = t.end, t.options.locations && (this.loc = new
|
|
2595
|
-
},
|
|
2596
|
-
|
|
2597
|
-
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new
|
|
2653
|
+
var Nt = function(t) {
|
|
2654
|
+
this.type = t.type, this.value = t.value, this.start = t.start, this.end = t.end, t.options.locations && (this.loc = new Xe(t, t.startLoc, t.endLoc)), t.options.ranges && (this.range = [t.start, t.end]);
|
|
2655
|
+
}, S = V.prototype;
|
|
2656
|
+
S.next = function(e) {
|
|
2657
|
+
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new Nt(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
2598
2658
|
};
|
|
2599
|
-
|
|
2600
|
-
return this.next(), new
|
|
2659
|
+
S.getToken = function() {
|
|
2660
|
+
return this.next(), new Nt(this);
|
|
2601
2661
|
};
|
|
2602
|
-
typeof Symbol < "u" && (
|
|
2662
|
+
typeof Symbol < "u" && (S[Symbol.iterator] = function() {
|
|
2603
2663
|
var e = this;
|
|
2604
2664
|
return {
|
|
2605
2665
|
next: function() {
|
|
@@ -2611,7 +2671,7 @@ typeof Symbol < "u" && (k[Symbol.iterator] = function() {
|
|
|
2611
2671
|
}
|
|
2612
2672
|
};
|
|
2613
2673
|
});
|
|
2614
|
-
|
|
2674
|
+
S.nextToken = function() {
|
|
2615
2675
|
var e = this.curContext();
|
|
2616
2676
|
if ((!e || !e.preserveSpace) && this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length)
|
|
2617
2677
|
return this.finishToken(a.eof);
|
|
@@ -2619,20 +2679,20 @@ k.nextToken = function() {
|
|
|
2619
2679
|
return e.override(this);
|
|
2620
2680
|
this.readToken(this.fullCharCodeAtPos());
|
|
2621
2681
|
};
|
|
2622
|
-
|
|
2623
|
-
return
|
|
2682
|
+
S.readToken = function(e) {
|
|
2683
|
+
return Q(e, this.options.ecmaVersion >= 6) || e === 92 ? this.readWord() : this.getTokenFromCode(e);
|
|
2624
2684
|
};
|
|
2625
|
-
|
|
2685
|
+
S.fullCharCodeAtPos = function() {
|
|
2626
2686
|
var e = this.input.charCodeAt(this.pos);
|
|
2627
2687
|
if (e <= 55295 || e >= 56320)
|
|
2628
2688
|
return e;
|
|
2629
2689
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
2630
2690
|
return t <= 56319 || t >= 57344 ? e : (e << 10) + t - 56613888;
|
|
2631
2691
|
};
|
|
2632
|
-
|
|
2692
|
+
S.skipBlockComment = function() {
|
|
2633
2693
|
var e = this.options.onComment && this.curPosition(), t = this.pos, i = this.input.indexOf("*/", this.pos += 2);
|
|
2634
2694
|
if (i === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = i + 2, this.options.locations)
|
|
2635
|
-
for (var s = void 0, r = t; (s =
|
|
2695
|
+
for (var s = void 0, r = t; (s = ti(this.input, r, this.pos)) > -1; )
|
|
2636
2696
|
++this.curLine, r = this.lineStart = s;
|
|
2637
2697
|
this.options.onComment && this.options.onComment(
|
|
2638
2698
|
!0,
|
|
@@ -2643,8 +2703,8 @@ k.skipBlockComment = function() {
|
|
|
2643
2703
|
this.curPosition()
|
|
2644
2704
|
);
|
|
2645
2705
|
};
|
|
2646
|
-
|
|
2647
|
-
for (var t = this.pos, i = this.options.onComment && this.curPosition(), s = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !
|
|
2706
|
+
S.skipLineComment = function(e) {
|
|
2707
|
+
for (var t = this.pos, i = this.options.onComment && this.curPosition(), s = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !_e(s); )
|
|
2648
2708
|
s = this.input.charCodeAt(++this.pos);
|
|
2649
2709
|
this.options.onComment && this.options.onComment(
|
|
2650
2710
|
!1,
|
|
@@ -2655,7 +2715,7 @@ k.skipLineComment = function(e) {
|
|
|
2655
2715
|
this.curPosition()
|
|
2656
2716
|
);
|
|
2657
2717
|
};
|
|
2658
|
-
|
|
2718
|
+
S.skipSpace = function() {
|
|
2659
2719
|
e: for (; this.pos < this.input.length; ) {
|
|
2660
2720
|
var e = this.input.charCodeAt(this.pos);
|
|
2661
2721
|
switch (e) {
|
|
@@ -2683,34 +2743,34 @@ k.skipSpace = function() {
|
|
|
2683
2743
|
}
|
|
2684
2744
|
break;
|
|
2685
2745
|
default:
|
|
2686
|
-
if (e > 8 && e < 14 || e >= 5760 &&
|
|
2746
|
+
if (e > 8 && e < 14 || e >= 5760 && ii.test(String.fromCharCode(e)))
|
|
2687
2747
|
++this.pos;
|
|
2688
2748
|
else
|
|
2689
2749
|
break e;
|
|
2690
2750
|
}
|
|
2691
2751
|
}
|
|
2692
2752
|
};
|
|
2693
|
-
|
|
2753
|
+
S.finishToken = function(e, t) {
|
|
2694
2754
|
this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
|
|
2695
2755
|
var i = this.type;
|
|
2696
2756
|
this.type = e, this.value = t, this.updateContext(i);
|
|
2697
2757
|
};
|
|
2698
|
-
|
|
2758
|
+
S.readToken_dot = function() {
|
|
2699
2759
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2700
2760
|
if (e >= 48 && e <= 57)
|
|
2701
2761
|
return this.readNumber(!0);
|
|
2702
2762
|
var t = this.input.charCodeAt(this.pos + 2);
|
|
2703
2763
|
return this.options.ecmaVersion >= 6 && e === 46 && t === 46 ? (this.pos += 3, this.finishToken(a.ellipsis)) : (++this.pos, this.finishToken(a.dot));
|
|
2704
2764
|
};
|
|
2705
|
-
|
|
2765
|
+
S.readToken_slash = function() {
|
|
2706
2766
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2707
2767
|
return this.exprAllowed ? (++this.pos, this.readRegexp()) : e === 61 ? this.finishOp(a.assign, 2) : this.finishOp(a.slash, 1);
|
|
2708
2768
|
};
|
|
2709
|
-
|
|
2769
|
+
S.readToken_mult_modulo_exp = function(e) {
|
|
2710
2770
|
var t = this.input.charCodeAt(this.pos + 1), i = 1, s = e === 42 ? a.star : a.modulo;
|
|
2711
2771
|
return this.options.ecmaVersion >= 7 && e === 42 && t === 42 && (++i, s = a.starstar, t = this.input.charCodeAt(this.pos + 2)), t === 61 ? this.finishOp(a.assign, i + 1) : this.finishOp(s, i);
|
|
2712
2772
|
};
|
|
2713
|
-
|
|
2773
|
+
S.readToken_pipe_amp = function(e) {
|
|
2714
2774
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
2715
2775
|
if (t === e) {
|
|
2716
2776
|
if (this.options.ecmaVersion >= 12) {
|
|
@@ -2722,23 +2782,23 @@ k.readToken_pipe_amp = function(e) {
|
|
|
2722
2782
|
}
|
|
2723
2783
|
return t === 61 ? this.finishOp(a.assign, 2) : this.finishOp(e === 124 ? a.bitwiseOR : a.bitwiseAND, 1);
|
|
2724
2784
|
};
|
|
2725
|
-
|
|
2785
|
+
S.readToken_caret = function() {
|
|
2726
2786
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2727
2787
|
return e === 61 ? this.finishOp(a.assign, 2) : this.finishOp(a.bitwiseXOR, 1);
|
|
2728
2788
|
};
|
|
2729
|
-
|
|
2789
|
+
S.readToken_plus_min = function(e) {
|
|
2730
2790
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
2731
|
-
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 ||
|
|
2791
|
+
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || B.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(a.incDec, 2) : t === 61 ? this.finishOp(a.assign, 2) : this.finishOp(a.plusMin, 1);
|
|
2732
2792
|
};
|
|
2733
|
-
|
|
2793
|
+
S.readToken_lt_gt = function(e) {
|
|
2734
2794
|
var t = this.input.charCodeAt(this.pos + 1), i = 1;
|
|
2735
2795
|
return t === e ? (i = e === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2, this.input.charCodeAt(this.pos + i) === 61 ? this.finishOp(a.assign, i + 1) : this.finishOp(a.bitShift, i)) : t === 33 && e === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45 ? (this.skipLineComment(4), this.skipSpace(), this.nextToken()) : (t === 61 && (i = 2), this.finishOp(a.relational, i));
|
|
2736
2796
|
};
|
|
2737
|
-
|
|
2797
|
+
S.readToken_eq_excl = function(e) {
|
|
2738
2798
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
2739
2799
|
return t === 61 ? this.finishOp(a.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) : e === 61 && t === 62 && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(a.arrow)) : this.finishOp(e === 61 ? a.eq : a.prefix, 1);
|
|
2740
2800
|
};
|
|
2741
|
-
|
|
2801
|
+
S.readToken_question = function() {
|
|
2742
2802
|
var e = this.options.ecmaVersion;
|
|
2743
2803
|
if (e >= 11) {
|
|
2744
2804
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
@@ -2758,13 +2818,13 @@ k.readToken_question = function() {
|
|
|
2758
2818
|
}
|
|
2759
2819
|
return this.finishOp(a.question, 1);
|
|
2760
2820
|
};
|
|
2761
|
-
|
|
2821
|
+
S.readToken_numberSign = function() {
|
|
2762
2822
|
var e = this.options.ecmaVersion, t = 35;
|
|
2763
|
-
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(),
|
|
2823
|
+
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(), Q(t, !0) || t === 92))
|
|
2764
2824
|
return this.finishToken(a.privateId, this.readWord1());
|
|
2765
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
2825
|
+
this.raise(this.pos, "Unexpected character '" + ie(t) + "'");
|
|
2766
2826
|
};
|
|
2767
|
-
|
|
2827
|
+
S.getTokenFromCode = function(e) {
|
|
2768
2828
|
switch (e) {
|
|
2769
2829
|
// The interpretation of a dot depends on whether it is followed
|
|
2770
2830
|
// by a digit or another two dots.
|
|
@@ -2849,17 +2909,17 @@ k.getTokenFromCode = function(e) {
|
|
|
2849
2909
|
case 35:
|
|
2850
2910
|
return this.readToken_numberSign();
|
|
2851
2911
|
}
|
|
2852
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
2912
|
+
this.raise(this.pos, "Unexpected character '" + ie(e) + "'");
|
|
2853
2913
|
};
|
|
2854
|
-
|
|
2914
|
+
S.finishOp = function(e, t) {
|
|
2855
2915
|
var i = this.input.slice(this.pos, this.pos + t);
|
|
2856
2916
|
return this.pos += t, this.finishToken(e, i);
|
|
2857
2917
|
};
|
|
2858
|
-
|
|
2918
|
+
S.readRegexp = function() {
|
|
2859
2919
|
for (var e, t, i = this.pos; ; ) {
|
|
2860
2920
|
this.pos >= this.input.length && this.raise(i, "Unterminated regular expression");
|
|
2861
2921
|
var s = this.input.charAt(this.pos);
|
|
2862
|
-
if (
|
|
2922
|
+
if (B.test(s) && this.raise(i, "Unterminated regular expression"), e)
|
|
2863
2923
|
e = !1;
|
|
2864
2924
|
else {
|
|
2865
2925
|
if (s === "[")
|
|
@@ -2876,7 +2936,7 @@ k.readRegexp = function() {
|
|
|
2876
2936
|
++this.pos;
|
|
2877
2937
|
var n = this.pos, o = this.readWord1();
|
|
2878
2938
|
this.containsEsc && this.unexpected(n);
|
|
2879
|
-
var l = this.regexpState || (this.regexpState = new
|
|
2939
|
+
var l = this.regexpState || (this.regexpState = new Y(this));
|
|
2880
2940
|
l.reset(i, r, o), this.validateRegExpFlags(l), this.validateRegExpPattern(l);
|
|
2881
2941
|
var u = null;
|
|
2882
2942
|
try {
|
|
@@ -2885,32 +2945,32 @@ k.readRegexp = function() {
|
|
|
2885
2945
|
}
|
|
2886
2946
|
return this.finishToken(a.regexp, { pattern: r, flags: o, value: u });
|
|
2887
2947
|
};
|
|
2888
|
-
|
|
2948
|
+
S.readInt = function(e, t, i) {
|
|
2889
2949
|
for (var s = this.options.ecmaVersion >= 12 && t === void 0, r = i && this.input.charCodeAt(this.pos) === 48, n = this.pos, o = 0, l = 0, u = 0, c = t ?? 1 / 0; u < c; ++u, ++this.pos) {
|
|
2890
|
-
var
|
|
2891
|
-
if (s &&
|
|
2892
|
-
r && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), l === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), u === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), l =
|
|
2950
|
+
var p = this.input.charCodeAt(this.pos), f = void 0;
|
|
2951
|
+
if (s && p === 95) {
|
|
2952
|
+
r && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), l === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), u === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), l = p;
|
|
2893
2953
|
continue;
|
|
2894
2954
|
}
|
|
2895
|
-
if (
|
|
2955
|
+
if (p >= 97 ? f = p - 97 + 10 : p >= 65 ? f = p - 65 + 10 : p >= 48 && p <= 57 ? f = p - 48 : f = 1 / 0, f >= e)
|
|
2896
2956
|
break;
|
|
2897
|
-
l =
|
|
2957
|
+
l = p, o = o * e + f;
|
|
2898
2958
|
}
|
|
2899
2959
|
return s && l === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === n || t != null && this.pos - n !== t ? null : o;
|
|
2900
2960
|
};
|
|
2901
|
-
function
|
|
2961
|
+
function Ys(e, t) {
|
|
2902
2962
|
return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, ""));
|
|
2903
2963
|
}
|
|
2904
2964
|
function Oi(e) {
|
|
2905
2965
|
return typeof BigInt != "function" ? null : BigInt(e.replace(/_/g, ""));
|
|
2906
2966
|
}
|
|
2907
|
-
|
|
2967
|
+
S.readRadixNumber = function(e) {
|
|
2908
2968
|
var t = this.pos;
|
|
2909
2969
|
this.pos += 2;
|
|
2910
2970
|
var i = this.readInt(e);
|
|
2911
|
-
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i = Oi(this.input.slice(t, this.pos)), ++this.pos) :
|
|
2971
|
+
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i = Oi(this.input.slice(t, this.pos)), ++this.pos) : Q(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(a.num, i);
|
|
2912
2972
|
};
|
|
2913
|
-
|
|
2973
|
+
S.readNumber = function(e) {
|
|
2914
2974
|
var t = this.pos;
|
|
2915
2975
|
!e && this.readInt(10, void 0, !0) === null && this.raise(t, "Invalid number");
|
|
2916
2976
|
var i = this.pos - t >= 2 && this.input.charCodeAt(t) === 48;
|
|
@@ -2918,13 +2978,13 @@ k.readNumber = function(e) {
|
|
|
2918
2978
|
var s = this.input.charCodeAt(this.pos);
|
|
2919
2979
|
if (!i && !e && this.options.ecmaVersion >= 11 && s === 110) {
|
|
2920
2980
|
var r = Oi(this.input.slice(t, this.pos));
|
|
2921
|
-
return ++this.pos,
|
|
2981
|
+
return ++this.pos, Q(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(a.num, r);
|
|
2922
2982
|
}
|
|
2923
|
-
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")),
|
|
2924
|
-
var n =
|
|
2983
|
+
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")), Q(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
2984
|
+
var n = Ys(this.input.slice(t, this.pos), i);
|
|
2925
2985
|
return this.finishToken(a.num, n);
|
|
2926
2986
|
};
|
|
2927
|
-
|
|
2987
|
+
S.readCodePoint = function() {
|
|
2928
2988
|
var e = this.input.charCodeAt(this.pos), t;
|
|
2929
2989
|
if (e === 123) {
|
|
2930
2990
|
this.options.ecmaVersion < 6 && this.unexpected();
|
|
@@ -2934,18 +2994,18 @@ k.readCodePoint = function() {
|
|
|
2934
2994
|
t = this.readHexChar(4);
|
|
2935
2995
|
return t;
|
|
2936
2996
|
};
|
|
2937
|
-
|
|
2997
|
+
S.readString = function(e) {
|
|
2938
2998
|
for (var t = "", i = ++this.pos; ; ) {
|
|
2939
2999
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
|
|
2940
3000
|
var s = this.input.charCodeAt(this.pos);
|
|
2941
3001
|
if (s === e)
|
|
2942
3002
|
break;
|
|
2943
|
-
s === 92 ? (t += this.input.slice(i, this.pos), t += this.readEscapedChar(!1), i = this.pos) : s === 8232 || s === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (
|
|
3003
|
+
s === 92 ? (t += this.input.slice(i, this.pos), t += this.readEscapedChar(!1), i = this.pos) : s === 8232 || s === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (_e(s) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
|
|
2944
3004
|
}
|
|
2945
3005
|
return t += this.input.slice(i, this.pos++), this.finishToken(a.string, t);
|
|
2946
3006
|
};
|
|
2947
3007
|
var Vi = {};
|
|
2948
|
-
|
|
3008
|
+
S.tryReadTemplateToken = function() {
|
|
2949
3009
|
this.inTemplateElement = !0;
|
|
2950
3010
|
try {
|
|
2951
3011
|
this.readTmplToken();
|
|
@@ -2957,12 +3017,12 @@ k.tryReadTemplateToken = function() {
|
|
|
2957
3017
|
}
|
|
2958
3018
|
this.inTemplateElement = !1;
|
|
2959
3019
|
};
|
|
2960
|
-
|
|
3020
|
+
S.invalidStringToken = function(e, t) {
|
|
2961
3021
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9)
|
|
2962
3022
|
throw Vi;
|
|
2963
3023
|
this.raise(e, t);
|
|
2964
3024
|
};
|
|
2965
|
-
|
|
3025
|
+
S.readTmplToken = function() {
|
|
2966
3026
|
for (var e = "", t = this.pos; ; ) {
|
|
2967
3027
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
|
|
2968
3028
|
var i = this.input.charCodeAt(this.pos);
|
|
@@ -2970,7 +3030,7 @@ k.readTmplToken = function() {
|
|
|
2970
3030
|
return this.pos === this.start && (this.type === a.template || this.type === a.invalidTemplate) ? i === 36 ? (this.pos += 2, this.finishToken(a.dollarBraceL)) : (++this.pos, this.finishToken(a.backQuote)) : (e += this.input.slice(t, this.pos), this.finishToken(a.template, e));
|
|
2971
3031
|
if (i === 92)
|
|
2972
3032
|
e += this.input.slice(t, this.pos), e += this.readEscapedChar(!0), t = this.pos;
|
|
2973
|
-
else if (
|
|
3033
|
+
else if (_e(i)) {
|
|
2974
3034
|
switch (e += this.input.slice(t, this.pos), ++this.pos, i) {
|
|
2975
3035
|
case 13:
|
|
2976
3036
|
this.input.charCodeAt(this.pos) === 10 && ++this.pos;
|
|
@@ -2987,7 +3047,7 @@ k.readTmplToken = function() {
|
|
|
2987
3047
|
++this.pos;
|
|
2988
3048
|
}
|
|
2989
3049
|
};
|
|
2990
|
-
|
|
3050
|
+
S.readInvalidTemplateToken = function() {
|
|
2991
3051
|
for (; this.pos < this.input.length; this.pos++)
|
|
2992
3052
|
switch (this.input[this.pos]) {
|
|
2993
3053
|
case "\\":
|
|
@@ -3012,7 +3072,7 @@ k.readInvalidTemplateToken = function() {
|
|
|
3012
3072
|
}
|
|
3013
3073
|
this.raise(this.start, "Unterminated template");
|
|
3014
3074
|
};
|
|
3015
|
-
|
|
3075
|
+
S.readEscapedChar = function(e) {
|
|
3016
3076
|
var t = this.input.charCodeAt(++this.pos);
|
|
3017
3077
|
switch (++this.pos, t) {
|
|
3018
3078
|
case 110:
|
|
@@ -3026,7 +3086,7 @@ k.readEscapedChar = function(e) {
|
|
|
3026
3086
|
return String.fromCharCode(this.readHexChar(2));
|
|
3027
3087
|
// 'x'
|
|
3028
3088
|
case 117:
|
|
3029
|
-
return
|
|
3089
|
+
return ie(this.readCodePoint());
|
|
3030
3090
|
// 'u'
|
|
3031
3091
|
case 116:
|
|
3032
3092
|
return " ";
|
|
@@ -3065,58 +3125,58 @@ k.readEscapedChar = function(e) {
|
|
|
3065
3125
|
e ? "Octal literal in template string" : "Octal literal in strict mode"
|
|
3066
3126
|
), String.fromCharCode(r);
|
|
3067
3127
|
}
|
|
3068
|
-
return
|
|
3128
|
+
return _e(t) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(t);
|
|
3069
3129
|
}
|
|
3070
3130
|
};
|
|
3071
|
-
|
|
3131
|
+
S.readHexChar = function(e) {
|
|
3072
3132
|
var t = this.pos, i = this.readInt(16, e);
|
|
3073
3133
|
return i === null && this.invalidStringToken(t, "Bad character escape sequence"), i;
|
|
3074
3134
|
};
|
|
3075
|
-
|
|
3135
|
+
S.readWord1 = function() {
|
|
3076
3136
|
this.containsEsc = !1;
|
|
3077
3137
|
for (var e = "", t = !0, i = this.pos, s = this.options.ecmaVersion >= 6; this.pos < this.input.length; ) {
|
|
3078
3138
|
var r = this.fullCharCodeAtPos();
|
|
3079
|
-
if (
|
|
3139
|
+
if (oe(r, s))
|
|
3080
3140
|
this.pos += r <= 65535 ? 1 : 2;
|
|
3081
3141
|
else if (r === 92) {
|
|
3082
3142
|
this.containsEsc = !0, e += this.input.slice(i, this.pos);
|
|
3083
3143
|
var n = this.pos;
|
|
3084
3144
|
this.input.charCodeAt(++this.pos) !== 117 && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos;
|
|
3085
3145
|
var o = this.readCodePoint();
|
|
3086
|
-
(t ?
|
|
3146
|
+
(t ? Q : oe)(o, s) || this.invalidStringToken(n, "Invalid Unicode escape"), e += ie(o), i = this.pos;
|
|
3087
3147
|
} else
|
|
3088
3148
|
break;
|
|
3089
3149
|
t = !1;
|
|
3090
3150
|
}
|
|
3091
3151
|
return e + this.input.slice(i, this.pos);
|
|
3092
3152
|
};
|
|
3093
|
-
|
|
3153
|
+
S.readWord = function() {
|
|
3094
3154
|
var e = this.readWord1(), t = a.name;
|
|
3095
3155
|
return this.keywords.test(e) && (t = kt[e]), this.finishToken(t, e);
|
|
3096
3156
|
};
|
|
3097
|
-
var
|
|
3098
|
-
|
|
3099
|
-
Parser:
|
|
3100
|
-
version:
|
|
3101
|
-
defaultOptions:
|
|
3102
|
-
Position:
|
|
3103
|
-
SourceLocation:
|
|
3104
|
-
getLineInfo:
|
|
3105
|
-
Node:
|
|
3157
|
+
var Zs = "8.15.0";
|
|
3158
|
+
V.acorn = {
|
|
3159
|
+
Parser: V,
|
|
3160
|
+
version: Zs,
|
|
3161
|
+
defaultOptions: yt,
|
|
3162
|
+
Position: Ne,
|
|
3163
|
+
SourceLocation: Xe,
|
|
3164
|
+
getLineInfo: ri,
|
|
3165
|
+
Node: tt,
|
|
3106
3166
|
TokenType: C,
|
|
3107
3167
|
tokTypes: a,
|
|
3108
3168
|
keywordTypes: kt,
|
|
3109
|
-
TokContext:
|
|
3169
|
+
TokContext: J,
|
|
3110
3170
|
tokContexts: N,
|
|
3111
|
-
isIdentifierChar:
|
|
3112
|
-
isIdentifierStart:
|
|
3113
|
-
Token:
|
|
3114
|
-
isNewLine:
|
|
3115
|
-
lineBreak:
|
|
3116
|
-
lineBreakG:
|
|
3117
|
-
nonASCIIwhitespace:
|
|
3118
|
-
};
|
|
3119
|
-
function
|
|
3171
|
+
isIdentifierChar: oe,
|
|
3172
|
+
isIdentifierStart: Q,
|
|
3173
|
+
Token: Nt,
|
|
3174
|
+
isNewLine: _e,
|
|
3175
|
+
lineBreak: B,
|
|
3176
|
+
lineBreakG: _s,
|
|
3177
|
+
nonASCIIwhitespace: ii
|
|
3178
|
+
};
|
|
3179
|
+
function ve(e) {
|
|
3120
3180
|
const t = [];
|
|
3121
3181
|
let i = "", s = null, r = !1, n = 0, o = 0, l = 0;
|
|
3122
3182
|
for (const c of e) {
|
|
@@ -3157,8 +3217,8 @@ function ye(e) {
|
|
|
3157
3217
|
continue;
|
|
3158
3218
|
}
|
|
3159
3219
|
if (c === "," && n === 0 && o === 0 && l === 0) {
|
|
3160
|
-
const
|
|
3161
|
-
|
|
3220
|
+
const p = i.trim();
|
|
3221
|
+
p && t.push(p), i = "";
|
|
3162
3222
|
continue;
|
|
3163
3223
|
}
|
|
3164
3224
|
i += c;
|
|
@@ -3166,10 +3226,10 @@ function ye(e) {
|
|
|
3166
3226
|
const u = i.trim();
|
|
3167
3227
|
return u && t.push(u), t;
|
|
3168
3228
|
}
|
|
3169
|
-
function
|
|
3229
|
+
function er(e, t) {
|
|
3170
3230
|
return e.replace(/\\\\/g, "\\").replace(t === '"' ? /\\"/g : /\\'/g, t);
|
|
3171
3231
|
}
|
|
3172
|
-
function
|
|
3232
|
+
function Pt(e) {
|
|
3173
3233
|
const t = e.trim();
|
|
3174
3234
|
if (!t)
|
|
3175
3235
|
return "";
|
|
@@ -3178,43 +3238,46 @@ function Nt(e) {
|
|
|
3178
3238
|
return i[2];
|
|
3179
3239
|
if (t.startsWith('"') && t.endsWith('"') || t.startsWith("'") && t.endsWith("'")) {
|
|
3180
3240
|
const s = t[0];
|
|
3181
|
-
return
|
|
3241
|
+
return er(t.slice(1, -1), s);
|
|
3182
3242
|
}
|
|
3183
3243
|
if (t.startsWith("[") && t.endsWith("]")) {
|
|
3184
3244
|
const s = t.slice(1, -1).trim();
|
|
3185
|
-
return s ?
|
|
3245
|
+
return s ? ve(s).map(Pt) : [];
|
|
3186
3246
|
}
|
|
3187
3247
|
return t === "True" || t === "true" ? !0 : t === "False" || t === "false" ? !1 : t === "None" || t === "null" ? null : /^-?\d+$/.test(t) ? Number.parseInt(t, 10) : /^-?(?:\d+\.\d*|\.\d+)(?:[eE][+-]?\d+)?$/.test(t) || /^-?\d+[eE][+-]?\d+$/.test(t) ? Number.parseFloat(t) : t;
|
|
3188
3248
|
}
|
|
3189
|
-
function
|
|
3249
|
+
function tr(e) {
|
|
3190
3250
|
const t = {};
|
|
3191
|
-
for (const i of
|
|
3251
|
+
for (const i of ve(e)) {
|
|
3192
3252
|
const s = i.match(/^(\w+)\s*=\s*([\s\S]+)$/);
|
|
3193
|
-
s && (t[s[1]] =
|
|
3253
|
+
s && (t[s[1]] = Pt(s[2]));
|
|
3194
3254
|
}
|
|
3195
3255
|
return t;
|
|
3196
3256
|
}
|
|
3197
|
-
function
|
|
3257
|
+
function ir(e) {
|
|
3198
3258
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
|
|
3199
3259
|
}
|
|
3200
3260
|
function Li(e) {
|
|
3201
|
-
return Array.isArray(e) ? e.filter(
|
|
3261
|
+
return Array.isArray(e) ? e.filter(ir) : [];
|
|
3202
3262
|
}
|
|
3203
|
-
function
|
|
3263
|
+
function sr(e) {
|
|
3204
3264
|
const t = e?.trim().match(/^(?:(?:typing|typing_extensions)\.)?Literal\s*\[([\s\S]*)\]$/);
|
|
3205
3265
|
return t ? Li(
|
|
3206
|
-
|
|
3266
|
+
ve(t[1]).map(Pt)
|
|
3207
3267
|
) : [];
|
|
3208
3268
|
}
|
|
3209
|
-
function
|
|
3269
|
+
function rr(e, t) {
|
|
3210
3270
|
const i = Li(t?.enum);
|
|
3211
|
-
|
|
3271
|
+
if (i.length > 0)
|
|
3272
|
+
return i;
|
|
3273
|
+
const s = sr(e);
|
|
3274
|
+
return s.length > 0 ? s : ds(e);
|
|
3212
3275
|
}
|
|
3213
|
-
function
|
|
3214
|
-
const t =
|
|
3276
|
+
function pt(e) {
|
|
3277
|
+
const t = rr(e.type, e.kwargs);
|
|
3215
3278
|
return t.length > 0 && (e.enum = t), e;
|
|
3216
3279
|
}
|
|
3217
|
-
function
|
|
3280
|
+
function nr(e, t) {
|
|
3218
3281
|
let i = null, s = !1, r = 0;
|
|
3219
3282
|
for (let n = t; n < e.length; n += 1) {
|
|
3220
3283
|
const o = e[n];
|
|
@@ -3239,60 +3302,60 @@ function Ws(e, t) {
|
|
|
3239
3302
|
}
|
|
3240
3303
|
return -1;
|
|
3241
3304
|
}
|
|
3242
|
-
const
|
|
3243
|
-
function
|
|
3244
|
-
return e !== void 0 &&
|
|
3305
|
+
const ar = /* @__PURE__ */ new Set(["int", "integer", "float", "number"]), or = ["gt", "ge", "lt", "le", "multiple_of"];
|
|
3306
|
+
function ur(e) {
|
|
3307
|
+
return e !== void 0 && ar.has(e.toLowerCase());
|
|
3245
3308
|
}
|
|
3246
|
-
function
|
|
3309
|
+
function lr(e) {
|
|
3247
3310
|
const t = e.trim(), i = t.indexOf("subvars");
|
|
3248
3311
|
let s, r;
|
|
3249
3312
|
if (i !== -1) {
|
|
3250
3313
|
const l = t.indexOf("[", i);
|
|
3251
3314
|
if (l !== -1) {
|
|
3252
|
-
const u =
|
|
3315
|
+
const u = nr(t, l);
|
|
3253
3316
|
u !== -1 && (s = t.slice(l + 1, u));
|
|
3254
3317
|
}
|
|
3255
3318
|
}
|
|
3256
3319
|
if (s) {
|
|
3257
|
-
const l =
|
|
3320
|
+
const l = ve(s);
|
|
3258
3321
|
r = {};
|
|
3259
3322
|
for (const u of l)
|
|
3260
3323
|
if (/^var\s*\(/.test(u) || /^[A-Za-z_]\w*\s*[:=]/.test(u)) {
|
|
3261
|
-
const c =
|
|
3324
|
+
const c = zt(u);
|
|
3262
3325
|
r[c.id] = c;
|
|
3263
3326
|
} else
|
|
3264
3327
|
r[u] = { id: u };
|
|
3265
3328
|
}
|
|
3266
|
-
const n =
|
|
3329
|
+
const n = ve(t).filter((l) => !/^subvars\s*=/.test(l)).join(", "), o = zt(n);
|
|
3267
3330
|
return r ? {
|
|
3268
3331
|
...o,
|
|
3269
3332
|
subvars: r
|
|
3270
3333
|
} : o;
|
|
3271
3334
|
}
|
|
3272
|
-
function
|
|
3335
|
+
function zt(e) {
|
|
3273
3336
|
let t = e.trim();
|
|
3274
3337
|
t.startsWith("var(") && t.endsWith(")") ? t = t.slice(4, -1).trim() : t.startsWith("var (") && t.endsWith(")") && (t = t.slice(5, -1).trim());
|
|
3275
|
-
const i =
|
|
3338
|
+
const i = ve(t), s = (i[0] || "").trim(), r = i.slice(1).filter((x) => /^\w+\s*=/.test(x)), n = tr(r.join(", "));
|
|
3276
3339
|
if (!s.includes(":")) {
|
|
3277
|
-
const
|
|
3278
|
-
if (
|
|
3279
|
-
const b = s.slice(
|
|
3280
|
-
id: s.slice(0,
|
|
3281
|
-
default:
|
|
3340
|
+
const x = s.indexOf("=");
|
|
3341
|
+
if (x > 0) {
|
|
3342
|
+
const b = s.slice(x + 1).trim(), w = {
|
|
3343
|
+
id: s.slice(0, x).trim(),
|
|
3344
|
+
default: Jt(b),
|
|
3282
3345
|
defaultRaw: b
|
|
3283
3346
|
};
|
|
3284
|
-
return Object.keys(n).length > 0 && (
|
|
3347
|
+
return Object.keys(n).length > 0 && (w.kwargs = n), pt(w);
|
|
3285
3348
|
}
|
|
3286
3349
|
const d = { id: s.split(/\s/)[0].trim() };
|
|
3287
|
-
return Object.keys(n).length > 0 && (d.kwargs = n),
|
|
3350
|
+
return Object.keys(n).length > 0 && (d.kwargs = n), pt(d);
|
|
3288
3351
|
}
|
|
3289
3352
|
const o = s.indexOf(":"), l = s.slice(0, o).trim(), u = s.slice(o + 1).trim(), c = u.indexOf("=");
|
|
3290
|
-
let f, h
|
|
3291
|
-
c > 0 ? (
|
|
3292
|
-
const
|
|
3293
|
-
return
|
|
3353
|
+
let p, f, h;
|
|
3354
|
+
c > 0 ? (p = u.slice(0, c).trim(), h = u.slice(c + 1).trim(), f = Jt(h)) : p = u.trim();
|
|
3355
|
+
const m = { id: l, type: p };
|
|
3356
|
+
return f !== void 0 && (m.default = f, m.defaultRaw = h), Object.keys(n).length > 0 && (m.kwargs = n), pt(m);
|
|
3294
3357
|
}
|
|
3295
|
-
function
|
|
3358
|
+
function Jt(e) {
|
|
3296
3359
|
const t = e.trim();
|
|
3297
3360
|
if (t === "true" || t === "True")
|
|
3298
3361
|
return !0;
|
|
@@ -3313,7 +3376,7 @@ function zt(e) {
|
|
|
3313
3376
|
}
|
|
3314
3377
|
return t;
|
|
3315
3378
|
}
|
|
3316
|
-
function
|
|
3379
|
+
function cr(e) {
|
|
3317
3380
|
if (e.type === void 0 || e.default === void 0 || e.default === null)
|
|
3318
3381
|
return [];
|
|
3319
3382
|
const t = [], i = e.type.toLowerCase(), s = e.default;
|
|
@@ -3341,13 +3404,13 @@ function Js(e) {
|
|
|
3341
3404
|
}
|
|
3342
3405
|
return t;
|
|
3343
3406
|
}
|
|
3344
|
-
function
|
|
3407
|
+
function Ri(e) {
|
|
3345
3408
|
const t = [], i = e.kwargs, s = e.type?.toLowerCase();
|
|
3346
3409
|
if (i) {
|
|
3347
|
-
const r =
|
|
3410
|
+
const r = or.filter(
|
|
3348
3411
|
(n) => Object.prototype.hasOwnProperty.call(i, n)
|
|
3349
3412
|
);
|
|
3350
|
-
if (r.length > 0 && !
|
|
3413
|
+
if (r.length > 0 && !ur(s)) {
|
|
3351
3414
|
const n = s ?? "untyped";
|
|
3352
3415
|
t.push(
|
|
3353
3416
|
`"${e.id}": numeric constraints (${r.join(", ")}) only apply to int/integer/float/number variables, not ${n}`
|
|
@@ -3360,20 +3423,20 @@ function Ti(e) {
|
|
|
3360
3423
|
}
|
|
3361
3424
|
if (e.subvars)
|
|
3362
3425
|
for (const r of Object.values(e.subvars))
|
|
3363
|
-
t.push(...
|
|
3426
|
+
t.push(...Ri(r));
|
|
3364
3427
|
return t;
|
|
3365
3428
|
}
|
|
3366
|
-
function
|
|
3367
|
-
const t =
|
|
3429
|
+
function Fi(e) {
|
|
3430
|
+
const t = cr(e);
|
|
3368
3431
|
if (e.subvars)
|
|
3369
3432
|
for (const i of Object.values(e.subvars))
|
|
3370
|
-
t.push(...
|
|
3433
|
+
t.push(...Fi(i));
|
|
3371
3434
|
return t;
|
|
3372
3435
|
}
|
|
3373
|
-
function
|
|
3436
|
+
function hr(e) {
|
|
3374
3437
|
return [
|
|
3375
|
-
...
|
|
3376
|
-
...
|
|
3438
|
+
...Fi(e),
|
|
3439
|
+
...Ri(e)
|
|
3377
3440
|
];
|
|
3378
3441
|
}
|
|
3379
3442
|
function Ht(e) {
|
|
@@ -3389,7 +3452,7 @@ function Ht(e) {
|
|
|
3389
3452
|
}
|
|
3390
3453
|
return t;
|
|
3391
3454
|
}
|
|
3392
|
-
function
|
|
3455
|
+
function fr(e) {
|
|
3393
3456
|
const t = e.split(`
|
|
3394
3457
|
`), i = {};
|
|
3395
3458
|
let s = null, r = "", n = !1;
|
|
@@ -3407,21 +3470,21 @@ ${o}` : r = o);
|
|
|
3407
3470
|
}
|
|
3408
3471
|
return s && (i[s] = Ht(r)), i;
|
|
3409
3472
|
}
|
|
3410
|
-
const
|
|
3411
|
-
function
|
|
3473
|
+
const pr = ["video", "audio", "file"];
|
|
3474
|
+
function Mi(e) {
|
|
3412
3475
|
return (e || "file").trim().toLowerCase() || "file";
|
|
3413
3476
|
}
|
|
3414
|
-
function
|
|
3415
|
-
return
|
|
3477
|
+
function dr(e) {
|
|
3478
|
+
return pr.includes(Mi(e));
|
|
3416
3479
|
}
|
|
3417
|
-
function
|
|
3418
|
-
const t =
|
|
3419
|
-
return
|
|
3480
|
+
function mr(e) {
|
|
3481
|
+
const t = Mi(e.kind);
|
|
3482
|
+
return dr(t) ? [] : [
|
|
3420
3483
|
`media "${e.id}": unsupported kind "${e.kind}". Supported media kinds are video, audio, and file; static images must use a fig block.`
|
|
3421
3484
|
];
|
|
3422
3485
|
}
|
|
3423
|
-
function
|
|
3424
|
-
const t =
|
|
3486
|
+
function gr(e) {
|
|
3487
|
+
const t = fr(e);
|
|
3425
3488
|
if (!t.id || !t.src)
|
|
3426
3489
|
throw new Error('media block must have "id" and "src" fields');
|
|
3427
3490
|
const i = {
|
|
@@ -3433,67 +3496,67 @@ function ir(e) {
|
|
|
3433
3496
|
}
|
|
3434
3497
|
new TextEncoder();
|
|
3435
3498
|
new TextDecoder();
|
|
3436
|
-
const
|
|
3499
|
+
const Tt = /* @__PURE__ */ Symbol.for("yaml.alias"), yr = /* @__PURE__ */ Symbol.for("yaml.document"), pe = /* @__PURE__ */ Symbol.for("yaml.map"), Di = /* @__PURE__ */ Symbol.for("yaml.pair"), Ot = /* @__PURE__ */ Symbol.for("yaml.scalar"), Le = /* @__PURE__ */ Symbol.for("yaml.seq"), Z = /* @__PURE__ */ Symbol.for("yaml.node.type"), me = (e) => !!e && typeof e == "object" && e[Z] === Tt, st = (e) => !!e && typeof e == "object" && e[Z] === yr, Bi = (e) => !!e && typeof e == "object" && e[Z] === pe, L = (e) => !!e && typeof e == "object" && e[Z] === Di, O = (e) => !!e && typeof e == "object" && e[Z] === Ot, Vt = (e) => !!e && typeof e == "object" && e[Z] === Le;
|
|
3437
3500
|
function U(e) {
|
|
3438
3501
|
if (e && typeof e == "object")
|
|
3439
|
-
switch (e[
|
|
3440
|
-
case
|
|
3502
|
+
switch (e[Z]) {
|
|
3503
|
+
case pe:
|
|
3441
3504
|
case Le:
|
|
3442
3505
|
return !0;
|
|
3443
3506
|
}
|
|
3444
3507
|
return !1;
|
|
3445
3508
|
}
|
|
3446
|
-
function
|
|
3509
|
+
function F(e) {
|
|
3447
3510
|
if (e && typeof e == "object")
|
|
3448
|
-
switch (e[
|
|
3449
|
-
case
|
|
3450
|
-
case
|
|
3511
|
+
switch (e[Z]) {
|
|
3512
|
+
case Tt:
|
|
3513
|
+
case pe:
|
|
3451
3514
|
case Ot:
|
|
3452
3515
|
case Le:
|
|
3453
3516
|
return !0;
|
|
3454
3517
|
}
|
|
3455
3518
|
return !1;
|
|
3456
3519
|
}
|
|
3457
|
-
const
|
|
3458
|
-
function
|
|
3459
|
-
const i =
|
|
3460
|
-
|
|
3520
|
+
const ji = (e) => (O(e) || U(e)) && !!e.anchor, he = /* @__PURE__ */ Symbol("break visit"), br = /* @__PURE__ */ Symbol("skip children"), Ee = /* @__PURE__ */ Symbol("remove node");
|
|
3521
|
+
function rt(e, t) {
|
|
3522
|
+
const i = xr(t);
|
|
3523
|
+
st(e) ? ye(null, e.contents, i, Object.freeze([e])) === Ee && (e.contents = null) : ye(null, e, i, Object.freeze([]));
|
|
3461
3524
|
}
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
function
|
|
3466
|
-
const r =
|
|
3467
|
-
if (
|
|
3468
|
-
return
|
|
3525
|
+
rt.BREAK = he;
|
|
3526
|
+
rt.SKIP = br;
|
|
3527
|
+
rt.REMOVE = Ee;
|
|
3528
|
+
function ye(e, t, i, s) {
|
|
3529
|
+
const r = vr(e, t, i, s);
|
|
3530
|
+
if (F(r) || L(r))
|
|
3531
|
+
return _r(e, s, r), ye(e, r, i, s);
|
|
3469
3532
|
if (typeof r != "symbol") {
|
|
3470
3533
|
if (U(t)) {
|
|
3471
3534
|
s = Object.freeze(s.concat(t));
|
|
3472
3535
|
for (let n = 0; n < t.items.length; ++n) {
|
|
3473
|
-
const o =
|
|
3536
|
+
const o = ye(n, t.items[n], i, s);
|
|
3474
3537
|
if (typeof o == "number")
|
|
3475
3538
|
n = o - 1;
|
|
3476
3539
|
else {
|
|
3477
|
-
if (o ===
|
|
3478
|
-
return
|
|
3540
|
+
if (o === he)
|
|
3541
|
+
return he;
|
|
3479
3542
|
o === Ee && (t.items.splice(n, 1), n -= 1);
|
|
3480
3543
|
}
|
|
3481
3544
|
}
|
|
3482
|
-
} else if (
|
|
3545
|
+
} else if (L(t)) {
|
|
3483
3546
|
s = Object.freeze(s.concat(t));
|
|
3484
|
-
const n =
|
|
3485
|
-
if (n ===
|
|
3486
|
-
return
|
|
3547
|
+
const n = ye("key", t.key, i, s);
|
|
3548
|
+
if (n === he)
|
|
3549
|
+
return he;
|
|
3487
3550
|
n === Ee && (t.key = null);
|
|
3488
|
-
const o =
|
|
3489
|
-
if (o ===
|
|
3490
|
-
return
|
|
3551
|
+
const o = ye("value", t.value, i, s);
|
|
3552
|
+
if (o === he)
|
|
3553
|
+
return he;
|
|
3491
3554
|
o === Ee && (t.value = null);
|
|
3492
3555
|
}
|
|
3493
3556
|
}
|
|
3494
3557
|
return r;
|
|
3495
3558
|
}
|
|
3496
|
-
function
|
|
3559
|
+
function xr(e) {
|
|
3497
3560
|
return typeof e == "object" && (e.Collection || e.Node || e.Value) ? Object.assign({
|
|
3498
3561
|
Alias: e.Node,
|
|
3499
3562
|
Map: e.Node,
|
|
@@ -3508,69 +3571,69 @@ function nr(e) {
|
|
|
3508
3571
|
Seq: e.Collection
|
|
3509
3572
|
}, e) : e;
|
|
3510
3573
|
}
|
|
3511
|
-
function
|
|
3574
|
+
function vr(e, t, i, s) {
|
|
3512
3575
|
if (typeof i == "function")
|
|
3513
3576
|
return i(e, t, s);
|
|
3514
3577
|
if (Bi(t))
|
|
3515
3578
|
return i.Map?.(e, t, s);
|
|
3516
3579
|
if (Vt(t))
|
|
3517
3580
|
return i.Seq?.(e, t, s);
|
|
3518
|
-
if (
|
|
3581
|
+
if (L(t))
|
|
3519
3582
|
return i.Pair?.(e, t, s);
|
|
3520
|
-
if (
|
|
3583
|
+
if (O(t))
|
|
3521
3584
|
return i.Scalar?.(e, t, s);
|
|
3522
|
-
if (
|
|
3585
|
+
if (me(t))
|
|
3523
3586
|
return i.Alias?.(e, t, s);
|
|
3524
3587
|
}
|
|
3525
|
-
function
|
|
3588
|
+
function _r(e, t, i) {
|
|
3526
3589
|
const s = t[t.length - 1];
|
|
3527
3590
|
if (U(s))
|
|
3528
3591
|
s.items[e] = i;
|
|
3529
|
-
else if (
|
|
3592
|
+
else if (L(s))
|
|
3530
3593
|
e === "key" ? s.key = i : s.value = i;
|
|
3531
|
-
else if (
|
|
3594
|
+
else if (st(s))
|
|
3532
3595
|
s.contents = i;
|
|
3533
3596
|
else {
|
|
3534
|
-
const r =
|
|
3597
|
+
const r = me(s) ? "alias" : "scalar";
|
|
3535
3598
|
throw new Error(`Cannot replace node with ${r} parent`);
|
|
3536
3599
|
}
|
|
3537
3600
|
}
|
|
3538
|
-
function
|
|
3601
|
+
function $i(e) {
|
|
3539
3602
|
if (/[\x00-\x19\s,[\]{}]/.test(e)) {
|
|
3540
3603
|
const i = `Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;
|
|
3541
3604
|
throw new Error(i);
|
|
3542
3605
|
}
|
|
3543
3606
|
return !0;
|
|
3544
3607
|
}
|
|
3545
|
-
function
|
|
3608
|
+
function Ce(e, t, i, s) {
|
|
3546
3609
|
if (s && typeof s == "object")
|
|
3547
3610
|
if (Array.isArray(s))
|
|
3548
3611
|
for (let r = 0, n = s.length; r < n; ++r) {
|
|
3549
|
-
const o = s[r], l =
|
|
3612
|
+
const o = s[r], l = Ce(e, s, String(r), o);
|
|
3550
3613
|
l === void 0 ? delete s[r] : l !== o && (s[r] = l);
|
|
3551
3614
|
}
|
|
3552
3615
|
else if (s instanceof Map)
|
|
3553
3616
|
for (const r of Array.from(s.keys())) {
|
|
3554
|
-
const n = s.get(r), o =
|
|
3617
|
+
const n = s.get(r), o = Ce(e, s, r, n);
|
|
3555
3618
|
o === void 0 ? s.delete(r) : o !== n && s.set(r, o);
|
|
3556
3619
|
}
|
|
3557
3620
|
else if (s instanceof Set)
|
|
3558
3621
|
for (const r of Array.from(s)) {
|
|
3559
|
-
const n =
|
|
3622
|
+
const n = Ce(e, s, r, r);
|
|
3560
3623
|
n === void 0 ? s.delete(r) : n !== r && (s.delete(r), s.add(n));
|
|
3561
3624
|
}
|
|
3562
3625
|
else
|
|
3563
3626
|
for (const [r, n] of Object.entries(s)) {
|
|
3564
|
-
const o =
|
|
3627
|
+
const o = Ce(e, s, r, n);
|
|
3565
3628
|
o === void 0 ? delete s[r] : o !== n && (s[r] = o);
|
|
3566
3629
|
}
|
|
3567
3630
|
return e.call(t, i, s);
|
|
3568
3631
|
}
|
|
3569
|
-
function
|
|
3632
|
+
function H(e, t, i) {
|
|
3570
3633
|
if (Array.isArray(e))
|
|
3571
|
-
return e.map((s, r) =>
|
|
3634
|
+
return e.map((s, r) => H(s, String(r), i));
|
|
3572
3635
|
if (e && typeof e.toJSON == "function") {
|
|
3573
|
-
if (!i || !
|
|
3636
|
+
if (!i || !ji(e))
|
|
3574
3637
|
return e.toJSON(t, i);
|
|
3575
3638
|
const s = { aliasCount: 0, count: 1, res: void 0 };
|
|
3576
3639
|
i.anchors.set(e, s), i.onCreate = (n) => {
|
|
@@ -3583,7 +3646,7 @@ function Q(e, t, i) {
|
|
|
3583
3646
|
}
|
|
3584
3647
|
class Lt {
|
|
3585
3648
|
constructor(t) {
|
|
3586
|
-
Object.defineProperty(this,
|
|
3649
|
+
Object.defineProperty(this, Z, { value: t });
|
|
3587
3650
|
}
|
|
3588
3651
|
/** Create a copy of this node. */
|
|
3589
3652
|
clone() {
|
|
@@ -3592,7 +3655,7 @@ class Lt {
|
|
|
3592
3655
|
}
|
|
3593
3656
|
/** A plain JavaScript representation of this node. */
|
|
3594
3657
|
toJS(t, { mapAsMap: i, maxAliasCount: s, onAnchor: r, reviver: n } = {}) {
|
|
3595
|
-
if (!
|
|
3658
|
+
if (!st(t))
|
|
3596
3659
|
throw new TypeError("A document argument is required");
|
|
3597
3660
|
const o = {
|
|
3598
3661
|
anchors: /* @__PURE__ */ new Map(),
|
|
@@ -3601,16 +3664,16 @@ class Lt {
|
|
|
3601
3664
|
mapAsMap: i === !0,
|
|
3602
3665
|
mapKeyWarned: !1,
|
|
3603
3666
|
maxAliasCount: typeof s == "number" ? s : 100
|
|
3604
|
-
}, l =
|
|
3667
|
+
}, l = H(this, "", o);
|
|
3605
3668
|
if (typeof r == "function")
|
|
3606
3669
|
for (const { count: u, res: c } of o.anchors.values())
|
|
3607
3670
|
r(c, u);
|
|
3608
|
-
return typeof n == "function" ?
|
|
3671
|
+
return typeof n == "function" ? Ce(n, { "": l }, "", l) : l;
|
|
3609
3672
|
}
|
|
3610
3673
|
}
|
|
3611
|
-
class
|
|
3674
|
+
class Sr extends Lt {
|
|
3612
3675
|
constructor(t) {
|
|
3613
|
-
super(
|
|
3676
|
+
super(Tt), this.source = t, Object.defineProperty(this, "tag", {
|
|
3614
3677
|
set() {
|
|
3615
3678
|
throw new Error("Alias nodes cannot have tags");
|
|
3616
3679
|
}
|
|
@@ -3622,9 +3685,9 @@ class ur extends Lt {
|
|
|
3622
3685
|
*/
|
|
3623
3686
|
resolve(t, i) {
|
|
3624
3687
|
let s;
|
|
3625
|
-
i?.aliasResolveCache ? s = i.aliasResolveCache : (s = [],
|
|
3688
|
+
i?.aliasResolveCache ? s = i.aliasResolveCache : (s = [], rt(t, {
|
|
3626
3689
|
Node: (n, o) => {
|
|
3627
|
-
(
|
|
3690
|
+
(me(o) || ji(o)) && s.push(o);
|
|
3628
3691
|
}
|
|
3629
3692
|
}), i && (i.aliasResolveCache = s));
|
|
3630
3693
|
let r;
|
|
@@ -3644,11 +3707,11 @@ class ur extends Lt {
|
|
|
3644
3707
|
throw new ReferenceError(u);
|
|
3645
3708
|
}
|
|
3646
3709
|
let l = s.get(o);
|
|
3647
|
-
if (l || (
|
|
3710
|
+
if (l || (H(o, null, i), l = s.get(o)), l?.res === void 0) {
|
|
3648
3711
|
const u = "This should not happen: Alias anchor was not resolved?";
|
|
3649
3712
|
throw new ReferenceError(u);
|
|
3650
3713
|
}
|
|
3651
|
-
if (n >= 0 && (l.count += 1, l.aliasCount === 0 && (l.aliasCount =
|
|
3714
|
+
if (n >= 0 && (l.count += 1, l.aliasCount === 0 && (l.aliasCount = $e(r, o, s)), l.count * l.aliasCount > n)) {
|
|
3652
3715
|
const u = "Excessive alias count indicates a resource exhaustion attack";
|
|
3653
3716
|
throw new ReferenceError(u);
|
|
3654
3717
|
}
|
|
@@ -3657,7 +3720,7 @@ class ur extends Lt {
|
|
|
3657
3720
|
toString(t, i, s) {
|
|
3658
3721
|
const r = `*${this.source}`;
|
|
3659
3722
|
if (t) {
|
|
3660
|
-
if (
|
|
3723
|
+
if ($i(this.source), t.options.verifyAliasOrder && !t.anchors.has(this.source)) {
|
|
3661
3724
|
const n = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
3662
3725
|
throw new Error(n);
|
|
3663
3726
|
}
|
|
@@ -3667,69 +3730,69 @@ class ur extends Lt {
|
|
|
3667
3730
|
return r;
|
|
3668
3731
|
}
|
|
3669
3732
|
}
|
|
3670
|
-
function
|
|
3671
|
-
if (
|
|
3733
|
+
function $e(e, t, i) {
|
|
3734
|
+
if (me(t)) {
|
|
3672
3735
|
const s = t.resolve(e), r = i && s && i.get(s);
|
|
3673
3736
|
return r ? r.count * r.aliasCount : 0;
|
|
3674
3737
|
} else if (U(t)) {
|
|
3675
3738
|
let s = 0;
|
|
3676
3739
|
for (const r of t.items) {
|
|
3677
|
-
const n =
|
|
3740
|
+
const n = $e(e, r, i);
|
|
3678
3741
|
n > s && (s = n);
|
|
3679
3742
|
}
|
|
3680
3743
|
return s;
|
|
3681
|
-
} else if (
|
|
3682
|
-
const s =
|
|
3744
|
+
} else if (L(t)) {
|
|
3745
|
+
const s = $e(e, t.key, i), r = $e(e, t.value, i);
|
|
3683
3746
|
return Math.max(s, r);
|
|
3684
3747
|
}
|
|
3685
3748
|
return 1;
|
|
3686
3749
|
}
|
|
3687
|
-
const
|
|
3688
|
-
class
|
|
3750
|
+
const Ui = (e) => !e || typeof e != "function" && typeof e != "object";
|
|
3751
|
+
class T extends Lt {
|
|
3689
3752
|
constructor(t) {
|
|
3690
3753
|
super(Ot), this.value = t;
|
|
3691
3754
|
}
|
|
3692
3755
|
toJSON(t, i) {
|
|
3693
|
-
return i?.keep ? this.value :
|
|
3756
|
+
return i?.keep ? this.value : H(this.value, t, i);
|
|
3694
3757
|
}
|
|
3695
3758
|
toString() {
|
|
3696
3759
|
return String(this.value);
|
|
3697
3760
|
}
|
|
3698
3761
|
}
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
function
|
|
3762
|
+
T.BLOCK_FOLDED = "BLOCK_FOLDED";
|
|
3763
|
+
T.BLOCK_LITERAL = "BLOCK_LITERAL";
|
|
3764
|
+
T.PLAIN = "PLAIN";
|
|
3765
|
+
T.QUOTE_DOUBLE = "QUOTE_DOUBLE";
|
|
3766
|
+
T.QUOTE_SINGLE = "QUOTE_SINGLE";
|
|
3767
|
+
function kr(e, t, i) {
|
|
3705
3768
|
return i.find((s) => s.identify?.(e) && !s.format);
|
|
3706
3769
|
}
|
|
3707
|
-
function
|
|
3708
|
-
if (
|
|
3770
|
+
function Je(e, t, i) {
|
|
3771
|
+
if (st(e) && (e = e.contents), F(e))
|
|
3709
3772
|
return e;
|
|
3710
|
-
if (
|
|
3711
|
-
const
|
|
3712
|
-
return
|
|
3773
|
+
if (L(e)) {
|
|
3774
|
+
const f = i.schema[pe].createNode?.(i.schema, null, i);
|
|
3775
|
+
return f.items.push(e), f;
|
|
3713
3776
|
}
|
|
3714
3777
|
(e instanceof String || e instanceof Number || e instanceof Boolean || typeof BigInt < "u" && e instanceof BigInt) && (e = e.valueOf());
|
|
3715
3778
|
const { aliasDuplicateObjects: s, onAnchor: r, onTagObj: n, schema: o, sourceObjects: l } = i;
|
|
3716
3779
|
let u;
|
|
3717
3780
|
if (s && e && typeof e == "object") {
|
|
3718
3781
|
if (u = l.get(e), u)
|
|
3719
|
-
return u.anchor ?? (u.anchor = r(e)), new
|
|
3782
|
+
return u.anchor ?? (u.anchor = r(e)), new Sr(u.anchor);
|
|
3720
3783
|
u = { anchor: null, node: null }, l.set(e, u);
|
|
3721
3784
|
}
|
|
3722
|
-
let c =
|
|
3785
|
+
let c = kr(e, t, o.tags);
|
|
3723
3786
|
if (!c) {
|
|
3724
3787
|
if (e && typeof e.toJSON == "function" && (e = e.toJSON()), !e || typeof e != "object") {
|
|
3725
|
-
const
|
|
3726
|
-
return u && (u.node =
|
|
3788
|
+
const f = new T(e);
|
|
3789
|
+
return u && (u.node = f), f;
|
|
3727
3790
|
}
|
|
3728
|
-
c = e instanceof Map ? o[
|
|
3791
|
+
c = e instanceof Map ? o[pe] : Symbol.iterator in Object(e) ? o[Le] : o[pe];
|
|
3729
3792
|
}
|
|
3730
3793
|
n && (n(c), delete i.onTagObj);
|
|
3731
|
-
const
|
|
3732
|
-
return c.default || (
|
|
3794
|
+
const p = c?.createNode ? c.createNode(i.schema, e, i) : typeof c?.nodeClass?.from == "function" ? c.nodeClass.from(i.schema, e, i) : new T(e);
|
|
3795
|
+
return c.default || (p.tag = c.tag), u && (u.node = p), p;
|
|
3733
3796
|
}
|
|
3734
3797
|
function Qt(e, t, i) {
|
|
3735
3798
|
let s = i;
|
|
@@ -3741,7 +3804,7 @@ function Qt(e, t, i) {
|
|
|
3741
3804
|
} else
|
|
3742
3805
|
s = /* @__PURE__ */ new Map([[n, s]]);
|
|
3743
3806
|
}
|
|
3744
|
-
return
|
|
3807
|
+
return Je(s, void 0, {
|
|
3745
3808
|
aliasDuplicateObjects: !1,
|
|
3746
3809
|
keepUndefined: !1,
|
|
3747
3810
|
onAnchor: () => {
|
|
@@ -3751,8 +3814,8 @@ function Qt(e, t, i) {
|
|
|
3751
3814
|
sourceObjects: /* @__PURE__ */ new Map()
|
|
3752
3815
|
});
|
|
3753
3816
|
}
|
|
3754
|
-
const
|
|
3755
|
-
class
|
|
3817
|
+
const wr = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next().done;
|
|
3818
|
+
class qi extends Lt {
|
|
3756
3819
|
constructor(t, i) {
|
|
3757
3820
|
super(t), Object.defineProperty(this, "schema", {
|
|
3758
3821
|
value: i,
|
|
@@ -3768,7 +3831,7 @@ class Ui extends Lt {
|
|
|
3768
3831
|
*/
|
|
3769
3832
|
clone(t) {
|
|
3770
3833
|
const i = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
3771
|
-
return t && (i.schema = t), i.items = i.items.map((s) =>
|
|
3834
|
+
return t && (i.schema = t), i.items = i.items.map((s) => F(s) || L(s) ? s.clone(t) : s), this.range && (i.range = this.range.slice()), i;
|
|
3772
3835
|
}
|
|
3773
3836
|
/**
|
|
3774
3837
|
* Adds a value to the collection. For `!!map` and `!!omap` the value must
|
|
@@ -3776,7 +3839,7 @@ class Ui extends Lt {
|
|
|
3776
3839
|
* that already exists in the map.
|
|
3777
3840
|
*/
|
|
3778
3841
|
addIn(t, i) {
|
|
3779
|
-
if (
|
|
3842
|
+
if (wr(t))
|
|
3780
3843
|
this.add(i);
|
|
3781
3844
|
else {
|
|
3782
3845
|
const [s, ...r] = t, n = this.get(s, !0);
|
|
@@ -3808,14 +3871,14 @@ class Ui extends Lt {
|
|
|
3808
3871
|
*/
|
|
3809
3872
|
getIn(t, i) {
|
|
3810
3873
|
const [s, ...r] = t, n = this.get(s, !0);
|
|
3811
|
-
return r.length === 0 ? !i &&
|
|
3874
|
+
return r.length === 0 ? !i && O(n) ? n.value : n : U(n) ? n.getIn(r, i) : void 0;
|
|
3812
3875
|
}
|
|
3813
3876
|
hasAllNullValues(t) {
|
|
3814
3877
|
return this.items.every((i) => {
|
|
3815
|
-
if (!
|
|
3878
|
+
if (!L(i))
|
|
3816
3879
|
return !1;
|
|
3817
3880
|
const s = i.value;
|
|
3818
|
-
return s == null || t &&
|
|
3881
|
+
return s == null || t && O(s) && s.value == null && !s.commentBefore && !s.comment && !s.tag;
|
|
3819
3882
|
});
|
|
3820
3883
|
}
|
|
3821
3884
|
/**
|
|
@@ -3847,28 +3910,28 @@ class Ui extends Lt {
|
|
|
3847
3910
|
}
|
|
3848
3911
|
}
|
|
3849
3912
|
}
|
|
3850
|
-
const
|
|
3851
|
-
function
|
|
3913
|
+
const Cr = (e) => e.replace(/^(?!$)(?: $)?/gm, "#");
|
|
3914
|
+
function Te(e, t) {
|
|
3852
3915
|
return /^\n+$/.test(e) ? e.substring(1) : t ? e.replace(/^(?! *$)/gm, t) : e;
|
|
3853
3916
|
}
|
|
3854
3917
|
const be = (e, t, i) => e.endsWith(`
|
|
3855
|
-
`) ?
|
|
3918
|
+
`) ? Te(i, t) : i.includes(`
|
|
3856
3919
|
`) ? `
|
|
3857
|
-
` +
|
|
3858
|
-
function
|
|
3920
|
+
` + Te(i, t) : (e.endsWith(" ") ? "" : " ") + i, Gi = "flow", vt = "block", Ue = "quoted";
|
|
3921
|
+
function nt(e, t, i = "flow", { indentAtStart: s, lineWidth: r = 80, minContentWidth: n = 20, onFold: o, onOverflow: l } = {}) {
|
|
3859
3922
|
if (!r || r < 0)
|
|
3860
3923
|
return e;
|
|
3861
3924
|
r < n && (n = 0);
|
|
3862
3925
|
const u = Math.max(1 + n, 1 + r - t.length);
|
|
3863
3926
|
if (e.length <= u)
|
|
3864
3927
|
return e;
|
|
3865
|
-
const c = [],
|
|
3866
|
-
let
|
|
3867
|
-
typeof s == "number" && (s > r - Math.max(2, n) ? c.push(0) :
|
|
3868
|
-
let
|
|
3869
|
-
i ===
|
|
3870
|
-
for (let
|
|
3871
|
-
if (i ===
|
|
3928
|
+
const c = [], p = {};
|
|
3929
|
+
let f = r - t.length;
|
|
3930
|
+
typeof s == "number" && (s > r - Math.max(2, n) ? c.push(0) : f = r - s);
|
|
3931
|
+
let h, m, x = !1, d = -1, b = -1, w = -1;
|
|
3932
|
+
i === vt && (d = Xt(e, d, t.length), d !== -1 && (f = d + u));
|
|
3933
|
+
for (let E; E = e[d += 1]; ) {
|
|
3934
|
+
if (i === Ue && E === "\\") {
|
|
3872
3935
|
switch (b = d, e[d + 1]) {
|
|
3873
3936
|
case "x":
|
|
3874
3937
|
d += 3;
|
|
@@ -3882,46 +3945,46 @@ function rt(e, t, i = "flow", { indentAtStart: s, lineWidth: r = 80, minContentW
|
|
|
3882
3945
|
default:
|
|
3883
3946
|
d += 1;
|
|
3884
3947
|
}
|
|
3885
|
-
|
|
3948
|
+
w = d;
|
|
3886
3949
|
}
|
|
3887
|
-
if (
|
|
3950
|
+
if (E === `
|
|
3888
3951
|
`)
|
|
3889
|
-
i ===
|
|
3952
|
+
i === vt && (d = Xt(e, d, t.length)), f = d + t.length + u, h = void 0;
|
|
3890
3953
|
else {
|
|
3891
|
-
if (
|
|
3892
|
-
` &&
|
|
3954
|
+
if (E === " " && m && m !== " " && m !== `
|
|
3955
|
+
` && m !== " ") {
|
|
3893
3956
|
const I = e[d + 1];
|
|
3894
3957
|
I && I !== " " && I !== `
|
|
3895
|
-
` && I !== " " && (
|
|
3958
|
+
` && I !== " " && (h = d);
|
|
3896
3959
|
}
|
|
3897
|
-
if (d >=
|
|
3898
|
-
if (
|
|
3899
|
-
c.push(
|
|
3900
|
-
else if (i ===
|
|
3901
|
-
for (;
|
|
3902
|
-
|
|
3903
|
-
const I = d >
|
|
3904
|
-
if (
|
|
3960
|
+
if (d >= f)
|
|
3961
|
+
if (h)
|
|
3962
|
+
c.push(h), f = h + u, h = void 0;
|
|
3963
|
+
else if (i === Ue) {
|
|
3964
|
+
for (; m === " " || m === " "; )
|
|
3965
|
+
m = E, E = e[d += 1], x = !0;
|
|
3966
|
+
const I = d > w + 1 ? d - 2 : b - 1;
|
|
3967
|
+
if (p[I])
|
|
3905
3968
|
return e;
|
|
3906
|
-
c.push(I),
|
|
3969
|
+
c.push(I), p[I] = !0, f = I + u, h = void 0;
|
|
3907
3970
|
} else
|
|
3908
|
-
|
|
3971
|
+
x = !0;
|
|
3909
3972
|
}
|
|
3910
|
-
|
|
3973
|
+
m = E;
|
|
3911
3974
|
}
|
|
3912
|
-
if (
|
|
3975
|
+
if (x && l && l(), c.length === 0)
|
|
3913
3976
|
return e;
|
|
3914
3977
|
o && o();
|
|
3915
|
-
let
|
|
3916
|
-
for (let
|
|
3917
|
-
const I = c[
|
|
3918
|
-
I === 0 ?
|
|
3919
|
-
${t}${e.slice(0, P)}` : (i ===
|
|
3978
|
+
let A = e.slice(0, c[0]);
|
|
3979
|
+
for (let E = 0; E < c.length; ++E) {
|
|
3980
|
+
const I = c[E], P = c[E + 1] || e.length;
|
|
3981
|
+
I === 0 ? A = `
|
|
3982
|
+
${t}${e.slice(0, P)}` : (i === Ue && p[I] && (A += `${e[I]}\\`), A += `
|
|
3920
3983
|
${t}${e.slice(I + 1, P)}`);
|
|
3921
3984
|
}
|
|
3922
|
-
return
|
|
3985
|
+
return A;
|
|
3923
3986
|
}
|
|
3924
|
-
function
|
|
3987
|
+
function Xt(e, t, i) {
|
|
3925
3988
|
let s = t, r = t + 1, n = e[r];
|
|
3926
3989
|
for (; n === " " || n === " "; )
|
|
3927
3990
|
if (t < r + i)
|
|
@@ -3935,12 +3998,12 @@ function Jt(e, t, i) {
|
|
|
3935
3998
|
}
|
|
3936
3999
|
return s;
|
|
3937
4000
|
}
|
|
3938
|
-
const
|
|
4001
|
+
const at = (e, t) => ({
|
|
3939
4002
|
indentAtStart: t ? e.indent.length : e.indentAtStart,
|
|
3940
4003
|
lineWidth: e.options.lineWidth,
|
|
3941
4004
|
minContentWidth: e.options.minContentWidth
|
|
3942
|
-
}),
|
|
3943
|
-
function
|
|
4005
|
+
}), ot = (e) => /^(%|---|\.\.\.)/m.test(e);
|
|
4006
|
+
function Ar(e, t, i) {
|
|
3944
4007
|
if (!t || t < 0)
|
|
3945
4008
|
return !1;
|
|
3946
4009
|
const s = t - i, r = e.length;
|
|
@@ -3956,11 +4019,11 @@ function fr(e, t, i) {
|
|
|
3956
4019
|
}
|
|
3957
4020
|
return !0;
|
|
3958
4021
|
}
|
|
3959
|
-
function
|
|
4022
|
+
function Ie(e, t) {
|
|
3960
4023
|
const i = JSON.stringify(e);
|
|
3961
4024
|
if (t.options.doubleQuotedAsJSON)
|
|
3962
4025
|
return i;
|
|
3963
|
-
const { implicitKey: s } = t, r = t.options.doubleQuotedMinMultiLineLength, n = t.indent || (
|
|
4026
|
+
const { implicitKey: s } = t, r = t.options.doubleQuotedMinMultiLineLength, n = t.indent || (ot(e) ? " " : "");
|
|
3964
4027
|
let o = "", l = 0;
|
|
3965
4028
|
for (let u = 0, c = i[u]; c; c = i[++u])
|
|
3966
4029
|
if (c === " " && i[u + 1] === "\\" && i[u + 2] === "n" && (o += i.slice(l, u) + "\\ ", u += 1, l = u, c = "\\"), c === "\\")
|
|
@@ -3968,8 +4031,8 @@ function Ae(e, t) {
|
|
|
3968
4031
|
case "u":
|
|
3969
4032
|
{
|
|
3970
4033
|
o += i.slice(l, u);
|
|
3971
|
-
const
|
|
3972
|
-
switch (
|
|
4034
|
+
const p = i.substr(u + 2, 4);
|
|
4035
|
+
switch (p) {
|
|
3973
4036
|
case "0000":
|
|
3974
4037
|
o += "\\0";
|
|
3975
4038
|
break;
|
|
@@ -3995,7 +4058,7 @@ function Ae(e, t) {
|
|
|
3995
4058
|
o += "\\P";
|
|
3996
4059
|
break;
|
|
3997
4060
|
default:
|
|
3998
|
-
|
|
4061
|
+
p.substr(0, 2) === "00" ? o += "\\x" + p.substr(2) : o += i.substr(u, 6);
|
|
3999
4062
|
}
|
|
4000
4063
|
u += 5, l = u + 1;
|
|
4001
4064
|
}
|
|
@@ -4015,24 +4078,24 @@ function Ae(e, t) {
|
|
|
4015
4078
|
default:
|
|
4016
4079
|
u += 1;
|
|
4017
4080
|
}
|
|
4018
|
-
return o = l ? o + i.slice(l) : i, s ? o :
|
|
4081
|
+
return o = l ? o + i.slice(l) : i, s ? o : nt(o, n, Ue, at(t, !1));
|
|
4019
4082
|
}
|
|
4020
|
-
function
|
|
4083
|
+
function _t(e, t) {
|
|
4021
4084
|
if (t.options.singleQuote === !1 || t.implicitKey && e.includes(`
|
|
4022
4085
|
`) || /[ \t]\n|\n[ \t]/.test(e))
|
|
4023
|
-
return
|
|
4024
|
-
const i = t.indent || (
|
|
4086
|
+
return Ie(e, t);
|
|
4087
|
+
const i = t.indent || (ot(e) ? " " : ""), s = "'" + e.replace(/'/g, "''").replace(/\n+/g, `$&
|
|
4025
4088
|
${i}`) + "'";
|
|
4026
|
-
return t.implicitKey ? s :
|
|
4089
|
+
return t.implicitKey ? s : nt(s, i, Gi, at(t, !1));
|
|
4027
4090
|
}
|
|
4028
4091
|
function xe(e, t) {
|
|
4029
4092
|
const { singleQuote: i } = t.options;
|
|
4030
4093
|
let s;
|
|
4031
4094
|
if (i === !1)
|
|
4032
|
-
s =
|
|
4095
|
+
s = Ie;
|
|
4033
4096
|
else {
|
|
4034
4097
|
const r = e.includes('"'), n = e.includes("'");
|
|
4035
|
-
r && !n ? s =
|
|
4098
|
+
r && !n ? s = _t : n && !r ? s = Ie : s = i ? _t : Ie;
|
|
4036
4099
|
}
|
|
4037
4100
|
return s(e, t);
|
|
4038
4101
|
}
|
|
@@ -4045,114 +4108,114 @@ try {
|
|
|
4045
4108
|
} catch {
|
|
4046
4109
|
St = /\n+(?!\n|$)/g;
|
|
4047
4110
|
}
|
|
4048
|
-
function
|
|
4111
|
+
function qe({ comment: e, type: t, value: i }, s, r, n) {
|
|
4049
4112
|
const { blockQuote: o, commentString: l, lineWidth: u } = s.options;
|
|
4050
4113
|
if (!o || /\n[\t ]+$/.test(i))
|
|
4051
4114
|
return xe(i, s);
|
|
4052
|
-
const c = s.indent || (s.forceBlockIndent ||
|
|
4115
|
+
const c = s.indent || (s.forceBlockIndent || ot(i) ? " " : ""), p = o === "literal" ? !0 : o === "folded" || t === T.BLOCK_FOLDED ? !1 : t === T.BLOCK_LITERAL ? !0 : !Ar(i, u, c.length);
|
|
4053
4116
|
if (!i)
|
|
4054
|
-
return
|
|
4117
|
+
return p ? `|
|
|
4055
4118
|
` : `>
|
|
4056
4119
|
`;
|
|
4057
|
-
let
|
|
4058
|
-
for (
|
|
4059
|
-
const P = i[
|
|
4120
|
+
let f, h;
|
|
4121
|
+
for (h = i.length; h > 0; --h) {
|
|
4122
|
+
const P = i[h - 1];
|
|
4060
4123
|
if (P !== `
|
|
4061
4124
|
` && P !== " " && P !== " ")
|
|
4062
4125
|
break;
|
|
4063
4126
|
}
|
|
4064
|
-
let
|
|
4065
|
-
const
|
|
4127
|
+
let m = i.substring(h);
|
|
4128
|
+
const x = m.indexOf(`
|
|
4066
4129
|
`);
|
|
4067
|
-
|
|
4068
|
-
` && (
|
|
4069
|
-
let d = !1, b,
|
|
4130
|
+
x === -1 ? f = "-" : i === m || x !== m.length - 1 ? (f = "+", n && n()) : f = "", m && (i = i.slice(0, -m.length), m[m.length - 1] === `
|
|
4131
|
+
` && (m = m.slice(0, -1)), m = m.replace(St, `$&${c}`));
|
|
4132
|
+
let d = !1, b, w = -1;
|
|
4070
4133
|
for (b = 0; b < i.length; ++b) {
|
|
4071
4134
|
const P = i[b];
|
|
4072
4135
|
if (P === " ")
|
|
4073
4136
|
d = !0;
|
|
4074
4137
|
else if (P === `
|
|
4075
4138
|
`)
|
|
4076
|
-
|
|
4139
|
+
w = b;
|
|
4077
4140
|
else
|
|
4078
4141
|
break;
|
|
4079
4142
|
}
|
|
4080
|
-
let
|
|
4081
|
-
|
|
4082
|
-
let I = (d ? c ? "2" : "1" : "") +
|
|
4083
|
-
if (e && (I += " " + l(e.replace(/ ?[\r\n]+/g, " ")), r && r()), !
|
|
4143
|
+
let A = i.substring(0, w < b ? w + 1 : b);
|
|
4144
|
+
A && (i = i.substring(A.length), A = A.replace(/\n+/g, `$&${c}`));
|
|
4145
|
+
let I = (d ? c ? "2" : "1" : "") + f;
|
|
4146
|
+
if (e && (I += " " + l(e.replace(/ ?[\r\n]+/g, " ")), r && r()), !p) {
|
|
4084
4147
|
const P = i.replace(/\n+/g, `
|
|
4085
4148
|
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${c}`);
|
|
4086
4149
|
let j = !1;
|
|
4087
|
-
const q =
|
|
4088
|
-
o !== "folded" && t !==
|
|
4150
|
+
const q = at(s, !0);
|
|
4151
|
+
o !== "folded" && t !== T.BLOCK_FOLDED && (q.onOverflow = () => {
|
|
4089
4152
|
j = !0;
|
|
4090
4153
|
});
|
|
4091
|
-
const
|
|
4154
|
+
const le = nt(`${A}${P}${m}`, c, vt, q);
|
|
4092
4155
|
if (!j)
|
|
4093
4156
|
return `>${I}
|
|
4094
|
-
${c}${
|
|
4157
|
+
${c}${le}`;
|
|
4095
4158
|
}
|
|
4096
4159
|
return i = i.replace(/\n+/g, `$&${c}`), `|${I}
|
|
4097
|
-
${c}${
|
|
4160
|
+
${c}${A}${i}${m}`;
|
|
4098
4161
|
}
|
|
4099
|
-
function
|
|
4100
|
-
const { type: r, value: n } = e, { actualString: o, implicitKey: l, indent: u, indentStep: c, inFlow:
|
|
4162
|
+
function Er(e, t, i, s) {
|
|
4163
|
+
const { type: r, value: n } = e, { actualString: o, implicitKey: l, indent: u, indentStep: c, inFlow: p } = t;
|
|
4101
4164
|
if (l && n.includes(`
|
|
4102
|
-
`) ||
|
|
4165
|
+
`) || p && /[[\]{},]/.test(n))
|
|
4103
4166
|
return xe(n, t);
|
|
4104
4167
|
if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(n))
|
|
4105
|
-
return l ||
|
|
4106
|
-
`) ? xe(n, t) :
|
|
4107
|
-
if (!l && !
|
|
4168
|
+
return l || p || !n.includes(`
|
|
4169
|
+
`) ? xe(n, t) : qe(e, t, i, s);
|
|
4170
|
+
if (!l && !p && r !== T.PLAIN && n.includes(`
|
|
4108
4171
|
`))
|
|
4109
|
-
return
|
|
4110
|
-
if (
|
|
4172
|
+
return qe(e, t, i, s);
|
|
4173
|
+
if (ot(n)) {
|
|
4111
4174
|
if (u === "")
|
|
4112
|
-
return t.forceBlockIndent = !0,
|
|
4175
|
+
return t.forceBlockIndent = !0, qe(e, t, i, s);
|
|
4113
4176
|
if (l && u === c)
|
|
4114
4177
|
return xe(n, t);
|
|
4115
4178
|
}
|
|
4116
|
-
const
|
|
4179
|
+
const f = n.replace(/\n+/g, `$&
|
|
4117
4180
|
${u}`);
|
|
4118
4181
|
if (o) {
|
|
4119
|
-
const
|
|
4120
|
-
if (
|
|
4182
|
+
const h = (d) => d.default && d.tag !== "tag:yaml.org,2002:str" && d.test?.test(f), { compat: m, tags: x } = t.doc.schema;
|
|
4183
|
+
if (x.some(h) || m?.some(h))
|
|
4121
4184
|
return xe(n, t);
|
|
4122
4185
|
}
|
|
4123
|
-
return l ?
|
|
4186
|
+
return l ? f : nt(f, u, Gi, at(t, !1));
|
|
4124
4187
|
}
|
|
4125
|
-
function
|
|
4188
|
+
function Ir(e, t, i, s) {
|
|
4126
4189
|
const { implicitKey: r, inFlow: n } = t, o = typeof e.value == "string" ? e : Object.assign({}, e, { value: String(e.value) });
|
|
4127
4190
|
let { type: l } = e;
|
|
4128
|
-
l !==
|
|
4129
|
-
const u = (
|
|
4130
|
-
switch (
|
|
4131
|
-
case
|
|
4132
|
-
case
|
|
4133
|
-
return r || n ? xe(o.value, t) :
|
|
4134
|
-
case
|
|
4135
|
-
return
|
|
4136
|
-
case
|
|
4137
|
-
return
|
|
4138
|
-
case
|
|
4139
|
-
return
|
|
4191
|
+
l !== T.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (l = T.QUOTE_DOUBLE);
|
|
4192
|
+
const u = (p) => {
|
|
4193
|
+
switch (p) {
|
|
4194
|
+
case T.BLOCK_FOLDED:
|
|
4195
|
+
case T.BLOCK_LITERAL:
|
|
4196
|
+
return r || n ? xe(o.value, t) : qe(o, t, i, s);
|
|
4197
|
+
case T.QUOTE_DOUBLE:
|
|
4198
|
+
return Ie(o.value, t);
|
|
4199
|
+
case T.QUOTE_SINGLE:
|
|
4200
|
+
return _t(o.value, t);
|
|
4201
|
+
case T.PLAIN:
|
|
4202
|
+
return Er(o, t, i, s);
|
|
4140
4203
|
default:
|
|
4141
4204
|
return null;
|
|
4142
4205
|
}
|
|
4143
4206
|
};
|
|
4144
4207
|
let c = u(l);
|
|
4145
4208
|
if (c === null) {
|
|
4146
|
-
const { defaultKeyType:
|
|
4147
|
-
if (c = u(
|
|
4148
|
-
throw new Error(`Unsupported default string type ${
|
|
4209
|
+
const { defaultKeyType: p, defaultStringType: f } = t.options, h = r && p || f;
|
|
4210
|
+
if (c = u(h), c === null)
|
|
4211
|
+
throw new Error(`Unsupported default string type ${h}`);
|
|
4149
4212
|
}
|
|
4150
4213
|
return c;
|
|
4151
4214
|
}
|
|
4152
|
-
function
|
|
4215
|
+
function Nr(e, t) {
|
|
4153
4216
|
const i = Object.assign({
|
|
4154
4217
|
blockQuote: !0,
|
|
4155
|
-
commentString:
|
|
4218
|
+
commentString: Cr,
|
|
4156
4219
|
defaultKeyType: null,
|
|
4157
4220
|
defaultStringType: "PLAIN",
|
|
4158
4221
|
directives: null,
|
|
@@ -4190,14 +4253,14 @@ function mr(e, t) {
|
|
|
4190
4253
|
options: i
|
|
4191
4254
|
};
|
|
4192
4255
|
}
|
|
4193
|
-
function
|
|
4256
|
+
function Pr(e, t) {
|
|
4194
4257
|
if (t.tag) {
|
|
4195
4258
|
const r = e.filter((n) => n.tag === t.tag);
|
|
4196
4259
|
if (r.length > 0)
|
|
4197
4260
|
return r.find((n) => n.format === t.format) ?? r[0];
|
|
4198
4261
|
}
|
|
4199
4262
|
let i, s;
|
|
4200
|
-
if (
|
|
4263
|
+
if (O(t)) {
|
|
4201
4264
|
s = t.value;
|
|
4202
4265
|
let r = e.filter((n) => n.identify?.(s));
|
|
4203
4266
|
if (r.length > 1) {
|
|
@@ -4213,18 +4276,18 @@ function gr(e, t) {
|
|
|
4213
4276
|
}
|
|
4214
4277
|
return i;
|
|
4215
4278
|
}
|
|
4216
|
-
function
|
|
4279
|
+
function Tr(e, t, { anchors: i, doc: s }) {
|
|
4217
4280
|
if (!s.directives)
|
|
4218
4281
|
return "";
|
|
4219
|
-
const r = [], n = (
|
|
4220
|
-
n &&
|
|
4282
|
+
const r = [], n = (O(e) || U(e)) && e.anchor;
|
|
4283
|
+
n && $i(n) && (i.add(n), r.push(`&${n}`));
|
|
4221
4284
|
const o = e.tag ?? (t.default ? null : t.tag);
|
|
4222
4285
|
return o && r.push(s.directives.tagString(o)), r.join(" ");
|
|
4223
4286
|
}
|
|
4224
4287
|
function He(e, t, i, s) {
|
|
4225
|
-
if (
|
|
4288
|
+
if (L(e))
|
|
4226
4289
|
return e.toString(t, i, s);
|
|
4227
|
-
if (
|
|
4290
|
+
if (me(e)) {
|
|
4228
4291
|
if (t.doc.directives)
|
|
4229
4292
|
return e.toString(t);
|
|
4230
4293
|
if (t.resolvedAliases?.has(e))
|
|
@@ -4232,102 +4295,102 @@ function He(e, t, i, s) {
|
|
|
4232
4295
|
t.resolvedAliases ? t.resolvedAliases.add(e) : t.resolvedAliases = /* @__PURE__ */ new Set([e]), e = e.resolve(t.doc);
|
|
4233
4296
|
}
|
|
4234
4297
|
let r;
|
|
4235
|
-
const n =
|
|
4236
|
-
r ?? (r =
|
|
4237
|
-
const o =
|
|
4298
|
+
const n = F(e) ? e : t.doc.createNode(e, { onTagObj: (u) => r = u });
|
|
4299
|
+
r ?? (r = Pr(t.doc.schema.tags, n));
|
|
4300
|
+
const o = Tr(n, r, t);
|
|
4238
4301
|
o.length > 0 && (t.indentAtStart = (t.indentAtStart ?? 0) + o.length + 1);
|
|
4239
|
-
const l = typeof r.stringify == "function" ? r.stringify(n, t, i, s) :
|
|
4240
|
-
return o ?
|
|
4302
|
+
const l = typeof r.stringify == "function" ? r.stringify(n, t, i, s) : O(n) ? Ir(n, t, i, s) : n.toString(t, i, s);
|
|
4303
|
+
return o ? O(n) || l[0] === "{" || l[0] === "[" ? `${o} ${l}` : `${o}
|
|
4241
4304
|
${t.indent}${l}` : l;
|
|
4242
4305
|
}
|
|
4243
|
-
function
|
|
4244
|
-
const { allNullValues: n, doc: o, indent: l, indentStep: u, options: { commentString: c, indentSeq:
|
|
4245
|
-
let
|
|
4246
|
-
if (
|
|
4247
|
-
if (
|
|
4306
|
+
function Or({ key: e, value: t }, i, s, r) {
|
|
4307
|
+
const { allNullValues: n, doc: o, indent: l, indentStep: u, options: { commentString: c, indentSeq: p, simpleKeys: f } } = i;
|
|
4308
|
+
let h = F(e) && e.comment || null;
|
|
4309
|
+
if (f) {
|
|
4310
|
+
if (h)
|
|
4248
4311
|
throw new Error("With simple keys, key nodes cannot have comments");
|
|
4249
|
-
if (U(e) || !
|
|
4312
|
+
if (U(e) || !F(e) && typeof e == "object") {
|
|
4250
4313
|
const q = "With simple keys, collection cannot be used as a key value";
|
|
4251
4314
|
throw new Error(q);
|
|
4252
4315
|
}
|
|
4253
4316
|
}
|
|
4254
|
-
let
|
|
4317
|
+
let m = !f && (!e || h && t == null && !i.inFlow || U(e) || (O(e) ? e.type === T.BLOCK_FOLDED || e.type === T.BLOCK_LITERAL : typeof e == "object"));
|
|
4255
4318
|
i = Object.assign({}, i, {
|
|
4256
4319
|
allNullValues: !1,
|
|
4257
|
-
implicitKey: !
|
|
4320
|
+
implicitKey: !m && (f || !n),
|
|
4258
4321
|
indent: l + u
|
|
4259
4322
|
});
|
|
4260
|
-
let
|
|
4261
|
-
if (!
|
|
4262
|
-
if (
|
|
4323
|
+
let x = !1, d = !1, b = He(e, i, () => x = !0, () => d = !0);
|
|
4324
|
+
if (!m && !i.inFlow && b.length > 1024) {
|
|
4325
|
+
if (f)
|
|
4263
4326
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
4264
|
-
|
|
4327
|
+
m = !0;
|
|
4265
4328
|
}
|
|
4266
4329
|
if (i.inFlow) {
|
|
4267
4330
|
if (n || t == null)
|
|
4268
|
-
return
|
|
4269
|
-
} else if (n && !
|
|
4270
|
-
return b = `? ${b}`,
|
|
4271
|
-
|
|
4272
|
-
${l}:`) : (b = `${b}:`,
|
|
4273
|
-
let
|
|
4274
|
-
|
|
4331
|
+
return x && s && s(), b === "" ? "?" : m ? `? ${b}` : b;
|
|
4332
|
+
} else if (n && !f || t == null && m)
|
|
4333
|
+
return b = `? ${b}`, h && !x ? b += be(b, i.indent, c(h)) : d && r && r(), b;
|
|
4334
|
+
x && (h = null), m ? (h && (b += be(b, i.indent, c(h))), b = `? ${b}
|
|
4335
|
+
${l}:`) : (b = `${b}:`, h && (b += be(b, i.indent, c(h))));
|
|
4336
|
+
let w, A, E;
|
|
4337
|
+
F(t) ? (w = !!t.spaceBefore, A = t.commentBefore, E = t.comment) : (w = !1, A = null, E = null, t && typeof t == "object" && (t = o.createNode(t))), i.implicitKey = !1, !m && !h && O(t) && (i.indentAtStart = b.length + 1), d = !1, !p && u.length >= 2 && !i.inFlow && !m && Vt(t) && !t.flow && !t.tag && !t.anchor && (i.indent = i.indent.substring(2));
|
|
4275
4338
|
let I = !1;
|
|
4276
4339
|
const P = He(t, i, () => I = !0, () => d = !0);
|
|
4277
4340
|
let j = " ";
|
|
4278
|
-
if (
|
|
4279
|
-
if (j =
|
|
4280
|
-
` : "",
|
|
4281
|
-
const q = c(
|
|
4341
|
+
if (h || w || A) {
|
|
4342
|
+
if (j = w ? `
|
|
4343
|
+
` : "", A) {
|
|
4344
|
+
const q = c(A);
|
|
4282
4345
|
j += `
|
|
4283
|
-
${
|
|
4346
|
+
${Te(q, i.indent)}`;
|
|
4284
4347
|
}
|
|
4285
4348
|
P === "" && !i.inFlow ? j === `
|
|
4286
|
-
` &&
|
|
4349
|
+
` && E && (j = `
|
|
4287
4350
|
|
|
4288
4351
|
`) : j += `
|
|
4289
4352
|
${i.indent}`;
|
|
4290
|
-
} else if (!
|
|
4291
|
-
const q = P[0],
|
|
4292
|
-
`),
|
|
4293
|
-
if (
|
|
4294
|
-
let
|
|
4295
|
-
if (
|
|
4296
|
-
let
|
|
4297
|
-
q === "&" &&
|
|
4353
|
+
} else if (!m && U(t)) {
|
|
4354
|
+
const q = P[0], le = P.indexOf(`
|
|
4355
|
+
`), Re = le !== -1, ut = i.inFlow ?? t.flow ?? t.items.length === 0;
|
|
4356
|
+
if (Re || !ut) {
|
|
4357
|
+
let Fe = !1;
|
|
4358
|
+
if (Re && (q === "&" || q === "!")) {
|
|
4359
|
+
let ee = P.indexOf(" ");
|
|
4360
|
+
q === "&" && ee !== -1 && ee < le && P[ee + 1] === "!" && (ee = P.indexOf(" ", ee + 1)), (ee === -1 || le < ee) && (Fe = !0);
|
|
4298
4361
|
}
|
|
4299
|
-
|
|
4362
|
+
Fe || (j = `
|
|
4300
4363
|
${i.indent}`);
|
|
4301
4364
|
}
|
|
4302
4365
|
} else (P === "" || P[0] === `
|
|
4303
4366
|
`) && (j = "");
|
|
4304
|
-
return b += j + P, i.inFlow ? I && s && s() :
|
|
4367
|
+
return b += j + P, i.inFlow ? I && s && s() : E && !I ? b += be(b, i.indent, c(E)) : d && r && r(), b;
|
|
4305
4368
|
}
|
|
4306
|
-
function
|
|
4369
|
+
function Vr(e, t) {
|
|
4307
4370
|
(e === "debug" || e === "warn") && console.warn(t);
|
|
4308
4371
|
}
|
|
4309
|
-
const Be = "<<",
|
|
4372
|
+
const Be = "<<", dt = {
|
|
4310
4373
|
identify: (e) => e === Be || typeof e == "symbol" && e.description === Be,
|
|
4311
4374
|
default: "key",
|
|
4312
4375
|
tag: "tag:yaml.org,2002:merge",
|
|
4313
4376
|
test: /^<<$/,
|
|
4314
|
-
resolve: () => Object.assign(new
|
|
4315
|
-
addToJSMap:
|
|
4377
|
+
resolve: () => Object.assign(new T(Symbol(Be)), {
|
|
4378
|
+
addToJSMap: Wi
|
|
4316
4379
|
}),
|
|
4317
4380
|
stringify: () => Be
|
|
4318
|
-
},
|
|
4319
|
-
function
|
|
4320
|
-
if (i = e &&
|
|
4381
|
+
}, Lr = (e, t) => (dt.identify(t) || O(t) && (!t.type || t.type === T.PLAIN) && dt.identify(t.value)) && e?.doc.schema.tags.some((i) => i.tag === dt.tag && i.default);
|
|
4382
|
+
function Wi(e, t, i) {
|
|
4383
|
+
if (i = e && me(i) ? i.resolve(e.doc) : i, Vt(i))
|
|
4321
4384
|
for (const s of i.items)
|
|
4322
|
-
|
|
4385
|
+
mt(e, t, s);
|
|
4323
4386
|
else if (Array.isArray(i))
|
|
4324
4387
|
for (const s of i)
|
|
4325
|
-
|
|
4388
|
+
mt(e, t, s);
|
|
4326
4389
|
else
|
|
4327
|
-
|
|
4390
|
+
mt(e, t, i);
|
|
4328
4391
|
}
|
|
4329
|
-
function
|
|
4330
|
-
const s = e &&
|
|
4392
|
+
function mt(e, t, i) {
|
|
4393
|
+
const s = e && me(i) ? i.resolve(e.doc) : i;
|
|
4331
4394
|
if (!Bi(s))
|
|
4332
4395
|
throw new Error("Merge sources must be maps or map aliases");
|
|
4333
4396
|
const r = s.toJSON(null, e, Map);
|
|
@@ -4340,19 +4403,19 @@ function dt(e, t, i) {
|
|
|
4340
4403
|
});
|
|
4341
4404
|
return t;
|
|
4342
4405
|
}
|
|
4343
|
-
function
|
|
4344
|
-
if (
|
|
4406
|
+
function Ki(e, t, { key: i, value: s }) {
|
|
4407
|
+
if (F(i) && i.addToJSMap)
|
|
4345
4408
|
i.addToJSMap(e, t, s);
|
|
4346
|
-
else if (
|
|
4347
|
-
|
|
4409
|
+
else if (Lr(e, i))
|
|
4410
|
+
Wi(e, t, s);
|
|
4348
4411
|
else {
|
|
4349
|
-
const r =
|
|
4412
|
+
const r = H(i, "", e);
|
|
4350
4413
|
if (t instanceof Map)
|
|
4351
|
-
t.set(r,
|
|
4414
|
+
t.set(r, H(s, r, e));
|
|
4352
4415
|
else if (t instanceof Set)
|
|
4353
4416
|
t.add(r);
|
|
4354
4417
|
else {
|
|
4355
|
-
const n =
|
|
4418
|
+
const n = Rr(i, r, e), o = H(s, n, e);
|
|
4356
4419
|
n in t ? Object.defineProperty(t, n, {
|
|
4357
4420
|
value: o,
|
|
4358
4421
|
writable: !0,
|
|
@@ -4363,13 +4426,13 @@ function Wi(e, t, { key: i, value: s }) {
|
|
|
4363
4426
|
}
|
|
4364
4427
|
return t;
|
|
4365
4428
|
}
|
|
4366
|
-
function
|
|
4429
|
+
function Rr(e, t, i) {
|
|
4367
4430
|
if (t === null)
|
|
4368
4431
|
return "";
|
|
4369
4432
|
if (typeof t != "object")
|
|
4370
4433
|
return String(t);
|
|
4371
|
-
if (
|
|
4372
|
-
const s =
|
|
4434
|
+
if (F(e) && i?.doc) {
|
|
4435
|
+
const s = Nr(i.doc, {});
|
|
4373
4436
|
s.anchors = /* @__PURE__ */ new Set();
|
|
4374
4437
|
for (const n of i.anchors.keys())
|
|
4375
4438
|
s.anchors.add(n.anchor);
|
|
@@ -4377,68 +4440,68 @@ function Sr(e, t, i) {
|
|
|
4377
4440
|
const r = e.toString(s);
|
|
4378
4441
|
if (!i.mapKeyWarned) {
|
|
4379
4442
|
let n = JSON.stringify(r);
|
|
4380
|
-
n.length > 40 && (n = n.substring(0, 36) + '..."'),
|
|
4443
|
+
n.length > 40 && (n = n.substring(0, 36) + '..."'), Vr(i.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${n}. Set mapAsMap: true to use object keys.`), i.mapKeyWarned = !0;
|
|
4381
4444
|
}
|
|
4382
4445
|
return r;
|
|
4383
4446
|
}
|
|
4384
4447
|
return JSON.stringify(t);
|
|
4385
4448
|
}
|
|
4386
|
-
function
|
|
4387
|
-
const s =
|
|
4388
|
-
return new
|
|
4449
|
+
function Rt(e, t, i) {
|
|
4450
|
+
const s = Je(e, void 0, i), r = Je(t, void 0, i);
|
|
4451
|
+
return new te(s, r);
|
|
4389
4452
|
}
|
|
4390
|
-
class
|
|
4453
|
+
class te {
|
|
4391
4454
|
constructor(t, i = null) {
|
|
4392
|
-
Object.defineProperty(this,
|
|
4455
|
+
Object.defineProperty(this, Z, { value: Di }), this.key = t, this.value = i;
|
|
4393
4456
|
}
|
|
4394
4457
|
clone(t) {
|
|
4395
4458
|
let { key: i, value: s } = this;
|
|
4396
|
-
return
|
|
4459
|
+
return F(i) && (i = i.clone(t)), F(s) && (s = s.clone(t)), new te(i, s);
|
|
4397
4460
|
}
|
|
4398
4461
|
toJSON(t, i) {
|
|
4399
4462
|
const s = i?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
4400
|
-
return
|
|
4463
|
+
return Ki(i, s, this);
|
|
4401
4464
|
}
|
|
4402
4465
|
toString(t, i, s) {
|
|
4403
|
-
return t?.doc ?
|
|
4466
|
+
return t?.doc ? Or(this, t, i, s) : JSON.stringify(this);
|
|
4404
4467
|
}
|
|
4405
4468
|
}
|
|
4406
|
-
function
|
|
4407
|
-
return (t.inFlow ?? e.flow ?
|
|
4469
|
+
function zi(e, t, i) {
|
|
4470
|
+
return (t.inFlow ?? e.flow ? Mr : Fr)(e, t, i);
|
|
4408
4471
|
}
|
|
4409
|
-
function
|
|
4410
|
-
const { indent: u, options: { commentString: c } } = i,
|
|
4411
|
-
let
|
|
4412
|
-
const
|
|
4413
|
-
for (let
|
|
4414
|
-
const d = t[
|
|
4472
|
+
function Fr({ comment: e, items: t }, i, { blockItemPrefix: s, flowChars: r, itemIndent: n, onChompKeep: o, onComment: l }) {
|
|
4473
|
+
const { indent: u, options: { commentString: c } } = i, p = Object.assign({}, i, { indent: n, type: null });
|
|
4474
|
+
let f = !1;
|
|
4475
|
+
const h = [];
|
|
4476
|
+
for (let x = 0; x < t.length; ++x) {
|
|
4477
|
+
const d = t[x];
|
|
4415
4478
|
let b = null;
|
|
4416
|
-
if (
|
|
4417
|
-
!
|
|
4418
|
-
else if (
|
|
4419
|
-
const
|
|
4420
|
-
|
|
4479
|
+
if (F(d))
|
|
4480
|
+
!f && d.spaceBefore && h.push(""), Qe(i, h, d.commentBefore, f), d.comment && (b = d.comment);
|
|
4481
|
+
else if (L(d)) {
|
|
4482
|
+
const A = F(d.key) ? d.key : null;
|
|
4483
|
+
A && (!f && A.spaceBefore && h.push(""), Qe(i, h, A.commentBefore, f));
|
|
4421
4484
|
}
|
|
4422
|
-
|
|
4423
|
-
let
|
|
4424
|
-
b && (
|
|
4485
|
+
f = !1;
|
|
4486
|
+
let w = He(d, p, () => b = null, () => f = !0);
|
|
4487
|
+
b && (w += be(w, n, c(b))), f && b && (f = !1), h.push(s + w);
|
|
4425
4488
|
}
|
|
4426
|
-
let
|
|
4427
|
-
if (
|
|
4428
|
-
|
|
4489
|
+
let m;
|
|
4490
|
+
if (h.length === 0)
|
|
4491
|
+
m = r.start + r.end;
|
|
4429
4492
|
else {
|
|
4430
|
-
|
|
4431
|
-
for (let
|
|
4432
|
-
const d =
|
|
4433
|
-
|
|
4493
|
+
m = h[0];
|
|
4494
|
+
for (let x = 1; x < h.length; ++x) {
|
|
4495
|
+
const d = h[x];
|
|
4496
|
+
m += d ? `
|
|
4434
4497
|
${u}${d}` : `
|
|
4435
4498
|
`;
|
|
4436
4499
|
}
|
|
4437
4500
|
}
|
|
4438
|
-
return e ? (
|
|
4439
|
-
` +
|
|
4501
|
+
return e ? (m += `
|
|
4502
|
+
` + Te(c(e), u), l && l()) : f && o && o(), m;
|
|
4440
4503
|
}
|
|
4441
|
-
function
|
|
4504
|
+
function Mr({ items: e }, t, { flowChars: i, itemIndent: s }) {
|
|
4442
4505
|
const { indent: r, indentStep: n, flowCollectionPadding: o, options: { commentString: l } } = t;
|
|
4443
4506
|
s += n;
|
|
4444
4507
|
const u = Object.assign({}, t, {
|
|
@@ -4446,60 +4509,60 @@ function wr({ items: e }, t, { flowChars: i, itemIndent: s }) {
|
|
|
4446
4509
|
inFlow: !0,
|
|
4447
4510
|
type: null
|
|
4448
4511
|
});
|
|
4449
|
-
let c = !1,
|
|
4450
|
-
const
|
|
4451
|
-
for (let
|
|
4452
|
-
const d = e[
|
|
4512
|
+
let c = !1, p = 0;
|
|
4513
|
+
const f = [];
|
|
4514
|
+
for (let x = 0; x < e.length; ++x) {
|
|
4515
|
+
const d = e[x];
|
|
4453
4516
|
let b = null;
|
|
4454
|
-
if (
|
|
4455
|
-
d.spaceBefore &&
|
|
4456
|
-
else if (
|
|
4457
|
-
const
|
|
4458
|
-
|
|
4459
|
-
const
|
|
4460
|
-
|
|
4517
|
+
if (F(d))
|
|
4518
|
+
d.spaceBefore && f.push(""), Qe(t, f, d.commentBefore, !1), d.comment && (b = d.comment);
|
|
4519
|
+
else if (L(d)) {
|
|
4520
|
+
const A = F(d.key) ? d.key : null;
|
|
4521
|
+
A && (A.spaceBefore && f.push(""), Qe(t, f, A.commentBefore, !1), A.comment && (c = !0));
|
|
4522
|
+
const E = F(d.value) ? d.value : null;
|
|
4523
|
+
E ? (E.comment && (b = E.comment), E.commentBefore && (c = !0)) : d.value == null && A?.comment && (b = A.comment);
|
|
4461
4524
|
}
|
|
4462
4525
|
b && (c = !0);
|
|
4463
|
-
let
|
|
4464
|
-
|
|
4465
|
-
`)) && (c = !0),
|
|
4526
|
+
let w = He(d, u, () => b = null);
|
|
4527
|
+
x < e.length - 1 && (w += ","), b && (w += be(w, s, l(b))), !c && (f.length > p || w.includes(`
|
|
4528
|
+
`)) && (c = !0), f.push(w), p = f.length;
|
|
4466
4529
|
}
|
|
4467
|
-
const { start:
|
|
4468
|
-
if (
|
|
4469
|
-
return
|
|
4530
|
+
const { start: h, end: m } = i;
|
|
4531
|
+
if (f.length === 0)
|
|
4532
|
+
return h + m;
|
|
4470
4533
|
if (!c) {
|
|
4471
|
-
const
|
|
4472
|
-
c = t.options.lineWidth > 0 &&
|
|
4534
|
+
const x = f.reduce((d, b) => d + b.length + 2, 2);
|
|
4535
|
+
c = t.options.lineWidth > 0 && x > t.options.lineWidth;
|
|
4473
4536
|
}
|
|
4474
4537
|
if (c) {
|
|
4475
|
-
let
|
|
4476
|
-
for (const d of
|
|
4477
|
-
|
|
4538
|
+
let x = h;
|
|
4539
|
+
for (const d of f)
|
|
4540
|
+
x += d ? `
|
|
4478
4541
|
${n}${r}${d}` : `
|
|
4479
4542
|
`;
|
|
4480
|
-
return `${
|
|
4481
|
-
${r}${
|
|
4543
|
+
return `${x}
|
|
4544
|
+
${r}${m}`;
|
|
4482
4545
|
} else
|
|
4483
|
-
return `${
|
|
4546
|
+
return `${h}${o}${f.join(" ")}${o}${m}`;
|
|
4484
4547
|
}
|
|
4485
4548
|
function Qe({ indent: e, options: { commentString: t } }, i, s, r) {
|
|
4486
4549
|
if (s && r && (s = s.replace(/^\n+/, "")), s) {
|
|
4487
|
-
const n =
|
|
4550
|
+
const n = Te(t(s), e);
|
|
4488
4551
|
i.push(n.trimStart());
|
|
4489
4552
|
}
|
|
4490
4553
|
}
|
|
4491
|
-
function
|
|
4492
|
-
const i =
|
|
4554
|
+
function fe(e, t) {
|
|
4555
|
+
const i = O(t) ? t.value : t;
|
|
4493
4556
|
for (const s of e)
|
|
4494
|
-
if (
|
|
4557
|
+
if (L(s) && (s.key === t || s.key === i || O(s.key) && s.key.value === i))
|
|
4495
4558
|
return s;
|
|
4496
4559
|
}
|
|
4497
|
-
class
|
|
4560
|
+
class ge extends qi {
|
|
4498
4561
|
static get tagName() {
|
|
4499
4562
|
return "tag:yaml.org,2002:map";
|
|
4500
4563
|
}
|
|
4501
4564
|
constructor(t) {
|
|
4502
|
-
super(
|
|
4565
|
+
super(pe, t), this.items = [];
|
|
4503
4566
|
}
|
|
4504
4567
|
/**
|
|
4505
4568
|
* A generic collection parsing method that can be extended
|
|
@@ -4511,7 +4574,7 @@ class me extends Ui {
|
|
|
4511
4574
|
c = n.call(i, u, c);
|
|
4512
4575
|
else if (Array.isArray(n) && !n.includes(u))
|
|
4513
4576
|
return;
|
|
4514
|
-
(c !== void 0 || r) && o.items.push(
|
|
4577
|
+
(c !== void 0 || r) && o.items.push(Rt(u, c, s));
|
|
4515
4578
|
};
|
|
4516
4579
|
if (i instanceof Map)
|
|
4517
4580
|
for (const [u, c] of i)
|
|
@@ -4529,12 +4592,12 @@ class me extends Ui {
|
|
|
4529
4592
|
*/
|
|
4530
4593
|
add(t, i) {
|
|
4531
4594
|
let s;
|
|
4532
|
-
|
|
4533
|
-
const r =
|
|
4595
|
+
L(t) ? s = t : !t || typeof t != "object" || !("key" in t) ? s = new te(t, t?.value) : s = new te(t.key, t.value);
|
|
4596
|
+
const r = fe(this.items, s.key), n = this.schema?.sortMapEntries;
|
|
4534
4597
|
if (r) {
|
|
4535
4598
|
if (!i)
|
|
4536
4599
|
throw new Error(`Key ${s.key} already set`);
|
|
4537
|
-
|
|
4600
|
+
O(r.value) && Ui(s.value) ? r.value.value = s.value : r.value = s.value;
|
|
4538
4601
|
} else if (n) {
|
|
4539
4602
|
const o = this.items.findIndex((l) => n(s, l) < 0);
|
|
4540
4603
|
o === -1 ? this.items.push(s) : this.items.splice(o, 0, s);
|
|
@@ -4542,18 +4605,18 @@ class me extends Ui {
|
|
|
4542
4605
|
this.items.push(s);
|
|
4543
4606
|
}
|
|
4544
4607
|
delete(t) {
|
|
4545
|
-
const i =
|
|
4608
|
+
const i = fe(this.items, t);
|
|
4546
4609
|
return i ? this.items.splice(this.items.indexOf(i), 1).length > 0 : !1;
|
|
4547
4610
|
}
|
|
4548
4611
|
get(t, i) {
|
|
4549
|
-
const r =
|
|
4550
|
-
return (!i &&
|
|
4612
|
+
const r = fe(this.items, t)?.value;
|
|
4613
|
+
return (!i && O(r) ? r.value : r) ?? void 0;
|
|
4551
4614
|
}
|
|
4552
4615
|
has(t) {
|
|
4553
|
-
return !!
|
|
4616
|
+
return !!fe(this.items, t);
|
|
4554
4617
|
}
|
|
4555
4618
|
set(t, i) {
|
|
4556
|
-
this.add(new
|
|
4619
|
+
this.add(new te(t, i), !0);
|
|
4557
4620
|
}
|
|
4558
4621
|
/**
|
|
4559
4622
|
* @param ctx - Conversion context, originally set in Document#toJS()
|
|
@@ -4564,16 +4627,16 @@ class me extends Ui {
|
|
|
4564
4627
|
const r = s ? new s() : i?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
4565
4628
|
i?.onCreate && i.onCreate(r);
|
|
4566
4629
|
for (const n of this.items)
|
|
4567
|
-
|
|
4630
|
+
Ki(i, r, n);
|
|
4568
4631
|
return r;
|
|
4569
4632
|
}
|
|
4570
4633
|
toString(t, i, s) {
|
|
4571
4634
|
if (!t)
|
|
4572
4635
|
return JSON.stringify(this);
|
|
4573
4636
|
for (const r of this.items)
|
|
4574
|
-
if (!
|
|
4637
|
+
if (!L(r))
|
|
4575
4638
|
throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);
|
|
4576
|
-
return !t.allNullValues && this.hasAllNullValues(!1) && (t = Object.assign({}, t, { allNullValues: !0 })),
|
|
4639
|
+
return !t.allNullValues && this.hasAllNullValues(!1) && (t = Object.assign({}, t, { allNullValues: !0 })), zi(this, t, {
|
|
4577
4640
|
blockItemPrefix: "",
|
|
4578
4641
|
flowChars: { start: "{", end: "}" },
|
|
4579
4642
|
itemIndent: t.indent || "",
|
|
@@ -4582,7 +4645,7 @@ class me extends Ui {
|
|
|
4582
4645
|
});
|
|
4583
4646
|
}
|
|
4584
4647
|
}
|
|
4585
|
-
class
|
|
4648
|
+
class Ji extends qi {
|
|
4586
4649
|
static get tagName() {
|
|
4587
4650
|
return "tag:yaml.org,2002:seq";
|
|
4588
4651
|
}
|
|
@@ -4601,15 +4664,15 @@ class zi extends Ui {
|
|
|
4601
4664
|
* @returns `true` if the item was found and removed.
|
|
4602
4665
|
*/
|
|
4603
4666
|
delete(t) {
|
|
4604
|
-
const i =
|
|
4667
|
+
const i = je(t);
|
|
4605
4668
|
return typeof i != "number" ? !1 : this.items.splice(i, 1).length > 0;
|
|
4606
4669
|
}
|
|
4607
4670
|
get(t, i) {
|
|
4608
|
-
const s =
|
|
4671
|
+
const s = je(t);
|
|
4609
4672
|
if (typeof s != "number")
|
|
4610
4673
|
return;
|
|
4611
4674
|
const r = this.items[s];
|
|
4612
|
-
return !i &&
|
|
4675
|
+
return !i && O(r) ? r.value : r;
|
|
4613
4676
|
}
|
|
4614
4677
|
/**
|
|
4615
4678
|
* Checks if the collection includes a value with the key `key`.
|
|
@@ -4618,7 +4681,7 @@ class zi extends Ui {
|
|
|
4618
4681
|
* It may be wrapped in a `Scalar`.
|
|
4619
4682
|
*/
|
|
4620
4683
|
has(t) {
|
|
4621
|
-
const i =
|
|
4684
|
+
const i = je(t);
|
|
4622
4685
|
return typeof i == "number" && i < this.items.length;
|
|
4623
4686
|
}
|
|
4624
4687
|
/**
|
|
@@ -4629,22 +4692,22 @@ class zi extends Ui {
|
|
|
4629
4692
|
* It may be wrapped in a `Scalar`.
|
|
4630
4693
|
*/
|
|
4631
4694
|
set(t, i) {
|
|
4632
|
-
const s =
|
|
4695
|
+
const s = je(t);
|
|
4633
4696
|
if (typeof s != "number")
|
|
4634
4697
|
throw new Error(`Expected a valid index, not ${t}.`);
|
|
4635
4698
|
const r = this.items[s];
|
|
4636
|
-
|
|
4699
|
+
O(r) && Ui(i) ? r.value = i : this.items[s] = i;
|
|
4637
4700
|
}
|
|
4638
4701
|
toJSON(t, i) {
|
|
4639
4702
|
const s = [];
|
|
4640
4703
|
i?.onCreate && i.onCreate(s);
|
|
4641
4704
|
let r = 0;
|
|
4642
4705
|
for (const n of this.items)
|
|
4643
|
-
s.push(
|
|
4706
|
+
s.push(H(n, String(r++), i));
|
|
4644
4707
|
return s;
|
|
4645
4708
|
}
|
|
4646
4709
|
toString(t, i, s) {
|
|
4647
|
-
return t ?
|
|
4710
|
+
return t ? zi(this, t, {
|
|
4648
4711
|
blockItemPrefix: "- ",
|
|
4649
4712
|
flowChars: { start: "[", end: "]" },
|
|
4650
4713
|
itemIndent: (t.indent || "") + " ",
|
|
@@ -4661,18 +4724,18 @@ class zi extends Ui {
|
|
|
4661
4724
|
const u = i instanceof Set ? l : String(o++);
|
|
4662
4725
|
l = r.call(i, u, l);
|
|
4663
4726
|
}
|
|
4664
|
-
n.items.push(
|
|
4727
|
+
n.items.push(Je(l, void 0, s));
|
|
4665
4728
|
}
|
|
4666
4729
|
}
|
|
4667
4730
|
return n;
|
|
4668
4731
|
}
|
|
4669
4732
|
}
|
|
4670
|
-
function
|
|
4671
|
-
let t =
|
|
4733
|
+
function je(e) {
|
|
4734
|
+
let t = O(e) ? e.value : e;
|
|
4672
4735
|
return t && typeof t == "string" && (t = Number(t)), typeof t == "number" && Number.isInteger(t) && t >= 0 ? t : null;
|
|
4673
4736
|
}
|
|
4674
|
-
function
|
|
4675
|
-
const { replacer: s } = i, r = new
|
|
4737
|
+
function Dr(e, t, i) {
|
|
4738
|
+
const { replacer: s } = i, r = new Ji(e);
|
|
4676
4739
|
r.tag = "tag:yaml.org,2002:pairs";
|
|
4677
4740
|
let n = 0;
|
|
4678
4741
|
if (t && Symbol.iterator in Object(t))
|
|
@@ -4692,13 +4755,13 @@ function _r(e, t, i) {
|
|
|
4692
4755
|
throw new TypeError(`Expected tuple with one key, not ${c.length} keys`);
|
|
4693
4756
|
} else
|
|
4694
4757
|
l = o;
|
|
4695
|
-
r.items.push(
|
|
4758
|
+
r.items.push(Rt(l, u, i));
|
|
4696
4759
|
}
|
|
4697
4760
|
return r;
|
|
4698
4761
|
}
|
|
4699
|
-
class
|
|
4762
|
+
class Ft extends Ji {
|
|
4700
4763
|
constructor() {
|
|
4701
|
-
super(), this.add =
|
|
4764
|
+
super(), this.add = ge.prototype.add.bind(this), this.delete = ge.prototype.delete.bind(this), this.get = ge.prototype.get.bind(this), this.has = ge.prototype.has.bind(this), this.set = ge.prototype.set.bind(this), this.tag = Ft.tag;
|
|
4702
4765
|
}
|
|
4703
4766
|
/**
|
|
4704
4767
|
* If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
|
|
@@ -4711,39 +4774,39 @@ class Rt extends zi {
|
|
|
4711
4774
|
i?.onCreate && i.onCreate(s);
|
|
4712
4775
|
for (const r of this.items) {
|
|
4713
4776
|
let n, o;
|
|
4714
|
-
if (
|
|
4777
|
+
if (L(r) ? (n = H(r.key, "", i), o = H(r.value, n, i)) : n = H(r, "", i), s.has(n))
|
|
4715
4778
|
throw new Error("Ordered maps must not include duplicate keys");
|
|
4716
4779
|
s.set(n, o);
|
|
4717
4780
|
}
|
|
4718
4781
|
return s;
|
|
4719
4782
|
}
|
|
4720
4783
|
static from(t, i, s) {
|
|
4721
|
-
const r =
|
|
4784
|
+
const r = Dr(t, i, s), n = new this();
|
|
4722
4785
|
return n.items = r.items, n;
|
|
4723
4786
|
}
|
|
4724
4787
|
}
|
|
4725
|
-
|
|
4726
|
-
class
|
|
4788
|
+
Ft.tag = "tag:yaml.org,2002:omap";
|
|
4789
|
+
class Mt extends ge {
|
|
4727
4790
|
constructor(t) {
|
|
4728
|
-
super(t), this.tag =
|
|
4791
|
+
super(t), this.tag = Mt.tag;
|
|
4729
4792
|
}
|
|
4730
4793
|
add(t) {
|
|
4731
4794
|
let i;
|
|
4732
|
-
|
|
4795
|
+
L(t) ? i = t : t && typeof t == "object" && "key" in t && "value" in t && t.value === null ? i = new te(t.key, null) : i = new te(t, null), fe(this.items, i.key) || this.items.push(i);
|
|
4733
4796
|
}
|
|
4734
4797
|
/**
|
|
4735
4798
|
* If `keepPair` is `true`, returns the Pair matching `key`.
|
|
4736
4799
|
* Otherwise, returns the value of that Pair's key.
|
|
4737
4800
|
*/
|
|
4738
4801
|
get(t, i) {
|
|
4739
|
-
const s =
|
|
4740
|
-
return !i &&
|
|
4802
|
+
const s = fe(this.items, t);
|
|
4803
|
+
return !i && L(s) ? O(s.key) ? s.key.value : s.key : s;
|
|
4741
4804
|
}
|
|
4742
4805
|
set(t, i) {
|
|
4743
4806
|
if (typeof i != "boolean")
|
|
4744
4807
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof i}`);
|
|
4745
|
-
const s =
|
|
4746
|
-
s && !i ? this.items.splice(this.items.indexOf(s), 1) : !s && i && this.items.push(new
|
|
4808
|
+
const s = fe(this.items, t);
|
|
4809
|
+
s && !i ? this.items.splice(this.items.indexOf(s), 1) : !s && i && this.items.push(new te(t));
|
|
4747
4810
|
}
|
|
4748
4811
|
toJSON(t, i) {
|
|
4749
4812
|
return super.toJSON(t, i, Set);
|
|
@@ -4759,23 +4822,23 @@ class Dt extends me {
|
|
|
4759
4822
|
const { replacer: r } = s, n = new this(t);
|
|
4760
4823
|
if (i && Symbol.iterator in Object(i))
|
|
4761
4824
|
for (let o of i)
|
|
4762
|
-
typeof r == "function" && (o = r.call(i, o, o)), n.items.push(
|
|
4825
|
+
typeof r == "function" && (o = r.call(i, o, o)), n.items.push(Rt(o, null, s));
|
|
4763
4826
|
return n;
|
|
4764
4827
|
}
|
|
4765
4828
|
}
|
|
4766
|
-
|
|
4829
|
+
Mt.tag = "tag:yaml.org,2002:set";
|
|
4767
4830
|
new Set("0123456789ABCDEFabcdef");
|
|
4768
4831
|
new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");
|
|
4769
4832
|
new Set(",[]{}");
|
|
4770
4833
|
new Set(` ,[]{}
|
|
4771
4834
|
\r `);
|
|
4772
|
-
const
|
|
4773
|
-
function
|
|
4835
|
+
const Br = /\{\{\s*(var_table|var)\s*\|([\s\S]*?)\}\}/g, jr = /^[ \t]*(```|~~~)[ \t]*media(?:[^\n]*)?\r?\n([\s\S]*?)^[ \t]*\1[ \t]*$/gm;
|
|
4836
|
+
function $r(e) {
|
|
4774
4837
|
const t = [];
|
|
4775
|
-
for (const i of e.matchAll(
|
|
4838
|
+
for (const i of e.matchAll(Br)) {
|
|
4776
4839
|
const s = i.index ?? 0, r = i[0], n = i[2] ?? "";
|
|
4777
4840
|
try {
|
|
4778
|
-
const o =
|
|
4841
|
+
const o = hr(lr(n));
|
|
4779
4842
|
o.length > 0 && t.push({
|
|
4780
4843
|
message: o.join(`
|
|
4781
4844
|
`),
|
|
@@ -4786,10 +4849,10 @@ function Ar(e) {
|
|
|
4786
4849
|
} catch {
|
|
4787
4850
|
}
|
|
4788
4851
|
}
|
|
4789
|
-
for (const i of e.matchAll(
|
|
4852
|
+
for (const i of e.matchAll(jr)) {
|
|
4790
4853
|
const s = i.index ?? 0, r = i[0], n = i[2] ?? "";
|
|
4791
4854
|
try {
|
|
4792
|
-
const o =
|
|
4855
|
+
const o = mr(gr(n));
|
|
4793
4856
|
o.length > 0 && t.push({
|
|
4794
4857
|
message: o.join(`
|
|
4795
4858
|
`),
|
|
@@ -4802,10 +4865,10 @@ function Ar(e) {
|
|
|
4802
4865
|
}
|
|
4803
4866
|
return t;
|
|
4804
4867
|
}
|
|
4805
|
-
const
|
|
4868
|
+
const Ur = {
|
|
4806
4869
|
key: 0,
|
|
4807
4870
|
class: "aimd-editor-loading"
|
|
4808
|
-
}, Yt = "airalogy-aimd",
|
|
4871
|
+
}, Yt = "airalogy-aimd", Gr = /* @__PURE__ */ Hi({
|
|
4809
4872
|
__name: "AimdSourceEditor",
|
|
4810
4873
|
props: {
|
|
4811
4874
|
content: {},
|
|
@@ -4817,17 +4880,17 @@ const Ir = {
|
|
|
4817
4880
|
},
|
|
4818
4881
|
emits: ["content-change", "ready", "monaco-loaded"],
|
|
4819
4882
|
setup(e, { expose: t, emit: i }) {
|
|
4820
|
-
const s = e, r = i, n = /^\s*(```|~~~)\s*assigner(?:\s+.*\bruntime\s*=\s*(?:"client"|'client'|client)\b.*)\s*$/, o = /^\s*(```|~~~)\s*assigner(?:\s+.*)?\s*$/, l = /^\s*(```|~~~)\s*quiz(?:\s+.*)?\s*$/, u = /^\s*(```|~~~)\s*((?:\w|[/#-])+)(?:\s+.*)?\s*$/,
|
|
4821
|
-
let h = null,
|
|
4822
|
-
const
|
|
4823
|
-
function
|
|
4883
|
+
const s = e, r = i, n = /^\s*(```|~~~)\s*assigner(?:\s+.*\bruntime\s*=\s*(?:"client"|'client'|client)\b.*)\s*$/, o = /^\s*(```|~~~)\s*assigner(?:\s+.*)?\s*$/, l = /^\s*(```|~~~)\s*quiz(?:\s+.*)?\s*$/, u = /^\s*(```|~~~)\s*connectors(?:\s+.*)?\s*$/, c = /^\s*(```|~~~)\s*((?:\w|[/#-])+)(?:\s+.*)?\s*$/, p = /^\s*(```|~~~)\s*$/, f = Bt(null);
|
|
4884
|
+
let h = null, m = null, x = !1;
|
|
4885
|
+
const d = Bt(!0);
|
|
4886
|
+
function b(_) {
|
|
4824
4887
|
const $ = s.resolvedMessages;
|
|
4825
|
-
|
|
4888
|
+
_.languages.getLanguages().some((ne) => ne.id === "aimd") || (_.languages.register({
|
|
4826
4889
|
id: "aimd",
|
|
4827
4890
|
extensions: [".aimd"],
|
|
4828
4891
|
aliases: ["AIMD", "aimd"],
|
|
4829
4892
|
mimetypes: ["text/x-aimd"]
|
|
4830
|
-
}),
|
|
4893
|
+
}), _.languages.setLanguageConfiguration("aimd", {
|
|
4831
4894
|
brackets: [
|
|
4832
4895
|
["{", "}"],
|
|
4833
4896
|
["[", "]"],
|
|
@@ -4850,7 +4913,7 @@ const Ir = {
|
|
|
4850
4913
|
{ open: "'", close: "'" },
|
|
4851
4914
|
{ open: "`", close: "`" }
|
|
4852
4915
|
]
|
|
4853
|
-
}),
|
|
4916
|
+
}), _.languages.setMonarchTokensProvider("aimd", {
|
|
4854
4917
|
defaultToken: "",
|
|
4855
4918
|
tokenPostfix: ".aimd",
|
|
4856
4919
|
tokenizer: {
|
|
@@ -4858,10 +4921,11 @@ const Ir = {
|
|
|
4858
4921
|
[/\{\{/, { token: "delimiter.bracket.aimd", next: "@aimdField" }],
|
|
4859
4922
|
[/^#{1,6}\s.*$/, "keyword.md"],
|
|
4860
4923
|
[l, { token: "string.code", next: "@embeddedCodeblock", nextEmbedded: "yaml" }],
|
|
4924
|
+
[u, { token: "string.code", next: "@embeddedCodeblock", nextEmbedded: "yaml" }],
|
|
4861
4925
|
[n, { token: "string.code", next: "@embeddedCodeblock", nextEmbedded: "javascript" }],
|
|
4862
4926
|
[o, { token: "string.code", next: "@embeddedCodeblock", nextEmbedded: "python" }],
|
|
4863
|
-
[
|
|
4864
|
-
[
|
|
4927
|
+
[c, { token: "string.code", next: "@embeddedCodeblock", nextEmbedded: "$2" }],
|
|
4928
|
+
[p, { token: "string.code", next: "@codeblock" }],
|
|
4865
4929
|
[/`[^`]+`/, "string.code"],
|
|
4866
4930
|
[/\*\*[^*]+\*\*/, "strong"],
|
|
4867
4931
|
[/__[^_]+__/, "strong"],
|
|
@@ -4904,9 +4968,9 @@ const Ir = {
|
|
|
4904
4968
|
[/.*$/, ""]
|
|
4905
4969
|
]
|
|
4906
4970
|
}
|
|
4907
|
-
}),
|
|
4971
|
+
}), _.languages.registerCompletionItemProvider("aimd", {
|
|
4908
4972
|
provideCompletionItems: () => {
|
|
4909
|
-
const
|
|
4973
|
+
const ne = ["var", "var_table", "step", "check", "ref_step", "ref_var", "ref_fig", "cite"], Me = {
|
|
4910
4974
|
var: "var_id",
|
|
4911
4975
|
var_table: "table_id",
|
|
4912
4976
|
step: "step_id",
|
|
@@ -4915,16 +4979,16 @@ const Ir = {
|
|
|
4915
4979
|
ref_var: "var_id",
|
|
4916
4980
|
ref_fig: "fig_id",
|
|
4917
4981
|
cite: "ref_id"
|
|
4918
|
-
},
|
|
4919
|
-
label: `{{${
|
|
4920
|
-
kind:
|
|
4921
|
-
insertText: `{{${
|
|
4922
|
-
insertTextRules:
|
|
4923
|
-
documentation: $.completions.insertAimdField(
|
|
4982
|
+
}, Dt = ne.map((De) => ({
|
|
4983
|
+
label: `{{${De}|}}`,
|
|
4984
|
+
kind: _.languages.CompletionItemKind.Snippet,
|
|
4985
|
+
insertText: `{{${De}|\${1:${Me[De] ?? "id"}}}}`,
|
|
4986
|
+
insertTextRules: _.languages.CompletionItemInsertTextRule.InsertAsSnippet,
|
|
4987
|
+
documentation: $.completions.insertAimdField(De)
|
|
4924
4988
|
}));
|
|
4925
|
-
return
|
|
4989
|
+
return Dt.push({
|
|
4926
4990
|
label: $.completions.quizBlockLabel,
|
|
4927
|
-
kind:
|
|
4991
|
+
kind: _.languages.CompletionItemKind.Snippet,
|
|
4928
4992
|
insertText: [
|
|
4929
4993
|
"```quiz",
|
|
4930
4994
|
"id: ${1:quiz_choice_1}",
|
|
@@ -4941,11 +5005,11 @@ const Ir = {
|
|
|
4941
5005
|
"```"
|
|
4942
5006
|
].join(`
|
|
4943
5007
|
`),
|
|
4944
|
-
insertTextRules:
|
|
5008
|
+
insertTextRules: _.languages.CompletionItemInsertTextRule.InsertAsSnippet,
|
|
4945
5009
|
documentation: $.completions.quizBlock
|
|
4946
|
-
}), { suggestions:
|
|
5010
|
+
}), { suggestions: Dt };
|
|
4947
5011
|
}
|
|
4948
|
-
}),
|
|
5012
|
+
}), _.editor.defineTheme("aimd-light", {
|
|
4949
5013
|
base: "vs",
|
|
4950
5014
|
inherit: !0,
|
|
4951
5015
|
rules: [
|
|
@@ -4962,7 +5026,7 @@ const Ir = {
|
|
|
4962
5026
|
{ token: "comment.quote", foreground: "6b7280", fontStyle: "italic" }
|
|
4963
5027
|
],
|
|
4964
5028
|
colors: {}
|
|
4965
|
-
}),
|
|
5029
|
+
}), _.editor.defineTheme("aimd-dark", {
|
|
4966
5030
|
base: "vs-dark",
|
|
4967
5031
|
inherit: !0,
|
|
4968
5032
|
rules: [
|
|
@@ -4981,35 +5045,35 @@ const Ir = {
|
|
|
4981
5045
|
colors: {}
|
|
4982
5046
|
}));
|
|
4983
5047
|
}
|
|
4984
|
-
function
|
|
4985
|
-
if (!
|
|
4986
|
-
const
|
|
4987
|
-
if (!
|
|
4988
|
-
const $ =
|
|
4989
|
-
const
|
|
5048
|
+
function w() {
|
|
5049
|
+
if (!m || !h) return;
|
|
5050
|
+
const _ = h.getModel();
|
|
5051
|
+
if (!_) return;
|
|
5052
|
+
const $ = $r(_.getValue()).map((ce) => {
|
|
5053
|
+
const ne = _.getPositionAt(ce.startOffset), Me = _.getPositionAt(ce.endOffset);
|
|
4990
5054
|
return {
|
|
4991
|
-
severity:
|
|
4992
|
-
message:
|
|
5055
|
+
severity: ce.severity === "error" ? m.MarkerSeverity.Error : m.MarkerSeverity.Warning,
|
|
5056
|
+
message: ce.message,
|
|
4993
5057
|
source: "AIMD",
|
|
4994
|
-
startLineNumber:
|
|
4995
|
-
startColumn:
|
|
4996
|
-
endLineNumber:
|
|
4997
|
-
endColumn:
|
|
5058
|
+
startLineNumber: ne.lineNumber,
|
|
5059
|
+
startColumn: ne.column,
|
|
5060
|
+
endLineNumber: Me.lineNumber,
|
|
5061
|
+
endColumn: Me.column
|
|
4998
5062
|
};
|
|
4999
5063
|
});
|
|
5000
|
-
|
|
5064
|
+
m.editor.setModelMarkers(_, Yt, $);
|
|
5001
5065
|
}
|
|
5002
|
-
function
|
|
5003
|
-
if (!
|
|
5004
|
-
const
|
|
5005
|
-
|
|
5066
|
+
function A() {
|
|
5067
|
+
if (!m || !h) return;
|
|
5068
|
+
const _ = h.getModel();
|
|
5069
|
+
_ && m.editor.setModelMarkers(_, Yt, []);
|
|
5006
5070
|
}
|
|
5007
|
-
function E(
|
|
5071
|
+
function E(_) {
|
|
5008
5072
|
if (!f.value || h) return;
|
|
5009
|
-
const $ = /* @__PURE__ */ new Set(["value", "language", "model"]),
|
|
5010
|
-
Object.entries(s.monacoOptions).filter(([
|
|
5073
|
+
const $ = /* @__PURE__ */ new Set(["value", "language", "model"]), ce = Object.fromEntries(
|
|
5074
|
+
Object.entries(s.monacoOptions).filter(([ne]) => !$.has(ne))
|
|
5011
5075
|
);
|
|
5012
|
-
h =
|
|
5076
|
+
h = _.editor.create(f.value, {
|
|
5013
5077
|
value: s.content,
|
|
5014
5078
|
language: "aimd",
|
|
5015
5079
|
theme: s.theme,
|
|
@@ -5022,72 +5086,72 @@ const Ir = {
|
|
|
5022
5086
|
tabSize: 2,
|
|
5023
5087
|
padding: { top: 12 },
|
|
5024
5088
|
readOnly: s.readonly,
|
|
5025
|
-
...
|
|
5089
|
+
...ce
|
|
5026
5090
|
}), h.onDidChangeModelContent(() => {
|
|
5027
|
-
|
|
5028
|
-
}),
|
|
5091
|
+
w(), x || r("content-change", h.getValue());
|
|
5092
|
+
}), w(), r("ready", h), r("monaco-loaded", _, h);
|
|
5029
5093
|
}
|
|
5030
5094
|
Qi(async () => {
|
|
5031
5095
|
try {
|
|
5032
|
-
|
|
5033
|
-
const
|
|
5034
|
-
|
|
5096
|
+
d.value = !0;
|
|
5097
|
+
const _ = await import("monaco-editor");
|
|
5098
|
+
m = _, b(_), E(_);
|
|
5035
5099
|
} finally {
|
|
5036
|
-
|
|
5100
|
+
d.value = !1;
|
|
5037
5101
|
}
|
|
5038
|
-
}),
|
|
5039
|
-
|
|
5040
|
-
}),
|
|
5041
|
-
!h ||
|
|
5042
|
-
}),
|
|
5043
|
-
|
|
5044
|
-
}),
|
|
5045
|
-
h?.updateOptions({ readOnly:
|
|
5102
|
+
}), Xi(() => {
|
|
5103
|
+
A(), h?.dispose();
|
|
5104
|
+
}), lt(() => s.content, (_) => {
|
|
5105
|
+
!h || _ === h.getValue() || (x = !0, h.setValue(_), x = !1);
|
|
5106
|
+
}), lt(() => s.theme, (_) => {
|
|
5107
|
+
m && m.editor.setTheme(_);
|
|
5108
|
+
}), lt(() => s.readonly, (_) => {
|
|
5109
|
+
h?.updateOptions({ readOnly: _ });
|
|
5046
5110
|
});
|
|
5047
|
-
function
|
|
5111
|
+
function I() {
|
|
5048
5112
|
return h;
|
|
5049
5113
|
}
|
|
5050
|
-
function
|
|
5051
|
-
return
|
|
5114
|
+
function P() {
|
|
5115
|
+
return m;
|
|
5052
5116
|
}
|
|
5053
|
-
function
|
|
5054
|
-
h && (x = !0, h.setValue(
|
|
5117
|
+
function j(_) {
|
|
5118
|
+
h && (x = !0, h.setValue(_), x = !1);
|
|
5055
5119
|
}
|
|
5056
|
-
function
|
|
5120
|
+
function q() {
|
|
5057
5121
|
return h?.getSelection();
|
|
5058
5122
|
}
|
|
5059
|
-
function
|
|
5060
|
-
h?.executeEdits(
|
|
5123
|
+
function le(_, $) {
|
|
5124
|
+
h?.executeEdits(_, $);
|
|
5061
5125
|
}
|
|
5062
|
-
function
|
|
5126
|
+
function Re() {
|
|
5063
5127
|
h?.focus();
|
|
5064
5128
|
}
|
|
5065
|
-
function
|
|
5129
|
+
function ut() {
|
|
5066
5130
|
return h?.getModel();
|
|
5067
5131
|
}
|
|
5068
|
-
function
|
|
5132
|
+
function Fe() {
|
|
5069
5133
|
return h?.getPosition();
|
|
5070
5134
|
}
|
|
5071
|
-
function
|
|
5135
|
+
function ee() {
|
|
5072
5136
|
return h?.getValue();
|
|
5073
5137
|
}
|
|
5074
5138
|
return t({
|
|
5075
|
-
getEditor:
|
|
5076
|
-
getMonaco:
|
|
5077
|
-
setValue:
|
|
5078
|
-
getSelection:
|
|
5079
|
-
executeEdits:
|
|
5080
|
-
focus:
|
|
5081
|
-
getModel:
|
|
5082
|
-
getPosition:
|
|
5083
|
-
getValue:
|
|
5084
|
-
loading:
|
|
5085
|
-
}), (
|
|
5139
|
+
getEditor: I,
|
|
5140
|
+
getMonaco: P,
|
|
5141
|
+
setValue: j,
|
|
5142
|
+
getSelection: q,
|
|
5143
|
+
executeEdits: le,
|
|
5144
|
+
focus: Re,
|
|
5145
|
+
getModel: ut,
|
|
5146
|
+
getPosition: Fe,
|
|
5147
|
+
getValue: ee,
|
|
5148
|
+
loading: d
|
|
5149
|
+
}), (_, $) => (jt(), $t("div", {
|
|
5086
5150
|
class: "aimd-editor-source-mode",
|
|
5087
5151
|
style: Yi({ minHeight: e.minHeight + "px" })
|
|
5088
5152
|
}, [
|
|
5089
|
-
|
|
5090
|
-
|
|
5153
|
+
d.value ? (jt(), $t("div", Ur, Zi(e.resolvedMessages.common.loadingEditor), 1)) : es("", !0),
|
|
5154
|
+
ts("div", {
|
|
5091
5155
|
ref_key: "editorContainer",
|
|
5092
5156
|
ref: f,
|
|
5093
5157
|
class: "aimd-editor-container"
|
|
@@ -5096,5 +5160,5 @@ const Ir = {
|
|
|
5096
5160
|
}
|
|
5097
5161
|
});
|
|
5098
5162
|
export {
|
|
5099
|
-
|
|
5163
|
+
Gr as _
|
|
5100
5164
|
};
|