@nimbus-sh/worker 0.12.0 → 0.13.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/dist/esbuild-cli-artifact.generated.d.ts +1 -1
- package/dist/esbuild-cli-artifact.generated.js +4 -4
- package/dist/esbuild-wasm-bundle.generated.d.ts +11 -10
- package/dist/esbuild-wasm-bundle.generated.d.ts.map +1 -1
- package/dist/esbuild-wasm-bundle.generated.js +11 -10
- package/dist/facets/build-facet.d.ts +53 -0
- package/dist/facets/build-facet.d.ts.map +1 -0
- package/dist/facets/build-facet.js +346 -0
- package/dist/facets/cirrus-real.d.ts +3 -0
- package/dist/facets/cirrus-real.d.ts.map +1 -1
- package/dist/facets/cirrus-real.js +1 -2
- package/dist/facets/compose.d.ts +1 -0
- package/dist/facets/compose.d.ts.map +1 -1
- package/dist/facets/compose.js +3 -0
- package/dist/facets/data-plan.d.ts +14 -30
- package/dist/facets/data-plan.d.ts.map +1 -1
- package/dist/facets/data-plan.js +153 -13
- package/dist/facets/dev-stylesheet.d.ts +27 -0
- package/dist/facets/dev-stylesheet.d.ts.map +1 -0
- package/dist/facets/dev-stylesheet.js +65 -0
- package/dist/facets/esbuild-transform.d.ts +23 -18
- package/dist/facets/esbuild-transform.d.ts.map +1 -1
- package/dist/facets/esbuild-transform.js +63 -109
- package/dist/facets/manager.d.ts +49 -9
- package/dist/facets/manager.d.ts.map +1 -1
- package/dist/facets/manager.js +238 -69
- package/dist/facets/oxc-transform.d.ts +29 -0
- package/dist/facets/oxc-transform.d.ts.map +1 -0
- package/dist/facets/oxc-transform.js +198 -0
- package/dist/facets/prebundle-pool.d.ts +23 -0
- package/dist/facets/prebundle-pool.d.ts.map +1 -0
- package/dist/facets/prebundle-pool.js +55 -0
- package/dist/facets/process.d.ts +13 -6
- package/dist/facets/process.d.ts.map +1 -1
- package/dist/facets/process.js +37 -31
- package/dist/facets/transform-store.d.ts +4 -4
- package/dist/facets/transform-store.js +4 -4
- package/dist/facets/vite-dev-server.d.ts +89 -12
- package/dist/facets/vite-dev-server.d.ts.map +1 -1
- package/dist/facets/vite-dev-server.js +66 -43
- package/dist/hosted/commands.d.ts.map +1 -1
- package/dist/hosted/commands.js +20 -4
- package/dist/hosted/runtime.d.ts.map +1 -1
- package/dist/hosted/runtime.js +7 -2
- package/dist/hosted/services.d.ts +3 -3
- package/dist/hosted/services.d.ts.map +1 -1
- package/dist/hosted/services.js +102 -95
- package/dist/hosted/session.d.ts +1 -0
- package/dist/hosted/session.d.ts.map +1 -1
- package/dist/loaders/generated-workers.d.ts +3 -0
- package/dist/loaders/generated-workers.d.ts.map +1 -1
- package/dist/loaders/generated-workers.js +3 -0
- package/dist/napi-wasm-artifacts.generated.js +2 -2
- package/dist/node-shims-artifact.generated.d.ts +14 -1
- package/dist/node-shims-artifact.generated.d.ts.map +1 -1
- package/dist/node-shims-artifact.generated.js +23 -10
- package/dist/npm/bin-links.d.ts +7 -4
- package/dist/npm/bin-links.d.ts.map +1 -1
- package/dist/npm/bin-links.js +14 -55
- package/dist/npm/cache.d.ts +6 -0
- package/dist/npm/cache.d.ts.map +1 -1
- package/dist/npm/cache.js +26 -4
- package/dist/npm/installer.d.ts +1 -1
- package/dist/npm/installer.d.ts.map +1 -1
- package/dist/npm/installer.js +26 -52
- package/dist/npm/pre-bundle-facet.d.ts +15 -117
- package/dist/npm/pre-bundle-facet.d.ts.map +1 -1
- package/dist/npm/pre-bundle-facet.js +13 -511
- package/dist/oxc-facet-artifact.generated.d.ts +18 -0
- package/dist/oxc-facet-artifact.generated.d.ts.map +1 -0
- package/dist/oxc-facet-artifact.generated.js +17 -0
- package/dist/oxc-wasm-artifact.generated.d.ts +20 -0
- package/dist/oxc-wasm-artifact.generated.d.ts.map +1 -0
- package/dist/oxc-wasm-artifact.generated.js +19 -0
- package/dist/rolldown-facet-artifact.generated.d.ts +18 -0
- package/dist/rolldown-facet-artifact.generated.d.ts.map +1 -0
- package/dist/rolldown-facet-artifact.generated.js +17 -0
- package/dist/router/remote-api.d.ts.map +1 -1
- package/dist/router/remote-api.js +9 -0
- package/dist/runtime/bash-repl.d.ts.map +1 -1
- package/dist/runtime/bash-repl.js +1 -4
- package/dist/runtime/cpython-resident.d.ts.map +1 -1
- package/dist/runtime/cpython-resident.js +1 -0
- package/dist/runtime/esbuild-wasm-bytes.d.ts +25 -23
- package/dist/runtime/esbuild-wasm-bytes.d.ts.map +1 -1
- package/dist/runtime/esbuild-wasm-bytes.js +30 -25
- package/dist/runtime/facet-loader-host.d.ts +5 -4
- package/dist/runtime/facet-loader-host.d.ts.map +1 -1
- package/dist/runtime/facet-loader-host.js +5 -4
- package/dist/runtime/node-runner.d.ts +2 -0
- package/dist/runtime/node-runner.d.ts.map +1 -1
- package/dist/runtime/node-runner.js +1 -0
- package/dist/runtime/node-shims-artifact.d.ts +8 -1
- package/dist/runtime/node-shims-artifact.d.ts.map +1 -1
- package/dist/runtime/node-shims-artifact.js +32 -4
- package/dist/runtime/node-shims.d.ts.map +1 -1
- package/dist/runtime/node-shims.js +145 -109
- package/dist/runtime/opencode-facet-runner.d.ts.map +1 -1
- package/dist/runtime/opencode-facet-runner.js +6 -2
- package/dist/runtime/oxc-wasm-bytes.d.ts +19 -0
- package/dist/runtime/oxc-wasm-bytes.d.ts.map +1 -0
- package/dist/runtime/oxc-wasm-bytes.js +39 -0
- package/dist/runtime/package-manager.js +1 -1
- package/dist/runtime/process-logs-api.d.ts.map +1 -1
- package/dist/runtime/process-logs-api.js +2 -0
- package/dist/runtime/project-fs.d.ts +8 -1
- package/dist/runtime/project-fs.d.ts.map +1 -1
- package/dist/runtime/project-fs.js +15 -1
- package/dist/runtime/python-repl.d.ts +40 -1
- package/dist/runtime/python-repl.d.ts.map +1 -1
- package/dist/runtime/python-repl.js +19 -11
- package/dist/runtime/ruby-repl.d.ts +38 -0
- package/dist/runtime/ruby-repl.d.ts.map +1 -1
- package/dist/runtime/ruby-repl.js +24 -5
- package/dist/runtime/ruby-resident.d.ts.map +1 -1
- package/dist/runtime/ruby-resident.js +2 -0
- package/dist/session/nimbus-session.d.ts +13 -8
- package/dist/session/nimbus-session.d.ts.map +1 -1
- package/dist/session/nimbus-session.js +11 -5
- package/dist/session/programmatic.d.ts +25 -30
- package/dist/session/programmatic.d.ts.map +1 -1
- package/dist/session/programmatic.js +65 -93
- package/dist/session/routes.d.ts.map +1 -1
- package/dist/session/routes.js +23 -7
- package/dist/session/rpc.d.ts +16 -6
- package/dist/session/rpc.d.ts.map +1 -1
- package/dist/session/rpc.js +53 -13
- package/dist/session/start-real-vite.d.ts +24 -9
- package/dist/session/start-real-vite.d.ts.map +1 -1
- package/dist/session/start-real-vite.js +40 -4
- package/dist/session/supervisor-op.d.ts +14 -0
- package/dist/session/supervisor-op.d.ts.map +1 -1
- package/dist/session/supervisor-op.js +49 -0
- package/dist/session/supervisor-rpc.d.ts +11 -0
- package/dist/session/supervisor-rpc.d.ts.map +1 -1
- package/dist/session/supervisor-rpc.js +18 -0
- package/dist/session/vite-command.d.ts.map +1 -1
- package/dist/session/vite-command.js +23 -19
- package/dist/session/ws-relay.d.ts.map +1 -1
- package/dist/session/ws-relay.js +13 -1
- package/dist/shell/npm-bin-entrypoints.d.ts +3 -1
- package/dist/shell/npm-bin-entrypoints.d.ts.map +1 -1
- package/dist/shell/npm-bin-entrypoints.js +53 -25
- package/dist/vfs/facet-resident-store.d.ts.map +1 -1
- package/dist/vfs/facet-resident-store.js +11 -5
- package/dist/wrangler/nimbus-wrangler.d.ts +8 -0
- package/dist/wrangler/nimbus-wrangler.d.ts.map +1 -1
- package/dist/wrangler/nimbus-wrangler.js +54 -57
- package/package.json +7 -5
- package/public/_assets/esbuild-0.24.2.wasm +0 -0
- package/public/_assets/napi-wasm/loader/{99efae93dd1dcc2b → ab7e57fe9e8750c2}/napi-wasm-loader.mjs +4 -4
- package/public/_assets/napi-wasm/loader/{99efae93dd1dcc2b → ab7e57fe9e8750c2}/provenance.json +2 -2
- package/public/_assets/oxc/nimbus-oxc-1aa8c4c7057c6c28.provenance.json +72 -0
- package/public/_assets/oxc/nimbus-oxc-1aa8c4c7057c6c28.wasm +0 -0
- package/public/_assets/runtime/esbuild-cli-f13e6a112b03ac07.js +1143 -0
- package/public/_assets/runtime/js-interpreter-3c37c48024f0f651.js +23 -0
- package/public/_assets/runtime/js-interpreter-ops-2f4dfec6798e70fc.js +290 -0
- package/public/_assets/runtime/js-interpreter-primordials-e620a61b7e9800fa.js +1 -0
- package/public/_assets/runtime/{node-shims-f92f16c7d7c532e9.js → node-shims-e3adc4576da31e6e.js} +651 -103
- package/public/_assets/runtime/{esbuild-cli-b7aecffd4c6a36fe.js → oxc-facet-fd86fefcdf16bf9c.js} +217 -1047
- package/public/_assets/runtime/{resident-store-92386265e8b306dc.js → resident-store-009f39539ac989fc.js} +11 -5
- package/public/_assets/runtime/rolldown-facet-09983434e2dbe93e.js +15165 -0
- package/public/_assets/runtime/{vfs-write-ledger-d33ee0034446c3e0.js → vfs-write-ledger-9e9594591425a9b8.js} +4 -1
- package/scripts/acorn-primordials.mjs +637 -0
- package/scripts/bundle-esbuild-wasm.mjs +42 -50
- package/scripts/bundle-facet-workers.mjs +247 -18
- package/scripts/bundle-node-shims.mjs +29 -2
- package/scripts/bundle-oxc-wasm.mjs +105 -0
- package/scripts/interpreter-bundle.mjs +105 -0
- package/scripts/napi-wasm/build.mjs +4 -1
- package/scripts/napi-wasm/loader/napi-wasm-loader.ts +38 -3
- package/scripts/oxc-wasm/Cargo.lock +1246 -0
- package/scripts/oxc-wasm/Cargo.toml +30 -0
- package/scripts/oxc-wasm/build.mjs +249 -0
- package/scripts/oxc-wasm/examples/memory.rs +51 -0
- package/scripts/oxc-wasm/examples/transform.rs +20 -0
- package/scripts/oxc-wasm/inputs.mjs +32 -0
- package/scripts/oxc-wasm/rust-toolchain.toml +5 -0
- package/scripts/oxc-wasm/src/abi.rs +136 -0
- package/scripts/oxc-wasm/src/diagnostics.rs +49 -0
- package/scripts/oxc-wasm/src/helpers.rs +139 -0
- package/scripts/oxc-wasm/src/lib.rs +247 -0
- package/scripts/oxc-wasm/src/module.rs +978 -0
- package/scripts/oxc-wasm/src/names.rs +175 -0
- package/scripts/oxc-wasm/src/options.rs +154 -0
- package/scripts/parser-audit.mjs +492 -0
- package/scripts/rolldown-facet/entry.mjs +21 -0
- package/scripts/rolldown-facet/shims.mjs +64 -0
- package/dist/facets/esbuild-bundle-pool.d.ts +0 -43
- package/dist/facets/esbuild-bundle-pool.d.ts.map +0 -1
- package/dist/facets/esbuild-bundle-pool.js +0 -80
- package/dist/loaders/pre-bundle-preamble.d.ts +0 -44
- package/dist/loaders/pre-bundle-preamble.d.ts.map +0 -1
- package/dist/loaders/pre-bundle-preamble.js +0 -116
- package/dist/runtime/host-wasm.d.ts +0 -8
- package/dist/runtime/host-wasm.d.ts.map +0 -1
- package/dist/runtime/host-wasm.js +0 -33
- /package/public/_assets/napi-wasm/loader/{99efae93dd1dcc2b → ab7e57fe9e8750c2}/wasi-trampoline.wasm +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const I = require("./interpreter-primordials.js");var fe=I.reflectApply,la=I.reflectConstruct,Ln=I.reflectGetPrototypeOf,Rn=I.reflectSetPrototypeOf,$r=I.reflectDefineProperty,pa=I.reflectSet,fa=I.objectAssign,Di=I.arrayIsArray,Cr=I.dataDescriptor,Li=I.StringPrototypeCharAt,ha=I.StringPrototypeCharCodeAt,Ri=I.StringPrototypeIndexOf,da=I.StringPrototypeLastIndexOf,At=I.StringPrototypeSlice,ma=I.StringPrototypeSubstr,ya=I.ArrayPrototypePop,ga=I.ArrayPrototypeIndexOf,xa=I.ArrayPrototypeLastIndexOf,ba=I.RegExpPrototypeExec,ji=I.RegExpPrototypeAccessors,Bi=I.reflectGet,wa=I.NumberPrototypeToString,va=I.BigIntPrototypeToString,sn=I.SafeList,ka=sn.prototype,Sa=I.ObjectPrototype,bt=I.objectCreate;function Vi(e){return Hi(I.objectKeys(e))}var Mi=I.objectDefineProperties,Gi=I.objectHasOwn;var nt=I.StringFromCharCode,Ui=I.symbolIterator,Pr=I.stringOf,Ki=I.SyntaxError,Ir=I.Error,Ar=I.BigInt,jn=I.parseIntOf,zi=I.parseFloatOf,Wi=I.SymbolConstructor,qi=void 0,Or=void 0,_r=A({hasOwnProperty:I.ObjectPrototypeHasOwnProperty,toString:I.ObjectPrototypeToString});function $e(e){throw new Ir(`interpreter: the parser ${e}`)}function A(e){let t={};return Rn(t,null),fa(t,e)}function Hi(e){let t=new sn;for(let n=0;n<e.length;n++)t[n]=e[n];return t}function Qi(e,t){return typeof t!="number"?$e(`read arguments by a ${typeof t}`):t>=0&&t<e.length&&t%1===0?e[t]:void 0}function Yi(e){if(typeof e!="object"&&typeof e!="function"||e===null)return!1;let t=Ln(e);return t===null||t!==Sa&&Ln(t)===null}function Bn(e){return Yi(e)?e:$e("enumerated an object of the realm's")}function Vn(e){return typeof e=="function"&&Ln(e)===null&&Yi(Bi(e,"prototype"))?e:$e("constructed something other than a constructor of its own")}function G(...e){let t=new sn;for(let n=0;n<e.length;n++)t[n]=e[n];return t}function xe(e){return Rn(e,I.SafeRegExpPrototype),e}function Ot(e,t){return xe(la(I.RegExp,[e,t]))}function Me(e){Rn(e,null),Rn(e.prototype,null)}function Mn(e,t,n){return $r(e,t,Cr(n,!0,!0,!0))||$e(`could not set ${t}`),n}function Ea(e){return typeof e=="object"&&e!==null&&Ln(e)===ka}function Gt(e,t){return typeof e=="string"?e:$e(`called ${t} on a ${typeof e}`)}function on(e,t){return Ea(e)?e:$e(`called ${t} on something other than its own list`)}function V(e,t){return fe(ha,Gt(e,"charCodeAt"),[t])}function _t(e,t){return fe(Li,Gt(e,"charAt"),[t])}function Zi(e,t,n){return fe(ma,Gt(e,"substr"),[t,n])}function q(e,t,n){if(typeof e=="string")return fe(At,e,[t,n]);let r=on(e,"slice"),i=r.length,s=(u,c)=>{let l=u===void 0?c:u;return l<0?l+i<0?0:l+i:l>i?i:l},o=new sn,a=s(n,i);for(let u=s(t,0);u<a;u++)o[o.length]=r[u];return o}function he(e,t,n){return typeof e=="string"?fe(Ri,e,[t,n]):fe(ga,on(e,"indexOf"),[t,n])}function Xi(e,t,n){if(typeof e=="string")return fe(da,e,[t,n]);let r=on(e,"lastIndexOf");return fe(xa,r,n===void 0?[t]:[t,n])}function U(e,t){let n=on(e,"push");return n[n.length]=t,n.length}function Ce(e){return fe(ya,on(e,"pop"),[])}function Gn(e,t){return fe(ba,e,[t])}function $a(e){if(e===null)return null;let t=Hi(e);return $r(t,"index",Cr(e.index,!0,!0,!0)),$r(t,"input",Cr(e.input,!0,!0,!0)),t}function Xe(e,t){return $a(Gn(e,t))}function se(e,t){return Gn(e,t)!==null}function rn(e,t){let n=ji[t];return typeof n=="function"?fe(n,e,[]):$e(`read RegExp.prototype.${t}`)}function Ca(e){let t=Pa,n="";for(let r=0;r<Ni.length;r++){let i=Ni[r];typeof ji[i]=="function"&&rn(e,i)===!0&&(n+=t[i])}return n}var Ni=["hasIndices","global","ignoreCase","multiline","dotAll","unicode","unicodeSets","sticky"],Pa=A({hasIndices:"d",global:"g",ignoreCase:"i",multiline:"m",dotAll:"s",unicode:"u",unicodeSets:"v",sticky:"y"});function Ji(e,t,n){(typeof t!="object"||t===null)&&$e(`searched by a ${typeof t}`);let r=t;if(rn(t,"global")===!0)pa(t,"lastIndex",0);else{let i=rn(t,"source");r=Ot(typeof i=="string"?i:"",`${Ca(t)}g`)}for(;;){let i=Gn(r,e);if(i===null)return;i[0].length===0&&$e("matched empty text"),n(i)}}function Ft(e,t,n){let r=Gt(e,"replace");if((typeof n!="string"||fe(Ri,n,["$"])>=0)&&$e("replaced by a pattern"),rn(t,"global")!==!0){let o=Gn(t,r);return o===null?r:fe(At,r,[0,o.index])+n+fe(At,r,[o.index+o[0].length])}let i="",s=0;return Ji(r,t,o=>{i+=fe(At,r,[s,o.index])+n,s=o.index+o[0].length}),i+fe(At,r,[s])}function es(e,t){let n=Gt(e,"split"),r=new sn,i=0;return Ji(n,t,s=>{r[r.length]=fe(At,n,[i,s.index]);for(let o=1;o<s.length;o++)r[r.length]=s[o];i=s.index+s[0].length}),r[r.length]=fe(At,n,[i]),r}function ts(e,t){let n=Gt(e,"match");return rn(t,"global")===!0&&$e("matched with a global regexp"),Xe(t,n)}function Tt(e,t,...n){return typeof e=="function"?fe(e,t,n):$e(`called call on a ${typeof e}`)}function ns(e,t){return typeof e=="bigint"?fe(va,e,[t]):typeof e=="number"?fe(wa,e,[t]):$e(`called toString on a ${typeof e}`)}function P(e,t){return typeof e=="string"?t==="length"?e.length:typeof t=="number"&&t>=0&&t<e.length&&t%1===0?fe(Li,e,[t]):void 0:typeof e!="object"||e===null||typeof t!="string"&&typeof t!="number"?$e(`indexed a ${typeof e} by a ${typeof t}`):Bi(e,t)}var Aa=G(509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239),as=G(0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489),Oa="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",us="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",an=A({3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"}),Fr="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Tr=A({5:Fr,"5module":Fr+" export import",6:Fr+" const class extends export import super"}),cs=xe(/^in(stanceof)?$/),_a=new Ot("["+us+"]"),Fa=new Ot("["+us+Oa+"]");function Rr(e,t){for(var n=65536,r=0;r<t.length;r+=2){if(n+=typeof t=="string"?P(t,r):t[r],n>e)return!1;if(n+=typeof t=="string"?P(t,r+1):t[r+1],n>=e)return!0}return!1}function rt(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&se(_a,nt(e)):t===!1?!1:Rr(e,as)}function vt(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&se(Fa,nt(e)):t===!1?!1:Rr(e,as)||Rr(e,Aa)}var X=function(t,n){n===void 0&&(n=A({})),this.label=t,this.keyword=n.keyword,this.beforeExpr=!!n.beforeExpr,this.startsExpr=!!n.startsExpr,this.isLoop=!!n.isLoop,this.isAssign=!!n.isAssign,this.prefix=!!n.prefix,this.postfix=!!n.postfix,this.binop=n.binop||null,this.updateContext=null};Me(X);function Ge(e,t){return new X(e,A({beforeExpr:!0,binop:t}))}var Ue=A({beforeExpr:!0}),Pe=A({startsExpr:!0}),pn=A({});function Z(e,t){return t===void 0&&(t=A({})),t.keyword=e,pn[e]=new X(e,t)}var f=A({num:new X("num",Pe),regexp:new X("regexp",Pe),string:new X("string",Pe),name:new X("name",Pe),privateId:new X("privateId",Pe),eof:new X("eof"),bracketL:new X("[",A({beforeExpr:!0,startsExpr:!0})),bracketR:new X("]"),braceL:new X("{",A({beforeExpr:!0,startsExpr:!0})),braceR:new X("}"),parenL:new X("(",A({beforeExpr:!0,startsExpr:!0})),parenR:new X(")"),comma:new X(",",Ue),semi:new X(";",Ue),colon:new X(":",Ue),dot:new X("."),question:new X("?",Ue),questionDot:new X("?."),arrow:new X("=>",Ue),template:new X("template"),invalidTemplate:new X("invalidTemplate"),ellipsis:new X("...",Ue),backQuote:new X("`",Pe),dollarBraceL:new X("${",A({beforeExpr:!0,startsExpr:!0})),eq:new X("=",A({beforeExpr:!0,isAssign:!0})),assign:new X("_=",A({beforeExpr:!0,isAssign:!0})),incDec:new X("++/--",A({prefix:!0,postfix:!0,startsExpr:!0})),prefix:new X("!/~",A({beforeExpr:!0,prefix:!0,startsExpr:!0})),logicalOR:Ge("||",1),logicalAND:Ge("&&",2),bitwiseOR:Ge("|",3),bitwiseXOR:Ge("^",4),bitwiseAND:Ge("&",5),equality:Ge("==/!=/===/!==",6),relational:Ge("</>/<=/>=",7),bitShift:Ge("<</>>/>>>",8),plusMin:new X("+/-",A({beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0})),modulo:Ge("%",10),star:Ge("*",10),slash:Ge("/",10),starstar:new X("**",A({beforeExpr:!0})),coalesce:Ge("??",1),_break:Z("break"),_case:Z("case",Ue),_catch:Z("catch"),_continue:Z("continue"),_debugger:Z("debugger"),_default:Z("default",Ue),_do:Z("do",A({isLoop:!0,beforeExpr:!0})),_else:Z("else",Ue),_finally:Z("finally"),_for:Z("for",A({isLoop:!0})),_function:Z("function",Pe),_if:Z("if"),_return:Z("return",Ue),_switch:Z("switch"),_throw:Z("throw",Ue),_try:Z("try"),_var:Z("var"),_const:Z("const"),_while:Z("while",A({isLoop:!0})),_with:Z("with"),_new:Z("new",A({beforeExpr:!0,startsExpr:!0})),_this:Z("this",Pe),_super:Z("super",Pe),_class:Z("class",Pe),_extends:Z("extends",Ue),_export:Z("export"),_import:Z("import",Pe),_null:Z("null",Pe),_true:Z("true",Pe),_false:Z("false",Pe),_in:Z("in",A({beforeExpr:!0,binop:7})),_instanceof:Z("instanceof",A({beforeExpr:!0,binop:7})),_typeof:Z("typeof",A({beforeExpr:!0,prefix:!0,startsExpr:!0})),_void:Z("void",A({beforeExpr:!0,prefix:!0,startsExpr:!0})),_delete:Z("delete",A({beforeExpr:!0,prefix:!0,startsExpr:!0}))}),Ie=xe(/\r\n?|\n|\u2028|\u2029/),Ta=new Ot(Ie.source,"g");function Kt(e){return e===10||e===13||e===8232||e===8233}function ls(e,t,n){n===void 0&&(n=e.length);for(var r=t;r<n;r++){var i=V(e,r);if(Kt(i))return r<n-1&&i===13&&V(e,r+1)===10?r+2:r+1}return-1}var ps=xe(/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/),we=xe(/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g);var Na=_r.hasOwnProperty,Da=_r.toString,zt=Gi||(function(e,t){return Tt(Na,e,t)}),rs=Di||(function(e){return Tt(Da,e)==="[object Array]"}),Un=bt(null);function wt(e){return(typeof Un=="string"?P(Un,e):Un[e])||(Un[e]=new Ot("^(?:"+Ft(e,xe(/ /g),"|")+")$"))}function ct(e){return e<=65535?nt(e):(e-=65536,nt((e>>10)+55296,(e&1023)+56320))}var La=xe(/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/),Ut=function(t,n){this.line=t,this.column=n};Me(Ut);Ut.prototype.offset=function(t){return new Ut(this.line,this.column+t)};var dn=function(t,n,r){this.start=n,this.end=r,t.sourceFile!==null&&(this.source=t.sourceFile)};Me(dn);function fs(e,t){for(var n=1,r=0;;){var i=ls(e,r,t);if(i<0)return new Ut(n,t-r);++n,r=i}}var ln=A({ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1}),is=!1;function Ra(e){var t=A({});for(var n in Bn(ln))t[n]=e&&zt(e,n)?typeof e=="string"?P(e,n):e[n]:typeof ln=="string"?P(ln,n):ln[n];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!is&&typeof qi=="object"&&Or&&(is=!0,Or(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
3
|
+
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),rs(t.onToken)){var r=t.onToken;t.onToken=function(i){return U(r,i)}}if(rs(t.onComment)&&(t.onComment=ja(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Ir("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function ja(e,t){return function(n,r,i,s,o,a){var u=A({type:n?"Block":"Line",value:r,start:i,end:s});e.locations&&(u.loc=new dn(this,o,a)),e.ranges&&(u.range=G(i,s)),U(t,u)}}var Nt=1,Dt=2,Vr=4,hs=8,Mr=16,ds=32,Hn=64,ms=128,Lt=256,mn=512,ys=1024,Qn=Nt|Dt|Lt;function Gr(e,t){return Dt|(e?Vr:0)|(t?hs:0)}var zn=0,Ur=1,pt=2,gs=3,xs=4,bs=5,me=function(t,n,r){this.options=t=Ra(t),this.sourceFile=t.sourceFile,this.keywords=wt(typeof Tr=="string"?P(Tr,t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5):Tr[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=typeof an=="string"?P(an,t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3):an[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=wt(i);var s=(i?i+" ":"")+an.strict;this.reservedWordsStrict=wt(s),this.reservedWordsStrictBind=wt(s+" "+an.strictBind),this.input=Pr(n),this.containsEsc=!1,r?(this.pos=r,this.lineStart=Xi(this.input,`
|
|
4
|
+
`,r-1)+1,this.curLine=es(q(this.input,0,this.lineStart),Ie).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=f.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=G(),this.undefinedExports=bt(null),this.pos===0&&t.allowHashBang&&q(this.input,0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=G(),this.enterScope(this.options.sourceType==="commonjs"?Dt:Nt),this.regexpState=null,this.privateNameStack=G()};Me(me);var We=A({inFunction:A({configurable:!0}),inGenerator:A({configurable:!0}),inAsync:A({configurable:!0}),canAwait:A({configurable:!0}),allowReturn:A({configurable:!0}),allowSuper:A({configurable:!0}),allowDirectSuper:A({configurable:!0}),treatFunctionsAsVar:A({configurable:!0}),allowNewDotTarget:A({configurable:!0}),allowUsing:A({configurable:!0}),inClassStaticBlock:A({configurable:!0})});me.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};We.inFunction.get=function(){return(this.currentVarScope().flags&Dt)>0};We.inGenerator.get=function(){return(this.currentVarScope().flags&hs)>0};We.inAsync.get=function(){return(this.currentVarScope().flags&Vr)>0};We.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=typeof this.scopeStack=="string"?P(this.scopeStack,e):this.scopeStack[e],n=t.flags;if(n&(Lt|mn))return!1;if(n&Dt)return(n&Vr)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};We.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Nt)};We.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&Hn)>0||this.options.allowSuperOutsideMethod};We.allowDirectSuper.get=function(){return(this.currentThisScope().flags&ms)>0};We.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};We.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=typeof this.scopeStack=="string"?P(this.scopeStack,e):this.scopeStack[e],n=t.flags;if(n&(Lt|mn)||n&Dt&&!(n&Mr))return!0}return!1};We.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&ys||!this.inModule&&t&Nt)};We.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Lt)>0};me.extend=function(){for(var t=G(),n=arguments.length;n--;)t[n]=Qi(arguments,n);for(var r=this,i=0;i<t.length;i++)r=t[i](r);return r};me.parse=function(t,n){return new(Vn(this))(n,t).parse()};me.parseExpressionAt=function(t,n,r){var i=new(Vn(this))(r,t,n);return i.nextToken(),i.parseExpression()};me.tokenizer=function(t,n){return new(Vn(this))(n,t)};Mi(me.prototype,We);var ke=me.prototype,Ba=xe(/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/);ke.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){we.lastIndex=e,e+=P(Xe(we,this.input),0).length;var t=Xe(Ba,q(this.input,e));if(!t)return!1;if(((typeof t=="string"?P(t,1):t[1])||(typeof t=="string"?P(t,2):t[2]))==="use strict"){we.lastIndex=e+(typeof t=="string"?P(t,0):t[0]).length;var n=Xe(we,this.input),r=n.index+(typeof n=="string"?P(n,0):n[0]).length,i=_t(this.input,r);return i===";"||i==="}"||se(Ie,typeof n=="string"?P(n,0):n[0])&&!(se(xe(/[(`.[+\-/*%<>=,?^&]/),i)||i==="!"&&_t(this.input,r+1)==="=")}e+=(typeof t=="string"?P(t,0):t[0]).length,we.lastIndex=e,e+=P(Xe(we,this.input),0).length,(typeof this.input=="string"?P(this.input,e):this.input[e])===";"&&e++}};ke.eat=function(e){return this.type===e?(this.next(),!0):!1};ke.isContextual=function(e){return this.type===f.name&&this.value===e&&!this.containsEsc};ke.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};ke.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};ke.canInsertSemicolon=function(){return this.type===f.eof||this.type===f.braceR||se(Ie,q(this.input,this.lastTokEnd,this.start))};ke.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};ke.semicolon=function(){!this.eat(f.semi)&&!this.insertSemicolon()&&this.unexpected()};ke.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};ke.expect=function(e){this.eat(e)||this.unexpected()};ke.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var yn=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Me(yn);ke.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")}};ke.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")};ke.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};ke.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var D=me.prototype;D.parseTopLevel=function(e){var t=bt(null);for(e.body||(e.body=G());this.type!==f.eof;){var n=this.parseStatement(null,!0,t);U(e.body,n)}if(this.inModule)for(var r=0,i=Vi(this.undefinedExports);r<i.length;r+=1){var s=typeof i=="string"?P(i,r):i[r];this.raiseRecoverable((typeof this.undefinedExports=="string"?P(this.undefinedExports,s):this.undefinedExports[s]).start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var Kr=A({kind:"loop"}),Va=A({kind:"switch"});D.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;we.lastIndex=this.pos;var t=Xe(we,this.input),n=this.pos+(typeof t=="string"?P(t,0):t[0]).length,r=this.fullCharCodeAt(n);if(r===91||r===92)return!0;if(e)return!1;if(r===123)return!0;if(rt(r)){var i=n;do n+=r<=65535?1:2;while(vt(r=this.fullCharCodeAt(n)));if(r===92)return!0;var s=q(this.input,i,n);if(!se(cs,s))return!0}return!1};D.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;we.lastIndex=this.pos;var e=Xe(we,this.input),t=this.pos+(typeof e=="string"?P(e,0):e[0]).length,n;return!se(Ie,q(this.input,this.pos,t))&&q(this.input,t,t+8)==="function"&&(t+8===this.input.length||!(vt(n=this.fullCharCodeAt(t+8))||n===92))};D.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;we.lastIndex=this.pos;var n=Xe(we,this.input),r=this.pos+(typeof n=="string"?P(n,0):n[0]).length;if(se(Ie,q(this.input,this.pos,r)))return!1;if(e){var i=r+5,s;if(q(this.input,r,i)!=="using"||i===this.input.length||vt(s=this.fullCharCodeAt(i))||s===92)return!1;we.lastIndex=i;var o=Xe(we,this.input);if(r=i+(typeof o=="string"?P(o,0):o[0]).length,o&&se(Ie,q(this.input,i,r)))return!1}var a=this.fullCharCodeAt(r);if(!rt(a)&&a!==92)return!1;var u=r;do r+=a<=65535?1:2;while(vt(a=this.fullCharCodeAt(r)));if(a===92)return!0;var c=q(this.input,u,r);return!(se(cs,c)||t&&c==="of")};D.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};D.isUsing=function(e){return this.isUsingKeyword(!1,e)};D.parseStatement=function(e,t,n){var r=this.type,i=this.startNode(),s;switch(this.isLet(e)&&(r=f._var,s="let"),r){case f._break:case f._continue:return this.parseBreakContinueStatement(i,r.keyword);case f._debugger:return this.parseDebuggerStatement(i);case f._do:return this.parseDoStatement(i);case f._for:return this.parseForStatement(i);case f._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case f._class:return e&&this.unexpected(),this.parseClass(i,!0);case f._if:return this.parseIfStatement(i);case f._return:return this.parseReturnStatement(i);case f._switch:return this.parseSwitchStatement(i);case f._throw:return this.parseThrowStatement(i);case f._try:return this.parseTryStatement(i);case f._const:case f._var:return s=s||this.value,e&&s!=="var"&&this.unexpected(),this.parseVarStatement(i,s);case f._while:return this.parseWhileStatement(i);case f._with:return this.parseWithStatement(i);case f.braceL:return this.parseBlock(!0,i);case f.semi:return this.parseEmptyStatement(i);case f._export:case f._import:if(this.options.ecmaVersion>10&&r===f._import){we.lastIndex=this.pos;var o=Xe(we,this.input),a=this.pos+(typeof o=="string"?P(o,0):o[0]).length,u=V(this.input,a);if(u===40||u===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===f._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var c=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(c)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),c==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(i,!1,c),this.semicolon(),this.finishNode(i,"VariableDeclaration");var l=this.value,p=this.parseExpression();return r===f.name&&p.type==="Identifier"&&this.eat(f.colon)?this.parseLabeledStatement(i,l,p,e):this.parseExpressionStatement(i,p)}};D.parseBreakContinueStatement=function(e,t){var n=t==="break";this.next(),this.eat(f.semi)||this.insertSemicolon()?e.label=null:this.type!==f.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=typeof this.labels=="string"?P(this.labels,r):this.labels[r];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(n||i.kind==="loop")||e.label&&n))break}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")};D.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};D.parseDoStatement=function(e){return this.next(),U(this.labels,Kr),e.body=this.parseStatement("do"),Ce(this.labels),this.expect(f._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(f.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};D.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(U(this.labels,Kr),this.enterScope(0),this.expect(f.parenL),this.type===f.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===f._var||this.type===f._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var s=this.isContextual("let"),o=!1,a=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(a){var u=this.startNode();return this.next(),a==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(u,!0,a),this.finishNode(u,"VariableDeclaration"),this.parseForAfterInit(e,u,t)}var c=this.containsEsc,l=new yn,p=this.start,h=t>-1?this.parseExprSubscripts(l,"await"):this.parseExpression(!0,l);return this.type===f._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===f._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(h.start===p&&!c&&h.type==="Identifier"&&h.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),s&&o&&this.raise(h.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(h,!1,l),this.checkLValPattern(h),this.parseForIn(e,h)):(this.checkExpressionErrors(l,!0),t>-1&&this.unexpected(t),this.parseFor(e,h))};D.parseForAfterInit=function(e,t,n){return(this.type===f._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===f._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))};D.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,fn|(n?0:jr),!1,t)};D.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(f._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};D.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(f.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};D.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=G(),this.expect(f.braceL),U(this.labels,Va),this.enterScope(ys);for(var t,n=!1;this.type!==f.braceR;)if(this.type===f._case||this.type===f._default){var r=this.type===f._case;t&&this.finishNode(t,"SwitchCase"),U(e.cases,t=this.startNode()),t.consequent=G(),this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(f.colon)}else t||this.unexpected(),U(t.consequent,this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),Ce(this.labels),this.finishNode(e,"SwitchStatement")};D.parseThrowStatement=function(e){return this.next(),se(Ie,q(this.input,this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Ma=G();D.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?ds:0),this.checkLValPattern(e,t?xs:pt),this.expect(f.parenR),e};D.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===f._catch){var t=this.startNode();this.next(),this.eat(f.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(f._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};D.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")};D.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),U(this.labels,Kr),e.body=this.parseStatement("while"),Ce(this.labels),this.finishNode(e,"WhileStatement")};D.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};D.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};D.parseLabeledStatement=function(e,t,n,r){for(var i=0,s=this.labels;i<s.length;i+=1){var o=typeof s=="string"?P(s,i):s[i];o.name===t&&this.raise(n.start,"Label '"+t+"' is already declared")}for(var a=this.type.isLoop?"loop":this.type===f._switch?"switch":null,u=this.labels.length-1;u>=0;u--){var c=typeof this.labels=="string"?P(this.labels,u):this.labels[u];if(c.statementStart===e.start)c.statementStart=this.start,c.kind=a;else break}return U(this.labels,A({name:t,kind:a,statementStart:this.start})),e.body=this.parseStatement(r?he(r,"label")===-1?r+"label":r:"label"),Ce(this.labels),e.label=n,this.finishNode(e,"LabeledStatement")};D.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};D.parseBlock=function(e,t,n){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=G(),this.expect(f.braceL),e&&this.enterScope(0);this.type!==f.braceR;){var r=this.parseStatement(null);U(t.body,r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};D.parseFor=function(e,t){return e.init=t,this.expect(f.semi),e.test=this.type===f.semi?null:this.parseExpression(),this.expect(f.semi),e.update=this.type===f.parenR?null:this.parseExpression(),this.expect(f.parenR),e.body=this.parseStatement("for"),this.exitScope(),Ce(this.labels),this.finishNode(e,"ForStatement")};D.parseForIn=function(e,t){var n=this.type===f._in;return this.next(),t.type==="VariableDeclaration"&&(typeof t.declarations=="string"?P(t.declarations,0):t.declarations[0]).init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||(typeof t.declarations=="string"?P(t.declarations,0):t.declarations[0]).id.type!=="Identifier")&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(f.parenR),e.body=this.parseStatement("for"),this.exitScope(),Ce(this.labels),this.finishNode(e,n?"ForInStatement":"ForOfStatement")};D.parseVar=function(e,t,n,r){for(e.declarations=G(),e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(f.eq)?i.init=this.parseMaybeAssign(t):!r&&n==="const"&&!(this.type===f._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!r&&(n==="using"||n==="await using")&&this.options.ecmaVersion>=17&&this.type!==f._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration"):!r&&i.id.type!=="Identifier"&&!(t&&(this.type===f._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,U(e.declarations,this.finishNode(i,"VariableDeclarator")),!this.eat(f.comma))break}return e};D.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Ur:pt,!1)};var fn=1,jr=2,ws=4;D.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===f.star&&t&jr&&this.unexpected(),e.generator=this.eat(f.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&fn&&(e.id=t&ws&&this.type!==f.name?null:this.parseIdent(),e.id&&!(t&jr)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Ur:pt:gs));var s=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Gr(e.async,e.generator)),t&fn||(e.id=this.type===f.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=s,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,t&fn?"FunctionDeclaration":"FunctionExpression")};D.parseFunctionParams=function(e){this.expect(f.parenL),e.params=this.parseBindingList(f.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};D.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),s=!1;for(i.body=G(),this.expect(f.braceL);this.type!==f.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(U(i.body,o),o.type==="MethodDefinition"&&o.kind==="constructor"?(s&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),s=!0):o.key&&o.key.type==="PrivateIdentifier"&&Ga(r,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};D.parseClassElement=function(e){if(this.eat(f.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,s=!1,o="method",a=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(f.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===f.star?a=!0:r="static"}if(n.static=a,!r&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===f.star)&&!this.canInsertSemicolon()?s=!0:r="async"),!r&&(t>=9||!s)&&this.eat(f.star)&&(i=!0),!r&&!s&&!i){var u=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=u:r=u)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===f.parenL||o!=="method"||i||s){var c=!n.static&&Wn(n,"constructor"),l=c&&e;c&&o!=="method"&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=c?"constructor":o,this.parseClassMethod(n,i,s,l)}else this.parseClassField(n);return n};D.isClassElementNameStart=function(){return this.type===f.name||this.type===f.privateId||this.type===f.num||this.type===f.string||this.type===f.bracketL||this.type.keyword};D.parseClassElementName=function(e){this.type===f.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};D.parseClassMethod=function(e,t,n,r){var i=e.key;e.kind==="constructor"?(t&&this.raise(i.start,"Constructor can't be a generator"),n&&this.raise(i.start,"Constructor can't be an async method")):e.static&&Wn(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,n,r);return e.kind==="get"&&s.params.length!==0&&this.raiseRecoverable(s.start,"getter should have no params"),e.kind==="set"&&s.params.length!==1&&this.raiseRecoverable(s.start,"setter should have exactly one param"),e.kind==="set"&&(typeof s.params=="string"?P(s.params,0):s.params[0]).type==="RestElement"&&this.raiseRecoverable((typeof s.params=="string"?P(s.params,0):s.params[0]).start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};D.parseClassField=function(e){return Wn(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Wn(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(f.eq)?(this.enterScope(mn|Hn),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")};D.parseClassStaticBlock=function(e){e.body=G();var t=this.labels;for(this.labels=G(),this.enterScope(Lt|Hn);this.type!==f.braceR;){var n=this.parseStatement(null);U(e.body,n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};D.parseClassId=function(e,t){this.type===f.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,pt,!1)):(t===!0&&this.unexpected(),e.id=null)};D.parseClassSuper=function(e){e.superClass=this.eat(f._extends)?this.parseExprSubscripts(null,!1):null};D.enterClassBody=function(){var e=A({declared:bt(null),used:G()});return U(this.privateNameStack,e),e.declared};D.exitClassBody=function(){var e=Ce(this.privateNameStack),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=r===0?null:typeof this.privateNameStack=="string"?P(this.privateNameStack,r-1):this.privateNameStack[r-1],s=0;s<n.length;++s){var o=typeof n=="string"?P(n,s):n[s];zt(t,o.name)||(i?U(i.used,o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}};function Ga(e,t){var n=t.key.name,r=typeof e=="string"?P(e,n):e[n],i="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(i=(t.static?"s":"i")+t.kind),r==="iget"&&i==="iset"||r==="iset"&&i==="iget"||r==="sget"&&i==="sset"||r==="sset"&&i==="sget"?(e[n]="true",!1):r?!0:(e[n]=i,!1)}function Wn(e,t){var n=e.computed,r=e.key;return!n&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}D.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==f.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};D.parseExport=function(e,t){if(this.next(),this.eat(f.star))return this.parseExportAllDeclaration(e,t);if(this.eat(f._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=G(),e.source=null,this.options.ecmaVersion>=16&&(e.attributes=G());else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==f.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=typeof r=="string"?P(r,n):r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type==="Literal"&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=G())}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};D.parseExportDeclaration=function(e){return this.parseStatement(null)};D.parseExportDefaultDeclaration=function(){var e;if(this.type===f._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,fn|ws,!1,e)}else if(this.type===f._class){var n=this.startNode();return this.parseClass(n,"nullableID")}else{var r=this.parseMaybeAssign();return this.semicolon(),r}};D.checkExport=function(e,t,n){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),zt(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)};D.checkPatternExport=function(e,t){var n=t.type;if(n==="Identifier")this.checkExport(e,t,t.start);else if(n==="ObjectPattern")for(var r=0,i=t.properties;r<i.length;r+=1){var s=typeof i=="string"?P(i,r):i[r];this.checkPatternExport(e,s)}else if(n==="ArrayPattern")for(var o=0,a=t.elements;o<a.length;o+=1){var u=typeof a=="string"?P(a,o):a[o];u&&this.checkPatternExport(e,u)}else n==="Property"?this.checkPatternExport(e,t.value):n==="AssignmentPattern"?this.checkPatternExport(e,t.left):n==="RestElement"&&this.checkPatternExport(e,t.argument)};D.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=typeof r=="string"?P(r,n):r[n];this.checkPatternExport(e,i.id)}};D.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};D.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};D.parseExportSpecifiers=function(e){var t=G(),n=!0;for(this.expect(f.braceL);!this.eat(f.braceR);){if(n)n=!1;else if(this.expect(f.comma),this.afterTrailingComma(f.braceR))break;U(t,this.parseExportSpecifier(e))}return t};D.parseImport=function(e){return this.next(),this.type===f.string?(e.specifiers=Ma,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===f.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};D.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,pt),this.finishNode(e,"ImportSpecifier")};D.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,pt),this.finishNode(e,"ImportDefaultSpecifier")};D.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,pt),this.finishNode(e,"ImportNamespaceSpecifier")};D.parseImportSpecifiers=function(){var e=G(),t=!0;if(this.type===f.name&&(U(e,this.parseImportDefaultSpecifier()),!this.eat(f.comma)))return e;if(this.type===f.star)return U(e,this.parseImportNamespaceSpecifier()),e;for(this.expect(f.braceL);!this.eat(f.braceR);){if(t)t=!1;else if(this.expect(f.comma),this.afterTrailingComma(f.braceR))break;U(e,this.parseImportSpecifier())}return e};D.parseWithClause=function(){var e=G();if(!this.eat(f._with))return e;this.expect(f.braceL);for(var t=A({}),n=!0;!this.eat(f.braceR);){if(n)n=!1;else if(this.expect(f.comma),this.afterTrailingComma(f.braceR))break;var r=this.parseImportAttribute(),i=r.key.type==="Identifier"?r.key.name:r.key.value;zt(t,i)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,U(e,r)}return e};D.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===f.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(f.colon),this.type!==f.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};D.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===f.string){var e=this.parseLiteral(this.value);return se(La,e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};D.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(typeof e=="string"?P(e,t):e[t]);++t)(typeof e=="string"?P(e,t):e[t]).directive=q((typeof e=="string"?P(e,t):e[t]).expression.raw,1,-1)};D.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&((typeof this.input=="string"?P(this.input,e.start):this.input[e.start])==='"'||(typeof this.input=="string"?P(this.input,e.start):this.input[e.start])==="'")};var qe=me.prototype;qe.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var s=typeof i=="string"?P(i,r):i[r];this.toAssignable(s,t),s.type==="RestElement"&&(s.argument.type==="ArrayPattern"||s.argument.type==="ObjectPattern")&&this.raise(s.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e};qe.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=typeof e=="string"?P(e,r):e[r];i&&this.toAssignable(i,t)}if(n){var s=typeof e=="string"?P(e,n-1):e[n-1];this.options.ecmaVersion===6&&t&&s&&s.type==="RestElement"&&s.argument.type!=="Identifier"&&this.unexpected(s.argument.start)}return e};qe.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};qe.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==f.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};qe.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case f.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(f.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case f.braceL:return this.parseObj(!0)}return this.parseIdent()};qe.parseBindingList=function(e,t,n,r){for(var i=G(),s=!0;!this.eat(e);)if(s?s=!1:this.expect(f.comma),t&&this.type===f.comma)U(i,null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===f.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),U(i,o),this.type===f.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else U(i,this.parseAssignableListItem(r))}return i};qe.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};qe.parseBindingListItem=function(e){return e};qe.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(f.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")};qe.checkLValSimple=function(e,t,n){t===void 0&&(t=zn);var r=t!==zn;switch(e.type){case"Identifier":this.strict&&se(this.reservedWordsStrictBind,e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(t===pt&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),n&&(zt(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),t!==bs&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}};qe.checkLValPattern=function(e,t,n){switch(t===void 0&&(t=zn),e.type){case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var s=typeof i=="string"?P(i,r):i[r];this.checkLValInnerPattern(s,t,n)}break;case"ArrayPattern":for(var o=0,a=e.elements;o<a.length;o+=1){var u=typeof a=="string"?P(a,o):a[o];u&&this.checkLValInnerPattern(u,t,n)}break;default:this.checkLValSimple(e,t,n)}};qe.checkLValInnerPattern=function(e,t,n){switch(t===void 0&&(t=zn),e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var Ke=function(t,n,r,i,s){this.token=t,this.isExpr=!!n,this.preserveSpace=!!r,this.override=i,this.generator=!!s};Me(Ke);var le=A({b_stat:new Ke("{",!1),b_expr:new Ke("{",!0),b_tmpl:new Ke("${",!1),p_stat:new Ke("(",!1),p_expr:new Ke("(",!0),q_tmpl:new Ke("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Ke("function",!1),f_expr:new Ke("function",!0),f_expr_gen:new Ke("function",!0,!1,null,!0),f_gen:new Ke("function",!1,!1,null,!0)}),Wt=me.prototype;Wt.initialContext=function(){return G(le.b_stat)};Wt.curContext=function(){return typeof this.context=="string"?P(this.context,this.context.length-1):this.context[this.context.length-1]};Wt.braceIsBlock=function(e){var t=this.curContext();return t===le.f_expr||t===le.f_stat?!0:e===f.colon&&(t===le.b_stat||t===le.b_expr)?!t.isExpr:e===f._return||e===f.name&&this.exprAllowed?se(Ie,q(this.input,this.lastTokEnd,this.start)):e===f._else||e===f.semi||e===f.eof||e===f.parenR||e===f.arrow?!0:e===f.braceL?t===le.b_stat:e===f._var||e===f._const||e===f.name?!1:!this.exprAllowed};Wt.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=typeof this.context=="string"?P(this.context,e):this.context[e];if(t.token==="function")return t.generator}return!1};Wt.updateContext=function(e){var t,n=this.type;n.keyword&&e===f.dot?this.exprAllowed=!1:(t=n.updateContext)?Tt(t,this,e):this.exprAllowed=n.beforeExpr};Wt.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};f.parenR.updateContext=f.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=Ce(this.context);e===le.b_stat&&this.curContext().token==="function"&&(e=Ce(this.context)),this.exprAllowed=!e.isExpr};f.braceL.updateContext=function(e){U(this.context,this.braceIsBlock(e)?le.b_stat:le.b_expr),this.exprAllowed=!0};f.dollarBraceL.updateContext=function(){U(this.context,le.b_tmpl),this.exprAllowed=!0};f.parenL.updateContext=function(e){var t=e===f._if||e===f._for||e===f._with||e===f._while;U(this.context,t?le.p_stat:le.p_expr),this.exprAllowed=!0};f.incDec.updateContext=function(){};f._function.updateContext=f._class.updateContext=function(e){e.beforeExpr&&e!==f._else&&!(e===f.semi&&this.curContext()!==le.p_stat)&&!(e===f._return&&se(Ie,q(this.input,this.lastTokEnd,this.start)))&&!((e===f.colon||e===f.braceL)&&this.curContext()===le.b_stat)?U(this.context,le.f_expr):U(this.context,le.f_stat),this.exprAllowed=!1};f.colon.updateContext=function(){this.curContext().token==="function"&&Ce(this.context),this.exprAllowed=!0};f.backQuote.updateContext=function(){this.curContext()===le.q_tmpl?Ce(this.context):U(this.context,le.q_tmpl),this.exprAllowed=!1};f.star.updateContext=function(e){if(e===f._function){var t=this.context.length-1;(typeof this.context=="string"?P(this.context,t):this.context[t])===le.f_expr?this.context[t]=le.f_expr_gen:this.context[t]=le.f_gen}this.exprAllowed=!0};f.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==f.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var K=me.prototype;K.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r=e.key,i;switch(r.type){case"Identifier":i=r.name;break;case"Literal":i=Pr(r.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6){i==="__proto__"&&s==="init"&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=r.start):this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),t.proto=!0);return}i="$"+i;var o=typeof t=="string"?P(t,i):t[i];if(o){var a;s==="init"?a=this.strict&&o.init||o.get||o.set:a=o.init||(typeof o=="string"?P(o,s):o[s]),a&&this.raiseRecoverable(r.start,"Redefinition of property")}else o=t[i]=A({init:!1,get:!1,set:!1});o[s]=!0}};K.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===f.comma){var s=this.startNodeAt(n,r);for(s.expressions=G(i);this.eat(f.comma);)U(s.expressions,this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return i};K.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,s=-1,o=-1;t?(i=t.parenthesizedAssign,s=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new yn,r=!0);var a=this.start,u=this.startLoc;(this.type===f.parenL||this.type===f.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var c=this.parseMaybeConditional(e,t);if(n&&(c=Tt(n,this,c,a,u)),this.type.isAssign){var l=this.startNodeAt(a,u);return l.operator=this.value,this.type===f.eq&&(c=this.toAssignable(c,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=c.start&&(t.shorthandAssign=-1),this.type===f.eq?this.checkLValPattern(c):this.checkLValSimple(c),l.left=c,this.next(),l.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(l,"AssignmentExpression")}else r&&this.checkExpressionErrors(t,!0);return i>-1&&(t.parenthesizedAssign=i),s>-1&&(t.trailingComma=s),c};K.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(f.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(f.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i};K.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&i.type==="ArrowFunctionExpression"?i:this.parseExprOp(i,n,r,-1,e)};K.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(s!=null&&(!i||this.type!==f._in)&&s>r){var o=this.type===f.logicalOR||this.type===f.logicalAND,a=this.type===f.coalesce;a&&(s=f.logicalAND.binop);var u=this.value;this.next();var c=this.start,l=this.startLoc,p=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),c,l,s,i),h=this.buildBinary(t,n,e,p,u,o||a);return(o&&this.type===f.coalesce||a&&(this.type===f.logicalOR||this.type===f.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(h,t,n,r,i)}return e};K.buildBinary=function(e,t,n,r,i,s){r.type==="PrivateIdentifier"&&this.raise(r.start,"Private identifier can only be left side of binary expression");var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")};K.parseMaybeUnary=function(e,t,n,r){var i=this.start,s=this.startLoc,o;if(this.isContextual("await")&&this.canAwait)o=this.parseAwait(r),t=!0;else if(this.type.prefix){var a=this.startNode(),u=this.type===f.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,u,r),this.checkExpressionErrors(e,!0),u?this.checkLValSimple(a.argument):this.strict&&a.operator==="delete"&&vs(a.argument)?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):a.operator==="delete"&&Br(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):t=!0,o=this.finishNode(a,u?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===f.privateId)(r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==f._in&&this.unexpected();else{if(o=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(i,s);c.operator=this.value,c.prefix=!1,c.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(c,"UpdateExpression")}}if(!n&&this.eat(f.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,s,o,this.parseMaybeUnary(null,!1,!1,r),"**",!1);else return o};function vs(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&vs(e.expression)}function Br(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Br(e.expression)||e.type==="ParenthesizedExpression"&&Br(e.expression)}K.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if(i.type==="ArrowFunctionExpression"&&q(this.input,this.lastTokStart,this.lastTokEnd)!==")")return i;var s=this.parseSubscripts(i,n,r,!1,t);return e&&s.type==="MemberExpression"&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1),e.trailingComma>=s.start&&(e.trailingComma=-1)),s};K.parseSubscripts=function(e,t,n,r,i){for(var s=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,o=!1;;){var a=this.parseSubscript(e,t,n,r,s,o,i);if(a.optional&&(o=!0),a===e||a.type==="ArrowFunctionExpression"){if(o){var u=this.startNodeAt(t,n);u.expression=a,a=this.finishNode(u,"ChainExpression")}return a}e=a}};K.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(f.arrow)};K.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)};K.parseSubscript=function(e,t,n,r,i,s,o){var a=this.options.ecmaVersion>=11,u=a&&this.eat(f.questionDot);r&&u&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(f.bracketL);if(c||u&&this.type!==f.parenL&&this.type!==f.backQuote||this.eat(f.dot)){var l=this.startNodeAt(t,n);l.object=e,c?(l.property=this.parseExpression(),this.expect(f.bracketR)):this.type===f.privateId&&e.type!=="Super"?l.property=this.parsePrivateIdent():l.property=this.parseIdent(this.options.allowReserved!=="never"),l.computed=!!c,a&&(l.optional=u),e=this.finishNode(l,"MemberExpression")}else if(!r&&this.eat(f.parenL)){var p=new yn,h=this.yieldPos,m=this.awaitPos,d=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var y=this.parseExprList(f.parenR,this.options.ecmaVersion>=8,!1,p);if(i&&!u&&this.shouldParseAsyncArrow())return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=h,this.awaitPos=m,this.awaitIdentPos=d,this.parseSubscriptAsyncArrow(t,n,y,o);this.checkExpressionErrors(p,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=m||this.awaitPos,this.awaitIdentPos=d||this.awaitIdentPos;var x=this.startNodeAt(t,n);x.callee=e,x.arguments=y,a&&(x.optional=u),e=this.finishNode(x,"CallExpression")}else if(this.type===f.backQuote){(u||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var w=this.startNodeAt(t,n);w.tag=e,w.quasi=this.parseTemplate(A({isTagged:!0})),e=this.finishNode(w,"TaggedTemplateExpression")}return e};K.parseExprAtom=function(e,t,n){this.type===f.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case f._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type===f.parenL&&!this.allowDirectSuper&&this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==f.dot&&this.type!==f.bracketL&&this.type!==f.parenL&&this.unexpected(),this.finishNode(r,"Super");case f._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case f.name:var s=this.start,o=this.startLoc,a=this.containsEsc,u=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!a&&u.name==="async"&&!this.canInsertSemicolon()&&this.eat(f._function))return this.overrideContext(le.f_expr),this.parseFunction(this.startNodeAt(s,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(f.arrow))return this.parseArrowExpression(this.startNodeAt(s,o),G(u),!1,t);if(this.options.ecmaVersion>=8&&u.name==="async"&&this.type===f.name&&!a&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return u=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(f.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,o),G(u),!0,t)}return u;case f.regexp:var c=this.value;return r=this.parseLiteral(c.value),r.regex=A({pattern:c.pattern,flags:c.flags}),r;case f.num:case f.string:return this.parseLiteral(this.value);case f._null:case f._true:case f._false:return r=this.startNode(),r.value=this.type===f._null?null:this.type===f._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case f.parenL:var l=this.start,p=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(p)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),p;case f.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(f.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case f.braceL:return this.overrideContext(le.b_expr),this.parseObj(!1,e);case f._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case f._class:return this.parseClass(this.startNode(),!1);case f._new:return this.parseNew();case f.backQuote:return this.parseTemplate();case f._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}};K.parseExprAtomDefault=function(){this.unexpected()};K.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===f.parenL&&!e)return this.parseDynamicImport(t);if(this.type===f.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};K.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(f.parenR)?e.options=null:(this.expect(f.comma),this.afterTrailingComma(f.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(f.parenR)||(this.expect(f.comma),this.afterTrailingComma(f.parenR)||this.unexpected())));else if(!this.eat(f.parenR)){var t=this.start;this.eat(f.comma)&&this.eat(f.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};K.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};K.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=q(this.input,this.start,this.end),V(t.raw,t.raw.length-1)===110&&(t.bigint=t.value!=null?ns(t.value):Ft(q(t.raw,0,-1),xe(/_/g),"")),this.next(),this.finishNode(t,"Literal")};K.parseParenExpression=function(){this.expect(f.parenL);var e=this.parseExpression();return this.expect(f.parenR),e};K.shouldParseArrow=function(e){return!this.canInsertSemicolon()};K.parseParenAndDistinguishExpression=function(e,t){var n=this.start,r=this.startLoc,i,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,a=this.startLoc,u=G(),c=!0,l=!1,p=new yn,h=this.yieldPos,m=this.awaitPos,d;for(this.yieldPos=0,this.awaitPos=0;this.type!==f.parenR;)if(c?c=!1:this.expect(f.comma),s&&this.afterTrailingComma(f.parenR,!0)){l=!0;break}else if(this.type===f.ellipsis){d=this.start,U(u,this.parseParenItem(this.parseRestBinding())),this.type===f.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else U(u,this.parseMaybeAssign(!1,p,this.parseParenItem));var y=this.lastTokEnd,x=this.lastTokEndLoc;if(this.expect(f.parenR),e&&this.shouldParseArrow(u)&&this.eat(f.arrow))return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=h,this.awaitPos=m,this.parseParenArrowList(n,r,u,t);(!u.length||l)&&this.unexpected(this.lastTokStart),d&&this.unexpected(d),this.checkExpressionErrors(p,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=m||this.awaitPos,u.length>1?(i=this.startNodeAt(o,a),i.expressions=u,this.finishNodeAt(i,"SequenceExpression",y,x)):i=typeof u=="string"?P(u,0):u[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var w=this.startNodeAt(n,r);return w.expression=i,this.finishNode(w,"ParenthesizedExpression")}else return i};K.parseParenItem=function(e){return e};K.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Ua=G();K.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===f.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(f.parenL)?e.arguments=this.parseExprList(f.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Ua,this.finishNode(e,"NewExpression")};K.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===f.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value=A({raw:Ft(this.value,xe(/\r\n?/g),`
|
|
5
|
+
`),cooked:null})):n.value=A({raw:Ft(q(this.input,this.start,this.end),xe(/\r\n?/g),`
|
|
6
|
+
`),cooked:this.value}),this.next(),n.tail=this.type===f.backQuote,this.finishNode(n,"TemplateElement")};K.parseTemplate=function(e){e===void 0&&(e=A({}));var t=e.isTagged;t===void 0&&(t=!1);var n=this.startNode();this.next(),n.expressions=G();var r=this.parseTemplateElement(A({isTagged:t}));for(n.quasis=G(r);!r.tail;)this.type===f.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(f.dollarBraceL),U(n.expressions,this.parseExpression()),this.expect(f.braceR),U(n.quasis,r=this.parseTemplateElement(A({isTagged:t})));return this.next(),this.finishNode(n,"TemplateLiteral")};K.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===f.name||this.type===f.num||this.type===f.string||this.type===f.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===f.star)&&!se(Ie,q(this.input,this.lastTokEnd,this.start))};K.parseObj=function(e,t){var n=this.startNode(),r=!0,i=A({});for(n.properties=G(),this.next();!this.eat(f.braceR);){if(r)r=!1;else if(this.expect(f.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(f.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,i,t),U(n.properties,s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")};K.parseProperty=function(e,t){var n=this.startNode(),r,i,s,o;if(this.options.ecmaVersion>=9&&this.eat(f.ellipsis))return e?(n.argument=this.parseIdent(!1),this.type===f.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(n,"RestElement")):(n.argument=this.parseMaybeAssign(!1,t),this.type===f.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(n,"SpreadElement"));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(e||t)&&(s=this.start,o=this.startLoc),e||(r=this.eat(f.star)));var a=this.containsEsc;return this.parsePropertyName(n),!e&&!a&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n)?(i=!0,r=this.options.ecmaVersion>=9&&this.eat(f.star),this.parsePropertyName(n)):i=!1,this.parsePropertyValue(n,e,r,i,s,o,t,a),this.finishNode(n,"Property")};K.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind==="get"?0:1;if(e.value.params.length!==n){var r=e.value.start;e.kind==="get"?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else e.kind==="set"&&(typeof e.value.params=="string"?P(e.value.params,0):e.value.params[0]).type==="RestElement"&&this.raiseRecoverable((typeof e.value.params=="string"?P(e.value.params,0):e.value.params[0]).start,"Setter cannot use rest params")};K.parsePropertyValue=function(e,t,n,r,i,s,o,a){(n||r)&&this.type===f.colon&&this.unexpected(),this.eat(f.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===f.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"):!t&&!a&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==f.comma&&this.type!==f.braceR&&this.type!==f.eq?((n||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key)):this.type===f.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};K.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(f.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(f.bracketR),e.key;e.computed=!1}return e.key=this.type===f.num||this.type===f.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};K.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};K.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Gr(t,r.generator)|Hn|(n?ms:0)),this.expect(f.parenL),r.params=this.parseBindingList(f.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(r,"FunctionExpression")};K.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(Gr(n,!1)|Mr),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")};K.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==f.braceL,s=this.strict,o=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!s||a)&&(o=this.strictDirective(this.end),o&&a&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var u=this.labels;this.labels=G(),o&&(this.strict=!0),this.checkParams(e,!s&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,bs),e.body=this.parseBlock(!1,void 0,o&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=u}this.exitScope()};K.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){var r=typeof n=="string"?P(n,t):n[t];if(r.type!=="Identifier")return!1}return!0};K.checkParams=function(e,t){for(var n=bt(null),r=0,i=e.params;r<i.length;r+=1){var s=typeof i=="string"?P(i,r):i[r];this.checkLValInnerPattern(s,Ur,t?null:n)}};K.parseExprList=function(e,t,n,r){for(var i=G(),s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(f.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===f.comma?o=null:this.type===f.ellipsis?(o=this.parseSpread(r),r&&this.type===f.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),U(i,o)}return i};K.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;if(this.inGenerator&&r==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&r==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&Qn)&&r==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(r==="arguments"||r==="await")&&this.raise(t,"Cannot use "+r+" in class static initialization block"),se(this.keywords,r)&&this.raise(t,"Unexpected keyword '"+r+"'"),!(this.options.ecmaVersion<6&&he(q(this.input,t,n),"\\")!==-1)){var i=this.strict?this.reservedWordsStrict:this.reservedWords;se(i,r)&&(!this.inAsync&&r==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))}};K.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t};K.parseIdentNode=function(){var e=this.startNode();return this.type===f.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||V(this.input,this.lastTokStart)!==46)&&Ce(this.context),this.type=f.name):this.unexpected(),e};K.parsePrivateIdent=function(){var e=this.startNode();return this.type===f.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):U((typeof this.privateNameStack=="string"?P(this.privateNameStack,this.privateNameStack.length-1):this.privateNameStack[this.privateNameStack.length-1]).used,e)),e};K.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===f.semi||this.canInsertSemicolon()||this.type!==f.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(f.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")};K.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var qn=me.prototype;qn.raise=function(e,t){var n=fs(this.input,e);t+=" ("+n.line+":"+n.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var r=new Ki(t);throw Mn(r,"pos",e),Mn(r,"loc",n),Mn(r,"raisedAt",this.pos),r};qn.raiseRecoverable=qn.raise;qn.curPosition=function(){if(this.options.locations)return new Ut(this.curLine,this.pos-this.lineStart)};var kt=me.prototype,ks=function(t){this.flags=t,this.var=G(),this.lexical=G(),this.functions=G()};Me(ks);kt.enterScope=function(e){U(this.scopeStack,new ks(e))};kt.exitScope=function(){Ce(this.scopeStack)};kt.treatFunctionsAsVarInScope=function(e){return e.flags&Dt||!this.inModule&&e.flags&Nt};kt.declareName=function(e,t,n){var r=!1;if(t===pt){var i=this.currentScope();r=he(i.lexical,e)>-1||he(i.functions,e)>-1||he(i.var,e)>-1,U(i.lexical,e),this.inModule&&i.flags&Nt&&delete this.undefinedExports[e]}else if(t===xs){var s=this.currentScope();U(s.lexical,e)}else if(t===gs){var o=this.currentScope();this.treatFunctionsAsVar?r=he(o.lexical,e)>-1:r=he(o.lexical,e)>-1||he(o.var,e)>-1,U(o.functions,e)}else for(var a=this.scopeStack.length-1;a>=0;--a){var u=typeof this.scopeStack=="string"?P(this.scopeStack,a):this.scopeStack[a];if(he(u.lexical,e)>-1&&!(u.flags&ds&&(typeof u.lexical=="string"?P(u.lexical,0):u.lexical[0])===e)||!this.treatFunctionsAsVarInScope(u)&&he(u.functions,e)>-1){r=!0;break}if(U(u.var,e),this.inModule&&u.flags&Nt&&delete this.undefinedExports[e],u.flags&Qn)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")};kt.checkLocalExport=function(e){he((typeof this.scopeStack=="string"?P(this.scopeStack,0):this.scopeStack[0]).lexical,e.name)===-1&&he((typeof this.scopeStack=="string"?P(this.scopeStack,0):this.scopeStack[0]).var,e.name)===-1&&(this.undefinedExports[e.name]=e)};kt.currentScope=function(){return typeof this.scopeStack=="string"?P(this.scopeStack,this.scopeStack.length-1):this.scopeStack[this.scopeStack.length-1]};kt.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=typeof this.scopeStack=="string"?P(this.scopeStack,e):this.scopeStack[e];if(t.flags&(Qn|mn|Lt))return t}};kt.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=typeof this.scopeStack=="string"?P(this.scopeStack,e):this.scopeStack[e];if(t.flags&(Qn|mn|Lt)&&!(t.flags&Mr))return t}};var gn=function(t,n,r){this.type="",this.start=n,this.end=0,t.options.locations&&(this.loc=new dn(t,r)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=G(n,0))};Me(gn);var xn=me.prototype;xn.startNode=function(){return new gn(this,this.start,this.startLoc)};xn.startNodeAt=function(e,t){return new gn(this,e,t)};function Ss(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}xn.finishNode=function(e,t){return Tt(Ss,this,e,t,this.lastTokEnd,this.lastTokEndLoc)};xn.finishNodeAt=function(e,t,n,r){return Tt(Ss,this,e,t,n,r)};xn.copyNode=function(e){var t=new gn(this,e.start,this.startLoc);for(var n in Bn(e))t[n]=typeof e=="string"?P(e,n):e[n];return t};var Ka="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",Es="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",$s=Es+" Extended_Pictographic",Cs=$s,Ps=Cs+" EBase EComp EMod EPres ExtPict",Is=Ps,za=Is,Nr=A({9:Es,10:$s,11:Cs,12:Ps,13:Is,14:za}),Wa="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Dr=A({9:"",10:"",11:"",12:"",13:"",14:Wa}),ss="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",As="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Os=As+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",_s=Os+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Fs=_s+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Ts=Fs+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",qa=Ts+" "+Ka,Lr=A({9:As,10:Os,11:_s,12:Fs,13:Ts,14:qa}),Kn=A({});function Ha(e){var t=Kn[e]=A({binary:wt((typeof Nr=="string"?P(Nr,e):Nr[e])+" "+ss),binaryOfStrings:wt(typeof Dr=="string"?P(Dr,e):Dr[e]),nonBinary:A({General_Category:wt(ss),Script:wt(typeof Lr=="string"?P(Lr,e):Lr[e])})});t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(un=0,cn=G(9,10,11,12,13,14);un<cn.length;un+=1)os=typeof cn=="string"?P(cn,un):cn[un],Ha(os);var os,un,cn,N=me.prototype,hn=function(t,n){this.parent=t,this.base=n||this};Me(hn);hn.prototype.separatedFrom=function(t){for(var n=this;n;n=n.parent)for(var r=t;r;r=r.parent)if(n.base===r.base&&n!==r)return!0;return!1};hn.prototype.sibling=function(){return new hn(this.parent,this.base)};var Je=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=typeof Kn=="string"?P(Kn,t.options.ecmaVersion>=14?14:t.options.ecmaVersion):Kn[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=bt(null),this.backReferenceNames=G(),this.branchID=null};Me(Je);Je.prototype.reset=function(t,n,r){var i=he(r,"v")!==-1,s=he(r,"u")!==-1;this.start=t|0,this.source=n+"",this.flags=r,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=s&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=s&&this.parser.options.ecmaVersion>=9)};Je.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};Je.prototype.at=function(t,n){n===void 0&&(n=!1);var r=this.source,i=r.length;if(t>=i)return-1;var s=V(r,t);if(!(n||this.switchU)||s<=55295||s>=57344||t+1>=i)return s;var o=V(r,t+1);return o>=56320&&o<=57343?(s<<10)+o-56613888:s};Je.prototype.nextIndex=function(t,n){n===void 0&&(n=!1);var r=this.source,i=r.length;if(t>=i)return i;var s=V(r,t),o;return!(n||this.switchU)||s<=55295||s>=57344||t+1>=i||(o=V(r,t+1))<56320||o>57343?t+1:t+2};Je.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};Je.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};Je.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};Je.prototype.eat=function(t,n){return n===void 0&&(n=!1),this.current(n)===t?(this.advance(n),!0):!1};Je.prototype.eatChars=function(t,n){n===void 0&&(n=!1);for(var r=this.pos,i=0,s=t;i<s.length;i+=1){var o=typeof s=="string"?P(s,i):s[i],a=this.at(r,n);if(a===-1||a!==o)return!1;r=this.nextIndex(r,n)}return this.pos=r,!0};N.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,s=0;s<n.length;s++){var o=_t(n,s);he(t,o)===-1&&this.raise(e.start,"Invalid regular expression flag"),he(n,o,s+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),o==="u"&&(r=!0),o==="v"&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,"Invalid regular expression flag")};function Qa(e){for(var t in Bn(e))return!0;return!1}N.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Qa(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))};N.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=bt(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=typeof n=="string"?P(n,t):n[t];(typeof e.groupNames=="string"?P(e.groupNames,r):e.groupNames[r])||e.raise("Invalid named capture referenced")}};N.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new hn(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};N.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););};N.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1};N.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1};N.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};N.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};N.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1};N.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};N.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};N.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var s=_t(n,i);he(n,s,i+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(r){var o=this.regexp_eatModifiers(e);!n&&!o&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var a=0;a<o.length;a++){var u=_t(o,a);(he(o,u,a+1)>-1||he(n,u)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};N.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};N.regexp_eatModifiers=function(e){for(var t="",n=0;(n=e.current())!==-1&&Ya(n);)t+=ct(n),e.advance();return t};function Ya(e){return e===105||e===109||e===115}N.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};N.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};N.regexp_eatSyntaxCharacter=function(e){var t=e.current();return Ns(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Ns(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}N.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;(n=e.current())!==-1&&!Ns(n);)e.advance();return e.pos!==t};N.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};N.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,n=typeof e.groupNames=="string"?P(e.groupNames,e.lastStringValue):e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0,i=n;r<i.length;r+=1){var s=typeof i=="string"?P(i,r):i[r];s.separatedFrom(e.branchID)||e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");t?U(n||(e.groupNames[e.lastStringValue]=G()),e.branchID):e.groupNames[e.lastStringValue]=!0}};N.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};N.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=ct(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=ct(e.lastIntValue);return!0}return!1};N.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),Za(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function Za(e){return rt(e,!0)||e===36||e===95}N.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),Xa(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function Xa(e){return vt(e,!0)||e===36||e===95||e===8204||e===8205}N.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};N.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1};N.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return U(e.backReferenceNames,e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};N.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};N.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};N.regexp_eatZero=function(e){return e.current()===48&&!Yn(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};N.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};N.regexp_eatControlLetter=function(e){var t=e.current();return Ds(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function Ds(e){return e>=65&&e<=90||e>=97&&e<=122}N.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var s=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(i-55296)*1024+(o-56320)+65536,!0}e.pos=s,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Ja(e.lastIntValue))return!0;r&&e.raise("Invalid unicode escape"),e.pos=n}return!1};function Ja(e){return e>=0&&e<=1114111}N.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};N.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var Ls=0,lt=1,ze=2;N.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(eu(t))return e.lastIntValue=-1,e.advance(),lt;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===ze&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return Ls};function eu(e){return e===100||e===68||e===115||e===83||e===119||e===87}N.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),lt}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return Ls};N.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){zt(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),se(typeof e.unicodeProperties.nonBinary=="string"?P(e.unicodeProperties.nonBinary,t):e.unicodeProperties.nonBinary[t],n)||e.raise("Invalid property value")};N.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(se(e.unicodeProperties.binary,t))return lt;if(e.switchV&&se(e.unicodeProperties.binaryOfStrings,t))return ze;e.raise("Invalid property name")};N.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Rs(t=e.current());)e.lastStringValue+=ct(t),e.advance();return e.lastStringValue!==""};function Rs(e){return Ds(e)||e===95}N.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";tu(t=e.current());)e.lastStringValue+=ct(t),e.advance();return e.lastStringValue!==""};function tu(e){return Rs(e)||Yn(e)}N.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};N.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&n===ze&&e.raise("Negated character class may contain strings"),!0}return!1};N.regexp_classContents=function(e){return e.current()===93?lt:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),lt)};N.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;e.switchU&&(t===-1||n===-1)&&e.raise("Invalid character class"),t!==-1&&n!==-1&&t>n&&e.raise("Range out of order in character class")}}};N.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(n===99||Vs(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return r!==93?(e.lastIntValue=r,e.advance(),!0):!1};N.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};N.regexp_classSetExpression=function(e){var t=lt,n;if(!this.regexp_eatClassSetRange(e))if(n=this.regexp_eatClassSetOperand(e)){n===ze&&(t=ze);for(var r=e.pos;e.eatChars(G(38,38));){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){n!==ze&&(t=lt);continue}e.raise("Invalid character in character class")}if(r!==e.pos)return t;for(;e.eatChars(G(45,45));)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e),!n)return t;n===ze&&(t=ze)}};N.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return n!==-1&&r!==-1&&n>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};N.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?lt:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};N.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===ze&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null};N.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars(G(92,113))){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null};N.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===ze&&(t=ze);return t};N.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?lt:ze};N.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var n=e.current();return n<0||n===e.lookahead()&&nu(n)||ru(n)?!1:(e.advance(),e.lastIntValue=n,!0)};function nu(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function ru(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}N.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return iu(t)?(e.lastIntValue=t,e.advance(),!0):!1};function iu(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}N.regexp_eatClassControlLetter=function(e){var t=e.current();return Yn(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};N.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};N.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Yn(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function Yn(e){return e>=48&&e<=57}N.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;js(n=e.current());)e.lastIntValue=16*e.lastIntValue+Bs(n),e.advance();return e.pos!==t};function js(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Bs(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}N.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+n*8+e.lastIntValue:e.lastIntValue=t*8+n}else e.lastIntValue=t;return!0}return!1};N.regexp_eatOctalDigit=function(e){var t=e.current();return Vs(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function Vs(e){return e>=48&&e<=55}N.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!js(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+Bs(i),e.advance()}return!0};var Zn=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new dn(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=G(t.start,t.end))};Me(Zn);var Q=me.prototype;Q.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Zn(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};Q.getToken=function(){return this.next(),new Zn(this)};typeof Wi<"u"&&(Q[Ui]=function(){var e=this;return A({next:function(){var t=e.getToken();return A({done:t.type===f.eof,value:t})}})});Q.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(f.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};Q.readToken=function(e){return rt(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};Q.fullCharCodeAt=function(e){var t=V(this.input,e);if(t<=55295||t>=56320)return t;var n=V(this.input,e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888};Q.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};Q.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=he(this.input,"*/",this.pos+=2);if(n===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=ls(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,q(this.input,t+2,n),t,this.pos,e,this.curPosition())};Q.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=V(this.input,this.pos+=e);this.pos<this.input.length&&!Kt(r);)r=V(this.input,++this.pos);this.options.onComment&&this.options.onComment(!1,q(this.input,t+e,this.pos),t,this.pos,n,this.curPosition())};Q.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=V(this.input,this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:V(this.input,this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(V(this.input,this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&se(ps,nt(e)))++this.pos;else break e}}};Q.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)};Q.readToken_dot=function(){var e=V(this.input,this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=V(this.input,this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(f.ellipsis)):(++this.pos,this.finishToken(f.dot))};Q.readToken_slash=function(){var e=V(this.input,this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(f.assign,2):this.finishOp(f.slash,1)};Q.readToken_mult_modulo_exp=function(e){var t=V(this.input,this.pos+1),n=1,r=e===42?f.star:f.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++n,r=f.starstar,t=V(this.input,this.pos+2)),t===61?this.finishOp(f.assign,n+1):this.finishOp(r,n)};Q.readToken_pipe_amp=function(e){var t=V(this.input,this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var n=V(this.input,this.pos+2);if(n===61)return this.finishOp(f.assign,3)}return this.finishOp(e===124?f.logicalOR:f.logicalAND,2)}return t===61?this.finishOp(f.assign,2):this.finishOp(e===124?f.bitwiseOR:f.bitwiseAND,1)};Q.readToken_caret=function(){var e=V(this.input,this.pos+1);return e===61?this.finishOp(f.assign,2):this.finishOp(f.bitwiseXOR,1)};Q.readToken_plus_min=function(e){var t=V(this.input,this.pos+1);return t===e?t===45&&!this.inModule&&V(this.input,this.pos+2)===62&&(this.lastTokEnd===0||se(Ie,q(this.input,this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(f.incDec,2):t===61?this.finishOp(f.assign,2):this.finishOp(f.plusMin,1)};Q.readToken_lt_gt=function(e){var t=V(this.input,this.pos+1),n=1;return t===e?(n=e===62&&V(this.input,this.pos+2)===62?3:2,V(this.input,this.pos+n)===61?this.finishOp(f.assign,n+1):this.finishOp(f.bitShift,n)):t===33&&e===60&&!this.inModule&&V(this.input,this.pos+2)===45&&V(this.input,this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(n=2),this.finishOp(f.relational,n))};Q.readToken_eq_excl=function(e){var t=V(this.input,this.pos+1);return t===61?this.finishOp(f.equality,V(this.input,this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(f.arrow)):this.finishOp(e===61?f.eq:f.prefix,1)};Q.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=V(this.input,this.pos+1);if(t===46){var n=V(this.input,this.pos+2);if(n<48||n>57)return this.finishOp(f.questionDot,2)}if(t===63){if(e>=12){var r=V(this.input,this.pos+2);if(r===61)return this.finishOp(f.assign,3)}return this.finishOp(f.coalesce,2)}}return this.finishOp(f.question,1)};Q.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),rt(t,!0)||t===92))return this.finishToken(f.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+ct(t)+"'")};Q.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(f.parenL);case 41:return++this.pos,this.finishToken(f.parenR);case 59:return++this.pos,this.finishToken(f.semi);case 44:return++this.pos,this.finishToken(f.comma);case 91:return++this.pos,this.finishToken(f.bracketL);case 93:return++this.pos,this.finishToken(f.bracketR);case 123:return++this.pos,this.finishToken(f.braceL);case 125:return++this.pos,this.finishToken(f.braceR);case 58:return++this.pos,this.finishToken(f.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(f.backQuote);case 48:var t=V(this.input,this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(f.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+ct(e)+"'")};Q.finishOp=function(e,t){var n=q(this.input,this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};Q.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=_t(this.input,this.pos);if(se(Ie,r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if(r==="[")t=!0;else if(r==="]"&&t)t=!1;else if(r==="/"&&!t)break;e=r==="\\"}++this.pos}var i=q(this.input,n,this.pos);++this.pos;var s=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(s);var a=this.regexpState||(this.regexpState=new Je(this));a.reset(n,i,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var u=null;try{u=new Ot(i,o)}catch{}return this.finishToken(f.regexp,A({pattern:i,flags:o,value:u}))};Q.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&V(this.input,this.pos)===48,s=this.pos,o=0,a=0,u=0,c=t??1/0;u<c;++u,++this.pos){var l=V(this.input,this.pos),p=void 0;if(r&&l===95){i&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),a===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),u===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),a=l;continue}if(l>=97?p=l-97+10:l>=65?p=l-65+10:l>=48&&l<=57?p=l-48:p=1/0,p>=e)break;a=l,o=o*e+p}return r&&a===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||t!=null&&this.pos-s!==t?null:o};function su(e,t){return t?jn(e,8):zi(Ft(e,xe(/_/g),""))}function Ms(e){return typeof Ar!="function"?null:Ar(Ft(e,xe(/_/g),""))}Q.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return n==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&V(this.input,this.pos)===110?(n=Ms(q(this.input,t,this.pos)),++this.pos):rt(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(f.num,n)};Q.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var n=this.pos-t>=2&&V(this.input,t)===48;n&&this.strict&&this.raise(t,"Invalid number");var r=V(this.input,this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=Ms(q(this.input,t,this.pos));return++this.pos,rt(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(f.num,i)}n&&se(xe(/[89]/),q(this.input,t,this.pos))&&(n=!1),r===46&&!n&&(++this.pos,this.readInt(10),r=V(this.input,this.pos)),(r===69||r===101)&&!n&&(r=V(this.input,++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),rt(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=su(q(this.input,t,this.pos),n);return this.finishToken(f.num,s)};Q.readCodePoint=function(){var e=V(this.input,this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;t=this.readHexChar(he(this.input,"}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(n,"Code point out of bounds")}else t=this.readHexChar(4);return t};Q.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=V(this.input,this.pos);if(r===e)break;r===92?(t+=q(this.input,n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Kt(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=q(this.input,n,this.pos++),this.finishToken(f.string,t)};var Gs=A({});Q.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Gs)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};Q.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Gs;this.raise(e,t)};Q.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=V(this.input,this.pos);if(n===96||n===36&&V(this.input,this.pos+1)===123)return this.pos===this.start&&(this.type===f.template||this.type===f.invalidTemplate)?n===36?(this.pos+=2,this.finishToken(f.dollarBraceL)):(++this.pos,this.finishToken(f.backQuote)):(e+=q(this.input,t,this.pos),this.finishToken(f.template,e));if(n===92)e+=q(this.input,t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Kt(n)){switch(e+=q(this.input,t,this.pos),++this.pos,n){case 13:V(this.input,this.pos)===10&&++this.pos;case 10:e+=`
|
|
7
|
+
`;break;default:e+=nt(n);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};Q.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(typeof this.input=="string"?P(this.input,this.pos):this.input[this.pos]){case"\\":++this.pos;break;case"$":if((typeof this.input=="string"?P(this.input,this.pos+1):this.input[this.pos+1])!=="{")break;case"`":return this.finishToken(f.invalidTemplate,q(this.input,this.start,this.pos));case"\r":(typeof this.input=="string"?P(this.input,this.pos+1):this.input[this.pos+1])===`
|
|
8
|
+
`&&++this.pos;case`
|
|
9
|
+
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};Q.readEscapedChar=function(e){var t=V(this.input,++this.pos);switch(++this.pos,t){case 110:return`
|
|
10
|
+
`;case 114:return"\r";case 120:return nt(this.readHexChar(2));case 117:return ct(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:V(this.input,this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=P(ts(Zi(this.input,this.pos-1,3),xe(/^[0-7]+/)),0),i=jn(r,8);return i>255&&(r=q(r,0,-1),i=jn(r,8)),this.pos+=r.length-1,t=V(this.input,this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),nt(i)}return Kt(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):nt(t)}};Q.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,"Bad character escape sequence"),n};Q.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(vt(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=q(this.input,n,this.pos);var s=this.pos;V(this.input,++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?rt:vt)(o,r)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=ct(o),n=this.pos}else break;t=!1}return e+q(this.input,n,this.pos)};Q.readWord=function(){var e=this.readWord1(),t=f.name;return se(this.keywords,e)&&(t=typeof pn=="string"?P(pn,e):pn[e]),this.finishToken(t,e)};var ou="8.16.0";me.acorn=A({Parser:me,version:ou,defaultOptions:ln,Position:Ut,SourceLocation:dn,getLineInfo:fs,Node:gn,TokenType:X,tokTypes:f,keywordTypes:pn,TokContext:Ke,tokContexts:le,isIdentifierChar:vt,isIdentifierStart:rt,Token:Zn,isNewLine:Kt,lineBreak:Ie,lineBreakG:Ta,nonASCIIwhitespace:ps});function ft(e,t){return me.parse(e,t)}var Ks={function:"function",async:"async function",generator:"function*",asyncGenerator:"async function*"};function zs(e){let t="";for(let n=0;n<e.length;n++)t+=n===0?e[n]:`,${e[n]}`;return t}function Ws(e,t,n){return`${Ks[e]} anonymous(${zs(t)}
|
|
11
|
+
) {
|
|
12
|
+
${n}
|
|
13
|
+
}`}function Us(e,t,n,r){let i;try{i=ft(e,r.scriptOptions)}catch(a){return r.messageOf(a)}let s=i.body[0],o=i.body.length===1&&s.type==="ExpressionStatement"?s.expression:null;return!o||o.type!=="FunctionExpression"||o.start!==1||o.end!==e.length-1||o.body.start!==t||n&&o.body.body.length!==0?n?"Arg string terminates parameters early":"Single function literal required":o}function zr(e,t,n,r){let i=`(${Ks[e]} anonymous(`,s=zs(t),o=Us(`${i}${s}
|
|
14
|
+
) {})`,`${i}${s}
|
|
15
|
+
) `.length,!0,r);if(typeof o=="string")throw new r.SyntaxError(o);let a=`${i}${s}
|
|
16
|
+
) {
|
|
17
|
+
${n}
|
|
18
|
+
})`,u=Us(a,`${i}${s}
|
|
19
|
+
) `.length,!1,r);if(typeof u=="string")throw new r.SyntaxError(u);return{node:u,text:a}}function qs(e,t){let n;try{n=ft(e,t.scriptOptions)}catch(o){throw new t.SyntaxError(t.messageOf(o))}let r=n.body,i=0;for(;i<r.length&&au(r[i]);)i++;if(i===r.length&&i>0&&i--,i!==r.length-1)return null;let s=r[i];return s.type!=="ExpressionStatement"?null:{prologueEnd:i===0?0:r[i-1].end,start:s.expression.start,end:s.expression.end}}function au(e){return e.type==="ExpressionStatement"&&typeof e.directive=="string"}function Hs(e,t){return`${e}
|
|
20
|
+
return (
|
|
21
|
+
${t}
|
|
22
|
+
);`}const k = require("./interpreter-primordials.js");var z=k.reflectApply,bn=k.reflectConstruct,g=k.reflectGet,Xn=k.reflectSet,wn=k.reflectHas,Jn=k.reflectOwnKeys,vn=k.reflectDefineProperty,Qs=k.reflectDeleteProperty;var kn=k.reflectSetPrototypeOf,qt=k.objectCreate,Ys=k.objectKeys,Ae=k.objectFreeze,Zs=k.objectAssign,De=k.objectHasOwn,qr=k.objectGetOwnPropertyNames,St=k.reflectGetPrototypeOf,ht=k.arrayIsArray;var er=k.symbolIterator,Xs=k.symbolAsyncIterator,Js=k.symbolUnscopables,te=k.stringOf,tr=k.globalObject,eo=k.registerSource,Oe=k.dataDescriptor,Hr=k.ArrayValues,to=k.ArrayIteratorPrototype,no=k.ArrayIteratorNext,Qr=k.SafeGeneratorPrototype,ro=k.SafeAsyncGeneratorPrototype,io=k.LAUNCH_PRIMORDIALS,nr=k.BigInt,R=k.Error;var dt=k.ReferenceError,so=k.RegExp,rr=k.SyntaxError,M=k.TypeError,Le=k.SafeMap,Yr=k.SafeSet,Et=k.SafeWeakMap,oo=k.SafeWeakSet,uu=k.SafeList;function Sn(e,t){if(typeof e!="function")throw new R(`interpreter: the realm has no ${t}`);return e}var ao=k.ArrayFrom,uo=k.ArrayConstructor,cu=Sn(k.ArrayPrototypeWith,"Array.prototype.with"),ir=Sn(k.ArrayPrototypeToSpliced,"Array.prototype.toSpliced"),lu=Sn(k.GeneratorPrototypeNext,"%GeneratorPrototype%.next"),pu=Sn(k.GeneratorPrototypeThrow,"%GeneratorPrototype%.throw"),fu=Sn(k.SymbolPrototypeDescription,"Symbol.prototype.description"),hu=k.StringPrototypeSlice,du=k.StringPrototypeLastIndexOf,mu=k.StringPrototypeCharCodeAt,yu=k.SymbolPrototypeToString,co=k.PromiseConstructor,gu=k.PromiseResolve,xu=k.PromiseReject,bu=k.ObjectOf,wu=k.ObjectPrototypePropertyIsEnumerable,lo=k.ObjectOf;function Ht(e){return bu(e)}function En(e,t){return z(wu,e,[t])}function po(e){return z(yu,e,[])}function fo(e){return z(fu,e,[])}function ho(e){return z(gu,co,[e])}function Qt(e){return z(xu,co,[e])}function Zr(e,t){return z(lu,e,[t])}function mo(e,t){return z(pu,e,[t])}function J(e){return _e(e,"prototype",Oe(Qr,!0,!1,!1)),e}function _e(e,t,n){if(!vn(e,t,n))throw new M(`Cannot redefine property: ${te(t)}`)}function Yt(e,t,n,r){let i=qt(null);return e==="get"?i.get=t:i.set=t,i.enumerable=n,i.configurable=r,i}var Wr=Oe(void 0,!0,!0,!0);function $t(e,t,n){Wr.value=n;let r=vn(e,t,Wr);if(Wr.value=void 0,!r)throw new M(`Cannot redefine property: ${te(t)}`)}function Fe(e,t,n){return z(hu,e,[t,n])}function sr(e,t,n){return z(du,e,[t,n])}function be(e,t){return z(mu,e,[t])}function yo(e){let t=qt(null);return t.length=e,t}function vu(e,t){return z(ao,uo,[yo(e),(n,r)=>t(r)])}function $n(e){return z(ao,uo,[yo(e)])}function ae(e,t){return vu(e.length,n=>t(e[n],n))}function it(e){return z(ir,e,[])}function st(e,t,n){return z(cu,e,[t,n])}function or(e,t){return z(ir,e,[0,t])}function Xr(e,t){return z(ir,t,[0,0,e])}function go(e,t){return z(ir,e,[e.length,0,t])}function j(){return new uu}function _(e,t){e[e.length]=t}function Te(e){return it(e)}function xo(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function Rt(e,t){for(let n=0;n<e.length;n++)if(e[n]===t)return!0;return!1}function Se(e,t){for(let n=0;n<e.length;n++)if(!t(e[n]))return!1;return!0}function mt(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return!0;return!1}function ar(e){return e===32||e>=9&&e<=13||e===160||e===65279||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288}function bo(e,t){let n=t;for(;n<e.length;){let r=be(e,n);if(ar(r))n++;else if(r===47&&be(e,n+1)===47)for(;n<e.length&&be(e,n)!==10&&be(e,n)!==13;)n++;else if(r===47&&be(e,n+1)===42){for(n+=2;n<e.length&&!(be(e,n)===42&&be(e,n+1)===47);)n++;n+=2}else return n}return n}var He=null;function Zt(e,t=null){let n=He;He=t;try{return Ee(e,"Program",Uu)}finally{He=n}}function wo(e){let t=He;He=null;try{return Ee(e,"FunctionExpression",ii)}finally{He=t}}function ee(e){throw new R(`interpreter: the parser produced ${e}`)}function ye(e){return typeof e=="string"?`a ${e}`:`a node whose type is a ${typeof e}`}function de(e){return typeof e!="object"||e===null||ht(e)?ee("a node that is not an object"):e}function b(e,t){let n=g(e,t);return typeof n=="number"?n:ee(`a ${t} that is not a number`)}function Cn(e,t){let n=g(e,t);return typeof n=="string"?n:ee(`a ${t} that is not a string`)}function ue(e,t){let n=g(e,t);return typeof n=="boolean"?n:ee(`a ${t} that is not a boolean`)}function Jr(e,t){let n=g(e,t);return n===void 0||typeof n=="string"?n:ee(`a ${t} that is not a string`)}function ku(e,t){return De(e,t)}function yt(e,t,n){return typeof t=="string"&&ku(e,t)?t:ee(`an unknown ${n}`)}var Su={script:!0,module:!0},Eu={var:!0,let:!0,const:!0,using:!0,"await using":!0},$u={init:!0,get:!0,set:!0},Cu={constructor:!0,method:!0,get:!0,set:!0},Pu={"-":!0,"+":!0,"!":!0,"~":!0,typeof:!0,void:!0,delete:!0},Iu={"++":!0,"--":!0},Au={"==":!0,"!=":!0,"===":!0,"!==":!0,"<":!0,"<=":!0,">":!0,">=":!0,"<<":!0,">>":!0,">>>":!0,"+":!0,"-":!0,"*":!0,"/":!0,"%":!0,"|":!0,"^":!0,"&":!0,in:!0,instanceof:!0,"**":!0},Ou={"=":!0,"+=":!0,"-=":!0,"*=":!0,"/=":!0,"%=":!0,"<<=":!0,">>=":!0,">>>=":!0,"|=":!0,"^=":!0,"&=":!0,"**=":!0,"||=":!0,"&&=":!0,"??=":!0},_u={"||":!0,"&&":!0,"??":!0};function O(e){let t={};kn(t,null);let n=Zs(t,e);return Ae(n),n}function pe(e,t){if(!ht(e))return ee("a list that is not an array");let n=e.length,r=j();for(let i=0;i<n;i++)_(r,t(g(e,i)));return Ae(r),r}function ie(e,t){return e==null?null:t(e)}function Ee(e,t,n){let r=de(e),i=g(r,"type");return i===t?n(r):ee(`${ye(i)} where a ${t} goes`)}function jt(e,t){switch(t){case"Identifier":return lr(e);case"MemberExpression":return si(e);case"CallExpression":return Io(e);case"Literal":return ti(e);case"ThisExpression":return fc(e);case"ArrayExpression":return dc(e);case"ObjectExpression":return mc(e);case"FunctionExpression":return ii(e);case"ArrowFunctionExpression":return gc(e);case"UnaryExpression":return xc(e);case"UpdateExpression":return bc(e);case"BinaryExpression":return wc(e);case"AssignmentExpression":return vc(e);case"LogicalExpression":return kc(e);case"ConditionalExpression":return Sc(e);case"NewExpression":return Ec(e);case"SequenceExpression":return $c(e);case"YieldExpression":return Cc(e);case"TemplateLiteral":return Oo(e);case"TaggedTemplateExpression":return Ic(e);case"ClassExpression":return Tc(e);case"MetaProperty":return Rc(e);case"AwaitExpression":return jc(e);case"ChainExpression":return Bc(e);case"ImportExpression":return Vc(e);case"ParenthesizedExpression":return Mc(e);default:return null}}function vo(e,t){switch(t){case"VariableDeclaration":return ri(e);case"FunctionDeclaration":{let n=Co(e);return n.id!==null?n:ee("a function declaration without a name")}case"ClassDeclaration":{let n=Po(e);return n.id!==null?n:ee("a class declaration without a name")}default:return null}}function ko(e,t){switch(t){case"ExpressionStatement":return Wu(e);case"BlockStatement":return ni(e);case"ReturnStatement":return Yu(e);case"IfStatement":return ec(e);case"ForStatement":return uc(e);case"ForInStatement":return cc(e);case"ForOfStatement":return lc(e);case"WhileStatement":return oc(e);case"DoWhileStatement":return ac(e);case"TryStatement":return ic(e);case"ThrowStatement":return rc(e);case"SwitchStatement":return tc(e);case"BreakStatement":return Xu(e);case"ContinueStatement":return Ju(e);case"LabeledStatement":return Zu(e);case"EmptyStatement":return qu(e);case"DebuggerStatement":return Hu(e);case"WithStatement":return Qu(e);default:return vo(e,t)}}function Fu(e,t){switch(t){case"ImportDeclaration":return Gc(e);case"ExportNamedDeclaration":return qc(e);case"ExportDefaultDeclaration":return Qc(e);case"ExportAllDeclaration":return Yc(e);default:return null}}function So(e,t){switch(t){case"Identifier":return lr(e);case"MemberExpression":return si(e);case"ObjectPattern":return Ac(e);case"ArrayPattern":return _c(e);case"RestElement":return _o(e);case"AssignmentPattern":return Fc(e);default:return null}}function H(e){let t=de(e),n=g(t,"type");return jt(t,n)??ee(`${ye(n)} where an expression goes`)}function Qe(e){let t=de(e),n=g(t,"type");return ko(t,n)??ee(`${ye(n)} where a statement goes`)}function ot(e){let t=de(e),n=g(t,"type");return So(t,n)??ee(`${ye(n)} where a pattern goes`)}function Tu(e){let t=de(e),n=g(t,"type");return ko(t,n)??Fu(t,n)??ee(`${ye(n)} where a statement goes`)}function Nu(e){let t=de(e),n=g(t,"type");return vo(t,n)??ee(`${ye(n)} where a declaration goes`)}function ei(e){let t=de(e),n=g(t,"type");return n==="SpreadElement"?Ao(t):jt(t,n)??ee(`${ye(n)} where an expression goes`)}function ur(e){let t=de(e),n=g(t,"type");return n==="PrivateIdentifier"?Ku(t):jt(t,n)??ee(`${ye(n)} where an expression goes`)}function Eo(e){let t=de(e),n=g(t,"type");return n==="Super"?hc(t):jt(t,n)??ee(`${ye(n)} where an expression goes`)}function Du(e){let t=de(e),n=g(t,"type");return n==="VariableDeclaration"?ri(t):jt(t,n)??ee(`${ye(n)} where an expression goes`)}function $o(e){let t=de(e),n=g(t,"type");return n==="VariableDeclaration"?ri(t):So(t,n)??ee(`${ye(n)} where a pattern goes`)}function Lu(e){let t=de(e),n=g(t,"type");return n==="BlockStatement"?ni(t):jt(t,n)??ee(`${ye(n)} where a function body goes`)}function Ru(e){let t=de(e),n=g(t,"type");return n==="Property"?yc(t):n==="SpreadElement"?Ao(t):ee(`${ye(n)} where a property goes`)}function ju(e){let t=de(e),n=g(t,"type");return n==="Property"?Oc(t):n==="RestElement"?_o(t):ee(`${ye(n)} where a property goes`)}function Bu(e){let t=de(e),n=g(t,"type");return n==="MethodDefinition"?Nc(t):n==="PropertyDefinition"?Dc(t):n==="StaticBlock"?Lc(t):ee(`${ye(n)} where a class element goes`)}function Vu(e){let t=de(e),n=g(t,"type");return n==="MemberExpression"?si(t):n==="CallExpression"?Io(t):ee(`${ye(n)} where an optional chain goes`)}function Pn(e){let t=de(e),n=g(t,"type");return n==="Identifier"?lr(t):n==="Literal"?ti(t):ee(`${ye(n)} where a module export name goes`)}function Mu(e){let t=de(e),n=g(t,"type");return n==="ImportSpecifier"?Uc(t):n==="ImportDefaultSpecifier"?Kc(t):n==="ImportNamespaceSpecifier"?zc(t):ee(`${ye(n)} where an import specifier goes`)}function Gu(e){let t=de(e),n=g(t,"type");return n==="FunctionDeclaration"?Co(t):n==="ClassDeclaration"?Po(t):jt(t,n)??ee(`${ye(n)} where a default export goes`)}var Re=e=>Ee(e,"Identifier",lr),cr=e=>Ee(e,"Literal",ti),In=e=>Ee(e,"BlockStatement",ni);function Uu(e){let t=b(e,"start"),n=b(e,"end"),r=pe(g(e,"body"),Tu),i=yt(Su,g(e,"sourceType"),"source type");return O({type:"Program",start:t,end:n,body:r,sourceType:i})}function lr(e){let t=b(e,"start"),n=b(e,"end"),r=Cn(e,"name"),i=be(r,0);return(i===37||i===42||i===35)&&ee(`the identifier ${r}`),O({type:"Identifier",start:t,end:n,name:r})}function Ku(e){let t=b(e,"start"),n=b(e,"end"),r=Cn(e,"name");return O({type:"PrivateIdentifier",start:t,end:n,name:r})}function ti(e){let t=b(e,"start"),n=b(e,"end"),r=g(e,"value"),i=Jr(e,"raw"),s=ie(g(e,"regex"),zu),o=Jr(e,"bigint");return o!==void 0?O({type:"Literal",start:t,end:n,value:nr(o),raw:i,bigint:o}):s!==null?O({type:"Literal",start:t,end:n,value:null,raw:i,regex:s}):r===null||typeof r=="string"||typeof r=="number"||typeof r=="boolean"?O({type:"Literal",start:t,end:n,value:r,raw:i}):ee("a literal whose value is an object")}function zu(e){let t=de(e),n=Cn(t,"pattern"),r=Cn(t,"flags");return O({pattern:n,flags:r})}function Wu(e){let t=b(e,"start"),n=b(e,"end"),r=H(g(e,"expression")),i=Jr(e,"directive");return O({type:"ExpressionStatement",start:t,end:n,expression:r,directive:i})}function ni(e){let t=b(e,"start"),n=b(e,"end"),r=pe(g(e,"body"),Qe);return O({type:"BlockStatement",start:t,end:n,body:r})}function qu(e){let t=b(e,"start"),n=b(e,"end");return O({type:"EmptyStatement",start:t,end:n})}function Hu(e){let t=b(e,"start"),n=b(e,"end");return O({type:"DebuggerStatement",start:t,end:n})}function Qu(e){let t=b(e,"start"),n=b(e,"end"),r=H(g(e,"object")),i=Qe(g(e,"body"));return O({type:"WithStatement",start:t,end:n,object:r,body:i})}function Yu(e){let t=b(e,"start"),n=b(e,"end"),r=ie(g(e,"argument"),H);return O({type:"ReturnStatement",start:t,end:n,argument:r})}function Zu(e){let t=b(e,"start"),n=b(e,"end"),r=Re(g(e,"label")),i=Qe(g(e,"body"));return O({type:"LabeledStatement",start:t,end:n,label:r,body:i})}function Xu(e){let t=b(e,"start"),n=b(e,"end"),r=ie(g(e,"label"),Re);return O({type:"BreakStatement",start:t,end:n,label:r})}function Ju(e){let t=b(e,"start"),n=b(e,"end"),r=ie(g(e,"label"),Re);return O({type:"ContinueStatement",start:t,end:n,label:r})}function ec(e){let t=b(e,"start"),n=b(e,"end"),r=H(g(e,"test")),i=Qe(g(e,"consequent")),s=ie(g(e,"alternate"),Qe);return O({type:"IfStatement",start:t,end:n,test:r,consequent:i,alternate:s})}function tc(e){let t=b(e,"start"),n=b(e,"end"),r=H(g(e,"discriminant")),i=pe(g(e,"cases"),s=>Ee(s,"SwitchCase",nc));return O({type:"SwitchStatement",start:t,end:n,discriminant:r,cases:i})}function nc(e){let t=b(e,"start"),n=b(e,"end"),r=ie(g(e,"test"),H),i=pe(g(e,"consequent"),Qe);return O({type:"SwitchCase",start:t,end:n,test:r,consequent:i})}function rc(e){let t=b(e,"start"),n=b(e,"end"),r=H(g(e,"argument"));return O({type:"ThrowStatement",start:t,end:n,argument:r})}function ic(e){let t=b(e,"start"),n=b(e,"end"),r=In(g(e,"block")),i=ie(g(e,"handler"),o=>Ee(o,"CatchClause",sc)),s=ie(g(e,"finalizer"),In);return O({type:"TryStatement",start:t,end:n,block:r,handler:i,finalizer:s})}function sc(e){let t=b(e,"start"),n=b(e,"end"),r=ie(g(e,"param"),ot),i=In(g(e,"body"));return O({type:"CatchClause",start:t,end:n,param:r,body:i})}function oc(e){let t=b(e,"start"),n=b(e,"end"),r=H(g(e,"test")),i=Qe(g(e,"body"));return O({type:"WhileStatement",start:t,end:n,test:r,body:i})}function ac(e){let t=b(e,"start"),n=b(e,"end"),r=Qe(g(e,"body")),i=H(g(e,"test"));return O({type:"DoWhileStatement",start:t,end:n,body:r,test:i})}function uc(e){let t=b(e,"start"),n=b(e,"end"),r=ie(g(e,"init"),Du),i=ie(g(e,"test"),H),s=ie(g(e,"update"),H),o=Qe(g(e,"body"));return O({type:"ForStatement",start:t,end:n,init:r,test:i,update:s,body:o})}function cc(e){let t=b(e,"start"),n=b(e,"end"),r=$o(g(e,"left")),i=H(g(e,"right")),s=Qe(g(e,"body"));return O({type:"ForInStatement",start:t,end:n,left:r,right:i,body:s})}function lc(e){let t=b(e,"start"),n=b(e,"end"),r=$o(g(e,"left")),i=H(g(e,"right")),s=Qe(g(e,"body")),o=ue(e,"await");return O({type:"ForOfStatement",start:t,end:n,left:r,right:i,body:s,await:o})}function Co(e){let t=b(e,"start"),n=b(e,"end"),r=ie(g(e,"id"),Re),i=pe(g(e,"params"),ot),s=In(g(e,"body")),o=ue(e,"generator"),a=ue(e,"expression"),u=ue(e,"async"),c=O(r===null?{type:"FunctionDeclaration",start:t,end:n,id:r,params:i,body:s,generator:o,expression:a,async:u}:{type:"FunctionDeclaration",start:t,end:n,id:r,params:i,body:s,generator:o,expression:a,async:u});return He!==null&&_(He,c),c}function ri(e){let t=b(e,"start"),n=b(e,"end"),r=pe(g(e,"declarations"),s=>Ee(s,"VariableDeclarator",pc)),i=yt(Eu,g(e,"kind"),"declaration kind");return O({type:"VariableDeclaration",start:t,end:n,declarations:r,kind:i})}function pc(e){let t=b(e,"start"),n=b(e,"end"),r=ot(g(e,"id")),i=ie(g(e,"init"),H);return O({type:"VariableDeclarator",start:t,end:n,id:r,init:i})}function Po(e){let t=b(e,"start"),n=b(e,"end"),r=ie(g(e,"id"),Re),i=ie(g(e,"superClass"),H),s=Ee(g(e,"body"),"ClassBody",Fo);return O(r===null?{type:"ClassDeclaration",start:t,end:n,id:r,superClass:i,body:s}:{type:"ClassDeclaration",start:t,end:n,id:r,superClass:i,body:s})}function fc(e){let t=b(e,"start"),n=b(e,"end");return O({type:"ThisExpression",start:t,end:n})}function hc(e){let t=b(e,"start"),n=b(e,"end");return O({type:"Super",start:t,end:n})}function dc(e){let t=b(e,"start"),n=b(e,"end"),r=pe(g(e,"elements"),i=>ie(i,ei));return O({type:"ArrayExpression",start:t,end:n,elements:r})}function mc(e){let t=b(e,"start"),n=b(e,"end"),r=pe(g(e,"properties"),Ru);return O({type:"ObjectExpression",start:t,end:n,properties:r})}function yc(e){let t=b(e,"start"),n=b(e,"end"),r=H(g(e,"key")),i=H(g(e,"value")),s=yt($u,g(e,"kind"),"property kind"),o=ue(e,"method"),a=ue(e,"shorthand"),u=ue(e,"computed");return O({type:"Property",start:t,end:n,key:r,value:i,kind:s,method:o,shorthand:a,computed:u})}function ii(e){let t=b(e,"start"),n=b(e,"end"),r=ie(g(e,"id"),Re),i=pe(g(e,"params"),ot),s=In(g(e,"body")),o=ue(e,"generator"),a=ue(e,"expression"),u=ue(e,"async"),c=O({type:"FunctionExpression",start:t,end:n,id:r,params:i,body:s,generator:o,expression:a,async:u});return He!==null&&_(He,c),c}function gc(e){let t=b(e,"start"),n=b(e,"end"),r=ie(g(e,"id"),Re),i=pe(g(e,"params"),ot),s=Lu(g(e,"body")),o=ue(e,"generator"),a=ue(e,"expression"),u=ue(e,"async"),c=O({type:"ArrowFunctionExpression",start:t,end:n,id:r,params:i,body:s,generator:o,expression:a,async:u});return He!==null&&_(He,c),c}function xc(e){let t=b(e,"start"),n=b(e,"end"),r=yt(Pu,g(e,"operator"),"unary operator"),i=ue(e,"prefix"),s=H(g(e,"argument"));return O({type:"UnaryExpression",start:t,end:n,operator:r,prefix:i,argument:s})}function bc(e){let t=b(e,"start"),n=b(e,"end"),r=yt(Iu,g(e,"operator"),"update operator"),i=ue(e,"prefix"),s=H(g(e,"argument"));return O({type:"UpdateExpression",start:t,end:n,operator:r,prefix:i,argument:s})}function wc(e){let t=b(e,"start"),n=b(e,"end"),r=yt(Au,g(e,"operator"),"binary operator"),i=ur(g(e,"left")),s=H(g(e,"right"));return O({type:"BinaryExpression",start:t,end:n,operator:r,left:i,right:s})}function vc(e){let t=b(e,"start"),n=b(e,"end"),r=yt(Ou,g(e,"operator"),"assignment operator"),i=ot(g(e,"left")),s=H(g(e,"right"));return O({type:"AssignmentExpression",start:t,end:n,operator:r,left:i,right:s})}function kc(e){let t=b(e,"start"),n=b(e,"end"),r=yt(_u,g(e,"operator"),"logical operator"),i=H(g(e,"left")),s=H(g(e,"right"));return O({type:"LogicalExpression",start:t,end:n,operator:r,left:i,right:s})}function si(e){let t=b(e,"start"),n=b(e,"end"),r=Eo(g(e,"object")),i=ur(g(e,"property")),s=ue(e,"computed"),o=ue(e,"optional");return O({type:"MemberExpression",start:t,end:n,object:r,property:i,computed:s,optional:o})}function Sc(e){let t=b(e,"start"),n=b(e,"end"),r=H(g(e,"test")),i=H(g(e,"consequent")),s=H(g(e,"alternate"));return O({type:"ConditionalExpression",start:t,end:n,test:r,consequent:i,alternate:s})}function Io(e){let t=b(e,"start"),n=b(e,"end"),r=Eo(g(e,"callee")),i=pe(g(e,"arguments"),ei),s=ue(e,"optional");return O({type:"CallExpression",start:t,end:n,callee:r,arguments:i,optional:s})}function Ec(e){let t=b(e,"start"),n=b(e,"end"),r=H(g(e,"callee")),i=pe(g(e,"arguments"),ei);return O({type:"NewExpression",start:t,end:n,callee:r,arguments:i})}function $c(e){let t=b(e,"start"),n=b(e,"end"),r=pe(g(e,"expressions"),H);return O({type:"SequenceExpression",start:t,end:n,expressions:r})}function Ao(e){let t=b(e,"start"),n=b(e,"end"),r=H(g(e,"argument"));return O({type:"SpreadElement",start:t,end:n,argument:r})}function Cc(e){let t=b(e,"start"),n=b(e,"end"),r=ie(g(e,"argument"),H),i=ue(e,"delegate");return O({type:"YieldExpression",start:t,end:n,argument:r,delegate:i})}function Oo(e){let t=b(e,"start"),n=b(e,"end"),r=pe(g(e,"quasis"),s=>Ee(s,"TemplateElement",Pc)),i=pe(g(e,"expressions"),H);return O({type:"TemplateLiteral",start:t,end:n,quasis:r,expressions:i})}function Pc(e){let t=b(e,"start"),n=b(e,"end"),r=ue(e,"tail"),i=de(g(e,"value")),s=g(i,"cooked"),o=Cn(i,"raw");return s!=null&&typeof s!="string"&&ee("a cooked template string that is not a string"),O({type:"TemplateElement",start:t,end:n,tail:r,value:O({cooked:s,raw:o})})}function Ic(e){let t=b(e,"start"),n=b(e,"end"),r=H(g(e,"tag")),i=Ee(g(e,"quasi"),"TemplateLiteral",Oo);return O({type:"TaggedTemplateExpression",start:t,end:n,tag:r,quasi:i})}function Ac(e){let t=b(e,"start"),n=b(e,"end"),r=pe(g(e,"properties"),ju);return O({type:"ObjectPattern",start:t,end:n,properties:r})}function Oc(e){let t=b(e,"start"),n=b(e,"end"),r=H(g(e,"key")),i=ot(g(e,"value")),s=g(e,"kind"),o=g(e,"method"),a=ue(e,"shorthand"),u=ue(e,"computed");return s!=="init"||o!==!1?ee("a pattern property that is a method or accessor"):O({type:"Property",start:t,end:n,key:r,value:i,kind:s,method:o,shorthand:a,computed:u})}function _c(e){let t=b(e,"start"),n=b(e,"end"),r=pe(g(e,"elements"),i=>ie(i,ot));return O({type:"ArrayPattern",start:t,end:n,elements:r})}function _o(e){let t=b(e,"start"),n=b(e,"end"),r=ot(g(e,"argument"));return O({type:"RestElement",start:t,end:n,argument:r})}function Fc(e){let t=b(e,"start"),n=b(e,"end"),r=ot(g(e,"left")),i=H(g(e,"right"));return O({type:"AssignmentPattern",start:t,end:n,left:r,right:i})}function Tc(e){let t=b(e,"start"),n=b(e,"end"),r=ie(g(e,"id"),Re),i=ie(g(e,"superClass"),H),s=Ee(g(e,"body"),"ClassBody",Fo);return O({type:"ClassExpression",start:t,end:n,id:r,superClass:i,body:s})}function Fo(e){let t=b(e,"start"),n=b(e,"end"),r=pe(g(e,"body"),Bu);return O({type:"ClassBody",start:t,end:n,body:r})}function Nc(e){let t=b(e,"start"),n=b(e,"end"),r=ur(g(e,"key")),i=Ee(g(e,"value"),"FunctionExpression",ii),s=yt(Cu,g(e,"kind"),"method kind"),o=ue(e,"computed"),a=ue(e,"static");return O({type:"MethodDefinition",start:t,end:n,key:r,value:i,kind:s,computed:o,static:a})}function Dc(e){let t=b(e,"start"),n=b(e,"end"),r=ur(g(e,"key")),i=ie(g(e,"value"),H),s=ue(e,"computed"),o=ue(e,"static");return O({type:"PropertyDefinition",start:t,end:n,key:r,value:i,computed:s,static:o})}function Lc(e){let t=b(e,"start"),n=b(e,"end"),r=pe(g(e,"body"),Qe);return O({type:"StaticBlock",start:t,end:n,body:r})}function Rc(e){let t=b(e,"start"),n=b(e,"end"),r=Re(g(e,"meta")),i=Re(g(e,"property"));return O({type:"MetaProperty",start:t,end:n,meta:r,property:i})}function jc(e){let t=b(e,"start"),n=b(e,"end"),r=H(g(e,"argument"));return O({type:"AwaitExpression",start:t,end:n,argument:r})}function Bc(e){let t=b(e,"start"),n=b(e,"end"),r=Vu(g(e,"expression"));return O({type:"ChainExpression",start:t,end:n,expression:r})}function Vc(e){let t=b(e,"start"),n=b(e,"end"),r=H(g(e,"source")),i=ie(g(e,"options"),H);return O({type:"ImportExpression",start:t,end:n,source:r,options:i})}function Mc(e){let t=b(e,"start"),n=b(e,"end"),r=H(g(e,"expression"));return O({type:"ParenthesizedExpression",start:t,end:n,expression:r})}function Gc(e){let t=b(e,"start"),n=b(e,"end"),r=pe(g(e,"specifiers"),Mu),i=cr(g(e,"source")),s=pe(g(e,"attributes"),oi);return O({type:"ImportDeclaration",start:t,end:n,specifiers:r,source:i,attributes:s})}function Uc(e){let t=b(e,"start"),n=b(e,"end"),r=g(e,"imported"),i=Pn(r),s=g(e,"local"),o=s!==r?Re(s):i.type==="Identifier"?i:ee("a string literal as an imported binding");return O({type:"ImportSpecifier",start:t,end:n,imported:i,local:o})}function Kc(e){let t=b(e,"start"),n=b(e,"end"),r=Re(g(e,"local"));return O({type:"ImportDefaultSpecifier",start:t,end:n,local:r})}function zc(e){let t=b(e,"start"),n=b(e,"end"),r=Re(g(e,"local"));return O({type:"ImportNamespaceSpecifier",start:t,end:n,local:r})}function oi(e){return Ee(e,"ImportAttribute",Wc)}function Wc(e){let t=b(e,"start"),n=b(e,"end"),r=Pn(g(e,"key")),i=cr(g(e,"value"));return O({type:"ImportAttribute",start:t,end:n,key:r,value:i})}function qc(e){let t=b(e,"start"),n=b(e,"end"),r=ie(g(e,"declaration"),Nu),i=pe(g(e,"specifiers"),a=>Ee(a,"ExportSpecifier",Hc)),s=ie(g(e,"source"),cr),o=pe(g(e,"attributes"),oi);return O({type:"ExportNamedDeclaration",start:t,end:n,declaration:r,specifiers:i,source:s,attributes:o})}function Hc(e){let t=b(e,"start"),n=b(e,"end"),r=g(e,"local"),i=Pn(r),s=g(e,"exported"),o=s===r?i:Pn(s);return O({type:"ExportSpecifier",start:t,end:n,local:i,exported:o})}function Qc(e){let t=b(e,"start"),n=b(e,"end"),r=Gu(g(e,"declaration"));return O({type:"ExportDefaultDeclaration",start:t,end:n,declaration:r})}function Yc(e){let t=b(e,"start"),n=b(e,"end"),r=cr(g(e,"source")),i=ie(g(e,"exported"),Pn),s=pe(g(e,"attributes"),oi);return O({type:"ExportAllDeclaration",start:t,end:n,source:r,exported:i,attributes:s})}var To={ecmaVersion:"latest",checkPrivateFields:!1,allowSuperOutsideMethod:!0},Zc=A({...To,sourceType:"script"}),Xc=A({...To,sourceType:"module"});function Jc(e,t,n){let r=t&&!n?'"use strict";':"";switch(e.kind){case"keyword":return e.declaration?[r,""]:[`${r}(`,")"];case"arrow":return t?["(class extends Object { constructor() { (",") } })"]:["(function () { (",") })"];case"method":{if(e.derivedConstructor)return["(class extends Object { constructor"," })"];let i=`${e.async?"async ":""}${e.generator?"*":""}m`;return t?[`(class { ${i}`," })"]:[`({ ${i}`," })"]}}}function No(e){let t=Jc(e.syntax,e.strict,e.module),n=t[0],r=`${n}${Fe(e.source,e.start,e.end)}${t[1]}`,i=j();Zt(ft(r,e.module?Xc:Zc),i);let s=n.length,o=s+(e.end-e.start);for(let a=0;a<i.length;a++){let u=i[a];if(u.start===s&&u.end===o)return{node:u,text:r,base:e.start-s}}throw new R(`interpreter: the function at ${e.start} did not parse back to itself`)}var ai="ERR_NIMBUS_INTERPRETER_UNSUPPORTED";var ge=class extends R{code=ai};var el={var:!1,let:!0,const:!0,class:!0,function:!1,param:!0,catch:!1,import:!1,callee:!1,special:!1,private:!1},ui=class{constructor(t,n,r,i){this.name=t;this.kind=n;this.scope=r;this.declEnd=i}name;kind;scope;declEnd;slot=0;captured=!1;tdz=!1},je=class{constructor(t,n,r,i){this.kind=t;this.parent=n;this.fn=r??(this instanceof et?this:Bt("scope without a function")),this.strict=i??(t==="class"||(n!==null&&n.fn===this.fn?n.strict:!1)),n!==null&&n.children!==null&&_(n.children,this)}kind;parent;bindings=new Le;children=j();materialized=!1;size=1;functions=j();fn;strict;holder(){let t=this;for(;!t.materialized;)(!t.parent||t.parent.fn!==t.fn)&&Bt("unmaterialized function scope"),t=t.parent;return t}bindingList(){let t=j();return this.bindings.forEach(n=>{_(t,n)}),t}declare(t,n,r){let i=this.bindings.get(t);if(i)return i;let s=new ui(t,n,this,r);return this.bindings.set(t,s),s}},et=class extends je{constructor(n,r,i,s,o,a){super(n,r,null,i);this.functionKind=n;this.strict=i;this.async=o;this.generator=a;this.arrow=s,this.materialized=!0}functionKind;strict;async;generator;arrow;thisBinding=null;argumentsBinding=null;newTargetBinding=null;homeBinding=null;funcBinding=null;varScope=this;derived=!1;method=!1;globalVars=j();special(n){return this.declare(n,"special",-1)}};function Bt(e){throw new R(`interpreter scope analysis: ${e}`)}function pi(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.type!=="ExpressionStatement"||typeof n.directive!="string")return!1;if(n.directive==="use strict")return!0}return!1}function gt(e,t=j()){switch(e.type){case"Identifier":_(t,e);break;case"ObjectPattern":for(let n=0;n<e.properties.length;n++){let r=e.properties[n];gt(r.type==="RestElement"?r.argument:r.value,t)}break;case"ArrayPattern":for(let n=0;n<e.elements.length;n++){let r=e.elements[n];r&>(r,t)}break;case"RestElement":gt(e.argument,t);break;case"AssignmentPattern":gt(e.left,t);break;case"MemberExpression":break}return t}function fi(e){let t=j();return tl(e,n=>{_(t,n)}),t}function pr(e){if(e.type==="AwaitExpression"||e.type==="YieldExpression")return!0;if(e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"||e.type==="FunctionDeclaration")return!1;if(e.type==="ClassExpression"||e.type==="ClassDeclaration"){if(e.superClass&&pr(e.superClass))return!0;let n=e.body.body;for(let r=0;r<n.length;r++){let i=n[r];if(i.type!=="StaticBlock"&&i.computed&&pr(i.key))return!0}return!1}let t=fi(e);for(let n=0;n<t.length;n++)if(pr(t[n]))return!0;return!1}function tl(e,t){let n=Ys(e);for(let r=0;r<n.length;r++){let i=n[r];if(i==="type"||i==="start"||i==="end"||i==="loc"||i==="range")continue;let s=g(e,i);if(ht(s))for(let o=0;o<s.length;o++){let a=s[o];Do(a)&&t(a)}else Do(s)&&t(s)}}function Do(e){return typeof e=="object"&&e!==null&&De(e,"type")&&De(e,"start")}var ci=class{refs=new Le;scopes=new Le;classes=new Le;receivers=new Le;annexB=new Le;clauseBlocks=new Le;privateRefs=new Le;moduleScope=null;scopeOf(t){return this.scopes.get(t)??Bt(`no scope for ${t.type}`)}functionScopeOf(t){let n=this.scopeOf(t);return n instanceof et?n:Bt(`${t.type} has no function scope`)}ref(t){return this.refs.get(t)??Bt(`unresolved identifier ${t.name}`)}privateRef(t){return this.privateRefs.get(t)??Bt(`unresolved private name #${t.name}`)}},Lo=["%exports","%require","%module","%filename","%dirname"];function hi(e,t){let n=new Xt,r=t.strict||t.kind==="module"||pi(e.body),i=new et(t.kind,null,r,!1,t.kind==="module",!1);if(n.analysis.scopes.set(e,i),t.kind==="module"){for(let s=0;s<Lo.length;s++){let o=Lo[s];i.special(o)}n.analysis.moduleScope=i;for(let s=0;s<e.body.length;s++){let o=e.body[s];n.declareImports(o,i)}}return n.declareLexical(e.body,i),n.hoistVars(e.body,i,!0),n.visitStatements(e.body,i),n.finish(i),n.analysis}function Ro(e){let t=new Xt;return t.visitFunction(e,null,{strict:!1,method:!1,derived:!1,ctor:!1,unbound:!0}),t.finish(t.analysis.functionScopeOf(e)),t.analysis}function jo(e,t,n,r){let i=new Xt;return i.analysis.moduleScope=r,i.finish(i.visitFunction(e,t,n)),i.analysis}function Ct(e){let t=e.children;e.children=null,e.functions=j();let n=j();e.bindings.forEach((r,i)=>{!r.captured&&r.kind!=="special"&&_(n,i)});for(let r=0;r<n.length;r++)e.bindings.delete(n[r]);if(t!==null)for(let r=0;r<t.length;r++)Ct(t[r])}function Bo(e,t){let n=new Xt,r=pi(e.body),i=new et("function",null,r,!1,!1,!1);n.analysis.scopes.set(e,i);for(let s=0;s<t.length;s++){let o=t[s];i.declare(o,"param",-1)}return n.declareLexical(e.body,i),n.hoistVars(e.body,i,!0),n.visitStatements(e.body,i),n.finish(i),n.analysis}var Xt=class{analysis=new ci;declareImports(t,n){if(t.type==="ImportDeclaration")for(let r=0;r<t.specifiers.length;r++){let i=t.specifiers[r],s=n.declare(i.local.name,"import",-1);this.analysis.refs.set(i.local,{binding:s,tdz:!1,withs:[]})}}hoistVars(t,n,r){let i=n.fn.functionKind==="script"&&n===n.fn,s=a=>{i?_(n.fn.globalVars,a.name):n.declare(a.name,"var",-1)},o=(a,u)=>{switch(a.type){case"VariableDeclaration":if(a.kind==="var")for(let c=0;c<a.declarations.length;c++){let l=gt(a.declarations[c].id);for(let p=0;p<l.length;p++)s(l[p])}return;case"FunctionDeclaration":if(u)i||n.declare(a.id.name,"function",-1);else if(!n.fn.strict&&!i){let c=n.bindings.get(a.id.name);if(!c||c.kind==="var"||c.kind==="function"){let l=n.fn.bindings.get(a.id.name);(!l||l.kind!=="param")&&n.declare(a.id.name,"var",-1)}}return;case"ExportNamedDeclaration":a.declaration&&o(a.declaration,u);return;case"ExportDefaultDeclaration":a.declaration.type==="FunctionDeclaration"&&a.declaration.id&&n.declare(a.declaration.id.name,"function",-1);return;case"BlockStatement":for(let c=0;c<a.body.length;c++){let l=a.body[c];o(l,!1)}return;case"IfStatement":o(a.consequent,!1),a.alternate&&o(a.alternate,!1);return;case"ForStatement":a.init&&a.init.type==="VariableDeclaration"&&o(a.init,!1),o(a.body,!1);return;case"ForInStatement":case"ForOfStatement":a.left.type==="VariableDeclaration"&&o(a.left,!1),o(a.body,!1);return;case"WhileStatement":case"DoWhileStatement":case"LabeledStatement":case"WithStatement":o(a.body,!1);return;case"TryStatement":o(a.block,!1),a.handler&&o(a.handler.body,!1),a.finalizer&&o(a.finalizer,!1);return;case"SwitchStatement":for(let c=0;c<a.cases.length;c++){let l=a.cases[c];for(let p=0;p<l.consequent.length;p++){let h=l.consequent[p];o(h,!1)}}return;default:return}};for(let a=0;a<t.length;a++){let u=t[a];o(u,r)}}declareLexical(t,n){let r=n===n.fn.varScope||n.kind==="body",i=n.fn.functionKind==="script"&&n===n.fn;for(let s=0;s<t.length;s++){let a=t[s];if(a.type==="ExportNamedDeclaration"&&a.declaration&&(a=a.declaration),a.type==="ExportDefaultDeclaration"){let u=a.declaration;u.type==="ClassDeclaration"?n.declare(u.id?u.id.name:"*default*","class",u.end):u.type==="FunctionDeclaration"?(u.id||n.declare("*default*","function",-1),_(n.functions,u)):n.declare("*default*","const",a.end);continue}switch(a.type){case"VariableDeclaration":if(a.kind==="using"||a.kind==="await using")throw new ge(`${a.kind} declarations`);if(a.kind!=="var")for(let u=0;u<a.declarations.length;u++){let c=a.declarations[u],l=gt(c.id);for(let p=0;p<l.length;p++)n.declare(l[p].name,a.kind,c.end)}break;case"ClassDeclaration":n.declare(a.id.name,"class",a.end);break;case"FunctionDeclaration":r||i?_(n.functions,a):(n.declare(a.id.name,"function",-1),_(n.functions,a));break;default:break}}}declarePattern(t,n,r,i=-1){let s=gt(t);for(let o=0;o<s.length;o++)r.declare(s[o].name,n,i)}resolve(t,n,r=!1){let i=t.name,s=be(i,0);if(s===37||s===42||s===35)throw new R(`interpreter: the parser produced the identifier ${i}`);this.resolveName(t,i,n,r)}resolveName(t,n,r,i){let s=j(),o=r;for(;o;){let a=o.bindings.get(n);if(!a&&n==="arguments"&&o instanceof et&&!o.arrow&&o.functionKind==="function"&&(a=o.special("arguments"),o.argumentsBinding=a),a){a.scope.fn!==r.fn&&(a.captured=!0);let u=!i&&el[a.kind]&&a.declEnd>=0&&(a.scope.fn!==r.fn||t.start<a.declEnd||a.scope.kind==="switch");u&&(a.tdz=!0),this.analysis.refs.set(t,{binding:a,tdz:u,withs:s});return}o.kind==="with"&&_(s,o),o=o.parent}this.analysis.refs.set(t,{binding:null,tdz:!1,withs:s})}receiver(t){let n=t.fn;for(;n.arrow;){let r=n.parent;r||Bt("arrow at the root"),n=r.fn}return n}useThis(t,n){let r=this.receiver(n);r.thisBinding||(r.thisBinding=r.special("%this")),r.derived&&(r.thisBinding.tdz=!0),r!==n.fn&&(r.thisBinding.captured=!0),this.analysis.receivers.set(t,r)}useHome(t,n){let r=this.receiver(n);r.homeBinding||(r.homeBinding=r.special("%home")),r!==n.fn&&(r.homeBinding.captured=!0),this.useThis(t,n)}useNewTarget(t,n){let r=this.receiver(n);r.newTargetBinding||(r.newTargetBinding=r.special("%newtarget")),r!==n.fn&&(r.newTargetBinding.captured=!0),this.analysis.receivers.set(t,r)}useSuperCall(t,n){this.useThis(t,n),this.useNewTarget(t,n);let r=this.receiver(n);r.funcBinding||(r.funcBinding=r.special("%func")),r!==n.fn&&(r.funcBinding.captured=!0)}visitStatements(t,n){for(let r=0;r<t.length;r++){let i=t[r];this.visitStatement(i,n)}}visitStatement(t,n){switch(t.type){case"ExpressionStatement":this.visitExpression(t.expression,n);return;case"BlockStatement":this.visitBlock(t,n);return;case"EmptyStatement":case"DebuggerStatement":return;case"WithStatement":{this.visitExpression(t.object,n);let r=new je("with",n,n.fn);r.materialized=!0,this.analysis.scopes.set(t,r),this.visitStatement(t.body,r);return}case"ReturnStatement":t.argument&&this.visitExpression(t.argument,n);return;case"LabeledStatement":this.visitStatement(t.body,n);return;case"BreakStatement":case"ContinueStatement":return;case"IfStatement":this.visitExpression(t.test,n),this.visitClause(t.consequent,n),t.alternate&&this.visitClause(t.alternate,n);return;case"SwitchStatement":this.visitSwitch(t,n);return;case"ThrowStatement":this.visitExpression(t.argument,n);return;case"TryStatement":this.visitBlock(t.block,n),t.handler&&this.visitCatch(t.handler,n),t.finalizer&&this.visitBlock(t.finalizer,n);return;case"WhileStatement":this.visitExpression(t.test,n),this.visitStatement(t.body,n);return;case"DoWhileStatement":this.visitStatement(t.body,n),this.visitExpression(t.test,n);return;case"ForStatement":this.visitFor(t,n);return;case"ForInStatement":case"ForOfStatement":this.visitForInOf(t,n);return;case"FunctionDeclaration":{this.visitFunction(t,n,{strict:n.strict,method:!1,derived:!1,ctor:!1,unbound:!1}),this.noteAnnexB(t,n);return}case"VariableDeclaration":this.visitVariableDeclaration(t,n);return;case"ClassDeclaration":this.visitClass(t,n);return;case"ImportDeclaration":return;case"ExportNamedDeclaration":if(t.declaration)this.visitStatement(t.declaration,n);else if(!t.source)for(let r=0;r<t.specifiers.length;r++){let i=t.specifiers[r];i.local.type==="Identifier"&&this.resolve(i.local,n)}return;case"ExportDefaultDeclaration":{let r=t.declaration;r.type==="FunctionDeclaration"?this.visitFunction(r,n,{strict:!0,method:!1,derived:!1,ctor:!1,unbound:!1}):r.type==="ClassDeclaration"?this.visitClass(r,n):this.visitExpression(r,n);return}case"ExportAllDeclaration":return}}noteAnnexB(t,n){let r=n.fn.varScope;if(n.strict||n===r||n.fn.functionKind==="script")return;let i=r.bindings.get(t.id.name);if(!(!i||i.kind!=="var")){for(let s=n.parent;s&&s!==r;s=s.parent){let o=s.bindings.get(t.id.name);if(o&&o.kind!=="var")return}this.analysis.annexB.set(t,i)}}visitVariableDeclaration(t,n){for(let r=0;r<t.declarations.length;r++){let i=t.declarations[r];this.visitPattern(i.id,n,!0),i.init&&this.visitExpression(i.init,n)}}visitClause(t,n){if(t.type!=="FunctionDeclaration"){this.visitStatement(t,n);return}let r=new je("block",n,n.fn);this.analysis.clauseBlocks.set(t,r),this.declareLexical([t],r),this.visitStatements([t],r)}visitBlock(t,n){let r=new je("block",n,n.fn);this.analysis.scopes.set(t,r),this.declareLexical(t.body,r),this.visitStatements(t.body,r)}visitSwitch(t,n){this.visitExpression(t.discriminant,n);let r=new je("switch",n,n.fn);this.analysis.scopes.set(t,r);for(let i=0;i<t.cases.length;i++){let s=t.cases[i];this.declareLexical(s.consequent,r)}for(let i=0;i<t.cases.length;i++){let s=t.cases[i];s.test&&this.visitExpression(s.test,r),this.visitStatements(s.consequent,r)}}visitCatch(t,n){let r=new je("catch",n,n.fn);this.analysis.scopes.set(t,r),t.param&&(this.declarePattern(t.param,"catch",r),this.visitPattern(t.param,r,!0)),this.visitBlock(t.body,r)}visitFor(t,n){let r=n;t.init&&t.init.type==="VariableDeclaration"&&t.init.kind!=="var"&&(r=new je("loop",n,n.fn),this.analysis.scopes.set(t,r),this.declareLexical([t.init],r)),t.init&&(t.init.type==="VariableDeclaration"?this.visitVariableDeclaration(t.init,r):this.visitExpression(t.init,r)),t.test&&this.visitExpression(t.test,r),t.update&&this.visitExpression(t.update,r),this.visitStatement(t.body,r)}visitForInOf(t,n){let r=t.left;if(r.type==="VariableDeclaration"&&r.kind!=="var"){let i=new je("loop",n,n.fn);this.analysis.scopes.set(t.right,i);for(let o=0;o<r.declarations.length;o++){let a=r.declarations[o];this.declarePattern(a.id,r.kind==="const"?"const":"let",i,t.end)}this.visitExpression(t.right,i);let s=new je("loop",n,n.fn);this.analysis.scopes.set(t,s),this.declareLexical([r],s);for(let o=0;o<r.declarations.length;o++){let a=r.declarations[o];this.visitPattern(a.id,s,!0)}this.visitStatement(t.body,s);return}if(this.visitExpression(t.right,n),r.type==="VariableDeclaration")for(let i=0;i<r.declarations.length;i++){let s=r.declarations[i];this.visitPattern(s.id,n,!0),s.init&&this.visitExpression(s.init,n)}else this.visitPattern(r,n,!1);this.visitStatement(t.body,n)}visitPattern(t,n,r){switch(t.type){case"Identifier":this.resolve(t,n,r);return;case"MemberExpression":this.visitExpression(t,n);return;case"ObjectPattern":for(let i=0;i<t.properties.length;i++){let s=t.properties[i];s.type==="RestElement"?this.visitPattern(s.argument,n,r):(s.computed&&this.visitExpression(s.key,n),this.visitPattern(s.value,n,r))}return;case"ArrayPattern":for(let i=0;i<t.elements.length;i++){let s=t.elements[i];s&&this.visitPattern(s,n,r)}return;case"RestElement":this.visitPattern(t.argument,n,r);return;case"AssignmentPattern":this.visitPattern(t.left,n,r),this.visitExpression(t.right,n);return}}visitFunction(t,n,r){let i=t.type==="ArrowFunctionExpression",s=t.body,o=r.strict||s.type==="BlockStatement"&&pi(s.body),a=new et("function",n,o,i,t.async,t.generator);a.method=r.method,a.derived=r.derived,this.analysis.scopes.set(t,a);let u=mt(t.params,p=>p.type!=="Identifier");for(let p=0;p<t.params.length;p++){let h=t.params[p];this.declarePattern(h,"param",a,u?h.end:-1)}s.type==="BlockStatement"&&(u&&(a.varScope=new je("body",a,a)),this.analysis.scopes.set(s,a.varScope),this.declareLexical(s.body,a.varScope),this.hoistVars(s.body,a.varScope,!0)),!r.unbound&&t.type==="FunctionExpression"&&t.id&&!a.bindings.has(t.id.name)&&!a.varScope.bindings.has(t.id.name)&&(a.funcBinding=a.declare(t.id.name,"callee",-1)),r.ctor&&!a.funcBinding&&(a.funcBinding=a.special("%func"));let c=a.varScope.bindings.get("arguments"),l=a.bindings.get("arguments");!i&&c&&c.kind==="var"&&!(l&&l.kind==="param")&&(a.varScope===a?a.argumentsBinding=c:a.argumentsBinding=a.special("arguments"));for(let p=0;p<t.params.length;p++){let h=t.params[p];this.visitPattern(h,a,!0)}return s.type==="BlockStatement"?this.visitStatements(s.body,a.varScope):this.visitExpression(s,a),a}visitClass(t,n){let r=new je("class",n,n.fn);this.analysis.scopes.set(t,r),t.id&&r.declare(t.id.name,"class",t.end),t.superClass&&this.visitExpression(t.superClass,r);for(let a=0;a<t.body.body.length;a++){let u=t.body.body[a];u.type!=="StaticBlock"&&u.key.type==="PrivateIdentifier"&&r.declare(`#${u.key.name}`,"private",-1)}let i=null,s=null,o=!!t.superClass;for(let a=0;a<t.body.body.length;a++){let u=t.body.body[a];if(u.type==="StaticBlock"){this.visitStaticBlock(u,r);continue}if(u.computed&&this.visitExpression(u.key,r),u.key.type==="PrivateIdentifier"&&this.resolvePrivate(u.key,r),u.type==="MethodDefinition"){this.visitMethod(u,r,o);continue}if(u.value){let c=u.static?s:i;c||(c=new et("field",r,!0,!1,!1,!1),c.method=!0,u.static?s=c:i=c),this.visitFieldValue(u,c)}}this.analysis.classes.set(t,{scope:r,instanceFields:i,staticFields:s})}visitFieldValue(t,n){t.value&&this.visitExpression(t.value,n)}visitMethod(t,n,r){let i=t.kind==="constructor";this.visitFunction(t.value,n,{strict:!0,method:!0,derived:i&&r,ctor:i,unbound:!1})}visitStaticBlock(t,n){let r=new et("static",n,!0,!1,!1,!1);r.method=!0,this.analysis.scopes.set(t,r),this.declareLexical(t.body,r),this.hoistVars(t.body,r,!0),this.visitStatements(t.body,r)}resolvePrivate(t,n){let r=`#${t.name}`,i={type:"Identifier",name:r,start:t.start,end:t.end};this.resolveName(i,r,n,!1),this.analysis.privateRefs.set(t,this.analysis.ref(i))}visitExpression(t,n){switch(t.type){case"Identifier":this.resolve(t,n);return;case"PrivateIdentifier":this.resolvePrivate(t,n);return;case"Literal":return;case"ThisExpression":this.useThis(t,n);return;case"ArrayExpression":for(let r=0;r<t.elements.length;r++){let i=t.elements[r];i&&this.visitExpression(i.type==="SpreadElement"?i.argument:i,n)}return;case"ObjectExpression":for(let r=0;r<t.properties.length;r++){let i=t.properties[r];if(i.type==="SpreadElement"){this.visitExpression(i.argument,n);continue}i.computed&&this.visitExpression(i.key,n),i.value.type==="FunctionExpression"&&(i.method||i.kind!=="init")?this.visitFunction(i.value,n,{strict:n.strict,method:!0,derived:!1,ctor:!1,unbound:!1}):this.visitExpression(i.value,n)}return;case"FunctionExpression":case"ArrowFunctionExpression":this.visitFunction(t,n,{strict:n.strict,method:!1,derived:!1,ctor:!1,unbound:!1});return;case"UnaryExpression":this.visitExpression(t.argument,n);return;case"UpdateExpression":this.visitExpression(t.argument,n);return;case"BinaryExpression":this.visitExpression(t.left,n),this.visitExpression(t.right,n);return;case"AssignmentExpression":this.visitPattern(t.left,n,!1),this.visitExpression(t.right,n);return;case"LogicalExpression":this.visitExpression(t.left,n),this.visitExpression(t.right,n);return;case"MemberExpression":if(t.object.type==="Super"&&t.computed&&pr(t.property))throw new ge("await or yield in the key of a super member");t.object.type==="Super"?this.useHome(t.object,n):this.visitExpression(t.object,n),(t.computed||t.property.type==="PrivateIdentifier")&&this.visitExpression(t.property,n);return;case"ConditionalExpression":this.visitExpression(t.test,n),this.visitExpression(t.consequent,n),this.visitExpression(t.alternate,n);return;case"CallExpression":t.callee.type==="Super"?this.useSuperCall(t.callee,n):this.visitExpression(t.callee,n);for(let r=0;r<t.arguments.length;r++){let i=t.arguments[r];this.visitExpression(i.type==="SpreadElement"?i.argument:i,n)}return;case"NewExpression":this.visitExpression(t.callee,n);for(let r=0;r<t.arguments.length;r++){let i=t.arguments[r];this.visitExpression(i.type==="SpreadElement"?i.argument:i,n)}return;case"SequenceExpression":for(let r=0;r<t.expressions.length;r++){let i=t.expressions[r];this.visitExpression(i,n)}return;case"YieldExpression":t.argument&&this.visitExpression(t.argument,n);return;case"AwaitExpression":this.visitExpression(t.argument,n);return;case"TemplateLiteral":for(let r=0;r<t.expressions.length;r++){let i=t.expressions[r];this.visitExpression(i,n)}return;case"TaggedTemplateExpression":this.visitExpression(t.tag,n);for(let r=0;r<t.quasi.expressions.length;r++){let i=t.quasi.expressions[r];this.visitExpression(i,n)}return;case"ClassExpression":this.visitClass(t,n);return;case"MetaProperty":t.meta.name==="new"&&this.useNewTarget(t,n);return;case"ChainExpression":this.visitExpression(t.expression,n);return;case"ImportExpression":this.visitExpression(t.source,n),t.options&&this.visitExpression(t.options,n);return;case"ParenthesizedExpression":this.visitExpression(t.expression,n);return}}finish(t){Vo(t)}};function Vo(e){e.size=1,li(e,e)}function li(e,t){e.bindings.forEach(r=>{r.slot=t.size++});let n=e.children;if(n===null)throw new R("interpreter scope analysis: layout of a released scope");for(let r=0;r<n.length;r++){let i=n[r];if(i instanceof et){Vo(i);continue}let s=i.kind==="with";i.bindings.forEach(o=>{o.captured&&(s=!0)}),i.materialized=s,s?(i.size=i.kind==="with"?2:1,li(i,i)):li(i,t)}}function Vt(e){let t=e[0];if(!ht(t))throw new R("interpreter: environment without a parent");return t}function dr(e,t){let n=e;for(let r=0;r<t;r++)n=Vt(n);return n}var en=[],Be=Ae(qt(null));function An(e){return new dt(`Cannot access '${e}' before initialization`)}var xi="Must call super constructor in derived class before accessing 'this' or returning from derived constructor",ce=class{constructor(t,n,r){this.kind=t;this.label=n;this.value=r}kind;label;value},mr=new ce("break",null,void 0),bi=new ce("continue",null,void 0),yr=Ae({mark:"await"}),wi=Ae({mark:"yield"}),vi=Ae({mark:"delegate"}),nl=Ae({mark:"return"}),yi;function On(e){yi=e}var xt=class{constructor(t,n,r,i,s){this.shape=t;this.name=n;this.length=r;this.strict=i;this.source=s}shape;name;length;strict;source;body=null;gen=null;expression=!1;thisSlot=0;argumentsSlot=0;newTargetSlot=0;homeSlot=0;funcSlot=0;params=null;bindParams=null;frame=[];derived=!1;implicit=!1;lazy=null},Mo,fr,Go;function ut(e,t){let n=$n(e);for(let r=0;r<t.length;r++)n[t[r]]=Be;return n}function ne(){return Mo}function Jt(e,t,n,r,i,s,o){e.lazy!==null&&e.lazy();let a=st(e.frame,0,t);e.thisSlot!==0&&(a[e.thisSlot]=e.derived?Be:r),e.argumentsSlot!==0&&(a[e.argumentsSlot]=i),e.newTargetSlot!==0&&(a[e.newTargetSlot]=s),e.homeSlot!==0&&(a[e.homeSlot]=o),e.funcSlot!==0&&(a[e.funcSlot]=n);let u=e.params;if(u!==null){let c=i.length;for(let l=0;l<u.length;l++)a[u[l]]=l<c?i[l]:void 0}else e.bindParams!==null&&e.bindParams(a,i);return a}function gi(e,t){return e.expression?t:t instanceof ce?t.value:void 0}function di(e,t){let n=e.body;if(n===null)throw new R("interpreter: a suspending body called synchronously");return gi(e,n(t))}var hr=class{initialize=null;home=void 0},Uo=new Et;function rl(e,t){Uo.set(e,t)}function ki(e,t,n){let r=St(e);if(typeof r!="function"||typeof n!="function")throw new M(`Super constructor ${te(r)} of anonymous class is not a constructor`);let i=bn(r,t,n);if(!Y(i))throw new M("Derived constructor did not produce an object");return i}function Ko(e,t){let n=Uo.get(e);n&&n.initialize&&n.initialize(t)}function Y(e){return typeof e=="object"&&e!==null||typeof e=="function"}var il={call(e,t,n,r,i,s,o){return di(e,Jt(e,t,n,r,i,s,o))},arrow(e,t,n){return di(e,Jt(e,t,void 0,void 0,n,void 0,void 0))},enter:Jt,finish:gi,construct(e,t,n,r,i,s,o){if(r.initialize&&r.initialize(i),!e.implicit)return di(e,Jt(e,t,n,i,s,o,r.home))},constructDerived(e,t,n,r,i,s){if(e.implicit){let l=ki(n,it(i),s);return r.initialize&&r.initialize(l),l}let o=Jt(e,t,n,void 0,i,s,r.home),a=e.body;if(a===null)throw new R("interpreter: a suspending constructor");let u=gi(e,a(o));if(u!==void 0)return u;let c=e.thisSlot===0?Be:o[e.thisSlot];return c===Be?void 0:c},enterGenerator(e,t,n,r,i,s){return mi.set(i,Jt(e,t,n,r,i,void 0,s)),"length"},takeFrame(e){let t=mi.get(e);if(t===void 0)throw new R("interpreter: a generator started without its frame");return mi.delete(e),t},operand(){let e=yi;return yi=void 0,e},ownKeys:Jn,hasOwn:De,global:tr,SafeGeneratorPrototype:Qr,SafeAsyncGeneratorPrototype:ro,AWAIT:yr,YIELD:wi,DELEGATE:vi,MARK:nl},mi=new Et;function zo(e){let t=e.bind(il);Mo=t.ops,fr=t.strict,Go=t.sloppy}function Ye(e,t,n,r=e.name){let i=e.strict?fr:Go,s;switch(e.shape){case"plain":s=i.plain(e,t);break;case"method":s=i.method(e,t,n);break;case"arrow":s=i.arrow(e,t);break;case"generator":s=i.generator(e,t,n);break;case"async":s=i.async(e,t,n);break;case"asyncArrow":s=i.asyncArrow(e,t);break;case"asyncGenerator":s=i.asyncGenerator(e,t,n);break;case"classBase":case"classDerived":throw new R("interpreter: classes are made by makeClass")}return qo(s,e,r)}function Wo(e,t,n,r,i){let s=e.shape==="classDerived"?fr.classDerived(e,t,n,i):fr.classBase(e,t,i);return rl(s,i),qo(s,e,r)}function qo(e,t,n){return t.length!==0&&_e(e,"length",Oe(t.length,!1,!1,!0)),(n!==""||t.shape==="method")&&_e(e,"name",Oe(n,!1,!1,!0)),eo(e,t.source),e}function Ze(e,t){let n;if(typeof e=="symbol"){let r=fo(e);n=r===void 0?"":`[${r}]`}else n=te(e);return t?`${t} ${n}`:n}var at=class{constructor(t){this.description=t}description;kind="field";values=new Et;brand=new oo;method=void 0;getter=void 0;setter=void 0;present(t){return Y(t)?this.kind==="field"?this.values.has(t):this.brand.has(t):!1}get(t){if(!this.present(t))throw new M(`Cannot read private member ${this.description} from an object whose class did not declare it`);if(this.kind==="field")return this.values.get(t);if(this.kind==="method")return this.method;if(typeof this.getter!="function")throw new M(`'${this.description}' was defined without a getter`);return z(this.getter,t,[])}set(t,n){if(!this.present(t))throw new M(`Cannot write private member ${this.description} to an object whose class did not declare it`);if(this.kind==="field"){this.values.set(t,n);return}if(this.kind==="method")throw new M(`Private method '${this.description}' is not writable`);if(typeof this.setter!="function")throw new M(`'${this.description}' was defined without a setter`);z(this.setter,t,[n])}has(t){if(!Y(t))throw new M(`Cannot use 'in' operator to search for '${this.description}' in ${te(t)}`);return this.kind==="field"?this.values.has(t):this.brand.has(t)}add(t,n){if(this.kind==="field"){if(this.values.has(t))throw new M(`Cannot initialize ${this.description} twice on the same object`);this.values.set(t,n);return}if(this.brand.has(t))throw new M(`Cannot initialize private methods of class ${this.description} twice on the same object`);this.brand.add(t)}};function tn(e){return typeof e=="function"?"function":typeof e=="object"&&e!==null?"object":typeof e=="symbol"?po(e):te(e)}function xr(e){let t=e==null?void 0:ne().get(e,er);if(typeof t!="function")throw new M(`${tn(e)} is not iterable`);return t}function Ei(e,t){return t===Hr&&ht(e)&&g(to,"next")===no}var gr=class{constructor(t,n){this.iterator=t;this.next=n}iterator;next;done=!1;step(){this.done=!0;let t=this.next;if(typeof t!="function")throw new M(`${tn(t)} is not a function`);let n=z(t,this.iterator,[]);if(!Y(n))throw new M(`Iterator result ${te(n)} is not an object`);if(g(n,"done"))return;let r=g(n,"value");return this.done=!1,r}close(){let t=this.iterator,n=g(t,"return");if(n==null)return;if(typeof n!="function")throw new M(`${tn(n)} is not a function`);let r=z(n,t,[]);if(!Y(r))throw new M(`Iterator result ${te(r)} is not an object`)}closeQuietly(){try{this.close()}catch{}}};function br(e,t){let n=z(t,e,[]);if(!Y(n))throw new M("Result of the Symbol.iterator method is not an object");return new gr(n,g(n,"next"))}function wr(e){return br(e,xr(e))}function _n(e,t){let n=xr(t);if(Ei(t,n)){for(let i=0;i<t.length;i++)_(e,t[i]);return}let r=br(t,n);for(let i=r.step();!r.done;i=r.step())_(e,i)}function Ho(e){let t=z(Hr,e,[]);if(!Y(t))throw new M("Result of the Symbol.iterator method is not an object");new gr(t,void 0).close()}var $i=J(function*(e,t){let n=g(e,"return");if(n==null)return;if(typeof n!="function")throw new M("iterator.return is not a function");let r=yield*t(z(n,e,[]));if(!Y(r))throw new M(`Iterator result ${te(r)} is not an object`)});async function Si(e,t,n){if(!Y(e))throw new M(`Iterator result ${te(e)} is not an object`);let r=!!g(e,"done"),i=g(e,"value"),s;try{s=await i}catch(o){if(!r&&n){let a=g(t,"return");if(typeof a=="function")try{z(a,t,[])}catch{}}throw o}return{value:s,done:r}}function Qo(e,t){return{next(n){try{if(typeof t!="function")throw new M("iterator.next is not a function");return Si(z(t,e,[n]),e,!0)}catch(r){return Qt(r)}},return(n){try{let r=g(e,"return");if(r==null)return ho({value:n,done:!0});if(typeof r!="function")throw new M("iterator.return is not a function");return Si(z(r,e,[n]),e,!1)}catch(r){return Qt(r)}},throw(n){try{let r=g(e,"throw");if(r==null){let i=g(e,"return");throw typeof i=="function"&&z(i,e,[]),new M("The iterator does not provide a throw method")}if(typeof r!="function")throw new M("iterator.throw is not a function");return Si(z(r,e,[n]),e,!0)}catch(r){return Qt(r)}}}}function v(e){return{s:e,g:null}}function Pt(){throw new R("interpreter: suspending code run synchronously")}function Ci(){throw new R("interpreter: suspending pattern bound synchronously")}function L(e){return{s:Pt,g:J(e)}}function T(e){if(e.g!==null)return e.g;let t=e.s;return J(function*(n){return t(n)})}var Yo=new Et;function sl(e){if(typeof e!="function")return!1;let t=Yo.get(e);if(t===void 0){try{bn(lo,[],e),t=!0}catch{t=!1}Yo.set(e,t)}return t}function Ve(e){return typeof e=="string"||typeof e=="symbol"?e:Y(e)?ne().propertyKey(e):te(e)}function Pi(e,t){let n=Te(e);for(let r=0;r<t.length;r++)Qs(n,t[r]);return n}function Ii(e){if(e==null)throw new M(`Cannot destructure '${te(e)}' as it is ${te(e)}.`)}function Fn(e,t,n){if(t==null)return;let r=Ht(t),i=Jn(r);for(let s=0;s<i.length;s++){let o=i[s];n&&Rt(n,o)||En(r,o)&&$t(e,o,g(r,o))}}function Zo(e,t,n,r){_e(e,t,Oe(n,!0,r,!0))}function vr(e,t,n,r,i){_e(e,t,Yt(n,r,i,!0))}function Xo(e,t){let n=it(e);return _e(n,"raw",Oe(Ae(it(t)),!1,!1,!1)),Ae(n)}function Mt(e,t,n,r){if(typeof e!="function")throw new M(`${r} is not a function`);return z(e,t,n)}function Ai(e,t,n){if(typeof e!="function")throw new M(`${n} is not a constructor`);try{return bn(e,t)}catch(r){throw r instanceof M&&!sl(e)?new M(`${n} is not a constructor`):r}}function ol(e){return Y(e)?"object":te(e)}function kr(e,t){return new M(`Cannot read properties of ${te(e)} (reading '${ol(t)}')`)}function Tn(e,t){if(!Y(e)||!wn(e,t))return!1;let n=g(e,Js);return!(Y(n)&&g(n,t))}function Oi(e){return typeof e=="string"||typeof e=="number"||typeof e=="symbol"?e:Ve(e)}function Sr(e){return e instanceof ce?e:void 0}function Jo(e,t,n){let r=al(n),i=n.computedKeys,s=n.privateNames,o=c=>{let l=e?e(c):c;for(let p=0;p<s.length;p++){let h=s[p],m=new at(h.description);m.kind=h.kind,l[h.slot]=m}return l};if((t===null||t.g===null)&&Se(i,c=>c.g===null)){let c=t?t.s:null,l=ae(i,p=>p.s);return{s:(p,h)=>{let m=o(p),d=c?c(m):void 0,y=j();for(let x=0;x<l.length;x++)_(y,Ve(l[x](m)));return r(m,d,h,y)},g:null}}let a=t?T(t):null,u=ae(i,T);return{s:Pt,g:J(function*(c,l){let p=o(c),h=a?yield*a(p):void 0,m=j();for(let d=0;d<u.length;d++)_(m,Ve(yield*u[d](p)));return r(p,h,l,m)})}}function _i(e,t,n,r){let i=st(e.frame,0,t);return e.thisSlot!==0&&(i[e.thisSlot]=n),e.homeSlot!==0&&(i[e.homeSlot]=r),i}function al(e){let{ctorInfo:t,writeInner:n,elements:r,instanceFi:i,staticFi:s}=e;return(o,a,u,c)=>{let l=new hr,p=Wo(t,o,a,u,l),h=g(p,"prototype");if(!Y(h))throw new R("interpreter: class without a prototype");let m=h,d=j(),y=j(),x=j(),w=j();for(let C=0;C<r.length;C++){let F=r[C];if(F.kind==="static"){_(x,{kind:"block",block:F.fi});continue}let B=F.isStatic?p:m,W;if(F.key.kind==="private"?W=F.key.private(o):F.key.kind==="static"?W=F.key.static:W=c[F.key.computed],F.kind==="method"){let oe=W instanceof at?F.accessor?`${F.accessor} ${W.description}`:W.description:Ze(W,F.accessor??void 0),ve=Ye(F.fi,o,B,oe);if(W instanceof at){F.accessor==="get"?W.getter=ve:F.accessor==="set"?W.setter=ve:W.method=ve;let Dn=F.isStatic?w:y;Rt(Dn,W)||_(Dn,W)}else F.accessor?vr(B,W,F.accessor,ve,!1):Zo(B,W,ve,!1);continue}let Ne={key:W,value:F.value,named:F.named};F.isStatic?_(x,{kind:"field",field:Ne}):_(d,Ne)}let E=(C,F,B)=>{let W;C!==null&&(B.value!==null?W=B.value(C):B.named!==null&&(W=B.named(C,B.key instanceof at?B.key.description:Ze(B.key)))),B.key instanceof at?B.key.add(F,W):$t(F,B.key,W)},$=d.length===0&&y.length===0?null:C=>{for(let B=0;B<y.length;B++)y[B].add(C,void 0);if(d.length===0)return;let F=i?_i(i,o,C,m):null;for(let B=0;B<d.length;B++)E(F,C,d[B])};l.initialize=$,l.home=m,n&&n(o,p);for(let C=0;C<w.length;C++)w[C].add(p,void 0);let S=s?_i(s,o,p,p):null;for(let C=0;C<x.length;C++){let F=x[C];if(F.kind==="block"){let B=F.block;B.body&&B.body(_i(B,o,p,p))}else E(S,p,F.field)}return p}}function Fi(e){if(typeof e.value!="string")throw new R("interpreter: module specifier");return e.value}function Nn(e){return e.type==="Identifier"?e.name:te(e.value)}var re=Ae({short:!0});function ul(e,t){let{node:n,text:r,base:i}=No(t.reparse),s=jo(n,t.outer,t.options,t.unit.moduleScope),o=s.functionScopeOf(n);new It(s,t.unit,r,i,o).compileFunctionInto(e,o,n.params,n.body),Ct(o),e.lazy=null}function cl(e,t){return()=>ul(e,t)}var tt=tr;function ea(e){return e.type==="FunctionExpression"&&!e.id||e.type==="ArrowFunctionExpression"||e.type==="ClassExpression"&&!e.id}function ta(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];if(r.type==="AssignmentPattern"||r.type==="RestElement")break;t++}return t}function ll(e,t){let n=j(),r=t.bindingList();for(let i=0;i<r.length;i++){let s=r[i];if(s.kind!=="var")continue;let o=e.bindings.get(s.name);o&&o.kind==="param"?_(n,[o.slot,s.slot]):s.name==="arguments"&&e.argumentsBinding&&_(n,[e.argumentsBinding.slot,s.slot])}return n}function na(e,t){let n=j(),r=e.bindingList();for(let i=0;i<r.length;i++){let s=r[i];s.tdz&&s.kind==="param"===t&&_(n,s.slot)}return n}function nn(e,t){let n=e.bindings.get(t);if(!n)throw new R(`interpreter: no binding ${t}`);return n.slot}var It=class{constructor(t,n,r,i,s){this.analysis=t;this.unit=n;this.text=r;this.base=i;this.scope=s}analysis;unit;text;base;scope;shape="plain";suspendCache=new Et;functionInfos=new Le;sourceOf(t,n){return Fe(this.unit.source,t+this.base,n+this.base)}textOf(t,n){return Fe(this.text,t,n)}suspends(t){if(!t||this.shape==="plain"||this.shape==="method"||this.shape==="arrow"||this.shape==="classBase"||this.shape==="classDerived")return!1;let n=this.suspendCache.get(t);if(n!==void 0)return n;let r=!1;switch(t.type){case"AwaitExpression":case"YieldExpression":r=!0;break;case"ForOfStatement":r=t.await||this.suspends(t.left)||this.suspends(t.right)||this.suspends(t.body);break;case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":r=!1;break;case"ClassExpression":case"ClassDeclaration":{r=this.suspends(t.superClass);let i=t.body.body;for(let s=0;s<i.length&&!r;s++){let o=i[s];o.type!=="StaticBlock"&&o.computed&&this.suspends(o.key)&&(r=!0)}break}default:{let i=fi(t);for(let s=0;s<i.length&&!r;s++)this.suspends(i[s])&&(r=!0)}}return this.suspendCache.set(t,r),r}enter(t){let n=this.scope;return this.scope=t,n}hops(t){let n=t.holder(),r=this.scope.holder(),i=0;for(;r!==n;){if(!r.parent)throw new R("interpreter: binding outside the scope chain");r=r.parent.holder(),i++}return i}slotReader(t,n){switch(t){case 0:return r=>r[n];case 1:return r=>Vt(r)[n];case 2:return r=>Vt(Vt(r))[n];default:return r=>dr(r,t)[n]}}envAt(t){switch(t){case 0:return n=>n;case 1:return Vt;default:return n=>dr(n,t)}}scopeEntry(t,n=!1){let r=na(t,!1),i=t.fn.functionKind==="script"&&t===t.fn,s=j(),o=this.enter(t);for(let u=0;u<t.functions.length;u++){let c=t.functions[u],l=this.functionInfo(c,c.id?c.id.name:"default"),p=c.id?t.bindings.get(c.id.name):t.bindings.get("*default*");_(s,{fi:l,slot:p?p.slot:0,global:i&&c.id?c.id.name:null})}this.scope=o;let a=u=>{for(let c=0;c<r.length;c++)u[r[c]]=Be;for(let c=0;c<s.length;c++){let l=s[c],p=Ye(l.fi,u,void 0);l.global!==null?vn(tt,l.global,Oe(p,!0,!0,!1))||Xn(tt,l.global,p):u[l.slot]=p}return u};if(t.materialized&&!n){let u=ut(t.size,[]);return c=>a(st(u,0,c))}return r.length===0&&s.length===0?null:a}functionInfo(t,n,r,i){let s=this.functionInfos.get(t);if(s)return s;let o=this.analysis.functionScopeOf(t),a=r??(t.type==="ArrowFunctionExpression"?t.async?"asyncArrow":"arrow":t.async?t.generator?"asyncGenerator":"async":t.generator?"generator":o.method?"method":"plain"),u=new xt(a,n,ta(t.params),o.strict,i??this.sourceOf(t.start,t.end));this.functionInfos.set(t,u);let c=o.parent;if(c===null)throw new R("interpreter: a nested function without a scope around it");let l=t.type==="ArrowFunctionExpression"?{kind:"arrow"}:o.method?{kind:"method",async:t.async,generator:t.generator,derivedConstructor:o.derived}:{kind:"keyword",declaration:t.type==="FunctionDeclaration"&&t.id!==null};return u.lazy=cl(u,{unit:this.unit,reparse:{source:this.unit.source,module:this.unit.module,start:t.start+this.base,end:t.end+this.base,syntax:l,strict:c.strict},outer:c,options:{strict:c.strict,method:o.method,derived:o.derived,ctor:a==="classBase"||a==="classDerived",unbound:!1}}),u}rootFunction(t,n,r){let i=this.analysis.functionScopeOf(t),s=t.async?t.generator?"asyncGenerator":"async":t.generator?"generator":"plain",o=new xt(s,n,ta(t.params),i.strict,r);return this.compileFunctionInto(o,i,t.params,t.body),o}compileFunctionInto(t,n,r,i){let s={scope:this.scope,shape:this.shape};this.scope=n,this.shape=t.shape;try{if(t.derived=n.derived,n.thisBinding&&(t.thisSlot=n.thisBinding.slot),n.argumentsBinding&&(t.argumentsSlot=n.argumentsBinding.slot),n.newTargetBinding&&(t.newTargetSlot=n.newTargetBinding.slot),n.homeBinding&&(t.homeSlot=n.homeBinding.slot),n.funcBinding&&(t.funcSlot=n.funcBinding.slot),Se(r,a=>a.type==="Identifier")){let a=j();for(let u=0;u<r.length;u++)_(a,this.declaredBinding(r[u]).slot);t.params=Te(a),t.frame=ut(n.size,[])}else t.frame=ut(n.size,na(n,!0)),t.bindParams=this.paramBinder(r,n.argumentsBinding!==null);if(i.type!=="BlockStatement"){t.expression=!0;let a=this.expr(i);a.g?t.gen=a.g:t.body=a.s;return}let o=this.functionBody(n,i);o.expression&&(t.expression=!0),o.code.g?t.gen=o.code.g:t.body=o.code.s}finally{this.scope=s.scope,this.shape=s.shape}}functionBody(t,n){let r=t.varScope,i=r===t?this.scopeEntry(t,!0):this.bodyScopeEntry(t,r),s=this.enter(r),o=n.body,a;if(i===null&&o.length===1&&o[0].type==="ReturnStatement"){let u=o[0].argument;a={code:u?this.expr(u):v(()=>{}),expression:!0}}else a={code:this.entered(i,this.statementList(o)),expression:!1};return this.scope=s,a}bodyScopeEntry(t,n){let r=ll(t,n),i=this.enter(n),s=this.scopeEntry(n);return this.scope=i,o=>{let a=s?s(o):o;for(let u=0;u<r.length;u++)a[r[u][1]]=o[r[u][0]];return a}}entered(t,n){if(t===null)return n;let r=n.s,i=n.g;return i?L(function*(s){return yield*i(t(s))}):v(s=>r(t(s)))}declaredBinding(t){let n=this.analysis.ref(t);if(!n.binding)throw new R(`interpreter: ${t.name} declares no binding`);return n.binding}paramBinder(t,n){let r=j();for(let i=0;i<t.length;i++)_(r,this.parameterBinder(t[i],i));return n?(i,s)=>{let o=it(s);for(let a=0;a<r.length;a++)r[a](i,o)}:(i,s)=>{for(let o=0;o<r.length;o++)r[o](i,s)}}parameterBinder(t,n){if(t.type==="RestElement"){let i=this.patternBinder(t.argument,!0);return(s,o)=>i(s,or(o,n))}let r=this.patternBinder(t,!0);return(i,s)=>r(i,n<s.length?s[n]:void 0)}functionExpr(t,n){let r=this.functionInfo(t,t.type==="FunctionExpression"&&t.id?t.id.name:n);return v(i=>Ye(r,i,void 0))}named(t,n){return t.type==="FunctionExpression"&&!t.id?this.functionExpr(t,n):t.type==="ArrowFunctionExpression"?this.functionExpr(t,n):t.type==="ClassExpression"&&!t.id?this.classCode(t,n):this.expr(t)}namedAtRuntime(t){if(!ea(t)){let r=this.expr(t),i=r.s,s=r.g;return{s:o=>i(o),g:s===null?null:J(function*(o){return yield*s(o)})}}if(t.type==="ClassExpression")return this.classMaker(t);let n=this.functionInfo(t,"");return{s:(r,i)=>Ye(n,r,void 0,i),g:null}}statementList(t){let n=j();for(let r=0;r<t.length;r++){let i=t[r],s=this.stmt(i,[]);s!==null&&_(n,s)}if(Se(n,r=>r.g===null)){let r=ae(n,i=>i.s);switch(r.length){case 0:return v(()=>{});case 1:return v(r[0]);case 2:{let i=r[0],s=r[1];return v(o=>{let a=i(o);return a!==void 0?a:s(o)})}default:return v(i=>{for(let s=0;s<r.length;s++){let o=r[s](i);if(o!==void 0)return o}})}}return L(function*(r){for(let i=0;i<n.length;i++){let s=n[i],o=s.g!==null?yield*s.g(r):s.s(r);if(o!==void 0)return o}})}stmt(t,n){switch(t.type){case"ExpressionStatement":{let r=this.expr(t.expression),i=r.s,s=r.g;return s?L(function*(o){yield*s(o)}):v(o=>{i(o)})}case"BlockStatement":return this.blockStatement(t,t.body);case"EmptyStatement":case"DebuggerStatement":return null;case"VariableDeclaration":return this.variableDeclaration(t);case"FunctionDeclaration":return this.annexBFunction(t);case"ClassDeclaration":{let r=this.scope.bindings.get(t.id.name);if(!r)throw new R("interpreter: class without a binding");let i=this.initializer(r),s=this.classCode(t,t.id.name);return this.effect(s,(o,a)=>i(o,a))}case"ReturnStatement":{if(!t.argument){let o=new ce("return",null,void 0);return v(()=>o)}let r=this.expr(t.argument),i=r.s,s=r.g;return s?L(function*(o){return new ce("return",null,yield*s(o))}):v(o=>new ce("return",null,i(o)))}case"IfStatement":return this.ifStatement(t.test,t.consequent,t.alternate??null);case"ThrowStatement":{let r=this.expr(t.argument),i=r.s,s=r.g;return s?L(function*(o){throw yield*s(o)}):v(o=>{throw i(o)})}case"BreakStatement":{let r=t.label?new ce("break",t.label.name,void 0):mr;return v(()=>r)}case"ContinueStatement":{let r=t.label?new ce("continue",t.label.name,void 0):bi;return v(()=>r)}case"LabeledStatement":return this.labeled(t.label.name,t.body,n);case"WhileStatement":return this.loop(n,null,t.test,null,t.body,!1);case"DoWhileStatement":return this.loop(n,null,t.test,null,t.body,!0);case"ForStatement":return this.forStatement(t,n);case"ForInStatement":return this.forIn(t,n);case"ForOfStatement":return t.await?this.forAwait(t,n):this.forOf(t,n);case"TryStatement":return this.tryStatement(t);case"SwitchStatement":return this.switchStatement(t,n);case"WithStatement":return this.withStatement(t);case"ImportDeclaration":return null;case"ExportNamedDeclaration":return t.declaration?this.stmt(t.declaration,n):null;case"ExportDefaultDeclaration":return this.exportDefault(t.declaration);case"ExportAllDeclaration":return null}}effect(t,n){let r=t.s,i=t.g;return i?L(function*(s){n(s,yield*i(s))}):v(s=>{n(s,r(s))})}exportDefault(t){if(t.type==="FunctionDeclaration")return null;let n=t.type==="ClassDeclaration"&&t.id?this.scope.bindings.get(t.id.name):this.scope.bindings.get("*default*");if(!n)throw new R("interpreter: default export without a binding");let r=this.initializer(n),i=t.type==="ClassDeclaration"?this.classCode(t,t.id?t.id.name:"default"):this.named(t,"default");return this.effect(i,r)}annexBFunction(t){let n=this.analysis.annexB.get(t);if(!n)return null;let r=this.scope.bindings.get(t.id.name);if(!r)return null;let i=this.slotReader(this.hops(r.scope),r.slot),s=this.slotWriter(this.hops(n.scope),n.slot);return v(o=>{s(o,i(o))})}blockStatement(t,n){return this.blockIn(this.analysis.scopeOf(t),n)}blockIn(t,n){let r=this.scopeEntry(t),i=this.enter(t),s=this.statementList(n);return this.scope=i,this.entered(r,s)}variableDeclaration(t){let n=j();for(let r=0;r<t.declarations.length;r++){let i=t.declarations[r];if(!i.init){if(t.kind==="var")continue;let a=this.patternBinder(i.id,!0);_(n,v(u=>{a(u,void 0)}));continue}let s=i.id.type==="Identifier"?this.named(i.init,i.id.name):this.expr(i.init),o=i.id.type==="Identifier"?this.analysis.ref(i.id):null;if(o&&o.binding&&o.withs.length===0&&s.g===null&&this.hops(o.binding.scope)===0&&(t.kind!=="var"||o.binding.kind==="var")){let a=o.binding.slot,u=s.s;_(n,v(c=>{c[a]=u(c)}));continue}if(this.suspends(i.id)){let a=this.patternBinderGen(i.id,t.kind!=="var"),u=T(s);_(n,L(function*(c){yield*a(c,yield*u(c))}))}else{let a=this.patternBinder(i.id,t.kind!=="var");_(n,this.effect(s,a))}}return n.length===0?null:n.length===1?n[0]:this.sequenceStatements(n)}sequenceStatements(t){if(Se(t,n=>n.g===null)){let n=ae(t,r=>r.s);return v(r=>{for(let i=0;i<n.length;i++)n[i](r)})}return L(function*(n){for(let r=0;r<t.length;r++){let i=t[r];i.g!==null?yield*i.g(n):i.s(n)}})}ifStatement(t,n,r){let i=this.expr(t),s=this.clause(n)??v(()=>{}),o=r?this.clause(r)??v(()=>{}):null;if(i.g===null&&s.g===null&&(o===null||o.g===null)){let l=i.s,p=s.s;if(o===null)return v(m=>l(m)?p(m):void 0);let h=o.s;return v(m=>l(m)?p(m):h(m))}let a=T(i),u=T(s),c=o?T(o):null;return L(function*(l){return(yield*a(l))?yield*u(l):c?yield*c(l):void 0})}clause(t){if(t.type!=="FunctionDeclaration")return this.stmt(t,[]);let n=this.analysis.clauseBlocks.get(t);if(!n)throw new R("interpreter: an if clause declaration without its block");return this.blockIn(n,[t])}labeled(t,n,r){let i=go(r,t),s=n.type==="ForStatement"||n.type==="ForInStatement"||n.type==="ForOfStatement"||n.type==="WhileStatement"||n.type==="DoWhileStatement";if(n.type==="LabeledStatement")return this.labeled(n.label.name,n.body,i);let o=this.stmt(n,s?i:[]);if(o===null)return null;if(s)return o;let a=l=>l instanceof ce&&l.kind==="break"&&l.label===t,u=o.s,c=o.g;return c?L(function*(l){let p=yield*c(l);return a(p)?void 0:p}):v(l=>{let p=u(l);return a(p)?void 0:p})}loopControl(t){return n=>n===bi?"next":n===mr?"stop":n.label===null||!Rt(t,n.label)?"out":n.kind==="continue"?"next":n.kind==="break"?"stop":"out"}loop(t,n,r,i,s,o){let a=this.loopControl(t),u=r?this.expr(r):null,c=i?this.expr(i):null,l=this.stmt(s,[])??v(()=>{});if(l.g===null&&(u===null||u.g===null)&&(c===null||c.g===null)&&(n===null||n.g===null)){let y=u?u.s:null,x=c?c.s:null,w=l.s,E=n?n.s:null;return o?v($=>{do{let S=w($);if(S instanceof ce){let C=a(S);if(C==="stop")break;if(C==="out")return S}}while(y===null||y($))}):v($=>{for(E!==null&&E($);y===null||y($);x!==null&&x($)){let S=w($);if(S instanceof ce){let C=a(S);if(C==="stop")break;if(C==="out")return S}}})}let p=u?T(u):null,h=c?T(c):null,m=T(l),d=n?T(n):null;return o?L(function*(y){do{let x=yield*m(y);if(x instanceof ce){let w=a(x);if(w==="stop")break;if(w==="out")return x}}while(p===null||(yield*p(y)))}):L(function*(y){for(d!==null&&(yield*d(y));!(p!==null&&!(yield*p(y)));){let x=yield*m(y);if(x instanceof ce){let w=a(x);if(w==="stop")break;if(w==="out")return x}h!==null&&(yield*h(y))}})}forStatement(t,n){let r=this.analysis.scopes.get(t);if(!r){let u=t.init?t.init.type==="VariableDeclaration"?this.variableDeclaration(t.init):this.effect(this.expr(t.init),()=>{}):null;return this.loop(n,u,t.test??null,t.update??null,t.body,!1)}let i=this.scopeEntry(r),s=this.enter(r),o=t.init&&t.init.type==="VariableDeclaration"?this.variableDeclaration(t.init):null,a=r.materialized?this.perIterationLoop(n,o,t):this.loop(n,o,t.test??null,t.update??null,t.body,!1);return this.scope=s,this.entered(i,a)}perIterationLoop(t,n,r){let i=this.loopControl(t),s=r.test?this.expr(r.test):null,o=r.update?this.expr(r.update):null,a=this.stmt(r.body,[])??v(()=>{}),u=m=>or(m,0),c=n?T(n):null,l=s?T(s):null,p=o?T(o):null,h=T(a);if(a.g===null&&(s===null||s.g===null)&&(o===null||o.g===null)&&(n===null||n.g===null)){let m=n?n.s:null,d=s?s.s:null,y=o?o.s:null,x=a.s;return v(w=>{m!==null&&m(w);let E=u(w);for(;!(d!==null&&!d(E));){let $=x(E);if($ instanceof ce){let S=i($);if(S==="stop")break;if(S==="out")return $}E=u(E),y!==null&&y(E)}})}return L(function*(m){c!==null&&(yield*c(m));let d=u(m);for(;!(l!==null&&!(yield*l(d)));){let y=yield*h(d);if(y instanceof ce){let x=i(y);if(x==="stop")break;if(x==="out")return y}d=u(d),p!==null&&(yield*p(d))}})}forHead(t){let n=t.left,r=this.analysis.scopes.get(t)??null;if(n.type==="VariableDeclaration"){let i=n.declarations[0].id,s=n.kind!=="var",o=r?this.enter(r):this.scope,a=this.suspends(i)?{scope:r,bind:Ci,bindGen:this.patternBinderGen(i,s)}:{scope:r,bind:this.patternBinder(i,s),bindGen:null};return this.scope=o,a}return this.suspends(n)?{scope:null,bind:Ci,bindGen:this.patternBinderGen(n,!1)}:{scope:null,bind:this.patternBinder(n,!1),bindGen:null}}forIn(t,n){let r=this.loopControl(n),i=this.rightOfForInOf(t),s=this.forHead(t),o=s.scope?this.scopeEntry(s.scope):null,a=this.stmtIn(s.scope,t.body),u=s.bind;if(a.g===null&&i.g===null&&s.bindGen===null){let h=i.s,m=a.s;return v(d=>{let y=h(d);if(y!=null)for(let x in Ht(y)){let w=o?o(d):d;u(w,x);let E=m(w);if(E instanceof ce){let $=r(E);if($==="stop")break;if($==="out")return E}}})}let c=T(i),l=T(a),p=s.bindGen;return L(function*(h){let m=yield*c(h);if(m!=null)for(let d in Ht(m)){let y=o?o(h):h;p?yield*p(y,d):u(y,d);let x=yield*l(y);if(x instanceof ce){let w=r(x);if(w==="stop")break;if(w==="out")return x}}})}stmtIn(t,n){let r=t?this.enter(t):this.scope,i=this.stmt(n,[]);return this.scope=r,i??v(()=>{})}rightOfForInOf(t){let n=this.analysis.scopes.get(t.right);if(!n)return this.expr(t.right);let r=this.scopeEntry(n),i=this.enter(n),s=this.expr(t.right);if(this.scope=i,r===null)return s;let o=s.s,a=s.g;return a?L(function*(u){return yield*a(r(u))}):v(u=>o(r(u)))}forOf(t,n){let r=this.loopControl(n),i=this.rightOfForInOf(t),s=this.forHead(t),o=s.scope?this.scopeEntry(s.scope):null,a=this.stmtIn(s.scope,t.body),u=s.bind;if(a.g===null&&i.g===null&&s.bindGen===null){let h=i.s,m=a.s;return v(d=>{let y=wr(h(d));for(;;){let x=y.step();if(y.done)return;let w;try{let E=o?o(d):d;u(E,x),w=m(E)}catch(E){throw y.closeQuietly(),E}if(w instanceof ce){let E=r(w);if(E==="next")continue;return y.close(),E==="stop"?void 0:w}}})}let c=T(i),l=T(a),p=s.bindGen;return L(function*(h){let m=wr(yield*c(h)),d=!0;try{for(;;){let y=m.step();if(m.done)return;let x;try{let w=o?o(h):h;p?yield*p(w,y):u(w,y),x=yield*l(w)}catch(w){throw d=!1,m.closeQuietly(),w}if(x instanceof ce){let w=r(x);if(w==="next")continue;return d=!1,m.close(),w==="stop"?void 0:x}}}finally{d&&!m.done&&m.close()}})}awaiter(){return this.shape==="asyncGenerator"?J(function*(t){return On(t),yield yr}):J(function*(t){return yield t})}forAwait(t,n){let r=this.loopControl(n),i=T(this.rightOfForInOf(t)),s=this.forHead(t),o=s.scope?this.scopeEntry(s.scope):null,a=T(this.stmtIn(s.scope,t.body)),u=s.bind,c=s.bindGen,l=this.awaiter();return L(function*(p){let h=yield*i(p),m=ne(),d,y=h==null?void 0:m.get(h,Xs);if(y==null){let E=h==null?void 0:m.get(h,er);if(typeof E!="function")throw new M(`${tn(h)} is not async iterable`);let $=z(E,h,[]);if(!Y($))throw new M("Result of the symbolIterator method is not an object");d=Qo($,g($,"next"))}else{if(typeof y!="function")throw new M(`${tn(h)} is not async iterable`);let E=z(y,h,[]);if(!Y(E))throw new M("Result of the symbolAsyncIterator method is not an object");d=E}let x=g(d,"next"),w=!0;try{for(;;){if(typeof x!="function")throw w=!1,new M("iterator.next is not a function");let E;try{E=yield*l(z(x,d,[]))}catch(C){throw w=!1,C}if(!Y(E))throw w=!1,new M(`Iterator result ${te(E)} is not an object`);let $;try{if(g(E,"done")){w=!1;return}$=g(E,"value")}catch(C){throw w=!1,C}let S;try{let C=o?o(p):p;c?yield*c(C,$):u(C,$),S=yield*a(C)}catch(C){w=!1;try{let F=g(d,"return");typeof F=="function"&&(yield*l(z(F,d,[])))}catch{}throw C}if(S instanceof ce){let C=r(S);if(C==="next")continue;return w=!1,yield*$i(d,l),C==="stop"?void 0:S}}}finally{w&&(yield*$i(d,l))}})}catchClause(t){let n=this.analysis.scopeOf(t),r=this.scopeEntry(n),i=this.enter(n),s=t.param??null,o=this.blockStatement(t.body,t.body.body),a=s!==null&&this.suspends(s),u=s!==null&&a?this.patternBinderGen(s,!0):null,c=s!==null&&!a?this.patternBinder(s,!0):null;this.scope=i;let l=o.s;if(u!==null){let h=T(o);return{s:Pt,g:J(function*(m,d){let y=r?r(m):m;return yield*u(y,d),Sr(yield*h(y))})}}let p=o.g;return{s:(h,m)=>{let d=r?r(h):h;return c&&c(d,m),Sr(l(d))},g:p===null?null:J(function*(h,m){let d=r?r(h):h;return c&&c(d,m),Sr(yield*p(d))})}}tryStatement(t){let n=this.blockStatement(t.block,t.block.body),r=t.handler?this.catchClause(t.handler):null,i=t.finalizer?this.blockStatement(t.finalizer,t.finalizer.body):null,s=r;if(n.g===null&&(s===null||s.g===null)&&(i===null||i.g===null)){let l=n.s,p=s?s.s:null,h=i?i.s:null;return h===null&&p!==null?v(m=>{try{return l(m)}catch(d){return p(m,d)}}):v(m=>{let d;try{d=l(m)}catch(y){if(p===null)throw y;d=p(m,y)}finally{if(h!==null){let y=h(m);if(y!==void 0)return y}}return d})}let o=T(n),a=s===null?null:s.s,u=s===null?null:s.g??J(function*(l,p){return a===null?void 0:a(l,p)}),c=i?T(i):null;return L(function*(l){let p;try{p=yield*o(l)}catch(h){if(u===null)throw h;p=yield*u(l,h)}finally{if(c!==null){let h=yield*c(l);if(h!==void 0)return h}}return p})}switchStatement(t,n){let r=this.expr(t.discriminant),i=this.analysis.scopeOf(t),s=this.scopeEntry(i),o=this.enter(i),a=t.cases,u=j(),c=j(),l=-1;for(let x=0;x<a.length;x++){let w=a[x].test;_(u,w?this.expr(w):null),_(c,this.statementList(a[x].consequent)),!w&&l<0&&(l=x)}this.scope=o;let p=x=>{if(x!==void 0&&x!==mr&&!(x instanceof ce&&x.kind==="break"&&x.label!==null&&Rt(n,x.label)))return x};if(r.g===null&&Se(u,x=>x===null||x.g===null)&&Se(c,x=>x.g===null)){let x=r.s,w=ae(u,$=>$?$.s:null),E=ae(c,$=>$.s);return v($=>{let S=x($),C=s?s($):$,F=-1;for(let B=0;B<w.length;B++){let W=w[B];if(W!==null&&W(C)===S){F=B;break}}if(F<0&&(F=l),!(F<0))for(let B=F;B<E.length;B++){let W=E[B](C);if(W!==void 0)return p(W)}})}let m=T(r),d=ae(u,x=>x?T(x):null),y=ae(c,x=>T(x));return L(function*(x){let w=yield*m(x),E=s?s(x):x,$=-1;for(let S=0;S<d.length;S++){let C=d[S];if(C!==null&&(yield*C(E))===w){$=S;break}}if($<0&&($=l),!($<0))for(let S=$;S<y.length;S++){let C=yield*y[S](E);if(C!==void 0)return p(C)}})}withStatement(t){if(this.scope.strict)throw new ge("with in strict mode");let n=this.expr(t.object),r=this.analysis.scopeOf(t),i=this.stmtIn(r,t.body),s=(u,c)=>{if(c==null)throw new M("Cannot convert undefined or null to object");return[u,Ht(c)]};if(n.g===null&&i.g===null){let u=n.s,c=i.s;return v(l=>c(s(l,u(l))))}let o=T(n),a=T(i);return L(function*(u){return yield*a(s(u,yield*o(u)))})}slotWriter(t,n){switch(t){case 0:return(r,i)=>{r[n]=i};case 1:return(r,i)=>{Vt(r)[n]=i};default:return(r,i)=>{dr(r,t)[n]=i}}}initializer(t){return this.slotWriter(this.hops(t.scope),t.slot)}read(t,n=!1){let r=this.analysis.ref(t),i=r.binding?this.bindingRead(r.binding,r.tdz):this.globalRead(t.name,n);return r.withs.length>0&&(i=this.withRead(r,t.name,i)),i}bindingRead(t,n){let r=this.hops(t.scope),i=t.slot,s=this.slotReader(r,i),o=this.unit.imports.get(t);if(o){let u=ne(),c=o.name;return o.kind==="named"?l=>u.get(s(l),c):o.kind==="default"?l=>{let p=s(l);return Y(p)&&g(p,"__esModule")?u.get(p,"default"):p}:s}if(!n)return s;let a=t.kind==="special"?"this":t.name;return t.kind==="special"?u=>{let c=s(u);if(c===Be)throw new dt(xi);return c}:r===0?u=>{let c=u[i];if(c===Be)throw An(a);return c}:u=>{let c=s(u);if(c===Be)throw An(a);return c}}globalRead(t,n){if(t==="undefined")return()=>{};if(t==="NaN")return()=>NaN;if(t==="Infinity")return()=>1/0;let r=ne(),i=r.globalReader(t)??(()=>r.get(tt,t));return n?i:()=>{let s=i();if(s===void 0&&!wn(tt,t))throw new dt(`${t} is not defined`);return s}}withObjects(t){let n=j();for(let r=0;r<t.withs.length;r++)_(n,this.slotReader(this.hops(t.withs[r]),1));return n}withRead(t,n,r){let i=this.withObjects(t),s=ne();return o=>{for(let a=0;a<i.length;a++){let u=i[a](o);if(Tn(u,n))return s.get(u,n)}return r(o)}}writer(t){let n=this.analysis.ref(t),r=t.name,i=this.scope.strict,s=ne(),o,a=n.binding;if(a===null)o=i?(l,p)=>{if(!wn(tt,r))throw new dt(`${r} is not defined`);s.set(tt,r,p)}:(l,p)=>s.setSloppy(tt,r,p);else{let l=this.hops(a.scope),p=a.slot,h=this.slotWriter(l,p),m=this.slotReader(l,p);if(a.kind==="const"||a.kind==="class"&&a.scope.kind==="class"||a.kind==="import"){let d=n.tdz;o=y=>{throw d&&m(y)===Be?An(r):new M("Assignment to constant variable.")}}else a.kind==="callee"?o=i?()=>{throw new M("Assignment to constant variable.")}:()=>{}:n.tdz?o=(d,y)=>{if(m(d)===Be)throw An(r);h(d,y)}:o=h}if(n.withs.length===0)return o;let u=this.withObjects(n),c=o;return(l,p)=>{for(let h=0;h<u.length;h++){let m=u[h](l);if(Tn(m,r)){i?s.set(m,r,p):s.setSloppy(m,r,p);return}}c(l,p)}}patternBinder(t,n){switch(t.type){case"Identifier":{let r=this.analysis.ref(t);return n&&r.binding&&r.withs.length===0?this.initializer(r.binding):this.writer(t)}case"MemberExpression":{let r=this.memberTarget(t);return(i,s)=>r(i)(s)}case"AssignmentPattern":{let r=this.patternBinder(t.left,n),i=t.left.type==="Identifier"?this.named(t.right,t.left.name).s:this.expr(t.right).s;return(s,o)=>r(s,o===void 0?i(s):o)}case"ObjectPattern":return this.objectPatternBinder(t,n);case"ArrayPattern":return this.arrayPatternBinder(t,n);case"RestElement":return this.patternBinder(t.argument,n)}}memberTarget(t){let n=ne(),r=this.scope.strict;if(this.suspends(t))throw new ge("await or yield inside a destructuring target");if(t.object.type==="Super"){let a=this.memberKey(t),u=this.homeObject(t.object),c=this.thisValue(t.object);return l=>{let p=Ve(a(l)),h=c(l),m=St(u(l));return d=>{if(!Y(m)||!Xn(m,p,d,h)&&r)throw new M(`Cannot assign to read only property '${te(p)}' of object`)}}}if(t.property.type==="PrivateIdentifier"){let a=this.expr(t.object).s,u=this.privateName(t.property);return c=>{let l=a(c),p=u(c);return h=>p.set(l,h)}}let i=this.expr(t.object).s,s=this.memberKey(t),o=r?n.set:n.setSloppy;return a=>{let u=i(a),c=s(a);return l=>o(u,c,l)}}objectPatternBinder(t,n){let r=mt(t.properties,s=>s.type==="RestElement"),i=j();for(let s=0;s<t.properties.length;s++)_(i,this.objectPatternStep(t.properties[s],n));return(s,o)=>{Ii(o);let a=r?j():null;for(let u=0;u<i.length;u++)i[u](s,o,a)}}objectPatternStep(t,n){let r=ne();if(t.type==="RestElement"){let l=this.patternBinder(t.argument,n);if(t.argument.type==="MemberExpression"){let p=this.memberTarget(t.argument);return(h,m,d)=>{let y=p(h),x={};Fn(x,m,d),y(x)}}return(p,h,m)=>{let d={};Fn(d,h,m),l(p,d)}}let i=this.propertyKey(t.key,t.computed),s=t.value,o=this.patternBinder(s.type==="AssignmentPattern"?s.left:s,n),a=s.type==="AssignmentPattern"?s.left:s,u=s.type==="AssignmentPattern"?s.left.type==="Identifier"?this.named(s.right,s.left.name).s:this.expr(s.right).s:null,c=a.type==="MemberExpression"?this.memberTarget(a):null;return(l,p,h)=>{let m=i(l);h!==null&&_(h,m);let d=c?c(l):null,y=r.get(p,m);y===void 0&&u!==null&&(y=u(l)),d?d(y):o(l,y)}}arrayPatternElement(t,n){if(t===null)return{kind:"skip"};if(t.type==="RestElement")return{kind:"rest",bind:this.patternBinder(t.argument,n),member:t.argument.type==="MemberExpression"?this.memberTarget(t.argument):null};let r=t.type==="AssignmentPattern"?t.left:t,i=t.type==="AssignmentPattern"?t.left.type==="Identifier"?this.named(t.right,t.left.name).s:this.expr(t.right).s:null;return{kind:"one",bind:this.patternBinder(r,n),dflt:i,member:r.type==="MemberExpression"?this.memberTarget(r):null}}arrayPatternBinder(t,n){let r=j();for(let i=0;i<t.elements.length;i++)_(r,this.arrayPatternElement(t.elements[i],n));return(i,s)=>{let o=xr(s);if(Ei(s,o)){let u=!1;for(let c=0;c<r.length;c++){let l=r[c];if(l.kind==="skip"){!u&&c>=s.length&&(u=!0);continue}let p=l.member?l.member(i):null,h;l.kind==="rest"?(h=u?[]:or(s,c),u=!0):(!u&&c<s.length?h=s[c]:u=!0,h===void 0&&l.dflt!==null&&(h=l.dflt(i))),p?p(h):l.bind(i,h)}u||Ho(s);return}let a=br(s,o);try{for(let u=0;u<r.length;u++){let c=r[u],l=c.kind!=="skip"&&c.member?c.member(i):null,p;if(c.kind==="rest"){let h=j();for(let m=a.step();!a.done;m=a.step())_(h,m);p=Te(h)}else a.done||(p=a.step());c.kind!=="skip"&&(c.kind==="one"&&p===void 0&&c.dflt!==null&&(p=c.dflt(i)),l?l(p):c.bind(i,p))}}catch(u){throw a.done||a.closeQuietly(),u}a.done||a.close()}}patternBinderGen(t,n){let r=ne();switch(t.type){case"Identifier":{let i=this.patternBinder(t,n);return J(function*(s,o){i(s,o)})}case"MemberExpression":{let i=this.memberTargetGen(t);return J(function*(s,o){(yield*i(s))(o)})}case"AssignmentPattern":case"RestElement":{let i=this.elementGen(t,n);return J(function*(s,o){yield*i.assign(s,yield*i.reference(s),o)})}case"ObjectPattern":{let i=j();for(let s=0;s<t.properties.length;s++)_(i,this.objectPatternStepGen(t.properties[s],n));return J(function*(s,o){Ii(o);let a=j();for(let u=0;u<i.length;u++){let{key:c,el:l}=i[u];if(c===null){let m=yield*l.reference(s),d={};Fn(d,o,a),yield*l.assign(s,m,d);continue}let p=yield*c(s);_(a,p);let h=yield*l.reference(s);yield*l.assign(s,h,r.get(o,p))}})}case"ArrayPattern":{let i=j();for(let s=0;s<t.elements.length;s++){let o=t.elements[s];_(i,o===null?null:{rest:o.type==="RestElement",el:this.elementGen(o.type==="RestElement"?o.argument:o,n)})}return J(function*(s,o){let a=wr(o),u=!1,c=!1;try{for(let l=0;l<i.length;l++){let p=i[l],h=p?yield*p.el.reference(s):null,m;if(p&&p.rest){let d=j();for(let y=a.step();!a.done;y=a.step())_(d,y);m=Te(d)}else a.done||(m=a.step());p&&(yield*p.el.assign(s,h,m))}c=!0}catch(l){throw u=!0,a.done||a.closeQuietly(),l}finally{!c&&!u&&!a.done&&a.close()}a.done||a.close()})}}}objectPatternStepGen(t,n){if(t.type==="RestElement")return{key:null,el:this.elementGen(t.argument,n)};if(t.computed){let i=T(this.expr(t.key));return{key:J(function*(s){return Ve(yield*i(s))}),el:this.elementGen(t.value,n)}}let r=this.staticKey(t.key);return{key:J(function*(){return r}),el:this.elementGen(t.value,n)}}elementGen(t,n){let r=t.type==="AssignmentPattern"?t.left:t,i=t.type==="AssignmentPattern"?T(t.left.type==="Identifier"?this.named(t.right,t.left.name):this.expr(t.right)):null;if(r.type==="MemberExpression")return{reference:this.memberTargetGen(r),assign:J(function*(a,u,c){let l=c===void 0&&i!==null?yield*i(a):c;if(u===null)throw new R("interpreter: member target without a reference");u(l)})};let s=this.patternBinderGen(r,n);return{reference:J(function*(){return null}),assign:J(function*(o,a,u){yield*s(o,u===void 0&&i!==null?yield*i(o):u)})}}memberTargetGen(t){if(!this.suspends(t)){let a=this.memberTarget(t);return J(function*(u){return a(u)})}if(t.object.type==="Super")throw new ge("await or yield inside a super member key of a destructuring target");let n=ne(),r=this.scope.strict?n.set:n.setSloppy,i=T(this.expr(t.object));if(t.property.type==="PrivateIdentifier"){let a=this.privateName(t.property);return J(function*(u){let c=yield*i(u),l=a(u);return p=>l.set(c,p)})}let s=t.computed?T(this.expr(t.property)):null,o=!t.computed&&t.property.type==="Identifier"?t.property.name:"";return J(function*(a){let u=yield*i(a),c=s?yield*s(a):o;return l=>r(u,c,l)})}staticKey(t){if(t.type==="Identifier")return t.name;if(t.type==="Literal")return typeof t.value=="bigint"?te(t.value):te(t.value);throw new R(`interpreter: ${t.type} is not a static key`)}propertyKey(t,n){if(!n){let i=this.staticKey(t);return()=>i}if(t.type==="PrivateIdentifier")throw new R("interpreter: private key in a pattern");let r=this.expr(t).s;return i=>Ve(r(i))}expr(t){switch(t.type){case"Identifier":return v(this.read(t));case"Literal":return v(this.literal(t));case"ThisExpression":return v(this.thisValue(t));case"ArrayExpression":return this.arrayExpr(t);case"ObjectExpression":return this.objectExpr(t);case"FunctionExpression":case"ArrowFunctionExpression":return this.functionExpr(t,"");case"UnaryExpression":return this.unary(t);case"UpdateExpression":return this.update(t);case"BinaryExpression":return this.binary(t);case"AssignmentExpression":return this.assignment(t);case"LogicalExpression":return this.logical(t);case"MemberExpression":return this.member(t,!1);case"ConditionalExpression":{let n=this.expr(t.test),r=this.expr(t.consequent),i=this.expr(t.alternate);if(n.g===null&&r.g===null&&i.g===null){let u=n.s,c=r.s,l=i.s;return v(p=>u(p)?c(p):l(p))}let s=T(n),o=T(r),a=T(i);return L(function*(u){return(yield*s(u))?yield*o(u):yield*a(u)})}case"CallExpression":return this.call(t,!1);case"NewExpression":return this.newExpr(t);case"SequenceExpression":{let n=this.exprs(t.expressions);if(Se(n,i=>i.g===null)){let i=ae(n,s=>s.s);return v(s=>{let o;for(let a=0;a<i.length;a++)o=i[a](s);return o})}let r=ae(n,T);return L(function*(i){let s;for(let o=0;o<r.length;o++)s=yield*r[o](i);return s})}case"YieldExpression":return this.yieldExpr(t);case"AwaitExpression":return this.awaitExpr(t);case"TemplateLiteral":return this.template(t);case"TaggedTemplateExpression":return this.tagged(t);case"ClassExpression":return this.classCode(t,t.id?t.id.name:"");case"MetaProperty":return v(this.metaProperty(t));case"ChainExpression":{let n=t.expression.type==="CallExpression"?this.call(t.expression,!0):this.member(t.expression,!0),r=n.s,i=n.g;return i?L(function*(s){let o=yield*i(s);return o===re?void 0:o}):v(s=>{let o=r(s);return o===re?void 0:o})}case"ImportExpression":return this.importExpr(t);case"ParenthesizedExpression":return this.expr(t.expression);case"PrivateIdentifier":throw new R("interpreter: a private name outside a member or `in`");case"Super":throw new R("interpreter: super outside a member or call");case"SpreadElement":throw new R("interpreter: spread outside a list")}}exprs(t){let n=j();for(let r=0;r<t.length;r++)_(n,this.expr(t[r]));return n}listPart(t){return t.type==="SpreadElement"?{spread:!0,code:this.expr(t.argument)}:{spread:!1,code:this.expr(t)}}argumentParts(t){let n=j();for(let r=0;r<t.length;r++)_(n,this.listPart(t[r]));return n}elementParts(t){let n=j();for(let r=0;r<t.length;r++){let i=t[r];_(n,i===null?null:this.listPart(i))}return n}literal(t){if(t.regex){let{pattern:r,flags:i}=t.regex;return()=>new so(r,i)}if(t.bigint!==void 0){let r=nr(t.bigint);return()=>r}let n=t.value;return()=>n}thisValue(t){let n=this.analysis.receivers.get(t);if(!n||!n.thisBinding)throw new R("interpreter: this without a receiver");let r=n.thisBinding,i=this.hops(r.scope),s=this.slotReader(i,r.slot);return n.functionKind==="script"?()=>tt:r.tdz?o=>{let a=s(o);if(a===Be)throw new dt(xi);return a}:s}homeObject(t){let n=this.analysis.receivers.get(t);if(!n||!n.homeBinding)throw new R("interpreter: super without a home object");let r=this.slotReader(this.hops(n.homeBinding.scope),n.homeBinding.slot);return i=>{let s=r(i);if(!Y(s))throw new rr("'super' keyword unexpected here");return s}}metaProperty(t){if(t.meta.name==="new"){let o=this.analysis.receivers.get(t);return!o||!o.newTargetBinding?()=>{}:this.slotReader(this.hops(o.newTargetBinding.scope),o.newTargetBinding.slot)}let n=this.unit.moduleScope,r=n?n.bindings.get("%module"):void 0;if(!n||!r)throw new ge("import.meta outside a module");let i=this.slotReader(this.hops(n),r.slot),s=ne();return o=>s.get(i(o),"__nimbusImportMeta")}importExpr(t){let n=this.unit.host.dynamicImport,r=this.expr(t.source),i=t.options?this.expr(t.options):null,s=(u,c)=>n?n(u,c):Qt(new M("import() is not supported here"));if(r.g===null&&(i===null||i.g===null)){let u=r.s,c=i?i.s:null;return v(l=>{let p=u(l);return s(p,c?c(l):void 0)})}let o=T(r),a=i?T(i):null;return L(function*(u){let c=yield*o(u);return s(c,a?yield*a(u):void 0)})}awaitExpr(t){let n=this.expr(t.argument),r=n.s,i=n.g;return this.shape==="asyncGenerator"?L(function*(s){let o=i?yield*i(s):r(s);return On(o),yield yr}):L(function*(s){return yield i?yield*i(s):r(s)})}yieldExpr(t){let n=t.argument?this.expr(t.argument):null,r=n?n.s:null,i=n?n.g:null,s=this.shape==="asyncGenerator";if(t.delegate){if(s)return L(function*(a){let u=i?yield*i(a):r?r(a):void 0;return On(u),yield vi});let o=ne();return L(function*(a){let u=i?yield*i(a):r?r(a):void 0;return yield*o.delegate(u)})}return s?L(function*(o){let a=i?yield*i(o):r?r(o):void 0;return On(a),yield wi}):L(function*(o){return yield i?yield*i(o):r?r(o):void 0})}template(t){let n=ae(t.quasis,s=>s.value.cooked??""),r=this.exprs(t.expressions);if(r.length===0){let s=n[0];return v(()=>s)}if(Se(r,s=>s.g===null)){let s=ae(r,o=>o.s);if(s.length===1){let o=n[0],a=n[1],u=s[0];return v(c=>`${o}${u(c)}${a}`)}return v(o=>{let a=n[0];for(let u=0;u<s.length;u++)a+=`${s[u](o)}${n[u+1]}`;return a})}let i=ae(r,T);return L(function*(s){let o=n[0];for(let a=0;a<i.length;a++)o+=`${yield*i[a](s)}${n[a+1]}`;return o})}tagged(t){let n=ae(t.quasi.quasis,p=>p.value.cooked===null?void 0:p.value.cooked),r=ae(t.quasi.quasis,p=>p.value.raw),i=null,s=()=>(i===null&&(i=Xo(n,r)),i),o=this.callee(t.tag,!1),a=this.argumentList(t.quasi.expressions),u=this.textOf(t.tag.start,t.tag.end);if(o.g===null&&a.g===null){let p=o.s,h=a.s;return v(m=>{let d=p(m);return Mt(d[0],d[1],Xr(s(),h(m)),u)})}let c=T(o),l=T(a);return L(function*(p){let h=yield*c(p);return Mt(h[0],h[1],Xr(s(),yield*l(p)),u)})}unary(t){let n=ne();if(t.operator==="typeof"&&t.argument.type==="Identifier"){let a=this.read(t.argument,!0);return v(u=>typeof a(u))}if(t.operator==="delete")return this.deleteExpr(t.argument);let r=this.expr(t.argument),i;switch(t.operator){case"!":i=a=>!a;break;case"-":i=a=>typeof a=="number"?-a:n.neg(a);break;case"+":i=n.plus;break;case"~":i=n.bitNot;break;case"typeof":i=a=>typeof a;break;case"void":i=()=>{};break}let s=r.s,o=r.g;return o?L(function*(a){return i(yield*o(a))}):v(a=>i(s(a)))}deleteExpr(t){let n=ne(),i=this.scope.strict?n.remove:n.removeSloppy,s=t;for(;s.type==="ParenthesizedExpression";)s=s.expression;if(s.type==="ChainExpression"&&s.expression.type==="MemberExpression"){let c=s.expression;if(this.suspends(c)){let h=this.chainGen(c.object),m=c.optional,d=c.computed?T(this.expr(c.property)):null,y=!c.computed&&c.property.type==="Identifier"?c.property.name:"";return L(function*(x){let w=yield*h(x);return w===re||m&&w==null?!0:i(w,d?yield*d(x):y)})}let l=this.chainObject(c),p=this.memberKey(c);return v(h=>{let m=l(h);return m===re?!0:i(m,p(h))})}if(s.type==="MemberExpression"){if(s.object.type==="Super"){let h=this.thisValue(s.object);return v(m=>{throw h(m),new dt("Unsupported reference to 'super'")})}let c=this.expr(s.object);if(s.computed&&this.suspends(s.property)){let h=T(c),m=T(this.expr(s.property));return L(function*(d){let y=yield*h(d);return i(y,yield*m(d))})}let l=this.memberKey(s);if(c.g===null){let h=c.s;return v(m=>{let d=h(m);return i(d,l(m))})}let p=c.g;return L(function*(h){let m=yield*p(h);return i(m,l(h))})}if(s.type==="Identifier"){let c=this.analysis.ref(s),l=s.name,p=this.withObjects(c),h=c.binding===null;return v(m=>{for(let d=0;d<p.length;d++){let y=p[d](m);if(Tn(y,l))return n.removeSloppy(y,l)}return h?n.removeSloppy(tt,l):!1})}let o=this.expr(s),a=o.s,u=o.g;return u?L(function*(c){return yield*u(c),!0}):v(c=>(a(c),!0))}binary(t){let n=ne();if(t.left.type==="PrivateIdentifier"){let u=this.privateName(t.left),c=this.expr(t.right),l=c.s,p=c.g;return p?L(function*(h){return u(h).has(yield*p(h))}):v(h=>u(h).has(l(h)))}let r=this.expr(t.left),i=this.expr(t.right),s;switch(t.operator){case"+":s=(u,c)=>typeof u=="number"&&typeof c=="number"||typeof u=="string"&&typeof c=="string"?u+c:n.add(u,c);break;case"-":s=(u,c)=>typeof u=="number"&&typeof c=="number"?u-c:n.sub(u,c);break;case"*":s=(u,c)=>typeof u=="number"&&typeof c=="number"?u*c:n.mul(u,c);break;case"/":s=n.div;break;case"%":s=n.mod;break;case"**":s=n.exp;break;case"<<":s=n.shl;break;case">>":s=n.shr;break;case">>>":s=n.ushr;break;case"&":s=(u,c)=>typeof u=="number"&&typeof c=="number"?u&c:n.and(u,c);break;case"|":s=(u,c)=>typeof u=="number"&&typeof c=="number"?u|c:n.or(u,c);break;case"^":s=n.xor;break;case"<":s=(u,c)=>typeof u=="number"&&typeof c=="number"?u<c:n.lt(u,c);break;case">":s=(u,c)=>typeof u=="number"&&typeof c=="number"?u>c:n.gt(u,c);break;case"<=":s=(u,c)=>typeof u=="number"&&typeof c=="number"?u<=c:n.le(u,c);break;case">=":s=(u,c)=>typeof u=="number"&&typeof c=="number"?u>=c:n.ge(u,c);break;case"==":s=(u,c)=>u==c;break;case"!=":s=(u,c)=>u!=c;break;case"===":s=(u,c)=>u===c;break;case"!==":s=(u,c)=>u!==c;break;case"in":s=n.has;break;case"instanceof":s=n.instanceOf;break}if(r.g===null&&i.g===null){let u=r.s,c=i.s,l=this.constant(t.right);if(l!==null){let p=l.value;switch(t.operator){case"===":return v(h=>u(h)===p);case"!==":return v(h=>u(h)!==p);case"==":return v(h=>u(h)==p);case"!=":return v(h=>u(h)!=p);default:break}}switch(t.operator){case"===":return v(p=>u(p)===c(p));case"!==":return v(p=>u(p)!==c(p));default:return v(p=>s(u(p),c(p)))}}let o=T(r),a=T(i);return L(function*(u){let c=yield*o(u);return s(c,yield*a(u))})}logical(t){let n=this.expr(t.left),r=this.expr(t.right),i=t.operator;if(n.g===null&&r.g===null){let a=n.s,u=r.s;return i==="&&"?v(c=>a(c)&&u(c)):i==="||"?v(c=>a(c)||u(c)):v(c=>a(c)??u(c))}let s=T(n),o=T(r);return L(function*(a){let u=yield*s(a);return(i==="&&"?!u:i==="||"?u:u!=null)?u:yield*o(a)})}memberKey(t){if(!t.computed){if(t.property.type!=="Identifier")throw new R("interpreter: dotted member without a name");let r=t.property.name;return()=>r}if(t.property.type==="PrivateIdentifier")throw new R("interpreter: computed private member");let n=this.expr(t.property);if(n.g!==null)throw new ge("await inside a computed member key of an assignment target");return n.s}chainObject(t){if(t.object.type==="Super")throw new R("interpreter: super in an optional chain");let n=this.chainPart(t.object).s,r=t.optional;return i=>{let s=n(i);return s===re||r&&s==null?re:s}}chainPart(t){return t.type==="MemberExpression"?this.member(t,!0):t.type==="CallExpression"?this.call(t,!0):this.expr(t)}privateName(t){let n=this.analysis.privateRef(t);if(!n.binding)throw new R(`interpreter: undeclared private name #${t.name}`);let r=this.slotReader(this.hops(n.binding.scope),n.binding.slot);return i=>{let s=r(i);if(!(s instanceof at))throw new R("interpreter: private name slot");return s}}member(t,n){let r=ne();if(t.object.type==="Super"){let u=this.homeObject(t.object),c=this.thisValue(t.object),l=this.memberKey(t);return v(p=>{let h=c(p),m=Ve(l(p)),d=St(u(p));if(!Y(d))throw new M(`Cannot read properties of ${te(d)} (reading '${te(m)}')`);return g(d,m,h)})}if(n&&(t.optional||this.inChain(t.object))){if(this.suspends(t))return L(this.chainGen(t));let u=this.chainObject(t);if(t.property.type==="PrivateIdentifier"){let l=this.privateName(t.property);return v(p=>{let h=u(p);return h===re?re:l(p).get(h)})}let c=this.memberKey(t);return v(l=>{let p=u(l);return p===re?re:r.get(p,c(l))})}let i=this.expr(t.object);if(t.property.type==="PrivateIdentifier"){let u=this.privateName(t.property),c=i.s,l=i.g;return l?L(function*(p){let h=yield*l(p);return u(p).get(h)}):v(p=>u(p).get(c(p)))}if(!t.computed){if(t.property.type!=="Identifier")throw new R("interpreter: dotted member without a name");let u=t.property.name,c=i.s,l=i.g;if(l)return L(function*(h){return r.get(yield*l(h),u)});if(u==="length")return v(h=>{let m=c(h);return typeof m=="string"?m.length:r.get(m,"length")});let p=this.localSlot(t.object);return p!==null?v(h=>r.get(h[p],u)):v(h=>r.get(c(h),u))}let s=this.expr(t.property);if(i.g===null&&s.g===null){let u=i.s,c=s.s;return v(l=>{let p=u(l);return r.get(p,c(l))})}let o=T(i),a=T(s);return L(function*(u){let c=yield*o(u);return r.get(c,yield*a(u))})}chainGen(t){let n=ne();if(t.type==="MemberExpression"&&t.object.type!=="Super"){let r=this.chainGen(t.object),i=t.optional,s=t.computed&&t.property.type!=="PrivateIdentifier"?T(this.expr(t.property)):null,o=!t.computed&&t.property.type==="Identifier"?t.property.name:"",a=t.property.type==="PrivateIdentifier"?this.privateName(t.property):null;return J(function*(u){let c=yield*r(u);return c===re||i&&c==null?re:a?a(u).get(c):n.get(c,s?yield*s(u):o)})}if(t.type==="CallExpression"&&t.callee.type!=="Super"){let r=t.callee,i=t.optional,s=T(this.argumentList(t.arguments)),o=this.textOf(r.start,r.end);if(r.type==="MemberExpression"&&r.object.type!=="Super"){let u=this.chainGen(r.object),c=r.optional,l=r.computed&&r.property.type!=="PrivateIdentifier"?T(this.expr(r.property)):null,p=!r.computed&&r.property.type==="Identifier"?r.property.name:"",h=r.property.type==="PrivateIdentifier"?this.privateName(r.property):null;return J(function*(m){let d=yield*u(m);if(d===re||c&&d==null)return re;let y=h?h(m).get(d):n.get(d,l?yield*l(m):p);return i&&y==null?re:Mt(y,d,yield*s(m),o)})}let a=this.chainGen(r);return J(function*(u){let c=yield*a(u);return c===re||i&&c==null?re:Mt(c,void 0,yield*s(u),o)})}return T(this.expr(t))}localSlot(t){if(t.type!=="Identifier")return null;let n=this.analysis.ref(t),r=n.binding;return!r||n.tdz||n.withs.length>0||this.unit.imports.has(r)||this.hops(r.scope)!==0?null:r.slot}constant(t){return t.type==="Literal"&&!t.regex&&t.bigint===void 0?{value:t.value}:t.type==="Identifier"&&t.name==="undefined"&&this.analysis.ref(t).binding===null&&this.analysis.ref(t).withs.length===0?{value:void 0}:null}inChain(t){return t.type==="MemberExpression"?t.optional||this.inChain(t.object):t.type==="CallExpression"?t.optional||this.inChain(t.callee):!1}callee(t,n){let r=ne();if(t.type==="MemberExpression"){if(t.object.type==="Super"){let d=this.member(t,!1);if(d.g!==null)throw new ge("await or yield inside a super member key");let y=d.s,x=this.thisValue(t.object);return v(w=>[y(w),x(w)])}if(n&&(t.optional||this.inChain(t.object))){let d=this.chainObject(t);if(t.property.type==="PrivateIdentifier"){let x=this.privateName(t.property);return v(w=>{let E=d(w);return E===re?[re,void 0]:[x(w).get(E),E]})}let y=this.memberKey(t);return v(x=>{let w=d(x);return w===re?[re,void 0]:[r.get(w,y(x)),w]})}let a=this.expr(t.object),u=a.s,c=a.g;if(t.property.type==="PrivateIdentifier"){let d=this.privateName(t.property);return c?L(function*(y){let x=yield*c(y);return[d(y).get(x),x]}):v(y=>{let x=u(y);return[d(y).get(x),x]})}if(!t.computed){if(t.property.type!=="Identifier")throw new R("interpreter: dotted member without a name");let d=t.property.name;return c?L(function*(y){let x=yield*c(y);return[r.get(x,d),x]}):v(y=>{let x=u(y);return[r.get(x,d),x]})}let l=this.expr(t.property),p=l.s;if(c===null&&l.g===null)return v(d=>{let y=u(d);return[r.get(y,p(d)),y]});let h=T(a),m=T(l);return L(function*(d){let y=yield*h(d);return[r.get(y,yield*m(d)),y]})}if(t.type==="Identifier"){let a=this.analysis.ref(t);if(a.withs.length===0){let p=this.read(t);return v(h=>[p(h),void 0])}let u=t.name,c=this.withObjects(a),l=a.binding?this.bindingRead(a.binding,a.tdz):this.globalRead(u,!1);return v(p=>{for(let h=0;h<c.length;h++){let m=c[h](p);if(Tn(m,u))return[r.get(m,u),m]}return[l(p),void 0]})}if(t.type==="Super")throw new R("interpreter: super() is a super call");if(t.type==="ChainExpression"&&t.expression.type==="MemberExpression"&&!this.suspends(t)){let u=this.callee(t.expression,!0).s;return v(c=>{let l=u(c);return l[0]===re?[void 0,void 0]:l})}let i=n?this.chainPart(t):this.expr(t),s=i.s,o=i.g;return o?L(function*(a){return[yield*o(a),void 0]}):v(a=>[s(a),void 0])}argumentList(t){let n=this.argumentParts(t);if(Se(n,i=>i.code.g===null)){let i=ae(n,o=>o.code.s);if(!mt(n,o=>o.spread))switch(i.length){case 0:return v(()=>[]);case 1:{let o=i[0];return v(a=>[o(a)])}case 2:{let o=i[0],a=i[1];return v(u=>[o(u),a(u)])}case 3:{let o=i[0],a=i[1],u=i[2];return v(c=>[o(c),a(c),u(c)])}default:{let o=$n(i.length);return v(a=>{let u=it(o);for(let c=0;c<i.length;c++)u[c]=i[c](a);return u})}}let s=ae(n,o=>o.spread);return v(o=>{let a=j();for(let u=0;u<i.length;u++){let c=i[u](o);s[u]?_n(a,c):_(a,c)}return Te(a)})}let r=ae(n,i=>({spread:i.spread,g:T(i.code)}));return L(function*(i){let s=j();for(let o=0;o<r.length;o++){let a=r[o],u=yield*a.g(i);a.spread?_n(s,u):_(s,u)}return Te(s)})}plainArguments(t){for(let n=0;n<t.length;n++)if(t[n].type==="SpreadElement"||this.suspends(t[n]))return!1;return!0}argumentValues(t){let n=j();for(let r=0;r<t.length;r++){let i=t[r];_(n,i.type==="SpreadElement"?Pt:this.expr(i).s)}return n}call(t,n){if(t.callee.type==="Super")return this.superCallExpr(t);if(n&&this.suspends(t))return L(this.chainGen(t));let r=this.textOf(t.callee.start,t.callee.end),i=t.arguments;if(!n&&t.callee.type==="Identifier"&&i.length<=3&&this.plainArguments(i)&&this.analysis.ref(t.callee).withs.length===0){let p=this.read(t.callee),h=this.argumentValues(i),m=d=>{if(typeof d!="function")throw new M(`${r} is not a function`);return d};switch(h.length){case 0:return v(d=>m(p(d))());case 1:{let d=h[0];return v(y=>{let x=p(y),w=d(y);return m(x)(w)})}case 2:{let d=h[0],y=h[1];return v(x=>{let w=p(x),E=d(x),$=y(x);return m(w)(E,$)})}default:{let d=h[0],y=h[1],x=h[2];return v(w=>{let E=p(w),$=d(w),S=y(w),C=x(w);return m(E)($,S,C)})}}}let s=this.memberCall(t,n,r);if(s!==null)return s;let o=this.callee(t.callee,n),a=this.argumentList(i),u=t.optional;if(o.g===null&&a.g===null){let p=o.s,h=a.s;return v(m=>{let d=p(m),y=d[0],x=d[1];return y===re||u&&y==null?re:Mt(y,x,h(m),r)})}let c=T(o),l=T(a);return L(function*(p){let h=yield*c(p),m=h[0],d=h[1];return m===re||u&&m==null?re:Mt(m,d,yield*l(p),r)})}memberCall(t,n,r){let i=t.callee;if(i.type!=="MemberExpression"||i.object.type==="Super"||i.property.type==="PrivateIdentifier"||n||t.optional||t.arguments.length>3||this.suspends(t)||mt(t.arguments,h=>h.type==="SpreadElement"))return null;let s=ne(),o=this.expr(i.object).s,a=i.computed?this.expr(i.property).s:null,u=!i.computed&&i.property.type==="Identifier"?i.property.name:"",c=this.argumentValues(t.arguments),l=(h,m)=>s.get(h,a?a(m):u),p=()=>new M(`${r} is not a function`);switch(c.length){case 0:return v(h=>{let m=o(h),d=l(m,h);if(typeof d!="function")throw p();return z(d,m,[])});case 1:{let h=c[0];return v(m=>{let d=o(m),y=l(d,m),x=h(m);if(typeof y!="function")throw p();return z(y,d,[x])})}case 2:{let h=c[0],m=c[1];return v(d=>{let y=o(d),x=l(y,d),w=h(d),E=m(d);if(typeof x!="function")throw p();return z(x,y,[w,E])})}default:{let h=c[0],m=c[1],d=c[2];return v(y=>{let x=o(y),w=l(x,y),E=h(y),$=m(y),S=d(y);if(typeof w!="function")throw p();return z(w,x,[E,$,S])})}}}superCallExpr(t){let n=this.analysis.receivers.get(t.callee);if(!n||!n.thisBinding||!n.funcBinding||!n.newTargetBinding)throw new R("interpreter: super() outside a derived constructor");let r=this.envAt(this.hops(n)),i=n.thisBinding.slot,s=n.funcBinding.slot,o=n.newTargetBinding.slot,a=this.argumentList(t.arguments),u=(p,h)=>{let m=r(p),d=m[s];if(typeof d!="function")throw new R("interpreter: super() without its constructor");let y=ki(d,h,m[o]);if(m[i]!==Be)throw new dt("Super constructor may only be called once");return m[i]=y,Ko(d,y),y},c=a.s,l=a.g;return l?L(function*(p){return u(p,yield*l(p))}):v(p=>u(p,c(p)))}newExpr(t){let n=this.expr(t.callee),r=this.argumentList(t.arguments),i=this.textOf(t.callee.start,t.callee.end);if(n.g===null&&r.g===null){let a=n.s,u=r.s;return v(c=>{let l=a(c);return Ai(l,u(c),i)})}let s=T(n),o=T(r);return L(function*(a){let u=yield*s(a);return Ai(u,yield*o(a),i)})}arrayExpr(t){let n=this.elementParts(t.elements);if(Se(n,i=>i===null||i.code.g===null)){if(Se(n,s=>s!==null&&!s.spread)){let s=ae(n,o=>o?o.code.s:Pt);switch(s.length){case 0:return v(()=>[]);case 1:{let o=s[0];return v(a=>[o(a)])}case 2:{let o=s[0],a=s[1];return v(u=>[o(u),a(u)])}case 3:{let o=s[0],a=s[1],u=s[2];return v(c=>[o(c),a(c),u(c)])}case 4:{let o=s[0],a=s[1],u=s[2],c=s[3];return v(l=>[o(l),a(l),u(l),c(l)])}default:{let o=$n(s.length);return v(a=>{let u=it(o);for(let c=0;c<s.length;c++)u[c]=s[c](a);return u})}}}let i=ae(n,s=>s===null?null:{spread:s.spread,f:s.code.s});return v(s=>{let o=j(),a=j();for(let u=0;u<i.length;u++){let c=i[u];c===null?(_(a,o.length),o.length++):c.spread?_n(o,c.f(s)):_(o,c.f(s))}return Pi(o,a)})}let r=ae(n,i=>i===null?null:{spread:i.spread,g:T(i.code)});return L(function*(i){let s=j(),o=j();for(let a=0;a<r.length;a++){let u=r[a];if(u===null){_(o,s.length),s.length++;continue}let c=yield*u.g(i);u.spread?_n(s,c):_(s,c)}return Pi(s,o)})}propertyPart(t){if(t.type==="SpreadElement")return{kind:"spread",value:this.expr(t.argument)};let n=t.computed?{kind:"computed",computed:this.expr(t.key)}:{kind:"static",static:this.staticKey(t.key)};if(!t.computed&&!t.shorthand&&!t.method&&t.kind==="init"&&n.kind==="static"&&n.static==="__proto__")return{kind:"proto",value:this.expr(t.value)};if(t.kind!=="init"||t.method){if(t.value.type!=="FunctionExpression")throw new R("interpreter: method without a function");let r=n.kind==="static"?Ze(n.static,t.kind==="init"?void 0:t.kind):"";return{kind:t.kind==="init"?"method":t.kind,key:n,fi:this.functionInfo(t.value,r,void 0,this.sourceOf(t.start,t.value.end))}}return n.kind==="static"?{kind:"data",key:n,value:this.named(t.value,Ze(n.static)),named:null}:ea(t.value)?{kind:"data",key:n,value:null,named:this.namedAtRuntime(t.value)}:{kind:"data",key:n,value:this.expr(t.value),named:null}}objectExpr(t){let n=j();for(let a=0;a<t.properties.length;a++)_(n,this.propertyPart(t.properties[a]));let r=mt(n,a=>(a.kind==="spread"||a.kind==="proto")&&a.value.g!==null||(a.kind==="data"||a.kind==="method"||a.kind==="get"||a.kind==="set")&&a.key.kind==="computed"&&a.key.computed.g!==null||a.kind==="data"&&a.value!==null&&a.value.g!==null||a.kind==="data"&&a.named!==null&&a.named.g!==null);if(!r&&Se(n,a=>a.kind==="data"&&a.key.kind==="static"||a.kind==="method"&&a.key.kind==="static"||a.kind==="proto")){let a={},u=new Yr;for(let l=0;l<n.length;l++){let p=n[l];(p.kind==="data"||p.kind==="method")&&p.key.kind==="static"&&!u.has(p.key.static)&&(u.add(p.key.static),$t(a,p.key.static,void 0))}if(Se(n,l=>l.kind==="data")){if(n.length===0)return v(()=>({}));let l=ae(n,h=>h.kind==="data"&&h.key.kind==="static"?h.key.static:""),p=ae(n,h=>h.kind==="data"&&h.value!==null?h.value.s:Pt);return v(h=>{let m={...a};for(let d=0;d<l.length;d++)m[l[d]]=p[d](h);return m})}let c=ae(n,l=>{if(l.kind==="proto")return{proto:l.value.s,key:"",value:null,fi:null};if(l.kind==="data"&&l.key.kind==="static"&&l.value!==null)return{proto:null,key:l.key.static,value:l.value.s,fi:null};if(l.kind==="method"&&l.key.kind==="static")return{proto:null,key:l.key.static,value:null,fi:l.fi};throw new R("interpreter: object template")});return v(l=>{let p={...a};for(let h=0;h<c.length;h++){let m=c[h];if(m.proto!==null){let d=m.proto(l);(Y(d)||d===null)&&kn(p,d)}else m.fi!==null?p[m.key]=Ye(m.fi,l,p):m.value!==null&&(p[m.key]=m.value(l))}return p})}let i=(a,u)=>a.kind==="static"?a.static:Ve(a.computed.s(u)),s=J(function*(a,u){if(a.kind==="static")return a.static;let c=a.computed.g;return Ve(c?yield*c(u):a.computed.s(u))}),o=(a,u,c,l,p)=>{switch(u.kind){case"spread":Fn(a,l,null);return;case"proto":(Y(l)||l===null)&&kn(a,l);return;case"data":$t(a,c,l);return;case"method":{let h=Ye(u.fi,p,a,u.key.kind==="computed"?Ze(c):u.fi.name);$t(a,c,h);return}case"get":case"set":{let h=Ye(u.fi,p,a,u.key.kind==="computed"?Ze(c,u.kind):u.fi.name);vr(a,c,u.kind,h,!0);return}}};return r?L(function*(a){let u={};for(let c=0;c<n.length;c++){let l=n[c];if(l.kind==="spread"||l.kind==="proto"){let h=l.value.g;o(u,l,"",h?yield*h(a):l.value.s(a),a);continue}let p=yield*s(l.key,a);if(l.kind==="data"){let h;if(l.value!==null){let m=l.value.g;h=m?yield*m(a):l.value.s(a)}else if(l.named!==null){let m=l.named.g;h=m?yield*m(a,Ze(p)):l.named.s(a,Ze(p))}o(u,l,p,h,a)}else o(u,l,p,void 0,a)}return u}):v(a=>{let u={};for(let c=0;c<n.length;c++){let l=n[c];if(l.kind==="spread"||l.kind==="proto"){o(u,l,"",l.value.s(a),a);continue}let p=i(l.key,a);if(l.kind==="data"){let h=l.value!==null?l.value.s(a):l.named!==null?l.named.s(a,Ze(p)):void 0;o(u,l,p,h,a)}else o(u,l,p,void 0,a)}return u})}assignment(t){let n=ne(),r=t.left,i=t.operator;if(i==="="&&(r.type==="ObjectPattern"||r.type==="ArrayPattern")){let d=this.expr(t.right);if(this.suspends(r)){let E=this.patternBinderGen(r,!1),$=T(d);return L(function*(S){let C=yield*$(S);return yield*E(S,C),C})}let y=this.patternBinder(r,!1),x=d.s,w=d.g;return w?L(function*(E){let $=yield*w(E);return y(E,$),$}):v(E=>{let $=x(E);return y(E,$),$})}let s=i==="&&="||i==="||="||i==="??=",a=r.type==="Identifier"&&t.start===r.start&&(i==="="||s)&&r.type==="Identifier"?this.named(t.right,r.name):this.expr(t.right),u=i==="="||s?null:pl(Fe(i,0,-1),n),c=d=>i==="&&="?!d:i==="||="?!!d:d!=null,l=a.s;if(a.g===null&&r.type==="Identifier"){let d=this.writer(r);if(i==="=")return v(x=>{let w=l(x);return d(x,w),w});let y=this.read(r);return u!==null?v(x=>{let w=u(y(x),l(x));return d(x,w),w}):v(x=>{let w=y(x);if(c(w))return w;let E=l(x);return d(x,E),E})}if(a.g===null&&r.type==="MemberExpression"&&r.object.type!=="Super"&&r.property.type!=="PrivateIdentifier"){let d=this.expr(r.object),y=r.computed?this.expr(r.property):null;if(d.g===null&&(y===null||y.g===null)){let x=d.s,w=this.scope.strict?n.set:n.setSloppy;if(y===null){if(r.property.type!=="Identifier")throw new R("interpreter: dotted member without a name");let $=r.property.name;return i==="="?v(S=>{let C=x(S),F=l(S);return w(C,$,F),F}):u!==null?v(S=>{let C=x(S),F=u(n.get(C,$),l(S));return w(C,$,F),F}):v(S=>{let C=x(S),F=n.get(C,$);if(c(F))return F;let B=l(S);return w(C,$,B),B})}let E=y.s;return i==="="?v($=>{let S=x($),C=E($),F=l($);return w(S,C,F),F}):v($=>{let S=x($),C=E($);if(S==null)throw kr(S,C);let F=Oi(C),B=n.get(S,F);if(u===null&&c(B))return B;let W=u!==null?u(B,l($)):l($);return w(S,F,W),W})}}let p=this.reference(r),h=a.g;if(i==="="){if(p.g===null&&h===null){let y=p.s;return v(x=>{let w=y(x),E=l(x);return w.set(E),E})}let d=T(p);return L(function*(y){let x=yield*d(y),w=h?yield*h(y):l(y);return x.set(w),w})}if(p.g===null&&h===null){let d=p.s;return v(y=>{let x=d(y),w=x.get();if(u===null&&c(w))return w;let E=u!==null?u(w,l(y)):l(y);return x.set(E),E})}let m=T(p);return L(function*(d){let y=yield*m(d),x=y.get();if(u===null&&c(x))return x;let w=h?yield*h(d):l(d),E=u!==null?u(x,w):w;return y.set(E),E})}reference(t){let n=ne();if(t.type==="Identifier"){let p=this.read(t),h=this.writer(t);return{s:m=>({get:()=>p(m),set:d=>h(m,d)}),g:null}}if(t.type!=="MemberExpression")throw new R(`interpreter: ${t.type} is not a simple assignment target`);let r=this.scope.strict,i=r?n.set:n.setSloppy;if(t.object.type==="Super"){let p=this.homeObject(t.object),h=this.thisValue(t.object),m=this.memberKey(t);return{s:d=>{let y=h(d),x=m(d),w=null,E=()=>w===null?w=Ve(x):w,$=St(p(d));return{get:()=>Y($)?g($,E(),y):void 0,set:S=>{let C=E();if(!Y($)||!Xn($,C,S,y)&&r)throw new M(`Cannot assign to read only property '${te(C)}' of object`)}}},g:null}}let s=this.expr(t.object);if(t.property.type==="PrivateIdentifier"){let p=this.privateName(t.property),h=s.s,m=s.g,d=(y,x)=>({get:()=>x.get(y),set:w=>x.set(y,w)});return{s:y=>d(h(y),p(y)),g:m?J(function*(y){return d(yield*m(y),p(y))}):null}}let o=t.computed?this.expr(t.property):null,a=!t.computed&&t.property.type==="Identifier"?t.property.name:"",u=(p,h)=>{if(p==null)throw kr(p,h);let m=null,d=()=>m===null?m=Ve(h):m;return{get:()=>n.get(p,d()),set:y=>i(p,d(),y)}};if(o===null){let p=s.s,h=s.g;return{s:m=>{let d=p(m);return{get:()=>n.get(d,a),set:y=>i(d,a,y)}},g:h?J(function*(m){let d=yield*h(m);return{get:()=>n.get(d,a),set:y=>i(d,a,y)}}):null}}if(s.g===null&&o.g===null){let p=s.s,h=o.s;return{s:m=>{let d=p(m);return u(d,h(m))},g:null}}let c=T(s),l=T(o);return L(function*(p){let h=yield*c(p);return u(h,yield*l(p))})}update(t){let n=ne(),r=t.operator==="++",i=t.prefix,s=(l,p)=>{if(typeof l=="number"){let d=r?l+1:l-1;return p(d),i?d:l}let h=n.numeric(l),m=r?n.increment(h):n.decrement(h);return p(m),i?m:h},o=t.argument;if(o.type==="Identifier"){let l=this.analysis.ref(o),p=l.binding;if(p&&!l.tdz&&l.withs.length===0&&(p.kind==="var"||p.kind==="let"||p.kind==="param")&&this.hops(p.scope)===0){let d=p.slot;return v(y=>{let x=y[d];if(typeof x=="number"){let w=r?x+1:x-1;return y[d]=w,i?w:x}return s(x,w=>{y[d]=w})})}let h=this.read(o),m=this.writer(o);return v(d=>{let y=h(d);if(typeof y=="number"){let x=r?y+1:y-1;return m(d,x),i?x:y}return s(y,x=>m(d,x))})}if(o.type==="MemberExpression"&&o.object.type!=="Super"&&o.property.type!=="PrivateIdentifier"){let l=this.expr(o.object),p=o.computed?this.expr(o.property):null;if(l.g===null&&(p===null||p.g===null)){let h=l.s,m=this.scope.strict?n.set:n.setSloppy,d=!o.computed&&o.property.type==="Identifier"?o.property.name:"",y=p?p.s:null;return v(x=>{let w=h(x),E=y?y(x):d;if(w==null)throw kr(w,E);let $=Oi(E),S=n.get(w,$);if(typeof S=="number"){let C=r?S+1:S-1;return m(w,$,C),i?C:S}return s(S,C=>m(w,$,C))})}}let a=this.reference(o),u=a.s,c=a.g;return c?L(function*(l){let p=yield*c(l);return s(p.get(),h=>p.set(h))}):v(l=>{let p=u(l);return s(p.get(),h=>p.set(h))})}classCode(t,n){let r=this.classMaker(t),i=r.s,s=r.g;return s?L(function*(o){return yield*s(o,n)}):v(o=>i(o,n))}classMaker(t){let n=this.analysis.classes.get(t);if(!n)throw new R("interpreter: class without analysis");let r=n.scope,i=this.scopeEntry(r),s=this.enter(r),o=t.superClass?this.expr(t.superClass):null,a=this.classPlan(t,n.instanceFields,n.staticFields,r);return this.scope=s,Jo(i,o,a)}classPlan(t,n,r,i){let s=t.body,o=!!t.superClass,a=xo(s.body,$=>$.type==="MethodDefinition"&&$.kind==="constructor"),u=a<0?null:s.body[a],c=u!==null&&u.type==="MethodDefinition"?u:null,l=t.id?t.id.name:"",p=this.sourceOf(t.start,t.end),h;c?h=this.functionInfo(c.value,l,o?"classDerived":"classBase",p):(h=new xt(o?"classDerived":"classBase",l,0,!0,p),h.implicit=!0);let m=t.id?i.bindings.get(t.id.name)??null:null,d=m?this.slotWriter(0,m.slot):null,y=j(),x=j(),w=j(),E=new Yr;for(let $=0;$<s.body.length;$++){let S=s.body[$];if(S.type==="StaticBlock"){_(x,{kind:"static",fi:this.staticBlockInfo(S)});continue}if(S.type==="MethodDefinition"&&S.kind==="constructor")continue;let C,F=null;if(S.key.type==="PrivateIdentifier"){let oe=`#${S.key.name}`,ve=i.bindings.get(oe);if(!ve)throw new R("interpreter: private name without a binding");E.has(oe)||(E.add(oe),_(w,{slot:ve.slot,kind:S.type==="PropertyDefinition"?"field":S.kind==="method"?"method":"accessor",description:oe})),C={kind:"private",private:this.privateName(S.key)},F=oe}else if(S.computed)C={kind:"computed",computed:y.length},_(y,this.expr(S.key));else{let oe=this.staticKey(S.key);C={kind:"static",static:oe},F=Ze(oe)}if(S.type==="MethodDefinition"){let oe=S.kind==="get"||S.kind==="set"?S.kind:null,ve=F===null?"":oe?`${oe} ${F}`:F,Dn=this.sourceOf(S.static?this.afterStatic(S.start):S.start,S.value.end);_(x,{kind:"method",isStatic:S.static,key:C,fi:this.functionInfo(S.value,ve,void 0,Dn),accessor:oe});continue}let B=S.static?r:n,W=null,Ne=null;if(S.value){if(!B)throw new R("interpreter: field without a scope");let oe=this.enterFunction(B,"method");F!==null?W=this.named(S.value,F).s:Ne=this.namedAtRuntime(S.value).s,this.leave(oe)}_(x,{kind:"field",isStatic:S.static,key:C,value:W,named:Ne})}return{ctorInfo:h,writeInner:d,elements:x,privateNames:w,computedKeys:y,instanceFi:n?this.fieldInfo(n):null,staticFi:r?this.fieldInfo(r):null}}afterStatic(t){return bo(this.text,t+6)}enterFunction(t,n){let r={scope:this.scope,shape:this.shape};return this.scope=t,this.shape=n,r}leave(t){this.scope=t.scope,this.shape=t.shape}fieldInfo(t){let n=new xt("method","",0,!0,"");return n.frame=ut(t.size,[]),t.thisBinding&&(n.thisSlot=t.thisBinding.slot),t.homeBinding&&(n.homeSlot=t.homeBinding.slot),n}staticBlockInfo(t){let n=this.analysis.functionScopeOf(t),r=new xt("method","",0,!0,""),i=this.enterFunction(n,"method");r.frame=ut(n.size,[]),n.thisBinding&&(r.thisSlot=n.thisBinding.slot),n.homeBinding&&(r.homeSlot=n.homeBinding.slot);let s=this.scopeEntry(n,!0);return r.body=this.entered(s,this.statementList(t.body)).s,this.leave(i),r}programBody(t,n){let r=this.scopeEntry(n,!0),i=Te(n.globalVars),s=this.entered(r,this.statementList(t.body));if(i.length===0)return s;let o=a=>{for(let u=0;u<i.length;u++){let c=i[u];De(tt,c)||vn(tt,c,Oe(void 0,!0,!0,!1))}return a};return this.entered(o,s)}commonJsFunction(t,n,r){let i=new xt("plain","",r.length,n.strict,this.unit.source);i.frame=ut(n.size,[]),n.thisBinding&&(i.thisSlot=n.thisBinding.slot),n.argumentsBinding&&(i.argumentsSlot=n.argumentsBinding.slot);let s=j();for(let a=0;a<r.length;a++)_(s,nn(n,r[a]));i.params=Te(s);let o=this.programBody(t,n);if(o.g!==null)throw new ge("await at the top level of a CommonJS module");return i.body=o.s,i}modulePlan(t,n){let r=j(),i=j(),s=j();for(let u=0;u<t.body.length;u++){let c=t.body[u];if(c.type==="ImportDeclaration"){let l=j();for(let p=0;p<c.specifiers.length;p++){let h=c.specifiers[p],m=n.bindings.get(h.local.name);if(!m)throw new R("interpreter: import binding");h.type==="ImportDefaultSpecifier"?this.unit.imports.set(m,{kind:"default",name:"default"}):h.type==="ImportNamespaceSpecifier"?this.unit.imports.set(m,{kind:"namespace",name:"*"}):this.unit.imports.set(m,{kind:"named",name:Nn(h.imported)}),_(l,{slot:m.slot,namespace:h.type==="ImportNamespaceSpecifier"})}_(r,{source:Fi(c.source),slot:null,bindings:Te(l)})}else if(c.type==="ExportAllDeclaration"){let l=n.size++;_(r,{source:Fi(c.source),slot:l,bindings:[]}),c.exported?_(i,{name:Nn(c.exported),read:{kind:"namespace",slot:l}}):_(s,l)}else if(c.type==="ExportNamedDeclaration"&&c.source){let l=n.size++;_(r,{source:Fi(c.source),slot:l,bindings:[]});for(let p=0;p<c.specifiers.length;p++){let h=c.specifiers[p];_(i,{name:Nn(h.exported),read:{kind:"reexport",slot:l,name:Nn(h.local)}})}}}for(let u=0;u<t.body.length;u++){let c=t.body[u];if(c.type==="ExportNamedDeclaration"&&!c.source){if(c.declaration){let l=c.declaration,p=j();if(l.type==="VariableDeclaration")for(let h=0;h<l.declarations.length;h++)gt(l.declarations[h].id,p);else _(p,l.id);for(let h=0;h<p.length;h++)_(i,{name:p[h].name,read:{kind:"binding",read:this.rootRead(n,p[h].name)}})}for(let l=0;l<c.specifiers.length;l++){let p=c.specifiers[l];if(p.local.type!=="Identifier")throw new R("interpreter: string export of a local");_(i,{name:Nn(p.exported),read:{kind:"binding",read:this.rootRead(n,p.local.name)}})}}else if(c.type==="ExportDefaultDeclaration"){let l=c.declaration,p=(l.type==="FunctionDeclaration"||l.type==="ClassDeclaration")&&l.id?l.id.name:"*default*";_(i,{name:"default",read:{kind:"binding",read:this.rootRead(n,p)}})}}let o=this.scopeEntry(n,!0),a=this.moduleStatements(t);return{frame:ut(n.size,[]),exportsSlot:nn(n,"%exports"),requireSlot:nn(n,"%require"),moduleSlot:nn(n,"%module"),filenameSlot:nn(n,"%filename"),dirnameSlot:nn(n,"%dirname"),imports:Te(r),exports:Te(i),stars:Te(s),instantiate:o,body:a}}moduleStatements(t){let n=this.shape;this.shape="async";try{return this.statementList(t.body)}finally{this.shape=n}}rootRead(t,n){let r=t.bindings.get(n);if(!r)throw new R(`interpreter: export of undeclared ${n}`);r.declEnd>=0&&(r.tdz=!0);let i=this.enter(t),s=this.bindingRead(r,r.tdz);return this.scope=i,s}};function pl(e,t){switch(e){case"+":return(n,r)=>typeof n=="number"&&typeof r=="number"?n+r:t.add(n,r);case"-":return t.sub;case"*":return t.mul;case"/":return t.div;case"%":return t.mod;case"**":return t.exp;case"<<":return t.shl;case">>":return t.shr;case">>>":return t.ushr;case"&":return t.and;case"|":return t.or;case"^":return t.xor;default:throw new R(`interpreter: operator ${e}`)}}function fl(e,t){switch(t.kind){case"binding":{let n=t.read;return()=>n(e)}case"reexport":{let{slot:n,name:r}=t,i=ne();return r!=="default"?()=>i.get(e[n],r):()=>{let s=e[n];return Y(s)&&g(s,"__esModule")?i.get(s,"default"):s}}case"namespace":{let n=t.slot,r=null;return()=>(r===null&&(r=ia(e[n])),r)}}}function ra(e){let{frame:t,exportsSlot:n,requireSlot:r,moduleSlot:i,filenameSlot:s,dirnameSlot:o,imports:a,exports:u,stars:c,instantiate:l,body:p}=e,h=ne(),m=p.s,d=p.g;return(y,x,w,E,$)=>{let S=st(t,0,en);if(S[n]=y,S[r]=x,S[i]=w,S[s]=E,S[o]=$,typeof x!="function")throw new M("require is not a function");let C={};_e(C,"__esModule",Oe(!0,!1,!1,!1));for(let F=0;F<u.length;F++){let{name:B,read:W}=u[F];De(C,B)||_e(C,B,Yt("get",fl(S,W),!0,!1))}h.set(w,"exports",C),l!==null&&l(S);for(let F=0;F<a.length;F++){let{source:B,slot:W,bindings:Ne}=a[F],oe=z(x,void 0,[B]);W!==null&&(S[W]=oe);for(let ve=0;ve<Ne.length;ve++)S[Ne[ve].slot]=Ne[ve].namespace?ia(oe):oe}for(let F=0;F<c.length;F++){let B=S[c[F]];if(!Y(B))continue;let W=qr(B);for(let Ne=0;Ne<W.length;Ne++){let oe=W[Ne];oe==="default"||De(C,oe)||_e(C,oe,Yt("get",()=>h.get(B,oe),En(B,oe),!1))}}if(d===null){m(S);return}return hl(d(S))}}function ia(e){let t=qt(Y(e)?St(e):null);if((!Y(e)||!g(e,"__esModule"))&&_e(t,"default",Oe(e,!1,!0,!1)),Y(e)){let n=qr(e);for(let r=0;r<n.length;r++){let i=n[r];De(t,i)||_e(t,i,Yt("get",()=>g(e,i),En(e,i),!1))}}return t}async function hl(e){let t=Zr(e,void 0);for(;!t.done;){let n,r=!0;try{n=await t.value}catch(i){r=!1,n=i}t=r?Zr(e,n):mo(e,n)}}var sa=["exports","require","module","__filename","__dirname"],dl={".ts":!0,".mts":!0,".cts":!0,".tsx":!0,".jsx":!0},ml=A({ecmaVersion:"latest",allowHashBang:!0,sourceType:"module"}),yl=A({ecmaVersion:"latest",allowHashBang:!0,sourceType:"script",allowReturnOutsideFunction:!0}),gl=A({ecmaVersion:"latest",allowHashBang:!0,sourceType:"script"});function oa(e){let t=Fe(e,sr(e,"/")+1),n=sr(t,".");return n>0?Fe(t,n):""}function ca(e){let t=e.length;for(;;){let n=t;for(;n>0&&ar(be(e,n-1));)n--;let r=sr(e,`
|
|
23
|
+
`,n-1)+1,i=r;for(;i<n&&ar(be(e,i));)i++;let s=i+1<n&&be(e,i)===47&&be(e,i+1)===47;if(r===0||!s)return t===e.length?e:Fe(e,0,t);t=r-1}}function aa(e,t){let n=ca(e);if(n!==e)try{return ft(n,t)}catch{}return ft(e,t)}function xl(e){let t=0;for(;t<e.length&&be(e,t)===47;)t++;return t}function bl(e){return mt(e.body,t=>t.type==="ImportDeclaration"||t.type==="ExportNamedDeclaration"||t.type==="ExportDefaultDeclaration"||t.type==="ExportAllDeclaration")}var Ti={SyntaxError:rr,scriptOptions:A({ecmaVersion:"latest",sourceType:"script"}),messageOf(e){let t=Y(e)?g(e,"message"):void 0;return typeof t=="string"?t:te(e)}},ua=null;function Er(e,t,n,r){return{source:e,module:t,host:n,imports:new Le,moduleScope:r}}function Ep(e,t){if(t.primordials!==io)throw new R("interpreter: its built-ins were not captured at the launch start");ua!==e&&(zo(e),ua=e);let n={compileFunction(r,i,s){let o=ca(s),a;try{a=zr(r,i,o,Ti)}catch(d){if(o===s)throw d;a=zr(r,i,s,Ti)}let u=a.text,c=wo(a.node),l=Ro(c),p=l.functionScopeOf(c),h=Er(u,!1,{dynamicImport:(d,y)=>t.dynamicImport(void 0,d,y)},null),m=new It(l,h,u,0,p).rootFunction(c,"anonymous",Ws(r,i,s));return Ct(p),Ye(m,en,void 0)},compileModule(r,i){if(dl[oa(r)])throw new ge(`${oa(r)} source`);let s=Fe(r,0,5)==="data:"?"data:text/javascript,":`file:///${Fe(r,xl(r))}`,o={dynamicImport:(m,d)=>t.dynamicImport(s,m,d)},a=m=>{let d=hi(m,{kind:"module",strict:!0}),y=d.functionScopeOf(m),x=ra(new It(d,Er(i,!0,o,y),i,0,y).modulePlan(m,y));return Ct(y),x},u=null;try{u=Zt(aa(i,ml))}catch{}if(u!==null&&bl(u))return a(u);let c;try{c=Zt(aa(i,yl))}catch(m){if(u===null)throw m;return a(u)}let l=Bo(c,sa),p=l.functionScopeOf(c),h=new It(l,Er(i,!1,o,null),i,0,p).commonJsFunction(c,p,sa);return Ct(p),Ye(h,en,void 0)},compileExpression(r){let i=qs(r,Ti);if(i===null)throw new ge("a vm script that is not one expression");let s=Hs(Fe(r,0,i.prologueEnd),Fe(r,i.start,i.end));return n.compileFunction("function",[],s)},runScript(r){let i=Zt(ft(r,gl)),s=hi(i,{kind:"script",strict:!1}),o=s.functionScopeOf(i),a=Er(r,!1,{dynamicImport:(c,l)=>t.dynamicImport(void 0,c,l)},null),u=new It(s,a,r,0,o).programBody(i,o);if(Ct(o),u.g!==null)throw new ge("await in a script");u.s(st(ut(o.size,[]),0,en))}};return n}module.exports = { "INTERPRETER_UNSUPPORTED": ai, "UnsupportedSyntax": ge, "createInterpreter": Ep };
|