"use strict";exports.init=init;exports.initSync=initSync;exports.parse=parse;let A;const B=1===new Uint8Array(new Uint16Array([1]).buffer)[0];function parse(E,g="@"){if(!A)throw new Error("Not initialized");const w=E.length+1,D=(A.__heap_base.value||A.__heap_base)+4*w-A.memory.buffer.byteLength;D>0&&A.memory.grow(Math.ceil(D/65536));const G=A.sa(w);(B?C:I)(E,new Uint16Array(A.memory.buffer,G,w));const S=A.parseCJS(G,E.length,0,0,0);if(S){const B=new Error(`Parse error ${g}${A.e()}:${E.slice(0,A.e()).split("\n").length}:${A.e()-E.lastIndexOf("\n",A.e()-1)}`);throw Object.assign(B,{idx:A.e()}),5!==S&&6!==S&&7!==S||Object.assign(B,{code:"ERR_LEXER_ESM_SYNTAX"}),B}let o=new Set,R=new Set,y=new Set;for(;A.rre();){const B=Q(E.slice(A.res(),A.ree()));B&&R.add(B)}for(;A.ru();)y.add(Q(E.slice(A.us(),A.ue())));for(;A.re();){let B=Q(E.slice(A.es(),A.ee()));void 0===B||y.has(B)||o.add(B)}return{exports:[...o],reexports:[...R]}}function Q(A){if('"'!==A[0]&&"'"!==A[0])return A;try{const B=function(A){const B=A[0];if('"'===B)try{return JSON.parse(A)}catch{}else if("'"===B&&A.length>1&&"'"===A[A.length-1]&&-1===A.indexOf('"'))try{return JSON.parse('"'+A.slice(1,-1)+'"')}catch{}let Q="",g={v:1};for(;g.v<A.length;){const I=A[g.v];switch(I){case B:return Q;case"\\":++g.v,Q+=E(A,g);break;case"\r":case"\n":throw new SyntaxError;default:++g.v,Q+=I}}throw new SyntaxError}(A);for(let A=0;A<B.length;A++){const Q=64512&B.charCodeAt(A);if(!(Q<55296)){if(55296!==Q)return;if(56320!=(64512&B.charCodeAt(++A)))return}}return B}catch{}}function E(A,B){if(B.v===A.length)throw new SyntaxError;const Q=A[B.v];switch(++B.v,Q){case"\r":"\n"===A[B.v]&&++B.v;case"\n":case"\u2028":case"\u2029":return"";case"r":return"\r";case"n":return"\n";case"t":return"\t";case"b":return"\b";case"f":return"\f";case"v":return"\v";case"x":return function(A,B){const Q=g(A[B.v]);++B.v;const E=g(A[B.v]);return++B.v,String.fromCodePoint(16*Q+E)}(A,B);case"u":return function(A,B){let Q=0;if("{"===A[B.v]){++B.v;do{if(Q=16*Q+g(A[B.v]),Q>1114111)throw new SyntaxError;++B.v}while("}"!==A[B.v]);++B.v}else for(let E=0;E<4;++E)Q=16*Q+g(A[B.v]),++B.v;return String.fromCodePoint(Q)}(A,B);case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":return function(A,B,Q){let E=A<="3"?2:1,g=+A;do{if((A=B[Q.v])<"0"||A>"7")break;g=8*g+ +A,++Q.v,--E}while(E>0);return String.fromCodePoint(g)}(Q,A,B);default:return Q}}function g(A){if(A>="0"&&A<="9")return+A;if(A>="a"&&A<="f")return A.charCodeAt(0)-87;if(A>="A"&&A<="F")return A.charCodeAt(0)-55;throw new SyntaxError}function I(A,B){const Q=A.length;let E=0;for(;E<Q;){const Q=A.charCodeAt(E);B[E++]=(255&Q)<<8|Q>>>8}}function C(A,B){const Q=A.length;let E=0;for(;E<Q;)B[E]=A.charCodeAt(E++)}function w(){const A="[encoded data, 29556 characters]";return"undefined"!=typeof Buffer?Buffer.from(A,"base64"):Uint8Array.from(atob(A),A=>A.charCodeAt(0))}let D;function init(){return D||(D=(async()=>{const B=await WebAssembly.compile(w()),{exports:Q}=await WebAssembly.instantiate(B);A=Q})())}function initSync(){if(A)return;const B=new WebAssembly.Module(w()),{exports:Q}=new WebAssembly.Instance(B);A=Q}