@willbooster/web-tree-sitter 17.1.3 → 18.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/debug/web-tree-sitter.wasm +0 -0
- package/debug/web-tree-sitter.wasm.map +3 -3
- package/package.json +1 -1
- package/web-tree-sitter.cjs +3 -3
- package/web-tree-sitter.cjs.map +3 -3
- package/web-tree-sitter.js +4 -4
- package/web-tree-sitter.js.map +3 -3
- package/web-tree-sitter.wasm +0 -0
- package/web-tree-sitter.wasm.map +9 -9
- package/web-tree-sitter.web.js +3 -3
- package/web-tree-sitter.web.js.map +3 -3
package/package.json
CHANGED
package/web-tree-sitter.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var Le=Object.create;var ee=Object.defineProperty;var Ue=Object.getOwnPropertyDescriptor;var Ve=Object.getOwnPropertyNames;var We=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty;var a=(e,t)=>ee(e,"name",{value:t,configurable:!0});var qe=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},He=(e,t)=>{for(var r in t)ee(e,r,{get:t[r],enumerable:!0})},we=(e,t,r,_)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ve(t))!De.call(e,s)&&s!==r&&ee(e,s,{get:()=>t[s],enumerable:!(_=Ue(t,s))||_.enumerable});return e};var ye=(e,t,r)=>(r=e!=null?Le(We(e)):{},we(t||!e||!e.__esModule?ee(r,"default",{value:e,enumerable:!0}):r,e)),Qe=e=>we(ee({},"__esModule",{value:!0}),e);var Se=qe((exports,module)=>{"use strict";var Module=(()=>{var _scriptName=typeof document<"u"?document.currentScript?.src:void 0;return async function(moduleArg={}){var moduleRtn,Module=moduleArg,ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof WorkerGlobalScope<"u",ENVIRONMENT_IS_NODE=typeof process=="object"&&process.versions?.node&&process.type!="renderer";Module.currentQueryProgressCallback=null,Module.currentProgressCallback=null,Module.currentLogCallback=null,Module.currentParseCallback=null,Module.treeSitterSetMemoryLimit=function(e){return e?wasmMemory.buffer.byteLength>e||Module.treeSitterOriginalMemoryGrow?!1:(Module.treeSitterOriginalMemoryGrow=wasmMemory.grow,wasmMemory.grow=function(t){if(wasmMemory.buffer.byteLength+t*65536>e)throw new RangeError("Parse memory limit exceeded");return Module.treeSitterOriginalMemoryGrow.call(wasmMemory,t)},!0):(Module.treeSitterOriginalMemoryGrow&&(wasmMemory.grow=Module.treeSitterOriginalMemoryGrow,Module.treeSitterOriginalMemoryGrow=null),!0)};var arguments_=[],thisProgram="./this.program",quit_=a((e,t)=>{throw t},"quit_");typeof __filename<"u"?_scriptName=__filename:ENVIRONMENT_IS_WORKER&&(_scriptName=self.location.href);var scriptDirectory="";function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}a(locateFile,"locateFile");var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs");scriptDirectory=__dirname+"/",readBinary=a(e=>{e=isFileURI(e)?new URL(e):e;var t=fs.readFileSync(e);return t},"readBinary"),readAsync=a(async(e,t=!0)=>{e=isFileURI(e)?new URL(e):e;var r=fs.readFileSync(e,t?void 0:"utf8");return r},"readAsync"),process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),quit_=a((e,t)=>{throw process.exitCode=e,t},"quit_")}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}ENVIRONMENT_IS_WORKER&&(readBinary=a(e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},"readBinary")),readAsync=a(async e=>{if(isFileURI(e))return new Promise((r,_)=>{var s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="arraybuffer",s.onload=()=>{if(s.status==200||s.status==0&&s.response){r(s.response);return}_(s.status)},s.onerror=_,s.send(null)});var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw new Error(t.status+" : "+t.url)},"readAsync")}var out=console.log.bind(console),err=console.error.bind(console),dynamicLibraries=[],wasmBinary,ABORT=!1,EXITSTATUS,isFileURI=a(e=>e.startsWith("file://"),"isFileURI"),readyPromiseResolve,readyPromiseReject,wasmMemory,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,HEAP64,HEAPU64,HEAP_DATA_VIEW,runtimeInitialized=!1;function updateMemoryViews(){var e=wasmMemory.buffer;Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=HEAP16=new Int16Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),Module.HEAPF32=HEAPF32=new Float32Array(e),Module.HEAPF64=HEAPF64=new Float64Array(e),Module.HEAP64=HEAP64=new BigInt64Array(e),Module.HEAPU64=HEAPU64=new BigUint64Array(e),Module.HEAP_DATA_VIEW=HEAP_DATA_VIEW=new DataView(e),LE_HEAP_UPDATE()}a(updateMemoryViews,"updateMemoryViews");function initMemory(){if(Module.wasmMemory)wasmMemory=Module.wasmMemory;else{var e=Module.INITIAL_MEMORY||33554432;wasmMemory=new WebAssembly.Memory({initial:e/65536,maximum:32768})}updateMemoryViews()}a(initMemory,"initMemory");var __RELOC_FUNCS__=[];function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(onPreRuns)}a(preRun,"preRun");function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),wasmExports.__wasm_call_ctors(),callRuntimeCallbacks(onPostCtors)}a(initRuntime,"initRuntime");function preMain(){}a(preMain,"preMain");function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(onPostRuns)}a(postRun,"postRun");function abort(e){Module.onAbort?.(e),e="Aborted("+e+")",err(e),ABORT=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw readyPromiseReject?.(t),t}a(abort,"abort");var wasmBinaryFile;function findWasmBinary(){return locateFile("web-tree-sitter.wasm")}a(findWasmBinary,"findWasmBinary");function getBinarySync(e){if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}a(getBinarySync,"getBinarySync");async function getWasmBinary(e){if(!wasmBinary)try{var t=await readAsync(e);return new Uint8Array(t)}catch{}return getBinarySync(e)}a(getWasmBinary,"getWasmBinary");async function instantiateArrayBuffer(e,t){try{var r=await getWasmBinary(e),_=await WebAssembly.instantiate(r,t);return _}catch(s){err(`failed to asynchronously prepare wasm: ${s}`),abort(s)}}a(instantiateArrayBuffer,"instantiateArrayBuffer");async function instantiateAsync(e,t,r){if(!e&&!isFileURI(t)&&!ENVIRONMENT_IS_NODE)try{var _=fetch(t,{credentials:"same-origin"}),s=await WebAssembly.instantiateStreaming(_,r);return s}catch(o){err(`wasm streaming compile failed: ${o}`),err("falling back to ArrayBuffer instantiation")}return instantiateArrayBuffer(t,r)}a(instantiateAsync,"instantiateAsync");function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}a(getWasmImports,"getWasmImports");async function createWasm(){function e(o,l){wasmExports=o.exports,wasmExports=relocateExports(wasmExports,1024);var u=getDylinkMetadata(l);u.neededDynlibs&&(dynamicLibraries=u.neededDynlibs.concat(dynamicLibraries));let c={malloc:wasmExports.ts_scanner_malloc_wasm,calloc:wasmExports.ts_scanner_calloc_wasm,realloc:wasmExports.ts_scanner_realloc_wasm};return Object.assign(wasmImports,c),updateGOT(c,!0),mergeLibSymbols(wasmExports,"main"),LDSO.init(),loadDylibs(),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),assignWasmExports(wasmExports),wasmExports}a(e,"receiveInstance");function t(o){return e(o.instance,o.module)}a(t,"receiveInstantiationResult");var r=getWasmImports();if(Module.instantiateWasm)return new Promise((o,l)=>{Module.instantiateWasm(r,(u,c)=>{o(e(u,c))})});wasmBinaryFile??=findWasmBinary();var _=await instantiateAsync(wasmBinary,wasmBinaryFile,r),s=t(_);return s}a(createWasm,"createWasm");class ExitStatus{static{a(this,"ExitStatus")}name="ExitStatus";constructor(t){this.message=`Program terminated with exit(${t})`,this.status=t}}var GOT={},currentModuleWeakSymbols=new Set([]),GOTHandler={get(e,t){var r=GOT[t];return r||(r=GOT[t]=new WebAssembly.Global({value:"i32",mutable:!0})),currentModuleWeakSymbols.has(t)||(r.required=!0),r}},LE_ATOMICS_NATIVE_BYTE_ORDER=[],LE_HEAP_LOAD_F32=a(e=>HEAP_DATA_VIEW.getFloat32(e,!0),"LE_HEAP_LOAD_F32"),LE_HEAP_LOAD_F64=a(e=>HEAP_DATA_VIEW.getFloat64(e,!0),"LE_HEAP_LOAD_F64"),LE_HEAP_LOAD_I16=a(e=>HEAP_DATA_VIEW.getInt16(e,!0),"LE_HEAP_LOAD_I16"),LE_HEAP_LOAD_I32=a(e=>HEAP_DATA_VIEW.getInt32(e,!0),"LE_HEAP_LOAD_I32"),LE_HEAP_LOAD_I64=a(e=>HEAP_DATA_VIEW.getBigInt64(e,!0),"LE_HEAP_LOAD_I64"),LE_HEAP_LOAD_U32=a(e=>HEAP_DATA_VIEW.getUint32(e,!0),"LE_HEAP_LOAD_U32"),LE_HEAP_STORE_F32=a((e,t)=>HEAP_DATA_VIEW.setFloat32(e,t,!0),"LE_HEAP_STORE_F32"),LE_HEAP_STORE_F64=a((e,t)=>HEAP_DATA_VIEW.setFloat64(e,t,!0),"LE_HEAP_STORE_F64"),LE_HEAP_STORE_I16=a((e,t)=>HEAP_DATA_VIEW.setInt16(e,t,!0),"LE_HEAP_STORE_I16"),LE_HEAP_STORE_I32=a((e,t)=>HEAP_DATA_VIEW.setInt32(e,t,!0),"LE_HEAP_STORE_I32"),LE_HEAP_STORE_I64=a((e,t)=>HEAP_DATA_VIEW.setBigInt64(e,t,!0),"LE_HEAP_STORE_I64"),LE_HEAP_STORE_U32=a((e,t)=>HEAP_DATA_VIEW.setUint32(e,t,!0),"LE_HEAP_STORE_U32"),callRuntimeCallbacks=a(e=>{for(;e.length>0;)e.shift()(Module)},"callRuntimeCallbacks"),onPostRuns=[],addOnPostRun=a(e=>onPostRuns.push(e),"addOnPostRun"),onPreRuns=[],addOnPreRun=a(e=>onPreRuns.push(e),"addOnPreRun"),UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder:void 0,findStringEnd=a((e,t,r,_)=>{var s=t+r;if(_)return s;for(;e[t]&&!(t>=s);)++t;return t},"findStringEnd"),UTF8ArrayToString=a((e,t=0,r,_)=>{var s=findStringEnd(e,t,r,_);if(s-t>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,s));for(var o="";t<s;){var l=e[t++];if(!(l&128)){o+=String.fromCharCode(l);continue}var u=e[t++]&63;if((l&224)==192){o+=String.fromCharCode((l&31)<<6|u);continue}var c=e[t++]&63;if((l&240)==224?l=(l&15)<<12|u<<6|c:l=(l&7)<<18|u<<12|c<<6|e[t++]&63,l<65536)o+=String.fromCharCode(l);else{var w=l-65536;o+=String.fromCharCode(55296|w>>10,56320|w&1023)}}return o},"UTF8ArrayToString"),getDylinkMetadata=a(e=>{var t=0,r=0;function _(){return e[t++]}a(_,"getU8");function s(){for(var W=0,$=1;;){var pe=e[t++];if(W+=(pe&127)*$,$*=128,!(pe&128))break}return W}a(s,"getLEB");function o(){var W=s();return t+=W,UTF8ArrayToString(e,t-W,W)}a(o,"getString");function l(){for(var W=s(),$=[];W--;)$.push(o());return $}a(l,"getStringList");function u(W,$){if(W)throw new Error($)}if(a(u,"failIf"),e instanceof WebAssembly.Module){var c=WebAssembly.Module.customSections(e,"dylink.0");u(c.length===0,"need dylink section"),e=new Uint8Array(c[0]),r=e.length}else{var w=new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer),f=w[0]==1836278016||w[0]==6386541;u(!f,"need to see wasm magic number"),u(e[8]!==0,"need the dylink section to be first"),t=9;var g=s();r=t+g;var v=o();u(v!=="dylink.0")}for(var b={neededDynlibs:[],tlsExports:new Set,weakImports:new Set,runtimePaths:[]},N=1,x=2,V=3,p=4,A=5,y=256,R=3,M=1;t<r;){var k=_(),H=s();if(k===N)b.memorySize=s(),b.memoryAlign=s(),b.tableSize=s(),b.tableAlign=s();else if(k===x)b.neededDynlibs=l();else if(k===V)for(var T=s();T--;){var B=o(),G=s();G&y&&b.tlsExports.add(B)}else if(k===p)for(var T=s();T--;){var he=o(),B=o(),G=s();(G&R)==M&&b.weakImports.add(B)}else k===A?b.runtimePaths=l():t+=H}return b},"getDylinkMetadata");function getValue(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":return HEAP8[e];case"i8":return HEAP8[e];case"i16":return LE_HEAP_LOAD_I16((e>>1)*2);case"i32":return LE_HEAP_LOAD_I32((e>>2)*4);case"i64":return LE_HEAP_LOAD_I64((e>>3)*8);case"float":return LE_HEAP_LOAD_F32((e>>2)*4);case"double":return LE_HEAP_LOAD_F64((e>>3)*8);case"*":return LE_HEAP_LOAD_U32((e>>2)*4);default:abort(`invalid type for getValue: ${t}`)}}a(getValue,"getValue");var newDSO=a((e,t,r)=>{var _={refcount:1/0,name:e,exports:r,global:!0};return LDSO.loadedLibsByName[e]=_,t!=null&&(LDSO.loadedLibsByHandle[t]=_),_},"newDSO"),LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}},___heap_base=82480,alignMemory=a((e,t)=>Math.ceil(e/t)*t,"alignMemory"),getMemory=a(e=>{if(runtimeInitialized)return _calloc(e,1);var t=___heap_base,r=t+alignMemory(e,16);return ___heap_base=r,GOT.__heap_base.value=r,t},"getMemory"),isInternalSym=a(e=>["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm","__start_em_js","__stop_em_js"].includes(e)||e.startsWith("__em_js__"),"isInternalSym"),uleb128EncodeWithLen=a(e=>{let t=e.length;return[t%128|128,t>>7,...e]},"uleb128EncodeWithLen"),wasmTypeCodes={i:127,p:127,j:126,f:125,d:124,e:111},generateTypePack=a(e=>uleb128EncodeWithLen(Array.from(e,t=>{var r=wasmTypeCodes[t];return r})),"generateTypePack"),convertJsFunctionToWasm=a((e,t)=>{var r=Uint8Array.of(0,97,115,109,1,0,0,0,1,...uleb128EncodeWithLen([1,96,...generateTypePack(t.slice(1)),...generateTypePack(t[0]==="v"?"":t[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),_=new WebAssembly.Module(r),s=new WebAssembly.Instance(_,{e:{f:e}}),o=s.exports.f;return o},"convertJsFunctionToWasm"),wasmTableMirror=[],wasmTable=new WebAssembly.Table({initial:53,element:"anyfunc"}),getWasmTableEntry=a(e=>{var t=wasmTableMirror[e];return t||(wasmTableMirror[e]=t=wasmTable.get(e)),t},"getWasmTableEntry"),updateTableMap=a((e,t)=>{if(functionsInTableMap)for(var r=e;r<e+t;r++){var _=getWasmTableEntry(r);_&&functionsInTableMap.set(_,r)}},"updateTableMap"),functionsInTableMap,getFunctionAddress=a(e=>(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(e)||0),"getFunctionAddress"),freeTableIndexes=[],getEmptyTableSlot=a(()=>freeTableIndexes.length?freeTableIndexes.pop():wasmTable.grow(1),"getEmptyTableSlot"),setWasmTableEntry=a((e,t)=>{wasmTable.set(e,t),wasmTableMirror[e]=wasmTable.get(e)},"setWasmTableEntry"),addFunction=a((e,t)=>{var r=getFunctionAddress(e);if(r)return r;var _=getEmptyTableSlot();try{setWasmTableEntry(_,e)}catch(o){if(!(o instanceof TypeError))throw o;var s=convertJsFunctionToWasm(e,t);setWasmTableEntry(_,s)}return functionsInTableMap.set(e,_),_},"addFunction"),updateGOT=a((e,t)=>{for(var r in e)if(!isInternalSym(r)){var _=e[r];GOT[r]||=new WebAssembly.Global({value:"i32",mutable:!0}),(t||GOT[r].value==0)&&(typeof _=="function"?GOT[r].value=addFunction(_):typeof _=="number"?GOT[r].value=_:err(`unhandled export type for '${r}': ${typeof _}`))}},"updateGOT"),relocateExports=a((e,t,r)=>{var _={};for(var s in e){var o=e[s];typeof o=="object"&&(o=o.value),typeof o=="number"&&(o+=t),_[s]=o}return updateGOT(_,r),_},"relocateExports"),isSymbolDefined=a(e=>{var t=wasmImports[e];return!(!t||t.stub)},"isSymbolDefined"),dynCall=a((e,t,r=[],_=!1)=>{var s=getWasmTableEntry(t),o=s(...r);function l(u){return u}return a(l,"convert"),o},"dynCall"),stackSave=a(()=>_emscripten_stack_get_current(),"stackSave"),stackRestore=a(e=>__emscripten_stack_restore(e),"stackRestore"),createInvokeFunction=a(e=>(t,...r)=>{var _=stackSave();try{return dynCall(e,t,r)}catch(s){if(stackRestore(_),s!==s+0)throw s;if(_setThrew(1,0),e[0]=="j")return 0n}},"createInvokeFunction"),resolveGlobalSymbol=a((e,t=!1)=>{var r;return isSymbolDefined(e)?r=wasmImports[e]:e.startsWith("invoke_")&&(r=wasmImports[e]=createInvokeFunction(e.split("_")[1])),{sym:r,name:e}},"resolveGlobalSymbol"),onPostCtors=[],addOnPostCtor=a(e=>onPostCtors.push(e),"addOnPostCtor"),UTF8ToString=a((e,t,r)=>e?UTF8ArrayToString(HEAPU8,e,t,r):"","UTF8ToString"),loadWebAssemblyModule=a((binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);function loadModule(){var memAlign=Math.pow(2,metadata.memoryAlign),memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0;handle&&(HEAP8[handle+8]=1,LE_HEAP_STORE_U32((handle+12>>2)*4,memoryBase),LE_HEAP_STORE_I32((handle+16>>2)*4,metadata.memorySize),LE_HEAP_STORE_U32((handle+20>>2)*4,tableBase),LE_HEAP_STORE_I32((handle+24>>2)*4,metadata.tableSize)),metadata.tableSize&&wasmTable.grow(metadata.tableSize);var moduleExports;function resolveSymbol(e){var t=resolveGlobalSymbol(e).sym;return!t&&localScope&&(t=localScope[e]),t||(t=moduleExports[e]),t}a(resolveSymbol,"resolveSymbol");var proxyHandler={get(e,t){switch(t){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(t in wasmImports&&!wasmImports[t].stub){var r=wasmImports[t];return r}if(!(t in e)){var _;e[t]=(...s)=>(_||=resolveSymbol(t),_(...s))}return e[t]}},proxy=new Proxy({},proxyHandler);currentModuleWeakSymbols=metadata.weakImports;var info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols();function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&body.indexOf("$"+arity)!=-1;arity++)args.push("$"+arity);args=args.join(",");var func=`(${args}) => { ${body} };`;ASM_CONSTS[start]=eval(func)}if(a(addEmAsm,"addEmAsm"),"__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start<stop;){var jsString=UTF8ToString(start);addEmAsm(start,jsString),start=HEAPU8.indexOf(0,start)+1}function addEmJs(name,cSig,body){var jsArgs=[];if(cSig=cSig.slice(1,-1),cSig!="void"){cSig=cSig.split(",");for(var i in cSig){var jsArg=cSig[i].split(" ").pop();jsArgs.push(jsArg.replace("*",""))}}var func=`(${jsArgs}) => ${body};`;moduleExports[name]=eval(func)}a(addEmJs,"addEmJs");for(var name in moduleExports)if(name.startsWith("__em_js__")){var start=moduleExports[name],jsString=UTF8ToString(start),parts=jsString.split("<::>");addEmJs(name.replace("__em_js__",""),parts[0],parts[1]),delete moduleExports[name]}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():addOnPostCtor(init)),moduleExports}if(a(postInstantiation,"postInstantiation"),flags.loadAsync)return(async()=>{var e;return binary instanceof WebAssembly.Module?e=await WebAssembly.instantiate(binary,info):{module:binary,instance:e}=await WebAssembly.instantiate(binary,info),postInstantiation(binary,e)})();var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}return a(loadModule,"loadModule"),flags={...flags,rpath:{parentLibPath:libName,paths:metadata.runtimePaths}},flags.loadAsync?metadata.neededDynlibs.reduce((e,t)=>e.then(()=>loadDynamicLibrary(t,flags,localScope)),Promise.resolve()).then(loadModule):(metadata.neededDynlibs.forEach(e=>loadDynamicLibrary(e,flags,localScope)),loadModule())},"loadWebAssemblyModule"),mergeLibSymbols=a((e,t)=>{for(var[r,_]of Object.entries(e)){let s=a(l=>{isSymbolDefined(l)||(wasmImports[l]=_)},"setImport");s(r);let o="__main_argc_argv";r=="main"&&s(o),r==o&&s("main")}},"mergeLibSymbols"),asyncLoad=a(async e=>{var t=await readAsync(e);return new Uint8Array(t)},"asyncLoad");function loadDynamicLibrary(e,t={global:!0,nodelete:!0},r,_){var s=LDSO.loadedLibsByName[e];if(s)return t.global?s.global||(s.global=!0,mergeLibSymbols(s.exports,e)):r&&Object.assign(r,s.exports),t.nodelete&&s.refcount!==1/0&&(s.refcount=1/0),s.refcount++,_&&(LDSO.loadedLibsByHandle[_]=s),t.loadAsync?Promise.resolve(!0):!0;s=newDSO(e,_,"loading"),s.refcount=t.nodelete?1/0:1,s.global=t.global;function o(){if(_){var c=LE_HEAP_LOAD_U32((_+28>>2)*4),w=LE_HEAP_LOAD_U32((_+32>>2)*4);if(c&&w){var f=HEAP8.slice(c,c+w);return t.loadAsync?Promise.resolve(f):f}}var g=locateFile(e);if(t.loadAsync)return asyncLoad(g);if(!readBinary)throw new Error(`${g}: file not found, and synchronous loading of external files is not available`);return readBinary(g)}a(o,"loadLibData");function l(){return t.loadAsync?o().then(c=>loadWebAssemblyModule(c,t,e,r,_)):loadWebAssemblyModule(o(),t,e,r,_)}a(l,"getExports");function u(c){s.global?mergeLibSymbols(c,e):r&&Object.assign(r,c),s.exports=c}return a(u,"moduleLoaded"),t.loadAsync?l().then(c=>(u(c),!0)):(u(l()),!0)}a(loadDynamicLibrary,"loadDynamicLibrary");var reportUndefinedSymbols=a(()=>{for(var[e,t]of Object.entries(GOT))if(t.value==0){var r=resolveGlobalSymbol(e,!0).sym;if(!r&&!t.required)continue;if(typeof r=="function")t.value=addFunction(r,r.sig);else if(typeof r=="number")t.value=r;else throw new Error(`bad export type for '${e}': ${typeof r}`)}},"reportUndefinedSymbols"),runDependencies=0,dependenciesFulfilled=null,removeRunDependency=a(e=>{if(runDependencies--,Module.monitorRunDependencies?.(runDependencies),runDependencies==0&&dependenciesFulfilled){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}},"removeRunDependency"),addRunDependency=a(e=>{runDependencies++,Module.monitorRunDependencies?.(runDependencies)},"addRunDependency"),loadDylibs=a(async()=>{if(!dynamicLibraries.length){reportUndefinedSymbols();return}addRunDependency("loadDylibs");for(var e of dynamicLibraries)await loadDynamicLibrary(e,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0});reportUndefinedSymbols(),removeRunDependency("loadDylibs")},"loadDylibs"),noExitRuntime=!0;function setValue(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":HEAP8[e]=t;break;case"i8":HEAP8[e]=t;break;case"i16":LE_HEAP_STORE_I16((e>>1)*2,t);break;case"i32":LE_HEAP_STORE_I32((e>>2)*4,t);break;case"i64":LE_HEAP_STORE_I64((e>>3)*8,BigInt(t));break;case"float":LE_HEAP_STORE_F32((e>>2)*4,t);break;case"double":LE_HEAP_STORE_F64((e>>3)*8,t);break;case"*":LE_HEAP_STORE_U32((e>>2)*4,t);break;default:abort(`invalid type for setValue: ${r}`)}}a(setValue,"setValue");var ___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_high=82480,___stack_low=16944,___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},82480),___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),__abort_js=a(()=>abort(""),"__abort_js");__abort_js.sig="v";var __emscripten_throw_longjmp=a(()=>{throw 1/0},"__emscripten_throw_longjmp");__emscripten_throw_longjmp.sig="v";var getHeapMax=a(()=>2147483648,"getHeapMax"),growMemory=a(e=>{var t=wasmMemory.buffer.byteLength,r=(e-t+65535)/65536|0;try{return wasmMemory.grow(r),updateMemoryViews(),1}catch{}},"growMemory"),_emscripten_resize_heap=a(e=>{var t=HEAPU8.length;e>>>=0;var r=getHeapMax();if(e>r)return!1;for(var _=1;_<=4;_*=2){var s=t*(1+0/_);s=Math.min(s,e+100663296);var o=Math.min(r,alignMemory(Math.max(e,s),65536)),l=growMemory(o);if(l)return!0}return!1},"_emscripten_resize_heap");_emscripten_resize_heap.sig="ip";var _fd_close=a(e=>52,"_fd_close");_fd_close.sig="ii";var INT53_MAX=9007199254740992,INT53_MIN=-9007199254740992,bigintToI53Checked=a(e=>e<INT53_MIN||e>INT53_MAX?NaN:Number(e),"bigintToI53Checked");function _fd_seek(e,t,r,_){return t=bigintToI53Checked(t),70}a(_fd_seek,"_fd_seek"),_fd_seek.sig="iijip";var printCharBuffers=[null,[],[]],printChar=a((e,t)=>{var r=printCharBuffers[e];t===0||t===10?((e===1?out:err)(UTF8ArrayToString(r)),r.length=0):r.push(t)},"printChar"),_fd_write=a((e,t,r,_)=>{for(var s=0,o=0;o<r;o++){var l=LE_HEAP_LOAD_U32((t>>2)*4),u=LE_HEAP_LOAD_U32((t+4>>2)*4);t+=8;for(var c=0;c<u;c++)printChar(e,HEAPU8[l+c]);s+=u}return LE_HEAP_STORE_U32((_>>2)*4,s),0},"_fd_write");_fd_write.sig="iippp";function _tree_sitter_log_callback(e,t){if(Module.currentLogCallback){let r=UTF8ToString(t);Module.currentLogCallback(r,e!==0)}}a(_tree_sitter_log_callback,"_tree_sitter_log_callback");function _tree_sitter_parse_callback(e,t,r,_,s){let l=Module.currentParseCallback(t,{row:r,column:_});typeof l=="string"?(setValue(s,l.length,"i32"),stringToUTF16(l,e,10240)):setValue(s,0,"i32")}a(_tree_sitter_parse_callback,"_tree_sitter_parse_callback");function _tree_sitter_progress_callback(e,t){return Module.currentProgressCallback?Module.currentProgressCallback({currentOffset:e,hasError:t!==0})===!0:!1}a(_tree_sitter_progress_callback,"_tree_sitter_progress_callback");function _tree_sitter_query_progress_callback(e){return Module.currentQueryProgressCallback?Module.currentQueryProgressCallback({currentOffset:e})===!0:!1}a(_tree_sitter_query_progress_callback,"_tree_sitter_query_progress_callback");var runtimeKeepaliveCounter=0,keepRuntimeAlive=a(()=>noExitRuntime||runtimeKeepaliveCounter>0,"keepRuntimeAlive"),_proc_exit=a(e=>{EXITSTATUS=e,keepRuntimeAlive()||(Module.onExit?.(e),ABORT=!0),quit_(e,new ExitStatus(e))},"_proc_exit");_proc_exit.sig="vi";var exitJS=a((e,t)=>{EXITSTATUS=e,_proc_exit(e)},"exitJS"),handleException=a(e=>{if(e instanceof ExitStatus||e=="unwind")return EXITSTATUS;quit_(1,e)},"handleException"),lengthBytesUTF8=a(e=>{for(var t=0,r=0;r<e.length;++r){var _=e.charCodeAt(r);_<=127?t++:_<=2047?t+=2:_>=55296&&_<=57343?(t+=4,++r):t+=3}return t},"lengthBytesUTF8"),stringToUTF8Array=a((e,t,r,_)=>{if(!(_>0))return 0;for(var s=r,o=r+_-1,l=0;l<e.length;++l){var u=e.codePointAt(l);if(u<=127){if(r>=o)break;t[r++]=u}else if(u<=2047){if(r+1>=o)break;t[r++]=192|u>>6,t[r++]=128|u&63}else if(u<=65535){if(r+2>=o)break;t[r++]=224|u>>12,t[r++]=128|u>>6&63,t[r++]=128|u&63}else{if(r+3>=o)break;t[r++]=240|u>>18,t[r++]=128|u>>12&63,t[r++]=128|u>>6&63,t[r++]=128|u&63,l++}}return t[r]=0,r-s},"stringToUTF8Array"),stringToUTF8=a((e,t,r)=>stringToUTF8Array(e,HEAPU8,t,r),"stringToUTF8"),stackAlloc=a(e=>__emscripten_stack_alloc(e),"stackAlloc"),stringToUTF8OnStack=a(e=>{var t=lengthBytesUTF8(e)+1,r=stackAlloc(t);return stringToUTF8(e,r,t),r},"stringToUTF8OnStack"),AsciiToString=a(e=>{for(var t="";;){var r=HEAPU8[e++];if(!r)return t;t+=String.fromCharCode(r)}},"AsciiToString"),stringToUTF16=a((e,t,r)=>{if(r??=2147483647,r<2)return 0;r-=2;for(var _=t,s=r<e.length*2?r/2:e.length,o=0;o<s;++o){var l=e.charCodeAt(o);LE_HEAP_STORE_I16((t>>1)*2,l),t+=2}return LE_HEAP_STORE_I16((t>>1)*2,0),t-_},"stringToUTF16");LE_ATOMICS_NATIVE_BYTE_ORDER=new Int8Array(new Int16Array([1]).buffer)[0]===1?[(e=>e),(e=>e),void 0,(e=>e)]:[(e=>e),(e=>((e&65280)<<8|(e&255)<<24)>>16),void 0,(e=>e>>24&255|e>>8&65280|(e&65280)<<8|(e&255)<<24)];function LE_HEAP_UPDATE(){HEAPU16.unsigned=(e=>e&65535),HEAPU32.unsigned=(e=>e>>>0)}if(a(LE_HEAP_UPDATE,"LE_HEAP_UPDATE"),initMemory(),Module.noExitRuntime&&(noExitRuntime=Module.noExitRuntime),Module.print&&(out=Module.print),Module.printErr&&(err=Module.printErr),Module.dynamicLibraries&&(dynamicLibraries=Module.dynamicLibraries),Module.wasmBinary&&(wasmBinary=Module.wasmBinary),Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.shift()();Module.setValue=setValue,Module.getValue=getValue,Module.UTF8ToString=UTF8ToString,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8,Module.AsciiToString=AsciiToString,Module.stringToUTF16=stringToUTF16,Module.loadWebAssemblyModule=loadWebAssemblyModule,Module.LE_HEAP_STORE_I64=LE_HEAP_STORE_I64;var ASM_CONSTS={},_malloc,_calloc,_realloc,_free,_ts_range_edit,_ts_language_symbol_count,_ts_language_state_count,_ts_language_abi_version,_ts_language_name,_ts_language_field_count,_ts_language_next_state,_ts_language_symbol_name,_ts_language_symbol_for_name,_strncmp,_ts_language_symbol_type,_ts_language_field_name_for_id,_ts_lookahead_iterator_new,_ts_lookahead_iterator_delete,_ts_lookahead_iterator_reset_state,_ts_lookahead_iterator_reset,_ts_lookahead_iterator_next,_ts_lookahead_iterator_current_symbol,_ts_point_edit,_ts_parser_delete,_ts_parser_reset,_ts_parser_set_language,_ts_parser_set_included_ranges,_memcmp,_ts_query_new,_ts_query_delete,_iswspace,_iswalnum,_ts_query_copy,_ts_query_pattern_count,_ts_query_capture_count,_ts_query_string_count,_ts_query_capture_name_for_id,_ts_query_capture_quantifier_for_id,_ts_query_string_value_for_id,_ts_query_predicates_for_pattern,_ts_query_start_byte_for_pattern,_ts_query_end_byte_for_pattern,_ts_query_is_pattern_rooted,_ts_query_is_pattern_non_local,_ts_query_is_pattern_guaranteed_at_step,_ts_query_disable_capture,_ts_query_disable_pattern,_ts_tree_copy,_ts_tree_delete,_ts_init,_ts_free_wasm,_ts_scanner_malloc_wasm,_ts_scanner_calloc_wasm,_ts_scanner_realloc_wasm,_ts_parser_new_wasm,_ts_parser_enable_logger_wasm,_ts_parser_parse_wasm,_ts_parser_parse_limited_wasm,_ts_parser_abort_limited_wasm,_ts_parser_included_ranges_wasm,_ts_language_type_is_named_wasm,_ts_language_type_is_visible_wasm,_ts_language_metadata_wasm,_ts_language_supertypes_wasm,_ts_language_subtypes_wasm,_ts_tree_root_node_wasm,_ts_tree_root_node_with_offset_wasm,_ts_tree_edit_wasm,_ts_tree_included_ranges_wasm,_ts_tree_get_changed_ranges_wasm,_ts_tree_cursor_new_wasm,_ts_tree_cursor_copy_wasm,_ts_tree_cursor_delete_wasm,_ts_tree_cursor_reset_wasm,_ts_tree_cursor_reset_to_wasm,_ts_tree_cursor_goto_first_child_wasm,_ts_tree_cursor_goto_last_child_wasm,_ts_tree_cursor_goto_first_child_for_index_wasm,_ts_tree_cursor_goto_first_child_for_position_wasm,_ts_tree_cursor_goto_next_sibling_wasm,_ts_tree_cursor_goto_previous_sibling_wasm,_ts_tree_cursor_goto_descendant_wasm,_ts_tree_cursor_goto_parent_wasm,_ts_tree_cursor_current_node_type_id_wasm,_ts_tree_cursor_current_node_state_id_wasm,_ts_tree_cursor_current_node_is_named_wasm,_ts_tree_cursor_current_node_is_missing_wasm,_ts_tree_cursor_current_node_id_wasm,_ts_tree_cursor_start_position_wasm,_ts_tree_cursor_end_position_wasm,_ts_tree_cursor_start_index_wasm,_ts_tree_cursor_end_index_wasm,_ts_tree_cursor_current_field_id_wasm,_ts_tree_cursor_current_depth_wasm,_ts_tree_cursor_current_descendant_index_wasm,_ts_tree_cursor_current_node_wasm,_ts_node_symbol_wasm,_ts_node_field_name_for_child_wasm,_ts_node_field_name_for_named_child_wasm,_ts_node_children_by_field_id_wasm,_ts_node_first_child_for_byte_wasm,_ts_node_first_named_child_for_byte_wasm,_ts_node_grammar_symbol_wasm,_ts_node_child_count_wasm,_ts_node_named_child_count_wasm,_ts_node_child_wasm,_ts_node_named_child_wasm,_ts_node_child_by_field_id_wasm,_ts_node_next_sibling_wasm,_ts_node_prev_sibling_wasm,_ts_node_next_named_sibling_wasm,_ts_node_prev_named_sibling_wasm,_ts_node_descendant_count_wasm,_ts_node_parent_wasm,_ts_node_child_with_descendant_wasm,_ts_node_descendant_for_index_wasm,_ts_node_named_descendant_for_index_wasm,_ts_node_descendant_for_position_wasm,_ts_node_named_descendant_for_position_wasm,_ts_node_start_point_wasm,_ts_node_end_point_wasm,_ts_node_start_index_wasm,_ts_node_end_index_wasm,_ts_node_to_string_wasm,_ts_node_children_wasm,_ts_node_named_children_wasm,_ts_node_descendants_of_type_wasm,_ts_node_is_named_wasm,_ts_node_has_changes_wasm,_ts_node_has_error_wasm,_ts_node_is_error_wasm,_ts_node_is_missing_wasm,_ts_node_is_extra_wasm,_ts_node_parse_state_wasm,_ts_node_next_parse_state_wasm,_ts_query_matches_wasm,_ts_query_captures_wasm,_memset,_memcpy,_memmove,_iswalpha,_iswblank,_iswdigit,_iswlower,_iswpunct,_iswupper,_iswxdigit,_memchr,_strlen,_strcmp,_strncat,_strncpy,_towlower,_towupper,_setThrew,__emscripten_stack_restore,__emscripten_stack_alloc,_emscripten_stack_get_current,___wasm_apply_data_relocs;function assignWasmExports(e){Module._malloc=_malloc=e.malloc,Module._calloc=_calloc=e.calloc,Module._realloc=_realloc=e.realloc,Module._free=_free=e.free,Module._ts_range_edit=_ts_range_edit=e.ts_range_edit,Module._ts_language_symbol_count=_ts_language_symbol_count=e.ts_language_symbol_count,Module._ts_language_state_count=_ts_language_state_count=e.ts_language_state_count,Module._ts_language_abi_version=_ts_language_abi_version=e.ts_language_abi_version,Module._ts_language_name=_ts_language_name=e.ts_language_name,Module._ts_language_field_count=_ts_language_field_count=e.ts_language_field_count,Module._ts_language_next_state=_ts_language_next_state=e.ts_language_next_state,Module._ts_language_symbol_name=_ts_language_symbol_name=e.ts_language_symbol_name,Module._ts_language_symbol_for_name=_ts_language_symbol_for_name=e.ts_language_symbol_for_name,Module._strncmp=_strncmp=e.strncmp,Module._ts_language_symbol_type=_ts_language_symbol_type=e.ts_language_symbol_type,Module._ts_language_field_name_for_id=_ts_language_field_name_for_id=e.ts_language_field_name_for_id,Module._ts_lookahead_iterator_new=_ts_lookahead_iterator_new=e.ts_lookahead_iterator_new,Module._ts_lookahead_iterator_delete=_ts_lookahead_iterator_delete=e.ts_lookahead_iterator_delete,Module._ts_lookahead_iterator_reset_state=_ts_lookahead_iterator_reset_state=e.ts_lookahead_iterator_reset_state,Module._ts_lookahead_iterator_reset=_ts_lookahead_iterator_reset=e.ts_lookahead_iterator_reset,Module._ts_lookahead_iterator_next=_ts_lookahead_iterator_next=e.ts_lookahead_iterator_next,Module._ts_lookahead_iterator_current_symbol=_ts_lookahead_iterator_current_symbol=e.ts_lookahead_iterator_current_symbol,Module._ts_point_edit=_ts_point_edit=e.ts_point_edit,Module._ts_parser_delete=_ts_parser_delete=e.ts_parser_delete,Module._ts_parser_reset=_ts_parser_reset=e.ts_parser_reset,Module._ts_parser_set_language=_ts_parser_set_language=e.ts_parser_set_language,Module._ts_parser_set_included_ranges=_ts_parser_set_included_ranges=e.ts_parser_set_included_ranges,Module._memcmp=_memcmp=e.memcmp,Module._ts_query_new=_ts_query_new=e.ts_query_new,Module._ts_query_delete=_ts_query_delete=e.ts_query_delete,Module._iswspace=_iswspace=e.iswspace,Module._iswalnum=_iswalnum=e.iswalnum,Module._ts_query_copy=_ts_query_copy=e.ts_query_copy,Module._ts_query_pattern_count=_ts_query_pattern_count=e.ts_query_pattern_count,Module._ts_query_capture_count=_ts_query_capture_count=e.ts_query_capture_count,Module._ts_query_string_count=_ts_query_string_count=e.ts_query_string_count,Module._ts_query_capture_name_for_id=_ts_query_capture_name_for_id=e.ts_query_capture_name_for_id,Module._ts_query_capture_quantifier_for_id=_ts_query_capture_quantifier_for_id=e.ts_query_capture_quantifier_for_id,Module._ts_query_string_value_for_id=_ts_query_string_value_for_id=e.ts_query_string_value_for_id,Module._ts_query_predicates_for_pattern=_ts_query_predicates_for_pattern=e.ts_query_predicates_for_pattern,Module._ts_query_start_byte_for_pattern=_ts_query_start_byte_for_pattern=e.ts_query_start_byte_for_pattern,Module._ts_query_end_byte_for_pattern=_ts_query_end_byte_for_pattern=e.ts_query_end_byte_for_pattern,Module._ts_query_is_pattern_rooted=_ts_query_is_pattern_rooted=e.ts_query_is_pattern_rooted,Module._ts_query_is_pattern_non_local=_ts_query_is_pattern_non_local=e.ts_query_is_pattern_non_local,Module._ts_query_is_pattern_guaranteed_at_step=_ts_query_is_pattern_guaranteed_at_step=e.ts_query_is_pattern_guaranteed_at_step,Module._ts_query_disable_capture=_ts_query_disable_capture=e.ts_query_disable_capture,Module._ts_query_disable_pattern=_ts_query_disable_pattern=e.ts_query_disable_pattern,Module._ts_tree_copy=_ts_tree_copy=e.ts_tree_copy,Module._ts_tree_delete=_ts_tree_delete=e.ts_tree_delete,Module._ts_init=_ts_init=e.ts_init,Module._ts_free_wasm=_ts_free_wasm=e.ts_free_wasm,Module._ts_scanner_malloc_wasm=_ts_scanner_malloc_wasm=e.ts_scanner_malloc_wasm,Module._ts_scanner_calloc_wasm=_ts_scanner_calloc_wasm=e.ts_scanner_calloc_wasm,Module._ts_scanner_realloc_wasm=_ts_scanner_realloc_wasm=e.ts_scanner_realloc_wasm,Module._ts_parser_new_wasm=_ts_parser_new_wasm=e.ts_parser_new_wasm,Module._ts_parser_enable_logger_wasm=_ts_parser_enable_logger_wasm=e.ts_parser_enable_logger_wasm,Module._ts_parser_parse_wasm=_ts_parser_parse_wasm=e.ts_parser_parse_wasm,Module._ts_parser_parse_limited_wasm=_ts_parser_parse_limited_wasm=e.ts_parser_parse_limited_wasm,Module._ts_parser_abort_limited_wasm=_ts_parser_abort_limited_wasm=e.ts_parser_abort_limited_wasm,Module._ts_parser_included_ranges_wasm=_ts_parser_included_ranges_wasm=e.ts_parser_included_ranges_wasm,Module._ts_language_type_is_named_wasm=_ts_language_type_is_named_wasm=e.ts_language_type_is_named_wasm,Module._ts_language_type_is_visible_wasm=_ts_language_type_is_visible_wasm=e.ts_language_type_is_visible_wasm,Module._ts_language_metadata_wasm=_ts_language_metadata_wasm=e.ts_language_metadata_wasm,Module._ts_language_supertypes_wasm=_ts_language_supertypes_wasm=e.ts_language_supertypes_wasm,Module._ts_language_subtypes_wasm=_ts_language_subtypes_wasm=e.ts_language_subtypes_wasm,Module._ts_tree_root_node_wasm=_ts_tree_root_node_wasm=e.ts_tree_root_node_wasm,Module._ts_tree_root_node_with_offset_wasm=_ts_tree_root_node_with_offset_wasm=e.ts_tree_root_node_with_offset_wasm,Module._ts_tree_edit_wasm=_ts_tree_edit_wasm=e.ts_tree_edit_wasm,Module._ts_tree_included_ranges_wasm=_ts_tree_included_ranges_wasm=e.ts_tree_included_ranges_wasm,Module._ts_tree_get_changed_ranges_wasm=_ts_tree_get_changed_ranges_wasm=e.ts_tree_get_changed_ranges_wasm,Module._ts_tree_cursor_new_wasm=_ts_tree_cursor_new_wasm=e.ts_tree_cursor_new_wasm,Module._ts_tree_cursor_copy_wasm=_ts_tree_cursor_copy_wasm=e.ts_tree_cursor_copy_wasm,Module._ts_tree_cursor_delete_wasm=_ts_tree_cursor_delete_wasm=e.ts_tree_cursor_delete_wasm,Module._ts_tree_cursor_reset_wasm=_ts_tree_cursor_reset_wasm=e.ts_tree_cursor_reset_wasm,Module._ts_tree_cursor_reset_to_wasm=_ts_tree_cursor_reset_to_wasm=e.ts_tree_cursor_reset_to_wasm,Module._ts_tree_cursor_goto_first_child_wasm=_ts_tree_cursor_goto_first_child_wasm=e.ts_tree_cursor_goto_first_child_wasm,Module._ts_tree_cursor_goto_last_child_wasm=_ts_tree_cursor_goto_last_child_wasm=e.ts_tree_cursor_goto_last_child_wasm,Module._ts_tree_cursor_goto_first_child_for_index_wasm=_ts_tree_cursor_goto_first_child_for_index_wasm=e.ts_tree_cursor_goto_first_child_for_index_wasm,Module._ts_tree_cursor_goto_first_child_for_position_wasm=_ts_tree_cursor_goto_first_child_for_position_wasm=e.ts_tree_cursor_goto_first_child_for_position_wasm,Module._ts_tree_cursor_goto_next_sibling_wasm=_ts_tree_cursor_goto_next_sibling_wasm=e.ts_tree_cursor_goto_next_sibling_wasm,Module._ts_tree_cursor_goto_previous_sibling_wasm=_ts_tree_cursor_goto_previous_sibling_wasm=e.ts_tree_cursor_goto_previous_sibling_wasm,Module._ts_tree_cursor_goto_descendant_wasm=_ts_tree_cursor_goto_descendant_wasm=e.ts_tree_cursor_goto_descendant_wasm,Module._ts_tree_cursor_goto_parent_wasm=_ts_tree_cursor_goto_parent_wasm=e.ts_tree_cursor_goto_parent_wasm,Module._ts_tree_cursor_current_node_type_id_wasm=_ts_tree_cursor_current_node_type_id_wasm=e.ts_tree_cursor_current_node_type_id_wasm,Module._ts_tree_cursor_current_node_state_id_wasm=_ts_tree_cursor_current_node_state_id_wasm=e.ts_tree_cursor_current_node_state_id_wasm,Module._ts_tree_cursor_current_node_is_named_wasm=_ts_tree_cursor_current_node_is_named_wasm=e.ts_tree_cursor_current_node_is_named_wasm,Module._ts_tree_cursor_current_node_is_missing_wasm=_ts_tree_cursor_current_node_is_missing_wasm=e.ts_tree_cursor_current_node_is_missing_wasm,Module._ts_tree_cursor_current_node_id_wasm=_ts_tree_cursor_current_node_id_wasm=e.ts_tree_cursor_current_node_id_wasm,Module._ts_tree_cursor_start_position_wasm=_ts_tree_cursor_start_position_wasm=e.ts_tree_cursor_start_position_wasm,Module._ts_tree_cursor_end_position_wasm=_ts_tree_cursor_end_position_wasm=e.ts_tree_cursor_end_position_wasm,Module._ts_tree_cursor_start_index_wasm=_ts_tree_cursor_start_index_wasm=e.ts_tree_cursor_start_index_wasm,Module._ts_tree_cursor_end_index_wasm=_ts_tree_cursor_end_index_wasm=e.ts_tree_cursor_end_index_wasm,Module._ts_tree_cursor_current_field_id_wasm=_ts_tree_cursor_current_field_id_wasm=e.ts_tree_cursor_current_field_id_wasm,Module._ts_tree_cursor_current_depth_wasm=_ts_tree_cursor_current_depth_wasm=e.ts_tree_cursor_current_depth_wasm,Module._ts_tree_cursor_current_descendant_index_wasm=_ts_tree_cursor_current_descendant_index_wasm=e.ts_tree_cursor_current_descendant_index_wasm,Module._ts_tree_cursor_current_node_wasm=_ts_tree_cursor_current_node_wasm=e.ts_tree_cursor_current_node_wasm,Module._ts_node_symbol_wasm=_ts_node_symbol_wasm=e.ts_node_symbol_wasm,Module._ts_node_field_name_for_child_wasm=_ts_node_field_name_for_child_wasm=e.ts_node_field_name_for_child_wasm,Module._ts_node_field_name_for_named_child_wasm=_ts_node_field_name_for_named_child_wasm=e.ts_node_field_name_for_named_child_wasm,Module._ts_node_children_by_field_id_wasm=_ts_node_children_by_field_id_wasm=e.ts_node_children_by_field_id_wasm,Module._ts_node_first_child_for_byte_wasm=_ts_node_first_child_for_byte_wasm=e.ts_node_first_child_for_byte_wasm,Module._ts_node_first_named_child_for_byte_wasm=_ts_node_first_named_child_for_byte_wasm=e.ts_node_first_named_child_for_byte_wasm,Module._ts_node_grammar_symbol_wasm=_ts_node_grammar_symbol_wasm=e.ts_node_grammar_symbol_wasm,Module._ts_node_child_count_wasm=_ts_node_child_count_wasm=e.ts_node_child_count_wasm,Module._ts_node_named_child_count_wasm=_ts_node_named_child_count_wasm=e.ts_node_named_child_count_wasm,Module._ts_node_child_wasm=_ts_node_child_wasm=e.ts_node_child_wasm,Module._ts_node_named_child_wasm=_ts_node_named_child_wasm=e.ts_node_named_child_wasm,Module._ts_node_child_by_field_id_wasm=_ts_node_child_by_field_id_wasm=e.ts_node_child_by_field_id_wasm,Module._ts_node_next_sibling_wasm=_ts_node_next_sibling_wasm=e.ts_node_next_sibling_wasm,Module._ts_node_prev_sibling_wasm=_ts_node_prev_sibling_wasm=e.ts_node_prev_sibling_wasm,Module._ts_node_next_named_sibling_wasm=_ts_node_next_named_sibling_wasm=e.ts_node_next_named_sibling_wasm,Module._ts_node_prev_named_sibling_wasm=_ts_node_prev_named_sibling_wasm=e.ts_node_prev_named_sibling_wasm,Module._ts_node_descendant_count_wasm=_ts_node_descendant_count_wasm=e.ts_node_descendant_count_wasm,Module._ts_node_parent_wasm=_ts_node_parent_wasm=e.ts_node_parent_wasm,Module._ts_node_child_with_descendant_wasm=_ts_node_child_with_descendant_wasm=e.ts_node_child_with_descendant_wasm,Module._ts_node_descendant_for_index_wasm=_ts_node_descendant_for_index_wasm=e.ts_node_descendant_for_index_wasm,Module._ts_node_named_descendant_for_index_wasm=_ts_node_named_descendant_for_index_wasm=e.ts_node_named_descendant_for_index_wasm,Module._ts_node_descendant_for_position_wasm=_ts_node_descendant_for_position_wasm=e.ts_node_descendant_for_position_wasm,Module._ts_node_named_descendant_for_position_wasm=_ts_node_named_descendant_for_position_wasm=e.ts_node_named_descendant_for_position_wasm,Module._ts_node_start_point_wasm=_ts_node_start_point_wasm=e.ts_node_start_point_wasm,Module._ts_node_end_point_wasm=_ts_node_end_point_wasm=e.ts_node_end_point_wasm,Module._ts_node_start_index_wasm=_ts_node_start_index_wasm=e.ts_node_start_index_wasm,Module._ts_node_end_index_wasm=_ts_node_end_index_wasm=e.ts_node_end_index_wasm,Module._ts_node_to_string_wasm=_ts_node_to_string_wasm=e.ts_node_to_string_wasm,Module._ts_node_children_wasm=_ts_node_children_wasm=e.ts_node_children_wasm,Module._ts_node_named_children_wasm=_ts_node_named_children_wasm=e.ts_node_named_children_wasm,Module._ts_node_descendants_of_type_wasm=_ts_node_descendants_of_type_wasm=e.ts_node_descendants_of_type_wasm,Module._ts_node_is_named_wasm=_ts_node_is_named_wasm=e.ts_node_is_named_wasm,Module._ts_node_has_changes_wasm=_ts_node_has_changes_wasm=e.ts_node_has_changes_wasm,Module._ts_node_has_error_wasm=_ts_node_has_error_wasm=e.ts_node_has_error_wasm,Module._ts_node_is_error_wasm=_ts_node_is_error_wasm=e.ts_node_is_error_wasm,Module._ts_node_is_missing_wasm=_ts_node_is_missing_wasm=e.ts_node_is_missing_wasm,Module._ts_node_is_extra_wasm=_ts_node_is_extra_wasm=e.ts_node_is_extra_wasm,Module._ts_node_parse_state_wasm=_ts_node_parse_state_wasm=e.ts_node_parse_state_wasm,Module._ts_node_next_parse_state_wasm=_ts_node_next_parse_state_wasm=e.ts_node_next_parse_state_wasm,Module._ts_query_matches_wasm=_ts_query_matches_wasm=e.ts_query_matches_wasm,Module._ts_query_captures_wasm=_ts_query_captures_wasm=e.ts_query_captures_wasm,Module._memset=_memset=e.memset,Module._memcpy=_memcpy=e.memcpy,Module._memmove=_memmove=e.memmove,Module._iswalpha=_iswalpha=e.iswalpha,Module._iswblank=_iswblank=e.iswblank,Module._iswdigit=_iswdigit=e.iswdigit,Module._iswlower=_iswlower=e.iswlower,Module._iswpunct=_iswpunct=e.iswpunct,Module._iswupper=_iswupper=e.iswupper,Module._iswxdigit=_iswxdigit=e.iswxdigit,Module._memchr=_memchr=e.memchr,Module._strlen=_strlen=e.strlen,Module._strcmp=_strcmp=e.strcmp,Module._strncat=_strncat=e.strncat,Module._strncpy=_strncpy=e.strncpy,Module._towlower=_towlower=e.towlower,Module._towupper=_towupper=e.towupper,_setThrew=e.setThrew,__emscripten_stack_restore=e._emscripten_stack_restore,__emscripten_stack_alloc=e._emscripten_stack_alloc,_emscripten_stack_get_current=e.emscripten_stack_get_current,___wasm_apply_data_relocs=e.__wasm_apply_data_relocs}a(assignWasmExports,"assignWasmExports");var wasmImports={__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__stack_high:___stack_high,__stack_low:___stack_low,__stack_pointer:___stack_pointer,__table_base:___table_base,_abort_js:__abort_js,_emscripten_throw_longjmp:__emscripten_throw_longjmp,emscripten_resize_heap:_emscripten_resize_heap,fd_close:_fd_close,fd_seek:_fd_seek,fd_write:_fd_write,invoke_i,invoke_ii,invoke_iii,invoke_iiii,invoke_iiiii,invoke_vi,invoke_vii,memory:wasmMemory,tree_sitter_log_callback:_tree_sitter_log_callback,tree_sitter_parse_callback:_tree_sitter_parse_callback,tree_sitter_progress_callback:_tree_sitter_progress_callback,tree_sitter_query_progress_callback:_tree_sitter_query_progress_callback};function invoke_vi(e,t){var r=stackSave();try{getWasmTableEntry(e)(t)}catch(_){if(stackRestore(r),_!==_+0)throw _;_setThrew(1,0)}}a(invoke_vi,"invoke_vi");function invoke_i(e){var t=stackSave();try{return getWasmTableEntry(e)()}catch(r){if(stackRestore(t),r!==r+0)throw r;_setThrew(1,0)}}a(invoke_i,"invoke_i");function invoke_ii(e,t){var r=stackSave();try{return getWasmTableEntry(e)(t)}catch(_){if(stackRestore(r),_!==_+0)throw _;_setThrew(1,0)}}a(invoke_ii,"invoke_ii");function invoke_iii(e,t,r){var _=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(s){if(stackRestore(_),s!==s+0)throw s;_setThrew(1,0)}}a(invoke_iii,"invoke_iii");function invoke_vii(e,t,r){var _=stackSave();try{getWasmTableEntry(e)(t,r)}catch(s){if(stackRestore(_),s!==s+0)throw s;_setThrew(1,0)}}a(invoke_vii,"invoke_vii");function invoke_iiii(e,t,r,_){var s=stackSave();try{return getWasmTableEntry(e)(t,r,_)}catch(o){if(stackRestore(s),o!==o+0)throw o;_setThrew(1,0)}}a(invoke_iiii,"invoke_iiii");function invoke_iiiii(e,t,r,_,s){var o=stackSave();try{return getWasmTableEntry(e)(t,r,_,s)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}a(invoke_iiiii,"invoke_iiiii");function callMain(e=[]){var t=resolveGlobalSymbol("main").sym;if(t){e.unshift(thisProgram);var r=e.length,_=stackAlloc((r+1)*4),s=_;e.forEach(l=>{LE_HEAP_STORE_U32((s>>2)*4,stringToUTF8OnStack(l)),s+=4}),LE_HEAP_STORE_U32((s>>2)*4,0);try{var o=t(r,_);return exitJS(o,!0),o}catch(l){return handleException(l)}}}a(callMain,"callMain");function run(e=arguments_){if(runDependencies>0){dependenciesFulfilled=run;return}if(preRun(),runDependencies>0){dependenciesFulfilled=run;return}function t(){if(Module.calledRun=!0,!ABORT){initRuntime(),readyPromiseResolve?.(Module),Module.onRuntimeInitialized?.();var r=Module.noInitialRun||!1;r||callMain(e),postRun()}}a(t,"doRun"),Module.setStatus?(Module.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>Module.setStatus(""),1),t()},1)):t()}a(run,"run");var wasmExports;return wasmExports=await createWasm(),run(),runtimeInitialized?moduleRtn=Module:moduleRtn=new Promise((e,t)=>{readyPromiseResolve=e,readyPromiseReject=t}),moduleRtn}})();typeof exports=="object"&&typeof module=="object"?(module.exports=Module,module.exports.default=Module):typeof define=="function"&&define.amd&&define([],()=>Module)});var _t={};He(_t,{CaptureQuantifier:()=>Oe,Edit:()=>se,LANGUAGE_VERSION:()=>_e,Language:()=>z,LookaheadIterator:()=>K,MIN_COMPATIBLE_VERSION:()=>le,Node:()=>J,Parser:()=>ie,Query:()=>ue,Tree:()=>X,TreeCursor:()=>Y});module.exports=Qe(_t);var se=class{static{a(this,"Edit")}startPosition;oldEndPosition;newEndPosition;startIndex;oldEndIndex;newEndIndex;constructor({startIndex:t,oldEndIndex:r,newEndIndex:_,startPosition:s,oldEndPosition:o,newEndPosition:l}){this.startIndex=t>>>0,this.oldEndIndex=r>>>0,this.newEndIndex=_>>>0,this.startPosition=s,this.oldEndPosition=o,this.newEndPosition=l}editPoint(t,r){let _=r,s={...t};if(r>=this.oldEndIndex){_=this.newEndIndex+(r-this.oldEndIndex);let o=t.row;s.row=this.newEndPosition.row+(t.row-this.oldEndPosition.row),s.column=o===this.oldEndPosition.row?this.newEndPosition.column+(t.column-this.oldEndPosition.column):t.column}else r>this.startIndex&&(_=this.newEndIndex,s.row=this.newEndPosition.row,s.column=this.newEndPosition.column);return{point:s,index:_}}editRange(t){let r={startIndex:t.startIndex,startPosition:{...t.startPosition},endIndex:t.endIndex,endPosition:{...t.endPosition}};return t.endIndex>=this.oldEndIndex?t.endIndex!==Number.MAX_SAFE_INTEGER&&(r.endIndex=this.newEndIndex+(t.endIndex-this.oldEndIndex),r.endPosition={row:this.newEndPosition.row+(t.endPosition.row-this.oldEndPosition.row),column:t.endPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(t.endPosition.column-this.oldEndPosition.column):t.endPosition.column},r.endIndex<this.newEndIndex&&(r.endIndex=Number.MAX_SAFE_INTEGER,r.endPosition={row:Number.MAX_SAFE_INTEGER,column:Number.MAX_SAFE_INTEGER})):t.endIndex>this.startIndex&&(r.endIndex=this.startIndex,r.endPosition={...this.startPosition}),t.startIndex>=this.oldEndIndex?(r.startIndex=this.newEndIndex+(t.startIndex-this.oldEndIndex),r.startPosition={row:this.newEndPosition.row+(t.startPosition.row-this.oldEndPosition.row),column:t.startPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(t.startPosition.column-this.oldEndPosition.column):t.startPosition.column},r.startIndex<this.newEndIndex&&(r.startIndex=Number.MAX_SAFE_INTEGER,r.startPosition={row:Number.MAX_SAFE_INTEGER,column:Number.MAX_SAFE_INTEGER})):t.startIndex>this.startIndex&&(r.startIndex=this.startIndex,r.startPosition={...this.startPosition}),r}};var de=2,m=4,ae=4*m,I=5*m,O=2*m,j=2*m+2*O,S={row:0,column:0},F=Symbol("INTERNAL");function D(e){if(e!==F)throw new Error("Illegal constructor")}a(D,"assertInternal");function te(e){return!!e&&typeof e.row=="number"&&typeof e.column=="number"}a(te,"isPoint");function be(e){n=e}a(be,"setModule");var n;function q(e){try{return new FinalizationRegistry(e)}catch(t){console.error("Unsupported FinalizationRegistry:",t);return}}a(q,"newFinalizer");var Pe=q(e=>{n._ts_lookahead_iterator_delete(e)}),K=class{static{a(this,"LookaheadIterator")}0=0;language;positioned=!1;constructor(t,r,_){D(t),this[0]=r,this.language=_,Pe?.register(this,r,this)}get currentTypeId(){return this.positioned?n._ts_lookahead_iterator_current_symbol(this[0]):null}get currentType(){let t=this.currentTypeId;return t===null?null:this.language.types[t]??n.UTF8ToString(n._ts_language_symbol_name(this.language[0],t))}delete(){Pe?.unregister(this),n._ts_lookahead_iterator_delete(this[0]),this[0]=0}reset(t,r){return n._ts_lookahead_iterator_reset(this[0],t[0],r)?(this.language=t,this.positioned=!1,!0):!1}resetState(t){return n._ts_lookahead_iterator_reset_state(this[0],t)?(this.positioned=!1,!0):!1}[Symbol.iterator](){return{next:a(()=>{this.positioned=!!n._ts_lookahead_iterator_next(this[0]);let t=this.currentType;return t===null?{done:!0,value:""}:{done:!1,value:t}},"next")}}};function oe(e,t,r,_){let s=r-t,o=e.textCallback(t,_);if(o){for(t+=o.length;t<r;){let l=e.textCallback(t,_);if(l&&l.length>0)t+=l.length,o+=l;else break}t>r&&(o=o.slice(0,s))}return o??""}a(oe,"getText");var ve=q(e=>{n._ts_tree_delete(e)}),X=class e{static{a(this,"Tree")}0=0;textCallback;language;constructor(t,r,_,s){D(t),this[0]=r,this.language=_,this.textCallback=s,ve?.register(this,r,this)}copy(){let t=n._ts_tree_copy(this[0]);return new e(F,t,this.language,this.textCallback)}delete(){ve?.unregister(this),n._ts_tree_delete(this[0]),this[0]=0}get rootNode(){return n._ts_tree_root_node_wasm(this[0]),E(this)}rootNodeWithOffset(t,r){let _=d+I;return n.setValue(_,t,"i32"),C(_+m,r),n._ts_tree_root_node_with_offset_wasm(this[0]),E(this)}edit(t){Me(t),n._ts_tree_edit_wasm(this[0])}walk(){return this.rootNode.walk()}getChangedRanges(t){if(!(t instanceof e))throw new TypeError("Argument must be a Tree");n._ts_tree_get_changed_ranges_wasm(this[0],t[0]);let r=n.getValue(d,"i32"),_=n.getValue(d+m,"i32"),s=new Array(r);if(r>0){let o=_;for(let l=0;l<r;l++)s[l]=re(o),o+=j;n._ts_free_wasm(_)}return s}getIncludedRanges(){n._ts_tree_included_ranges_wasm(this[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+m,"i32"),_=new Array(t);if(t>0){let s=r;for(let o=0;o<t;o++)_[o]=re(s),s+=j;n._ts_free_wasm(r)}return _}};var Ee=q(e=>{P({handles:e}),n._ts_tree_cursor_delete_wasm(0)}),Y=class e{static{a(this,"TreeCursor")}handles=[0,0,0,0];tree;constructor(t,r){D(t),this.tree=r,L(this),Ee?.register(this,this.handles,this)}copy(){return P(this),n._ts_tree_cursor_copy_wasm(this.tree[0]),new e(F,this.tree)}delete(){Ee?.unregister(this),P(this),n._ts_tree_cursor_delete_wasm(this.tree[0]),this.handles.fill(0)}get currentNode(){return P(this),n._ts_tree_cursor_current_node_wasm(this.tree[0]),E(this.tree)}get currentFieldId(){return P(this),n._ts_tree_cursor_current_field_id_wasm(this.tree[0])}get currentFieldName(){return this.tree.language.fields[this.currentFieldId]}get currentDepth(){return P(this),n._ts_tree_cursor_current_depth_wasm(this.tree[0])}get currentDescendantIndex(){return P(this),n._ts_tree_cursor_current_descendant_index_wasm(this.tree[0])}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return P(this),n._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeStateId(){return P(this),n._ts_tree_cursor_current_node_state_id_wasm(this.tree[0])}get nodeId(){return P(this),n._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return P(this),n._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])===1}get nodeIsMissing(){return P(this),n._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])===1}get nodeText(){P(this);let t=n._ts_tree_cursor_start_index_wasm(this.tree[0]),r=n._ts_tree_cursor_end_index_wasm(this.tree[0]);n._ts_tree_cursor_start_position_wasm(this.tree[0]);let _=Q(d);return oe(this.tree,t,r,_)}get startPosition(){return P(this),n._ts_tree_cursor_start_position_wasm(this.tree[0]),Q(d)}get endPosition(){return P(this),n._ts_tree_cursor_end_position_wasm(this.tree[0]),Q(d)}get startIndex(){return P(this),n._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return P(this),n._ts_tree_cursor_end_index_wasm(this.tree[0])}gotoFirstChild(){P(this);let t=n._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return L(this),t===1}gotoLastChild(){P(this);let t=n._ts_tree_cursor_goto_last_child_wasm(this.tree[0]);return L(this),t===1}gotoParent(){P(this);let t=n._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return L(this),t===1}gotoNextSibling(){P(this);let t=n._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return L(this),t===1}gotoPreviousSibling(){P(this);let t=n._ts_tree_cursor_goto_previous_sibling_wasm(this.tree[0]);return L(this),t===1}gotoDescendant(t){P(this),n._ts_tree_cursor_goto_descendant_wasm(this.tree[0],t),L(this)}gotoFirstChildForIndex(t){P(this),n.setValue(d+ae,t,"i32");let r=n._ts_tree_cursor_goto_first_child_for_index_wasm(this.tree[0]);return L(this),r===1}gotoFirstChildForPosition(t){P(this),C(d+ae,t);let r=n._ts_tree_cursor_goto_first_child_for_position_wasm(this.tree[0]);return L(this),r===1}reset(t){h(t),P(this,d+I),n._ts_tree_cursor_reset_wasm(t.tree[0]),L(this),this.tree=t.tree}resetTo(t){P(this,d),P(t,d+ae),n._ts_tree_cursor_reset_to_wasm(this.tree[0],t.tree[0]),L(this),this.tree=t.tree}};var J=class{static{a(this,"Node")}0=0;_children;_namedChildren;constructor(t,{id:r,tree:_,startIndex:s,startPosition:o,other:l}){D(t),this[0]=l,this.id=r,this.tree=_,this.startIndex=s,this.startPosition=o}id;startIndex;startPosition;tree;get typeId(){return h(this),n._ts_node_symbol_wasm(this.tree[0])}get grammarId(){return h(this),n._ts_node_grammar_symbol_wasm(this.tree[0])}get type(){return this.tree.language.types[this.typeId]||"ERROR"}get grammarType(){return this.tree.language.types[this.grammarId]||"ERROR"}get isNamed(){return h(this),n._ts_node_is_named_wasm(this.tree[0])===1}get isExtra(){return h(this),n._ts_node_is_extra_wasm(this.tree[0])===1}get isError(){return h(this),n._ts_node_is_error_wasm(this.tree[0])===1}get isMissing(){return h(this),n._ts_node_is_missing_wasm(this.tree[0])===1}get hasChanges(){return h(this),n._ts_node_has_changes_wasm(this.tree[0])===1}get hasError(){return h(this),n._ts_node_has_error_wasm(this.tree[0])===1}get endIndex(){return h(this),n._ts_node_end_index_wasm(this.tree[0])}get endPosition(){return h(this),n._ts_node_end_point_wasm(this.tree[0]),Q(d)}get text(){return oe(this.tree,this.startIndex,this.endIndex,this.startPosition)}get parseState(){return h(this),n._ts_node_parse_state_wasm(this.tree[0])}get nextParseState(){return h(this),n._ts_node_next_parse_state_wasm(this.tree[0])}equals(t){return this.tree===t.tree&&this.id===t.id}child(t){return h(this),n._ts_node_child_wasm(this.tree[0],t),E(this.tree)}namedChild(t){return h(this),n._ts_node_named_child_wasm(this.tree[0],t),E(this.tree)}childForFieldId(t){return h(this),n._ts_node_child_by_field_id_wasm(this.tree[0],t),E(this.tree)}childForFieldName(t){let r=this.tree.language.fields.indexOf(t);return r!==-1?this.childForFieldId(r):null}fieldNameForChild(t){h(this);let r=n._ts_node_field_name_for_child_wasm(this.tree[0],t);return r?n.AsciiToString(r):null}fieldNameForNamedChild(t){h(this);let r=n._ts_node_field_name_for_named_child_wasm(this.tree[0],t);return r?n.AsciiToString(r):null}childrenForFieldName(t){let r=this.tree.language.fields.indexOf(t);return r!==-1&&r!==0?this.childrenForFieldId(r):[]}childrenForFieldId(t){h(this),n._ts_node_children_by_field_id_wasm(this.tree[0],t);let r=n.getValue(d,"i32"),_=n.getValue(d+m,"i32"),s=new Array(r);if(r>0){let o=_;for(let l=0;l<r;l++)s[l]=E(this.tree,o),o+=I;n._ts_free_wasm(_)}return s}firstChildForIndex(t){h(this);let r=d+I;return n.setValue(r,t,"i32"),n._ts_node_first_child_for_byte_wasm(this.tree[0]),E(this.tree)}firstNamedChildForIndex(t){h(this);let r=d+I;return n.setValue(r,t,"i32"),n._ts_node_first_named_child_for_byte_wasm(this.tree[0]),E(this.tree)}get childCount(){return h(this),n._ts_node_child_count_wasm(this.tree[0])}get namedChildCount(){return h(this),n._ts_node_named_child_count_wasm(this.tree[0])}get firstChild(){return this.child(0)}get firstNamedChild(){return this.namedChild(0)}get lastChild(){return this.child(this.childCount-1)}get lastNamedChild(){return this.namedChild(this.namedChildCount-1)}get children(){if(!this._children){h(this),n._ts_node_children_wasm(this.tree[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+m,"i32");if(this._children=new Array(t),t>0){let _=r;for(let s=0;s<t;s++)this._children[s]=E(this.tree,_),_+=I;n._free(r)}}return this._children}get namedChildren(){if(!this._namedChildren){h(this),n._ts_node_named_children_wasm(this.tree[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+m,"i32");if(this._namedChildren=new Array(t),t>0){let _=r;for(let s=0;s<t;s++)this._namedChildren[s]=E(this.tree,_),_+=I;n._free(r)}}return this._namedChildren}descendantsOfType(t,r=S,_=S){Array.isArray(t)||(t=[t]);let s=[],o=this.tree.language.types;for(let f=0,g=o.length;f<g;f++)t.includes(o[f])&&s.push(f);t.includes("ERROR")&&s.push(65535);let l=n._malloc(m*s.length);for(let f=0,g=s.length;f<g;f++)n.setValue(l+f*m,s[f],"i32");h(this),n._ts_node_descendants_of_type_wasm(this.tree[0],l,s.length,r.row,r.column,_.row,_.column);let u=n.getValue(d,"i32"),c=n.getValue(d+m,"i32"),w=new Array(u);if(u>0){let f=c;for(let g=0;g<u;g++)w[g]=E(this.tree,f),f+=I}return n._ts_free_wasm(c),n._free(l),w}get nextSibling(){return h(this),n._ts_node_next_sibling_wasm(this.tree[0]),E(this.tree)}get previousSibling(){return h(this),n._ts_node_prev_sibling_wasm(this.tree[0]),E(this.tree)}get nextNamedSibling(){return h(this),n._ts_node_next_named_sibling_wasm(this.tree[0]),E(this.tree)}get previousNamedSibling(){return h(this),n._ts_node_prev_named_sibling_wasm(this.tree[0]),E(this.tree)}get descendantCount(){return h(this),n._ts_node_descendant_count_wasm(this.tree[0])}get parent(){return h(this),n._ts_node_parent_wasm(this.tree[0]),E(this.tree)}childWithDescendant(t){return t.tree!==this.tree?null:(h(this),h(t,1),n._ts_node_child_with_descendant_wasm(this.tree[0]),E(this.tree))}descendantForIndex(t,r=t){if(typeof t!="number"||typeof r!="number")throw new Error("Arguments must be numbers");h(this);let _=d+I;return n.setValue(_,t,"i32"),n.setValue(_+m,r,"i32"),n._ts_node_descendant_for_index_wasm(this.tree[0]),E(this.tree)}namedDescendantForIndex(t,r=t){if(typeof t!="number"||typeof r!="number")throw new Error("Arguments must be numbers");h(this);let _=d+I;return n.setValue(_,t,"i32"),n.setValue(_+m,r,"i32"),n._ts_node_named_descendant_for_index_wasm(this.tree[0]),E(this.tree)}descendantForPosition(t,r=t){if(!te(t)||!te(r))throw new Error("Arguments must be {row, column} objects");h(this);let _=d+I;return C(_,t),C(_+O,r),n._ts_node_descendant_for_position_wasm(this.tree[0]),E(this.tree)}namedDescendantForPosition(t,r=t){if(!te(t)||!te(r))throw new Error("Arguments must be {row, column} objects");h(this);let _=d+I;return C(_,t),C(_+O,r),n._ts_node_named_descendant_for_position_wasm(this.tree[0]),E(this.tree)}walk(){return h(this),n._ts_tree_cursor_new_wasm(this.tree[0]),new Y(F,this.tree)}edit(t){let{point:r,index:_}=t.editPoint(this.startPosition,this.startIndex);this.startPosition=r,this.startIndex=_}toString(){h(this);let t=n._ts_node_to_string_wasm(this.tree[0]),r=n.AsciiToString(t);return n._ts_free_wasm(t),r}};function ce(e,t,r,_,s){for(let o=0,l=s.length;o<l;o++){let u=n.getValue(r,"i32");r+=m;let c=E(t,r);r+=I,s[o]={patternIndex:_,name:e.captureNames[u],node:c}}return r}a(ce,"unmarshalCaptures");function h(e,t=0){let r=d+t*I;n.setValue(r,e.id,"i32"),r+=m,n.setValue(r,e.startIndex,"i32"),r+=m,n.setValue(r,e.startPosition.row,"i32"),r+=m,n.setValue(r,e.startPosition.column,"i32"),r+=m,n.setValue(r,e[0],"i32")}a(h,"marshalNode");function E(e,t=d){let r=n.getValue(t,"i32");if(t+=m,r===0)return null;let _=n.getValue(t,"i32");t+=m;let s=n.getValue(t,"i32");t+=m;let o=n.getValue(t,"i32");t+=m;let l=n.getValue(t,"i32");return new J(F,{id:r,tree:e,startIndex:_,startPosition:{row:s,column:o},other:l})}a(E,"unmarshalNode");function P({handles:e},t=d){n.setValue(t+0*m,e[0],"i32"),n.setValue(t+1*m,e[1],"i32"),n.setValue(t+2*m,e[2],"i32"),n.setValue(t+3*m,e[3],"i32")}a(P,"marshalTreeCursor");function L({handles:e}){e[0]=n.getValue(d+0*m,"i32"),e[1]=n.getValue(d+1*m,"i32"),e[2]=n.getValue(d+2*m,"i32"),e[3]=n.getValue(d+3*m,"i32")}a(L,"unmarshalTreeCursor");function C(e,t){n.setValue(e,t.row,"i32"),n.setValue(e+m,t.column,"i32")}a(C,"marshalPoint");function Q(e){return{row:n.getValue(e,"i32")>>>0,column:n.getValue(e+m,"i32")>>>0}}a(Q,"unmarshalPoint");function Ae(e,t){C(e,t.startPosition),e+=O,C(e,t.endPosition),e+=O,n.setValue(e,t.startIndex,"i32"),e+=m,n.setValue(e,t.endIndex,"i32")}a(Ae,"marshalRange");function re(e){let t={};return t.startPosition=Q(e),e+=O,t.endPosition=Q(e),e+=O,t.startIndex=n.getValue(e,"i32")>>>0,e+=m,t.endIndex=n.getValue(e,"i32")>>>0,t}a(re,"unmarshalRange");function Me(e,t=d){C(t,e.startPosition),t+=O,C(t,e.oldEndPosition),t+=O,C(t,e.newEndPosition),t+=O,n.setValue(t,e.startIndex,"i32"),t+=m,n.setValue(t,e.oldEndIndex,"i32"),t+=m,n.setValue(t,e.newEndIndex,"i32")}a(Me,"marshalEdit");function Ie(e){let t=n.getValue(e,"i32"),r=n.getValue(e+=m,"i32"),_=n.getValue(e+m,"i32");return{major_version:t,minor_version:r,patch_version:_}}a(Ie,"unmarshalLanguageMetadata");var Be=/^tree_sitter_\w+$/,z=class{static{a(this,"Language")}0=0;types;fields;constructor(t,r){D(t),this[0]=r,this.types=new Array(n._ts_language_symbol_count(this[0]));for(let _=0,s=this.types.length;_<s;_++)n._ts_language_symbol_type(this[0],_)<2&&(this.types[_]=n.UTF8ToString(n._ts_language_symbol_name(this[0],_)));this.fields=new Array(n._ts_language_field_count(this[0])+1);for(let _=0,s=this.fields.length;_<s;_++){let o=n._ts_language_field_name_for_id(this[0],_);o!==0?this.fields[_]=n.UTF8ToString(o):this.fields[_]=null}}get name(){let t=n._ts_language_name(this[0]);return t===0?null:n.UTF8ToString(t)}get abiVersion(){return n._ts_language_abi_version(this[0])}get metadata(){return n._ts_language_metadata_wasm(this[0]),n.getValue(d,"i32")===0?null:Ie(d+m)}get fieldCount(){return this.fields.length-1}get stateCount(){return n._ts_language_state_count(this[0])}fieldIdForName(t){let r=this.fields.indexOf(t);return r!==-1?r:null}fieldNameForId(t){return this.fields[t]??null}idForNodeType(t,r){let _=n.lengthBytesUTF8(t),s=n._malloc(_+1);n.stringToUTF8(t,s,_+1);let o=n._ts_language_symbol_for_name(this[0],s,_,r?1:0);return n._free(s),o||null}get nodeTypeCount(){return n._ts_language_symbol_count(this[0])}nodeTypeForId(t){let r=n._ts_language_symbol_name(this[0],t);return r?n.UTF8ToString(r):null}nodeTypeIsNamed(t){return!!n._ts_language_type_is_named_wasm(this[0],t)}nodeTypeIsVisible(t){return!!n._ts_language_type_is_visible_wasm(this[0],t)}get supertypes(){n._ts_language_supertypes_wasm(this[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+m,"i32"),_=new Array(t);if(t>0){let s=r;for(let o=0;o<t;o++)_[o]=n.getValue(s,"i16"),s+=de}return _}subtypes(t){n._ts_language_subtypes_wasm(this[0],t);let r=n.getValue(d,"i32"),_=n.getValue(d+m,"i32"),s=new Array(r);if(r>0){let o=_;for(let l=0;l<r;l++)s[l]=n.getValue(o,"i16"),o+=de}return s}nextState(t,r){return n._ts_language_next_state(this[0],t,r)}lookaheadIterator(t){let r=n._ts_lookahead_iterator_new(this[0],t);return r?new K(F,r,this):null}static async load(t){let r;if(t instanceof Uint8Array||t instanceof WebAssembly.Module)r=t;else if(globalThis.process?.versions.node)r=await(await import("fs/promises")).readFile(t);else{let s=await fetch(t);if(!s.ok){let l=await s.text();throw new Error(`Language.load failed with status ${s.status}.
|
|
1
|
+
"use strict";var Le=Object.create;var ee=Object.defineProperty;var Ue=Object.getOwnPropertyDescriptor;var Ve=Object.getOwnPropertyNames;var We=Object.getPrototypeOf,qe=Object.prototype.hasOwnProperty;var a=(e,t)=>ee(e,"name",{value:t,configurable:!0});var De=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},He=(e,t)=>{for(var r in t)ee(e,r,{get:t[r],enumerable:!0})},we=(e,t,r,_)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ve(t))!qe.call(e,s)&&s!==r&&ee(e,s,{get:()=>t[s],enumerable:!(_=Ue(t,s))||_.enumerable});return e};var ye=(e,t,r)=>(r=e!=null?Le(We(e)):{},we(t||!e||!e.__esModule?ee(r,"default",{value:e,enumerable:!0}):r,e)),Qe=e=>we(ee({},"__esModule",{value:!0}),e);var Se=De((exports,module)=>{"use strict";var Module=(()=>{var _scriptName=typeof document<"u"?document.currentScript?.src:void 0;return async function(moduleArg={}){var moduleRtn,Module=moduleArg,ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof WorkerGlobalScope<"u",ENVIRONMENT_IS_NODE=typeof process=="object"&&process.versions?.node&&process.type!="renderer";Module.currentQueryProgressCallback=null,Module.currentProgressCallback=null,Module.currentLogCallback=null,Module.currentParseCallback=null,Module.treeSitterSetMemoryLimit=function(e){return e?wasmMemory.buffer.byteLength>e||Module.treeSitterOriginalMemoryGrow?!1:(Module.treeSitterOriginalMemoryGrow=wasmMemory.grow,wasmMemory.grow=function(t){if(wasmMemory.buffer.byteLength+t*65536>e)throw new RangeError("Parse memory limit exceeded");return Module.treeSitterOriginalMemoryGrow.call(wasmMemory,t)},!0):(Module.treeSitterOriginalMemoryGrow&&(wasmMemory.grow=Module.treeSitterOriginalMemoryGrow,Module.treeSitterOriginalMemoryGrow=null),!0)};var arguments_=[],thisProgram="./this.program",quit_=a((e,t)=>{throw t},"quit_");typeof __filename<"u"?_scriptName=__filename:ENVIRONMENT_IS_WORKER&&(_scriptName=self.location.href);var scriptDirectory="";function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}a(locateFile,"locateFile");var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs");scriptDirectory=__dirname+"/",readBinary=a(e=>{e=isFileURI(e)?new URL(e):e;var t=fs.readFileSync(e);return t},"readBinary"),readAsync=a(async(e,t=!0)=>{e=isFileURI(e)?new URL(e):e;var r=fs.readFileSync(e,t?void 0:"utf8");return r},"readAsync"),process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),quit_=a((e,t)=>{throw process.exitCode=e,t},"quit_")}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}ENVIRONMENT_IS_WORKER&&(readBinary=a(e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},"readBinary")),readAsync=a(async e=>{if(isFileURI(e))return new Promise((r,_)=>{var s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="arraybuffer",s.onload=()=>{if(s.status==200||s.status==0&&s.response){r(s.response);return}_(s.status)},s.onerror=_,s.send(null)});var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw new Error(t.status+" : "+t.url)},"readAsync")}var out=console.log.bind(console),err=console.error.bind(console),dynamicLibraries=[],wasmBinary,ABORT=!1,EXITSTATUS,isFileURI=a(e=>e.startsWith("file://"),"isFileURI"),readyPromiseResolve,readyPromiseReject,wasmMemory,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,HEAP64,HEAPU64,HEAP_DATA_VIEW,runtimeInitialized=!1;function updateMemoryViews(){var e=wasmMemory.buffer;Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=HEAP16=new Int16Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),Module.HEAPF32=HEAPF32=new Float32Array(e),Module.HEAPF64=HEAPF64=new Float64Array(e),Module.HEAP64=HEAP64=new BigInt64Array(e),Module.HEAPU64=HEAPU64=new BigUint64Array(e),Module.HEAP_DATA_VIEW=HEAP_DATA_VIEW=new DataView(e),LE_HEAP_UPDATE()}a(updateMemoryViews,"updateMemoryViews");function initMemory(){if(Module.wasmMemory)wasmMemory=Module.wasmMemory;else{var e=Module.INITIAL_MEMORY||33554432;wasmMemory=new WebAssembly.Memory({initial:e/65536,maximum:32768})}updateMemoryViews()}a(initMemory,"initMemory");var __RELOC_FUNCS__=[];function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(onPreRuns)}a(preRun,"preRun");function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),wasmExports.__wasm_call_ctors(),callRuntimeCallbacks(onPostCtors)}a(initRuntime,"initRuntime");function preMain(){}a(preMain,"preMain");function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(onPostRuns)}a(postRun,"postRun");function abort(e){Module.onAbort?.(e),e="Aborted("+e+")",err(e),ABORT=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw readyPromiseReject?.(t),t}a(abort,"abort");var wasmBinaryFile;function findWasmBinary(){return locateFile("web-tree-sitter.wasm")}a(findWasmBinary,"findWasmBinary");function getBinarySync(e){if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}a(getBinarySync,"getBinarySync");async function getWasmBinary(e){if(!wasmBinary)try{var t=await readAsync(e);return new Uint8Array(t)}catch{}return getBinarySync(e)}a(getWasmBinary,"getWasmBinary");async function instantiateArrayBuffer(e,t){try{var r=await getWasmBinary(e),_=await WebAssembly.instantiate(r,t);return _}catch(s){err(`failed to asynchronously prepare wasm: ${s}`),abort(s)}}a(instantiateArrayBuffer,"instantiateArrayBuffer");async function instantiateAsync(e,t,r){if(!e&&!isFileURI(t)&&!ENVIRONMENT_IS_NODE)try{var _=fetch(t,{credentials:"same-origin"}),s=await WebAssembly.instantiateStreaming(_,r);return s}catch(o){err(`wasm streaming compile failed: ${o}`),err("falling back to ArrayBuffer instantiation")}return instantiateArrayBuffer(t,r)}a(instantiateAsync,"instantiateAsync");function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}a(getWasmImports,"getWasmImports");async function createWasm(){function e(o,l){wasmExports=o.exports,wasmExports=relocateExports(wasmExports,1024);var u=getDylinkMetadata(l);u.neededDynlibs&&(dynamicLibraries=u.neededDynlibs.concat(dynamicLibraries));let m={malloc:wasmExports.ts_scanner_malloc_wasm,calloc:wasmExports.ts_scanner_calloc_wasm,realloc:wasmExports.ts_scanner_realloc_wasm};return Object.assign(wasmImports,m),updateGOT(m,!0),mergeLibSymbols(wasmExports,"main"),LDSO.init(),loadDylibs(),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),assignWasmExports(wasmExports),wasmExports}a(e,"receiveInstance");function t(o){return e(o.instance,o.module)}a(t,"receiveInstantiationResult");var r=getWasmImports();if(Module.instantiateWasm)return new Promise((o,l)=>{Module.instantiateWasm(r,(u,m)=>{o(e(u,m))})});wasmBinaryFile??=findWasmBinary();var _=await instantiateAsync(wasmBinary,wasmBinaryFile,r),s=t(_);return s}a(createWasm,"createWasm");class ExitStatus{static{a(this,"ExitStatus")}name="ExitStatus";constructor(t){this.message=`Program terminated with exit(${t})`,this.status=t}}var GOT={},currentModuleWeakSymbols=new Set([]),GOTHandler={get(e,t){var r=GOT[t];return r||(r=GOT[t]=new WebAssembly.Global({value:"i32",mutable:!0})),currentModuleWeakSymbols.has(t)||(r.required=!0),r}},LE_ATOMICS_NATIVE_BYTE_ORDER=[],LE_HEAP_LOAD_F32=a(e=>HEAP_DATA_VIEW.getFloat32(e,!0),"LE_HEAP_LOAD_F32"),LE_HEAP_LOAD_F64=a(e=>HEAP_DATA_VIEW.getFloat64(e,!0),"LE_HEAP_LOAD_F64"),LE_HEAP_LOAD_I16=a(e=>HEAP_DATA_VIEW.getInt16(e,!0),"LE_HEAP_LOAD_I16"),LE_HEAP_LOAD_I32=a(e=>HEAP_DATA_VIEW.getInt32(e,!0),"LE_HEAP_LOAD_I32"),LE_HEAP_LOAD_I64=a(e=>HEAP_DATA_VIEW.getBigInt64(e,!0),"LE_HEAP_LOAD_I64"),LE_HEAP_LOAD_U32=a(e=>HEAP_DATA_VIEW.getUint32(e,!0),"LE_HEAP_LOAD_U32"),LE_HEAP_STORE_F32=a((e,t)=>HEAP_DATA_VIEW.setFloat32(e,t,!0),"LE_HEAP_STORE_F32"),LE_HEAP_STORE_F64=a((e,t)=>HEAP_DATA_VIEW.setFloat64(e,t,!0),"LE_HEAP_STORE_F64"),LE_HEAP_STORE_I16=a((e,t)=>HEAP_DATA_VIEW.setInt16(e,t,!0),"LE_HEAP_STORE_I16"),LE_HEAP_STORE_I32=a((e,t)=>HEAP_DATA_VIEW.setInt32(e,t,!0),"LE_HEAP_STORE_I32"),LE_HEAP_STORE_I64=a((e,t)=>HEAP_DATA_VIEW.setBigInt64(e,t,!0),"LE_HEAP_STORE_I64"),LE_HEAP_STORE_U32=a((e,t)=>HEAP_DATA_VIEW.setUint32(e,t,!0),"LE_HEAP_STORE_U32"),callRuntimeCallbacks=a(e=>{for(;e.length>0;)e.shift()(Module)},"callRuntimeCallbacks"),onPostRuns=[],addOnPostRun=a(e=>onPostRuns.push(e),"addOnPostRun"),onPreRuns=[],addOnPreRun=a(e=>onPreRuns.push(e),"addOnPreRun"),UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder:void 0,findStringEnd=a((e,t,r,_)=>{var s=t+r;if(_)return s;for(;e[t]&&!(t>=s);)++t;return t},"findStringEnd"),UTF8ArrayToString=a((e,t=0,r,_)=>{var s=findStringEnd(e,t,r,_);if(s-t>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,s));for(var o="";t<s;){var l=e[t++];if(!(l&128)){o+=String.fromCharCode(l);continue}var u=e[t++]&63;if((l&224)==192){o+=String.fromCharCode((l&31)<<6|u);continue}var m=e[t++]&63;if((l&240)==224?l=(l&15)<<12|u<<6|m:l=(l&7)<<18|u<<12|m<<6|e[t++]&63,l<65536)o+=String.fromCharCode(l);else{var w=l-65536;o+=String.fromCharCode(55296|w>>10,56320|w&1023)}}return o},"UTF8ArrayToString"),getDylinkMetadata=a(e=>{var t=0,r=0;function _(){return e[t++]}a(_,"getU8");function s(){for(var W=0,j=1;;){var pe=e[t++];if(W+=(pe&127)*j,j*=128,!(pe&128))break}return W}a(s,"getLEB");function o(){var W=s();return t+=W,UTF8ArrayToString(e,t-W,W)}a(o,"getString");function l(){for(var W=s(),j=[];W--;)j.push(o());return j}a(l,"getStringList");function u(W,j){if(W)throw new Error(j)}if(a(u,"failIf"),e instanceof WebAssembly.Module){var m=WebAssembly.Module.customSections(e,"dylink.0");u(m.length===0,"need dylink section"),e=new Uint8Array(m[0]),r=e.length}else{var w=new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer),f=w[0]==1836278016||w[0]==6386541;u(!f,"need to see wasm magic number"),u(e[8]!==0,"need the dylink section to be first"),t=9;var g=s();r=t+g;var v=o();u(v!=="dylink.0")}for(var b={neededDynlibs:[],tlsExports:new Set,weakImports:new Set,runtimePaths:[]},C=1,N=2,V=3,p=4,A=5,y=256,R=3,M=1;t<r;){var k=_(),H=s();if(k===C)b.memorySize=s(),b.memoryAlign=s(),b.tableSize=s(),b.tableAlign=s();else if(k===N)b.neededDynlibs=l();else if(k===V)for(var T=s();T--;){var B=o(),G=s();G&y&&b.tlsExports.add(B)}else if(k===p)for(var T=s();T--;){var he=o(),B=o(),G=s();(G&R)==M&&b.weakImports.add(B)}else k===A?b.runtimePaths=l():t+=H}return b},"getDylinkMetadata");function getValue(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":return HEAP8[e];case"i8":return HEAP8[e];case"i16":return LE_HEAP_LOAD_I16((e>>1)*2);case"i32":return LE_HEAP_LOAD_I32((e>>2)*4);case"i64":return LE_HEAP_LOAD_I64((e>>3)*8);case"float":return LE_HEAP_LOAD_F32((e>>2)*4);case"double":return LE_HEAP_LOAD_F64((e>>3)*8);case"*":return LE_HEAP_LOAD_U32((e>>2)*4);default:abort(`invalid type for getValue: ${t}`)}}a(getValue,"getValue");var newDSO=a((e,t,r)=>{var _={refcount:1/0,name:e,exports:r,global:!0};return LDSO.loadedLibsByName[e]=_,t!=null&&(LDSO.loadedLibsByHandle[t]=_),_},"newDSO"),LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}},___heap_base=82720,alignMemory=a((e,t)=>Math.ceil(e/t)*t,"alignMemory"),getMemory=a(e=>{if(runtimeInitialized)return _calloc(e,1);var t=___heap_base,r=t+alignMemory(e,16);return ___heap_base=r,GOT.__heap_base.value=r,t},"getMemory"),isInternalSym=a(e=>["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm","__start_em_js","__stop_em_js"].includes(e)||e.startsWith("__em_js__"),"isInternalSym"),uleb128EncodeWithLen=a(e=>{let t=e.length;return[t%128|128,t>>7,...e]},"uleb128EncodeWithLen"),wasmTypeCodes={i:127,p:127,j:126,f:125,d:124,e:111},generateTypePack=a(e=>uleb128EncodeWithLen(Array.from(e,t=>{var r=wasmTypeCodes[t];return r})),"generateTypePack"),convertJsFunctionToWasm=a((e,t)=>{var r=Uint8Array.of(0,97,115,109,1,0,0,0,1,...uleb128EncodeWithLen([1,96,...generateTypePack(t.slice(1)),...generateTypePack(t[0]==="v"?"":t[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),_=new WebAssembly.Module(r),s=new WebAssembly.Instance(_,{e:{f:e}}),o=s.exports.f;return o},"convertJsFunctionToWasm"),wasmTableMirror=[],wasmTable=new WebAssembly.Table({initial:45,element:"anyfunc"}),getWasmTableEntry=a(e=>{var t=wasmTableMirror[e];return t||(wasmTableMirror[e]=t=wasmTable.get(e)),t},"getWasmTableEntry"),updateTableMap=a((e,t)=>{if(functionsInTableMap)for(var r=e;r<e+t;r++){var _=getWasmTableEntry(r);_&&functionsInTableMap.set(_,r)}},"updateTableMap"),functionsInTableMap,getFunctionAddress=a(e=>(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(e)||0),"getFunctionAddress"),freeTableIndexes=[],getEmptyTableSlot=a(()=>freeTableIndexes.length?freeTableIndexes.pop():wasmTable.grow(1),"getEmptyTableSlot"),setWasmTableEntry=a((e,t)=>{wasmTable.set(e,t),wasmTableMirror[e]=wasmTable.get(e)},"setWasmTableEntry"),addFunction=a((e,t)=>{var r=getFunctionAddress(e);if(r)return r;var _=getEmptyTableSlot();try{setWasmTableEntry(_,e)}catch(o){if(!(o instanceof TypeError))throw o;var s=convertJsFunctionToWasm(e,t);setWasmTableEntry(_,s)}return functionsInTableMap.set(e,_),_},"addFunction"),updateGOT=a((e,t)=>{for(var r in e)if(!isInternalSym(r)){var _=e[r];GOT[r]||=new WebAssembly.Global({value:"i32",mutable:!0}),(t||GOT[r].value==0)&&(typeof _=="function"?GOT[r].value=addFunction(_):typeof _=="number"?GOT[r].value=_:err(`unhandled export type for '${r}': ${typeof _}`))}},"updateGOT"),relocateExports=a((e,t,r)=>{var _={};for(var s in e){var o=e[s];typeof o=="object"&&(o=o.value),typeof o=="number"&&(o+=t),_[s]=o}return updateGOT(_,r),_},"relocateExports"),isSymbolDefined=a(e=>{var t=wasmImports[e];return!(!t||t.stub)},"isSymbolDefined"),dynCall=a((e,t,r=[],_=!1)=>{var s=getWasmTableEntry(t),o=s(...r);function l(u){return u}return a(l,"convert"),o},"dynCall"),stackSave=a(()=>_emscripten_stack_get_current(),"stackSave"),stackRestore=a(e=>__emscripten_stack_restore(e),"stackRestore"),createInvokeFunction=a(e=>(t,...r)=>{var _=stackSave();try{return dynCall(e,t,r)}catch(s){if(stackRestore(_),s!==s+0)throw s;if(_setThrew(1,0),e[0]=="j")return 0n}},"createInvokeFunction"),resolveGlobalSymbol=a((e,t=!1)=>{var r;return isSymbolDefined(e)?r=wasmImports[e]:e.startsWith("invoke_")&&(r=wasmImports[e]=createInvokeFunction(e.split("_")[1])),{sym:r,name:e}},"resolveGlobalSymbol"),onPostCtors=[],addOnPostCtor=a(e=>onPostCtors.push(e),"addOnPostCtor"),UTF8ToString=a((e,t,r)=>e?UTF8ArrayToString(HEAPU8,e,t,r):"","UTF8ToString"),loadWebAssemblyModule=a((binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);function loadModule(){var memAlign=Math.pow(2,metadata.memoryAlign),memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0;handle&&(HEAP8[handle+8]=1,LE_HEAP_STORE_U32((handle+12>>2)*4,memoryBase),LE_HEAP_STORE_I32((handle+16>>2)*4,metadata.memorySize),LE_HEAP_STORE_U32((handle+20>>2)*4,tableBase),LE_HEAP_STORE_I32((handle+24>>2)*4,metadata.tableSize)),metadata.tableSize&&wasmTable.grow(metadata.tableSize);var moduleExports;function resolveSymbol(e){var t=resolveGlobalSymbol(e).sym;return!t&&localScope&&(t=localScope[e]),t||(t=moduleExports[e]),t}a(resolveSymbol,"resolveSymbol");var proxyHandler={get(e,t){switch(t){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(t in wasmImports&&!wasmImports[t].stub){var r=wasmImports[t];return r}if(!(t in e)){var _;e[t]=(...s)=>(_||=resolveSymbol(t),_(...s))}return e[t]}},proxy=new Proxy({},proxyHandler);currentModuleWeakSymbols=metadata.weakImports;var info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols();function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&body.indexOf("$"+arity)!=-1;arity++)args.push("$"+arity);args=args.join(",");var func=`(${args}) => { ${body} };`;ASM_CONSTS[start]=eval(func)}if(a(addEmAsm,"addEmAsm"),"__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start<stop;){var jsString=UTF8ToString(start);addEmAsm(start,jsString),start=HEAPU8.indexOf(0,start)+1}function addEmJs(name,cSig,body){var jsArgs=[];if(cSig=cSig.slice(1,-1),cSig!="void"){cSig=cSig.split(",");for(var i in cSig){var jsArg=cSig[i].split(" ").pop();jsArgs.push(jsArg.replace("*",""))}}var func=`(${jsArgs}) => ${body};`;moduleExports[name]=eval(func)}a(addEmJs,"addEmJs");for(var name in moduleExports)if(name.startsWith("__em_js__")){var start=moduleExports[name],jsString=UTF8ToString(start),parts=jsString.split("<::>");addEmJs(name.replace("__em_js__",""),parts[0],parts[1]),delete moduleExports[name]}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():addOnPostCtor(init)),moduleExports}if(a(postInstantiation,"postInstantiation"),flags.loadAsync)return(async()=>{var e;return binary instanceof WebAssembly.Module?e=await WebAssembly.instantiate(binary,info):{module:binary,instance:e}=await WebAssembly.instantiate(binary,info),postInstantiation(binary,e)})();var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}return a(loadModule,"loadModule"),flags={...flags,rpath:{parentLibPath:libName,paths:metadata.runtimePaths}},flags.loadAsync?metadata.neededDynlibs.reduce((e,t)=>e.then(()=>loadDynamicLibrary(t,flags,localScope)),Promise.resolve()).then(loadModule):(metadata.neededDynlibs.forEach(e=>loadDynamicLibrary(e,flags,localScope)),loadModule())},"loadWebAssemblyModule"),mergeLibSymbols=a((e,t)=>{for(var[r,_]of Object.entries(e)){let s=a(l=>{isSymbolDefined(l)||(wasmImports[l]=_)},"setImport");s(r);let o="__main_argc_argv";r=="main"&&s(o),r==o&&s("main")}},"mergeLibSymbols"),asyncLoad=a(async e=>{var t=await readAsync(e);return new Uint8Array(t)},"asyncLoad");function loadDynamicLibrary(e,t={global:!0,nodelete:!0},r,_){var s=LDSO.loadedLibsByName[e];if(s)return t.global?s.global||(s.global=!0,mergeLibSymbols(s.exports,e)):r&&Object.assign(r,s.exports),t.nodelete&&s.refcount!==1/0&&(s.refcount=1/0),s.refcount++,_&&(LDSO.loadedLibsByHandle[_]=s),t.loadAsync?Promise.resolve(!0):!0;s=newDSO(e,_,"loading"),s.refcount=t.nodelete?1/0:1,s.global=t.global;function o(){if(_){var m=LE_HEAP_LOAD_U32((_+28>>2)*4),w=LE_HEAP_LOAD_U32((_+32>>2)*4);if(m&&w){var f=HEAP8.slice(m,m+w);return t.loadAsync?Promise.resolve(f):f}}var g=locateFile(e);if(t.loadAsync)return asyncLoad(g);if(!readBinary)throw new Error(`${g}: file not found, and synchronous loading of external files is not available`);return readBinary(g)}a(o,"loadLibData");function l(){return t.loadAsync?o().then(m=>loadWebAssemblyModule(m,t,e,r,_)):loadWebAssemblyModule(o(),t,e,r,_)}a(l,"getExports");function u(m){s.global?mergeLibSymbols(m,e):r&&Object.assign(r,m),s.exports=m}return a(u,"moduleLoaded"),t.loadAsync?l().then(m=>(u(m),!0)):(u(l()),!0)}a(loadDynamicLibrary,"loadDynamicLibrary");var reportUndefinedSymbols=a(()=>{for(var[e,t]of Object.entries(GOT))if(t.value==0){var r=resolveGlobalSymbol(e,!0).sym;if(!r&&!t.required)continue;if(typeof r=="function")t.value=addFunction(r,r.sig);else if(typeof r=="number")t.value=r;else throw new Error(`bad export type for '${e}': ${typeof r}`)}},"reportUndefinedSymbols"),runDependencies=0,dependenciesFulfilled=null,removeRunDependency=a(e=>{if(runDependencies--,Module.monitorRunDependencies?.(runDependencies),runDependencies==0&&dependenciesFulfilled){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}},"removeRunDependency"),addRunDependency=a(e=>{runDependencies++,Module.monitorRunDependencies?.(runDependencies)},"addRunDependency"),loadDylibs=a(async()=>{if(!dynamicLibraries.length){reportUndefinedSymbols();return}addRunDependency("loadDylibs");for(var e of dynamicLibraries)await loadDynamicLibrary(e,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0});reportUndefinedSymbols(),removeRunDependency("loadDylibs")},"loadDylibs"),noExitRuntime=!0;function setValue(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":HEAP8[e]=t;break;case"i8":HEAP8[e]=t;break;case"i16":LE_HEAP_STORE_I16((e>>1)*2,t);break;case"i32":LE_HEAP_STORE_I32((e>>2)*4,t);break;case"i64":LE_HEAP_STORE_I64((e>>3)*8,BigInt(t));break;case"float":LE_HEAP_STORE_F32((e>>2)*4,t);break;case"double":LE_HEAP_STORE_F64((e>>3)*8,t);break;case"*":LE_HEAP_STORE_U32((e>>2)*4,t);break;default:abort(`invalid type for setValue: ${r}`)}}a(setValue,"setValue");var ___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_high=82720,___stack_low=17184,___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},82720),___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),__abort_js=a(()=>abort(""),"__abort_js");__abort_js.sig="v";var runtimeKeepaliveCounter=0,__emscripten_runtime_keepalive_clear=a(()=>{noExitRuntime=!1,runtimeKeepaliveCounter=0},"__emscripten_runtime_keepalive_clear");__emscripten_runtime_keepalive_clear.sig="v";var __emscripten_throw_longjmp=a(()=>{throw 1/0},"__emscripten_throw_longjmp");__emscripten_throw_longjmp.sig="v";var timers={},handleException=a(e=>{if(e instanceof ExitStatus||e=="unwind")return EXITSTATUS;quit_(1,e)},"handleException"),keepRuntimeAlive=a(()=>noExitRuntime||runtimeKeepaliveCounter>0,"keepRuntimeAlive"),_proc_exit=a(e=>{EXITSTATUS=e,keepRuntimeAlive()||(Module.onExit?.(e),ABORT=!0),quit_(e,new ExitStatus(e))},"_proc_exit");_proc_exit.sig="vi";var exitJS=a((e,t)=>{EXITSTATUS=e,_proc_exit(e)},"exitJS"),_exit=exitJS;_exit.sig="vi";var maybeExit=a(()=>{if(!keepRuntimeAlive())try{_exit(EXITSTATUS)}catch(e){handleException(e)}},"maybeExit"),callUserCallback=a(e=>{if(!ABORT)try{e(),maybeExit()}catch(t){handleException(t)}},"callUserCallback"),_emscripten_get_now=a(()=>performance.now(),"_emscripten_get_now");_emscripten_get_now.sig="d";var __setitimer_js=a((e,t)=>{if(timers[e]&&(clearTimeout(timers[e].id),delete timers[e]),!t)return 0;var r=setTimeout(()=>{delete timers[e],callUserCallback(()=>__emscripten_timeout(e,_emscripten_get_now()))},t);return timers[e]={id:r,timeout_ms:t},0},"__setitimer_js");__setitimer_js.sig="iid";var getHeapMax=a(()=>2147483648,"getHeapMax"),growMemory=a(e=>{var t=wasmMemory.buffer.byteLength,r=(e-t+65535)/65536|0;try{return wasmMemory.grow(r),updateMemoryViews(),1}catch{}},"growMemory"),_emscripten_resize_heap=a(e=>{var t=HEAPU8.length;e>>>=0;var r=getHeapMax();if(e>r)return!1;for(var _=1;_<=4;_*=2){var s=t*(1+0/_);s=Math.min(s,e+100663296);var o=Math.min(r,alignMemory(Math.max(e,s),65536)),l=growMemory(o);if(l)return!0}return!1},"_emscripten_resize_heap");_emscripten_resize_heap.sig="ip";function _tree_sitter_log_callback(e,t){if(Module.currentLogCallback){let r=UTF8ToString(t);Module.currentLogCallback(r,e!==0)}}a(_tree_sitter_log_callback,"_tree_sitter_log_callback");function _tree_sitter_parse_callback(e,t,r,_,s){let l=Module.currentParseCallback(t,{row:r,column:_});typeof l=="string"?(setValue(s,l.length,"i32"),stringToUTF16(l,e,10240)):setValue(s,0,"i32")}a(_tree_sitter_parse_callback,"_tree_sitter_parse_callback");function _tree_sitter_progress_callback(e,t){return Module.currentProgressCallback?Module.currentProgressCallback({currentOffset:e,hasError:t!==0})===!0:!1}a(_tree_sitter_progress_callback,"_tree_sitter_progress_callback");function _tree_sitter_query_progress_callback(e){return Module.currentQueryProgressCallback?Module.currentQueryProgressCallback({currentOffset:e})===!0:!1}a(_tree_sitter_query_progress_callback,"_tree_sitter_query_progress_callback");var lengthBytesUTF8=a(e=>{for(var t=0,r=0;r<e.length;++r){var _=e.charCodeAt(r);_<=127?t++:_<=2047?t+=2:_>=55296&&_<=57343?(t+=4,++r):t+=3}return t},"lengthBytesUTF8"),stringToUTF8Array=a((e,t,r,_)=>{if(!(_>0))return 0;for(var s=r,o=r+_-1,l=0;l<e.length;++l){var u=e.codePointAt(l);if(u<=127){if(r>=o)break;t[r++]=u}else if(u<=2047){if(r+1>=o)break;t[r++]=192|u>>6,t[r++]=128|u&63}else if(u<=65535){if(r+2>=o)break;t[r++]=224|u>>12,t[r++]=128|u>>6&63,t[r++]=128|u&63}else{if(r+3>=o)break;t[r++]=240|u>>18,t[r++]=128|u>>12&63,t[r++]=128|u>>6&63,t[r++]=128|u&63,l++}}return t[r]=0,r-s},"stringToUTF8Array"),stringToUTF8=a((e,t,r)=>stringToUTF8Array(e,HEAPU8,t,r),"stringToUTF8"),stackAlloc=a(e=>__emscripten_stack_alloc(e),"stackAlloc"),stringToUTF8OnStack=a(e=>{var t=lengthBytesUTF8(e)+1,r=stackAlloc(t);return stringToUTF8(e,r,t),r},"stringToUTF8OnStack"),AsciiToString=a(e=>{for(var t="";;){var r=HEAPU8[e++];if(!r)return t;t+=String.fromCharCode(r)}},"AsciiToString"),stringToUTF16=a((e,t,r)=>{if(r??=2147483647,r<2)return 0;r-=2;for(var _=t,s=r<e.length*2?r/2:e.length,o=0;o<s;++o){var l=e.charCodeAt(o);LE_HEAP_STORE_I16((t>>1)*2,l),t+=2}return LE_HEAP_STORE_I16((t>>1)*2,0),t-_},"stringToUTF16");LE_ATOMICS_NATIVE_BYTE_ORDER=new Int8Array(new Int16Array([1]).buffer)[0]===1?[(e=>e),(e=>e),void 0,(e=>e)]:[(e=>e),(e=>((e&65280)<<8|(e&255)<<24)>>16),void 0,(e=>e>>24&255|e>>8&65280|(e&65280)<<8|(e&255)<<24)];function LE_HEAP_UPDATE(){HEAPU16.unsigned=(e=>e&65535),HEAPU32.unsigned=(e=>e>>>0)}if(a(LE_HEAP_UPDATE,"LE_HEAP_UPDATE"),initMemory(),Module.noExitRuntime&&(noExitRuntime=Module.noExitRuntime),Module.print&&(out=Module.print),Module.printErr&&(err=Module.printErr),Module.dynamicLibraries&&(dynamicLibraries=Module.dynamicLibraries),Module.wasmBinary&&(wasmBinary=Module.wasmBinary),Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.shift()();Module.setValue=setValue,Module.getValue=getValue,Module.UTF8ToString=UTF8ToString,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8,Module.AsciiToString=AsciiToString,Module.stringToUTF16=stringToUTF16,Module.loadWebAssemblyModule=loadWebAssemblyModule,Module.LE_HEAP_STORE_I64=LE_HEAP_STORE_I64;var ASM_CONSTS={},_free,_ts_range_edit,_ts_language_symbol_count,_ts_language_state_count,_ts_language_abi_version,_ts_language_name,_ts_language_field_count,_ts_language_next_state,_ts_language_symbol_name,_ts_language_symbol_for_name,_strncmp,_ts_language_symbol_type,_ts_language_field_name_for_id,_ts_lookahead_iterator_new,_ts_lookahead_iterator_delete,_ts_lookahead_iterator_reset_state,_ts_lookahead_iterator_reset,_ts_lookahead_iterator_next,_ts_lookahead_iterator_current_symbol,_ts_point_edit,_ts_parser_delete,_ts_parser_set_language,_ts_parser_reset,_ts_parser_set_included_ranges,_ts_query_new,_ts_query_delete,_ts_query_copy,_ts_query_pattern_count,_ts_query_capture_count,_ts_query_string_count,_ts_query_capture_name_for_id,_ts_query_capture_quantifier_for_id,_ts_query_string_value_for_id,_ts_query_predicates_for_pattern,_ts_query_start_byte_for_pattern,_ts_query_end_byte_for_pattern,_ts_query_is_pattern_rooted,_ts_query_is_pattern_non_local,_ts_query_is_pattern_guaranteed_at_step,_ts_query_disable_capture,_ts_query_disable_pattern,_memcmp,_ts_tree_copy,_ts_tree_delete,_malloc,_calloc,_realloc,_iswspace,_iswalnum,_ts_init,_ts_free_wasm,_ts_scanner_malloc_wasm,_ts_scanner_calloc_wasm,_ts_scanner_realloc_wasm,_ts_parser_new_wasm,_ts_parser_enable_logger_wasm,_ts_parser_parse_wasm,_ts_parser_parse_limited_wasm,_ts_parser_abort_limited_wasm,_ts_parser_included_ranges_wasm,_ts_language_type_is_named_wasm,_ts_language_type_is_visible_wasm,_ts_language_metadata_wasm,_ts_language_supertypes_wasm,_ts_language_subtypes_wasm,_ts_tree_root_node_wasm,_ts_tree_root_node_with_offset_wasm,_ts_tree_edit_wasm,_ts_tree_included_ranges_wasm,_ts_tree_get_changed_ranges_wasm,_ts_tree_cursor_new_wasm,_ts_tree_cursor_copy_wasm,_ts_tree_cursor_delete_wasm,_ts_tree_cursor_reset_wasm,_ts_tree_cursor_reset_to_wasm,_ts_tree_cursor_goto_first_child_wasm,_ts_tree_cursor_goto_last_child_wasm,_ts_tree_cursor_goto_first_child_for_index_wasm,_ts_tree_cursor_goto_first_child_for_position_wasm,_ts_tree_cursor_goto_next_sibling_wasm,_ts_tree_cursor_goto_previous_sibling_wasm,_ts_tree_cursor_goto_descendant_wasm,_ts_tree_cursor_goto_parent_wasm,_ts_tree_cursor_current_node_type_id_wasm,_ts_tree_cursor_current_node_state_id_wasm,_ts_tree_cursor_current_node_is_named_wasm,_ts_tree_cursor_current_node_is_missing_wasm,_ts_tree_cursor_current_node_id_wasm,_ts_tree_cursor_start_position_wasm,_ts_tree_cursor_end_position_wasm,_ts_tree_cursor_start_index_wasm,_ts_tree_cursor_end_index_wasm,_ts_tree_cursor_current_field_id_wasm,_ts_tree_cursor_current_depth_wasm,_ts_tree_cursor_current_descendant_index_wasm,_ts_tree_cursor_current_node_wasm,_ts_node_symbol_wasm,_ts_node_field_name_for_child_wasm,_ts_node_field_name_for_named_child_wasm,_ts_node_children_by_field_id_wasm,_ts_node_first_child_for_byte_wasm,_ts_node_first_named_child_for_byte_wasm,_ts_node_grammar_symbol_wasm,_ts_node_child_count_wasm,_ts_node_named_child_count_wasm,_ts_node_child_wasm,_ts_node_named_child_wasm,_ts_node_child_by_field_id_wasm,_ts_node_next_sibling_wasm,_ts_node_prev_sibling_wasm,_ts_node_next_named_sibling_wasm,_ts_node_prev_named_sibling_wasm,_ts_node_descendant_count_wasm,_ts_node_parent_wasm,_ts_node_child_with_descendant_wasm,_ts_node_descendant_for_index_wasm,_ts_node_named_descendant_for_index_wasm,_ts_node_descendant_for_position_wasm,_ts_node_named_descendant_for_position_wasm,_ts_node_start_point_wasm,_ts_node_end_point_wasm,_ts_node_start_index_wasm,_ts_node_end_index_wasm,_ts_node_to_string_wasm,_ts_node_children_wasm,_ts_node_named_children_wasm,_ts_node_descendants_of_type_wasm,_ts_node_is_named_wasm,_ts_node_has_changes_wasm,_ts_node_has_error_wasm,_ts_node_is_error_wasm,_ts_node_is_missing_wasm,_ts_node_is_extra_wasm,_ts_node_parse_state_wasm,_ts_node_next_parse_state_wasm,_ts_query_matches_wasm,_ts_query_captures_wasm,_memset,_memcpy,_memmove,_iswalpha,_iswblank,_iswdigit,_iswlower,_iswpunct,_iswupper,_iswxdigit,_memchr,__emscripten_timeout,_strlen,_strcmp,_strncat,_strncpy,_towlower,_towupper,_setThrew,__emscripten_stack_restore,__emscripten_stack_alloc,_emscripten_stack_get_current,___wasm_apply_data_relocs;function assignWasmExports(e){Module._free=_free=e.free,Module._ts_range_edit=_ts_range_edit=e.ts_range_edit,Module._ts_language_symbol_count=_ts_language_symbol_count=e.ts_language_symbol_count,Module._ts_language_state_count=_ts_language_state_count=e.ts_language_state_count,Module._ts_language_abi_version=_ts_language_abi_version=e.ts_language_abi_version,Module._ts_language_name=_ts_language_name=e.ts_language_name,Module._ts_language_field_count=_ts_language_field_count=e.ts_language_field_count,Module._ts_language_next_state=_ts_language_next_state=e.ts_language_next_state,Module._ts_language_symbol_name=_ts_language_symbol_name=e.ts_language_symbol_name,Module._ts_language_symbol_for_name=_ts_language_symbol_for_name=e.ts_language_symbol_for_name,Module._strncmp=_strncmp=e.strncmp,Module._ts_language_symbol_type=_ts_language_symbol_type=e.ts_language_symbol_type,Module._ts_language_field_name_for_id=_ts_language_field_name_for_id=e.ts_language_field_name_for_id,Module._ts_lookahead_iterator_new=_ts_lookahead_iterator_new=e.ts_lookahead_iterator_new,Module._ts_lookahead_iterator_delete=_ts_lookahead_iterator_delete=e.ts_lookahead_iterator_delete,Module._ts_lookahead_iterator_reset_state=_ts_lookahead_iterator_reset_state=e.ts_lookahead_iterator_reset_state,Module._ts_lookahead_iterator_reset=_ts_lookahead_iterator_reset=e.ts_lookahead_iterator_reset,Module._ts_lookahead_iterator_next=_ts_lookahead_iterator_next=e.ts_lookahead_iterator_next,Module._ts_lookahead_iterator_current_symbol=_ts_lookahead_iterator_current_symbol=e.ts_lookahead_iterator_current_symbol,Module._ts_point_edit=_ts_point_edit=e.ts_point_edit,Module._ts_parser_delete=_ts_parser_delete=e.ts_parser_delete,Module._ts_parser_set_language=_ts_parser_set_language=e.ts_parser_set_language,Module._ts_parser_reset=_ts_parser_reset=e.ts_parser_reset,Module._ts_parser_set_included_ranges=_ts_parser_set_included_ranges=e.ts_parser_set_included_ranges,Module._ts_query_new=_ts_query_new=e.ts_query_new,Module._ts_query_delete=_ts_query_delete=e.ts_query_delete,Module._ts_query_copy=_ts_query_copy=e.ts_query_copy,Module._ts_query_pattern_count=_ts_query_pattern_count=e.ts_query_pattern_count,Module._ts_query_capture_count=_ts_query_capture_count=e.ts_query_capture_count,Module._ts_query_string_count=_ts_query_string_count=e.ts_query_string_count,Module._ts_query_capture_name_for_id=_ts_query_capture_name_for_id=e.ts_query_capture_name_for_id,Module._ts_query_capture_quantifier_for_id=_ts_query_capture_quantifier_for_id=e.ts_query_capture_quantifier_for_id,Module._ts_query_string_value_for_id=_ts_query_string_value_for_id=e.ts_query_string_value_for_id,Module._ts_query_predicates_for_pattern=_ts_query_predicates_for_pattern=e.ts_query_predicates_for_pattern,Module._ts_query_start_byte_for_pattern=_ts_query_start_byte_for_pattern=e.ts_query_start_byte_for_pattern,Module._ts_query_end_byte_for_pattern=_ts_query_end_byte_for_pattern=e.ts_query_end_byte_for_pattern,Module._ts_query_is_pattern_rooted=_ts_query_is_pattern_rooted=e.ts_query_is_pattern_rooted,Module._ts_query_is_pattern_non_local=_ts_query_is_pattern_non_local=e.ts_query_is_pattern_non_local,Module._ts_query_is_pattern_guaranteed_at_step=_ts_query_is_pattern_guaranteed_at_step=e.ts_query_is_pattern_guaranteed_at_step,Module._ts_query_disable_capture=_ts_query_disable_capture=e.ts_query_disable_capture,Module._ts_query_disable_pattern=_ts_query_disable_pattern=e.ts_query_disable_pattern,Module._memcmp=_memcmp=e.memcmp,Module._ts_tree_copy=_ts_tree_copy=e.ts_tree_copy,Module._ts_tree_delete=_ts_tree_delete=e.ts_tree_delete,Module._malloc=_malloc=e.malloc,Module._calloc=_calloc=e.calloc,Module._realloc=_realloc=e.realloc,Module._iswspace=_iswspace=e.iswspace,Module._iswalnum=_iswalnum=e.iswalnum,Module._ts_init=_ts_init=e.ts_init,Module._ts_free_wasm=_ts_free_wasm=e.ts_free_wasm,Module._ts_scanner_malloc_wasm=_ts_scanner_malloc_wasm=e.ts_scanner_malloc_wasm,Module._ts_scanner_calloc_wasm=_ts_scanner_calloc_wasm=e.ts_scanner_calloc_wasm,Module._ts_scanner_realloc_wasm=_ts_scanner_realloc_wasm=e.ts_scanner_realloc_wasm,Module._ts_parser_new_wasm=_ts_parser_new_wasm=e.ts_parser_new_wasm,Module._ts_parser_enable_logger_wasm=_ts_parser_enable_logger_wasm=e.ts_parser_enable_logger_wasm,Module._ts_parser_parse_wasm=_ts_parser_parse_wasm=e.ts_parser_parse_wasm,Module._ts_parser_parse_limited_wasm=_ts_parser_parse_limited_wasm=e.ts_parser_parse_limited_wasm,Module._ts_parser_abort_limited_wasm=_ts_parser_abort_limited_wasm=e.ts_parser_abort_limited_wasm,Module._ts_parser_included_ranges_wasm=_ts_parser_included_ranges_wasm=e.ts_parser_included_ranges_wasm,Module._ts_language_type_is_named_wasm=_ts_language_type_is_named_wasm=e.ts_language_type_is_named_wasm,Module._ts_language_type_is_visible_wasm=_ts_language_type_is_visible_wasm=e.ts_language_type_is_visible_wasm,Module._ts_language_metadata_wasm=_ts_language_metadata_wasm=e.ts_language_metadata_wasm,Module._ts_language_supertypes_wasm=_ts_language_supertypes_wasm=e.ts_language_supertypes_wasm,Module._ts_language_subtypes_wasm=_ts_language_subtypes_wasm=e.ts_language_subtypes_wasm,Module._ts_tree_root_node_wasm=_ts_tree_root_node_wasm=e.ts_tree_root_node_wasm,Module._ts_tree_root_node_with_offset_wasm=_ts_tree_root_node_with_offset_wasm=e.ts_tree_root_node_with_offset_wasm,Module._ts_tree_edit_wasm=_ts_tree_edit_wasm=e.ts_tree_edit_wasm,Module._ts_tree_included_ranges_wasm=_ts_tree_included_ranges_wasm=e.ts_tree_included_ranges_wasm,Module._ts_tree_get_changed_ranges_wasm=_ts_tree_get_changed_ranges_wasm=e.ts_tree_get_changed_ranges_wasm,Module._ts_tree_cursor_new_wasm=_ts_tree_cursor_new_wasm=e.ts_tree_cursor_new_wasm,Module._ts_tree_cursor_copy_wasm=_ts_tree_cursor_copy_wasm=e.ts_tree_cursor_copy_wasm,Module._ts_tree_cursor_delete_wasm=_ts_tree_cursor_delete_wasm=e.ts_tree_cursor_delete_wasm,Module._ts_tree_cursor_reset_wasm=_ts_tree_cursor_reset_wasm=e.ts_tree_cursor_reset_wasm,Module._ts_tree_cursor_reset_to_wasm=_ts_tree_cursor_reset_to_wasm=e.ts_tree_cursor_reset_to_wasm,Module._ts_tree_cursor_goto_first_child_wasm=_ts_tree_cursor_goto_first_child_wasm=e.ts_tree_cursor_goto_first_child_wasm,Module._ts_tree_cursor_goto_last_child_wasm=_ts_tree_cursor_goto_last_child_wasm=e.ts_tree_cursor_goto_last_child_wasm,Module._ts_tree_cursor_goto_first_child_for_index_wasm=_ts_tree_cursor_goto_first_child_for_index_wasm=e.ts_tree_cursor_goto_first_child_for_index_wasm,Module._ts_tree_cursor_goto_first_child_for_position_wasm=_ts_tree_cursor_goto_first_child_for_position_wasm=e.ts_tree_cursor_goto_first_child_for_position_wasm,Module._ts_tree_cursor_goto_next_sibling_wasm=_ts_tree_cursor_goto_next_sibling_wasm=e.ts_tree_cursor_goto_next_sibling_wasm,Module._ts_tree_cursor_goto_previous_sibling_wasm=_ts_tree_cursor_goto_previous_sibling_wasm=e.ts_tree_cursor_goto_previous_sibling_wasm,Module._ts_tree_cursor_goto_descendant_wasm=_ts_tree_cursor_goto_descendant_wasm=e.ts_tree_cursor_goto_descendant_wasm,Module._ts_tree_cursor_goto_parent_wasm=_ts_tree_cursor_goto_parent_wasm=e.ts_tree_cursor_goto_parent_wasm,Module._ts_tree_cursor_current_node_type_id_wasm=_ts_tree_cursor_current_node_type_id_wasm=e.ts_tree_cursor_current_node_type_id_wasm,Module._ts_tree_cursor_current_node_state_id_wasm=_ts_tree_cursor_current_node_state_id_wasm=e.ts_tree_cursor_current_node_state_id_wasm,Module._ts_tree_cursor_current_node_is_named_wasm=_ts_tree_cursor_current_node_is_named_wasm=e.ts_tree_cursor_current_node_is_named_wasm,Module._ts_tree_cursor_current_node_is_missing_wasm=_ts_tree_cursor_current_node_is_missing_wasm=e.ts_tree_cursor_current_node_is_missing_wasm,Module._ts_tree_cursor_current_node_id_wasm=_ts_tree_cursor_current_node_id_wasm=e.ts_tree_cursor_current_node_id_wasm,Module._ts_tree_cursor_start_position_wasm=_ts_tree_cursor_start_position_wasm=e.ts_tree_cursor_start_position_wasm,Module._ts_tree_cursor_end_position_wasm=_ts_tree_cursor_end_position_wasm=e.ts_tree_cursor_end_position_wasm,Module._ts_tree_cursor_start_index_wasm=_ts_tree_cursor_start_index_wasm=e.ts_tree_cursor_start_index_wasm,Module._ts_tree_cursor_end_index_wasm=_ts_tree_cursor_end_index_wasm=e.ts_tree_cursor_end_index_wasm,Module._ts_tree_cursor_current_field_id_wasm=_ts_tree_cursor_current_field_id_wasm=e.ts_tree_cursor_current_field_id_wasm,Module._ts_tree_cursor_current_depth_wasm=_ts_tree_cursor_current_depth_wasm=e.ts_tree_cursor_current_depth_wasm,Module._ts_tree_cursor_current_descendant_index_wasm=_ts_tree_cursor_current_descendant_index_wasm=e.ts_tree_cursor_current_descendant_index_wasm,Module._ts_tree_cursor_current_node_wasm=_ts_tree_cursor_current_node_wasm=e.ts_tree_cursor_current_node_wasm,Module._ts_node_symbol_wasm=_ts_node_symbol_wasm=e.ts_node_symbol_wasm,Module._ts_node_field_name_for_child_wasm=_ts_node_field_name_for_child_wasm=e.ts_node_field_name_for_child_wasm,Module._ts_node_field_name_for_named_child_wasm=_ts_node_field_name_for_named_child_wasm=e.ts_node_field_name_for_named_child_wasm,Module._ts_node_children_by_field_id_wasm=_ts_node_children_by_field_id_wasm=e.ts_node_children_by_field_id_wasm,Module._ts_node_first_child_for_byte_wasm=_ts_node_first_child_for_byte_wasm=e.ts_node_first_child_for_byte_wasm,Module._ts_node_first_named_child_for_byte_wasm=_ts_node_first_named_child_for_byte_wasm=e.ts_node_first_named_child_for_byte_wasm,Module._ts_node_grammar_symbol_wasm=_ts_node_grammar_symbol_wasm=e.ts_node_grammar_symbol_wasm,Module._ts_node_child_count_wasm=_ts_node_child_count_wasm=e.ts_node_child_count_wasm,Module._ts_node_named_child_count_wasm=_ts_node_named_child_count_wasm=e.ts_node_named_child_count_wasm,Module._ts_node_child_wasm=_ts_node_child_wasm=e.ts_node_child_wasm,Module._ts_node_named_child_wasm=_ts_node_named_child_wasm=e.ts_node_named_child_wasm,Module._ts_node_child_by_field_id_wasm=_ts_node_child_by_field_id_wasm=e.ts_node_child_by_field_id_wasm,Module._ts_node_next_sibling_wasm=_ts_node_next_sibling_wasm=e.ts_node_next_sibling_wasm,Module._ts_node_prev_sibling_wasm=_ts_node_prev_sibling_wasm=e.ts_node_prev_sibling_wasm,Module._ts_node_next_named_sibling_wasm=_ts_node_next_named_sibling_wasm=e.ts_node_next_named_sibling_wasm,Module._ts_node_prev_named_sibling_wasm=_ts_node_prev_named_sibling_wasm=e.ts_node_prev_named_sibling_wasm,Module._ts_node_descendant_count_wasm=_ts_node_descendant_count_wasm=e.ts_node_descendant_count_wasm,Module._ts_node_parent_wasm=_ts_node_parent_wasm=e.ts_node_parent_wasm,Module._ts_node_child_with_descendant_wasm=_ts_node_child_with_descendant_wasm=e.ts_node_child_with_descendant_wasm,Module._ts_node_descendant_for_index_wasm=_ts_node_descendant_for_index_wasm=e.ts_node_descendant_for_index_wasm,Module._ts_node_named_descendant_for_index_wasm=_ts_node_named_descendant_for_index_wasm=e.ts_node_named_descendant_for_index_wasm,Module._ts_node_descendant_for_position_wasm=_ts_node_descendant_for_position_wasm=e.ts_node_descendant_for_position_wasm,Module._ts_node_named_descendant_for_position_wasm=_ts_node_named_descendant_for_position_wasm=e.ts_node_named_descendant_for_position_wasm,Module._ts_node_start_point_wasm=_ts_node_start_point_wasm=e.ts_node_start_point_wasm,Module._ts_node_end_point_wasm=_ts_node_end_point_wasm=e.ts_node_end_point_wasm,Module._ts_node_start_index_wasm=_ts_node_start_index_wasm=e.ts_node_start_index_wasm,Module._ts_node_end_index_wasm=_ts_node_end_index_wasm=e.ts_node_end_index_wasm,Module._ts_node_to_string_wasm=_ts_node_to_string_wasm=e.ts_node_to_string_wasm,Module._ts_node_children_wasm=_ts_node_children_wasm=e.ts_node_children_wasm,Module._ts_node_named_children_wasm=_ts_node_named_children_wasm=e.ts_node_named_children_wasm,Module._ts_node_descendants_of_type_wasm=_ts_node_descendants_of_type_wasm=e.ts_node_descendants_of_type_wasm,Module._ts_node_is_named_wasm=_ts_node_is_named_wasm=e.ts_node_is_named_wasm,Module._ts_node_has_changes_wasm=_ts_node_has_changes_wasm=e.ts_node_has_changes_wasm,Module._ts_node_has_error_wasm=_ts_node_has_error_wasm=e.ts_node_has_error_wasm,Module._ts_node_is_error_wasm=_ts_node_is_error_wasm=e.ts_node_is_error_wasm,Module._ts_node_is_missing_wasm=_ts_node_is_missing_wasm=e.ts_node_is_missing_wasm,Module._ts_node_is_extra_wasm=_ts_node_is_extra_wasm=e.ts_node_is_extra_wasm,Module._ts_node_parse_state_wasm=_ts_node_parse_state_wasm=e.ts_node_parse_state_wasm,Module._ts_node_next_parse_state_wasm=_ts_node_next_parse_state_wasm=e.ts_node_next_parse_state_wasm,Module._ts_query_matches_wasm=_ts_query_matches_wasm=e.ts_query_matches_wasm,Module._ts_query_captures_wasm=_ts_query_captures_wasm=e.ts_query_captures_wasm,Module._memset=_memset=e.memset,Module._memcpy=_memcpy=e.memcpy,Module._memmove=_memmove=e.memmove,Module._iswalpha=_iswalpha=e.iswalpha,Module._iswblank=_iswblank=e.iswblank,Module._iswdigit=_iswdigit=e.iswdigit,Module._iswlower=_iswlower=e.iswlower,Module._iswpunct=_iswpunct=e.iswpunct,Module._iswupper=_iswupper=e.iswupper,Module._iswxdigit=_iswxdigit=e.iswxdigit,Module._memchr=_memchr=e.memchr,__emscripten_timeout=e._emscripten_timeout,Module._strlen=_strlen=e.strlen,Module._strcmp=_strcmp=e.strcmp,Module._strncat=_strncat=e.strncat,Module._strncpy=_strncpy=e.strncpy,Module._towlower=_towlower=e.towlower,Module._towupper=_towupper=e.towupper,_setThrew=e.setThrew,__emscripten_stack_restore=e._emscripten_stack_restore,__emscripten_stack_alloc=e._emscripten_stack_alloc,_emscripten_stack_get_current=e.emscripten_stack_get_current,___wasm_apply_data_relocs=e.__wasm_apply_data_relocs}a(assignWasmExports,"assignWasmExports");var wasmImports={__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__stack_high:___stack_high,__stack_low:___stack_low,__stack_pointer:___stack_pointer,__table_base:___table_base,_abort_js:__abort_js,_emscripten_runtime_keepalive_clear:__emscripten_runtime_keepalive_clear,_emscripten_throw_longjmp:__emscripten_throw_longjmp,_setitimer_js:__setitimer_js,emscripten_resize_heap:_emscripten_resize_heap,invoke_i,invoke_iii,invoke_iiiij,invoke_vi,invoke_vii,memory:wasmMemory,proc_exit:_proc_exit,tree_sitter_log_callback:_tree_sitter_log_callback,tree_sitter_parse_callback:_tree_sitter_parse_callback,tree_sitter_progress_callback:_tree_sitter_progress_callback,tree_sitter_query_progress_callback:_tree_sitter_query_progress_callback};function invoke_vi(e,t){var r=stackSave();try{getWasmTableEntry(e)(t)}catch(_){if(stackRestore(r),_!==_+0)throw _;_setThrew(1,0)}}a(invoke_vi,"invoke_vi");function invoke_i(e){var t=stackSave();try{return getWasmTableEntry(e)()}catch(r){if(stackRestore(t),r!==r+0)throw r;_setThrew(1,0)}}a(invoke_i,"invoke_i");function invoke_iii(e,t,r){var _=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(s){if(stackRestore(_),s!==s+0)throw s;_setThrew(1,0)}}a(invoke_iii,"invoke_iii");function invoke_vii(e,t,r){var _=stackSave();try{getWasmTableEntry(e)(t,r)}catch(s){if(stackRestore(_),s!==s+0)throw s;_setThrew(1,0)}}a(invoke_vii,"invoke_vii");function invoke_iiiij(e,t,r,_,s){var o=stackSave();try{return getWasmTableEntry(e)(t,r,_,s)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}a(invoke_iiiij,"invoke_iiiij");function callMain(e=[]){var t=resolveGlobalSymbol("main").sym;if(t){e.unshift(thisProgram);var r=e.length,_=stackAlloc((r+1)*4),s=_;e.forEach(l=>{LE_HEAP_STORE_U32((s>>2)*4,stringToUTF8OnStack(l)),s+=4}),LE_HEAP_STORE_U32((s>>2)*4,0);try{var o=t(r,_);return exitJS(o,!0),o}catch(l){return handleException(l)}}}a(callMain,"callMain");function run(e=arguments_){if(runDependencies>0){dependenciesFulfilled=run;return}if(preRun(),runDependencies>0){dependenciesFulfilled=run;return}function t(){if(Module.calledRun=!0,!ABORT){initRuntime(),readyPromiseResolve?.(Module),Module.onRuntimeInitialized?.();var r=Module.noInitialRun||!1;r||callMain(e),postRun()}}a(t,"doRun"),Module.setStatus?(Module.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>Module.setStatus(""),1),t()},1)):t()}a(run,"run");var wasmExports;return wasmExports=await createWasm(),run(),runtimeInitialized?moduleRtn=Module:moduleRtn=new Promise((e,t)=>{readyPromiseResolve=e,readyPromiseReject=t}),moduleRtn}})();typeof exports=="object"&&typeof module=="object"?(module.exports=Module,module.exports.default=Module):typeof define=="function"&&define.amd&&define([],()=>Module)});var _t={};He(_t,{CaptureQuantifier:()=>Oe,Edit:()=>se,LANGUAGE_VERSION:()=>_e,Language:()=>z,LookaheadIterator:()=>K,MIN_COMPATIBLE_VERSION:()=>le,Node:()=>J,Parser:()=>ie,Query:()=>ue,Tree:()=>X,TreeCursor:()=>Y});module.exports=Qe(_t);var se=class{static{a(this,"Edit")}startPosition;oldEndPosition;newEndPosition;startIndex;oldEndIndex;newEndIndex;constructor({startIndex:t,oldEndIndex:r,newEndIndex:_,startPosition:s,oldEndPosition:o,newEndPosition:l}){this.startIndex=t>>>0,this.oldEndIndex=r>>>0,this.newEndIndex=_>>>0,this.startPosition=s,this.oldEndPosition=o,this.newEndPosition=l}editPoint(t,r){let _=r,s={...t};if(r>=this.oldEndIndex){_=this.newEndIndex+(r-this.oldEndIndex);let o=t.row;s.row=this.newEndPosition.row+(t.row-this.oldEndPosition.row),s.column=o===this.oldEndPosition.row?this.newEndPosition.column+(t.column-this.oldEndPosition.column):t.column}else r>this.startIndex&&(_=this.newEndIndex,s.row=this.newEndPosition.row,s.column=this.newEndPosition.column);return{point:s,index:_}}editRange(t){let r={startIndex:t.startIndex,startPosition:{...t.startPosition},endIndex:t.endIndex,endPosition:{...t.endPosition}};return t.endIndex>=this.oldEndIndex?t.endIndex!==Number.MAX_SAFE_INTEGER&&(r.endIndex=this.newEndIndex+(t.endIndex-this.oldEndIndex),r.endPosition={row:this.newEndPosition.row+(t.endPosition.row-this.oldEndPosition.row),column:t.endPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(t.endPosition.column-this.oldEndPosition.column):t.endPosition.column},r.endIndex<this.newEndIndex&&(r.endIndex=Number.MAX_SAFE_INTEGER,r.endPosition={row:Number.MAX_SAFE_INTEGER,column:Number.MAX_SAFE_INTEGER})):t.endIndex>this.startIndex&&(r.endIndex=this.startIndex,r.endPosition={...this.startPosition}),t.startIndex>=this.oldEndIndex?(r.startIndex=this.newEndIndex+(t.startIndex-this.oldEndIndex),r.startPosition={row:this.newEndPosition.row+(t.startPosition.row-this.oldEndPosition.row),column:t.startPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(t.startPosition.column-this.oldEndPosition.column):t.startPosition.column},r.startIndex<this.newEndIndex&&(r.startIndex=Number.MAX_SAFE_INTEGER,r.startPosition={row:Number.MAX_SAFE_INTEGER,column:Number.MAX_SAFE_INTEGER})):t.startIndex>this.startIndex&&(r.startIndex=this.startIndex,r.startPosition={...this.startPosition}),r}};var de=2,c=4,ae=4*c,I=5*c,O=2*c,$=2*c+2*O,S={row:0,column:0},x=Symbol("INTERNAL");function q(e){if(e!==x)throw new Error("Illegal constructor")}a(q,"assertInternal");function te(e){return!!e&&typeof e.row=="number"&&typeof e.column=="number"}a(te,"isPoint");function be(e){n=e}a(be,"setModule");var n;function D(e){try{return new FinalizationRegistry(e)}catch(t){console.error("Unsupported FinalizationRegistry:",t);return}}a(D,"newFinalizer");var Pe=D(e=>{n._ts_lookahead_iterator_delete(e)}),K=class{static{a(this,"LookaheadIterator")}0=0;language;positioned=!1;constructor(t,r,_){q(t),this[0]=r,this.language=_,Pe?.register(this,r,this)}get currentTypeId(){return this.positioned?n._ts_lookahead_iterator_current_symbol(this[0]):null}get currentType(){let t=this.currentTypeId;return t===null?null:this.language.types[t]??n.UTF8ToString(n._ts_language_symbol_name(this.language[0],t))}delete(){Pe?.unregister(this),n._ts_lookahead_iterator_delete(this[0]),this[0]=0}reset(t,r){return n._ts_lookahead_iterator_reset(this[0],t[0],r)?(this.language=t,this.positioned=!1,!0):!1}resetState(t){return n._ts_lookahead_iterator_reset_state(this[0],t)?(this.positioned=!1,!0):!1}[Symbol.iterator](){return{next:a(()=>{this.positioned=!!n._ts_lookahead_iterator_next(this[0]);let t=this.currentType;return t===null?{done:!0,value:""}:{done:!1,value:t}},"next")}}};function oe(e,t,r,_){let s=r-t,o=e.textCallback(t,_);if(o){for(t+=o.length;t<r;){let l=e.textCallback(t,_);if(l&&l.length>0)t+=l.length,o+=l;else break}t>r&&(o=o.slice(0,s))}return o??""}a(oe,"getText");var ve=D(e=>{n._ts_tree_delete(e)}),X=class e{static{a(this,"Tree")}0=0;textCallback;language;constructor(t,r,_,s){q(t),this[0]=r,this.language=_,this.textCallback=s,ve?.register(this,r,this)}copy(){let t=n._ts_tree_copy(this[0]);return new e(x,t,this.language,this.textCallback)}delete(){ve?.unregister(this),n._ts_tree_delete(this[0]),this[0]=0}get rootNode(){return n._ts_tree_root_node_wasm(this[0]),E(this)}rootNodeWithOffset(t,r){let _=d+I;return n.setValue(_,t,"i32"),F(_+c,r),n._ts_tree_root_node_with_offset_wasm(this[0]),E(this)}edit(t){Me(t),n._ts_tree_edit_wasm(this[0])}walk(){return this.rootNode.walk()}getChangedRanges(t){if(!(t instanceof e))throw new TypeError("Argument must be a Tree");n._ts_tree_get_changed_ranges_wasm(this[0],t[0]);let r=n.getValue(d,"i32"),_=n.getValue(d+c,"i32"),s=new Array(r);if(r>0){let o=_;for(let l=0;l<r;l++)s[l]=re(o),o+=$;n._ts_free_wasm(_)}return s}getIncludedRanges(){n._ts_tree_included_ranges_wasm(this[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+c,"i32"),_=new Array(t);if(t>0){let s=r;for(let o=0;o<t;o++)_[o]=re(s),s+=$;n._ts_free_wasm(r)}return _}};var Ee=D(e=>{P({handles:e}),n._ts_tree_cursor_delete_wasm(0)}),Y=class e{static{a(this,"TreeCursor")}handles=[0,0,0,0];tree;constructor(t,r){q(t),this.tree=r,L(this),Ee?.register(this,this.handles,this)}copy(){return P(this),n._ts_tree_cursor_copy_wasm(this.tree[0]),new e(x,this.tree)}delete(){Ee?.unregister(this),P(this),n._ts_tree_cursor_delete_wasm(this.tree[0]),this.handles.fill(0)}get currentNode(){return P(this),n._ts_tree_cursor_current_node_wasm(this.tree[0]),E(this.tree)}get currentFieldId(){return P(this),n._ts_tree_cursor_current_field_id_wasm(this.tree[0])}get currentFieldName(){return this.tree.language.fields[this.currentFieldId]}get currentDepth(){return P(this),n._ts_tree_cursor_current_depth_wasm(this.tree[0])}get currentDescendantIndex(){return P(this),n._ts_tree_cursor_current_descendant_index_wasm(this.tree[0])}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return P(this),n._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeStateId(){return P(this),n._ts_tree_cursor_current_node_state_id_wasm(this.tree[0])}get nodeId(){return P(this),n._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return P(this),n._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])===1}get nodeIsMissing(){return P(this),n._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])===1}get nodeText(){P(this);let t=n._ts_tree_cursor_start_index_wasm(this.tree[0]),r=n._ts_tree_cursor_end_index_wasm(this.tree[0]);n._ts_tree_cursor_start_position_wasm(this.tree[0]);let _=Q(d);return oe(this.tree,t,r,_)}get startPosition(){return P(this),n._ts_tree_cursor_start_position_wasm(this.tree[0]),Q(d)}get endPosition(){return P(this),n._ts_tree_cursor_end_position_wasm(this.tree[0]),Q(d)}get startIndex(){return P(this),n._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return P(this),n._ts_tree_cursor_end_index_wasm(this.tree[0])}gotoFirstChild(){P(this);let t=n._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return L(this),t===1}gotoLastChild(){P(this);let t=n._ts_tree_cursor_goto_last_child_wasm(this.tree[0]);return L(this),t===1}gotoParent(){P(this);let t=n._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return L(this),t===1}gotoNextSibling(){P(this);let t=n._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return L(this),t===1}gotoPreviousSibling(){P(this);let t=n._ts_tree_cursor_goto_previous_sibling_wasm(this.tree[0]);return L(this),t===1}gotoDescendant(t){P(this),n._ts_tree_cursor_goto_descendant_wasm(this.tree[0],t),L(this)}gotoFirstChildForIndex(t){P(this),n.setValue(d+ae,t,"i32");let r=n._ts_tree_cursor_goto_first_child_for_index_wasm(this.tree[0]);return L(this),r===1}gotoFirstChildForPosition(t){P(this),F(d+ae,t);let r=n._ts_tree_cursor_goto_first_child_for_position_wasm(this.tree[0]);return L(this),r===1}reset(t){h(t),P(this,d+I),n._ts_tree_cursor_reset_wasm(t.tree[0]),L(this),this.tree=t.tree}resetTo(t){P(this,d),P(t,d+ae),n._ts_tree_cursor_reset_to_wasm(this.tree[0],t.tree[0]),L(this),this.tree=t.tree}};var J=class{static{a(this,"Node")}0=0;_children;_namedChildren;constructor(t,{id:r,tree:_,startIndex:s,startPosition:o,other:l}){q(t),this[0]=l,this.id=r,this.tree=_,this.startIndex=s,this.startPosition=o}id;startIndex;startPosition;tree;get typeId(){return h(this),n._ts_node_symbol_wasm(this.tree[0])}get grammarId(){return h(this),n._ts_node_grammar_symbol_wasm(this.tree[0])}get type(){return this.tree.language.types[this.typeId]||"ERROR"}get grammarType(){return this.tree.language.types[this.grammarId]||"ERROR"}get isNamed(){return h(this),n._ts_node_is_named_wasm(this.tree[0])===1}get isExtra(){return h(this),n._ts_node_is_extra_wasm(this.tree[0])===1}get isError(){return h(this),n._ts_node_is_error_wasm(this.tree[0])===1}get isMissing(){return h(this),n._ts_node_is_missing_wasm(this.tree[0])===1}get hasChanges(){return h(this),n._ts_node_has_changes_wasm(this.tree[0])===1}get hasError(){return h(this),n._ts_node_has_error_wasm(this.tree[0])===1}get endIndex(){return h(this),n._ts_node_end_index_wasm(this.tree[0])}get endPosition(){return h(this),n._ts_node_end_point_wasm(this.tree[0]),Q(d)}get text(){return oe(this.tree,this.startIndex,this.endIndex,this.startPosition)}get parseState(){return h(this),n._ts_node_parse_state_wasm(this.tree[0])}get nextParseState(){return h(this),n._ts_node_next_parse_state_wasm(this.tree[0])}equals(t){return this.tree===t.tree&&this.id===t.id}child(t){return h(this),n._ts_node_child_wasm(this.tree[0],t),E(this.tree)}namedChild(t){return h(this),n._ts_node_named_child_wasm(this.tree[0],t),E(this.tree)}childForFieldId(t){return h(this),n._ts_node_child_by_field_id_wasm(this.tree[0],t),E(this.tree)}childForFieldName(t){let r=this.tree.language.fields.indexOf(t);return r!==-1?this.childForFieldId(r):null}fieldNameForChild(t){h(this);let r=n._ts_node_field_name_for_child_wasm(this.tree[0],t);return r?n.AsciiToString(r):null}fieldNameForNamedChild(t){h(this);let r=n._ts_node_field_name_for_named_child_wasm(this.tree[0],t);return r?n.AsciiToString(r):null}childrenForFieldName(t){let r=this.tree.language.fields.indexOf(t);return r!==-1&&r!==0?this.childrenForFieldId(r):[]}childrenForFieldId(t){h(this),n._ts_node_children_by_field_id_wasm(this.tree[0],t);let r=n.getValue(d,"i32"),_=n.getValue(d+c,"i32"),s=new Array(r);if(r>0){let o=_;for(let l=0;l<r;l++)s[l]=E(this.tree,o),o+=I;n._ts_free_wasm(_)}return s}firstChildForIndex(t){h(this);let r=d+I;return n.setValue(r,t,"i32"),n._ts_node_first_child_for_byte_wasm(this.tree[0]),E(this.tree)}firstNamedChildForIndex(t){h(this);let r=d+I;return n.setValue(r,t,"i32"),n._ts_node_first_named_child_for_byte_wasm(this.tree[0]),E(this.tree)}get childCount(){return h(this),n._ts_node_child_count_wasm(this.tree[0])}get namedChildCount(){return h(this),n._ts_node_named_child_count_wasm(this.tree[0])}get firstChild(){return this.child(0)}get firstNamedChild(){return this.namedChild(0)}get lastChild(){return this.child(this.childCount-1)}get lastNamedChild(){return this.namedChild(this.namedChildCount-1)}get children(){if(!this._children){h(this),n._ts_node_children_wasm(this.tree[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+c,"i32");if(this._children=new Array(t),t>0){let _=r;for(let s=0;s<t;s++)this._children[s]=E(this.tree,_),_+=I;n._free(r)}}return this._children}get namedChildren(){if(!this._namedChildren){h(this),n._ts_node_named_children_wasm(this.tree[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+c,"i32");if(this._namedChildren=new Array(t),t>0){let _=r;for(let s=0;s<t;s++)this._namedChildren[s]=E(this.tree,_),_+=I;n._free(r)}}return this._namedChildren}descendantsOfType(t,r=S,_=S){Array.isArray(t)||(t=[t]);let s=[],o=this.tree.language.types;for(let f=0,g=o.length;f<g;f++)t.includes(o[f])&&s.push(f);t.includes("ERROR")&&s.push(65535);let l=n._malloc(c*s.length);for(let f=0,g=s.length;f<g;f++)n.setValue(l+f*c,s[f],"i32");h(this),n._ts_node_descendants_of_type_wasm(this.tree[0],l,s.length,r.row,r.column,_.row,_.column);let u=n.getValue(d,"i32"),m=n.getValue(d+c,"i32"),w=new Array(u);if(u>0){let f=m;for(let g=0;g<u;g++)w[g]=E(this.tree,f),f+=I}return n._ts_free_wasm(m),n._free(l),w}get nextSibling(){return h(this),n._ts_node_next_sibling_wasm(this.tree[0]),E(this.tree)}get previousSibling(){return h(this),n._ts_node_prev_sibling_wasm(this.tree[0]),E(this.tree)}get nextNamedSibling(){return h(this),n._ts_node_next_named_sibling_wasm(this.tree[0]),E(this.tree)}get previousNamedSibling(){return h(this),n._ts_node_prev_named_sibling_wasm(this.tree[0]),E(this.tree)}get descendantCount(){return h(this),n._ts_node_descendant_count_wasm(this.tree[0])}get parent(){return h(this),n._ts_node_parent_wasm(this.tree[0]),E(this.tree)}childWithDescendant(t){return t.tree!==this.tree?null:(h(this),h(t,1),n._ts_node_child_with_descendant_wasm(this.tree[0]),E(this.tree))}descendantForIndex(t,r=t){if(typeof t!="number"||typeof r!="number")throw new Error("Arguments must be numbers");h(this);let _=d+I;return n.setValue(_,t,"i32"),n.setValue(_+c,r,"i32"),n._ts_node_descendant_for_index_wasm(this.tree[0]),E(this.tree)}namedDescendantForIndex(t,r=t){if(typeof t!="number"||typeof r!="number")throw new Error("Arguments must be numbers");h(this);let _=d+I;return n.setValue(_,t,"i32"),n.setValue(_+c,r,"i32"),n._ts_node_named_descendant_for_index_wasm(this.tree[0]),E(this.tree)}descendantForPosition(t,r=t){if(!te(t)||!te(r))throw new Error("Arguments must be {row, column} objects");h(this);let _=d+I;return F(_,t),F(_+O,r),n._ts_node_descendant_for_position_wasm(this.tree[0]),E(this.tree)}namedDescendantForPosition(t,r=t){if(!te(t)||!te(r))throw new Error("Arguments must be {row, column} objects");h(this);let _=d+I;return F(_,t),F(_+O,r),n._ts_node_named_descendant_for_position_wasm(this.tree[0]),E(this.tree)}walk(){return h(this),n._ts_tree_cursor_new_wasm(this.tree[0]),new Y(x,this.tree)}edit(t){let{point:r,index:_}=t.editPoint(this.startPosition,this.startIndex);this.startPosition=r,this.startIndex=_}toString(){h(this);let t=n._ts_node_to_string_wasm(this.tree[0]),r=n.AsciiToString(t);return n._ts_free_wasm(t),r}};function ce(e,t,r,_,s){for(let o=0,l=s.length;o<l;o++){let u=n.getValue(r,"i32");r+=c;let m=E(t,r);r+=I,s[o]={patternIndex:_,name:e.captureNames[u],node:m}}return r}a(ce,"unmarshalCaptures");function h(e,t=0){let r=d+t*I;n.setValue(r,e.id,"i32"),r+=c,n.setValue(r,e.startIndex,"i32"),r+=c,n.setValue(r,e.startPosition.row,"i32"),r+=c,n.setValue(r,e.startPosition.column,"i32"),r+=c,n.setValue(r,e[0],"i32")}a(h,"marshalNode");function E(e,t=d){let r=n.getValue(t,"i32");if(t+=c,r===0)return null;let _=n.getValue(t,"i32");t+=c;let s=n.getValue(t,"i32");t+=c;let o=n.getValue(t,"i32");t+=c;let l=n.getValue(t,"i32");return new J(x,{id:r,tree:e,startIndex:_,startPosition:{row:s,column:o},other:l})}a(E,"unmarshalNode");function P({handles:e},t=d){n.setValue(t+0*c,e[0],"i32"),n.setValue(t+1*c,e[1],"i32"),n.setValue(t+2*c,e[2],"i32"),n.setValue(t+3*c,e[3],"i32")}a(P,"marshalTreeCursor");function L({handles:e}){e[0]=n.getValue(d+0*c,"i32"),e[1]=n.getValue(d+1*c,"i32"),e[2]=n.getValue(d+2*c,"i32"),e[3]=n.getValue(d+3*c,"i32")}a(L,"unmarshalTreeCursor");function F(e,t){n.setValue(e,t.row,"i32"),n.setValue(e+c,t.column,"i32")}a(F,"marshalPoint");function Q(e){return{row:n.getValue(e,"i32")>>>0,column:n.getValue(e+c,"i32")>>>0}}a(Q,"unmarshalPoint");function Ae(e,t){F(e,t.startPosition),e+=O,F(e,t.endPosition),e+=O,n.setValue(e,t.startIndex,"i32"),e+=c,n.setValue(e,t.endIndex,"i32")}a(Ae,"marshalRange");function re(e){let t={};return t.startPosition=Q(e),e+=O,t.endPosition=Q(e),e+=O,t.startIndex=n.getValue(e,"i32")>>>0,e+=c,t.endIndex=n.getValue(e,"i32")>>>0,t}a(re,"unmarshalRange");function Me(e,t=d){F(t,e.startPosition),t+=O,F(t,e.oldEndPosition),t+=O,F(t,e.newEndPosition),t+=O,n.setValue(t,e.startIndex,"i32"),t+=c,n.setValue(t,e.oldEndIndex,"i32"),t+=c,n.setValue(t,e.newEndIndex,"i32")}a(Me,"marshalEdit");function Ie(e){let t=n.getValue(e,"i32"),r=n.getValue(e+=c,"i32"),_=n.getValue(e+c,"i32");return{major_version:t,minor_version:r,patch_version:_}}a(Ie,"unmarshalLanguageMetadata");var Be=/^tree_sitter_\w+$/,z=class{static{a(this,"Language")}0=0;types;fields;constructor(t,r){q(t),this[0]=r,this.types=new Array(n._ts_language_symbol_count(this[0]));for(let _=0,s=this.types.length;_<s;_++)n._ts_language_symbol_type(this[0],_)<2&&(this.types[_]=n.UTF8ToString(n._ts_language_symbol_name(this[0],_)));this.fields=new Array(n._ts_language_field_count(this[0])+1);for(let _=0,s=this.fields.length;_<s;_++){let o=n._ts_language_field_name_for_id(this[0],_);o!==0?this.fields[_]=n.UTF8ToString(o):this.fields[_]=null}}get name(){let t=n._ts_language_name(this[0]);return t===0?null:n.UTF8ToString(t)}get abiVersion(){return n._ts_language_abi_version(this[0])}get metadata(){return n._ts_language_metadata_wasm(this[0]),n.getValue(d,"i32")===0?null:Ie(d+c)}get fieldCount(){return this.fields.length-1}get stateCount(){return n._ts_language_state_count(this[0])}fieldIdForName(t){let r=this.fields.indexOf(t);return r!==-1?r:null}fieldNameForId(t){return this.fields[t]??null}idForNodeType(t,r){let _=n.lengthBytesUTF8(t),s=n._malloc(_+1);n.stringToUTF8(t,s,_+1);let o=n._ts_language_symbol_for_name(this[0],s,_,r?1:0);return n._free(s),o||null}get nodeTypeCount(){return n._ts_language_symbol_count(this[0])}nodeTypeForId(t){let r=n._ts_language_symbol_name(this[0],t);return r?n.UTF8ToString(r):null}nodeTypeIsNamed(t){return!!n._ts_language_type_is_named_wasm(this[0],t)}nodeTypeIsVisible(t){return!!n._ts_language_type_is_visible_wasm(this[0],t)}get supertypes(){n._ts_language_supertypes_wasm(this[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+c,"i32"),_=new Array(t);if(t>0){let s=r;for(let o=0;o<t;o++)_[o]=n.getValue(s,"i16"),s+=de}return _}subtypes(t){n._ts_language_subtypes_wasm(this[0],t);let r=n.getValue(d,"i32"),_=n.getValue(d+c,"i32"),s=new Array(r);if(r>0){let o=_;for(let l=0;l<r;l++)s[l]=n.getValue(o,"i16"),o+=de}return s}nextState(t,r){return n._ts_language_next_state(this[0],t,r)}lookaheadIterator(t){let r=n._ts_lookahead_iterator_new(this[0],t);return r?new K(x,r,this):null}static async load(t){let r;if(t instanceof Uint8Array||t instanceof WebAssembly.Module)r=t;else if(globalThis.process?.versions.node)r=await(await import("fs/promises")).readFile(t);else{let s=await fetch(t);if(!s.ok){let l=await s.text();throw new Error(`Language.load failed with status ${s.status}.
|
|
2
2
|
|
|
3
3
|
${l}`)}let o=s.clone();try{r=await WebAssembly.compileStreaming(s)}catch(l){console.error("wasm streaming compile failed:",l),console.error("falling back to ArrayBuffer instantiation"),r=new Uint8Array(await o.arrayBuffer())}}let _=await n.loadWebAssemblyModule(r,{loadAsync:!0});return Te(_,{sync:!1})}static loadSync(t){let r=n.loadWebAssemblyModule(t,{loadAsync:!1});return Te(r,{sync:!0})}};function Te(e,{sync:t}){let r=Object.keys(e),_=r.find(o=>Be.test(o)&&!o.includes("external_scanner_"));if(!_)throw console.log(`Couldn't find language function in Wasm file. Symbols:
|
|
4
|
-
${JSON.stringify(r,null,2)}`),new Error(`Language.${t?"loadSync":"load"} failed: no language function found in Wasm file`);let s=e[_]();return new z(
|
|
5
|
-
`)[0],M=R.match(Xe)?.[0]??"";switch(n._free(s),p){case U.Syntax:throw new Z(U.Syntax,{suffix:`${y}: '${R}'...`},y,0);case U.NodeName:throw new Z(p,{word:M},y,M.length);case U.FieldName:throw new Z(p,{word:M},y,M.length);case U.CaptureName:throw new Z(p,{word:M},y,M.length);case U.PatternStructure:throw new Z(p,{suffix:`${y}: '${R}'...`},y,0)}}let l=n._ts_query_string_count(o),u=n._ts_query_capture_count(o),
|
|
4
|
+
${JSON.stringify(r,null,2)}`),new Error(`Language.${t?"loadSync":"load"} failed: no language function found in Wasm file`);let s=e[_]();return new z(x,s)}a(Te,"loadFromWasmExports");var me=ye(Se(),1);var ne=null;async function Re(e){if(ne)return ne;let{wasmModule:t,...r}=e??{};if(!t)return ne??=await(0,me.default)(r);let _=new Promise((s,o)=>{r.instantiateWasm=(l,u)=>(WebAssembly.instantiate(t,l).then(m=>{u(m,t)}).catch(o),{})});return ne??=await Promise.race([(0,me.default)(r),_])}a(Re,"initializeBinding");function xe(){return!!ne}a(xe,"checkModule");var d,_e;function ge(e){let t=n._ts_language_abi_version(e[0]);if(t<le||t>_e)throw new Error(`Incompatible language version 0x${(t>>>0).toString(16)}. Expected 0x${_e.toString(16)}.`)}a(ge,"assertSupportedLanguage");var le,Fe=D(e=>{n._ts_parser_delete(e[0]),n._free(e[1])}),ie=class{static{a(this,"Parser")}0=0;1=0;logCallback=null;language=null;static async init(t){be(await Re(t)),d=n._ts_init(),_e=n.getValue(d,"i32"),le=n.getValue(d+c,"i32")}constructor(){this.initialize(),Fe?.register(this,[this[0],this[1]],this)}initialize(){if(!xe())throw new Error("cannot construct a Parser before calling `init()`");n._ts_parser_new_wasm(),this[0]=n.getValue(d,"i32"),this[1]=n.getValue(d+c,"i32")}delete(){Fe?.unregister(this),n._ts_parser_delete(this[0]),n._free(this[1]),this[0]=0,this[1]=0}setLanguage(t){let r;if(!t)r=0,this.language=null;else if(t.constructor===z)r=t[0],ge(t),this.language=t;else throw new Error("Argument must be a Language");return n._ts_parser_set_language(this[0],r),this}parse(t,r,_){let s=Ge(_?.maxMemoryBytes);if(typeof t=="string")n.currentParseCallback=o=>t.slice(o);else if(typeof t=="function")n.currentParseCallback=t;else throw new Error("Argument must be a string or a function");_?.progressCallback?n.currentProgressCallback=_.progressCallback:n.currentProgressCallback=null,this.logCallback?(n.currentLogCallback=this.logCallback,n._ts_parser_enable_logger_wasm(this[0],1)):(n.currentLogCallback=null,n._ts_parser_enable_logger_wasm(this[0],0));try{let o=s===void 0?je(this[0],this[1],r?r[0]:0,_?.includedRanges):$e(this[0],this[1],_?.includedRanges,s);if(!o)return null;if(!this.language)throw new Error("Parser must have a language to parse");return new X(x,o,this.language,n.currentParseCallback)}finally{ze()}}reset(){n._ts_parser_reset(this[0])}getIncludedRanges(){n._ts_parser_included_ranges_wasm(this[0]);let t=n.getValue(d,"i32"),r=n.getValue(d+c,"i32"),_=new Array(t);if(t>0){let s=r;for(let o=0;o<t;o++)_[o]=re(s),s+=$;n._free(r)}return _}setLogger(t){if(!t)this.logCallback=null;else{if(typeof t!="function")throw new Error("Logger callback must be a function");this.logCallback=t}return this}getLogger(){return this.logCallback}};function Ge(e){if(e!==void 0&&(!Number.isSafeInteger(e)||e<=0||e>2147483647))throw new RangeError("maxMemoryBytes must be a positive integer no greater than 2147483647");return e}a(Ge,"validateMemoryLimit");function Ce(e){if(!e?.length)return[0,0];let t=n._calloc(e.length,$);if(!t)return[0,e.length];let r=t;for(let _ of e)Ae(r,_),r+=$;return[t,e.length]}a(Ce,"prepareRanges");function je(e,t,r,_){let[s,o]=Ce(_);return o&&!s?0:n._ts_parser_parse_wasm(e,t,r,s,o)}a(je,"parseOrdinaryWasm");function $e(e,t,r,_){if(!n.treeSitterSetMemoryLimit(_))return 0;let s=0;try{let[o,l]=Ce(r);if(s=o,l&&!o)return 0;try{return n._ts_parser_parse_limited_wasm(e,t,o,l)}catch(u){throw n._ts_parser_abort_limited_wasm(),u}}finally{s&&n._free(s),n.treeSitterSetMemoryLimit(0)}}a($e,"parseLimitedWasm");function ze(){n.currentParseCallback=null,n.currentLogCallback=null,n.currentProgressCallback=null}a(ze,"clearCallbacks");var Ze=1,Ke=2,Xe=/[\w-]+/g,Oe={Zero:0,ZeroOrOne:1,ZeroOrMore:2,One:3,OneOrMore:4},Ne=a(e=>e.type==="capture","isCaptureStep"),fe=a(e=>e.type==="string","isStringStep"),U={Syntax:1,NodeName:2,FieldName:3,CaptureName:4,PatternStructure:5},Z=class e extends Error{constructor(r,_,s,o){super(e.formatMessage(r,_));this.kind=r;this.info=_;this.index=s;this.length=o;this.name="QueryError"}kind;info;index;length;static{a(this,"QueryError")}static formatMessage(r,_){switch(r){case U.NodeName:return`Bad node name '${_.word}'`;case U.FieldName:return`Bad field name '${_.word}'`;case U.CaptureName:return`Bad capture name @${_.word}`;case U.PatternStructure:return`Bad pattern structure at offset ${_.suffix}`;case U.Syntax:return`Bad syntax at offset ${_.suffix}`}}};function Ye(e,t,r,_){if(e.length!==3)throw new Error(`Wrong number of arguments to \`#${r}\` predicate. Expected 2, got ${e.length-1}`);if(!Ne(e[1]))throw new Error(`First argument of \`#${r}\` predicate must be a capture. Got "${e[1].value}"`);let s=r==="eq?"||r==="any-eq?",o=!r.startsWith("any-");if(Ne(e[2])){let l=e[1].name,u=e[2].name;_[t].push(m=>{let w=[],f=[];for(let v of m)v.name===l&&w.push(v.node),v.name===u&&f.push(v.node);let g=a((v,b,C)=>C?v.text===b.text:v.text!==b.text,"compare");return o?w.every(v=>f.some(b=>g(v,b,s))):w.some(v=>f.some(b=>g(v,b,s)))})}else{let l=e[1].name,u=e[2].value,m=a(f=>f.text===u,"matches"),w=a(f=>f.text!==u,"doesNotMatch");_[t].push(f=>{let g=[];for(let b of f)b.name===l&&g.push(b.node);let v=s?m:w;return o?g.every(v):g.some(v)})}}a(Ye,"parseAnyPredicate");function Je(e,t,r,_){if(e.length!==3)throw new Error(`Wrong number of arguments to \`#${r}\` predicate. Expected 2, got ${e.length-1}.`);if(e[1].type!=="capture")throw new Error(`First argument of \`#${r}\` predicate must be a capture. Got "${e[1].value}".`);if(e[2].type!=="string")throw new Error(`Second argument of \`#${r}\` predicate must be a string. Got @${e[2].name}.`);let s=r==="match?"||r==="any-match?",o=!r.startsWith("any-"),l=e[1].name,u=new RegExp(e[2].value);_[t].push(m=>{let w=[];for(let g of m)g.name===l&&w.push(g.node.text);let f=a((g,v)=>v?u.test(g):!u.test(g),"test");return w.length===0?!s:o?w.every(g=>f(g,s)):w.some(g=>f(g,s))})}a(Je,"parseMatchPredicate");function et(e,t,r,_){if(e.length<2)throw new Error(`Wrong number of arguments to \`#${r}\` predicate. Expected at least 1. Got ${e.length-1}.`);if(e[1].type!=="capture")throw new Error(`First argument of \`#${r}\` predicate must be a capture. Got "${e[1].value}".`);let s=r==="any-of?",o=e[1].name,l=e.slice(2);if(!l.every(fe))throw new Error(`Arguments to \`#${r}\` predicate must be strings.".`);let u=l.map(m=>m.value);_[t].push(m=>{let w=[];for(let f of m)f.name===o&&w.push(f.node.text);return w.length===0?!s:w.every(f=>u.includes(f))===s})}a(et,"parseAnyOfPredicate");function tt(e,t,r,_,s){if(e.length<2||e.length>3)throw new Error(`Wrong number of arguments to \`#${r}\` predicate. Expected 1 or 2. Got ${e.length-1}.`);if(!e.every(fe))throw new Error(`Arguments to \`#${r}\` predicate must be strings.".`);let o=r==="is?"?_:s;o[t]||(o[t]={}),o[t][e[1].value]=e[2]?.value??null}a(tt,"parseIsPredicate");function rt(e,t,r){if(e.length<2||e.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${e.length-1}.`);if(!e.every(fe))throw new Error('Arguments to `#set!` predicate must be strings.".');r[t]||(r[t]={}),r[t][e[1].value]=e[2]?.value??null}a(rt,"parseSetDirective");function nt(e,t,r,_,s,o,l,u,m,w,f){if(t===Ze){let g=_[r];o.push({type:"capture",name:g})}else if(t===Ke)o.push({type:"string",value:s[r]});else if(o.length>0){if(o[0].type!=="string")throw new Error("Predicates must begin with a literal value");let g=o[0].value;switch(g){case"any-not-eq?":case"not-eq?":case"any-eq?":case"eq?":Ye(o,e,g,l);break;case"any-not-match?":case"not-match?":case"any-match?":case"match?":Je(o,e,g,l);break;case"not-any-of?":case"any-of?":et(o,e,g,l);break;case"is?":case"is-not?":tt(o,e,g,w,f);break;case"set!":rt(o,e,m);break;default:u[e].push({operator:g,operands:o.slice(1)})}o.length=0}}a(nt,"parsePattern");var ke=D(e=>{n._ts_query_delete(e)}),ue=class{static{a(this,"Query")}0=0;exceededMatchLimit;textPredicates;captureNames;captureQuantifiers;predicates;setProperties;assertedProperties;refutedProperties;matchLimit;constructor(t,r){ge(t);let _=n.lengthBytesUTF8(r),s=n._malloc(_+1);n.stringToUTF8(r,s,_+1);let o=n._ts_query_new(t[0],s,_,d,d+c);if(!o){let p=n.getValue(d+c,"i32"),A=n.getValue(d,"i32"),y=n.UTF8ToString(s,A).length,R=r.slice(y,y+100).split(`
|
|
5
|
+
`)[0],M=R.match(Xe)?.[0]??"";switch(n._free(s),p){case U.Syntax:throw new Z(U.Syntax,{suffix:`${y}: '${R}'...`},y,0);case U.NodeName:throw new Z(p,{word:M},y,M.length);case U.FieldName:throw new Z(p,{word:M},y,M.length);case U.CaptureName:throw new Z(p,{word:M},y,M.length);case U.PatternStructure:throw new Z(p,{suffix:`${y}: '${R}'...`},y,0)}}let l=n._ts_query_string_count(o),u=n._ts_query_capture_count(o),m=n._ts_query_pattern_count(o),w=new Array(u),f=new Array(m),g=new Array(l);for(let p=0;p<u;p++){let A=n._ts_query_capture_name_for_id(o,p,d),y=n.getValue(d,"i32");w[p]=n.UTF8ToString(A,y)}for(let p=0;p<m;p++){let A=new Array(u);for(let y=0;y<u;y++){let R=n._ts_query_capture_quantifier_for_id(o,p,y);A[y]=R}f[p]=A}for(let p=0;p<l;p++){let A=n._ts_query_string_value_for_id(o,p,d),y=n.getValue(d,"i32");g[p]=n.UTF8ToString(A,y)}let v=new Array(m),b=new Array(m),C=new Array(m),N=new Array(m),V=new Array(m);for(let p=0;p<m;p++){let A=n._ts_query_predicates_for_pattern(o,p,d),y=n.getValue(d,"i32");N[p]=[],V[p]=[];let R=new Array,M=A;for(let k=0;k<y;k++){let H=n.getValue(M,"i32");M+=c;let T=n.getValue(M,"i32");M+=c,nt(p,H,T,w,g,R,V,N,v,b,C)}Object.freeze(V[p]),Object.freeze(N[p]),Object.freeze(v[p]),Object.freeze(b[p]),Object.freeze(C[p])}n._free(s),this[0]=o,this.captureNames=w,this.captureQuantifiers=f,this.textPredicates=V,this.predicates=N,this.setProperties=v,this.assertedProperties=b,this.refutedProperties=C,this.exceededMatchLimit=!1,ke?.register(this,o,this)}delete(){ke?.unregister(this),n._ts_query_delete(this[0]),this[0]=0}matches(t,r={}){let _=r.startPosition??S,s=r.endPosition??S,o=r.startIndex??0,l=r.endIndex??0,u=r.startContainingPosition??S,m=r.endContainingPosition??S,w=r.startContainingIndex??0,f=r.endContainingIndex??0,g=r.matchLimit??4294967295,v=r.maxStartDepth??4294967295,b=r.progressCallback;if(typeof g!="number")throw new Error("Arguments must be numbers");if(this.matchLimit=g,l!==0&&o>l)throw new Error("`startIndex` cannot be greater than `endIndex`");if(s!==S&&(_.row>s.row||_.row===s.row&&_.column>s.column))throw new Error("`startPosition` cannot be greater than `endPosition`");if(f!==0&&w>f)throw new Error("`startContainingIndex` cannot be greater than `endContainingIndex`");if(m!==S&&(u.row>m.row||u.row===m.row&&u.column>m.column))throw new Error("`startContainingPosition` cannot be greater than `endContainingPosition`");b&&(n.currentQueryProgressCallback=b),h(t),n._ts_query_matches_wasm(this[0],t.tree[0],_.row,_.column,s.row,s.column,o,l,u.row,u.column,m.row,m.column,w,f,g,v);let C=n.getValue(d,"i32"),N=n.getValue(d+c,"i32"),V=n.getValue(d+2*c,"i32"),p=new Array(C);this.exceededMatchLimit=!!V;let A=0,y=N;for(let R=0;R<C;R++){let M=n.getValue(y,"i32");y+=c;let k=n.getValue(y,"i32");y+=c;let H=new Array(k);if(y=ce(this,t.tree,y,M,H),this.textPredicates[M].every(T=>T(H))){p[A]={patternIndex:M,captures:H};let T=this.setProperties[M];p[A].setProperties=T;let B=this.assertedProperties[M];p[A].assertedProperties=B;let G=this.refutedProperties[M];p[A].refutedProperties=G,A++}}return p.length=A,n._ts_free_wasm(N),n.currentQueryProgressCallback=null,p}captures(t,r={}){let _=r.startPosition??S,s=r.endPosition??S,o=r.startIndex??0,l=r.endIndex??0,u=r.startContainingPosition??S,m=r.endContainingPosition??S,w=r.startContainingIndex??0,f=r.endContainingIndex??0,g=r.matchLimit??4294967295,v=r.maxStartDepth??4294967295,b=r.progressCallback;if(typeof g!="number")throw new Error("Arguments must be numbers");if(this.matchLimit=g,l!==0&&o>l)throw new Error("`startIndex` cannot be greater than `endIndex`");if(s!==S&&(_.row>s.row||_.row===s.row&&_.column>s.column))throw new Error("`startPosition` cannot be greater than `endPosition`");if(f!==0&&w>f)throw new Error("`startContainingIndex` cannot be greater than `endContainingIndex`");if(m!==S&&(u.row>m.row||u.row===m.row&&u.column>m.column))throw new Error("`startContainingPosition` cannot be greater than `endContainingPosition`");b&&(n.currentQueryProgressCallback=b),h(t),n._ts_query_captures_wasm(this[0],t.tree[0],_.row,_.column,s.row,s.column,o,l,u.row,u.column,m.row,m.column,w,f,g,v);let C=n.getValue(d,"i32"),N=n.getValue(d+c,"i32"),V=n.getValue(d+2*c,"i32"),p=new Array;this.exceededMatchLimit=!!V;let A=new Array,y=N;for(let R=0;R<C;R++){let M=n.getValue(y,"i32");y+=c;let k=n.getValue(y,"i32");y+=c;let H=n.getValue(y,"i32");if(y+=c,A.length=k,y=ce(this,t.tree,y,M,A),this.textPredicates[M].every(T=>T(A))){let T=A[H],B=this.setProperties[M];T.setProperties=B;let G=this.assertedProperties[M];T.assertedProperties=G;let he=this.refutedProperties[M];T.refutedProperties=he,p.push(T)}}return n._ts_free_wasm(N),n.currentQueryProgressCallback=null,p}predicatesForPattern(t){return this.predicates[t]}disableCapture(t){let r=n.lengthBytesUTF8(t),_=n._malloc(r+1);n.stringToUTF8(t,_,r+1),n._ts_query_disable_capture(this[0],_,r),n._free(_)}disablePattern(t){if(t>=this.predicates.length)throw new Error(`Pattern index is ${t} but the pattern count is ${this.predicates.length}`);n._ts_query_disable_pattern(this[0],t)}didExceedMatchLimit(){return this.exceededMatchLimit}startIndexForPattern(t){if(t>=this.predicates.length)throw new Error(`Pattern index is ${t} but the pattern count is ${this.predicates.length}`);return n._ts_query_start_byte_for_pattern(this[0],t)}endIndexForPattern(t){if(t>=this.predicates.length)throw new Error(`Pattern index is ${t} but the pattern count is ${this.predicates.length}`);return n._ts_query_end_byte_for_pattern(this[0],t)}patternCount(){return n._ts_query_pattern_count(this[0])}captureIndexForName(t){return this.captureNames.indexOf(t)}isPatternRooted(t){return n._ts_query_is_pattern_rooted(this[0],t)===1}isPatternNonLocal(t){return n._ts_query_is_pattern_non_local(this[0],t)===1}isPatternGuaranteedAtStep(t){return n._ts_query_is_pattern_guaranteed_at_step(this[0],t)===1}};0&&(module.exports={CaptureQuantifier,Edit,LANGUAGE_VERSION,Language,LookaheadIterator,MIN_COMPATIBLE_VERSION,Node,Parser,Query,Tree,TreeCursor});
|
|
6
6
|
module.exports.default = module.exports;
|
|
7
7
|
//# sourceMappingURL=web-tree-sitter.cjs.map
|