hlrender 0.0.188 → 0.0.199
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/FileSaver.min-b57403e6.js +103 -0
- package/{barcode-widget-1c352999.js → JsBarcode-e0a8837b.js} +760 -810
- package/{_pdf-b6d89756.js → _pdf-5693a3a5.js} +6 -6
- package/{_txt-ef25fa8a.js → _txt-cc9ff6a4.js} +6 -6
- package/{_unsupport-6bb1dc32.js → _unsupport-fec00214.js} +1 -1
- package/{slot-140ccbe1.js → acorn-a3705767.js} +835 -1104
- package/{affix-widget-0b74d368.js → affix-widget-e83690e6.js} +16 -16
- package/{alert-widget-8aef5ff3.js → alert-widget-6e4122a0.js} +16 -16
- package/{anchor-widget-9bae8353.js → anchor-widget-433cca12.js} +13 -13
- package/{auto-complete-widget-7e327986.js → auto-complete-widget-94f0bf82.js} +16 -16
- package/{avatar-widget-b0245c49.js → avatar-widget-0373b089.js} +16 -16
- package/{backtop-widget-be5390eb.js → backtop-widget-ee4874e4.js} +16 -16
- package/{badge-widget-90e6e302.js → badge-widget-56550313.js} +16 -16
- package/barcode-widget-3ac11e9e.js +79 -0
- package/baseImp-79376d04.js +11727 -0
- package/{breadcrumb-widget-b6cc077f.js → breadcrumb-widget-d6a3ea52.js} +13 -13
- package/browser-195dd18b.js +1486 -0
- package/{button-widget-ab8550bf.js → button-widget-aa311e6c.js} +16 -16
- package/{cache-widget-06c4c6a1.js → cache-widget-feac9f7d.js} +15 -15
- package/{card-widget-958d5ba7.js → card-widget-18cd6661.js} +14 -14
- package/{carousel-widget-dcbd6928.js → carousel-widget-0f89e75b.js} +14 -14
- package/{cascader-widget-8a597e5a.js → cascader-widget-bd8f686f.js} +15 -15
- package/{chart-widget-e824462a.js → chart-widget-df52a80e.js} +13 -13
- package/{checkbox-widget-0fb9b15c.js → checkbox-widget-49d4c657.js} +15 -15
- package/{collapse-widget-5dfffa1e.js → collapse-widget-b874885b.js} +14 -14
- package/{color-picker-widget-bc739cca.js → color-picker-widget-df3ff6db.js} +15 -15
- package/{cont-cell-widget-83ce16db.js → cont-cell-widget-159e50ef.js} +1 -1
- package/{cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-968c8704.js → cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-abcba0d4.js} +5 -5
- package/{cont-widget-95888af2.js → cont-widget-47e8d275.js} +5 -5
- package/{content-wrapper-19479765.js → content-wrapper-21a9e51b.js} +7 -7
- package/{content-wrapper.vue_vue_type_script_setup_true_lang-f191a101.js → content-wrapper.vue_vue_type_script_setup_true_lang-159b5487.js} +3 -3
- package/{date-picker-range-widget-d90a03c1.js → date-picker-range-widget-b05d4879.js} +15 -15
- package/{date-picker-widget-b359485e.js → date-picker-widget-f7bba7ad.js} +15 -15
- package/default-slot-widget-64643481.js +26 -0
- package/{default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-0db55efe.js → default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-8343af69.js} +7 -7
- package/{descriptions-widget-b58f145b.js → descriptions-widget-181e7daa.js} +14 -14
- package/{dialog-265a6e9e.js → dialog-0acb2540.js} +2 -2
- package/{dialog-widget-b4acb5ab.js → dialog-widget-1dd9299a.js} +15 -15
- package/{divider-widget-b498aa6d.js → divider-widget-6d4d7b57.js} +16 -16
- package/{drag-wrapper-c4f125d8.js → drag-wrapper-571e1bf5.js} +6 -6
- package/{drawer-widget-2b582946.js → drawer-widget-d8ac79e3.js} +15 -15
- package/{dropdown-widget-e303a1c8.js → dropdown-widget-06ab98de.js} +14 -14
- package/{empty-widget-11666b01.js → empty-widget-13baa871.js} +16 -16
- package/{enum-type-c44af727.js → enum-type-4aac0ead.js} +1 -1
- package/{enum-type-5eeafa5c.js → enum-type-523bc2b7.js} +1 -0
- package/{expression-d0123c5e.js → expression-8dec47fe.js} +2 -2
- package/feedback-widget-170e748c.js +26 -0
- package/{feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-e319c24f.js → feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-8af4ae9f.js} +5 -5
- package/{fieldobj-8b1bd2cd.js → fieldobj-b9dc0fa4.js} +1 -1
- package/{file-upload-widget-4be15b09.js → file-upload-widget-962de378.js} +20 -20
- package/{form-item-wrapper-bee9059a.js → form-item-wrapper-d3ad2de0.js} +11 -11
- package/{form-widget-abd5c0a8.js → form-widget-ef09a16a.js} +10 -10
- package/{grid-col-widget-bc5c7221.js → grid-col-widget-d4acebd9.js} +1 -1
- package/{grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-0879986f.js → grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-9f4143f4.js} +5 -5
- package/{grid-widget-62509704.js → grid-widget-59dc4c39.js} +5 -5
- package/{html-text-widget-0bdbd573.js → html-text-widget-3b6ee038.js} +14 -14
- package/{icon-widget-ec62f2d7.js → icon-widget-a66d9a02.js} +13 -13
- package/{iframe-widget-69e1cfc0.js → iframe-widget-c0fab6c8.js} +13 -13
- package/{image-widget-58f98209.js → image-widget-80426cea.js} +13 -13
- package/{index-1f875a7a.js → index-87d3b375.js} +466 -458
- package/{index-5a2da8b2.js → index-b82fc973.js} +1 -1
- package/{index-d7f361c6.js → index-c5927286.js} +4 -4
- package/{input-number-widget-0c99d6ce.js → input-number-widget-f44c8ebc.js} +15 -15
- package/{input-widget-9b476df3.js → input-widget-ace0300e.js} +26 -26
- package/{label-wrapper-ce4b9bdd.js → label-wrapper-b294182f.js} +5 -5
- package/{label-wrapper.vue_vue_type_style_index_0_lang-ca9edd3a.js → label-wrapper.vue_vue_type_style_index_0_lang-a68fc27e.js} +3 -3
- package/{link-widget-2f2b6b52.js → link-widget-ec449bd6.js} +16 -16
- package/{ltable-col-widget-ad03beff.js → ltable-col-widget-51e07713.js} +1 -1
- package/{ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-714a8bbd.js → ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-369d758f.js} +9 -9
- package/{ltable-widget-37047d58.js → ltable-widget-14580904.js} +5 -5
- package/menu-widget-efb62411.js +154 -0
- package/{model-widget-90c39c6a.js → model-widget-b8188485.js} +13 -13
- package/{multirow-a90a02fe.js → multirow-169e628f.js} +77 -77
- package/{multirow-widget-634a0d82.js → multirow-widget-fffaa309.js} +59 -59
- package/package.json +1 -1
- package/{pagination-widget-99bb260a.js → pagination-widget-749ab51c.js} +13 -13
- package/{picture-upload-widget-59ccd0ea.js → picture-upload-widget-870997b0.js} +16 -16
- package/{progress-widget-c33d7e61.js → progress-widget-0fdf11d5.js} +14 -14
- package/{propresult-9ceda396.js → propresult-10fa007b.js} +1 -1
- package/qrcode-widget-4f8af10a.js +69 -0
- package/{radio-widget-df1b657d.js → radio-widget-8693eb03.js} +15 -15
- package/{range-widget-335f0dd9.js → range-widget-6cf5b012.js} +16 -16
- package/{rate-widget-083c03c8.js → rate-widget-ae480517.js} +15 -15
- package/render.es.js +32 -32
- package/render.style.css +1 -1
- package/render.umd.js +621 -611
- package/{result-widget-1be3b291.js → result-widget-312936cf.js} +14 -14
- package/{rich-editor-widget-2b72cb03.js → rich-editor-widget-0b382b09.js} +15 -15
- package/{router-widget-9e4f59cd.js → router-widget-554e8fd9.js} +13 -13
- package/{select-widget-03f605b8.js → select-widget-53daaec3.js} +15 -15
- package/{sfc-a4a07b79.js → sfc-39e2a132.js} +10 -10
- package/{sfcview-e9165868.js → sfcview-d2924e26.js} +7 -7
- package/{share-field-05cfce0a.js → share-field-227e573a.js} +8 -8
- package/{share-file-94351ee0.js → share-file-97683189.js} +6 -6
- package/{slider-widget-033a247b.js → slider-widget-11f6773b.js} +15 -15
- package/slot-da3b397f.js +313 -0
- package/{static-text-widget-116b6909.js → static-text-widget-46f29a58.js} +14 -14
- package/{steps-widget-709a0c2a.js → steps-widget-c694f349.js} +13 -13
- package/{subMenu-widget-bba667f0.js → subMenu-widget-db1f3b9c.js} +8 -8
- package/subMenu-widget.vue_vue_type_script_setup_true_lang-02e8aaee.js +81 -0
- package/{switch-widget-c3a4c3c8.js → switch-widget-8f21f942.js} +15 -15
- package/{tab-pane-widget-c2b8bf3a.js → tab-pane-widget-c45db025.js} +1 -1
- package/{tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-ae3d9295.js → tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-0352bf40.js} +5 -5
- package/table-col-widget-4228d3c2.js +22 -0
- package/{table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-ee3bb132.js → table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-5623617e.js} +6 -6
- package/{table-widget-b1738910.js → table-widget-eac0c746.js} +15 -15
- package/{tabs-widget-dd5e607f.js → tabs-widget-1ddf6535.js} +7 -7
- package/{tag-widget-ee1c258e.js → tag-widget-33cde894.js} +16 -16
- package/{text-widget-c7447356.js → text-widget-eec191a3.js} +16 -16
- package/{textarea-widget-c6022f67.js → textarea-widget-617f4408.js} +15 -15
- package/{time-picker-range-widget-7bfa6157.js → time-picker-range-widget-f0fe2eea.js} +15 -15
- package/{time-picker-widget-cab8b63c.js → time-picker-widget-80a02857.js} +15 -15
- package/{time-select-widget-8a293fb1.js → time-select-widget-1c52c4ba.js} +15 -15
- package/{tmpl-widget-be8e304f.js → tmpl-widget-6a99246c.js} +14 -14
- package/{tree-select-widget-94a57892.js → tree-select-widget-ffee176b.js} +15 -15
- package/{tree-widget-18c5a5ac.js → tree-widget-3f55b5e2.js} +13 -13
- package/{uuid-f9e11f04.js → uuid-de039332.js} +1 -1
- package/{verifycode-widget-e5005804.js → verifycode-widget-fa1e1b23.js} +13 -13
- package/{widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-b949474e.js → widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-4c03293b.js} +7 -7
- package/{wrapper-widget-80383b71.js → wrapper-widget-b770069e.js} +6 -6
- package/xlsx-999c0f09.js +25068 -0
- package/baseImp-4ac8debd.js +0 -27791
- package/default-slot-widget-e3e37cf0.js +0 -26
- package/feedback-widget-7b634e31.js +0 -26
- package/menu-widget-a1b75613.js +0 -127
- package/qrcode-widget-c921c781.js +0 -1525
- package/subMenu-widget.vue_vue_type_script_setup_true_lang-11c27b67.js +0 -84
- package/table-col-widget-90ed2b0b.js +0 -22
|
@@ -1,163 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var It = (e, t, i) => t in e ? Et(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
3
|
-
var X = (e, t, i) => (It(e, typeof t != "symbol" ? t + "" : t, i), i);
|
|
4
|
-
import { inject as Z, provide as J, computed as k } from "vue";
|
|
5
|
-
import { d as L, b as w, r as Nt, s as Vt } from "./expression-d0123c5e.js";
|
|
6
|
-
import { B as Pt } from "./baseImp-4ac8debd.js";
|
|
7
|
-
import { c as Me, i as Tt, m as he, j as Ue, o as Lt } from "./enum-type-5eeafa5c.js";
|
|
8
|
-
class qe {
|
|
9
|
-
constructor() {
|
|
10
|
-
/**
|
|
11
|
-
* 当前表单引用库
|
|
12
|
-
* 假设表单组件位于表单form中,则该引用注册入库
|
|
13
|
-
*/
|
|
14
|
-
X(this, "formRefList", {});
|
|
15
|
-
/**
|
|
16
|
-
* 全局引用库
|
|
17
|
-
*/
|
|
18
|
-
X(this, "globalRefList", {});
|
|
19
|
-
/**
|
|
20
|
-
* 全局数据对象
|
|
21
|
-
*/
|
|
22
|
-
X(this, "globalDataModel", {});
|
|
23
|
-
/**
|
|
24
|
-
* 当前表单名称
|
|
25
|
-
*/
|
|
26
|
-
X(this, "globalFormName", "");
|
|
27
|
-
/**
|
|
28
|
-
* 全局页面名称
|
|
29
|
-
*/
|
|
30
|
-
// globalPageName?: string = "";
|
|
31
|
-
/**
|
|
32
|
-
* 用于类似template组件的数据绑定传递
|
|
33
|
-
*/
|
|
34
|
-
X(this, "rowScope", {});
|
|
35
|
-
/**
|
|
36
|
-
* 渲染器调用者传入的配置参数,如接口地址、密钥等
|
|
37
|
-
*/
|
|
38
|
-
X(this, "globalConfig", {});
|
|
39
|
-
}
|
|
40
|
-
static globalInject() {
|
|
41
|
-
const t = new qe();
|
|
42
|
-
return t.formRefList = Z(L.refList, {}), t.globalRefList = Z(L.allRefList, {}), t.globalDataModel = Z(L.globalModel, {}), t.rowScope = Z(L.rowScope, {}), t.globalFormName = Z(L.globalForm, ""), t.globalConfig = Z(L.globalConfig, {}), t;
|
|
43
|
-
}
|
|
44
|
-
static globalProvide(t) {
|
|
45
|
-
if ((t == null ? void 0 : t.globalDataModel) !== void 0) {
|
|
46
|
-
const i = (t == null ? void 0 : t.globalDataModel) || {};
|
|
47
|
-
J(L.globalModel, i);
|
|
48
|
-
}
|
|
49
|
-
if ((t == null ? void 0 : t.rowScope) !== void 0) {
|
|
50
|
-
const i = (t == null ? void 0 : t.rowScope) || {};
|
|
51
|
-
J(L.rowScope, i);
|
|
52
|
-
}
|
|
53
|
-
if ((t == null ? void 0 : t.globalRefList) !== void 0) {
|
|
54
|
-
const i = (t == null ? void 0 : t.globalRefList) || {};
|
|
55
|
-
J(L.allRefList, i);
|
|
56
|
-
}
|
|
57
|
-
if ((t == null ? void 0 : t.formRefList) !== void 0) {
|
|
58
|
-
const i = (t == null ? void 0 : t.formRefList) || {};
|
|
59
|
-
J(L.refList, i);
|
|
60
|
-
}
|
|
61
|
-
if ((t == null ? void 0 : t.globalFormName) !== void 0) {
|
|
62
|
-
const i = (t == null ? void 0 : t.globalFormName) || "";
|
|
63
|
-
J(L.globalForm, i);
|
|
64
|
-
}
|
|
65
|
-
if ((t == null ? void 0 : t.globalConfig) !== void 0) {
|
|
66
|
-
const i = (t == null ? void 0 : t.globalConfig) || "";
|
|
67
|
-
J(L.globalConfig, i);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
function Ti(e) {
|
|
72
|
-
const t = (_, ue = !1) => Pt.getOptions(e == null ? void 0 : e.widget, _, ue, !(e != null && e.designState)), i = k(() => t(w.ctrlWidth) || "auto"), s = k(() => t(w.ctrlHeight) || "auto"), r = k(() => t(w.displayLayout)), n = k(() => {
|
|
73
|
-
var _ = t(w.customClass);
|
|
74
|
-
return Array.isArray(_) ? _ == null ? void 0 : _.join(" ") : _;
|
|
75
|
-
}), o = k(() => {
|
|
76
|
-
var _ = t(w.componentWrapperClass);
|
|
77
|
-
return Array.isArray(_) ? _ == null ? void 0 : _.join(" ") : _;
|
|
78
|
-
}), h = k(() => t(w.css)), u = k(() => {
|
|
79
|
-
var _ = t(w.componentRootClass);
|
|
80
|
-
return Array.isArray(_) ? _ == null ? void 0 : _.join(" ") : _;
|
|
81
|
-
}), c = k(() => {
|
|
82
|
-
var _, ue;
|
|
83
|
-
return (ue = Me((_ = t(w.required, !0)) == null ? void 0 : _.options)) == null ? void 0 : ue.enable;
|
|
84
|
-
}), f = k(() => t(w.hidden)), x = k(() => t(w.labelTooltip)), g = k(() => t(w.labelIconClass)), C = k(() => t(w.labelIconPosition)), E = k(() => t(w.labelHidden)), P = k(() => t(w.label)), T = k(() => t(w.labelWidth)), H = k(() => t(w.labelAlign));
|
|
85
|
-
return {
|
|
86
|
-
//size,
|
|
87
|
-
attrs: k(() => ({
|
|
88
|
-
required: c.value,
|
|
89
|
-
label: P.value,
|
|
90
|
-
labelHidden: E.value,
|
|
91
|
-
labelAlign: H.value,
|
|
92
|
-
labelIconClass: g.value,
|
|
93
|
-
labelIconPosition: C.value,
|
|
94
|
-
labelTooltip: x.value,
|
|
95
|
-
labelWidth: T.value,
|
|
96
|
-
ctrlWidth: i.value
|
|
97
|
-
})),
|
|
98
|
-
labelAlign: H,
|
|
99
|
-
labelHidden: E,
|
|
100
|
-
labelIconClass: g,
|
|
101
|
-
labelIconPosition: C,
|
|
102
|
-
labelTooltip: x,
|
|
103
|
-
labelWidth: T,
|
|
104
|
-
label: P,
|
|
105
|
-
displayLayout: r,
|
|
106
|
-
hidden: f,
|
|
107
|
-
// required,
|
|
108
|
-
ctrlWidth: i,
|
|
109
|
-
ctrlHeight: s,
|
|
110
|
-
customClass: n,
|
|
111
|
-
componentWrapperClass: o,
|
|
112
|
-
componentRootClass: u,
|
|
113
|
-
css: h
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
const He = (e = "") => new Promise((t) => {
|
|
117
|
-
import("./index-3aaf8638.js").then((i) => {
|
|
118
|
-
const s = i.parse(e, {
|
|
119
|
-
positions: !0,
|
|
120
|
-
parseValue: !1
|
|
121
|
-
}), r = [];
|
|
122
|
-
i.walk(s, {
|
|
123
|
-
visit: "Rule",
|
|
124
|
-
enter(n) {
|
|
125
|
-
const o = i.generate(n.prelude), h = {};
|
|
126
|
-
i.walk(n, {
|
|
127
|
-
visit: "Declaration",
|
|
128
|
-
enter(u) {
|
|
129
|
-
u.property && (h[u.property] = i.generate(u.value));
|
|
130
|
-
}
|
|
131
|
-
}), r.push({ selector: o, declarations: h });
|
|
132
|
-
}
|
|
133
|
-
}), t(r);
|
|
134
|
-
});
|
|
135
|
-
}), Ge = (e) => new Promise((t) => {
|
|
136
|
-
import("./index-3aaf8638.js").then((i) => {
|
|
137
|
-
const s = Rt(e), r = i.parse(s, { context: "stylesheet" });
|
|
138
|
-
t(i.generate(r));
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
function Rt(e) {
|
|
142
|
-
return e.map((i) => {
|
|
143
|
-
var r, n, o;
|
|
144
|
-
const s = (o = (n = (r = Object.entries(i.declarations)) == null ? void 0 : r.filter(([h, u]) => !Tt(u) && u !== "")) == null ? void 0 : n.sort(([h], [u]) => h > u ? 1 : -1)) == null ? void 0 : o.map(([h, u]) => `${h}: ${u};`);
|
|
145
|
-
return `${i.selector} { ${s.join(" ")} }`;
|
|
146
|
-
}).join(`
|
|
147
|
-
`);
|
|
148
|
-
}
|
|
149
|
-
var Ot = [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], We = [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], Ft = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", Ke = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", ye = {
|
|
1
|
+
var pt = [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], Ne = [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], lt = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", Ve = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", pe = {
|
|
150
2
|
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",
|
|
151
3
|
5: "class enum extends super const export import",
|
|
152
4
|
6: "enum",
|
|
153
5
|
strict: "implements interface let package private protected public static yield",
|
|
154
6
|
strictBind: "eval arguments"
|
|
155
|
-
},
|
|
156
|
-
5:
|
|
157
|
-
"5module":
|
|
158
|
-
6:
|
|
159
|
-
},
|
|
160
|
-
function
|
|
7
|
+
}, le = "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", ft = {
|
|
8
|
+
5: le,
|
|
9
|
+
"5module": le + " export import",
|
|
10
|
+
6: le + " const class extends export import super"
|
|
11
|
+
}, dt = /^in(stanceof)?$/, xt = new RegExp("[" + Ve + "]"), mt = new RegExp("[" + Ve + lt + "]");
|
|
12
|
+
function de(e, t) {
|
|
161
13
|
for (var i = 65536, s = 0; s < t.length; s += 2) {
|
|
162
14
|
if (i += t[s], i > e)
|
|
163
15
|
return !1;
|
|
@@ -166,48 +18,48 @@ function Se(e, t) {
|
|
|
166
18
|
}
|
|
167
19
|
return !1;
|
|
168
20
|
}
|
|
169
|
-
function
|
|
170
|
-
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
21
|
+
function V(e, t) {
|
|
22
|
+
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && xt.test(String.fromCharCode(e)) : t === !1 ? !1 : de(e, Ne);
|
|
171
23
|
}
|
|
172
|
-
function
|
|
173
|
-
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 &&
|
|
24
|
+
function F(e, t) {
|
|
25
|
+
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 && mt.test(String.fromCharCode(e)) : t === !1 ? !1 : de(e, Ne) || de(e, pt);
|
|
174
26
|
}
|
|
175
|
-
var
|
|
27
|
+
var v = function(t, i) {
|
|
176
28
|
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;
|
|
177
29
|
};
|
|
178
|
-
function
|
|
179
|
-
return new
|
|
30
|
+
function A(e, t) {
|
|
31
|
+
return new v(e, { beforeExpr: !0, binop: t });
|
|
180
32
|
}
|
|
181
|
-
var
|
|
182
|
-
function
|
|
183
|
-
return t === void 0 && (t = {}), t.keyword = e,
|
|
33
|
+
var E = { beforeExpr: !0 }, k = { startsExpr: !0 }, ge = {};
|
|
34
|
+
function m(e, t) {
|
|
35
|
+
return t === void 0 && (t = {}), t.keyword = e, ge[e] = new v(e, t);
|
|
184
36
|
}
|
|
185
37
|
var a = {
|
|
186
|
-
num: new
|
|
187
|
-
regexp: new
|
|
188
|
-
string: new
|
|
189
|
-
name: new
|
|
190
|
-
privateId: new
|
|
191
|
-
eof: new
|
|
38
|
+
num: new v("num", k),
|
|
39
|
+
regexp: new v("regexp", k),
|
|
40
|
+
string: new v("string", k),
|
|
41
|
+
name: new v("name", k),
|
|
42
|
+
privateId: new v("privateId", k),
|
|
43
|
+
eof: new v("eof"),
|
|
192
44
|
// Punctuation token types.
|
|
193
|
-
bracketL: new
|
|
194
|
-
bracketR: new
|
|
195
|
-
braceL: new
|
|
196
|
-
braceR: new
|
|
197
|
-
parenL: new
|
|
198
|
-
parenR: new
|
|
199
|
-
comma: new
|
|
200
|
-
semi: new
|
|
201
|
-
colon: new
|
|
202
|
-
dot: new
|
|
203
|
-
question: new
|
|
204
|
-
questionDot: new
|
|
205
|
-
arrow: new
|
|
206
|
-
template: new
|
|
207
|
-
invalidTemplate: new
|
|
208
|
-
ellipsis: new
|
|
209
|
-
backQuote: new
|
|
210
|
-
dollarBraceL: new
|
|
45
|
+
bracketL: new v("[", { beforeExpr: !0, startsExpr: !0 }),
|
|
46
|
+
bracketR: new v("]"),
|
|
47
|
+
braceL: new v("{", { beforeExpr: !0, startsExpr: !0 }),
|
|
48
|
+
braceR: new v("}"),
|
|
49
|
+
parenL: new v("(", { beforeExpr: !0, startsExpr: !0 }),
|
|
50
|
+
parenR: new v(")"),
|
|
51
|
+
comma: new v(",", E),
|
|
52
|
+
semi: new v(";", E),
|
|
53
|
+
colon: new v(":", E),
|
|
54
|
+
dot: new v("."),
|
|
55
|
+
question: new v("?", E),
|
|
56
|
+
questionDot: new v("?."),
|
|
57
|
+
arrow: new v("=>", E),
|
|
58
|
+
template: new v("template"),
|
|
59
|
+
invalidTemplate: new v("invalidTemplate"),
|
|
60
|
+
ellipsis: new v("...", E),
|
|
61
|
+
backQuote: new v("`", k),
|
|
62
|
+
dollarBraceL: new v("${", { beforeExpr: !0, startsExpr: !0 }),
|
|
211
63
|
// Operators. These carry several kinds of properties to help the
|
|
212
64
|
// parser use them properly (the presence of these properties is
|
|
213
65
|
// what categorizes them as operators).
|
|
@@ -221,102 +73,102 @@ var a = {
|
|
|
221
73
|
// `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
|
|
222
74
|
// binary operators with a very low precedence, that should result
|
|
223
75
|
// in AssignmentExpression nodes.
|
|
224
|
-
eq: new
|
|
225
|
-
assign: new
|
|
226
|
-
incDec: new
|
|
227
|
-
prefix: new
|
|
228
|
-
logicalOR:
|
|
229
|
-
logicalAND:
|
|
230
|
-
bitwiseOR:
|
|
231
|
-
bitwiseXOR:
|
|
232
|
-
bitwiseAND:
|
|
233
|
-
equality:
|
|
234
|
-
relational:
|
|
235
|
-
bitShift:
|
|
236
|
-
plusMin: new
|
|
237
|
-
modulo:
|
|
238
|
-
star:
|
|
239
|
-
slash:
|
|
240
|
-
starstar: new
|
|
241
|
-
coalesce:
|
|
76
|
+
eq: new v("=", { beforeExpr: !0, isAssign: !0 }),
|
|
77
|
+
assign: new v("_=", { beforeExpr: !0, isAssign: !0 }),
|
|
78
|
+
incDec: new v("++/--", { prefix: !0, postfix: !0, startsExpr: !0 }),
|
|
79
|
+
prefix: new v("!/~", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
80
|
+
logicalOR: A("||", 1),
|
|
81
|
+
logicalAND: A("&&", 2),
|
|
82
|
+
bitwiseOR: A("|", 3),
|
|
83
|
+
bitwiseXOR: A("^", 4),
|
|
84
|
+
bitwiseAND: A("&", 5),
|
|
85
|
+
equality: A("==/!=/===/!==", 6),
|
|
86
|
+
relational: A("</>/<=/>=", 7),
|
|
87
|
+
bitShift: A("<</>>/>>>", 8),
|
|
88
|
+
plusMin: new v("+/-", { beforeExpr: !0, binop: 9, prefix: !0, startsExpr: !0 }),
|
|
89
|
+
modulo: A("%", 10),
|
|
90
|
+
star: A("*", 10),
|
|
91
|
+
slash: A("/", 10),
|
|
92
|
+
starstar: new v("**", { beforeExpr: !0 }),
|
|
93
|
+
coalesce: A("??", 1),
|
|
242
94
|
// Keyword token types.
|
|
243
|
-
_break:
|
|
244
|
-
_case:
|
|
245
|
-
_catch:
|
|
246
|
-
_continue:
|
|
247
|
-
_debugger:
|
|
248
|
-
_default:
|
|
249
|
-
_do:
|
|
250
|
-
_else:
|
|
251
|
-
_finally:
|
|
252
|
-
_for:
|
|
253
|
-
_function:
|
|
254
|
-
_if:
|
|
255
|
-
_return:
|
|
256
|
-
_switch:
|
|
257
|
-
_throw:
|
|
258
|
-
_try:
|
|
259
|
-
_var:
|
|
260
|
-
_const:
|
|
261
|
-
_while:
|
|
262
|
-
_with:
|
|
263
|
-
_new:
|
|
264
|
-
_this:
|
|
265
|
-
_super:
|
|
266
|
-
_class:
|
|
267
|
-
_extends:
|
|
268
|
-
_export:
|
|
269
|
-
_import:
|
|
270
|
-
_null:
|
|
271
|
-
_true:
|
|
272
|
-
_false:
|
|
273
|
-
_in:
|
|
274
|
-
_instanceof:
|
|
275
|
-
_typeof:
|
|
276
|
-
_void:
|
|
277
|
-
_delete:
|
|
278
|
-
},
|
|
279
|
-
function
|
|
95
|
+
_break: m("break"),
|
|
96
|
+
_case: m("case", E),
|
|
97
|
+
_catch: m("catch"),
|
|
98
|
+
_continue: m("continue"),
|
|
99
|
+
_debugger: m("debugger"),
|
|
100
|
+
_default: m("default", E),
|
|
101
|
+
_do: m("do", { isLoop: !0, beforeExpr: !0 }),
|
|
102
|
+
_else: m("else", E),
|
|
103
|
+
_finally: m("finally"),
|
|
104
|
+
_for: m("for", { isLoop: !0 }),
|
|
105
|
+
_function: m("function", k),
|
|
106
|
+
_if: m("if"),
|
|
107
|
+
_return: m("return", E),
|
|
108
|
+
_switch: m("switch"),
|
|
109
|
+
_throw: m("throw", E),
|
|
110
|
+
_try: m("try"),
|
|
111
|
+
_var: m("var"),
|
|
112
|
+
_const: m("const"),
|
|
113
|
+
_while: m("while", { isLoop: !0 }),
|
|
114
|
+
_with: m("with"),
|
|
115
|
+
_new: m("new", { beforeExpr: !0, startsExpr: !0 }),
|
|
116
|
+
_this: m("this", k),
|
|
117
|
+
_super: m("super", k),
|
|
118
|
+
_class: m("class", k),
|
|
119
|
+
_extends: m("extends", E),
|
|
120
|
+
_export: m("export"),
|
|
121
|
+
_import: m("import", k),
|
|
122
|
+
_null: m("null", k),
|
|
123
|
+
_true: m("true", k),
|
|
124
|
+
_false: m("false", k),
|
|
125
|
+
_in: m("in", { beforeExpr: !0, binop: 7 }),
|
|
126
|
+
_instanceof: m("instanceof", { beforeExpr: !0, binop: 7 }),
|
|
127
|
+
_typeof: m("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
128
|
+
_void: m("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
129
|
+
_delete: m("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
130
|
+
}, w = /\r\n?|\n|\u2028|\u2029/, vt = new RegExp(w.source, "g");
|
|
131
|
+
function H(e) {
|
|
280
132
|
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
281
133
|
}
|
|
282
|
-
function
|
|
134
|
+
function Te(e, t, i) {
|
|
283
135
|
i === void 0 && (i = e.length);
|
|
284
136
|
for (var s = t; s < i; s++) {
|
|
285
137
|
var r = e.charCodeAt(s);
|
|
286
|
-
if (
|
|
138
|
+
if (H(r))
|
|
287
139
|
return s < i - 1 && r === 13 && e.charCodeAt(s + 1) === 10 ? s + 2 : s + 1;
|
|
288
140
|
}
|
|
289
141
|
return -1;
|
|
290
142
|
}
|
|
291
|
-
var
|
|
292
|
-
return
|
|
293
|
-
},
|
|
294
|
-
return
|
|
295
|
-
},
|
|
296
|
-
function
|
|
297
|
-
return
|
|
143
|
+
var Le = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, C = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, Re = Object.prototype, gt = Re.hasOwnProperty, bt = Re.toString, W = Object.hasOwn || function(e, t) {
|
|
144
|
+
return gt.call(e, t);
|
|
145
|
+
}, we = Array.isArray || function(e) {
|
|
146
|
+
return bt.call(e) === "[object Array]";
|
|
147
|
+
}, Ae = /* @__PURE__ */ Object.create(null);
|
|
148
|
+
function D(e) {
|
|
149
|
+
return Ae[e] || (Ae[e] = new RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
|
|
298
150
|
}
|
|
299
|
-
function
|
|
151
|
+
function R(e) {
|
|
300
152
|
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320));
|
|
301
153
|
}
|
|
302
|
-
var
|
|
154
|
+
var yt = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, X = function(t, i) {
|
|
303
155
|
this.line = t, this.column = i;
|
|
304
156
|
};
|
|
305
|
-
|
|
306
|
-
return new
|
|
157
|
+
X.prototype.offset = function(t) {
|
|
158
|
+
return new X(this.line, this.column + t);
|
|
307
159
|
};
|
|
308
|
-
var
|
|
160
|
+
var re = function(t, i, s) {
|
|
309
161
|
this.start = i, this.end = s, t.sourceFile !== null && (this.source = t.sourceFile);
|
|
310
162
|
};
|
|
311
|
-
function
|
|
163
|
+
function Oe(e, t) {
|
|
312
164
|
for (var i = 1, s = 0; ; ) {
|
|
313
|
-
var r =
|
|
165
|
+
var r = Te(e, s, t);
|
|
314
166
|
if (r < 0)
|
|
315
|
-
return new
|
|
167
|
+
return new X(i, t - s);
|
|
316
168
|
++i, s = r;
|
|
317
169
|
}
|
|
318
170
|
}
|
|
319
|
-
var
|
|
171
|
+
var xe = {
|
|
320
172
|
// `ecmaVersion` indicates the ECMAScript version to parse. Must be
|
|
321
173
|
// either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
|
|
322
174
|
// (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
|
|
@@ -412,165 +264,165 @@ var ke = {
|
|
|
412
264
|
// When enabled, parenthesized expressions are represented by
|
|
413
265
|
// (non-standard) ParenthesizedExpression nodes
|
|
414
266
|
preserveParens: !1
|
|
415
|
-
},
|
|
416
|
-
function
|
|
267
|
+
}, Ee = !1;
|
|
268
|
+
function _t(e) {
|
|
417
269
|
var t = {};
|
|
418
|
-
for (var i in
|
|
419
|
-
t[i] = e &&
|
|
420
|
-
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!
|
|
421
|
-
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),
|
|
270
|
+
for (var i in xe)
|
|
271
|
+
t[i] = e && W(e, i) ? e[i] : xe[i];
|
|
272
|
+
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!Ee && typeof console == "object" && console.warn && (Ee = !0, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
273
|
+
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), we(t.onToken)) {
|
|
422
274
|
var s = t.onToken;
|
|
423
275
|
t.onToken = function(r) {
|
|
424
276
|
return s.push(r);
|
|
425
277
|
};
|
|
426
278
|
}
|
|
427
|
-
return
|
|
279
|
+
return we(t.onComment) && (t.onComment = Ct(t, t.onComment)), t;
|
|
428
280
|
}
|
|
429
|
-
function
|
|
430
|
-
return function(i, s, r, n,
|
|
431
|
-
var
|
|
281
|
+
function Ct(e, t) {
|
|
282
|
+
return function(i, s, r, n, u, o) {
|
|
283
|
+
var h = {
|
|
432
284
|
type: i ? "Block" : "Line",
|
|
433
285
|
value: s,
|
|
434
286
|
start: r,
|
|
435
287
|
end: n
|
|
436
288
|
};
|
|
437
|
-
e.locations && (
|
|
289
|
+
e.locations && (h.loc = new re(this, u, o)), e.ranges && (h.range = [r, n]), t.push(h);
|
|
438
290
|
};
|
|
439
291
|
}
|
|
440
|
-
var
|
|
441
|
-
function
|
|
442
|
-
return
|
|
292
|
+
var Z = 1, z = 2, be = 4, Be = 8, ye = 16, De = 32, ne = 64, Fe = 128, U = 256, J = 512, ue = Z | z | U;
|
|
293
|
+
function _e(e, t) {
|
|
294
|
+
return z | (e ? be : 0) | (t ? Be : 0);
|
|
443
295
|
}
|
|
444
|
-
var
|
|
445
|
-
this.options = t =
|
|
296
|
+
var te = 0, Ce = 1, B = 2, Me = 3, Ue = 4, qe = 5, y = function(t, i, s) {
|
|
297
|
+
this.options = t = _t(t), this.sourceFile = t.sourceFile, this.keywords = D(ft[t.ecmaVersion >= 6 ? 6 : t.sourceType === "module" ? "5module" : 5]);
|
|
446
298
|
var r = "";
|
|
447
|
-
t.allowReserved !== !0 && (r =
|
|
448
|
-
var n = (r ? r + " " : "") +
|
|
449
|
-
this.reservedWordsStrict =
|
|
450
|
-
`, s - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(
|
|
451
|
-
},
|
|
452
|
-
|
|
299
|
+
t.allowReserved !== !0 && (r = pe[t.ecmaVersion >= 6 ? 6 : t.ecmaVersion === 5 ? 5 : 3], t.sourceType === "module" && (r += " await")), this.reservedWords = D(r);
|
|
300
|
+
var n = (r ? r + " " : "") + pe.strict;
|
|
301
|
+
this.reservedWordsStrict = D(n), this.reservedWordsStrictBind = D(n + " " + pe.strictBind), this.input = String(i), this.containsEsc = !1, s ? (this.pos = s, this.lineStart = this.input.lastIndexOf(`
|
|
302
|
+
`, s - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(w).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(Z), this.regexpState = null, this.privateNameStack = [];
|
|
303
|
+
}, T = { 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 } };
|
|
304
|
+
y.prototype.parse = function() {
|
|
453
305
|
var t = this.options.program || this.startNode();
|
|
454
306
|
return this.nextToken(), this.parseTopLevel(t);
|
|
455
307
|
};
|
|
456
|
-
|
|
457
|
-
return (this.currentVarScope().flags &
|
|
308
|
+
T.inFunction.get = function() {
|
|
309
|
+
return (this.currentVarScope().flags & z) > 0;
|
|
458
310
|
};
|
|
459
|
-
|
|
460
|
-
return (this.currentVarScope().flags &
|
|
311
|
+
T.inGenerator.get = function() {
|
|
312
|
+
return (this.currentVarScope().flags & Be) > 0;
|
|
461
313
|
};
|
|
462
|
-
|
|
463
|
-
return (this.currentVarScope().flags &
|
|
314
|
+
T.inAsync.get = function() {
|
|
315
|
+
return (this.currentVarScope().flags & be) > 0;
|
|
464
316
|
};
|
|
465
|
-
|
|
317
|
+
T.canAwait.get = function() {
|
|
466
318
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
467
319
|
var t = this.scopeStack[e], i = t.flags;
|
|
468
|
-
if (i & (
|
|
320
|
+
if (i & (U | J))
|
|
469
321
|
return !1;
|
|
470
|
-
if (i &
|
|
471
|
-
return (i &
|
|
322
|
+
if (i & z)
|
|
323
|
+
return (i & be) > 0;
|
|
472
324
|
}
|
|
473
325
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
474
326
|
};
|
|
475
|
-
|
|
327
|
+
T.allowSuper.get = function() {
|
|
476
328
|
var e = this.currentThisScope(), t = e.flags;
|
|
477
|
-
return (t &
|
|
329
|
+
return (t & ne) > 0 || this.options.allowSuperOutsideMethod;
|
|
478
330
|
};
|
|
479
|
-
|
|
480
|
-
return (this.currentThisScope().flags &
|
|
331
|
+
T.allowDirectSuper.get = function() {
|
|
332
|
+
return (this.currentThisScope().flags & Fe) > 0;
|
|
481
333
|
};
|
|
482
|
-
|
|
334
|
+
T.treatFunctionsAsVar.get = function() {
|
|
483
335
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
484
336
|
};
|
|
485
|
-
|
|
337
|
+
T.allowNewDotTarget.get = function() {
|
|
486
338
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
487
339
|
var t = this.scopeStack[e], i = t.flags;
|
|
488
|
-
if (i & (
|
|
340
|
+
if (i & (U | J) || i & z && !(i & ye))
|
|
489
341
|
return !0;
|
|
490
342
|
}
|
|
491
343
|
return !1;
|
|
492
344
|
};
|
|
493
|
-
|
|
494
|
-
return (this.currentVarScope().flags &
|
|
345
|
+
T.inClassStaticBlock.get = function() {
|
|
346
|
+
return (this.currentVarScope().flags & U) > 0;
|
|
495
347
|
};
|
|
496
|
-
|
|
348
|
+
y.extend = function() {
|
|
497
349
|
for (var t = [], i = arguments.length; i--; )
|
|
498
350
|
t[i] = arguments[i];
|
|
499
351
|
for (var s = this, r = 0; r < t.length; r++)
|
|
500
352
|
s = t[r](s);
|
|
501
353
|
return s;
|
|
502
354
|
};
|
|
503
|
-
|
|
355
|
+
y.parse = function(t, i) {
|
|
504
356
|
return new this(i, t).parse();
|
|
505
357
|
};
|
|
506
|
-
|
|
358
|
+
y.parseExpressionAt = function(t, i, s) {
|
|
507
359
|
var r = new this(s, t, i);
|
|
508
360
|
return r.nextToken(), r.parseExpression();
|
|
509
361
|
};
|
|
510
|
-
|
|
362
|
+
y.tokenizer = function(t, i) {
|
|
511
363
|
return new this(i, t);
|
|
512
364
|
};
|
|
513
|
-
Object.defineProperties(
|
|
514
|
-
var
|
|
515
|
-
|
|
365
|
+
Object.defineProperties(y.prototype, T);
|
|
366
|
+
var S = y.prototype, St = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
367
|
+
S.strictDirective = function(e) {
|
|
516
368
|
if (this.options.ecmaVersion < 5)
|
|
517
369
|
return !1;
|
|
518
370
|
for (; ; ) {
|
|
519
|
-
|
|
520
|
-
var t =
|
|
371
|
+
C.lastIndex = e, e += C.exec(this.input)[0].length;
|
|
372
|
+
var t = St.exec(this.input.slice(e));
|
|
521
373
|
if (!t)
|
|
522
374
|
return !1;
|
|
523
375
|
if ((t[1] || t[2]) === "use strict") {
|
|
524
|
-
|
|
525
|
-
var i =
|
|
526
|
-
return r === ";" || r === "}" ||
|
|
376
|
+
C.lastIndex = e + t[0].length;
|
|
377
|
+
var i = C.exec(this.input), s = i.index + i[0].length, r = this.input.charAt(s);
|
|
378
|
+
return r === ";" || r === "}" || w.test(i[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(r) || r === "!" && this.input.charAt(s + 1) === "=");
|
|
527
379
|
}
|
|
528
|
-
e += t[0].length,
|
|
380
|
+
e += t[0].length, C.lastIndex = e, e += C.exec(this.input)[0].length, this.input[e] === ";" && e++;
|
|
529
381
|
}
|
|
530
382
|
};
|
|
531
|
-
|
|
383
|
+
S.eat = function(e) {
|
|
532
384
|
return this.type === e ? (this.next(), !0) : !1;
|
|
533
385
|
};
|
|
534
|
-
|
|
386
|
+
S.isContextual = function(e) {
|
|
535
387
|
return this.type === a.name && this.value === e && !this.containsEsc;
|
|
536
388
|
};
|
|
537
|
-
|
|
389
|
+
S.eatContextual = function(e) {
|
|
538
390
|
return this.isContextual(e) ? (this.next(), !0) : !1;
|
|
539
391
|
};
|
|
540
|
-
|
|
392
|
+
S.expectContextual = function(e) {
|
|
541
393
|
this.eatContextual(e) || this.unexpected();
|
|
542
394
|
};
|
|
543
|
-
|
|
544
|
-
return this.type === a.eof || this.type === a.braceR ||
|
|
395
|
+
S.canInsertSemicolon = function() {
|
|
396
|
+
return this.type === a.eof || this.type === a.braceR || w.test(this.input.slice(this.lastTokEnd, this.start));
|
|
545
397
|
};
|
|
546
|
-
|
|
398
|
+
S.insertSemicolon = function() {
|
|
547
399
|
if (this.canInsertSemicolon())
|
|
548
400
|
return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0;
|
|
549
401
|
};
|
|
550
|
-
|
|
402
|
+
S.semicolon = function() {
|
|
551
403
|
!this.eat(a.semi) && !this.insertSemicolon() && this.unexpected();
|
|
552
404
|
};
|
|
553
|
-
|
|
405
|
+
S.afterTrailingComma = function(e, t) {
|
|
554
406
|
if (this.type === e)
|
|
555
407
|
return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), t || this.next(), !0;
|
|
556
408
|
};
|
|
557
|
-
|
|
409
|
+
S.expect = function(e) {
|
|
558
410
|
this.eat(e) || this.unexpected();
|
|
559
411
|
};
|
|
560
|
-
|
|
412
|
+
S.unexpected = function(e) {
|
|
561
413
|
this.raise(e ?? this.start, "Unexpected token");
|
|
562
414
|
};
|
|
563
|
-
var
|
|
415
|
+
var oe = function() {
|
|
564
416
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
565
417
|
};
|
|
566
|
-
|
|
418
|
+
S.checkPatternErrors = function(e, t) {
|
|
567
419
|
if (e) {
|
|
568
420
|
e.trailingComma > -1 && this.raiseRecoverable(e.trailingComma, "Comma is not permitted after the rest element");
|
|
569
421
|
var i = t ? e.parenthesizedAssign : e.parenthesizedBind;
|
|
570
422
|
i > -1 && this.raiseRecoverable(i, t ? "Assigning to rvalue" : "Parenthesized pattern");
|
|
571
423
|
}
|
|
572
424
|
};
|
|
573
|
-
|
|
425
|
+
S.checkExpressionErrors = function(e, t) {
|
|
574
426
|
if (!e)
|
|
575
427
|
return !1;
|
|
576
428
|
var i = e.shorthandAssign, s = e.doubleProto;
|
|
@@ -578,13 +430,13 @@ I.checkExpressionErrors = function(e, t) {
|
|
|
578
430
|
return i >= 0 || s >= 0;
|
|
579
431
|
i >= 0 && this.raise(i, "Shorthand property assignments are valid only in destructuring patterns"), s >= 0 && this.raiseRecoverable(s, "Redefinition of __proto__ property");
|
|
580
432
|
};
|
|
581
|
-
|
|
433
|
+
S.checkYieldAwaitInDefaultParams = function() {
|
|
582
434
|
this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos) && this.raise(this.yieldPos, "Yield expression cannot be a default value"), this.awaitPos && this.raise(this.awaitPos, "Await expression cannot be a default value");
|
|
583
435
|
};
|
|
584
|
-
|
|
436
|
+
S.isSimpleAssignTarget = function(e) {
|
|
585
437
|
return e.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(e.expression) : e.type === "Identifier" || e.type === "MemberExpression";
|
|
586
438
|
};
|
|
587
|
-
var p =
|
|
439
|
+
var p = y.prototype;
|
|
588
440
|
p.parseTopLevel = function(e) {
|
|
589
441
|
var t = /* @__PURE__ */ Object.create(null);
|
|
590
442
|
for (e.body || (e.body = []); this.type !== a.eof; ) {
|
|
@@ -598,25 +450,25 @@ p.parseTopLevel = function(e) {
|
|
|
598
450
|
}
|
|
599
451
|
return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType, this.finishNode(e, "Program");
|
|
600
452
|
};
|
|
601
|
-
var
|
|
453
|
+
var Se = { kind: "loop" }, kt = { kind: "switch" };
|
|
602
454
|
p.isLet = function(e) {
|
|
603
455
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
|
|
604
456
|
return !1;
|
|
605
|
-
|
|
606
|
-
var t =
|
|
457
|
+
C.lastIndex = this.pos;
|
|
458
|
+
var t = C.exec(this.input), i = this.pos + t[0].length, s = this.input.charCodeAt(i);
|
|
607
459
|
if (s === 91 || s === 92)
|
|
608
460
|
return !0;
|
|
609
461
|
if (e)
|
|
610
462
|
return !1;
|
|
611
463
|
if (s === 123 || s > 55295 && s < 56320)
|
|
612
464
|
return !0;
|
|
613
|
-
if (
|
|
614
|
-
for (var r = i + 1;
|
|
465
|
+
if (V(s, !0)) {
|
|
466
|
+
for (var r = i + 1; F(s = this.input.charCodeAt(r), !0); )
|
|
615
467
|
++r;
|
|
616
468
|
if (s === 92 || s > 55295 && s < 56320)
|
|
617
469
|
return !0;
|
|
618
470
|
var n = this.input.slice(i, r);
|
|
619
|
-
if (!
|
|
471
|
+
if (!dt.test(n))
|
|
620
472
|
return !0;
|
|
621
473
|
}
|
|
622
474
|
return !1;
|
|
@@ -624,33 +476,33 @@ p.isLet = function(e) {
|
|
|
624
476
|
p.isAsyncFunction = function() {
|
|
625
477
|
if (this.options.ecmaVersion < 8 || !this.isContextual("async"))
|
|
626
478
|
return !1;
|
|
627
|
-
|
|
628
|
-
var e =
|
|
629
|
-
return !
|
|
479
|
+
C.lastIndex = this.pos;
|
|
480
|
+
var e = C.exec(this.input), t = this.pos + e[0].length, i;
|
|
481
|
+
return !w.test(this.input.slice(this.pos, t)) && this.input.slice(t, t + 8) === "function" && (t + 8 === this.input.length || !(F(i = this.input.charCodeAt(t + 8)) || i > 55295 && i < 56320));
|
|
630
482
|
};
|
|
631
483
|
p.isUsingKeyword = function(e, t) {
|
|
632
484
|
if (this.options.ecmaVersion < 17 || !this.isContextual(e ? "await" : "using"))
|
|
633
485
|
return !1;
|
|
634
|
-
|
|
635
|
-
var i =
|
|
636
|
-
if (
|
|
486
|
+
C.lastIndex = this.pos;
|
|
487
|
+
var i = C.exec(this.input), s = this.pos + i[0].length;
|
|
488
|
+
if (w.test(this.input.slice(this.pos, s)))
|
|
637
489
|
return !1;
|
|
638
490
|
if (e) {
|
|
639
491
|
var r = s + 5, n;
|
|
640
|
-
if (this.input.slice(s, r) !== "using" || r === this.input.length ||
|
|
492
|
+
if (this.input.slice(s, r) !== "using" || r === this.input.length || F(n = this.input.charCodeAt(r)) || n > 55295 && n < 56320)
|
|
641
493
|
return !1;
|
|
642
|
-
|
|
643
|
-
var
|
|
644
|
-
if (
|
|
494
|
+
C.lastIndex = r;
|
|
495
|
+
var u = C.exec(this.input);
|
|
496
|
+
if (u && w.test(this.input.slice(r, r + u[0].length)))
|
|
645
497
|
return !1;
|
|
646
498
|
}
|
|
647
499
|
if (t) {
|
|
648
|
-
var
|
|
649
|
-
if (this.input.slice(s,
|
|
500
|
+
var o = s + 2, h;
|
|
501
|
+
if (this.input.slice(s, o) === "of" && (o === this.input.length || !F(h = this.input.charCodeAt(o)) && !(h > 55295 && h < 56320)))
|
|
650
502
|
return !1;
|
|
651
503
|
}
|
|
652
|
-
var
|
|
653
|
-
return
|
|
504
|
+
var l = this.input.charCodeAt(s);
|
|
505
|
+
return V(l, !0) || l === 92;
|
|
654
506
|
};
|
|
655
507
|
p.isAwaitUsing = function(e) {
|
|
656
508
|
return this.isUsingKeyword(!0, e);
|
|
@@ -698,20 +550,20 @@ p.parseStatement = function(e, t, i) {
|
|
|
698
550
|
case a._export:
|
|
699
551
|
case a._import:
|
|
700
552
|
if (this.options.ecmaVersion > 10 && s === a._import) {
|
|
701
|
-
|
|
702
|
-
var
|
|
703
|
-
if (
|
|
553
|
+
C.lastIndex = this.pos;
|
|
554
|
+
var u = C.exec(this.input), o = this.pos + u[0].length, h = this.input.charCodeAt(o);
|
|
555
|
+
if (h === 40 || h === 46)
|
|
704
556
|
return this.parseExpressionStatement(r, this.parseExpression());
|
|
705
557
|
}
|
|
706
558
|
return this.options.allowImportExportEverywhere || (t || this.raise(this.start, "'import' and 'export' may only appear at the top level"), this.inModule || this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")), s === a._import ? this.parseImport(r) : this.parseExport(r, i);
|
|
707
559
|
default:
|
|
708
560
|
if (this.isAsyncFunction())
|
|
709
561
|
return e && this.unexpected(), this.next(), this.parseFunctionStatement(r, !0, !e);
|
|
710
|
-
var
|
|
711
|
-
if (
|
|
712
|
-
return t && this.options.sourceType === "script" && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"),
|
|
713
|
-
var
|
|
714
|
-
return s === a.name &&
|
|
562
|
+
var l = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null;
|
|
563
|
+
if (l)
|
|
564
|
+
return t && this.options.sourceType === "script" && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), l === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(r, !1, l), this.semicolon(), this.finishNode(r, "VariableDeclaration");
|
|
565
|
+
var d = this.value, g = this.parseExpression();
|
|
566
|
+
return s === a.name && g.type === "Identifier" && this.eat(a.colon) ? this.parseLabeledStatement(r, d, g, e) : this.parseExpressionStatement(r, g);
|
|
715
567
|
}
|
|
716
568
|
};
|
|
717
569
|
p.parseBreakContinueStatement = function(e, t) {
|
|
@@ -728,31 +580,31 @@ p.parseDebuggerStatement = function(e) {
|
|
|
728
580
|
return this.next(), this.semicolon(), this.finishNode(e, "DebuggerStatement");
|
|
729
581
|
};
|
|
730
582
|
p.parseDoStatement = function(e) {
|
|
731
|
-
return this.next(), this.labels.push(
|
|
583
|
+
return this.next(), this.labels.push(Se), 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");
|
|
732
584
|
};
|
|
733
585
|
p.parseForStatement = function(e) {
|
|
734
586
|
this.next();
|
|
735
587
|
var t = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
736
|
-
if (this.labels.push(
|
|
588
|
+
if (this.labels.push(Se), this.enterScope(0), this.expect(a.parenL), this.type === a.semi)
|
|
737
589
|
return t > -1 && this.unexpected(t), this.parseFor(e, null);
|
|
738
590
|
var i = this.isLet();
|
|
739
591
|
if (this.type === a._var || this.type === a._const || i) {
|
|
740
592
|
var s = this.startNode(), r = i ? "let" : this.value;
|
|
741
593
|
return this.next(), this.parseVar(s, !0, r), this.finishNode(s, "VariableDeclaration"), this.parseForAfterInit(e, s, t);
|
|
742
594
|
}
|
|
743
|
-
var n = this.isContextual("let"),
|
|
744
|
-
if (
|
|
745
|
-
var
|
|
746
|
-
return this.next(),
|
|
595
|
+
var n = this.isContextual("let"), u = !1, o = this.isUsing(!0) ? "using" : this.isAwaitUsing(!0) ? "await using" : null;
|
|
596
|
+
if (o) {
|
|
597
|
+
var h = this.startNode();
|
|
598
|
+
return this.next(), o === "await using" && this.next(), this.parseVar(h, !0, o), this.finishNode(h, "VariableDeclaration"), this.parseForAfterInit(e, h, t);
|
|
747
599
|
}
|
|
748
|
-
var
|
|
749
|
-
return this.type === a._in || (
|
|
600
|
+
var l = this.containsEsc, d = new oe(), g = this.start, _ = t > -1 ? this.parseExprSubscripts(d, "await") : this.parseExpression(!0, d);
|
|
601
|
+
return this.type === a._in || (u = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === a._in && this.unexpected(t), e.await = !0) : u && this.options.ecmaVersion >= 8 && (_.start === g && !l && _.type === "Identifier" && _.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = !1)), n && u && this.raise(_.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(_, !1, d), this.checkLValPattern(_), this.parseForIn(e, _)) : (this.checkExpressionErrors(d, !0), t > -1 && this.unexpected(t), this.parseFor(e, _));
|
|
750
602
|
};
|
|
751
603
|
p.parseForAfterInit = function(e, t, i) {
|
|
752
604
|
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));
|
|
753
605
|
};
|
|
754
606
|
p.parseFunctionStatement = function(e, t, i) {
|
|
755
|
-
return this.next(), this.parseFunction(e,
|
|
607
|
+
return this.next(), this.parseFunction(e, Y | (i ? 0 : me), !1, t);
|
|
756
608
|
};
|
|
757
609
|
p.parseIfStatement = function(e) {
|
|
758
610
|
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");
|
|
@@ -761,7 +613,7 @@ p.parseReturnStatement = function(e) {
|
|
|
761
613
|
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");
|
|
762
614
|
};
|
|
763
615
|
p.parseSwitchStatement = function(e) {
|
|
764
|
-
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(a.braceL), this.labels.push(
|
|
616
|
+
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(a.braceL), this.labels.push(kt), this.enterScope(0);
|
|
765
617
|
for (var t, i = !1; this.type !== a.braceR; )
|
|
766
618
|
if (this.type === a._case || this.type === a._default) {
|
|
767
619
|
var s = this.type === a._case;
|
|
@@ -771,12 +623,12 @@ p.parseSwitchStatement = function(e) {
|
|
|
771
623
|
return this.exitScope(), t && this.finishNode(t, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(e, "SwitchStatement");
|
|
772
624
|
};
|
|
773
625
|
p.parseThrowStatement = function(e) {
|
|
774
|
-
return this.next(),
|
|
626
|
+
return this.next(), w.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");
|
|
775
627
|
};
|
|
776
|
-
var
|
|
628
|
+
var wt = [];
|
|
777
629
|
p.parseCatchClauseParam = function() {
|
|
778
630
|
var e = this.parseBindingAtom(), t = e.type === "Identifier";
|
|
779
|
-
return this.enterScope(t ?
|
|
631
|
+
return this.enterScope(t ? De : 0), this.checkLValPattern(e, t ? Ue : B), this.expect(a.parenR), e;
|
|
780
632
|
};
|
|
781
633
|
p.parseTryStatement = function(e) {
|
|
782
634
|
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === a._catch) {
|
|
@@ -789,7 +641,7 @@ p.parseVarStatement = function(e, t, i) {
|
|
|
789
641
|
return this.next(), this.parseVar(e, !1, t, i), this.semicolon(), this.finishNode(e, "VariableDeclaration");
|
|
790
642
|
};
|
|
791
643
|
p.parseWhileStatement = function(e) {
|
|
792
|
-
return this.next(), e.test = this.parseParenExpression(), this.labels.push(
|
|
644
|
+
return this.next(), e.test = this.parseParenExpression(), this.labels.push(Se), e.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(e, "WhileStatement");
|
|
793
645
|
};
|
|
794
646
|
p.parseWithStatement = function(e) {
|
|
795
647
|
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");
|
|
@@ -799,17 +651,17 @@ p.parseEmptyStatement = function(e) {
|
|
|
799
651
|
};
|
|
800
652
|
p.parseLabeledStatement = function(e, t, i, s) {
|
|
801
653
|
for (var r = 0, n = this.labels; r < n.length; r += 1) {
|
|
802
|
-
var
|
|
803
|
-
|
|
654
|
+
var u = n[r];
|
|
655
|
+
u.name === t && this.raise(i.start, "Label '" + t + "' is already declared");
|
|
804
656
|
}
|
|
805
|
-
for (var
|
|
806
|
-
var
|
|
807
|
-
if (
|
|
808
|
-
|
|
657
|
+
for (var o = this.type.isLoop ? "loop" : this.type === a._switch ? "switch" : null, h = this.labels.length - 1; h >= 0; h--) {
|
|
658
|
+
var l = this.labels[h];
|
|
659
|
+
if (l.statementStart === e.start)
|
|
660
|
+
l.statementStart = this.start, l.kind = o;
|
|
809
661
|
else
|
|
810
662
|
break;
|
|
811
663
|
}
|
|
812
|
-
return this.labels.push({ name: t, kind:
|
|
664
|
+
return this.labels.push({ name: t, kind: o, 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");
|
|
813
665
|
};
|
|
814
666
|
p.parseExpressionStatement = function(e, t) {
|
|
815
667
|
return e.expression = t, this.semicolon(), this.finishNode(e, "ExpressionStatement");
|
|
@@ -840,13 +692,13 @@ p.parseVar = function(e, t, i, s) {
|
|
|
840
692
|
return e;
|
|
841
693
|
};
|
|
842
694
|
p.parseVarId = function(e, t) {
|
|
843
|
-
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ?
|
|
695
|
+
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? Ce : B, !1);
|
|
844
696
|
};
|
|
845
|
-
var
|
|
697
|
+
var Y = 1, me = 2, je = 4;
|
|
846
698
|
p.parseFunction = function(e, t, i, s, r) {
|
|
847
|
-
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !s) && (this.type === a.star && t &
|
|
848
|
-
var n = this.yieldPos,
|
|
849
|
-
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
699
|
+
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !s) && (this.type === a.star && t & me && this.unexpected(), e.generator = this.eat(a.star)), this.options.ecmaVersion >= 8 && (e.async = !!s), t & Y && (e.id = t & je && this.type !== a.name ? null : this.parseIdent(), e.id && !(t & me) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? Ce : B : Me));
|
|
700
|
+
var n = this.yieldPos, u = this.awaitPos, o = this.awaitIdentPos;
|
|
701
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(_e(e.async, e.generator)), t & Y || (e.id = this.type === a.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, i, !1, r), this.yieldPos = n, this.awaitPos = u, this.awaitIdentPos = o, this.finishNode(e, t & Y ? "FunctionDeclaration" : "FunctionExpression");
|
|
850
702
|
};
|
|
851
703
|
p.parseFunctionParams = function(e) {
|
|
852
704
|
this.expect(a.parenL), e.params = this.parseBindingList(a.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
@@ -857,27 +709,27 @@ p.parseClass = function(e, t) {
|
|
|
857
709
|
this.strict = !0, this.parseClassId(e, t), this.parseClassSuper(e);
|
|
858
710
|
var s = this.enterClassBody(), r = this.startNode(), n = !1;
|
|
859
711
|
for (r.body = [], this.expect(a.braceL); this.type !== a.braceR; ) {
|
|
860
|
-
var
|
|
861
|
-
|
|
712
|
+
var u = this.parseClassElement(e.superClass !== null);
|
|
713
|
+
u && (r.body.push(u), u.type === "MethodDefinition" && u.kind === "constructor" ? (n && this.raiseRecoverable(u.start, "Duplicate constructor in the same class"), n = !0) : u.key && u.key.type === "PrivateIdentifier" && At(s, u) && this.raiseRecoverable(u.key.start, "Identifier '#" + u.key.name + "' has already been declared"));
|
|
862
714
|
}
|
|
863
715
|
return this.strict = i, this.next(), e.body = this.finishNode(r, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
864
716
|
};
|
|
865
717
|
p.parseClassElement = function(e) {
|
|
866
718
|
if (this.eat(a.semi))
|
|
867
719
|
return null;
|
|
868
|
-
var t = this.options.ecmaVersion, i = this.startNode(), s = "", r = !1, n = !1,
|
|
720
|
+
var t = this.options.ecmaVersion, i = this.startNode(), s = "", r = !1, n = !1, u = "method", o = !1;
|
|
869
721
|
if (this.eatContextual("static")) {
|
|
870
722
|
if (t >= 13 && this.eat(a.braceL))
|
|
871
723
|
return this.parseClassStaticBlock(i), i;
|
|
872
|
-
this.isClassElementNameStart() || this.type === a.star ?
|
|
724
|
+
this.isClassElementNameStart() || this.type === a.star ? o = !0 : s = "static";
|
|
873
725
|
}
|
|
874
|
-
if (i.static =
|
|
875
|
-
var
|
|
876
|
-
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ?
|
|
726
|
+
if (i.static = o, !s && t >= 8 && this.eatContextual("async") && ((this.isClassElementNameStart() || this.type === a.star) && !this.canInsertSemicolon() ? n = !0 : s = "async"), !s && (t >= 9 || !n) && this.eat(a.star) && (r = !0), !s && !n && !r) {
|
|
727
|
+
var h = this.value;
|
|
728
|
+
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? u = h : s = h);
|
|
877
729
|
}
|
|
878
|
-
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 ||
|
|
879
|
-
var
|
|
880
|
-
|
|
730
|
+
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 || u !== "method" || r || n) {
|
|
731
|
+
var l = !i.static && ie(i, "constructor"), d = l && e;
|
|
732
|
+
l && u !== "method" && this.raise(i.key.start, "Constructor can't have get/set modifier"), i.kind = l ? "constructor" : u, this.parseClassMethod(i, r, n, d);
|
|
881
733
|
} else
|
|
882
734
|
this.parseClassField(i);
|
|
883
735
|
return i;
|
|
@@ -890,24 +742,24 @@ p.parseClassElementName = function(e) {
|
|
|
890
742
|
};
|
|
891
743
|
p.parseClassMethod = function(e, t, i, s) {
|
|
892
744
|
var r = e.key;
|
|
893
|
-
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 &&
|
|
745
|
+
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 && ie(e, "prototype") && this.raise(r.start, "Classes may not have a static property named prototype");
|
|
894
746
|
var n = e.value = this.parseMethod(t, i, s);
|
|
895
747
|
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");
|
|
896
748
|
};
|
|
897
749
|
p.parseClassField = function(e) {
|
|
898
|
-
return
|
|
750
|
+
return ie(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && ie(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(a.eq) ? (this.enterScope(J | ne), e.value = this.parseMaybeAssign(), this.exitScope()) : e.value = null, this.semicolon(), this.finishNode(e, "PropertyDefinition");
|
|
899
751
|
};
|
|
900
752
|
p.parseClassStaticBlock = function(e) {
|
|
901
753
|
e.body = [];
|
|
902
754
|
var t = this.labels;
|
|
903
|
-
for (this.labels = [], this.enterScope(
|
|
755
|
+
for (this.labels = [], this.enterScope(U | ne); this.type !== a.braceR; ) {
|
|
904
756
|
var i = this.parseStatement(null);
|
|
905
757
|
e.body.push(i);
|
|
906
758
|
}
|
|
907
759
|
return this.next(), this.exitScope(), this.labels = t, this.finishNode(e, "StaticBlock");
|
|
908
760
|
};
|
|
909
761
|
p.parseClassId = function(e, t) {
|
|
910
|
-
this.type === a.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id,
|
|
762
|
+
this.type === a.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id, B, !1)) : (t === !0 && this.unexpected(), e.id = null);
|
|
911
763
|
};
|
|
912
764
|
p.parseClassSuper = function(e) {
|
|
913
765
|
e.superClass = this.eat(a._extends) ? this.parseExprSubscripts(null, !1) : null;
|
|
@@ -920,15 +772,15 @@ p.exitClassBody = function() {
|
|
|
920
772
|
var e = this.privateNameStack.pop(), t = e.declared, i = e.used;
|
|
921
773
|
if (this.options.checkPrivateFields)
|
|
922
774
|
for (var s = this.privateNameStack.length, r = s === 0 ? null : this.privateNameStack[s - 1], n = 0; n < i.length; ++n) {
|
|
923
|
-
var
|
|
924
|
-
|
|
775
|
+
var u = i[n];
|
|
776
|
+
W(t, u.name) || (r ? r.used.push(u) : this.raiseRecoverable(u.start, "Private field '#" + u.name + "' must be declared in an enclosing class"));
|
|
925
777
|
}
|
|
926
778
|
};
|
|
927
|
-
function
|
|
779
|
+
function At(e, t) {
|
|
928
780
|
var i = t.key.name, s = e[i], r = "true";
|
|
929
781
|
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);
|
|
930
782
|
}
|
|
931
|
-
function
|
|
783
|
+
function ie(e, t) {
|
|
932
784
|
var i = e.computed, s = e.key;
|
|
933
785
|
return !i && (s.type === "Identifier" && s.name === t || s.type === "Literal" && s.value === t);
|
|
934
786
|
}
|
|
@@ -963,7 +815,7 @@ p.parseExportDefaultDeclaration = function() {
|
|
|
963
815
|
var e;
|
|
964
816
|
if (this.type === a._function || (e = this.isAsyncFunction())) {
|
|
965
817
|
var t = this.startNode();
|
|
966
|
-
return this.next(), e && this.next(), this.parseFunction(t,
|
|
818
|
+
return this.next(), e && this.next(), this.parseFunction(t, Y | je, !1, e);
|
|
967
819
|
} else if (this.type === a._class) {
|
|
968
820
|
var i = this.startNode();
|
|
969
821
|
return this.parseClass(i, "nullableID");
|
|
@@ -973,7 +825,7 @@ p.parseExportDefaultDeclaration = function() {
|
|
|
973
825
|
}
|
|
974
826
|
};
|
|
975
827
|
p.checkExport = function(e, t, i) {
|
|
976
|
-
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value),
|
|
828
|
+
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value), W(e, t) && this.raiseRecoverable(i, "Duplicate export '" + t + "'"), e[t] = !0);
|
|
977
829
|
};
|
|
978
830
|
p.checkPatternExport = function(e, t) {
|
|
979
831
|
var i = t.type;
|
|
@@ -985,9 +837,9 @@ p.checkPatternExport = function(e, t) {
|
|
|
985
837
|
this.checkPatternExport(e, n);
|
|
986
838
|
}
|
|
987
839
|
else if (i === "ArrayPattern")
|
|
988
|
-
for (var
|
|
989
|
-
var
|
|
990
|
-
|
|
840
|
+
for (var u = 0, o = t.elements; u < o.length; u += 1) {
|
|
841
|
+
var h = o[u];
|
|
842
|
+
h && this.checkPatternExport(e, h);
|
|
991
843
|
}
|
|
992
844
|
else
|
|
993
845
|
i === "Property" ? this.checkPatternExport(e, t.value) : i === "AssignmentPattern" ? this.checkPatternExport(e, t.left) : i === "RestElement" && this.checkPatternExport(e, t.argument);
|
|
@@ -1022,19 +874,19 @@ p.parseExportSpecifiers = function(e) {
|
|
|
1022
874
|
return t;
|
|
1023
875
|
};
|
|
1024
876
|
p.parseImport = function(e) {
|
|
1025
|
-
return this.next(), this.type === a.string ? (e.specifiers =
|
|
877
|
+
return this.next(), this.type === a.string ? (e.specifiers = wt, 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");
|
|
1026
878
|
};
|
|
1027
879
|
p.parseImportSpecifier = function() {
|
|
1028
880
|
var e = this.startNode();
|
|
1029
|
-
return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local,
|
|
881
|
+
return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local, B), this.finishNode(e, "ImportSpecifier");
|
|
1030
882
|
};
|
|
1031
883
|
p.parseImportDefaultSpecifier = function() {
|
|
1032
884
|
var e = this.startNode();
|
|
1033
|
-
return e.local = this.parseIdent(), this.checkLValSimple(e.local,
|
|
885
|
+
return e.local = this.parseIdent(), this.checkLValSimple(e.local, B), this.finishNode(e, "ImportDefaultSpecifier");
|
|
1034
886
|
};
|
|
1035
887
|
p.parseImportNamespaceSpecifier = function() {
|
|
1036
888
|
var e = this.startNode();
|
|
1037
|
-
return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local,
|
|
889
|
+
return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local, B), this.finishNode(e, "ImportNamespaceSpecifier");
|
|
1038
890
|
};
|
|
1039
891
|
p.parseImportSpecifiers = function() {
|
|
1040
892
|
var e = [], t = !0;
|
|
@@ -1062,7 +914,7 @@ p.parseWithClause = function() {
|
|
|
1062
914
|
else if (this.expect(a.comma), this.afterTrailingComma(a.braceR))
|
|
1063
915
|
break;
|
|
1064
916
|
var s = this.parseImportAttribute(), r = s.key.type === "Identifier" ? s.key.name : s.key.value;
|
|
1065
|
-
|
|
917
|
+
W(t, r) && this.raiseRecoverable(s.key.start, "Duplicate attribute key '" + r + "'"), t[r] = !0, e.push(s);
|
|
1066
918
|
}
|
|
1067
919
|
return e;
|
|
1068
920
|
};
|
|
@@ -1073,7 +925,7 @@ p.parseImportAttribute = function() {
|
|
|
1073
925
|
p.parseModuleExportName = function() {
|
|
1074
926
|
if (this.options.ecmaVersion >= 13 && this.type === a.string) {
|
|
1075
927
|
var e = this.parseLiteral(this.value);
|
|
1076
|
-
return
|
|
928
|
+
return yt.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e;
|
|
1077
929
|
}
|
|
1078
930
|
return this.parseIdent(!0);
|
|
1079
931
|
};
|
|
@@ -1084,8 +936,8 @@ p.adaptDirectivePrologue = function(e) {
|
|
|
1084
936
|
p.isDirectiveCandidate = function(e) {
|
|
1085
937
|
return this.options.ecmaVersion >= 5 && e.type === "ExpressionStatement" && e.expression.type === "Literal" && typeof e.expression.value == "string" && (this.input[e.start] === '"' || this.input[e.start] === "'");
|
|
1086
938
|
};
|
|
1087
|
-
var
|
|
1088
|
-
|
|
939
|
+
var P = y.prototype;
|
|
940
|
+
P.toAssignable = function(e, t, i) {
|
|
1089
941
|
if (this.options.ecmaVersion >= 6 && e)
|
|
1090
942
|
switch (e.type) {
|
|
1091
943
|
case "Identifier":
|
|
@@ -1131,7 +983,7 @@ B.toAssignable = function(e, t, i) {
|
|
|
1131
983
|
i && this.checkPatternErrors(i, !0);
|
|
1132
984
|
return e;
|
|
1133
985
|
};
|
|
1134
|
-
|
|
986
|
+
P.toAssignableList = function(e, t) {
|
|
1135
987
|
for (var i = e.length, s = 0; s < i; s++) {
|
|
1136
988
|
var r = e[s];
|
|
1137
989
|
r && this.toAssignable(r, t);
|
|
@@ -1142,15 +994,15 @@ B.toAssignableList = function(e, t) {
|
|
|
1142
994
|
}
|
|
1143
995
|
return e;
|
|
1144
996
|
};
|
|
1145
|
-
|
|
997
|
+
P.parseSpread = function(e) {
|
|
1146
998
|
var t = this.startNode();
|
|
1147
999
|
return this.next(), t.argument = this.parseMaybeAssign(!1, e), this.finishNode(t, "SpreadElement");
|
|
1148
1000
|
};
|
|
1149
|
-
|
|
1001
|
+
P.parseRestBinding = function() {
|
|
1150
1002
|
var e = this.startNode();
|
|
1151
1003
|
return this.next(), this.options.ecmaVersion === 6 && this.type !== a.name && this.unexpected(), e.argument = this.parseBindingAtom(), this.finishNode(e, "RestElement");
|
|
1152
1004
|
};
|
|
1153
|
-
|
|
1005
|
+
P.parseBindingAtom = function() {
|
|
1154
1006
|
if (this.options.ecmaVersion >= 6)
|
|
1155
1007
|
switch (this.type) {
|
|
1156
1008
|
case a.bracketL:
|
|
@@ -1161,7 +1013,7 @@ B.parseBindingAtom = function() {
|
|
|
1161
1013
|
}
|
|
1162
1014
|
return this.parseIdent();
|
|
1163
1015
|
};
|
|
1164
|
-
|
|
1016
|
+
P.parseBindingList = function(e, t, i, s) {
|
|
1165
1017
|
for (var r = [], n = !0; !this.eat(e); )
|
|
1166
1018
|
if (n ? n = !1 : this.expect(a.comma), t && this.type === a.comma)
|
|
1167
1019
|
r.push(null);
|
|
@@ -1169,33 +1021,33 @@ B.parseBindingList = function(e, t, i, s) {
|
|
|
1169
1021
|
if (i && this.afterTrailingComma(e))
|
|
1170
1022
|
break;
|
|
1171
1023
|
if (this.type === a.ellipsis) {
|
|
1172
|
-
var
|
|
1173
|
-
this.parseBindingListItem(
|
|
1024
|
+
var u = this.parseRestBinding();
|
|
1025
|
+
this.parseBindingListItem(u), r.push(u), this.type === a.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.expect(e);
|
|
1174
1026
|
break;
|
|
1175
1027
|
} else
|
|
1176
1028
|
r.push(this.parseAssignableListItem(s));
|
|
1177
1029
|
}
|
|
1178
1030
|
return r;
|
|
1179
1031
|
};
|
|
1180
|
-
|
|
1032
|
+
P.parseAssignableListItem = function(e) {
|
|
1181
1033
|
var t = this.parseMaybeDefault(this.start, this.startLoc);
|
|
1182
1034
|
return this.parseBindingListItem(t), t;
|
|
1183
1035
|
};
|
|
1184
|
-
|
|
1036
|
+
P.parseBindingListItem = function(e) {
|
|
1185
1037
|
return e;
|
|
1186
1038
|
};
|
|
1187
|
-
|
|
1039
|
+
P.parseMaybeDefault = function(e, t, i) {
|
|
1188
1040
|
if (i = i || this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(a.eq))
|
|
1189
1041
|
return i;
|
|
1190
1042
|
var s = this.startNodeAt(e, t);
|
|
1191
1043
|
return s.left = i, s.right = this.parseMaybeAssign(), this.finishNode(s, "AssignmentPattern");
|
|
1192
1044
|
};
|
|
1193
|
-
|
|
1194
|
-
t === void 0 && (t =
|
|
1195
|
-
var s = t !==
|
|
1045
|
+
P.checkLValSimple = function(e, t, i) {
|
|
1046
|
+
t === void 0 && (t = te);
|
|
1047
|
+
var s = t !== te;
|
|
1196
1048
|
switch (e.type) {
|
|
1197
1049
|
case "Identifier":
|
|
1198
|
-
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (s ? "Binding " : "Assigning to ") + e.name + " in strict mode"), s && (t ===
|
|
1050
|
+
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (s ? "Binding " : "Assigning to ") + e.name + " in strict mode"), s && (t === B && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), i && (W(i, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), i[e.name] = !0), t !== qe && this.declareName(e.name, t, e.start));
|
|
1199
1051
|
break;
|
|
1200
1052
|
case "ChainExpression":
|
|
1201
1053
|
this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -1209,8 +1061,8 @@ B.checkLValSimple = function(e, t, i) {
|
|
|
1209
1061
|
this.raise(e.start, (s ? "Binding" : "Assigning to") + " rvalue");
|
|
1210
1062
|
}
|
|
1211
1063
|
};
|
|
1212
|
-
|
|
1213
|
-
switch (t === void 0 && (t =
|
|
1064
|
+
P.checkLValPattern = function(e, t, i) {
|
|
1065
|
+
switch (t === void 0 && (t = te), e.type) {
|
|
1214
1066
|
case "ObjectPattern":
|
|
1215
1067
|
for (var s = 0, r = e.properties; s < r.length; s += 1) {
|
|
1216
1068
|
var n = r[s];
|
|
@@ -1218,17 +1070,17 @@ B.checkLValPattern = function(e, t, i) {
|
|
|
1218
1070
|
}
|
|
1219
1071
|
break;
|
|
1220
1072
|
case "ArrayPattern":
|
|
1221
|
-
for (var
|
|
1222
|
-
var
|
|
1223
|
-
|
|
1073
|
+
for (var u = 0, o = e.elements; u < o.length; u += 1) {
|
|
1074
|
+
var h = o[u];
|
|
1075
|
+
h && this.checkLValInnerPattern(h, t, i);
|
|
1224
1076
|
}
|
|
1225
1077
|
break;
|
|
1226
1078
|
default:
|
|
1227
1079
|
this.checkLValSimple(e, t, i);
|
|
1228
1080
|
}
|
|
1229
1081
|
};
|
|
1230
|
-
|
|
1231
|
-
switch (t === void 0 && (t =
|
|
1082
|
+
P.checkLValInnerPattern = function(e, t, i) {
|
|
1083
|
+
switch (t === void 0 && (t = te), e.type) {
|
|
1232
1084
|
case "Property":
|
|
1233
1085
|
this.checkLValInnerPattern(e.value, t, i);
|
|
1234
1086
|
break;
|
|
@@ -1242,33 +1094,33 @@ B.checkLValInnerPattern = function(e, t, i) {
|
|
|
1242
1094
|
this.checkLValPattern(e, t, i);
|
|
1243
1095
|
}
|
|
1244
1096
|
};
|
|
1245
|
-
var
|
|
1097
|
+
var N = function(t, i, s, r, n) {
|
|
1246
1098
|
this.token = t, this.isExpr = !!i, this.preserveSpace = !!s, this.override = r, this.generator = !!n;
|
|
1247
|
-
},
|
|
1248
|
-
b_stat: new
|
|
1249
|
-
b_expr: new
|
|
1250
|
-
b_tmpl: new
|
|
1251
|
-
p_stat: new
|
|
1252
|
-
p_expr: new
|
|
1253
|
-
q_tmpl: new
|
|
1099
|
+
}, b = {
|
|
1100
|
+
b_stat: new N("{", !1),
|
|
1101
|
+
b_expr: new N("{", !0),
|
|
1102
|
+
b_tmpl: new N("${", !1),
|
|
1103
|
+
p_stat: new N("(", !1),
|
|
1104
|
+
p_expr: new N("(", !0),
|
|
1105
|
+
q_tmpl: new N("`", !0, !0, function(e) {
|
|
1254
1106
|
return e.tryReadTemplateToken();
|
|
1255
1107
|
}),
|
|
1256
|
-
f_stat: new
|
|
1257
|
-
f_expr: new
|
|
1258
|
-
f_expr_gen: new
|
|
1259
|
-
f_gen: new
|
|
1260
|
-
},
|
|
1261
|
-
|
|
1262
|
-
return [
|
|
1263
|
-
};
|
|
1264
|
-
|
|
1108
|
+
f_stat: new N("function", !1),
|
|
1109
|
+
f_expr: new N("function", !0),
|
|
1110
|
+
f_expr_gen: new N("function", !0, !1, null, !0),
|
|
1111
|
+
f_gen: new N("function", !1, !1, null, !0)
|
|
1112
|
+
}, K = y.prototype;
|
|
1113
|
+
K.initialContext = function() {
|
|
1114
|
+
return [b.b_stat];
|
|
1115
|
+
};
|
|
1116
|
+
K.curContext = function() {
|
|
1265
1117
|
return this.context[this.context.length - 1];
|
|
1266
1118
|
};
|
|
1267
|
-
|
|
1119
|
+
K.braceIsBlock = function(e) {
|
|
1268
1120
|
var t = this.curContext();
|
|
1269
|
-
return t ===
|
|
1121
|
+
return t === b.f_expr || t === b.f_stat ? !0 : e === a.colon && (t === b.b_stat || t === b.b_expr) ? !t.isExpr : e === a._return || e === a.name && this.exprAllowed ? w.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 === b.b_stat : e === a._var || e === a._const || e === a.name ? !1 : !this.exprAllowed;
|
|
1270
1122
|
};
|
|
1271
|
-
|
|
1123
|
+
K.inGeneratorContext = function() {
|
|
1272
1124
|
for (var e = this.context.length - 1; e >= 1; e--) {
|
|
1273
1125
|
var t = this.context[e];
|
|
1274
1126
|
if (t.token === "function")
|
|
@@ -1276,11 +1128,11 @@ ie.inGeneratorContext = function() {
|
|
|
1276
1128
|
}
|
|
1277
1129
|
return !1;
|
|
1278
1130
|
};
|
|
1279
|
-
|
|
1131
|
+
K.updateContext = function(e) {
|
|
1280
1132
|
var t, i = this.type;
|
|
1281
1133
|
i.keyword && e === a.dot ? this.exprAllowed = !1 : (t = i.updateContext) ? t.call(this, e) : this.exprAllowed = i.beforeExpr;
|
|
1282
1134
|
};
|
|
1283
|
-
|
|
1135
|
+
K.overrideContext = function(e) {
|
|
1284
1136
|
this.curContext() !== e && (this.context[this.context.length - 1] = e);
|
|
1285
1137
|
};
|
|
1286
1138
|
a.parenR.updateContext = a.braceR.updateContext = function() {
|
|
@@ -1289,33 +1141,33 @@ a.parenR.updateContext = a.braceR.updateContext = function() {
|
|
|
1289
1141
|
return;
|
|
1290
1142
|
}
|
|
1291
1143
|
var e = this.context.pop();
|
|
1292
|
-
e ===
|
|
1144
|
+
e === b.b_stat && this.curContext().token === "function" && (e = this.context.pop()), this.exprAllowed = !e.isExpr;
|
|
1293
1145
|
};
|
|
1294
1146
|
a.braceL.updateContext = function(e) {
|
|
1295
|
-
this.context.push(this.braceIsBlock(e) ?
|
|
1147
|
+
this.context.push(this.braceIsBlock(e) ? b.b_stat : b.b_expr), this.exprAllowed = !0;
|
|
1296
1148
|
};
|
|
1297
1149
|
a.dollarBraceL.updateContext = function() {
|
|
1298
|
-
this.context.push(
|
|
1150
|
+
this.context.push(b.b_tmpl), this.exprAllowed = !0;
|
|
1299
1151
|
};
|
|
1300
1152
|
a.parenL.updateContext = function(e) {
|
|
1301
1153
|
var t = e === a._if || e === a._for || e === a._with || e === a._while;
|
|
1302
|
-
this.context.push(t ?
|
|
1154
|
+
this.context.push(t ? b.p_stat : b.p_expr), this.exprAllowed = !0;
|
|
1303
1155
|
};
|
|
1304
1156
|
a.incDec.updateContext = function() {
|
|
1305
1157
|
};
|
|
1306
1158
|
a._function.updateContext = a._class.updateContext = function(e) {
|
|
1307
|
-
e.beforeExpr && e !== a._else && !(e === a.semi && this.curContext() !==
|
|
1159
|
+
e.beforeExpr && e !== a._else && !(e === a.semi && this.curContext() !== b.p_stat) && !(e === a._return && w.test(this.input.slice(this.lastTokEnd, this.start))) && !((e === a.colon || e === a.braceL) && this.curContext() === b.b_stat) ? this.context.push(b.f_expr) : this.context.push(b.f_stat), this.exprAllowed = !1;
|
|
1308
1160
|
};
|
|
1309
1161
|
a.colon.updateContext = function() {
|
|
1310
1162
|
this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
|
|
1311
1163
|
};
|
|
1312
1164
|
a.backQuote.updateContext = function() {
|
|
1313
|
-
this.curContext() ===
|
|
1165
|
+
this.curContext() === b.q_tmpl ? this.context.pop() : this.context.push(b.q_tmpl), this.exprAllowed = !1;
|
|
1314
1166
|
};
|
|
1315
1167
|
a.star.updateContext = function(e) {
|
|
1316
1168
|
if (e === a._function) {
|
|
1317
1169
|
var t = this.context.length - 1;
|
|
1318
|
-
this.context[t] ===
|
|
1170
|
+
this.context[t] === b.f_expr ? this.context[t] = b.f_expr_gen : this.context[t] = b.f_gen;
|
|
1319
1171
|
}
|
|
1320
1172
|
this.exprAllowed = !0;
|
|
1321
1173
|
};
|
|
@@ -1323,8 +1175,8 @@ a.name.updateContext = function(e) {
|
|
|
1323
1175
|
var t = !1;
|
|
1324
1176
|
this.options.ecmaVersion >= 6 && e !== a.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (t = !0), this.exprAllowed = t;
|
|
1325
1177
|
};
|
|
1326
|
-
var
|
|
1327
|
-
|
|
1178
|
+
var f = y.prototype;
|
|
1179
|
+
f.checkPropClash = function(e, t, i) {
|
|
1328
1180
|
if (!(this.options.ecmaVersion >= 9 && e.type === "SpreadElement") && !(this.options.ecmaVersion >= 6 && (e.computed || e.method || e.shorthand))) {
|
|
1329
1181
|
var s = e.key, r;
|
|
1330
1182
|
switch (s.type) {
|
|
@@ -1343,20 +1195,20 @@ d.checkPropClash = function(e, t, i) {
|
|
|
1343
1195
|
return;
|
|
1344
1196
|
}
|
|
1345
1197
|
r = "$" + r;
|
|
1346
|
-
var
|
|
1347
|
-
if (
|
|
1348
|
-
var
|
|
1349
|
-
n === "init" ?
|
|
1198
|
+
var u = t[r];
|
|
1199
|
+
if (u) {
|
|
1200
|
+
var o;
|
|
1201
|
+
n === "init" ? o = this.strict && u.init || u.get || u.set : o = u.init || u[n], o && this.raiseRecoverable(s.start, "Redefinition of property");
|
|
1350
1202
|
} else
|
|
1351
|
-
|
|
1203
|
+
u = t[r] = {
|
|
1352
1204
|
init: !1,
|
|
1353
1205
|
get: !1,
|
|
1354
1206
|
set: !1
|
|
1355
1207
|
};
|
|
1356
|
-
|
|
1208
|
+
u[n] = !0;
|
|
1357
1209
|
}
|
|
1358
1210
|
};
|
|
1359
|
-
|
|
1211
|
+
f.parseExpression = function(e, t) {
|
|
1360
1212
|
var i = this.start, s = this.startLoc, r = this.parseMaybeAssign(e, t);
|
|
1361
1213
|
if (this.type === a.comma) {
|
|
1362
1214
|
var n = this.startNodeAt(i, s);
|
|
@@ -1366,25 +1218,25 @@ d.parseExpression = function(e, t) {
|
|
|
1366
1218
|
}
|
|
1367
1219
|
return r;
|
|
1368
1220
|
};
|
|
1369
|
-
|
|
1221
|
+
f.parseMaybeAssign = function(e, t, i) {
|
|
1370
1222
|
if (this.isContextual("yield")) {
|
|
1371
1223
|
if (this.inGenerator)
|
|
1372
1224
|
return this.parseYield(e);
|
|
1373
1225
|
this.exprAllowed = !1;
|
|
1374
1226
|
}
|
|
1375
|
-
var s = !1, r = -1, n = -1,
|
|
1376
|
-
t ? (r = t.parenthesizedAssign, n = t.trailingComma,
|
|
1377
|
-
var
|
|
1227
|
+
var s = !1, r = -1, n = -1, u = -1;
|
|
1228
|
+
t ? (r = t.parenthesizedAssign, n = t.trailingComma, u = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new oe(), s = !0);
|
|
1229
|
+
var o = this.start, h = this.startLoc;
|
|
1378
1230
|
(this.type === a.parenL || this.type === a.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
1379
|
-
var
|
|
1380
|
-
if (i && (
|
|
1381
|
-
var
|
|
1382
|
-
return
|
|
1231
|
+
var l = this.parseMaybeConditional(e, t);
|
|
1232
|
+
if (i && (l = i.call(this, l, o, h)), this.type.isAssign) {
|
|
1233
|
+
var d = this.startNodeAt(o, h);
|
|
1234
|
+
return d.operator = this.value, this.type === a.eq && (l = this.toAssignable(l, !1, t)), s || (t.parenthesizedAssign = t.trailingComma = t.doubleProto = -1), t.shorthandAssign >= l.start && (t.shorthandAssign = -1), this.type === a.eq ? this.checkLValPattern(l) : this.checkLValSimple(l), d.left = l, this.next(), d.right = this.parseMaybeAssign(e), u > -1 && (t.doubleProto = u), this.finishNode(d, "AssignmentExpression");
|
|
1383
1235
|
} else
|
|
1384
1236
|
s && this.checkExpressionErrors(t, !0);
|
|
1385
|
-
return r > -1 && (t.parenthesizedAssign = r), n > -1 && (t.trailingComma = n),
|
|
1237
|
+
return r > -1 && (t.parenthesizedAssign = r), n > -1 && (t.trailingComma = n), l;
|
|
1386
1238
|
};
|
|
1387
|
-
|
|
1239
|
+
f.parseMaybeConditional = function(e, t) {
|
|
1388
1240
|
var i = this.start, s = this.startLoc, r = this.parseExprOps(e, t);
|
|
1389
1241
|
if (this.checkExpressionErrors(t))
|
|
1390
1242
|
return r;
|
|
@@ -1394,108 +1246,108 @@ d.parseMaybeConditional = function(e, t) {
|
|
|
1394
1246
|
}
|
|
1395
1247
|
return r;
|
|
1396
1248
|
};
|
|
1397
|
-
|
|
1249
|
+
f.parseExprOps = function(e, t) {
|
|
1398
1250
|
var i = this.start, s = this.startLoc, r = this.parseMaybeUnary(t, !1, !1, e);
|
|
1399
1251
|
return this.checkExpressionErrors(t) || r.start === i && r.type === "ArrowFunctionExpression" ? r : this.parseExprOp(r, i, s, -1, e);
|
|
1400
1252
|
};
|
|
1401
|
-
|
|
1253
|
+
f.parseExprOp = function(e, t, i, s, r) {
|
|
1402
1254
|
var n = this.type.binop;
|
|
1403
1255
|
if (n != null && (!r || this.type !== a._in) && n > s) {
|
|
1404
|
-
var
|
|
1405
|
-
|
|
1406
|
-
var
|
|
1256
|
+
var u = this.type === a.logicalOR || this.type === a.logicalAND, o = this.type === a.coalesce;
|
|
1257
|
+
o && (n = a.logicalAND.binop);
|
|
1258
|
+
var h = this.value;
|
|
1407
1259
|
this.next();
|
|
1408
|
-
var
|
|
1409
|
-
return (
|
|
1260
|
+
var l = this.start, d = this.startLoc, g = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, r), l, d, n, r), _ = this.buildBinary(t, i, e, g, h, u || o);
|
|
1261
|
+
return (u && this.type === a.coalesce || o && (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(_, t, i, s, r);
|
|
1410
1262
|
}
|
|
1411
1263
|
return e;
|
|
1412
1264
|
};
|
|
1413
|
-
|
|
1265
|
+
f.buildBinary = function(e, t, i, s, r, n) {
|
|
1414
1266
|
s.type === "PrivateIdentifier" && this.raise(s.start, "Private identifier can only be left side of binary expression");
|
|
1415
|
-
var
|
|
1416
|
-
return
|
|
1267
|
+
var u = this.startNodeAt(e, t);
|
|
1268
|
+
return u.left = i, u.operator = r, u.right = s, this.finishNode(u, n ? "LogicalExpression" : "BinaryExpression");
|
|
1417
1269
|
};
|
|
1418
|
-
|
|
1419
|
-
var r = this.start, n = this.startLoc,
|
|
1270
|
+
f.parseMaybeUnary = function(e, t, i, s) {
|
|
1271
|
+
var r = this.start, n = this.startLoc, u;
|
|
1420
1272
|
if (this.isContextual("await") && this.canAwait)
|
|
1421
|
-
|
|
1273
|
+
u = this.parseAwait(s), t = !0;
|
|
1422
1274
|
else if (this.type.prefix) {
|
|
1423
|
-
var
|
|
1424
|
-
|
|
1275
|
+
var o = this.startNode(), h = this.type === a.incDec;
|
|
1276
|
+
o.operator = this.value, o.prefix = !0, this.next(), o.argument = this.parseMaybeUnary(null, !0, h, s), this.checkExpressionErrors(e, !0), h ? this.checkLValSimple(o.argument) : this.strict && o.operator === "delete" && Ge(o.argument) ? this.raiseRecoverable(o.start, "Deleting local variable in strict mode") : o.operator === "delete" && ve(o.argument) ? this.raiseRecoverable(o.start, "Private fields can not be deleted") : t = !0, u = this.finishNode(o, h ? "UpdateExpression" : "UnaryExpression");
|
|
1425
1277
|
} else if (!t && this.type === a.privateId)
|
|
1426
|
-
(s || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(),
|
|
1278
|
+
(s || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), u = this.parsePrivateIdent(), this.type !== a._in && this.unexpected();
|
|
1427
1279
|
else {
|
|
1428
|
-
if (
|
|
1429
|
-
return
|
|
1280
|
+
if (u = this.parseExprSubscripts(e, s), this.checkExpressionErrors(e))
|
|
1281
|
+
return u;
|
|
1430
1282
|
for (; this.type.postfix && !this.canInsertSemicolon(); ) {
|
|
1431
|
-
var
|
|
1432
|
-
|
|
1283
|
+
var l = this.startNodeAt(r, n);
|
|
1284
|
+
l.operator = this.value, l.prefix = !1, l.argument = u, this.checkLValSimple(u), this.next(), u = this.finishNode(l, "UpdateExpression");
|
|
1433
1285
|
}
|
|
1434
1286
|
}
|
|
1435
1287
|
if (!i && this.eat(a.starstar))
|
|
1436
1288
|
if (t)
|
|
1437
1289
|
this.unexpected(this.lastTokStart);
|
|
1438
1290
|
else
|
|
1439
|
-
return this.buildBinary(r, n,
|
|
1291
|
+
return this.buildBinary(r, n, u, this.parseMaybeUnary(null, !1, !1, s), "**", !1);
|
|
1440
1292
|
else
|
|
1441
|
-
return
|
|
1293
|
+
return u;
|
|
1442
1294
|
};
|
|
1443
|
-
function
|
|
1444
|
-
return e.type === "Identifier" || e.type === "ParenthesizedExpression" &&
|
|
1295
|
+
function Ge(e) {
|
|
1296
|
+
return e.type === "Identifier" || e.type === "ParenthesizedExpression" && Ge(e.expression);
|
|
1445
1297
|
}
|
|
1446
|
-
function
|
|
1447
|
-
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" &&
|
|
1298
|
+
function ve(e) {
|
|
1299
|
+
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" && ve(e.expression) || e.type === "ParenthesizedExpression" && ve(e.expression);
|
|
1448
1300
|
}
|
|
1449
|
-
|
|
1301
|
+
f.parseExprSubscripts = function(e, t) {
|
|
1450
1302
|
var i = this.start, s = this.startLoc, r = this.parseExprAtom(e, t);
|
|
1451
1303
|
if (r.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")")
|
|
1452
1304
|
return r;
|
|
1453
1305
|
var n = this.parseSubscripts(r, i, s, !1, t);
|
|
1454
1306
|
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;
|
|
1455
1307
|
};
|
|
1456
|
-
|
|
1457
|
-
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,
|
|
1458
|
-
var
|
|
1459
|
-
if (
|
|
1460
|
-
if (
|
|
1461
|
-
var
|
|
1462
|
-
|
|
1308
|
+
f.parseSubscripts = function(e, t, i, s, r) {
|
|
1309
|
+
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, u = !1; ; ) {
|
|
1310
|
+
var o = this.parseSubscript(e, t, i, s, n, u, r);
|
|
1311
|
+
if (o.optional && (u = !0), o === e || o.type === "ArrowFunctionExpression") {
|
|
1312
|
+
if (u) {
|
|
1313
|
+
var h = this.startNodeAt(t, i);
|
|
1314
|
+
h.expression = o, o = this.finishNode(h, "ChainExpression");
|
|
1463
1315
|
}
|
|
1464
|
-
return
|
|
1316
|
+
return o;
|
|
1465
1317
|
}
|
|
1466
|
-
e =
|
|
1318
|
+
e = o;
|
|
1467
1319
|
}
|
|
1468
1320
|
};
|
|
1469
|
-
|
|
1321
|
+
f.shouldParseAsyncArrow = function() {
|
|
1470
1322
|
return !this.canInsertSemicolon() && this.eat(a.arrow);
|
|
1471
1323
|
};
|
|
1472
|
-
|
|
1324
|
+
f.parseSubscriptAsyncArrow = function(e, t, i, s) {
|
|
1473
1325
|
return this.parseArrowExpression(this.startNodeAt(e, t), i, !0, s);
|
|
1474
1326
|
};
|
|
1475
|
-
|
|
1476
|
-
var
|
|
1477
|
-
s &&
|
|
1478
|
-
var
|
|
1479
|
-
if (
|
|
1480
|
-
var
|
|
1481
|
-
|
|
1327
|
+
f.parseSubscript = function(e, t, i, s, r, n, u) {
|
|
1328
|
+
var o = this.options.ecmaVersion >= 11, h = o && this.eat(a.questionDot);
|
|
1329
|
+
s && h && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
1330
|
+
var l = this.eat(a.bracketL);
|
|
1331
|
+
if (l || h && this.type !== a.parenL && this.type !== a.backQuote || this.eat(a.dot)) {
|
|
1332
|
+
var d = this.startNodeAt(t, i);
|
|
1333
|
+
d.object = e, l ? (d.property = this.parseExpression(), this.expect(a.bracketR)) : this.type === a.privateId && e.type !== "Super" ? d.property = this.parsePrivateIdent() : d.property = this.parseIdent(this.options.allowReserved !== "never"), d.computed = !!l, o && (d.optional = h), e = this.finishNode(d, "MemberExpression");
|
|
1482
1334
|
} else if (!s && this.eat(a.parenL)) {
|
|
1483
|
-
var
|
|
1335
|
+
var g = new oe(), _ = this.yieldPos, Q = this.awaitPos, q = this.awaitIdentPos;
|
|
1484
1336
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
1485
|
-
var
|
|
1486
|
-
if (r && !
|
|
1487
|
-
return this.checkPatternErrors(
|
|
1488
|
-
this.checkExpressionErrors(
|
|
1489
|
-
var
|
|
1490
|
-
|
|
1337
|
+
var ee = this.parseExprList(a.parenR, this.options.ecmaVersion >= 8, !1, g);
|
|
1338
|
+
if (r && !h && this.shouldParseAsyncArrow())
|
|
1339
|
+
return this.checkPatternErrors(g, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = _, this.awaitPos = Q, this.awaitIdentPos = q, this.parseSubscriptAsyncArrow(t, i, ee, u);
|
|
1340
|
+
this.checkExpressionErrors(g, !0), this.yieldPos = _ || this.yieldPos, this.awaitPos = Q || this.awaitPos, this.awaitIdentPos = q || this.awaitIdentPos;
|
|
1341
|
+
var j = this.startNodeAt(t, i);
|
|
1342
|
+
j.callee = e, j.arguments = ee, o && (j.optional = h), e = this.finishNode(j, "CallExpression");
|
|
1491
1343
|
} else if (this.type === a.backQuote) {
|
|
1492
|
-
(
|
|
1493
|
-
var
|
|
1494
|
-
|
|
1344
|
+
(h || n) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
1345
|
+
var G = this.startNodeAt(t, i);
|
|
1346
|
+
G.tag = e, G.quasi = this.parseTemplate({ isTagged: !0 }), e = this.finishNode(G, "TaggedTemplateExpression");
|
|
1495
1347
|
}
|
|
1496
1348
|
return e;
|
|
1497
1349
|
};
|
|
1498
|
-
|
|
1350
|
+
f.parseExprAtom = function(e, t, i) {
|
|
1499
1351
|
this.type === a.slash && this.readRegexp();
|
|
1500
1352
|
var s, r = this.potentialArrowAt === this.start;
|
|
1501
1353
|
switch (this.type) {
|
|
@@ -1504,19 +1356,19 @@ d.parseExprAtom = function(e, t, i) {
|
|
|
1504
1356
|
case a._this:
|
|
1505
1357
|
return s = this.startNode(), this.next(), this.finishNode(s, "ThisExpression");
|
|
1506
1358
|
case a.name:
|
|
1507
|
-
var n = this.start,
|
|
1508
|
-
if (this.options.ecmaVersion >= 8 && !
|
|
1509
|
-
return this.overrideContext(
|
|
1359
|
+
var n = this.start, u = this.startLoc, o = this.containsEsc, h = this.parseIdent(!1);
|
|
1360
|
+
if (this.options.ecmaVersion >= 8 && !o && h.name === "async" && !this.canInsertSemicolon() && this.eat(a._function))
|
|
1361
|
+
return this.overrideContext(b.f_expr), this.parseFunction(this.startNodeAt(n, u), 0, !1, !0, t);
|
|
1510
1362
|
if (r && !this.canInsertSemicolon()) {
|
|
1511
1363
|
if (this.eat(a.arrow))
|
|
1512
|
-
return this.parseArrowExpression(this.startNodeAt(n,
|
|
1513
|
-
if (this.options.ecmaVersion >= 8 &&
|
|
1514
|
-
return
|
|
1364
|
+
return this.parseArrowExpression(this.startNodeAt(n, u), [h], !1, t);
|
|
1365
|
+
if (this.options.ecmaVersion >= 8 && h.name === "async" && this.type === a.name && !o && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc))
|
|
1366
|
+
return h = this.parseIdent(!1), (this.canInsertSemicolon() || !this.eat(a.arrow)) && this.unexpected(), this.parseArrowExpression(this.startNodeAt(n, u), [h], !0, t);
|
|
1515
1367
|
}
|
|
1516
|
-
return
|
|
1368
|
+
return h;
|
|
1517
1369
|
case a.regexp:
|
|
1518
|
-
var
|
|
1519
|
-
return s = this.parseLiteral(
|
|
1370
|
+
var l = this.value;
|
|
1371
|
+
return s = this.parseLiteral(l.value), s.regex = { pattern: l.pattern, flags: l.flags }, s;
|
|
1520
1372
|
case a.num:
|
|
1521
1373
|
case a.string:
|
|
1522
1374
|
return this.parseLiteral(this.value);
|
|
@@ -1525,12 +1377,12 @@ d.parseExprAtom = function(e, t, i) {
|
|
|
1525
1377
|
case a._false:
|
|
1526
1378
|
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");
|
|
1527
1379
|
case a.parenL:
|
|
1528
|
-
var
|
|
1529
|
-
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(
|
|
1380
|
+
var d = this.start, g = this.parseParenAndDistinguishExpression(r, t);
|
|
1381
|
+
return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(g) && (e.parenthesizedAssign = d), e.parenthesizedBind < 0 && (e.parenthesizedBind = d)), g;
|
|
1530
1382
|
case a.bracketL:
|
|
1531
1383
|
return s = this.startNode(), this.next(), s.elements = this.parseExprList(a.bracketR, !0, !0, e), this.finishNode(s, "ArrayExpression");
|
|
1532
1384
|
case a.braceL:
|
|
1533
|
-
return this.overrideContext(
|
|
1385
|
+
return this.overrideContext(b.b_expr), this.parseObj(!1, e);
|
|
1534
1386
|
case a._function:
|
|
1535
1387
|
return s = this.startNode(), this.next(), this.parseFunction(s, 0);
|
|
1536
1388
|
case a._class:
|
|
@@ -1545,10 +1397,10 @@ d.parseExprAtom = function(e, t, i) {
|
|
|
1545
1397
|
return this.parseExprAtomDefault();
|
|
1546
1398
|
}
|
|
1547
1399
|
};
|
|
1548
|
-
|
|
1400
|
+
f.parseExprAtomDefault = function() {
|
|
1549
1401
|
this.unexpected();
|
|
1550
1402
|
};
|
|
1551
|
-
|
|
1403
|
+
f.parseExprImport = function(e) {
|
|
1552
1404
|
var t = this.startNode();
|
|
1553
1405
|
if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type === a.parenL && !e)
|
|
1554
1406
|
return this.parseDynamicImport(t);
|
|
@@ -1558,7 +1410,7 @@ d.parseExprImport = function(e) {
|
|
|
1558
1410
|
} else
|
|
1559
1411
|
this.unexpected();
|
|
1560
1412
|
};
|
|
1561
|
-
|
|
1413
|
+
f.parseDynamicImport = function(e) {
|
|
1562
1414
|
if (this.next(), e.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16)
|
|
1563
1415
|
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())));
|
|
1564
1416
|
else if (!this.eat(a.parenR)) {
|
|
@@ -1567,60 +1419,60 @@ d.parseDynamicImport = function(e) {
|
|
|
1567
1419
|
}
|
|
1568
1420
|
return this.finishNode(e, "ImportExpression");
|
|
1569
1421
|
};
|
|
1570
|
-
|
|
1422
|
+
f.parseImportMeta = function(e) {
|
|
1571
1423
|
this.next();
|
|
1572
1424
|
var t = this.containsEsc;
|
|
1573
1425
|
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");
|
|
1574
1426
|
};
|
|
1575
|
-
|
|
1427
|
+
f.parseLiteral = function(e) {
|
|
1576
1428
|
var t = this.startNode();
|
|
1577
1429
|
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");
|
|
1578
1430
|
};
|
|
1579
|
-
|
|
1431
|
+
f.parseParenExpression = function() {
|
|
1580
1432
|
this.expect(a.parenL);
|
|
1581
1433
|
var e = this.parseExpression();
|
|
1582
1434
|
return this.expect(a.parenR), e;
|
|
1583
1435
|
};
|
|
1584
|
-
|
|
1436
|
+
f.shouldParseArrow = function(e) {
|
|
1585
1437
|
return !this.canInsertSemicolon();
|
|
1586
1438
|
};
|
|
1587
|
-
|
|
1439
|
+
f.parseParenAndDistinguishExpression = function(e, t) {
|
|
1588
1440
|
var i = this.start, s = this.startLoc, r, n = this.options.ecmaVersion >= 8;
|
|
1589
1441
|
if (this.options.ecmaVersion >= 6) {
|
|
1590
1442
|
this.next();
|
|
1591
|
-
var
|
|
1443
|
+
var u = this.start, o = this.startLoc, h = [], l = !0, d = !1, g = new oe(), _ = this.yieldPos, Q = this.awaitPos, q;
|
|
1592
1444
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== a.parenR; )
|
|
1593
|
-
if (
|
|
1594
|
-
|
|
1445
|
+
if (l ? l = !1 : this.expect(a.comma), n && this.afterTrailingComma(a.parenR, !0)) {
|
|
1446
|
+
d = !0;
|
|
1595
1447
|
break;
|
|
1596
1448
|
} else if (this.type === a.ellipsis) {
|
|
1597
|
-
|
|
1449
|
+
q = this.start, h.push(this.parseParenItem(this.parseRestBinding())), this.type === a.comma && this.raiseRecoverable(
|
|
1598
1450
|
this.start,
|
|
1599
1451
|
"Comma is not permitted after the rest element"
|
|
1600
1452
|
);
|
|
1601
1453
|
break;
|
|
1602
1454
|
} else
|
|
1603
|
-
|
|
1604
|
-
var
|
|
1605
|
-
if (this.expect(a.parenR), e && this.shouldParseArrow(
|
|
1606
|
-
return this.checkPatternErrors(
|
|
1607
|
-
(!
|
|
1455
|
+
h.push(this.parseMaybeAssign(!1, g, this.parseParenItem));
|
|
1456
|
+
var ee = this.lastTokEnd, j = this.lastTokEndLoc;
|
|
1457
|
+
if (this.expect(a.parenR), e && this.shouldParseArrow(h) && this.eat(a.arrow))
|
|
1458
|
+
return this.checkPatternErrors(g, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = _, this.awaitPos = Q, this.parseParenArrowList(i, s, h, t);
|
|
1459
|
+
(!h.length || d) && this.unexpected(this.lastTokStart), q && this.unexpected(q), this.checkExpressionErrors(g, !0), this.yieldPos = _ || this.yieldPos, this.awaitPos = Q || this.awaitPos, h.length > 1 ? (r = this.startNodeAt(u, o), r.expressions = h, this.finishNodeAt(r, "SequenceExpression", ee, j)) : r = h[0];
|
|
1608
1460
|
} else
|
|
1609
1461
|
r = this.parseParenExpression();
|
|
1610
1462
|
if (this.options.preserveParens) {
|
|
1611
|
-
var
|
|
1612
|
-
return
|
|
1463
|
+
var G = this.startNodeAt(i, s);
|
|
1464
|
+
return G.expression = r, this.finishNode(G, "ParenthesizedExpression");
|
|
1613
1465
|
} else
|
|
1614
1466
|
return r;
|
|
1615
1467
|
};
|
|
1616
|
-
|
|
1468
|
+
f.parseParenItem = function(e) {
|
|
1617
1469
|
return e;
|
|
1618
1470
|
};
|
|
1619
|
-
|
|
1471
|
+
f.parseParenArrowList = function(e, t, i, s) {
|
|
1620
1472
|
return this.parseArrowExpression(this.startNodeAt(e, t), i, !1, s);
|
|
1621
1473
|
};
|
|
1622
|
-
var
|
|
1623
|
-
|
|
1474
|
+
var Et = [];
|
|
1475
|
+
f.parseNew = function() {
|
|
1624
1476
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
1625
1477
|
var e = this.startNode();
|
|
1626
1478
|
if (this.next(), this.options.ecmaVersion >= 6 && this.type === a.dot) {
|
|
@@ -1630,9 +1482,9 @@ d.parseNew = function() {
|
|
|
1630
1482
|
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");
|
|
1631
1483
|
}
|
|
1632
1484
|
var s = this.start, r = this.startLoc;
|
|
1633
|
-
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 =
|
|
1485
|
+
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 = Et, this.finishNode(e, "NewExpression");
|
|
1634
1486
|
};
|
|
1635
|
-
|
|
1487
|
+
f.parseTemplateElement = function(e) {
|
|
1636
1488
|
var t = e.isTagged, i = this.startNode();
|
|
1637
1489
|
return this.type === a.invalidTemplate ? (t || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), i.value = {
|
|
1638
1490
|
raw: this.value.replace(/\r\n?/g, `
|
|
@@ -1644,7 +1496,7 @@ d.parseTemplateElement = function(e) {
|
|
|
1644
1496
|
cooked: this.value
|
|
1645
1497
|
}, this.next(), i.tail = this.type === a.backQuote, this.finishNode(i, "TemplateElement");
|
|
1646
1498
|
};
|
|
1647
|
-
|
|
1499
|
+
f.parseTemplate = function(e) {
|
|
1648
1500
|
e === void 0 && (e = {});
|
|
1649
1501
|
var t = e.isTagged;
|
|
1650
1502
|
t === void 0 && (t = !1);
|
|
@@ -1655,10 +1507,10 @@ d.parseTemplate = function(e) {
|
|
|
1655
1507
|
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 }));
|
|
1656
1508
|
return this.next(), this.finishNode(i, "TemplateLiteral");
|
|
1657
1509
|
};
|
|
1658
|
-
|
|
1659
|
-
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) && !
|
|
1510
|
+
f.isAsyncProp = function(e) {
|
|
1511
|
+
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) && !w.test(this.input.slice(this.lastTokEnd, this.start));
|
|
1660
1512
|
};
|
|
1661
|
-
|
|
1513
|
+
f.parseObj = function(e, t) {
|
|
1662
1514
|
var i = this.startNode(), s = !0, r = {};
|
|
1663
1515
|
for (i.properties = [], this.next(); !this.eat(a.braceR); ) {
|
|
1664
1516
|
if (s)
|
|
@@ -1670,15 +1522,15 @@ d.parseObj = function(e, t) {
|
|
|
1670
1522
|
}
|
|
1671
1523
|
return this.finishNode(i, e ? "ObjectPattern" : "ObjectExpression");
|
|
1672
1524
|
};
|
|
1673
|
-
|
|
1674
|
-
var i = this.startNode(), s, r, n,
|
|
1525
|
+
f.parseProperty = function(e, t) {
|
|
1526
|
+
var i = this.startNode(), s, r, n, u;
|
|
1675
1527
|
if (this.options.ecmaVersion >= 9 && this.eat(a.ellipsis))
|
|
1676
1528
|
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"));
|
|
1677
|
-
this.options.ecmaVersion >= 6 && (i.method = !1, i.shorthand = !1, (e || t) && (n = this.start,
|
|
1678
|
-
var
|
|
1679
|
-
return this.parsePropertyName(i), !e && !
|
|
1529
|
+
this.options.ecmaVersion >= 6 && (i.method = !1, i.shorthand = !1, (e || t) && (n = this.start, u = this.startLoc), e || (s = this.eat(a.star)));
|
|
1530
|
+
var o = this.containsEsc;
|
|
1531
|
+
return this.parsePropertyName(i), !e && !o && 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, u, t, o), this.finishNode(i, "Property");
|
|
1680
1532
|
};
|
|
1681
|
-
|
|
1533
|
+
f.parseGetterSetter = function(e) {
|
|
1682
1534
|
var t = e.key.name;
|
|
1683
1535
|
this.parsePropertyName(e), e.value = this.parseMethod(!1), e.kind = t;
|
|
1684
1536
|
var i = e.kind === "get" ? 0 : 1;
|
|
@@ -1688,10 +1540,10 @@ d.parseGetterSetter = function(e) {
|
|
|
1688
1540
|
} else
|
|
1689
1541
|
e.kind === "set" && e.value.params[0].type === "RestElement" && this.raiseRecoverable(e.value.params[0].start, "Setter cannot use rest params");
|
|
1690
1542
|
};
|
|
1691
|
-
|
|
1692
|
-
(i || s) && this.type === a.colon && this.unexpected(), this.eat(a.colon) ? (e.value = t ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1,
|
|
1543
|
+
f.parsePropertyValue = function(e, t, i, s, r, n, u, o) {
|
|
1544
|
+
(i || s) && this.type === a.colon && this.unexpected(), this.eat(a.colon) ? (e.value = t ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1, u), 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 && !o && 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 && u ? (u.shorthandAssign < 0 && (u.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();
|
|
1693
1545
|
};
|
|
1694
|
-
|
|
1546
|
+
f.parsePropertyName = function(e) {
|
|
1695
1547
|
if (this.options.ecmaVersion >= 6) {
|
|
1696
1548
|
if (this.eat(a.bracketL))
|
|
1697
1549
|
return e.computed = !0, e.key = this.parseMaybeAssign(), this.expect(a.bracketR), e.key;
|
|
@@ -1699,30 +1551,30 @@ d.parsePropertyName = function(e) {
|
|
|
1699
1551
|
}
|
|
1700
1552
|
return e.key = this.type === a.num || this.type === a.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
|
|
1701
1553
|
};
|
|
1702
|
-
|
|
1554
|
+
f.initFunction = function(e) {
|
|
1703
1555
|
e.id = null, this.options.ecmaVersion >= 6 && (e.generator = e.expression = !1), this.options.ecmaVersion >= 8 && (e.async = !1);
|
|
1704
1556
|
};
|
|
1705
|
-
|
|
1706
|
-
var s = this.startNode(), r = this.yieldPos, n = this.awaitPos,
|
|
1707
|
-
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(
|
|
1557
|
+
f.parseMethod = function(e, t, i) {
|
|
1558
|
+
var s = this.startNode(), r = this.yieldPos, n = this.awaitPos, u = this.awaitIdentPos;
|
|
1559
|
+
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(_e(t, s.generator) | ne | (i ? Fe : 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 = u, this.finishNode(s, "FunctionExpression");
|
|
1708
1560
|
};
|
|
1709
|
-
|
|
1710
|
-
var r = this.yieldPos, n = this.awaitPos,
|
|
1711
|
-
return this.enterScope(
|
|
1561
|
+
f.parseArrowExpression = function(e, t, i, s) {
|
|
1562
|
+
var r = this.yieldPos, n = this.awaitPos, u = this.awaitIdentPos;
|
|
1563
|
+
return this.enterScope(_e(i, !1) | ye), 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 = u, this.finishNode(e, "ArrowFunctionExpression");
|
|
1712
1564
|
};
|
|
1713
|
-
|
|
1714
|
-
var r = t && this.type !== a.braceL, n = this.strict,
|
|
1565
|
+
f.parseFunctionBody = function(e, t, i, s) {
|
|
1566
|
+
var r = t && this.type !== a.braceL, n = this.strict, u = !1;
|
|
1715
1567
|
if (r)
|
|
1716
1568
|
e.body = this.parseMaybeAssign(s), e.expression = !0, this.checkParams(e, !1);
|
|
1717
1569
|
else {
|
|
1718
|
-
var
|
|
1719
|
-
(!n ||
|
|
1720
|
-
var
|
|
1721
|
-
this.labels = [],
|
|
1570
|
+
var o = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e.params);
|
|
1571
|
+
(!n || o) && (u = this.strictDirective(this.end), u && o && this.raiseRecoverable(e.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
|
|
1572
|
+
var h = this.labels;
|
|
1573
|
+
this.labels = [], u && (this.strict = !0), this.checkParams(e, !n && !u && !t && !i && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id, qe), e.body = this.parseBlock(!1, void 0, u && !n), e.expression = !1, this.adaptDirectivePrologue(e.body.body), this.labels = h;
|
|
1722
1574
|
}
|
|
1723
1575
|
this.exitScope();
|
|
1724
1576
|
};
|
|
1725
|
-
|
|
1577
|
+
f.isSimpleParamList = function(e) {
|
|
1726
1578
|
for (var t = 0, i = e; t < i.length; t += 1) {
|
|
1727
1579
|
var s = i[t];
|
|
1728
1580
|
if (s.type !== "Identifier")
|
|
@@ -1730,204 +1582,204 @@ d.isSimpleParamList = function(e) {
|
|
|
1730
1582
|
}
|
|
1731
1583
|
return !0;
|
|
1732
1584
|
};
|
|
1733
|
-
|
|
1585
|
+
f.checkParams = function(e, t) {
|
|
1734
1586
|
for (var i = /* @__PURE__ */ Object.create(null), s = 0, r = e.params; s < r.length; s += 1) {
|
|
1735
1587
|
var n = r[s];
|
|
1736
|
-
this.checkLValInnerPattern(n,
|
|
1588
|
+
this.checkLValInnerPattern(n, Ce, t ? null : i);
|
|
1737
1589
|
}
|
|
1738
1590
|
};
|
|
1739
|
-
|
|
1591
|
+
f.parseExprList = function(e, t, i, s) {
|
|
1740
1592
|
for (var r = [], n = !0; !this.eat(e); ) {
|
|
1741
1593
|
if (n)
|
|
1742
1594
|
n = !1;
|
|
1743
1595
|
else if (this.expect(a.comma), t && this.afterTrailingComma(e))
|
|
1744
1596
|
break;
|
|
1745
|
-
var
|
|
1746
|
-
i && this.type === a.comma ?
|
|
1597
|
+
var u = void 0;
|
|
1598
|
+
i && this.type === a.comma ? u = null : this.type === a.ellipsis ? (u = this.parseSpread(s), s && this.type === a.comma && s.trailingComma < 0 && (s.trailingComma = this.start)) : u = this.parseMaybeAssign(!1, s), r.push(u);
|
|
1747
1599
|
}
|
|
1748
1600
|
return r;
|
|
1749
1601
|
};
|
|
1750
|
-
|
|
1602
|
+
f.checkUnreserved = function(e) {
|
|
1751
1603
|
var t = e.start, i = e.end, s = e.name;
|
|
1752
|
-
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 &
|
|
1604
|
+
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 & ue) && 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)) {
|
|
1753
1605
|
var r = this.strict ? this.reservedWordsStrict : this.reservedWords;
|
|
1754
1606
|
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"));
|
|
1755
1607
|
}
|
|
1756
1608
|
};
|
|
1757
|
-
|
|
1609
|
+
f.parseIdent = function(e) {
|
|
1758
1610
|
var t = this.parseIdentNode();
|
|
1759
1611
|
return this.next(!!e), this.finishNode(t, "Identifier"), e || (this.checkUnreserved(t), t.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = t.start)), t;
|
|
1760
1612
|
};
|
|
1761
|
-
|
|
1613
|
+
f.parseIdentNode = function() {
|
|
1762
1614
|
var e = this.startNode();
|
|
1763
1615
|
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;
|
|
1764
1616
|
};
|
|
1765
|
-
|
|
1617
|
+
f.parsePrivateIdent = function() {
|
|
1766
1618
|
var e = this.startNode();
|
|
1767
1619
|
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;
|
|
1768
1620
|
};
|
|
1769
|
-
|
|
1621
|
+
f.parseYield = function(e) {
|
|
1770
1622
|
this.yieldPos || (this.yieldPos = this.start);
|
|
1771
1623
|
var t = this.startNode();
|
|
1772
1624
|
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");
|
|
1773
1625
|
};
|
|
1774
|
-
|
|
1626
|
+
f.parseAwait = function(e) {
|
|
1775
1627
|
this.awaitPos || (this.awaitPos = this.start);
|
|
1776
1628
|
var t = this.startNode();
|
|
1777
1629
|
return this.next(), t.argument = this.parseMaybeUnary(null, !0, !1, e), this.finishNode(t, "AwaitExpression");
|
|
1778
1630
|
};
|
|
1779
|
-
var
|
|
1780
|
-
|
|
1781
|
-
var i =
|
|
1631
|
+
var se = y.prototype;
|
|
1632
|
+
se.raise = function(e, t) {
|
|
1633
|
+
var i = Oe(this.input, e);
|
|
1782
1634
|
t += " (" + i.line + ":" + i.column + ")", this.sourceFile && (t += " in " + this.sourceFile);
|
|
1783
1635
|
var s = new SyntaxError(t);
|
|
1784
1636
|
throw s.pos = e, s.loc = i, s.raisedAt = this.pos, s;
|
|
1785
1637
|
};
|
|
1786
|
-
|
|
1787
|
-
|
|
1638
|
+
se.raiseRecoverable = se.raise;
|
|
1639
|
+
se.curPosition = function() {
|
|
1788
1640
|
if (this.options.locations)
|
|
1789
|
-
return new
|
|
1641
|
+
return new X(this.curLine, this.pos - this.lineStart);
|
|
1790
1642
|
};
|
|
1791
|
-
var
|
|
1643
|
+
var M = y.prototype, It = function(t) {
|
|
1792
1644
|
this.flags = t, this.var = [], this.lexical = [], this.functions = [];
|
|
1793
1645
|
};
|
|
1794
|
-
|
|
1795
|
-
this.scopeStack.push(new
|
|
1646
|
+
M.enterScope = function(e) {
|
|
1647
|
+
this.scopeStack.push(new It(e));
|
|
1796
1648
|
};
|
|
1797
|
-
|
|
1649
|
+
M.exitScope = function() {
|
|
1798
1650
|
this.scopeStack.pop();
|
|
1799
1651
|
};
|
|
1800
|
-
|
|
1801
|
-
return e.flags &
|
|
1652
|
+
M.treatFunctionsAsVarInScope = function(e) {
|
|
1653
|
+
return e.flags & z || !this.inModule && e.flags & Z;
|
|
1802
1654
|
};
|
|
1803
|
-
|
|
1655
|
+
M.declareName = function(e, t, i) {
|
|
1804
1656
|
var s = !1;
|
|
1805
|
-
if (t ===
|
|
1657
|
+
if (t === B) {
|
|
1806
1658
|
var r = this.currentScope();
|
|
1807
|
-
s = r.lexical.indexOf(e) > -1 || r.functions.indexOf(e) > -1 || r.var.indexOf(e) > -1, r.lexical.push(e), this.inModule && r.flags &
|
|
1808
|
-
} else if (t ===
|
|
1659
|
+
s = r.lexical.indexOf(e) > -1 || r.functions.indexOf(e) > -1 || r.var.indexOf(e) > -1, r.lexical.push(e), this.inModule && r.flags & Z && delete this.undefinedExports[e];
|
|
1660
|
+
} else if (t === Ue) {
|
|
1809
1661
|
var n = this.currentScope();
|
|
1810
1662
|
n.lexical.push(e);
|
|
1811
|
-
} else if (t ===
|
|
1812
|
-
var
|
|
1813
|
-
this.treatFunctionsAsVar ? s =
|
|
1663
|
+
} else if (t === Me) {
|
|
1664
|
+
var u = this.currentScope();
|
|
1665
|
+
this.treatFunctionsAsVar ? s = u.lexical.indexOf(e) > -1 : s = u.lexical.indexOf(e) > -1 || u.var.indexOf(e) > -1, u.functions.push(e);
|
|
1814
1666
|
} else
|
|
1815
|
-
for (var
|
|
1816
|
-
var
|
|
1817
|
-
if (
|
|
1667
|
+
for (var o = this.scopeStack.length - 1; o >= 0; --o) {
|
|
1668
|
+
var h = this.scopeStack[o];
|
|
1669
|
+
if (h.lexical.indexOf(e) > -1 && !(h.flags & De && h.lexical[0] === e) || !this.treatFunctionsAsVarInScope(h) && h.functions.indexOf(e) > -1) {
|
|
1818
1670
|
s = !0;
|
|
1819
1671
|
break;
|
|
1820
1672
|
}
|
|
1821
|
-
if (
|
|
1673
|
+
if (h.var.push(e), this.inModule && h.flags & Z && delete this.undefinedExports[e], h.flags & ue)
|
|
1822
1674
|
break;
|
|
1823
1675
|
}
|
|
1824
1676
|
s && this.raiseRecoverable(i, "Identifier '" + e + "' has already been declared");
|
|
1825
1677
|
};
|
|
1826
|
-
|
|
1678
|
+
M.checkLocalExport = function(e) {
|
|
1827
1679
|
this.scopeStack[0].lexical.indexOf(e.name) === -1 && this.scopeStack[0].var.indexOf(e.name) === -1 && (this.undefinedExports[e.name] = e);
|
|
1828
1680
|
};
|
|
1829
|
-
|
|
1681
|
+
M.currentScope = function() {
|
|
1830
1682
|
return this.scopeStack[this.scopeStack.length - 1];
|
|
1831
1683
|
};
|
|
1832
|
-
|
|
1684
|
+
M.currentVarScope = function() {
|
|
1833
1685
|
for (var e = this.scopeStack.length - 1; ; e--) {
|
|
1834
1686
|
var t = this.scopeStack[e];
|
|
1835
|
-
if (t.flags & (
|
|
1687
|
+
if (t.flags & (ue | J | U))
|
|
1836
1688
|
return t;
|
|
1837
1689
|
}
|
|
1838
1690
|
};
|
|
1839
|
-
|
|
1691
|
+
M.currentThisScope = function() {
|
|
1840
1692
|
for (var e = this.scopeStack.length - 1; ; e--) {
|
|
1841
1693
|
var t = this.scopeStack[e];
|
|
1842
|
-
if (t.flags & (
|
|
1694
|
+
if (t.flags & (ue | J | U) && !(t.flags & ye))
|
|
1843
1695
|
return t;
|
|
1844
1696
|
}
|
|
1845
1697
|
};
|
|
1846
|
-
var
|
|
1847
|
-
this.type = "", this.start = i, this.end = 0, t.options.locations && (this.loc = new
|
|
1848
|
-
},
|
|
1849
|
-
|
|
1850
|
-
return new
|
|
1698
|
+
var he = function(t, i, s) {
|
|
1699
|
+
this.type = "", this.start = i, this.end = 0, t.options.locations && (this.loc = new re(t, s)), t.options.directSourceFile && (this.sourceFile = t.options.directSourceFile), t.options.ranges && (this.range = [i, 0]);
|
|
1700
|
+
}, $ = y.prototype;
|
|
1701
|
+
$.startNode = function() {
|
|
1702
|
+
return new he(this, this.start, this.startLoc);
|
|
1851
1703
|
};
|
|
1852
|
-
|
|
1853
|
-
return new
|
|
1704
|
+
$.startNodeAt = function(e, t) {
|
|
1705
|
+
return new he(this, e, t);
|
|
1854
1706
|
};
|
|
1855
|
-
function
|
|
1707
|
+
function He(e, t, i, s) {
|
|
1856
1708
|
return e.type = t, e.end = i, this.options.locations && (e.loc.end = s), this.options.ranges && (e.range[1] = i), e;
|
|
1857
1709
|
}
|
|
1858
|
-
|
|
1859
|
-
return
|
|
1710
|
+
$.finishNode = function(e, t) {
|
|
1711
|
+
return He.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc);
|
|
1860
1712
|
};
|
|
1861
|
-
|
|
1862
|
-
return
|
|
1713
|
+
$.finishNodeAt = function(e, t, i, s) {
|
|
1714
|
+
return He.call(this, e, t, i, s);
|
|
1863
1715
|
};
|
|
1864
|
-
|
|
1865
|
-
var t = new
|
|
1716
|
+
$.copyNode = function(e) {
|
|
1717
|
+
var t = new he(this, e.start, this.startLoc);
|
|
1866
1718
|
for (var i in e)
|
|
1867
1719
|
t[i] = e[i];
|
|
1868
1720
|
return t;
|
|
1869
1721
|
};
|
|
1870
|
-
var
|
|
1871
|
-
9:
|
|
1872
|
-
10:
|
|
1873
|
-
11:
|
|
1874
|
-
12:
|
|
1875
|
-
13:
|
|
1876
|
-
14:
|
|
1877
|
-
},
|
|
1722
|
+
var Pt = "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", We = "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", ze = We + " Extended_Pictographic", Ke = ze, Qe = Ke + " EBase EComp EMod EPres ExtPict", Ye = Qe, Nt = Ye, Vt = {
|
|
1723
|
+
9: We,
|
|
1724
|
+
10: ze,
|
|
1725
|
+
11: Ke,
|
|
1726
|
+
12: Qe,
|
|
1727
|
+
13: Ye,
|
|
1728
|
+
14: Nt
|
|
1729
|
+
}, Tt = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji", Lt = {
|
|
1878
1730
|
9: "",
|
|
1879
1731
|
10: "",
|
|
1880
1732
|
11: "",
|
|
1881
1733
|
12: "",
|
|
1882
1734
|
13: "",
|
|
1883
|
-
14:
|
|
1884
|
-
},
|
|
1885
|
-
9:
|
|
1886
|
-
10:
|
|
1887
|
-
11:
|
|
1888
|
-
12:
|
|
1889
|
-
13:
|
|
1890
|
-
14:
|
|
1891
|
-
},
|
|
1892
|
-
function
|
|
1893
|
-
var t =
|
|
1894
|
-
binary:
|
|
1895
|
-
binaryOfStrings:
|
|
1735
|
+
14: Tt
|
|
1736
|
+
}, Ie = "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", Xe = "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", Ze = Xe + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", Je = Ze + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", $e = Je + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", et = $e + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", Rt = et + " " + Pt, Ot = {
|
|
1737
|
+
9: Xe,
|
|
1738
|
+
10: Ze,
|
|
1739
|
+
11: Je,
|
|
1740
|
+
12: $e,
|
|
1741
|
+
13: et,
|
|
1742
|
+
14: Rt
|
|
1743
|
+
}, tt = {};
|
|
1744
|
+
function Bt(e) {
|
|
1745
|
+
var t = tt[e] = {
|
|
1746
|
+
binary: D(Vt[e] + " " + Ie),
|
|
1747
|
+
binaryOfStrings: D(Lt[e]),
|
|
1896
1748
|
nonBinary: {
|
|
1897
|
-
General_Category:
|
|
1898
|
-
Script:
|
|
1749
|
+
General_Category: D(Ie),
|
|
1750
|
+
Script: D(Ot[e])
|
|
1899
1751
|
}
|
|
1900
1752
|
};
|
|
1901
1753
|
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;
|
|
1902
1754
|
}
|
|
1903
|
-
for (var
|
|
1904
|
-
var
|
|
1905
|
-
|
|
1755
|
+
for (var fe = 0, Pe = [9, 10, 11, 12, 13, 14]; fe < Pe.length; fe += 1) {
|
|
1756
|
+
var Dt = Pe[fe];
|
|
1757
|
+
Bt(Dt);
|
|
1906
1758
|
}
|
|
1907
|
-
var
|
|
1759
|
+
var c = y.prototype, ae = function(t, i) {
|
|
1908
1760
|
this.parent = t, this.base = i || this;
|
|
1909
1761
|
};
|
|
1910
|
-
|
|
1762
|
+
ae.prototype.separatedFrom = function(t) {
|
|
1911
1763
|
for (var i = this; i; i = i.parent)
|
|
1912
1764
|
for (var s = t; s; s = s.parent)
|
|
1913
1765
|
if (i.base === s.base && i !== s)
|
|
1914
1766
|
return !0;
|
|
1915
1767
|
return !1;
|
|
1916
1768
|
};
|
|
1917
|
-
|
|
1918
|
-
return new
|
|
1769
|
+
ae.prototype.sibling = function() {
|
|
1770
|
+
return new ae(this.parent, this.base);
|
|
1919
1771
|
};
|
|
1920
|
-
var
|
|
1921
|
-
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 =
|
|
1772
|
+
var L = function(t) {
|
|
1773
|
+
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 = tt[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;
|
|
1922
1774
|
};
|
|
1923
|
-
|
|
1775
|
+
L.prototype.reset = function(t, i, s) {
|
|
1924
1776
|
var r = s.indexOf("v") !== -1, n = s.indexOf("u") !== -1;
|
|
1925
1777
|
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);
|
|
1926
1778
|
};
|
|
1927
|
-
|
|
1779
|
+
L.prototype.raise = function(t) {
|
|
1928
1780
|
this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + t);
|
|
1929
1781
|
};
|
|
1930
|
-
|
|
1782
|
+
L.prototype.at = function(t, i) {
|
|
1931
1783
|
i === void 0 && (i = !1);
|
|
1932
1784
|
var s = this.source, r = s.length;
|
|
1933
1785
|
if (t >= r)
|
|
@@ -1935,55 +1787,55 @@ q.prototype.at = function(t, i) {
|
|
|
1935
1787
|
var n = s.charCodeAt(t);
|
|
1936
1788
|
if (!(i || this.switchU) || n <= 55295 || n >= 57344 || t + 1 >= r)
|
|
1937
1789
|
return n;
|
|
1938
|
-
var
|
|
1939
|
-
return
|
|
1790
|
+
var u = s.charCodeAt(t + 1);
|
|
1791
|
+
return u >= 56320 && u <= 57343 ? (n << 10) + u - 56613888 : n;
|
|
1940
1792
|
};
|
|
1941
|
-
|
|
1793
|
+
L.prototype.nextIndex = function(t, i) {
|
|
1942
1794
|
i === void 0 && (i = !1);
|
|
1943
1795
|
var s = this.source, r = s.length;
|
|
1944
1796
|
if (t >= r)
|
|
1945
1797
|
return r;
|
|
1946
|
-
var n = s.charCodeAt(t),
|
|
1947
|
-
return !(i || this.switchU) || n <= 55295 || n >= 57344 || t + 1 >= r || (
|
|
1798
|
+
var n = s.charCodeAt(t), u;
|
|
1799
|
+
return !(i || this.switchU) || n <= 55295 || n >= 57344 || t + 1 >= r || (u = s.charCodeAt(t + 1)) < 56320 || u > 57343 ? t + 1 : t + 2;
|
|
1948
1800
|
};
|
|
1949
|
-
|
|
1801
|
+
L.prototype.current = function(t) {
|
|
1950
1802
|
return t === void 0 && (t = !1), this.at(this.pos, t);
|
|
1951
1803
|
};
|
|
1952
|
-
|
|
1804
|
+
L.prototype.lookahead = function(t) {
|
|
1953
1805
|
return t === void 0 && (t = !1), this.at(this.nextIndex(this.pos, t), t);
|
|
1954
1806
|
};
|
|
1955
|
-
|
|
1807
|
+
L.prototype.advance = function(t) {
|
|
1956
1808
|
t === void 0 && (t = !1), this.pos = this.nextIndex(this.pos, t);
|
|
1957
1809
|
};
|
|
1958
|
-
|
|
1810
|
+
L.prototype.eat = function(t, i) {
|
|
1959
1811
|
return i === void 0 && (i = !1), this.current(i) === t ? (this.advance(i), !0) : !1;
|
|
1960
1812
|
};
|
|
1961
|
-
|
|
1813
|
+
L.prototype.eatChars = function(t, i) {
|
|
1962
1814
|
i === void 0 && (i = !1);
|
|
1963
1815
|
for (var s = this.pos, r = 0, n = t; r < n.length; r += 1) {
|
|
1964
|
-
var
|
|
1965
|
-
if (
|
|
1816
|
+
var u = n[r], o = this.at(s, i);
|
|
1817
|
+
if (o === -1 || o !== u)
|
|
1966
1818
|
return !1;
|
|
1967
1819
|
s = this.nextIndex(s, i);
|
|
1968
1820
|
}
|
|
1969
1821
|
return this.pos = s, !0;
|
|
1970
1822
|
};
|
|
1971
|
-
|
|
1823
|
+
c.validateRegExpFlags = function(e) {
|
|
1972
1824
|
for (var t = e.validFlags, i = e.flags, s = !1, r = !1, n = 0; n < i.length; n++) {
|
|
1973
|
-
var
|
|
1974
|
-
t.indexOf(
|
|
1825
|
+
var u = i.charAt(n);
|
|
1826
|
+
t.indexOf(u) === -1 && this.raise(e.start, "Invalid regular expression flag"), i.indexOf(u, n + 1) > -1 && this.raise(e.start, "Duplicate regular expression flag"), u === "u" && (s = !0), u === "v" && (r = !0);
|
|
1975
1827
|
}
|
|
1976
1828
|
this.options.ecmaVersion >= 15 && s && r && this.raise(e.start, "Invalid regular expression flag");
|
|
1977
1829
|
};
|
|
1978
|
-
function
|
|
1830
|
+
function Ft(e) {
|
|
1979
1831
|
for (var t in e)
|
|
1980
1832
|
return !0;
|
|
1981
1833
|
return !1;
|
|
1982
1834
|
}
|
|
1983
|
-
|
|
1984
|
-
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 &&
|
|
1835
|
+
c.validateRegExpPattern = function(e) {
|
|
1836
|
+
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && Ft(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e));
|
|
1985
1837
|
};
|
|
1986
|
-
|
|
1838
|
+
c.regexp_pattern = function(e) {
|
|
1987
1839
|
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(
|
|
1988
1840
|
41
|
|
1989
1841
|
/* ) */
|
|
@@ -1999,9 +1851,9 @@ l.regexp_pattern = function(e) {
|
|
|
1999
1851
|
e.groupNames[s] || e.raise("Invalid named capture referenced");
|
|
2000
1852
|
}
|
|
2001
1853
|
};
|
|
2002
|
-
|
|
1854
|
+
c.regexp_disjunction = function(e) {
|
|
2003
1855
|
var t = this.options.ecmaVersion >= 16;
|
|
2004
|
-
for (t && (e.branchID = new
|
|
1856
|
+
for (t && (e.branchID = new ae(e.branchID, null)), this.regexp_alternative(e); e.eat(
|
|
2005
1857
|
124
|
|
2006
1858
|
/* | */
|
|
2007
1859
|
); )
|
|
@@ -2011,14 +1863,14 @@ l.regexp_disjunction = function(e) {
|
|
|
2011
1863
|
/* { */
|
|
2012
1864
|
) && e.raise("Lone quantifier brackets");
|
|
2013
1865
|
};
|
|
2014
|
-
|
|
1866
|
+
c.regexp_alternative = function(e) {
|
|
2015
1867
|
for (; e.pos < e.source.length && this.regexp_eatTerm(e); )
|
|
2016
1868
|
;
|
|
2017
1869
|
};
|
|
2018
|
-
|
|
1870
|
+
c.regexp_eatTerm = function(e) {
|
|
2019
1871
|
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;
|
|
2020
1872
|
};
|
|
2021
|
-
|
|
1873
|
+
c.regexp_eatAssertion = function(e) {
|
|
2022
1874
|
var t = e.pos;
|
|
2023
1875
|
if (e.lastAssertionIsQuantifiable = !1, e.eat(
|
|
2024
1876
|
94
|
|
@@ -2067,13 +1919,13 @@ l.regexp_eatAssertion = function(e) {
|
|
|
2067
1919
|
}
|
|
2068
1920
|
return e.pos = t, !1;
|
|
2069
1921
|
};
|
|
2070
|
-
|
|
1922
|
+
c.regexp_eatQuantifier = function(e, t) {
|
|
2071
1923
|
return t === void 0 && (t = !1), this.regexp_eatQuantifierPrefix(e, t) ? (e.eat(
|
|
2072
1924
|
63
|
|
2073
1925
|
/* ? */
|
|
2074
1926
|
), !0) : !1;
|
|
2075
1927
|
};
|
|
2076
|
-
|
|
1928
|
+
c.regexp_eatQuantifierPrefix = function(e, t) {
|
|
2077
1929
|
return e.eat(
|
|
2078
1930
|
42
|
|
2079
1931
|
/* * */
|
|
@@ -2085,7 +1937,7 @@ l.regexp_eatQuantifierPrefix = function(e, t) {
|
|
|
2085
1937
|
/* ? */
|
|
2086
1938
|
) || this.regexp_eatBracedQuantifier(e, t);
|
|
2087
1939
|
};
|
|
2088
|
-
|
|
1940
|
+
c.regexp_eatBracedQuantifier = function(e, t) {
|
|
2089
1941
|
var i = e.pos;
|
|
2090
1942
|
if (e.eat(
|
|
2091
1943
|
123
|
|
@@ -2104,13 +1956,13 @@ l.regexp_eatBracedQuantifier = function(e, t) {
|
|
|
2104
1956
|
}
|
|
2105
1957
|
return !1;
|
|
2106
1958
|
};
|
|
2107
|
-
|
|
1959
|
+
c.regexp_eatAtom = function(e) {
|
|
2108
1960
|
return this.regexp_eatPatternCharacters(e) || e.eat(
|
|
2109
1961
|
46
|
|
2110
1962
|
/* . */
|
|
2111
1963
|
) || this.regexp_eatReverseSolidusAtomEscape(e) || this.regexp_eatCharacterClass(e) || this.regexp_eatUncapturingGroup(e) || this.regexp_eatCapturingGroup(e);
|
|
2112
1964
|
};
|
|
2113
|
-
|
|
1965
|
+
c.regexp_eatReverseSolidusAtomEscape = function(e) {
|
|
2114
1966
|
var t = e.pos;
|
|
2115
1967
|
if (e.eat(
|
|
2116
1968
|
92
|
|
@@ -2122,7 +1974,7 @@ l.regexp_eatReverseSolidusAtomEscape = function(e) {
|
|
|
2122
1974
|
}
|
|
2123
1975
|
return !1;
|
|
2124
1976
|
};
|
|
2125
|
-
|
|
1977
|
+
c.regexp_eatUncapturingGroup = function(e) {
|
|
2126
1978
|
var t = e.pos;
|
|
2127
1979
|
if (e.eat(
|
|
2128
1980
|
40
|
|
@@ -2143,11 +1995,11 @@ l.regexp_eatUncapturingGroup = function(e) {
|
|
|
2143
1995
|
i.indexOf(n, r + 1) > -1 && e.raise("Duplicate regular expression modifiers");
|
|
2144
1996
|
}
|
|
2145
1997
|
if (s) {
|
|
2146
|
-
var
|
|
2147
|
-
!i && !
|
|
2148
|
-
for (var
|
|
2149
|
-
var
|
|
2150
|
-
(
|
|
1998
|
+
var u = this.regexp_eatModifiers(e);
|
|
1999
|
+
!i && !u && e.current() === 58 && e.raise("Invalid regular expression modifiers");
|
|
2000
|
+
for (var o = 0; o < u.length; o++) {
|
|
2001
|
+
var h = u.charAt(o);
|
|
2002
|
+
(u.indexOf(h, o + 1) > -1 || i.indexOf(h) > -1) && e.raise("Duplicate regular expression modifiers");
|
|
2151
2003
|
}
|
|
2152
2004
|
}
|
|
2153
2005
|
}
|
|
@@ -2168,7 +2020,7 @@ l.regexp_eatUncapturingGroup = function(e) {
|
|
|
2168
2020
|
}
|
|
2169
2021
|
return !1;
|
|
2170
2022
|
};
|
|
2171
|
-
|
|
2023
|
+
c.regexp_eatCapturingGroup = function(e) {
|
|
2172
2024
|
if (e.eat(
|
|
2173
2025
|
40
|
|
2174
2026
|
/* ( */
|
|
@@ -2182,40 +2034,40 @@ l.regexp_eatCapturingGroup = function(e) {
|
|
|
2182
2034
|
}
|
|
2183
2035
|
return !1;
|
|
2184
2036
|
};
|
|
2185
|
-
|
|
2186
|
-
for (var t = "", i = 0; (i = e.current()) !== -1 &&
|
|
2187
|
-
t +=
|
|
2037
|
+
c.regexp_eatModifiers = function(e) {
|
|
2038
|
+
for (var t = "", i = 0; (i = e.current()) !== -1 && Mt(i); )
|
|
2039
|
+
t += R(i), e.advance();
|
|
2188
2040
|
return t;
|
|
2189
2041
|
};
|
|
2190
|
-
function
|
|
2042
|
+
function Mt(e) {
|
|
2191
2043
|
return e === 105 || e === 109 || e === 115;
|
|
2192
2044
|
}
|
|
2193
|
-
|
|
2045
|
+
c.regexp_eatExtendedAtom = function(e) {
|
|
2194
2046
|
return e.eat(
|
|
2195
2047
|
46
|
|
2196
2048
|
/* . */
|
|
2197
2049
|
) || this.regexp_eatReverseSolidusAtomEscape(e) || this.regexp_eatCharacterClass(e) || this.regexp_eatUncapturingGroup(e) || this.regexp_eatCapturingGroup(e) || this.regexp_eatInvalidBracedQuantifier(e) || this.regexp_eatExtendedPatternCharacter(e);
|
|
2198
2050
|
};
|
|
2199
|
-
|
|
2051
|
+
c.regexp_eatInvalidBracedQuantifier = function(e) {
|
|
2200
2052
|
return this.regexp_eatBracedQuantifier(e, !0) && e.raise("Nothing to repeat"), !1;
|
|
2201
2053
|
};
|
|
2202
|
-
|
|
2054
|
+
c.regexp_eatSyntaxCharacter = function(e) {
|
|
2203
2055
|
var t = e.current();
|
|
2204
|
-
return
|
|
2056
|
+
return it(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2205
2057
|
};
|
|
2206
|
-
function
|
|
2058
|
+
function it(e) {
|
|
2207
2059
|
return e === 36 || e >= 40 && e <= 43 || e === 46 || e === 63 || e >= 91 && e <= 94 || e >= 123 && e <= 125;
|
|
2208
2060
|
}
|
|
2209
|
-
|
|
2210
|
-
for (var t = e.pos, i = 0; (i = e.current()) !== -1 && !
|
|
2061
|
+
c.regexp_eatPatternCharacters = function(e) {
|
|
2062
|
+
for (var t = e.pos, i = 0; (i = e.current()) !== -1 && !it(i); )
|
|
2211
2063
|
e.advance();
|
|
2212
2064
|
return e.pos !== t;
|
|
2213
2065
|
};
|
|
2214
|
-
|
|
2066
|
+
c.regexp_eatExtendedPatternCharacter = function(e) {
|
|
2215
2067
|
var t = e.current();
|
|
2216
2068
|
return t !== -1 && t !== 36 && !(t >= 40 && t <= 43) && t !== 46 && t !== 63 && t !== 91 && t !== 94 && t !== 124 ? (e.advance(), !0) : !1;
|
|
2217
2069
|
};
|
|
2218
|
-
|
|
2070
|
+
c.regexp_groupSpecifier = function(e) {
|
|
2219
2071
|
if (e.eat(
|
|
2220
2072
|
63
|
|
2221
2073
|
/* ? */
|
|
@@ -2233,7 +2085,7 @@ l.regexp_groupSpecifier = function(e) {
|
|
|
2233
2085
|
t ? (i || (e.groupNames[e.lastStringValue] = [])).push(e.branchID) : e.groupNames[e.lastStringValue] = !0;
|
|
2234
2086
|
}
|
|
2235
2087
|
};
|
|
2236
|
-
|
|
2088
|
+
c.regexp_eatGroupName = function(e) {
|
|
2237
2089
|
if (e.lastStringValue = "", e.eat(
|
|
2238
2090
|
60
|
|
2239
2091
|
/* < */
|
|
@@ -2247,32 +2099,32 @@ l.regexp_eatGroupName = function(e) {
|
|
|
2247
2099
|
}
|
|
2248
2100
|
return !1;
|
|
2249
2101
|
};
|
|
2250
|
-
|
|
2102
|
+
c.regexp_eatRegExpIdentifierName = function(e) {
|
|
2251
2103
|
if (e.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(e)) {
|
|
2252
|
-
for (e.lastStringValue +=
|
|
2253
|
-
e.lastStringValue +=
|
|
2104
|
+
for (e.lastStringValue += R(e.lastIntValue); this.regexp_eatRegExpIdentifierPart(e); )
|
|
2105
|
+
e.lastStringValue += R(e.lastIntValue);
|
|
2254
2106
|
return !0;
|
|
2255
2107
|
}
|
|
2256
2108
|
return !1;
|
|
2257
2109
|
};
|
|
2258
|
-
|
|
2110
|
+
c.regexp_eatRegExpIdentifierStart = function(e) {
|
|
2259
2111
|
var t = e.pos, i = this.options.ecmaVersion >= 11, s = e.current(i);
|
|
2260
|
-
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue),
|
|
2112
|
+
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue), Ut(s) ? (e.lastIntValue = s, !0) : (e.pos = t, !1);
|
|
2261
2113
|
};
|
|
2262
|
-
function
|
|
2263
|
-
return
|
|
2114
|
+
function Ut(e) {
|
|
2115
|
+
return V(e, !0) || e === 36 || e === 95;
|
|
2264
2116
|
}
|
|
2265
|
-
|
|
2117
|
+
c.regexp_eatRegExpIdentifierPart = function(e) {
|
|
2266
2118
|
var t = e.pos, i = this.options.ecmaVersion >= 11, s = e.current(i);
|
|
2267
|
-
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue),
|
|
2119
|
+
return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue), qt(s) ? (e.lastIntValue = s, !0) : (e.pos = t, !1);
|
|
2268
2120
|
};
|
|
2269
|
-
function
|
|
2270
|
-
return
|
|
2121
|
+
function qt(e) {
|
|
2122
|
+
return F(e, !0) || e === 36 || e === 95 || e === 8204 || e === 8205;
|
|
2271
2123
|
}
|
|
2272
|
-
|
|
2124
|
+
c.regexp_eatAtomEscape = function(e) {
|
|
2273
2125
|
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);
|
|
2274
2126
|
};
|
|
2275
|
-
|
|
2127
|
+
c.regexp_eatBackReference = function(e) {
|
|
2276
2128
|
var t = e.pos;
|
|
2277
2129
|
if (this.regexp_eatDecimalEscape(e)) {
|
|
2278
2130
|
var i = e.lastIntValue;
|
|
@@ -2284,7 +2136,7 @@ l.regexp_eatBackReference = function(e) {
|
|
|
2284
2136
|
}
|
|
2285
2137
|
return !1;
|
|
2286
2138
|
};
|
|
2287
|
-
|
|
2139
|
+
c.regexp_eatKGroupName = function(e) {
|
|
2288
2140
|
if (e.eat(
|
|
2289
2141
|
107
|
|
2290
2142
|
/* k */
|
|
@@ -2295,10 +2147,10 @@ l.regexp_eatKGroupName = function(e) {
|
|
|
2295
2147
|
}
|
|
2296
2148
|
return !1;
|
|
2297
2149
|
};
|
|
2298
|
-
|
|
2150
|
+
c.regexp_eatCharacterEscape = function(e) {
|
|
2299
2151
|
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);
|
|
2300
2152
|
};
|
|
2301
|
-
|
|
2153
|
+
c.regexp_eatCControlLetter = function(e) {
|
|
2302
2154
|
var t = e.pos;
|
|
2303
2155
|
if (e.eat(
|
|
2304
2156
|
99
|
|
@@ -2310,21 +2162,21 @@ l.regexp_eatCControlLetter = function(e) {
|
|
|
2310
2162
|
}
|
|
2311
2163
|
return !1;
|
|
2312
2164
|
};
|
|
2313
|
-
|
|
2314
|
-
return e.current() === 48 && !
|
|
2165
|
+
c.regexp_eatZero = function(e) {
|
|
2166
|
+
return e.current() === 48 && !ce(e.lookahead()) ? (e.lastIntValue = 0, e.advance(), !0) : !1;
|
|
2315
2167
|
};
|
|
2316
|
-
|
|
2168
|
+
c.regexp_eatControlEscape = function(e) {
|
|
2317
2169
|
var t = e.current();
|
|
2318
2170
|
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;
|
|
2319
2171
|
};
|
|
2320
|
-
|
|
2172
|
+
c.regexp_eatControlLetter = function(e) {
|
|
2321
2173
|
var t = e.current();
|
|
2322
|
-
return
|
|
2174
|
+
return st(t) ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
2323
2175
|
};
|
|
2324
|
-
function
|
|
2176
|
+
function st(e) {
|
|
2325
2177
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
2326
2178
|
}
|
|
2327
|
-
|
|
2179
|
+
c.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
2328
2180
|
t === void 0 && (t = !1);
|
|
2329
2181
|
var i = e.pos, s = t || e.switchU;
|
|
2330
2182
|
if (e.eat(
|
|
@@ -2342,9 +2194,9 @@ l.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
|
2342
2194
|
117
|
|
2343
2195
|
/* u */
|
|
2344
2196
|
) && this.regexp_eatFixedHexDigits(e, 4)) {
|
|
2345
|
-
var
|
|
2346
|
-
if (
|
|
2347
|
-
return e.lastIntValue = (r - 55296) * 1024 + (
|
|
2197
|
+
var u = e.lastIntValue;
|
|
2198
|
+
if (u >= 56320 && u <= 57343)
|
|
2199
|
+
return e.lastIntValue = (r - 55296) * 1024 + (u - 56320) + 65536, !0;
|
|
2348
2200
|
}
|
|
2349
2201
|
e.pos = n, e.lastIntValue = r;
|
|
2350
2202
|
}
|
|
@@ -2356,16 +2208,16 @@ l.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
|
2356
2208
|
) && this.regexp_eatHexDigits(e) && e.eat(
|
|
2357
2209
|
125
|
|
2358
2210
|
/* } */
|
|
2359
|
-
) &&
|
|
2211
|
+
) && jt(e.lastIntValue))
|
|
2360
2212
|
return !0;
|
|
2361
2213
|
s && e.raise("Invalid unicode escape"), e.pos = i;
|
|
2362
2214
|
}
|
|
2363
2215
|
return !1;
|
|
2364
2216
|
};
|
|
2365
|
-
function
|
|
2217
|
+
function jt(e) {
|
|
2366
2218
|
return e >= 0 && e <= 1114111;
|
|
2367
2219
|
}
|
|
2368
|
-
|
|
2220
|
+
c.regexp_eatIdentityEscape = function(e) {
|
|
2369
2221
|
if (e.switchU)
|
|
2370
2222
|
return this.regexp_eatSyntaxCharacter(e) ? !0 : e.eat(
|
|
2371
2223
|
47
|
|
@@ -2374,7 +2226,7 @@ l.regexp_eatIdentityEscape = function(e) {
|
|
|
2374
2226
|
var t = e.current();
|
|
2375
2227
|
return t !== 99 && (!e.switchN || t !== 107) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2376
2228
|
};
|
|
2377
|
-
|
|
2229
|
+
c.regexp_eatDecimalEscape = function(e) {
|
|
2378
2230
|
e.lastIntValue = 0;
|
|
2379
2231
|
var t = e.current();
|
|
2380
2232
|
if (t >= 49 && t <= 57) {
|
|
@@ -2385,11 +2237,11 @@ l.regexp_eatDecimalEscape = function(e) {
|
|
|
2385
2237
|
}
|
|
2386
2238
|
return !1;
|
|
2387
2239
|
};
|
|
2388
|
-
var
|
|
2389
|
-
|
|
2240
|
+
var at = 0, O = 1, I = 2;
|
|
2241
|
+
c.regexp_eatCharacterClassEscape = function(e) {
|
|
2390
2242
|
var t = e.current();
|
|
2391
|
-
if (
|
|
2392
|
-
return e.lastIntValue = -1, e.advance(),
|
|
2243
|
+
if (Gt(t))
|
|
2244
|
+
return e.lastIntValue = -1, e.advance(), O;
|
|
2393
2245
|
var i = !1;
|
|
2394
2246
|
if (e.switchU && this.options.ecmaVersion >= 9 && ((i = t === 80) || t === 112)) {
|
|
2395
2247
|
e.lastIntValue = -1, e.advance();
|
|
@@ -2401,15 +2253,15 @@ l.regexp_eatCharacterClassEscape = function(e) {
|
|
|
2401
2253
|
125
|
|
2402
2254
|
/* } */
|
|
2403
2255
|
))
|
|
2404
|
-
return i && s ===
|
|
2256
|
+
return i && s === I && e.raise("Invalid property name"), s;
|
|
2405
2257
|
e.raise("Invalid property name");
|
|
2406
2258
|
}
|
|
2407
|
-
return
|
|
2259
|
+
return at;
|
|
2408
2260
|
};
|
|
2409
|
-
function
|
|
2261
|
+
function Gt(e) {
|
|
2410
2262
|
return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87;
|
|
2411
2263
|
}
|
|
2412
|
-
|
|
2264
|
+
c.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
2413
2265
|
var t = e.pos;
|
|
2414
2266
|
if (this.regexp_eatUnicodePropertyName(e) && e.eat(
|
|
2415
2267
|
61
|
|
@@ -2418,47 +2270,47 @@ l.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
|
2418
2270
|
var i = e.lastStringValue;
|
|
2419
2271
|
if (this.regexp_eatUnicodePropertyValue(e)) {
|
|
2420
2272
|
var s = e.lastStringValue;
|
|
2421
|
-
return this.regexp_validateUnicodePropertyNameAndValue(e, i, s),
|
|
2273
|
+
return this.regexp_validateUnicodePropertyNameAndValue(e, i, s), O;
|
|
2422
2274
|
}
|
|
2423
2275
|
}
|
|
2424
2276
|
if (e.pos = t, this.regexp_eatLoneUnicodePropertyNameOrValue(e)) {
|
|
2425
2277
|
var r = e.lastStringValue;
|
|
2426
2278
|
return this.regexp_validateUnicodePropertyNameOrValue(e, r);
|
|
2427
2279
|
}
|
|
2428
|
-
return
|
|
2280
|
+
return at;
|
|
2429
2281
|
};
|
|
2430
|
-
|
|
2431
|
-
|
|
2282
|
+
c.regexp_validateUnicodePropertyNameAndValue = function(e, t, i) {
|
|
2283
|
+
W(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(i) || e.raise("Invalid property value");
|
|
2432
2284
|
};
|
|
2433
|
-
|
|
2285
|
+
c.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
2434
2286
|
if (e.unicodeProperties.binary.test(t))
|
|
2435
|
-
return
|
|
2287
|
+
return O;
|
|
2436
2288
|
if (e.switchV && e.unicodeProperties.binaryOfStrings.test(t))
|
|
2437
|
-
return
|
|
2289
|
+
return I;
|
|
2438
2290
|
e.raise("Invalid property name");
|
|
2439
2291
|
};
|
|
2440
|
-
|
|
2292
|
+
c.regexp_eatUnicodePropertyName = function(e) {
|
|
2441
2293
|
var t = 0;
|
|
2442
|
-
for (e.lastStringValue = "";
|
|
2443
|
-
e.lastStringValue +=
|
|
2294
|
+
for (e.lastStringValue = ""; rt(t = e.current()); )
|
|
2295
|
+
e.lastStringValue += R(t), e.advance();
|
|
2444
2296
|
return e.lastStringValue !== "";
|
|
2445
2297
|
};
|
|
2446
|
-
function
|
|
2447
|
-
return
|
|
2298
|
+
function rt(e) {
|
|
2299
|
+
return st(e) || e === 95;
|
|
2448
2300
|
}
|
|
2449
|
-
|
|
2301
|
+
c.regexp_eatUnicodePropertyValue = function(e) {
|
|
2450
2302
|
var t = 0;
|
|
2451
|
-
for (e.lastStringValue = "";
|
|
2452
|
-
e.lastStringValue +=
|
|
2303
|
+
for (e.lastStringValue = ""; Ht(t = e.current()); )
|
|
2304
|
+
e.lastStringValue += R(t), e.advance();
|
|
2453
2305
|
return e.lastStringValue !== "";
|
|
2454
2306
|
};
|
|
2455
|
-
function
|
|
2456
|
-
return
|
|
2307
|
+
function Ht(e) {
|
|
2308
|
+
return rt(e) || ce(e);
|
|
2457
2309
|
}
|
|
2458
|
-
|
|
2310
|
+
c.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
2459
2311
|
return this.regexp_eatUnicodePropertyValue(e);
|
|
2460
2312
|
};
|
|
2461
|
-
|
|
2313
|
+
c.regexp_eatCharacterClass = function(e) {
|
|
2462
2314
|
if (e.eat(
|
|
2463
2315
|
91
|
|
2464
2316
|
/* [ */
|
|
@@ -2470,14 +2322,14 @@ l.regexp_eatCharacterClass = function(e) {
|
|
|
2470
2322
|
return e.eat(
|
|
2471
2323
|
93
|
|
2472
2324
|
/* ] */
|
|
2473
|
-
) || e.raise("Unterminated character class"), t && i ===
|
|
2325
|
+
) || e.raise("Unterminated character class"), t && i === I && e.raise("Negated character class may contain strings"), !0;
|
|
2474
2326
|
}
|
|
2475
2327
|
return !1;
|
|
2476
2328
|
};
|
|
2477
|
-
|
|
2478
|
-
return e.current() === 93 ?
|
|
2329
|
+
c.regexp_classContents = function(e) {
|
|
2330
|
+
return e.current() === 93 ? O : e.switchV ? this.regexp_classSetExpression(e) : (this.regexp_nonEmptyClassRanges(e), O);
|
|
2479
2331
|
};
|
|
2480
|
-
|
|
2332
|
+
c.regexp_nonEmptyClassRanges = function(e) {
|
|
2481
2333
|
for (; this.regexp_eatClassAtom(e); ) {
|
|
2482
2334
|
var t = e.lastIntValue;
|
|
2483
2335
|
if (e.eat(
|
|
@@ -2489,7 +2341,7 @@ l.regexp_nonEmptyClassRanges = function(e) {
|
|
|
2489
2341
|
}
|
|
2490
2342
|
}
|
|
2491
2343
|
};
|
|
2492
|
-
|
|
2344
|
+
c.regexp_eatClassAtom = function(e) {
|
|
2493
2345
|
var t = e.pos;
|
|
2494
2346
|
if (e.eat(
|
|
2495
2347
|
92
|
|
@@ -2499,14 +2351,14 @@ l.regexp_eatClassAtom = function(e) {
|
|
|
2499
2351
|
return !0;
|
|
2500
2352
|
if (e.switchU) {
|
|
2501
2353
|
var i = e.current();
|
|
2502
|
-
(i === 99 ||
|
|
2354
|
+
(i === 99 || ot(i)) && e.raise("Invalid class escape"), e.raise("Invalid escape");
|
|
2503
2355
|
}
|
|
2504
2356
|
e.pos = t;
|
|
2505
2357
|
}
|
|
2506
2358
|
var s = e.current();
|
|
2507
2359
|
return s !== 93 ? (e.lastIntValue = s, e.advance(), !0) : !1;
|
|
2508
2360
|
};
|
|
2509
|
-
|
|
2361
|
+
c.regexp_eatClassEscape = function(e) {
|
|
2510
2362
|
var t = e.pos;
|
|
2511
2363
|
if (e.eat(
|
|
2512
2364
|
98
|
|
@@ -2528,17 +2380,17 @@ l.regexp_eatClassEscape = function(e) {
|
|
|
2528
2380
|
}
|
|
2529
2381
|
return this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e);
|
|
2530
2382
|
};
|
|
2531
|
-
|
|
2532
|
-
var t =
|
|
2383
|
+
c.regexp_classSetExpression = function(e) {
|
|
2384
|
+
var t = O, i;
|
|
2533
2385
|
if (!this.regexp_eatClassSetRange(e))
|
|
2534
2386
|
if (i = this.regexp_eatClassSetOperand(e)) {
|
|
2535
|
-
i ===
|
|
2387
|
+
i === I && (t = I);
|
|
2536
2388
|
for (var s = e.pos; e.eatChars(
|
|
2537
2389
|
[38, 38]
|
|
2538
2390
|
/* && */
|
|
2539
2391
|
); ) {
|
|
2540
2392
|
if (e.current() !== 38 && (i = this.regexp_eatClassSetOperand(e))) {
|
|
2541
|
-
i !==
|
|
2393
|
+
i !== I && (t = O);
|
|
2542
2394
|
continue;
|
|
2543
2395
|
}
|
|
2544
2396
|
e.raise("Invalid character in character class");
|
|
@@ -2558,10 +2410,10 @@ l.regexp_classSetExpression = function(e) {
|
|
|
2558
2410
|
if (!this.regexp_eatClassSetRange(e)) {
|
|
2559
2411
|
if (i = this.regexp_eatClassSetOperand(e), !i)
|
|
2560
2412
|
return t;
|
|
2561
|
-
i ===
|
|
2413
|
+
i === I && (t = I);
|
|
2562
2414
|
}
|
|
2563
2415
|
};
|
|
2564
|
-
|
|
2416
|
+
c.regexp_eatClassSetRange = function(e) {
|
|
2565
2417
|
var t = e.pos;
|
|
2566
2418
|
if (this.regexp_eatClassSetCharacter(e)) {
|
|
2567
2419
|
var i = e.lastIntValue;
|
|
@@ -2576,10 +2428,10 @@ l.regexp_eatClassSetRange = function(e) {
|
|
|
2576
2428
|
}
|
|
2577
2429
|
return !1;
|
|
2578
2430
|
};
|
|
2579
|
-
|
|
2580
|
-
return this.regexp_eatClassSetCharacter(e) ?
|
|
2431
|
+
c.regexp_eatClassSetOperand = function(e) {
|
|
2432
|
+
return this.regexp_eatClassSetCharacter(e) ? O : this.regexp_eatClassStringDisjunction(e) || this.regexp_eatNestedClass(e);
|
|
2581
2433
|
};
|
|
2582
|
-
|
|
2434
|
+
c.regexp_eatNestedClass = function(e) {
|
|
2583
2435
|
var t = e.pos;
|
|
2584
2436
|
if (e.eat(
|
|
2585
2437
|
91
|
|
@@ -2593,7 +2445,7 @@ l.regexp_eatNestedClass = function(e) {
|
|
|
2593
2445
|
93
|
|
2594
2446
|
/* ] */
|
|
2595
2447
|
))
|
|
2596
|
-
return i && s ===
|
|
2448
|
+
return i && s === I && e.raise("Negated character class may contain strings"), s;
|
|
2597
2449
|
e.pos = t;
|
|
2598
2450
|
}
|
|
2599
2451
|
if (e.eat(
|
|
@@ -2607,7 +2459,7 @@ l.regexp_eatNestedClass = function(e) {
|
|
|
2607
2459
|
}
|
|
2608
2460
|
return null;
|
|
2609
2461
|
};
|
|
2610
|
-
|
|
2462
|
+
c.regexp_eatClassStringDisjunction = function(e) {
|
|
2611
2463
|
var t = e.pos;
|
|
2612
2464
|
if (e.eatChars(
|
|
2613
2465
|
[92, 113]
|
|
@@ -2629,20 +2481,20 @@ l.regexp_eatClassStringDisjunction = function(e) {
|
|
|
2629
2481
|
}
|
|
2630
2482
|
return null;
|
|
2631
2483
|
};
|
|
2632
|
-
|
|
2484
|
+
c.regexp_classStringDisjunctionContents = function(e) {
|
|
2633
2485
|
for (var t = this.regexp_classString(e); e.eat(
|
|
2634
2486
|
124
|
|
2635
2487
|
/* | */
|
|
2636
2488
|
); )
|
|
2637
|
-
this.regexp_classString(e) ===
|
|
2489
|
+
this.regexp_classString(e) === I && (t = I);
|
|
2638
2490
|
return t;
|
|
2639
2491
|
};
|
|
2640
|
-
|
|
2492
|
+
c.regexp_classString = function(e) {
|
|
2641
2493
|
for (var t = 0; this.regexp_eatClassSetCharacter(e); )
|
|
2642
2494
|
t++;
|
|
2643
|
-
return t === 1 ?
|
|
2495
|
+
return t === 1 ? O : I;
|
|
2644
2496
|
};
|
|
2645
|
-
|
|
2497
|
+
c.regexp_eatClassSetCharacter = function(e) {
|
|
2646
2498
|
var t = e.pos;
|
|
2647
2499
|
if (e.eat(
|
|
2648
2500
|
92
|
|
@@ -2653,26 +2505,26 @@ l.regexp_eatClassSetCharacter = function(e) {
|
|
|
2653
2505
|
/* b */
|
|
2654
2506
|
) ? (e.lastIntValue = 8, !0) : (e.pos = t, !1);
|
|
2655
2507
|
var i = e.current();
|
|
2656
|
-
return i < 0 || i === e.lookahead() &&
|
|
2508
|
+
return i < 0 || i === e.lookahead() && Wt(i) || zt(i) ? !1 : (e.advance(), e.lastIntValue = i, !0);
|
|
2657
2509
|
};
|
|
2658
|
-
function
|
|
2510
|
+
function Wt(e) {
|
|
2659
2511
|
return e === 33 || e >= 35 && e <= 38 || e >= 42 && e <= 44 || e === 46 || e >= 58 && e <= 64 || e === 94 || e === 96 || e === 126;
|
|
2660
2512
|
}
|
|
2661
|
-
function
|
|
2513
|
+
function zt(e) {
|
|
2662
2514
|
return e === 40 || e === 41 || e === 45 || e === 47 || e >= 91 && e <= 93 || e >= 123 && e <= 125;
|
|
2663
2515
|
}
|
|
2664
|
-
|
|
2516
|
+
c.regexp_eatClassSetReservedPunctuator = function(e) {
|
|
2665
2517
|
var t = e.current();
|
|
2666
|
-
return
|
|
2518
|
+
return Kt(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2667
2519
|
};
|
|
2668
|
-
function
|
|
2520
|
+
function Kt(e) {
|
|
2669
2521
|
return e === 33 || e === 35 || e === 37 || e === 38 || e === 44 || e === 45 || e >= 58 && e <= 62 || e === 64 || e === 96 || e === 126;
|
|
2670
2522
|
}
|
|
2671
|
-
|
|
2523
|
+
c.regexp_eatClassControlLetter = function(e) {
|
|
2672
2524
|
var t = e.current();
|
|
2673
|
-
return
|
|
2525
|
+
return ce(t) || t === 95 ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
2674
2526
|
};
|
|
2675
|
-
|
|
2527
|
+
c.regexp_eatHexEscapeSequence = function(e) {
|
|
2676
2528
|
var t = e.pos;
|
|
2677
2529
|
if (e.eat(
|
|
2678
2530
|
120
|
|
@@ -2684,28 +2536,28 @@ l.regexp_eatHexEscapeSequence = function(e) {
|
|
|
2684
2536
|
}
|
|
2685
2537
|
return !1;
|
|
2686
2538
|
};
|
|
2687
|
-
|
|
2539
|
+
c.regexp_eatDecimalDigits = function(e) {
|
|
2688
2540
|
var t = e.pos, i = 0;
|
|
2689
|
-
for (e.lastIntValue = 0;
|
|
2541
|
+
for (e.lastIntValue = 0; ce(i = e.current()); )
|
|
2690
2542
|
e.lastIntValue = 10 * e.lastIntValue + (i - 48), e.advance();
|
|
2691
2543
|
return e.pos !== t;
|
|
2692
2544
|
};
|
|
2693
|
-
function
|
|
2545
|
+
function ce(e) {
|
|
2694
2546
|
return e >= 48 && e <= 57;
|
|
2695
2547
|
}
|
|
2696
|
-
|
|
2548
|
+
c.regexp_eatHexDigits = function(e) {
|
|
2697
2549
|
var t = e.pos, i = 0;
|
|
2698
|
-
for (e.lastIntValue = 0;
|
|
2699
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
2550
|
+
for (e.lastIntValue = 0; nt(i = e.current()); )
|
|
2551
|
+
e.lastIntValue = 16 * e.lastIntValue + ut(i), e.advance();
|
|
2700
2552
|
return e.pos !== t;
|
|
2701
2553
|
};
|
|
2702
|
-
function
|
|
2554
|
+
function nt(e) {
|
|
2703
2555
|
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
2704
2556
|
}
|
|
2705
|
-
function
|
|
2557
|
+
function ut(e) {
|
|
2706
2558
|
return e >= 65 && e <= 70 ? 10 + (e - 65) : e >= 97 && e <= 102 ? 10 + (e - 97) : e - 48;
|
|
2707
2559
|
}
|
|
2708
|
-
|
|
2560
|
+
c.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
2709
2561
|
if (this.regexp_eatOctalDigit(e)) {
|
|
2710
2562
|
var t = e.lastIntValue;
|
|
2711
2563
|
if (this.regexp_eatOctalDigit(e)) {
|
|
@@ -2717,34 +2569,34 @@ l.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
|
2717
2569
|
}
|
|
2718
2570
|
return !1;
|
|
2719
2571
|
};
|
|
2720
|
-
|
|
2572
|
+
c.regexp_eatOctalDigit = function(e) {
|
|
2721
2573
|
var t = e.current();
|
|
2722
|
-
return
|
|
2574
|
+
return ot(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1);
|
|
2723
2575
|
};
|
|
2724
|
-
function
|
|
2576
|
+
function ot(e) {
|
|
2725
2577
|
return e >= 48 && e <= 55;
|
|
2726
2578
|
}
|
|
2727
|
-
|
|
2579
|
+
c.regexp_eatFixedHexDigits = function(e, t) {
|
|
2728
2580
|
var i = e.pos;
|
|
2729
2581
|
e.lastIntValue = 0;
|
|
2730
2582
|
for (var s = 0; s < t; ++s) {
|
|
2731
2583
|
var r = e.current();
|
|
2732
|
-
if (!
|
|
2584
|
+
if (!nt(r))
|
|
2733
2585
|
return e.pos = i, !1;
|
|
2734
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
2586
|
+
e.lastIntValue = 16 * e.lastIntValue + ut(r), e.advance();
|
|
2735
2587
|
}
|
|
2736
2588
|
return !0;
|
|
2737
2589
|
};
|
|
2738
|
-
var
|
|
2739
|
-
this.type = t.type, this.value = t.value, this.start = t.start, this.end = t.end, t.options.locations && (this.loc = new
|
|
2740
|
-
},
|
|
2741
|
-
|
|
2742
|
-
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new
|
|
2590
|
+
var ke = function(t) {
|
|
2591
|
+
this.type = t.type, this.value = t.value, this.start = t.start, this.end = t.end, t.options.locations && (this.loc = new re(t, t.startLoc, t.endLoc)), t.options.ranges && (this.range = [t.start, t.end]);
|
|
2592
|
+
}, x = y.prototype;
|
|
2593
|
+
x.next = function(e) {
|
|
2594
|
+
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new ke(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
2743
2595
|
};
|
|
2744
|
-
|
|
2745
|
-
return this.next(), new
|
|
2596
|
+
x.getToken = function() {
|
|
2597
|
+
return this.next(), new ke(this);
|
|
2746
2598
|
};
|
|
2747
|
-
typeof Symbol < "u" && (
|
|
2599
|
+
typeof Symbol < "u" && (x[Symbol.iterator] = function() {
|
|
2748
2600
|
var e = this;
|
|
2749
2601
|
return {
|
|
2750
2602
|
next: function() {
|
|
@@ -2756,7 +2608,7 @@ typeof Symbol < "u" && (m[Symbol.iterator] = function() {
|
|
|
2756
2608
|
}
|
|
2757
2609
|
};
|
|
2758
2610
|
});
|
|
2759
|
-
|
|
2611
|
+
x.nextToken = function() {
|
|
2760
2612
|
var e = this.curContext();
|
|
2761
2613
|
if ((!e || !e.preserveSpace) && this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length)
|
|
2762
2614
|
return this.finishToken(a.eof);
|
|
@@ -2764,20 +2616,20 @@ m.nextToken = function() {
|
|
|
2764
2616
|
return e.override(this);
|
|
2765
2617
|
this.readToken(this.fullCharCodeAtPos());
|
|
2766
2618
|
};
|
|
2767
|
-
|
|
2768
|
-
return
|
|
2619
|
+
x.readToken = function(e) {
|
|
2620
|
+
return V(e, this.options.ecmaVersion >= 6) || e === 92 ? this.readWord() : this.getTokenFromCode(e);
|
|
2769
2621
|
};
|
|
2770
|
-
|
|
2622
|
+
x.fullCharCodeAtPos = function() {
|
|
2771
2623
|
var e = this.input.charCodeAt(this.pos);
|
|
2772
2624
|
if (e <= 55295 || e >= 56320)
|
|
2773
2625
|
return e;
|
|
2774
2626
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
2775
2627
|
return t <= 56319 || t >= 57344 ? e : (e << 10) + t - 56613888;
|
|
2776
2628
|
};
|
|
2777
|
-
|
|
2629
|
+
x.skipBlockComment = function() {
|
|
2778
2630
|
var e = this.options.onComment && this.curPosition(), t = this.pos, i = this.input.indexOf("*/", this.pos += 2);
|
|
2779
2631
|
if (i === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = i + 2, this.options.locations)
|
|
2780
|
-
for (var s = void 0, r = t; (s =
|
|
2632
|
+
for (var s = void 0, r = t; (s = Te(this.input, r, this.pos)) > -1; )
|
|
2781
2633
|
++this.curLine, r = this.lineStart = s;
|
|
2782
2634
|
this.options.onComment && this.options.onComment(
|
|
2783
2635
|
!0,
|
|
@@ -2788,8 +2640,8 @@ m.skipBlockComment = function() {
|
|
|
2788
2640
|
this.curPosition()
|
|
2789
2641
|
);
|
|
2790
2642
|
};
|
|
2791
|
-
|
|
2792
|
-
for (var t = this.pos, i = this.options.onComment && this.curPosition(), s = this.input.charCodeAt(this.pos += e); this.pos < this.input.length &&
|
|
2643
|
+
x.skipLineComment = function(e) {
|
|
2644
|
+
for (var t = this.pos, i = this.options.onComment && this.curPosition(), s = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !H(s); )
|
|
2793
2645
|
s = this.input.charCodeAt(++this.pos);
|
|
2794
2646
|
this.options.onComment && this.options.onComment(
|
|
2795
2647
|
!1,
|
|
@@ -2800,7 +2652,7 @@ m.skipLineComment = function(e) {
|
|
|
2800
2652
|
this.curPosition()
|
|
2801
2653
|
);
|
|
2802
2654
|
};
|
|
2803
|
-
|
|
2655
|
+
x.skipSpace = function() {
|
|
2804
2656
|
e:
|
|
2805
2657
|
for (; this.pos < this.input.length; ) {
|
|
2806
2658
|
var e = this.input.charCodeAt(this.pos);
|
|
@@ -2829,34 +2681,34 @@ m.skipSpace = function() {
|
|
|
2829
2681
|
}
|
|
2830
2682
|
break;
|
|
2831
2683
|
default:
|
|
2832
|
-
if (e > 8 && e < 14 || e >= 5760 &&
|
|
2684
|
+
if (e > 8 && e < 14 || e >= 5760 && Le.test(String.fromCharCode(e)))
|
|
2833
2685
|
++this.pos;
|
|
2834
2686
|
else
|
|
2835
2687
|
break e;
|
|
2836
2688
|
}
|
|
2837
2689
|
}
|
|
2838
2690
|
};
|
|
2839
|
-
|
|
2691
|
+
x.finishToken = function(e, t) {
|
|
2840
2692
|
this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
|
|
2841
2693
|
var i = this.type;
|
|
2842
2694
|
this.type = e, this.value = t, this.updateContext(i);
|
|
2843
2695
|
};
|
|
2844
|
-
|
|
2696
|
+
x.readToken_dot = function() {
|
|
2845
2697
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2846
2698
|
if (e >= 48 && e <= 57)
|
|
2847
2699
|
return this.readNumber(!0);
|
|
2848
2700
|
var t = this.input.charCodeAt(this.pos + 2);
|
|
2849
2701
|
return this.options.ecmaVersion >= 6 && e === 46 && t === 46 ? (this.pos += 3, this.finishToken(a.ellipsis)) : (++this.pos, this.finishToken(a.dot));
|
|
2850
2702
|
};
|
|
2851
|
-
|
|
2703
|
+
x.readToken_slash = function() {
|
|
2852
2704
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2853
2705
|
return this.exprAllowed ? (++this.pos, this.readRegexp()) : e === 61 ? this.finishOp(a.assign, 2) : this.finishOp(a.slash, 1);
|
|
2854
2706
|
};
|
|
2855
|
-
|
|
2707
|
+
x.readToken_mult_modulo_exp = function(e) {
|
|
2856
2708
|
var t = this.input.charCodeAt(this.pos + 1), i = 1, s = e === 42 ? a.star : a.modulo;
|
|
2857
2709
|
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);
|
|
2858
2710
|
};
|
|
2859
|
-
|
|
2711
|
+
x.readToken_pipe_amp = function(e) {
|
|
2860
2712
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
2861
2713
|
if (t === e) {
|
|
2862
2714
|
if (this.options.ecmaVersion >= 12) {
|
|
@@ -2868,23 +2720,23 @@ m.readToken_pipe_amp = function(e) {
|
|
|
2868
2720
|
}
|
|
2869
2721
|
return t === 61 ? this.finishOp(a.assign, 2) : this.finishOp(e === 124 ? a.bitwiseOR : a.bitwiseAND, 1);
|
|
2870
2722
|
};
|
|
2871
|
-
|
|
2723
|
+
x.readToken_caret = function() {
|
|
2872
2724
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2873
2725
|
return e === 61 ? this.finishOp(a.assign, 2) : this.finishOp(a.bitwiseXOR, 1);
|
|
2874
2726
|
};
|
|
2875
|
-
|
|
2727
|
+
x.readToken_plus_min = function(e) {
|
|
2876
2728
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
2877
|
-
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 ||
|
|
2729
|
+
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || w.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);
|
|
2878
2730
|
};
|
|
2879
|
-
|
|
2731
|
+
x.readToken_lt_gt = function(e) {
|
|
2880
2732
|
var t = this.input.charCodeAt(this.pos + 1), i = 1;
|
|
2881
2733
|
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));
|
|
2882
2734
|
};
|
|
2883
|
-
|
|
2735
|
+
x.readToken_eq_excl = function(e) {
|
|
2884
2736
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
2885
2737
|
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);
|
|
2886
2738
|
};
|
|
2887
|
-
|
|
2739
|
+
x.readToken_question = function() {
|
|
2888
2740
|
var e = this.options.ecmaVersion;
|
|
2889
2741
|
if (e >= 11) {
|
|
2890
2742
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
@@ -2904,13 +2756,13 @@ m.readToken_question = function() {
|
|
|
2904
2756
|
}
|
|
2905
2757
|
return this.finishOp(a.question, 1);
|
|
2906
2758
|
};
|
|
2907
|
-
|
|
2759
|
+
x.readToken_numberSign = function() {
|
|
2908
2760
|
var e = this.options.ecmaVersion, t = 35;
|
|
2909
|
-
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(),
|
|
2761
|
+
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(), V(t, !0) || t === 92))
|
|
2910
2762
|
return this.finishToken(a.privateId, this.readWord1());
|
|
2911
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
2763
|
+
this.raise(this.pos, "Unexpected character '" + R(t) + "'");
|
|
2912
2764
|
};
|
|
2913
|
-
|
|
2765
|
+
x.getTokenFromCode = function(e) {
|
|
2914
2766
|
switch (e) {
|
|
2915
2767
|
case 46:
|
|
2916
2768
|
return this.readToken_dot();
|
|
@@ -2985,17 +2837,17 @@ m.getTokenFromCode = function(e) {
|
|
|
2985
2837
|
case 35:
|
|
2986
2838
|
return this.readToken_numberSign();
|
|
2987
2839
|
}
|
|
2988
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
2840
|
+
this.raise(this.pos, "Unexpected character '" + R(e) + "'");
|
|
2989
2841
|
};
|
|
2990
|
-
|
|
2842
|
+
x.finishOp = function(e, t) {
|
|
2991
2843
|
var i = this.input.slice(this.pos, this.pos + t);
|
|
2992
2844
|
return this.pos += t, this.finishToken(e, i);
|
|
2993
2845
|
};
|
|
2994
|
-
|
|
2846
|
+
x.readRegexp = function() {
|
|
2995
2847
|
for (var e, t, i = this.pos; ; ) {
|
|
2996
2848
|
this.pos >= this.input.length && this.raise(i, "Unterminated regular expression");
|
|
2997
2849
|
var s = this.input.charAt(this.pos);
|
|
2998
|
-
if (
|
|
2850
|
+
if (w.test(s) && this.raise(i, "Unterminated regular expression"), e)
|
|
2999
2851
|
e = !1;
|
|
3000
2852
|
else {
|
|
3001
2853
|
if (s === "[")
|
|
@@ -3010,57 +2862,57 @@ m.readRegexp = function() {
|
|
|
3010
2862
|
}
|
|
3011
2863
|
var r = this.input.slice(i, this.pos);
|
|
3012
2864
|
++this.pos;
|
|
3013
|
-
var n = this.pos,
|
|
2865
|
+
var n = this.pos, u = this.readWord1();
|
|
3014
2866
|
this.containsEsc && this.unexpected(n);
|
|
3015
|
-
var
|
|
3016
|
-
|
|
3017
|
-
var
|
|
2867
|
+
var o = this.regexpState || (this.regexpState = new L(this));
|
|
2868
|
+
o.reset(i, r, u), this.validateRegExpFlags(o), this.validateRegExpPattern(o);
|
|
2869
|
+
var h = null;
|
|
3018
2870
|
try {
|
|
3019
|
-
|
|
2871
|
+
h = new RegExp(r, u);
|
|
3020
2872
|
} catch {
|
|
3021
2873
|
}
|
|
3022
|
-
return this.finishToken(a.regexp, { pattern: r, flags:
|
|
2874
|
+
return this.finishToken(a.regexp, { pattern: r, flags: u, value: h });
|
|
3023
2875
|
};
|
|
3024
|
-
|
|
3025
|
-
for (var s = this.options.ecmaVersion >= 12 && t === void 0, r = i && this.input.charCodeAt(this.pos) === 48, n = this.pos,
|
|
3026
|
-
var
|
|
3027
|
-
if (s &&
|
|
3028
|
-
r && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"),
|
|
2876
|
+
x.readInt = function(e, t, i) {
|
|
2877
|
+
for (var s = this.options.ecmaVersion >= 12 && t === void 0, r = i && this.input.charCodeAt(this.pos) === 48, n = this.pos, u = 0, o = 0, h = 0, l = t ?? 1 / 0; h < l; ++h, ++this.pos) {
|
|
2878
|
+
var d = this.input.charCodeAt(this.pos), g = void 0;
|
|
2879
|
+
if (s && d === 95) {
|
|
2880
|
+
r && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), o === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), h === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), o = d;
|
|
3029
2881
|
continue;
|
|
3030
2882
|
}
|
|
3031
|
-
if (
|
|
2883
|
+
if (d >= 97 ? g = d - 97 + 10 : d >= 65 ? g = d - 65 + 10 : d >= 48 && d <= 57 ? g = d - 48 : g = 1 / 0, g >= e)
|
|
3032
2884
|
break;
|
|
3033
|
-
|
|
2885
|
+
o = d, u = u * e + g;
|
|
3034
2886
|
}
|
|
3035
|
-
return s &&
|
|
2887
|
+
return s && o === 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 : u;
|
|
3036
2888
|
};
|
|
3037
|
-
function
|
|
2889
|
+
function Qt(e, t) {
|
|
3038
2890
|
return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, ""));
|
|
3039
2891
|
}
|
|
3040
|
-
function
|
|
2892
|
+
function ht(e) {
|
|
3041
2893
|
return typeof BigInt != "function" ? null : BigInt(e.replace(/_/g, ""));
|
|
3042
2894
|
}
|
|
3043
|
-
|
|
2895
|
+
x.readRadixNumber = function(e) {
|
|
3044
2896
|
var t = this.pos;
|
|
3045
2897
|
this.pos += 2;
|
|
3046
2898
|
var i = this.readInt(e);
|
|
3047
|
-
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i =
|
|
2899
|
+
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i = ht(this.input.slice(t, this.pos)), ++this.pos) : V(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(a.num, i);
|
|
3048
2900
|
};
|
|
3049
|
-
|
|
2901
|
+
x.readNumber = function(e) {
|
|
3050
2902
|
var t = this.pos;
|
|
3051
2903
|
!e && this.readInt(10, void 0, !0) === null && this.raise(t, "Invalid number");
|
|
3052
2904
|
var i = this.pos - t >= 2 && this.input.charCodeAt(t) === 48;
|
|
3053
2905
|
i && this.strict && this.raise(t, "Invalid number");
|
|
3054
2906
|
var s = this.input.charCodeAt(this.pos);
|
|
3055
2907
|
if (!i && !e && this.options.ecmaVersion >= 11 && s === 110) {
|
|
3056
|
-
var r =
|
|
3057
|
-
return ++this.pos,
|
|
2908
|
+
var r = ht(this.input.slice(t, this.pos));
|
|
2909
|
+
return ++this.pos, V(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(a.num, r);
|
|
3058
2910
|
}
|
|
3059
|
-
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")),
|
|
3060
|
-
var n =
|
|
2911
|
+
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")), V(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
2912
|
+
var n = Qt(this.input.slice(t, this.pos), i);
|
|
3061
2913
|
return this.finishToken(a.num, n);
|
|
3062
2914
|
};
|
|
3063
|
-
|
|
2915
|
+
x.readCodePoint = function() {
|
|
3064
2916
|
var e = this.input.charCodeAt(this.pos), t;
|
|
3065
2917
|
if (e === 123) {
|
|
3066
2918
|
this.options.ecmaVersion < 6 && this.unexpected();
|
|
@@ -3070,35 +2922,35 @@ m.readCodePoint = function() {
|
|
|
3070
2922
|
t = this.readHexChar(4);
|
|
3071
2923
|
return t;
|
|
3072
2924
|
};
|
|
3073
|
-
|
|
2925
|
+
x.readString = function(e) {
|
|
3074
2926
|
for (var t = "", i = ++this.pos; ; ) {
|
|
3075
2927
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
|
|
3076
2928
|
var s = this.input.charCodeAt(this.pos);
|
|
3077
2929
|
if (s === e)
|
|
3078
2930
|
break;
|
|
3079
|
-
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)) : (
|
|
2931
|
+
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)) : (H(s) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
|
|
3080
2932
|
}
|
|
3081
2933
|
return t += this.input.slice(i, this.pos++), this.finishToken(a.string, t);
|
|
3082
2934
|
};
|
|
3083
|
-
var
|
|
3084
|
-
|
|
2935
|
+
var ct = {};
|
|
2936
|
+
x.tryReadTemplateToken = function() {
|
|
3085
2937
|
this.inTemplateElement = !0;
|
|
3086
2938
|
try {
|
|
3087
2939
|
this.readTmplToken();
|
|
3088
2940
|
} catch (e) {
|
|
3089
|
-
if (e ===
|
|
2941
|
+
if (e === ct)
|
|
3090
2942
|
this.readInvalidTemplateToken();
|
|
3091
2943
|
else
|
|
3092
2944
|
throw e;
|
|
3093
2945
|
}
|
|
3094
2946
|
this.inTemplateElement = !1;
|
|
3095
2947
|
};
|
|
3096
|
-
|
|
2948
|
+
x.invalidStringToken = function(e, t) {
|
|
3097
2949
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9)
|
|
3098
|
-
throw
|
|
2950
|
+
throw ct;
|
|
3099
2951
|
this.raise(e, t);
|
|
3100
2952
|
};
|
|
3101
|
-
|
|
2953
|
+
x.readTmplToken = function() {
|
|
3102
2954
|
for (var e = "", t = this.pos; ; ) {
|
|
3103
2955
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
|
|
3104
2956
|
var i = this.input.charCodeAt(this.pos);
|
|
@@ -3106,7 +2958,7 @@ m.readTmplToken = function() {
|
|
|
3106
2958
|
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));
|
|
3107
2959
|
if (i === 92)
|
|
3108
2960
|
e += this.input.slice(t, this.pos), e += this.readEscapedChar(!0), t = this.pos;
|
|
3109
|
-
else if (
|
|
2961
|
+
else if (H(i)) {
|
|
3110
2962
|
switch (e += this.input.slice(t, this.pos), ++this.pos, i) {
|
|
3111
2963
|
case 13:
|
|
3112
2964
|
this.input.charCodeAt(this.pos) === 10 && ++this.pos;
|
|
@@ -3123,7 +2975,7 @@ m.readTmplToken = function() {
|
|
|
3123
2975
|
++this.pos;
|
|
3124
2976
|
}
|
|
3125
2977
|
};
|
|
3126
|
-
|
|
2978
|
+
x.readInvalidTemplateToken = function() {
|
|
3127
2979
|
for (; this.pos < this.input.length; this.pos++)
|
|
3128
2980
|
switch (this.input[this.pos]) {
|
|
3129
2981
|
case "\\":
|
|
@@ -3146,7 +2998,7 @@ m.readInvalidTemplateToken = function() {
|
|
|
3146
2998
|
}
|
|
3147
2999
|
this.raise(this.start, "Unterminated template");
|
|
3148
3000
|
};
|
|
3149
|
-
|
|
3001
|
+
x.readEscapedChar = function(e) {
|
|
3150
3002
|
var t = this.input.charCodeAt(++this.pos);
|
|
3151
3003
|
switch (++this.pos, t) {
|
|
3152
3004
|
case 110:
|
|
@@ -3157,7 +3009,7 @@ m.readEscapedChar = function(e) {
|
|
|
3157
3009
|
case 120:
|
|
3158
3010
|
return String.fromCharCode(this.readHexChar(2));
|
|
3159
3011
|
case 117:
|
|
3160
|
-
return
|
|
3012
|
+
return R(this.readCodePoint());
|
|
3161
3013
|
case 116:
|
|
3162
3014
|
return " ";
|
|
3163
3015
|
case 98:
|
|
@@ -3190,208 +3042,87 @@ m.readEscapedChar = function(e) {
|
|
|
3190
3042
|
e ? "Octal literal in template string" : "Octal literal in strict mode"
|
|
3191
3043
|
), String.fromCharCode(r);
|
|
3192
3044
|
}
|
|
3193
|
-
return
|
|
3045
|
+
return H(t) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(t);
|
|
3194
3046
|
}
|
|
3195
3047
|
};
|
|
3196
|
-
|
|
3048
|
+
x.readHexChar = function(e) {
|
|
3197
3049
|
var t = this.pos, i = this.readInt(16, e);
|
|
3198
3050
|
return i === null && this.invalidStringToken(t, "Bad character escape sequence"), i;
|
|
3199
3051
|
};
|
|
3200
|
-
|
|
3052
|
+
x.readWord1 = function() {
|
|
3201
3053
|
this.containsEsc = !1;
|
|
3202
3054
|
for (var e = "", t = !0, i = this.pos, s = this.options.ecmaVersion >= 6; this.pos < this.input.length; ) {
|
|
3203
3055
|
var r = this.fullCharCodeAtPos();
|
|
3204
|
-
if (
|
|
3056
|
+
if (F(r, s))
|
|
3205
3057
|
this.pos += r <= 65535 ? 1 : 2;
|
|
3206
3058
|
else if (r === 92) {
|
|
3207
3059
|
this.containsEsc = !0, e += this.input.slice(i, this.pos);
|
|
3208
3060
|
var n = this.pos;
|
|
3209
3061
|
this.input.charCodeAt(++this.pos) !== 117 && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos;
|
|
3210
|
-
var
|
|
3211
|
-
(t ?
|
|
3062
|
+
var u = this.readCodePoint();
|
|
3063
|
+
(t ? V : F)(u, s) || this.invalidStringToken(n, "Invalid Unicode escape"), e += R(u), i = this.pos;
|
|
3212
3064
|
} else
|
|
3213
3065
|
break;
|
|
3214
3066
|
t = !1;
|
|
3215
3067
|
}
|
|
3216
3068
|
return e + this.input.slice(i, this.pos);
|
|
3217
3069
|
};
|
|
3218
|
-
|
|
3070
|
+
x.readWord = function() {
|
|
3219
3071
|
var e = this.readWord1(), t = a.name;
|
|
3220
|
-
return this.keywords.test(e) && (t =
|
|
3221
|
-
};
|
|
3222
|
-
var
|
|
3223
|
-
|
|
3224
|
-
Parser:
|
|
3225
|
-
version:
|
|
3226
|
-
defaultOptions:
|
|
3227
|
-
Position:
|
|
3228
|
-
SourceLocation:
|
|
3229
|
-
getLineInfo:
|
|
3230
|
-
Node:
|
|
3231
|
-
TokenType:
|
|
3072
|
+
return this.keywords.test(e) && (t = ge[e]), this.finishToken(t, e);
|
|
3073
|
+
};
|
|
3074
|
+
var Yt = "8.15.0";
|
|
3075
|
+
y.acorn = {
|
|
3076
|
+
Parser: y,
|
|
3077
|
+
version: Yt,
|
|
3078
|
+
defaultOptions: xe,
|
|
3079
|
+
Position: X,
|
|
3080
|
+
SourceLocation: re,
|
|
3081
|
+
getLineInfo: Oe,
|
|
3082
|
+
Node: he,
|
|
3083
|
+
TokenType: v,
|
|
3232
3084
|
tokTypes: a,
|
|
3233
|
-
keywordTypes:
|
|
3234
|
-
TokContext:
|
|
3235
|
-
tokContexts:
|
|
3236
|
-
isIdentifierChar:
|
|
3237
|
-
isIdentifierStart:
|
|
3238
|
-
Token:
|
|
3239
|
-
isNewLine:
|
|
3240
|
-
lineBreak:
|
|
3241
|
-
lineBreakG:
|
|
3242
|
-
nonASCIIwhitespace:
|
|
3243
|
-
};
|
|
3244
|
-
function
|
|
3245
|
-
return
|
|
3085
|
+
keywordTypes: ge,
|
|
3086
|
+
TokContext: N,
|
|
3087
|
+
tokContexts: b,
|
|
3088
|
+
isIdentifierChar: F,
|
|
3089
|
+
isIdentifierStart: V,
|
|
3090
|
+
Token: ke,
|
|
3091
|
+
isNewLine: H,
|
|
3092
|
+
lineBreak: w,
|
|
3093
|
+
lineBreakG: vt,
|
|
3094
|
+
nonASCIIwhitespace: Le
|
|
3095
|
+
};
|
|
3096
|
+
function Xt(e, t) {
|
|
3097
|
+
return y.parse(e, t);
|
|
3246
3098
|
}
|
|
3247
|
-
function
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
ranges: !0
|
|
3253
|
-
// ←←← 必须启用,才能 slice 源码
|
|
3254
|
-
}), i = [], s = [];
|
|
3255
|
-
for (const o of t.body) {
|
|
3256
|
-
if (o.type === "FunctionDeclaration" && ((r = o.id) != null && r.name) && o.range) {
|
|
3257
|
-
const h = o.id.name, u = e.slice(o.range[0], o.range[1]);
|
|
3258
|
-
i.push({ name: h, text: u });
|
|
3259
|
-
}
|
|
3260
|
-
if (o.type === "ClassDeclaration" && ((n = o.id) != null && n.name) && o.range) {
|
|
3261
|
-
const h = o.id.name, u = e.slice(o.range[0], o.range[1]);
|
|
3262
|
-
s.push({ name: h, text: u });
|
|
3263
|
-
}
|
|
3264
|
-
}
|
|
3265
|
-
return { functions: i, classes: s };
|
|
3099
|
+
function Zt(e, t, i) {
|
|
3100
|
+
return y.parseExpressionAt(e, t, i);
|
|
3101
|
+
}
|
|
3102
|
+
function Jt(e, t) {
|
|
3103
|
+
return y.tokenizer(e, t);
|
|
3266
3104
|
}
|
|
3267
|
-
const _i = () => {
|
|
3268
|
-
const e = "v_form_global_css", t = (u = "", c = e) => {
|
|
3269
|
-
var f = r(u, c);
|
|
3270
|
-
s(f);
|
|
3271
|
-
}, i = (u = "", c = "", f = e) => {
|
|
3272
|
-
if (!u)
|
|
3273
|
-
return;
|
|
3274
|
-
let x = document.getElementsByTagName("head")[0];
|
|
3275
|
-
if (x)
|
|
3276
|
-
try {
|
|
3277
|
-
var g = r(c, f);
|
|
3278
|
-
s(f), s(g);
|
|
3279
|
-
let C = document.createElement("style");
|
|
3280
|
-
if (!C)
|
|
3281
|
-
return;
|
|
3282
|
-
C.type = "text/css", C.id = c ? f + "-" + c : f;
|
|
3283
|
-
try {
|
|
3284
|
-
C.appendChild(document.createTextNode(u.toString()));
|
|
3285
|
-
} catch {
|
|
3286
|
-
C.innerHTML = u.toString();
|
|
3287
|
-
}
|
|
3288
|
-
x.appendChild(C);
|
|
3289
|
-
} catch (C) {
|
|
3290
|
-
he.error("insert css to head fail", C);
|
|
3291
|
-
}
|
|
3292
|
-
}, s = (u) => {
|
|
3293
|
-
let c = document.getElementById(u);
|
|
3294
|
-
try {
|
|
3295
|
-
c && c.parentNode && c.parentNode.removeChild(c);
|
|
3296
|
-
} catch (f) {
|
|
3297
|
-
console.log(f, c);
|
|
3298
|
-
}
|
|
3299
|
-
}, r = (u, c) => u ? c + "-" + u : c, n = "v_form_global_functions";
|
|
3300
|
-
return {
|
|
3301
|
-
insertCustomCssToHead: i,
|
|
3302
|
-
insertGlobalFunctionsToHtml: (u) => {
|
|
3303
|
-
var c, f;
|
|
3304
|
-
try {
|
|
3305
|
-
const x = Ci(u);
|
|
3306
|
-
(c = x.functions) == null || c.forEach((g) => {
|
|
3307
|
-
let C;
|
|
3308
|
-
const E = g == null ? void 0 : g.text, P = g == null ? void 0 : g.name;
|
|
3309
|
-
try {
|
|
3310
|
-
C = new Function(`return ${E}`)();
|
|
3311
|
-
} catch (T) {
|
|
3312
|
-
he.error(`Failed to compile function "${P}":`, T);
|
|
3313
|
-
return;
|
|
3314
|
-
}
|
|
3315
|
-
window[P] = C;
|
|
3316
|
-
}), (f = x.classes) == null || f.forEach((g) => {
|
|
3317
|
-
const C = g == null ? void 0 : g.text, E = g == null ? void 0 : g.name;
|
|
3318
|
-
let P;
|
|
3319
|
-
try {
|
|
3320
|
-
P = new Function(`return ${C}`)();
|
|
3321
|
-
} catch (T) {
|
|
3322
|
-
he.error(`Failed to compile class "${E}":`, T);
|
|
3323
|
-
return;
|
|
3324
|
-
}
|
|
3325
|
-
window[E] = P;
|
|
3326
|
-
});
|
|
3327
|
-
} catch (x) {
|
|
3328
|
-
he.error("insert js to head fail", x);
|
|
3329
|
-
}
|
|
3330
|
-
},
|
|
3331
|
-
removeGlobalFunctionsToHtml: (u, c = n) => {
|
|
3332
|
-
var f = r(u, c);
|
|
3333
|
-
s(f);
|
|
3334
|
-
},
|
|
3335
|
-
removeCustomCssToHead: t
|
|
3336
|
-
};
|
|
3337
|
-
}, wt = [
|
|
3338
|
-
"width",
|
|
3339
|
-
"height",
|
|
3340
|
-
"display",
|
|
3341
|
-
"margin",
|
|
3342
|
-
"margin-left",
|
|
3343
|
-
"margin-right",
|
|
3344
|
-
"margin-top",
|
|
3345
|
-
"margin-bottom"
|
|
3346
|
-
], Si = (e, t, i) => {
|
|
3347
|
-
const s = {};
|
|
3348
|
-
return t.forEach((r) => {
|
|
3349
|
-
var n = e[r];
|
|
3350
|
-
Ue(n) || (s[r] = i ? i(r, n) : n);
|
|
3351
|
-
}), s;
|
|
3352
|
-
}, ki = (e, t, i) => {
|
|
3353
|
-
var r;
|
|
3354
|
-
const s = {};
|
|
3355
|
-
return (r = Lt(e)) == null || r.forEach((n) => {
|
|
3356
|
-
var o = e[n];
|
|
3357
|
-
t != null && t.includes(n) || (s[n] = i ? i(n, o) : o);
|
|
3358
|
-
}), s;
|
|
3359
|
-
}, At = (e, t) => ["width", "height", "display"].includes(e) ? Ue(t) || t == "auto" ? t : `${t} !important` : t, Li = (e) => new Promise((t) => {
|
|
3360
|
-
He(e).then((i) => {
|
|
3361
|
-
var s = i == null ? void 0 : i.map((r) => ({ selector: r.selector, declarations: Si(r.declarations, wt, At) }));
|
|
3362
|
-
Ge(s).then((r) => {
|
|
3363
|
-
t(r);
|
|
3364
|
-
});
|
|
3365
|
-
});
|
|
3366
|
-
}), Ri = (e) => new Promise((t) => {
|
|
3367
|
-
He(e).then((i) => {
|
|
3368
|
-
var s = i == null ? void 0 : i.map((r) => ({ selector: r.selector, declarations: ki(r.declarations, wt, At) }));
|
|
3369
|
-
Ge(s).then((r) => {
|
|
3370
|
-
t(r);
|
|
3371
|
-
});
|
|
3372
|
-
});
|
|
3373
|
-
}), Oi = (e, t) => {
|
|
3374
|
-
if (!t || !e)
|
|
3375
|
-
return;
|
|
3376
|
-
const i = Nt(e, ":root", `.${t}`), { insertCustomCssToHead: s } = _i();
|
|
3377
|
-
s(i, void 0, t);
|
|
3378
|
-
}, Fi = (e, t = !0, i) => {
|
|
3379
|
-
if (i != null && i === !1)
|
|
3380
|
-
return [];
|
|
3381
|
-
const s = wi(e);
|
|
3382
|
-
return t || (e == null ? void 0 : e.length) <= 0 ? s : s == null ? void 0 : s.filter((r) => {
|
|
3383
|
-
var n;
|
|
3384
|
-
return !!(r != null && r.widgetList) && ((n = r == null ? void 0 : r.widgetList) == null ? void 0 : n.length) > 0 || !!r.default || (r == null ? void 0 : r.slotName) === Vt.default;
|
|
3385
|
-
});
|
|
3386
|
-
}, Bi = (e, t) => e == null ? void 0 : e.find((i) => (i == null ? void 0 : i.slotName) === t), wi = (e) => Me(e);
|
|
3387
3105
|
export {
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3106
|
+
he as Node,
|
|
3107
|
+
y as Parser,
|
|
3108
|
+
X as Position,
|
|
3109
|
+
re as SourceLocation,
|
|
3110
|
+
N as TokContext,
|
|
3111
|
+
ke as Token,
|
|
3112
|
+
v as TokenType,
|
|
3113
|
+
xe as defaultOptions,
|
|
3114
|
+
Oe as getLineInfo,
|
|
3115
|
+
F as isIdentifierChar,
|
|
3116
|
+
V as isIdentifierStart,
|
|
3117
|
+
H as isNewLine,
|
|
3118
|
+
ge as keywordTypes,
|
|
3119
|
+
w as lineBreak,
|
|
3120
|
+
vt as lineBreakG,
|
|
3121
|
+
Le as nonASCIIwhitespace,
|
|
3122
|
+
Xt as parse,
|
|
3123
|
+
Zt as parseExpressionAt,
|
|
3124
|
+
b as tokContexts,
|
|
3125
|
+
a as tokTypes,
|
|
3126
|
+
Jt as tokenizer,
|
|
3127
|
+
Yt as version
|
|
3397
3128
|
};
|