@airalogy/aimd-recorder 1.20.0 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/README.zh-CN.md +5 -0
- package/dist/{AimdCodeField-BQUuM-EF.js → AimdCodeField-BN_0UQMx.js} +34 -32
- package/dist/{AimdDnaSequenceField-Cp0cgBYl.js → AimdDnaSequenceField-Bhj28fP8.js} +1 -1
- package/dist/{AimdEditor.vue_vue_type_style_index_0_lang-DTdcoNs1.js → AimdEditor.vue_vue_type_style_index_0_lang-D7c01UqN.js} +1040 -976
- package/dist/{AimdMarkdownField-D4AEz_mB.js → AimdMarkdownField-GS15pv4z.js} +4 -4
- package/dist/{AimdMarkdownNoteField-CSGaShKi.js → AimdMarkdownNoteField-H9WP8tR6.js} +15 -15
- package/dist/aimd-recorder.css +1 -1
- package/dist/{arc-jL17V0L2.js → arc-B50G9-kH.js} +1 -1
- package/dist/{architectureDiagram-3BPJPVTR-CijadmFI.js → architectureDiagram-3BPJPVTR-D9mBEbpY.js} +2 -2
- package/dist/{blockDiagram-GPEHLZMM-BPqvb85_.js → blockDiagram-GPEHLZMM-Cs4swgto.js} +4 -4
- package/dist/{c4Diagram-AAUBKEIU-i4fqlMXu.js → c4Diagram-AAUBKEIU-C12HKS3r.js} +2 -2
- package/dist/{channel-DnnUQTdl.js → channel-D69VnjVz.js} +1 -1
- package/dist/{chunk-2J33WTMH-DKKEpdr1.js → chunk-2J33WTMH-oc-89G5c.js} +1 -1
- package/dist/{chunk-4BX2VUAB-WvuuiYYH.js → chunk-4BX2VUAB-BDJS9G3r.js} +1 -1
- package/dist/{chunk-55IACEB6-B_UkHTnd.js → chunk-55IACEB6-BPl3uHcA.js} +1 -1
- package/dist/{chunk-727SXJPM-CR6Pb04P.js → chunk-727SXJPM-pWe-vDGf.js} +5 -5
- package/dist/{chunk-AQP2D5EJ-B68Ie417.js → chunk-AQP2D5EJ-D-R5sIr1.js} +3 -3
- package/dist/{chunk-FMBD7UC4-CeCGT6rb.js → chunk-FMBD7UC4-bo6Qyom1.js} +1 -1
- package/dist/{chunk-ND2GUHAM-BYN-eC_q.js → chunk-ND2GUHAM-DQMvtYV7.js} +1 -1
- package/dist/{chunk-QZHKN3VN-BNSp120j.js → chunk-QZHKN3VN-DlCn3HON.js} +1 -1
- package/dist/{classDiagram-v2-Q7XG4LA2-Cgbn4w3f.js → classDiagram-4FO5ZUOK-DzUwWFwr.js} +2 -2
- package/dist/{classDiagram-4FO5ZUOK-Cgbn4w3f.js → classDiagram-v2-Q7XG4LA2-DzUwWFwr.js} +2 -2
- package/dist/components.js +3757 -2910
- package/dist/composables.js +84 -80
- package/dist/{cose-bilkent-S5V4N54A-TfrsQ2c3.js → cose-bilkent-S5V4N54A-BXLMzfpO.js} +1 -1
- package/dist/{dagre-BM42HDAG-BAyvB_JI.js → dagre-BM42HDAG-DHnofIh9.js} +3 -3
- package/dist/{diagram-2AECGRRQ-Bijq8bHO.js → diagram-2AECGRRQ-BqTTVPsm.js} +2 -2
- package/dist/{diagram-5GNKFQAL-B3ZuTuxm.js → diagram-5GNKFQAL-D5p1UVbw.js} +3 -3
- package/dist/{diagram-KO2AKTUF-DrqLeGCI.js → diagram-KO2AKTUF-Uuoz9cFn.js} +2 -2
- package/dist/{diagram-LMA3HP47-CCSQH8O0.js → diagram-LMA3HP47-W001U31X.js} +2 -2
- package/dist/{diagram-OG6HWLK6-DM5cUEjW.js → diagram-OG6HWLK6-DL516LDr.js} +3 -3
- package/dist/{erDiagram-TEJ5UH35-DQhmDdAF.js → erDiagram-TEJ5UH35-CCxgMb67.js} +4 -4
- package/dist/{flowDiagram-I6XJVG4X-DrqiPSHI.js → flowDiagram-I6XJVG4X-nXGdmC0O.js} +6 -6
- package/dist/{ganttDiagram-6RSMTGT7-DpX_Y2vA.js → ganttDiagram-6RSMTGT7-Bi9Ro7_Z.js} +2 -2
- package/dist/{gitGraphDiagram-PVQCEYII-3isOhIyZ.js → gitGraphDiagram-PVQCEYII-w1kNAy4E.js} +3 -3
- package/dist/{graph-C30SJlSk.js → graph-CpOkL_eZ.js} +1 -1
- package/dist/{index-Dtvv88SS.js → index-Dkrf2LJl.js} +51 -51
- package/dist/index.js +62 -58
- package/dist/{infoDiagram-5YYISTIA-Cr_MlPvz.js → infoDiagram-5YYISTIA-Bde_w9T1.js} +1 -1
- package/dist/{ishikawaDiagram-YF4QCWOH-DydyFn3h.js → ishikawaDiagram-YF4QCWOH-x5M1KR0l.js} +1 -1
- package/dist/{journeyDiagram-JHISSGLW-V_5MmeOu.js → journeyDiagram-JHISSGLW-CIDQP8Zm.js} +4 -4
- package/dist/{kanban-definition-UN3LZRKU-C_XXCuvp.js → kanban-definition-UN3LZRKU-CKgO7sG8.js} +2 -2
- package/dist/{layout-85j-z7Lr.js → layout-BZYprqYR.js} +2 -2
- package/dist/{linear-DMtodz-6.js → linear-ClSH2F_v.js} +1 -1
- package/dist/{mermaid.core-CkanUCyS.js → mermaid.core-CcRV6K2R.js} +34 -34
- package/dist/{mindmap-definition-RKZ34NQL-CyikmuF2.js → mindmap-definition-RKZ34NQL-s3h6uszV.js} +3 -3
- package/dist/{pieDiagram-4H26LBE5-CesqzEGg.js → pieDiagram-4H26LBE5-CgiazyWv.js} +3 -3
- package/dist/{quadrantDiagram-W4KKPZXB-BsPKPfNd.js → quadrantDiagram-W4KKPZXB-DCPVgHoW.js} +2 -2
- package/dist/record.js +19 -19
- package/dist/{requirementDiagram-4Y6WPE33-BwB1tQvi.js → requirementDiagram-4Y6WPE33-DE6F9oSB.js} +3 -3
- package/dist/{sankeyDiagram-5OEKKPKP-CfSNbWMY.js → sankeyDiagram-5OEKKPKP-DZZoFFr-.js} +1 -1
- package/dist/{sequenceDiagram-3UESZ5HK-DZZlUNys.js → sequenceDiagram-3UESZ5HK-DaYEOl60.js} +3 -3
- package/dist/{stateDiagram-AJRCARHV-DNJmz_op.js → stateDiagram-AJRCARHV-BmgpHJlH.js} +4 -4
- package/dist/{stateDiagram-v2-BHNVJYJU-DVfDNM6l.js → stateDiagram-v2-BHNVJYJU-D49CHQD6.js} +2 -2
- package/dist/{timeline-definition-PNZ67QCA-DEUCAg_N.js → timeline-definition-PNZ67QCA-DdVLoCkC.js} +2 -2
- package/dist/{useCodeBlockRendering-DF6zm7nf.js → useCodeBlockRendering-CCuoP52e.js} +1241 -1074
- package/dist/{vennDiagram-CIIHVFJN-DVDP__od.js → vennDiagram-CIIHVFJN-CCcMKcd7.js} +1 -1
- package/dist/{wardleyDiagram-YWT4CUSO-sEtxBd33.js → wardleyDiagram-YWT4CUSO-R4UGgGWY.js} +2 -2
- package/dist/{xychartDiagram-2RQKCTM6-DM8QeR5M.js → xychartDiagram-2RQKCTM6-DyFhCubk.js} +2 -2
- package/package.json +3 -3
- package/src/__tests__/record-search-render.test.ts +108 -0
- package/src/__tests__/recorder-assigner-control.test.ts +4 -1
- package/src/__tests__/var-field-render.test.ts +556 -43
- package/src/components/AimdCodeField.vue +11 -3
- package/src/components/AimdQuizRecorder.vue +3 -1
- package/src/components/AimdRecorder.vue +52 -1882
- package/src/components/AimdRecorderSearchToolbar.vue +258 -0
- package/src/components/AimdVarField.vue +589 -17
- package/src/components/AimdVarTableField.vue +12 -6
- package/src/components/index.ts +1 -0
- package/src/composables/__tests__/useVarHelpers.test.ts +214 -7
- package/src/composables/index.ts +6 -0
- package/src/composables/useFieldRendering.ts +28 -0
- package/src/composables/useRecordSearch.ts +299 -0
- package/src/composables/useVarHelpers.ts +285 -14
- package/src/locales.ts +96 -0
- package/src/styles/recorder-surface.css +2374 -0
- package/src/styles/recorder.css +1 -0
- package/src/types.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { defineAsyncComponent as
|
|
3
|
-
import { createCodeBlockRenderer as
|
|
4
|
-
const
|
|
1
|
+
import { a6 as ge, E as Re, a7 as _r, a8 as Cr, a9 as Ar, aa as kr, ab as Er, ac as Ir, ad as Nr, ae as Tr, I as Pr, y as Vr, k as Or, L as Lr, Z as Rr, _ as Fr } from "./index-Dkrf2LJl.js";
|
|
2
|
+
import { defineAsyncComponent as xi, h as ri, reactive as Mr, shallowRef as Dr, onMounted as Br, onBeforeUnmount as jr } from "vue";
|
|
3
|
+
import { createCodeBlockRenderer as $r, loadShikiHighlighter as Ur } from "@airalogy/aimd-renderer";
|
|
4
|
+
const zr = {
|
|
5
5
|
codestr: "plaintext",
|
|
6
6
|
pystr: "python",
|
|
7
7
|
jsstr: "javascript",
|
|
@@ -9,7 +9,7 @@ const Rr = {
|
|
|
9
9
|
jsonstr: "json",
|
|
10
10
|
yamlstr: "yaml",
|
|
11
11
|
tomlstr: "ini"
|
|
12
|
-
},
|
|
12
|
+
}, Wr = {
|
|
13
13
|
code: "plaintext",
|
|
14
14
|
plaintext: "plaintext",
|
|
15
15
|
py: "python",
|
|
@@ -33,7 +33,7 @@ const Rr = {
|
|
|
33
33
|
scss: "scss",
|
|
34
34
|
less: "less",
|
|
35
35
|
xml: "xml"
|
|
36
|
-
},
|
|
36
|
+
}, qr = [
|
|
37
37
|
"CodeStr",
|
|
38
38
|
"PyStr",
|
|
39
39
|
"JsStr",
|
|
@@ -42,41 +42,41 @@ const Rr = {
|
|
|
42
42
|
"TomlStr",
|
|
43
43
|
"YamlStr"
|
|
44
44
|
];
|
|
45
|
-
function
|
|
45
|
+
function Et(e) {
|
|
46
46
|
if (typeof e != "string" || !e.trim())
|
|
47
47
|
return null;
|
|
48
48
|
const t = ge(e);
|
|
49
|
-
return
|
|
49
|
+
return zr[t] ?? Wr[t] ?? null;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
return typeof e != "string" || !e.trim() ? null : ge(e) === "text" ? "plaintext" :
|
|
51
|
+
function Kr(e) {
|
|
52
|
+
return typeof e != "string" || !e.trim() ? null : ge(e) === "text" ? "plaintext" : Et(e) ?? e.trim().toLowerCase();
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
const i =
|
|
54
|
+
function Hr(e, t) {
|
|
55
|
+
const i = Kr(t?.codeLanguage);
|
|
56
56
|
if (i)
|
|
57
57
|
return i;
|
|
58
|
-
const r =
|
|
59
|
-
return r ||
|
|
58
|
+
const r = Et(t?.inputType);
|
|
59
|
+
return r || Et(e);
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
61
|
+
function vi(e, t) {
|
|
62
|
+
return Hr(e, t) !== null;
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const Gr = xi(() => import("./AimdDnaSequenceField-Bhj28fP8.js")), Jr = xi(() => import("./AimdMarkdownField-GS15pv4z.js")), Qr = qr.map((e) => ({
|
|
65
65
|
type: e,
|
|
66
66
|
inputKind: "code"
|
|
67
67
|
}));
|
|
68
|
-
function
|
|
68
|
+
function Ae(e) {
|
|
69
69
|
return String(e).padStart(2, "0");
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function Yr(e) {
|
|
72
72
|
const t = -e.getTimezoneOffset(), i = t >= 0 ? "+" : "-", r = Math.abs(t), s = Math.floor(r / 60), n = r % 60;
|
|
73
|
-
return `${i}${
|
|
73
|
+
return `${i}${Ae(s)}:${Ae(n)}`;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
const t = e.getFullYear(), i =
|
|
77
|
-
return `${t}-${i}-${r}T${s}:${n}${
|
|
75
|
+
function Xr(e) {
|
|
76
|
+
const t = e.getFullYear(), i = Ae(e.getMonth() + 1), r = Ae(e.getDate()), s = Ae(e.getHours()), n = Ae(e.getMinutes());
|
|
77
|
+
return `${t}-${i}-${r}T${s}:${n}${Yr(e)}`;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Zr(e) {
|
|
80
80
|
if (e instanceof Date)
|
|
81
81
|
return Number.isNaN(e.getTime()) ? /* @__PURE__ */ new Date() : e;
|
|
82
82
|
if (typeof e == "string" || typeof e == "number") {
|
|
@@ -86,12 +86,12 @@ function qr(e) {
|
|
|
86
86
|
}
|
|
87
87
|
return /* @__PURE__ */ new Date();
|
|
88
88
|
}
|
|
89
|
-
const
|
|
90
|
-
...
|
|
89
|
+
const es = [
|
|
90
|
+
...Qr,
|
|
91
91
|
{
|
|
92
92
|
type: "CurrentTime",
|
|
93
93
|
inputKind: "datetime",
|
|
94
|
-
getInitialValue: ({ now: e }) =>
|
|
94
|
+
getInitialValue: ({ now: e }) => Xr(Zr(e))
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
type: "UserName",
|
|
@@ -113,7 +113,7 @@ const Kr = [
|
|
|
113
113
|
assignerError: l,
|
|
114
114
|
emitChange: c,
|
|
115
115
|
emitBlur: f
|
|
116
|
-
}) =>
|
|
116
|
+
}) => ri(Jr, {
|
|
117
117
|
class: n,
|
|
118
118
|
varId: e.id,
|
|
119
119
|
modelValue: t,
|
|
@@ -130,8 +130,8 @@ const Kr = [
|
|
|
130
130
|
{
|
|
131
131
|
type: "DNASequence",
|
|
132
132
|
inputKind: "dna",
|
|
133
|
-
getInitialValue: () =>
|
|
134
|
-
normalizeValue: ({ value: e }) =>
|
|
133
|
+
getInitialValue: () => Re(void 0),
|
|
134
|
+
normalizeValue: ({ value: e }) => Re(e),
|
|
135
135
|
renderField: ({
|
|
136
136
|
node: e,
|
|
137
137
|
value: t,
|
|
@@ -141,7 +141,7 @@ const Kr = [
|
|
|
141
141
|
extraClasses: n,
|
|
142
142
|
emitChange: a,
|
|
143
143
|
emitBlur: u
|
|
144
|
-
}) =>
|
|
144
|
+
}) => ri(Gr, {
|
|
145
145
|
class: n,
|
|
146
146
|
varId: e.id,
|
|
147
147
|
modelValue: t,
|
|
@@ -153,22 +153,22 @@ const Kr = [
|
|
|
153
153
|
})
|
|
154
154
|
}
|
|
155
155
|
];
|
|
156
|
-
function
|
|
156
|
+
function Dt(e, t) {
|
|
157
157
|
if (!t?.length)
|
|
158
158
|
return;
|
|
159
159
|
const i = ge(e);
|
|
160
160
|
return t.find((r) => ge(r.type) === i ? !0 : (r.aliases ?? []).some((s) => ge(s) === i));
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
return [...e ?? [], ...
|
|
162
|
+
function da(e) {
|
|
163
|
+
return [...e ?? [], ...es];
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
return
|
|
165
|
+
function ma(e, t, i) {
|
|
166
|
+
return _r(e, t, i);
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
return
|
|
168
|
+
function ts(e, t, i) {
|
|
169
|
+
return Ir(e, t, i);
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function ga(e) {
|
|
172
172
|
return {
|
|
173
173
|
format: "airalogy_selected_file_v1",
|
|
174
174
|
name: e.name,
|
|
@@ -177,14 +177,14 @@ function na(e) {
|
|
|
177
177
|
lastModified: e.lastModified
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
function
|
|
181
|
-
return
|
|
180
|
+
function is(e) {
|
|
181
|
+
return Tr(e);
|
|
182
182
|
}
|
|
183
|
-
function
|
|
184
|
-
return
|
|
183
|
+
function rs(e) {
|
|
184
|
+
return Cr(e);
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
return
|
|
186
|
+
function ss(e) {
|
|
187
|
+
return Ar(e, void 0, {
|
|
188
188
|
hideAiralogyFileIds: !0,
|
|
189
189
|
keys: [
|
|
190
190
|
"name",
|
|
@@ -200,8 +200,8 @@ function Qr(e) {
|
|
|
200
200
|
]
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
const i =
|
|
203
|
+
function ya(e, t) {
|
|
204
|
+
const i = xe(t), r = e.findIndex((s) => Object.is(s.value, i));
|
|
205
205
|
if (r >= 0)
|
|
206
206
|
return String(r);
|
|
207
207
|
if (i != null) {
|
|
@@ -211,12 +211,12 @@ function aa(e, t) {
|
|
|
211
211
|
}
|
|
212
212
|
return "";
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
const
|
|
216
|
-
return Number.isInteger(
|
|
214
|
+
function ba(e, t, i = "") {
|
|
215
|
+
const r = Number.parseInt(t, 10);
|
|
216
|
+
return Number.isInteger(r) && r >= 0 && r < e.length ? e[r].value : i;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
if (
|
|
218
|
+
function ns(e, t) {
|
|
219
|
+
if (vi(void 0, { inputType: e, codeLanguage: t }))
|
|
220
220
|
return "code";
|
|
221
221
|
const i = ge(e);
|
|
222
222
|
if (i) {
|
|
@@ -232,9 +232,11 @@ function Yr(e, t) {
|
|
|
232
232
|
return "time";
|
|
233
233
|
if (i === "markdown" || i === "textarea" || i === "md")
|
|
234
234
|
return "textarea";
|
|
235
|
+
if (i === "scalarlist" || i === "stringlist" || i === "strlist")
|
|
236
|
+
return "scalar-list";
|
|
235
237
|
if (i === "dna")
|
|
236
238
|
return "dna";
|
|
237
|
-
if (
|
|
239
|
+
if (Nr(i))
|
|
238
240
|
return "file";
|
|
239
241
|
if (i === "text" || i === "string")
|
|
240
242
|
return "text";
|
|
@@ -243,25 +245,114 @@ function Yr(e, t) {
|
|
|
243
245
|
function te(e) {
|
|
244
246
|
return ge(e);
|
|
245
247
|
}
|
|
246
|
-
function
|
|
247
|
-
const t =
|
|
248
|
-
|
|
248
|
+
function wi(e) {
|
|
249
|
+
const t = [];
|
|
250
|
+
let i = 0, r = null, s = "";
|
|
251
|
+
for (let n = 0; n < e.length; n += 1) {
|
|
252
|
+
const a = e[n], u = e[n - 1];
|
|
253
|
+
if (r) {
|
|
254
|
+
s += a, a === r && u !== "\\" && (r = null);
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
257
|
+
if (a === '"' || a === "'") {
|
|
258
|
+
r = a, s += a;
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
if (a === "[" || a === "(" || a === "{") {
|
|
262
|
+
i += 1, s += a;
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
if (a === "]" || a === ")" || a === "}") {
|
|
266
|
+
i = Math.max(0, i - 1), s += a;
|
|
267
|
+
continue;
|
|
268
|
+
}
|
|
269
|
+
if (a === "|" && i === 0) {
|
|
270
|
+
t.push(s.trim()), s = "";
|
|
271
|
+
continue;
|
|
272
|
+
}
|
|
273
|
+
s += a;
|
|
274
|
+
}
|
|
275
|
+
return s.trim() && t.push(s.trim()), t.length > 0 ? t : [e.trim()];
|
|
276
|
+
}
|
|
277
|
+
function be(e) {
|
|
278
|
+
return typeof e == "string" ? e.trim().replace(/\s+/g, "").toLowerCase() : "";
|
|
279
|
+
}
|
|
280
|
+
function Ue(e) {
|
|
281
|
+
let t = typeof e == "string" ? e.trim() : "";
|
|
282
|
+
for (let i = 0; i < 4; i += 1) {
|
|
283
|
+
const s = be(t).match(/^(?:typing\.)?optional\[(.*)\]$/);
|
|
284
|
+
if (s) {
|
|
285
|
+
t = s[1];
|
|
286
|
+
continue;
|
|
287
|
+
}
|
|
288
|
+
const n = wi(t);
|
|
289
|
+
if (n.length > 1) {
|
|
290
|
+
const a = n.filter((u) => {
|
|
291
|
+
const l = be(u);
|
|
292
|
+
return l !== "none" && l !== "null" && l !== "undefined";
|
|
293
|
+
});
|
|
294
|
+
if (a.length === 1) {
|
|
295
|
+
t = a[0];
|
|
296
|
+
continue;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
break;
|
|
300
|
+
}
|
|
301
|
+
return t;
|
|
302
|
+
}
|
|
303
|
+
function Xe(e) {
|
|
304
|
+
const t = typeof e == "string" ? e.trim() : "";
|
|
305
|
+
if (!t)
|
|
306
|
+
return !1;
|
|
307
|
+
const i = be(t);
|
|
308
|
+
if (/^(?:typing\.)?optional\[.*\]$/.test(i))
|
|
309
|
+
return !0;
|
|
310
|
+
const r = wi(t);
|
|
311
|
+
return r.length > 1 && r.some((s) => {
|
|
312
|
+
const n = be(s);
|
|
313
|
+
return n === "none" || n === "null" || n === "undefined";
|
|
314
|
+
});
|
|
249
315
|
}
|
|
250
|
-
function
|
|
251
|
-
const t =
|
|
252
|
-
return
|
|
316
|
+
function Si(e) {
|
|
317
|
+
const t = te(Ue(e));
|
|
318
|
+
return t === "float" || t === "int" || t === "integer" || t === "number";
|
|
253
319
|
}
|
|
254
|
-
function
|
|
255
|
-
const
|
|
320
|
+
function si(e) {
|
|
321
|
+
const t = be(e).replace(/^typing\./, "");
|
|
322
|
+
if (t === "str" || t === "string" || t === "builtins.str")
|
|
323
|
+
return "string";
|
|
324
|
+
if (t === "int" || t === "integer" || t === "builtins.int")
|
|
325
|
+
return "int";
|
|
326
|
+
if (t === "float" || t === "number" || t === "builtins.float")
|
|
327
|
+
return "float";
|
|
328
|
+
}
|
|
329
|
+
function lt(e) {
|
|
330
|
+
const t = be(Ue(e)).replace(/^typing\./, "");
|
|
331
|
+
if (t.endsWith("[]"))
|
|
332
|
+
return si(t.slice(0, -2));
|
|
333
|
+
const i = t.match(/^(?:list|array)\[(.*)\]$/);
|
|
334
|
+
return i ? si(i[1]) : void 0;
|
|
335
|
+
}
|
|
336
|
+
function as(e) {
|
|
337
|
+
return lt(e) !== void 0;
|
|
338
|
+
}
|
|
339
|
+
function Bt(e) {
|
|
340
|
+
const t = Ue(e), i = be(t).replace(/^typing\./, ""), r = te(t);
|
|
341
|
+
return r === "json" || r === "list" || i.startsWith("list[") || r === "array" || i.startsWith("array[") || r === "dict" || i.startsWith("dict[") || r === "map" || i.startsWith("map[") || r === "object" || r === "record";
|
|
342
|
+
}
|
|
343
|
+
function ni(e, t = {}) {
|
|
344
|
+
const i = ns(t.inputType, t.codeLanguage);
|
|
256
345
|
if (i)
|
|
257
346
|
return i;
|
|
258
|
-
const r = t.typePlugin ??
|
|
347
|
+
const r = t.typePlugin ?? Dt(e, t.typePlugins);
|
|
259
348
|
if (r?.inputKind)
|
|
260
349
|
return r.inputKind;
|
|
261
|
-
|
|
262
|
-
|
|
350
|
+
if (as(e))
|
|
351
|
+
return "scalar-list";
|
|
352
|
+
const s = Ue(e), n = te(s);
|
|
353
|
+
return n === "float" || n === "int" || n === "integer" || n === "number" ? "number" : n === "bool" || n === "boolean" || n === "checkbox" ? Xe(e) ? "boolean-select" : "checkbox" : n === "date" ? "date" : n === "datetime" || n === "currenttime" ? "datetime" : n === "time" || n === "duration" ? "time" : n === "dnasequence" ? "dna" : n === "md" || n === "markdown" || n === "airalogymarkdown" || Bt(e) ? "textarea" : ts(s, t.kwargs, t.fieldMeta) ? "file" : vi(s, { codeLanguage: t.codeLanguage }) ? "code" : "text";
|
|
263
354
|
}
|
|
264
|
-
function
|
|
355
|
+
function os(e) {
|
|
265
356
|
if (typeof e == "string")
|
|
266
357
|
return e;
|
|
267
358
|
if (e === null || typeof e > "u")
|
|
@@ -272,7 +363,34 @@ function Xr(e) {
|
|
|
272
363
|
return String(e);
|
|
273
364
|
}
|
|
274
365
|
}
|
|
275
|
-
function
|
|
366
|
+
function us(e, t) {
|
|
367
|
+
const i = Number(e);
|
|
368
|
+
return !Number.isFinite(i) || t === "int" && !Number.isInteger(i) ? e : i;
|
|
369
|
+
}
|
|
370
|
+
function jt(e, t = "string") {
|
|
371
|
+
return e.map((i) => i === null || typeof i > "u" ? "" : String(i).trim()).filter((i) => i.length > 0).map((i) => t === "string" ? i : us(i, t));
|
|
372
|
+
}
|
|
373
|
+
function $t(e) {
|
|
374
|
+
const t = xe(e);
|
|
375
|
+
if (Array.isArray(t))
|
|
376
|
+
return t.map((i) => i === null || typeof i > "u" ? "" : String(i));
|
|
377
|
+
if (typeof t == "string") {
|
|
378
|
+
const i = t.trim();
|
|
379
|
+
if (!i)
|
|
380
|
+
return [];
|
|
381
|
+
if (i.startsWith("["))
|
|
382
|
+
try {
|
|
383
|
+
const r = JSON.parse(i);
|
|
384
|
+
if (Array.isArray(r))
|
|
385
|
+
return r.map((s) => s === null || typeof s > "u" ? "" : String(s));
|
|
386
|
+
} catch {
|
|
387
|
+
}
|
|
388
|
+
return i.includes(`
|
|
389
|
+
`) ? i.split(/\r?\n/) : [t];
|
|
390
|
+
}
|
|
391
|
+
return t === null || typeof t > "u" ? [] : [String(t)];
|
|
392
|
+
}
|
|
393
|
+
function _e(e) {
|
|
276
394
|
if (typeof e == "number")
|
|
277
395
|
return Number.isFinite(e) ? e : void 0;
|
|
278
396
|
if (typeof e == "string" && e.trim()) {
|
|
@@ -280,25 +398,25 @@ function we(e) {
|
|
|
280
398
|
return Number.isFinite(t) ? t : void 0;
|
|
281
399
|
}
|
|
282
400
|
}
|
|
283
|
-
function
|
|
284
|
-
if (!
|
|
401
|
+
function _i(e, t) {
|
|
402
|
+
if (!Si(e) || !t)
|
|
285
403
|
return {};
|
|
286
|
-
const i = {}, r =
|
|
404
|
+
const i = {}, r = _e(t.gt), s = _e(t.ge), n = _e(t.lt), a = _e(t.le), u = _e(t.multiple_of);
|
|
287
405
|
return r !== void 0 && (i.gt = r), s !== void 0 && (i.ge = s), n !== void 0 && (i.lt = n), a !== void 0 && (i.le = a), u !== void 0 && u > 0 && (i.multiple_of = u), i;
|
|
288
406
|
}
|
|
289
|
-
function
|
|
290
|
-
const i =
|
|
407
|
+
function xa(e, t) {
|
|
408
|
+
const i = _i(e, t), r = [i.gt, i.ge].filter((n) => n !== void 0), s = [i.lt, i.le].filter((n) => n !== void 0);
|
|
291
409
|
return {
|
|
292
410
|
min: r.length ? Math.max(...r) : void 0,
|
|
293
411
|
max: s.length ? Math.min(...s) : void 0,
|
|
294
412
|
step: i.multiple_of
|
|
295
413
|
};
|
|
296
414
|
}
|
|
297
|
-
function
|
|
298
|
-
const r =
|
|
415
|
+
function ls(e, t, i) {
|
|
416
|
+
const r = _i(t, i);
|
|
299
417
|
if (Object.keys(r).length === 0 || e === null || typeof e > "u" || typeof e == "string" && e.trim() === "")
|
|
300
418
|
return null;
|
|
301
|
-
const s =
|
|
419
|
+
const s = _e(e);
|
|
302
420
|
if (s === void 0)
|
|
303
421
|
return null;
|
|
304
422
|
if (r.gt !== void 0 && !(s > r.gt))
|
|
@@ -316,14 +434,14 @@ function Zr(e, t, i) {
|
|
|
316
434
|
}
|
|
317
435
|
return null;
|
|
318
436
|
}
|
|
319
|
-
function
|
|
320
|
-
return
|
|
437
|
+
function xe(e) {
|
|
438
|
+
return Er(e);
|
|
321
439
|
}
|
|
322
|
-
function
|
|
323
|
-
return
|
|
440
|
+
function cs(e) {
|
|
441
|
+
return kr(e);
|
|
324
442
|
}
|
|
325
|
-
function
|
|
326
|
-
const t =
|
|
443
|
+
function Ci(e) {
|
|
444
|
+
const t = xe(e);
|
|
327
445
|
if (t instanceof Date)
|
|
328
446
|
return Number.isNaN(t.getTime()) ? null : t;
|
|
329
447
|
if (typeof t == "number") {
|
|
@@ -339,16 +457,16 @@ function gi(e) {
|
|
|
339
457
|
function Z(e) {
|
|
340
458
|
return String(e).padStart(2, "0");
|
|
341
459
|
}
|
|
342
|
-
function
|
|
460
|
+
function fs(e) {
|
|
343
461
|
const t = -e.getTimezoneOffset(), i = t >= 0 ? "+" : "-", r = Math.abs(t), s = Math.floor(r / 60), n = r % 60;
|
|
344
462
|
return `${i}${Z(s)}:${Z(n)}`;
|
|
345
463
|
}
|
|
346
|
-
function
|
|
464
|
+
function It(e) {
|
|
347
465
|
const t = e.getFullYear(), i = Z(e.getMonth() + 1), r = Z(e.getDate()), s = Z(e.getHours()), n = Z(e.getMinutes());
|
|
348
|
-
return `${t}-${i}-${r}T${s}:${n}${
|
|
466
|
+
return `${t}-${i}-${r}T${s}:${n}${fs(e)}`;
|
|
349
467
|
}
|
|
350
|
-
function
|
|
351
|
-
const t =
|
|
468
|
+
function hs(e) {
|
|
469
|
+
const t = xe(e);
|
|
352
470
|
if (typeof t == "string") {
|
|
353
471
|
const r = t.trim();
|
|
354
472
|
if (!r)
|
|
@@ -357,15 +475,15 @@ function ts(e) {
|
|
|
357
475
|
if (/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/.test(s))
|
|
358
476
|
return s;
|
|
359
477
|
const n = new Date(s);
|
|
360
|
-
return Number.isNaN(n.getTime()) ? e :
|
|
478
|
+
return Number.isNaN(n.getTime()) ? e : It(n);
|
|
361
479
|
}
|
|
362
480
|
if (t === null || typeof t > "u")
|
|
363
481
|
return "";
|
|
364
|
-
const i =
|
|
365
|
-
return i ?
|
|
482
|
+
const i = Ci(t);
|
|
483
|
+
return i ? It(i) : e;
|
|
366
484
|
}
|
|
367
|
-
function
|
|
368
|
-
const i =
|
|
485
|
+
function ps(e, t) {
|
|
486
|
+
const i = xe(e);
|
|
369
487
|
if (typeof i == "string" && i.trim()) {
|
|
370
488
|
const f = i.trim();
|
|
371
489
|
if (t === "date" && /^\d{4}-\d{2}-\d{2}/.test(f))
|
|
@@ -378,13 +496,13 @@ function is(e, t) {
|
|
|
378
496
|
if (t === "time" && /^\d{2}:\d{2}/.test(f))
|
|
379
497
|
return f.slice(0, 8);
|
|
380
498
|
}
|
|
381
|
-
const r =
|
|
499
|
+
const r = Ci(i);
|
|
382
500
|
if (!r)
|
|
383
501
|
return "";
|
|
384
502
|
const s = r.getFullYear(), n = Z(r.getMonth() + 1), a = Z(r.getDate()), u = Z(r.getHours()), l = Z(r.getMinutes()), c = Z(r.getSeconds());
|
|
385
503
|
return t === "date" ? `${s}-${n}-${a}` : t === "time" ? `${u}:${l}:${c}` : `${s}-${n}-${a}T${u}:${l}`;
|
|
386
504
|
}
|
|
387
|
-
function
|
|
505
|
+
function ds(e, t, i = {}) {
|
|
388
506
|
const r = i.typePlugin;
|
|
389
507
|
if (r?.getDisplayValue) {
|
|
390
508
|
const n = {
|
|
@@ -398,13 +516,32 @@ function rs(e, t, i = {}) {
|
|
|
398
516
|
};
|
|
399
517
|
return r.getDisplayValue(n);
|
|
400
518
|
}
|
|
401
|
-
const s =
|
|
402
|
-
|
|
519
|
+
const s = xe(e);
|
|
520
|
+
if (t === "date" || t === "datetime" || t === "time")
|
|
521
|
+
return ps(s, t);
|
|
522
|
+
if (t === "number")
|
|
523
|
+
return typeof s == "number" || typeof s == "string" ? s : "";
|
|
524
|
+
if (t === "boolean-select") {
|
|
525
|
+
if (typeof s == "boolean")
|
|
526
|
+
return s ? "true" : "false";
|
|
527
|
+
if (typeof s == "string") {
|
|
528
|
+
const n = s.trim().toLowerCase();
|
|
529
|
+
if (["true", "1", "yes", "on"].includes(n))
|
|
530
|
+
return "true";
|
|
531
|
+
if (["false", "0", "no", "off"].includes(n))
|
|
532
|
+
return "false";
|
|
533
|
+
}
|
|
534
|
+
return "";
|
|
535
|
+
}
|
|
536
|
+
return t === "dna" ? typeof s == "string" ? s : JSON.stringify(s) : t === "file" ? ss(s) : t === "scalar-list" ? JSON.stringify(jt(
|
|
537
|
+
$t(s),
|
|
538
|
+
lt(i.type) ?? "string"
|
|
539
|
+
)) : Bt(i.type) ? os(s) : typeof s == "string" ? s : s === null || typeof s > "u" ? "" : String(s);
|
|
403
540
|
}
|
|
404
|
-
function
|
|
405
|
-
const s = r.typePlugin ??
|
|
541
|
+
function va(e, t, i, r = {}) {
|
|
542
|
+
const s = r.typePlugin ?? Dt(t, r.typePlugins);
|
|
406
543
|
if (s?.parseInputValue) {
|
|
407
|
-
const
|
|
544
|
+
const u = {
|
|
408
545
|
type: t || "str",
|
|
409
546
|
normalizedType: te(t),
|
|
410
547
|
fieldKey: r.nodeFieldKey ?? "",
|
|
@@ -413,42 +550,54 @@ function ca(e, t, i, r = {}) {
|
|
|
413
550
|
inputKind: i,
|
|
414
551
|
fieldMeta: r.fieldMeta
|
|
415
552
|
};
|
|
416
|
-
return s.parseInputValue(
|
|
553
|
+
return s.parseInputValue(u);
|
|
417
554
|
}
|
|
418
|
-
const n = te(t);
|
|
555
|
+
const n = Xe(t), a = te(Ue(t));
|
|
556
|
+
if ((i === "date" || i === "datetime" || i === "time") && n && e.trim() === "")
|
|
557
|
+
return null;
|
|
419
558
|
if (i === "datetime")
|
|
420
|
-
return
|
|
559
|
+
return hs(e);
|
|
421
560
|
if (i === "number") {
|
|
422
|
-
const
|
|
423
|
-
if (!
|
|
424
|
-
return "";
|
|
425
|
-
const
|
|
426
|
-
return Number.isNaN(
|
|
427
|
-
}
|
|
428
|
-
if (
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
561
|
+
const u = e.trim();
|
|
562
|
+
if (!u)
|
|
563
|
+
return n ? null : "";
|
|
564
|
+
const l = a === "int" || a === "integer" ? Number.parseInt(u, 10) : Number.parseFloat(u);
|
|
565
|
+
return Number.isNaN(l) ? e : l;
|
|
566
|
+
}
|
|
567
|
+
if (i === "scalar-list")
|
|
568
|
+
return jt(
|
|
569
|
+
$t(e),
|
|
570
|
+
lt(t) ?? "string"
|
|
571
|
+
);
|
|
572
|
+
if (i === "boolean-select") {
|
|
573
|
+
const u = e.trim().toLowerCase();
|
|
574
|
+
return u ? u === "true" ? !0 : u === "false" ? !1 : e : null;
|
|
575
|
+
}
|
|
576
|
+
if (Bt(t)) {
|
|
577
|
+
const u = e.trim();
|
|
578
|
+
if (!u)
|
|
579
|
+
return n ? null : "";
|
|
432
580
|
try {
|
|
433
|
-
return JSON.parse(
|
|
581
|
+
return JSON.parse(u);
|
|
434
582
|
} catch {
|
|
435
583
|
return e;
|
|
436
584
|
}
|
|
437
585
|
}
|
|
438
|
-
return e;
|
|
586
|
+
return n && e.trim() === "" ? null : e;
|
|
439
587
|
}
|
|
440
|
-
function
|
|
588
|
+
function Ai(e) {
|
|
441
589
|
switch (e) {
|
|
442
590
|
case "textarea":
|
|
443
591
|
case "dna":
|
|
444
592
|
case "code":
|
|
445
593
|
case "file":
|
|
446
|
-
|
|
594
|
+
case "scalar-list":
|
|
595
|
+
return e === "scalar-list" ? 220 : 160;
|
|
447
596
|
default:
|
|
448
597
|
return 0;
|
|
449
598
|
}
|
|
450
599
|
}
|
|
451
|
-
function
|
|
600
|
+
function ms(e) {
|
|
452
601
|
switch (e) {
|
|
453
602
|
case "datetime":
|
|
454
603
|
return 36;
|
|
@@ -458,11 +607,13 @@ function ss(e) {
|
|
|
458
607
|
return 28;
|
|
459
608
|
case "file":
|
|
460
609
|
return 24;
|
|
610
|
+
case "scalar-list":
|
|
611
|
+
return 16;
|
|
461
612
|
default:
|
|
462
613
|
return 4;
|
|
463
614
|
}
|
|
464
615
|
}
|
|
465
|
-
function
|
|
616
|
+
function gs(e) {
|
|
466
617
|
if (!e?.classList.contains("aimd-rec-inline__file-control"))
|
|
467
618
|
return 0;
|
|
468
619
|
switch (e.dataset.fileKind) {
|
|
@@ -474,57 +625,57 @@ function ns(e) {
|
|
|
474
625
|
return 220;
|
|
475
626
|
}
|
|
476
627
|
}
|
|
477
|
-
function
|
|
478
|
-
const i = Math.max(e.length + 7, 10), n = Math.round(i * 8 + 16), a =
|
|
628
|
+
function wa(e, t) {
|
|
629
|
+
const i = Math.max(e.length + 7, 10), n = Math.round(i * 8 + 16), a = Ai(t);
|
|
479
630
|
return `${Math.max(a, n)}px`;
|
|
480
631
|
}
|
|
481
632
|
function R(e) {
|
|
482
633
|
const t = Number.parseFloat(e);
|
|
483
634
|
return Number.isFinite(t) ? t : 0;
|
|
484
635
|
}
|
|
485
|
-
let
|
|
486
|
-
function
|
|
487
|
-
return typeof window > "u" ? null : (
|
|
636
|
+
let wt = null;
|
|
637
|
+
function ki() {
|
|
638
|
+
return typeof window > "u" ? null : (wt || (wt = document.createElement("canvas")), wt.getContext("2d"));
|
|
488
639
|
}
|
|
489
|
-
function
|
|
490
|
-
const i =
|
|
640
|
+
function ys(e, t) {
|
|
641
|
+
const i = ki();
|
|
491
642
|
if (!i)
|
|
492
643
|
return 0;
|
|
493
644
|
const r = t.fontSize || "16px", s = t.fontFamily || "sans-serif", n = t.fontWeight || "400", a = t.fontStyle || "normal";
|
|
494
645
|
return i.font = `${a} ${n} ${r} ${s}`, i.measureText(e).width;
|
|
495
646
|
}
|
|
496
|
-
function
|
|
647
|
+
function Ne(e) {
|
|
497
648
|
if (typeof window > "u")
|
|
498
649
|
return e.scrollWidth;
|
|
499
|
-
const t = window.getComputedStyle(e), i = (e.textContent || "").trim(), r =
|
|
650
|
+
const t = window.getComputedStyle(e), i = (e.textContent || "").trim(), r = ys(i, t), s = R(t.paddingLeft) + R(t.paddingRight) + R(t.borderLeftWidth) + R(t.borderRightWidth) + R(t.marginLeft) + R(t.marginRight);
|
|
500
651
|
return r + s;
|
|
501
652
|
}
|
|
502
|
-
function
|
|
653
|
+
function bs(e) {
|
|
503
654
|
if (typeof window > "u")
|
|
504
655
|
return 0;
|
|
505
656
|
const t = window.getComputedStyle(e);
|
|
506
657
|
return R(t.paddingLeft) + R(t.paddingRight) + R(t.borderLeftWidth) + R(t.borderRightWidth) + R(t.marginLeft) + R(t.marginRight);
|
|
507
658
|
}
|
|
508
|
-
function
|
|
659
|
+
function xs(e) {
|
|
509
660
|
const t = e.querySelector(".aimd-field__title"), i = e.querySelector(".aimd-field__key"), r = Math.max(
|
|
510
|
-
t ?
|
|
511
|
-
i ?
|
|
661
|
+
t ? Ne(t) : 0,
|
|
662
|
+
i ? Ne(i) : 0
|
|
512
663
|
);
|
|
513
|
-
return r > 0 ? r +
|
|
664
|
+
return r > 0 ? r + bs(e) : Ne(e);
|
|
514
665
|
}
|
|
515
|
-
function
|
|
666
|
+
function vs(e) {
|
|
516
667
|
const t = e.querySelector(".aimd-field__scope--var"), i = e.querySelector(".aimd-field__name"), r = e.querySelector(".aimd-field__id");
|
|
517
668
|
if (t && i)
|
|
518
|
-
return
|
|
669
|
+
return Ne(t) + xs(i) + 4;
|
|
519
670
|
if (t && r)
|
|
520
|
-
return
|
|
671
|
+
return Ne(t) + Ne(r) + 4;
|
|
521
672
|
const s = e.querySelector(".aimd-field__label");
|
|
522
673
|
return s ? s.scrollWidth + 2 : 0;
|
|
523
674
|
}
|
|
524
|
-
function
|
|
675
|
+
function ws(e) {
|
|
525
676
|
if (typeof window > "u")
|
|
526
677
|
return e.scrollWidth;
|
|
527
|
-
const t =
|
|
678
|
+
const t = ki();
|
|
528
679
|
if (!t)
|
|
529
680
|
return e.scrollWidth;
|
|
530
681
|
const i = window.getComputedStyle(e), r = i.fontSize || "16px", s = i.fontFamily || "sans-serif", n = i.fontWeight || "400", a = i.fontStyle || "normal";
|
|
@@ -532,11 +683,11 @@ function cs(e) {
|
|
|
532
683
|
const u = "value" in e ? e.value || e.placeholder || "" : (e.textContent || "").trim(), l = t.measureText(u).width, c = R(i.paddingLeft) + R(i.paddingRight);
|
|
533
684
|
return l + c + 2;
|
|
534
685
|
}
|
|
535
|
-
function
|
|
686
|
+
function ai(e, t, i) {
|
|
536
687
|
const r = e.querySelector(t);
|
|
537
688
|
return r ? r.offsetWidth || i : 0;
|
|
538
689
|
}
|
|
539
|
-
function
|
|
690
|
+
function Sa(e) {
|
|
540
691
|
if (typeof window > "u")
|
|
541
692
|
return;
|
|
542
693
|
const t = e.classList.contains("aimd-rec-inline__textarea--stacked-text");
|
|
@@ -549,35 +700,43 @@ function ha(e) {
|
|
|
549
700
|
const s = R(i.borderTopWidth) + R(i.borderBottomWidth), n = Math.max(r, e.scrollHeight + s);
|
|
550
701
|
e.style.height = `${Math.ceil(n)}px`;
|
|
551
702
|
}
|
|
552
|
-
function
|
|
703
|
+
function _a(e, t) {
|
|
553
704
|
const i = e.closest(".aimd-rec-inline--var-stacked");
|
|
554
705
|
if (!i || typeof window > "u")
|
|
555
706
|
return;
|
|
556
|
-
|
|
707
|
+
if (t === "scalar-list") {
|
|
708
|
+
i.style.width = "100%", i.style.maxWidth = "100%";
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
if (i.closest("table:not(.aimd-rec-inline-table__table):not(.aimd-scale__table)")) {
|
|
712
|
+
i.style.width = "max-content", i.style.maxWidth = "min(680px, 100%)";
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
const r = vs(i);
|
|
557
716
|
let s = 0;
|
|
558
|
-
const n = i.querySelector(".aimd-rec-inline__input--stacked, .aimd-rec-inline__textarea--stacked-text, .aimd-rec-inline__file-control"), a = Math.max(
|
|
559
|
-
n && (s =
|
|
717
|
+
const n = i.querySelector(".aimd-rec-inline__input--stacked, .aimd-rec-inline__textarea--stacked-text, .aimd-rec-inline__file-control, .aimd-rec-inline__scalar-list"), a = Math.max(Ai(t), gs(n));
|
|
718
|
+
n && (s = ws(n) + ms(t)), i.querySelector(".aimd-rec-inline__control-row") && (s += ai(i, ".aimd-rec-inline__assigner-prefix", 36) + ai(i, ".aimd-rec-inline__assigner-status", 30));
|
|
560
719
|
const u = Math.max(a, r, s);
|
|
561
720
|
i.style.width = `${Math.ceil(u)}px`, i.style.maxWidth = "100%";
|
|
562
721
|
}
|
|
563
722
|
function F(e) {
|
|
564
723
|
return e !== null && typeof e == "object" && !Array.isArray(e);
|
|
565
724
|
}
|
|
566
|
-
function
|
|
725
|
+
function Ss(e) {
|
|
567
726
|
return F(e) && Object.keys(e).length === 0;
|
|
568
727
|
}
|
|
569
|
-
function
|
|
728
|
+
function Ei(e, t) {
|
|
570
729
|
for (const i of t) {
|
|
571
730
|
const r = e[i];
|
|
572
731
|
if (typeof r == "string" && r.trim())
|
|
573
732
|
return r.trim();
|
|
574
733
|
}
|
|
575
734
|
}
|
|
576
|
-
function
|
|
735
|
+
function oi(e) {
|
|
577
736
|
if (typeof e == "string" && e.trim())
|
|
578
737
|
return e.trim();
|
|
579
738
|
if (F(e))
|
|
580
|
-
return
|
|
739
|
+
return Ei(e, [
|
|
581
740
|
"error_message",
|
|
582
741
|
"errorMessage",
|
|
583
742
|
"message",
|
|
@@ -585,49 +744,49 @@ function ei(e) {
|
|
|
585
744
|
"reason"
|
|
586
745
|
]);
|
|
587
746
|
}
|
|
588
|
-
function
|
|
747
|
+
function Ii(e) {
|
|
589
748
|
const t = [e], i = (r) => {
|
|
590
749
|
F(r) && (t.push(r.data), t.push(r.result), F(r.data) && t.push(r.data.result), F(r.result) && t.push(r.result.data));
|
|
591
750
|
};
|
|
592
751
|
return i(e), F(e) && (i(e.data), i(e.result)), t;
|
|
593
752
|
}
|
|
594
|
-
function
|
|
753
|
+
function _s(e) {
|
|
595
754
|
if (typeof e == "string" && e.trim()) return e.trim();
|
|
596
755
|
if (!F(e)) return "";
|
|
597
756
|
const t = e.name ?? e.id;
|
|
598
757
|
return typeof t == "string" && t.trim() ? t.trim() : "";
|
|
599
758
|
}
|
|
600
|
-
function
|
|
601
|
-
return Array.isArray(e) ? new Set(e.map(
|
|
759
|
+
function Ke(e) {
|
|
760
|
+
return Array.isArray(e) ? new Set(e.map(_s).filter(Boolean)) : /* @__PURE__ */ new Set();
|
|
602
761
|
}
|
|
603
|
-
function
|
|
762
|
+
function Ni(e) {
|
|
604
763
|
if (!F(e)) return [];
|
|
605
764
|
const t = e.dependent_fields;
|
|
606
765
|
return Array.isArray(t) ? t.map((i) => typeof i == "string" ? i.trim() : "").filter(Boolean) : [];
|
|
607
766
|
}
|
|
608
|
-
function
|
|
767
|
+
function Cs(e) {
|
|
609
768
|
return F(e) ? (Array.isArray(e.assigned_fields) ? e.assigned_fields : Array.isArray(e.assignedFields) ? e.assignedFields : []).map((i) => typeof i == "string" ? i.trim() : "").filter(Boolean) : [];
|
|
610
769
|
}
|
|
611
|
-
function
|
|
770
|
+
function As(e) {
|
|
612
771
|
if (!F(e)) return "manual";
|
|
613
772
|
const t = e.mode;
|
|
614
773
|
return typeof t == "string" && t.trim() ? t.trim() : "manual";
|
|
615
774
|
}
|
|
616
|
-
function
|
|
775
|
+
function Ca(e) {
|
|
617
776
|
return e === "auto" || e === "auto_first" || e === "auto_force" || e === "manual" || e === "manual_readonly" || e === "auto_readonly" ? e : "manual";
|
|
618
777
|
}
|
|
619
|
-
function
|
|
778
|
+
function Aa(e) {
|
|
620
779
|
return e === "auto_readonly" || e === "manual_readonly";
|
|
621
780
|
}
|
|
622
|
-
function
|
|
781
|
+
function ks(e) {
|
|
623
782
|
return {
|
|
624
|
-
var:
|
|
625
|
-
varTable:
|
|
626
|
-
step:
|
|
627
|
-
check:
|
|
783
|
+
var: Ke(e?.var),
|
|
784
|
+
varTable: Ke(e?.var_table),
|
|
785
|
+
step: Ke(e?.step),
|
|
786
|
+
check: Ke(e?.check)
|
|
628
787
|
};
|
|
629
788
|
}
|
|
630
|
-
function
|
|
789
|
+
function Es(e, t = {}) {
|
|
631
790
|
const i = e.trim();
|
|
632
791
|
if (i.includes(".")) {
|
|
633
792
|
const [r, ...s] = i.split(".");
|
|
@@ -635,44 +794,44 @@ function gs(e, t = {}) {
|
|
|
635
794
|
}
|
|
636
795
|
return t.varTable?.has(i) ? `var_table:${i}` : t.step?.has(i) ? `step:${i}` : t.check?.has(i) ? `check:${i}` : `var:${i}`;
|
|
637
796
|
}
|
|
638
|
-
function
|
|
797
|
+
function ka(e, t) {
|
|
639
798
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
640
799
|
return [];
|
|
641
|
-
const i =
|
|
800
|
+
const i = ks(t);
|
|
642
801
|
return Object.entries(e).flatMap(([r, s]) => {
|
|
643
802
|
const n = r.trim();
|
|
644
803
|
if (!n) return [];
|
|
645
|
-
const a = F(s) ? s : {}, u =
|
|
804
|
+
const a = F(s) ? s : {}, u = As(a), l = Ni(a);
|
|
646
805
|
return [.../* @__PURE__ */ new Set([
|
|
647
806
|
n,
|
|
648
|
-
...
|
|
807
|
+
...Cs(a)
|
|
649
808
|
])].map((f) => ({
|
|
650
809
|
assignedField: f,
|
|
651
|
-
fieldKey:
|
|
810
|
+
fieldKey: Es(f, i),
|
|
652
811
|
mode: u,
|
|
653
812
|
dependentFields: l,
|
|
654
813
|
assigner: a
|
|
655
814
|
}));
|
|
656
815
|
});
|
|
657
816
|
}
|
|
658
|
-
function
|
|
817
|
+
function Ze(e) {
|
|
659
818
|
if (e !== "") {
|
|
660
819
|
if (Array.isArray(e))
|
|
661
|
-
return e.map((i) =>
|
|
820
|
+
return e.map((i) => Ze(i)).filter((i) => i !== void 0 && !Ss(i));
|
|
662
821
|
if (F(e)) {
|
|
663
|
-
const t =
|
|
664
|
-
return
|
|
665
|
-
Object.entries(e).map(([r, s]) => [r,
|
|
822
|
+
const t = rs(e);
|
|
823
|
+
return is(t) ? t : Object.fromEntries(
|
|
824
|
+
Object.entries(e).map(([r, s]) => [r, Ze(s)]).filter(([, r]) => r !== void 0)
|
|
666
825
|
);
|
|
667
826
|
}
|
|
668
827
|
return e;
|
|
669
828
|
}
|
|
670
829
|
}
|
|
671
|
-
function
|
|
672
|
-
const t =
|
|
830
|
+
function Is(e) {
|
|
831
|
+
const t = Ze(e);
|
|
673
832
|
return F(t) ? t : {};
|
|
674
833
|
}
|
|
675
|
-
function
|
|
834
|
+
function Ns(e, t) {
|
|
676
835
|
if (Object.prototype.hasOwnProperty.call(e.var, t)) return e.var[t];
|
|
677
836
|
if (Object.prototype.hasOwnProperty.call(e.step, t)) return e.step[t];
|
|
678
837
|
if (Object.prototype.hasOwnProperty.call(e.check, t)) return e.check[t];
|
|
@@ -683,14 +842,14 @@ function bs(e, t) {
|
|
|
683
842
|
return n.map((a) => F(a) ? a[s] : void 0);
|
|
684
843
|
}
|
|
685
844
|
}
|
|
686
|
-
function
|
|
687
|
-
const i = Array.isArray(t?.dependentFields) ? t.dependentFields :
|
|
688
|
-
return i.length === 0 ?
|
|
689
|
-
i.map((r) => [r,
|
|
845
|
+
function Ea(e, t) {
|
|
846
|
+
const i = Array.isArray(t?.dependentFields) ? t.dependentFields : Ni(t);
|
|
847
|
+
return i.length === 0 ? Is(e.var) : Object.fromEntries(
|
|
848
|
+
i.map((r) => [r, Ze(Ns(e, r))]).filter(([, r]) => r !== void 0)
|
|
690
849
|
);
|
|
691
850
|
}
|
|
692
|
-
function
|
|
693
|
-
const t =
|
|
851
|
+
function Ia(e) {
|
|
852
|
+
const t = Ii(e);
|
|
694
853
|
for (const i of t) {
|
|
695
854
|
if (!F(i)) continue;
|
|
696
855
|
const r = i.assigned_fields;
|
|
@@ -700,23 +859,23 @@ function ba(e) {
|
|
|
700
859
|
}
|
|
701
860
|
return {};
|
|
702
861
|
}
|
|
703
|
-
function
|
|
704
|
-
const t =
|
|
862
|
+
function Na(e) {
|
|
863
|
+
const t = Ii(e);
|
|
705
864
|
for (const i of t) {
|
|
706
865
|
if (!F(i)) continue;
|
|
707
866
|
const r = i.success, s = i.status;
|
|
708
867
|
if (r === !1 || r === "false" || s === "error" || s === "failed")
|
|
709
|
-
return
|
|
868
|
+
return Ei(i, [
|
|
710
869
|
"error_message",
|
|
711
870
|
"errorMessage",
|
|
712
871
|
"message",
|
|
713
872
|
"detail",
|
|
714
873
|
"reason",
|
|
715
874
|
"output"
|
|
716
|
-
]) ??
|
|
875
|
+
]) ?? oi(i.error) ?? oi(i.exception) ?? "Assigner failed";
|
|
717
876
|
}
|
|
718
877
|
}
|
|
719
|
-
function
|
|
878
|
+
function Ta(e, t) {
|
|
720
879
|
let i = !1;
|
|
721
880
|
for (const [r, s] of Object.entries(t)) {
|
|
722
881
|
const n = r.trim();
|
|
@@ -733,11 +892,11 @@ function va(e, t) {
|
|
|
733
892
|
}
|
|
734
893
|
}
|
|
735
894
|
if (Object.prototype.hasOwnProperty.call(e.step, n)) {
|
|
736
|
-
e.step[n] =
|
|
895
|
+
e.step[n] = Pr(s), i = !0;
|
|
737
896
|
continue;
|
|
738
897
|
}
|
|
739
898
|
if (Object.prototype.hasOwnProperty.call(e.check, n)) {
|
|
740
|
-
e.check[n] =
|
|
899
|
+
e.check[n] = Vr(s), i = !0;
|
|
741
900
|
continue;
|
|
742
901
|
}
|
|
743
902
|
e.var[n] = s, i = !0;
|
|
@@ -745,21 +904,21 @@ function va(e, t) {
|
|
|
745
904
|
}
|
|
746
905
|
return i;
|
|
747
906
|
}
|
|
748
|
-
function
|
|
907
|
+
function Pa(e, t) {
|
|
749
908
|
const i = `${e}:`;
|
|
750
909
|
return t.startsWith(i) ? t.slice(i.length) : t;
|
|
751
910
|
}
|
|
752
|
-
function
|
|
911
|
+
function Ts(e) {
|
|
753
912
|
if (typeof window > "u")
|
|
754
913
|
return !1;
|
|
755
914
|
const t = window.getComputedStyle(e), i = t.overflowY || t.overflow, r = t.overflowX || t.overflow, s = /(auto|scroll|overlay)/.test(i) && e.scrollHeight > e.clientHeight, n = /(auto|scroll|overlay)/.test(r) && e.scrollWidth > e.clientWidth;
|
|
756
915
|
return s || n;
|
|
757
916
|
}
|
|
758
|
-
function
|
|
917
|
+
function Ps(e, t) {
|
|
759
918
|
const i = [], r = /* @__PURE__ */ new Set(), s = (n) => {
|
|
760
919
|
let a = n;
|
|
761
920
|
for (; a && a !== document.body; )
|
|
762
|
-
!r.has(a) &&
|
|
921
|
+
!r.has(a) && Ts(a) && (r.add(a), i.push({
|
|
763
922
|
element: a,
|
|
764
923
|
top: a.scrollTop,
|
|
765
924
|
left: a.scrollLeft
|
|
@@ -767,7 +926,7 @@ function vs(e, t) {
|
|
|
767
926
|
};
|
|
768
927
|
return s(t), s(e), i.length ? i : void 0;
|
|
769
928
|
}
|
|
770
|
-
function
|
|
929
|
+
function Va(e) {
|
|
771
930
|
if (typeof document > "u" || !e)
|
|
772
931
|
return null;
|
|
773
932
|
const t = document.activeElement;
|
|
@@ -777,9 +936,9 @@ function Sa(e) {
|
|
|
777
936
|
if (!i)
|
|
778
937
|
return null;
|
|
779
938
|
const r = { key: i };
|
|
780
|
-
return (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && (r.selectionStart = t.selectionStart, r.selectionEnd = t.selectionEnd, r.selectionDirection = t.selectionDirection), r.scrollTargets =
|
|
939
|
+
return (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && (r.selectionStart = t.selectionStart, r.selectionEnd = t.selectionEnd, r.selectionDirection = t.selectionDirection), r.scrollTargets = Ps(e, t), r.windowScrollX = window.scrollX, r.windowScrollY = window.scrollY, r;
|
|
781
940
|
}
|
|
782
|
-
function
|
|
941
|
+
function Oa(e, t) {
|
|
783
942
|
if (!t || !e)
|
|
784
943
|
return;
|
|
785
944
|
const i = e.querySelectorAll("[data-rec-focus-key]");
|
|
@@ -809,18 +968,18 @@ function _a(e, t) {
|
|
|
809
968
|
typeof window < "u" && window.scrollTo(t.windowScrollX ?? window.scrollX, t.windowScrollY ?? window.scrollY);
|
|
810
969
|
}
|
|
811
970
|
}
|
|
812
|
-
var
|
|
971
|
+
var Vs = [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], Ti = [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], Os = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", Pi = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", St = {
|
|
813
972
|
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",
|
|
814
973
|
5: "class enum extends super const export import",
|
|
815
974
|
6: "enum",
|
|
816
975
|
strict: "implements interface let package private protected public static yield",
|
|
817
976
|
strictBind: "eval arguments"
|
|
818
|
-
},
|
|
819
|
-
5:
|
|
820
|
-
"5module":
|
|
821
|
-
6:
|
|
822
|
-
},
|
|
823
|
-
function
|
|
977
|
+
}, _t = "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", Ls = {
|
|
978
|
+
5: _t,
|
|
979
|
+
"5module": _t + " export import",
|
|
980
|
+
6: _t + " const class extends export import super"
|
|
981
|
+
}, Rs = /^in(stanceof)?$/, Fs = new RegExp("[" + Pi + "]"), Ms = new RegExp("[" + Pi + Os + "]");
|
|
982
|
+
function Nt(e, t) {
|
|
824
983
|
for (var i = 65536, r = 0; r < t.length; r += 2) {
|
|
825
984
|
if (i += t[r], i > e)
|
|
826
985
|
return !1;
|
|
@@ -830,10 +989,10 @@ function kt(e, t) {
|
|
|
830
989
|
return !1;
|
|
831
990
|
}
|
|
832
991
|
function ie(e, t) {
|
|
833
|
-
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
992
|
+
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && Fs.test(String.fromCharCode(e)) : t === !1 ? !1 : Nt(e, Ti);
|
|
834
993
|
}
|
|
835
994
|
function he(e, t) {
|
|
836
|
-
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 &&
|
|
995
|
+
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 && Ms.test(String.fromCharCode(e)) : t === !1 ? !1 : Nt(e, Ti) || Nt(e, Vs);
|
|
837
996
|
}
|
|
838
997
|
var I = function(t, i) {
|
|
839
998
|
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;
|
|
@@ -841,9 +1000,9 @@ var I = function(t, i) {
|
|
|
841
1000
|
function G(e, t) {
|
|
842
1001
|
return new I(e, { beforeExpr: !0, binop: t });
|
|
843
1002
|
}
|
|
844
|
-
var J = { beforeExpr: !0 }, q = { startsExpr: !0 },
|
|
1003
|
+
var J = { beforeExpr: !0 }, q = { startsExpr: !0 }, Ut = {};
|
|
845
1004
|
function E(e, t) {
|
|
846
|
-
return t === void 0 && (t = {}), t.keyword = e,
|
|
1005
|
+
return t === void 0 && (t = {}), t.keyword = e, Ut[e] = new I(e, t);
|
|
847
1006
|
}
|
|
848
1007
|
var o = {
|
|
849
1008
|
num: new I("num", q),
|
|
@@ -938,48 +1097,48 @@ var o = {
|
|
|
938
1097
|
_typeof: E("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
939
1098
|
_void: E("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
940
1099
|
_delete: E("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
941
|
-
}, K = /\r\n?|\n|\u2028|\u2029/,
|
|
942
|
-
function
|
|
1100
|
+
}, K = /\r\n?|\n|\u2028|\u2029/, Ds = new RegExp(K.source, "g");
|
|
1101
|
+
function Te(e) {
|
|
943
1102
|
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
944
1103
|
}
|
|
945
|
-
function
|
|
1104
|
+
function Vi(e, t, i) {
|
|
946
1105
|
i === void 0 && (i = e.length);
|
|
947
1106
|
for (var r = t; r < i; r++) {
|
|
948
1107
|
var s = e.charCodeAt(r);
|
|
949
|
-
if (
|
|
1108
|
+
if (Te(s))
|
|
950
1109
|
return r < i - 1 && s === 13 && e.charCodeAt(r + 1) === 10 ? r + 2 : r + 1;
|
|
951
1110
|
}
|
|
952
1111
|
return -1;
|
|
953
1112
|
}
|
|
954
|
-
var
|
|
955
|
-
return
|
|
956
|
-
}),
|
|
957
|
-
return
|
|
958
|
-
}),
|
|
1113
|
+
var Oi = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, $ = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, Li = Object.prototype, Bs = Li.hasOwnProperty, js = Li.toString, Pe = Object.hasOwn || (function(e, t) {
|
|
1114
|
+
return Bs.call(e, t);
|
|
1115
|
+
}), ui = Array.isArray || (function(e) {
|
|
1116
|
+
return js.call(e) === "[object Array]";
|
|
1117
|
+
}), li = /* @__PURE__ */ Object.create(null);
|
|
959
1118
|
function fe(e) {
|
|
960
|
-
return
|
|
1119
|
+
return li[e] || (li[e] = new RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
|
|
961
1120
|
}
|
|
962
1121
|
function ue(e) {
|
|
963
1122
|
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320));
|
|
964
1123
|
}
|
|
965
|
-
var
|
|
1124
|
+
var $s = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, Be = function(t, i) {
|
|
966
1125
|
this.line = t, this.column = i;
|
|
967
1126
|
};
|
|
968
|
-
|
|
969
|
-
return new
|
|
1127
|
+
Be.prototype.offset = function(t) {
|
|
1128
|
+
return new Be(this.line, this.column + t);
|
|
970
1129
|
};
|
|
971
|
-
var
|
|
1130
|
+
var ct = function(t, i, r) {
|
|
972
1131
|
this.start = i, this.end = r, t.sourceFile !== null && (this.source = t.sourceFile);
|
|
973
1132
|
};
|
|
974
|
-
function
|
|
1133
|
+
function Ri(e, t) {
|
|
975
1134
|
for (var i = 1, r = 0; ; ) {
|
|
976
|
-
var s =
|
|
1135
|
+
var s = Vi(e, r, t);
|
|
977
1136
|
if (s < 0)
|
|
978
|
-
return new
|
|
1137
|
+
return new Be(i, t - r);
|
|
979
1138
|
++i, r = s;
|
|
980
1139
|
}
|
|
981
1140
|
}
|
|
982
|
-
var
|
|
1141
|
+
var Tt = {
|
|
983
1142
|
// `ecmaVersion` indicates the ECMAScript version to parse. Must be
|
|
984
1143
|
// either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
|
|
985
1144
|
// (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
|
|
@@ -1075,21 +1234,21 @@ var At = {
|
|
|
1075
1234
|
// When enabled, parenthesized expressions are represented by
|
|
1076
1235
|
// (non-standard) ParenthesizedExpression nodes
|
|
1077
1236
|
preserveParens: !1
|
|
1078
|
-
},
|
|
1079
|
-
function
|
|
1237
|
+
}, ci = !1;
|
|
1238
|
+
function Us(e) {
|
|
1080
1239
|
var t = {};
|
|
1081
|
-
for (var i in
|
|
1082
|
-
t[i] = e && Pe(e, i) ? e[i] :
|
|
1083
|
-
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!
|
|
1084
|
-
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),
|
|
1240
|
+
for (var i in Tt)
|
|
1241
|
+
t[i] = e && Pe(e, i) ? e[i] : Tt[i];
|
|
1242
|
+
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!ci && typeof console == "object" && console.warn && (ci = !0, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
1243
|
+
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), ui(t.onToken)) {
|
|
1085
1244
|
var r = t.onToken;
|
|
1086
1245
|
t.onToken = function(s) {
|
|
1087
1246
|
return r.push(s);
|
|
1088
1247
|
};
|
|
1089
1248
|
}
|
|
1090
|
-
return
|
|
1249
|
+
return ui(t.onComment) && (t.onComment = zs(t, t.onComment)), t;
|
|
1091
1250
|
}
|
|
1092
|
-
function
|
|
1251
|
+
function zs(e, t) {
|
|
1093
1252
|
return function(i, r, s, n, a, u) {
|
|
1094
1253
|
var l = {
|
|
1095
1254
|
type: i ? "Block" : "Line",
|
|
@@ -1097,50 +1256,50 @@ function Vs(e, t) {
|
|
|
1097
1256
|
start: s,
|
|
1098
1257
|
end: n
|
|
1099
1258
|
};
|
|
1100
|
-
e.locations && (l.loc = new
|
|
1259
|
+
e.locations && (l.loc = new ct(this, a, u)), e.ranges && (l.range = [s, n]), t.push(l);
|
|
1101
1260
|
};
|
|
1102
1261
|
}
|
|
1103
|
-
var
|
|
1104
|
-
function
|
|
1105
|
-
return
|
|
1262
|
+
var je = 1, Ve = 2, zt = 4, Fi = 8, Wt = 16, Mi = 32, ft = 64, Di = 128, ve = 256, ze = 512, ht = je | Ve | ve;
|
|
1263
|
+
function qt(e, t) {
|
|
1264
|
+
return Ve | (e ? zt : 0) | (t ? Fi : 0);
|
|
1106
1265
|
}
|
|
1107
|
-
var
|
|
1108
|
-
this.options = t =
|
|
1266
|
+
var et = 0, Kt = 1, ce = 2, Bi = 3, ji = 4, $i = 5, M = function(t, i, r) {
|
|
1267
|
+
this.options = t = Us(t), this.sourceFile = t.sourceFile, this.keywords = fe(Ls[t.ecmaVersion >= 6 ? 6 : t.sourceType === "module" ? "5module" : 5]);
|
|
1109
1268
|
var s = "";
|
|
1110
|
-
t.allowReserved !== !0 && (s =
|
|
1111
|
-
var n = (s ? s + " " : "") +
|
|
1112
|
-
this.reservedWordsStrict = fe(n), this.reservedWordsStrictBind = fe(n + " " +
|
|
1113
|
-
`, r - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(K).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = o.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(
|
|
1269
|
+
t.allowReserved !== !0 && (s = St[t.ecmaVersion >= 6 ? 6 : t.ecmaVersion === 5 ? 5 : 3], t.sourceType === "module" && (s += " await")), this.reservedWords = fe(s);
|
|
1270
|
+
var n = (s ? s + " " : "") + St.strict;
|
|
1271
|
+
this.reservedWordsStrict = fe(n), this.reservedWordsStrictBind = fe(n + " " + St.strictBind), this.input = String(i), this.containsEsc = !1, r ? (this.pos = r, this.lineStart = this.input.lastIndexOf(`
|
|
1272
|
+
`, r - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(K).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = o.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(je), this.regexpState = null, this.privateNameStack = [];
|
|
1114
1273
|
}, re = { 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 } };
|
|
1115
1274
|
M.prototype.parse = function() {
|
|
1116
1275
|
var t = this.options.program || this.startNode();
|
|
1117
1276
|
return this.nextToken(), this.parseTopLevel(t);
|
|
1118
1277
|
};
|
|
1119
1278
|
re.inFunction.get = function() {
|
|
1120
|
-
return (this.currentVarScope().flags &
|
|
1279
|
+
return (this.currentVarScope().flags & Ve) > 0;
|
|
1121
1280
|
};
|
|
1122
1281
|
re.inGenerator.get = function() {
|
|
1123
|
-
return (this.currentVarScope().flags &
|
|
1282
|
+
return (this.currentVarScope().flags & Fi) > 0;
|
|
1124
1283
|
};
|
|
1125
1284
|
re.inAsync.get = function() {
|
|
1126
|
-
return (this.currentVarScope().flags &
|
|
1285
|
+
return (this.currentVarScope().flags & zt) > 0;
|
|
1127
1286
|
};
|
|
1128
1287
|
re.canAwait.get = function() {
|
|
1129
1288
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
1130
1289
|
var t = this.scopeStack[e], i = t.flags;
|
|
1131
|
-
if (i & (
|
|
1290
|
+
if (i & (ve | ze))
|
|
1132
1291
|
return !1;
|
|
1133
|
-
if (i &
|
|
1134
|
-
return (i &
|
|
1292
|
+
if (i & Ve)
|
|
1293
|
+
return (i & zt) > 0;
|
|
1135
1294
|
}
|
|
1136
1295
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
1137
1296
|
};
|
|
1138
1297
|
re.allowSuper.get = function() {
|
|
1139
1298
|
var e = this.currentThisScope(), t = e.flags;
|
|
1140
|
-
return (t &
|
|
1299
|
+
return (t & ft) > 0 || this.options.allowSuperOutsideMethod;
|
|
1141
1300
|
};
|
|
1142
1301
|
re.allowDirectSuper.get = function() {
|
|
1143
|
-
return (this.currentThisScope().flags &
|
|
1302
|
+
return (this.currentThisScope().flags & Di) > 0;
|
|
1144
1303
|
};
|
|
1145
1304
|
re.treatFunctionsAsVar.get = function() {
|
|
1146
1305
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
@@ -1148,13 +1307,13 @@ re.treatFunctionsAsVar.get = function() {
|
|
|
1148
1307
|
re.allowNewDotTarget.get = function() {
|
|
1149
1308
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
1150
1309
|
var t = this.scopeStack[e], i = t.flags;
|
|
1151
|
-
if (i & (
|
|
1310
|
+
if (i & (ve | ze) || i & Ve && !(i & Wt))
|
|
1152
1311
|
return !0;
|
|
1153
1312
|
}
|
|
1154
1313
|
return !1;
|
|
1155
1314
|
};
|
|
1156
1315
|
re.inClassStaticBlock.get = function() {
|
|
1157
|
-
return (this.currentVarScope().flags &
|
|
1316
|
+
return (this.currentVarScope().flags & ve) > 0;
|
|
1158
1317
|
};
|
|
1159
1318
|
M.extend = function() {
|
|
1160
1319
|
for (var t = [], i = arguments.length; i--; ) t[i] = arguments[i];
|
|
@@ -1173,13 +1332,13 @@ M.tokenizer = function(t, i) {
|
|
|
1173
1332
|
return new this(i, t);
|
|
1174
1333
|
};
|
|
1175
1334
|
Object.defineProperties(M.prototype, re);
|
|
1176
|
-
var z = M.prototype,
|
|
1335
|
+
var z = M.prototype, Ws = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
1177
1336
|
z.strictDirective = function(e) {
|
|
1178
1337
|
if (this.options.ecmaVersion < 5)
|
|
1179
1338
|
return !1;
|
|
1180
1339
|
for (; ; ) {
|
|
1181
1340
|
$.lastIndex = e, e += $.exec(this.input)[0].length;
|
|
1182
|
-
var t =
|
|
1341
|
+
var t = Ws.exec(this.input.slice(e));
|
|
1183
1342
|
if (!t)
|
|
1184
1343
|
return !1;
|
|
1185
1344
|
if ((t[1] || t[2]) === "use strict") {
|
|
@@ -1222,7 +1381,7 @@ z.expect = function(e) {
|
|
|
1222
1381
|
z.unexpected = function(e) {
|
|
1223
1382
|
this.raise(e ?? this.start, "Unexpected token");
|
|
1224
1383
|
};
|
|
1225
|
-
var
|
|
1384
|
+
var pt = function() {
|
|
1226
1385
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
1227
1386
|
};
|
|
1228
1387
|
z.checkPatternErrors = function(e, t) {
|
|
@@ -1260,7 +1419,7 @@ v.parseTopLevel = function(e) {
|
|
|
1260
1419
|
}
|
|
1261
1420
|
return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType, this.finishNode(e, "Program");
|
|
1262
1421
|
};
|
|
1263
|
-
var
|
|
1422
|
+
var Ht = { kind: "loop" }, qs = { kind: "switch" };
|
|
1264
1423
|
v.isLet = function(e) {
|
|
1265
1424
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
|
|
1266
1425
|
return !1;
|
|
@@ -1278,7 +1437,7 @@ v.isLet = function(e) {
|
|
|
1278
1437
|
if (r === 92 || r > 55295 && r < 56320)
|
|
1279
1438
|
return !0;
|
|
1280
1439
|
var n = this.input.slice(i, s);
|
|
1281
|
-
if (!
|
|
1440
|
+
if (!Rs.test(n))
|
|
1282
1441
|
return !0;
|
|
1283
1442
|
}
|
|
1284
1443
|
return !1;
|
|
@@ -1395,12 +1554,12 @@ v.parseDebuggerStatement = function(e) {
|
|
|
1395
1554
|
return this.next(), this.semicolon(), this.finishNode(e, "DebuggerStatement");
|
|
1396
1555
|
};
|
|
1397
1556
|
v.parseDoStatement = function(e) {
|
|
1398
|
-
return this.next(), this.labels.push(
|
|
1557
|
+
return this.next(), this.labels.push(Ht), e.body = this.parseStatement("do"), this.labels.pop(), this.expect(o._while), e.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(o.semi) : this.semicolon(), this.finishNode(e, "DoWhileStatement");
|
|
1399
1558
|
};
|
|
1400
1559
|
v.parseForStatement = function(e) {
|
|
1401
1560
|
this.next();
|
|
1402
1561
|
var t = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
1403
|
-
if (this.labels.push(
|
|
1562
|
+
if (this.labels.push(Ht), this.enterScope(0), this.expect(o.parenL), this.type === o.semi)
|
|
1404
1563
|
return t > -1 && this.unexpected(t), this.parseFor(e, null);
|
|
1405
1564
|
var i = this.isLet();
|
|
1406
1565
|
if (this.type === o._var || this.type === o._const || i) {
|
|
@@ -1412,14 +1571,14 @@ v.parseForStatement = function(e) {
|
|
|
1412
1571
|
var l = this.startNode();
|
|
1413
1572
|
return this.next(), u === "await using" && this.next(), this.parseVar(l, !0, u), this.finishNode(l, "VariableDeclaration"), this.parseForAfterInit(e, l, t);
|
|
1414
1573
|
}
|
|
1415
|
-
var c = this.containsEsc, f = new
|
|
1416
|
-
return this.type === o._in || (a = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === o._in && this.unexpected(t), e.await = !0) : a && this.options.ecmaVersion >= 8 && (
|
|
1574
|
+
var c = this.containsEsc, f = new pt(), h = this.start, g = t > -1 ? this.parseExprSubscripts(f, "await") : this.parseExpression(!0, f);
|
|
1575
|
+
return this.type === o._in || (a = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === o._in && this.unexpected(t), e.await = !0) : a && this.options.ecmaVersion >= 8 && (g.start === h && !c && g.type === "Identifier" && g.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = !1)), n && a && this.raise(g.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(g, !1, f), this.checkLValPattern(g), this.parseForIn(e, g)) : (this.checkExpressionErrors(f, !0), t > -1 && this.unexpected(t), this.parseFor(e, g));
|
|
1417
1576
|
};
|
|
1418
1577
|
v.parseForAfterInit = function(e, t, i) {
|
|
1419
1578
|
return (this.type === o._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && t.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === o._in ? i > -1 && this.unexpected(i) : e.await = i > -1), this.parseForIn(e, t)) : (i > -1 && this.unexpected(i), this.parseFor(e, t));
|
|
1420
1579
|
};
|
|
1421
1580
|
v.parseFunctionStatement = function(e, t, i) {
|
|
1422
|
-
return this.next(), this.parseFunction(e,
|
|
1581
|
+
return this.next(), this.parseFunction(e, Fe | (i ? 0 : Pt), !1, t);
|
|
1423
1582
|
};
|
|
1424
1583
|
v.parseIfStatement = function(e) {
|
|
1425
1584
|
return this.next(), e.test = this.parseParenExpression(), e.consequent = this.parseStatement("if"), e.alternate = this.eat(o._else) ? this.parseStatement("if") : null, this.finishNode(e, "IfStatement");
|
|
@@ -1428,7 +1587,7 @@ v.parseReturnStatement = function(e) {
|
|
|
1428
1587
|
return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(o.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()), this.finishNode(e, "ReturnStatement");
|
|
1429
1588
|
};
|
|
1430
1589
|
v.parseSwitchStatement = function(e) {
|
|
1431
|
-
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(o.braceL), this.labels.push(
|
|
1590
|
+
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(o.braceL), this.labels.push(qs), this.enterScope(0);
|
|
1432
1591
|
for (var t, i = !1; this.type !== o.braceR; )
|
|
1433
1592
|
if (this.type === o._case || this.type === o._default) {
|
|
1434
1593
|
var r = this.type === o._case;
|
|
@@ -1440,10 +1599,10 @@ v.parseSwitchStatement = function(e) {
|
|
|
1440
1599
|
v.parseThrowStatement = function(e) {
|
|
1441
1600
|
return this.next(), K.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");
|
|
1442
1601
|
};
|
|
1443
|
-
var
|
|
1602
|
+
var Ks = [];
|
|
1444
1603
|
v.parseCatchClauseParam = function() {
|
|
1445
1604
|
var e = this.parseBindingAtom(), t = e.type === "Identifier";
|
|
1446
|
-
return this.enterScope(t ?
|
|
1605
|
+
return this.enterScope(t ? Mi : 0), this.checkLValPattern(e, t ? ji : ce), this.expect(o.parenR), e;
|
|
1447
1606
|
};
|
|
1448
1607
|
v.parseTryStatement = function(e) {
|
|
1449
1608
|
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === o._catch) {
|
|
@@ -1456,7 +1615,7 @@ v.parseVarStatement = function(e, t, i) {
|
|
|
1456
1615
|
return this.next(), this.parseVar(e, !1, t, i), this.semicolon(), this.finishNode(e, "VariableDeclaration");
|
|
1457
1616
|
};
|
|
1458
1617
|
v.parseWhileStatement = function(e) {
|
|
1459
|
-
return this.next(), e.test = this.parseParenExpression(), this.labels.push(
|
|
1618
|
+
return this.next(), e.test = this.parseParenExpression(), this.labels.push(Ht), e.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(e, "WhileStatement");
|
|
1460
1619
|
};
|
|
1461
1620
|
v.parseWithStatement = function(e) {
|
|
1462
1621
|
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");
|
|
@@ -1507,13 +1666,13 @@ v.parseVar = function(e, t, i, r) {
|
|
|
1507
1666
|
return e;
|
|
1508
1667
|
};
|
|
1509
1668
|
v.parseVarId = function(e, t) {
|
|
1510
|
-
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ?
|
|
1669
|
+
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? Kt : ce, !1);
|
|
1511
1670
|
};
|
|
1512
|
-
var
|
|
1671
|
+
var Fe = 1, Pt = 2, Ui = 4;
|
|
1513
1672
|
v.parseFunction = function(e, t, i, r, s) {
|
|
1514
|
-
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === o.star && t &
|
|
1673
|
+
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === o.star && t & Pt && this.unexpected(), e.generator = this.eat(o.star)), this.options.ecmaVersion >= 8 && (e.async = !!r), t & Fe && (e.id = t & Ui && this.type !== o.name ? null : this.parseIdent(), e.id && !(t & Pt) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? Kt : ce : Bi));
|
|
1515
1674
|
var n = this.yieldPos, a = this.awaitPos, u = this.awaitIdentPos;
|
|
1516
|
-
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
1675
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(qt(e.async, e.generator)), t & Fe || (e.id = this.type === o.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, i, !1, s), this.yieldPos = n, this.awaitPos = a, this.awaitIdentPos = u, this.finishNode(e, t & Fe ? "FunctionDeclaration" : "FunctionExpression");
|
|
1517
1676
|
};
|
|
1518
1677
|
v.parseFunctionParams = function(e) {
|
|
1519
1678
|
this.expect(o.parenL), e.params = this.parseBindingList(o.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
@@ -1525,7 +1684,7 @@ v.parseClass = function(e, t) {
|
|
|
1525
1684
|
var r = this.enterClassBody(), s = this.startNode(), n = !1;
|
|
1526
1685
|
for (s.body = [], this.expect(o.braceL); this.type !== o.braceR; ) {
|
|
1527
1686
|
var a = this.parseClassElement(e.superClass !== null);
|
|
1528
|
-
a && (s.body.push(a), a.type === "MethodDefinition" && a.kind === "constructor" ? (n && this.raiseRecoverable(a.start, "Duplicate constructor in the same class"), n = !0) : a.key && a.key.type === "PrivateIdentifier" &&
|
|
1687
|
+
a && (s.body.push(a), a.type === "MethodDefinition" && a.kind === "constructor" ? (n && this.raiseRecoverable(a.start, "Duplicate constructor in the same class"), n = !0) : a.key && a.key.type === "PrivateIdentifier" && Hs(r, a) && this.raiseRecoverable(a.key.start, "Identifier '#" + a.key.name + "' has already been declared"));
|
|
1529
1688
|
}
|
|
1530
1689
|
return this.strict = i, this.next(), e.body = this.finishNode(s, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
1531
1690
|
};
|
|
@@ -1543,7 +1702,7 @@ v.parseClassElement = function(e) {
|
|
|
1543
1702
|
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? a = l : r = l);
|
|
1544
1703
|
}
|
|
1545
1704
|
if (r ? (i.computed = !1, i.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), i.key.name = r, this.finishNode(i.key, "Identifier")) : this.parseClassElementName(i), t < 13 || this.type === o.parenL || a !== "method" || s || n) {
|
|
1546
|
-
var c = !i.static &&
|
|
1705
|
+
var c = !i.static && tt(i, "constructor"), f = c && e;
|
|
1547
1706
|
c && a !== "method" && this.raise(i.key.start, "Constructor can't have get/set modifier"), i.kind = c ? "constructor" : a, this.parseClassMethod(i, s, n, f);
|
|
1548
1707
|
} else
|
|
1549
1708
|
this.parseClassField(i);
|
|
@@ -1557,17 +1716,17 @@ v.parseClassElementName = function(e) {
|
|
|
1557
1716
|
};
|
|
1558
1717
|
v.parseClassMethod = function(e, t, i, r) {
|
|
1559
1718
|
var s = e.key;
|
|
1560
|
-
e.kind === "constructor" ? (t && this.raise(s.start, "Constructor can't be a generator"), i && this.raise(s.start, "Constructor can't be an async method")) : e.static &&
|
|
1719
|
+
e.kind === "constructor" ? (t && this.raise(s.start, "Constructor can't be a generator"), i && this.raise(s.start, "Constructor can't be an async method")) : e.static && tt(e, "prototype") && this.raise(s.start, "Classes may not have a static property named prototype");
|
|
1561
1720
|
var n = e.value = this.parseMethod(t, i, r);
|
|
1562
1721
|
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");
|
|
1563
1722
|
};
|
|
1564
1723
|
v.parseClassField = function(e) {
|
|
1565
|
-
return
|
|
1724
|
+
return tt(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && tt(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(o.eq) ? (this.enterScope(ze | ft), e.value = this.parseMaybeAssign(), this.exitScope()) : e.value = null, this.semicolon(), this.finishNode(e, "PropertyDefinition");
|
|
1566
1725
|
};
|
|
1567
1726
|
v.parseClassStaticBlock = function(e) {
|
|
1568
1727
|
e.body = [];
|
|
1569
1728
|
var t = this.labels;
|
|
1570
|
-
for (this.labels = [], this.enterScope(
|
|
1729
|
+
for (this.labels = [], this.enterScope(ve | ft); this.type !== o.braceR; ) {
|
|
1571
1730
|
var i = this.parseStatement(null);
|
|
1572
1731
|
e.body.push(i);
|
|
1573
1732
|
}
|
|
@@ -1591,11 +1750,11 @@ v.exitClassBody = function() {
|
|
|
1591
1750
|
Pe(t, a.name) || (s ? s.used.push(a) : this.raiseRecoverable(a.start, "Private field '#" + a.name + "' must be declared in an enclosing class"));
|
|
1592
1751
|
}
|
|
1593
1752
|
};
|
|
1594
|
-
function
|
|
1753
|
+
function Hs(e, t) {
|
|
1595
1754
|
var i = t.key.name, r = e[i], s = "true";
|
|
1596
1755
|
return t.type === "MethodDefinition" && (t.kind === "get" || t.kind === "set") && (s = (t.static ? "s" : "i") + t.kind), r === "iget" && s === "iset" || r === "iset" && s === "iget" || r === "sget" && s === "sset" || r === "sset" && s === "sget" ? (e[i] = "true", !1) : r ? !0 : (e[i] = s, !1);
|
|
1597
1756
|
}
|
|
1598
|
-
function
|
|
1757
|
+
function tt(e, t) {
|
|
1599
1758
|
var i = e.computed, r = e.key;
|
|
1600
1759
|
return !i && (r.type === "Identifier" && r.name === t || r.type === "Literal" && r.value === t);
|
|
1601
1760
|
}
|
|
@@ -1630,7 +1789,7 @@ v.parseExportDefaultDeclaration = function() {
|
|
|
1630
1789
|
var e;
|
|
1631
1790
|
if (this.type === o._function || (e = this.isAsyncFunction())) {
|
|
1632
1791
|
var t = this.startNode();
|
|
1633
|
-
return this.next(), e && this.next(), this.parseFunction(t,
|
|
1792
|
+
return this.next(), e && this.next(), this.parseFunction(t, Fe | Ui, !1, e);
|
|
1634
1793
|
} else if (this.type === o._class) {
|
|
1635
1794
|
var i = this.startNode();
|
|
1636
1795
|
return this.parseClass(i, "nullableID");
|
|
@@ -1688,7 +1847,7 @@ v.parseExportSpecifiers = function(e) {
|
|
|
1688
1847
|
return t;
|
|
1689
1848
|
};
|
|
1690
1849
|
v.parseImport = function(e) {
|
|
1691
|
-
return this.next(), this.type === o.string ? (e.specifiers =
|
|
1850
|
+
return this.next(), this.type === o.string ? (e.specifiers = Ks, e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === o.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ImportDeclaration");
|
|
1692
1851
|
};
|
|
1693
1852
|
v.parseImportSpecifier = function() {
|
|
1694
1853
|
var e = this.startNode();
|
|
@@ -1739,7 +1898,7 @@ v.parseImportAttribute = function() {
|
|
|
1739
1898
|
v.parseModuleExportName = function() {
|
|
1740
1899
|
if (this.options.ecmaVersion >= 13 && this.type === o.string) {
|
|
1741
1900
|
var e = this.parseLiteral(this.value);
|
|
1742
|
-
return
|
|
1901
|
+
return $s.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e;
|
|
1743
1902
|
}
|
|
1744
1903
|
return this.parseIdent(!0);
|
|
1745
1904
|
};
|
|
@@ -1857,11 +2016,11 @@ Y.parseMaybeDefault = function(e, t, i) {
|
|
|
1857
2016
|
return r.left = i, r.right = this.parseMaybeAssign(), this.finishNode(r, "AssignmentPattern");
|
|
1858
2017
|
};
|
|
1859
2018
|
Y.checkLValSimple = function(e, t, i) {
|
|
1860
|
-
t === void 0 && (t =
|
|
1861
|
-
var r = t !==
|
|
2019
|
+
t === void 0 && (t = et);
|
|
2020
|
+
var r = t !== et;
|
|
1862
2021
|
switch (e.type) {
|
|
1863
2022
|
case "Identifier":
|
|
1864
|
-
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (r ? "Binding " : "Assigning to ") + e.name + " in strict mode"), r && (t === ce && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), i && (Pe(i, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), i[e.name] = !0), t !==
|
|
2023
|
+
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (r ? "Binding " : "Assigning to ") + e.name + " in strict mode"), r && (t === ce && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), i && (Pe(i, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), i[e.name] = !0), t !== $i && this.declareName(e.name, t, e.start));
|
|
1865
2024
|
break;
|
|
1866
2025
|
case "ChainExpression":
|
|
1867
2026
|
this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -1876,7 +2035,7 @@ Y.checkLValSimple = function(e, t, i) {
|
|
|
1876
2035
|
}
|
|
1877
2036
|
};
|
|
1878
2037
|
Y.checkLValPattern = function(e, t, i) {
|
|
1879
|
-
switch (t === void 0 && (t =
|
|
2038
|
+
switch (t === void 0 && (t = et), e.type) {
|
|
1880
2039
|
case "ObjectPattern":
|
|
1881
2040
|
for (var r = 0, s = e.properties; r < s.length; r += 1) {
|
|
1882
2041
|
var n = s[r];
|
|
@@ -1894,7 +2053,7 @@ Y.checkLValPattern = function(e, t, i) {
|
|
|
1894
2053
|
}
|
|
1895
2054
|
};
|
|
1896
2055
|
Y.checkLValInnerPattern = function(e, t, i) {
|
|
1897
|
-
switch (t === void 0 && (t =
|
|
2056
|
+
switch (t === void 0 && (t = et), e.type) {
|
|
1898
2057
|
case "Property":
|
|
1899
2058
|
this.checkLValInnerPattern(e.value, t, i);
|
|
1900
2059
|
break;
|
|
@@ -1910,7 +2069,7 @@ Y.checkLValInnerPattern = function(e, t, i) {
|
|
|
1910
2069
|
};
|
|
1911
2070
|
var X = function(t, i, r, s, n) {
|
|
1912
2071
|
this.token = t, this.isExpr = !!i, this.preserveSpace = !!r, this.override = s, this.generator = !!n;
|
|
1913
|
-
},
|
|
2072
|
+
}, O = {
|
|
1914
2073
|
b_stat: new X("{", !1),
|
|
1915
2074
|
b_expr: new X("{", !0),
|
|
1916
2075
|
b_tmpl: new X("${", !1),
|
|
@@ -1923,18 +2082,18 @@ var X = function(t, i, r, s, n) {
|
|
|
1923
2082
|
f_expr: new X("function", !0),
|
|
1924
2083
|
f_expr_gen: new X("function", !0, !1, null, !0),
|
|
1925
2084
|
f_gen: new X("function", !1, !1, null, !0)
|
|
1926
|
-
},
|
|
1927
|
-
|
|
1928
|
-
return [
|
|
2085
|
+
}, Oe = M.prototype;
|
|
2086
|
+
Oe.initialContext = function() {
|
|
2087
|
+
return [O.b_stat];
|
|
1929
2088
|
};
|
|
1930
|
-
|
|
2089
|
+
Oe.curContext = function() {
|
|
1931
2090
|
return this.context[this.context.length - 1];
|
|
1932
2091
|
};
|
|
1933
|
-
|
|
2092
|
+
Oe.braceIsBlock = function(e) {
|
|
1934
2093
|
var t = this.curContext();
|
|
1935
|
-
return t ===
|
|
2094
|
+
return t === O.f_expr || t === O.f_stat ? !0 : e === o.colon && (t === O.b_stat || t === O.b_expr) ? !t.isExpr : e === o._return || e === o.name && this.exprAllowed ? K.test(this.input.slice(this.lastTokEnd, this.start)) : e === o._else || e === o.semi || e === o.eof || e === o.parenR || e === o.arrow ? !0 : e === o.braceL ? t === O.b_stat : e === o._var || e === o._const || e === o.name ? !1 : !this.exprAllowed;
|
|
1936
2095
|
};
|
|
1937
|
-
|
|
2096
|
+
Oe.inGeneratorContext = function() {
|
|
1938
2097
|
for (var e = this.context.length - 1; e >= 1; e--) {
|
|
1939
2098
|
var t = this.context[e];
|
|
1940
2099
|
if (t.token === "function")
|
|
@@ -1942,11 +2101,11 @@ Ve.inGeneratorContext = function() {
|
|
|
1942
2101
|
}
|
|
1943
2102
|
return !1;
|
|
1944
2103
|
};
|
|
1945
|
-
|
|
2104
|
+
Oe.updateContext = function(e) {
|
|
1946
2105
|
var t, i = this.type;
|
|
1947
2106
|
i.keyword && e === o.dot ? this.exprAllowed = !1 : (t = i.updateContext) ? t.call(this, e) : this.exprAllowed = i.beforeExpr;
|
|
1948
2107
|
};
|
|
1949
|
-
|
|
2108
|
+
Oe.overrideContext = function(e) {
|
|
1950
2109
|
this.curContext() !== e && (this.context[this.context.length - 1] = e);
|
|
1951
2110
|
};
|
|
1952
2111
|
o.parenR.updateContext = o.braceR.updateContext = function() {
|
|
@@ -1955,33 +2114,33 @@ o.parenR.updateContext = o.braceR.updateContext = function() {
|
|
|
1955
2114
|
return;
|
|
1956
2115
|
}
|
|
1957
2116
|
var e = this.context.pop();
|
|
1958
|
-
e ===
|
|
2117
|
+
e === O.b_stat && this.curContext().token === "function" && (e = this.context.pop()), this.exprAllowed = !e.isExpr;
|
|
1959
2118
|
};
|
|
1960
2119
|
o.braceL.updateContext = function(e) {
|
|
1961
|
-
this.context.push(this.braceIsBlock(e) ?
|
|
2120
|
+
this.context.push(this.braceIsBlock(e) ? O.b_stat : O.b_expr), this.exprAllowed = !0;
|
|
1962
2121
|
};
|
|
1963
2122
|
o.dollarBraceL.updateContext = function() {
|
|
1964
|
-
this.context.push(
|
|
2123
|
+
this.context.push(O.b_tmpl), this.exprAllowed = !0;
|
|
1965
2124
|
};
|
|
1966
2125
|
o.parenL.updateContext = function(e) {
|
|
1967
2126
|
var t = e === o._if || e === o._for || e === o._with || e === o._while;
|
|
1968
|
-
this.context.push(t ?
|
|
2127
|
+
this.context.push(t ? O.p_stat : O.p_expr), this.exprAllowed = !0;
|
|
1969
2128
|
};
|
|
1970
2129
|
o.incDec.updateContext = function() {
|
|
1971
2130
|
};
|
|
1972
2131
|
o._function.updateContext = o._class.updateContext = function(e) {
|
|
1973
|
-
e.beforeExpr && e !== o._else && !(e === o.semi && this.curContext() !==
|
|
2132
|
+
e.beforeExpr && e !== o._else && !(e === o.semi && this.curContext() !== O.p_stat) && !(e === o._return && K.test(this.input.slice(this.lastTokEnd, this.start))) && !((e === o.colon || e === o.braceL) && this.curContext() === O.b_stat) ? this.context.push(O.f_expr) : this.context.push(O.f_stat), this.exprAllowed = !1;
|
|
1974
2133
|
};
|
|
1975
2134
|
o.colon.updateContext = function() {
|
|
1976
2135
|
this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
|
|
1977
2136
|
};
|
|
1978
2137
|
o.backQuote.updateContext = function() {
|
|
1979
|
-
this.curContext() ===
|
|
2138
|
+
this.curContext() === O.q_tmpl ? this.context.pop() : this.context.push(O.q_tmpl), this.exprAllowed = !1;
|
|
1980
2139
|
};
|
|
1981
2140
|
o.star.updateContext = function(e) {
|
|
1982
2141
|
if (e === o._function) {
|
|
1983
2142
|
var t = this.context.length - 1;
|
|
1984
|
-
this.context[t] ===
|
|
2143
|
+
this.context[t] === O.f_expr ? this.context[t] = O.f_expr_gen : this.context[t] = O.f_gen;
|
|
1985
2144
|
}
|
|
1986
2145
|
this.exprAllowed = !0;
|
|
1987
2146
|
};
|
|
@@ -1989,8 +2148,8 @@ o.name.updateContext = function(e) {
|
|
|
1989
2148
|
var t = !1;
|
|
1990
2149
|
this.options.ecmaVersion >= 6 && e !== o.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (t = !0), this.exprAllowed = t;
|
|
1991
2150
|
};
|
|
1992
|
-
var
|
|
1993
|
-
|
|
2151
|
+
var A = M.prototype;
|
|
2152
|
+
A.checkPropClash = function(e, t, i) {
|
|
1994
2153
|
if (!(this.options.ecmaVersion >= 9 && e.type === "SpreadElement") && !(this.options.ecmaVersion >= 6 && (e.computed || e.method || e.shorthand))) {
|
|
1995
2154
|
var r = e.key, s;
|
|
1996
2155
|
switch (r.type) {
|
|
@@ -2022,7 +2181,7 @@ C.checkPropClash = function(e, t, i) {
|
|
|
2022
2181
|
a[n] = !0;
|
|
2023
2182
|
}
|
|
2024
2183
|
};
|
|
2025
|
-
|
|
2184
|
+
A.parseExpression = function(e, t) {
|
|
2026
2185
|
var i = this.start, r = this.startLoc, s = this.parseMaybeAssign(e, t);
|
|
2027
2186
|
if (this.type === o.comma) {
|
|
2028
2187
|
var n = this.startNodeAt(i, r);
|
|
@@ -2032,14 +2191,14 @@ C.parseExpression = function(e, t) {
|
|
|
2032
2191
|
}
|
|
2033
2192
|
return s;
|
|
2034
2193
|
};
|
|
2035
|
-
|
|
2194
|
+
A.parseMaybeAssign = function(e, t, i) {
|
|
2036
2195
|
if (this.isContextual("yield")) {
|
|
2037
2196
|
if (this.inGenerator)
|
|
2038
2197
|
return this.parseYield(e);
|
|
2039
2198
|
this.exprAllowed = !1;
|
|
2040
2199
|
}
|
|
2041
2200
|
var r = !1, s = -1, n = -1, a = -1;
|
|
2042
|
-
t ? (s = t.parenthesizedAssign, n = t.trailingComma, a = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new
|
|
2201
|
+
t ? (s = t.parenthesizedAssign, n = t.trailingComma, a = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new pt(), r = !0);
|
|
2043
2202
|
var u = this.start, l = this.startLoc;
|
|
2044
2203
|
(this.type === o.parenL || this.type === o.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
2045
2204
|
var c = this.parseMaybeConditional(e, t);
|
|
@@ -2050,7 +2209,7 @@ C.parseMaybeAssign = function(e, t, i) {
|
|
|
2050
2209
|
r && this.checkExpressionErrors(t, !0);
|
|
2051
2210
|
return s > -1 && (t.parenthesizedAssign = s), n > -1 && (t.trailingComma = n), c;
|
|
2052
2211
|
};
|
|
2053
|
-
|
|
2212
|
+
A.parseMaybeConditional = function(e, t) {
|
|
2054
2213
|
var i = this.start, r = this.startLoc, s = this.parseExprOps(e, t);
|
|
2055
2214
|
if (this.checkExpressionErrors(t))
|
|
2056
2215
|
return s;
|
|
@@ -2060,34 +2219,34 @@ C.parseMaybeConditional = function(e, t) {
|
|
|
2060
2219
|
}
|
|
2061
2220
|
return s;
|
|
2062
2221
|
};
|
|
2063
|
-
|
|
2222
|
+
A.parseExprOps = function(e, t) {
|
|
2064
2223
|
var i = this.start, r = this.startLoc, s = this.parseMaybeUnary(t, !1, !1, e);
|
|
2065
2224
|
return this.checkExpressionErrors(t) || s.start === i && s.type === "ArrowFunctionExpression" ? s : this.parseExprOp(s, i, r, -1, e);
|
|
2066
2225
|
};
|
|
2067
|
-
|
|
2226
|
+
A.parseExprOp = function(e, t, i, r, s) {
|
|
2068
2227
|
var n = this.type.binop;
|
|
2069
2228
|
if (n != null && (!s || this.type !== o._in) && n > r) {
|
|
2070
2229
|
var a = this.type === o.logicalOR || this.type === o.logicalAND, u = this.type === o.coalesce;
|
|
2071
2230
|
u && (n = o.logicalAND.binop);
|
|
2072
2231
|
var l = this.value;
|
|
2073
2232
|
this.next();
|
|
2074
|
-
var c = this.start, f = this.startLoc, h = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, s), c, f, n, s),
|
|
2075
|
-
return (a && this.type === o.coalesce || u && (this.type === o.logicalOR || this.type === o.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(
|
|
2233
|
+
var c = this.start, f = this.startLoc, h = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, s), c, f, n, s), g = this.buildBinary(t, i, e, h, l, a || u);
|
|
2234
|
+
return (a && this.type === o.coalesce || u && (this.type === o.logicalOR || this.type === o.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(g, t, i, r, s);
|
|
2076
2235
|
}
|
|
2077
2236
|
return e;
|
|
2078
2237
|
};
|
|
2079
|
-
|
|
2238
|
+
A.buildBinary = function(e, t, i, r, s, n) {
|
|
2080
2239
|
r.type === "PrivateIdentifier" && this.raise(r.start, "Private identifier can only be left side of binary expression");
|
|
2081
2240
|
var a = this.startNodeAt(e, t);
|
|
2082
2241
|
return a.left = i, a.operator = s, a.right = r, this.finishNode(a, n ? "LogicalExpression" : "BinaryExpression");
|
|
2083
2242
|
};
|
|
2084
|
-
|
|
2243
|
+
A.parseMaybeUnary = function(e, t, i, r) {
|
|
2085
2244
|
var s = this.start, n = this.startLoc, a;
|
|
2086
2245
|
if (this.isContextual("await") && this.canAwait)
|
|
2087
2246
|
a = this.parseAwait(r), t = !0;
|
|
2088
2247
|
else if (this.type.prefix) {
|
|
2089
2248
|
var u = this.startNode(), l = this.type === o.incDec;
|
|
2090
|
-
u.operator = this.value, u.prefix = !0, this.next(), u.argument = this.parseMaybeUnary(null, !0, l, r), this.checkExpressionErrors(e, !0), l ? this.checkLValSimple(u.argument) : this.strict && u.operator === "delete" &&
|
|
2249
|
+
u.operator = this.value, u.prefix = !0, this.next(), u.argument = this.parseMaybeUnary(null, !0, l, r), this.checkExpressionErrors(e, !0), l ? this.checkLValSimple(u.argument) : this.strict && u.operator === "delete" && zi(u.argument) ? this.raiseRecoverable(u.start, "Deleting local variable in strict mode") : u.operator === "delete" && Vt(u.argument) ? this.raiseRecoverable(u.start, "Private fields can not be deleted") : t = !0, a = this.finishNode(u, l ? "UpdateExpression" : "UnaryExpression");
|
|
2091
2250
|
} else if (!t && this.type === o.privateId)
|
|
2092
2251
|
(r || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), a = this.parsePrivateIdent(), this.type !== o._in && this.unexpected();
|
|
2093
2252
|
else {
|
|
@@ -2106,20 +2265,20 @@ C.parseMaybeUnary = function(e, t, i, r) {
|
|
|
2106
2265
|
else
|
|
2107
2266
|
return a;
|
|
2108
2267
|
};
|
|
2109
|
-
function
|
|
2110
|
-
return e.type === "Identifier" || e.type === "ParenthesizedExpression" &&
|
|
2268
|
+
function zi(e) {
|
|
2269
|
+
return e.type === "Identifier" || e.type === "ParenthesizedExpression" && zi(e.expression);
|
|
2111
2270
|
}
|
|
2112
|
-
function
|
|
2113
|
-
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" &&
|
|
2271
|
+
function Vt(e) {
|
|
2272
|
+
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" && Vt(e.expression) || e.type === "ParenthesizedExpression" && Vt(e.expression);
|
|
2114
2273
|
}
|
|
2115
|
-
|
|
2274
|
+
A.parseExprSubscripts = function(e, t) {
|
|
2116
2275
|
var i = this.start, r = this.startLoc, s = this.parseExprAtom(e, t);
|
|
2117
2276
|
if (s.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")")
|
|
2118
2277
|
return s;
|
|
2119
2278
|
var n = this.parseSubscripts(s, i, r, !1, t);
|
|
2120
2279
|
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;
|
|
2121
2280
|
};
|
|
2122
|
-
|
|
2281
|
+
A.parseSubscripts = function(e, t, i, r, s) {
|
|
2123
2282
|
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, a = !1; ; ) {
|
|
2124
2283
|
var u = this.parseSubscript(e, t, i, r, n, a, s);
|
|
2125
2284
|
if (u.optional && (a = !0), u === e || u.type === "ArrowFunctionExpression") {
|
|
@@ -2132,13 +2291,13 @@ C.parseSubscripts = function(e, t, i, r, s) {
|
|
|
2132
2291
|
e = u;
|
|
2133
2292
|
}
|
|
2134
2293
|
};
|
|
2135
|
-
|
|
2294
|
+
A.shouldParseAsyncArrow = function() {
|
|
2136
2295
|
return !this.canInsertSemicolon() && this.eat(o.arrow);
|
|
2137
2296
|
};
|
|
2138
|
-
|
|
2297
|
+
A.parseSubscriptAsyncArrow = function(e, t, i, r) {
|
|
2139
2298
|
return this.parseArrowExpression(this.startNodeAt(e, t), i, !0, r);
|
|
2140
2299
|
};
|
|
2141
|
-
|
|
2300
|
+
A.parseSubscript = function(e, t, i, r, s, n, a) {
|
|
2142
2301
|
var u = this.options.ecmaVersion >= 11, l = u && this.eat(o.questionDot);
|
|
2143
2302
|
r && l && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
2144
2303
|
var c = this.eat(o.bracketL);
|
|
@@ -2146,12 +2305,12 @@ C.parseSubscript = function(e, t, i, r, s, n, a) {
|
|
|
2146
2305
|
var f = this.startNodeAt(t, i);
|
|
2147
2306
|
f.object = e, c ? (f.property = this.parseExpression(), this.expect(o.bracketR)) : this.type === o.privateId && e.type !== "Super" ? f.property = this.parsePrivateIdent() : f.property = this.parseIdent(this.options.allowReserved !== "never"), f.computed = !!c, u && (f.optional = l), e = this.finishNode(f, "MemberExpression");
|
|
2148
2307
|
} else if (!r && this.eat(o.parenL)) {
|
|
2149
|
-
var h = new
|
|
2308
|
+
var h = new pt(), g = this.yieldPos, y = this.awaitPos, _ = this.awaitIdentPos;
|
|
2150
2309
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
2151
2310
|
var d = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1, h);
|
|
2152
2311
|
if (s && !l && this.shouldParseAsyncArrow())
|
|
2153
|
-
return this.checkPatternErrors(h, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos =
|
|
2154
|
-
this.checkExpressionErrors(h, !0), this.yieldPos =
|
|
2312
|
+
return this.checkPatternErrors(h, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = g, this.awaitPos = y, this.awaitIdentPos = _, this.parseSubscriptAsyncArrow(t, i, d, a);
|
|
2313
|
+
this.checkExpressionErrors(h, !0), this.yieldPos = g || this.yieldPos, this.awaitPos = y || this.awaitPos, this.awaitIdentPos = _ || this.awaitIdentPos;
|
|
2155
2314
|
var w = this.startNodeAt(t, i);
|
|
2156
2315
|
w.callee = e, w.arguments = d, u && (w.optional = l), e = this.finishNode(w, "CallExpression");
|
|
2157
2316
|
} else if (this.type === o.backQuote) {
|
|
@@ -2161,7 +2320,7 @@ C.parseSubscript = function(e, t, i, r, s, n, a) {
|
|
|
2161
2320
|
}
|
|
2162
2321
|
return e;
|
|
2163
2322
|
};
|
|
2164
|
-
|
|
2323
|
+
A.parseExprAtom = function(e, t, i) {
|
|
2165
2324
|
this.type === o.slash && this.readRegexp();
|
|
2166
2325
|
var r, s = this.potentialArrowAt === this.start;
|
|
2167
2326
|
switch (this.type) {
|
|
@@ -2172,7 +2331,7 @@ C.parseExprAtom = function(e, t, i) {
|
|
|
2172
2331
|
case o.name:
|
|
2173
2332
|
var n = this.start, a = this.startLoc, u = this.containsEsc, l = this.parseIdent(!1);
|
|
2174
2333
|
if (this.options.ecmaVersion >= 8 && !u && l.name === "async" && !this.canInsertSemicolon() && this.eat(o._function))
|
|
2175
|
-
return this.overrideContext(
|
|
2334
|
+
return this.overrideContext(O.f_expr), this.parseFunction(this.startNodeAt(n, a), 0, !1, !0, t);
|
|
2176
2335
|
if (s && !this.canInsertSemicolon()) {
|
|
2177
2336
|
if (this.eat(o.arrow))
|
|
2178
2337
|
return this.parseArrowExpression(this.startNodeAt(n, a), [l], !1, t);
|
|
@@ -2196,7 +2355,7 @@ C.parseExprAtom = function(e, t, i) {
|
|
|
2196
2355
|
case o.bracketL:
|
|
2197
2356
|
return r = this.startNode(), this.next(), r.elements = this.parseExprList(o.bracketR, !0, !0, e), this.finishNode(r, "ArrayExpression");
|
|
2198
2357
|
case o.braceL:
|
|
2199
|
-
return this.overrideContext(
|
|
2358
|
+
return this.overrideContext(O.b_expr), this.parseObj(!1, e);
|
|
2200
2359
|
case o._function:
|
|
2201
2360
|
return r = this.startNode(), this.next(), this.parseFunction(r, 0);
|
|
2202
2361
|
case o._class:
|
|
@@ -2211,10 +2370,10 @@ C.parseExprAtom = function(e, t, i) {
|
|
|
2211
2370
|
return this.parseExprAtomDefault();
|
|
2212
2371
|
}
|
|
2213
2372
|
};
|
|
2214
|
-
|
|
2373
|
+
A.parseExprAtomDefault = function() {
|
|
2215
2374
|
this.unexpected();
|
|
2216
2375
|
};
|
|
2217
|
-
|
|
2376
|
+
A.parseExprImport = function(e) {
|
|
2218
2377
|
var t = this.startNode();
|
|
2219
2378
|
if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type === o.parenL && !e)
|
|
2220
2379
|
return this.parseDynamicImport(t);
|
|
@@ -2224,7 +2383,7 @@ C.parseExprImport = function(e) {
|
|
|
2224
2383
|
} else
|
|
2225
2384
|
this.unexpected();
|
|
2226
2385
|
};
|
|
2227
|
-
|
|
2386
|
+
A.parseDynamicImport = function(e) {
|
|
2228
2387
|
if (this.next(), e.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16)
|
|
2229
2388
|
this.eat(o.parenR) ? e.options = null : (this.expect(o.comma), this.afterTrailingComma(o.parenR) ? e.options = null : (e.options = this.parseMaybeAssign(), this.eat(o.parenR) || (this.expect(o.comma), this.afterTrailingComma(o.parenR) || this.unexpected())));
|
|
2230
2389
|
else if (!this.eat(o.parenR)) {
|
|
@@ -2233,34 +2392,34 @@ C.parseDynamicImport = function(e) {
|
|
|
2233
2392
|
}
|
|
2234
2393
|
return this.finishNode(e, "ImportExpression");
|
|
2235
2394
|
};
|
|
2236
|
-
|
|
2395
|
+
A.parseImportMeta = function(e) {
|
|
2237
2396
|
this.next();
|
|
2238
2397
|
var t = this.containsEsc;
|
|
2239
2398
|
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");
|
|
2240
2399
|
};
|
|
2241
|
-
|
|
2400
|
+
A.parseLiteral = function(e) {
|
|
2242
2401
|
var t = this.startNode();
|
|
2243
2402
|
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");
|
|
2244
2403
|
};
|
|
2245
|
-
|
|
2404
|
+
A.parseParenExpression = function() {
|
|
2246
2405
|
this.expect(o.parenL);
|
|
2247
2406
|
var e = this.parseExpression();
|
|
2248
2407
|
return this.expect(o.parenR), e;
|
|
2249
2408
|
};
|
|
2250
|
-
|
|
2409
|
+
A.shouldParseArrow = function(e) {
|
|
2251
2410
|
return !this.canInsertSemicolon();
|
|
2252
2411
|
};
|
|
2253
|
-
|
|
2412
|
+
A.parseParenAndDistinguishExpression = function(e, t) {
|
|
2254
2413
|
var i = this.start, r = this.startLoc, s, n = this.options.ecmaVersion >= 8;
|
|
2255
2414
|
if (this.options.ecmaVersion >= 6) {
|
|
2256
2415
|
this.next();
|
|
2257
|
-
var a = this.start, u = this.startLoc, l = [], c = !0, f = !1, h = new
|
|
2416
|
+
var a = this.start, u = this.startLoc, l = [], c = !0, f = !1, h = new pt(), g = this.yieldPos, y = this.awaitPos, _;
|
|
2258
2417
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== o.parenR; )
|
|
2259
2418
|
if (c ? c = !1 : this.expect(o.comma), n && this.afterTrailingComma(o.parenR, !0)) {
|
|
2260
2419
|
f = !0;
|
|
2261
2420
|
break;
|
|
2262
2421
|
} else if (this.type === o.ellipsis) {
|
|
2263
|
-
|
|
2422
|
+
_ = this.start, l.push(this.parseParenItem(this.parseRestBinding())), this.type === o.comma && this.raiseRecoverable(
|
|
2264
2423
|
this.start,
|
|
2265
2424
|
"Comma is not permitted after the rest element"
|
|
2266
2425
|
);
|
|
@@ -2269,8 +2428,8 @@ C.parseParenAndDistinguishExpression = function(e, t) {
|
|
|
2269
2428
|
l.push(this.parseMaybeAssign(!1, h, this.parseParenItem));
|
|
2270
2429
|
var d = this.lastTokEnd, w = this.lastTokEndLoc;
|
|
2271
2430
|
if (this.expect(o.parenR), e && this.shouldParseArrow(l) && this.eat(o.arrow))
|
|
2272
|
-
return this.checkPatternErrors(h, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos =
|
|
2273
|
-
(!l.length || f) && this.unexpected(this.lastTokStart),
|
|
2431
|
+
return this.checkPatternErrors(h, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = g, this.awaitPos = y, this.parseParenArrowList(i, r, l, t);
|
|
2432
|
+
(!l.length || f) && this.unexpected(this.lastTokStart), _ && this.unexpected(_), this.checkExpressionErrors(h, !0), this.yieldPos = g || this.yieldPos, this.awaitPos = y || this.awaitPos, l.length > 1 ? (s = this.startNodeAt(a, u), s.expressions = l, this.finishNodeAt(s, "SequenceExpression", d, w)) : s = l[0];
|
|
2274
2433
|
} else
|
|
2275
2434
|
s = this.parseParenExpression();
|
|
2276
2435
|
if (this.options.preserveParens) {
|
|
@@ -2279,14 +2438,14 @@ C.parseParenAndDistinguishExpression = function(e, t) {
|
|
|
2279
2438
|
} else
|
|
2280
2439
|
return s;
|
|
2281
2440
|
};
|
|
2282
|
-
|
|
2441
|
+
A.parseParenItem = function(e) {
|
|
2283
2442
|
return e;
|
|
2284
2443
|
};
|
|
2285
|
-
|
|
2444
|
+
A.parseParenArrowList = function(e, t, i, r) {
|
|
2286
2445
|
return this.parseArrowExpression(this.startNodeAt(e, t), i, !1, r);
|
|
2287
2446
|
};
|
|
2288
|
-
var
|
|
2289
|
-
|
|
2447
|
+
var Gs = [];
|
|
2448
|
+
A.parseNew = function() {
|
|
2290
2449
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
2291
2450
|
var e = this.startNode();
|
|
2292
2451
|
if (this.next(), this.options.ecmaVersion >= 6 && this.type === o.dot) {
|
|
@@ -2296,9 +2455,9 @@ C.parseNew = function() {
|
|
|
2296
2455
|
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");
|
|
2297
2456
|
}
|
|
2298
2457
|
var r = this.start, s = this.startLoc;
|
|
2299
|
-
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), r, s, !0, !1), this.eat(o.parenL) ? e.arguments = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments =
|
|
2458
|
+
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), r, s, !0, !1), this.eat(o.parenL) ? e.arguments = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments = Gs, this.finishNode(e, "NewExpression");
|
|
2300
2459
|
};
|
|
2301
|
-
|
|
2460
|
+
A.parseTemplateElement = function(e) {
|
|
2302
2461
|
var t = e.isTagged, i = this.startNode();
|
|
2303
2462
|
return this.type === o.invalidTemplate ? (t || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), i.value = {
|
|
2304
2463
|
raw: this.value.replace(/\r\n?/g, `
|
|
@@ -2310,7 +2469,7 @@ C.parseTemplateElement = function(e) {
|
|
|
2310
2469
|
cooked: this.value
|
|
2311
2470
|
}, this.next(), i.tail = this.type === o.backQuote, this.finishNode(i, "TemplateElement");
|
|
2312
2471
|
};
|
|
2313
|
-
|
|
2472
|
+
A.parseTemplate = function(e) {
|
|
2314
2473
|
e === void 0 && (e = {});
|
|
2315
2474
|
var t = e.isTagged;
|
|
2316
2475
|
t === void 0 && (t = !1);
|
|
@@ -2321,10 +2480,10 @@ C.parseTemplate = function(e) {
|
|
|
2321
2480
|
this.type === o.eof && this.raise(this.pos, "Unterminated template literal"), this.expect(o.dollarBraceL), i.expressions.push(this.parseExpression()), this.expect(o.braceR), i.quasis.push(r = this.parseTemplateElement({ isTagged: t }));
|
|
2322
2481
|
return this.next(), this.finishNode(i, "TemplateLiteral");
|
|
2323
2482
|
};
|
|
2324
|
-
|
|
2483
|
+
A.isAsyncProp = function(e) {
|
|
2325
2484
|
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === o.name || this.type === o.num || this.type === o.string || this.type === o.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === o.star) && !K.test(this.input.slice(this.lastTokEnd, this.start));
|
|
2326
2485
|
};
|
|
2327
|
-
|
|
2486
|
+
A.parseObj = function(e, t) {
|
|
2328
2487
|
var i = this.startNode(), r = !0, s = {};
|
|
2329
2488
|
for (i.properties = [], this.next(); !this.eat(o.braceR); ) {
|
|
2330
2489
|
if (r)
|
|
@@ -2336,7 +2495,7 @@ C.parseObj = function(e, t) {
|
|
|
2336
2495
|
}
|
|
2337
2496
|
return this.finishNode(i, e ? "ObjectPattern" : "ObjectExpression");
|
|
2338
2497
|
};
|
|
2339
|
-
|
|
2498
|
+
A.parseProperty = function(e, t) {
|
|
2340
2499
|
var i = this.startNode(), r, s, n, a;
|
|
2341
2500
|
if (this.options.ecmaVersion >= 9 && this.eat(o.ellipsis))
|
|
2342
2501
|
return e ? (i.argument = this.parseIdent(!1), this.type === o.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 === o.comma && t && t.trailingComma < 0 && (t.trailingComma = this.start), this.finishNode(i, "SpreadElement"));
|
|
@@ -2344,7 +2503,7 @@ C.parseProperty = function(e, t) {
|
|
|
2344
2503
|
var u = this.containsEsc;
|
|
2345
2504
|
return this.parsePropertyName(i), !e && !u && this.options.ecmaVersion >= 8 && !r && this.isAsyncProp(i) ? (s = !0, r = this.options.ecmaVersion >= 9 && this.eat(o.star), this.parsePropertyName(i)) : s = !1, this.parsePropertyValue(i, e, r, s, n, a, t, u), this.finishNode(i, "Property");
|
|
2346
2505
|
};
|
|
2347
|
-
|
|
2506
|
+
A.parseGetterSetter = function(e) {
|
|
2348
2507
|
var t = e.key.name;
|
|
2349
2508
|
this.parsePropertyName(e), e.value = this.parseMethod(!1), e.kind = t;
|
|
2350
2509
|
var i = e.kind === "get" ? 0 : 1;
|
|
@@ -2354,10 +2513,10 @@ C.parseGetterSetter = function(e) {
|
|
|
2354
2513
|
} else
|
|
2355
2514
|
e.kind === "set" && e.value.params[0].type === "RestElement" && this.raiseRecoverable(e.value.params[0].start, "Setter cannot use rest params");
|
|
2356
2515
|
};
|
|
2357
|
-
|
|
2516
|
+
A.parsePropertyValue = function(e, t, i, r, s, n, a, u) {
|
|
2358
2517
|
(i || r) && this.type === o.colon && this.unexpected(), this.eat(o.colon) ? (e.value = t ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1, a), e.kind = "init") : this.options.ecmaVersion >= 6 && this.type === o.parenL ? (t && this.unexpected(), e.method = !0, e.value = this.parseMethod(i, r), e.kind = "init") : !t && !u && this.options.ecmaVersion >= 5 && !e.computed && e.key.type === "Identifier" && (e.key.name === "get" || e.key.name === "set") && this.type !== o.comma && this.type !== o.braceR && this.type !== o.eq ? ((i || r) && this.unexpected(), this.parseGetterSetter(e)) : this.options.ecmaVersion >= 6 && !e.computed && e.key.type === "Identifier" ? ((i || r) && this.unexpected(), this.checkUnreserved(e.key), e.key.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = s), t ? e.value = this.parseMaybeDefault(s, n, this.copyNode(e.key)) : this.type === o.eq && a ? (a.shorthandAssign < 0 && (a.shorthandAssign = this.start), e.value = this.parseMaybeDefault(s, n, this.copyNode(e.key))) : e.value = this.copyNode(e.key), e.kind = "init", e.shorthand = !0) : this.unexpected();
|
|
2359
2518
|
};
|
|
2360
|
-
|
|
2519
|
+
A.parsePropertyName = function(e) {
|
|
2361
2520
|
if (this.options.ecmaVersion >= 6) {
|
|
2362
2521
|
if (this.eat(o.bracketL))
|
|
2363
2522
|
return e.computed = !0, e.key = this.parseMaybeAssign(), this.expect(o.bracketR), e.key;
|
|
@@ -2365,18 +2524,18 @@ C.parsePropertyName = function(e) {
|
|
|
2365
2524
|
}
|
|
2366
2525
|
return e.key = this.type === o.num || this.type === o.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
|
|
2367
2526
|
};
|
|
2368
|
-
|
|
2527
|
+
A.initFunction = function(e) {
|
|
2369
2528
|
e.id = null, this.options.ecmaVersion >= 6 && (e.generator = e.expression = !1), this.options.ecmaVersion >= 8 && (e.async = !1);
|
|
2370
2529
|
};
|
|
2371
|
-
|
|
2530
|
+
A.parseMethod = function(e, t, i) {
|
|
2372
2531
|
var r = this.startNode(), s = this.yieldPos, n = this.awaitPos, a = this.awaitIdentPos;
|
|
2373
|
-
return this.initFunction(r), this.options.ecmaVersion >= 6 && (r.generator = e), this.options.ecmaVersion >= 8 && (r.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
2532
|
+
return this.initFunction(r), this.options.ecmaVersion >= 6 && (r.generator = e), this.options.ecmaVersion >= 8 && (r.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(qt(t, r.generator) | ft | (i ? Di : 0)), this.expect(o.parenL), r.params = this.parseBindingList(o.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(r, !1, !0, !1), this.yieldPos = s, this.awaitPos = n, this.awaitIdentPos = a, this.finishNode(r, "FunctionExpression");
|
|
2374
2533
|
};
|
|
2375
|
-
|
|
2534
|
+
A.parseArrowExpression = function(e, t, i, r) {
|
|
2376
2535
|
var s = this.yieldPos, n = this.awaitPos, a = this.awaitIdentPos;
|
|
2377
|
-
return this.enterScope(
|
|
2536
|
+
return this.enterScope(qt(i, !1) | Wt), 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, r), this.yieldPos = s, this.awaitPos = n, this.awaitIdentPos = a, this.finishNode(e, "ArrowFunctionExpression");
|
|
2378
2537
|
};
|
|
2379
|
-
|
|
2538
|
+
A.parseFunctionBody = function(e, t, i, r) {
|
|
2380
2539
|
var s = t && this.type !== o.braceL, n = this.strict, a = !1;
|
|
2381
2540
|
if (s)
|
|
2382
2541
|
e.body = this.parseMaybeAssign(r), e.expression = !0, this.checkParams(e, !1);
|
|
@@ -2384,11 +2543,11 @@ C.parseFunctionBody = function(e, t, i, r) {
|
|
|
2384
2543
|
var u = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e.params);
|
|
2385
2544
|
(!n || u) && (a = this.strictDirective(this.end), a && u && this.raiseRecoverable(e.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
|
|
2386
2545
|
var l = this.labels;
|
|
2387
|
-
this.labels = [], a && (this.strict = !0), this.checkParams(e, !n && !a && !t && !i && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id,
|
|
2546
|
+
this.labels = [], a && (this.strict = !0), this.checkParams(e, !n && !a && !t && !i && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id, $i), e.body = this.parseBlock(!1, void 0, a && !n), e.expression = !1, this.adaptDirectivePrologue(e.body.body), this.labels = l;
|
|
2388
2547
|
}
|
|
2389
2548
|
this.exitScope();
|
|
2390
2549
|
};
|
|
2391
|
-
|
|
2550
|
+
A.isSimpleParamList = function(e) {
|
|
2392
2551
|
for (var t = 0, i = e; t < i.length; t += 1) {
|
|
2393
2552
|
var r = i[t];
|
|
2394
2553
|
if (r.type !== "Identifier")
|
|
@@ -2396,13 +2555,13 @@ C.isSimpleParamList = function(e) {
|
|
|
2396
2555
|
}
|
|
2397
2556
|
return !0;
|
|
2398
2557
|
};
|
|
2399
|
-
|
|
2558
|
+
A.checkParams = function(e, t) {
|
|
2400
2559
|
for (var i = /* @__PURE__ */ Object.create(null), r = 0, s = e.params; r < s.length; r += 1) {
|
|
2401
2560
|
var n = s[r];
|
|
2402
|
-
this.checkLValInnerPattern(n,
|
|
2561
|
+
this.checkLValInnerPattern(n, Kt, t ? null : i);
|
|
2403
2562
|
}
|
|
2404
2563
|
};
|
|
2405
|
-
|
|
2564
|
+
A.parseExprList = function(e, t, i, r) {
|
|
2406
2565
|
for (var s = [], n = !0; !this.eat(e); ) {
|
|
2407
2566
|
if (n)
|
|
2408
2567
|
n = !1;
|
|
@@ -2413,78 +2572,78 @@ C.parseExprList = function(e, t, i, r) {
|
|
|
2413
2572
|
}
|
|
2414
2573
|
return s;
|
|
2415
2574
|
};
|
|
2416
|
-
|
|
2575
|
+
A.checkUnreserved = function(e) {
|
|
2417
2576
|
var t = e.start, i = e.end, r = e.name;
|
|
2418
|
-
if (this.inGenerator && r === "yield" && this.raiseRecoverable(t, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && r === "await" && this.raiseRecoverable(t, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags &
|
|
2577
|
+
if (this.inGenerator && r === "yield" && this.raiseRecoverable(t, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && r === "await" && this.raiseRecoverable(t, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags & ht) && r === "arguments" && this.raiseRecoverable(t, "Cannot use 'arguments' in class field initializer"), this.inClassStaticBlock && (r === "arguments" || r === "await") && this.raise(t, "Cannot use " + r + " in class static initialization block"), this.keywords.test(r) && this.raise(t, "Unexpected keyword '" + r + "'"), !(this.options.ecmaVersion < 6 && this.input.slice(t, i).indexOf("\\") !== -1)) {
|
|
2419
2578
|
var s = this.strict ? this.reservedWordsStrict : this.reservedWords;
|
|
2420
2579
|
s.test(r) && (!this.inAsync && r === "await" && this.raiseRecoverable(t, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(t, "The keyword '" + r + "' is reserved"));
|
|
2421
2580
|
}
|
|
2422
2581
|
};
|
|
2423
|
-
|
|
2582
|
+
A.parseIdent = function(e) {
|
|
2424
2583
|
var t = this.parseIdentNode();
|
|
2425
2584
|
return this.next(!!e), this.finishNode(t, "Identifier"), e || (this.checkUnreserved(t), t.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = t.start)), t;
|
|
2426
2585
|
};
|
|
2427
|
-
|
|
2586
|
+
A.parseIdentNode = function() {
|
|
2428
2587
|
var e = this.startNode();
|
|
2429
2588
|
return this.type === o.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 = o.name) : this.unexpected(), e;
|
|
2430
2589
|
};
|
|
2431
|
-
|
|
2590
|
+
A.parsePrivateIdent = function() {
|
|
2432
2591
|
var e = this.startNode();
|
|
2433
2592
|
return this.type === o.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;
|
|
2434
2593
|
};
|
|
2435
|
-
|
|
2594
|
+
A.parseYield = function(e) {
|
|
2436
2595
|
this.yieldPos || (this.yieldPos = this.start);
|
|
2437
2596
|
var t = this.startNode();
|
|
2438
2597
|
return this.next(), this.type === o.semi || this.canInsertSemicolon() || this.type !== o.star && !this.type.startsExpr ? (t.delegate = !1, t.argument = null) : (t.delegate = this.eat(o.star), t.argument = this.parseMaybeAssign(e)), this.finishNode(t, "YieldExpression");
|
|
2439
2598
|
};
|
|
2440
|
-
|
|
2599
|
+
A.parseAwait = function(e) {
|
|
2441
2600
|
this.awaitPos || (this.awaitPos = this.start);
|
|
2442
2601
|
var t = this.startNode();
|
|
2443
2602
|
return this.next(), t.argument = this.parseMaybeUnary(null, !0, !1, e), this.finishNode(t, "AwaitExpression");
|
|
2444
2603
|
};
|
|
2445
|
-
var
|
|
2446
|
-
|
|
2447
|
-
var i =
|
|
2604
|
+
var it = M.prototype;
|
|
2605
|
+
it.raise = function(e, t) {
|
|
2606
|
+
var i = Ri(this.input, e);
|
|
2448
2607
|
t += " (" + i.line + ":" + i.column + ")", this.sourceFile && (t += " in " + this.sourceFile);
|
|
2449
2608
|
var r = new SyntaxError(t);
|
|
2450
2609
|
throw r.pos = e, r.loc = i, r.raisedAt = this.pos, r;
|
|
2451
2610
|
};
|
|
2452
|
-
|
|
2453
|
-
|
|
2611
|
+
it.raiseRecoverable = it.raise;
|
|
2612
|
+
it.curPosition = function() {
|
|
2454
2613
|
if (this.options.locations)
|
|
2455
|
-
return new
|
|
2614
|
+
return new Be(this.curLine, this.pos - this.lineStart);
|
|
2456
2615
|
};
|
|
2457
|
-
var pe = M.prototype,
|
|
2616
|
+
var pe = M.prototype, Js = function(t) {
|
|
2458
2617
|
this.flags = t, this.var = [], this.lexical = [], this.functions = [];
|
|
2459
2618
|
};
|
|
2460
2619
|
pe.enterScope = function(e) {
|
|
2461
|
-
this.scopeStack.push(new
|
|
2620
|
+
this.scopeStack.push(new Js(e));
|
|
2462
2621
|
};
|
|
2463
2622
|
pe.exitScope = function() {
|
|
2464
2623
|
this.scopeStack.pop();
|
|
2465
2624
|
};
|
|
2466
2625
|
pe.treatFunctionsAsVarInScope = function(e) {
|
|
2467
|
-
return e.flags &
|
|
2626
|
+
return e.flags & Ve || !this.inModule && e.flags & je;
|
|
2468
2627
|
};
|
|
2469
2628
|
pe.declareName = function(e, t, i) {
|
|
2470
2629
|
var r = !1;
|
|
2471
2630
|
if (t === ce) {
|
|
2472
2631
|
var s = this.currentScope();
|
|
2473
|
-
r = s.lexical.indexOf(e) > -1 || s.functions.indexOf(e) > -1 || s.var.indexOf(e) > -1, s.lexical.push(e), this.inModule && s.flags &
|
|
2474
|
-
} else if (t ===
|
|
2632
|
+
r = s.lexical.indexOf(e) > -1 || s.functions.indexOf(e) > -1 || s.var.indexOf(e) > -1, s.lexical.push(e), this.inModule && s.flags & je && delete this.undefinedExports[e];
|
|
2633
|
+
} else if (t === ji) {
|
|
2475
2634
|
var n = this.currentScope();
|
|
2476
2635
|
n.lexical.push(e);
|
|
2477
|
-
} else if (t ===
|
|
2636
|
+
} else if (t === Bi) {
|
|
2478
2637
|
var a = this.currentScope();
|
|
2479
2638
|
this.treatFunctionsAsVar ? r = a.lexical.indexOf(e) > -1 : r = a.lexical.indexOf(e) > -1 || a.var.indexOf(e) > -1, a.functions.push(e);
|
|
2480
2639
|
} else
|
|
2481
2640
|
for (var u = this.scopeStack.length - 1; u >= 0; --u) {
|
|
2482
2641
|
var l = this.scopeStack[u];
|
|
2483
|
-
if (l.lexical.indexOf(e) > -1 && !(l.flags &
|
|
2642
|
+
if (l.lexical.indexOf(e) > -1 && !(l.flags & Mi && l.lexical[0] === e) || !this.treatFunctionsAsVarInScope(l) && l.functions.indexOf(e) > -1) {
|
|
2484
2643
|
r = !0;
|
|
2485
2644
|
break;
|
|
2486
2645
|
}
|
|
2487
|
-
if (l.var.push(e), this.inModule && l.flags &
|
|
2646
|
+
if (l.var.push(e), this.inModule && l.flags & je && delete this.undefinedExports[e], l.flags & ht)
|
|
2488
2647
|
break;
|
|
2489
2648
|
}
|
|
2490
2649
|
r && this.raiseRecoverable(i, "Identifier '" + e + "' has already been declared");
|
|
@@ -2498,93 +2657,93 @@ pe.currentScope = function() {
|
|
|
2498
2657
|
pe.currentVarScope = function() {
|
|
2499
2658
|
for (var e = this.scopeStack.length - 1; ; e--) {
|
|
2500
2659
|
var t = this.scopeStack[e];
|
|
2501
|
-
if (t.flags & (
|
|
2660
|
+
if (t.flags & (ht | ze | ve))
|
|
2502
2661
|
return t;
|
|
2503
2662
|
}
|
|
2504
2663
|
};
|
|
2505
2664
|
pe.currentThisScope = function() {
|
|
2506
2665
|
for (var e = this.scopeStack.length - 1; ; e--) {
|
|
2507
2666
|
var t = this.scopeStack[e];
|
|
2508
|
-
if (t.flags & (
|
|
2667
|
+
if (t.flags & (ht | ze | ve) && !(t.flags & Wt))
|
|
2509
2668
|
return t;
|
|
2510
2669
|
}
|
|
2511
2670
|
};
|
|
2512
|
-
var
|
|
2513
|
-
this.type = "", this.start = i, this.end = 0, t.options.locations && (this.loc = new
|
|
2514
|
-
},
|
|
2515
|
-
|
|
2516
|
-
return new
|
|
2671
|
+
var dt = function(t, i, r) {
|
|
2672
|
+
this.type = "", this.start = i, this.end = 0, t.options.locations && (this.loc = new ct(t, r)), t.options.directSourceFile && (this.sourceFile = t.options.directSourceFile), t.options.ranges && (this.range = [i, 0]);
|
|
2673
|
+
}, We = M.prototype;
|
|
2674
|
+
We.startNode = function() {
|
|
2675
|
+
return new dt(this, this.start, this.startLoc);
|
|
2517
2676
|
};
|
|
2518
|
-
|
|
2519
|
-
return new
|
|
2677
|
+
We.startNodeAt = function(e, t) {
|
|
2678
|
+
return new dt(this, e, t);
|
|
2520
2679
|
};
|
|
2521
|
-
function
|
|
2680
|
+
function Wi(e, t, i, r) {
|
|
2522
2681
|
return e.type = t, e.end = i, this.options.locations && (e.loc.end = r), this.options.ranges && (e.range[1] = i), e;
|
|
2523
2682
|
}
|
|
2524
|
-
|
|
2525
|
-
return
|
|
2683
|
+
We.finishNode = function(e, t) {
|
|
2684
|
+
return Wi.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc);
|
|
2526
2685
|
};
|
|
2527
|
-
|
|
2528
|
-
return
|
|
2686
|
+
We.finishNodeAt = function(e, t, i, r) {
|
|
2687
|
+
return Wi.call(this, e, t, i, r);
|
|
2529
2688
|
};
|
|
2530
|
-
|
|
2531
|
-
var t = new
|
|
2689
|
+
We.copyNode = function(e) {
|
|
2690
|
+
var t = new dt(this, e.start, this.startLoc);
|
|
2532
2691
|
for (var i in e)
|
|
2533
2692
|
t[i] = e[i];
|
|
2534
2693
|
return t;
|
|
2535
2694
|
};
|
|
2536
|
-
var
|
|
2537
|
-
9:
|
|
2538
|
-
10:
|
|
2539
|
-
11:
|
|
2540
|
-
12:
|
|
2541
|
-
13:
|
|
2542
|
-
14:
|
|
2543
|
-
},
|
|
2695
|
+
var Qs = "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", qi = "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", Ki = qi + " Extended_Pictographic", Hi = Ki, Gi = Hi + " EBase EComp EMod EPres ExtPict", Ji = Gi, Ys = Ji, Xs = {
|
|
2696
|
+
9: qi,
|
|
2697
|
+
10: Ki,
|
|
2698
|
+
11: Hi,
|
|
2699
|
+
12: Gi,
|
|
2700
|
+
13: Ji,
|
|
2701
|
+
14: Ys
|
|
2702
|
+
}, Zs = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji", en = {
|
|
2544
2703
|
9: "",
|
|
2545
2704
|
10: "",
|
|
2546
2705
|
11: "",
|
|
2547
2706
|
12: "",
|
|
2548
2707
|
13: "",
|
|
2549
|
-
14:
|
|
2550
|
-
},
|
|
2551
|
-
9:
|
|
2552
|
-
10:
|
|
2553
|
-
11:
|
|
2554
|
-
12:
|
|
2555
|
-
13:
|
|
2556
|
-
14:
|
|
2557
|
-
},
|
|
2558
|
-
function
|
|
2559
|
-
var t =
|
|
2560
|
-
binary: fe(
|
|
2561
|
-
binaryOfStrings: fe(
|
|
2708
|
+
14: Zs
|
|
2709
|
+
}, fi = "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", Qi = "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", Yi = Qi + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", Xi = Yi + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", Zi = Xi + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", er = Zi + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", tn = er + " " + Qs, rn = {
|
|
2710
|
+
9: Qi,
|
|
2711
|
+
10: Yi,
|
|
2712
|
+
11: Xi,
|
|
2713
|
+
12: Zi,
|
|
2714
|
+
13: er,
|
|
2715
|
+
14: tn
|
|
2716
|
+
}, tr = {};
|
|
2717
|
+
function sn(e) {
|
|
2718
|
+
var t = tr[e] = {
|
|
2719
|
+
binary: fe(Xs[e] + " " + fi),
|
|
2720
|
+
binaryOfStrings: fe(en[e]),
|
|
2562
2721
|
nonBinary: {
|
|
2563
|
-
General_Category: fe(
|
|
2564
|
-
Script: fe(
|
|
2722
|
+
General_Category: fe(fi),
|
|
2723
|
+
Script: fe(rn[e])
|
|
2565
2724
|
}
|
|
2566
2725
|
};
|
|
2567
2726
|
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;
|
|
2568
2727
|
}
|
|
2569
|
-
for (var
|
|
2570
|
-
var
|
|
2571
|
-
|
|
2728
|
+
for (var Ct = 0, hi = [9, 10, 11, 12, 13, 14]; Ct < hi.length; Ct += 1) {
|
|
2729
|
+
var nn = hi[Ct];
|
|
2730
|
+
sn(nn);
|
|
2572
2731
|
}
|
|
2573
|
-
var b = M.prototype,
|
|
2732
|
+
var b = M.prototype, rt = function(t, i) {
|
|
2574
2733
|
this.parent = t, this.base = i || this;
|
|
2575
2734
|
};
|
|
2576
|
-
|
|
2735
|
+
rt.prototype.separatedFrom = function(t) {
|
|
2577
2736
|
for (var i = this; i; i = i.parent)
|
|
2578
2737
|
for (var r = t; r; r = r.parent)
|
|
2579
2738
|
if (i.base === r.base && i !== r)
|
|
2580
2739
|
return !0;
|
|
2581
2740
|
return !1;
|
|
2582
2741
|
};
|
|
2583
|
-
|
|
2584
|
-
return new
|
|
2742
|
+
rt.prototype.sibling = function() {
|
|
2743
|
+
return new rt(this.parent, this.base);
|
|
2585
2744
|
};
|
|
2586
2745
|
var se = function(t) {
|
|
2587
|
-
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 =
|
|
2746
|
+
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 = tr[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;
|
|
2588
2747
|
};
|
|
2589
2748
|
se.prototype.reset = function(t, i, r) {
|
|
2590
2749
|
var s = r.indexOf("v") !== -1, n = r.indexOf("u") !== -1;
|
|
@@ -2641,13 +2800,13 @@ b.validateRegExpFlags = function(e) {
|
|
|
2641
2800
|
}
|
|
2642
2801
|
this.options.ecmaVersion >= 15 && r && s && this.raise(e.start, "Invalid regular expression flag");
|
|
2643
2802
|
};
|
|
2644
|
-
function
|
|
2803
|
+
function an(e) {
|
|
2645
2804
|
for (var t in e)
|
|
2646
2805
|
return !0;
|
|
2647
2806
|
return !1;
|
|
2648
2807
|
}
|
|
2649
2808
|
b.validateRegExpPattern = function(e) {
|
|
2650
|
-
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 &&
|
|
2809
|
+
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && an(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e));
|
|
2651
2810
|
};
|
|
2652
2811
|
b.regexp_pattern = function(e) {
|
|
2653
2812
|
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(
|
|
@@ -2667,7 +2826,7 @@ b.regexp_pattern = function(e) {
|
|
|
2667
2826
|
};
|
|
2668
2827
|
b.regexp_disjunction = function(e) {
|
|
2669
2828
|
var t = this.options.ecmaVersion >= 16;
|
|
2670
|
-
for (t && (e.branchID = new
|
|
2829
|
+
for (t && (e.branchID = new rt(e.branchID, null)), this.regexp_alternative(e); e.eat(
|
|
2671
2830
|
124
|
|
2672
2831
|
/* | */
|
|
2673
2832
|
); )
|
|
@@ -2849,11 +3008,11 @@ b.regexp_eatCapturingGroup = function(e) {
|
|
|
2849
3008
|
return !1;
|
|
2850
3009
|
};
|
|
2851
3010
|
b.regexp_eatModifiers = function(e) {
|
|
2852
|
-
for (var t = "", i = 0; (i = e.current()) !== -1 &&
|
|
3011
|
+
for (var t = "", i = 0; (i = e.current()) !== -1 && on(i); )
|
|
2853
3012
|
t += ue(i), e.advance();
|
|
2854
3013
|
return t;
|
|
2855
3014
|
};
|
|
2856
|
-
function
|
|
3015
|
+
function on(e) {
|
|
2857
3016
|
return e === 105 || e === 109 || e === 115;
|
|
2858
3017
|
}
|
|
2859
3018
|
b.regexp_eatExtendedAtom = function(e) {
|
|
@@ -2867,13 +3026,13 @@ b.regexp_eatInvalidBracedQuantifier = function(e) {
|
|
|
2867
3026
|
};
|
|
2868
3027
|
b.regexp_eatSyntaxCharacter = function(e) {
|
|
2869
3028
|
var t = e.current();
|
|
2870
|
-
return
|
|
3029
|
+
return ir(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2871
3030
|
};
|
|
2872
|
-
function
|
|
3031
|
+
function ir(e) {
|
|
2873
3032
|
return e === 36 || e >= 40 && e <= 43 || e === 46 || e === 63 || e >= 91 && e <= 94 || e >= 123 && e <= 125;
|
|
2874
3033
|
}
|
|
2875
3034
|
b.regexp_eatPatternCharacters = function(e) {
|
|
2876
|
-
for (var t = e.pos, i = 0; (i = e.current()) !== -1 && !
|
|
3035
|
+
for (var t = e.pos, i = 0; (i = e.current()) !== -1 && !ir(i); )
|
|
2877
3036
|
e.advance();
|
|
2878
3037
|
return e.pos !== t;
|
|
2879
3038
|
};
|
|
@@ -2923,16 +3082,16 @@ b.regexp_eatRegExpIdentifierName = function(e) {
|
|
|
2923
3082
|
};
|
|
2924
3083
|
b.regexp_eatRegExpIdentifierStart = function(e) {
|
|
2925
3084
|
var t = e.pos, i = this.options.ecmaVersion >= 11, r = e.current(i);
|
|
2926
|
-
return e.advance(i), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (r = e.lastIntValue),
|
|
3085
|
+
return e.advance(i), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (r = e.lastIntValue), un(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
2927
3086
|
};
|
|
2928
|
-
function
|
|
3087
|
+
function un(e) {
|
|
2929
3088
|
return ie(e, !0) || e === 36 || e === 95;
|
|
2930
3089
|
}
|
|
2931
3090
|
b.regexp_eatRegExpIdentifierPart = function(e) {
|
|
2932
3091
|
var t = e.pos, i = this.options.ecmaVersion >= 11, r = e.current(i);
|
|
2933
|
-
return e.advance(i), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (r = e.lastIntValue),
|
|
3092
|
+
return e.advance(i), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (r = e.lastIntValue), ln(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
2934
3093
|
};
|
|
2935
|
-
function
|
|
3094
|
+
function ln(e) {
|
|
2936
3095
|
return he(e, !0) || e === 36 || e === 95 || e === 8204 || e === 8205;
|
|
2937
3096
|
}
|
|
2938
3097
|
b.regexp_eatAtomEscape = function(e) {
|
|
@@ -2977,7 +3136,7 @@ b.regexp_eatCControlLetter = function(e) {
|
|
|
2977
3136
|
return !1;
|
|
2978
3137
|
};
|
|
2979
3138
|
b.regexp_eatZero = function(e) {
|
|
2980
|
-
return e.current() === 48 && !
|
|
3139
|
+
return e.current() === 48 && !mt(e.lookahead()) ? (e.lastIntValue = 0, e.advance(), !0) : !1;
|
|
2981
3140
|
};
|
|
2982
3141
|
b.regexp_eatControlEscape = function(e) {
|
|
2983
3142
|
var t = e.current();
|
|
@@ -2985,9 +3144,9 @@ b.regexp_eatControlEscape = function(e) {
|
|
|
2985
3144
|
};
|
|
2986
3145
|
b.regexp_eatControlLetter = function(e) {
|
|
2987
3146
|
var t = e.current();
|
|
2988
|
-
return
|
|
3147
|
+
return rr(t) ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
2989
3148
|
};
|
|
2990
|
-
function
|
|
3149
|
+
function rr(e) {
|
|
2991
3150
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
2992
3151
|
}
|
|
2993
3152
|
b.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
@@ -3022,13 +3181,13 @@ b.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
|
3022
3181
|
) && this.regexp_eatHexDigits(e) && e.eat(
|
|
3023
3182
|
125
|
|
3024
3183
|
/* } */
|
|
3025
|
-
) &&
|
|
3184
|
+
) && cn(e.lastIntValue))
|
|
3026
3185
|
return !0;
|
|
3027
3186
|
r && e.raise("Invalid unicode escape"), e.pos = i;
|
|
3028
3187
|
}
|
|
3029
3188
|
return !1;
|
|
3030
3189
|
};
|
|
3031
|
-
function
|
|
3190
|
+
function cn(e) {
|
|
3032
3191
|
return e >= 0 && e <= 1114111;
|
|
3033
3192
|
}
|
|
3034
3193
|
b.regexp_eatIdentityEscape = function(e) {
|
|
@@ -3051,10 +3210,10 @@ b.regexp_eatDecimalEscape = function(e) {
|
|
|
3051
3210
|
}
|
|
3052
3211
|
return !1;
|
|
3053
3212
|
};
|
|
3054
|
-
var
|
|
3213
|
+
var sr = 0, le = 1, Q = 2;
|
|
3055
3214
|
b.regexp_eatCharacterClassEscape = function(e) {
|
|
3056
3215
|
var t = e.current();
|
|
3057
|
-
if (
|
|
3216
|
+
if (fn(t))
|
|
3058
3217
|
return e.lastIntValue = -1, e.advance(), le;
|
|
3059
3218
|
var i = !1;
|
|
3060
3219
|
if (e.switchU && this.options.ecmaVersion >= 9 && ((i = t === 80) || t === 112)) {
|
|
@@ -3070,9 +3229,9 @@ b.regexp_eatCharacterClassEscape = function(e) {
|
|
|
3070
3229
|
return i && r === Q && e.raise("Invalid property name"), r;
|
|
3071
3230
|
e.raise("Invalid property name");
|
|
3072
3231
|
}
|
|
3073
|
-
return
|
|
3232
|
+
return sr;
|
|
3074
3233
|
};
|
|
3075
|
-
function
|
|
3234
|
+
function fn(e) {
|
|
3076
3235
|
return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87;
|
|
3077
3236
|
}
|
|
3078
3237
|
b.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
@@ -3091,7 +3250,7 @@ b.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
|
3091
3250
|
var s = e.lastStringValue;
|
|
3092
3251
|
return this.regexp_validateUnicodePropertyNameOrValue(e, s);
|
|
3093
3252
|
}
|
|
3094
|
-
return
|
|
3253
|
+
return sr;
|
|
3095
3254
|
};
|
|
3096
3255
|
b.regexp_validateUnicodePropertyNameAndValue = function(e, t, i) {
|
|
3097
3256
|
Pe(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(i) || e.raise("Invalid property value");
|
|
@@ -3105,21 +3264,21 @@ b.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
|
3105
3264
|
};
|
|
3106
3265
|
b.regexp_eatUnicodePropertyName = function(e) {
|
|
3107
3266
|
var t = 0;
|
|
3108
|
-
for (e.lastStringValue = "";
|
|
3267
|
+
for (e.lastStringValue = ""; nr(t = e.current()); )
|
|
3109
3268
|
e.lastStringValue += ue(t), e.advance();
|
|
3110
3269
|
return e.lastStringValue !== "";
|
|
3111
3270
|
};
|
|
3112
|
-
function
|
|
3113
|
-
return
|
|
3271
|
+
function nr(e) {
|
|
3272
|
+
return rr(e) || e === 95;
|
|
3114
3273
|
}
|
|
3115
3274
|
b.regexp_eatUnicodePropertyValue = function(e) {
|
|
3116
3275
|
var t = 0;
|
|
3117
|
-
for (e.lastStringValue = "";
|
|
3276
|
+
for (e.lastStringValue = ""; hn(t = e.current()); )
|
|
3118
3277
|
e.lastStringValue += ue(t), e.advance();
|
|
3119
3278
|
return e.lastStringValue !== "";
|
|
3120
3279
|
};
|
|
3121
|
-
function
|
|
3122
|
-
return
|
|
3280
|
+
function hn(e) {
|
|
3281
|
+
return nr(e) || mt(e);
|
|
3123
3282
|
}
|
|
3124
3283
|
b.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
3125
3284
|
return this.regexp_eatUnicodePropertyValue(e);
|
|
@@ -3165,7 +3324,7 @@ b.regexp_eatClassAtom = function(e) {
|
|
|
3165
3324
|
return !0;
|
|
3166
3325
|
if (e.switchU) {
|
|
3167
3326
|
var i = e.current();
|
|
3168
|
-
(i === 99 ||
|
|
3327
|
+
(i === 99 || ur(i)) && e.raise("Invalid class escape"), e.raise("Invalid escape");
|
|
3169
3328
|
}
|
|
3170
3329
|
e.pos = t;
|
|
3171
3330
|
}
|
|
@@ -3318,24 +3477,24 @@ b.regexp_eatClassSetCharacter = function(e) {
|
|
|
3318
3477
|
/* b */
|
|
3319
3478
|
) ? (e.lastIntValue = 8, !0) : (e.pos = t, !1);
|
|
3320
3479
|
var i = e.current();
|
|
3321
|
-
return i < 0 || i === e.lookahead() &&
|
|
3480
|
+
return i < 0 || i === e.lookahead() && pn(i) || dn(i) ? !1 : (e.advance(), e.lastIntValue = i, !0);
|
|
3322
3481
|
};
|
|
3323
|
-
function
|
|
3482
|
+
function pn(e) {
|
|
3324
3483
|
return e === 33 || e >= 35 && e <= 38 || e >= 42 && e <= 44 || e === 46 || e >= 58 && e <= 64 || e === 94 || e === 96 || e === 126;
|
|
3325
3484
|
}
|
|
3326
|
-
function
|
|
3485
|
+
function dn(e) {
|
|
3327
3486
|
return e === 40 || e === 41 || e === 45 || e === 47 || e >= 91 && e <= 93 || e >= 123 && e <= 125;
|
|
3328
3487
|
}
|
|
3329
3488
|
b.regexp_eatClassSetReservedPunctuator = function(e) {
|
|
3330
3489
|
var t = e.current();
|
|
3331
|
-
return
|
|
3490
|
+
return mn(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
3332
3491
|
};
|
|
3333
|
-
function
|
|
3492
|
+
function mn(e) {
|
|
3334
3493
|
return e === 33 || e === 35 || e === 37 || e === 38 || e === 44 || e === 45 || e >= 58 && e <= 62 || e === 64 || e === 96 || e === 126;
|
|
3335
3494
|
}
|
|
3336
3495
|
b.regexp_eatClassControlLetter = function(e) {
|
|
3337
3496
|
var t = e.current();
|
|
3338
|
-
return
|
|
3497
|
+
return mt(t) || t === 95 ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
3339
3498
|
};
|
|
3340
3499
|
b.regexp_eatHexEscapeSequence = function(e) {
|
|
3341
3500
|
var t = e.pos;
|
|
@@ -3351,23 +3510,23 @@ b.regexp_eatHexEscapeSequence = function(e) {
|
|
|
3351
3510
|
};
|
|
3352
3511
|
b.regexp_eatDecimalDigits = function(e) {
|
|
3353
3512
|
var t = e.pos, i = 0;
|
|
3354
|
-
for (e.lastIntValue = 0;
|
|
3513
|
+
for (e.lastIntValue = 0; mt(i = e.current()); )
|
|
3355
3514
|
e.lastIntValue = 10 * e.lastIntValue + (i - 48), e.advance();
|
|
3356
3515
|
return e.pos !== t;
|
|
3357
3516
|
};
|
|
3358
|
-
function
|
|
3517
|
+
function mt(e) {
|
|
3359
3518
|
return e >= 48 && e <= 57;
|
|
3360
3519
|
}
|
|
3361
3520
|
b.regexp_eatHexDigits = function(e) {
|
|
3362
3521
|
var t = e.pos, i = 0;
|
|
3363
|
-
for (e.lastIntValue = 0;
|
|
3364
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
3522
|
+
for (e.lastIntValue = 0; ar(i = e.current()); )
|
|
3523
|
+
e.lastIntValue = 16 * e.lastIntValue + or(i), e.advance();
|
|
3365
3524
|
return e.pos !== t;
|
|
3366
3525
|
};
|
|
3367
|
-
function
|
|
3526
|
+
function ar(e) {
|
|
3368
3527
|
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
3369
3528
|
}
|
|
3370
|
-
function
|
|
3529
|
+
function or(e) {
|
|
3371
3530
|
return e >= 65 && e <= 70 ? 10 + (e - 65) : e >= 97 && e <= 102 ? 10 + (e - 97) : e - 48;
|
|
3372
3531
|
}
|
|
3373
3532
|
b.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
@@ -3384,9 +3543,9 @@ b.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
|
3384
3543
|
};
|
|
3385
3544
|
b.regexp_eatOctalDigit = function(e) {
|
|
3386
3545
|
var t = e.current();
|
|
3387
|
-
return
|
|
3546
|
+
return ur(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1);
|
|
3388
3547
|
};
|
|
3389
|
-
function
|
|
3548
|
+
function ur(e) {
|
|
3390
3549
|
return e >= 48 && e <= 55;
|
|
3391
3550
|
}
|
|
3392
3551
|
b.regexp_eatFixedHexDigits = function(e, t) {
|
|
@@ -3394,22 +3553,22 @@ b.regexp_eatFixedHexDigits = function(e, t) {
|
|
|
3394
3553
|
e.lastIntValue = 0;
|
|
3395
3554
|
for (var r = 0; r < t; ++r) {
|
|
3396
3555
|
var s = e.current();
|
|
3397
|
-
if (!
|
|
3556
|
+
if (!ar(s))
|
|
3398
3557
|
return e.pos = i, !1;
|
|
3399
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
3558
|
+
e.lastIntValue = 16 * e.lastIntValue + or(s), e.advance();
|
|
3400
3559
|
}
|
|
3401
3560
|
return !0;
|
|
3402
3561
|
};
|
|
3403
|
-
var
|
|
3404
|
-
this.type = t.type, this.value = t.value, this.start = t.start, this.end = t.end, t.options.locations && (this.loc = new
|
|
3405
|
-
},
|
|
3406
|
-
|
|
3407
|
-
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new
|
|
3562
|
+
var Gt = function(t) {
|
|
3563
|
+
this.type = t.type, this.value = t.value, this.start = t.start, this.end = t.end, t.options.locations && (this.loc = new ct(t, t.startLoc, t.endLoc)), t.options.ranges && (this.range = [t.start, t.end]);
|
|
3564
|
+
}, k = M.prototype;
|
|
3565
|
+
k.next = function(e) {
|
|
3566
|
+
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new Gt(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
3408
3567
|
};
|
|
3409
|
-
|
|
3410
|
-
return this.next(), new
|
|
3568
|
+
k.getToken = function() {
|
|
3569
|
+
return this.next(), new Gt(this);
|
|
3411
3570
|
};
|
|
3412
|
-
typeof Symbol < "u" && (
|
|
3571
|
+
typeof Symbol < "u" && (k[Symbol.iterator] = function() {
|
|
3413
3572
|
var e = this;
|
|
3414
3573
|
return {
|
|
3415
3574
|
next: function() {
|
|
@@ -3421,7 +3580,7 @@ typeof Symbol < "u" && (A[Symbol.iterator] = function() {
|
|
|
3421
3580
|
}
|
|
3422
3581
|
};
|
|
3423
3582
|
});
|
|
3424
|
-
|
|
3583
|
+
k.nextToken = function() {
|
|
3425
3584
|
var e = this.curContext();
|
|
3426
3585
|
if ((!e || !e.preserveSpace) && this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length)
|
|
3427
3586
|
return this.finishToken(o.eof);
|
|
@@ -3429,20 +3588,20 @@ A.nextToken = function() {
|
|
|
3429
3588
|
return e.override(this);
|
|
3430
3589
|
this.readToken(this.fullCharCodeAtPos());
|
|
3431
3590
|
};
|
|
3432
|
-
|
|
3591
|
+
k.readToken = function(e) {
|
|
3433
3592
|
return ie(e, this.options.ecmaVersion >= 6) || e === 92 ? this.readWord() : this.getTokenFromCode(e);
|
|
3434
3593
|
};
|
|
3435
|
-
|
|
3594
|
+
k.fullCharCodeAtPos = function() {
|
|
3436
3595
|
var e = this.input.charCodeAt(this.pos);
|
|
3437
3596
|
if (e <= 55295 || e >= 56320)
|
|
3438
3597
|
return e;
|
|
3439
3598
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3440
3599
|
return t <= 56319 || t >= 57344 ? e : (e << 10) + t - 56613888;
|
|
3441
3600
|
};
|
|
3442
|
-
|
|
3601
|
+
k.skipBlockComment = function() {
|
|
3443
3602
|
var e = this.options.onComment && this.curPosition(), t = this.pos, i = this.input.indexOf("*/", this.pos += 2);
|
|
3444
3603
|
if (i === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = i + 2, this.options.locations)
|
|
3445
|
-
for (var r = void 0, s = t; (r =
|
|
3604
|
+
for (var r = void 0, s = t; (r = Vi(this.input, s, this.pos)) > -1; )
|
|
3446
3605
|
++this.curLine, s = this.lineStart = r;
|
|
3447
3606
|
this.options.onComment && this.options.onComment(
|
|
3448
3607
|
!0,
|
|
@@ -3453,8 +3612,8 @@ A.skipBlockComment = function() {
|
|
|
3453
3612
|
this.curPosition()
|
|
3454
3613
|
);
|
|
3455
3614
|
};
|
|
3456
|
-
|
|
3457
|
-
for (var t = this.pos, i = this.options.onComment && this.curPosition(), r = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !
|
|
3615
|
+
k.skipLineComment = function(e) {
|
|
3616
|
+
for (var t = this.pos, i = this.options.onComment && this.curPosition(), r = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !Te(r); )
|
|
3458
3617
|
r = this.input.charCodeAt(++this.pos);
|
|
3459
3618
|
this.options.onComment && this.options.onComment(
|
|
3460
3619
|
!1,
|
|
@@ -3465,7 +3624,7 @@ A.skipLineComment = function(e) {
|
|
|
3465
3624
|
this.curPosition()
|
|
3466
3625
|
);
|
|
3467
3626
|
};
|
|
3468
|
-
|
|
3627
|
+
k.skipSpace = function() {
|
|
3469
3628
|
e: for (; this.pos < this.input.length; ) {
|
|
3470
3629
|
var e = this.input.charCodeAt(this.pos);
|
|
3471
3630
|
switch (e) {
|
|
@@ -3493,34 +3652,34 @@ A.skipSpace = function() {
|
|
|
3493
3652
|
}
|
|
3494
3653
|
break;
|
|
3495
3654
|
default:
|
|
3496
|
-
if (e > 8 && e < 14 || e >= 5760 &&
|
|
3655
|
+
if (e > 8 && e < 14 || e >= 5760 && Oi.test(String.fromCharCode(e)))
|
|
3497
3656
|
++this.pos;
|
|
3498
3657
|
else
|
|
3499
3658
|
break e;
|
|
3500
3659
|
}
|
|
3501
3660
|
}
|
|
3502
3661
|
};
|
|
3503
|
-
|
|
3662
|
+
k.finishToken = function(e, t) {
|
|
3504
3663
|
this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
|
|
3505
3664
|
var i = this.type;
|
|
3506
3665
|
this.type = e, this.value = t, this.updateContext(i);
|
|
3507
3666
|
};
|
|
3508
|
-
|
|
3667
|
+
k.readToken_dot = function() {
|
|
3509
3668
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
3510
3669
|
if (e >= 48 && e <= 57)
|
|
3511
3670
|
return this.readNumber(!0);
|
|
3512
3671
|
var t = this.input.charCodeAt(this.pos + 2);
|
|
3513
3672
|
return this.options.ecmaVersion >= 6 && e === 46 && t === 46 ? (this.pos += 3, this.finishToken(o.ellipsis)) : (++this.pos, this.finishToken(o.dot));
|
|
3514
3673
|
};
|
|
3515
|
-
|
|
3674
|
+
k.readToken_slash = function() {
|
|
3516
3675
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
3517
3676
|
return this.exprAllowed ? (++this.pos, this.readRegexp()) : e === 61 ? this.finishOp(o.assign, 2) : this.finishOp(o.slash, 1);
|
|
3518
3677
|
};
|
|
3519
|
-
|
|
3678
|
+
k.readToken_mult_modulo_exp = function(e) {
|
|
3520
3679
|
var t = this.input.charCodeAt(this.pos + 1), i = 1, r = e === 42 ? o.star : o.modulo;
|
|
3521
3680
|
return this.options.ecmaVersion >= 7 && e === 42 && t === 42 && (++i, r = o.starstar, t = this.input.charCodeAt(this.pos + 2)), t === 61 ? this.finishOp(o.assign, i + 1) : this.finishOp(r, i);
|
|
3522
3681
|
};
|
|
3523
|
-
|
|
3682
|
+
k.readToken_pipe_amp = function(e) {
|
|
3524
3683
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3525
3684
|
if (t === e) {
|
|
3526
3685
|
if (this.options.ecmaVersion >= 12) {
|
|
@@ -3532,23 +3691,23 @@ A.readToken_pipe_amp = function(e) {
|
|
|
3532
3691
|
}
|
|
3533
3692
|
return t === 61 ? this.finishOp(o.assign, 2) : this.finishOp(e === 124 ? o.bitwiseOR : o.bitwiseAND, 1);
|
|
3534
3693
|
};
|
|
3535
|
-
|
|
3694
|
+
k.readToken_caret = function() {
|
|
3536
3695
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
3537
3696
|
return e === 61 ? this.finishOp(o.assign, 2) : this.finishOp(o.bitwiseXOR, 1);
|
|
3538
3697
|
};
|
|
3539
|
-
|
|
3698
|
+
k.readToken_plus_min = function(e) {
|
|
3540
3699
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3541
3700
|
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || K.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(o.incDec, 2) : t === 61 ? this.finishOp(o.assign, 2) : this.finishOp(o.plusMin, 1);
|
|
3542
3701
|
};
|
|
3543
|
-
|
|
3702
|
+
k.readToken_lt_gt = function(e) {
|
|
3544
3703
|
var t = this.input.charCodeAt(this.pos + 1), i = 1;
|
|
3545
3704
|
return t === e ? (i = e === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2, this.input.charCodeAt(this.pos + i) === 61 ? this.finishOp(o.assign, i + 1) : this.finishOp(o.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(o.relational, i));
|
|
3546
3705
|
};
|
|
3547
|
-
|
|
3706
|
+
k.readToken_eq_excl = function(e) {
|
|
3548
3707
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3549
3708
|
return t === 61 ? this.finishOp(o.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) : e === 61 && t === 62 && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(o.arrow)) : this.finishOp(e === 61 ? o.eq : o.prefix, 1);
|
|
3550
3709
|
};
|
|
3551
|
-
|
|
3710
|
+
k.readToken_question = function() {
|
|
3552
3711
|
var e = this.options.ecmaVersion;
|
|
3553
3712
|
if (e >= 11) {
|
|
3554
3713
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
@@ -3568,13 +3727,13 @@ A.readToken_question = function() {
|
|
|
3568
3727
|
}
|
|
3569
3728
|
return this.finishOp(o.question, 1);
|
|
3570
3729
|
};
|
|
3571
|
-
|
|
3730
|
+
k.readToken_numberSign = function() {
|
|
3572
3731
|
var e = this.options.ecmaVersion, t = 35;
|
|
3573
3732
|
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(), ie(t, !0) || t === 92))
|
|
3574
3733
|
return this.finishToken(o.privateId, this.readWord1());
|
|
3575
3734
|
this.raise(this.pos, "Unexpected character '" + ue(t) + "'");
|
|
3576
3735
|
};
|
|
3577
|
-
|
|
3736
|
+
k.getTokenFromCode = function(e) {
|
|
3578
3737
|
switch (e) {
|
|
3579
3738
|
// The interpretation of a dot depends on whether it is followed
|
|
3580
3739
|
// by a digit or another two dots.
|
|
@@ -3661,11 +3820,11 @@ A.getTokenFromCode = function(e) {
|
|
|
3661
3820
|
}
|
|
3662
3821
|
this.raise(this.pos, "Unexpected character '" + ue(e) + "'");
|
|
3663
3822
|
};
|
|
3664
|
-
|
|
3823
|
+
k.finishOp = function(e, t) {
|
|
3665
3824
|
var i = this.input.slice(this.pos, this.pos + t);
|
|
3666
3825
|
return this.pos += t, this.finishToken(e, i);
|
|
3667
3826
|
};
|
|
3668
|
-
|
|
3827
|
+
k.readRegexp = function() {
|
|
3669
3828
|
for (var e, t, i = this.pos; ; ) {
|
|
3670
3829
|
this.pos >= this.input.length && this.raise(i, "Unterminated regular expression");
|
|
3671
3830
|
var r = this.input.charAt(this.pos);
|
|
@@ -3695,7 +3854,7 @@ A.readRegexp = function() {
|
|
|
3695
3854
|
}
|
|
3696
3855
|
return this.finishToken(o.regexp, { pattern: s, flags: a, value: l });
|
|
3697
3856
|
};
|
|
3698
|
-
|
|
3857
|
+
k.readInt = function(e, t, i) {
|
|
3699
3858
|
for (var r = this.options.ecmaVersion >= 12 && t === void 0, s = i && this.input.charCodeAt(this.pos) === 48, n = this.pos, a = 0, u = 0, l = 0, c = t ?? 1 / 0; l < c; ++l, ++this.pos) {
|
|
3700
3859
|
var f = this.input.charCodeAt(this.pos), h = void 0;
|
|
3701
3860
|
if (r && f === 95) {
|
|
@@ -3708,33 +3867,33 @@ A.readInt = function(e, t, i) {
|
|
|
3708
3867
|
}
|
|
3709
3868
|
return r && u === 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 : a;
|
|
3710
3869
|
};
|
|
3711
|
-
function
|
|
3870
|
+
function gn(e, t) {
|
|
3712
3871
|
return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, ""));
|
|
3713
3872
|
}
|
|
3714
|
-
function
|
|
3873
|
+
function lr(e) {
|
|
3715
3874
|
return typeof BigInt != "function" ? null : BigInt(e.replace(/_/g, ""));
|
|
3716
3875
|
}
|
|
3717
|
-
|
|
3876
|
+
k.readRadixNumber = function(e) {
|
|
3718
3877
|
var t = this.pos;
|
|
3719
3878
|
this.pos += 2;
|
|
3720
3879
|
var i = this.readInt(e);
|
|
3721
|
-
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i =
|
|
3880
|
+
return i == null && this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i = lr(this.input.slice(t, this.pos)), ++this.pos) : ie(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(o.num, i);
|
|
3722
3881
|
};
|
|
3723
|
-
|
|
3882
|
+
k.readNumber = function(e) {
|
|
3724
3883
|
var t = this.pos;
|
|
3725
3884
|
!e && this.readInt(10, void 0, !0) === null && this.raise(t, "Invalid number");
|
|
3726
3885
|
var i = this.pos - t >= 2 && this.input.charCodeAt(t) === 48;
|
|
3727
3886
|
i && this.strict && this.raise(t, "Invalid number");
|
|
3728
3887
|
var r = this.input.charCodeAt(this.pos);
|
|
3729
3888
|
if (!i && !e && this.options.ecmaVersion >= 11 && r === 110) {
|
|
3730
|
-
var s =
|
|
3889
|
+
var s = lr(this.input.slice(t, this.pos));
|
|
3731
3890
|
return ++this.pos, ie(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(o.num, s);
|
|
3732
3891
|
}
|
|
3733
3892
|
i && /[89]/.test(this.input.slice(t, this.pos)) && (i = !1), r === 46 && !i && (++this.pos, this.readInt(10), r = this.input.charCodeAt(this.pos)), (r === 69 || r === 101) && !i && (r = this.input.charCodeAt(++this.pos), (r === 43 || r === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")), ie(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
3734
|
-
var n =
|
|
3893
|
+
var n = gn(this.input.slice(t, this.pos), i);
|
|
3735
3894
|
return this.finishToken(o.num, n);
|
|
3736
3895
|
};
|
|
3737
|
-
|
|
3896
|
+
k.readCodePoint = function() {
|
|
3738
3897
|
var e = this.input.charCodeAt(this.pos), t;
|
|
3739
3898
|
if (e === 123) {
|
|
3740
3899
|
this.options.ecmaVersion < 6 && this.unexpected();
|
|
@@ -3744,35 +3903,35 @@ A.readCodePoint = function() {
|
|
|
3744
3903
|
t = this.readHexChar(4);
|
|
3745
3904
|
return t;
|
|
3746
3905
|
};
|
|
3747
|
-
|
|
3906
|
+
k.readString = function(e) {
|
|
3748
3907
|
for (var t = "", i = ++this.pos; ; ) {
|
|
3749
3908
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
|
|
3750
3909
|
var r = this.input.charCodeAt(this.pos);
|
|
3751
3910
|
if (r === e)
|
|
3752
3911
|
break;
|
|
3753
|
-
r === 92 ? (t += this.input.slice(i, this.pos), t += this.readEscapedChar(!1), i = this.pos) : r === 8232 || r === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (
|
|
3912
|
+
r === 92 ? (t += this.input.slice(i, this.pos), t += this.readEscapedChar(!1), i = this.pos) : r === 8232 || r === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (Te(r) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
|
|
3754
3913
|
}
|
|
3755
3914
|
return t += this.input.slice(i, this.pos++), this.finishToken(o.string, t);
|
|
3756
3915
|
};
|
|
3757
|
-
var
|
|
3758
|
-
|
|
3916
|
+
var cr = {};
|
|
3917
|
+
k.tryReadTemplateToken = function() {
|
|
3759
3918
|
this.inTemplateElement = !0;
|
|
3760
3919
|
try {
|
|
3761
3920
|
this.readTmplToken();
|
|
3762
3921
|
} catch (e) {
|
|
3763
|
-
if (e ===
|
|
3922
|
+
if (e === cr)
|
|
3764
3923
|
this.readInvalidTemplateToken();
|
|
3765
3924
|
else
|
|
3766
3925
|
throw e;
|
|
3767
3926
|
}
|
|
3768
3927
|
this.inTemplateElement = !1;
|
|
3769
3928
|
};
|
|
3770
|
-
|
|
3929
|
+
k.invalidStringToken = function(e, t) {
|
|
3771
3930
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9)
|
|
3772
|
-
throw
|
|
3931
|
+
throw cr;
|
|
3773
3932
|
this.raise(e, t);
|
|
3774
3933
|
};
|
|
3775
|
-
|
|
3934
|
+
k.readTmplToken = function() {
|
|
3776
3935
|
for (var e = "", t = this.pos; ; ) {
|
|
3777
3936
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
|
|
3778
3937
|
var i = this.input.charCodeAt(this.pos);
|
|
@@ -3780,7 +3939,7 @@ A.readTmplToken = function() {
|
|
|
3780
3939
|
return this.pos === this.start && (this.type === o.template || this.type === o.invalidTemplate) ? i === 36 ? (this.pos += 2, this.finishToken(o.dollarBraceL)) : (++this.pos, this.finishToken(o.backQuote)) : (e += this.input.slice(t, this.pos), this.finishToken(o.template, e));
|
|
3781
3940
|
if (i === 92)
|
|
3782
3941
|
e += this.input.slice(t, this.pos), e += this.readEscapedChar(!0), t = this.pos;
|
|
3783
|
-
else if (
|
|
3942
|
+
else if (Te(i)) {
|
|
3784
3943
|
switch (e += this.input.slice(t, this.pos), ++this.pos, i) {
|
|
3785
3944
|
case 13:
|
|
3786
3945
|
this.input.charCodeAt(this.pos) === 10 && ++this.pos;
|
|
@@ -3797,7 +3956,7 @@ A.readTmplToken = function() {
|
|
|
3797
3956
|
++this.pos;
|
|
3798
3957
|
}
|
|
3799
3958
|
};
|
|
3800
|
-
|
|
3959
|
+
k.readInvalidTemplateToken = function() {
|
|
3801
3960
|
for (; this.pos < this.input.length; this.pos++)
|
|
3802
3961
|
switch (this.input[this.pos]) {
|
|
3803
3962
|
case "\\":
|
|
@@ -3822,7 +3981,7 @@ A.readInvalidTemplateToken = function() {
|
|
|
3822
3981
|
}
|
|
3823
3982
|
this.raise(this.start, "Unterminated template");
|
|
3824
3983
|
};
|
|
3825
|
-
|
|
3984
|
+
k.readEscapedChar = function(e) {
|
|
3826
3985
|
var t = this.input.charCodeAt(++this.pos);
|
|
3827
3986
|
switch (++this.pos, t) {
|
|
3828
3987
|
case 110:
|
|
@@ -3875,14 +4034,14 @@ A.readEscapedChar = function(e) {
|
|
|
3875
4034
|
e ? "Octal literal in template string" : "Octal literal in strict mode"
|
|
3876
4035
|
), String.fromCharCode(s);
|
|
3877
4036
|
}
|
|
3878
|
-
return
|
|
4037
|
+
return Te(t) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(t);
|
|
3879
4038
|
}
|
|
3880
4039
|
};
|
|
3881
|
-
|
|
4040
|
+
k.readHexChar = function(e) {
|
|
3882
4041
|
var t = this.pos, i = this.readInt(16, e);
|
|
3883
4042
|
return i === null && this.invalidStringToken(t, "Bad character escape sequence"), i;
|
|
3884
4043
|
};
|
|
3885
|
-
|
|
4044
|
+
k.readWord1 = function() {
|
|
3886
4045
|
this.containsEsc = !1;
|
|
3887
4046
|
for (var e = "", t = !0, i = this.pos, r = this.options.ecmaVersion >= 6; this.pos < this.input.length; ) {
|
|
3888
4047
|
var s = this.fullCharCodeAtPos();
|
|
@@ -3900,36 +4059,36 @@ A.readWord1 = function() {
|
|
|
3900
4059
|
}
|
|
3901
4060
|
return e + this.input.slice(i, this.pos);
|
|
3902
4061
|
};
|
|
3903
|
-
|
|
4062
|
+
k.readWord = function() {
|
|
3904
4063
|
var e = this.readWord1(), t = o.name;
|
|
3905
|
-
return this.keywords.test(e) && (t =
|
|
4064
|
+
return this.keywords.test(e) && (t = Ut[e]), this.finishToken(t, e);
|
|
3906
4065
|
};
|
|
3907
|
-
var
|
|
4066
|
+
var yn = "8.15.0";
|
|
3908
4067
|
M.acorn = {
|
|
3909
4068
|
Parser: M,
|
|
3910
|
-
version:
|
|
3911
|
-
defaultOptions:
|
|
3912
|
-
Position:
|
|
3913
|
-
SourceLocation:
|
|
3914
|
-
getLineInfo:
|
|
3915
|
-
Node:
|
|
4069
|
+
version: yn,
|
|
4070
|
+
defaultOptions: Tt,
|
|
4071
|
+
Position: Be,
|
|
4072
|
+
SourceLocation: ct,
|
|
4073
|
+
getLineInfo: Ri,
|
|
4074
|
+
Node: dt,
|
|
3916
4075
|
TokenType: I,
|
|
3917
4076
|
tokTypes: o,
|
|
3918
|
-
keywordTypes:
|
|
4077
|
+
keywordTypes: Ut,
|
|
3919
4078
|
TokContext: X,
|
|
3920
|
-
tokContexts:
|
|
4079
|
+
tokContexts: O,
|
|
3921
4080
|
isIdentifierChar: he,
|
|
3922
4081
|
isIdentifierStart: ie,
|
|
3923
|
-
Token:
|
|
3924
|
-
isNewLine:
|
|
4082
|
+
Token: Gt,
|
|
4083
|
+
isNewLine: Te,
|
|
3925
4084
|
lineBreak: K,
|
|
3926
|
-
lineBreakG:
|
|
3927
|
-
nonASCIIwhitespace:
|
|
4085
|
+
lineBreakG: Ds,
|
|
4086
|
+
nonASCIIwhitespace: Oi
|
|
3928
4087
|
};
|
|
3929
|
-
function
|
|
4088
|
+
function bn(e, t) {
|
|
3930
4089
|
return M.parse(e, t);
|
|
3931
4090
|
}
|
|
3932
|
-
const
|
|
4091
|
+
const xn = [
|
|
3933
4092
|
{
|
|
3934
4093
|
pattern: /\b(?:import|export|class|new|async|await|yield|throw|try|catch|switch|while|for|do)\b/,
|
|
3935
4094
|
message: "contains unsupported control-flow or module syntax"
|
|
@@ -3954,7 +4113,7 @@ const un = [
|
|
|
3954
4113
|
pattern: /\bDate\b/,
|
|
3955
4114
|
message: "must not use time-dependent APIs"
|
|
3956
4115
|
}
|
|
3957
|
-
],
|
|
4116
|
+
], vn = {
|
|
3958
4117
|
ImportDeclaration: "contains unsupported control-flow or module syntax",
|
|
3959
4118
|
ImportExpression: "contains unsupported control-flow or module syntax",
|
|
3960
4119
|
ExportNamedDeclaration: "contains unsupported control-flow or module syntax",
|
|
@@ -3974,7 +4133,7 @@ const un = [
|
|
|
3974
4133
|
ForInStatement: "contains unsupported control-flow or module syntax",
|
|
3975
4134
|
ForOfStatement: "contains unsupported control-flow or module syntax",
|
|
3976
4135
|
DoWhileStatement: "contains unsupported control-flow or module syntax"
|
|
3977
|
-
},
|
|
4136
|
+
}, wn = /* @__PURE__ */ new Set([
|
|
3978
4137
|
"window",
|
|
3979
4138
|
"document",
|
|
3980
4139
|
"globalThis",
|
|
@@ -3986,12 +4145,12 @@ const un = [
|
|
|
3986
4145
|
"eval",
|
|
3987
4146
|
"setTimeout",
|
|
3988
4147
|
"setInterval"
|
|
3989
|
-
]),
|
|
4148
|
+
]), Sn = /* @__PURE__ */ new Set([
|
|
3990
4149
|
"__proto__",
|
|
3991
4150
|
"prototype",
|
|
3992
4151
|
"constructor"
|
|
3993
4152
|
]);
|
|
3994
|
-
function
|
|
4153
|
+
function Ot(e, t) {
|
|
3995
4154
|
if (!(!e || typeof e != "object")) {
|
|
3996
4155
|
t(e);
|
|
3997
4156
|
for (const i of Object.keys(e)) {
|
|
@@ -3999,23 +4158,23 @@ function Nt(e, t) {
|
|
|
3999
4158
|
const r = e[i];
|
|
4000
4159
|
if (Array.isArray(r))
|
|
4001
4160
|
for (const s of r)
|
|
4002
|
-
s && typeof s.type == "string" &&
|
|
4003
|
-
else r && typeof r == "object" && typeof r.type == "string" &&
|
|
4161
|
+
s && typeof s.type == "string" && Ot(s, t);
|
|
4162
|
+
else r && typeof r == "object" && typeof r.type == "string" && Ot(r, t);
|
|
4004
4163
|
}
|
|
4005
4164
|
}
|
|
4006
4165
|
}
|
|
4007
|
-
function
|
|
4008
|
-
if (
|
|
4166
|
+
function pi(e, t) {
|
|
4167
|
+
if (wn.has(e))
|
|
4009
4168
|
throw new Error(`client assigner "${t}" uses blocked runtime globals`);
|
|
4010
|
-
if (
|
|
4169
|
+
if (Sn.has(e))
|
|
4011
4170
|
throw new Error(`client assigner "${t}" uses blocked object metaprogramming features`);
|
|
4012
4171
|
if (e === "Date")
|
|
4013
4172
|
throw new Error(`client assigner "${t}" must not use time-dependent APIs`);
|
|
4014
4173
|
}
|
|
4015
|
-
function
|
|
4174
|
+
function _n(e, t) {
|
|
4016
4175
|
let i;
|
|
4017
4176
|
try {
|
|
4018
|
-
i =
|
|
4177
|
+
i = bn(e, {
|
|
4019
4178
|
ecmaVersion: 2022,
|
|
4020
4179
|
sourceType: "script"
|
|
4021
4180
|
});
|
|
@@ -4023,8 +4182,8 @@ function hn(e, t) {
|
|
|
4023
4182
|
throw new Error(`client assigner "${t}" contains invalid JavaScript syntax`);
|
|
4024
4183
|
}
|
|
4025
4184
|
let r = 0, s = !1;
|
|
4026
|
-
if (
|
|
4027
|
-
const a =
|
|
4185
|
+
if (Ot(i, (n) => {
|
|
4186
|
+
const a = vn[n.type];
|
|
4028
4187
|
if (a)
|
|
4029
4188
|
throw new Error(`client assigner "${t}" ${a}`);
|
|
4030
4189
|
if (n.type === "FunctionDeclaration" || n.type === "FunctionExpression") {
|
|
@@ -4035,31 +4194,31 @@ function hn(e, t) {
|
|
|
4035
4194
|
}
|
|
4036
4195
|
if (n.type === "ReturnStatement" && (s = !0), n.type === "ThisExpression")
|
|
4037
4196
|
throw new Error(`client assigner "${t}" uses blocked object metaprogramming features`);
|
|
4038
|
-
if (n.type === "Identifier" &&
|
|
4197
|
+
if (n.type === "Identifier" && pi(n.name, t), n.type === "MemberExpression" && n.computed && n.property?.type === "Literal" && typeof n.property.value == "string" && pi(n.property.value, t), n.type === "MemberExpression" && !n.computed && n.object?.type === "Identifier" && n.object.name === "Math" && n.property?.type === "Identifier" && n.property.name === "random")
|
|
4039
4198
|
throw new Error(`client assigner "${t}" must not use randomness`);
|
|
4040
4199
|
}), r !== 1)
|
|
4041
4200
|
throw new Error(`client assigner "${t}" must contain exactly one function definition`);
|
|
4042
4201
|
if (!s)
|
|
4043
4202
|
throw new Error(`client assigner "${t}" must return an object containing assigned field values`);
|
|
4044
4203
|
}
|
|
4045
|
-
function
|
|
4204
|
+
function Cn(e, t) {
|
|
4046
4205
|
if ((e.match(/\bfunction\b/g) ?? []).length !== 1)
|
|
4047
4206
|
throw new Error(`client assigner "${t}" must contain exactly one function definition`);
|
|
4048
|
-
for (const { pattern: r, message: s } of
|
|
4207
|
+
for (const { pattern: r, message: s } of xn)
|
|
4049
4208
|
if (r.test(e))
|
|
4050
4209
|
throw new Error(`client assigner "${t}" ${s}`);
|
|
4051
4210
|
if (!/\breturn\b/.test(e))
|
|
4052
4211
|
throw new Error(`client assigner "${t}" must return an object containing assigned field values`);
|
|
4053
|
-
|
|
4212
|
+
_n(e, t);
|
|
4054
4213
|
}
|
|
4055
4214
|
new TextEncoder();
|
|
4056
4215
|
new TextDecoder();
|
|
4057
|
-
const
|
|
4216
|
+
const Jt = /* @__PURE__ */ Symbol.for("yaml.alias"), An = /* @__PURE__ */ Symbol.for("yaml.document"), ye = /* @__PURE__ */ Symbol.for("yaml.map"), fr = /* @__PURE__ */ Symbol.for("yaml.pair"), Qt = /* @__PURE__ */ Symbol.for("yaml.scalar"), qe = /* @__PURE__ */ Symbol.for("yaml.seq"), ne = /* @__PURE__ */ Symbol.for("yaml.node.type"), we = (e) => !!e && typeof e == "object" && e[ne] === Jt, gt = (e) => !!e && typeof e == "object" && e[ne] === An, hr = (e) => !!e && typeof e == "object" && e[ne] === ye, j = (e) => !!e && typeof e == "object" && e[ne] === fr, D = (e) => !!e && typeof e == "object" && e[ne] === Qt, Yt = (e) => !!e && typeof e == "object" && e[ne] === qe;
|
|
4058
4217
|
function H(e) {
|
|
4059
4218
|
if (e && typeof e == "object")
|
|
4060
4219
|
switch (e[ne]) {
|
|
4061
4220
|
case ye:
|
|
4062
|
-
case
|
|
4221
|
+
case qe:
|
|
4063
4222
|
return !0;
|
|
4064
4223
|
}
|
|
4065
4224
|
return !1;
|
|
@@ -4067,54 +4226,54 @@ function H(e) {
|
|
|
4067
4226
|
function U(e) {
|
|
4068
4227
|
if (e && typeof e == "object")
|
|
4069
4228
|
switch (e[ne]) {
|
|
4070
|
-
case
|
|
4229
|
+
case Jt:
|
|
4071
4230
|
case ye:
|
|
4072
|
-
case
|
|
4073
|
-
case
|
|
4231
|
+
case Qt:
|
|
4232
|
+
case qe:
|
|
4074
4233
|
return !0;
|
|
4075
4234
|
}
|
|
4076
4235
|
return !1;
|
|
4077
4236
|
}
|
|
4078
|
-
const
|
|
4079
|
-
function
|
|
4080
|
-
const i =
|
|
4081
|
-
|
|
4237
|
+
const pr = (e) => (D(e) || H(e)) && !!e.anchor, de = /* @__PURE__ */ Symbol("break visit"), kn = /* @__PURE__ */ Symbol("skip children"), Me = /* @__PURE__ */ Symbol("remove node");
|
|
4238
|
+
function yt(e, t) {
|
|
4239
|
+
const i = En(t);
|
|
4240
|
+
gt(e) ? ke(null, e.contents, i, Object.freeze([e])) === Me && (e.contents = null) : ke(null, e, i, Object.freeze([]));
|
|
4082
4241
|
}
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
function
|
|
4087
|
-
const s =
|
|
4242
|
+
yt.BREAK = de;
|
|
4243
|
+
yt.SKIP = kn;
|
|
4244
|
+
yt.REMOVE = Me;
|
|
4245
|
+
function ke(e, t, i, r) {
|
|
4246
|
+
const s = In(e, t, i, r);
|
|
4088
4247
|
if (U(s) || j(s))
|
|
4089
|
-
return
|
|
4248
|
+
return Nn(e, r, s), ke(e, s, i, r);
|
|
4090
4249
|
if (typeof s != "symbol") {
|
|
4091
4250
|
if (H(t)) {
|
|
4092
4251
|
r = Object.freeze(r.concat(t));
|
|
4093
4252
|
for (let n = 0; n < t.items.length; ++n) {
|
|
4094
|
-
const a =
|
|
4253
|
+
const a = ke(n, t.items[n], i, r);
|
|
4095
4254
|
if (typeof a == "number")
|
|
4096
4255
|
n = a - 1;
|
|
4097
4256
|
else {
|
|
4098
4257
|
if (a === de)
|
|
4099
4258
|
return de;
|
|
4100
|
-
a ===
|
|
4259
|
+
a === Me && (t.items.splice(n, 1), n -= 1);
|
|
4101
4260
|
}
|
|
4102
4261
|
}
|
|
4103
4262
|
} else if (j(t)) {
|
|
4104
4263
|
r = Object.freeze(r.concat(t));
|
|
4105
|
-
const n =
|
|
4264
|
+
const n = ke("key", t.key, i, r);
|
|
4106
4265
|
if (n === de)
|
|
4107
4266
|
return de;
|
|
4108
|
-
n ===
|
|
4109
|
-
const a =
|
|
4267
|
+
n === Me && (t.key = null);
|
|
4268
|
+
const a = ke("value", t.value, i, r);
|
|
4110
4269
|
if (a === de)
|
|
4111
4270
|
return de;
|
|
4112
|
-
a ===
|
|
4271
|
+
a === Me && (t.value = null);
|
|
4113
4272
|
}
|
|
4114
4273
|
}
|
|
4115
4274
|
return s;
|
|
4116
4275
|
}
|
|
4117
|
-
function
|
|
4276
|
+
function En(e) {
|
|
4118
4277
|
return typeof e == "object" && (e.Collection || e.Node || e.Value) ? Object.assign({
|
|
4119
4278
|
Alias: e.Node,
|
|
4120
4279
|
Map: e.Node,
|
|
@@ -4129,60 +4288,60 @@ function gn(e) {
|
|
|
4129
4288
|
Seq: e.Collection
|
|
4130
4289
|
}, e) : e;
|
|
4131
4290
|
}
|
|
4132
|
-
function
|
|
4291
|
+
function In(e, t, i, r) {
|
|
4133
4292
|
if (typeof i == "function")
|
|
4134
4293
|
return i(e, t, r);
|
|
4135
|
-
if (
|
|
4294
|
+
if (hr(t))
|
|
4136
4295
|
return i.Map?.(e, t, r);
|
|
4137
|
-
if (
|
|
4296
|
+
if (Yt(t))
|
|
4138
4297
|
return i.Seq?.(e, t, r);
|
|
4139
4298
|
if (j(t))
|
|
4140
4299
|
return i.Pair?.(e, t, r);
|
|
4141
4300
|
if (D(t))
|
|
4142
4301
|
return i.Scalar?.(e, t, r);
|
|
4143
|
-
if (
|
|
4302
|
+
if (we(t))
|
|
4144
4303
|
return i.Alias?.(e, t, r);
|
|
4145
4304
|
}
|
|
4146
|
-
function
|
|
4305
|
+
function Nn(e, t, i) {
|
|
4147
4306
|
const r = t[t.length - 1];
|
|
4148
4307
|
if (H(r))
|
|
4149
4308
|
r.items[e] = i;
|
|
4150
4309
|
else if (j(r))
|
|
4151
4310
|
e === "key" ? r.key = i : r.value = i;
|
|
4152
|
-
else if (
|
|
4311
|
+
else if (gt(r))
|
|
4153
4312
|
r.contents = i;
|
|
4154
4313
|
else {
|
|
4155
|
-
const s =
|
|
4314
|
+
const s = we(r) ? "alias" : "scalar";
|
|
4156
4315
|
throw new Error(`Cannot replace node with ${s} parent`);
|
|
4157
4316
|
}
|
|
4158
4317
|
}
|
|
4159
|
-
function
|
|
4318
|
+
function dr(e) {
|
|
4160
4319
|
if (/[\x00-\x19\s,[\]{}]/.test(e)) {
|
|
4161
4320
|
const i = `Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;
|
|
4162
4321
|
throw new Error(i);
|
|
4163
4322
|
}
|
|
4164
4323
|
return !0;
|
|
4165
4324
|
}
|
|
4166
|
-
function
|
|
4325
|
+
function Le(e, t, i, r) {
|
|
4167
4326
|
if (r && typeof r == "object")
|
|
4168
4327
|
if (Array.isArray(r))
|
|
4169
4328
|
for (let s = 0, n = r.length; s < n; ++s) {
|
|
4170
|
-
const a = r[s], u =
|
|
4329
|
+
const a = r[s], u = Le(e, r, String(s), a);
|
|
4171
4330
|
u === void 0 ? delete r[s] : u !== a && (r[s] = u);
|
|
4172
4331
|
}
|
|
4173
4332
|
else if (r instanceof Map)
|
|
4174
4333
|
for (const s of Array.from(r.keys())) {
|
|
4175
|
-
const n = r.get(s), a =
|
|
4334
|
+
const n = r.get(s), a = Le(e, r, s, n);
|
|
4176
4335
|
a === void 0 ? r.delete(s) : a !== n && r.set(s, a);
|
|
4177
4336
|
}
|
|
4178
4337
|
else if (r instanceof Set)
|
|
4179
4338
|
for (const s of Array.from(r)) {
|
|
4180
|
-
const n =
|
|
4339
|
+
const n = Le(e, r, s, s);
|
|
4181
4340
|
n === void 0 ? r.delete(s) : n !== s && (r.delete(s), r.add(n));
|
|
4182
4341
|
}
|
|
4183
4342
|
else
|
|
4184
4343
|
for (const [s, n] of Object.entries(r)) {
|
|
4185
|
-
const a =
|
|
4344
|
+
const a = Le(e, r, s, n);
|
|
4186
4345
|
a === void 0 ? delete r[s] : a !== n && (r[s] = a);
|
|
4187
4346
|
}
|
|
4188
4347
|
return e.call(t, i, r);
|
|
@@ -4191,7 +4350,7 @@ function ee(e, t, i) {
|
|
|
4191
4350
|
if (Array.isArray(e))
|
|
4192
4351
|
return e.map((r, s) => ee(r, String(s), i));
|
|
4193
4352
|
if (e && typeof e.toJSON == "function") {
|
|
4194
|
-
if (!i || !
|
|
4353
|
+
if (!i || !pr(e))
|
|
4195
4354
|
return e.toJSON(t, i);
|
|
4196
4355
|
const r = { aliasCount: 0, count: 1, res: void 0 };
|
|
4197
4356
|
i.anchors.set(e, r), i.onCreate = (n) => {
|
|
@@ -4202,7 +4361,7 @@ function ee(e, t, i) {
|
|
|
4202
4361
|
}
|
|
4203
4362
|
return typeof e == "bigint" && !i?.keep ? Number(e) : e;
|
|
4204
4363
|
}
|
|
4205
|
-
class
|
|
4364
|
+
class Xt {
|
|
4206
4365
|
constructor(t) {
|
|
4207
4366
|
Object.defineProperty(this, ne, { value: t });
|
|
4208
4367
|
}
|
|
@@ -4213,7 +4372,7 @@ class Kt {
|
|
|
4213
4372
|
}
|
|
4214
4373
|
/** A plain JavaScript representation of this node. */
|
|
4215
4374
|
toJS(t, { mapAsMap: i, maxAliasCount: r, onAnchor: s, reviver: n } = {}) {
|
|
4216
|
-
if (!
|
|
4375
|
+
if (!gt(t))
|
|
4217
4376
|
throw new TypeError("A document argument is required");
|
|
4218
4377
|
const a = {
|
|
4219
4378
|
anchors: /* @__PURE__ */ new Map(),
|
|
@@ -4226,12 +4385,12 @@ class Kt {
|
|
|
4226
4385
|
if (typeof s == "function")
|
|
4227
4386
|
for (const { count: l, res: c } of a.anchors.values())
|
|
4228
4387
|
s(c, l);
|
|
4229
|
-
return typeof n == "function" ?
|
|
4388
|
+
return typeof n == "function" ? Le(n, { "": u }, "", u) : u;
|
|
4230
4389
|
}
|
|
4231
4390
|
}
|
|
4232
|
-
class
|
|
4391
|
+
class Tn extends Xt {
|
|
4233
4392
|
constructor(t) {
|
|
4234
|
-
super(
|
|
4393
|
+
super(Jt), this.source = t, Object.defineProperty(this, "tag", {
|
|
4235
4394
|
set() {
|
|
4236
4395
|
throw new Error("Alias nodes cannot have tags");
|
|
4237
4396
|
}
|
|
@@ -4243,9 +4402,9 @@ class xn extends Kt {
|
|
|
4243
4402
|
*/
|
|
4244
4403
|
resolve(t, i) {
|
|
4245
4404
|
let r;
|
|
4246
|
-
i?.aliasResolveCache ? r = i.aliasResolveCache : (r = [],
|
|
4405
|
+
i?.aliasResolveCache ? r = i.aliasResolveCache : (r = [], yt(t, {
|
|
4247
4406
|
Node: (n, a) => {
|
|
4248
|
-
(
|
|
4407
|
+
(we(a) || pr(a)) && r.push(a);
|
|
4249
4408
|
}
|
|
4250
4409
|
}), i && (i.aliasResolveCache = r));
|
|
4251
4410
|
let s;
|
|
@@ -4269,7 +4428,7 @@ class xn extends Kt {
|
|
|
4269
4428
|
const l = "This should not happen: Alias anchor was not resolved?";
|
|
4270
4429
|
throw new ReferenceError(l);
|
|
4271
4430
|
}
|
|
4272
|
-
if (n >= 0 && (u.count += 1, u.aliasCount === 0 && (u.aliasCount =
|
|
4431
|
+
if (n >= 0 && (u.count += 1, u.aliasCount === 0 && (u.aliasCount = Je(s, a, r)), u.count * u.aliasCount > n)) {
|
|
4273
4432
|
const l = "Excessive alias count indicates a resource exhaustion attack";
|
|
4274
4433
|
throw new ReferenceError(l);
|
|
4275
4434
|
}
|
|
@@ -4278,7 +4437,7 @@ class xn extends Kt {
|
|
|
4278
4437
|
toString(t, i, r) {
|
|
4279
4438
|
const s = `*${this.source}`;
|
|
4280
4439
|
if (t) {
|
|
4281
|
-
if (
|
|
4440
|
+
if (dr(this.source), t.options.verifyAliasOrder && !t.anchors.has(this.source)) {
|
|
4282
4441
|
const n = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
4283
4442
|
throw new Error(n);
|
|
4284
4443
|
}
|
|
@@ -4288,27 +4447,27 @@ class xn extends Kt {
|
|
|
4288
4447
|
return s;
|
|
4289
4448
|
}
|
|
4290
4449
|
}
|
|
4291
|
-
function
|
|
4292
|
-
if (
|
|
4450
|
+
function Je(e, t, i) {
|
|
4451
|
+
if (we(t)) {
|
|
4293
4452
|
const r = t.resolve(e), s = i && r && i.get(r);
|
|
4294
4453
|
return s ? s.count * s.aliasCount : 0;
|
|
4295
4454
|
} else if (H(t)) {
|
|
4296
4455
|
let r = 0;
|
|
4297
4456
|
for (const s of t.items) {
|
|
4298
|
-
const n =
|
|
4457
|
+
const n = Je(e, s, i);
|
|
4299
4458
|
n > r && (r = n);
|
|
4300
4459
|
}
|
|
4301
4460
|
return r;
|
|
4302
4461
|
} else if (j(t)) {
|
|
4303
|
-
const r =
|
|
4462
|
+
const r = Je(e, t.key, i), s = Je(e, t.value, i);
|
|
4304
4463
|
return Math.max(r, s);
|
|
4305
4464
|
}
|
|
4306
4465
|
return 1;
|
|
4307
4466
|
}
|
|
4308
|
-
const
|
|
4309
|
-
class L extends
|
|
4467
|
+
const mr = (e) => !e || typeof e != "function" && typeof e != "object";
|
|
4468
|
+
class L extends Xt {
|
|
4310
4469
|
constructor(t) {
|
|
4311
|
-
super(
|
|
4470
|
+
super(Qt), this.value = t;
|
|
4312
4471
|
}
|
|
4313
4472
|
toJSON(t, i) {
|
|
4314
4473
|
return i?.keep ? this.value : ee(this.value, t, i);
|
|
@@ -4322,11 +4481,11 @@ L.BLOCK_LITERAL = "BLOCK_LITERAL";
|
|
|
4322
4481
|
L.PLAIN = "PLAIN";
|
|
4323
4482
|
L.QUOTE_DOUBLE = "QUOTE_DOUBLE";
|
|
4324
4483
|
L.QUOTE_SINGLE = "QUOTE_SINGLE";
|
|
4325
|
-
function
|
|
4484
|
+
function Pn(e, t, i) {
|
|
4326
4485
|
return i.find((r) => r.identify?.(e) && !r.format);
|
|
4327
4486
|
}
|
|
4328
|
-
function
|
|
4329
|
-
if (
|
|
4487
|
+
function st(e, t, i) {
|
|
4488
|
+
if (gt(e) && (e = e.contents), U(e))
|
|
4330
4489
|
return e;
|
|
4331
4490
|
if (j(e)) {
|
|
4332
4491
|
const h = i.schema[ye].createNode?.(i.schema, null, i);
|
|
@@ -4337,22 +4496,22 @@ function tt(e, t, i) {
|
|
|
4337
4496
|
let l;
|
|
4338
4497
|
if (r && e && typeof e == "object") {
|
|
4339
4498
|
if (l = u.get(e), l)
|
|
4340
|
-
return l.anchor ?? (l.anchor = s(e)), new
|
|
4499
|
+
return l.anchor ?? (l.anchor = s(e)), new Tn(l.anchor);
|
|
4341
4500
|
l = { anchor: null, node: null }, u.set(e, l);
|
|
4342
4501
|
}
|
|
4343
|
-
let c =
|
|
4502
|
+
let c = Pn(e, t, a.tags);
|
|
4344
4503
|
if (!c) {
|
|
4345
4504
|
if (e && typeof e.toJSON == "function" && (e = e.toJSON()), !e || typeof e != "object") {
|
|
4346
4505
|
const h = new L(e);
|
|
4347
4506
|
return l && (l.node = h), h;
|
|
4348
4507
|
}
|
|
4349
|
-
c = e instanceof Map ? a[ye] : Symbol.iterator in Object(e) ? a[
|
|
4508
|
+
c = e instanceof Map ? a[ye] : Symbol.iterator in Object(e) ? a[qe] : a[ye];
|
|
4350
4509
|
}
|
|
4351
4510
|
n && (n(c), delete i.onTagObj);
|
|
4352
4511
|
const f = c?.createNode ? c.createNode(i.schema, e, i) : typeof c?.nodeClass?.from == "function" ? c.nodeClass.from(i.schema, e, i) : new L(e);
|
|
4353
4512
|
return c.default || (f.tag = c.tag), l && (l.node = f), f;
|
|
4354
4513
|
}
|
|
4355
|
-
function
|
|
4514
|
+
function di(e, t, i) {
|
|
4356
4515
|
let r = i;
|
|
4357
4516
|
for (let s = t.length - 1; s >= 0; --s) {
|
|
4358
4517
|
const n = t[s];
|
|
@@ -4362,7 +4521,7 @@ function oi(e, t, i) {
|
|
|
4362
4521
|
} else
|
|
4363
4522
|
r = /* @__PURE__ */ new Map([[n, r]]);
|
|
4364
4523
|
}
|
|
4365
|
-
return
|
|
4524
|
+
return st(r, void 0, {
|
|
4366
4525
|
aliasDuplicateObjects: !1,
|
|
4367
4526
|
keepUndefined: !1,
|
|
4368
4527
|
onAnchor: () => {
|
|
@@ -4372,8 +4531,8 @@ function oi(e, t, i) {
|
|
|
4372
4531
|
sourceObjects: /* @__PURE__ */ new Map()
|
|
4373
4532
|
});
|
|
4374
4533
|
}
|
|
4375
|
-
const
|
|
4376
|
-
class
|
|
4534
|
+
const Vn = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next().done;
|
|
4535
|
+
class gr extends Xt {
|
|
4377
4536
|
constructor(t, i) {
|
|
4378
4537
|
super(t), Object.defineProperty(this, "schema", {
|
|
4379
4538
|
value: i,
|
|
@@ -4397,14 +4556,14 @@ class ur extends Kt {
|
|
|
4397
4556
|
* that already exists in the map.
|
|
4398
4557
|
*/
|
|
4399
4558
|
addIn(t, i) {
|
|
4400
|
-
if (
|
|
4559
|
+
if (Vn(t))
|
|
4401
4560
|
this.add(i);
|
|
4402
4561
|
else {
|
|
4403
4562
|
const [r, ...s] = t, n = this.get(r, !0);
|
|
4404
4563
|
if (H(n))
|
|
4405
4564
|
n.addIn(s, i);
|
|
4406
4565
|
else if (n === void 0 && this.schema)
|
|
4407
|
-
this.set(r,
|
|
4566
|
+
this.set(r, di(this.schema, s, i));
|
|
4408
4567
|
else
|
|
4409
4568
|
throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`);
|
|
4410
4569
|
}
|
|
@@ -4462,21 +4621,21 @@ class ur extends Kt {
|
|
|
4462
4621
|
if (H(n))
|
|
4463
4622
|
n.setIn(s, i);
|
|
4464
4623
|
else if (n === void 0 && this.schema)
|
|
4465
|
-
this.set(r,
|
|
4624
|
+
this.set(r, di(this.schema, s, i));
|
|
4466
4625
|
else
|
|
4467
4626
|
throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`);
|
|
4468
4627
|
}
|
|
4469
4628
|
}
|
|
4470
4629
|
}
|
|
4471
|
-
const
|
|
4472
|
-
function
|
|
4630
|
+
const On = (e) => e.replace(/^(?!$)(?: $)?/gm, "#");
|
|
4631
|
+
function $e(e, t) {
|
|
4473
4632
|
return /^\n+$/.test(e) ? e.substring(1) : t ? e.replace(/^(?! *$)/gm, t) : e;
|
|
4474
4633
|
}
|
|
4475
|
-
const
|
|
4476
|
-
`) ?
|
|
4634
|
+
const Ee = (e, t, i) => e.endsWith(`
|
|
4635
|
+
`) ? $e(i, t) : i.includes(`
|
|
4477
4636
|
`) ? `
|
|
4478
|
-
` +
|
|
4479
|
-
function
|
|
4637
|
+
` + $e(i, t) : (e.endsWith(" ") ? "" : " ") + i, yr = "flow", Lt = "block", Qe = "quoted";
|
|
4638
|
+
function bt(e, t, i = "flow", { indentAtStart: r, lineWidth: s = 80, minContentWidth: n = 20, onFold: a, onOverflow: u } = {}) {
|
|
4480
4639
|
if (!s || s < 0)
|
|
4481
4640
|
return e;
|
|
4482
4641
|
s < n && (n = 0);
|
|
@@ -4486,10 +4645,10 @@ function dt(e, t, i = "flow", { indentAtStart: r, lineWidth: s = 80, minContentW
|
|
|
4486
4645
|
const c = [], f = {};
|
|
4487
4646
|
let h = s - t.length;
|
|
4488
4647
|
typeof r == "number" && (r > s - Math.max(2, n) ? c.push(0) : h = s - r);
|
|
4489
|
-
let
|
|
4490
|
-
i ===
|
|
4648
|
+
let g, y, _ = !1, d = -1, w = -1, p = -1;
|
|
4649
|
+
i === Lt && (d = mi(e, d, t.length), d !== -1 && (h = d + l));
|
|
4491
4650
|
for (let x; x = e[d += 1]; ) {
|
|
4492
|
-
if (i ===
|
|
4651
|
+
if (i === Qe && x === "\\") {
|
|
4493
4652
|
switch (w = d, e[d + 1]) {
|
|
4494
4653
|
case "x":
|
|
4495
4654
|
d += 3;
|
|
@@ -4507,42 +4666,42 @@ function dt(e, t, i = "flow", { indentAtStart: r, lineWidth: s = 80, minContentW
|
|
|
4507
4666
|
}
|
|
4508
4667
|
if (x === `
|
|
4509
4668
|
`)
|
|
4510
|
-
i ===
|
|
4669
|
+
i === Lt && (d = mi(e, d, t.length)), h = d + t.length + l, g = void 0;
|
|
4511
4670
|
else {
|
|
4512
4671
|
if (x === " " && y && y !== " " && y !== `
|
|
4513
4672
|
` && y !== " ") {
|
|
4514
|
-
const
|
|
4515
|
-
|
|
4516
|
-
` &&
|
|
4673
|
+
const S = e[d + 1];
|
|
4674
|
+
S && S !== " " && S !== `
|
|
4675
|
+
` && S !== " " && (g = d);
|
|
4517
4676
|
}
|
|
4518
4677
|
if (d >= h)
|
|
4519
|
-
if (
|
|
4520
|
-
c.push(
|
|
4521
|
-
else if (i ===
|
|
4678
|
+
if (g)
|
|
4679
|
+
c.push(g), h = g + l, g = void 0;
|
|
4680
|
+
else if (i === Qe) {
|
|
4522
4681
|
for (; y === " " || y === " "; )
|
|
4523
|
-
y = x, x = e[d += 1],
|
|
4524
|
-
const
|
|
4525
|
-
if (f[
|
|
4682
|
+
y = x, x = e[d += 1], _ = !0;
|
|
4683
|
+
const S = d > p + 1 ? d - 2 : w - 1;
|
|
4684
|
+
if (f[S])
|
|
4526
4685
|
return e;
|
|
4527
|
-
c.push(
|
|
4686
|
+
c.push(S), f[S] = !0, h = S + l, g = void 0;
|
|
4528
4687
|
} else
|
|
4529
|
-
|
|
4688
|
+
_ = !0;
|
|
4530
4689
|
}
|
|
4531
4690
|
y = x;
|
|
4532
4691
|
}
|
|
4533
|
-
if (
|
|
4692
|
+
if (_ && u && u(), c.length === 0)
|
|
4534
4693
|
return e;
|
|
4535
4694
|
a && a();
|
|
4536
|
-
let
|
|
4695
|
+
let m = e.slice(0, c[0]);
|
|
4537
4696
|
for (let x = 0; x < c.length; ++x) {
|
|
4538
|
-
const
|
|
4539
|
-
|
|
4540
|
-
${t}${e.slice(0,
|
|
4541
|
-
${t}${e.slice(
|
|
4697
|
+
const S = c[x], C = c[x + 1] || e.length;
|
|
4698
|
+
S === 0 ? m = `
|
|
4699
|
+
${t}${e.slice(0, C)}` : (i === Qe && f[S] && (m += `${e[S]}\\`), m += `
|
|
4700
|
+
${t}${e.slice(S + 1, C)}`);
|
|
4542
4701
|
}
|
|
4543
|
-
return
|
|
4702
|
+
return m;
|
|
4544
4703
|
}
|
|
4545
|
-
function
|
|
4704
|
+
function mi(e, t, i) {
|
|
4546
4705
|
let r = t, s = t + 1, n = e[s];
|
|
4547
4706
|
for (; n === " " || n === " "; )
|
|
4548
4707
|
if (t < s + i)
|
|
@@ -4556,12 +4715,12 @@ function ui(e, t, i) {
|
|
|
4556
4715
|
}
|
|
4557
4716
|
return r;
|
|
4558
4717
|
}
|
|
4559
|
-
const
|
|
4718
|
+
const xt = (e, t) => ({
|
|
4560
4719
|
indentAtStart: t ? e.indent.length : e.indentAtStart,
|
|
4561
4720
|
lineWidth: e.options.lineWidth,
|
|
4562
4721
|
minContentWidth: e.options.minContentWidth
|
|
4563
|
-
}),
|
|
4564
|
-
function
|
|
4722
|
+
}), vt = (e) => /^(%|---|\.\.\.)/m.test(e);
|
|
4723
|
+
function Ln(e, t, i) {
|
|
4565
4724
|
if (!t || t < 0)
|
|
4566
4725
|
return !1;
|
|
4567
4726
|
const r = t - i, s = e.length;
|
|
@@ -4577,11 +4736,11 @@ function _n(e, t, i) {
|
|
|
4577
4736
|
}
|
|
4578
4737
|
return !0;
|
|
4579
4738
|
}
|
|
4580
|
-
function
|
|
4739
|
+
function De(e, t) {
|
|
4581
4740
|
const i = JSON.stringify(e);
|
|
4582
4741
|
if (t.options.doubleQuotedAsJSON)
|
|
4583
4742
|
return i;
|
|
4584
|
-
const { implicitKey: r } = t, s = t.options.doubleQuotedMinMultiLineLength, n = t.indent || (
|
|
4743
|
+
const { implicitKey: r } = t, s = t.options.doubleQuotedMinMultiLineLength, n = t.indent || (vt(e) ? " " : "");
|
|
4585
4744
|
let a = "", u = 0;
|
|
4586
4745
|
for (let l = 0, c = i[l]; c; c = i[++l])
|
|
4587
4746
|
if (c === " " && i[l + 1] === "\\" && i[l + 2] === "n" && (a += i.slice(u, l) + "\\ ", l += 1, u = l, c = "\\"), c === "\\")
|
|
@@ -4636,114 +4795,114 @@ function Me(e, t) {
|
|
|
4636
4795
|
default:
|
|
4637
4796
|
l += 1;
|
|
4638
4797
|
}
|
|
4639
|
-
return a = u ? a + i.slice(u) : i, r ? a :
|
|
4798
|
+
return a = u ? a + i.slice(u) : i, r ? a : bt(a, n, Qe, xt(t, !1));
|
|
4640
4799
|
}
|
|
4641
|
-
function
|
|
4800
|
+
function Rt(e, t) {
|
|
4642
4801
|
if (t.options.singleQuote === !1 || t.implicitKey && e.includes(`
|
|
4643
4802
|
`) || /[ \t]\n|\n[ \t]/.test(e))
|
|
4644
|
-
return
|
|
4645
|
-
const i = t.indent || (
|
|
4803
|
+
return De(e, t);
|
|
4804
|
+
const i = t.indent || (vt(e) ? " " : ""), r = "'" + e.replace(/'/g, "''").replace(/\n+/g, `$&
|
|
4646
4805
|
${i}`) + "'";
|
|
4647
|
-
return t.implicitKey ? r :
|
|
4806
|
+
return t.implicitKey ? r : bt(r, i, yr, xt(t, !1));
|
|
4648
4807
|
}
|
|
4649
|
-
function
|
|
4808
|
+
function Ie(e, t) {
|
|
4650
4809
|
const { singleQuote: i } = t.options;
|
|
4651
4810
|
let r;
|
|
4652
4811
|
if (i === !1)
|
|
4653
|
-
r =
|
|
4812
|
+
r = De;
|
|
4654
4813
|
else {
|
|
4655
4814
|
const s = e.includes('"'), n = e.includes("'");
|
|
4656
|
-
s && !n ? r =
|
|
4815
|
+
s && !n ? r = Rt : n && !s ? r = De : r = i ? Rt : De;
|
|
4657
4816
|
}
|
|
4658
4817
|
return r(e, t);
|
|
4659
4818
|
}
|
|
4660
|
-
let
|
|
4819
|
+
let Ft;
|
|
4661
4820
|
try {
|
|
4662
|
-
|
|
4821
|
+
Ft = new RegExp(`(^|(?<!
|
|
4663
4822
|
))
|
|
4664
4823
|
+(?!
|
|
4665
4824
|
|$)`, "g");
|
|
4666
4825
|
} catch {
|
|
4667
|
-
|
|
4826
|
+
Ft = /\n+(?!\n|$)/g;
|
|
4668
4827
|
}
|
|
4669
|
-
function
|
|
4828
|
+
function Ye({ comment: e, type: t, value: i }, r, s, n) {
|
|
4670
4829
|
const { blockQuote: a, commentString: u, lineWidth: l } = r.options;
|
|
4671
4830
|
if (!a || /\n[\t ]+$/.test(i))
|
|
4672
|
-
return
|
|
4673
|
-
const c = r.indent || (r.forceBlockIndent ||
|
|
4831
|
+
return Ie(i, r);
|
|
4832
|
+
const c = r.indent || (r.forceBlockIndent || vt(i) ? " " : ""), f = a === "literal" ? !0 : a === "folded" || t === L.BLOCK_FOLDED ? !1 : t === L.BLOCK_LITERAL ? !0 : !Ln(i, l, c.length);
|
|
4674
4833
|
if (!i)
|
|
4675
4834
|
return f ? `|
|
|
4676
4835
|
` : `>
|
|
4677
4836
|
`;
|
|
4678
|
-
let h,
|
|
4679
|
-
for (
|
|
4680
|
-
const
|
|
4681
|
-
if (
|
|
4682
|
-
` &&
|
|
4837
|
+
let h, g;
|
|
4838
|
+
for (g = i.length; g > 0; --g) {
|
|
4839
|
+
const C = i[g - 1];
|
|
4840
|
+
if (C !== `
|
|
4841
|
+
` && C !== " " && C !== " ")
|
|
4683
4842
|
break;
|
|
4684
4843
|
}
|
|
4685
|
-
let y = i.substring(
|
|
4686
|
-
const
|
|
4844
|
+
let y = i.substring(g);
|
|
4845
|
+
const _ = y.indexOf(`
|
|
4687
4846
|
`);
|
|
4688
|
-
|
|
4689
|
-
` && (y = y.slice(0, -1)), y = y.replace(
|
|
4847
|
+
_ === -1 ? h = "-" : i === y || _ !== y.length - 1 ? (h = "+", n && n()) : h = "", y && (i = i.slice(0, -y.length), y[y.length - 1] === `
|
|
4848
|
+
` && (y = y.slice(0, -1)), y = y.replace(Ft, `$&${c}`));
|
|
4690
4849
|
let d = !1, w, p = -1;
|
|
4691
4850
|
for (w = 0; w < i.length; ++w) {
|
|
4692
|
-
const
|
|
4693
|
-
if (
|
|
4851
|
+
const C = i[w];
|
|
4852
|
+
if (C === " ")
|
|
4694
4853
|
d = !0;
|
|
4695
|
-
else if (
|
|
4854
|
+
else if (C === `
|
|
4696
4855
|
`)
|
|
4697
4856
|
p = w;
|
|
4698
4857
|
else
|
|
4699
4858
|
break;
|
|
4700
4859
|
}
|
|
4701
|
-
let
|
|
4702
|
-
|
|
4703
|
-
let
|
|
4704
|
-
if (e && (
|
|
4705
|
-
const
|
|
4860
|
+
let m = i.substring(0, p < w ? p + 1 : w);
|
|
4861
|
+
m && (i = i.substring(m.length), m = m.replace(/\n+/g, `$&${c}`));
|
|
4862
|
+
let S = (d ? c ? "2" : "1" : "") + h;
|
|
4863
|
+
if (e && (S += " " + u(e.replace(/ ?[\r\n]+/g, " ")), s && s()), !f) {
|
|
4864
|
+
const C = i.replace(/\n+/g, `
|
|
4706
4865
|
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${c}`);
|
|
4707
|
-
let
|
|
4708
|
-
const B =
|
|
4866
|
+
let P = !1;
|
|
4867
|
+
const B = xt(r, !0);
|
|
4709
4868
|
a !== "folded" && t !== L.BLOCK_FOLDED && (B.onOverflow = () => {
|
|
4710
|
-
|
|
4869
|
+
P = !0;
|
|
4711
4870
|
});
|
|
4712
|
-
const ae =
|
|
4713
|
-
if (!
|
|
4714
|
-
return `>${
|
|
4871
|
+
const ae = bt(`${m}${C}${y}`, c, Lt, B);
|
|
4872
|
+
if (!P)
|
|
4873
|
+
return `>${S}
|
|
4715
4874
|
${c}${ae}`;
|
|
4716
4875
|
}
|
|
4717
|
-
return i = i.replace(/\n+/g, `$&${c}`), `|${
|
|
4718
|
-
${c}${
|
|
4876
|
+
return i = i.replace(/\n+/g, `$&${c}`), `|${S}
|
|
4877
|
+
${c}${m}${i}${y}`;
|
|
4719
4878
|
}
|
|
4720
|
-
function
|
|
4879
|
+
function Rn(e, t, i, r) {
|
|
4721
4880
|
const { type: s, value: n } = e, { actualString: a, implicitKey: u, indent: l, indentStep: c, inFlow: f } = t;
|
|
4722
4881
|
if (u && n.includes(`
|
|
4723
4882
|
`) || f && /[[\]{},]/.test(n))
|
|
4724
|
-
return
|
|
4883
|
+
return Ie(n, t);
|
|
4725
4884
|
if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(n))
|
|
4726
4885
|
return u || f || !n.includes(`
|
|
4727
|
-
`) ?
|
|
4886
|
+
`) ? Ie(n, t) : Ye(e, t, i, r);
|
|
4728
4887
|
if (!u && !f && s !== L.PLAIN && n.includes(`
|
|
4729
4888
|
`))
|
|
4730
|
-
return
|
|
4731
|
-
if (
|
|
4889
|
+
return Ye(e, t, i, r);
|
|
4890
|
+
if (vt(n)) {
|
|
4732
4891
|
if (l === "")
|
|
4733
|
-
return t.forceBlockIndent = !0,
|
|
4892
|
+
return t.forceBlockIndent = !0, Ye(e, t, i, r);
|
|
4734
4893
|
if (u && l === c)
|
|
4735
|
-
return
|
|
4894
|
+
return Ie(n, t);
|
|
4736
4895
|
}
|
|
4737
4896
|
const h = n.replace(/\n+/g, `$&
|
|
4738
4897
|
${l}`);
|
|
4739
4898
|
if (a) {
|
|
4740
|
-
const
|
|
4741
|
-
if (
|
|
4742
|
-
return
|
|
4899
|
+
const g = (d) => d.default && d.tag !== "tag:yaml.org,2002:str" && d.test?.test(h), { compat: y, tags: _ } = t.doc.schema;
|
|
4900
|
+
if (_.some(g) || y?.some(g))
|
|
4901
|
+
return Ie(n, t);
|
|
4743
4902
|
}
|
|
4744
|
-
return u ? h :
|
|
4903
|
+
return u ? h : bt(h, l, yr, xt(t, !1));
|
|
4745
4904
|
}
|
|
4746
|
-
function
|
|
4905
|
+
function Fn(e, t, i, r) {
|
|
4747
4906
|
const { implicitKey: s, inFlow: n } = t, a = typeof e.value == "string" ? e : Object.assign({}, e, { value: String(e.value) });
|
|
4748
4907
|
let { type: u } = e;
|
|
4749
4908
|
u !== L.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value) && (u = L.QUOTE_DOUBLE);
|
|
@@ -4751,29 +4910,29 @@ function kn(e, t, i, r) {
|
|
|
4751
4910
|
switch (f) {
|
|
4752
4911
|
case L.BLOCK_FOLDED:
|
|
4753
4912
|
case L.BLOCK_LITERAL:
|
|
4754
|
-
return s || n ?
|
|
4913
|
+
return s || n ? Ie(a.value, t) : Ye(a, t, i, r);
|
|
4755
4914
|
case L.QUOTE_DOUBLE:
|
|
4756
|
-
return
|
|
4915
|
+
return De(a.value, t);
|
|
4757
4916
|
case L.QUOTE_SINGLE:
|
|
4758
|
-
return
|
|
4917
|
+
return Rt(a.value, t);
|
|
4759
4918
|
case L.PLAIN:
|
|
4760
|
-
return
|
|
4919
|
+
return Rn(a, t, i, r);
|
|
4761
4920
|
default:
|
|
4762
4921
|
return null;
|
|
4763
4922
|
}
|
|
4764
4923
|
};
|
|
4765
4924
|
let c = l(u);
|
|
4766
4925
|
if (c === null) {
|
|
4767
|
-
const { defaultKeyType: f, defaultStringType: h } = t.options,
|
|
4768
|
-
if (c = l(
|
|
4769
|
-
throw new Error(`Unsupported default string type ${
|
|
4926
|
+
const { defaultKeyType: f, defaultStringType: h } = t.options, g = s && f || h;
|
|
4927
|
+
if (c = l(g), c === null)
|
|
4928
|
+
throw new Error(`Unsupported default string type ${g}`);
|
|
4770
4929
|
}
|
|
4771
4930
|
return c;
|
|
4772
4931
|
}
|
|
4773
|
-
function
|
|
4932
|
+
function Mn(e, t) {
|
|
4774
4933
|
const i = Object.assign({
|
|
4775
4934
|
blockQuote: !0,
|
|
4776
|
-
commentString:
|
|
4935
|
+
commentString: On,
|
|
4777
4936
|
defaultKeyType: null,
|
|
4778
4937
|
defaultStringType: "PLAIN",
|
|
4779
4938
|
directives: null,
|
|
@@ -4811,7 +4970,7 @@ function An(e, t) {
|
|
|
4811
4970
|
options: i
|
|
4812
4971
|
};
|
|
4813
4972
|
}
|
|
4814
|
-
function
|
|
4973
|
+
function Dn(e, t) {
|
|
4815
4974
|
if (t.tag) {
|
|
4816
4975
|
const s = e.filter((n) => n.tag === t.tag);
|
|
4817
4976
|
if (s.length > 0)
|
|
@@ -4834,18 +4993,18 @@ function En(e, t) {
|
|
|
4834
4993
|
}
|
|
4835
4994
|
return i;
|
|
4836
4995
|
}
|
|
4837
|
-
function
|
|
4996
|
+
function Bn(e, t, { anchors: i, doc: r }) {
|
|
4838
4997
|
if (!r.directives)
|
|
4839
4998
|
return "";
|
|
4840
4999
|
const s = [], n = (D(e) || H(e)) && e.anchor;
|
|
4841
|
-
n &&
|
|
5000
|
+
n && dr(n) && (i.add(n), s.push(`&${n}`));
|
|
4842
5001
|
const a = e.tag ?? (t.default ? null : t.tag);
|
|
4843
5002
|
return a && s.push(r.directives.tagString(a)), s.join(" ");
|
|
4844
5003
|
}
|
|
4845
|
-
function
|
|
5004
|
+
function nt(e, t, i, r) {
|
|
4846
5005
|
if (j(e))
|
|
4847
5006
|
return e.toString(t, i, r);
|
|
4848
|
-
if (
|
|
5007
|
+
if (we(e)) {
|
|
4849
5008
|
if (t.doc.directives)
|
|
4850
5009
|
return e.toString(t);
|
|
4851
5010
|
if (t.resolvedAliases?.has(e))
|
|
@@ -4854,31 +5013,31 @@ function it(e, t, i, r) {
|
|
|
4854
5013
|
}
|
|
4855
5014
|
let s;
|
|
4856
5015
|
const n = U(e) ? e : t.doc.createNode(e, { onTagObj: (l) => s = l });
|
|
4857
|
-
s ?? (s =
|
|
4858
|
-
const a =
|
|
5016
|
+
s ?? (s = Dn(t.doc.schema.tags, n));
|
|
5017
|
+
const a = Bn(n, s, t);
|
|
4859
5018
|
a.length > 0 && (t.indentAtStart = (t.indentAtStart ?? 0) + a.length + 1);
|
|
4860
|
-
const u = typeof s.stringify == "function" ? s.stringify(n, t, i, r) : D(n) ?
|
|
5019
|
+
const u = typeof s.stringify == "function" ? s.stringify(n, t, i, r) : D(n) ? Fn(n, t, i, r) : n.toString(t, i, r);
|
|
4861
5020
|
return a ? D(n) || u[0] === "{" || u[0] === "[" ? `${a} ${u}` : `${a}
|
|
4862
5021
|
${t.indent}${u}` : u;
|
|
4863
5022
|
}
|
|
4864
|
-
function
|
|
5023
|
+
function jn({ key: e, value: t }, i, r, s) {
|
|
4865
5024
|
const { allNullValues: n, doc: a, indent: u, indentStep: l, options: { commentString: c, indentSeq: f, simpleKeys: h } } = i;
|
|
4866
|
-
let
|
|
5025
|
+
let g = U(e) && e.comment || null;
|
|
4867
5026
|
if (h) {
|
|
4868
|
-
if (
|
|
5027
|
+
if (g)
|
|
4869
5028
|
throw new Error("With simple keys, key nodes cannot have comments");
|
|
4870
5029
|
if (H(e) || !U(e) && typeof e == "object") {
|
|
4871
5030
|
const B = "With simple keys, collection cannot be used as a key value";
|
|
4872
5031
|
throw new Error(B);
|
|
4873
5032
|
}
|
|
4874
5033
|
}
|
|
4875
|
-
let y = !h && (!e ||
|
|
5034
|
+
let y = !h && (!e || g && t == null && !i.inFlow || H(e) || (D(e) ? e.type === L.BLOCK_FOLDED || e.type === L.BLOCK_LITERAL : typeof e == "object"));
|
|
4876
5035
|
i = Object.assign({}, i, {
|
|
4877
5036
|
allNullValues: !1,
|
|
4878
5037
|
implicitKey: !y && (h || !n),
|
|
4879
5038
|
indent: u + l
|
|
4880
5039
|
});
|
|
4881
|
-
let
|
|
5040
|
+
let _ = !1, d = !1, w = nt(e, i, () => _ = !0, () => d = !0);
|
|
4882
5041
|
if (!y && !i.inFlow && w.length > 1024) {
|
|
4883
5042
|
if (h)
|
|
4884
5043
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
@@ -4886,70 +5045,70 @@ function Nn({ key: e, value: t }, i, r, s) {
|
|
|
4886
5045
|
}
|
|
4887
5046
|
if (i.inFlow) {
|
|
4888
5047
|
if (n || t == null)
|
|
4889
|
-
return
|
|
5048
|
+
return _ && r && r(), w === "" ? "?" : y ? `? ${w}` : w;
|
|
4890
5049
|
} else if (n && !h || t == null && y)
|
|
4891
|
-
return w = `? ${w}`,
|
|
4892
|
-
|
|
4893
|
-
${u}:`) : (w = `${w}:`,
|
|
4894
|
-
let p,
|
|
4895
|
-
U(t) ? (p = !!t.spaceBefore,
|
|
4896
|
-
let
|
|
4897
|
-
const
|
|
4898
|
-
let
|
|
4899
|
-
if (
|
|
4900
|
-
if (
|
|
4901
|
-
` : "",
|
|
4902
|
-
const B = c(
|
|
4903
|
-
|
|
4904
|
-
${
|
|
5050
|
+
return w = `? ${w}`, g && !_ ? w += Ee(w, i.indent, c(g)) : d && s && s(), w;
|
|
5051
|
+
_ && (g = null), y ? (g && (w += Ee(w, i.indent, c(g))), w = `? ${w}
|
|
5052
|
+
${u}:`) : (w = `${w}:`, g && (w += Ee(w, i.indent, c(g))));
|
|
5053
|
+
let p, m, x;
|
|
5054
|
+
U(t) ? (p = !!t.spaceBefore, m = t.commentBefore, x = t.comment) : (p = !1, m = null, x = null, t && typeof t == "object" && (t = a.createNode(t))), i.implicitKey = !1, !y && !g && D(t) && (i.indentAtStart = w.length + 1), d = !1, !f && l.length >= 2 && !i.inFlow && !y && Yt(t) && !t.flow && !t.tag && !t.anchor && (i.indent = i.indent.substring(2));
|
|
5055
|
+
let S = !1;
|
|
5056
|
+
const C = nt(t, i, () => S = !0, () => d = !0);
|
|
5057
|
+
let P = " ";
|
|
5058
|
+
if (g || p || m) {
|
|
5059
|
+
if (P = p ? `
|
|
5060
|
+
` : "", m) {
|
|
5061
|
+
const B = c(m);
|
|
5062
|
+
P += `
|
|
5063
|
+
${$e(B, i.indent)}`;
|
|
4905
5064
|
}
|
|
4906
|
-
|
|
4907
|
-
` && x && (
|
|
5065
|
+
C === "" && !i.inFlow ? P === `
|
|
5066
|
+
` && x && (P = `
|
|
4908
5067
|
|
|
4909
|
-
`) :
|
|
5068
|
+
`) : P += `
|
|
4910
5069
|
${i.indent}`;
|
|
4911
5070
|
} else if (!y && H(t)) {
|
|
4912
|
-
const B =
|
|
4913
|
-
`), N = ae !== -1,
|
|
4914
|
-
if (N || !
|
|
4915
|
-
let
|
|
5071
|
+
const B = C[0], ae = C.indexOf(`
|
|
5072
|
+
`), N = ae !== -1, V = i.inFlow ?? t.flow ?? t.items.length === 0;
|
|
5073
|
+
if (N || !V) {
|
|
5074
|
+
let T = !1;
|
|
4916
5075
|
if (N && (B === "&" || B === "!")) {
|
|
4917
|
-
let W =
|
|
4918
|
-
B === "&" && W !== -1 && W < ae &&
|
|
5076
|
+
let W = C.indexOf(" ");
|
|
5077
|
+
B === "&" && W !== -1 && W < ae && C[W + 1] === "!" && (W = C.indexOf(" ", W + 1)), (W === -1 || ae < W) && (T = !0);
|
|
4919
5078
|
}
|
|
4920
|
-
|
|
5079
|
+
T || (P = `
|
|
4921
5080
|
${i.indent}`);
|
|
4922
5081
|
}
|
|
4923
|
-
} else (
|
|
4924
|
-
`) && (
|
|
4925
|
-
return w +=
|
|
5082
|
+
} else (C === "" || C[0] === `
|
|
5083
|
+
`) && (P = "");
|
|
5084
|
+
return w += P + C, i.inFlow ? S && r && r() : x && !S ? w += Ee(w, i.indent, c(x)) : d && s && s(), w;
|
|
4926
5085
|
}
|
|
4927
|
-
function
|
|
5086
|
+
function $n(e, t) {
|
|
4928
5087
|
(e === "debug" || e === "warn") && console.warn(t);
|
|
4929
5088
|
}
|
|
4930
|
-
const
|
|
4931
|
-
identify: (e) => e ===
|
|
5089
|
+
const He = "<<", At = {
|
|
5090
|
+
identify: (e) => e === He || typeof e == "symbol" && e.description === He,
|
|
4932
5091
|
default: "key",
|
|
4933
5092
|
tag: "tag:yaml.org,2002:merge",
|
|
4934
5093
|
test: /^<<$/,
|
|
4935
|
-
resolve: () => Object.assign(new L(Symbol(
|
|
4936
|
-
addToJSMap:
|
|
5094
|
+
resolve: () => Object.assign(new L(Symbol(He)), {
|
|
5095
|
+
addToJSMap: br
|
|
4937
5096
|
}),
|
|
4938
|
-
stringify: () =>
|
|
4939
|
-
},
|
|
4940
|
-
function
|
|
4941
|
-
if (i = e &&
|
|
5097
|
+
stringify: () => He
|
|
5098
|
+
}, Un = (e, t) => (At.identify(t) || D(t) && (!t.type || t.type === L.PLAIN) && At.identify(t.value)) && e?.doc.schema.tags.some((i) => i.tag === At.tag && i.default);
|
|
5099
|
+
function br(e, t, i) {
|
|
5100
|
+
if (i = e && we(i) ? i.resolve(e.doc) : i, Yt(i))
|
|
4942
5101
|
for (const r of i.items)
|
|
4943
|
-
|
|
5102
|
+
kt(e, t, r);
|
|
4944
5103
|
else if (Array.isArray(i))
|
|
4945
5104
|
for (const r of i)
|
|
4946
|
-
|
|
5105
|
+
kt(e, t, r);
|
|
4947
5106
|
else
|
|
4948
|
-
|
|
5107
|
+
kt(e, t, i);
|
|
4949
5108
|
}
|
|
4950
|
-
function
|
|
4951
|
-
const r = e &&
|
|
4952
|
-
if (!
|
|
5109
|
+
function kt(e, t, i) {
|
|
5110
|
+
const r = e && we(i) ? i.resolve(e.doc) : i;
|
|
5111
|
+
if (!hr(r))
|
|
4953
5112
|
throw new Error("Merge sources must be maps or map aliases");
|
|
4954
5113
|
const s = r.toJSON(null, e, Map);
|
|
4955
5114
|
for (const [n, a] of s)
|
|
@@ -4961,11 +5120,11 @@ function St(e, t, i) {
|
|
|
4961
5120
|
});
|
|
4962
5121
|
return t;
|
|
4963
5122
|
}
|
|
4964
|
-
function
|
|
5123
|
+
function xr(e, t, { key: i, value: r }) {
|
|
4965
5124
|
if (U(i) && i.addToJSMap)
|
|
4966
5125
|
i.addToJSMap(e, t, r);
|
|
4967
|
-
else if (
|
|
4968
|
-
|
|
5126
|
+
else if (Un(e, i))
|
|
5127
|
+
br(e, t, r);
|
|
4969
5128
|
else {
|
|
4970
5129
|
const s = ee(i, "", e);
|
|
4971
5130
|
if (t instanceof Map)
|
|
@@ -4973,7 +5132,7 @@ function fr(e, t, { key: i, value: r }) {
|
|
|
4973
5132
|
else if (t instanceof Set)
|
|
4974
5133
|
t.add(s);
|
|
4975
5134
|
else {
|
|
4976
|
-
const n =
|
|
5135
|
+
const n = zn(i, s, e), a = ee(r, n, e);
|
|
4977
5136
|
n in t ? Object.defineProperty(t, n, {
|
|
4978
5137
|
value: a,
|
|
4979
5138
|
writable: !0,
|
|
@@ -4984,13 +5143,13 @@ function fr(e, t, { key: i, value: r }) {
|
|
|
4984
5143
|
}
|
|
4985
5144
|
return t;
|
|
4986
5145
|
}
|
|
4987
|
-
function
|
|
5146
|
+
function zn(e, t, i) {
|
|
4988
5147
|
if (t === null)
|
|
4989
5148
|
return "";
|
|
4990
5149
|
if (typeof t != "object")
|
|
4991
5150
|
return String(t);
|
|
4992
5151
|
if (U(e) && i?.doc) {
|
|
4993
|
-
const r =
|
|
5152
|
+
const r = Mn(i.doc, {});
|
|
4994
5153
|
r.anchors = /* @__PURE__ */ new Set();
|
|
4995
5154
|
for (const n of i.anchors.keys())
|
|
4996
5155
|
r.anchors.add(n.anchor);
|
|
@@ -4998,19 +5157,19 @@ function Vn(e, t, i) {
|
|
|
4998
5157
|
const s = e.toString(r);
|
|
4999
5158
|
if (!i.mapKeyWarned) {
|
|
5000
5159
|
let n = JSON.stringify(s);
|
|
5001
|
-
n.length > 40 && (n = n.substring(0, 36) + '..."'),
|
|
5160
|
+
n.length > 40 && (n = n.substring(0, 36) + '..."'), $n(i.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${n}. Set mapAsMap: true to use object keys.`), i.mapKeyWarned = !0;
|
|
5002
5161
|
}
|
|
5003
5162
|
return s;
|
|
5004
5163
|
}
|
|
5005
5164
|
return JSON.stringify(t);
|
|
5006
5165
|
}
|
|
5007
|
-
function
|
|
5008
|
-
const r =
|
|
5166
|
+
function Zt(e, t, i) {
|
|
5167
|
+
const r = st(e, void 0, i), s = st(t, void 0, i);
|
|
5009
5168
|
return new oe(r, s);
|
|
5010
5169
|
}
|
|
5011
5170
|
class oe {
|
|
5012
5171
|
constructor(t, i = null) {
|
|
5013
|
-
Object.defineProperty(this, ne, { value:
|
|
5172
|
+
Object.defineProperty(this, ne, { value: fr }), this.key = t, this.value = i;
|
|
5014
5173
|
}
|
|
5015
5174
|
clone(t) {
|
|
5016
5175
|
let { key: i, value: r } = this;
|
|
@@ -5018,48 +5177,48 @@ class oe {
|
|
|
5018
5177
|
}
|
|
5019
5178
|
toJSON(t, i) {
|
|
5020
5179
|
const r = i?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
5021
|
-
return
|
|
5180
|
+
return xr(i, r, this);
|
|
5022
5181
|
}
|
|
5023
5182
|
toString(t, i, r) {
|
|
5024
|
-
return t?.doc ?
|
|
5183
|
+
return t?.doc ? jn(this, t, i, r) : JSON.stringify(this);
|
|
5025
5184
|
}
|
|
5026
5185
|
}
|
|
5027
|
-
function
|
|
5028
|
-
return (t.inFlow ?? e.flow ?
|
|
5186
|
+
function vr(e, t, i) {
|
|
5187
|
+
return (t.inFlow ?? e.flow ? qn : Wn)(e, t, i);
|
|
5029
5188
|
}
|
|
5030
|
-
function
|
|
5189
|
+
function Wn({ comment: e, items: t }, i, { blockItemPrefix: r, flowChars: s, itemIndent: n, onChompKeep: a, onComment: u }) {
|
|
5031
5190
|
const { indent: l, options: { commentString: c } } = i, f = Object.assign({}, i, { indent: n, type: null });
|
|
5032
5191
|
let h = !1;
|
|
5033
|
-
const
|
|
5034
|
-
for (let
|
|
5035
|
-
const d = t[
|
|
5192
|
+
const g = [];
|
|
5193
|
+
for (let _ = 0; _ < t.length; ++_) {
|
|
5194
|
+
const d = t[_];
|
|
5036
5195
|
let w = null;
|
|
5037
5196
|
if (U(d))
|
|
5038
|
-
!h && d.spaceBefore &&
|
|
5197
|
+
!h && d.spaceBefore && g.push(""), at(i, g, d.commentBefore, h), d.comment && (w = d.comment);
|
|
5039
5198
|
else if (j(d)) {
|
|
5040
|
-
const
|
|
5041
|
-
|
|
5199
|
+
const m = U(d.key) ? d.key : null;
|
|
5200
|
+
m && (!h && m.spaceBefore && g.push(""), at(i, g, m.commentBefore, h));
|
|
5042
5201
|
}
|
|
5043
5202
|
h = !1;
|
|
5044
|
-
let p =
|
|
5045
|
-
w && (p +=
|
|
5203
|
+
let p = nt(d, f, () => w = null, () => h = !0);
|
|
5204
|
+
w && (p += Ee(p, n, c(w))), h && w && (h = !1), g.push(r + p);
|
|
5046
5205
|
}
|
|
5047
5206
|
let y;
|
|
5048
|
-
if (
|
|
5207
|
+
if (g.length === 0)
|
|
5049
5208
|
y = s.start + s.end;
|
|
5050
5209
|
else {
|
|
5051
|
-
y =
|
|
5052
|
-
for (let
|
|
5053
|
-
const d =
|
|
5210
|
+
y = g[0];
|
|
5211
|
+
for (let _ = 1; _ < g.length; ++_) {
|
|
5212
|
+
const d = g[_];
|
|
5054
5213
|
y += d ? `
|
|
5055
5214
|
${l}${d}` : `
|
|
5056
5215
|
`;
|
|
5057
5216
|
}
|
|
5058
5217
|
}
|
|
5059
5218
|
return e ? (y += `
|
|
5060
|
-
` +
|
|
5219
|
+
` + $e(c(e), l), u && u()) : h && a && a(), y;
|
|
5061
5220
|
}
|
|
5062
|
-
function
|
|
5221
|
+
function qn({ items: e }, t, { flowChars: i, itemIndent: r }) {
|
|
5063
5222
|
const { indent: s, indentStep: n, flowCollectionPadding: a, options: { commentString: u } } = t;
|
|
5064
5223
|
r += n;
|
|
5065
5224
|
const l = Object.assign({}, t, {
|
|
@@ -5069,43 +5228,43 @@ function Ln({ items: e }, t, { flowChars: i, itemIndent: r }) {
|
|
|
5069
5228
|
});
|
|
5070
5229
|
let c = !1, f = 0;
|
|
5071
5230
|
const h = [];
|
|
5072
|
-
for (let
|
|
5073
|
-
const d = e[
|
|
5231
|
+
for (let _ = 0; _ < e.length; ++_) {
|
|
5232
|
+
const d = e[_];
|
|
5074
5233
|
let w = null;
|
|
5075
5234
|
if (U(d))
|
|
5076
|
-
d.spaceBefore && h.push(""),
|
|
5235
|
+
d.spaceBefore && h.push(""), at(t, h, d.commentBefore, !1), d.comment && (w = d.comment);
|
|
5077
5236
|
else if (j(d)) {
|
|
5078
|
-
const
|
|
5079
|
-
|
|
5237
|
+
const m = U(d.key) ? d.key : null;
|
|
5238
|
+
m && (m.spaceBefore && h.push(""), at(t, h, m.commentBefore, !1), m.comment && (c = !0));
|
|
5080
5239
|
const x = U(d.value) ? d.value : null;
|
|
5081
|
-
x ? (x.comment && (w = x.comment), x.commentBefore && (c = !0)) : d.value == null &&
|
|
5240
|
+
x ? (x.comment && (w = x.comment), x.commentBefore && (c = !0)) : d.value == null && m?.comment && (w = m.comment);
|
|
5082
5241
|
}
|
|
5083
5242
|
w && (c = !0);
|
|
5084
|
-
let p =
|
|
5085
|
-
|
|
5243
|
+
let p = nt(d, l, () => w = null);
|
|
5244
|
+
_ < e.length - 1 && (p += ","), w && (p += Ee(p, r, u(w))), !c && (h.length > f || p.includes(`
|
|
5086
5245
|
`)) && (c = !0), h.push(p), f = h.length;
|
|
5087
5246
|
}
|
|
5088
|
-
const { start:
|
|
5247
|
+
const { start: g, end: y } = i;
|
|
5089
5248
|
if (h.length === 0)
|
|
5090
|
-
return
|
|
5249
|
+
return g + y;
|
|
5091
5250
|
if (!c) {
|
|
5092
|
-
const
|
|
5093
|
-
c = t.options.lineWidth > 0 &&
|
|
5251
|
+
const _ = h.reduce((d, w) => d + w.length + 2, 2);
|
|
5252
|
+
c = t.options.lineWidth > 0 && _ > t.options.lineWidth;
|
|
5094
5253
|
}
|
|
5095
5254
|
if (c) {
|
|
5096
|
-
let
|
|
5255
|
+
let _ = g;
|
|
5097
5256
|
for (const d of h)
|
|
5098
|
-
|
|
5257
|
+
_ += d ? `
|
|
5099
5258
|
${n}${s}${d}` : `
|
|
5100
5259
|
`;
|
|
5101
|
-
return `${
|
|
5260
|
+
return `${_}
|
|
5102
5261
|
${s}${y}`;
|
|
5103
5262
|
} else
|
|
5104
|
-
return `${
|
|
5263
|
+
return `${g}${a}${h.join(" ")}${a}${y}`;
|
|
5105
5264
|
}
|
|
5106
|
-
function
|
|
5265
|
+
function at({ indent: e, options: { commentString: t } }, i, r, s) {
|
|
5107
5266
|
if (r && s && (r = r.replace(/^\n+/, "")), r) {
|
|
5108
|
-
const n =
|
|
5267
|
+
const n = $e(t(r), e);
|
|
5109
5268
|
i.push(n.trimStart());
|
|
5110
5269
|
}
|
|
5111
5270
|
}
|
|
@@ -5115,7 +5274,7 @@ function me(e, t) {
|
|
|
5115
5274
|
if (j(r) && (r.key === t || r.key === i || D(r.key) && r.key.value === i))
|
|
5116
5275
|
return r;
|
|
5117
5276
|
}
|
|
5118
|
-
class
|
|
5277
|
+
class Ce extends gr {
|
|
5119
5278
|
static get tagName() {
|
|
5120
5279
|
return "tag:yaml.org,2002:map";
|
|
5121
5280
|
}
|
|
@@ -5132,7 +5291,7 @@ class Se extends ur {
|
|
|
5132
5291
|
c = n.call(i, l, c);
|
|
5133
5292
|
else if (Array.isArray(n) && !n.includes(l))
|
|
5134
5293
|
return;
|
|
5135
|
-
(c !== void 0 || s) && a.items.push(
|
|
5294
|
+
(c !== void 0 || s) && a.items.push(Zt(l, c, r));
|
|
5136
5295
|
};
|
|
5137
5296
|
if (i instanceof Map)
|
|
5138
5297
|
for (const [l, c] of i)
|
|
@@ -5155,7 +5314,7 @@ class Se extends ur {
|
|
|
5155
5314
|
if (s) {
|
|
5156
5315
|
if (!i)
|
|
5157
5316
|
throw new Error(`Key ${r.key} already set`);
|
|
5158
|
-
D(s.value) &&
|
|
5317
|
+
D(s.value) && mr(r.value) ? s.value.value = r.value : s.value = r.value;
|
|
5159
5318
|
} else if (n) {
|
|
5160
5319
|
const a = this.items.findIndex((u) => n(r, u) < 0);
|
|
5161
5320
|
a === -1 ? this.items.push(r) : this.items.splice(a, 0, r);
|
|
@@ -5185,7 +5344,7 @@ class Se extends ur {
|
|
|
5185
5344
|
const s = r ? new r() : i?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
5186
5345
|
i?.onCreate && i.onCreate(s);
|
|
5187
5346
|
for (const n of this.items)
|
|
5188
|
-
|
|
5347
|
+
xr(i, s, n);
|
|
5189
5348
|
return s;
|
|
5190
5349
|
}
|
|
5191
5350
|
toString(t, i, r) {
|
|
@@ -5194,7 +5353,7 @@ class Se extends ur {
|
|
|
5194
5353
|
for (const s of this.items)
|
|
5195
5354
|
if (!j(s))
|
|
5196
5355
|
throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);
|
|
5197
|
-
return !t.allNullValues && this.hasAllNullValues(!1) && (t = Object.assign({}, t, { allNullValues: !0 })),
|
|
5356
|
+
return !t.allNullValues && this.hasAllNullValues(!1) && (t = Object.assign({}, t, { allNullValues: !0 })), vr(this, t, {
|
|
5198
5357
|
blockItemPrefix: "",
|
|
5199
5358
|
flowChars: { start: "{", end: "}" },
|
|
5200
5359
|
itemIndent: t.indent || "",
|
|
@@ -5203,12 +5362,12 @@ class Se extends ur {
|
|
|
5203
5362
|
});
|
|
5204
5363
|
}
|
|
5205
5364
|
}
|
|
5206
|
-
class
|
|
5365
|
+
class wr extends gr {
|
|
5207
5366
|
static get tagName() {
|
|
5208
5367
|
return "tag:yaml.org,2002:seq";
|
|
5209
5368
|
}
|
|
5210
5369
|
constructor(t) {
|
|
5211
|
-
super(
|
|
5370
|
+
super(qe, t), this.items = [];
|
|
5212
5371
|
}
|
|
5213
5372
|
add(t) {
|
|
5214
5373
|
this.items.push(t);
|
|
@@ -5222,11 +5381,11 @@ class pr extends ur {
|
|
|
5222
5381
|
* @returns `true` if the item was found and removed.
|
|
5223
5382
|
*/
|
|
5224
5383
|
delete(t) {
|
|
5225
|
-
const i =
|
|
5384
|
+
const i = Ge(t);
|
|
5226
5385
|
return typeof i != "number" ? !1 : this.items.splice(i, 1).length > 0;
|
|
5227
5386
|
}
|
|
5228
5387
|
get(t, i) {
|
|
5229
|
-
const r =
|
|
5388
|
+
const r = Ge(t);
|
|
5230
5389
|
if (typeof r != "number")
|
|
5231
5390
|
return;
|
|
5232
5391
|
const s = this.items[r];
|
|
@@ -5239,7 +5398,7 @@ class pr extends ur {
|
|
|
5239
5398
|
* It may be wrapped in a `Scalar`.
|
|
5240
5399
|
*/
|
|
5241
5400
|
has(t) {
|
|
5242
|
-
const i =
|
|
5401
|
+
const i = Ge(t);
|
|
5243
5402
|
return typeof i == "number" && i < this.items.length;
|
|
5244
5403
|
}
|
|
5245
5404
|
/**
|
|
@@ -5250,11 +5409,11 @@ class pr extends ur {
|
|
|
5250
5409
|
* It may be wrapped in a `Scalar`.
|
|
5251
5410
|
*/
|
|
5252
5411
|
set(t, i) {
|
|
5253
|
-
const r =
|
|
5412
|
+
const r = Ge(t);
|
|
5254
5413
|
if (typeof r != "number")
|
|
5255
5414
|
throw new Error(`Expected a valid index, not ${t}.`);
|
|
5256
5415
|
const s = this.items[r];
|
|
5257
|
-
D(s) &&
|
|
5416
|
+
D(s) && mr(i) ? s.value = i : this.items[r] = i;
|
|
5258
5417
|
}
|
|
5259
5418
|
toJSON(t, i) {
|
|
5260
5419
|
const r = [];
|
|
@@ -5265,7 +5424,7 @@ class pr extends ur {
|
|
|
5265
5424
|
return r;
|
|
5266
5425
|
}
|
|
5267
5426
|
toString(t, i, r) {
|
|
5268
|
-
return t ?
|
|
5427
|
+
return t ? vr(this, t, {
|
|
5269
5428
|
blockItemPrefix: "- ",
|
|
5270
5429
|
flowChars: { start: "[", end: "]" },
|
|
5271
5430
|
itemIndent: (t.indent || "") + " ",
|
|
@@ -5282,18 +5441,18 @@ class pr extends ur {
|
|
|
5282
5441
|
const l = i instanceof Set ? u : String(a++);
|
|
5283
5442
|
u = s.call(i, l, u);
|
|
5284
5443
|
}
|
|
5285
|
-
n.items.push(
|
|
5444
|
+
n.items.push(st(u, void 0, r));
|
|
5286
5445
|
}
|
|
5287
5446
|
}
|
|
5288
5447
|
return n;
|
|
5289
5448
|
}
|
|
5290
5449
|
}
|
|
5291
|
-
function
|
|
5450
|
+
function Ge(e) {
|
|
5292
5451
|
let t = D(e) ? e.value : e;
|
|
5293
5452
|
return t && typeof t == "string" && (t = Number(t)), typeof t == "number" && Number.isInteger(t) && t >= 0 ? t : null;
|
|
5294
5453
|
}
|
|
5295
|
-
function
|
|
5296
|
-
const { replacer: r } = i, s = new
|
|
5454
|
+
function Kn(e, t, i) {
|
|
5455
|
+
const { replacer: r } = i, s = new wr(e);
|
|
5297
5456
|
s.tag = "tag:yaml.org,2002:pairs";
|
|
5298
5457
|
let n = 0;
|
|
5299
5458
|
if (t && Symbol.iterator in Object(t))
|
|
@@ -5313,13 +5472,13 @@ function Rn(e, t, i) {
|
|
|
5313
5472
|
throw new TypeError(`Expected tuple with one key, not ${c.length} keys`);
|
|
5314
5473
|
} else
|
|
5315
5474
|
u = a;
|
|
5316
|
-
s.items.push(
|
|
5475
|
+
s.items.push(Zt(u, l, i));
|
|
5317
5476
|
}
|
|
5318
5477
|
return s;
|
|
5319
5478
|
}
|
|
5320
|
-
class
|
|
5479
|
+
class ei extends wr {
|
|
5321
5480
|
constructor() {
|
|
5322
|
-
super(), this.add =
|
|
5481
|
+
super(), this.add = Ce.prototype.add.bind(this), this.delete = Ce.prototype.delete.bind(this), this.get = Ce.prototype.get.bind(this), this.has = Ce.prototype.has.bind(this), this.set = Ce.prototype.set.bind(this), this.tag = ei.tag;
|
|
5323
5482
|
}
|
|
5324
5483
|
/**
|
|
5325
5484
|
* If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
|
|
@@ -5339,14 +5498,14 @@ class Gt extends pr {
|
|
|
5339
5498
|
return r;
|
|
5340
5499
|
}
|
|
5341
5500
|
static from(t, i, r) {
|
|
5342
|
-
const s =
|
|
5501
|
+
const s = Kn(t, i, r), n = new this();
|
|
5343
5502
|
return n.items = s.items, n;
|
|
5344
5503
|
}
|
|
5345
5504
|
}
|
|
5346
|
-
|
|
5347
|
-
class
|
|
5505
|
+
ei.tag = "tag:yaml.org,2002:omap";
|
|
5506
|
+
class ti extends Ce {
|
|
5348
5507
|
constructor(t) {
|
|
5349
|
-
super(t), this.tag =
|
|
5508
|
+
super(t), this.tag = ti.tag;
|
|
5350
5509
|
}
|
|
5351
5510
|
add(t) {
|
|
5352
5511
|
let i;
|
|
@@ -5380,17 +5539,17 @@ class Jt extends Se {
|
|
|
5380
5539
|
const { replacer: s } = r, n = new this(t);
|
|
5381
5540
|
if (i && Symbol.iterator in Object(i))
|
|
5382
5541
|
for (let a of i)
|
|
5383
|
-
typeof s == "function" && (a = s.call(i, a, a)), n.items.push(
|
|
5542
|
+
typeof s == "function" && (a = s.call(i, a, a)), n.items.push(Zt(a, null, r));
|
|
5384
5543
|
return n;
|
|
5385
5544
|
}
|
|
5386
5545
|
}
|
|
5387
|
-
|
|
5546
|
+
ti.tag = "tag:yaml.org,2002:set";
|
|
5388
5547
|
new Set("0123456789ABCDEFabcdef");
|
|
5389
5548
|
new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");
|
|
5390
5549
|
new Set(",[]{}");
|
|
5391
5550
|
new Set(` ,[]{}
|
|
5392
5551
|
\r `);
|
|
5393
|
-
const
|
|
5552
|
+
const gi = /* @__PURE__ */ new Map(), Hn = Object.freeze({
|
|
5394
5553
|
abs: Math.abs,
|
|
5395
5554
|
ceil: Math.ceil,
|
|
5396
5555
|
floor: Math.floor,
|
|
@@ -5399,40 +5558,40 @@ const li = /* @__PURE__ */ new Map(), Fn = Object.freeze({
|
|
|
5399
5558
|
pow: Math.pow,
|
|
5400
5559
|
round: Math.round,
|
|
5401
5560
|
trunc: Math.trunc
|
|
5402
|
-
}),
|
|
5561
|
+
}), Gn = Object.freeze({
|
|
5403
5562
|
entries: Object.entries,
|
|
5404
5563
|
fromEntries: Object.fromEntries,
|
|
5405
5564
|
keys: Object.keys,
|
|
5406
5565
|
values: Object.values
|
|
5407
|
-
}),
|
|
5566
|
+
}), Jn = Object.freeze({
|
|
5408
5567
|
isArray: Array.isArray
|
|
5409
|
-
}),
|
|
5568
|
+
}), Qn = Object.freeze({
|
|
5410
5569
|
parse: JSON.parse,
|
|
5411
5570
|
stringify: JSON.stringify
|
|
5412
5571
|
});
|
|
5413
|
-
function
|
|
5572
|
+
function ot(e) {
|
|
5414
5573
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
5415
5574
|
}
|
|
5416
|
-
function
|
|
5417
|
-
return Array.isArray(e) ? e.map((t) =>
|
|
5418
|
-
Object.entries(e).map(([t, i]) => [t,
|
|
5575
|
+
function ut(e) {
|
|
5576
|
+
return Array.isArray(e) ? e.map((t) => ut(t)) : ot(e) ? Object.fromEntries(
|
|
5577
|
+
Object.entries(e).map(([t, i]) => [t, ut(i)])
|
|
5419
5578
|
) : e;
|
|
5420
5579
|
}
|
|
5421
|
-
function
|
|
5580
|
+
function Mt(e, t) {
|
|
5422
5581
|
if (Object.is(e, t))
|
|
5423
5582
|
return !0;
|
|
5424
5583
|
if (Array.isArray(e) && Array.isArray(t))
|
|
5425
|
-
return e.length !== t.length ? !1 : e.every((i, r) =>
|
|
5426
|
-
if (
|
|
5584
|
+
return e.length !== t.length ? !1 : e.every((i, r) => Mt(i, t[r]));
|
|
5585
|
+
if (ot(e) && ot(t)) {
|
|
5427
5586
|
const i = Object.keys(e), r = Object.keys(t);
|
|
5428
|
-
return i.length !== r.length ? !1 : i.every((s) => s in t &&
|
|
5587
|
+
return i.length !== r.length ? !1 : i.every((s) => s in t && Mt(e[s], t[s]));
|
|
5429
5588
|
}
|
|
5430
5589
|
return !1;
|
|
5431
5590
|
}
|
|
5432
|
-
function
|
|
5591
|
+
function Sr(e) {
|
|
5433
5592
|
return e === null || typeof e > "u" ? !1 : typeof e == "string" ? e.trim().length > 0 : !0;
|
|
5434
5593
|
}
|
|
5435
|
-
function
|
|
5594
|
+
function Yn(e) {
|
|
5436
5595
|
if (typeof e == "number")
|
|
5437
5596
|
return Number.isFinite(e) ? e : void 0;
|
|
5438
5597
|
if (typeof e == "string" && e.trim()) {
|
|
@@ -5440,13 +5599,13 @@ function jn(e) {
|
|
|
5440
5599
|
return Number.isFinite(t) ? t : void 0;
|
|
5441
5600
|
}
|
|
5442
5601
|
}
|
|
5443
|
-
function
|
|
5444
|
-
return t ?
|
|
5602
|
+
function Xn(e, t) {
|
|
5603
|
+
return t ? Si(t.type) && Yn(e) === void 0 ? !1 : ls(e, t.type, t.kwargs) === null : !0;
|
|
5445
5604
|
}
|
|
5446
|
-
function
|
|
5447
|
-
return
|
|
5605
|
+
function Zn(e, t, i) {
|
|
5606
|
+
return Sr(t) && Xn(t, i?.[e]);
|
|
5448
5607
|
}
|
|
5449
|
-
function
|
|
5608
|
+
function ea(e, t) {
|
|
5450
5609
|
const i = /* @__PURE__ */ new Set();
|
|
5451
5610
|
for (const r of e.dependent_fields) {
|
|
5452
5611
|
const s = t.get(r);
|
|
@@ -5454,7 +5613,7 @@ function zn(e, t) {
|
|
|
5454
5613
|
}
|
|
5455
5614
|
return i;
|
|
5456
5615
|
}
|
|
5457
|
-
function
|
|
5616
|
+
function ta(e) {
|
|
5458
5617
|
const t = new Map(e.map((a) => [a.id, a])), i = /* @__PURE__ */ new Map();
|
|
5459
5618
|
for (const a of e)
|
|
5460
5619
|
for (const u of a.assigned_fields)
|
|
@@ -5463,7 +5622,7 @@ function Wn(e) {
|
|
|
5463
5622
|
function n(a) {
|
|
5464
5623
|
if (!r.has(a.id)) {
|
|
5465
5624
|
r.add(a.id);
|
|
5466
|
-
for (const u of
|
|
5625
|
+
for (const u of ea(a, i)) {
|
|
5467
5626
|
const l = t.get(u);
|
|
5468
5627
|
l && n(l);
|
|
5469
5628
|
}
|
|
@@ -5474,17 +5633,17 @@ function Wn(e) {
|
|
|
5474
5633
|
n(a);
|
|
5475
5634
|
return s;
|
|
5476
5635
|
}
|
|
5477
|
-
function
|
|
5478
|
-
return e.assigned_fields.every((i) => !
|
|
5636
|
+
function ia(e, t) {
|
|
5637
|
+
return e.assigned_fields.every((i) => !Sr(t[i]));
|
|
5479
5638
|
}
|
|
5480
|
-
function
|
|
5481
|
-
return e.dependent_fields.every((r) =>
|
|
5639
|
+
function ra(e, t, i) {
|
|
5640
|
+
return e.dependent_fields.every((r) => Zn(r, t[r], i?.fieldDefinitions));
|
|
5482
5641
|
}
|
|
5483
|
-
function
|
|
5484
|
-
const t =
|
|
5642
|
+
function sa(e) {
|
|
5643
|
+
const t = gi.get(e.function_source);
|
|
5485
5644
|
if (t)
|
|
5486
5645
|
return t;
|
|
5487
|
-
|
|
5646
|
+
Cn(e.function_source, e.id);
|
|
5488
5647
|
const r = new Function(
|
|
5489
5648
|
"__math__",
|
|
5490
5649
|
"__object__",
|
|
@@ -5509,20 +5668,20 @@ const Date = undefined;
|
|
|
5509
5668
|
return (${e.function_source});
|
|
5510
5669
|
`
|
|
5511
5670
|
)(
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5671
|
+
Hn,
|
|
5672
|
+
Gn,
|
|
5673
|
+
Jn,
|
|
5674
|
+
Qn
|
|
5516
5675
|
);
|
|
5517
5676
|
if (typeof r != "function")
|
|
5518
5677
|
throw new Error(`client assigner "${e.id}" did not compile to a callable function`);
|
|
5519
|
-
return
|
|
5678
|
+
return gi.set(e.function_source, r), r;
|
|
5520
5679
|
}
|
|
5521
|
-
function
|
|
5522
|
-
const i =
|
|
5523
|
-
e.dependent_fields.map((u) => [u,
|
|
5680
|
+
function na(e, t) {
|
|
5681
|
+
const i = sa(e), r = Object.fromEntries(
|
|
5682
|
+
e.dependent_fields.map((u) => [u, ut(t[u])])
|
|
5524
5683
|
), s = i(r);
|
|
5525
|
-
if (!
|
|
5684
|
+
if (!ot(s))
|
|
5526
5685
|
throw new Error(`client assigner "${e.id}" must return an object`);
|
|
5527
5686
|
const n = e.assigned_fields.filter((u) => !(u in s));
|
|
5528
5687
|
if (n.length > 0)
|
|
@@ -5531,26 +5690,26 @@ function Gn(e, t) {
|
|
|
5531
5690
|
if (a.length > 0)
|
|
5532
5691
|
throw new Error(`client assigner "${e.id}" returned fields not declared in assigned_fields: ${a.join(", ")}`);
|
|
5533
5692
|
return Object.fromEntries(
|
|
5534
|
-
e.assigned_fields.map((u) => [u,
|
|
5693
|
+
e.assigned_fields.map((u) => [u, ut(s[u])])
|
|
5535
5694
|
);
|
|
5536
5695
|
}
|
|
5537
|
-
function
|
|
5696
|
+
function aa(e, t, i) {
|
|
5538
5697
|
if (e.length === 0)
|
|
5539
5698
|
return { changed: !1, changedFields: [] };
|
|
5540
5699
|
const r = new Set(i?.triggerIds ?? []), s = /* @__PURE__ */ new Set();
|
|
5541
|
-
for (const n of
|
|
5542
|
-
if (!
|
|
5700
|
+
for (const n of ta(e)) {
|
|
5701
|
+
if (!ra(n, t, i) || !r.has(n.id) && (n.mode === "manual" || n.mode === "auto_first" && !ia(n, t)))
|
|
5543
5702
|
continue;
|
|
5544
|
-
const u =
|
|
5703
|
+
const u = na(n, t);
|
|
5545
5704
|
for (const [l, c] of Object.entries(u))
|
|
5546
|
-
|
|
5705
|
+
Mt(t[l], c) || (t[l] = c, s.add(l));
|
|
5547
5706
|
}
|
|
5548
5707
|
return {
|
|
5549
5708
|
changed: s.size > 0,
|
|
5550
5709
|
changedFields: Array.from(s)
|
|
5551
5710
|
};
|
|
5552
5711
|
}
|
|
5553
|
-
function
|
|
5712
|
+
function La(e) {
|
|
5554
5713
|
const {
|
|
5555
5714
|
readonly: t,
|
|
5556
5715
|
clientAssigners: i,
|
|
@@ -5560,32 +5719,32 @@ function Ca(e) {
|
|
|
5560
5719
|
emitRecordUpdate: a,
|
|
5561
5720
|
scheduleInlineRebuild: u
|
|
5562
5721
|
} = e;
|
|
5563
|
-
function l(
|
|
5722
|
+
function l(g) {
|
|
5564
5723
|
if (t() || i.value.length === 0)
|
|
5565
5724
|
return !1;
|
|
5566
5725
|
try {
|
|
5567
|
-
return
|
|
5568
|
-
...
|
|
5726
|
+
return aa(i.value, s.var, {
|
|
5727
|
+
...g,
|
|
5569
5728
|
fieldDefinitions: r?.()
|
|
5570
5729
|
}).changed;
|
|
5571
5730
|
} catch (y) {
|
|
5572
|
-
const
|
|
5573
|
-
return n(`Client assigner error: ${
|
|
5731
|
+
const _ = y instanceof Error ? y.message : String(y);
|
|
5732
|
+
return n(`Client assigner error: ${_}`), !1;
|
|
5574
5733
|
}
|
|
5575
5734
|
}
|
|
5576
5735
|
function c() {
|
|
5577
5736
|
return l();
|
|
5578
5737
|
}
|
|
5579
|
-
function f(
|
|
5580
|
-
const y = l({ triggerIds: [
|
|
5738
|
+
function f(g) {
|
|
5739
|
+
const y = l({ triggerIds: [g] });
|
|
5581
5740
|
return y && (a(), u()), y;
|
|
5582
5741
|
}
|
|
5583
|
-
function h(
|
|
5584
|
-
const y =
|
|
5742
|
+
function h(g) {
|
|
5743
|
+
const y = g?.length ? g : i.value.filter((d) => d.mode === "manual").map((d) => d.id);
|
|
5585
5744
|
if (y.length === 0)
|
|
5586
5745
|
return !1;
|
|
5587
|
-
const
|
|
5588
|
-
return
|
|
5746
|
+
const _ = l({ triggerIds: y });
|
|
5747
|
+
return _ && (a(), u()), _;
|
|
5589
5748
|
}
|
|
5590
5749
|
return {
|
|
5591
5750
|
runClientAssigners: l,
|
|
@@ -5594,7 +5753,7 @@ function Ca(e) {
|
|
|
5594
5753
|
triggerManualClientAssigners: h
|
|
5595
5754
|
};
|
|
5596
5755
|
}
|
|
5597
|
-
function
|
|
5756
|
+
function oa(e, t, i, r, s, n) {
|
|
5598
5757
|
return {
|
|
5599
5758
|
fieldType: e,
|
|
5600
5759
|
fieldKey: t,
|
|
@@ -5609,25 +5768,25 @@ function Qn(e, t, i, r, s, n) {
|
|
|
5609
5768
|
fieldState: n.fieldState
|
|
5610
5769
|
};
|
|
5611
5770
|
}
|
|
5612
|
-
function
|
|
5613
|
-
const a =
|
|
5771
|
+
function Ra(e, t, i, r, s, n) {
|
|
5772
|
+
const a = oa(e, t, i, r, s, n), u = n.fieldAdapters?.[e], c = (u ? u(a) : void 0) ?? s;
|
|
5614
5773
|
return n.wrapField ? n.wrapField(t, e, c) : c;
|
|
5615
5774
|
}
|
|
5616
|
-
const
|
|
5617
|
-
let
|
|
5618
|
-
function
|
|
5619
|
-
const t =
|
|
5775
|
+
const yi = /* @__PURE__ */ new WeakMap();
|
|
5776
|
+
let bi = 0;
|
|
5777
|
+
function ua(e) {
|
|
5778
|
+
const t = yi.get(e);
|
|
5620
5779
|
if (t)
|
|
5621
5780
|
return t;
|
|
5622
|
-
const i = `vt-row-${
|
|
5623
|
-
return
|
|
5781
|
+
const i = `vt-row-${bi}`;
|
|
5782
|
+
return bi += 1, yi.set(e, i), i;
|
|
5624
5783
|
}
|
|
5625
|
-
function
|
|
5784
|
+
function Fa(e) {
|
|
5626
5785
|
if (Array.isArray(e.columns) && e.columns.length > 0) return e.columns;
|
|
5627
5786
|
const t = e.definition?.subvars;
|
|
5628
5787
|
return t && typeof t == "object" ? Object.keys(t) : [];
|
|
5629
5788
|
}
|
|
5630
|
-
function
|
|
5789
|
+
function Ma(e) {
|
|
5631
5790
|
const {
|
|
5632
5791
|
readonly: t,
|
|
5633
5792
|
localRecord: i,
|
|
@@ -5636,114 +5795,114 @@ function Ea(e) {
|
|
|
5636
5795
|
emitTableAddRow: n,
|
|
5637
5796
|
emitTableRemoveRow: a
|
|
5638
5797
|
} = e;
|
|
5639
|
-
let u = null, l = null, c = null, f = null, h = null,
|
|
5640
|
-
function
|
|
5641
|
-
const
|
|
5642
|
-
return i.var[N] =
|
|
5798
|
+
let u = null, l = null, c = null, f = null, h = null, g = null, y = null;
|
|
5799
|
+
function _(N, V) {
|
|
5800
|
+
const T = Lr(i.var[N], V);
|
|
5801
|
+
return i.var[N] = T, T;
|
|
5643
5802
|
}
|
|
5644
|
-
function d(N,
|
|
5645
|
-
|
|
5803
|
+
function d(N, V) {
|
|
5804
|
+
_(N, V).push(Or(V)), r({ rebuild: !0, runClientAssigners: !0 }), n({ tableName: N, columns: V });
|
|
5646
5805
|
}
|
|
5647
|
-
function w(N,
|
|
5648
|
-
const
|
|
5649
|
-
if (
|
|
5806
|
+
function w(N, V, T, W) {
|
|
5807
|
+
const Se = _(N, W);
|
|
5808
|
+
if (V === T || V < 0 || T < 0 || V >= Se.length || T >= Se.length)
|
|
5650
5809
|
return;
|
|
5651
|
-
const
|
|
5652
|
-
|
|
5653
|
-
|
|
5810
|
+
const ii = Se.splice(V, 1)[0];
|
|
5811
|
+
Se.splice(T, 0, ii), g = ua(ii), y && clearTimeout(y), y = setTimeout(() => {
|
|
5812
|
+
g = null, y = null, s();
|
|
5654
5813
|
}, 520), r({ rebuild: !0, runClientAssigners: !0 });
|
|
5655
5814
|
}
|
|
5656
|
-
function p(N,
|
|
5657
|
-
const W =
|
|
5658
|
-
W.length <= 1 || (W.splice(
|
|
5815
|
+
function p(N, V, T) {
|
|
5816
|
+
const W = _(N, T);
|
|
5817
|
+
W.length <= 1 || (W.splice(V, 1), r({ rebuild: !0, runClientAssigners: !0 }), a({ tableName: N, rowIndex: V, columns: T }));
|
|
5659
5818
|
}
|
|
5660
|
-
function
|
|
5819
|
+
function m() {
|
|
5661
5820
|
l && (l.classList.remove("aimd-rec-inline-table__row--drag-over"), l = null), c && (c.classList.remove("aimd-rec-inline-table__drag-handle--dragging"), c = null), f && (f.classList.remove("aimd-rec-inline-table__row--dragging-source"), f = null), h && (h.classList.remove("aimd-rec-inline-table__table--dragging"), h = null);
|
|
5662
5821
|
}
|
|
5663
5822
|
function x(N) {
|
|
5664
|
-
const
|
|
5665
|
-
l !==
|
|
5823
|
+
const V = N instanceof HTMLTableRowElement ? N : null;
|
|
5824
|
+
l !== V && (l && l.classList.remove("aimd-rec-inline-table__row--drag-over"), l = V, l?.classList.add("aimd-rec-inline-table__row--drag-over"));
|
|
5666
5825
|
}
|
|
5667
|
-
function
|
|
5668
|
-
t() || (u = { tableName: N, rowIndex:
|
|
5826
|
+
function S(N, V, T) {
|
|
5827
|
+
t() || (u = { tableName: N, rowIndex: V }, c = T.currentTarget instanceof HTMLElement ? T.currentTarget : null, f = c?.closest("tr"), h = c?.closest("table"), c?.classList.add("aimd-rec-inline-table__drag-handle--dragging"), f?.classList.add("aimd-rec-inline-table__row--dragging-source"), h?.classList.add("aimd-rec-inline-table__table--dragging"), T.dataTransfer && (T.dataTransfer.effectAllowed = "move", T.dataTransfer.setData("text/plain", `${N}:${V}`)));
|
|
5669
5828
|
}
|
|
5670
|
-
function
|
|
5829
|
+
function C(N, V, T) {
|
|
5671
5830
|
if (!(!u || u.tableName !== N)) {
|
|
5672
|
-
if (
|
|
5831
|
+
if (T.preventDefault(), T.dataTransfer && (T.dataTransfer.dropEffect = "move"), u.rowIndex === V) {
|
|
5673
5832
|
x(null);
|
|
5674
5833
|
return;
|
|
5675
5834
|
}
|
|
5676
|
-
x(
|
|
5835
|
+
x(T.currentTarget);
|
|
5677
5836
|
}
|
|
5678
5837
|
}
|
|
5679
|
-
function
|
|
5838
|
+
function P(N, V, T, W) {
|
|
5680
5839
|
if (!u || u.tableName !== N) {
|
|
5681
|
-
|
|
5840
|
+
m(), u = null;
|
|
5682
5841
|
return;
|
|
5683
5842
|
}
|
|
5684
5843
|
W.preventDefault();
|
|
5685
|
-
const { rowIndex:
|
|
5686
|
-
|
|
5844
|
+
const { rowIndex: Se } = u;
|
|
5845
|
+
m(), u = null, w(N, Se, V, T);
|
|
5687
5846
|
}
|
|
5688
5847
|
function B() {
|
|
5689
|
-
|
|
5848
|
+
m(), u = null;
|
|
5690
5849
|
}
|
|
5691
5850
|
function ae() {
|
|
5692
|
-
return
|
|
5851
|
+
return g;
|
|
5693
5852
|
}
|
|
5694
5853
|
return {
|
|
5695
|
-
ensureVarTableRows:
|
|
5854
|
+
ensureVarTableRows: _,
|
|
5696
5855
|
addVarTableRow: d,
|
|
5697
5856
|
moveVarTableRow: w,
|
|
5698
5857
|
removeVarTableRow: p,
|
|
5699
|
-
startVarTableRowDrag:
|
|
5700
|
-
handleVarTableRowDragOver:
|
|
5701
|
-
handleVarTableRowDrop:
|
|
5858
|
+
startVarTableRowDrag: S,
|
|
5859
|
+
handleVarTableRowDragOver: C,
|
|
5860
|
+
handleVarTableRowDrop: P,
|
|
5702
5861
|
endVarTableRowDrag: B,
|
|
5703
5862
|
getSettlingVarTableRowKey: ae
|
|
5704
5863
|
};
|
|
5705
5864
|
}
|
|
5706
|
-
function
|
|
5865
|
+
function la(e) {
|
|
5707
5866
|
if (!e) return [];
|
|
5708
5867
|
if (Array.isArray(e.examples))
|
|
5709
5868
|
return e.examples.filter((i) => i != null);
|
|
5710
5869
|
const t = e.example;
|
|
5711
5870
|
return t == null ? [] : [t];
|
|
5712
5871
|
}
|
|
5713
|
-
function
|
|
5872
|
+
function ca(e) {
|
|
5714
5873
|
return e === "auto_force" || e === "auto_readonly" || e === "manual_readonly";
|
|
5715
5874
|
}
|
|
5716
|
-
function
|
|
5717
|
-
const t =
|
|
5718
|
-
function i(p,
|
|
5719
|
-
const
|
|
5720
|
-
return
|
|
5875
|
+
function Da(e) {
|
|
5876
|
+
const t = Mr({});
|
|
5877
|
+
function i(p, m, x) {
|
|
5878
|
+
const S = e.wrapField();
|
|
5879
|
+
return S ? S(p, m, x) : x;
|
|
5721
5880
|
}
|
|
5722
5881
|
function r(p) {
|
|
5723
|
-
const
|
|
5724
|
-
return
|
|
5882
|
+
const m = e.fieldState()?.[p], x = [];
|
|
5883
|
+
return m?.validationError && x.push("aimd-rec-inline--error"), m?.loading && x.push("aimd-rec-inline--loading"), x;
|
|
5725
5884
|
}
|
|
5726
5885
|
function s(p) {
|
|
5727
5886
|
if (e.readonly()) return !0;
|
|
5728
|
-
const
|
|
5729
|
-
return !!(
|
|
5887
|
+
const m = e.fieldMeta()?.[p], x = e.fieldState()?.[p];
|
|
5888
|
+
return !!(m?.disabled || x?.disabled || ca(m?.assigner?.mode));
|
|
5730
5889
|
}
|
|
5731
5890
|
function n() {
|
|
5732
5891
|
const p = e.now();
|
|
5733
5892
|
if (p instanceof Date) return Number.isNaN(p.getTime()) ? /* @__PURE__ */ new Date() : p;
|
|
5734
5893
|
if (typeof p == "string" || typeof p == "number") {
|
|
5735
|
-
const
|
|
5736
|
-
if (!Number.isNaN(
|
|
5894
|
+
const m = new Date(p);
|
|
5895
|
+
if (!Number.isNaN(m.getTime())) return m;
|
|
5737
5896
|
}
|
|
5738
5897
|
return /* @__PURE__ */ new Date();
|
|
5739
5898
|
}
|
|
5740
|
-
function a(p,
|
|
5741
|
-
return
|
|
5899
|
+
function a(p, m) {
|
|
5900
|
+
return Dt(m, e.typePlugins());
|
|
5742
5901
|
}
|
|
5743
|
-
function u(p,
|
|
5902
|
+
function u(p, m, x) {
|
|
5744
5903
|
return {
|
|
5745
|
-
type:
|
|
5746
|
-
normalizedType: te(
|
|
5904
|
+
type: m || "str",
|
|
5905
|
+
normalizedType: te(m),
|
|
5747
5906
|
fieldKey: x,
|
|
5748
5907
|
node: p,
|
|
5749
5908
|
fieldMeta: e.fieldMeta()?.[x],
|
|
@@ -5751,86 +5910,89 @@ function Ia(e) {
|
|
|
5751
5910
|
now: e.now()
|
|
5752
5911
|
};
|
|
5753
5912
|
}
|
|
5754
|
-
function l(p,
|
|
5913
|
+
function l(p, m, x, S, C) {
|
|
5755
5914
|
return {
|
|
5756
|
-
...u(p,
|
|
5757
|
-
value:
|
|
5758
|
-
inputKind:
|
|
5915
|
+
...u(p, m, x),
|
|
5916
|
+
value: S,
|
|
5917
|
+
inputKind: C
|
|
5759
5918
|
};
|
|
5760
5919
|
}
|
|
5761
|
-
function c(p,
|
|
5762
|
-
const
|
|
5763
|
-
if (!
|
|
5920
|
+
function c(p, m, x) {
|
|
5921
|
+
const S = p.definition?.defaultRaw?.trim();
|
|
5922
|
+
if (!S)
|
|
5764
5923
|
return null;
|
|
5765
|
-
const
|
|
5766
|
-
return
|
|
5924
|
+
const C = te(m);
|
|
5925
|
+
return C === "int" || C === "integer" || ni(m, {
|
|
5767
5926
|
inputType: e.fieldMeta()?.[x]?.inputType,
|
|
5768
5927
|
codeLanguage: e.fieldMeta()?.[x]?.codeLanguage,
|
|
5769
5928
|
kwargs: p.definition?.kwargs,
|
|
5770
5929
|
fieldMeta: e.fieldMeta()?.[x],
|
|
5771
|
-
typePlugin: a(x,
|
|
5772
|
-
}) !== "number" || typeof p.definition?.default != "number" || !
|
|
5773
|
-
display:
|
|
5930
|
+
typePlugin: a(x, m)
|
|
5931
|
+
}) !== "number" || typeof p.definition?.default != "number" || !S.includes(".") || String(p.definition.default) === S ? null : {
|
|
5932
|
+
display: S,
|
|
5774
5933
|
expectedValue: p.definition.default
|
|
5775
5934
|
};
|
|
5776
5935
|
}
|
|
5777
|
-
function f(p,
|
|
5778
|
-
const B = t[p], ae =
|
|
5936
|
+
function f(p, m, x, S, C, P) {
|
|
5937
|
+
const B = t[p], ae = xe(S), N = a(P, x);
|
|
5779
5938
|
if (B) {
|
|
5780
|
-
if (
|
|
5939
|
+
if (C === "number" && Object.is(ae, B.expectedValue))
|
|
5781
5940
|
return B.display;
|
|
5782
5941
|
delete t[p];
|
|
5783
5942
|
}
|
|
5784
5943
|
return N?.getDisplayValue ? N.getDisplayValue(
|
|
5785
|
-
l(
|
|
5786
|
-
) :
|
|
5944
|
+
l(m, x, P, S, C)
|
|
5945
|
+
) : ds(S, C, { type: x, typePlugin: N });
|
|
5787
5946
|
}
|
|
5788
5947
|
function h(p) {
|
|
5789
5948
|
p in t && delete t[p];
|
|
5790
5949
|
}
|
|
5791
|
-
function
|
|
5792
|
-
t[p] =
|
|
5950
|
+
function g(p, m) {
|
|
5951
|
+
t[p] = m;
|
|
5793
5952
|
}
|
|
5794
|
-
function y(p,
|
|
5795
|
-
const
|
|
5796
|
-
if (
|
|
5797
|
-
return
|
|
5798
|
-
const
|
|
5953
|
+
function y(p, m, x) {
|
|
5954
|
+
const S = a(x, m);
|
|
5955
|
+
if (S?.getInitialValue)
|
|
5956
|
+
return S.getInitialValue(u(p, m, x));
|
|
5957
|
+
const C = te(m);
|
|
5799
5958
|
if (p.definition && Object.prototype.hasOwnProperty.call(p.definition, "default"))
|
|
5800
|
-
return
|
|
5801
|
-
const
|
|
5959
|
+
return C === "dnasequence" ? Re(p.definition.default) : p.definition.default;
|
|
5960
|
+
const P = ni(m, {
|
|
5802
5961
|
inputType: e.fieldMeta()?.[x]?.inputType,
|
|
5803
5962
|
codeLanguage: e.fieldMeta()?.[x]?.codeLanguage,
|
|
5804
5963
|
kwargs: p.definition?.kwargs,
|
|
5805
5964
|
fieldMeta: e.fieldMeta()?.[x],
|
|
5806
|
-
typePlugin:
|
|
5965
|
+
typePlugin: S
|
|
5807
5966
|
});
|
|
5808
|
-
return
|
|
5967
|
+
return P === "boolean-select" || Xe(m) && P !== "scalar-list" && P !== "checkbox" ? null : P === "checkbox" ? !1 : P === "scalar-list" ? [] : P === "dna" ? Re(void 0) : C === "currenttime" ? It(n()) : C === "username" && typeof e.currentUserName() == "string" ? e.currentUserName() : "";
|
|
5809
5968
|
}
|
|
5810
|
-
function
|
|
5811
|
-
const
|
|
5812
|
-
if (
|
|
5813
|
-
return
|
|
5814
|
-
l(p,
|
|
5969
|
+
function _(p, m, x, S, C) {
|
|
5970
|
+
const P = a(x, m);
|
|
5971
|
+
if (P?.normalizeValue)
|
|
5972
|
+
return P.normalizeValue(
|
|
5973
|
+
l(p, m, x, S, C)
|
|
5815
5974
|
);
|
|
5816
|
-
const B = te(
|
|
5817
|
-
return
|
|
5975
|
+
const B = te(m);
|
|
5976
|
+
return C === "dna" || B === "dnasequence" ? Re(S) : C === "scalar-list" ? jt(
|
|
5977
|
+
$t(S),
|
|
5978
|
+
lt(m) ?? "string"
|
|
5979
|
+
) : C === "boolean-select" ? S === null || typeof S > "u" || S === "" ? null : cs(S) : Xe(m) && C !== "checkbox" && (S === null || typeof S > "u" || S === "") ? null : S;
|
|
5818
5980
|
}
|
|
5819
|
-
function d(p,
|
|
5981
|
+
function d(p, m) {
|
|
5820
5982
|
const x = p.definition?.kwargs?.placeholder;
|
|
5821
5983
|
if (typeof x == "string" && x.trim())
|
|
5822
5984
|
return x.trim();
|
|
5823
|
-
const
|
|
5824
|
-
if (
|
|
5825
|
-
return
|
|
5985
|
+
const S = la(m), [C] = S.length > 0 ? S : Rr(p.definition);
|
|
5986
|
+
if (C != null && typeof C != "object")
|
|
5987
|
+
return Fr(C);
|
|
5826
5988
|
}
|
|
5827
5989
|
function w(p) {
|
|
5828
5990
|
if (typeof p == "string" && p.trim())
|
|
5829
5991
|
return p.trim();
|
|
5830
5992
|
if (!p || typeof p != "object" || Array.isArray(p))
|
|
5831
5993
|
return null;
|
|
5832
|
-
const
|
|
5833
|
-
return typeof
|
|
5994
|
+
const m = p;
|
|
5995
|
+
return typeof m.id == "string" && m.id.trim() ? m.id : null;
|
|
5834
5996
|
}
|
|
5835
5997
|
return {
|
|
5836
5998
|
varInputDisplayOverrides: t,
|
|
@@ -5842,14 +6004,14 @@ function Ia(e) {
|
|
|
5842
6004
|
getVarInitialDisplayOverride: c,
|
|
5843
6005
|
getVarDisplayValue: f,
|
|
5844
6006
|
clearVarInputDisplayOverride: h,
|
|
5845
|
-
setVarInputDisplayOverride:
|
|
6007
|
+
setVarInputDisplayOverride: g,
|
|
5846
6008
|
getVarInitialValue: y,
|
|
5847
|
-
normalizeVarValue:
|
|
6009
|
+
normalizeVarValue: _,
|
|
5848
6010
|
getVarPlaceholder: d,
|
|
5849
6011
|
getAimdId: w
|
|
5850
6012
|
};
|
|
5851
6013
|
}
|
|
5852
|
-
function
|
|
6014
|
+
function Ba(...e) {
|
|
5853
6015
|
return (t, i, r) => {
|
|
5854
6016
|
for (const s of e) {
|
|
5855
6017
|
const n = s(t, i, r);
|
|
@@ -5859,78 +6021,83 @@ function Na(...e) {
|
|
|
5859
6021
|
return null;
|
|
5860
6022
|
};
|
|
5861
6023
|
}
|
|
5862
|
-
function
|
|
5863
|
-
const t =
|
|
6024
|
+
function ja(e) {
|
|
6025
|
+
const t = Dr(null);
|
|
5864
6026
|
let i = !1;
|
|
5865
|
-
const r =
|
|
6027
|
+
const r = $r(() => t.value, {
|
|
5866
6028
|
theme: "github-light",
|
|
5867
6029
|
lineNumbers: !0,
|
|
5868
6030
|
wrap: !0
|
|
5869
6031
|
});
|
|
5870
|
-
return
|
|
5871
|
-
|
|
6032
|
+
return Br(() => {
|
|
6033
|
+
Ur().then((s) => {
|
|
5872
6034
|
i || (t.value = s, e?.());
|
|
5873
6035
|
}).catch(() => {
|
|
5874
6036
|
});
|
|
5875
|
-
}),
|
|
6037
|
+
}), jr(() => {
|
|
5876
6038
|
i = !0;
|
|
5877
6039
|
}), {
|
|
5878
6040
|
preRenderer: r
|
|
5879
6041
|
};
|
|
5880
6042
|
}
|
|
5881
6043
|
export {
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
6044
|
+
rs as $,
|
|
6045
|
+
ts as A,
|
|
6046
|
+
Aa as B,
|
|
6047
|
+
as as C,
|
|
6048
|
+
Bt as D,
|
|
6049
|
+
ws as E,
|
|
6050
|
+
vs as F,
|
|
6051
|
+
Is as G,
|
|
6052
|
+
Ze as H,
|
|
6053
|
+
Ca as I,
|
|
6054
|
+
hs as J,
|
|
6055
|
+
jt as K,
|
|
6056
|
+
te as L,
|
|
6057
|
+
va as M,
|
|
6058
|
+
ka as N,
|
|
6059
|
+
Ra as O,
|
|
6060
|
+
Oa as P,
|
|
6061
|
+
Sa as Q,
|
|
6062
|
+
cs as R,
|
|
6063
|
+
Ci as S,
|
|
6064
|
+
xe as T,
|
|
6065
|
+
La as U,
|
|
6066
|
+
ja as V,
|
|
6067
|
+
Da as W,
|
|
6068
|
+
Ma as X,
|
|
6069
|
+
es as Y,
|
|
6070
|
+
da as Z,
|
|
6071
|
+
Dt as _,
|
|
6072
|
+
Ta as a,
|
|
6073
|
+
Hr as a0,
|
|
6074
|
+
xa as a1,
|
|
6075
|
+
ls as a2,
|
|
6076
|
+
Xe as a3,
|
|
6077
|
+
Na as a4,
|
|
6078
|
+
_a as b,
|
|
6079
|
+
Ea as c,
|
|
6080
|
+
oa as d,
|
|
6081
|
+
wa as e,
|
|
6082
|
+
Va as f,
|
|
6083
|
+
Ba as g,
|
|
6084
|
+
ga as h,
|
|
6085
|
+
Ia as i,
|
|
6086
|
+
ps as j,
|
|
6087
|
+
It as k,
|
|
6088
|
+
Ni as l,
|
|
6089
|
+
Es as m,
|
|
6090
|
+
ks as n,
|
|
6091
|
+
As as o,
|
|
6092
|
+
Pa as p,
|
|
6093
|
+
ss as q,
|
|
6094
|
+
ma as r,
|
|
6095
|
+
$t as s,
|
|
6096
|
+
lt as t,
|
|
6097
|
+
ya as u,
|
|
6098
|
+
ba as v,
|
|
6099
|
+
ds as w,
|
|
6100
|
+
ni as x,
|
|
6101
|
+
Fa as y,
|
|
6102
|
+
ua as z
|
|
5936
6103
|
};
|