subscript 10.7.3 → 10.8.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/feature/accessor.js +11 -6
- package/feature/async.js +14 -15
- package/feature/class.js +2 -0
- package/feature/string.js +52 -24
- package/feature/template.js +10 -9
- package/jessie.min.js +5 -5
- package/justin.min.js +6 -6
- package/package.json +1 -1
- package/subscript.min.js +4 -4
package/feature/accessor.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* { get x() { body } } → ['{}', ['get', 'x', body]]
|
|
5
5
|
* { set x(v) { body } } → ['{}', ['set', 'x', 'v', body]]
|
|
6
6
|
* { *g() { body } } → ['{}', [':', 'g', ['function*', null, params, body]]]
|
|
7
|
+
* { m(p) { body } } → ['{}', [':', 'm', ['function', null, params, body]]]
|
|
7
8
|
*/
|
|
8
9
|
import { token, expr, skip, next, parse, cur, idx, prec, seek } from '../parse.js';
|
|
9
10
|
|
|
@@ -54,14 +55,16 @@ const accessor = (kind) => a => {
|
|
|
54
55
|
return [kind, name, params, expr(0, CBRACE)];
|
|
55
56
|
};
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
// TOKEN, like `#` and `*`, so they fire inside `static`'s operand (unary prec
|
|
59
|
+
// 175): static get x() {} → ['static', ['get', 'x', params, body]]
|
|
60
|
+
token('get', TOKEN, speculate(accessor('get')));
|
|
61
|
+
token('set', TOKEN, speculate(accessor('set')));
|
|
59
62
|
|
|
60
63
|
// Generator method: { *g() {} } / class { *g() {} } / static *g() {}
|
|
61
64
|
// → [':', key, ['function*', null, params, body]] (≡ g: function* () {})
|
|
62
65
|
// Prefix-only: infix `*` falls through to multiplication. Registered at TOKEN
|
|
63
|
-
// so it fires inside `static`'s operand
|
|
64
|
-
//
|
|
66
|
+
// so it fires inside `static`'s operand; prefix `*` is never valid JS outside
|
|
67
|
+
// member position, so the wide precedence can't misparse.
|
|
65
68
|
// token() re-registration would clobber prec['*'] (multiplication) in the
|
|
66
69
|
// introspection registry (loop.js reads it) — save/restore.
|
|
67
70
|
// A param list is method-shaped when every item could bind: identifier,
|
|
@@ -96,7 +99,9 @@ token('*', TOKEN, speculate(a => {
|
|
|
96
99
|
prec['*'] = multPrec;
|
|
97
100
|
|
|
98
101
|
// Method shorthand: { foo() {} } / { async foo() {} } / class { static foo() {} }
|
|
99
|
-
// → [':', key, ['
|
|
102
|
+
// → [':', key, ['function', null, params, body]] (≡ foo: function () {})
|
|
103
|
+
// A function, not an arrow: the body is statement-shaped (`{ f() }` returns
|
|
104
|
+
// undefined, an arrow's `f()` would be its value) and `this` is the receiver.
|
|
100
105
|
// Accepts identifier, string-literal node [, "..."], ['async', key] from
|
|
101
106
|
// async.js, or ['static', key] from unary('static').
|
|
102
107
|
token('(', ASSIGN - 1, speculate(a => {
|
|
@@ -113,7 +118,7 @@ token('(', ASSIGN - 1, speculate(a => {
|
|
|
113
118
|
// Not followed by { - not method shorthand, fall through
|
|
114
119
|
if (cur.charCodeAt(idx) !== OBRACE) return;
|
|
115
120
|
skip();
|
|
116
|
-
let value = ['
|
|
121
|
+
let value = ['function', null, params, expr(0, CBRACE) || null];
|
|
117
122
|
if (isAsync) value = ['async', value];
|
|
118
123
|
const node = [':', a, value];
|
|
119
124
|
return wrap ? [wrap, node] : node;
|
package/feature/async.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Async/await/yield: async function, async arrow, await, yield expressions - parse half
|
|
2
|
-
import { parse, unary, expr, skip, seek, keyword, cur, idx, word,
|
|
2
|
+
import { parse, unary, expr, skip, seek, keyword, cur, idx, word, peek } from '../parse.js';
|
|
3
3
|
|
|
4
|
-
const PREFIX = 140, ASSIGN = 20, OPAREN = 40;
|
|
4
|
+
const TOKEN = 200, PREFIX = 140, ASSIGN = 20, OPAREN = 40;
|
|
5
5
|
|
|
6
6
|
// await expr → ['await', expr]
|
|
7
7
|
unary('await', PREFIX);
|
|
@@ -26,20 +26,19 @@ keyword('yield', PREFIX, () => {
|
|
|
26
26
|
// async function name() {} → ['async', ['function', name, params, body]]
|
|
27
27
|
// async () => {} → ['async', ['=>', params, body]]
|
|
28
28
|
// async x => {} → ['async', ['=>', x, body]]
|
|
29
|
-
|
|
29
|
+
// async key( → ['async', key] (accessor.js's `(` builds the method)
|
|
30
|
+
// async *g() {} → [':', 'g', ['async', ['function*', ...]]]
|
|
31
|
+
// Restricted production: a LineTerminator after `async` makes it an identifier.
|
|
32
|
+
// TOKEN, like the other member-position prefixes, so it fires inside `static`.
|
|
33
|
+
keyword('async', TOKEN, () => {
|
|
34
|
+
if (nlAhead(idx)) return;
|
|
30
35
|
parse.space();
|
|
31
|
-
// async function - check for 'function' word
|
|
32
36
|
if (word('function')) return ['async', expr(PREFIX)];
|
|
33
|
-
//
|
|
34
|
-
// async name => → arrow with single param
|
|
37
|
+
// member head: key, #key, [key], "key", or a whole *g() {} method
|
|
35
38
|
const from = idx;
|
|
36
|
-
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
// async arrow: async () => or async x =>
|
|
43
|
-
const params = expr(ASSIGN - .5);
|
|
44
|
-
return params && ['async', params];
|
|
39
|
+
let m = expr(TOKEN - .5);
|
|
40
|
+
if (m?.[0] === ':') return [':', m[1], ['async', m[2]]];
|
|
41
|
+
if (m && peek() === OPAREN) return ['async', m];
|
|
42
|
+
// arrow: async x => / async (...) =>
|
|
43
|
+
if ((m || peek() === OPAREN) && (seek(from), m = expr(ASSIGN - .5))?.[0] === '=>') return ['async', m];
|
|
45
44
|
});
|
package/feature/class.js
CHANGED
|
@@ -9,6 +9,8 @@ const HERITAGE = CALL - .5;
|
|
|
9
9
|
// static member → ['static', member]
|
|
10
10
|
// STATIC > ACCESS (170) so `static m` doesn't pull `(` into the operand as a
|
|
11
11
|
// function call — leaves the `(` for the outer method-shorthand handler.
|
|
12
|
+
// STATIC < TOKEN (200) so the member-position prefixes (`#`, `*`, `async`,
|
|
13
|
+
// `get`/`set`) fire inside the operand: `static async m()`, `static get x()`.
|
|
12
14
|
unary('static', STATIC);
|
|
13
15
|
|
|
14
16
|
// instanceof: object instanceof Constructor
|
package/feature/string.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* String literals with ES escape sequences.
|
|
3
3
|
* Configurable via parse.string: { '"': true, "'": true }
|
|
4
4
|
*/
|
|
5
|
-
import { parse, lookup,
|
|
5
|
+
import { parse, lookup, err, skip, idx, cur } from '../parse.js';
|
|
6
6
|
|
|
7
7
|
const BSLASH = 92, DQUOTE = 34, SQUOTE = 39, U = 117, X = 120, LBRACE = 123, RBRACE = 125, LF = 10, CR = 13;
|
|
8
8
|
const esc = { n: '\n', r: '\r', t: '\t', b: '\b', f: '\f', v: '\v', '0': '\0' };
|
|
@@ -13,44 +13,72 @@ const hex = c =>
|
|
|
13
13
|
c >= 65 && c <= 70 ? c - 55 :
|
|
14
14
|
c >= 97 && c <= 102 ? c - 87 : -1;
|
|
15
15
|
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const n = cur.charCodeAt(idx + 1);
|
|
22
|
-
if (n === LF) return ['', 2];
|
|
23
|
-
if (n === CR) return ['', cur.charCodeAt(idx + 2) === LF ? 3 : 2];
|
|
24
|
-
// \xHH or \uHHHH
|
|
25
|
-
if (n === X || (n === U && cur.charCodeAt(idx + 2) !== LBRACE)) {
|
|
16
|
+
// Read a numeric escape without changing parser state.
|
|
17
|
+
const escapePoint = start => {
|
|
18
|
+
if (cur.charCodeAt(start) !== BSLASH) return;
|
|
19
|
+
const n = cur.charCodeAt(start + 1);
|
|
20
|
+
if (n === X || (n === U && cur.charCodeAt(start + 2) !== LBRACE)) {
|
|
26
21
|
const w = n === X ? 2 : 4;
|
|
27
22
|
let cp = 0, h;
|
|
28
23
|
for (let k = 0; k < w; k++) {
|
|
29
|
-
if ((h = hex(cur.charCodeAt(
|
|
24
|
+
if ((h = hex(cur.charCodeAt(start + 2 + k))) < 0) return;
|
|
30
25
|
cp = cp * 16 + h;
|
|
31
26
|
}
|
|
32
|
-
return [
|
|
27
|
+
return [cp, 2 + w];
|
|
33
28
|
}
|
|
34
|
-
// \u{H...H}
|
|
35
29
|
if (n === U) {
|
|
36
|
-
let cp = 0, k =
|
|
30
|
+
let cp = 0, k = start + 3, h;
|
|
37
31
|
while ((h = hex(cur.charCodeAt(k))) >= 0) cp = cp * 16 + h, k++;
|
|
38
|
-
if (k >
|
|
39
|
-
return [
|
|
40
|
-
|
|
32
|
+
if (k > start + 3 && cp <= 0x10ffff && cur.charCodeAt(k) === RBRACE)
|
|
33
|
+
return [cp, k - start + 1];
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
// Decode one escape (or an adjacent surrogate pair). Shared with templates.
|
|
38
|
+
// Pair before constructing text so Unicode encoders see one scalar value.
|
|
39
|
+
const decodeEscape = () => {
|
|
40
|
+
const n = cur.charCodeAt(idx + 1);
|
|
41
|
+
if (n === LF) return ['', 2];
|
|
42
|
+
if (n === CR) return ['', cur.charCodeAt(idx + 2) === LF ? 3 : 2];
|
|
43
|
+
const p = escapePoint(idx);
|
|
44
|
+
if (p) {
|
|
45
|
+
let [cp, w] = p;
|
|
46
|
+
if (cp >= 0xD800 && cp <= 0xDBFF) {
|
|
47
|
+
const q = escapePoint(idx + w);
|
|
48
|
+
if (q && q[0] >= 0xDC00 && q[0] <= 0xDFFF) {
|
|
49
|
+
cp = 0x10000 + (cp - 0xD800) * 1024 + q[0] - 0xDC00;
|
|
50
|
+
w += q[1];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return [String.fromCodePoint(cp), w];
|
|
41
54
|
}
|
|
42
55
|
return [esc[cur[idx + 1]] || cur[idx + 1], 2];
|
|
43
56
|
};
|
|
44
57
|
|
|
45
|
-
//
|
|
58
|
+
// Copy literal spans once. Joining decoded escapes once also stays linear on
|
|
59
|
+
// engines with flat strings, where character-by-character concatenation copies
|
|
60
|
+
// every prefix. Leave the closing quote or template interpolation to the caller.
|
|
61
|
+
const scanString = (q, template = false) => {
|
|
62
|
+
let start = idx, parts, c;
|
|
63
|
+
while ((c = cur.charCodeAt(idx)) - q) {
|
|
64
|
+
if (template && (c === 0 || c === 36 && cur.charCodeAt(idx + 1) === LBRACE)) break;
|
|
65
|
+
if (c !== BSLASH) { skip(); continue; }
|
|
66
|
+
if (!parts) parts = [];
|
|
67
|
+
parts.push(cur.slice(start, idx));
|
|
68
|
+
const [text, width] = decodeEscape();
|
|
69
|
+
parts.push(text);
|
|
70
|
+
skip(width);
|
|
71
|
+
start = idx;
|
|
72
|
+
}
|
|
73
|
+
const tail = cur.slice(start, idx);
|
|
74
|
+
return parts ? (parts.push(tail), parts.join('')) : tail;
|
|
75
|
+
};
|
|
76
|
+
|
|
46
77
|
const parseString = q => (a, _, s = '', qc = String.fromCharCode(q)) => {
|
|
47
78
|
if (a || !parse.string?.[qc]) return;
|
|
48
79
|
skip();
|
|
49
80
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
// c - q is 0 at close, NaN at EOF — both falsy, terminating the loop.
|
|
53
|
-
next(c => c - q && (c !== BSLASH ? (s += cur[idx], 1) : escape()));
|
|
81
|
+
s += scanString(q);
|
|
54
82
|
cur[idx] === qc ? skip() : err('Bad string');
|
|
55
83
|
return [, s];
|
|
56
84
|
};
|
|
@@ -59,4 +87,4 @@ lookup[DQUOTE] = parseString(DQUOTE);
|
|
|
59
87
|
lookup[SQUOTE] = parseString(SQUOTE);
|
|
60
88
|
parse.string = { '"': true };
|
|
61
89
|
|
|
62
|
-
export { esc, decodeEscape };
|
|
90
|
+
export { esc, decodeEscape, scanString };
|
package/feature/template.js
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Tagged: tag`...` → ['``', 'tag', ...]
|
|
5
5
|
*/
|
|
6
6
|
import { parse, skip, err, expr, lookup, cur, idx } from '../parse.js';
|
|
7
|
-
import {
|
|
7
|
+
import { scanString } from './string.js';
|
|
8
8
|
|
|
9
|
-
const ACCESS = 170, BACKTICK = 96, DOLLAR = 36, OBRACE = 123
|
|
9
|
+
const ACCESS = 170, BACKTICK = 96, DOLLAR = 36, OBRACE = 123;
|
|
10
10
|
|
|
11
11
|
// Parse template body after opening ` — string and expression segments
|
|
12
12
|
// strictly alternate (string, expr, string, …), so every interpolation is
|
|
@@ -16,13 +16,14 @@ const ACCESS = 170, BACKTICK = 96, DOLLAR = 36, OBRACE = 123, BSLASH = 92;
|
|
|
16
16
|
// same code point as the '' literal.
|
|
17
17
|
const parseBody = () => {
|
|
18
18
|
const parts = [];
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
c ===
|
|
23
|
-
c
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
for (;;) {
|
|
20
|
+
parts.push([, scanString(BACKTICK, true)]);
|
|
21
|
+
const c = cur.charCodeAt(idx);
|
|
22
|
+
if (c === BACKTICK) return skip(), parts;
|
|
23
|
+
if (c !== DOLLAR || cur.charCodeAt(idx + 1) !== OBRACE) err('Unterminated template');
|
|
24
|
+
skip(2);
|
|
25
|
+
parts.push(expr(0, 125));
|
|
26
|
+
}
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
// Collapse a single-part body to that part (string or expression); else keep as ['`', ...parts]
|
package/jessie.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var l,m,s=r=>(l=0,m=r,s.enter?.(),r=d(),m[l]?O():r||""),O=(r="Unexpected token",e=l,t=m.slice(0,e).split(`
|
|
2
2
|
`),o=t.pop(),n=m.slice(Math.max(0,e-40),e),p="\u032D",c=(m[e]||" ")+p,u=m.slice(e+1,e+20))=>{throw SyntaxError(`${r} at ${t.length+1}:${o.length+1}
|
|
3
|
-
${n}${c}${u}`)},
|
|
4
|
-
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v",0:"\0"},re=r=>r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:-1,
|
|
5
|
-
`,"/*":"*/"};s.space=()=>{for(var r,e,t,o,n;r=
|
|
6
|
-
`?n:n+o.length),r=0;break}if(r)return r}return r};var
|
|
7
|
-
`;var Le=32,Kr=10,uo=59,co=125,Ie=91,Oe=40,tr=v.asi??v[";"],mo=s._baseSpace??=s.space,ao=s._baseStep??=s.step,Br=r=>Array.isArray(r)||typeof r=="string",ho=(v[";"]??5)+1,Ur=r=>Array.isArray(r)&&(v[r[0]]<=ho||r[0]==="{}"&&Ur(r[1])),Ao=(r,e)=>{for(;(e=m.charCodeAt(r))<=Le;){if(e===Kr)return!0;r++}return!1},yo=(r=l,e)=>{for(;r-- >0&&(e=m.charCodeAt(r))<=Le;)if(e===Kr)return!0;return!1};s.space=(r,e)=>{for(;;){for(e=l,r=mo();e<l;)if(m.charCodeAt(e++)===Kr){s.newline=!0;break}if(r===uo&&Ao(l+1)){T(l+1),s.newline=s.semi=!0;continue}return r}};s.enter=()=>s.newline=s.semi=!1;s.exit=(r,e)=>{e===co&&(s.newline=!0,s.semi=!1)};s.step=(r,e,t,o)=>{if(s.semi&&e>=tr)return!1;if(r&&!Br(r))return null;if(Br(r)){let p=(t===Ie||t===Oe)&&yo();if(s.semi||t===Ie&&(p||Ur(r))||t===Oe&&(Ur(r)||p&&e>=tr))return _e(r,e,o)??null}let n=s.newline;return ao(r,e,t,o)??(Br(r)&&n?_e(r,e,o)??null:null)};var Mr=0,wo=2e3,_e=s.asi=(r,e,t,o,n)=>{if(e>=tr||Mr>=wo)return;s.semi=!1;let p=l;Mr++;try{o=t(tr-.5)}finally{Mr--}if(!(!o||l===p))return n=o?.[0]===";"?o.slice(1):[o],r?.[0]===";"?(r.push(...n),r):[";",r,...n]};var ve=(r,e,t,o)=>typeof r=="string"?n=>e(n,r,n):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o,n)):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n),n)):r[0]==="()"&&r.length===2?ve(r[1],e):(()=>{throw Error("Invalid assignment target")})(),Pe={"=":(r,e,t)=>r[e]=t,"+=":(r,e,t)=>r[e]+=t,"-=":(r,e,t)=>r[e]-=t,"*=":(r,e,t)=>r[e]*=t,"/=":(r,e,t)=>r[e]/=t,"%=":(r,e,t)=>r[e]%=t,"|=":(r,e,t)=>r[e]|=t,"&=":(r,e,t)=>r[e]&=t,"^=":(r,e,t)=>r[e]^=t,">>=":(r,e,t)=>r[e]>>=t,"<<=":(r,e,t)=>r[e]<<=t};for(let r in Pe)f(r,(e,t)=>(t=i(t),ve(e,(o,n,p)=>Pe[r](o,n,t(p)))));f("!",r=>(r=i(r),e=>!r(e)));f("||",(r,e)=>(r=i(r),e=i(e),t=>r(t)||e(t)));f("&&",(r,e)=>(r=i(r),e=i(e),t=>r(t)&&e(t)));f("~",r=>(r=i(r),e=>~r(e)));f("|",(r,e)=>(r=i(r),e=i(e),t=>r(t)|e(t)));f("&",(r,e)=>(r=i(r),e=i(e),t=>r(t)&e(t)));f("^",(r,e)=>(r=i(r),e=i(e),t=>r(t)^e(t)));f(">>",(r,e)=>(r=i(r),e=i(e),t=>r(t)>>e(t)));f("<<",(r,e)=>(r=i(r),e=i(e),t=>r(t)<<e(t)));f(">",(r,e)=>(r=i(r),e=i(e),t=>r(t)>e(t)));f("<",(r,e)=>(r=i(r),e=i(e),t=>r(t)<e(t)));f(">=",(r,e)=>(r=i(r),e=i(e),t=>r(t)>=e(t)));f("<=",(r,e)=>(r=i(r),e=i(e),t=>r(t)<=e(t)));f("==",(r,e)=>(r=i(r),e=i(e),t=>r(t)==e(t)));f("!=",(r,e)=>(r=i(r),e=i(e),t=>r(t)!=e(t)));f("+",(r,e)=>e!==void 0?(r=i(r),e=i(e),t=>r(t)+e(t)):(r=i(r),t=>+r(t)));f("-",(r,e)=>e!==void 0?(r=i(r),e=i(e),t=>r(t)-e(t)):(r=i(r),t=>-r(t)));f("*",(r,e)=>(r=i(r),e=i(e),t=>r(t)*e(t)));f("/",(r,e)=>(r=i(r),e=i(e),t=>r(t)/e(t)));f("%",(r,e)=>(r=i(r),e=i(e),t=>r(t)%e(t)));var Dr=(r,e,t,o)=>typeof r=="string"?n=>e(n,r):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o)):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n))):r[0]==="()"&&r.length===2?Dr(r[1],e):(()=>{throw Error("Invalid increment target")})();f("++",(r,e)=>Dr(r,e===null?(t,o)=>t[o]++:(t,o)=>++t[o]));f("--",(r,e)=>Dr(r,e===null?(t,o)=>t[o]--:(t,o)=>--t[o]));var Be=(...r)=>(r=r.map(i),e=>{let t;for(let o of r)t=o(e);return t});f(",",Be);f(";",Be);var Me=r=>r!=null&&(typeof r=="object"||typeof r=="function"),M=r=>Me(r)?Reflect.ownKeys({[r]:0})[0]:r,P=r=>typeof r=="string"&&(r[0]==="_"&&r[1]==="_"||r==="constructor"||r==="prototype"),Co=r=>P(M(r));i.id=r=>r===void 0||Co(r)?()=>{}:e=>e?.[r];var or=r=>{throw Error(r)};f("[]",(r,e)=>e===void 0?(r=r?r[0]===","?r.slice(1):[r]:[],r=r.map(t=>t==null?(()=>{}):t[0]==="..."?(t=i(t[1]),o=>t(o)):(t=i(t),o=>[t(o)])),t=>r.flatMap(o=>o(t))):(e==null&&or("Missing index"),r=i(r),e=i(e),t=>{let o=M(e(t));return P(o)?void 0:r(t)[o]}));f(".",(r,e)=>(r=i(r),e=M(e[0]?e:e[1]),P(e)?()=>{}:t=>r(t)[e]));f("()",(r,e)=>{if(e===void 0)return r==null?or("Empty ()"):i(r);let t=p=>p?.[0]===","&&p.slice(1).some(c=>c==null||t(c));t(e)&&or("Empty argument");let o=e?e[0]===","?(e=e.slice(1).map(i),p=>e.map(c=>c(p))):(e=i(e),p=>[e(p)]):()=>[],n=Hr(r);return n<0?()=>{}:Fr(r,n?(p,c,u)=>(c=M(c),P(c)?void 0:p[c](...o(u))):(p,c,u)=>p[c](...o(u)))});var K=r=>typeof r=="string"||Array.isArray(r)&&(r[0]==="."||r[0]==="?."||r[0]==="[]"&&r.length===3||r[0]==="?.[]"||r[0]==="()"&&r.length===2&&K(r[1])||r[0]==="{}"),Fr=(r,e,t,o)=>r==null?or("Empty ()"):r[0]==="()"&&r.length==2?Fr(r[1],e):typeof r=="string"?n=>e(n,r,n):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o,n)):r[0]==="?."?(t=i(r[1]),o=r[2],n=>{let p=t(n);return p==null?void 0:e(p,o,n)}):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n),n)):r[0]==="?.[]"?(t=i(r[1]),o=i(r[2]),n=>{let p=t(n);return p==null?void 0:e(p,o(n),n)}):(r=i(r),n=>e([r(n)],0,n)),Gr=r=>Me(r)?1:P(r)?-1:0,Hr=(r,e=r?.[0],t=r?.[2])=>typeof r=="string"?Gr(r):e==="()"&&r.length==2?Hr(r[1]):e==="."||e==="?."?Gr(t):(e==="[]"||e==="?.[]")&&r.length===3?Array.isArray(t)&&t[0]==null?Gr(t[1]):1:0,F=(r,e,t=Hr(r))=>t<0?()=>{}:Fr(r,t?(o,n,p)=>(n=M(n),P(n)?void 0:e(o,n,p)):e);f("===",(r,e)=>(r=i(r),e=i(e),t=>r(t)===e(t)));f("!==",(r,e)=>(r=i(r),e=i(e),t=>r(t)!==e(t)));f("??",(r,e)=>(r=i(r),e=i(e),t=>r(t)??e(t)));var go=r=>{throw Error(r)};f("**",(r,e)=>(r=i(r),e=i(e),t=>r(t)**e(t)));f("**=",(r,e)=>(K(r)||go("Invalid assignment target"),e=i(e),F(r,(t,o,n)=>t[o]**=e(n))));f("in",(r,e)=>(r=i(r),e=i(e),t=>r(t)in e(t)));var Eo=r=>{throw Error(r)};f(">>>",(r,e)=>(r=i(r),e=i(e),t=>r(t)>>>e(t)));f(">>>=",(r,e)=>(K(r)||Eo("Invalid assignment target"),e=i(e),F(r,(t,o,n)=>t[o]>>>=e(n))));var So=r=>r[0]?.[0]===","?r[0].slice(1):r,H=(r,e,t)=>{if(typeof r=="string"){t[r]=e;return}let[o,...n]=r,p=So(n);if(o==="{}"){let c=[];for(let u of p){if(Array.isArray(u)&&u[0]==="..."){let C={};for(let I in e)!c.includes(I)&&!P(I)&&(C[I]=e[I]);t[u[1]]=C;break}let a,y,R;typeof u=="string"?a=y=u:u[0]==="="?(typeof u[1]=="string"?a=y=u[1]:[,a,y]=u[1],R=u[2]):[,a,y]=u,c.push(a=M(a));let k=P(a)?void 0:e[a];k===void 0&&R&&(k=i(R)(t)),H(y,k,t)}}else if(o==="[]"){let c=0;for(let u of p){if(u===null){c++;continue}if(Array.isArray(u)&&u[0]==="..."){t[u[1]]=e.slice(c);break}let a=u,y;Array.isArray(u)&&u[0]==="="&&([,a,y]=u);let R=e[c++];R===void 0&&y&&(R=i(y)(t)),H(a,R,t)}}},Xr=(...r)=>(r=r.map(e=>{if(typeof e=="string")return t=>{t[e]=void 0};if(e[0]==="="){let[,t,o]=e,n=i(o);return typeof t=="string"?p=>{p[t]=n(p)}:p=>H(t,n(p),p)}return i(e)}),e=>{for(let t of r)t(e)});f("let",Xr);f("const",Xr);f("var",Xr);var nr=r=>{throw Error(r)};f("=",(r,e)=>{if(Array.isArray(r)&&(r[0]==="let"||r[0]==="const"||r[0]==="var")){let t=r[1];return e=i(e),typeof t=="string"?o=>{o[t]=e(o)}:o=>H(t,e(o),o)}return K(r)||nr("Invalid assignment target"),e=i(e),F(r,(t,o,n)=>t[o]=e(n))});f("||=",(r,e)=>(K(r)||nr("Invalid assignment target"),e=i(e),F(r,(t,o,n)=>t[o]||=e(n))));f("&&=",(r,e)=>(K(r)||nr("Invalid assignment target"),e=i(e),F(r,(t,o,n)=>t[o]&&=e(n))));f("??=",(r,e)=>(K(r)||nr("Invalid assignment target"),e=i(e),F(r,(t,o,n)=>t[o]??=e(n))));f("?",(r,e,t)=>(r=i(r),e=i(e),t=i(t),o=>r(o)?e(o):t(o)));var B=[];f("=>",(r,e)=>{r=r?.[0]==="()"?r[1]:r;let t=r?r[0]===","?r.slice(1):[r]:[],o=-1,n=null,p=t[t.length-1];Array.isArray(p)&&p[0]==="..."&&(o=t.length-1,n=p[1],t.length--);let c=e?.[0]==="{}";return e=i(c?["{",e[1]]:e),u=>(...a)=>{let y={};t.forEach((k,C)=>y[k]=a[C]),n&&(y[n]=a.slice(o));let R=new Proxy(y,{get:(k,C)=>C in k?k[C]:u?.[C],set:(k,C,I)=>((C in k?k:u)[C]=I,!0),has:(k,C)=>C in k||(u?C in u:!1)});try{let k=e(R);return c?void 0:k}catch(k){if(k===B)return k[0];throw k}}});f("...",r=>(r=i(r),e=>{let t=r(e),o=[];for(let n of Object.keys(t))P(n)||o.push([n,t[n]]);return o}));f("?.",(r,e)=>(r=i(r),e=M(e),P(e)?()=>{}:t=>r(t)?.[e]));f("?.[]",(r,e)=>(r=i(r),e=i(e),t=>{let o=r(t);if(o==null)return;let n=M(e(t));return P(n)?void 0:o[n]}));f("?.()",(r,e)=>{let t=e?e[0]===","?(e=e.slice(1).map(i),n=>e.map(p=>p(n))):(e=i(e),n=>[e(n)]):()=>[];if(r[0]==="."||r[0]==="?."){let n=r[0]==="?.",p=i(r[1]),c=M(r[2]);return P(c)?()=>{}:n?u=>p(u)?.[c]?.(...t(u)):u=>p(u)[c]?.(...t(u))}if((r[0]==="[]"||r[0]==="?.[]")&&r.length===3){let n=r[0]==="?.[]",p=i(r[1]),c=i(r[2]);return u=>{let a=p(u);if(n&&a==null)return;let y=M(c(u));return P(y)?void 0:a[y]?.(...t(u))}}let o=i(r);return n=>o(n)?.(...t(n))});f("typeof",r=>(r=i(r),e=>typeof r(e)));f("void",r=>(r=i(r),e=>(r(e),void 0)));f("delete",r=>{if(r[0]==="."){let e=i(r[1]),t=r[2];return o=>delete e(o)[t]}if(r[0]==="[]"){let e=i(r[1]),t=i(r[2]);return o=>delete e(o)[t(o)]}return()=>!0});f("new",r=>{let e=i(r?.[0]==="()"?r[1]:r),t=r?.[0]==="()"?r[2]:null,o=t?t[0]===","?(n=>p=>n.map(c=>c(p)))(t.slice(1).map(i)):(n=>p=>[n(p)])(i(t)):()=>[];return n=>new(e(n))(...o(n))});var ir=Symbol("accessor");f("get",(r,e)=>(e=e?i(e):()=>{},t=>[[ir,r,{get:function(){let o=Object.create(t||{});return o.this=this,e(o)}}]]));f("set",(r,e,t)=>(t=t?i(t):()=>{},o=>[[ir,r,{set:function(n){let p=Object.create(o||{});p.this=this,p[e]=n,t(p)}}]]));var ko=r=>r==null||typeof r=="string"||[":",",","...","get","set"].includes(r[0]);f("{}",(r,e)=>{if(e!==void 0)return;if(!ko(r))return i(["{",r]);r=r?r[0]!==","?[r]:r.slice(1):[];let t=r.map(o=>i(typeof o=="string"?[":",o,o]:o));return o=>{let n={},p={};for(let c of t.flatMap(u=>u(o)))if(c[0]===ir){let[,u,a]=c;p[u]={...p[u],...a,configurable:!0,enumerable:!0}}else n[c[0]]=c[1];for(let c in p)Object.defineProperty(n,c,p[c]);return n}});f("{",r=>(r=r?i(r):()=>{},e=>r(Object.create(e))));f(":",(r,e)=>(e=i(e),Array.isArray(r)?(r=i(r),t=>[[r(t),e(t)]]):t=>[[r,e(t)]]));f("`",(...r)=>(r=r.map(i),e=>r.map(t=>t(e)).join("")));f("``",(r,...e)=>{r=i(r);let t=[],o=[];for(let p of e)Array.isArray(p)&&p[0]===void 0?t.push(p[1]):o.push(i(p));let n=Object.assign([...t],{raw:t});return p=>r(p)(n,...o.map(c=>c(p)))});f("function",(r,e,t)=>{t=t?i(t):()=>{};let o=e?e[0]===","?e.slice(1):[e]:[],n=null,p=-1,c=o[o.length-1];return Array.isArray(c)&&c[0]==="..."&&(p=o.length-1,n=c[1],o.length--),u=>{let a=(...y)=>{let R={};o.forEach((C,I)=>R[C]=y[I]),n&&(R[n]=y.slice(p));let k=new Proxy(R,{get:(C,I)=>I in C?C[I]:u[I],set:(C,I,De)=>((I in C?C:u)[I]=De,!0),has:(C,I)=>I in C||I in u});try{return t(k)}catch(C){if(C===B)return C[0];throw C}};return r&&(u[r]=a),a}});f("function*",(r,e,t)=>{throw Error("Generator functions are not supported in evaluation")});f("async",r=>{let e=i(r);return t=>{let o=e(t);return async function(...n){return o(...n)}}});f("await",r=>(r=i(r),async e=>await r(e)));f("yield",r=>(r=r?i(r):null,e=>{throw{__yield__:r?r(e):void 0}}));f("yield*",r=>(r=i(r),e=>{throw{__yield_all__:r(e)}}));var To=Symbol("static"),No=r=>{throw Error(r)};f("instanceof",(r,e)=>(r=i(r),e=i(e),t=>r(t)instanceof e(t)));f("class",(r,e,t)=>(e=e?i(e):null,t=t?i(t):null,o=>{let n=e?.(o),p=function(...c){if(!(this instanceof p))return No("Class constructor must be called with new");let u=e?Reflect.construct(n,c,p):this;return p.prototype.__constructor__&&p.prototype.__constructor__.apply(u,c),u};if(e&&(Object.setPrototypeOf(p.prototype,n.prototype),Object.setPrototypeOf(p,n)),t){let c=Object.create(o);e&&(c.super=n);let u=t(c),a=Array.isArray(u)&&typeof u[0]?.[0]=="string"?u:[];for(let[y,R]of a)y==="constructor"?p.prototype.__constructor__=R:p.prototype[y]=R}return r&&(o[r]=p),p}));f("static",r=>(r=i(r),e=>[[To,r(e)]]));f("//",(r,e)=>{let t=new RegExp(r,e||"");return()=>t});f("if",(r,e,t)=>(r=i(r),e=i(e),t=t!==void 0?i(t):null,o=>r(o)?e(o):t?.(o)));var D=Symbol("break"),X=Symbol("continue");f("while",(r,e)=>(r=i(r),e=i(e),t=>{let o;for(;r(t);)try{o=e(t)}catch(n){if(n===D)break;if(n===X)continue;if(n===B)return n[0];throw n}return o}));f("do",(r,e)=>(r=i(r),e=i(e),t=>{let o;do try{o=r(t)}catch(n){if(n===D)break;if(n===X)continue;if(n===B)return n[0];throw n}while(e(t));return o}));f("for",(r,e)=>{if(Array.isArray(r)&&r[0]===";"){let[,t,o,n]=r;return t=t?i(t):null,o=o?i(o):()=>!0,n=n?i(n):null,e=i(e),p=>{let c;for(t?.(p);o(p);n?.(p))try{c=e(p)}catch(u){if(u===D)break;if(u===X)continue;if(u===B)return u[0];throw u}return c}}if(Array.isArray(r)&&(r[0]==="in"||r[0]==="of")){let[t,o,n]=r;if(Array.isArray(o)&&(o[0]==="let"||o[0]==="const"||o[0]==="var")&&(o=o[1]),t==="in")return Io(o,n,e);if(t==="of")return Ro(o,n,e)}});var Ro=(r,e,t)=>{e=i(e),t=i(t);let o=Array.isArray(r);return n=>{let p,c=o?null:n[r];for(let u of e(n)){o?H(r,u,n):n[r]=u;try{p=t(n)}catch(a){if(a===D)break;if(a===X)continue;if(a===B)return a[0];throw a}}return o||(n[r]=c),p}},Io=(r,e,t)=>{e=i(e),t=i(t);let o=Array.isArray(r);return n=>{let p,c=o?null:n[r];for(let u in e(n)){o?H(r,u,n):n[r]=u;try{p=t(n)}catch(a){if(a===D)break;if(a===X)continue;if(a===B)return a[0];throw a}}return o||(n[r]=c),p}};f("break",()=>()=>{throw D});f("continue",()=>()=>{throw X});f("return",r=>(r=r!==void 0?i(r):null,e=>{throw B[0]=r?.(e),B}));f("try",(r,...e)=>{r=r?i(r):null;let t=e.find(u=>u?.[0]==="catch"),o=e.find(u=>u?.[0]==="finally"),n=t?.[1],p=t?.[2]?i(t[2]):null,c=o?.[1]?i(o[1]):null;return u=>{let a;try{a=r?.(u)}catch(y){if(y===D||y===X||y===B)throw y;if(n!=null&&p){let R=n in u,k=u[n];u[n]=y;try{a=p(u)}finally{R?u[n]=k:delete u[n]}}else if(!p)throw y}finally{c?.(u)}return a}});f("throw",r=>(r=i(r),e=>{throw r(e)}));f("switch",(r,...e)=>(r=i(r),e.length?(e=e.map(t=>[t[0]==="case"?i(t[1]):null,(t[0]==="case"?t[2]:t[1])?.[0]===";"?(t[0]==="case"?t[2]:t[1]).slice(1).map(i):(t[0]==="case"?t[2]:t[1])?[i(t[0]==="case"?t[2]:t[1])]:[]]),t=>{let o=r(t),n=!1,p;for(let[u,a]of e)if(n||u===null||u(t)===o)for(n=!0,c=0;c<a.length;c++)try{p=a[c](t)}catch(y){if(y===D)return p;throw y}var c;return p}):t=>r(t)));f("import",()=>()=>{});f("export",()=>()=>{});f("from",(r,e)=>()=>{});f("as",(r,e)=>()=>{});f("default",r=>i(r));var Ue=new WeakMap,Oo=(r,...e)=>typeof r=="string"?i(s(r)):Ue.get(r)||Ue.set(r,_o(r,e)).get(r),Ke=57344,_o=(r,e)=>{let t=r.reduce((p,c,u)=>p+(u?String.fromCharCode(Ke+u-1):"")+c,""),o=s(t),n=p=>{if(typeof p=="string"&&p.length===1){let c=p.charCodeAt(0)-Ke,u;if(c>=0&&c<e.length)return u=e[c],Lo(u)?u:[,u]}return Array.isArray(p)?p.map(n):p};return i(n(o))},Lo=r=>typeof r=="string"||Array.isArray(r)&&(typeof r[0]=="string"||r[0]===void 0),Po=Oo;export{fr as access,A as binary,i as compile,m as cur,Po as default,O as err,d as expr,J as group,vo as id,l as idx,w as keyword,j as literal,Ge as loc,N as lookup,$r as member,pr as nary,E as next,f as operator,sr as operators,L as parens,s as parse,z as peek,v as prec,lr as propName,T as seek,h as skip,g as token,_ as unary,S as word};
|
|
3
|
+
${n}${c}${u}`)},Qe=(r,e=l)=>(Array.isArray(r)&&(r.loc=e),r),T=(r,e=l,t)=>{for(;t=r(m.charCodeAt(l));)l+=t;return m.slice(e,l)},h=(r=1)=>m[l+=r],k=r=>l=r,d=(r=0,e)=>{let t,o,n;for(e&&s.enter?.(r,e);(t=s.space())&&t!==e&&(n=s.step(o,r,t,d));)o=n;return e&&(t==e?(l++,s.exit?.(r,e)):O("Unclosed "+String.fromCharCode(e-(e>42?2:1)))),o},x=(r=l)=>{for(;m.charCodeAt(r)<=32;)r++;return m.charCodeAt(r)},Mo=s.id=r=>r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r==36||r==95||r>=192&&r!=215&&r!=247,E=(r,e=r.length)=>m.substr(l,e)===r&&!s.id(m.charCodeAt(l+e)),P=()=>(h(),d(0,41)),N=[],v={},g=(r,e=32,t,o=r.charCodeAt(0))=>jr({op:r,l:r.length,p:v[r]=!N[o]&&v[r]||e,map:t,word:r.toUpperCase()!==r,kw:!1}),A=(r,e,t=!1)=>g(r,e,(o,n)=>o&&(n=d(e-(t?.5:0)))&&[r,o,n]),_=(r,e,t)=>g(r,e,o=>t?o&&[r,o]:!o&&(o=d(e-.5))&&[r,o]),$=(r,e)=>g(r,200,t=>!t&&[,e]),fr=(r,e,t,o)=>g(r,e,(n,p,c=n)=>(p=d(e-(t?.5:0)),n?.[0]!==r&&(n=[r,n||null]),p?.[0]===r?n.push(...p.slice(1)):p?n.push(p):o||x()===r.charCodeAt(0)?n.push(null):c&&n.length===2&&(n=n[1]),n)),z=(r,e)=>g(r[0],e,t=>!t&&[r,d(0,r.charCodeAt(1))||null]),lr=(r,e)=>g(r[0],e,t=>t&&[r,t,d(0,r.charCodeAt(1))||null]),ur=(r,e)=>(s.space(),e=m.charCodeAt(l),s.id(e)&&(e<48||e>57)?T(s.id):d(r)),Qr=(r,e)=>g(r,e,(t,o)=>t&&(o=ur(e))&&[r,t,o]),w=(r,e,t)=>(v[r]??=e,jr({op:r,l:r.length,p:e,map:t,word:!0,kw:!0})),Hr=(r,e,t=(o,n,p,c=l,u,a,y)=>{for(y=0;a=r[y++];)if(!(a.kw&&o)&&!(p?a.op!==p:!((a.l<2||a.op.charCodeAt(1)===m.charCodeAt(l+1)&&(a.l<3||m.substr(l,a.l)===a.op))&&(!a.word||!s.id(m.charCodeAt(l+a.l)))&&(p=a.op)))&&!(n>=a.p)&&!(a.kw&&s.prop&&!s.prop(l+a.l))){if(l+=a.l,u=a.map(o))return Qe(u,c);l=c,p=0,a.word||o||e||r[y]||O()}return e?.(o,n,p)})=>(t.ops=r,t.tail=e,t),jr=(r,e=r.op.charCodeAt(0),t=N[e])=>N[e]=t?.ops?Hr([r,...t.ops],t.tail):Hr([r],t);s.space=r=>{for(;(r=m.charCodeAt(l))<=32;)l++;return r};s.step=(r,e,t,o,n)=>(n=N[t])&&n(r,e)||(r?null:T(s.id)||null);var pr={},f=(r,e,t=pr[r])=>pr[r]=(...o)=>e(...o)||t?.(...o),i=r=>Array.isArray(r)?r[0]==null?(e=>()=>e)(r[1]):pr[r[0]]?.(...r.slice(1))??O(`Unknown operator: ${r[0]}`,r?.loc):i.id(r);i.id=r=>r===void 0?()=>{}:e=>e?.[r];var cr=46,Q=48,W=57,$r=69,Wr=101,je=43,$e=45,qr=95,We=97,qe=102,ze=65,Je=70,zr=r=>r.indexOf("_")<0?r:r.replaceAll("_",""),Ve=r=>r===cr&&(r=m.charCodeAt(l+1))!==cr&&!(s.id(r)&&r>W&&r!==Wr&&r!==$r)||r>=Q&&r<=W||r===qr||((r===$r||r===Wr)&&((r=m.charCodeAt(l+1))>=Q&&r<=W||r===je||r===$e)?2:0),mr=r=>(r=+zr(T(Ve)))!=r?O():[,r],Ye=r=>e=>e===qr||e>=Q&&e<=W&&e-Q<r||r===16&&(e>=We&&e<=qe||e>=ze&&e<=Je);s.number=null;N[cr]=r=>!r&&m.charCodeAt(l+1)>=Q&&m.charCodeAt(l+1)<=W&&mr();for(let r=Q;r<=W;r++)N[r]=e=>e?void 0:mr();N[Q]=(r,e)=>{if(!r){for(let t in s.number)if(t[0]==="0"&&(m.charCodeAt(l+1)|32)===t.charCodeAt(1)){h(2);let o=zr(T(Ye(e=s.number[t])));return[,parseInt(o,e)]}return mr()}};var te=92,Jr=34,Vr=39,Yr=117,Zr=120,oe=123,Ze=125,br=10,be=13,rt={n:`
|
|
4
|
+
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v",0:"\0"},re=r=>r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:-1,ee=r=>{if(m.charCodeAt(r)!==te)return;let e=m.charCodeAt(r+1);if(e===Zr||e===Yr&&m.charCodeAt(r+2)!==oe){let t=e===Zr?2:4,o=0,n;for(let p=0;p<t;p++){if((n=re(m.charCodeAt(r+2+p)))<0)return;o=o*16+n}return[o,2+t]}if(e===Yr){let t=0,o=r+3,n;for(;(n=re(m.charCodeAt(o)))>=0;)t=t*16+n,o++;if(o>r+3&&t<=1114111&&m.charCodeAt(o)===Ze)return[t,o-r+1]}},et=()=>{let r=m.charCodeAt(l+1);if(r===br)return["",2];if(r===be)return["",m.charCodeAt(l+2)===br?3:2];let e=ee(l);if(e){let[t,o]=e;if(t>=55296&&t<=56319){let n=ee(l+o);n&&n[0]>=56320&&n[0]<=57343&&(t=65536+(t-55296)*1024+n[0]-56320,o+=n[1])}return[String.fromCodePoint(t),o]}return[rt[m[l+1]]||m[l+1],2]},ar=(r,e=!1)=>{let t=l,o,n;for(;(n=m.charCodeAt(l))-r&&!(e&&(n===0||n===36&&m.charCodeAt(l+1)===oe));){if(n!==te){h();continue}o||(o=[]),o.push(m.slice(t,l));let[c,u]=et();o.push(c),h(u),t=l}let p=m.slice(t,l);return o?(o.push(p),o.join("")):p},ne=r=>(e,t,o="",n=String.fromCharCode(r))=>{if(!(e||!s.string?.[n]))return h(),o+=ar(r),m[l]===n?h():O("Bad string"),[,o]};N[Jr]=ne(Jr);N[Vr]=ne(Vr);s.string={'"':!0};var tt=20;"= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map(r=>A(r,tt,!0));var ot=30,nt=40,it=140;_("!",it);A("||",ot);A("&&",nt);var st=50,pt=60,ft=70,ie=100,lt=140;A("|",st);A("&",ft);A("^",pt);A(">>",ie);A("<<",ie);_("~",lt);var Y=90;A("<",Y);A(">",Y);A("<=",Y);A(">=",Y);var se=80;A("==",se);A("!=",se);var pe=110,dr=120,fe=140;A("+",pe);A("-",pe);A("*",dr);A("/",dr);A("%",dr);_("+",fe);_("-",fe);var Z=150;g("++",Z,r=>r?["++",r,null]:["++",d(Z-1)]);g("--",Z,r=>r?["--",r,null]:["--",d(Z-1)]);var ut=5,ct=10;fr(",",ct);fr(";",ut,!0,!0);var mt=170;z("()",mt);var le=170,at=160;lr("[]",le);Qr(".",le);lr("()",at);var dt=s.space;s.comment??={"//":`
|
|
5
|
+
`,"/*":"*/"};s.space=()=>{for(var r,e,t,o,n;r=dt();){for(t in e=s.comment)if(r===t.charCodeAt(0)&&(t.length<2||m.charCodeAt(l+1)===t.charCodeAt(1))&&(t.length<3||m.substr(l,t.length)===t)){o=e[t],n=m.indexOf(o,l+t.length),k(n<0?m.length:o===`
|
|
6
|
+
`?n:n+o.length),r=0;break}if(r)return r}return r};var ue=80;A("===",ue);A("!==",ue);var ht=30;A("??",ht);var At=130,yt=20;A("**",At,!0);A("**=",yt,!0);var ce=90;A("in",ce);A("of",ce);var wt=20,Ct=100;A(">>>",Ct);A(">>>=",wt,!0);var hr=20;A("||=",hr,!0);A("&&=",hr,!0);A("??=",hr,!0);$("true",!0);$("false",!1);$("null",null);w("undefined",200,()=>[]);$("NaN",NaN);$("Infinity",1/0);var Ar=20;g("?",Ar,(r,e,t)=>r&&(e=d(Ar-1))&&T(o=>o===58)&&(t=d(Ar-1),["?",r,e,t]));var gt=20;A("=>",gt,!0);var Et=20;_("...",Et);var me=170;g("?.",me,(r,e)=>{if(!r)return;let t=s.space();return t===40?(h(),["?.()",r,d(0,41)||null]):t===91?(h(),["?.[]",r,d(0,93)]):(e=ur(me),e?["?.",r,e]:void 0)});var yr=140,ae=160,St=ae+1;_("typeof",yr);_("void",yr);_("delete",yr);var kt=r=>s.space()===40?(h(),["()",r,d(0,41)||null]):r;w("new",St,()=>E(".target")?(h(7),["new.target"]):["new",kt(d(ae))]);var Tt=20,de=200;s.prop=r=>x(r)!==58;z("[]",de);z("{}",de);A(":",Tt-1,!0);var Nt=170,b=96,Rt=36,It=123,he=()=>{let r=[];for(;;){r.push([,ar(b,!0)]);let e=m.charCodeAt(l);if(e===b)return h(),r;(e!==Rt||m.charCodeAt(l+1)!==It)&&O("Unterminated template"),h(2),r.push(d(0,125))}},Ot=r=>r.length<2&&r[0]?.[0]===void 0?r[0]||[,""]:["`",...r],_t=N[b];N[b]=(r,e)=>r&&e<Nt?s.asi&&s.newline?void 0:(h(),["``",r,...he()]):r?_t?.(r,e):(h(),Ot(he()));s.string["'"]=!0;s.number={"0x":16,"0b":2,"0o":8};var Pt=92,Lt=117,vt=123,Bt=125,Mt=183,Ut=s.id,Ae=r=>r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102,Dt=(r=l+2,e,t=0,o=0)=>{if(m.charCodeAt(l)!==Pt||m.charCodeAt(l+1)!==Lt)return 0;if(m.charCodeAt(r)===vt){for(;Ae(e=m.charCodeAt(++r));)t=t*16+(e<=57?e-48:(e&31)+9);return r>l+3&&t<=1114111&&m.charCodeAt(r)===Bt?r-l+1:0}for(;o<4&&Ae(m.charCodeAt(r+o));)o++;return o===4?6:0};s.id=r=>Ut(r)||r===Mt||Dt();var wr=5,we=10,Cr=r=>{let e=l,t=d(we-1);return t==null?r:r==="let"&&(t==="in"||t==="of")?(k(e),r):t[0]===","?[r,...t.slice(1)]:[r,t]};w("let",wr+1,()=>Cr("let"));w("const",wr+1,()=>Cr("const"));w("var",wr+1,()=>Cr("var"));var ye=r=>Array.isArray(r)&&r[0]==="="&&typeof r[1]=="string";w("using",200,()=>{let r=l;s.space();let e=m.charCodeAt(l);if(s.id(e)&&(e<48||e>57)){let t=l;if(T(s.id),s.space(),m.charCodeAt(l)===61&&m.charCodeAt(l+1)!==61&&m.charCodeAt(l+1)!==62){k(t);let o=d(we-1);if(o[0]===","?o.slice(1).every(ye):ye(o))return o[0]===","?["using",...o.slice(1)]:["using",o]}}return k(r),"using"});var rr=5,Kt=59,U=()=>(s.space()===123||O("Expected {"),h(),d(rr-.5,125)||null),F=()=>s.space()!==123?d(rr+.5):(h(),d(rr-.5,125)||null),Ft=()=>{let r=l;return s.space()===Kt&&h(),s.space(),E("else")?(h(4),s.semi=!1,!0):(k(r),!1)};w("if",rr+1,()=>{s.space();let r=["if",P(),F()];return Ft()&&r.push(F()),r});var Gt=200;w("function",Gt,()=>{s.space();let r=!1;m[l]==="*"&&(r=!0,h(),s.space());let e=T(s.id);return e&&s.space(),r?["function*",e,P()||null,U()]:["function",e,P()||null,U()]});var Ce=200,Er=140,gr=20,ge=40;_("await",Er);var xt=10,Xt=13,Ee=r=>{let e;for(;(e=m.charCodeAt(r))<=32;){if(e===xt||e===Xt)return!0;r++}return!1};w("yield",Er,()=>Ee(l)?["yield"]:(s.space(),m[l]==="*"?(h(),s.space(),["yield*",d(gr)]):["yield",d(gr)]));w("async",Ce,()=>{if(Ee(l))return;if(s.space(),E("function"))return["async",d(Er)];let r=l,e=d(Ce-.5);if(e?.[0]===":")return[":",e[1],["async",e[2]]];if(e&&x()===ge)return["async",e];if((e||x()===ge)&&(k(r),e=d(gr-.5))?.[0]==="=>")return["async",e]});var Se=200;var Ht=90,Qt=175,jt=160,$t=jt-.5;_("static",Qt);A("instanceof",Ht);g("#",Se,r=>{if(r)return;let e=T(s.id);return e?"#"+e:void 0});w("class",Se,()=>{s.space();let r=T(s.id)||null;if(r==="extends")r=null,s.space();else{if(s.space(),!E("extends"))return["class",r,null,U()];h(7),s.space()}return["class",r,d($t),U()]});var Sr=47,Wt=92,qt=91,zt=93;g("/",140,r=>{let e=m.charCodeAt(l);if(r||e===Sr||e===42||e===43||e===63)return;let t=!1,o=T(p=>p===Wt?2:p===qt?(t=!0,1):p===zt?(t=!1,1):p&&(t||p!==Sr));m.charCodeAt(l)===Sr||O("Unterminated regex"),h();let n=T(p=>p===103||p===105||p===109||p===115||p===117||p===121);return n?["//",o,n]:["//",o]});var j=5,J=125,V=59;w("while",j+1,()=>(s.space(),["while",P(),F()]));w("do",j+1,r=>(r=F(),s.space(),h(5),s.space(),["do",r,P()]));var ke={let:1,const:1,var:1},kr=(r,e=r,t)=>{if(ke[r?.[0]]&&Array.isArray(r[1]))return(e=kr(r[1]))?.[0]==="in"||e?.[0]==="of"?[e[0],[r[0],e[1]],r.length>2?[",",e[2],...r.slice(2)]:e[2]]:r;for(;Array.isArray(e)&&v[e[0]]<v.in&&!ke[e[0]];)t=e,e=e[1];return t&&Array.isArray(e)&&(e[0]==="in"||e[0]==="of")?(t[1]=e[2],[e[0],e[1],r]):r};w("for",j+1,()=>(s.space(),E("await")?(h(5),s.space(),["for await",kr(P()),F()]):["for",kr(P()),F()]));w("break",j+1,()=>{s.asi&&(s.newline=!1);let r=l,e=s.space();if(!e||e===J||e===V||s.newline)return["break"];let t=T(s.id);if(!t)return["break"];let o=s.space();return!o||o===J||o===V||s.newline?["break",t]:(k(r),["break"])});w("continue",j+1,()=>{s.asi&&(s.newline=!1);let r=l,e=s.space();if(!e||e===J||e===V||s.newline)return["continue"];let t=T(s.id);if(!t)return["continue"];let o=s.space();return!o||o===J||o===V||s.newline?["continue",t]:(k(r),["continue"])});w("return",j+1,()=>{s.asi&&(s.newline=!1);let r=s.space();return!r||r===J||r===V||s.newline?["return"]:["return",d(j)]});var Tr=5;w("try",Tr+1,()=>{let r=["try",U()];return s.space(),E("catch")&&(h(5),s.space(),r.push(["catch",x()===40?P():null,U()])),s.space(),E("finally")&&(h(7),r.push(["finally",U()])),r});w("throw",Tr+1,()=>{if(s.asi&&(s.newline=!1),s.space(),s.newline)throw SyntaxError("Unexpected newline after throw");return["throw",d(Tr)]});var Re=5,Jt=20,Te=58,Vt=59,Nr=125,Rr=0,Ie=(r,e=r.length,t=r.charCodeAt(0),o=N[t])=>N[t]=(n,p,c)=>E(r)&&!n&&Rr&&(!s.prop||s.prop(l+e))||o?.(n,p,c);Ie("case");Ie("default");var Ne=r=>{let e=[];for(;(r=s.space())!==Nr&&!E("case")&&!E("default");){if(r===Vt){h();continue}s.semi=!1,e.push(d(Re+.5))||O()}return e.length>1?[";",...e]:e[0]||null},Yt=()=>{s.space()===123||O("Expected {"),h(),Rr++;let r=[];try{for(;s.space()!==Nr;)if(E("case")){k(l+4),s.space(),s.semi=!1;let e=d(Jt-.5);s.space()===Te&&h(),r.push(["case",e,Ne()])}else E("default")?(k(l+7),s.space()===Te&&h(),r.push(["default",Ne()])):O("Expected case or default")}finally{Rr--}return h(),s.exit?.(0,Nr),r};w("switch",Re+1,()=>s.space()===40&&["switch",P(),...Yt()]);var Ir=5,Zt=20;w("debugger",Ir+1,()=>["debugger"]);w("with",Ir+1,()=>(s.space(),["with",P(),F()]));var bt=["if","for","while","do","switch","try"];g(":",Zt-1,r=>typeof r=="string"&&(s.space(),bt.some(e=>E(e)))&&[":",r,d(Ir)]);var Or=5,q=10,Oe=42,ro=N[Oe];N[Oe]=(r,e)=>r?ro?.(r,e):(h(),"*");g("from",q+1,r=>r?r[0]!=="="&&r[0]!==","&&(s.space(),["from",r,d(q+1)]):!1);g("as",q+2,r=>r?(s.space(),["as",r,d(q+2)]):!1);w("import",Or,()=>E(".meta")?(h(5),["import.meta"]):["import",d(q)]);w("export",Or,()=>(s.space(),E("default")?(h(7),["export",["default",d(q)]]):["export",d(Or)]));var eo=20,er=200,to=10,oo=13,no=34,io=35,so=39,_e=40,Pr=41,po=91,Lr=123,vr=125,fo=(r,e)=>{for(;r<e;){let t=m.charCodeAt(r++);if(t===to||t===oo)return!0}return!1},lo=r=>r===no||r===so||r===po||r===io,Pe=()=>T(s.id)||(lo(m.charCodeAt(l))?d(er-.5):null),uo=r=>typeof r=="string"||Array.isArray(r)&&(r[0]===void 0||r[0]==="[]"),tr=r=>e=>{let t=s.newline,o=s.semi,n=r(e);return n||(s.newline=t,s.semi=o),n},Le=r=>e=>{if(e)return;let t=l;if(s.space(),s.semi||fo(t,l))return!1;let o=Pe();if(!o||(s.space(),m.charCodeAt(l)!==_e))return!1;h();let n=d(0,Pr);return s.space(),m.charCodeAt(l)!==Lr?!1:(h(),[r,o,n,d(0,vr)])};g("get",er,tr(Le("get")));g("set",er,tr(Le("set")));var _r=r=>r==null||typeof r=="string"||Array.isArray(r)&&(r[0]===","?r.slice(1).every(_r):r[0]==="="?typeof r[1]=="string"||_r(r[1]):r[0]==="..."||r[0]==="{}"||r[0]==="[]"),co=v["*"];g("*",er,tr(r=>{let e=r&&s.newline;if(r&&!e)return;let t=l,o=Pe();if(!o)return r?(k(t),void 0):!1;if(s.space(),m.charCodeAt(l)!==_e)return r?(k(t),void 0):!1;h();let n=d(0,Pr)||null;if(r&&!_r(n))return k(t),void 0;if(s.space(),m.charCodeAt(l)!==Lr)return r?(k(t),void 0):!1;h();let p=[":",o,["function*",null,n,d(0,vr)||null]];return r?r[0]===";"?(r.push(p),r):[";",r,p]:p}));v["*"]=co;g("(",eo-1,tr(r=>{if(!r)return;let e,t;if(Array.isArray(r)&&r[0]==="static"&&(e="static",r=r[1]),Array.isArray(r)&&r[0]==="async"&&(t=!0,r=r[1]),!uo(r))return;let o=d(0,Pr)||null;if(s.space(),m.charCodeAt(l)!==Lr)return;h();let n=["function",null,o,d(0,vr)||null];t&&(n=["async",n]);let p=[":",r,n];return e?[e,p]:p}));s.comment["#!"]=`
|
|
7
|
+
`;var Ue=32,Dr=10,mo=59,ao=125,ve=91,Be=40,or=v.asi??v[";"],ho=s._baseSpace??=s.space,Ao=s._baseStep??=s.step,Br=r=>Array.isArray(r)||typeof r=="string",yo=(v[";"]??5)+1,Ur=r=>Array.isArray(r)&&(v[r[0]]<=yo||r[0]==="{}"&&Ur(r[1])),wo=(r,e)=>{for(;(e=m.charCodeAt(r))<=Ue;){if(e===Dr)return!0;r++}return!1},Co=(r=l,e)=>{for(;r-- >0&&(e=m.charCodeAt(r))<=Ue;)if(e===Dr)return!0;return!1};s.space=(r,e)=>{for(;;){for(e=l,r=ho();e<l;)if(m.charCodeAt(e++)===Dr){s.newline=!0;break}if(r===mo&&wo(l+1)){k(l+1),s.newline=s.semi=!0;continue}return r}};s.enter=()=>s.newline=s.semi=!1;s.exit=(r,e)=>{e===ao&&(s.newline=!0,s.semi=!1)};s.step=(r,e,t,o)=>{if(s.semi&&e>=or)return!1;if(r&&!Br(r))return null;if(Br(r)){let p=(t===ve||t===Be)&&Co();if(s.semi||t===ve&&(p||Ur(r))||t===Be&&(Ur(r)||p&&e>=or))return Me(r,e,o)??null}let n=s.newline;return Ao(r,e,t,o)??(Br(r)&&n?Me(r,e,o)??null:null)};var Mr=0,go=2e3,Me=s.asi=(r,e,t,o,n)=>{if(e>=or||Mr>=go)return;s.semi=!1;let p=l;Mr++;try{o=t(or-.5)}finally{Mr--}if(!(!o||l===p))return n=o?.[0]===";"?o.slice(1):[o],r?.[0]===";"?(r.push(...n),r):[";",r,...n]};var Ke=(r,e,t,o)=>typeof r=="string"?n=>e(n,r,n):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o,n)):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n),n)):r[0]==="()"&&r.length===2?Ke(r[1],e):(()=>{throw Error("Invalid assignment target")})(),De={"=":(r,e,t)=>r[e]=t,"+=":(r,e,t)=>r[e]+=t,"-=":(r,e,t)=>r[e]-=t,"*=":(r,e,t)=>r[e]*=t,"/=":(r,e,t)=>r[e]/=t,"%=":(r,e,t)=>r[e]%=t,"|=":(r,e,t)=>r[e]|=t,"&=":(r,e,t)=>r[e]&=t,"^=":(r,e,t)=>r[e]^=t,">>=":(r,e,t)=>r[e]>>=t,"<<=":(r,e,t)=>r[e]<<=t};for(let r in De)f(r,(e,t)=>(t=i(t),Ke(e,(o,n,p)=>De[r](o,n,t(p)))));f("!",r=>(r=i(r),e=>!r(e)));f("||",(r,e)=>(r=i(r),e=i(e),t=>r(t)||e(t)));f("&&",(r,e)=>(r=i(r),e=i(e),t=>r(t)&&e(t)));f("~",r=>(r=i(r),e=>~r(e)));f("|",(r,e)=>(r=i(r),e=i(e),t=>r(t)|e(t)));f("&",(r,e)=>(r=i(r),e=i(e),t=>r(t)&e(t)));f("^",(r,e)=>(r=i(r),e=i(e),t=>r(t)^e(t)));f(">>",(r,e)=>(r=i(r),e=i(e),t=>r(t)>>e(t)));f("<<",(r,e)=>(r=i(r),e=i(e),t=>r(t)<<e(t)));f(">",(r,e)=>(r=i(r),e=i(e),t=>r(t)>e(t)));f("<",(r,e)=>(r=i(r),e=i(e),t=>r(t)<e(t)));f(">=",(r,e)=>(r=i(r),e=i(e),t=>r(t)>=e(t)));f("<=",(r,e)=>(r=i(r),e=i(e),t=>r(t)<=e(t)));f("==",(r,e)=>(r=i(r),e=i(e),t=>r(t)==e(t)));f("!=",(r,e)=>(r=i(r),e=i(e),t=>r(t)!=e(t)));f("+",(r,e)=>e!==void 0?(r=i(r),e=i(e),t=>r(t)+e(t)):(r=i(r),t=>+r(t)));f("-",(r,e)=>e!==void 0?(r=i(r),e=i(e),t=>r(t)-e(t)):(r=i(r),t=>-r(t)));f("*",(r,e)=>(r=i(r),e=i(e),t=>r(t)*e(t)));f("/",(r,e)=>(r=i(r),e=i(e),t=>r(t)/e(t)));f("%",(r,e)=>(r=i(r),e=i(e),t=>r(t)%e(t)));var Kr=(r,e,t,o)=>typeof r=="string"?n=>e(n,r):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o)):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n))):r[0]==="()"&&r.length===2?Kr(r[1],e):(()=>{throw Error("Invalid increment target")})();f("++",(r,e)=>Kr(r,e===null?(t,o)=>t[o]++:(t,o)=>++t[o]));f("--",(r,e)=>Kr(r,e===null?(t,o)=>t[o]--:(t,o)=>--t[o]));var Fe=(...r)=>(r=r.map(i),e=>{let t;for(let o of r)t=o(e);return t});f(",",Fe);f(";",Fe);var Ge=r=>r!=null&&(typeof r=="object"||typeof r=="function"),M=r=>Ge(r)?Reflect.ownKeys({[r]:0})[0]:r,L=r=>typeof r=="string"&&(r[0]==="_"&&r[1]==="_"||r==="constructor"||r==="prototype"),Eo=r=>L(M(r));i.id=r=>r===void 0||Eo(r)?()=>{}:e=>e?.[r];var nr=r=>{throw Error(r)};f("[]",(r,e)=>e===void 0?(r=r?r[0]===","?r.slice(1):[r]:[],r=r.map(t=>t==null?(()=>{}):t[0]==="..."?(t=i(t[1]),o=>t(o)):(t=i(t),o=>[t(o)])),t=>r.flatMap(o=>o(t))):(e==null&&nr("Missing index"),r=i(r),e=i(e),t=>{let o=M(e(t));return L(o)?void 0:r(t)[o]}));f(".",(r,e)=>(r=i(r),e=M(e[0]?e:e[1]),L(e)?()=>{}:t=>r(t)[e]));f("()",(r,e)=>{if(e===void 0)return r==null?nr("Empty ()"):i(r);let t=p=>p?.[0]===","&&p.slice(1).some(c=>c==null||t(c));t(e)&&nr("Empty argument");let o=e?e[0]===","?(e=e.slice(1).map(i),p=>e.map(c=>c(p))):(e=i(e),p=>[e(p)]):()=>[],n=xr(r);return n<0?()=>{}:Gr(r,n?(p,c,u)=>(c=M(c),L(c)?void 0:p[c](...o(u))):(p,c,u)=>p[c](...o(u)))});var D=r=>typeof r=="string"||Array.isArray(r)&&(r[0]==="."||r[0]==="?."||r[0]==="[]"&&r.length===3||r[0]==="?.[]"||r[0]==="()"&&r.length===2&&D(r[1])||r[0]==="{}"),Gr=(r,e,t,o)=>r==null?nr("Empty ()"):r[0]==="()"&&r.length==2?Gr(r[1],e):typeof r=="string"?n=>e(n,r,n):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o,n)):r[0]==="?."?(t=i(r[1]),o=r[2],n=>{let p=t(n);return p==null?void 0:e(p,o,n)}):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n),n)):r[0]==="?.[]"?(t=i(r[1]),o=i(r[2]),n=>{let p=t(n);return p==null?void 0:e(p,o(n),n)}):(r=i(r),n=>e([r(n)],0,n)),Fr=r=>Ge(r)?1:L(r)?-1:0,xr=(r,e=r?.[0],t=r?.[2])=>typeof r=="string"?Fr(r):e==="()"&&r.length==2?xr(r[1]):e==="."||e==="?."?Fr(t):(e==="[]"||e==="?.[]")&&r.length===3?Array.isArray(t)&&t[0]==null?Fr(t[1]):1:0,G=(r,e,t=xr(r))=>t<0?()=>{}:Gr(r,t?(o,n,p)=>(n=M(n),L(n)?void 0:e(o,n,p)):e);f("===",(r,e)=>(r=i(r),e=i(e),t=>r(t)===e(t)));f("!==",(r,e)=>(r=i(r),e=i(e),t=>r(t)!==e(t)));f("??",(r,e)=>(r=i(r),e=i(e),t=>r(t)??e(t)));var So=r=>{throw Error(r)};f("**",(r,e)=>(r=i(r),e=i(e),t=>r(t)**e(t)));f("**=",(r,e)=>(D(r)||So("Invalid assignment target"),e=i(e),G(r,(t,o,n)=>t[o]**=e(n))));f("in",(r,e)=>(r=i(r),e=i(e),t=>r(t)in e(t)));var ko=r=>{throw Error(r)};f(">>>",(r,e)=>(r=i(r),e=i(e),t=>r(t)>>>e(t)));f(">>>=",(r,e)=>(D(r)||ko("Invalid assignment target"),e=i(e),G(r,(t,o,n)=>t[o]>>>=e(n))));var To=r=>r[0]?.[0]===","?r[0].slice(1):r,X=(r,e,t)=>{if(typeof r=="string"){t[r]=e;return}let[o,...n]=r,p=To(n);if(o==="{}"){let c=[];for(let u of p){if(Array.isArray(u)&&u[0]==="..."){let C={};for(let I in e)!c.includes(I)&&!L(I)&&(C[I]=e[I]);t[u[1]]=C;break}let a,y,R;typeof u=="string"?a=y=u:u[0]==="="?(typeof u[1]=="string"?a=y=u[1]:[,a,y]=u[1],R=u[2]):[,a,y]=u,c.push(a=M(a));let S=L(a)?void 0:e[a];S===void 0&&R&&(S=i(R)(t)),X(y,S,t)}}else if(o==="[]"){let c=0;for(let u of p){if(u===null){c++;continue}if(Array.isArray(u)&&u[0]==="..."){t[u[1]]=e.slice(c);break}let a=u,y;Array.isArray(u)&&u[0]==="="&&([,a,y]=u);let R=e[c++];R===void 0&&y&&(R=i(y)(t)),X(a,R,t)}}},Xr=(...r)=>(r=r.map(e=>{if(typeof e=="string")return t=>{t[e]=void 0};if(e[0]==="="){let[,t,o]=e,n=i(o);return typeof t=="string"?p=>{p[t]=n(p)}:p=>X(t,n(p),p)}return i(e)}),e=>{for(let t of r)t(e)});f("let",Xr);f("const",Xr);f("var",Xr);var ir=r=>{throw Error(r)};f("=",(r,e)=>{if(Array.isArray(r)&&(r[0]==="let"||r[0]==="const"||r[0]==="var")){let t=r[1];return e=i(e),typeof t=="string"?o=>{o[t]=e(o)}:o=>X(t,e(o),o)}return D(r)||ir("Invalid assignment target"),e=i(e),G(r,(t,o,n)=>t[o]=e(n))});f("||=",(r,e)=>(D(r)||ir("Invalid assignment target"),e=i(e),G(r,(t,o,n)=>t[o]||=e(n))));f("&&=",(r,e)=>(D(r)||ir("Invalid assignment target"),e=i(e),G(r,(t,o,n)=>t[o]&&=e(n))));f("??=",(r,e)=>(D(r)||ir("Invalid assignment target"),e=i(e),G(r,(t,o,n)=>t[o]??=e(n))));f("?",(r,e,t)=>(r=i(r),e=i(e),t=i(t),o=>r(o)?e(o):t(o)));var B=[];f("=>",(r,e)=>{r=r?.[0]==="()"?r[1]:r;let t=r?r[0]===","?r.slice(1):[r]:[],o=-1,n=null,p=t[t.length-1];Array.isArray(p)&&p[0]==="..."&&(o=t.length-1,n=p[1],t.length--);let c=e?.[0]==="{}";return e=i(c?["{",e[1]]:e),u=>(...a)=>{let y={};t.forEach((S,C)=>y[S]=a[C]),n&&(y[n]=a.slice(o));let R=new Proxy(y,{get:(S,C)=>C in S?S[C]:u?.[C],set:(S,C,I)=>((C in S?S:u)[C]=I,!0),has:(S,C)=>C in S||(u?C in u:!1)});try{let S=e(R);return c?void 0:S}catch(S){if(S===B)return S[0];throw S}}});f("...",r=>(r=i(r),e=>{let t=r(e),o=[];for(let n of Object.keys(t))L(n)||o.push([n,t[n]]);return o}));f("?.",(r,e)=>(r=i(r),e=M(e),L(e)?()=>{}:t=>r(t)?.[e]));f("?.[]",(r,e)=>(r=i(r),e=i(e),t=>{let o=r(t);if(o==null)return;let n=M(e(t));return L(n)?void 0:o[n]}));f("?.()",(r,e)=>{let t=e?e[0]===","?(e=e.slice(1).map(i),n=>e.map(p=>p(n))):(e=i(e),n=>[e(n)]):()=>[];if(r[0]==="."||r[0]==="?."){let n=r[0]==="?.",p=i(r[1]),c=M(r[2]);return L(c)?()=>{}:n?u=>p(u)?.[c]?.(...t(u)):u=>p(u)[c]?.(...t(u))}if((r[0]==="[]"||r[0]==="?.[]")&&r.length===3){let n=r[0]==="?.[]",p=i(r[1]),c=i(r[2]);return u=>{let a=p(u);if(n&&a==null)return;let y=M(c(u));return L(y)?void 0:a[y]?.(...t(u))}}let o=i(r);return n=>o(n)?.(...t(n))});f("typeof",r=>(r=i(r),e=>typeof r(e)));f("void",r=>(r=i(r),e=>(r(e),void 0)));f("delete",r=>{if(r[0]==="."){let e=i(r[1]),t=r[2];return o=>delete e(o)[t]}if(r[0]==="[]"){let e=i(r[1]),t=i(r[2]);return o=>delete e(o)[t(o)]}return()=>!0});f("new",r=>{let e=i(r?.[0]==="()"?r[1]:r),t=r?.[0]==="()"?r[2]:null,o=t?t[0]===","?(n=>p=>n.map(c=>c(p)))(t.slice(1).map(i)):(n=>p=>[n(p)])(i(t)):()=>[];return n=>new(e(n))(...o(n))});var sr=Symbol("accessor");f("get",(r,e)=>(e=e?i(e):()=>{},t=>[[sr,r,{get:function(){let o=Object.create(t||{});return o.this=this,e(o)}}]]));f("set",(r,e,t)=>(t=t?i(t):()=>{},o=>[[sr,r,{set:function(n){let p=Object.create(o||{});p.this=this,p[e]=n,t(p)}}]]));var No=r=>r==null||typeof r=="string"||[":",",","...","get","set"].includes(r[0]);f("{}",(r,e)=>{if(e!==void 0)return;if(!No(r))return i(["{",r]);r=r?r[0]!==","?[r]:r.slice(1):[];let t=r.map(o=>i(typeof o=="string"?[":",o,o]:o));return o=>{let n={},p={};for(let c of t.flatMap(u=>u(o)))if(c[0]===sr){let[,u,a]=c;p[u]={...p[u],...a,configurable:!0,enumerable:!0}}else n[c[0]]=c[1];for(let c in p)Object.defineProperty(n,c,p[c]);return n}});f("{",r=>(r=r?i(r):()=>{},e=>r(Object.create(e))));f(":",(r,e)=>(e=i(e),Array.isArray(r)?(r=i(r),t=>[[r(t),e(t)]]):t=>[[r,e(t)]]));f("`",(...r)=>(r=r.map(i),e=>r.map(t=>t(e)).join("")));f("``",(r,...e)=>{r=i(r);let t=[],o=[];for(let p of e)Array.isArray(p)&&p[0]===void 0?t.push(p[1]):o.push(i(p));let n=Object.assign([...t],{raw:t});return p=>r(p)(n,...o.map(c=>c(p)))});f("function",(r,e,t)=>{t=t?i(t):()=>{};let o=e?e[0]===","?e.slice(1):[e]:[],n=null,p=-1,c=o[o.length-1];return Array.isArray(c)&&c[0]==="..."&&(p=o.length-1,n=c[1],o.length--),u=>{let a=(...y)=>{let R={};o.forEach((C,I)=>R[C]=y[I]),n&&(R[n]=y.slice(p));let S=new Proxy(R,{get:(C,I)=>I in C?C[I]:u[I],set:(C,I,He)=>((I in C?C:u)[I]=He,!0),has:(C,I)=>I in C||I in u});try{return t(S)}catch(C){if(C===B)return C[0];throw C}};return r&&(u[r]=a),a}});f("function*",(r,e,t)=>{throw Error("Generator functions are not supported in evaluation")});f("async",r=>{let e=i(r);return t=>{let o=e(t);return async function(...n){return o(...n)}}});f("await",r=>(r=i(r),async e=>await r(e)));f("yield",r=>(r=r?i(r):null,e=>{throw{__yield__:r?r(e):void 0}}));f("yield*",r=>(r=i(r),e=>{throw{__yield_all__:r(e)}}));var Ro=Symbol("static"),Io=r=>{throw Error(r)};f("instanceof",(r,e)=>(r=i(r),e=i(e),t=>r(t)instanceof e(t)));f("class",(r,e,t)=>(e=e?i(e):null,t=t?i(t):null,o=>{let n=e?.(o),p=function(...c){if(!(this instanceof p))return Io("Class constructor must be called with new");let u=e?Reflect.construct(n,c,p):this;return p.prototype.__constructor__&&p.prototype.__constructor__.apply(u,c),u};if(e&&(Object.setPrototypeOf(p.prototype,n.prototype),Object.setPrototypeOf(p,n)),t){let c=Object.create(o);e&&(c.super=n);let u=t(c),a=Array.isArray(u)&&typeof u[0]?.[0]=="string"?u:[];for(let[y,R]of a)y==="constructor"?p.prototype.__constructor__=R:p.prototype[y]=R}return r&&(o[r]=p),p}));f("static",r=>(r=i(r),e=>[[Ro,r(e)]]));f("//",(r,e)=>{let t=new RegExp(r,e||"");return()=>t});f("if",(r,e,t)=>(r=i(r),e=i(e),t=t!==void 0?i(t):null,o=>r(o)?e(o):t?.(o)));var K=Symbol("break"),H=Symbol("continue");f("while",(r,e)=>(r=i(r),e=i(e),t=>{let o;for(;r(t);)try{o=e(t)}catch(n){if(n===K)break;if(n===H)continue;if(n===B)return n[0];throw n}return o}));f("do",(r,e)=>(r=i(r),e=i(e),t=>{let o;do try{o=r(t)}catch(n){if(n===K)break;if(n===H)continue;if(n===B)return n[0];throw n}while(e(t));return o}));f("for",(r,e)=>{if(Array.isArray(r)&&r[0]===";"){let[,t,o,n]=r;return t=t?i(t):null,o=o?i(o):()=>!0,n=n?i(n):null,e=i(e),p=>{let c;for(t?.(p);o(p);n?.(p))try{c=e(p)}catch(u){if(u===K)break;if(u===H)continue;if(u===B)return u[0];throw u}return c}}if(Array.isArray(r)&&(r[0]==="in"||r[0]==="of")){let[t,o,n]=r;if(Array.isArray(o)&&(o[0]==="let"||o[0]==="const"||o[0]==="var")&&(o=o[1]),t==="in")return _o(o,n,e);if(t==="of")return Oo(o,n,e)}});var Oo=(r,e,t)=>{e=i(e),t=i(t);let o=Array.isArray(r);return n=>{let p,c=o?null:n[r];for(let u of e(n)){o?X(r,u,n):n[r]=u;try{p=t(n)}catch(a){if(a===K)break;if(a===H)continue;if(a===B)return a[0];throw a}}return o||(n[r]=c),p}},_o=(r,e,t)=>{e=i(e),t=i(t);let o=Array.isArray(r);return n=>{let p,c=o?null:n[r];for(let u in e(n)){o?X(r,u,n):n[r]=u;try{p=t(n)}catch(a){if(a===K)break;if(a===H)continue;if(a===B)return a[0];throw a}}return o||(n[r]=c),p}};f("break",()=>()=>{throw K});f("continue",()=>()=>{throw H});f("return",r=>(r=r!==void 0?i(r):null,e=>{throw B[0]=r?.(e),B}));f("try",(r,...e)=>{r=r?i(r):null;let t=e.find(u=>u?.[0]==="catch"),o=e.find(u=>u?.[0]==="finally"),n=t?.[1],p=t?.[2]?i(t[2]):null,c=o?.[1]?i(o[1]):null;return u=>{let a;try{a=r?.(u)}catch(y){if(y===K||y===H||y===B)throw y;if(n!=null&&p){let R=n in u,S=u[n];u[n]=y;try{a=p(u)}finally{R?u[n]=S:delete u[n]}}else if(!p)throw y}finally{c?.(u)}return a}});f("throw",r=>(r=i(r),e=>{throw r(e)}));f("switch",(r,...e)=>(r=i(r),e.length?(e=e.map(t=>[t[0]==="case"?i(t[1]):null,(t[0]==="case"?t[2]:t[1])?.[0]===";"?(t[0]==="case"?t[2]:t[1]).slice(1).map(i):(t[0]==="case"?t[2]:t[1])?[i(t[0]==="case"?t[2]:t[1])]:[]]),t=>{let o=r(t),n=!1,p;for(let[u,a]of e)if(n||u===null||u(t)===o)for(n=!0,c=0;c<a.length;c++)try{p=a[c](t)}catch(y){if(y===K)return p;throw y}var c;return p}):t=>r(t)));f("import",()=>()=>{});f("export",()=>()=>{});f("from",(r,e)=>()=>{});f("as",(r,e)=>()=>{});f("default",r=>i(r));var xe=new WeakMap,Po=(r,...e)=>typeof r=="string"?i(s(r)):xe.get(r)||xe.set(r,Lo(r,e)).get(r),Xe=57344,Lo=(r,e)=>{let t=r.reduce((p,c,u)=>p+(u?String.fromCharCode(Xe+u-1):"")+c,""),o=s(t),n=p=>{if(typeof p=="string"&&p.length===1){let c=p.charCodeAt(0)-Xe,u;if(c>=0&&c<e.length)return u=e[c],vo(u)?u:[,u]}return Array.isArray(p)?p.map(n):p};return i(n(o))},vo=r=>typeof r=="string"||Array.isArray(r)&&(typeof r[0]=="string"||r[0]===void 0),Bo=Po;export{lr as access,A as binary,i as compile,m as cur,Bo as default,O as err,d as expr,z as group,Mo as id,l as idx,w as keyword,$ as literal,Qe as loc,N as lookup,Qr as member,fr as nary,T as next,f as operator,pr as operators,P as parens,s as parse,x as peek,v as prec,ur as propName,k as seek,h as skip,g as token,_ as unary,E as word};
|
package/justin.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var u,
|
|
2
|
-
`),o=e.pop(),
|
|
3
|
-
${
|
|
4
|
-
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v",0:"\0"},
|
|
5
|
-
`,"/*":"*/"};d.space=()=>{for(var r,t,e,o,
|
|
6
|
-
`?i:i+o.length),r=0;break}if(r)return r}return r};var vr=80;l("===",vr);l("!==",vr);var dt=30;l("??",dt);var ht=130,At=20;l("**",ht,!0);l("**=",At,!0);var Pr=90;l("in",Pr);l("of",Pr);var gt=20,yt=100;l(">>>",yt);l(">>>=",gt,!0);var x=20;l("||=",x,!0);l("&&=",x,!0);l("??=",x,!0);U("true",!0);U("false",!1);U("null",null);M("undefined",200,()=>[]);U("NaN",NaN);U("Infinity",1/0);var b=20;I("?",b,(r,t,e)=>r&&(t=A(b-1))&&v(o=>o===58)&&(e=A(b-1),["?",r,t,e]));var Ct=20;l("=>",Ct,!0);var St=20;N("...",St);var ar=170;I("?.",ar,(r,t)=>{if(!r)return;let e=d.space();return e===40?(C(),["?.()",r,A(0,41)||null]):e===91?(C(),["?.[]",r,A(0,93)]):(t=J(ar),t?["?.",r,t]:void 0)});var rr=140,Tr=160,Et=Tr+1;N("typeof",rr);N("void",rr);N("delete",rr);var wt=r=>d.space()===40?(C(),["()",r,A(0,41)||null]):r;M("new",Et,()=>fr(".target")?(C(7),["new.target"]):["new",wt(A(Tr))]);var It=20,Ur=200;d.prop=r=>H(r)!==58;B("[]",Ur);B("{}",Ur);l(":",It-1,!0);var Nt=170,tr=96,kt=36,Ot=123,Lt=92,_r=()=>{let r=[],t="",e,o;for(;(e=c.charCodeAt(u))!==tr;)e?e===Lt?(o=Z(),t+=o[0],C(o[1])):e===kt&&c.charCodeAt(u+1)===Ot?(r.push([,t]),t="",C(2),r.push(A(0,125))):(t+=c[u],C()):O("Unterminated template");return r.push([,t]),C(),r},Rt=r=>r.length<2&&r[0]?.[0]===void 0?r[0]||[,""]:["`",...r],vt=w[tr];w[tr]=(r,t)=>r&&t<Nt?d.asi&&d.newline?void 0:(C(),["``",r,..._r()]):r?vt?.(r,t):(C(),Rt(_r()));d.string["'"]=!0;d.number={"0x":16,"0b":2,"0o":8};var Gr=(r,t,e,o)=>typeof r=="string"?i=>t(i,r,i):r[0]==="."?(e=n(r[1]),o=r[2],i=>t(e(i),o,i)):r[0]==="[]"&&r.length===3?(e=n(r[1]),o=n(r[2]),i=>t(e(i),o(i),i)):r[0]==="()"&&r.length===2?Gr(r[1],t):(()=>{throw Error("Invalid assignment target")})(),Br={"=":(r,t,e)=>r[t]=e,"+=":(r,t,e)=>r[t]+=e,"-=":(r,t,e)=>r[t]-=e,"*=":(r,t,e)=>r[t]*=e,"/=":(r,t,e)=>r[t]/=e,"%=":(r,t,e)=>r[t]%=e,"|=":(r,t,e)=>r[t]|=e,"&=":(r,t,e)=>r[t]&=e,"^=":(r,t,e)=>r[t]^=e,">>=":(r,t,e)=>r[t]>>=e,"<<=":(r,t,e)=>r[t]<<=e};for(let r in Br)p(r,(t,e)=>(e=n(e),Gr(t,(o,i,s)=>Br[r](o,i,e(s)))));p("!",r=>(r=n(r),t=>!r(t)));p("||",(r,t)=>(r=n(r),t=n(t),e=>r(e)||t(e)));p("&&",(r,t)=>(r=n(r),t=n(t),e=>r(e)&&t(e)));p("~",r=>(r=n(r),t=>~r(t)));p("|",(r,t)=>(r=n(r),t=n(t),e=>r(e)|t(e)));p("&",(r,t)=>(r=n(r),t=n(t),e=>r(e)&t(e)));p("^",(r,t)=>(r=n(r),t=n(t),e=>r(e)^t(e)));p(">>",(r,t)=>(r=n(r),t=n(t),e=>r(e)>>t(e)));p("<<",(r,t)=>(r=n(r),t=n(t),e=>r(e)<<t(e)));p(">",(r,t)=>(r=n(r),t=n(t),e=>r(e)>t(e)));p("<",(r,t)=>(r=n(r),t=n(t),e=>r(e)<t(e)));p(">=",(r,t)=>(r=n(r),t=n(t),e=>r(e)>=t(e)));p("<=",(r,t)=>(r=n(r),t=n(t),e=>r(e)<=t(e)));p("==",(r,t)=>(r=n(r),t=n(t),e=>r(e)==t(e)));p("!=",(r,t)=>(r=n(r),t=n(t),e=>r(e)!=t(e)));p("+",(r,t)=>t!==void 0?(r=n(r),t=n(t),e=>r(e)+t(e)):(r=n(r),e=>+r(e)));p("-",(r,t)=>t!==void 0?(r=n(r),t=n(t),e=>r(e)-t(e)):(r=n(r),e=>-r(e)));p("*",(r,t)=>(r=n(r),t=n(t),e=>r(e)*t(e)));p("/",(r,t)=>(r=n(r),t=n(t),e=>r(e)/t(e)));p("%",(r,t)=>(r=n(r),t=n(t),e=>r(e)%t(e)));var er=(r,t,e,o)=>typeof r=="string"?i=>t(i,r):r[0]==="."?(e=n(r[1]),o=r[2],i=>t(e(i),o)):r[0]==="[]"&&r.length===3?(e=n(r[1]),o=n(r[2]),i=>t(e(i),o(i))):r[0]==="()"&&r.length===2?er(r[1],t):(()=>{throw Error("Invalid increment target")})();p("++",(r,t)=>er(r,t===null?(e,o)=>e[o]++:(e,o)=>++e[o]));p("--",(r,t)=>er(r,t===null?(e,o)=>e[o]--:(e,o)=>--e[o]));var Mr=(...r)=>(r=r.map(n),t=>{let e;for(let o of r)e=o(t);return e});p(",",Mr);p(";",Mr);var Dr=r=>r!=null&&(typeof r=="object"||typeof r=="function"),k=r=>Dr(r)?Reflect.ownKeys({[r]:0})[0]:r,S=r=>typeof r=="string"&&(r[0]==="_"&&r[1]==="_"||r==="constructor"||r==="prototype"),Pt=r=>S(k(r));n.id=r=>r===void 0||Pt(r)?()=>{}:t=>t?.[r];var X=r=>{throw Error(r)};p("[]",(r,t)=>t===void 0?(r=r?r[0]===","?r.slice(1):[r]:[],r=r.map(e=>e==null?(()=>{}):e[0]==="..."?(e=n(e[1]),o=>e(o)):(e=n(e),o=>[e(o)])),e=>r.flatMap(o=>o(e))):(t==null&&X("Missing index"),r=n(r),t=n(t),e=>{let o=k(t(e));return S(o)?void 0:r(e)[o]}));p(".",(r,t)=>(r=n(r),t=k(t[0]?t:t[1]),S(t)?()=>{}:e=>r(e)[t]));p("()",(r,t)=>{if(t===void 0)return r==null?X("Empty ()"):n(r);let e=s=>s?.[0]===","&&s.slice(1).some(f=>f==null||e(f));e(t)&&X("Empty argument");let o=t?t[0]===","?(t=t.slice(1).map(n),s=>t.map(f=>f(s))):(t=n(t),s=>[t(s)]):()=>[],i=ir(r);return i<0?()=>{}:nr(r,i?(s,f,m)=>(f=k(f),S(f)?void 0:s[f](...o(m))):(s,f,m)=>s[f](...o(m)))});var L=r=>typeof r=="string"||Array.isArray(r)&&(r[0]==="."||r[0]==="?."||r[0]==="[]"&&r.length===3||r[0]==="?.[]"||r[0]==="()"&&r.length===2&&L(r[1])||r[0]==="{}"),nr=(r,t,e,o)=>r==null?X("Empty ()"):r[0]==="()"&&r.length==2?nr(r[1],t):typeof r=="string"?i=>t(i,r,i):r[0]==="."?(e=n(r[1]),o=r[2],i=>t(e(i),o,i)):r[0]==="?."?(e=n(r[1]),o=r[2],i=>{let s=e(i);return s==null?void 0:t(s,o,i)}):r[0]==="[]"&&r.length===3?(e=n(r[1]),o=n(r[2]),i=>t(e(i),o(i),i)):r[0]==="?.[]"?(e=n(r[1]),o=n(r[2]),i=>{let s=e(i);return s==null?void 0:t(s,o(i),i)}):(r=n(r),i=>t([r(i)],0,i)),or=r=>Dr(r)?1:S(r)?-1:0,ir=(r,t=r?.[0],e=r?.[2])=>typeof r=="string"?or(r):t==="()"&&r.length==2?ir(r[1]):t==="."||t==="?."?or(e):(t==="[]"||t==="?.[]")&&r.length===3?Array.isArray(e)&&e[0]==null?or(e[1]):1:0,P=(r,t,e=ir(r))=>e<0?()=>{}:nr(r,e?(o,i,s)=>(i=k(i),S(i)?void 0:t(o,i,s)):t);p("===",(r,t)=>(r=n(r),t=n(t),e=>r(e)===t(e)));p("!==",(r,t)=>(r=n(r),t=n(t),e=>r(e)!==t(e)));p("??",(r,t)=>(r=n(r),t=n(t),e=>r(e)??t(e)));var at=r=>{throw Error(r)};p("**",(r,t)=>(r=n(r),t=n(t),e=>r(e)**t(e)));p("**=",(r,t)=>(L(r)||at("Invalid assignment target"),t=n(t),P(r,(e,o,i)=>e[o]**=t(i))));p("in",(r,t)=>(r=n(r),t=n(t),e=>r(e)in t(e)));var Tt=r=>{throw Error(r)};p(">>>",(r,t)=>(r=n(r),t=n(t),e=>r(e)>>>t(e)));p(">>>=",(r,t)=>(L(r)||Tt("Invalid assignment target"),t=n(t),P(r,(e,o,i)=>e[o]>>>=t(i))));var Ut=r=>r[0]?.[0]===","?r[0].slice(1):r,G=(r,t,e)=>{if(typeof r=="string"){e[r]=t;return}let[o,...i]=r,s=Ut(i);if(o==="{}"){let f=[];for(let m of s){if(Array.isArray(m)&&m[0]==="..."){let E={};for(let T in t)!f.includes(T)&&!S(T)&&(E[T]=t[T]);e[m[1]]=E;break}let h,g,R;typeof m=="string"?h=g=m:m[0]==="="?(typeof m[1]=="string"?h=g=m[1]:[,h,g]=m[1],R=m[2]):[,h,g]=m,f.push(h=k(h));let y=S(h)?void 0:t[h];y===void 0&&R&&(y=n(R)(e)),G(g,y,e)}}else if(o==="[]"){let f=0;for(let m of s){if(m===null){f++;continue}if(Array.isArray(m)&&m[0]==="..."){e[m[1]]=t.slice(f);break}let h=m,g;Array.isArray(m)&&m[0]==="="&&([,h,g]=m);let R=t[f++];R===void 0&&g&&(R=n(g)(e)),G(h,R,e)}}},sr=(...r)=>(r=r.map(t=>{if(typeof t=="string")return e=>{e[t]=void 0};if(t[0]==="="){let[,e,o]=t,i=n(o);return typeof e=="string"?s=>{s[e]=i(s)}:s=>G(e,i(s),s)}return n(t)}),t=>{for(let e of r)e(t)});p("let",sr);p("const",sr);p("var",sr);var K=r=>{throw Error(r)};p("=",(r,t)=>{if(Array.isArray(r)&&(r[0]==="let"||r[0]==="const"||r[0]==="var")){let e=r[1];return t=n(t),typeof e=="string"?o=>{o[e]=t(o)}:o=>G(e,t(o),o)}return L(r)||K("Invalid assignment target"),t=n(t),P(r,(e,o,i)=>e[o]=t(i))});p("||=",(r,t)=>(L(r)||K("Invalid assignment target"),t=n(t),P(r,(e,o,i)=>e[o]||=t(i))));p("&&=",(r,t)=>(L(r)||K("Invalid assignment target"),t=n(t),P(r,(e,o,i)=>e[o]&&=t(i))));p("??=",(r,t)=>(L(r)||K("Invalid assignment target"),t=n(t),P(r,(e,o,i)=>e[o]??=t(i))));p("?",(r,t,e)=>(r=n(r),t=n(t),e=n(e),o=>r(o)?t(o):e(o)));var _t=[];p("=>",(r,t)=>{r=r?.[0]==="()"?r[1]:r;let e=r?r[0]===","?r.slice(1):[r]:[],o=-1,i=null,s=e[e.length-1];Array.isArray(s)&&s[0]==="..."&&(o=e.length-1,i=s[1],e.length--);let f=t?.[0]==="{}";return t=n(f?["{",t[1]]:t),m=>(...h)=>{let g={};e.forEach((y,E)=>g[y]=h[E]),i&&(g[i]=h.slice(o));let R=new Proxy(g,{get:(y,E)=>E in y?y[E]:m?.[E],set:(y,E,T)=>((E in y?y:m)[E]=T,!0),has:(y,E)=>E in y||(m?E in m:!1)});try{let y=t(R);return f?void 0:y}catch(y){if(y===_t)return y[0];throw y}}});p("...",r=>(r=n(r),t=>{let e=r(t),o=[];for(let i of Object.keys(e))S(i)||o.push([i,e[i]]);return o}));p("?.",(r,t)=>(r=n(r),t=k(t),S(t)?()=>{}:e=>r(e)?.[t]));p("?.[]",(r,t)=>(r=n(r),t=n(t),e=>{let o=r(e);if(o==null)return;let i=k(t(e));return S(i)?void 0:o[i]}));p("?.()",(r,t)=>{let e=t?t[0]===","?(t=t.slice(1).map(n),i=>t.map(s=>s(i))):(t=n(t),i=>[t(i)]):()=>[];if(r[0]==="."||r[0]==="?."){let i=r[0]==="?.",s=n(r[1]),f=k(r[2]);return S(f)?()=>{}:i?m=>s(m)?.[f]?.(...e(m)):m=>s(m)[f]?.(...e(m))}if((r[0]==="[]"||r[0]==="?.[]")&&r.length===3){let i=r[0]==="?.[]",s=n(r[1]),f=n(r[2]);return m=>{let h=s(m);if(i&&h==null)return;let g=k(f(m));return S(g)?void 0:h[g]?.(...e(m))}}let o=n(r);return i=>o(i)?.(...e(i))});p("typeof",r=>(r=n(r),t=>typeof r(t)));p("void",r=>(r=n(r),t=>(r(t),void 0)));p("delete",r=>{if(r[0]==="."){let t=n(r[1]),e=r[2];return o=>delete t(o)[e]}if(r[0]==="[]"){let t=n(r[1]),e=n(r[2]);return o=>delete t(o)[e(o)]}return()=>!0});p("new",r=>{let t=n(r?.[0]==="()"?r[1]:r),e=r?.[0]==="()"?r[2]:null,o=e?e[0]===","?(i=>s=>i.map(f=>f(s)))(e.slice(1).map(n)):(i=>s=>[i(s)])(n(e)):()=>[];return i=>new(t(i))(...o(i))});var $=Symbol("accessor");p("get",(r,t)=>(t=t?n(t):()=>{},e=>[[$,r,{get:function(){let o=Object.create(e||{});return o.this=this,t(o)}}]]));p("set",(r,t,e)=>(e=e?n(e):()=>{},o=>[[$,r,{set:function(i){let s=Object.create(o||{});s.this=this,s[t]=i,e(s)}}]]));var Bt=r=>r==null||typeof r=="string"||[":",",","...","get","set"].includes(r[0]);p("{}",(r,t)=>{if(t!==void 0)return;if(!Bt(r))return n(["{",r]);r=r?r[0]!==","?[r]:r.slice(1):[];let e=r.map(o=>n(typeof o=="string"?[":",o,o]:o));return o=>{let i={},s={};for(let f of e.flatMap(m=>m(o)))if(f[0]===$){let[,m,h]=f;s[m]={...s[m],...h,configurable:!0,enumerable:!0}}else i[f[0]]=f[1];for(let f in s)Object.defineProperty(i,f,s[f]);return i}});p("{",r=>(r=r?n(r):()=>{},t=>r(Object.create(t))));p(":",(r,t)=>(t=n(t),Array.isArray(r)?(r=n(r),e=>[[r(e),t(e)]]):e=>[[r,t(e)]]));p("`",(...r)=>(r=r.map(n),t=>r.map(e=>e(t)).join("")));p("``",(r,...t)=>{r=n(r);let e=[],o=[];for(let s of t)Array.isArray(s)&&s[0]===void 0?e.push(s[1]):o.push(n(s));let i=Object.assign([...e],{raw:e});return s=>r(s)(i,...o.map(f=>f(s)))});var Fr=new WeakMap,Gt=(r,...t)=>typeof r=="string"?n(d(r)):Fr.get(r)||Fr.set(r,Mt(r,t)).get(r),Xr=57344,Mt=(r,t)=>{let e=r.reduce((s,f,m)=>s+(m?String.fromCharCode(Xr+m-1):"")+f,""),o=d(e),i=s=>{if(typeof s=="string"&&s.length===1){let f=s.charCodeAt(0)-Xr,m;if(f>=0&&f<t.length)return m=t[f],Dt(m)?m:[,m]}return Array.isArray(s)?s.map(i):s};return n(i(o))},Dt=r=>typeof r=="string"||Array.isArray(r)&&(typeof r[0]=="string"||r[0]===void 0),Ft=Gt;export{z as access,l as binary,n as compile,c as cur,Ft as default,O as err,A as expr,B as group,Xt as id,u as idx,M as keyword,U as literal,Kr as loc,w as lookup,ur as member,W as nary,v as next,p as operator,Q as operators,Kt as parens,d as parse,H as peek,j as prec,J as propName,mr as seek,C as skip,I as token,N as unary,fr as word};
|
|
1
|
+
var l,u,d=r=>(l=0,u=r,d.enter?.(),r=A(),u[l]?O():r||""),O=(r="Unexpected token",t=l,e=u.slice(0,t).split(`
|
|
2
|
+
`),o=e.pop(),n=u.slice(Math.max(0,t-40),t),s="\u032D",f=(u[t]||" ")+s,m=u.slice(t+1,t+20))=>{throw SyntaxError(`${r} at ${e.length+1}:${o.length+1}
|
|
3
|
+
${n}${f}${m}`)},Qr=(r,t=l)=>(Array.isArray(r)&&(r.loc=t),r),a=(r,t=l,e)=>{for(;e=r(u.charCodeAt(l));)l+=e;return u.slice(t,l)},y=(r=1)=>u[l+=r],mr=r=>l=r,A=(r=0,t)=>{let e,o,n;for(t&&d.enter?.(r,t);(e=d.space())&&e!==t&&(n=d.step(o,r,e,A));)o=n;return t&&(e==t?(l++,d.exit?.(r,t)):O("Unclosed "+String.fromCharCode(t-(t>42?2:1)))),o},W=(r=l)=>{for(;u.charCodeAt(r)<=32;)r++;return u.charCodeAt(r)},Kt=d.id=r=>r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r==36||r==95||r>=192&&r!=215&&r!=247,fr=(r,t=r.length)=>u.substr(l,t)===r&&!d.id(u.charCodeAt(l+t)),$t=()=>(y(),A(0,41)),E=[],Q={},I=(r,t=32,e,o=r.charCodeAt(0))=>ur({op:r,l:r.length,p:Q[r]=!E[o]&&Q[r]||t,map:e,word:r.toUpperCase()!==r,kw:!1}),c=(r,t,e=!1)=>I(r,t,(o,n)=>o&&(n=A(t-(e?.5:0)))&&[r,o,n]),N=(r,t,e)=>I(r,t,o=>e?o&&[r,o]:!o&&(o=A(t-.5))&&[r,o]),T=(r,t)=>I(r,200,e=>!e&&[,t]),q=(r,t,e,o)=>I(r,t,(n,s,f=n)=>(s=A(t-(e?.5:0)),n?.[0]!==r&&(n=[r,n||null]),s?.[0]===r?n.push(...s.slice(1)):s?n.push(s):o||W()===r.charCodeAt(0)?n.push(null):f&&n.length===2&&(n=n[1]),n)),U=(r,t)=>I(r[0],t,e=>!e&&[r,A(0,r.charCodeAt(1))||null]),z=(r,t)=>I(r[0],t,e=>e&&[r,e,A(0,r.charCodeAt(1))||null]),J=(r,t)=>(d.space(),t=u.charCodeAt(l),d.id(t)&&(t<48||t>57)?a(d.id):A(r)),lr=(r,t)=>I(r,t,(e,o)=>e&&(o=J(t))&&[r,e,o]),B=(r,t,e)=>(Q[r]??=t,ur({op:r,l:r.length,p:t,map:e,word:!0,kw:!0})),pr=(r,t,e=(o,n,s,f=l,m,h,g)=>{for(g=0;h=r[g++];)if(!(h.kw&&o)&&!(s?h.op!==s:!((h.l<2||h.op.charCodeAt(1)===u.charCodeAt(l+1)&&(h.l<3||u.substr(l,h.l)===h.op))&&(!h.word||!d.id(u.charCodeAt(l+h.l)))&&(s=h.op)))&&!(n>=h.p)&&!(h.kw&&d.prop&&!d.prop(l+h.l))){if(l+=h.l,m=h.map(o))return Qr(m,f);l=f,s=0,h.word||o||t||r[g]||O()}return t?.(o,n,s)})=>(e.ops=r,e.tail=t,e),ur=(r,t=r.op.charCodeAt(0),e=E[t])=>E[t]=e?.ops?pr([r,...e.ops],e.tail):pr([r],e);d.space=r=>{for(;(r=u.charCodeAt(l))<=32;)l++;return r};d.step=(r,t,e,o,n)=>(n=E[e])&&n(r,t)||(r?null:a(d.id)||null);var H={},p=(r,t,e=H[r])=>H[r]=(...o)=>t(...o)||e?.(...o),i=r=>Array.isArray(r)?r[0]==null?(t=>()=>t)(r[1]):H[r[0]]?.(...r.slice(1))??O(`Unknown operator: ${r[0]}`,r?.loc):i.id(r);i.id=r=>r===void 0?()=>{}:t=>t?.[r];var V=46,P=48,F=57,cr=69,dr=101,Hr=43,Wr=45,hr=95,qr=97,zr=102,Jr=65,Vr=70,Ar=r=>r.indexOf("_")<0?r:r.replaceAll("_",""),Yr=r=>r===V&&(r=u.charCodeAt(l+1))!==V&&!(d.id(r)&&r>F&&r!==dr&&r!==cr)||r>=P&&r<=F||r===hr||((r===cr||r===dr)&&((r=u.charCodeAt(l+1))>=P&&r<=F||r===Hr||r===Wr)?2:0),Y=r=>(r=+Ar(a(Yr)))!=r?O():[,r],Zr=r=>t=>t===hr||t>=P&&t<=F&&t-P<r||r===16&&(t>=qr&&t<=zr||t>=Jr&&t<=Vr);d.number=null;E[V]=r=>!r&&u.charCodeAt(l+1)>=P&&u.charCodeAt(l+1)<=F&&Y();for(let r=P;r<=F;r++)E[r]=t=>t?void 0:Y();E[P]=(r,t)=>{if(!r){for(let e in d.number)if(e[0]==="0"&&(u.charCodeAt(l+1)|32)===e.charCodeAt(1)){y(2);let o=Ar(a(Zr(t=d.number[e])));return[,parseInt(o,t)]}return Y()}};var Nr=92,gr=34,Cr=39,yr=117,Sr=120,kr=123,xr=125,wr=10,br=13,rt={n:`
|
|
4
|
+
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v",0:"\0"},Er=r=>r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:-1,Ir=r=>{if(u.charCodeAt(r)!==Nr)return;let t=u.charCodeAt(r+1);if(t===Sr||t===yr&&u.charCodeAt(r+2)!==kr){let e=t===Sr?2:4,o=0,n;for(let s=0;s<e;s++){if((n=Er(u.charCodeAt(r+2+s)))<0)return;o=o*16+n}return[o,2+e]}if(t===yr){let e=0,o=r+3,n;for(;(n=Er(u.charCodeAt(o)))>=0;)e=e*16+n,o++;if(o>r+3&&e<=1114111&&u.charCodeAt(o)===xr)return[e,o-r+1]}},tt=()=>{let r=u.charCodeAt(l+1);if(r===wr)return["",2];if(r===br)return["",u.charCodeAt(l+2)===wr?3:2];let t=Ir(l);if(t){let[e,o]=t;if(e>=55296&&e<=56319){let n=Ir(l+o);n&&n[0]>=56320&&n[0]<=57343&&(e=65536+(e-55296)*1024+n[0]-56320,o+=n[1])}return[String.fromCodePoint(e),o]}return[rt[u[l+1]]||u[l+1],2]},Z=(r,t=!1)=>{let e=l,o,n;for(;(n=u.charCodeAt(l))-r&&!(t&&(n===0||n===36&&u.charCodeAt(l+1)===kr));){if(n!==Nr){y();continue}o||(o=[]),o.push(u.slice(e,l));let[f,m]=tt();o.push(f),y(m),e=l}let s=u.slice(e,l);return o?(o.push(s),o.join("")):s},Or=r=>(t,e,o="",n=String.fromCharCode(r))=>{if(!(t||!d.string?.[n]))return y(),o+=Z(r),u[l]===n?y():O("Bad string"),[,o]};E[gr]=Or(gr);E[Cr]=Or(Cr);d.string={'"':!0};var et=20;"= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map(r=>c(r,et,!0));var ot=30,nt=40,it=140;N("!",it);c("||",ot);c("&&",nt);var st=50,pt=60,mt=70,Rr=100,ft=140;c("|",st);c("&",mt);c("^",pt);c(">>",Rr);c("<<",Rr);N("~",ft);var G=90;c("<",G);c(">",G);c("<=",G);c(">=",G);var vr=80;c("==",vr);c("!=",vr);var Lr=110,x=120,ar=140;c("+",Lr);c("-",Lr);c("*",x);c("/",x);c("%",x);N("+",ar);N("-",ar);var M=150;I("++",M,r=>r?["++",r,null]:["++",A(M-1)]);I("--",M,r=>r?["--",r,null]:["--",A(M-1)]);var lt=5,ut=10;q(",",ut);q(";",lt,!0,!0);var ct=170;U("()",ct);var Pr=170,dt=160;z("[]",Pr);lr(".",Pr);z("()",dt);var ht=d.space;d.comment??={"//":`
|
|
5
|
+
`,"/*":"*/"};d.space=()=>{for(var r,t,e,o,n;r=ht();){for(e in t=d.comment)if(r===e.charCodeAt(0)&&(e.length<2||u.charCodeAt(l+1)===e.charCodeAt(1))&&(e.length<3||u.substr(l,e.length)===e)){o=t[e],n=u.indexOf(o,l+e.length),mr(n<0?u.length:o===`
|
|
6
|
+
`?n:n+o.length),r=0;break}if(r)return r}return r};var Dr=80;c("===",Dr);c("!==",Dr);var At=30;c("??",At);var gt=130,Ct=20;c("**",gt,!0);c("**=",Ct,!0);var Tr=90;c("in",Tr);c("of",Tr);var yt=20,St=100;c(">>>",St);c(">>>=",yt,!0);var b=20;c("||=",b,!0);c("&&=",b,!0);c("??=",b,!0);T("true",!0);T("false",!1);T("null",null);B("undefined",200,()=>[]);T("NaN",NaN);T("Infinity",1/0);var rr=20;I("?",rr,(r,t,e)=>r&&(t=A(rr-1))&&a(o=>o===58)&&(e=A(rr-1),["?",r,t,e]));var wt=20;c("=>",wt,!0);var Et=20;N("...",Et);var Fr=170;I("?.",Fr,(r,t)=>{if(!r)return;let e=d.space();return e===40?(y(),["?.()",r,A(0,41)||null]):e===91?(y(),["?.[]",r,A(0,93)]):(t=J(Fr),t?["?.",r,t]:void 0)});var tr=140,Ur=160,It=Ur+1;N("typeof",tr);N("void",tr);N("delete",tr);var Nt=r=>d.space()===40?(y(),["()",r,A(0,41)||null]):r;B("new",It,()=>fr(".target")?(y(7),["new.target"]):["new",Nt(A(Ur))]);var kt=20,_r=200;d.prop=r=>W(r)!==58;U("[]",_r);U("{}",_r);c(":",kt-1,!0);var Ot=170,X=96,Rt=36,vt=123,Br=()=>{let r=[];for(;;){r.push([,Z(X,!0)]);let t=u.charCodeAt(l);if(t===X)return y(),r;(t!==Rt||u.charCodeAt(l+1)!==vt)&&O("Unterminated template"),y(2),r.push(A(0,125))}},Lt=r=>r.length<2&&r[0]?.[0]===void 0?r[0]||[,""]:["`",...r],at=E[X];E[X]=(r,t)=>r&&t<Ot?d.asi&&d.newline?void 0:(y(),["``",r,...Br()]):r?at?.(r,t):(y(),Lt(Br()));d.string["'"]=!0;d.number={"0x":16,"0b":2,"0o":8};var Mr=(r,t,e,o)=>typeof r=="string"?n=>t(n,r,n):r[0]==="."?(e=i(r[1]),o=r[2],n=>t(e(n),o,n)):r[0]==="[]"&&r.length===3?(e=i(r[1]),o=i(r[2]),n=>t(e(n),o(n),n)):r[0]==="()"&&r.length===2?Mr(r[1],t):(()=>{throw Error("Invalid assignment target")})(),Gr={"=":(r,t,e)=>r[t]=e,"+=":(r,t,e)=>r[t]+=e,"-=":(r,t,e)=>r[t]-=e,"*=":(r,t,e)=>r[t]*=e,"/=":(r,t,e)=>r[t]/=e,"%=":(r,t,e)=>r[t]%=e,"|=":(r,t,e)=>r[t]|=e,"&=":(r,t,e)=>r[t]&=e,"^=":(r,t,e)=>r[t]^=e,">>=":(r,t,e)=>r[t]>>=e,"<<=":(r,t,e)=>r[t]<<=e};for(let r in Gr)p(r,(t,e)=>(e=i(e),Mr(t,(o,n,s)=>Gr[r](o,n,e(s)))));p("!",r=>(r=i(r),t=>!r(t)));p("||",(r,t)=>(r=i(r),t=i(t),e=>r(e)||t(e)));p("&&",(r,t)=>(r=i(r),t=i(t),e=>r(e)&&t(e)));p("~",r=>(r=i(r),t=>~r(t)));p("|",(r,t)=>(r=i(r),t=i(t),e=>r(e)|t(e)));p("&",(r,t)=>(r=i(r),t=i(t),e=>r(e)&t(e)));p("^",(r,t)=>(r=i(r),t=i(t),e=>r(e)^t(e)));p(">>",(r,t)=>(r=i(r),t=i(t),e=>r(e)>>t(e)));p("<<",(r,t)=>(r=i(r),t=i(t),e=>r(e)<<t(e)));p(">",(r,t)=>(r=i(r),t=i(t),e=>r(e)>t(e)));p("<",(r,t)=>(r=i(r),t=i(t),e=>r(e)<t(e)));p(">=",(r,t)=>(r=i(r),t=i(t),e=>r(e)>=t(e)));p("<=",(r,t)=>(r=i(r),t=i(t),e=>r(e)<=t(e)));p("==",(r,t)=>(r=i(r),t=i(t),e=>r(e)==t(e)));p("!=",(r,t)=>(r=i(r),t=i(t),e=>r(e)!=t(e)));p("+",(r,t)=>t!==void 0?(r=i(r),t=i(t),e=>r(e)+t(e)):(r=i(r),e=>+r(e)));p("-",(r,t)=>t!==void 0?(r=i(r),t=i(t),e=>r(e)-t(e)):(r=i(r),e=>-r(e)));p("*",(r,t)=>(r=i(r),t=i(t),e=>r(e)*t(e)));p("/",(r,t)=>(r=i(r),t=i(t),e=>r(e)/t(e)));p("%",(r,t)=>(r=i(r),t=i(t),e=>r(e)%t(e)));var er=(r,t,e,o)=>typeof r=="string"?n=>t(n,r):r[0]==="."?(e=i(r[1]),o=r[2],n=>t(e(n),o)):r[0]==="[]"&&r.length===3?(e=i(r[1]),o=i(r[2]),n=>t(e(n),o(n))):r[0]==="()"&&r.length===2?er(r[1],t):(()=>{throw Error("Invalid increment target")})();p("++",(r,t)=>er(r,t===null?(e,o)=>e[o]++:(e,o)=>++e[o]));p("--",(r,t)=>er(r,t===null?(e,o)=>e[o]--:(e,o)=>--e[o]));var Xr=(...r)=>(r=r.map(i),t=>{let e;for(let o of r)e=o(t);return e});p(",",Xr);p(";",Xr);var Kr=r=>r!=null&&(typeof r=="object"||typeof r=="function"),k=r=>Kr(r)?Reflect.ownKeys({[r]:0})[0]:r,S=r=>typeof r=="string"&&(r[0]==="_"&&r[1]==="_"||r==="constructor"||r==="prototype"),Pt=r=>S(k(r));i.id=r=>r===void 0||Pt(r)?()=>{}:t=>t?.[r];var K=r=>{throw Error(r)};p("[]",(r,t)=>t===void 0?(r=r?r[0]===","?r.slice(1):[r]:[],r=r.map(e=>e==null?(()=>{}):e[0]==="..."?(e=i(e[1]),o=>e(o)):(e=i(e),o=>[e(o)])),e=>r.flatMap(o=>o(e))):(t==null&&K("Missing index"),r=i(r),t=i(t),e=>{let o=k(t(e));return S(o)?void 0:r(e)[o]}));p(".",(r,t)=>(r=i(r),t=k(t[0]?t:t[1]),S(t)?()=>{}:e=>r(e)[t]));p("()",(r,t)=>{if(t===void 0)return r==null?K("Empty ()"):i(r);let e=s=>s?.[0]===","&&s.slice(1).some(f=>f==null||e(f));e(t)&&K("Empty argument");let o=t?t[0]===","?(t=t.slice(1).map(i),s=>t.map(f=>f(s))):(t=i(t),s=>[t(s)]):()=>[],n=ir(r);return n<0?()=>{}:nr(r,n?(s,f,m)=>(f=k(f),S(f)?void 0:s[f](...o(m))):(s,f,m)=>s[f](...o(m)))});var R=r=>typeof r=="string"||Array.isArray(r)&&(r[0]==="."||r[0]==="?."||r[0]==="[]"&&r.length===3||r[0]==="?.[]"||r[0]==="()"&&r.length===2&&R(r[1])||r[0]==="{}"),nr=(r,t,e,o)=>r==null?K("Empty ()"):r[0]==="()"&&r.length==2?nr(r[1],t):typeof r=="string"?n=>t(n,r,n):r[0]==="."?(e=i(r[1]),o=r[2],n=>t(e(n),o,n)):r[0]==="?."?(e=i(r[1]),o=r[2],n=>{let s=e(n);return s==null?void 0:t(s,o,n)}):r[0]==="[]"&&r.length===3?(e=i(r[1]),o=i(r[2]),n=>t(e(n),o(n),n)):r[0]==="?.[]"?(e=i(r[1]),o=i(r[2]),n=>{let s=e(n);return s==null?void 0:t(s,o(n),n)}):(r=i(r),n=>t([r(n)],0,n)),or=r=>Kr(r)?1:S(r)?-1:0,ir=(r,t=r?.[0],e=r?.[2])=>typeof r=="string"?or(r):t==="()"&&r.length==2?ir(r[1]):t==="."||t==="?."?or(e):(t==="[]"||t==="?.[]")&&r.length===3?Array.isArray(e)&&e[0]==null?or(e[1]):1:0,L=(r,t,e=ir(r))=>e<0?()=>{}:nr(r,e?(o,n,s)=>(n=k(n),S(n)?void 0:t(o,n,s)):t);p("===",(r,t)=>(r=i(r),t=i(t),e=>r(e)===t(e)));p("!==",(r,t)=>(r=i(r),t=i(t),e=>r(e)!==t(e)));p("??",(r,t)=>(r=i(r),t=i(t),e=>r(e)??t(e)));var Dt=r=>{throw Error(r)};p("**",(r,t)=>(r=i(r),t=i(t),e=>r(e)**t(e)));p("**=",(r,t)=>(R(r)||Dt("Invalid assignment target"),t=i(t),L(r,(e,o,n)=>e[o]**=t(n))));p("in",(r,t)=>(r=i(r),t=i(t),e=>r(e)in t(e)));var Tt=r=>{throw Error(r)};p(">>>",(r,t)=>(r=i(r),t=i(t),e=>r(e)>>>t(e)));p(">>>=",(r,t)=>(R(r)||Tt("Invalid assignment target"),t=i(t),L(r,(e,o,n)=>e[o]>>>=t(n))));var Ft=r=>r[0]?.[0]===","?r[0].slice(1):r,_=(r,t,e)=>{if(typeof r=="string"){e[r]=t;return}let[o,...n]=r,s=Ft(n);if(o==="{}"){let f=[];for(let m of s){if(Array.isArray(m)&&m[0]==="..."){let w={};for(let D in t)!f.includes(D)&&!S(D)&&(w[D]=t[D]);e[m[1]]=w;break}let h,g,v;typeof m=="string"?h=g=m:m[0]==="="?(typeof m[1]=="string"?h=g=m[1]:[,h,g]=m[1],v=m[2]):[,h,g]=m,f.push(h=k(h));let C=S(h)?void 0:t[h];C===void 0&&v&&(C=i(v)(e)),_(g,C,e)}}else if(o==="[]"){let f=0;for(let m of s){if(m===null){f++;continue}if(Array.isArray(m)&&m[0]==="..."){e[m[1]]=t.slice(f);break}let h=m,g;Array.isArray(m)&&m[0]==="="&&([,h,g]=m);let v=t[f++];v===void 0&&g&&(v=i(g)(e)),_(h,v,e)}}},sr=(...r)=>(r=r.map(t=>{if(typeof t=="string")return e=>{e[t]=void 0};if(t[0]==="="){let[,e,o]=t,n=i(o);return typeof e=="string"?s=>{s[e]=n(s)}:s=>_(e,n(s),s)}return i(t)}),t=>{for(let e of r)e(t)});p("let",sr);p("const",sr);p("var",sr);var $=r=>{throw Error(r)};p("=",(r,t)=>{if(Array.isArray(r)&&(r[0]==="let"||r[0]==="const"||r[0]==="var")){let e=r[1];return t=i(t),typeof e=="string"?o=>{o[e]=t(o)}:o=>_(e,t(o),o)}return R(r)||$("Invalid assignment target"),t=i(t),L(r,(e,o,n)=>e[o]=t(n))});p("||=",(r,t)=>(R(r)||$("Invalid assignment target"),t=i(t),L(r,(e,o,n)=>e[o]||=t(n))));p("&&=",(r,t)=>(R(r)||$("Invalid assignment target"),t=i(t),L(r,(e,o,n)=>e[o]&&=t(n))));p("??=",(r,t)=>(R(r)||$("Invalid assignment target"),t=i(t),L(r,(e,o,n)=>e[o]??=t(n))));p("?",(r,t,e)=>(r=i(r),t=i(t),e=i(e),o=>r(o)?t(o):e(o)));var Ut=[];p("=>",(r,t)=>{r=r?.[0]==="()"?r[1]:r;let e=r?r[0]===","?r.slice(1):[r]:[],o=-1,n=null,s=e[e.length-1];Array.isArray(s)&&s[0]==="..."&&(o=e.length-1,n=s[1],e.length--);let f=t?.[0]==="{}";return t=i(f?["{",t[1]]:t),m=>(...h)=>{let g={};e.forEach((C,w)=>g[C]=h[w]),n&&(g[n]=h.slice(o));let v=new Proxy(g,{get:(C,w)=>w in C?C[w]:m?.[w],set:(C,w,D)=>((w in C?C:m)[w]=D,!0),has:(C,w)=>w in C||(m?w in m:!1)});try{let C=t(v);return f?void 0:C}catch(C){if(C===Ut)return C[0];throw C}}});p("...",r=>(r=i(r),t=>{let e=r(t),o=[];for(let n of Object.keys(e))S(n)||o.push([n,e[n]]);return o}));p("?.",(r,t)=>(r=i(r),t=k(t),S(t)?()=>{}:e=>r(e)?.[t]));p("?.[]",(r,t)=>(r=i(r),t=i(t),e=>{let o=r(e);if(o==null)return;let n=k(t(e));return S(n)?void 0:o[n]}));p("?.()",(r,t)=>{let e=t?t[0]===","?(t=t.slice(1).map(i),n=>t.map(s=>s(n))):(t=i(t),n=>[t(n)]):()=>[];if(r[0]==="."||r[0]==="?."){let n=r[0]==="?.",s=i(r[1]),f=k(r[2]);return S(f)?()=>{}:n?m=>s(m)?.[f]?.(...e(m)):m=>s(m)[f]?.(...e(m))}if((r[0]==="[]"||r[0]==="?.[]")&&r.length===3){let n=r[0]==="?.[]",s=i(r[1]),f=i(r[2]);return m=>{let h=s(m);if(n&&h==null)return;let g=k(f(m));return S(g)?void 0:h[g]?.(...e(m))}}let o=i(r);return n=>o(n)?.(...e(n))});p("typeof",r=>(r=i(r),t=>typeof r(t)));p("void",r=>(r=i(r),t=>(r(t),void 0)));p("delete",r=>{if(r[0]==="."){let t=i(r[1]),e=r[2];return o=>delete t(o)[e]}if(r[0]==="[]"){let t=i(r[1]),e=i(r[2]);return o=>delete t(o)[e(o)]}return()=>!0});p("new",r=>{let t=i(r?.[0]==="()"?r[1]:r),e=r?.[0]==="()"?r[2]:null,o=e?e[0]===","?(n=>s=>n.map(f=>f(s)))(e.slice(1).map(i)):(n=>s=>[n(s)])(i(e)):()=>[];return n=>new(t(n))(...o(n))});var j=Symbol("accessor");p("get",(r,t)=>(t=t?i(t):()=>{},e=>[[j,r,{get:function(){let o=Object.create(e||{});return o.this=this,t(o)}}]]));p("set",(r,t,e)=>(e=e?i(e):()=>{},o=>[[j,r,{set:function(n){let s=Object.create(o||{});s.this=this,s[t]=n,e(s)}}]]));var _t=r=>r==null||typeof r=="string"||[":",",","...","get","set"].includes(r[0]);p("{}",(r,t)=>{if(t!==void 0)return;if(!_t(r))return i(["{",r]);r=r?r[0]!==","?[r]:r.slice(1):[];let e=r.map(o=>i(typeof o=="string"?[":",o,o]:o));return o=>{let n={},s={};for(let f of e.flatMap(m=>m(o)))if(f[0]===j){let[,m,h]=f;s[m]={...s[m],...h,configurable:!0,enumerable:!0}}else n[f[0]]=f[1];for(let f in s)Object.defineProperty(n,f,s[f]);return n}});p("{",r=>(r=r?i(r):()=>{},t=>r(Object.create(t))));p(":",(r,t)=>(t=i(t),Array.isArray(r)?(r=i(r),e=>[[r(e),t(e)]]):e=>[[r,t(e)]]));p("`",(...r)=>(r=r.map(i),t=>r.map(e=>e(t)).join("")));p("``",(r,...t)=>{r=i(r);let e=[],o=[];for(let s of t)Array.isArray(s)&&s[0]===void 0?e.push(s[1]):o.push(i(s));let n=Object.assign([...e],{raw:e});return s=>r(s)(n,...o.map(f=>f(s)))});var $r=new WeakMap,Bt=(r,...t)=>typeof r=="string"?i(d(r)):$r.get(r)||$r.set(r,Gt(r,t)).get(r),jr=57344,Gt=(r,t)=>{let e=r.reduce((s,f,m)=>s+(m?String.fromCharCode(jr+m-1):"")+f,""),o=d(e),n=s=>{if(typeof s=="string"&&s.length===1){let f=s.charCodeAt(0)-jr,m;if(f>=0&&f<t.length)return m=t[f],Mt(m)?m:[,m]}return Array.isArray(s)?s.map(n):s};return i(n(o))},Mt=r=>typeof r=="string"||Array.isArray(r)&&(typeof r[0]=="string"||r[0]===void 0),Xt=Bt;export{z as access,c as binary,i as compile,u as cur,Xt as default,O as err,A as expr,U as group,Kt as id,l as idx,B as keyword,T as literal,Qr as loc,E as lookup,lr as member,q as nary,a as next,p as operator,H as operators,$t as parens,d as parse,W as peek,Q as prec,J as propName,mr as seek,y as skip,I as token,N as unary,fr as word};
|
package/package.json
CHANGED
package/subscript.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
2
|
-
`),o=e.pop(),
|
|
3
|
-
${
|
|
4
|
-
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v",0:"\0"},a=r=>r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:-1,
|
|
1
|
+
var p,l,m=r=>(p=0,l=r,m.enter?.(),r=A(),l[p]?E():r||""),E=(r="Unexpected token",t=p,e=l.slice(0,t).split(`
|
|
2
|
+
`),o=e.pop(),n=l.slice(Math.max(0,t-40),t),s="\u032D",c=(l[t]||" ")+s,d=l.slice(t+1,t+20))=>{throw SyntaxError(`${r} at ${e.length+1}:${o.length+1}
|
|
3
|
+
${n}${c}${d}`)},Cr=(r,t=p)=>(Array.isArray(r)&&(r.loc=t),r),R=(r,t=p,e)=>{for(;e=r(l.charCodeAt(p));)p+=e;return l.slice(t,p)},S=(r=1)=>l[p+=r],Vr=r=>p=r,A=(r=0,t)=>{let e,o,n;for(t&&m.enter?.(r,t);(e=m.space())&&e!==t&&(n=m.step(o,r,e,A));)o=n;return t&&(e==t?(p++,m.exit?.(r,t)):E("Unclosed "+String.fromCharCode(t-(t>42?2:1)))),o},gr=(r=p)=>{for(;l.charCodeAt(r)<=32;)r++;return l.charCodeAt(r)},Yr=m.id=r=>r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r==36||r==95||r>=192&&r!=215&&r!=247,Zr=(r,t=r.length)=>l.substr(p,t)===r&&!m.id(l.charCodeAt(p+t)),jr=()=>(S(),A(0,41)),C=[],L={},g=(r,t=32,e,o=r.charCodeAt(0))=>K({op:r,l:r.length,p:L[r]=!C[o]&&L[r]||t,map:e,word:r.toUpperCase()!==r,kw:!1}),f=(r,t,e=!1)=>g(r,t,(o,n)=>o&&(n=A(t-(e?.5:0)))&&[r,o,n]),y=(r,t,e)=>g(r,t,o=>e?o&&[r,o]:!o&&(o=A(t-.5))&&[r,o]),ar=(r,t)=>g(r,200,e=>!e&&[,t]),M=(r,t,e,o)=>g(r,t,(n,s,c=n)=>(s=A(t-(e?.5:0)),n?.[0]!==r&&(n=[r,n||null]),s?.[0]===r?n.push(...s.slice(1)):s?n.push(s):o||gr()===r.charCodeAt(0)?n.push(null):c&&n.length===2&&(n=n[1]),n)),G=(r,t)=>g(r[0],t,e=>!e&&[r,A(0,r.charCodeAt(1))||null]),x=(r,t)=>g(r[0],t,e=>e&&[r,e,A(0,r.charCodeAt(1))||null]),Er=(r,t)=>(m.space(),t=l.charCodeAt(p),m.id(t)&&(t<48||t>57)?R(m.id):A(r)),H=(r,t)=>g(r,t,(e,o)=>e&&(o=Er(t))&&[r,e,o]),br=(r,t,e)=>(L[r]??=t,K({op:r,l:r.length,p:t,map:e,word:!0,kw:!0})),Q=(r,t,e=(o,n,s,c=p,d,h,T)=>{for(T=0;h=r[T++];)if(!(h.kw&&o)&&!(s?h.op!==s:!((h.l<2||h.op.charCodeAt(1)===l.charCodeAt(p+1)&&(h.l<3||l.substr(p,h.l)===h.op))&&(!h.word||!m.id(l.charCodeAt(p+h.l)))&&(s=h.op)))&&!(n>=h.p)&&!(h.kw&&m.prop&&!m.prop(p+h.l))){if(p+=h.l,d=h.map(o))return Cr(d,c);p=c,s=0,h.word||o||t||r[T]||E()}return t?.(o,n,s)})=>(e.ops=r,e.tail=t,e),K=(r,t=r.op.charCodeAt(0),e=C[t])=>C[t]=e?.ops?Q([r,...e.ops],e.tail):Q([r],e);m.space=r=>{for(;(r=l.charCodeAt(p))<=32;)p++;return r};m.step=(r,t,e,o,n)=>(n=C[e])&&n(r,t)||(r?null:R(m.id)||null);var N={},u=(r,t,e=N[r])=>N[r]=(...o)=>t(...o)||e?.(...o),i=r=>Array.isArray(r)?r[0]==null?(t=>()=>t)(r[1]):N[r[0]]?.(...r.slice(1))??E(`Unknown operator: ${r[0]}`,r?.loc):i.id(r);i.id=r=>r===void 0?()=>{}:t=>t?.[r];var O=46,w=48,D=57,v=69,W=101,Sr=43,yr=45,q=95,wr=97,Dr=102,Rr=65,Pr=70,z=r=>r.indexOf("_")<0?r:r.replaceAll("_",""),_r=r=>r===O&&(r=l.charCodeAt(p+1))!==O&&!(m.id(r)&&r>D&&r!==W&&r!==v)||r>=w&&r<=D||r===q||((r===v||r===W)&&((r=l.charCodeAt(p+1))>=w&&r<=D||r===Sr||r===yr)?2:0),$=r=>(r=+z(R(_r)))!=r?E():[,r],Fr=r=>t=>t===q||t>=w&&t<=D&&t-w<r||r===16&&(t>=wr&&t<=Dr||t>=Rr&&t<=Pr);m.number=null;C[O]=r=>!r&&l.charCodeAt(p+1)>=w&&l.charCodeAt(p+1)<=D&&$();for(let r=w;r<=D;r++)C[r]=t=>t?void 0:$();C[w]=(r,t)=>{if(!r){for(let e in m.number)if(e[0]==="0"&&(l.charCodeAt(p+1)|32)===e.charCodeAt(1)){S(2);let o=z(R(Fr(t=m.number[e])));return[,parseInt(o,t)]}return $()}};var rr=92,J=34,V=39,Y=117,Z=120,tr=123,Ur=125,j=10,Ir=13,Tr={n:`
|
|
4
|
+
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v",0:"\0"},a=r=>r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:-1,b=r=>{if(l.charCodeAt(r)!==rr)return;let t=l.charCodeAt(r+1);if(t===Z||t===Y&&l.charCodeAt(r+2)!==tr){let e=t===Z?2:4,o=0,n;for(let s=0;s<e;s++){if((n=a(l.charCodeAt(r+2+s)))<0)return;o=o*16+n}return[o,2+e]}if(t===Y){let e=0,o=r+3,n;for(;(n=a(l.charCodeAt(o)))>=0;)e=e*16+n,o++;if(o>r+3&&e<=1114111&&l.charCodeAt(o)===Ur)return[e,o-r+1]}},Lr=()=>{let r=l.charCodeAt(p+1);if(r===j)return["",2];if(r===Ir)return["",l.charCodeAt(p+2)===j?3:2];let t=b(p);if(t){let[e,o]=t;if(e>=55296&&e<=56319){let n=b(p+o);n&&n[0]>=56320&&n[0]<=57343&&(e=65536+(e-55296)*1024+n[0]-56320,o+=n[1])}return[String.fromCodePoint(e),o]}return[Tr[l[p+1]]||l[p+1],2]},Nr=(r,t=!1)=>{let e=p,o,n;for(;(n=l.charCodeAt(p))-r&&!(t&&(n===0||n===36&&l.charCodeAt(p+1)===tr));){if(n!==rr){S();continue}o||(o=[]),o.push(l.slice(e,p));let[c,d]=Lr();o.push(c),S(d),e=p}let s=l.slice(e,p);return o?(o.push(s),o.join("")):s},er=r=>(t,e,o="",n=String.fromCharCode(r))=>{if(!(t||!m.string?.[n]))return S(),o+=Nr(r),l[p]===n?S():E("Bad string"),[,o]};C[J]=er(J);C[V]=er(V);m.string={'"':!0};var Mr=20;"= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map(r=>f(r,Mr,!0));var xr=30,Or=40,$r=140;y("!",$r);f("||",xr);f("&&",Or);var Xr=50,kr=60,Br=70,or=100,Qr=140;f("|",Xr);f("&",Br);f("^",kr);f(">>",or);f("<<",or);y("~",Qr);var _=90;f("<",_);f(">",_);f("<=",_);f(">=",_);var nr=80;f("==",nr);f("!=",nr);var ir=110,X=120,sr=140;f("+",ir);f("-",ir);f("*",X);f("/",X);f("%",X);y("+",sr);y("-",sr);var F=150;g("++",F,r=>r?["++",r,null]:["++",A(F-1)]);g("--",F,r=>r?["--",r,null]:["--",A(F-1)]);var Gr=5,Hr=10;M(",",Hr);M(";",Gr,!0,!0);var Kr=170;G("()",Kr);var pr=170,vr=160;x("[]",pr);H(".",pr);x("()",vr);var ur=(r,t,e,o)=>typeof r=="string"?n=>t(n,r,n):r[0]==="."?(e=i(r[1]),o=r[2],n=>t(e(n),o,n)):r[0]==="[]"&&r.length===3?(e=i(r[1]),o=i(r[2]),n=>t(e(n),o(n),n)):r[0]==="()"&&r.length===2?ur(r[1],t):(()=>{throw Error("Invalid assignment target")})(),lr={"=":(r,t,e)=>r[t]=e,"+=":(r,t,e)=>r[t]+=e,"-=":(r,t,e)=>r[t]-=e,"*=":(r,t,e)=>r[t]*=e,"/=":(r,t,e)=>r[t]/=e,"%=":(r,t,e)=>r[t]%=e,"|=":(r,t,e)=>r[t]|=e,"&=":(r,t,e)=>r[t]&=e,"^=":(r,t,e)=>r[t]^=e,">>=":(r,t,e)=>r[t]>>=e,"<<=":(r,t,e)=>r[t]<<=e};for(let r in lr)u(r,(t,e)=>(e=i(e),ur(t,(o,n,s)=>lr[r](o,n,e(s)))));u("!",r=>(r=i(r),t=>!r(t)));u("||",(r,t)=>(r=i(r),t=i(t),e=>r(e)||t(e)));u("&&",(r,t)=>(r=i(r),t=i(t),e=>r(e)&&t(e)));u("~",r=>(r=i(r),t=>~r(t)));u("|",(r,t)=>(r=i(r),t=i(t),e=>r(e)|t(e)));u("&",(r,t)=>(r=i(r),t=i(t),e=>r(e)&t(e)));u("^",(r,t)=>(r=i(r),t=i(t),e=>r(e)^t(e)));u(">>",(r,t)=>(r=i(r),t=i(t),e=>r(e)>>t(e)));u("<<",(r,t)=>(r=i(r),t=i(t),e=>r(e)<<t(e)));u(">",(r,t)=>(r=i(r),t=i(t),e=>r(e)>t(e)));u("<",(r,t)=>(r=i(r),t=i(t),e=>r(e)<t(e)));u(">=",(r,t)=>(r=i(r),t=i(t),e=>r(e)>=t(e)));u("<=",(r,t)=>(r=i(r),t=i(t),e=>r(e)<=t(e)));u("==",(r,t)=>(r=i(r),t=i(t),e=>r(e)==t(e)));u("!=",(r,t)=>(r=i(r),t=i(t),e=>r(e)!=t(e)));u("+",(r,t)=>t!==void 0?(r=i(r),t=i(t),e=>r(e)+t(e)):(r=i(r),e=>+r(e)));u("-",(r,t)=>t!==void 0?(r=i(r),t=i(t),e=>r(e)-t(e)):(r=i(r),e=>-r(e)));u("*",(r,t)=>(r=i(r),t=i(t),e=>r(e)*t(e)));u("/",(r,t)=>(r=i(r),t=i(t),e=>r(e)/t(e)));u("%",(r,t)=>(r=i(r),t=i(t),e=>r(e)%t(e)));var k=(r,t,e,o)=>typeof r=="string"?n=>t(n,r):r[0]==="."?(e=i(r[1]),o=r[2],n=>t(e(n),o)):r[0]==="[]"&&r.length===3?(e=i(r[1]),o=i(r[2]),n=>t(e(n),o(n))):r[0]==="()"&&r.length===2?k(r[1],t):(()=>{throw Error("Invalid increment target")})();u("++",(r,t)=>k(r,t===null?(e,o)=>e[o]++:(e,o)=>++e[o]));u("--",(r,t)=>k(r,t===null?(e,o)=>e[o]--:(e,o)=>--e[o]));var mr=(...r)=>(r=r.map(i),t=>{let e;for(let o of r)e=o(t);return e});u(",",mr);u(";",mr);var cr=r=>r!=null&&(typeof r=="object"||typeof r=="function"),I=r=>cr(r)?Reflect.ownKeys({[r]:0})[0]:r,P=r=>typeof r=="string"&&(r[0]==="_"&&r[1]==="_"||r==="constructor"||r==="prototype"),Wr=r=>P(I(r));i.id=r=>r===void 0||Wr(r)?()=>{}:t=>t?.[r];var U=r=>{throw Error(r)};u("[]",(r,t)=>t===void 0?(r=r?r[0]===","?r.slice(1):[r]:[],r=r.map(e=>e==null?(()=>{}):e[0]==="..."?(e=i(e[1]),o=>e(o)):(e=i(e),o=>[e(o)])),e=>r.flatMap(o=>o(e))):(t==null&&U("Missing index"),r=i(r),t=i(t),e=>{let o=I(t(e));return P(o)?void 0:r(e)[o]}));u(".",(r,t)=>(r=i(r),t=I(t[0]?t:t[1]),P(t)?()=>{}:e=>r(e)[t]));u("()",(r,t)=>{if(t===void 0)return r==null?U("Empty ()"):i(r);let e=s=>s?.[0]===","&&s.slice(1).some(c=>c==null||e(c));e(t)&&U("Empty argument");let o=t?t[0]===","?(t=t.slice(1).map(i),s=>t.map(c=>c(s))):(t=i(t),s=>[t(s)]):()=>[],n=dr(r);return n<0?()=>{}:fr(r,n?(s,c,d)=>(c=I(c),P(c)?void 0:s[c](...o(d))):(s,c,d)=>s[c](...o(d)))});var fr=(r,t,e,o)=>r==null?U("Empty ()"):r[0]==="()"&&r.length==2?fr(r[1],t):typeof r=="string"?n=>t(n,r,n):r[0]==="."?(e=i(r[1]),o=r[2],n=>t(e(n),o,n)):r[0]==="?."?(e=i(r[1]),o=r[2],n=>{let s=e(n);return s==null?void 0:t(s,o,n)}):r[0]==="[]"&&r.length===3?(e=i(r[1]),o=i(r[2]),n=>t(e(n),o(n),n)):r[0]==="?.[]"?(e=i(r[1]),o=i(r[2]),n=>{let s=e(n);return s==null?void 0:t(s,o(n),n)}):(r=i(r),n=>t([r(n)],0,n)),B=r=>cr(r)?1:P(r)?-1:0,dr=(r,t=r?.[0],e=r?.[2])=>typeof r=="string"?B(r):t==="()"&&r.length==2?dr(r[1]):t==="."||t==="?."?B(e):(t==="[]"||t==="?.[]")&&r.length===3?Array.isArray(e)&&e[0]==null?B(e[1]):1:0;var hr=new WeakMap,qr=(r,...t)=>typeof r=="string"?i(m(r)):hr.get(r)||hr.set(r,zr(r,t)).get(r),Ar=57344,zr=(r,t)=>{let e=r.reduce((s,c,d)=>s+(d?String.fromCharCode(Ar+d-1):"")+c,""),o=m(e),n=s=>{if(typeof s=="string"&&s.length===1){let c=s.charCodeAt(0)-Ar,d;if(c>=0&&c<t.length)return d=t[c],Jr(d)?d:[,d]}return Array.isArray(s)?s.map(n):s};return i(n(o))},Jr=r=>typeof r=="string"||Array.isArray(r)&&(typeof r[0]=="string"||r[0]===void 0),Zt=qr;export{x as access,f as binary,i as compile,l as cur,Zt as default,E as err,A as expr,G as group,Yr as id,p as idx,br as keyword,ar as literal,Cr as loc,C as lookup,H as member,M as nary,R as next,u as operator,N as operators,jr as parens,m as parse,gr as peek,L as prec,Er as propName,Vr as seek,S as skip,g as token,y as unary,Zr as word};
|