@ea-lab/reactive-json 0.7.1 → 1.0.0-alpha.1
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 +1 -3
- package/dist/View-D8TN1L2h.js +126 -0
- package/dist/assets/VariablesDebug.css +1 -4
- package/dist/assets/reset.css +4 -0
- package/dist/assets/usePagination.css +1 -0
- package/dist/component/action/HashChangeListener.js +29 -7
- package/dist/component/action/MessageListener.js +26 -8
- package/dist/component/action/ReactOnEvent.js +64 -8
- package/dist/component/action/Redirect.js +9 -5
- package/dist/component/action/SetAttributeValue.js +37 -5
- package/dist/component/action/ToggleAttributeValue.js +56 -5
- package/dist/component/action/UnsetAttribute.js +20 -5
- package/dist/component/action/UnsetAttributeValue.js +58 -5
- package/dist/component/action/index.js +19 -15
- package/dist/component/dataMapping/index.js +6 -3
- package/dist/component/dataMapping/simpleMapping.js +93 -2
- package/dist/component/element/debug/VariablesDebug/VariablesDebug.js +110 -12
- package/dist/component/element/debug/index.js +2 -2
- package/dist/component/element/html/FolderSortableTree.js +133 -7
- package/dist/component/element/html/FormatNumeral.js +58 -6
- package/dist/component/element/html/Html.js +5 -3
- package/dist/component/element/html/LabelFromValue.js +27 -6
- package/dist/component/element/html/PreformattedMarkup.js +51 -6
- package/dist/component/element/html/SortableTreeItemCollapseButton.js +10 -5
- package/dist/component/element/html/index.js +11 -10
- package/dist/component/element/index.js +34 -29
- package/dist/component/element/special/Count.js +23 -12
- package/dist/component/element/special/DataFilter.js +76 -6
- package/dist/component/element/special/DelayedActions.js +47 -7
- package/dist/component/element/special/Phantom.js +13 -3
- package/dist/component/element/special/ReactiveJsonBasicComponentWrapper.js +32 -0
- package/dist/component/element/special/ReactiveJsonSubroot.js +8 -5
- package/dist/component/element/special/Switch.js +80 -8
- package/dist/component/element/special/index.js +16 -10
- package/dist/component/hook/index.js +1 -1
- package/dist/component/hook/usePagination.js +172 -4
- package/dist/component/index.js +84 -62
- package/dist/component/reaction/addData.js +23 -3
- package/dist/component/reaction/fetchData.js +12 -2
- package/dist/component/reaction/index.js +34 -12
- package/dist/component/reaction/moveData.js +34 -2
- package/dist/component/reaction/postMessage.js +23 -2
- package/dist/component/reaction/redirectNow.js +6 -2
- package/dist/component/reaction/removeData.js +27 -2
- package/dist/component/reaction/setClipboardData.js +16 -2
- package/dist/component/reaction/setData.js +22 -3
- package/dist/component/reaction/submitData.js +25 -2
- package/dist/component/reaction/utility/httpRequestCommon.js +5 -4
- package/dist/component/reaction/utility/index.js +1 -1
- package/dist/coreComponentsPlugin.js +5 -2
- package/dist/dnd-kit-sortable-tree.esm-Cz1RJyIg.js +4135 -0
- package/dist/engine/Actions.js +161 -10
- package/dist/engine/ParsingDebugDisplay/ParsingDebugDisplay.js +692 -3
- package/dist/engine/ReactiveJsonRoot.js +10 -5
- package/dist/engine/TemplateSystem.js +117 -11
- package/dist/engine/View.js +3 -6
- package/dist/engine/index.js +45 -40
- package/dist/engine/utility/alterData.js +27 -2
- package/dist/engine/utility/analyzeDataOverrideReferences.js +41 -2
- package/dist/engine/utility/formElementsCommon.js +34 -0
- package/dist/engine/utility/formatString.js +19 -3
- package/dist/engine/utility/index.js +15 -12
- package/dist/engine/utility/parseRjBuild.js +23 -1002
- package/dist/engine/utility/reactJsxHelpers.js +15 -0
- package/dist/httpRequestCommon-DUo2Oxgl.js +1799 -0
- package/dist/index-B3RKTGQ2.js +18 -0
- package/dist/index-BA09SSaJ.js +26 -0
- package/dist/index-BYLJtf9L.js +462 -0
- package/dist/index-CACLSxWi.js +8 -0
- package/dist/index-NNBvIV0S.js +1873 -0
- package/dist/js-yaml-Bw0KO4XO.js +983 -0
- package/dist/jsonpath-B9kE9k9e.js +3168 -0
- package/dist/{alterData-CjaFWyAA.js → lodash-CYNxjS-I.js} +1348 -1368
- package/dist/main.js +127 -101
- package/package.json +4 -4
- package/dist/ParsingDebugDisplay-8f4yL4Jw.js +0 -696
- package/dist/VariablesDebug-1UzZWgD7.js +0 -17782
- package/dist/component/action/Popover.js +0 -6
- package/dist/component/action/Tooltip.js +0 -5
- package/dist/component/element/form/CheckBoxField.js +0 -8
- package/dist/component/element/form/DateField.js +0 -8
- package/dist/component/element/form/NumberField.js +0 -8
- package/dist/component/element/form/SelectField.js +0 -8
- package/dist/component/element/form/TextAreaField.js +0 -8
- package/dist/component/element/form/TextField.js +0 -8
- package/dist/component/element/form/formElementsCommon.js +0 -4
- package/dist/component/element/form/index.js +0 -10
- package/dist/component/element/html/AccordionItem.js +0 -6
- package/dist/component/element/html/Modal.js +0 -8
- package/dist/component/element/html/Tabs.js +0 -8
- package/dist/component/element/special/BootstrapElement.js +0 -5
- package/dist/engine/PaginationProvider.js +0 -30
- package/dist/usePagination-Bb6lefHG.js +0 -353
|
@@ -0,0 +1,3168 @@
|
|
|
1
|
+
import { c as Xe, g as Nt } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
2
|
+
function xe(Be) {
|
|
3
|
+
throw new Error('Could not dynamically require "' + Be + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
4
|
+
}
|
|
5
|
+
var Ne = { exports: {} };
|
|
6
|
+
/*! jsonpath 1.1.1 */
|
|
7
|
+
var Ve;
|
|
8
|
+
function Pt() {
|
|
9
|
+
return Ve || (Ve = 1, function(Be, Rt) {
|
|
10
|
+
(function(O) {
|
|
11
|
+
Be.exports = O();
|
|
12
|
+
})(function() {
|
|
13
|
+
return function O(M, B, S) {
|
|
14
|
+
function y(E, d) {
|
|
15
|
+
if (!B[E]) {
|
|
16
|
+
if (!M[E]) {
|
|
17
|
+
var a = typeof xe == "function" && xe;
|
|
18
|
+
if (!d && a) return a(E, !0);
|
|
19
|
+
if (D) return D(E, !0);
|
|
20
|
+
var o = new Error("Cannot find module '" + E + "'");
|
|
21
|
+
throw o.code = "MODULE_NOT_FOUND", o;
|
|
22
|
+
}
|
|
23
|
+
var m = B[E] = { exports: {} };
|
|
24
|
+
M[E][0].call(m.exports, function(s) {
|
|
25
|
+
var c = M[E][1][s];
|
|
26
|
+
return y(c || s);
|
|
27
|
+
}, m, m.exports, O, M, B, S);
|
|
28
|
+
}
|
|
29
|
+
return B[E].exports;
|
|
30
|
+
}
|
|
31
|
+
for (var D = typeof xe == "function" && xe, v = 0; v < S.length; v++) y(S[v]);
|
|
32
|
+
return y;
|
|
33
|
+
}({ "./aesprim": [function(O, M, B) {
|
|
34
|
+
(function(S, y) {
|
|
35
|
+
y(typeof B < "u" ? B : S.esprima = {});
|
|
36
|
+
})(this, function(S) {
|
|
37
|
+
var y, D, v, E, d, a, o, m, s, c, r, g, b, h, n, i, p, f;
|
|
38
|
+
y = {
|
|
39
|
+
BooleanLiteral: 1,
|
|
40
|
+
EOF: 2,
|
|
41
|
+
Identifier: 3,
|
|
42
|
+
Keyword: 4,
|
|
43
|
+
NullLiteral: 5,
|
|
44
|
+
NumericLiteral: 6,
|
|
45
|
+
Punctuator: 7,
|
|
46
|
+
StringLiteral: 8,
|
|
47
|
+
RegularExpression: 9
|
|
48
|
+
}, D = {}, D[y.BooleanLiteral] = "Boolean", D[y.EOF] = "<end>", D[y.Identifier] = "Identifier", D[y.Keyword] = "Keyword", D[y.NullLiteral] = "Null", D[y.NumericLiteral] = "Numeric", D[y.Punctuator] = "Punctuator", D[y.StringLiteral] = "String", D[y.RegularExpression] = "RegularExpression", v = [
|
|
49
|
+
"(",
|
|
50
|
+
"{",
|
|
51
|
+
"[",
|
|
52
|
+
"in",
|
|
53
|
+
"typeof",
|
|
54
|
+
"instanceof",
|
|
55
|
+
"new",
|
|
56
|
+
"return",
|
|
57
|
+
"case",
|
|
58
|
+
"delete",
|
|
59
|
+
"throw",
|
|
60
|
+
"void",
|
|
61
|
+
// assignment operators
|
|
62
|
+
"=",
|
|
63
|
+
"+=",
|
|
64
|
+
"-=",
|
|
65
|
+
"*=",
|
|
66
|
+
"/=",
|
|
67
|
+
"%=",
|
|
68
|
+
"<<=",
|
|
69
|
+
">>=",
|
|
70
|
+
">>>=",
|
|
71
|
+
"&=",
|
|
72
|
+
"|=",
|
|
73
|
+
"^=",
|
|
74
|
+
",",
|
|
75
|
+
// binary/unary operators
|
|
76
|
+
"+",
|
|
77
|
+
"-",
|
|
78
|
+
"*",
|
|
79
|
+
"/",
|
|
80
|
+
"%",
|
|
81
|
+
"++",
|
|
82
|
+
"--",
|
|
83
|
+
"<<",
|
|
84
|
+
">>",
|
|
85
|
+
">>>",
|
|
86
|
+
"&",
|
|
87
|
+
"|",
|
|
88
|
+
"^",
|
|
89
|
+
"!",
|
|
90
|
+
"~",
|
|
91
|
+
"&&",
|
|
92
|
+
"||",
|
|
93
|
+
"?",
|
|
94
|
+
":",
|
|
95
|
+
"===",
|
|
96
|
+
"==",
|
|
97
|
+
">=",
|
|
98
|
+
"<=",
|
|
99
|
+
"<",
|
|
100
|
+
">",
|
|
101
|
+
"!=",
|
|
102
|
+
"!=="
|
|
103
|
+
], E = {
|
|
104
|
+
AssignmentExpression: "AssignmentExpression",
|
|
105
|
+
ArrayExpression: "ArrayExpression",
|
|
106
|
+
BlockStatement: "BlockStatement",
|
|
107
|
+
BinaryExpression: "BinaryExpression",
|
|
108
|
+
BreakStatement: "BreakStatement",
|
|
109
|
+
CallExpression: "CallExpression",
|
|
110
|
+
CatchClause: "CatchClause",
|
|
111
|
+
ConditionalExpression: "ConditionalExpression",
|
|
112
|
+
ContinueStatement: "ContinueStatement",
|
|
113
|
+
DoWhileStatement: "DoWhileStatement",
|
|
114
|
+
DebuggerStatement: "DebuggerStatement",
|
|
115
|
+
EmptyStatement: "EmptyStatement",
|
|
116
|
+
ExpressionStatement: "ExpressionStatement",
|
|
117
|
+
ForStatement: "ForStatement",
|
|
118
|
+
ForInStatement: "ForInStatement",
|
|
119
|
+
FunctionDeclaration: "FunctionDeclaration",
|
|
120
|
+
FunctionExpression: "FunctionExpression",
|
|
121
|
+
Identifier: "Identifier",
|
|
122
|
+
IfStatement: "IfStatement",
|
|
123
|
+
Literal: "Literal",
|
|
124
|
+
LabeledStatement: "LabeledStatement",
|
|
125
|
+
LogicalExpression: "LogicalExpression",
|
|
126
|
+
MemberExpression: "MemberExpression",
|
|
127
|
+
NewExpression: "NewExpression",
|
|
128
|
+
ObjectExpression: "ObjectExpression",
|
|
129
|
+
Program: "Program",
|
|
130
|
+
Property: "Property",
|
|
131
|
+
ReturnStatement: "ReturnStatement",
|
|
132
|
+
SequenceExpression: "SequenceExpression",
|
|
133
|
+
SwitchStatement: "SwitchStatement",
|
|
134
|
+
SwitchCase: "SwitchCase",
|
|
135
|
+
ThisExpression: "ThisExpression",
|
|
136
|
+
ThrowStatement: "ThrowStatement",
|
|
137
|
+
TryStatement: "TryStatement",
|
|
138
|
+
UnaryExpression: "UnaryExpression",
|
|
139
|
+
UpdateExpression: "UpdateExpression",
|
|
140
|
+
VariableDeclaration: "VariableDeclaration",
|
|
141
|
+
VariableDeclarator: "VariableDeclarator",
|
|
142
|
+
WhileStatement: "WhileStatement",
|
|
143
|
+
WithStatement: "WithStatement"
|
|
144
|
+
}, d = {
|
|
145
|
+
Data: 1,
|
|
146
|
+
Get: 2,
|
|
147
|
+
Set: 4
|
|
148
|
+
}, a = {
|
|
149
|
+
UnexpectedToken: "Unexpected token %0",
|
|
150
|
+
UnexpectedNumber: "Unexpected number",
|
|
151
|
+
UnexpectedString: "Unexpected string",
|
|
152
|
+
UnexpectedIdentifier: "Unexpected identifier",
|
|
153
|
+
UnexpectedReserved: "Unexpected reserved word",
|
|
154
|
+
UnexpectedEOS: "Unexpected end of input",
|
|
155
|
+
NewlineAfterThrow: "Illegal newline after throw",
|
|
156
|
+
InvalidRegExp: "Invalid regular expression",
|
|
157
|
+
UnterminatedRegExp: "Invalid regular expression: missing /",
|
|
158
|
+
InvalidLHSInAssignment: "Invalid left-hand side in assignment",
|
|
159
|
+
InvalidLHSInForIn: "Invalid left-hand side in for-in",
|
|
160
|
+
MultipleDefaultsInSwitch: "More than one default clause in switch statement",
|
|
161
|
+
NoCatchOrFinally: "Missing catch or finally after try",
|
|
162
|
+
UnknownLabel: "Undefined label '%0'",
|
|
163
|
+
Redeclaration: "%0 '%1' has already been declared",
|
|
164
|
+
IllegalContinue: "Illegal continue statement",
|
|
165
|
+
IllegalBreak: "Illegal break statement",
|
|
166
|
+
IllegalReturn: "Illegal return statement",
|
|
167
|
+
StrictModeWith: "Strict mode code may not include a with statement",
|
|
168
|
+
StrictCatchVariable: "Catch variable may not be eval or arguments in strict mode",
|
|
169
|
+
StrictVarName: "Variable name may not be eval or arguments in strict mode",
|
|
170
|
+
StrictParamName: "Parameter name eval or arguments is not allowed in strict mode",
|
|
171
|
+
StrictParamDupe: "Strict mode function may not have duplicate parameter names",
|
|
172
|
+
StrictFunctionName: "Function name may not be eval or arguments in strict mode",
|
|
173
|
+
StrictOctalLiteral: "Octal literals are not allowed in strict mode.",
|
|
174
|
+
StrictDelete: "Delete of an unqualified identifier in strict mode.",
|
|
175
|
+
StrictDuplicateProperty: "Duplicate data property in object literal not allowed in strict mode",
|
|
176
|
+
AccessorDataProperty: "Object literal may not have data and accessor property with the same name",
|
|
177
|
+
AccessorGetSet: "Object literal may not have multiple get/set accessors with the same name",
|
|
178
|
+
StrictLHSAssignment: "Assignment to eval or arguments is not allowed in strict mode",
|
|
179
|
+
StrictLHSPostfix: "Postfix increment/decrement may not have eval or arguments operand in strict mode",
|
|
180
|
+
StrictLHSPrefix: "Prefix increment/decrement may not have eval or arguments operand in strict mode",
|
|
181
|
+
StrictReservedWord: "Use of future reserved word in strict mode"
|
|
182
|
+
}, o = {
|
|
183
|
+
NonAsciiIdentifierStart: new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),
|
|
184
|
+
NonAsciiIdentifierPart: new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")
|
|
185
|
+
};
|
|
186
|
+
function I(e, t) {
|
|
187
|
+
if (!e)
|
|
188
|
+
throw new Error("ASSERT: " + t);
|
|
189
|
+
}
|
|
190
|
+
function L(e) {
|
|
191
|
+
return e >= 48 && e <= 57;
|
|
192
|
+
}
|
|
193
|
+
function U(e) {
|
|
194
|
+
return "0123456789abcdefABCDEF".indexOf(e) >= 0;
|
|
195
|
+
}
|
|
196
|
+
function w(e) {
|
|
197
|
+
return "01234567".indexOf(e) >= 0;
|
|
198
|
+
}
|
|
199
|
+
function q(e) {
|
|
200
|
+
return e === 32 || e === 9 || e === 11 || e === 12 || e === 160 || e >= 5760 && [5760, 6158, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279].indexOf(e) >= 0;
|
|
201
|
+
}
|
|
202
|
+
function j(e) {
|
|
203
|
+
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
204
|
+
}
|
|
205
|
+
function z(e) {
|
|
206
|
+
return e == 64 || e === 36 || e === 95 || // $ (dollar) and _ (underscore)
|
|
207
|
+
e >= 65 && e <= 90 || // A..Z
|
|
208
|
+
e >= 97 && e <= 122 || // a..z
|
|
209
|
+
e === 92 || // \ (backslash)
|
|
210
|
+
e >= 128 && o.NonAsciiIdentifierStart.test(String.fromCharCode(e));
|
|
211
|
+
}
|
|
212
|
+
function V(e) {
|
|
213
|
+
return e === 36 || e === 95 || // $ (dollar) and _ (underscore)
|
|
214
|
+
e >= 65 && e <= 90 || // A..Z
|
|
215
|
+
e >= 97 && e <= 122 || // a..z
|
|
216
|
+
e >= 48 && e <= 57 || // 0..9
|
|
217
|
+
e === 92 || // \ (backslash)
|
|
218
|
+
e >= 128 && o.NonAsciiIdentifierPart.test(String.fromCharCode(e));
|
|
219
|
+
}
|
|
220
|
+
function ae(e) {
|
|
221
|
+
switch (e) {
|
|
222
|
+
case "class":
|
|
223
|
+
case "enum":
|
|
224
|
+
case "export":
|
|
225
|
+
case "extends":
|
|
226
|
+
case "import":
|
|
227
|
+
case "super":
|
|
228
|
+
return !0;
|
|
229
|
+
default:
|
|
230
|
+
return !1;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
function Y(e) {
|
|
234
|
+
switch (e) {
|
|
235
|
+
case "implements":
|
|
236
|
+
case "interface":
|
|
237
|
+
case "package":
|
|
238
|
+
case "private":
|
|
239
|
+
case "protected":
|
|
240
|
+
case "public":
|
|
241
|
+
case "static":
|
|
242
|
+
case "yield":
|
|
243
|
+
case "let":
|
|
244
|
+
return !0;
|
|
245
|
+
default:
|
|
246
|
+
return !1;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
function J(e) {
|
|
250
|
+
return e === "eval" || e === "arguments";
|
|
251
|
+
}
|
|
252
|
+
function se(e) {
|
|
253
|
+
if (c && Y(e))
|
|
254
|
+
return !0;
|
|
255
|
+
switch (e.length) {
|
|
256
|
+
case 2:
|
|
257
|
+
return e === "if" || e === "in" || e === "do";
|
|
258
|
+
case 3:
|
|
259
|
+
return e === "var" || e === "for" || e === "new" || e === "try" || e === "let";
|
|
260
|
+
case 4:
|
|
261
|
+
return e === "this" || e === "else" || e === "case" || e === "void" || e === "with" || e === "enum";
|
|
262
|
+
case 5:
|
|
263
|
+
return e === "while" || e === "break" || e === "catch" || e === "throw" || e === "const" || e === "yield" || e === "class" || e === "super";
|
|
264
|
+
case 6:
|
|
265
|
+
return e === "return" || e === "typeof" || e === "delete" || e === "switch" || e === "export" || e === "import";
|
|
266
|
+
case 7:
|
|
267
|
+
return e === "default" || e === "finally" || e === "extends";
|
|
268
|
+
case 8:
|
|
269
|
+
return e === "function" || e === "continue" || e === "debugger";
|
|
270
|
+
case 10:
|
|
271
|
+
return e === "instanceof";
|
|
272
|
+
default:
|
|
273
|
+
return !1;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
function ie(e, t, u, l, C) {
|
|
277
|
+
var x;
|
|
278
|
+
I(typeof u == "number", "Comment must have valid position"), !(p.lastCommentStart >= u) && (p.lastCommentStart = u, x = {
|
|
279
|
+
type: e,
|
|
280
|
+
value: t
|
|
281
|
+
}, f.range && (x.range = [u, l]), f.loc && (x.loc = C), f.comments.push(x), f.attachComment && (f.leadingComments.push(x), f.trailingComments.push(x)));
|
|
282
|
+
}
|
|
283
|
+
function oe(e) {
|
|
284
|
+
var t, u, l, C;
|
|
285
|
+
for (t = r - e, u = {
|
|
286
|
+
start: {
|
|
287
|
+
line: g,
|
|
288
|
+
column: r - b - e
|
|
289
|
+
}
|
|
290
|
+
}; r < h; )
|
|
291
|
+
if (l = s.charCodeAt(r), ++r, j(l)) {
|
|
292
|
+
f.comments && (C = s.slice(t + e, r - 1), u.end = {
|
|
293
|
+
line: g,
|
|
294
|
+
column: r - b - 1
|
|
295
|
+
}, ie("Line", C, t, r - 1, u)), l === 13 && s.charCodeAt(r) === 10 && ++r, ++g, b = r;
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
f.comments && (C = s.slice(t + e, r), u.end = {
|
|
299
|
+
line: g,
|
|
300
|
+
column: r - b
|
|
301
|
+
}, ie("Line", C, t, r, u));
|
|
302
|
+
}
|
|
303
|
+
function ve() {
|
|
304
|
+
var e, t, u, l;
|
|
305
|
+
for (f.comments && (e = r - 2, t = {
|
|
306
|
+
start: {
|
|
307
|
+
line: g,
|
|
308
|
+
column: r - b - 2
|
|
309
|
+
}
|
|
310
|
+
}); r < h; )
|
|
311
|
+
if (u = s.charCodeAt(r), j(u))
|
|
312
|
+
u === 13 && s.charCodeAt(r + 1) === 10 && ++r, ++g, ++r, b = r, r >= h && P({}, a.UnexpectedToken, "ILLEGAL");
|
|
313
|
+
else if (u === 42) {
|
|
314
|
+
if (s.charCodeAt(r + 1) === 47) {
|
|
315
|
+
++r, ++r, f.comments && (l = s.slice(e + 2, r - 2), t.end = {
|
|
316
|
+
line: g,
|
|
317
|
+
column: r - b
|
|
318
|
+
}, ie("Block", l, e, r, t));
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
++r;
|
|
322
|
+
} else
|
|
323
|
+
++r;
|
|
324
|
+
P({}, a.UnexpectedToken, "ILLEGAL");
|
|
325
|
+
}
|
|
326
|
+
function A() {
|
|
327
|
+
var e, t;
|
|
328
|
+
for (t = r === 0; r < h; )
|
|
329
|
+
if (e = s.charCodeAt(r), q(e))
|
|
330
|
+
++r;
|
|
331
|
+
else if (j(e))
|
|
332
|
+
++r, e === 13 && s.charCodeAt(r) === 10 && ++r, ++g, b = r, t = !0;
|
|
333
|
+
else if (e === 47)
|
|
334
|
+
if (e = s.charCodeAt(r + 1), e === 47)
|
|
335
|
+
++r, ++r, oe(2), t = !0;
|
|
336
|
+
else if (e === 42)
|
|
337
|
+
++r, ++r, ve();
|
|
338
|
+
else
|
|
339
|
+
break;
|
|
340
|
+
else if (t && e === 45)
|
|
341
|
+
if (s.charCodeAt(r + 1) === 45 && s.charCodeAt(r + 2) === 62)
|
|
342
|
+
r += 3, oe(3);
|
|
343
|
+
else
|
|
344
|
+
break;
|
|
345
|
+
else if (e === 60)
|
|
346
|
+
if (s.slice(r + 1, r + 4) === "!--")
|
|
347
|
+
++r, ++r, ++r, ++r, oe(4);
|
|
348
|
+
else
|
|
349
|
+
break;
|
|
350
|
+
else
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
function F(e) {
|
|
354
|
+
var t, u, l, C = 0;
|
|
355
|
+
for (u = e === "u" ? 4 : 2, t = 0; t < u; ++t)
|
|
356
|
+
if (r < h && U(s[r]))
|
|
357
|
+
l = s[r++], C = C * 16 + "0123456789abcdef".indexOf(l.toLowerCase());
|
|
358
|
+
else
|
|
359
|
+
return "";
|
|
360
|
+
return String.fromCharCode(C);
|
|
361
|
+
}
|
|
362
|
+
function k() {
|
|
363
|
+
var e, t;
|
|
364
|
+
for (e = s.charCodeAt(r++), t = String.fromCharCode(e), e === 92 && (s.charCodeAt(r) !== 117 && P({}, a.UnexpectedToken, "ILLEGAL"), ++r, e = F("u"), (!e || e === "\\" || !z(e.charCodeAt(0))) && P({}, a.UnexpectedToken, "ILLEGAL"), t = e); r < h && (e = s.charCodeAt(r), !!V(e)); )
|
|
365
|
+
++r, t += String.fromCharCode(e), e === 92 && (t = t.substr(0, t.length - 1), s.charCodeAt(r) !== 117 && P({}, a.UnexpectedToken, "ILLEGAL"), ++r, e = F("u"), (!e || e === "\\" || !V(e.charCodeAt(0))) && P({}, a.UnexpectedToken, "ILLEGAL"), t += e);
|
|
366
|
+
return t;
|
|
367
|
+
}
|
|
368
|
+
function X() {
|
|
369
|
+
var e, t;
|
|
370
|
+
for (e = r++; r < h; ) {
|
|
371
|
+
if (t = s.charCodeAt(r), t === 92)
|
|
372
|
+
return r = e, k();
|
|
373
|
+
if (V(t))
|
|
374
|
+
++r;
|
|
375
|
+
else
|
|
376
|
+
break;
|
|
377
|
+
}
|
|
378
|
+
return s.slice(e, r);
|
|
379
|
+
}
|
|
380
|
+
function ee() {
|
|
381
|
+
var e, t, u;
|
|
382
|
+
return e = r, t = s.charCodeAt(r) === 92 ? k() : X(), t.length === 1 ? u = y.Identifier : se(t) ? u = y.Keyword : t === "null" ? u = y.NullLiteral : t === "true" || t === "false" ? u = y.BooleanLiteral : u = y.Identifier, {
|
|
383
|
+
type: u,
|
|
384
|
+
value: t,
|
|
385
|
+
lineNumber: g,
|
|
386
|
+
lineStart: b,
|
|
387
|
+
start: e,
|
|
388
|
+
end: r
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
function $() {
|
|
392
|
+
var e = r, t = s.charCodeAt(r), u, l = s[r], C, x, R;
|
|
393
|
+
switch (t) {
|
|
394
|
+
// Check for most common single-character punctuators.
|
|
395
|
+
case 46:
|
|
396
|
+
// . dot
|
|
397
|
+
case 40:
|
|
398
|
+
// ( open bracket
|
|
399
|
+
case 41:
|
|
400
|
+
// ) close bracket
|
|
401
|
+
case 59:
|
|
402
|
+
// ; semicolon
|
|
403
|
+
case 44:
|
|
404
|
+
// , comma
|
|
405
|
+
case 123:
|
|
406
|
+
// { open curly brace
|
|
407
|
+
case 125:
|
|
408
|
+
// } close curly brace
|
|
409
|
+
case 91:
|
|
410
|
+
// [
|
|
411
|
+
case 93:
|
|
412
|
+
// ]
|
|
413
|
+
case 58:
|
|
414
|
+
// :
|
|
415
|
+
case 63:
|
|
416
|
+
// ?
|
|
417
|
+
case 126:
|
|
418
|
+
return ++r, f.tokenize && (t === 40 ? f.openParenToken = f.tokens.length : t === 123 && (f.openCurlyToken = f.tokens.length)), {
|
|
419
|
+
type: y.Punctuator,
|
|
420
|
+
value: String.fromCharCode(t),
|
|
421
|
+
lineNumber: g,
|
|
422
|
+
lineStart: b,
|
|
423
|
+
start: e,
|
|
424
|
+
end: r
|
|
425
|
+
};
|
|
426
|
+
default:
|
|
427
|
+
if (u = s.charCodeAt(r + 1), u === 61)
|
|
428
|
+
switch (t) {
|
|
429
|
+
case 43:
|
|
430
|
+
// +
|
|
431
|
+
case 45:
|
|
432
|
+
// -
|
|
433
|
+
case 47:
|
|
434
|
+
// /
|
|
435
|
+
case 60:
|
|
436
|
+
// <
|
|
437
|
+
case 62:
|
|
438
|
+
// >
|
|
439
|
+
case 94:
|
|
440
|
+
// ^
|
|
441
|
+
case 124:
|
|
442
|
+
// |
|
|
443
|
+
case 37:
|
|
444
|
+
// %
|
|
445
|
+
case 38:
|
|
446
|
+
// &
|
|
447
|
+
case 42:
|
|
448
|
+
return r += 2, {
|
|
449
|
+
type: y.Punctuator,
|
|
450
|
+
value: String.fromCharCode(t) + String.fromCharCode(u),
|
|
451
|
+
lineNumber: g,
|
|
452
|
+
lineStart: b,
|
|
453
|
+
start: e,
|
|
454
|
+
end: r
|
|
455
|
+
};
|
|
456
|
+
case 33:
|
|
457
|
+
// !
|
|
458
|
+
case 61:
|
|
459
|
+
return r += 2, s.charCodeAt(r) === 61 && ++r, {
|
|
460
|
+
type: y.Punctuator,
|
|
461
|
+
value: s.slice(e, r),
|
|
462
|
+
lineNumber: g,
|
|
463
|
+
lineStart: b,
|
|
464
|
+
start: e,
|
|
465
|
+
end: r
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
if (R = s.substr(r, 4), R === ">>>=")
|
|
470
|
+
return r += 4, {
|
|
471
|
+
type: y.Punctuator,
|
|
472
|
+
value: R,
|
|
473
|
+
lineNumber: g,
|
|
474
|
+
lineStart: b,
|
|
475
|
+
start: e,
|
|
476
|
+
end: r
|
|
477
|
+
};
|
|
478
|
+
if (x = R.substr(0, 3), x === ">>>" || x === "<<=" || x === ">>=")
|
|
479
|
+
return r += 3, {
|
|
480
|
+
type: y.Punctuator,
|
|
481
|
+
value: x,
|
|
482
|
+
lineNumber: g,
|
|
483
|
+
lineStart: b,
|
|
484
|
+
start: e,
|
|
485
|
+
end: r
|
|
486
|
+
};
|
|
487
|
+
if (C = x.substr(0, 2), l === C[1] && "+-<>&|".indexOf(l) >= 0 || C === "=>")
|
|
488
|
+
return r += 2, {
|
|
489
|
+
type: y.Punctuator,
|
|
490
|
+
value: C,
|
|
491
|
+
lineNumber: g,
|
|
492
|
+
lineStart: b,
|
|
493
|
+
start: e,
|
|
494
|
+
end: r
|
|
495
|
+
};
|
|
496
|
+
if ("<>=!+-*%&|^/".indexOf(l) >= 0)
|
|
497
|
+
return ++r, {
|
|
498
|
+
type: y.Punctuator,
|
|
499
|
+
value: l,
|
|
500
|
+
lineNumber: g,
|
|
501
|
+
lineStart: b,
|
|
502
|
+
start: e,
|
|
503
|
+
end: r
|
|
504
|
+
};
|
|
505
|
+
P({}, a.UnexpectedToken, "ILLEGAL");
|
|
506
|
+
}
|
|
507
|
+
function H(e) {
|
|
508
|
+
for (var t = ""; r < h && U(s[r]); )
|
|
509
|
+
t += s[r++];
|
|
510
|
+
return t.length === 0 && P({}, a.UnexpectedToken, "ILLEGAL"), z(s.charCodeAt(r)) && P({}, a.UnexpectedToken, "ILLEGAL"), {
|
|
511
|
+
type: y.NumericLiteral,
|
|
512
|
+
value: parseInt("0x" + t, 16),
|
|
513
|
+
lineNumber: g,
|
|
514
|
+
lineStart: b,
|
|
515
|
+
start: e,
|
|
516
|
+
end: r
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
function K(e) {
|
|
520
|
+
for (var t = "0" + s[r++]; r < h && w(s[r]); )
|
|
521
|
+
t += s[r++];
|
|
522
|
+
return (z(s.charCodeAt(r)) || L(s.charCodeAt(r))) && P({}, a.UnexpectedToken, "ILLEGAL"), {
|
|
523
|
+
type: y.NumericLiteral,
|
|
524
|
+
value: parseInt(t, 8),
|
|
525
|
+
octal: !0,
|
|
526
|
+
lineNumber: g,
|
|
527
|
+
lineStart: b,
|
|
528
|
+
start: e,
|
|
529
|
+
end: r
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
function Q() {
|
|
533
|
+
var e, t, u;
|
|
534
|
+
if (u = s[r], I(
|
|
535
|
+
L(u.charCodeAt(0)) || u === ".",
|
|
536
|
+
"Numeric literal must start with a decimal digit or a decimal point"
|
|
537
|
+
), t = r, e = "", u !== ".") {
|
|
538
|
+
if (e = s[r++], u = s[r], e === "0") {
|
|
539
|
+
if (u === "x" || u === "X")
|
|
540
|
+
return ++r, H(t);
|
|
541
|
+
if (w(u))
|
|
542
|
+
return K(t);
|
|
543
|
+
u && L(u.charCodeAt(0)) && P({}, a.UnexpectedToken, "ILLEGAL");
|
|
544
|
+
}
|
|
545
|
+
for (; L(s.charCodeAt(r)); )
|
|
546
|
+
e += s[r++];
|
|
547
|
+
u = s[r];
|
|
548
|
+
}
|
|
549
|
+
if (u === ".") {
|
|
550
|
+
for (e += s[r++]; L(s.charCodeAt(r)); )
|
|
551
|
+
e += s[r++];
|
|
552
|
+
u = s[r];
|
|
553
|
+
}
|
|
554
|
+
if (u === "e" || u === "E")
|
|
555
|
+
if (e += s[r++], u = s[r], (u === "+" || u === "-") && (e += s[r++]), L(s.charCodeAt(r)))
|
|
556
|
+
for (; L(s.charCodeAt(r)); )
|
|
557
|
+
e += s[r++];
|
|
558
|
+
else
|
|
559
|
+
P({}, a.UnexpectedToken, "ILLEGAL");
|
|
560
|
+
return z(s.charCodeAt(r)) && P({}, a.UnexpectedToken, "ILLEGAL"), {
|
|
561
|
+
type: y.NumericLiteral,
|
|
562
|
+
value: parseFloat(e),
|
|
563
|
+
lineNumber: g,
|
|
564
|
+
lineStart: b,
|
|
565
|
+
start: t,
|
|
566
|
+
end: r
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
function ce() {
|
|
570
|
+
var e = "", t, u, l, C, x, R, W = !1, ue, re;
|
|
571
|
+
for (ue = g, re = b, t = s[r], I(
|
|
572
|
+
t === "'" || t === '"',
|
|
573
|
+
"String literal must starts with a quote"
|
|
574
|
+
), u = r, ++r; r < h; )
|
|
575
|
+
if (l = s[r++], l === t) {
|
|
576
|
+
t = "";
|
|
577
|
+
break;
|
|
578
|
+
} else if (l === "\\")
|
|
579
|
+
if (l = s[r++], !l || !j(l.charCodeAt(0)))
|
|
580
|
+
switch (l) {
|
|
581
|
+
case "u":
|
|
582
|
+
case "x":
|
|
583
|
+
R = r, x = F(l), x ? e += x : (r = R, e += l);
|
|
584
|
+
break;
|
|
585
|
+
case "n":
|
|
586
|
+
e += `
|
|
587
|
+
`;
|
|
588
|
+
break;
|
|
589
|
+
case "r":
|
|
590
|
+
e += "\r";
|
|
591
|
+
break;
|
|
592
|
+
case "t":
|
|
593
|
+
e += " ";
|
|
594
|
+
break;
|
|
595
|
+
case "b":
|
|
596
|
+
e += "\b";
|
|
597
|
+
break;
|
|
598
|
+
case "f":
|
|
599
|
+
e += "\f";
|
|
600
|
+
break;
|
|
601
|
+
case "v":
|
|
602
|
+
e += "\v";
|
|
603
|
+
break;
|
|
604
|
+
default:
|
|
605
|
+
w(l) ? (C = "01234567".indexOf(l), C !== 0 && (W = !0), r < h && w(s[r]) && (W = !0, C = C * 8 + "01234567".indexOf(s[r++]), "0123".indexOf(l) >= 0 && r < h && w(s[r]) && (C = C * 8 + "01234567".indexOf(s[r++]))), e += String.fromCharCode(C)) : e += l;
|
|
606
|
+
break;
|
|
607
|
+
}
|
|
608
|
+
else
|
|
609
|
+
++g, l === "\r" && s[r] === `
|
|
610
|
+
` && ++r, b = r;
|
|
611
|
+
else {
|
|
612
|
+
if (j(l.charCodeAt(0)))
|
|
613
|
+
break;
|
|
614
|
+
e += l;
|
|
615
|
+
}
|
|
616
|
+
return t !== "" && P({}, a.UnexpectedToken, "ILLEGAL"), {
|
|
617
|
+
type: y.StringLiteral,
|
|
618
|
+
value: e,
|
|
619
|
+
octal: W,
|
|
620
|
+
startLineNumber: ue,
|
|
621
|
+
startLineStart: re,
|
|
622
|
+
lineNumber: g,
|
|
623
|
+
lineStart: b,
|
|
624
|
+
start: u,
|
|
625
|
+
end: r
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
function de(e, t) {
|
|
629
|
+
var u;
|
|
630
|
+
try {
|
|
631
|
+
u = new RegExp(e, t);
|
|
632
|
+
} catch {
|
|
633
|
+
P({}, a.InvalidRegExp);
|
|
634
|
+
}
|
|
635
|
+
return u;
|
|
636
|
+
}
|
|
637
|
+
function ke() {
|
|
638
|
+
var e, t, u, l, C;
|
|
639
|
+
for (e = s[r], I(e === "/", "Regular expression literal must start with a slash"), t = s[r++], u = !1, l = !1; r < h; )
|
|
640
|
+
if (e = s[r++], t += e, e === "\\")
|
|
641
|
+
e = s[r++], j(e.charCodeAt(0)) && P({}, a.UnterminatedRegExp), t += e;
|
|
642
|
+
else if (j(e.charCodeAt(0)))
|
|
643
|
+
P({}, a.UnterminatedRegExp);
|
|
644
|
+
else if (u)
|
|
645
|
+
e === "]" && (u = !1);
|
|
646
|
+
else if (e === "/") {
|
|
647
|
+
l = !0;
|
|
648
|
+
break;
|
|
649
|
+
} else e === "[" && (u = !0);
|
|
650
|
+
return l || P({}, a.UnterminatedRegExp), C = t.substr(1, t.length - 2), {
|
|
651
|
+
value: C,
|
|
652
|
+
literal: t
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
function Ae() {
|
|
656
|
+
var e, t, u, l;
|
|
657
|
+
for (t = "", u = ""; r < h && (e = s[r], !!V(e.charCodeAt(0))); )
|
|
658
|
+
if (++r, e === "\\" && r < h)
|
|
659
|
+
if (e = s[r], e === "u") {
|
|
660
|
+
if (++r, l = r, e = F("u"), e)
|
|
661
|
+
for (u += e, t += "\\u"; l < r; ++l)
|
|
662
|
+
t += s[l];
|
|
663
|
+
else
|
|
664
|
+
r = l, u += "u", t += "\\u";
|
|
665
|
+
G({}, a.UnexpectedToken, "ILLEGAL");
|
|
666
|
+
} else
|
|
667
|
+
t += "\\", G({}, a.UnexpectedToken, "ILLEGAL");
|
|
668
|
+
else
|
|
669
|
+
u += e, t += e;
|
|
670
|
+
return {
|
|
671
|
+
value: u,
|
|
672
|
+
literal: t
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
function Se() {
|
|
676
|
+
var e, t, u, l;
|
|
677
|
+
return i = null, A(), e = r, t = ke(), u = Ae(), l = de(t.value, u.value), f.tokenize ? {
|
|
678
|
+
type: y.RegularExpression,
|
|
679
|
+
value: l,
|
|
680
|
+
lineNumber: g,
|
|
681
|
+
lineStart: b,
|
|
682
|
+
start: e,
|
|
683
|
+
end: r
|
|
684
|
+
} : {
|
|
685
|
+
literal: t.literal + u.literal,
|
|
686
|
+
value: l,
|
|
687
|
+
start: e,
|
|
688
|
+
end: r
|
|
689
|
+
};
|
|
690
|
+
}
|
|
691
|
+
function ye() {
|
|
692
|
+
var e, t, u, l;
|
|
693
|
+
return A(), e = r, t = {
|
|
694
|
+
start: {
|
|
695
|
+
line: g,
|
|
696
|
+
column: r - b
|
|
697
|
+
}
|
|
698
|
+
}, u = Se(), t.end = {
|
|
699
|
+
line: g,
|
|
700
|
+
column: r - b
|
|
701
|
+
}, f.tokenize || (f.tokens.length > 0 && (l = f.tokens[f.tokens.length - 1], l.range[0] === e && l.type === "Punctuator" && (l.value === "/" || l.value === "/=") && f.tokens.pop()), f.tokens.push({
|
|
702
|
+
type: "RegularExpression",
|
|
703
|
+
value: u.literal,
|
|
704
|
+
range: [e, r],
|
|
705
|
+
loc: t
|
|
706
|
+
})), u;
|
|
707
|
+
}
|
|
708
|
+
function Ke(e) {
|
|
709
|
+
return e.type === y.Identifier || e.type === y.Keyword || e.type === y.BooleanLiteral || e.type === y.NullLiteral;
|
|
710
|
+
}
|
|
711
|
+
function Je() {
|
|
712
|
+
var e, t;
|
|
713
|
+
if (e = f.tokens[f.tokens.length - 1], !e)
|
|
714
|
+
return ye();
|
|
715
|
+
if (e.type === "Punctuator") {
|
|
716
|
+
if (e.value === "]")
|
|
717
|
+
return $();
|
|
718
|
+
if (e.value === ")")
|
|
719
|
+
return t = f.tokens[f.openParenToken - 1], t && t.type === "Keyword" && (t.value === "if" || t.value === "while" || t.value === "for" || t.value === "with") ? ye() : $();
|
|
720
|
+
if (e.value === "}") {
|
|
721
|
+
if (f.tokens[f.openCurlyToken - 3] && f.tokens[f.openCurlyToken - 3].type === "Keyword") {
|
|
722
|
+
if (t = f.tokens[f.openCurlyToken - 4], !t)
|
|
723
|
+
return $();
|
|
724
|
+
} else if (f.tokens[f.openCurlyToken - 4] && f.tokens[f.openCurlyToken - 4].type === "Keyword") {
|
|
725
|
+
if (t = f.tokens[f.openCurlyToken - 5], !t)
|
|
726
|
+
return ye();
|
|
727
|
+
} else
|
|
728
|
+
return $();
|
|
729
|
+
return v.indexOf(t.value) >= 0 ? $() : ye();
|
|
730
|
+
}
|
|
731
|
+
return ye();
|
|
732
|
+
}
|
|
733
|
+
return e.type === "Keyword" ? ye() : $();
|
|
734
|
+
}
|
|
735
|
+
function Ie() {
|
|
736
|
+
var e;
|
|
737
|
+
return A(), r >= h ? {
|
|
738
|
+
type: y.EOF,
|
|
739
|
+
lineNumber: g,
|
|
740
|
+
lineStart: b,
|
|
741
|
+
start: r,
|
|
742
|
+
end: r
|
|
743
|
+
} : (e = s.charCodeAt(r), z(e) ? ee() : e === 40 || e === 41 || e === 59 ? $() : e === 39 || e === 34 ? ce() : e === 46 ? L(s.charCodeAt(r + 1)) ? Q() : $() : L(e) ? Q() : f.tokenize && e === 47 ? Je() : $());
|
|
744
|
+
}
|
|
745
|
+
function Pe() {
|
|
746
|
+
var e, t, u;
|
|
747
|
+
return A(), e = {
|
|
748
|
+
start: {
|
|
749
|
+
line: g,
|
|
750
|
+
column: r - b
|
|
751
|
+
}
|
|
752
|
+
}, t = Ie(), e.end = {
|
|
753
|
+
line: g,
|
|
754
|
+
column: r - b
|
|
755
|
+
}, t.type !== y.EOF && (u = s.slice(t.start, t.end), f.tokens.push({
|
|
756
|
+
type: D[t.type],
|
|
757
|
+
value: u,
|
|
758
|
+
range: [t.start, t.end],
|
|
759
|
+
loc: e
|
|
760
|
+
})), t;
|
|
761
|
+
}
|
|
762
|
+
function N() {
|
|
763
|
+
var e;
|
|
764
|
+
return e = i, r = e.end, g = e.lineNumber, b = e.lineStart, i = typeof f.tokens < "u" ? Pe() : Ie(), r = e.end, g = e.lineNumber, b = e.lineStart, e;
|
|
765
|
+
}
|
|
766
|
+
function we() {
|
|
767
|
+
var e, t, u;
|
|
768
|
+
e = r, t = g, u = b, i = typeof f.tokens < "u" ? Pe() : Ie(), r = e, g = t, b = u;
|
|
769
|
+
}
|
|
770
|
+
function Le(e, t) {
|
|
771
|
+
this.line = e, this.column = t;
|
|
772
|
+
}
|
|
773
|
+
function Qe(e, t, u, l) {
|
|
774
|
+
this.start = new Le(e, t), this.end = new Le(u, l);
|
|
775
|
+
}
|
|
776
|
+
m = {
|
|
777
|
+
name: "SyntaxTree",
|
|
778
|
+
processComment: function(e) {
|
|
779
|
+
var t, u;
|
|
780
|
+
if (!(e.type === E.Program && e.body.length > 0)) {
|
|
781
|
+
for (f.trailingComments.length > 0 ? f.trailingComments[0].range[0] >= e.range[1] ? (u = f.trailingComments, f.trailingComments = []) : f.trailingComments.length = 0 : f.bottomRightStack.length > 0 && f.bottomRightStack[f.bottomRightStack.length - 1].trailingComments && f.bottomRightStack[f.bottomRightStack.length - 1].trailingComments[0].range[0] >= e.range[1] && (u = f.bottomRightStack[f.bottomRightStack.length - 1].trailingComments, delete f.bottomRightStack[f.bottomRightStack.length - 1].trailingComments); f.bottomRightStack.length > 0 && f.bottomRightStack[f.bottomRightStack.length - 1].range[0] >= e.range[0]; )
|
|
782
|
+
t = f.bottomRightStack.pop();
|
|
783
|
+
t ? t.leadingComments && t.leadingComments[t.leadingComments.length - 1].range[1] <= e.range[0] && (e.leadingComments = t.leadingComments, delete t.leadingComments) : f.leadingComments.length > 0 && f.leadingComments[f.leadingComments.length - 1].range[1] <= e.range[0] && (e.leadingComments = f.leadingComments, f.leadingComments = []), u && (e.trailingComments = u), f.bottomRightStack.push(e);
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
markEnd: function(e, t) {
|
|
787
|
+
return f.range && (e.range = [t.start, r]), f.loc && (e.loc = new Qe(
|
|
788
|
+
t.startLineNumber === void 0 ? t.lineNumber : t.startLineNumber,
|
|
789
|
+
t.start - (t.startLineStart === void 0 ? t.lineStart : t.startLineStart),
|
|
790
|
+
g,
|
|
791
|
+
r - b
|
|
792
|
+
), this.postProcess(e)), f.attachComment && this.processComment(e), e;
|
|
793
|
+
},
|
|
794
|
+
postProcess: function(e) {
|
|
795
|
+
return f.source && (e.loc.source = f.source), e;
|
|
796
|
+
},
|
|
797
|
+
createArrayExpression: function(e) {
|
|
798
|
+
return {
|
|
799
|
+
type: E.ArrayExpression,
|
|
800
|
+
elements: e
|
|
801
|
+
};
|
|
802
|
+
},
|
|
803
|
+
createAssignmentExpression: function(e, t, u) {
|
|
804
|
+
return {
|
|
805
|
+
type: E.AssignmentExpression,
|
|
806
|
+
operator: e,
|
|
807
|
+
left: t,
|
|
808
|
+
right: u
|
|
809
|
+
};
|
|
810
|
+
},
|
|
811
|
+
createBinaryExpression: function(e, t, u) {
|
|
812
|
+
var l = e === "||" || e === "&&" ? E.LogicalExpression : E.BinaryExpression;
|
|
813
|
+
return {
|
|
814
|
+
type: l,
|
|
815
|
+
operator: e,
|
|
816
|
+
left: t,
|
|
817
|
+
right: u
|
|
818
|
+
};
|
|
819
|
+
},
|
|
820
|
+
createBlockStatement: function(e) {
|
|
821
|
+
return {
|
|
822
|
+
type: E.BlockStatement,
|
|
823
|
+
body: e
|
|
824
|
+
};
|
|
825
|
+
},
|
|
826
|
+
createBreakStatement: function(e) {
|
|
827
|
+
return {
|
|
828
|
+
type: E.BreakStatement,
|
|
829
|
+
label: e
|
|
830
|
+
};
|
|
831
|
+
},
|
|
832
|
+
createCallExpression: function(e, t) {
|
|
833
|
+
return {
|
|
834
|
+
type: E.CallExpression,
|
|
835
|
+
callee: e,
|
|
836
|
+
arguments: t
|
|
837
|
+
};
|
|
838
|
+
},
|
|
839
|
+
createCatchClause: function(e, t) {
|
|
840
|
+
return {
|
|
841
|
+
type: E.CatchClause,
|
|
842
|
+
param: e,
|
|
843
|
+
body: t
|
|
844
|
+
};
|
|
845
|
+
},
|
|
846
|
+
createConditionalExpression: function(e, t, u) {
|
|
847
|
+
return {
|
|
848
|
+
type: E.ConditionalExpression,
|
|
849
|
+
test: e,
|
|
850
|
+
consequent: t,
|
|
851
|
+
alternate: u
|
|
852
|
+
};
|
|
853
|
+
},
|
|
854
|
+
createContinueStatement: function(e) {
|
|
855
|
+
return {
|
|
856
|
+
type: E.ContinueStatement,
|
|
857
|
+
label: e
|
|
858
|
+
};
|
|
859
|
+
},
|
|
860
|
+
createDebuggerStatement: function() {
|
|
861
|
+
return {
|
|
862
|
+
type: E.DebuggerStatement
|
|
863
|
+
};
|
|
864
|
+
},
|
|
865
|
+
createDoWhileStatement: function(e, t) {
|
|
866
|
+
return {
|
|
867
|
+
type: E.DoWhileStatement,
|
|
868
|
+
body: e,
|
|
869
|
+
test: t
|
|
870
|
+
};
|
|
871
|
+
},
|
|
872
|
+
createEmptyStatement: function() {
|
|
873
|
+
return {
|
|
874
|
+
type: E.EmptyStatement
|
|
875
|
+
};
|
|
876
|
+
},
|
|
877
|
+
createExpressionStatement: function(e) {
|
|
878
|
+
return {
|
|
879
|
+
type: E.ExpressionStatement,
|
|
880
|
+
expression: e
|
|
881
|
+
};
|
|
882
|
+
},
|
|
883
|
+
createForStatement: function(e, t, u, l) {
|
|
884
|
+
return {
|
|
885
|
+
type: E.ForStatement,
|
|
886
|
+
init: e,
|
|
887
|
+
test: t,
|
|
888
|
+
update: u,
|
|
889
|
+
body: l
|
|
890
|
+
};
|
|
891
|
+
},
|
|
892
|
+
createForInStatement: function(e, t, u) {
|
|
893
|
+
return {
|
|
894
|
+
type: E.ForInStatement,
|
|
895
|
+
left: e,
|
|
896
|
+
right: t,
|
|
897
|
+
body: u,
|
|
898
|
+
each: !1
|
|
899
|
+
};
|
|
900
|
+
},
|
|
901
|
+
createFunctionDeclaration: function(e, t, u, l) {
|
|
902
|
+
return {
|
|
903
|
+
type: E.FunctionDeclaration,
|
|
904
|
+
id: e,
|
|
905
|
+
params: t,
|
|
906
|
+
defaults: u,
|
|
907
|
+
body: l,
|
|
908
|
+
rest: null,
|
|
909
|
+
generator: !1,
|
|
910
|
+
expression: !1
|
|
911
|
+
};
|
|
912
|
+
},
|
|
913
|
+
createFunctionExpression: function(e, t, u, l) {
|
|
914
|
+
return {
|
|
915
|
+
type: E.FunctionExpression,
|
|
916
|
+
id: e,
|
|
917
|
+
params: t,
|
|
918
|
+
defaults: u,
|
|
919
|
+
body: l,
|
|
920
|
+
rest: null,
|
|
921
|
+
generator: !1,
|
|
922
|
+
expression: !1
|
|
923
|
+
};
|
|
924
|
+
},
|
|
925
|
+
createIdentifier: function(e) {
|
|
926
|
+
return {
|
|
927
|
+
type: E.Identifier,
|
|
928
|
+
name: e
|
|
929
|
+
};
|
|
930
|
+
},
|
|
931
|
+
createIfStatement: function(e, t, u) {
|
|
932
|
+
return {
|
|
933
|
+
type: E.IfStatement,
|
|
934
|
+
test: e,
|
|
935
|
+
consequent: t,
|
|
936
|
+
alternate: u
|
|
937
|
+
};
|
|
938
|
+
},
|
|
939
|
+
createLabeledStatement: function(e, t) {
|
|
940
|
+
return {
|
|
941
|
+
type: E.LabeledStatement,
|
|
942
|
+
label: e,
|
|
943
|
+
body: t
|
|
944
|
+
};
|
|
945
|
+
},
|
|
946
|
+
createLiteral: function(e) {
|
|
947
|
+
return {
|
|
948
|
+
type: E.Literal,
|
|
949
|
+
value: e.value,
|
|
950
|
+
raw: s.slice(e.start, e.end)
|
|
951
|
+
};
|
|
952
|
+
},
|
|
953
|
+
createMemberExpression: function(e, t, u) {
|
|
954
|
+
return {
|
|
955
|
+
type: E.MemberExpression,
|
|
956
|
+
computed: e === "[",
|
|
957
|
+
object: t,
|
|
958
|
+
property: u
|
|
959
|
+
};
|
|
960
|
+
},
|
|
961
|
+
createNewExpression: function(e, t) {
|
|
962
|
+
return {
|
|
963
|
+
type: E.NewExpression,
|
|
964
|
+
callee: e,
|
|
965
|
+
arguments: t
|
|
966
|
+
};
|
|
967
|
+
},
|
|
968
|
+
createObjectExpression: function(e) {
|
|
969
|
+
return {
|
|
970
|
+
type: E.ObjectExpression,
|
|
971
|
+
properties: e
|
|
972
|
+
};
|
|
973
|
+
},
|
|
974
|
+
createPostfixExpression: function(e, t) {
|
|
975
|
+
return {
|
|
976
|
+
type: E.UpdateExpression,
|
|
977
|
+
operator: e,
|
|
978
|
+
argument: t,
|
|
979
|
+
prefix: !1
|
|
980
|
+
};
|
|
981
|
+
},
|
|
982
|
+
createProgram: function(e) {
|
|
983
|
+
return {
|
|
984
|
+
type: E.Program,
|
|
985
|
+
body: e
|
|
986
|
+
};
|
|
987
|
+
},
|
|
988
|
+
createProperty: function(e, t, u) {
|
|
989
|
+
return {
|
|
990
|
+
type: E.Property,
|
|
991
|
+
key: t,
|
|
992
|
+
value: u,
|
|
993
|
+
kind: e
|
|
994
|
+
};
|
|
995
|
+
},
|
|
996
|
+
createReturnStatement: function(e) {
|
|
997
|
+
return {
|
|
998
|
+
type: E.ReturnStatement,
|
|
999
|
+
argument: e
|
|
1000
|
+
};
|
|
1001
|
+
},
|
|
1002
|
+
createSequenceExpression: function(e) {
|
|
1003
|
+
return {
|
|
1004
|
+
type: E.SequenceExpression,
|
|
1005
|
+
expressions: e
|
|
1006
|
+
};
|
|
1007
|
+
},
|
|
1008
|
+
createSwitchCase: function(e, t) {
|
|
1009
|
+
return {
|
|
1010
|
+
type: E.SwitchCase,
|
|
1011
|
+
test: e,
|
|
1012
|
+
consequent: t
|
|
1013
|
+
};
|
|
1014
|
+
},
|
|
1015
|
+
createSwitchStatement: function(e, t) {
|
|
1016
|
+
return {
|
|
1017
|
+
type: E.SwitchStatement,
|
|
1018
|
+
discriminant: e,
|
|
1019
|
+
cases: t
|
|
1020
|
+
};
|
|
1021
|
+
},
|
|
1022
|
+
createThisExpression: function() {
|
|
1023
|
+
return {
|
|
1024
|
+
type: E.ThisExpression
|
|
1025
|
+
};
|
|
1026
|
+
},
|
|
1027
|
+
createThrowStatement: function(e) {
|
|
1028
|
+
return {
|
|
1029
|
+
type: E.ThrowStatement,
|
|
1030
|
+
argument: e
|
|
1031
|
+
};
|
|
1032
|
+
},
|
|
1033
|
+
createTryStatement: function(e, t, u, l) {
|
|
1034
|
+
return {
|
|
1035
|
+
type: E.TryStatement,
|
|
1036
|
+
block: e,
|
|
1037
|
+
guardedHandlers: t,
|
|
1038
|
+
handlers: u,
|
|
1039
|
+
finalizer: l
|
|
1040
|
+
};
|
|
1041
|
+
},
|
|
1042
|
+
createUnaryExpression: function(e, t) {
|
|
1043
|
+
return e === "++" || e === "--" ? {
|
|
1044
|
+
type: E.UpdateExpression,
|
|
1045
|
+
operator: e,
|
|
1046
|
+
argument: t,
|
|
1047
|
+
prefix: !0
|
|
1048
|
+
} : {
|
|
1049
|
+
type: E.UnaryExpression,
|
|
1050
|
+
operator: e,
|
|
1051
|
+
argument: t,
|
|
1052
|
+
prefix: !0
|
|
1053
|
+
};
|
|
1054
|
+
},
|
|
1055
|
+
createVariableDeclaration: function(e, t) {
|
|
1056
|
+
return {
|
|
1057
|
+
type: E.VariableDeclaration,
|
|
1058
|
+
declarations: e,
|
|
1059
|
+
kind: t
|
|
1060
|
+
};
|
|
1061
|
+
},
|
|
1062
|
+
createVariableDeclarator: function(e, t) {
|
|
1063
|
+
return {
|
|
1064
|
+
type: E.VariableDeclarator,
|
|
1065
|
+
id: e,
|
|
1066
|
+
init: t
|
|
1067
|
+
};
|
|
1068
|
+
},
|
|
1069
|
+
createWhileStatement: function(e, t) {
|
|
1070
|
+
return {
|
|
1071
|
+
type: E.WhileStatement,
|
|
1072
|
+
test: e,
|
|
1073
|
+
body: t
|
|
1074
|
+
};
|
|
1075
|
+
},
|
|
1076
|
+
createWithStatement: function(e, t) {
|
|
1077
|
+
return {
|
|
1078
|
+
type: E.WithStatement,
|
|
1079
|
+
object: e,
|
|
1080
|
+
body: t
|
|
1081
|
+
};
|
|
1082
|
+
}
|
|
1083
|
+
};
|
|
1084
|
+
function ge() {
|
|
1085
|
+
var e, t, u, l;
|
|
1086
|
+
return e = r, t = g, u = b, A(), l = g !== t, r = e, g = t, b = u, l;
|
|
1087
|
+
}
|
|
1088
|
+
function P(e, t) {
|
|
1089
|
+
var u, l = Array.prototype.slice.call(arguments, 2), C = t.replace(
|
|
1090
|
+
/%(\d)/g,
|
|
1091
|
+
function(x, R) {
|
|
1092
|
+
return I(R < l.length, "Message reference must be in range"), l[R];
|
|
1093
|
+
}
|
|
1094
|
+
);
|
|
1095
|
+
throw typeof e.lineNumber == "number" ? (u = new Error("Line " + e.lineNumber + ": " + C), u.index = e.start, u.lineNumber = e.lineNumber, u.column = e.start - b + 1) : (u = new Error("Line " + g + ": " + C), u.index = r, u.lineNumber = g, u.column = r - b + 1), u.description = C, u;
|
|
1096
|
+
}
|
|
1097
|
+
function G() {
|
|
1098
|
+
try {
|
|
1099
|
+
P.apply(null, arguments);
|
|
1100
|
+
} catch (e) {
|
|
1101
|
+
if (f.errors)
|
|
1102
|
+
f.errors.push(e);
|
|
1103
|
+
else
|
|
1104
|
+
throw e;
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
function fe(e) {
|
|
1108
|
+
if (e.type === y.EOF && P(e, a.UnexpectedEOS), e.type === y.NumericLiteral && P(e, a.UnexpectedNumber), e.type === y.StringLiteral && P(e, a.UnexpectedString), e.type === y.Identifier && P(e, a.UnexpectedIdentifier), e.type === y.Keyword) {
|
|
1109
|
+
if (ae(e.value))
|
|
1110
|
+
P(e, a.UnexpectedReserved);
|
|
1111
|
+
else if (c && Y(e.value)) {
|
|
1112
|
+
G(e, a.StrictReservedWord);
|
|
1113
|
+
return;
|
|
1114
|
+
}
|
|
1115
|
+
P(e, a.UnexpectedToken, e.value);
|
|
1116
|
+
}
|
|
1117
|
+
P(e, a.UnexpectedToken, e.value);
|
|
1118
|
+
}
|
|
1119
|
+
function T(e) {
|
|
1120
|
+
var t = N();
|
|
1121
|
+
(t.type !== y.Punctuator || t.value !== e) && fe(t);
|
|
1122
|
+
}
|
|
1123
|
+
function Z(e) {
|
|
1124
|
+
var t = N();
|
|
1125
|
+
(t.type !== y.Keyword || t.value !== e) && fe(t);
|
|
1126
|
+
}
|
|
1127
|
+
function _(e) {
|
|
1128
|
+
return i.type === y.Punctuator && i.value === e;
|
|
1129
|
+
}
|
|
1130
|
+
function ne(e) {
|
|
1131
|
+
return i.type === y.Keyword && i.value === e;
|
|
1132
|
+
}
|
|
1133
|
+
function Ye() {
|
|
1134
|
+
var e;
|
|
1135
|
+
return i.type !== y.Punctuator ? !1 : (e = i.value, e === "=" || e === "*=" || e === "/=" || e === "%=" || e === "+=" || e === "-=" || e === "<<=" || e === ">>=" || e === ">>>=" || e === "&=" || e === "^=" || e === "|=");
|
|
1136
|
+
}
|
|
1137
|
+
function pe() {
|
|
1138
|
+
var e;
|
|
1139
|
+
if (s.charCodeAt(r) === 59 || _(";")) {
|
|
1140
|
+
N();
|
|
1141
|
+
return;
|
|
1142
|
+
}
|
|
1143
|
+
e = g, A(), g === e && i.type !== y.EOF && !_("}") && fe(i);
|
|
1144
|
+
}
|
|
1145
|
+
function Fe(e) {
|
|
1146
|
+
return e.type === E.Identifier || e.type === E.MemberExpression;
|
|
1147
|
+
}
|
|
1148
|
+
function Ze() {
|
|
1149
|
+
var e = [], t;
|
|
1150
|
+
for (t = i, T("["); !_("]"); )
|
|
1151
|
+
_(",") ? (N(), e.push(null)) : (e.push(le()), _("]") || T(","));
|
|
1152
|
+
return N(), n.markEnd(n.createArrayExpression(e), t);
|
|
1153
|
+
}
|
|
1154
|
+
function _e(e, t) {
|
|
1155
|
+
var u, l, C;
|
|
1156
|
+
return u = c, C = i, l = Oe(), t && c && J(e[0].name) && G(t, a.StrictParamName), c = u, n.markEnd(n.createFunctionExpression(null, e, [], l), C);
|
|
1157
|
+
}
|
|
1158
|
+
function be() {
|
|
1159
|
+
var e, t;
|
|
1160
|
+
return t = i, e = N(), e.type === y.StringLiteral || e.type === y.NumericLiteral ? (c && e.octal && G(e, a.StrictOctalLiteral), n.markEnd(n.createLiteral(e), t)) : n.markEnd(n.createIdentifier(e.value), t);
|
|
1161
|
+
}
|
|
1162
|
+
function et() {
|
|
1163
|
+
var e, t, u, l, C, x;
|
|
1164
|
+
if (e = i, x = i, e.type === y.Identifier)
|
|
1165
|
+
return u = be(), e.value === "get" && !_(":") ? (t = be(), T("("), T(")"), l = _e([]), n.markEnd(n.createProperty("get", t, l), x)) : e.value === "set" && !_(":") ? (t = be(), T("("), e = i, e.type !== y.Identifier ? (T(")"), G(e, a.UnexpectedToken, e.value), l = _e([])) : (C = [me()], T(")"), l = _e(C, e)), n.markEnd(n.createProperty("set", t, l), x)) : (T(":"), l = le(), n.markEnd(n.createProperty("init", u, l), x));
|
|
1166
|
+
if (e.type === y.EOF || e.type === y.Punctuator)
|
|
1167
|
+
fe(e);
|
|
1168
|
+
else
|
|
1169
|
+
return t = be(), T(":"), l = le(), n.markEnd(n.createProperty("init", t, l), x);
|
|
1170
|
+
}
|
|
1171
|
+
function tt() {
|
|
1172
|
+
var e = [], t, u, l, C, x = {}, R = String, W;
|
|
1173
|
+
for (W = i, T("{"); !_("}"); )
|
|
1174
|
+
t = et(), t.key.type === E.Identifier ? u = t.key.name : u = R(t.key.value), C = t.kind === "init" ? d.Data : t.kind === "get" ? d.Get : d.Set, l = "$" + u, Object.prototype.hasOwnProperty.call(x, l) ? (x[l] === d.Data ? c && C === d.Data ? G({}, a.StrictDuplicateProperty) : C !== d.Data && G({}, a.AccessorDataProperty) : C === d.Data ? G({}, a.AccessorDataProperty) : x[l] & C && G({}, a.AccessorGetSet), x[l] |= C) : x[l] = C, e.push(t), _("}") || T(",");
|
|
1175
|
+
return T("}"), n.markEnd(n.createObjectExpression(e), W);
|
|
1176
|
+
}
|
|
1177
|
+
function rt() {
|
|
1178
|
+
var e;
|
|
1179
|
+
return T("("), e = te(), T(")"), e;
|
|
1180
|
+
}
|
|
1181
|
+
function Re() {
|
|
1182
|
+
var e, t, u, l;
|
|
1183
|
+
if (_("("))
|
|
1184
|
+
return rt();
|
|
1185
|
+
if (_("["))
|
|
1186
|
+
return Ze();
|
|
1187
|
+
if (_("{"))
|
|
1188
|
+
return tt();
|
|
1189
|
+
if (e = i.type, l = i, e === y.Identifier)
|
|
1190
|
+
u = n.createIdentifier(N().value);
|
|
1191
|
+
else if (e === y.StringLiteral || e === y.NumericLiteral)
|
|
1192
|
+
c && i.octal && G(i, a.StrictOctalLiteral), u = n.createLiteral(N());
|
|
1193
|
+
else if (e === y.Keyword) {
|
|
1194
|
+
if (ne("function"))
|
|
1195
|
+
return It();
|
|
1196
|
+
ne("this") ? (N(), u = n.createThisExpression()) : fe(N());
|
|
1197
|
+
} else e === y.BooleanLiteral ? (t = N(), t.value = t.value === "true", u = n.createLiteral(t)) : e === y.NullLiteral ? (t = N(), t.value = null, u = n.createLiteral(t)) : _("/") || _("/=") ? (typeof f.tokens < "u" ? u = n.createLiteral(ye()) : u = n.createLiteral(Se()), we()) : fe(N());
|
|
1198
|
+
return n.markEnd(u, l);
|
|
1199
|
+
}
|
|
1200
|
+
function je() {
|
|
1201
|
+
var e = [];
|
|
1202
|
+
if (T("("), !_(")"))
|
|
1203
|
+
for (; r < h && (e.push(le()), !_(")")); )
|
|
1204
|
+
T(",");
|
|
1205
|
+
return T(")"), e;
|
|
1206
|
+
}
|
|
1207
|
+
function nt() {
|
|
1208
|
+
var e, t;
|
|
1209
|
+
return t = i, e = N(), Ke(e) || fe(e), n.markEnd(n.createIdentifier(e.value), t);
|
|
1210
|
+
}
|
|
1211
|
+
function Me() {
|
|
1212
|
+
return T("."), nt();
|
|
1213
|
+
}
|
|
1214
|
+
function Ue() {
|
|
1215
|
+
var e;
|
|
1216
|
+
return T("["), e = te(), T("]"), e;
|
|
1217
|
+
}
|
|
1218
|
+
function $e() {
|
|
1219
|
+
var e, t, u;
|
|
1220
|
+
return u = i, Z("new"), e = it(), t = _("(") ? je() : [], n.markEnd(n.createNewExpression(e, t), u);
|
|
1221
|
+
}
|
|
1222
|
+
function ut() {
|
|
1223
|
+
var e, t, u, l, C;
|
|
1224
|
+
for (C = i, e = p.allowIn, p.allowIn = !0, t = ne("new") ? $e() : Re(), p.allowIn = e; ; ) {
|
|
1225
|
+
if (_("."))
|
|
1226
|
+
l = Me(), t = n.createMemberExpression(".", t, l);
|
|
1227
|
+
else if (_("("))
|
|
1228
|
+
u = je(), t = n.createCallExpression(t, u);
|
|
1229
|
+
else if (_("["))
|
|
1230
|
+
l = Ue(), t = n.createMemberExpression("[", t, l);
|
|
1231
|
+
else
|
|
1232
|
+
break;
|
|
1233
|
+
n.markEnd(t, C);
|
|
1234
|
+
}
|
|
1235
|
+
return t;
|
|
1236
|
+
}
|
|
1237
|
+
function it() {
|
|
1238
|
+
var e, t, u, l;
|
|
1239
|
+
for (l = i, e = p.allowIn, t = ne("new") ? $e() : Re(), p.allowIn = e; _(".") || _("["); )
|
|
1240
|
+
_("[") ? (u = Ue(), t = n.createMemberExpression("[", t, u)) : (u = Me(), t = n.createMemberExpression(".", t, u)), n.markEnd(t, l);
|
|
1241
|
+
return t;
|
|
1242
|
+
}
|
|
1243
|
+
function ze() {
|
|
1244
|
+
var e, t, u = i;
|
|
1245
|
+
return e = ut(), i.type === y.Punctuator && (_("++") || _("--")) && !ge() && (c && e.type === E.Identifier && J(e.name) && G({}, a.StrictLHSPostfix), Fe(e) || G({}, a.InvalidLHSInAssignment), t = N(), e = n.markEnd(n.createPostfixExpression(t.value, e), u)), e;
|
|
1246
|
+
}
|
|
1247
|
+
function Ee() {
|
|
1248
|
+
var e, t, u;
|
|
1249
|
+
return i.type !== y.Punctuator && i.type !== y.Keyword ? t = ze() : _("++") || _("--") ? (u = i, e = N(), t = Ee(), c && t.type === E.Identifier && J(t.name) && G({}, a.StrictLHSPrefix), Fe(t) || G({}, a.InvalidLHSInAssignment), t = n.createUnaryExpression(e.value, t), t = n.markEnd(t, u)) : _("+") || _("-") || _("~") || _("!") ? (u = i, e = N(), t = Ee(), t = n.createUnaryExpression(e.value, t), t = n.markEnd(t, u)) : ne("delete") || ne("void") || ne("typeof") ? (u = i, e = N(), t = Ee(), t = n.createUnaryExpression(e.value, t), t = n.markEnd(t, u), c && t.operator === "delete" && t.argument.type === E.Identifier && G({}, a.StrictDelete)) : t = ze(), t;
|
|
1250
|
+
}
|
|
1251
|
+
function qe(e, t) {
|
|
1252
|
+
var u = 0;
|
|
1253
|
+
if (e.type !== y.Punctuator && e.type !== y.Keyword)
|
|
1254
|
+
return 0;
|
|
1255
|
+
switch (e.value) {
|
|
1256
|
+
case "||":
|
|
1257
|
+
u = 1;
|
|
1258
|
+
break;
|
|
1259
|
+
case "&&":
|
|
1260
|
+
u = 2;
|
|
1261
|
+
break;
|
|
1262
|
+
case "|":
|
|
1263
|
+
u = 3;
|
|
1264
|
+
break;
|
|
1265
|
+
case "^":
|
|
1266
|
+
u = 4;
|
|
1267
|
+
break;
|
|
1268
|
+
case "&":
|
|
1269
|
+
u = 5;
|
|
1270
|
+
break;
|
|
1271
|
+
case "==":
|
|
1272
|
+
case "!=":
|
|
1273
|
+
case "===":
|
|
1274
|
+
case "!==":
|
|
1275
|
+
u = 6;
|
|
1276
|
+
break;
|
|
1277
|
+
case "<":
|
|
1278
|
+
case ">":
|
|
1279
|
+
case "<=":
|
|
1280
|
+
case ">=":
|
|
1281
|
+
case "instanceof":
|
|
1282
|
+
u = 7;
|
|
1283
|
+
break;
|
|
1284
|
+
case "in":
|
|
1285
|
+
u = t ? 7 : 0;
|
|
1286
|
+
break;
|
|
1287
|
+
case "<<":
|
|
1288
|
+
case ">>":
|
|
1289
|
+
case ">>>":
|
|
1290
|
+
u = 8;
|
|
1291
|
+
break;
|
|
1292
|
+
case "+":
|
|
1293
|
+
case "-":
|
|
1294
|
+
u = 9;
|
|
1295
|
+
break;
|
|
1296
|
+
case "*":
|
|
1297
|
+
case "/":
|
|
1298
|
+
case "%":
|
|
1299
|
+
u = 11;
|
|
1300
|
+
break;
|
|
1301
|
+
}
|
|
1302
|
+
return u;
|
|
1303
|
+
}
|
|
1304
|
+
function at() {
|
|
1305
|
+
var e, t, u, l, C, x, R, W, ue, re;
|
|
1306
|
+
if (e = i, ue = Ee(), l = i, C = qe(l, p.allowIn), C === 0)
|
|
1307
|
+
return ue;
|
|
1308
|
+
for (l.prec = C, N(), t = [e, i], R = Ee(), x = [ue, l, R]; (C = qe(i, p.allowIn)) > 0; ) {
|
|
1309
|
+
for (; x.length > 2 && C <= x[x.length - 2].prec; )
|
|
1310
|
+
R = x.pop(), W = x.pop().value, ue = x.pop(), u = n.createBinaryExpression(W, ue, R), t.pop(), e = t[t.length - 1], n.markEnd(u, e), x.push(u);
|
|
1311
|
+
l = N(), l.prec = C, x.push(l), t.push(i), u = Ee(), x.push(u);
|
|
1312
|
+
}
|
|
1313
|
+
for (re = x.length - 1, u = x[re], t.pop(); re > 1; )
|
|
1314
|
+
u = n.createBinaryExpression(x[re - 1].value, x[re - 2], u), re -= 2, e = t.pop(), n.markEnd(u, e);
|
|
1315
|
+
return u;
|
|
1316
|
+
}
|
|
1317
|
+
function st() {
|
|
1318
|
+
var e, t, u, l, C;
|
|
1319
|
+
return C = i, e = at(), _("?") && (N(), t = p.allowIn, p.allowIn = !0, u = le(), p.allowIn = t, T(":"), l = le(), e = n.createConditionalExpression(e, u, l), n.markEnd(e, C)), e;
|
|
1320
|
+
}
|
|
1321
|
+
function le() {
|
|
1322
|
+
var e, t, u, l, C;
|
|
1323
|
+
return e = i, C = i, l = t = st(), Ye() && (Fe(t) || G({}, a.InvalidLHSInAssignment), c && t.type === E.Identifier && J(t.name) && G(e, a.StrictLHSAssignment), e = N(), u = le(), l = n.markEnd(n.createAssignmentExpression(e.value, t, u), C)), l;
|
|
1324
|
+
}
|
|
1325
|
+
function te() {
|
|
1326
|
+
var e, t = i;
|
|
1327
|
+
if (e = le(), _(",")) {
|
|
1328
|
+
for (e = n.createSequenceExpression([e]); r < h && _(","); )
|
|
1329
|
+
N(), e.expressions.push(le());
|
|
1330
|
+
n.markEnd(e, t);
|
|
1331
|
+
}
|
|
1332
|
+
return e;
|
|
1333
|
+
}
|
|
1334
|
+
function ot() {
|
|
1335
|
+
for (var e = [], t; r < h && !(_("}") || (t = Ce(), typeof t > "u")); )
|
|
1336
|
+
e.push(t);
|
|
1337
|
+
return e;
|
|
1338
|
+
}
|
|
1339
|
+
function De() {
|
|
1340
|
+
var e, t;
|
|
1341
|
+
return t = i, T("{"), e = ot(), T("}"), n.markEnd(n.createBlockStatement(e), t);
|
|
1342
|
+
}
|
|
1343
|
+
function me() {
|
|
1344
|
+
var e, t;
|
|
1345
|
+
return t = i, e = N(), e.type !== y.Identifier && fe(e), n.markEnd(n.createIdentifier(e.value), t);
|
|
1346
|
+
}
|
|
1347
|
+
function lt(e) {
|
|
1348
|
+
var t = null, u, l;
|
|
1349
|
+
return l = i, u = me(), c && J(u.name) && G({}, a.StrictVarName), e === "const" ? (T("="), t = le()) : _("=") && (N(), t = le()), n.markEnd(n.createVariableDeclarator(u, t), l);
|
|
1350
|
+
}
|
|
1351
|
+
function Te(e) {
|
|
1352
|
+
var t = [];
|
|
1353
|
+
do {
|
|
1354
|
+
if (t.push(lt(e)), !_(","))
|
|
1355
|
+
break;
|
|
1356
|
+
N();
|
|
1357
|
+
} while (r < h);
|
|
1358
|
+
return t;
|
|
1359
|
+
}
|
|
1360
|
+
function ct() {
|
|
1361
|
+
var e;
|
|
1362
|
+
return Z("var"), e = Te(), pe(), n.createVariableDeclaration(e, "var");
|
|
1363
|
+
}
|
|
1364
|
+
function ft(e) {
|
|
1365
|
+
var t, u;
|
|
1366
|
+
return u = i, Z(e), t = Te(e), pe(), n.markEnd(n.createVariableDeclaration(t, e), u);
|
|
1367
|
+
}
|
|
1368
|
+
function pt() {
|
|
1369
|
+
return T(";"), n.createEmptyStatement();
|
|
1370
|
+
}
|
|
1371
|
+
function ht() {
|
|
1372
|
+
var e = te();
|
|
1373
|
+
return pe(), n.createExpressionStatement(e);
|
|
1374
|
+
}
|
|
1375
|
+
function mt() {
|
|
1376
|
+
var e, t, u;
|
|
1377
|
+
return Z("if"), T("("), e = te(), T(")"), t = he(), ne("else") ? (N(), u = he()) : u = null, n.createIfStatement(e, t, u);
|
|
1378
|
+
}
|
|
1379
|
+
function yt() {
|
|
1380
|
+
var e, t, u;
|
|
1381
|
+
return Z("do"), u = p.inIteration, p.inIteration = !0, e = he(), p.inIteration = u, Z("while"), T("("), t = te(), T(")"), _(";") && N(), n.createDoWhileStatement(e, t);
|
|
1382
|
+
}
|
|
1383
|
+
function dt() {
|
|
1384
|
+
var e, t, u;
|
|
1385
|
+
return Z("while"), T("("), e = te(), T(")"), u = p.inIteration, p.inIteration = !0, t = he(), p.inIteration = u, n.createWhileStatement(e, t);
|
|
1386
|
+
}
|
|
1387
|
+
function Et() {
|
|
1388
|
+
var e, t, u;
|
|
1389
|
+
return u = i, e = N(), t = Te(), n.markEnd(n.createVariableDeclaration(t, e.value), u);
|
|
1390
|
+
}
|
|
1391
|
+
function At() {
|
|
1392
|
+
var e, t, u, l, C, x, R;
|
|
1393
|
+
return e = t = u = null, Z("for"), T("("), _(";") ? N() : (ne("var") || ne("let") ? (p.allowIn = !1, e = Et(), p.allowIn = !0, e.declarations.length === 1 && ne("in") && (N(), l = e, C = te(), e = null)) : (p.allowIn = !1, e = te(), p.allowIn = !0, ne("in") && (Fe(e) || G({}, a.InvalidLHSInForIn), N(), l = e, C = te(), e = null)), typeof l > "u" && T(";")), typeof l > "u" && (_(";") || (t = te()), T(";"), _(")") || (u = te())), T(")"), R = p.inIteration, p.inIteration = !0, x = he(), p.inIteration = R, typeof l > "u" ? n.createForStatement(e, t, u, x) : n.createForInStatement(l, C, x);
|
|
1394
|
+
}
|
|
1395
|
+
function gt() {
|
|
1396
|
+
var e = null, t;
|
|
1397
|
+
return Z("continue"), s.charCodeAt(r) === 59 ? (N(), p.inIteration || P({}, a.IllegalContinue), n.createContinueStatement(null)) : ge() ? (p.inIteration || P({}, a.IllegalContinue), n.createContinueStatement(null)) : (i.type === y.Identifier && (e = me(), t = "$" + e.name, Object.prototype.hasOwnProperty.call(p.labelSet, t) || P({}, a.UnknownLabel, e.name)), pe(), e === null && !p.inIteration && P({}, a.IllegalContinue), n.createContinueStatement(e));
|
|
1398
|
+
}
|
|
1399
|
+
function Ct() {
|
|
1400
|
+
var e = null, t;
|
|
1401
|
+
return Z("break"), s.charCodeAt(r) === 59 ? (N(), p.inIteration || p.inSwitch || P({}, a.IllegalBreak), n.createBreakStatement(null)) : ge() ? (p.inIteration || p.inSwitch || P({}, a.IllegalBreak), n.createBreakStatement(null)) : (i.type === y.Identifier && (e = me(), t = "$" + e.name, Object.prototype.hasOwnProperty.call(p.labelSet, t) || P({}, a.UnknownLabel, e.name)), pe(), e === null && !(p.inIteration || p.inSwitch) && P({}, a.IllegalBreak), n.createBreakStatement(e));
|
|
1402
|
+
}
|
|
1403
|
+
function vt() {
|
|
1404
|
+
var e = null;
|
|
1405
|
+
return Z("return"), p.inFunctionBody || G({}, a.IllegalReturn), s.charCodeAt(r) === 32 && z(s.charCodeAt(r + 1)) ? (e = te(), pe(), n.createReturnStatement(e)) : ge() ? n.createReturnStatement(null) : (_(";") || !_("}") && i.type !== y.EOF && (e = te()), pe(), n.createReturnStatement(e));
|
|
1406
|
+
}
|
|
1407
|
+
function St() {
|
|
1408
|
+
var e, t;
|
|
1409
|
+
return c && (A(), G({}, a.StrictModeWith)), Z("with"), T("("), e = te(), T(")"), t = he(), n.createWithStatement(e, t);
|
|
1410
|
+
}
|
|
1411
|
+
function Ft() {
|
|
1412
|
+
var e, t = [], u, l;
|
|
1413
|
+
for (l = i, ne("default") ? (N(), e = null) : (Z("case"), e = te()), T(":"); r < h && !(_("}") || ne("default") || ne("case")); )
|
|
1414
|
+
u = he(), t.push(u);
|
|
1415
|
+
return n.markEnd(n.createSwitchCase(e, t), l);
|
|
1416
|
+
}
|
|
1417
|
+
function bt() {
|
|
1418
|
+
var e, t, u, l, C;
|
|
1419
|
+
if (Z("switch"), T("("), e = te(), T(")"), T("{"), t = [], _("}"))
|
|
1420
|
+
return N(), n.createSwitchStatement(e, t);
|
|
1421
|
+
for (l = p.inSwitch, p.inSwitch = !0, C = !1; r < h && !_("}"); )
|
|
1422
|
+
u = Ft(), u.test === null && (C && P({}, a.MultipleDefaultsInSwitch), C = !0), t.push(u);
|
|
1423
|
+
return p.inSwitch = l, T("}"), n.createSwitchStatement(e, t);
|
|
1424
|
+
}
|
|
1425
|
+
function Dt() {
|
|
1426
|
+
var e;
|
|
1427
|
+
return Z("throw"), ge() && P({}, a.NewlineAfterThrow), e = te(), pe(), n.createThrowStatement(e);
|
|
1428
|
+
}
|
|
1429
|
+
function xt() {
|
|
1430
|
+
var e, t, u;
|
|
1431
|
+
return u = i, Z("catch"), T("("), _(")") && fe(i), e = me(), c && J(e.name) && G({}, a.StrictCatchVariable), T(")"), t = De(), n.markEnd(n.createCatchClause(e, t), u);
|
|
1432
|
+
}
|
|
1433
|
+
function Bt() {
|
|
1434
|
+
var e, t = [], u = null;
|
|
1435
|
+
return Z("try"), e = De(), ne("catch") && t.push(xt()), ne("finally") && (N(), u = De()), t.length === 0 && !u && P({}, a.NoCatchOrFinally), n.createTryStatement(e, [], t, u);
|
|
1436
|
+
}
|
|
1437
|
+
function kt() {
|
|
1438
|
+
return Z("debugger"), pe(), n.createDebuggerStatement();
|
|
1439
|
+
}
|
|
1440
|
+
function he() {
|
|
1441
|
+
var e = i.type, t, u, l, C;
|
|
1442
|
+
if (e === y.EOF && fe(i), e === y.Punctuator && i.value === "{")
|
|
1443
|
+
return De();
|
|
1444
|
+
if (C = i, e === y.Punctuator)
|
|
1445
|
+
switch (i.value) {
|
|
1446
|
+
case ";":
|
|
1447
|
+
return n.markEnd(pt(), C);
|
|
1448
|
+
case "(":
|
|
1449
|
+
return n.markEnd(ht(), C);
|
|
1450
|
+
}
|
|
1451
|
+
if (e === y.Keyword)
|
|
1452
|
+
switch (i.value) {
|
|
1453
|
+
case "break":
|
|
1454
|
+
return n.markEnd(Ct(), C);
|
|
1455
|
+
case "continue":
|
|
1456
|
+
return n.markEnd(gt(), C);
|
|
1457
|
+
case "debugger":
|
|
1458
|
+
return n.markEnd(kt(), C);
|
|
1459
|
+
case "do":
|
|
1460
|
+
return n.markEnd(yt(), C);
|
|
1461
|
+
case "for":
|
|
1462
|
+
return n.markEnd(At(), C);
|
|
1463
|
+
case "function":
|
|
1464
|
+
return n.markEnd(Ge(), C);
|
|
1465
|
+
case "if":
|
|
1466
|
+
return n.markEnd(mt(), C);
|
|
1467
|
+
case "return":
|
|
1468
|
+
return n.markEnd(vt(), C);
|
|
1469
|
+
case "switch":
|
|
1470
|
+
return n.markEnd(bt(), C);
|
|
1471
|
+
case "throw":
|
|
1472
|
+
return n.markEnd(Dt(), C);
|
|
1473
|
+
case "try":
|
|
1474
|
+
return n.markEnd(Bt(), C);
|
|
1475
|
+
case "var":
|
|
1476
|
+
return n.markEnd(ct(), C);
|
|
1477
|
+
case "while":
|
|
1478
|
+
return n.markEnd(dt(), C);
|
|
1479
|
+
case "with":
|
|
1480
|
+
return n.markEnd(St(), C);
|
|
1481
|
+
}
|
|
1482
|
+
return t = te(), t.type === E.Identifier && _(":") ? (N(), l = "$" + t.name, Object.prototype.hasOwnProperty.call(p.labelSet, l) && P({}, a.Redeclaration, "Label", t.name), p.labelSet[l] = !0, u = he(), delete p.labelSet[l], n.markEnd(n.createLabeledStatement(t, u), C)) : (pe(), n.markEnd(n.createExpressionStatement(t), C));
|
|
1483
|
+
}
|
|
1484
|
+
function Oe() {
|
|
1485
|
+
var e, t = [], u, l, C, x, R, W, ue, re;
|
|
1486
|
+
for (re = i, T("{"); r < h && !(i.type !== y.StringLiteral || (u = i, e = Ce(), t.push(e), e.expression.type !== E.Literal)); )
|
|
1487
|
+
l = s.slice(u.start + 1, u.end - 1), l === "use strict" ? (c = !0, C && G(C, a.StrictOctalLiteral)) : !C && u.octal && (C = u);
|
|
1488
|
+
for (x = p.labelSet, R = p.inIteration, W = p.inSwitch, ue = p.inFunctionBody, p.labelSet = {}, p.inIteration = !1, p.inSwitch = !1, p.inFunctionBody = !0; r < h && !(_("}") || (e = Ce(), typeof e > "u")); )
|
|
1489
|
+
t.push(e);
|
|
1490
|
+
return T("}"), p.labelSet = x, p.inIteration = R, p.inSwitch = W, p.inFunctionBody = ue, n.markEnd(n.createBlockStatement(t), re);
|
|
1491
|
+
}
|
|
1492
|
+
function He(e) {
|
|
1493
|
+
var t, u = [], l, C, x, R, W;
|
|
1494
|
+
if (T("("), !_(")"))
|
|
1495
|
+
for (x = {}; r < h && (l = i, t = me(), R = "$" + l.value, c ? (J(l.value) && (C = l, W = a.StrictParamName), Object.prototype.hasOwnProperty.call(x, R) && (C = l, W = a.StrictParamDupe)) : e || (J(l.value) ? (e = l, W = a.StrictParamName) : Y(l.value) ? (e = l, W = a.StrictReservedWord) : Object.prototype.hasOwnProperty.call(x, R) && (e = l, W = a.StrictParamDupe)), u.push(t), x[R] = !0, !_(")")); )
|
|
1496
|
+
T(",");
|
|
1497
|
+
return T(")"), {
|
|
1498
|
+
params: u,
|
|
1499
|
+
stricted: C,
|
|
1500
|
+
firstRestricted: e,
|
|
1501
|
+
message: W
|
|
1502
|
+
};
|
|
1503
|
+
}
|
|
1504
|
+
function Ge() {
|
|
1505
|
+
var e, t = [], u, l, C, x, R, W, ue, re;
|
|
1506
|
+
return re = i, Z("function"), l = i, e = me(), c ? J(l.value) && G(l, a.StrictFunctionName) : J(l.value) ? (R = l, W = a.StrictFunctionName) : Y(l.value) && (R = l, W = a.StrictReservedWord), x = He(R), t = x.params, C = x.stricted, R = x.firstRestricted, x.message && (W = x.message), ue = c, u = Oe(), c && R && P(R, W), c && C && G(C, W), c = ue, n.markEnd(n.createFunctionDeclaration(e, t, [], u), re);
|
|
1507
|
+
}
|
|
1508
|
+
function It() {
|
|
1509
|
+
var e, t = null, u, l, C, x, R = [], W, ue, re;
|
|
1510
|
+
return re = i, Z("function"), _("(") || (e = i, t = me(), c ? J(e.value) && G(e, a.StrictFunctionName) : J(e.value) ? (l = e, C = a.StrictFunctionName) : Y(e.value) && (l = e, C = a.StrictReservedWord)), x = He(l), R = x.params, u = x.stricted, l = x.firstRestricted, x.message && (C = x.message), ue = c, W = Oe(), c && l && P(l, C), c && u && G(u, C), c = ue, n.markEnd(n.createFunctionExpression(t, R, [], W), re);
|
|
1511
|
+
}
|
|
1512
|
+
function Ce() {
|
|
1513
|
+
if (i.type === y.Keyword)
|
|
1514
|
+
switch (i.value) {
|
|
1515
|
+
case "const":
|
|
1516
|
+
case "let":
|
|
1517
|
+
return ft(i.value);
|
|
1518
|
+
case "function":
|
|
1519
|
+
return Ge();
|
|
1520
|
+
default:
|
|
1521
|
+
return he();
|
|
1522
|
+
}
|
|
1523
|
+
if (i.type !== y.EOF)
|
|
1524
|
+
return he();
|
|
1525
|
+
}
|
|
1526
|
+
function wt() {
|
|
1527
|
+
for (var e, t = [], u, l, C; r < h && (u = i, !(u.type !== y.StringLiteral || (e = Ce(), t.push(e), e.expression.type !== E.Literal))); )
|
|
1528
|
+
l = s.slice(u.start + 1, u.end - 1), l === "use strict" ? (c = !0, C && G(C, a.StrictOctalLiteral)) : !C && u.octal && (C = u);
|
|
1529
|
+
for (; r < h && (e = Ce(), !(typeof e > "u")); )
|
|
1530
|
+
t.push(e);
|
|
1531
|
+
return t;
|
|
1532
|
+
}
|
|
1533
|
+
function _t() {
|
|
1534
|
+
var e, t;
|
|
1535
|
+
return A(), we(), t = i, c = !1, e = wt(), n.markEnd(n.createProgram(e), t);
|
|
1536
|
+
}
|
|
1537
|
+
function We() {
|
|
1538
|
+
var e, t, u, l = [];
|
|
1539
|
+
for (e = 0; e < f.tokens.length; ++e)
|
|
1540
|
+
t = f.tokens[e], u = {
|
|
1541
|
+
type: t.type,
|
|
1542
|
+
value: t.value
|
|
1543
|
+
}, f.range && (u.range = t.range), f.loc && (u.loc = t.loc), l.push(u);
|
|
1544
|
+
f.tokens = l;
|
|
1545
|
+
}
|
|
1546
|
+
function Tt(e, t) {
|
|
1547
|
+
var u, l, C;
|
|
1548
|
+
u = String, typeof e != "string" && !(e instanceof String) && (e = u(e)), n = m, s = e, r = 0, g = s.length > 0 ? 1 : 0, b = 0, h = s.length, i = null, p = {
|
|
1549
|
+
allowIn: !0,
|
|
1550
|
+
labelSet: {},
|
|
1551
|
+
inFunctionBody: !1,
|
|
1552
|
+
inIteration: !1,
|
|
1553
|
+
inSwitch: !1,
|
|
1554
|
+
lastCommentStart: -1
|
|
1555
|
+
}, f = {}, t = t || {}, t.tokens = !0, f.tokens = [], f.tokenize = !0, f.openParenToken = -1, f.openCurlyToken = -1, f.range = typeof t.range == "boolean" && t.range, f.loc = typeof t.loc == "boolean" && t.loc, typeof t.comment == "boolean" && t.comment && (f.comments = []), typeof t.tolerant == "boolean" && t.tolerant && (f.errors = []);
|
|
1556
|
+
try {
|
|
1557
|
+
if (we(), i.type === y.EOF)
|
|
1558
|
+
return f.tokens;
|
|
1559
|
+
for (l = N(); i.type !== y.EOF; )
|
|
1560
|
+
try {
|
|
1561
|
+
l = N();
|
|
1562
|
+
} catch (x) {
|
|
1563
|
+
if (l = i, f.errors) {
|
|
1564
|
+
f.errors.push(x);
|
|
1565
|
+
break;
|
|
1566
|
+
} else
|
|
1567
|
+
throw x;
|
|
1568
|
+
}
|
|
1569
|
+
We(), C = f.tokens, typeof f.comments < "u" && (C.comments = f.comments), typeof f.errors < "u" && (C.errors = f.errors);
|
|
1570
|
+
} catch (x) {
|
|
1571
|
+
throw x;
|
|
1572
|
+
} finally {
|
|
1573
|
+
f = {};
|
|
1574
|
+
}
|
|
1575
|
+
return C;
|
|
1576
|
+
}
|
|
1577
|
+
function Ot(e, t) {
|
|
1578
|
+
var u, l;
|
|
1579
|
+
l = String, typeof e != "string" && !(e instanceof String) && (e = l(e)), n = m, s = e, r = 0, g = s.length > 0 ? 1 : 0, b = 0, h = s.length, i = null, p = {
|
|
1580
|
+
allowIn: !0,
|
|
1581
|
+
labelSet: {},
|
|
1582
|
+
inFunctionBody: !1,
|
|
1583
|
+
inIteration: !1,
|
|
1584
|
+
inSwitch: !1,
|
|
1585
|
+
lastCommentStart: -1
|
|
1586
|
+
}, f = {}, typeof t < "u" && (f.range = typeof t.range == "boolean" && t.range, f.loc = typeof t.loc == "boolean" && t.loc, f.attachComment = typeof t.attachComment == "boolean" && t.attachComment, f.loc && t.source !== null && t.source !== void 0 && (f.source = l(t.source)), typeof t.tokens == "boolean" && t.tokens && (f.tokens = []), typeof t.comment == "boolean" && t.comment && (f.comments = []), typeof t.tolerant == "boolean" && t.tolerant && (f.errors = []), f.attachComment && (f.range = !0, f.comments = [], f.bottomRightStack = [], f.trailingComments = [], f.leadingComments = []));
|
|
1587
|
+
try {
|
|
1588
|
+
u = _t(), typeof f.comments < "u" && (u.comments = f.comments), typeof f.tokens < "u" && (We(), u.tokens = f.tokens), typeof f.errors < "u" && (u.errors = f.errors);
|
|
1589
|
+
} catch (C) {
|
|
1590
|
+
throw C;
|
|
1591
|
+
} finally {
|
|
1592
|
+
f = {};
|
|
1593
|
+
}
|
|
1594
|
+
return u;
|
|
1595
|
+
}
|
|
1596
|
+
S.version = "1.2.2", S.tokenize = Tt, S.parse = Ot, S.Syntax = function() {
|
|
1597
|
+
var e, t = {};
|
|
1598
|
+
typeof Object.create == "function" && (t = /* @__PURE__ */ Object.create(null));
|
|
1599
|
+
for (e in E)
|
|
1600
|
+
E.hasOwnProperty(e) && (t[e] = E[e]);
|
|
1601
|
+
return typeof Object.freeze == "function" && Object.freeze(t), t;
|
|
1602
|
+
}();
|
|
1603
|
+
});
|
|
1604
|
+
}, {}], 1: [function(O, M, B) {
|
|
1605
|
+
(function(S) {
|
|
1606
|
+
var y = function() {
|
|
1607
|
+
var D = {
|
|
1608
|
+
trace: function() {
|
|
1609
|
+
},
|
|
1610
|
+
yy: {},
|
|
1611
|
+
symbols_: { error: 2, JSON_PATH: 3, DOLLAR: 4, PATH_COMPONENTS: 5, LEADING_CHILD_MEMBER_EXPRESSION: 6, PATH_COMPONENT: 7, MEMBER_COMPONENT: 8, SUBSCRIPT_COMPONENT: 9, CHILD_MEMBER_COMPONENT: 10, DESCENDANT_MEMBER_COMPONENT: 11, DOT: 12, MEMBER_EXPRESSION: 13, DOT_DOT: 14, STAR: 15, IDENTIFIER: 16, SCRIPT_EXPRESSION: 17, INTEGER: 18, END: 19, CHILD_SUBSCRIPT_COMPONENT: 20, DESCENDANT_SUBSCRIPT_COMPONENT: 21, "[": 22, SUBSCRIPT: 23, "]": 24, SUBSCRIPT_EXPRESSION: 25, SUBSCRIPT_EXPRESSION_LIST: 26, SUBSCRIPT_EXPRESSION_LISTABLE: 27, ",": 28, STRING_LITERAL: 29, ARRAY_SLICE: 30, FILTER_EXPRESSION: 31, QQ_STRING: 32, Q_STRING: 33, $accept: 0, $end: 1 },
|
|
1612
|
+
terminals_: { 2: "error", 4: "DOLLAR", 12: "DOT", 14: "DOT_DOT", 15: "STAR", 16: "IDENTIFIER", 17: "SCRIPT_EXPRESSION", 18: "INTEGER", 19: "END", 22: "[", 24: "]", 28: ",", 30: "ARRAY_SLICE", 31: "FILTER_EXPRESSION", 32: "QQ_STRING", 33: "Q_STRING" },
|
|
1613
|
+
productions_: [0, [3, 1], [3, 2], [3, 1], [3, 2], [5, 1], [5, 2], [7, 1], [7, 1], [8, 1], [8, 1], [10, 2], [6, 1], [11, 2], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [9, 1], [9, 1], [20, 3], [21, 4], [23, 1], [23, 1], [26, 1], [26, 3], [27, 1], [27, 1], [27, 1], [25, 1], [25, 1], [25, 1], [29, 1], [29, 1]],
|
|
1614
|
+
performAction: function(o, m, s, c, r, g, b) {
|
|
1615
|
+
c.ast || (c.ast = v, v.initialize());
|
|
1616
|
+
var h = g.length - 1;
|
|
1617
|
+
switch (r) {
|
|
1618
|
+
case 1:
|
|
1619
|
+
return c.ast.set({ expression: { type: "root", value: g[h] } }), c.ast.unshift(), c.ast.yield();
|
|
1620
|
+
case 2:
|
|
1621
|
+
return c.ast.set({ expression: { type: "root", value: g[h - 1] } }), c.ast.unshift(), c.ast.yield();
|
|
1622
|
+
case 3:
|
|
1623
|
+
return c.ast.unshift(), c.ast.yield();
|
|
1624
|
+
case 4:
|
|
1625
|
+
return c.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: g[h - 1] } }), c.ast.unshift(), c.ast.yield();
|
|
1626
|
+
case 5:
|
|
1627
|
+
break;
|
|
1628
|
+
case 6:
|
|
1629
|
+
break;
|
|
1630
|
+
case 7:
|
|
1631
|
+
c.ast.set({ operation: "member" }), c.ast.push();
|
|
1632
|
+
break;
|
|
1633
|
+
case 8:
|
|
1634
|
+
c.ast.set({ operation: "subscript" }), c.ast.push();
|
|
1635
|
+
break;
|
|
1636
|
+
case 9:
|
|
1637
|
+
c.ast.set({ scope: "child" });
|
|
1638
|
+
break;
|
|
1639
|
+
case 10:
|
|
1640
|
+
c.ast.set({ scope: "descendant" });
|
|
1641
|
+
break;
|
|
1642
|
+
case 11:
|
|
1643
|
+
break;
|
|
1644
|
+
case 12:
|
|
1645
|
+
c.ast.set({ scope: "child", operation: "member" });
|
|
1646
|
+
break;
|
|
1647
|
+
case 13:
|
|
1648
|
+
break;
|
|
1649
|
+
case 14:
|
|
1650
|
+
c.ast.set({ expression: { type: "wildcard", value: g[h] } });
|
|
1651
|
+
break;
|
|
1652
|
+
case 15:
|
|
1653
|
+
c.ast.set({ expression: { type: "identifier", value: g[h] } });
|
|
1654
|
+
break;
|
|
1655
|
+
case 16:
|
|
1656
|
+
c.ast.set({ expression: { type: "script_expression", value: g[h] } });
|
|
1657
|
+
break;
|
|
1658
|
+
case 17:
|
|
1659
|
+
c.ast.set({ expression: { type: "numeric_literal", value: parseInt(g[h]) } });
|
|
1660
|
+
break;
|
|
1661
|
+
case 18:
|
|
1662
|
+
break;
|
|
1663
|
+
case 19:
|
|
1664
|
+
c.ast.set({ scope: "child" });
|
|
1665
|
+
break;
|
|
1666
|
+
case 20:
|
|
1667
|
+
c.ast.set({ scope: "descendant" });
|
|
1668
|
+
break;
|
|
1669
|
+
case 21:
|
|
1670
|
+
break;
|
|
1671
|
+
case 22:
|
|
1672
|
+
break;
|
|
1673
|
+
case 23:
|
|
1674
|
+
break;
|
|
1675
|
+
case 24:
|
|
1676
|
+
g[h].length > 1 ? c.ast.set({ expression: { type: "union", value: g[h] } }) : this.$ = g[h];
|
|
1677
|
+
break;
|
|
1678
|
+
case 25:
|
|
1679
|
+
this.$ = [g[h]];
|
|
1680
|
+
break;
|
|
1681
|
+
case 26:
|
|
1682
|
+
this.$ = g[h - 2].concat(g[h]);
|
|
1683
|
+
break;
|
|
1684
|
+
case 27:
|
|
1685
|
+
this.$ = { expression: { type: "numeric_literal", value: parseInt(g[h]) } }, c.ast.set(this.$);
|
|
1686
|
+
break;
|
|
1687
|
+
case 28:
|
|
1688
|
+
this.$ = { expression: { type: "string_literal", value: g[h] } }, c.ast.set(this.$);
|
|
1689
|
+
break;
|
|
1690
|
+
case 29:
|
|
1691
|
+
this.$ = { expression: { type: "slice", value: g[h] } }, c.ast.set(this.$);
|
|
1692
|
+
break;
|
|
1693
|
+
case 30:
|
|
1694
|
+
this.$ = { expression: { type: "wildcard", value: g[h] } }, c.ast.set(this.$);
|
|
1695
|
+
break;
|
|
1696
|
+
case 31:
|
|
1697
|
+
this.$ = { expression: { type: "script_expression", value: g[h] } }, c.ast.set(this.$);
|
|
1698
|
+
break;
|
|
1699
|
+
case 32:
|
|
1700
|
+
this.$ = { expression: { type: "filter_expression", value: g[h] } }, c.ast.set(this.$);
|
|
1701
|
+
break;
|
|
1702
|
+
case 33:
|
|
1703
|
+
this.$ = g[h];
|
|
1704
|
+
break;
|
|
1705
|
+
case 34:
|
|
1706
|
+
this.$ = g[h];
|
|
1707
|
+
break;
|
|
1708
|
+
}
|
|
1709
|
+
},
|
|
1710
|
+
table: [{ 3: 1, 4: [1, 2], 6: 3, 13: 4, 15: [1, 5], 16: [1, 6], 17: [1, 7], 18: [1, 8], 19: [1, 9] }, { 1: [3] }, { 1: [2, 1], 5: 10, 7: 11, 8: 12, 9: 13, 10: 14, 11: 15, 12: [1, 18], 14: [1, 19], 20: 16, 21: 17, 22: [1, 20] }, { 1: [2, 3], 5: 21, 7: 11, 8: 12, 9: 13, 10: 14, 11: 15, 12: [1, 18], 14: [1, 19], 20: 16, 21: 17, 22: [1, 20] }, { 1: [2, 12], 12: [2, 12], 14: [2, 12], 22: [2, 12] }, { 1: [2, 14], 12: [2, 14], 14: [2, 14], 22: [2, 14] }, { 1: [2, 15], 12: [2, 15], 14: [2, 15], 22: [2, 15] }, { 1: [2, 16], 12: [2, 16], 14: [2, 16], 22: [2, 16] }, { 1: [2, 17], 12: [2, 17], 14: [2, 17], 22: [2, 17] }, { 1: [2, 18], 12: [2, 18], 14: [2, 18], 22: [2, 18] }, { 1: [2, 2], 7: 22, 8: 12, 9: 13, 10: 14, 11: 15, 12: [1, 18], 14: [1, 19], 20: 16, 21: 17, 22: [1, 20] }, { 1: [2, 5], 12: [2, 5], 14: [2, 5], 22: [2, 5] }, { 1: [2, 7], 12: [2, 7], 14: [2, 7], 22: [2, 7] }, { 1: [2, 8], 12: [2, 8], 14: [2, 8], 22: [2, 8] }, { 1: [2, 9], 12: [2, 9], 14: [2, 9], 22: [2, 9] }, { 1: [2, 10], 12: [2, 10], 14: [2, 10], 22: [2, 10] }, { 1: [2, 19], 12: [2, 19], 14: [2, 19], 22: [2, 19] }, { 1: [2, 20], 12: [2, 20], 14: [2, 20], 22: [2, 20] }, { 13: 23, 15: [1, 5], 16: [1, 6], 17: [1, 7], 18: [1, 8], 19: [1, 9] }, { 13: 24, 15: [1, 5], 16: [1, 6], 17: [1, 7], 18: [1, 8], 19: [1, 9], 22: [1, 25] }, { 15: [1, 29], 17: [1, 30], 18: [1, 33], 23: 26, 25: 27, 26: 28, 27: 32, 29: 34, 30: [1, 35], 31: [1, 31], 32: [1, 36], 33: [1, 37] }, { 1: [2, 4], 7: 22, 8: 12, 9: 13, 10: 14, 11: 15, 12: [1, 18], 14: [1, 19], 20: 16, 21: 17, 22: [1, 20] }, { 1: [2, 6], 12: [2, 6], 14: [2, 6], 22: [2, 6] }, { 1: [2, 11], 12: [2, 11], 14: [2, 11], 22: [2, 11] }, { 1: [2, 13], 12: [2, 13], 14: [2, 13], 22: [2, 13] }, { 15: [1, 29], 17: [1, 30], 18: [1, 33], 23: 38, 25: 27, 26: 28, 27: 32, 29: 34, 30: [1, 35], 31: [1, 31], 32: [1, 36], 33: [1, 37] }, { 24: [1, 39] }, { 24: [2, 23] }, { 24: [2, 24], 28: [1, 40] }, { 24: [2, 30] }, { 24: [2, 31] }, { 24: [2, 32] }, { 24: [2, 25], 28: [2, 25] }, { 24: [2, 27], 28: [2, 27] }, { 24: [2, 28], 28: [2, 28] }, { 24: [2, 29], 28: [2, 29] }, { 24: [2, 33], 28: [2, 33] }, { 24: [2, 34], 28: [2, 34] }, { 24: [1, 41] }, { 1: [2, 21], 12: [2, 21], 14: [2, 21], 22: [2, 21] }, { 18: [1, 33], 27: 42, 29: 34, 30: [1, 35], 32: [1, 36], 33: [1, 37] }, { 1: [2, 22], 12: [2, 22], 14: [2, 22], 22: [2, 22] }, { 24: [2, 26], 28: [2, 26] }],
|
|
1711
|
+
defaultActions: { 27: [2, 23], 29: [2, 30], 30: [2, 31], 31: [2, 32] },
|
|
1712
|
+
parseError: function(o, m) {
|
|
1713
|
+
if (m.recoverable)
|
|
1714
|
+
this.trace(o);
|
|
1715
|
+
else
|
|
1716
|
+
throw new Error(o);
|
|
1717
|
+
},
|
|
1718
|
+
parse: function(o) {
|
|
1719
|
+
var m = this, s = [0], c = [null], r = [], g = this.table, b = "", h = 0, n = 0, i = 2, p = 1, f = r.slice.call(arguments, 1);
|
|
1720
|
+
this.lexer.setInput(o), this.lexer.yy = this.yy, this.yy.lexer = this.lexer, this.yy.parser = this, typeof this.lexer.yylloc > "u" && (this.lexer.yylloc = {});
|
|
1721
|
+
var I = this.lexer.yylloc;
|
|
1722
|
+
r.push(I);
|
|
1723
|
+
var L = this.lexer.options && this.lexer.options.ranges;
|
|
1724
|
+
typeof this.yy.parseError == "function" ? this.parseError = this.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
1725
|
+
function U() {
|
|
1726
|
+
var oe;
|
|
1727
|
+
return oe = m.lexer.lex() || p, typeof oe != "number" && (oe = m.symbols_[oe] || oe), oe;
|
|
1728
|
+
}
|
|
1729
|
+
for (var w, q, j, z, V = {}, ae, Y, J, se; ; ) {
|
|
1730
|
+
if (q = s[s.length - 1], this.defaultActions[q] ? j = this.defaultActions[q] : ((w === null || typeof w > "u") && (w = U()), j = g[q] && g[q][w]), typeof j > "u" || !j.length || !j[0]) {
|
|
1731
|
+
var ie = "";
|
|
1732
|
+
se = [];
|
|
1733
|
+
for (ae in g[q])
|
|
1734
|
+
this.terminals_[ae] && ae > i && se.push("'" + this.terminals_[ae] + "'");
|
|
1735
|
+
this.lexer.showPosition ? ie = "Parse error on line " + (h + 1) + `:
|
|
1736
|
+
` + this.lexer.showPosition() + `
|
|
1737
|
+
Expecting ` + se.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : ie = "Parse error on line " + (h + 1) + ": Unexpected " + (w == p ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(ie, {
|
|
1738
|
+
text: this.lexer.match,
|
|
1739
|
+
token: this.terminals_[w] || w,
|
|
1740
|
+
line: this.lexer.yylineno,
|
|
1741
|
+
loc: I,
|
|
1742
|
+
expected: se
|
|
1743
|
+
});
|
|
1744
|
+
}
|
|
1745
|
+
if (j[0] instanceof Array && j.length > 1)
|
|
1746
|
+
throw new Error("Parse Error: multiple actions possible at state: " + q + ", token: " + w);
|
|
1747
|
+
switch (j[0]) {
|
|
1748
|
+
case 1:
|
|
1749
|
+
s.push(w), c.push(this.lexer.yytext), r.push(this.lexer.yylloc), s.push(j[1]), w = null, n = this.lexer.yyleng, b = this.lexer.yytext, h = this.lexer.yylineno, I = this.lexer.yylloc;
|
|
1750
|
+
break;
|
|
1751
|
+
case 2:
|
|
1752
|
+
if (Y = this.productions_[j[1]][1], V.$ = c[c.length - Y], V._$ = {
|
|
1753
|
+
first_line: r[r.length - (Y || 1)].first_line,
|
|
1754
|
+
last_line: r[r.length - 1].last_line,
|
|
1755
|
+
first_column: r[r.length - (Y || 1)].first_column,
|
|
1756
|
+
last_column: r[r.length - 1].last_column
|
|
1757
|
+
}, L && (V._$.range = [
|
|
1758
|
+
r[r.length - (Y || 1)].range[0],
|
|
1759
|
+
r[r.length - 1].range[1]
|
|
1760
|
+
]), z = this.performAction.apply(V, [
|
|
1761
|
+
b,
|
|
1762
|
+
n,
|
|
1763
|
+
h,
|
|
1764
|
+
this.yy,
|
|
1765
|
+
j[1],
|
|
1766
|
+
c,
|
|
1767
|
+
r
|
|
1768
|
+
].concat(f)), typeof z < "u")
|
|
1769
|
+
return z;
|
|
1770
|
+
Y && (s = s.slice(0, -1 * Y * 2), c = c.slice(0, -1 * Y), r = r.slice(0, -1 * Y)), s.push(this.productions_[j[1]][0]), c.push(V.$), r.push(V._$), J = g[s[s.length - 2]][s[s.length - 1]], s.push(J);
|
|
1771
|
+
break;
|
|
1772
|
+
case 3:
|
|
1773
|
+
return !0;
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
return !0;
|
|
1777
|
+
}
|
|
1778
|
+
}, v = {
|
|
1779
|
+
initialize: function() {
|
|
1780
|
+
this._nodes = [], this._node = {}, this._stash = [];
|
|
1781
|
+
},
|
|
1782
|
+
set: function(a) {
|
|
1783
|
+
for (var o in a) this._node[o] = a[o];
|
|
1784
|
+
return this._node;
|
|
1785
|
+
},
|
|
1786
|
+
node: function(a) {
|
|
1787
|
+
return arguments.length && (this._node = a), this._node;
|
|
1788
|
+
},
|
|
1789
|
+
push: function() {
|
|
1790
|
+
this._nodes.push(this._node), this._node = {};
|
|
1791
|
+
},
|
|
1792
|
+
unshift: function() {
|
|
1793
|
+
this._nodes.unshift(this._node), this._node = {};
|
|
1794
|
+
},
|
|
1795
|
+
yield: function() {
|
|
1796
|
+
var a = this._nodes;
|
|
1797
|
+
return this.initialize(), a;
|
|
1798
|
+
}
|
|
1799
|
+
}, E = /* @__PURE__ */ function() {
|
|
1800
|
+
var a = {
|
|
1801
|
+
EOF: 1,
|
|
1802
|
+
parseError: function(m, s) {
|
|
1803
|
+
if (this.yy.parser)
|
|
1804
|
+
this.yy.parser.parseError(m, s);
|
|
1805
|
+
else
|
|
1806
|
+
throw new Error(m);
|
|
1807
|
+
},
|
|
1808
|
+
// resets the lexer, sets new input
|
|
1809
|
+
setInput: function(o) {
|
|
1810
|
+
return this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
1811
|
+
first_line: 1,
|
|
1812
|
+
first_column: 0,
|
|
1813
|
+
last_line: 1,
|
|
1814
|
+
last_column: 0
|
|
1815
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
1816
|
+
},
|
|
1817
|
+
// consumes and returns one char from the input
|
|
1818
|
+
input: function() {
|
|
1819
|
+
var o = this._input[0];
|
|
1820
|
+
this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
|
|
1821
|
+
var m = o.match(/(?:\r\n?|\n).*/g);
|
|
1822
|
+
return m ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
|
|
1823
|
+
},
|
|
1824
|
+
// unshifts one char (or a string) into the input
|
|
1825
|
+
unput: function(o) {
|
|
1826
|
+
var m = o.length, s = o.split(/(?:\r\n?|\n)/g);
|
|
1827
|
+
this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - m - 1), this.offset -= m;
|
|
1828
|
+
var c = this.match.split(/(?:\r\n?|\n)/g);
|
|
1829
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), s.length - 1 && (this.yylineno -= s.length - 1);
|
|
1830
|
+
var r = this.yylloc.range;
|
|
1831
|
+
return this.yylloc = {
|
|
1832
|
+
first_line: this.yylloc.first_line,
|
|
1833
|
+
last_line: this.yylineno + 1,
|
|
1834
|
+
first_column: this.yylloc.first_column,
|
|
1835
|
+
last_column: s ? (s.length === c.length ? this.yylloc.first_column : 0) + c[c.length - s.length].length - s[0].length : this.yylloc.first_column - m
|
|
1836
|
+
}, this.options.ranges && (this.yylloc.range = [r[0], r[0] + this.yyleng - m]), this.yyleng = this.yytext.length, this;
|
|
1837
|
+
},
|
|
1838
|
+
// When called from action, caches matched text and appends it on next action
|
|
1839
|
+
more: function() {
|
|
1840
|
+
return this._more = !0, this;
|
|
1841
|
+
},
|
|
1842
|
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
1843
|
+
reject: function() {
|
|
1844
|
+
if (this.options.backtrack_lexer)
|
|
1845
|
+
this._backtrack = !0;
|
|
1846
|
+
else
|
|
1847
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1848
|
+
` + this.showPosition(), {
|
|
1849
|
+
text: "",
|
|
1850
|
+
token: null,
|
|
1851
|
+
line: this.yylineno
|
|
1852
|
+
});
|
|
1853
|
+
return this;
|
|
1854
|
+
},
|
|
1855
|
+
// retain first n characters of the match
|
|
1856
|
+
less: function(o) {
|
|
1857
|
+
this.unput(this.match.slice(o));
|
|
1858
|
+
},
|
|
1859
|
+
// displays already matched input, i.e. for error messages
|
|
1860
|
+
pastInput: function() {
|
|
1861
|
+
var o = this.matched.substr(0, this.matched.length - this.match.length);
|
|
1862
|
+
return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
|
|
1863
|
+
},
|
|
1864
|
+
// displays upcoming input, i.e. for error messages
|
|
1865
|
+
upcomingInput: function() {
|
|
1866
|
+
var o = this.match;
|
|
1867
|
+
return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
1868
|
+
},
|
|
1869
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
1870
|
+
showPosition: function() {
|
|
1871
|
+
var o = this.pastInput(), m = new Array(o.length + 1).join("-");
|
|
1872
|
+
return o + this.upcomingInput() + `
|
|
1873
|
+
` + m + "^";
|
|
1874
|
+
},
|
|
1875
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
1876
|
+
test_match: function(o, m) {
|
|
1877
|
+
var s, c, r;
|
|
1878
|
+
if (this.options.backtrack_lexer && (r = {
|
|
1879
|
+
yylineno: this.yylineno,
|
|
1880
|
+
yylloc: {
|
|
1881
|
+
first_line: this.yylloc.first_line,
|
|
1882
|
+
last_line: this.last_line,
|
|
1883
|
+
first_column: this.yylloc.first_column,
|
|
1884
|
+
last_column: this.yylloc.last_column
|
|
1885
|
+
},
|
|
1886
|
+
yytext: this.yytext,
|
|
1887
|
+
match: this.match,
|
|
1888
|
+
matches: this.matches,
|
|
1889
|
+
matched: this.matched,
|
|
1890
|
+
yyleng: this.yyleng,
|
|
1891
|
+
offset: this.offset,
|
|
1892
|
+
_more: this._more,
|
|
1893
|
+
_input: this._input,
|
|
1894
|
+
yy: this.yy,
|
|
1895
|
+
conditionStack: this.conditionStack.slice(0),
|
|
1896
|
+
done: this.done
|
|
1897
|
+
}, this.options.ranges && (r.yylloc.range = this.yylloc.range.slice(0))), c = o[0].match(/(?:\r\n?|\n).*/g), c && (this.yylineno += c.length), this.yylloc = {
|
|
1898
|
+
first_line: this.yylloc.last_line,
|
|
1899
|
+
last_line: this.yylineno + 1,
|
|
1900
|
+
first_column: this.yylloc.last_column,
|
|
1901
|
+
last_column: c ? c[c.length - 1].length - c[c.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
|
|
1902
|
+
}, this.yytext += o[0], this.match += o[0], this.matches = o, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(o[0].length), this.matched += o[0], s = this.performAction.call(this, this.yy, this, m, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), s)
|
|
1903
|
+
return s;
|
|
1904
|
+
if (this._backtrack) {
|
|
1905
|
+
for (var g in r)
|
|
1906
|
+
this[g] = r[g];
|
|
1907
|
+
return !1;
|
|
1908
|
+
}
|
|
1909
|
+
return !1;
|
|
1910
|
+
},
|
|
1911
|
+
// return next match in input
|
|
1912
|
+
next: function() {
|
|
1913
|
+
if (this.done)
|
|
1914
|
+
return this.EOF;
|
|
1915
|
+
this._input || (this.done = !0);
|
|
1916
|
+
var o, m, s, c;
|
|
1917
|
+
this._more || (this.yytext = "", this.match = "");
|
|
1918
|
+
for (var r = this._currentRules(), g = 0; g < r.length; g++)
|
|
1919
|
+
if (s = this._input.match(this.rules[r[g]]), s && (!m || s[0].length > m[0].length)) {
|
|
1920
|
+
if (m = s, c = g, this.options.backtrack_lexer) {
|
|
1921
|
+
if (o = this.test_match(s, r[g]), o !== !1)
|
|
1922
|
+
return o;
|
|
1923
|
+
if (this._backtrack) {
|
|
1924
|
+
m = !1;
|
|
1925
|
+
continue;
|
|
1926
|
+
} else
|
|
1927
|
+
return !1;
|
|
1928
|
+
} else if (!this.options.flex)
|
|
1929
|
+
break;
|
|
1930
|
+
}
|
|
1931
|
+
return m ? (o = this.test_match(m, r[c]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
1932
|
+
` + this.showPosition(), {
|
|
1933
|
+
text: "",
|
|
1934
|
+
token: null,
|
|
1935
|
+
line: this.yylineno
|
|
1936
|
+
});
|
|
1937
|
+
},
|
|
1938
|
+
// return next match that has a token
|
|
1939
|
+
lex: function() {
|
|
1940
|
+
var m = this.next();
|
|
1941
|
+
return m || this.lex();
|
|
1942
|
+
},
|
|
1943
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
1944
|
+
begin: function(m) {
|
|
1945
|
+
this.conditionStack.push(m);
|
|
1946
|
+
},
|
|
1947
|
+
// pop the previously active lexer condition state off the condition stack
|
|
1948
|
+
popState: function() {
|
|
1949
|
+
var m = this.conditionStack.length - 1;
|
|
1950
|
+
return m > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
1951
|
+
},
|
|
1952
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
1953
|
+
_currentRules: function() {
|
|
1954
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
1955
|
+
},
|
|
1956
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
1957
|
+
topState: function(m) {
|
|
1958
|
+
return m = this.conditionStack.length - 1 - Math.abs(m || 0), m >= 0 ? this.conditionStack[m] : "INITIAL";
|
|
1959
|
+
},
|
|
1960
|
+
// alias for begin(condition)
|
|
1961
|
+
pushState: function(m) {
|
|
1962
|
+
this.begin(m);
|
|
1963
|
+
},
|
|
1964
|
+
// return the number of states currently on the stack
|
|
1965
|
+
stateStackSize: function() {
|
|
1966
|
+
return this.conditionStack.length;
|
|
1967
|
+
},
|
|
1968
|
+
options: {},
|
|
1969
|
+
performAction: function(m, s, c, r) {
|
|
1970
|
+
switch (c) {
|
|
1971
|
+
case 0:
|
|
1972
|
+
return 4;
|
|
1973
|
+
case 1:
|
|
1974
|
+
return 14;
|
|
1975
|
+
case 2:
|
|
1976
|
+
return 12;
|
|
1977
|
+
case 3:
|
|
1978
|
+
return 15;
|
|
1979
|
+
case 4:
|
|
1980
|
+
return 16;
|
|
1981
|
+
case 5:
|
|
1982
|
+
return 22;
|
|
1983
|
+
case 6:
|
|
1984
|
+
return 24;
|
|
1985
|
+
case 7:
|
|
1986
|
+
return 28;
|
|
1987
|
+
case 8:
|
|
1988
|
+
return 30;
|
|
1989
|
+
case 9:
|
|
1990
|
+
return 18;
|
|
1991
|
+
case 10:
|
|
1992
|
+
return s.yytext = s.yytext.substr(1, s.yyleng - 2), 32;
|
|
1993
|
+
case 11:
|
|
1994
|
+
return s.yytext = s.yytext.substr(1, s.yyleng - 2), 33;
|
|
1995
|
+
case 12:
|
|
1996
|
+
return 17;
|
|
1997
|
+
case 13:
|
|
1998
|
+
return 31;
|
|
1999
|
+
}
|
|
2000
|
+
},
|
|
2001
|
+
rules: [/^(?:\$)/, /^(?:\.\.)/, /^(?:\.)/, /^(?:\*)/, /^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/, /^(?:\[)/, /^(?:\])/, /^(?:,)/, /^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/, /^(?:(-?(?:0|[1-9][0-9]*)))/, /^(?:"(?:\\["bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/, /^(?:'(?:\\['bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/, /^(?:\(.+?\)(?=\]))/, /^(?:\?\(.+?\)(?=\]))/],
|
|
2002
|
+
conditions: { INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], inclusive: !0 } }
|
|
2003
|
+
};
|
|
2004
|
+
return a;
|
|
2005
|
+
}();
|
|
2006
|
+
D.lexer = E;
|
|
2007
|
+
function d() {
|
|
2008
|
+
this.yy = {};
|
|
2009
|
+
}
|
|
2010
|
+
return d.prototype = D, D.Parser = d, new d();
|
|
2011
|
+
}();
|
|
2012
|
+
typeof O < "u" && typeof B < "u" && (B.parser = y, B.Parser = y.Parser, B.parse = function() {
|
|
2013
|
+
return y.parse.apply(y, arguments);
|
|
2014
|
+
}, B.main = function(v) {
|
|
2015
|
+
v[1] || (console.log("Usage: " + v[0] + " FILE"), S.exit(1));
|
|
2016
|
+
var E = O("fs").readFileSync(O("path").normalize(v[1]), "utf8");
|
|
2017
|
+
return B.parser.parse(E);
|
|
2018
|
+
}, typeof M < "u" && O.main === M && B.main(S.argv.slice(1)));
|
|
2019
|
+
}).call(this, O("_process"));
|
|
2020
|
+
}, { _process: 14, fs: 12, path: 13 }], 2: [function(O, M, B) {
|
|
2021
|
+
M.exports = {
|
|
2022
|
+
identifier: "[a-zA-Z_]+[a-zA-Z0-9_]*",
|
|
2023
|
+
integer: "-?(?:0|[1-9][0-9]*)",
|
|
2024
|
+
qq_string: '"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^"\\\\])*"',
|
|
2025
|
+
q_string: "'(?:\\\\['bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^'\\\\])*'"
|
|
2026
|
+
};
|
|
2027
|
+
}, {}], 3: [function(O, M, B) {
|
|
2028
|
+
var S = O("./dict"), y = O("fs"), D = {
|
|
2029
|
+
lex: {
|
|
2030
|
+
macros: {
|
|
2031
|
+
esc: "\\\\",
|
|
2032
|
+
int: S.integer
|
|
2033
|
+
},
|
|
2034
|
+
rules: [
|
|
2035
|
+
["\\$", "return 'DOLLAR'"],
|
|
2036
|
+
["\\.\\.", "return 'DOT_DOT'"],
|
|
2037
|
+
["\\.", "return 'DOT'"],
|
|
2038
|
+
["\\*", "return 'STAR'"],
|
|
2039
|
+
[S.identifier, "return 'IDENTIFIER'"],
|
|
2040
|
+
["\\[", "return '['"],
|
|
2041
|
+
["\\]", "return ']'"],
|
|
2042
|
+
[",", "return ','"],
|
|
2043
|
+
["({int})?\\:({int})?(\\:({int})?)?", "return 'ARRAY_SLICE'"],
|
|
2044
|
+
["{int}", "return 'INTEGER'"],
|
|
2045
|
+
[S.qq_string, "yytext = yytext.substr(1,yyleng-2); return 'QQ_STRING';"],
|
|
2046
|
+
[S.q_string, "yytext = yytext.substr(1,yyleng-2); return 'Q_STRING';"],
|
|
2047
|
+
["\\(.+?\\)(?=\\])", "return 'SCRIPT_EXPRESSION'"],
|
|
2048
|
+
["\\?\\(.+?\\)(?=\\])", "return 'FILTER_EXPRESSION'"]
|
|
2049
|
+
]
|
|
2050
|
+
},
|
|
2051
|
+
start: "JSON_PATH",
|
|
2052
|
+
bnf: {
|
|
2053
|
+
JSON_PATH: [
|
|
2054
|
+
["DOLLAR", 'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],
|
|
2055
|
+
["DOLLAR PATH_COMPONENTS", 'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],
|
|
2056
|
+
["LEADING_CHILD_MEMBER_EXPRESSION", "yy.ast.unshift(); return yy.ast.yield()"],
|
|
2057
|
+
["LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS", 'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()']
|
|
2058
|
+
],
|
|
2059
|
+
PATH_COMPONENTS: [
|
|
2060
|
+
["PATH_COMPONENT", ""],
|
|
2061
|
+
["PATH_COMPONENTS PATH_COMPONENT", ""]
|
|
2062
|
+
],
|
|
2063
|
+
PATH_COMPONENT: [
|
|
2064
|
+
["MEMBER_COMPONENT", 'yy.ast.set({ operation: "member" }); yy.ast.push()'],
|
|
2065
|
+
["SUBSCRIPT_COMPONENT", 'yy.ast.set({ operation: "subscript" }); yy.ast.push() ']
|
|
2066
|
+
],
|
|
2067
|
+
MEMBER_COMPONENT: [
|
|
2068
|
+
["CHILD_MEMBER_COMPONENT", 'yy.ast.set({ scope: "child" })'],
|
|
2069
|
+
["DESCENDANT_MEMBER_COMPONENT", 'yy.ast.set({ scope: "descendant" })']
|
|
2070
|
+
],
|
|
2071
|
+
CHILD_MEMBER_COMPONENT: [
|
|
2072
|
+
["DOT MEMBER_EXPRESSION", ""]
|
|
2073
|
+
],
|
|
2074
|
+
LEADING_CHILD_MEMBER_EXPRESSION: [
|
|
2075
|
+
["MEMBER_EXPRESSION", 'yy.ast.set({ scope: "child", operation: "member" })']
|
|
2076
|
+
],
|
|
2077
|
+
DESCENDANT_MEMBER_COMPONENT: [
|
|
2078
|
+
["DOT_DOT MEMBER_EXPRESSION", ""]
|
|
2079
|
+
],
|
|
2080
|
+
MEMBER_EXPRESSION: [
|
|
2081
|
+
["STAR", 'yy.ast.set({ expression: { type: "wildcard", value: $1 } })'],
|
|
2082
|
+
["IDENTIFIER", 'yy.ast.set({ expression: { type: "identifier", value: $1 } })'],
|
|
2083
|
+
["SCRIPT_EXPRESSION", 'yy.ast.set({ expression: { type: "script_expression", value: $1 } })'],
|
|
2084
|
+
["INTEGER", 'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })'],
|
|
2085
|
+
["END", ""]
|
|
2086
|
+
],
|
|
2087
|
+
SUBSCRIPT_COMPONENT: [
|
|
2088
|
+
["CHILD_SUBSCRIPT_COMPONENT", 'yy.ast.set({ scope: "child" })'],
|
|
2089
|
+
["DESCENDANT_SUBSCRIPT_COMPONENT", 'yy.ast.set({ scope: "descendant" })']
|
|
2090
|
+
],
|
|
2091
|
+
CHILD_SUBSCRIPT_COMPONENT: [
|
|
2092
|
+
["[ SUBSCRIPT ]", ""]
|
|
2093
|
+
],
|
|
2094
|
+
DESCENDANT_SUBSCRIPT_COMPONENT: [
|
|
2095
|
+
["DOT_DOT [ SUBSCRIPT ]", ""]
|
|
2096
|
+
],
|
|
2097
|
+
SUBSCRIPT: [
|
|
2098
|
+
["SUBSCRIPT_EXPRESSION", ""],
|
|
2099
|
+
["SUBSCRIPT_EXPRESSION_LIST", '$1.length > 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ = $1']
|
|
2100
|
+
],
|
|
2101
|
+
SUBSCRIPT_EXPRESSION_LIST: [
|
|
2102
|
+
["SUBSCRIPT_EXPRESSION_LISTABLE", "$$ = [$1]"],
|
|
2103
|
+
["SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE", "$$ = $1.concat($3)"]
|
|
2104
|
+
],
|
|
2105
|
+
SUBSCRIPT_EXPRESSION_LISTABLE: [
|
|
2106
|
+
["INTEGER", '$$ = { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)'],
|
|
2107
|
+
["STRING_LITERAL", '$$ = { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)'],
|
|
2108
|
+
["ARRAY_SLICE", '$$ = { expression: { type: "slice", value: $1 } }; yy.ast.set($$)']
|
|
2109
|
+
],
|
|
2110
|
+
SUBSCRIPT_EXPRESSION: [
|
|
2111
|
+
["STAR", '$$ = { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)'],
|
|
2112
|
+
["SCRIPT_EXPRESSION", '$$ = { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)'],
|
|
2113
|
+
["FILTER_EXPRESSION", '$$ = { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)']
|
|
2114
|
+
],
|
|
2115
|
+
STRING_LITERAL: [
|
|
2116
|
+
["QQ_STRING", "$$ = $1"],
|
|
2117
|
+
["Q_STRING", "$$ = $1"]
|
|
2118
|
+
]
|
|
2119
|
+
}
|
|
2120
|
+
};
|
|
2121
|
+
y.readFileSync && (D.moduleInclude = y.readFileSync(O.resolve("../include/module.js")), D.actionInclude = y.readFileSync(O.resolve("../include/action.js"))), M.exports = D;
|
|
2122
|
+
}, { "./dict": 2, fs: 12 }], 4: [function(O, M, B) {
|
|
2123
|
+
var S = O("./aesprim"), y = O("./slice"), D = O("static-eval"), v = O("underscore").uniq, E = function() {
|
|
2124
|
+
return this.initialize.apply(this, arguments);
|
|
2125
|
+
};
|
|
2126
|
+
E.prototype.initialize = function() {
|
|
2127
|
+
this.traverse = m(!0), this.descend = m();
|
|
2128
|
+
}, E.prototype.keys = Object.keys, E.prototype.resolve = function(h) {
|
|
2129
|
+
var n = [h.operation, h.scope, h.expression.type].join("-"), i = this._fns[n];
|
|
2130
|
+
if (!i) throw new Error("couldn't resolve key: " + n);
|
|
2131
|
+
return i.bind(this);
|
|
2132
|
+
}, E.prototype.register = function(h, n) {
|
|
2133
|
+
if (!n instanceof Function)
|
|
2134
|
+
throw new Error("handler must be a function");
|
|
2135
|
+
this._fns[h] = n;
|
|
2136
|
+
}, E.prototype._fns = {
|
|
2137
|
+
"member-child-identifier": function(h, n) {
|
|
2138
|
+
var i = h.expression.value, p = n.value;
|
|
2139
|
+
if (p instanceof Object && i in p)
|
|
2140
|
+
return [{ value: p[i], path: n.path.concat(i) }];
|
|
2141
|
+
},
|
|
2142
|
+
"member-descendant-identifier": c(function(h, n, i) {
|
|
2143
|
+
return h == i;
|
|
2144
|
+
}),
|
|
2145
|
+
"subscript-child-numeric_literal": s(function(h, n, i) {
|
|
2146
|
+
return h === i;
|
|
2147
|
+
}),
|
|
2148
|
+
"member-child-numeric_literal": s(function(h, n, i) {
|
|
2149
|
+
return String(h) === String(i);
|
|
2150
|
+
}),
|
|
2151
|
+
"subscript-descendant-numeric_literal": c(function(h, n, i) {
|
|
2152
|
+
return h === i;
|
|
2153
|
+
}),
|
|
2154
|
+
"member-child-wildcard": s(function() {
|
|
2155
|
+
return !0;
|
|
2156
|
+
}),
|
|
2157
|
+
"member-descendant-wildcard": c(function() {
|
|
2158
|
+
return !0;
|
|
2159
|
+
}),
|
|
2160
|
+
"subscript-descendant-wildcard": c(function() {
|
|
2161
|
+
return !0;
|
|
2162
|
+
}),
|
|
2163
|
+
"subscript-child-wildcard": s(function() {
|
|
2164
|
+
return !0;
|
|
2165
|
+
}),
|
|
2166
|
+
"subscript-child-slice": function(h, n) {
|
|
2167
|
+
if (a(n.value)) {
|
|
2168
|
+
var i = h.expression.value.split(":").map(b), p = n.value.map(function(f, I) {
|
|
2169
|
+
return { value: f, path: n.path.concat(I) };
|
|
2170
|
+
});
|
|
2171
|
+
return y.apply(null, [p].concat(i));
|
|
2172
|
+
}
|
|
2173
|
+
},
|
|
2174
|
+
"subscript-child-union": function(h, n) {
|
|
2175
|
+
var i = [];
|
|
2176
|
+
return h.expression.value.forEach(function(p) {
|
|
2177
|
+
var f = { operation: "subscript", scope: "child", expression: p.expression }, I = this.resolve(f), L = I(f, n);
|
|
2178
|
+
L && (i = i.concat(L));
|
|
2179
|
+
}, this), g(i);
|
|
2180
|
+
},
|
|
2181
|
+
"subscript-descendant-union": function(h, n, i) {
|
|
2182
|
+
var p = O(".."), f = this, I = [], L = p.nodes(n, "$..*").slice(1);
|
|
2183
|
+
return L.forEach(function(U) {
|
|
2184
|
+
I.length >= i || h.expression.value.forEach(function(w) {
|
|
2185
|
+
var q = { operation: "subscript", scope: "child", expression: w.expression }, j = f.resolve(q), z = j(q, U);
|
|
2186
|
+
I = I.concat(z);
|
|
2187
|
+
});
|
|
2188
|
+
}), g(I);
|
|
2189
|
+
},
|
|
2190
|
+
"subscript-child-filter_expression": function(h, n, i) {
|
|
2191
|
+
var p = h.expression.value.slice(2, -1), f = S.parse(p).body[0].expression, I = function(L, U) {
|
|
2192
|
+
return r(f, { "@": U });
|
|
2193
|
+
};
|
|
2194
|
+
return this.descend(n, null, I, i);
|
|
2195
|
+
},
|
|
2196
|
+
"subscript-descendant-filter_expression": function(h, n, i) {
|
|
2197
|
+
var p = h.expression.value.slice(2, -1), f = S.parse(p).body[0].expression, I = function(L, U) {
|
|
2198
|
+
return r(f, { "@": U });
|
|
2199
|
+
};
|
|
2200
|
+
return this.traverse(n, null, I, i);
|
|
2201
|
+
},
|
|
2202
|
+
"subscript-child-script_expression": function(h, n) {
|
|
2203
|
+
var i = h.expression.value.slice(1, -1);
|
|
2204
|
+
return d(n, i, "$[{{value}}]");
|
|
2205
|
+
},
|
|
2206
|
+
"member-child-script_expression": function(h, n) {
|
|
2207
|
+
var i = h.expression.value.slice(1, -1);
|
|
2208
|
+
return d(n, i, "$.{{value}}");
|
|
2209
|
+
},
|
|
2210
|
+
"member-descendant-script_expression": function(h, n) {
|
|
2211
|
+
var i = h.expression.value.slice(1, -1);
|
|
2212
|
+
return d(n, i, "$..value");
|
|
2213
|
+
}
|
|
2214
|
+
}, E.prototype._fns["subscript-child-string_literal"] = E.prototype._fns["member-child-identifier"], E.prototype._fns["member-descendant-numeric_literal"] = E.prototype._fns["subscript-descendant-string_literal"] = E.prototype._fns["member-descendant-identifier"];
|
|
2215
|
+
function d(h, n, i) {
|
|
2216
|
+
var p = O("./index"), f = S.parse(n).body[0].expression, I = r(f, { "@": h.value }), L = i.replace(/\{\{\s*value\s*\}\}/g, I), U = p.nodes(h.value, L);
|
|
2217
|
+
return U.forEach(function(w) {
|
|
2218
|
+
w.path = h.path.concat(w.path.slice(1));
|
|
2219
|
+
}), U;
|
|
2220
|
+
}
|
|
2221
|
+
function a(h) {
|
|
2222
|
+
return Array.isArray(h);
|
|
2223
|
+
}
|
|
2224
|
+
function o(h) {
|
|
2225
|
+
return h && !(h instanceof Array) && h instanceof Object;
|
|
2226
|
+
}
|
|
2227
|
+
function m(h) {
|
|
2228
|
+
return function(n, i, p, f) {
|
|
2229
|
+
var I = n.value, L = n.path, U = [], w = (function(q, j) {
|
|
2230
|
+
a(q) ? (q.forEach(function(z, V) {
|
|
2231
|
+
U.length >= f || p(V, z, i) && U.push({ path: j.concat(V), value: z });
|
|
2232
|
+
}), q.forEach(function(z, V) {
|
|
2233
|
+
U.length >= f || h && w(z, j.concat(V));
|
|
2234
|
+
})) : o(q) && (this.keys(q).forEach(function(z) {
|
|
2235
|
+
U.length >= f || p(z, q[z], i) && U.push({ path: j.concat(z), value: q[z] });
|
|
2236
|
+
}), this.keys(q).forEach(function(z) {
|
|
2237
|
+
U.length >= f || h && w(q[z], j.concat(z));
|
|
2238
|
+
}));
|
|
2239
|
+
}).bind(this);
|
|
2240
|
+
return w(I, L), U;
|
|
2241
|
+
};
|
|
2242
|
+
}
|
|
2243
|
+
function s(h) {
|
|
2244
|
+
return function(n, i, p) {
|
|
2245
|
+
return this.descend(i, n.expression.value, h, p);
|
|
2246
|
+
};
|
|
2247
|
+
}
|
|
2248
|
+
function c(h) {
|
|
2249
|
+
return function(n, i, p) {
|
|
2250
|
+
return this.traverse(i, n.expression.value, h, p);
|
|
2251
|
+
};
|
|
2252
|
+
}
|
|
2253
|
+
function r() {
|
|
2254
|
+
try {
|
|
2255
|
+
return D.apply(this, arguments);
|
|
2256
|
+
} catch {
|
|
2257
|
+
}
|
|
2258
|
+
}
|
|
2259
|
+
function g(h) {
|
|
2260
|
+
return h = h.filter(function(n) {
|
|
2261
|
+
return n;
|
|
2262
|
+
}), v(
|
|
2263
|
+
h,
|
|
2264
|
+
function(n) {
|
|
2265
|
+
return n.path.map(function(i) {
|
|
2266
|
+
return String(i).replace("-", "--");
|
|
2267
|
+
}).join("-");
|
|
2268
|
+
}
|
|
2269
|
+
);
|
|
2270
|
+
}
|
|
2271
|
+
function b(h) {
|
|
2272
|
+
var n = String(h);
|
|
2273
|
+
return n.match(/^-?[0-9]+$/) ? parseInt(n) : null;
|
|
2274
|
+
}
|
|
2275
|
+
M.exports = E;
|
|
2276
|
+
}, { "..": "jsonpath", "./aesprim": "./aesprim", "./index": 5, "./slice": 7, "static-eval": 15, underscore: 12 }], 5: [function(O, M, B) {
|
|
2277
|
+
var S = O("assert"), y = O("./dict"), D = O("./parser"), v = O("./handlers"), E = function() {
|
|
2278
|
+
this.initialize.apply(this, arguments);
|
|
2279
|
+
};
|
|
2280
|
+
E.prototype.initialize = function() {
|
|
2281
|
+
this.parser = new D(), this.handlers = new v();
|
|
2282
|
+
}, E.prototype.parse = function(o) {
|
|
2283
|
+
return S.ok(d(o), "we need a path"), this.parser.parse(o);
|
|
2284
|
+
}, E.prototype.parent = function(o, m) {
|
|
2285
|
+
S.ok(o instanceof Object, "obj needs to be an object"), S.ok(m, "we need a path");
|
|
2286
|
+
var s = this.nodes(o, m)[0];
|
|
2287
|
+
return s.path.pop(), this.value(o, s.path);
|
|
2288
|
+
}, E.prototype.apply = function(o, m, s) {
|
|
2289
|
+
S.ok(o instanceof Object, "obj needs to be an object"), S.ok(m, "we need a path"), S.equal(typeof s, "function", "fn needs to be function");
|
|
2290
|
+
var c = this.nodes(o, m).sort(function(r, g) {
|
|
2291
|
+
return g.path.length - r.path.length;
|
|
2292
|
+
});
|
|
2293
|
+
return c.forEach(function(r) {
|
|
2294
|
+
var g = r.path.pop(), b = this.value(o, this.stringify(r.path)), h = r.value = s.call(o, b[g]);
|
|
2295
|
+
b[g] = h;
|
|
2296
|
+
}, this), c;
|
|
2297
|
+
}, E.prototype.value = function(o, m, s) {
|
|
2298
|
+
if (S.ok(o instanceof Object, "obj needs to be an object"), S.ok(m, "we need a path"), arguments.length >= 3) {
|
|
2299
|
+
var c = this.nodes(o, m).shift();
|
|
2300
|
+
if (!c) return this._vivify(o, m, s);
|
|
2301
|
+
var r = c.path.slice(-1).shift(), g = this.parent(o, this.stringify(c.path));
|
|
2302
|
+
g[r] = s;
|
|
2303
|
+
}
|
|
2304
|
+
return this.query(o, this.stringify(m), 1).shift();
|
|
2305
|
+
}, E.prototype._vivify = function(o, m, s) {
|
|
2306
|
+
var c = this;
|
|
2307
|
+
S.ok(o instanceof Object, "obj needs to be an object"), S.ok(m, "we need a path");
|
|
2308
|
+
var r = this.parser.parse(m).map(function(b) {
|
|
2309
|
+
return b.expression.value;
|
|
2310
|
+
}), g = function(b, h) {
|
|
2311
|
+
var n = b.pop(), i = c.value(o, b);
|
|
2312
|
+
i || (g(b.concat(), typeof n == "string" ? {} : []), i = c.value(o, b)), i[n] = h;
|
|
2313
|
+
};
|
|
2314
|
+
return g(r, s), this.query(o, m)[0];
|
|
2315
|
+
}, E.prototype.query = function(o, m, s) {
|
|
2316
|
+
S.ok(o instanceof Object, "obj needs to be an object"), S.ok(d(m), "we need a path");
|
|
2317
|
+
var c = this.nodes(o, m, s).map(function(r) {
|
|
2318
|
+
return r.value;
|
|
2319
|
+
});
|
|
2320
|
+
return c;
|
|
2321
|
+
}, E.prototype.paths = function(o, m, s) {
|
|
2322
|
+
S.ok(o instanceof Object, "obj needs to be an object"), S.ok(m, "we need a path");
|
|
2323
|
+
var c = this.nodes(o, m, s).map(function(r) {
|
|
2324
|
+
return r.path;
|
|
2325
|
+
});
|
|
2326
|
+
return c;
|
|
2327
|
+
}, E.prototype.nodes = function(o, m, s) {
|
|
2328
|
+
if (S.ok(o instanceof Object, "obj needs to be an object"), S.ok(m, "we need a path"), s === 0) return [];
|
|
2329
|
+
var c = this.parser.parse(m), r = this.handlers, g = [{ path: ["$"], value: o }], b = [];
|
|
2330
|
+
return c.length && c[0].expression.type == "root" && c.shift(), c.length ? (c.forEach(function(h, n) {
|
|
2331
|
+
if (!(b.length >= s)) {
|
|
2332
|
+
var i = r.resolve(h), p = [];
|
|
2333
|
+
g.forEach(function(f) {
|
|
2334
|
+
if (!(b.length >= s)) {
|
|
2335
|
+
var I = i(h, f, s);
|
|
2336
|
+
n == c.length - 1 ? b = b.concat(I || []) : p = p.concat(I || []);
|
|
2337
|
+
}
|
|
2338
|
+
}), g = p;
|
|
2339
|
+
}
|
|
2340
|
+
}), s ? b.slice(0, s) : b) : g;
|
|
2341
|
+
}, E.prototype.stringify = function(o) {
|
|
2342
|
+
S.ok(o, "we need a path");
|
|
2343
|
+
var m = "$", s = {
|
|
2344
|
+
"descendant-member": "..{{value}}",
|
|
2345
|
+
"child-member": ".{{value}}",
|
|
2346
|
+
"descendant-subscript": "..[{{value}}]",
|
|
2347
|
+
"child-subscript": "[{{value}}]"
|
|
2348
|
+
};
|
|
2349
|
+
return o = this._normalize(o), o.forEach(function(c) {
|
|
2350
|
+
if (c.expression.type != "root") {
|
|
2351
|
+
var r = [c.scope, c.operation].join("-"), g = s[r], b;
|
|
2352
|
+
if (c.expression.type == "string_literal" ? b = JSON.stringify(c.expression.value) : b = c.expression.value, !g) throw new Error("couldn't find template " + r);
|
|
2353
|
+
m += g.replace(/{{value}}/, b);
|
|
2354
|
+
}
|
|
2355
|
+
}), m;
|
|
2356
|
+
}, E.prototype._normalize = function(o) {
|
|
2357
|
+
if (S.ok(o, "we need a path"), typeof o == "string")
|
|
2358
|
+
return this.parser.parse(o);
|
|
2359
|
+
if (Array.isArray(o) && typeof o[0] == "string") {
|
|
2360
|
+
var m = [{ expression: { type: "root", value: "$" } }];
|
|
2361
|
+
return o.forEach(function(s, c) {
|
|
2362
|
+
if (!(s == "$" && c === 0))
|
|
2363
|
+
if (typeof s == "string" && s.match("^" + y.identifier + "$"))
|
|
2364
|
+
m.push({
|
|
2365
|
+
operation: "member",
|
|
2366
|
+
scope: "child",
|
|
2367
|
+
expression: { value: s, type: "identifier" }
|
|
2368
|
+
});
|
|
2369
|
+
else {
|
|
2370
|
+
var r = typeof s == "number" ? "numeric_literal" : "string_literal";
|
|
2371
|
+
m.push({
|
|
2372
|
+
operation: "subscript",
|
|
2373
|
+
scope: "child",
|
|
2374
|
+
expression: { value: s, type: r }
|
|
2375
|
+
});
|
|
2376
|
+
}
|
|
2377
|
+
}), m;
|
|
2378
|
+
} else if (Array.isArray(o) && typeof o[0] == "object")
|
|
2379
|
+
return o;
|
|
2380
|
+
throw new Error("couldn't understand path " + o);
|
|
2381
|
+
};
|
|
2382
|
+
function d(o) {
|
|
2383
|
+
return Object.prototype.toString.call(o) == "[object String]";
|
|
2384
|
+
}
|
|
2385
|
+
E.Handlers = v, E.Parser = D;
|
|
2386
|
+
var a = new E();
|
|
2387
|
+
a.JSONPath = E, M.exports = a;
|
|
2388
|
+
}, { "./dict": 2, "./handlers": 4, "./parser": 6, assert: 8 }], 6: [function(O, M, B) {
|
|
2389
|
+
var S = O("./grammar"), y = O("../generated/parser"), D = function() {
|
|
2390
|
+
var v = new y.Parser(), E = v.parseError;
|
|
2391
|
+
return v.yy.parseError = function() {
|
|
2392
|
+
v.yy.ast && v.yy.ast.initialize(), E.apply(v, arguments);
|
|
2393
|
+
}, v;
|
|
2394
|
+
};
|
|
2395
|
+
D.grammar = S, M.exports = D;
|
|
2396
|
+
}, { "../generated/parser": 1, "./grammar": 3 }], 7: [function(O, M, B) {
|
|
2397
|
+
M.exports = function(y, D, v, E) {
|
|
2398
|
+
if (typeof D == "string") throw new Error("start cannot be a string");
|
|
2399
|
+
if (typeof v == "string") throw new Error("end cannot be a string");
|
|
2400
|
+
if (typeof E == "string") throw new Error("step cannot be a string");
|
|
2401
|
+
var d = y.length;
|
|
2402
|
+
if (E === 0) throw new Error("step cannot be zero");
|
|
2403
|
+
if (E = E ? S(E) : 1, D = D < 0 ? d + D : D, v = v < 0 ? d + v : v, D = S(D === 0 ? 0 : D || (E > 0 ? 0 : d - 1)), v = S(v === 0 ? 0 : v || (E > 0 ? d : -1)), D = E > 0 ? Math.max(0, D) : Math.min(d, D), v = E > 0 ? Math.min(v, d) : Math.max(-1, v), E > 0 && v <= D) return [];
|
|
2404
|
+
if (E < 0 && D <= v) return [];
|
|
2405
|
+
for (var a = [], o = D; o != v && !(E < 0 && o <= v || E > 0 && o >= v); o += E)
|
|
2406
|
+
a.push(y[o]);
|
|
2407
|
+
return a;
|
|
2408
|
+
};
|
|
2409
|
+
function S(y) {
|
|
2410
|
+
return String(y).match(/^[0-9]+$/) ? parseInt(y) : Number.isFinite(y) ? parseInt(y, 10) : 0;
|
|
2411
|
+
}
|
|
2412
|
+
}, {}], 8: [function(O, M, B) {
|
|
2413
|
+
var S = O("util/"), y = Array.prototype.slice, D = Object.prototype.hasOwnProperty, v = M.exports = m;
|
|
2414
|
+
v.AssertionError = function(i) {
|
|
2415
|
+
this.name = "AssertionError", this.actual = i.actual, this.expected = i.expected, this.operator = i.operator, i.message ? (this.message = i.message, this.generatedMessage = !1) : (this.message = a(this), this.generatedMessage = !0);
|
|
2416
|
+
var p = i.stackStartFunction || o;
|
|
2417
|
+
if (Error.captureStackTrace)
|
|
2418
|
+
Error.captureStackTrace(this, p);
|
|
2419
|
+
else {
|
|
2420
|
+
var f = new Error();
|
|
2421
|
+
if (f.stack) {
|
|
2422
|
+
var I = f.stack, L = p.name, U = I.indexOf(`
|
|
2423
|
+
` + L);
|
|
2424
|
+
if (U >= 0) {
|
|
2425
|
+
var w = I.indexOf(`
|
|
2426
|
+
`, U + 1);
|
|
2427
|
+
I = I.substring(w + 1);
|
|
2428
|
+
}
|
|
2429
|
+
this.stack = I;
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
}, S.inherits(v.AssertionError, Error);
|
|
2433
|
+
function E(n, i) {
|
|
2434
|
+
return S.isUndefined(i) ? "" + i : S.isNumber(i) && !isFinite(i) || S.isFunction(i) || S.isRegExp(i) ? i.toString() : i;
|
|
2435
|
+
}
|
|
2436
|
+
function d(n, i) {
|
|
2437
|
+
return S.isString(n) ? n.length < i ? n : n.slice(0, i) : n;
|
|
2438
|
+
}
|
|
2439
|
+
function a(n) {
|
|
2440
|
+
return d(JSON.stringify(n.actual, E), 128) + " " + n.operator + " " + d(JSON.stringify(n.expected, E), 128);
|
|
2441
|
+
}
|
|
2442
|
+
function o(n, i, p, f, I) {
|
|
2443
|
+
throw new v.AssertionError({
|
|
2444
|
+
message: p,
|
|
2445
|
+
actual: n,
|
|
2446
|
+
expected: i,
|
|
2447
|
+
operator: f,
|
|
2448
|
+
stackStartFunction: I
|
|
2449
|
+
});
|
|
2450
|
+
}
|
|
2451
|
+
v.fail = o;
|
|
2452
|
+
function m(n, i) {
|
|
2453
|
+
n || o(n, !0, i, "==", v.ok);
|
|
2454
|
+
}
|
|
2455
|
+
v.ok = m, v.equal = function(i, p, f) {
|
|
2456
|
+
i != p && o(i, p, f, "==", v.equal);
|
|
2457
|
+
}, v.notEqual = function(i, p, f) {
|
|
2458
|
+
i == p && o(i, p, f, "!=", v.notEqual);
|
|
2459
|
+
}, v.deepEqual = function(i, p, f) {
|
|
2460
|
+
s(i, p) || o(i, p, f, "deepEqual", v.deepEqual);
|
|
2461
|
+
};
|
|
2462
|
+
function s(n, i) {
|
|
2463
|
+
if (n === i)
|
|
2464
|
+
return !0;
|
|
2465
|
+
if (S.isBuffer(n) && S.isBuffer(i)) {
|
|
2466
|
+
if (n.length != i.length) return !1;
|
|
2467
|
+
for (var p = 0; p < n.length; p++)
|
|
2468
|
+
if (n[p] !== i[p]) return !1;
|
|
2469
|
+
return !0;
|
|
2470
|
+
} else return S.isDate(n) && S.isDate(i) ? n.getTime() === i.getTime() : S.isRegExp(n) && S.isRegExp(i) ? n.source === i.source && n.global === i.global && n.multiline === i.multiline && n.lastIndex === i.lastIndex && n.ignoreCase === i.ignoreCase : !S.isObject(n) && !S.isObject(i) ? n == i : r(n, i);
|
|
2471
|
+
}
|
|
2472
|
+
function c(n) {
|
|
2473
|
+
return Object.prototype.toString.call(n) == "[object Arguments]";
|
|
2474
|
+
}
|
|
2475
|
+
function r(n, i) {
|
|
2476
|
+
if (S.isNullOrUndefined(n) || S.isNullOrUndefined(i) || n.prototype !== i.prototype) return !1;
|
|
2477
|
+
if (S.isPrimitive(n) || S.isPrimitive(i))
|
|
2478
|
+
return n === i;
|
|
2479
|
+
var p = c(n), f = c(i);
|
|
2480
|
+
if (p && !f || !p && f)
|
|
2481
|
+
return !1;
|
|
2482
|
+
if (p)
|
|
2483
|
+
return n = y.call(n), i = y.call(i), s(n, i);
|
|
2484
|
+
var I = h(n), L = h(i), U, w;
|
|
2485
|
+
if (I.length != L.length)
|
|
2486
|
+
return !1;
|
|
2487
|
+
for (I.sort(), L.sort(), w = I.length - 1; w >= 0; w--)
|
|
2488
|
+
if (I[w] != L[w])
|
|
2489
|
+
return !1;
|
|
2490
|
+
for (w = I.length - 1; w >= 0; w--)
|
|
2491
|
+
if (U = I[w], !s(n[U], i[U])) return !1;
|
|
2492
|
+
return !0;
|
|
2493
|
+
}
|
|
2494
|
+
v.notDeepEqual = function(i, p, f) {
|
|
2495
|
+
s(i, p) && o(i, p, f, "notDeepEqual", v.notDeepEqual);
|
|
2496
|
+
}, v.strictEqual = function(i, p, f) {
|
|
2497
|
+
i !== p && o(i, p, f, "===", v.strictEqual);
|
|
2498
|
+
}, v.notStrictEqual = function(i, p, f) {
|
|
2499
|
+
i === p && o(i, p, f, "!==", v.notStrictEqual);
|
|
2500
|
+
};
|
|
2501
|
+
function g(n, i) {
|
|
2502
|
+
return !n || !i ? !1 : Object.prototype.toString.call(i) == "[object RegExp]" ? i.test(n) : n instanceof i ? !0 : i.call({}, n) === !0;
|
|
2503
|
+
}
|
|
2504
|
+
function b(n, i, p, f) {
|
|
2505
|
+
var I;
|
|
2506
|
+
S.isString(p) && (f = p, p = null);
|
|
2507
|
+
try {
|
|
2508
|
+
i();
|
|
2509
|
+
} catch (L) {
|
|
2510
|
+
I = L;
|
|
2511
|
+
}
|
|
2512
|
+
if (f = (p && p.name ? " (" + p.name + ")." : ".") + (f ? " " + f : "."), n && !I && o(I, p, "Missing expected exception" + f), !n && g(I, p) && o(I, p, "Got unwanted exception" + f), n && I && p && !g(I, p) || !n && I)
|
|
2513
|
+
throw I;
|
|
2514
|
+
}
|
|
2515
|
+
v.throws = function(n, i, p) {
|
|
2516
|
+
b.apply(this, [!0].concat(y.call(arguments)));
|
|
2517
|
+
}, v.doesNotThrow = function(n, i) {
|
|
2518
|
+
b.apply(this, [!1].concat(y.call(arguments)));
|
|
2519
|
+
}, v.ifError = function(n) {
|
|
2520
|
+
if (n)
|
|
2521
|
+
throw n;
|
|
2522
|
+
};
|
|
2523
|
+
var h = Object.keys || function(n) {
|
|
2524
|
+
var i = [];
|
|
2525
|
+
for (var p in n)
|
|
2526
|
+
D.call(n, p) && i.push(p);
|
|
2527
|
+
return i;
|
|
2528
|
+
};
|
|
2529
|
+
}, { "util/": 11 }], 9: [function(O, M, B) {
|
|
2530
|
+
typeof Object.create == "function" ? M.exports = function(y, D) {
|
|
2531
|
+
y.super_ = D, y.prototype = Object.create(D.prototype, {
|
|
2532
|
+
constructor: {
|
|
2533
|
+
value: y,
|
|
2534
|
+
enumerable: !1,
|
|
2535
|
+
writable: !0,
|
|
2536
|
+
configurable: !0
|
|
2537
|
+
}
|
|
2538
|
+
});
|
|
2539
|
+
} : M.exports = function(y, D) {
|
|
2540
|
+
y.super_ = D;
|
|
2541
|
+
var v = function() {
|
|
2542
|
+
};
|
|
2543
|
+
v.prototype = D.prototype, y.prototype = new v(), y.prototype.constructor = y;
|
|
2544
|
+
};
|
|
2545
|
+
}, {}], 10: [function(O, M, B) {
|
|
2546
|
+
M.exports = function(y) {
|
|
2547
|
+
return y && typeof y == "object" && typeof y.copy == "function" && typeof y.fill == "function" && typeof y.readUInt8 == "function";
|
|
2548
|
+
};
|
|
2549
|
+
}, {}], 11: [function(O, M, B) {
|
|
2550
|
+
(function(S, y) {
|
|
2551
|
+
var D = /%[sdj%]/g;
|
|
2552
|
+
B.format = function(A) {
|
|
2553
|
+
if (!L(A)) {
|
|
2554
|
+
for (var F = [], k = 0; k < arguments.length; k++)
|
|
2555
|
+
F.push(d(arguments[k]));
|
|
2556
|
+
return F.join(" ");
|
|
2557
|
+
}
|
|
2558
|
+
for (var k = 1, X = arguments, ee = X.length, $ = String(A).replace(D, function(K) {
|
|
2559
|
+
if (K === "%%") return "%";
|
|
2560
|
+
if (k >= ee) return K;
|
|
2561
|
+
switch (K) {
|
|
2562
|
+
case "%s":
|
|
2563
|
+
return String(X[k++]);
|
|
2564
|
+
case "%d":
|
|
2565
|
+
return Number(X[k++]);
|
|
2566
|
+
case "%j":
|
|
2567
|
+
try {
|
|
2568
|
+
return JSON.stringify(X[k++]);
|
|
2569
|
+
} catch {
|
|
2570
|
+
return "[Circular]";
|
|
2571
|
+
}
|
|
2572
|
+
default:
|
|
2573
|
+
return K;
|
|
2574
|
+
}
|
|
2575
|
+
}), H = X[k]; k < ee; H = X[++k])
|
|
2576
|
+
p(H) || !j(H) ? $ += " " + H : $ += " " + d(H);
|
|
2577
|
+
return $;
|
|
2578
|
+
}, B.deprecate = function(A, F) {
|
|
2579
|
+
if (w(y.process))
|
|
2580
|
+
return function() {
|
|
2581
|
+
return B.deprecate(A, F).apply(this, arguments);
|
|
2582
|
+
};
|
|
2583
|
+
if (S.noDeprecation === !0)
|
|
2584
|
+
return A;
|
|
2585
|
+
var k = !1;
|
|
2586
|
+
function X() {
|
|
2587
|
+
if (!k) {
|
|
2588
|
+
if (S.throwDeprecation)
|
|
2589
|
+
throw new Error(F);
|
|
2590
|
+
S.traceDeprecation ? console.trace(F) : console.error(F), k = !0;
|
|
2591
|
+
}
|
|
2592
|
+
return A.apply(this, arguments);
|
|
2593
|
+
}
|
|
2594
|
+
return X;
|
|
2595
|
+
};
|
|
2596
|
+
var v = {}, E;
|
|
2597
|
+
B.debuglog = function(A) {
|
|
2598
|
+
if (w(E) && (E = S.env.NODE_DEBUG || ""), A = A.toUpperCase(), !v[A])
|
|
2599
|
+
if (new RegExp("\\b" + A + "\\b", "i").test(E)) {
|
|
2600
|
+
var F = S.pid;
|
|
2601
|
+
v[A] = function() {
|
|
2602
|
+
var k = B.format.apply(B, arguments);
|
|
2603
|
+
console.error("%s %d: %s", A, F, k);
|
|
2604
|
+
};
|
|
2605
|
+
} else
|
|
2606
|
+
v[A] = function() {
|
|
2607
|
+
};
|
|
2608
|
+
return v[A];
|
|
2609
|
+
};
|
|
2610
|
+
function d(A, F) {
|
|
2611
|
+
var k = {
|
|
2612
|
+
seen: [],
|
|
2613
|
+
stylize: o
|
|
2614
|
+
};
|
|
2615
|
+
return arguments.length >= 3 && (k.depth = arguments[2]), arguments.length >= 4 && (k.colors = arguments[3]), i(F) ? k.showHidden = F : F && B._extend(k, F), w(k.showHidden) && (k.showHidden = !1), w(k.depth) && (k.depth = 2), w(k.colors) && (k.colors = !1), w(k.customInspect) && (k.customInspect = !0), k.colors && (k.stylize = a), s(k, A, k.depth);
|
|
2616
|
+
}
|
|
2617
|
+
B.inspect = d, d.colors = {
|
|
2618
|
+
bold: [1, 22],
|
|
2619
|
+
italic: [3, 23],
|
|
2620
|
+
underline: [4, 24],
|
|
2621
|
+
inverse: [7, 27],
|
|
2622
|
+
white: [37, 39],
|
|
2623
|
+
grey: [90, 39],
|
|
2624
|
+
black: [30, 39],
|
|
2625
|
+
blue: [34, 39],
|
|
2626
|
+
cyan: [36, 39],
|
|
2627
|
+
green: [32, 39],
|
|
2628
|
+
magenta: [35, 39],
|
|
2629
|
+
red: [31, 39],
|
|
2630
|
+
yellow: [33, 39]
|
|
2631
|
+
}, d.styles = {
|
|
2632
|
+
special: "cyan",
|
|
2633
|
+
number: "yellow",
|
|
2634
|
+
boolean: "yellow",
|
|
2635
|
+
undefined: "grey",
|
|
2636
|
+
null: "bold",
|
|
2637
|
+
string: "green",
|
|
2638
|
+
date: "magenta",
|
|
2639
|
+
// "name": intentionally not styling
|
|
2640
|
+
regexp: "red"
|
|
2641
|
+
};
|
|
2642
|
+
function a(A, F) {
|
|
2643
|
+
var k = d.styles[F];
|
|
2644
|
+
return k ? "\x1B[" + d.colors[k][0] + "m" + A + "\x1B[" + d.colors[k][1] + "m" : A;
|
|
2645
|
+
}
|
|
2646
|
+
function o(A, F) {
|
|
2647
|
+
return A;
|
|
2648
|
+
}
|
|
2649
|
+
function m(A) {
|
|
2650
|
+
var F = {};
|
|
2651
|
+
return A.forEach(function(k, X) {
|
|
2652
|
+
F[k] = !0;
|
|
2653
|
+
}), F;
|
|
2654
|
+
}
|
|
2655
|
+
function s(A, F, k) {
|
|
2656
|
+
if (A.customInspect && F && ae(F.inspect) && // Filter out the util module, it's inspect function is special
|
|
2657
|
+
F.inspect !== B.inspect && // Also filter out any prototype objects using the circular check.
|
|
2658
|
+
!(F.constructor && F.constructor.prototype === F)) {
|
|
2659
|
+
var X = F.inspect(k, A);
|
|
2660
|
+
return L(X) || (X = s(A, X, k)), X;
|
|
2661
|
+
}
|
|
2662
|
+
var ee = c(A, F);
|
|
2663
|
+
if (ee)
|
|
2664
|
+
return ee;
|
|
2665
|
+
var $ = Object.keys(F), H = m($);
|
|
2666
|
+
if (A.showHidden && ($ = Object.getOwnPropertyNames(F)), V(F) && ($.indexOf("message") >= 0 || $.indexOf("description") >= 0))
|
|
2667
|
+
return r(F);
|
|
2668
|
+
if ($.length === 0) {
|
|
2669
|
+
if (ae(F)) {
|
|
2670
|
+
var K = F.name ? ": " + F.name : "";
|
|
2671
|
+
return A.stylize("[Function" + K + "]", "special");
|
|
2672
|
+
}
|
|
2673
|
+
if (q(F))
|
|
2674
|
+
return A.stylize(RegExp.prototype.toString.call(F), "regexp");
|
|
2675
|
+
if (z(F))
|
|
2676
|
+
return A.stylize(Date.prototype.toString.call(F), "date");
|
|
2677
|
+
if (V(F))
|
|
2678
|
+
return r(F);
|
|
2679
|
+
}
|
|
2680
|
+
var Q = "", ce = !1, de = ["{", "}"];
|
|
2681
|
+
if (n(F) && (ce = !0, de = ["[", "]"]), ae(F)) {
|
|
2682
|
+
var ke = F.name ? ": " + F.name : "";
|
|
2683
|
+
Q = " [Function" + ke + "]";
|
|
2684
|
+
}
|
|
2685
|
+
if (q(F) && (Q = " " + RegExp.prototype.toString.call(F)), z(F) && (Q = " " + Date.prototype.toUTCString.call(F)), V(F) && (Q = " " + r(F)), $.length === 0 && (!ce || F.length == 0))
|
|
2686
|
+
return de[0] + Q + de[1];
|
|
2687
|
+
if (k < 0)
|
|
2688
|
+
return q(F) ? A.stylize(RegExp.prototype.toString.call(F), "regexp") : A.stylize("[Object]", "special");
|
|
2689
|
+
A.seen.push(F);
|
|
2690
|
+
var Ae;
|
|
2691
|
+
return ce ? Ae = g(A, F, k, H, $) : Ae = $.map(function(Se) {
|
|
2692
|
+
return b(A, F, k, H, Se, ce);
|
|
2693
|
+
}), A.seen.pop(), h(Ae, Q, de);
|
|
2694
|
+
}
|
|
2695
|
+
function c(A, F) {
|
|
2696
|
+
if (w(F))
|
|
2697
|
+
return A.stylize("undefined", "undefined");
|
|
2698
|
+
if (L(F)) {
|
|
2699
|
+
var k = "'" + JSON.stringify(F).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
2700
|
+
return A.stylize(k, "string");
|
|
2701
|
+
}
|
|
2702
|
+
if (I(F))
|
|
2703
|
+
return A.stylize("" + F, "number");
|
|
2704
|
+
if (i(F))
|
|
2705
|
+
return A.stylize("" + F, "boolean");
|
|
2706
|
+
if (p(F))
|
|
2707
|
+
return A.stylize("null", "null");
|
|
2708
|
+
}
|
|
2709
|
+
function r(A) {
|
|
2710
|
+
return "[" + Error.prototype.toString.call(A) + "]";
|
|
2711
|
+
}
|
|
2712
|
+
function g(A, F, k, X, ee) {
|
|
2713
|
+
for (var $ = [], H = 0, K = F.length; H < K; ++H)
|
|
2714
|
+
ve(F, String(H)) ? $.push(b(
|
|
2715
|
+
A,
|
|
2716
|
+
F,
|
|
2717
|
+
k,
|
|
2718
|
+
X,
|
|
2719
|
+
String(H),
|
|
2720
|
+
!0
|
|
2721
|
+
)) : $.push("");
|
|
2722
|
+
return ee.forEach(function(Q) {
|
|
2723
|
+
Q.match(/^\d+$/) || $.push(b(
|
|
2724
|
+
A,
|
|
2725
|
+
F,
|
|
2726
|
+
k,
|
|
2727
|
+
X,
|
|
2728
|
+
Q,
|
|
2729
|
+
!0
|
|
2730
|
+
));
|
|
2731
|
+
}), $;
|
|
2732
|
+
}
|
|
2733
|
+
function b(A, F, k, X, ee, $) {
|
|
2734
|
+
var H, K, Q;
|
|
2735
|
+
if (Q = Object.getOwnPropertyDescriptor(F, ee) || { value: F[ee] }, Q.get ? Q.set ? K = A.stylize("[Getter/Setter]", "special") : K = A.stylize("[Getter]", "special") : Q.set && (K = A.stylize("[Setter]", "special")), ve(X, ee) || (H = "[" + ee + "]"), K || (A.seen.indexOf(Q.value) < 0 ? (p(k) ? K = s(A, Q.value, null) : K = s(A, Q.value, k - 1), K.indexOf(`
|
|
2736
|
+
`) > -1 && ($ ? K = K.split(`
|
|
2737
|
+
`).map(function(ce) {
|
|
2738
|
+
return " " + ce;
|
|
2739
|
+
}).join(`
|
|
2740
|
+
`).substr(2) : K = `
|
|
2741
|
+
` + K.split(`
|
|
2742
|
+
`).map(function(ce) {
|
|
2743
|
+
return " " + ce;
|
|
2744
|
+
}).join(`
|
|
2745
|
+
`))) : K = A.stylize("[Circular]", "special")), w(H)) {
|
|
2746
|
+
if ($ && ee.match(/^\d+$/))
|
|
2747
|
+
return K;
|
|
2748
|
+
H = JSON.stringify("" + ee), H.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (H = H.substr(1, H.length - 2), H = A.stylize(H, "name")) : (H = H.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), H = A.stylize(H, "string"));
|
|
2749
|
+
}
|
|
2750
|
+
return H + ": " + K;
|
|
2751
|
+
}
|
|
2752
|
+
function h(A, F, k) {
|
|
2753
|
+
var X = A.reduce(function(ee, $) {
|
|
2754
|
+
return $.indexOf(`
|
|
2755
|
+
`) >= 0, ee + $.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
2756
|
+
}, 0);
|
|
2757
|
+
return X > 60 ? k[0] + (F === "" ? "" : F + `
|
|
2758
|
+
`) + " " + A.join(`,
|
|
2759
|
+
`) + " " + k[1] : k[0] + F + " " + A.join(", ") + " " + k[1];
|
|
2760
|
+
}
|
|
2761
|
+
function n(A) {
|
|
2762
|
+
return Array.isArray(A);
|
|
2763
|
+
}
|
|
2764
|
+
B.isArray = n;
|
|
2765
|
+
function i(A) {
|
|
2766
|
+
return typeof A == "boolean";
|
|
2767
|
+
}
|
|
2768
|
+
B.isBoolean = i;
|
|
2769
|
+
function p(A) {
|
|
2770
|
+
return A === null;
|
|
2771
|
+
}
|
|
2772
|
+
B.isNull = p;
|
|
2773
|
+
function f(A) {
|
|
2774
|
+
return A == null;
|
|
2775
|
+
}
|
|
2776
|
+
B.isNullOrUndefined = f;
|
|
2777
|
+
function I(A) {
|
|
2778
|
+
return typeof A == "number";
|
|
2779
|
+
}
|
|
2780
|
+
B.isNumber = I;
|
|
2781
|
+
function L(A) {
|
|
2782
|
+
return typeof A == "string";
|
|
2783
|
+
}
|
|
2784
|
+
B.isString = L;
|
|
2785
|
+
function U(A) {
|
|
2786
|
+
return typeof A == "symbol";
|
|
2787
|
+
}
|
|
2788
|
+
B.isSymbol = U;
|
|
2789
|
+
function w(A) {
|
|
2790
|
+
return A === void 0;
|
|
2791
|
+
}
|
|
2792
|
+
B.isUndefined = w;
|
|
2793
|
+
function q(A) {
|
|
2794
|
+
return j(A) && J(A) === "[object RegExp]";
|
|
2795
|
+
}
|
|
2796
|
+
B.isRegExp = q;
|
|
2797
|
+
function j(A) {
|
|
2798
|
+
return typeof A == "object" && A !== null;
|
|
2799
|
+
}
|
|
2800
|
+
B.isObject = j;
|
|
2801
|
+
function z(A) {
|
|
2802
|
+
return j(A) && J(A) === "[object Date]";
|
|
2803
|
+
}
|
|
2804
|
+
B.isDate = z;
|
|
2805
|
+
function V(A) {
|
|
2806
|
+
return j(A) && (J(A) === "[object Error]" || A instanceof Error);
|
|
2807
|
+
}
|
|
2808
|
+
B.isError = V;
|
|
2809
|
+
function ae(A) {
|
|
2810
|
+
return typeof A == "function";
|
|
2811
|
+
}
|
|
2812
|
+
B.isFunction = ae;
|
|
2813
|
+
function Y(A) {
|
|
2814
|
+
return A === null || typeof A == "boolean" || typeof A == "number" || typeof A == "string" || typeof A == "symbol" || // ES6 symbol
|
|
2815
|
+
typeof A > "u";
|
|
2816
|
+
}
|
|
2817
|
+
B.isPrimitive = Y, B.isBuffer = O("./support/isBuffer");
|
|
2818
|
+
function J(A) {
|
|
2819
|
+
return Object.prototype.toString.call(A);
|
|
2820
|
+
}
|
|
2821
|
+
function se(A) {
|
|
2822
|
+
return A < 10 ? "0" + A.toString(10) : A.toString(10);
|
|
2823
|
+
}
|
|
2824
|
+
var ie = [
|
|
2825
|
+
"Jan",
|
|
2826
|
+
"Feb",
|
|
2827
|
+
"Mar",
|
|
2828
|
+
"Apr",
|
|
2829
|
+
"May",
|
|
2830
|
+
"Jun",
|
|
2831
|
+
"Jul",
|
|
2832
|
+
"Aug",
|
|
2833
|
+
"Sep",
|
|
2834
|
+
"Oct",
|
|
2835
|
+
"Nov",
|
|
2836
|
+
"Dec"
|
|
2837
|
+
];
|
|
2838
|
+
function oe() {
|
|
2839
|
+
var A = /* @__PURE__ */ new Date(), F = [
|
|
2840
|
+
se(A.getHours()),
|
|
2841
|
+
se(A.getMinutes()),
|
|
2842
|
+
se(A.getSeconds())
|
|
2843
|
+
].join(":");
|
|
2844
|
+
return [A.getDate(), ie[A.getMonth()], F].join(" ");
|
|
2845
|
+
}
|
|
2846
|
+
B.log = function() {
|
|
2847
|
+
console.log("%s - %s", oe(), B.format.apply(B, arguments));
|
|
2848
|
+
}, B.inherits = O("inherits"), B._extend = function(A, F) {
|
|
2849
|
+
if (!F || !j(F)) return A;
|
|
2850
|
+
for (var k = Object.keys(F), X = k.length; X--; )
|
|
2851
|
+
A[k[X]] = F[k[X]];
|
|
2852
|
+
return A;
|
|
2853
|
+
};
|
|
2854
|
+
function ve(A, F) {
|
|
2855
|
+
return Object.prototype.hasOwnProperty.call(A, F);
|
|
2856
|
+
}
|
|
2857
|
+
}).call(this, O("_process"), typeof Xe < "u" ? Xe : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
2858
|
+
}, { "./support/isBuffer": 10, _process: 14, inherits: 9 }], 12: [function(O, M, B) {
|
|
2859
|
+
}, {}], 13: [function(O, M, B) {
|
|
2860
|
+
(function(S) {
|
|
2861
|
+
function y(d, a) {
|
|
2862
|
+
for (var o = 0, m = d.length - 1; m >= 0; m--) {
|
|
2863
|
+
var s = d[m];
|
|
2864
|
+
s === "." ? d.splice(m, 1) : s === ".." ? (d.splice(m, 1), o++) : o && (d.splice(m, 1), o--);
|
|
2865
|
+
}
|
|
2866
|
+
if (a)
|
|
2867
|
+
for (; o--; o)
|
|
2868
|
+
d.unshift("..");
|
|
2869
|
+
return d;
|
|
2870
|
+
}
|
|
2871
|
+
B.resolve = function() {
|
|
2872
|
+
for (var d = "", a = !1, o = arguments.length - 1; o >= -1 && !a; o--) {
|
|
2873
|
+
var m = o >= 0 ? arguments[o] : S.cwd();
|
|
2874
|
+
if (typeof m != "string")
|
|
2875
|
+
throw new TypeError("Arguments to path.resolve must be strings");
|
|
2876
|
+
if (!m)
|
|
2877
|
+
continue;
|
|
2878
|
+
d = m + "/" + d, a = m.charAt(0) === "/";
|
|
2879
|
+
}
|
|
2880
|
+
return d = y(v(d.split("/"), function(s) {
|
|
2881
|
+
return !!s;
|
|
2882
|
+
}), !a).join("/"), (a ? "/" : "") + d || ".";
|
|
2883
|
+
}, B.normalize = function(d) {
|
|
2884
|
+
var a = B.isAbsolute(d), o = E(d, -1) === "/";
|
|
2885
|
+
return d = y(v(d.split("/"), function(m) {
|
|
2886
|
+
return !!m;
|
|
2887
|
+
}), !a).join("/"), !d && !a && (d = "."), d && o && (d += "/"), (a ? "/" : "") + d;
|
|
2888
|
+
}, B.isAbsolute = function(d) {
|
|
2889
|
+
return d.charAt(0) === "/";
|
|
2890
|
+
}, B.join = function() {
|
|
2891
|
+
var d = Array.prototype.slice.call(arguments, 0);
|
|
2892
|
+
return B.normalize(v(d, function(a, o) {
|
|
2893
|
+
if (typeof a != "string")
|
|
2894
|
+
throw new TypeError("Arguments to path.join must be strings");
|
|
2895
|
+
return a;
|
|
2896
|
+
}).join("/"));
|
|
2897
|
+
}, B.relative = function(d, a) {
|
|
2898
|
+
d = B.resolve(d).substr(1), a = B.resolve(a).substr(1);
|
|
2899
|
+
function o(h) {
|
|
2900
|
+
for (var n = 0; n < h.length && h[n] === ""; n++)
|
|
2901
|
+
;
|
|
2902
|
+
for (var i = h.length - 1; i >= 0 && h[i] === ""; i--)
|
|
2903
|
+
;
|
|
2904
|
+
return n > i ? [] : h.slice(n, i - n + 1);
|
|
2905
|
+
}
|
|
2906
|
+
for (var m = o(d.split("/")), s = o(a.split("/")), c = Math.min(m.length, s.length), r = c, g = 0; g < c; g++)
|
|
2907
|
+
if (m[g] !== s[g]) {
|
|
2908
|
+
r = g;
|
|
2909
|
+
break;
|
|
2910
|
+
}
|
|
2911
|
+
for (var b = [], g = r; g < m.length; g++)
|
|
2912
|
+
b.push("..");
|
|
2913
|
+
return b = b.concat(s.slice(r)), b.join("/");
|
|
2914
|
+
}, B.sep = "/", B.delimiter = ":", B.dirname = function(d) {
|
|
2915
|
+
if (typeof d != "string" && (d = d + ""), d.length === 0) return ".";
|
|
2916
|
+
for (var a = d.charCodeAt(0), o = a === 47, m = -1, s = !0, c = d.length - 1; c >= 1; --c)
|
|
2917
|
+
if (a = d.charCodeAt(c), a === 47) {
|
|
2918
|
+
if (!s) {
|
|
2919
|
+
m = c;
|
|
2920
|
+
break;
|
|
2921
|
+
}
|
|
2922
|
+
} else
|
|
2923
|
+
s = !1;
|
|
2924
|
+
return m === -1 ? o ? "/" : "." : o && m === 1 ? "/" : d.slice(0, m);
|
|
2925
|
+
};
|
|
2926
|
+
function D(d) {
|
|
2927
|
+
typeof d != "string" && (d = d + "");
|
|
2928
|
+
var a = 0, o = -1, m = !0, s;
|
|
2929
|
+
for (s = d.length - 1; s >= 0; --s)
|
|
2930
|
+
if (d.charCodeAt(s) === 47) {
|
|
2931
|
+
if (!m) {
|
|
2932
|
+
a = s + 1;
|
|
2933
|
+
break;
|
|
2934
|
+
}
|
|
2935
|
+
} else o === -1 && (m = !1, o = s + 1);
|
|
2936
|
+
return o === -1 ? "" : d.slice(a, o);
|
|
2937
|
+
}
|
|
2938
|
+
B.basename = function(d, a) {
|
|
2939
|
+
var o = D(d);
|
|
2940
|
+
return a && o.substr(-1 * a.length) === a && (o = o.substr(0, o.length - a.length)), o;
|
|
2941
|
+
}, B.extname = function(d) {
|
|
2942
|
+
typeof d != "string" && (d = d + "");
|
|
2943
|
+
for (var a = -1, o = 0, m = -1, s = !0, c = 0, r = d.length - 1; r >= 0; --r) {
|
|
2944
|
+
var g = d.charCodeAt(r);
|
|
2945
|
+
if (g === 47) {
|
|
2946
|
+
if (!s) {
|
|
2947
|
+
o = r + 1;
|
|
2948
|
+
break;
|
|
2949
|
+
}
|
|
2950
|
+
continue;
|
|
2951
|
+
}
|
|
2952
|
+
m === -1 && (s = !1, m = r + 1), g === 46 ? a === -1 ? a = r : c !== 1 && (c = 1) : a !== -1 && (c = -1);
|
|
2953
|
+
}
|
|
2954
|
+
return a === -1 || m === -1 || // We saw a non-dot character immediately before the dot
|
|
2955
|
+
c === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
2956
|
+
c === 1 && a === m - 1 && a === o + 1 ? "" : d.slice(a, m);
|
|
2957
|
+
};
|
|
2958
|
+
function v(d, a) {
|
|
2959
|
+
if (d.filter) return d.filter(a);
|
|
2960
|
+
for (var o = [], m = 0; m < d.length; m++)
|
|
2961
|
+
a(d[m], m, d) && o.push(d[m]);
|
|
2962
|
+
return o;
|
|
2963
|
+
}
|
|
2964
|
+
var E = "ab".substr(-1) === "b" ? function(d, a, o) {
|
|
2965
|
+
return d.substr(a, o);
|
|
2966
|
+
} : function(d, a, o) {
|
|
2967
|
+
return a < 0 && (a = d.length + a), d.substr(a, o);
|
|
2968
|
+
};
|
|
2969
|
+
}).call(this, O("_process"));
|
|
2970
|
+
}, { _process: 14 }], 14: [function(O, M, B) {
|
|
2971
|
+
var S = M.exports = {}, y, D;
|
|
2972
|
+
function v() {
|
|
2973
|
+
throw new Error("setTimeout has not been defined");
|
|
2974
|
+
}
|
|
2975
|
+
function E() {
|
|
2976
|
+
throw new Error("clearTimeout has not been defined");
|
|
2977
|
+
}
|
|
2978
|
+
(function() {
|
|
2979
|
+
try {
|
|
2980
|
+
typeof setTimeout == "function" ? y = setTimeout : y = v;
|
|
2981
|
+
} catch {
|
|
2982
|
+
y = v;
|
|
2983
|
+
}
|
|
2984
|
+
try {
|
|
2985
|
+
typeof clearTimeout == "function" ? D = clearTimeout : D = E;
|
|
2986
|
+
} catch {
|
|
2987
|
+
D = E;
|
|
2988
|
+
}
|
|
2989
|
+
})();
|
|
2990
|
+
function d(n) {
|
|
2991
|
+
if (y === setTimeout)
|
|
2992
|
+
return setTimeout(n, 0);
|
|
2993
|
+
if ((y === v || !y) && setTimeout)
|
|
2994
|
+
return y = setTimeout, setTimeout(n, 0);
|
|
2995
|
+
try {
|
|
2996
|
+
return y(n, 0);
|
|
2997
|
+
} catch {
|
|
2998
|
+
try {
|
|
2999
|
+
return y.call(null, n, 0);
|
|
3000
|
+
} catch {
|
|
3001
|
+
return y.call(this, n, 0);
|
|
3002
|
+
}
|
|
3003
|
+
}
|
|
3004
|
+
}
|
|
3005
|
+
function a(n) {
|
|
3006
|
+
if (D === clearTimeout)
|
|
3007
|
+
return clearTimeout(n);
|
|
3008
|
+
if ((D === E || !D) && clearTimeout)
|
|
3009
|
+
return D = clearTimeout, clearTimeout(n);
|
|
3010
|
+
try {
|
|
3011
|
+
return D(n);
|
|
3012
|
+
} catch {
|
|
3013
|
+
try {
|
|
3014
|
+
return D.call(null, n);
|
|
3015
|
+
} catch {
|
|
3016
|
+
return D.call(this, n);
|
|
3017
|
+
}
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3020
|
+
var o = [], m = !1, s, c = -1;
|
|
3021
|
+
function r() {
|
|
3022
|
+
!m || !s || (m = !1, s.length ? o = s.concat(o) : c = -1, o.length && g());
|
|
3023
|
+
}
|
|
3024
|
+
function g() {
|
|
3025
|
+
if (!m) {
|
|
3026
|
+
var n = d(r);
|
|
3027
|
+
m = !0;
|
|
3028
|
+
for (var i = o.length; i; ) {
|
|
3029
|
+
for (s = o, o = []; ++c < i; )
|
|
3030
|
+
s && s[c].run();
|
|
3031
|
+
c = -1, i = o.length;
|
|
3032
|
+
}
|
|
3033
|
+
s = null, m = !1, a(n);
|
|
3034
|
+
}
|
|
3035
|
+
}
|
|
3036
|
+
S.nextTick = function(n) {
|
|
3037
|
+
var i = new Array(arguments.length - 1);
|
|
3038
|
+
if (arguments.length > 1)
|
|
3039
|
+
for (var p = 1; p < arguments.length; p++)
|
|
3040
|
+
i[p - 1] = arguments[p];
|
|
3041
|
+
o.push(new b(n, i)), o.length === 1 && !m && d(g);
|
|
3042
|
+
};
|
|
3043
|
+
function b(n, i) {
|
|
3044
|
+
this.fun = n, this.array = i;
|
|
3045
|
+
}
|
|
3046
|
+
b.prototype.run = function() {
|
|
3047
|
+
this.fun.apply(null, this.array);
|
|
3048
|
+
}, S.title = "browser", S.browser = !0, S.env = {}, S.argv = [], S.version = "", S.versions = {};
|
|
3049
|
+
function h() {
|
|
3050
|
+
}
|
|
3051
|
+
S.on = h, S.addListener = h, S.once = h, S.off = h, S.removeListener = h, S.removeAllListeners = h, S.emit = h, S.prependListener = h, S.prependOnceListener = h, S.listeners = function(n) {
|
|
3052
|
+
return [];
|
|
3053
|
+
}, S.binding = function(n) {
|
|
3054
|
+
throw new Error("process.binding is not supported");
|
|
3055
|
+
}, S.cwd = function() {
|
|
3056
|
+
return "/";
|
|
3057
|
+
}, S.chdir = function(n) {
|
|
3058
|
+
throw new Error("process.chdir is not supported");
|
|
3059
|
+
}, S.umask = function() {
|
|
3060
|
+
return 0;
|
|
3061
|
+
};
|
|
3062
|
+
}, {}], 15: [function(O, M, B) {
|
|
3063
|
+
var S = O("escodegen").generate;
|
|
3064
|
+
M.exports = function(y, D) {
|
|
3065
|
+
D || (D = {});
|
|
3066
|
+
var v = {}, E = function d(a, o) {
|
|
3067
|
+
if (a.type === "Literal")
|
|
3068
|
+
return a.value;
|
|
3069
|
+
if (a.type === "UnaryExpression") {
|
|
3070
|
+
var m = d(a.argument);
|
|
3071
|
+
return a.operator === "+" ? +m : a.operator === "-" ? -m : a.operator === "~" ? ~m : a.operator === "!" ? !m : v;
|
|
3072
|
+
} else if (a.type === "ArrayExpression") {
|
|
3073
|
+
for (var s = [], c = 0, r = a.elements.length; c < r; c++) {
|
|
3074
|
+
var g = d(a.elements[c]);
|
|
3075
|
+
if (g === v) return v;
|
|
3076
|
+
s.push(g);
|
|
3077
|
+
}
|
|
3078
|
+
return s;
|
|
3079
|
+
} else if (a.type === "ObjectExpression") {
|
|
3080
|
+
for (var b = {}, c = 0; c < a.properties.length; c++) {
|
|
3081
|
+
var h = a.properties[c], n = h.value === null ? h.value : d(h.value);
|
|
3082
|
+
if (n === v) return v;
|
|
3083
|
+
b[h.key.value || h.key.name] = n;
|
|
3084
|
+
}
|
|
3085
|
+
return b;
|
|
3086
|
+
} else if (a.type === "BinaryExpression" || a.type === "LogicalExpression") {
|
|
3087
|
+
var r = d(a.left);
|
|
3088
|
+
if (r === v) return v;
|
|
3089
|
+
var i = d(a.right);
|
|
3090
|
+
if (i === v) return v;
|
|
3091
|
+
var p = a.operator;
|
|
3092
|
+
return p === "==" ? r == i : p === "===" ? r === i : p === "!=" ? r != i : p === "!==" ? r !== i : p === "+" ? r + i : p === "-" ? r - i : p === "*" ? r * i : p === "/" ? r / i : p === "%" ? r % i : p === "<" ? r < i : p === "<=" ? r <= i : p === ">" ? r > i : p === ">=" ? r >= i : p === "|" ? r | i : p === "&" ? r & i : p === "^" ? r ^ i : p === "&&" ? r && i : p === "||" ? r || i : v;
|
|
3093
|
+
} else {
|
|
3094
|
+
if (a.type === "Identifier")
|
|
3095
|
+
return {}.hasOwnProperty.call(D, a.name) ? D[a.name] : v;
|
|
3096
|
+
if (a.type === "ThisExpression")
|
|
3097
|
+
return {}.hasOwnProperty.call(D, "this") ? D.this : v;
|
|
3098
|
+
if (a.type === "CallExpression") {
|
|
3099
|
+
var f = d(a.callee);
|
|
3100
|
+
if (f === v || typeof f != "function") return v;
|
|
3101
|
+
var I = a.callee.object ? d(a.callee.object) : v;
|
|
3102
|
+
I === v && (I = null);
|
|
3103
|
+
for (var L = [], c = 0, r = a.arguments.length; c < r; c++) {
|
|
3104
|
+
var g = d(a.arguments[c]);
|
|
3105
|
+
if (g === v) return v;
|
|
3106
|
+
L.push(g);
|
|
3107
|
+
}
|
|
3108
|
+
return f.apply(I, L);
|
|
3109
|
+
} else if (a.type === "MemberExpression") {
|
|
3110
|
+
var b = d(a.object);
|
|
3111
|
+
if (b === v || typeof b == "function")
|
|
3112
|
+
return v;
|
|
3113
|
+
if (a.property.type === "Identifier")
|
|
3114
|
+
return b[a.property.name];
|
|
3115
|
+
var h = d(a.property);
|
|
3116
|
+
return h === v ? v : b[h];
|
|
3117
|
+
} else if (a.type === "ConditionalExpression") {
|
|
3118
|
+
var m = d(a.test);
|
|
3119
|
+
return m === v ? v : d(m ? a.consequent : a.alternate);
|
|
3120
|
+
} else if (a.type === "ExpressionStatement") {
|
|
3121
|
+
var m = d(a.expression);
|
|
3122
|
+
return m === v ? v : m;
|
|
3123
|
+
} else {
|
|
3124
|
+
if (a.type === "ReturnStatement")
|
|
3125
|
+
return d(a.argument);
|
|
3126
|
+
if (a.type === "FunctionExpression") {
|
|
3127
|
+
var U = a.body.body, w = {};
|
|
3128
|
+
Object.keys(D).forEach(function(ie) {
|
|
3129
|
+
w[ie] = D[ie];
|
|
3130
|
+
});
|
|
3131
|
+
for (var c = 0; c < a.params.length; c++) {
|
|
3132
|
+
var q = a.params[c];
|
|
3133
|
+
if (q.type == "Identifier")
|
|
3134
|
+
D[q.name] = null;
|
|
3135
|
+
else return v;
|
|
3136
|
+
}
|
|
3137
|
+
for (var c in U)
|
|
3138
|
+
if (d(U[c]) === v)
|
|
3139
|
+
return v;
|
|
3140
|
+
D = w;
|
|
3141
|
+
var j = Object.keys(D), z = j.map(function(ie) {
|
|
3142
|
+
return D[ie];
|
|
3143
|
+
});
|
|
3144
|
+
return Function(j.join(", "), "return " + S(a)).apply(null, z);
|
|
3145
|
+
} else if (a.type === "TemplateLiteral") {
|
|
3146
|
+
for (var V = "", c = 0; c < a.expressions.length; c++)
|
|
3147
|
+
V += d(a.quasis[c]), V += d(a.expressions[c]);
|
|
3148
|
+
return V += d(a.quasis[c]), V;
|
|
3149
|
+
} else if (a.type === "TaggedTemplateExpression") {
|
|
3150
|
+
var ae = d(a.tag), Y = a.quasi, J = Y.quasis.map(d), se = Y.expressions.map(d);
|
|
3151
|
+
return ae.apply(null, [J].concat(se));
|
|
3152
|
+
} else return a.type === "TemplateElement" ? a.value.cooked : v;
|
|
3153
|
+
}
|
|
3154
|
+
}
|
|
3155
|
+
}(y);
|
|
3156
|
+
return E === v ? void 0 : E;
|
|
3157
|
+
};
|
|
3158
|
+
}, { escodegen: 12 }], jsonpath: [function(O, M, B) {
|
|
3159
|
+
M.exports = O("./lib/index");
|
|
3160
|
+
}, { "./lib/index": 5 }] }, {}, ["jsonpath"])("jsonpath");
|
|
3161
|
+
});
|
|
3162
|
+
}(Ne)), Ne.exports;
|
|
3163
|
+
}
|
|
3164
|
+
var Lt = Pt();
|
|
3165
|
+
const Mt = /* @__PURE__ */ Nt(Lt);
|
|
3166
|
+
export {
|
|
3167
|
+
Mt as J
|
|
3168
|
+
};
|