mq-web 0.2.23 → 0.4.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/dist/core.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var k=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var H=Object.prototype.hasOwnProperty;var J=(t,e)=>()=>(t&&(e=t(t=0)),e);var T=(t,e)=>{for(var n in e)k(t,n,{get:e[n],enumerable:!0})},G=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of C(e))!H.call(t,i)&&i!==n&&k(t,i,{get:()=>e[i],enumerable:!(r=N(e,i))||r.enumerable});return t};var K=t=>G(k({},"__esModule",{value:!0}),t);var $={};T($,{RunOptions:()=>D,default:()=>V,definedValues:()=>nt,diagnostics:()=>et,format:()=>tt,initSync:()=>ot,run:()=>Y,toAst:()=>Z});function s(t){return y[t]}function O(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(o.memory.buffer)),A}function p(t,e,n){if(n===void 0){let f=S.encode(t),u=e(f.length,1)>>>0;return O().subarray(u,u+f.length).set(f),b=f.length,u}let r=t.length,i=e(r,1)>>>0,a=O(),c=0;for(;c<r;c++){let f=t.charCodeAt(c);if(f>127)break;a[i+c]=f}if(c!==r){c!==0&&(t=t.slice(c)),i=n(i,r,r=c+t.length*3,1)>>>0;let f=O().subarray(i+c,i+r),u=Q(t,f);c+=u.written,i=n(i,r,c,1)>>>0}return b=c,i}function _(){return(h===null||h.buffer.detached===!0||h.buffer.detached===void 0&&h.buffer!==o.memory.buffer)&&(h=new DataView(o.memory.buffer)),h}function d(t){I===y.length&&y.push(y.length+1);let e=I;return I=y[e],y[e]=t,e}function X(t){t<132||(y[t]=I,I=t)}function w(t){let e=s(t);return X(t),e}function M(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){let i=t.length,a="[";i>0&&(a+=M(t[0]));for(let c=1;c<i;c++)a+=", "+M(t[c]);return a+="]",a}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
- ${t.stack}`:r}function x(t,e){return t=t>>>0,R.decode(O().subarray(t,t+e))}function v(t){return t==null}function Y(t,e,n){let r,i;try{let l=o.__wbindgen_add_to_stack_pointer(-16),z=p(t,o.__wbindgen_export_0,o.__wbindgen_export_1),L=b,q=p(e,o.__wbindgen_export_0,o.__wbindgen_export_1),B=b;o.run(l,z,L,q,B,d(n));var a=_().getInt32(l+4*0,!0),c=_().getInt32(l+4*1,!0),f=_().getInt32(l+4*2,!0),u=_().getInt32(l+4*3,!0),g=a,m=c;if(u)throw g=0,m=0,w(f);return r=g,i=m,x(g,m)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(r,i,1)}}function Z(t){let e,n;try{let g=o.__wbindgen_add_to_stack_pointer(-16),m=p(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=b;o.toAst(g,m,l);var r=_().getInt32(g+4*0,!0),i=_().getInt32(g+4*1,!0),a=_().getInt32(g+4*2,!0),c=_().getInt32(g+4*3,!0),f=r,u=i;if(c)throw f=0,u=0,w(a);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function tt(t){let e,n;try{let g=o.__wbindgen_add_to_stack_pointer(-16),m=p(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=b;o.format(g,m,l);var r=_().getInt32(g+4*0,!0),i=_().getInt32(g+4*1,!0),a=_().getInt32(g+4*2,!0),c=_().getInt32(g+4*3,!0),f=r,u=i;if(c)throw f=0,u=0,w(a);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function et(t){let e=p(t,o.__wbindgen_export_0,o.__wbindgen_export_1),n=b,r=o.diagnostics(e,n);return w(r)}function nt(t){try{let i=o.__wbindgen_add_to_stack_pointer(-16),a=p(t,o.__wbindgen_export_0,o.__wbindgen_export_1),c=b;o.definedValues(i,a,c);var e=_().getInt32(i+4*0,!0),n=_().getInt32(i+4*1,!0),r=_().getInt32(i+4*2,!0);if(r)throw w(n);return w(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}async function it(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function F(){let t={};return t.wbg={},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(s(n)),i=p(r,o.__wbindgen_export_0,o.__wbindgen_export_1),a=b;_().setInt32(e+4*1,a,!0),_().setInt32(e+4*0,i,!0)},t.wbg.__wbg_buffer_609cc3eee51ed158=function(e){let n=s(e).buffer;return d(n)},t.wbg.__wbg_entries_3265d4158b33e5dc=function(e){let n=Object.entries(s(e));return d(n)},t.wbg.__wbg_get_b9b93047fe3cf45b=function(e,n){let r=s(e)[n>>>0];return d(r)},t.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(e,n){let r=s(e)[s(n)];return d(r)},t.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(e){let n;try{n=s(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(e){let n;try{n=s(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_length_a446193dc22c12f8=function(e){return s(e).length},t.wbg.__wbg_length_e2d2a49132c1b256=function(e){return s(e).length},t.wbg.__wbg_new_405e22f390576ce2=function(){let e=new Object;return d(e)},t.wbg.__wbg_new_78feb108b6472713=function(){let e=new Array;return d(e)},t.wbg.__wbg_new_a12002a7f91c75be=function(e){let n=new Uint8Array(s(e));return d(n)},t.wbg.__wbg_set_37837023f3d740e8=function(e,n,r){s(e)[n>>>0]=w(r)},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){s(e)[w(n)]=w(r)},t.wbg.__wbg_set_65595bdd868b3009=function(e,n,r){s(e).set(s(n),r>>>0)},t.wbg.__wbindgen_boolean_get=function(e){let n=s(e);return typeof n=="boolean"?n?1:0:2},t.wbg.__wbindgen_debug_string=function(e,n){let r=M(s(n)),i=p(r,o.__wbindgen_export_0,o.__wbindgen_export_1),a=b;_().setInt32(e+4*1,a,!0),_().setInt32(e+4*0,i,!0)},t.wbg.__wbindgen_error_new=function(e,n){let r=new Error(x(e,n));return d(r)},t.wbg.__wbindgen_in=function(e,n){return s(e)in s(n)},t.wbg.__wbindgen_is_object=function(e){let n=s(e);return typeof n=="object"&&n!==null},t.wbg.__wbindgen_is_string=function(e){return typeof s(e)=="string"},t.wbg.__wbindgen_is_undefined=function(e){return s(e)===void 0},t.wbg.__wbindgen_jsval_loose_eq=function(e,n){return s(e)==s(n)},t.wbg.__wbindgen_memory=function(){let e=o.memory;return d(e)},t.wbg.__wbindgen_number_get=function(e,n){let r=s(n),i=typeof r=="number"?r:void 0;_().setFloat64(e+8*1,v(i)?0:i,!0),_().setInt32(e+4*0,!v(i),!0)},t.wbg.__wbindgen_number_new=function(e){return d(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=s(e);return d(n)},t.wbg.__wbindgen_object_drop_ref=function(e){w(e)},t.wbg.__wbindgen_string_get=function(e,n){let r=s(n),i=typeof r=="string"?r:void 0;var a=v(i)?0:p(i,o.__wbindgen_export_0,o.__wbindgen_export_1),c=b;_().setInt32(e+4*1,c,!0),_().setInt32(e+4*0,a,!0)},t.wbg.__wbindgen_string_new=function(e,n){let r=x(e,n);return d(r)},t.wbg.__wbindgen_throw=function(e,n){throw new Error(x(e,n))},t}function U(t,e){return o=t.exports,P.__wbindgen_wasm_module=e,h=null,A=null,o}function ot(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=F();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let n=new WebAssembly.Instance(t,e);return U(n,t)}async function P(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("mq_wasm_bg.wasm",st.url));let e=F();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await it(await t,e);return U(n,r)}var st,o,y,b,A,S,Q,h,I,R,rt,D,V,E=J(()=>{"use strict";st={},y=new Array(128).fill(void 0);y.push(void 0,null,!0,!1);b=0,A=null;S=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},Q=typeof S.encodeInto=="function"?function(t,e){return S.encodeInto(t,e)}:function(t,e){let n=S.encode(t);return e.set(n),{read:t.length,written:n.length}};h=null;I=y.length;R=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&R.decode();rt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>o.__wbg_runoptions_free(t>>>0,1)),D=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,rt.unregister(this),e}free(){let e=this.__destroy_into_raw();o.__wbg_runoptions_free(e,0)}};V=P});var gt={};T(gt,{definedValues:()=>ut,diagnostics:()=>ft,format:()=>at,run:()=>ct,toAst:()=>_t});module.exports=K(gt);E();var W=null;async function j(){return W||(await(async()=>{try{await V();let t=await Promise.resolve().then(()=>(E(),$));W={run:t.run,toAst:t.toAst,format:t.format,diagnostics:t.diagnostics,definedValues:t.definedValues}}catch(t){throw new Error(`Failed to initialize mq WebAssembly module: ${t}`)}})(),W)}async function ct(t,e,n={}){return await(await j()).run(t,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function _t(t){return await(await j()).toAst(t)}async function at(t){return await(await j()).format(t)}async function ft(t){return await(await j()).diagnostics(t)}async function ut(t){return await(await j()).definedValues(t)}0&&(module.exports={definedValues,diagnostics,format,run,toAst});
1
+ "use strict";var M=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var Y=Object.prototype.hasOwnProperty;var H=(t,e)=>()=>(t&&(e=t(t=0)),e);var T=(t,e)=>{for(var n in e)M(t,n,{get:e[n],enumerable:!0})},J=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of X(e))!Y.call(t,i)&&i!==n&&M(t,i,{get:()=>e[i],enumerable:!(r=N(e,i))||r.enumerable});return t};var G=t=>J(M({},"__esModule",{value:!0}),t);var B={};T(B,{RunOptions:()=>j,default:()=>v,definedValues:()=>ot,diagnostics:()=>it,format:()=>rt,initSync:()=>_t,run:()=>et,toAst:()=>nt});function I(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(o.memory.buffer)),A}function Q(t,e){return D+=e,D>=K&&(F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),F.decode(),D=e),F.decode(I().subarray(t,t+e))}function x(t,e){return t=t>>>0,Q(t,e)}function b(t){S===p.length&&p.push(p.length+1);let e=S;return S=p[e],p[e]=t,e}function c(t){return p[t]}function y(t,e,n){if(n===void 0){let f=O.encode(t),u=e(f.length,1)>>>0;return I().subarray(u,u+f.length).set(f),g=f.length,u}let r=t.length,i=e(r,1)>>>0,_=I(),s=0;for(;s<r;s++){let f=t.charCodeAt(s);if(f>127)break;_[i+s]=f}if(s!==r){s!==0&&(t=t.slice(s)),i=n(i,r,r=s+t.length*3,1)>>>0;let f=I().subarray(i+s,i+r),u=O.encodeInto(t,f);s+=u.written,i=n(i,r,s,1)>>>0}return g=s,i}function a(){return(h===null||h.buffer.detached===!0||h.buffer.detached===void 0&&h.buffer!==o.memory.buffer)&&(h=new DataView(o.memory.buffer)),h}function Z(t,e){return t=t>>>0,I().subarray(t/1,t/1+e)}function tt(t){t<132||(p[t]=S,S=t)}function w(t){let e=c(t);return tt(t),e}function E(t){return t==null}function R(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){let i=t.length,_="[";i>0&&(_+=R(t[0]));for(let s=1;s<i;s++)_+=", "+R(t[s]);return _+="]",_}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
+ ${t.stack}`:r}function et(t,e,n){let r,i;try{let l=o.__wbindgen_add_to_stack_pointer(-16),z=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),L=g,q=y(e,o.__wbindgen_export_0,o.__wbindgen_export_1),C=g;o.run(l,z,L,q,C,b(n));var _=a().getInt32(l+4*0,!0),s=a().getInt32(l+4*1,!0),f=a().getInt32(l+4*2,!0),u=a().getInt32(l+4*3,!0),d=_,m=s;if(u)throw d=0,m=0,w(f);return r=d,i=m,x(d,m)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(r,i,1)}}function nt(t){let e,n;try{let d=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=g;o.toAst(d,m,l);var r=a().getInt32(d+4*0,!0),i=a().getInt32(d+4*1,!0),_=a().getInt32(d+4*2,!0),s=a().getInt32(d+4*3,!0),f=r,u=i;if(s)throw f=0,u=0,w(_);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function rt(t){let e,n;try{let d=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=g;o.format(d,m,l);var r=a().getInt32(d+4*0,!0),i=a().getInt32(d+4*1,!0),_=a().getInt32(d+4*2,!0),s=a().getInt32(d+4*3,!0),f=r,u=i;if(s)throw f=0,u=0,w(_);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function it(t){let e=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),n=g,r=o.diagnostics(e,n);return w(r)}function ot(t){try{let i=o.__wbindgen_add_to_stack_pointer(-16),_=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),s=g;o.definedValues(i,_,s);var e=a().getInt32(i+4*0,!0),n=a().getInt32(i+4*1,!0),r=a().getInt32(i+4*2,!0);if(r)throw w(n);return w(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}async function at(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.ok&&ct.has(t.type)&&t.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function U(){let t={};return t.wbg={},t.wbg.__wbg_Error_e17e777aac105295=function(e,n){let r=Error(x(e,n));return b(r)},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(c(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),_=g;a().setInt32(e+4*1,_,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg_entries_2be2f15bd5554996=function(e){let n=Object.entries(c(e));return b(n)},t.wbg.__wbg_get_0da715ceaecea5c8=function(e,n){let r=c(e)[n>>>0];return b(r)},t.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(e,n){let r=c(e)[c(n)];return b(r)},t.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd=function(e){let n;try{n=c(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7=function(e){let n;try{n=c(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_length_186546c51cd61acd=function(e){return c(e).length},t.wbg.__wbg_length_6bb7e81f9d7713e4=function(e){return c(e).length},t.wbg.__wbg_new_19c25a3f2fa63a02=function(){let e=new Object;return b(e)},t.wbg.__wbg_new_1f3a344cf3123716=function(){let e=new Array;return b(e)},t.wbg.__wbg_new_638ebfaedbf32a5e=function(e){let n=new Uint8Array(c(e));return b(n)},t.wbg.__wbg_prototypesetcall_3d4a26c1ed734349=function(e,n,r){Uint8Array.prototype.set.call(Z(e,n),c(r))},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){c(e)[w(n)]=w(r)},t.wbg.__wbg_set_90f6c0f7bd8c0415=function(e,n,r){c(e)[n>>>0]=w(r)},t.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746=function(e){let n=c(e),r=typeof n=="boolean"?n:void 0;return E(r)?16777215:r?1:0},t.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d=function(e,n){let r=R(c(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),_=g;a().setInt32(e+4*1,_,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg_wbindgenin_d7a1ee10933d2d55=function(e,n){return c(e)in c(n)},t.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8=function(e){let n=c(e);return typeof n=="object"&&n!==null},t.wbg.__wbg_wbindgenisstring_d4fa939789f003b0=function(e){return typeof c(e)=="string"},t.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5=function(e){return c(e)===void 0},t.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1=function(e,n){return c(e)==c(n)},t.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb=function(e,n){let r=c(n),i=typeof r=="number"?r:void 0;a().setFloat64(e+8*1,E(i)?0:i,!0),a().setInt32(e+4*0,!E(i),!0)},t.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f=function(e,n){let r=c(n),i=typeof r=="string"?r:void 0;var _=E(i)?0:y(i,o.__wbindgen_export_0,o.__wbindgen_export_1),s=g;a().setInt32(e+4*1,s,!0),a().setInt32(e+4*0,_,!0)},t.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6=function(e,n){throw new Error(x(e,n))},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){let r=x(e,n);return b(r)},t.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return b(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=c(e);return b(n)},t.wbg.__wbindgen_object_drop_ref=function(e){w(e)},t}function P(t,e){return o=t.exports,$.__wbindgen_wasm_module=e,h=null,A=null,o}function _t(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=U();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let n=new WebAssembly.Instance(t,e);return P(n,t)}async function $(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("mq_wasm_bg.wasm",ft.url));let e=U();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await at(await t,e);return P(n,r)}var ft,o,A,F,K,D,p,S,g,O,h,st,j,ct,v,V=H(()=>{"use strict";ft={},A=null;F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});F.decode();K=2146435072,D=0;p=new Array(128).fill(void 0);p.push(void 0,null,!0,!1);S=p.length;g=0,O=new TextEncoder;"encodeInto"in O||(O.encodeInto=function(t,e){let n=O.encode(t);return e.set(n),{read:t.length,written:n.length}});h=null;st=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>o.__wbg_runoptions_free(t>>>0,1)),j=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,st.unregister(this),e}free(){let e=this.__destroy_into_raw();o.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(j.prototype[Symbol.dispose]=j.prototype.free);ct=new Set(["basic","cors","default"]);v=$});var lt={};T(lt,{definedValues:()=>wt,diagnostics:()=>gt,format:()=>bt,run:()=>ut,toAst:()=>dt});module.exports=G(lt);V();var k=null;async function W(){return k||(await(async()=>{try{await v();let t=await Promise.resolve().then(()=>(V(),B));k={run:t.run,toAst:t.toAst,format:t.format,diagnostics:t.diagnostics,definedValues:t.definedValues}}catch(t){throw new Error(`Failed to initialize mq WebAssembly module: ${t}`)}})(),k)}async function ut(t,e,n={}){return await(await W()).run(t,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function dt(t){return await(await W()).toAst(t)}async function bt(t){return await(await W()).format(t)}async function gt(t){return await(await W()).diagnostics(t)}async function wt(t){return await(await W()).definedValues(t)}0&&(module.exports={definedValues,diagnostics,format,run,toAst});
package/dist/core.js CHANGED
@@ -1,2 +1,2 @@
1
- var q=Object.defineProperty;var B=(t,e)=>()=>(t&&(e=t(t=0)),e);var N=(t,e)=>{for(var n in e)q(t,n,{get:e[n],enumerable:!0})};var U={};N(U,{RunOptions:()=>M,default:()=>D,definedValues:()=>X,diagnostics:()=>Q,format:()=>K,initSync:()=>tt,run:()=>J,toAst:()=>G});function s(t){return y[t]}function O(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(i.memory.buffer)),A}function p(t,e,n){if(n===void 0){let f=S.encode(t),u=e(f.length,1)>>>0;return O().subarray(u,u+f.length).set(f),b=f.length,u}let r=t.length,o=e(r,1)>>>0,a=O(),c=0;for(;c<r;c++){let f=t.charCodeAt(c);if(f>127)break;a[o+c]=f}if(c!==r){c!==0&&(t=t.slice(c)),o=n(o,r,r=c+t.length*3,1)>>>0;let f=O().subarray(o+c,o+r),u=C(t,f);c+=u.written,o=n(o,r,c,1)>>>0}return b=c,o}function _(){return(h===null||h.buffer.detached===!0||h.buffer.detached===void 0&&h.buffer!==i.memory.buffer)&&(h=new DataView(i.memory.buffer)),h}function d(t){I===y.length&&y.push(y.length+1);let e=I;return I=y[e],y[e]=t,e}function H(t){t<132||(y[t]=I,I=t)}function w(t){let e=s(t);return H(t),e}function v(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let o=t.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){let o=t.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(t)){let o=t.length,a="[";o>0&&(a+=v(t[0]));for(let c=1;c<o;c++)a+=", "+v(t[c]);return a+="]",a}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
- ${t.stack}`:r}function x(t,e){return t=t>>>0,E.decode(O().subarray(t,t+e))}function k(t){return t==null}function J(t,e,n){let r,o;try{let l=i.__wbindgen_add_to_stack_pointer(-16),P=p(t,i.__wbindgen_export_0,i.__wbindgen_export_1),$=b,z=p(e,i.__wbindgen_export_0,i.__wbindgen_export_1),L=b;i.run(l,P,$,z,L,d(n));var a=_().getInt32(l+4*0,!0),c=_().getInt32(l+4*1,!0),f=_().getInt32(l+4*2,!0),u=_().getInt32(l+4*3,!0),g=a,m=c;if(u)throw g=0,m=0,w(f);return r=g,o=m,x(g,m)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_export_2(r,o,1)}}function G(t){let e,n;try{let g=i.__wbindgen_add_to_stack_pointer(-16),m=p(t,i.__wbindgen_export_0,i.__wbindgen_export_1),l=b;i.toAst(g,m,l);var r=_().getInt32(g+4*0,!0),o=_().getInt32(g+4*1,!0),a=_().getInt32(g+4*2,!0),c=_().getInt32(g+4*3,!0),f=r,u=o;if(c)throw f=0,u=0,w(a);return e=f,n=u,x(f,u)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_export_2(e,n,1)}}function K(t){let e,n;try{let g=i.__wbindgen_add_to_stack_pointer(-16),m=p(t,i.__wbindgen_export_0,i.__wbindgen_export_1),l=b;i.format(g,m,l);var r=_().getInt32(g+4*0,!0),o=_().getInt32(g+4*1,!0),a=_().getInt32(g+4*2,!0),c=_().getInt32(g+4*3,!0),f=r,u=o;if(c)throw f=0,u=0,w(a);return e=f,n=u,x(f,u)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_export_2(e,n,1)}}function Q(t){let e=p(t,i.__wbindgen_export_0,i.__wbindgen_export_1),n=b,r=i.diagnostics(e,n);return w(r)}function X(t){try{let o=i.__wbindgen_add_to_stack_pointer(-16),a=p(t,i.__wbindgen_export_0,i.__wbindgen_export_1),c=b;i.definedValues(o,a,c);var e=_().getInt32(o+4*0,!0),n=_().getInt32(o+4*1,!0),r=_().getInt32(o+4*2,!0);if(r)throw w(n);return w(e)}finally{i.__wbindgen_add_to_stack_pointer(16)}}async function Z(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function T(){let t={};return t.wbg={},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(s(n)),o=p(r,i.__wbindgen_export_0,i.__wbindgen_export_1),a=b;_().setInt32(e+4*1,a,!0),_().setInt32(e+4*0,o,!0)},t.wbg.__wbg_buffer_609cc3eee51ed158=function(e){let n=s(e).buffer;return d(n)},t.wbg.__wbg_entries_3265d4158b33e5dc=function(e){let n=Object.entries(s(e));return d(n)},t.wbg.__wbg_get_b9b93047fe3cf45b=function(e,n){let r=s(e)[n>>>0];return d(r)},t.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(e,n){let r=s(e)[s(n)];return d(r)},t.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(e){let n;try{n=s(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(e){let n;try{n=s(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_length_a446193dc22c12f8=function(e){return s(e).length},t.wbg.__wbg_length_e2d2a49132c1b256=function(e){return s(e).length},t.wbg.__wbg_new_405e22f390576ce2=function(){let e=new Object;return d(e)},t.wbg.__wbg_new_78feb108b6472713=function(){let e=new Array;return d(e)},t.wbg.__wbg_new_a12002a7f91c75be=function(e){let n=new Uint8Array(s(e));return d(n)},t.wbg.__wbg_set_37837023f3d740e8=function(e,n,r){s(e)[n>>>0]=w(r)},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){s(e)[w(n)]=w(r)},t.wbg.__wbg_set_65595bdd868b3009=function(e,n,r){s(e).set(s(n),r>>>0)},t.wbg.__wbindgen_boolean_get=function(e){let n=s(e);return typeof n=="boolean"?n?1:0:2},t.wbg.__wbindgen_debug_string=function(e,n){let r=v(s(n)),o=p(r,i.__wbindgen_export_0,i.__wbindgen_export_1),a=b;_().setInt32(e+4*1,a,!0),_().setInt32(e+4*0,o,!0)},t.wbg.__wbindgen_error_new=function(e,n){let r=new Error(x(e,n));return d(r)},t.wbg.__wbindgen_in=function(e,n){return s(e)in s(n)},t.wbg.__wbindgen_is_object=function(e){let n=s(e);return typeof n=="object"&&n!==null},t.wbg.__wbindgen_is_string=function(e){return typeof s(e)=="string"},t.wbg.__wbindgen_is_undefined=function(e){return s(e)===void 0},t.wbg.__wbindgen_jsval_loose_eq=function(e,n){return s(e)==s(n)},t.wbg.__wbindgen_memory=function(){let e=i.memory;return d(e)},t.wbg.__wbindgen_number_get=function(e,n){let r=s(n),o=typeof r=="number"?r:void 0;_().setFloat64(e+8*1,k(o)?0:o,!0),_().setInt32(e+4*0,!k(o),!0)},t.wbg.__wbindgen_number_new=function(e){return d(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=s(e);return d(n)},t.wbg.__wbindgen_object_drop_ref=function(e){w(e)},t.wbg.__wbindgen_string_get=function(e,n){let r=s(n),o=typeof r=="string"?r:void 0;var a=k(o)?0:p(o,i.__wbindgen_export_0,i.__wbindgen_export_1),c=b;_().setInt32(e+4*1,c,!0),_().setInt32(e+4*0,a,!0)},t.wbg.__wbindgen_string_new=function(e,n){let r=x(e,n);return d(r)},t.wbg.__wbindgen_throw=function(e,n){throw new Error(x(e,n))},t}function R(t,e){return i=t.exports,F.__wbindgen_wasm_module=e,h=null,A=null,i}function tt(t){if(i!==void 0)return i;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=T();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let n=new WebAssembly.Instance(t,e);return R(n,t)}async function F(t){if(i!==void 0)return i;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("mq_wasm_bg.wasm",import.meta.url));let e=T();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await Z(await t,e);return R(n,r)}var i,y,b,A,S,C,h,I,E,Y,M,D,V=B(()=>{"use strict";y=new Array(128).fill(void 0);y.push(void 0,null,!0,!1);b=0,A=null;S=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},C=typeof S.encodeInto=="function"?function(t,e){return S.encodeInto(t,e)}:function(t,e){let n=S.encode(t);return e.set(n),{read:t.length,written:n.length}};h=null;I=y.length;E=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&E.decode();Y=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>i.__wbg_runoptions_free(t>>>0,1)),M=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),e}free(){let e=this.__destroy_into_raw();i.__wbg_runoptions_free(e,0)}};D=F});V();var W=null;async function j(){return W||(await(async()=>{try{await D();let t=await Promise.resolve().then(()=>(V(),U));W={run:t.run,toAst:t.toAst,format:t.format,diagnostics:t.diagnostics,definedValues:t.definedValues}}catch(t){throw new Error(`Failed to initialize mq WebAssembly module: ${t}`)}})(),W)}async function st(t,e,n={}){return await(await j()).run(t,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function ct(t){return await(await j()).toAst(t)}async function _t(t){return await(await j()).format(t)}async function at(t){return await(await j()).diagnostics(t)}async function ft(t){return await(await j()).definedValues(t)}export{ft as definedValues,at as diagnostics,_t as format,st as run,ct as toAst};
1
+ var q=Object.defineProperty;var C=(t,e)=>()=>(t&&(e=t(t=0)),e);var N=(t,e)=>{for(var n in e)q(t,n,{get:e[n],enumerable:!0})};var P={};N(P,{RunOptions:()=>j,default:()=>R,definedValues:()=>tt,diagnostics:()=>Z,format:()=>Q,initSync:()=>it,run:()=>G,toAst:()=>K});function I(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(o.memory.buffer)),A}function Y(t,e){return M+=e,M>=X&&(F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),F.decode(),M=e),F.decode(I().subarray(t,t+e))}function x(t,e){return t=t>>>0,Y(t,e)}function b(t){S===p.length&&p.push(p.length+1);let e=S;return S=p[e],p[e]=t,e}function c(t){return p[t]}function y(t,e,n){if(n===void 0){let f=O.encode(t),u=e(f.length,1)>>>0;return I().subarray(u,u+f.length).set(f),g=f.length,u}let r=t.length,i=e(r,1)>>>0,_=I(),s=0;for(;s<r;s++){let f=t.charCodeAt(s);if(f>127)break;_[i+s]=f}if(s!==r){s!==0&&(t=t.slice(s)),i=n(i,r,r=s+t.length*3,1)>>>0;let f=I().subarray(i+s,i+r),u=O.encodeInto(t,f);s+=u.written,i=n(i,r,s,1)>>>0}return g=s,i}function a(){return(h===null||h.buffer.detached===!0||h.buffer.detached===void 0&&h.buffer!==o.memory.buffer)&&(h=new DataView(o.memory.buffer)),h}function H(t,e){return t=t>>>0,I().subarray(t/1,t/1+e)}function J(t){t<132||(p[t]=S,S=t)}function w(t){let e=c(t);return J(t),e}function E(t){return t==null}function D(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){let i=t.length,_="[";i>0&&(_+=D(t[0]));for(let s=1;s<i;s++)_+=", "+D(t[s]);return _+="]",_}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
+ ${t.stack}`:r}function G(t,e,n){let r,i;try{let l=o.__wbindgen_add_to_stack_pointer(-16),$=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),B=g,z=y(e,o.__wbindgen_export_0,o.__wbindgen_export_1),L=g;o.run(l,$,B,z,L,b(n));var _=a().getInt32(l+4*0,!0),s=a().getInt32(l+4*1,!0),f=a().getInt32(l+4*2,!0),u=a().getInt32(l+4*3,!0),d=_,m=s;if(u)throw d=0,m=0,w(f);return r=d,i=m,x(d,m)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(r,i,1)}}function K(t){let e,n;try{let d=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=g;o.toAst(d,m,l);var r=a().getInt32(d+4*0,!0),i=a().getInt32(d+4*1,!0),_=a().getInt32(d+4*2,!0),s=a().getInt32(d+4*3,!0),f=r,u=i;if(s)throw f=0,u=0,w(_);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function Q(t){let e,n;try{let d=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=g;o.format(d,m,l);var r=a().getInt32(d+4*0,!0),i=a().getInt32(d+4*1,!0),_=a().getInt32(d+4*2,!0),s=a().getInt32(d+4*3,!0),f=r,u=i;if(s)throw f=0,u=0,w(_);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function Z(t){let e=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),n=g,r=o.diagnostics(e,n);return w(r)}function tt(t){try{let i=o.__wbindgen_add_to_stack_pointer(-16),_=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),s=g;o.definedValues(i,_,s);var e=a().getInt32(i+4*0,!0),n=a().getInt32(i+4*1,!0),r=a().getInt32(i+4*2,!0);if(r)throw w(n);return w(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}async function rt(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.ok&&nt.has(t.type)&&t.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function V(){let t={};return t.wbg={},t.wbg.__wbg_Error_e17e777aac105295=function(e,n){let r=Error(x(e,n));return b(r)},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(c(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),_=g;a().setInt32(e+4*1,_,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg_entries_2be2f15bd5554996=function(e){let n=Object.entries(c(e));return b(n)},t.wbg.__wbg_get_0da715ceaecea5c8=function(e,n){let r=c(e)[n>>>0];return b(r)},t.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(e,n){let r=c(e)[c(n)];return b(r)},t.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd=function(e){let n;try{n=c(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7=function(e){let n;try{n=c(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_length_186546c51cd61acd=function(e){return c(e).length},t.wbg.__wbg_length_6bb7e81f9d7713e4=function(e){return c(e).length},t.wbg.__wbg_new_19c25a3f2fa63a02=function(){let e=new Object;return b(e)},t.wbg.__wbg_new_1f3a344cf3123716=function(){let e=new Array;return b(e)},t.wbg.__wbg_new_638ebfaedbf32a5e=function(e){let n=new Uint8Array(c(e));return b(n)},t.wbg.__wbg_prototypesetcall_3d4a26c1ed734349=function(e,n,r){Uint8Array.prototype.set.call(H(e,n),c(r))},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){c(e)[w(n)]=w(r)},t.wbg.__wbg_set_90f6c0f7bd8c0415=function(e,n,r){c(e)[n>>>0]=w(r)},t.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746=function(e){let n=c(e),r=typeof n=="boolean"?n:void 0;return E(r)?16777215:r?1:0},t.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d=function(e,n){let r=D(c(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),_=g;a().setInt32(e+4*1,_,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg_wbindgenin_d7a1ee10933d2d55=function(e,n){return c(e)in c(n)},t.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8=function(e){let n=c(e);return typeof n=="object"&&n!==null},t.wbg.__wbg_wbindgenisstring_d4fa939789f003b0=function(e){return typeof c(e)=="string"},t.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5=function(e){return c(e)===void 0},t.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1=function(e,n){return c(e)==c(n)},t.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb=function(e,n){let r=c(n),i=typeof r=="number"?r:void 0;a().setFloat64(e+8*1,E(i)?0:i,!0),a().setInt32(e+4*0,!E(i),!0)},t.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f=function(e,n){let r=c(n),i=typeof r=="string"?r:void 0;var _=E(i)?0:y(i,o.__wbindgen_export_0,o.__wbindgen_export_1),s=g;a().setInt32(e+4*1,s,!0),a().setInt32(e+4*0,_,!0)},t.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6=function(e,n){throw new Error(x(e,n))},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){let r=x(e,n);return b(r)},t.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return b(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=c(e);return b(n)},t.wbg.__wbindgen_object_drop_ref=function(e){w(e)},t}function T(t,e){return o=t.exports,U.__wbindgen_wasm_module=e,h=null,A=null,o}function it(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=V();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let n=new WebAssembly.Instance(t,e);return T(n,t)}async function U(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("mq_wasm_bg.wasm",import.meta.url));let e=V();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await rt(await t,e);return T(n,r)}var o,A,F,X,M,p,S,g,O,h,et,j,nt,R,v=C(()=>{"use strict";A=null;F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});F.decode();X=2146435072,M=0;p=new Array(128).fill(void 0);p.push(void 0,null,!0,!1);S=p.length;g=0,O=new TextEncoder;"encodeInto"in O||(O.encodeInto=function(t,e){let n=O.encode(t);return e.set(n),{read:t.length,written:n.length}});h=null;et=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>o.__wbg_runoptions_free(t>>>0,1)),j=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,et.unregister(this),e}free(){let e=this.__destroy_into_raw();o.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(j.prototype[Symbol.dispose]=j.prototype.free);nt=new Set(["basic","cors","default"]);R=U});v();var k=null;async function W(){return k||(await(async()=>{try{await R();let t=await Promise.resolve().then(()=>(v(),P));k={run:t.run,toAst:t.toAst,format:t.format,diagnostics:t.diagnostics,definedValues:t.definedValues}}catch(t){throw new Error(`Failed to initialize mq WebAssembly module: ${t}`)}})(),k)}async function ft(t,e,n={}){return await(await W()).run(t,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function ut(t){return await(await W()).toAst(t)}async function dt(t){return await(await W()).format(t)}async function bt(t){return await(await W()).diagnostics(t)}async function gt(t){return await(await W()).definedValues(t)}export{gt as definedValues,bt as diagnostics,dt as format,ft as run,ut as toAst};
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var k=Object.defineProperty;var K=Object.getOwnPropertyDescriptor;var Q=Object.getOwnPropertyNames;var X=Object.prototype.hasOwnProperty;var Y=(t,e)=>()=>(t&&(e=t(t=0)),e);var E=(t,e)=>{for(var n in e)k(t,n,{get:e[n],enumerable:!0})},Z=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Q(e))!X.call(t,i)&&i!==n&&k(t,i,{get:()=>e[i],enumerable:!(r=K(e,i))||r.enumerable});return t};var tt=t=>Z(k({},"__esModule",{value:!0}),t);var $={};E($,{RunOptions:()=>v,default:()=>M,definedValues:()=>ct,diagnostics:()=>st,format:()=>ot,initSync:()=>ft,run:()=>rt,toAst:()=>it});function s(t){return p[t]}function O(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(o.memory.buffer)),A}function y(t,e,n){if(n===void 0){let f=S.encode(t),u=e(f.length,1)>>>0;return O().subarray(u,u+f.length).set(f),b=f.length,u}let r=t.length,i=e(r,1)>>>0,a=O(),c=0;for(;c<r;c++){let f=t.charCodeAt(c);if(f>127)break;a[i+c]=f}if(c!==r){c!==0&&(t=t.slice(c)),i=n(i,r,r=c+t.length*3,1)>>>0;let f=O().subarray(i+c,i+r),u=et(t,f);c+=u.written,i=n(i,r,c,1)>>>0}return b=c,i}function _(){return(h===null||h.buffer.detached===!0||h.buffer.detached===void 0&&h.buffer!==o.memory.buffer)&&(h=new DataView(o.memory.buffer)),h}function d(t){I===p.length&&p.push(p.length+1);let e=I;return I=p[e],p[e]=t,e}function nt(t){t<132||(p[t]=I,I=t)}function w(t){let e=s(t);return nt(t),e}function V(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){let i=t.length,a="[";i>0&&(a+=V(t[0]));for(let c=1;c<i;c++)a+=", "+V(t[c]);return a+="]",a}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
- ${t.stack}`:r}function x(t,e){return t=t>>>0,R.decode(O().subarray(t,t+e))}function D(t){return t==null}function rt(t,e,n){let r,i;try{let l=o.__wbindgen_add_to_stack_pointer(-16),C=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),H=b,J=y(e,o.__wbindgen_export_0,o.__wbindgen_export_1),G=b;o.run(l,C,H,J,G,d(n));var a=_().getInt32(l+4*0,!0),c=_().getInt32(l+4*1,!0),f=_().getInt32(l+4*2,!0),u=_().getInt32(l+4*3,!0),g=a,m=c;if(u)throw g=0,m=0,w(f);return r=g,i=m,x(g,m)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(r,i,1)}}function it(t){let e,n;try{let g=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=b;o.toAst(g,m,l);var r=_().getInt32(g+4*0,!0),i=_().getInt32(g+4*1,!0),a=_().getInt32(g+4*2,!0),c=_().getInt32(g+4*3,!0),f=r,u=i;if(c)throw f=0,u=0,w(a);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function ot(t){let e,n;try{let g=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=b;o.format(g,m,l);var r=_().getInt32(g+4*0,!0),i=_().getInt32(g+4*1,!0),a=_().getInt32(g+4*2,!0),c=_().getInt32(g+4*3,!0),f=r,u=i;if(c)throw f=0,u=0,w(a);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function st(t){let e=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),n=b,r=o.diagnostics(e,n);return w(r)}function ct(t){try{let i=o.__wbindgen_add_to_stack_pointer(-16),a=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),c=b;o.definedValues(i,a,c);var e=_().getInt32(i+4*0,!0),n=_().getInt32(i+4*1,!0),r=_().getInt32(i+4*2,!0);if(r)throw w(n);return w(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}async function at(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function F(){let t={};return t.wbg={},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(s(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),a=b;_().setInt32(e+4*1,a,!0),_().setInt32(e+4*0,i,!0)},t.wbg.__wbg_buffer_609cc3eee51ed158=function(e){let n=s(e).buffer;return d(n)},t.wbg.__wbg_entries_3265d4158b33e5dc=function(e){let n=Object.entries(s(e));return d(n)},t.wbg.__wbg_get_b9b93047fe3cf45b=function(e,n){let r=s(e)[n>>>0];return d(r)},t.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(e,n){let r=s(e)[s(n)];return d(r)},t.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(e){let n;try{n=s(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(e){let n;try{n=s(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_length_a446193dc22c12f8=function(e){return s(e).length},t.wbg.__wbg_length_e2d2a49132c1b256=function(e){return s(e).length},t.wbg.__wbg_new_405e22f390576ce2=function(){let e=new Object;return d(e)},t.wbg.__wbg_new_78feb108b6472713=function(){let e=new Array;return d(e)},t.wbg.__wbg_new_a12002a7f91c75be=function(e){let n=new Uint8Array(s(e));return d(n)},t.wbg.__wbg_set_37837023f3d740e8=function(e,n,r){s(e)[n>>>0]=w(r)},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){s(e)[w(n)]=w(r)},t.wbg.__wbg_set_65595bdd868b3009=function(e,n,r){s(e).set(s(n),r>>>0)},t.wbg.__wbindgen_boolean_get=function(e){let n=s(e);return typeof n=="boolean"?n?1:0:2},t.wbg.__wbindgen_debug_string=function(e,n){let r=V(s(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),a=b;_().setInt32(e+4*1,a,!0),_().setInt32(e+4*0,i,!0)},t.wbg.__wbindgen_error_new=function(e,n){let r=new Error(x(e,n));return d(r)},t.wbg.__wbindgen_in=function(e,n){return s(e)in s(n)},t.wbg.__wbindgen_is_object=function(e){let n=s(e);return typeof n=="object"&&n!==null},t.wbg.__wbindgen_is_string=function(e){return typeof s(e)=="string"},t.wbg.__wbindgen_is_undefined=function(e){return s(e)===void 0},t.wbg.__wbindgen_jsval_loose_eq=function(e,n){return s(e)==s(n)},t.wbg.__wbindgen_memory=function(){let e=o.memory;return d(e)},t.wbg.__wbindgen_number_get=function(e,n){let r=s(n),i=typeof r=="number"?r:void 0;_().setFloat64(e+8*1,D(i)?0:i,!0),_().setInt32(e+4*0,!D(i),!0)},t.wbg.__wbindgen_number_new=function(e){return d(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=s(e);return d(n)},t.wbg.__wbindgen_object_drop_ref=function(e){w(e)},t.wbg.__wbindgen_string_get=function(e,n){let r=s(n),i=typeof r=="string"?r:void 0;var a=D(i)?0:y(i,o.__wbindgen_export_0,o.__wbindgen_export_1),c=b;_().setInt32(e+4*1,c,!0),_().setInt32(e+4*0,a,!0)},t.wbg.__wbindgen_string_new=function(e,n){let r=x(e,n);return d(r)},t.wbg.__wbindgen_throw=function(e,n){throw new Error(x(e,n))},t}function U(t,e){return o=t.exports,P.__wbindgen_wasm_module=e,h=null,A=null,o}function ft(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=F();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let n=new WebAssembly.Instance(t,e);return U(n,t)}async function P(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("mq_wasm_bg.wasm",ut.url));let e=F();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await at(await t,e);return U(n,r)}var ut,o,p,b,A,S,et,h,I,R,_t,v,M,T=Y(()=>{"use strict";ut={},p=new Array(128).fill(void 0);p.push(void 0,null,!0,!1);b=0,A=null;S=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},et=typeof S.encodeInto=="function"?function(t,e){return S.encodeInto(t,e)}:function(t,e){let n=S.encode(t);return e.set(n),{read:t.length,written:n.length}};h=null;I=p.length;R=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&R.decode();_t=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>o.__wbg_runoptions_free(t>>>0,1)),v=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,_t.unregister(this),e}free(){let e=this.__destroy_into_raw();o.__wbg_runoptions_free(e,0)}};M=P});var gt={};E(gt,{definedValues:()=>N,diagnostics:()=>B,format:()=>L,run:()=>q,toAst:()=>z});module.exports=tt(gt);T();var W=null;async function j(){return W||(await(async()=>{try{await M();let t=await Promise.resolve().then(()=>(T(),$));W={run:t.run,toAst:t.toAst,format:t.format,diagnostics:t.diagnostics,definedValues:t.definedValues}}catch(t){throw new Error(`Failed to initialize mq WebAssembly module: ${t}`)}})(),W)}async function q(t,e,n={}){return await(await j()).run(t,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function z(t){return await(await j()).toAst(t)}async function L(t){return await(await j()).format(t)}async function B(t){return await(await j()).diagnostics(t)}async function N(t){return await(await j()).definedValues(t)}0&&(module.exports={definedValues,diagnostics,format,run,toAst});
1
+ "use strict";var k=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var Q=Object.prototype.hasOwnProperty;var Z=(t,e)=>()=>(t&&(e=t(t=0)),e);var T=(t,e)=>{for(var n in e)k(t,n,{get:e[n],enumerable:!0})},tt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of K(e))!Q.call(t,i)&&i!==n&&k(t,i,{get:()=>e[i],enumerable:!(r=G(e,i))||r.enumerable});return t};var et=t=>tt(k({},"__esModule",{value:!0}),t);var q={};T(q,{RunOptions:()=>j,default:()=>R,definedValues:()=>ft,diagnostics:()=>_t,format:()=>at,initSync:()=>gt,run:()=>st,toAst:()=>ct});function I(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(o.memory.buffer)),A}function rt(t,e){return M+=e,M>=nt&&(E=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),E.decode(),M=e),E.decode(I().subarray(t,t+e))}function x(t,e){return t=t>>>0,rt(t,e)}function b(t){S===p.length&&p.push(p.length+1);let e=S;return S=p[e],p[e]=t,e}function c(t){return p[t]}function y(t,e,n){if(n===void 0){let f=O.encode(t),u=e(f.length,1)>>>0;return I().subarray(u,u+f.length).set(f),g=f.length,u}let r=t.length,i=e(r,1)>>>0,_=I(),s=0;for(;s<r;s++){let f=t.charCodeAt(s);if(f>127)break;_[i+s]=f}if(s!==r){s!==0&&(t=t.slice(s)),i=n(i,r,r=s+t.length*3,1)>>>0;let f=I().subarray(i+s,i+r),u=O.encodeInto(t,f);s+=u.written,i=n(i,r,s,1)>>>0}return g=s,i}function a(){return(h===null||h.buffer.detached===!0||h.buffer.detached===void 0&&h.buffer!==o.memory.buffer)&&(h=new DataView(o.memory.buffer)),h}function it(t,e){return t=t>>>0,I().subarray(t/1,t/1+e)}function ot(t){t<132||(p[t]=S,S=t)}function w(t){let e=c(t);return ot(t),e}function D(t){return t==null}function V(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){let i=t.length,_="[";i>0&&(_+=V(t[0]));for(let s=1;s<i;s++)_+=", "+V(t[s]);return _+="]",_}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
+ ${t.stack}`:r}function st(t,e,n){let r,i;try{let l=o.__wbindgen_add_to_stack_pointer(-16),X=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),Y=g,H=y(e,o.__wbindgen_export_0,o.__wbindgen_export_1),J=g;o.run(l,X,Y,H,J,b(n));var _=a().getInt32(l+4*0,!0),s=a().getInt32(l+4*1,!0),f=a().getInt32(l+4*2,!0),u=a().getInt32(l+4*3,!0),d=_,m=s;if(u)throw d=0,m=0,w(f);return r=d,i=m,x(d,m)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(r,i,1)}}function ct(t){let e,n;try{let d=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=g;o.toAst(d,m,l);var r=a().getInt32(d+4*0,!0),i=a().getInt32(d+4*1,!0),_=a().getInt32(d+4*2,!0),s=a().getInt32(d+4*3,!0),f=r,u=i;if(s)throw f=0,u=0,w(_);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function at(t){let e,n;try{let d=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=g;o.format(d,m,l);var r=a().getInt32(d+4*0,!0),i=a().getInt32(d+4*1,!0),_=a().getInt32(d+4*2,!0),s=a().getInt32(d+4*3,!0),f=r,u=i;if(s)throw f=0,u=0,w(_);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function _t(t){let e=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),n=g,r=o.diagnostics(e,n);return w(r)}function ft(t){try{let i=o.__wbindgen_add_to_stack_pointer(-16),_=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),s=g;o.definedValues(i,_,s);var e=a().getInt32(i+4*0,!0),n=a().getInt32(i+4*1,!0),r=a().getInt32(i+4*2,!0);if(r)throw w(n);return w(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}async function bt(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.ok&&dt.has(t.type)&&t.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function U(){let t={};return t.wbg={},t.wbg.__wbg_Error_e17e777aac105295=function(e,n){let r=Error(x(e,n));return b(r)},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(c(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),_=g;a().setInt32(e+4*1,_,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg_entries_2be2f15bd5554996=function(e){let n=Object.entries(c(e));return b(n)},t.wbg.__wbg_get_0da715ceaecea5c8=function(e,n){let r=c(e)[n>>>0];return b(r)},t.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(e,n){let r=c(e)[c(n)];return b(r)},t.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd=function(e){let n;try{n=c(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7=function(e){let n;try{n=c(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_length_186546c51cd61acd=function(e){return c(e).length},t.wbg.__wbg_length_6bb7e81f9d7713e4=function(e){return c(e).length},t.wbg.__wbg_new_19c25a3f2fa63a02=function(){let e=new Object;return b(e)},t.wbg.__wbg_new_1f3a344cf3123716=function(){let e=new Array;return b(e)},t.wbg.__wbg_new_638ebfaedbf32a5e=function(e){let n=new Uint8Array(c(e));return b(n)},t.wbg.__wbg_prototypesetcall_3d4a26c1ed734349=function(e,n,r){Uint8Array.prototype.set.call(it(e,n),c(r))},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){c(e)[w(n)]=w(r)},t.wbg.__wbg_set_90f6c0f7bd8c0415=function(e,n,r){c(e)[n>>>0]=w(r)},t.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746=function(e){let n=c(e),r=typeof n=="boolean"?n:void 0;return D(r)?16777215:r?1:0},t.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d=function(e,n){let r=V(c(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),_=g;a().setInt32(e+4*1,_,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg_wbindgenin_d7a1ee10933d2d55=function(e,n){return c(e)in c(n)},t.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8=function(e){let n=c(e);return typeof n=="object"&&n!==null},t.wbg.__wbg_wbindgenisstring_d4fa939789f003b0=function(e){return typeof c(e)=="string"},t.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5=function(e){return c(e)===void 0},t.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1=function(e,n){return c(e)==c(n)},t.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb=function(e,n){let r=c(n),i=typeof r=="number"?r:void 0;a().setFloat64(e+8*1,D(i)?0:i,!0),a().setInt32(e+4*0,!D(i),!0)},t.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f=function(e,n){let r=c(n),i=typeof r=="string"?r:void 0;var _=D(i)?0:y(i,o.__wbindgen_export_0,o.__wbindgen_export_1),s=g;a().setInt32(e+4*1,s,!0),a().setInt32(e+4*0,_,!0)},t.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6=function(e,n){throw new Error(x(e,n))},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){let r=x(e,n);return b(r)},t.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return b(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=c(e);return b(n)},t.wbg.__wbindgen_object_drop_ref=function(e){w(e)},t}function P(t,e){return o=t.exports,$.__wbindgen_wasm_module=e,h=null,A=null,o}function gt(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=U();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let n=new WebAssembly.Instance(t,e);return P(n,t)}async function $(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("mq_wasm_bg.wasm",wt.url));let e=U();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await bt(await t,e);return P(n,r)}var wt,o,A,E,nt,M,p,S,g,O,h,ut,j,dt,R,v=Z(()=>{"use strict";wt={},A=null;E=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});E.decode();nt=2146435072,M=0;p=new Array(128).fill(void 0);p.push(void 0,null,!0,!1);S=p.length;g=0,O=new TextEncoder;"encodeInto"in O||(O.encodeInto=function(t,e){let n=O.encode(t);return e.set(n),{read:t.length,written:n.length}});h=null;ut=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>o.__wbg_runoptions_free(t>>>0,1)),j=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ut.unregister(this),e}free(){let e=this.__destroy_into_raw();o.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(j.prototype[Symbol.dispose]=j.prototype.free);dt=new Set(["basic","cors","default"]);R=$});var lt={};T(lt,{definedValues:()=>N,diagnostics:()=>C,format:()=>L,run:()=>B,toAst:()=>z});module.exports=et(lt);v();var F=null;async function W(){return F||(await(async()=>{try{await R();let t=await Promise.resolve().then(()=>(v(),q));F={run:t.run,toAst:t.toAst,format:t.format,diagnostics:t.diagnostics,definedValues:t.definedValues}}catch(t){throw new Error(`Failed to initialize mq WebAssembly module: ${t}`)}})(),F)}async function B(t,e,n={}){return await(await W()).run(t,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function z(t){return await(await W()).toAst(t)}async function L(t){return await(await W()).format(t)}async function C(t){return await(await W()).diagnostics(t)}async function N(t){return await(await W()).definedValues(t)}0&&(module.exports={definedValues,diagnostics,format,run,toAst});
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var L=Object.defineProperty;var B=(t,e)=>()=>(t&&(e=t(t=0)),e);var N=(t,e)=>{for(var n in e)L(t,n,{get:e[n],enumerable:!0})};var U={};N(U,{RunOptions:()=>V,default:()=>v,definedValues:()=>X,diagnostics:()=>Q,format:()=>K,initSync:()=>tt,run:()=>J,toAst:()=>G});function s(t){return p[t]}function O(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(i.memory.buffer)),A}function y(t,e,n){if(n===void 0){let f=S.encode(t),u=e(f.length,1)>>>0;return O().subarray(u,u+f.length).set(f),b=f.length,u}let r=t.length,o=e(r,1)>>>0,a=O(),c=0;for(;c<r;c++){let f=t.charCodeAt(c);if(f>127)break;a[o+c]=f}if(c!==r){c!==0&&(t=t.slice(c)),o=n(o,r,r=c+t.length*3,1)>>>0;let f=O().subarray(o+c,o+r),u=C(t,f);c+=u.written,o=n(o,r,c,1)>>>0}return b=c,o}function _(){return(h===null||h.buffer.detached===!0||h.buffer.detached===void 0&&h.buffer!==i.memory.buffer)&&(h=new DataView(i.memory.buffer)),h}function d(t){I===p.length&&p.push(p.length+1);let e=I;return I=p[e],p[e]=t,e}function H(t){t<132||(p[t]=I,I=t)}function w(t){let e=s(t);return H(t),e}function D(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let o=t.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){let o=t.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(t)){let o=t.length,a="[";o>0&&(a+=D(t[0]));for(let c=1;c<o;c++)a+=", "+D(t[c]);return a+="]",a}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
- ${t.stack}`:r}function x(t,e){return t=t>>>0,T.decode(O().subarray(t,t+e))}function k(t){return t==null}function J(t,e,n){let r,o;try{let l=i.__wbindgen_add_to_stack_pointer(-16),P=y(t,i.__wbindgen_export_0,i.__wbindgen_export_1),$=b,q=y(e,i.__wbindgen_export_0,i.__wbindgen_export_1),z=b;i.run(l,P,$,q,z,d(n));var a=_().getInt32(l+4*0,!0),c=_().getInt32(l+4*1,!0),f=_().getInt32(l+4*2,!0),u=_().getInt32(l+4*3,!0),g=a,m=c;if(u)throw g=0,m=0,w(f);return r=g,o=m,x(g,m)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_export_2(r,o,1)}}function G(t){let e,n;try{let g=i.__wbindgen_add_to_stack_pointer(-16),m=y(t,i.__wbindgen_export_0,i.__wbindgen_export_1),l=b;i.toAst(g,m,l);var r=_().getInt32(g+4*0,!0),o=_().getInt32(g+4*1,!0),a=_().getInt32(g+4*2,!0),c=_().getInt32(g+4*3,!0),f=r,u=o;if(c)throw f=0,u=0,w(a);return e=f,n=u,x(f,u)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_export_2(e,n,1)}}function K(t){let e,n;try{let g=i.__wbindgen_add_to_stack_pointer(-16),m=y(t,i.__wbindgen_export_0,i.__wbindgen_export_1),l=b;i.format(g,m,l);var r=_().getInt32(g+4*0,!0),o=_().getInt32(g+4*1,!0),a=_().getInt32(g+4*2,!0),c=_().getInt32(g+4*3,!0),f=r,u=o;if(c)throw f=0,u=0,w(a);return e=f,n=u,x(f,u)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_export_2(e,n,1)}}function Q(t){let e=y(t,i.__wbindgen_export_0,i.__wbindgen_export_1),n=b,r=i.diagnostics(e,n);return w(r)}function X(t){try{let o=i.__wbindgen_add_to_stack_pointer(-16),a=y(t,i.__wbindgen_export_0,i.__wbindgen_export_1),c=b;i.definedValues(o,a,c);var e=_().getInt32(o+4*0,!0),n=_().getInt32(o+4*1,!0),r=_().getInt32(o+4*2,!0);if(r)throw w(n);return w(e)}finally{i.__wbindgen_add_to_stack_pointer(16)}}async function Z(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function E(){let t={};return t.wbg={},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(s(n)),o=y(r,i.__wbindgen_export_0,i.__wbindgen_export_1),a=b;_().setInt32(e+4*1,a,!0),_().setInt32(e+4*0,o,!0)},t.wbg.__wbg_buffer_609cc3eee51ed158=function(e){let n=s(e).buffer;return d(n)},t.wbg.__wbg_entries_3265d4158b33e5dc=function(e){let n=Object.entries(s(e));return d(n)},t.wbg.__wbg_get_b9b93047fe3cf45b=function(e,n){let r=s(e)[n>>>0];return d(r)},t.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(e,n){let r=s(e)[s(n)];return d(r)},t.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(e){let n;try{n=s(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(e){let n;try{n=s(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_length_a446193dc22c12f8=function(e){return s(e).length},t.wbg.__wbg_length_e2d2a49132c1b256=function(e){return s(e).length},t.wbg.__wbg_new_405e22f390576ce2=function(){let e=new Object;return d(e)},t.wbg.__wbg_new_78feb108b6472713=function(){let e=new Array;return d(e)},t.wbg.__wbg_new_a12002a7f91c75be=function(e){let n=new Uint8Array(s(e));return d(n)},t.wbg.__wbg_set_37837023f3d740e8=function(e,n,r){s(e)[n>>>0]=w(r)},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){s(e)[w(n)]=w(r)},t.wbg.__wbg_set_65595bdd868b3009=function(e,n,r){s(e).set(s(n),r>>>0)},t.wbg.__wbindgen_boolean_get=function(e){let n=s(e);return typeof n=="boolean"?n?1:0:2},t.wbg.__wbindgen_debug_string=function(e,n){let r=D(s(n)),o=y(r,i.__wbindgen_export_0,i.__wbindgen_export_1),a=b;_().setInt32(e+4*1,a,!0),_().setInt32(e+4*0,o,!0)},t.wbg.__wbindgen_error_new=function(e,n){let r=new Error(x(e,n));return d(r)},t.wbg.__wbindgen_in=function(e,n){return s(e)in s(n)},t.wbg.__wbindgen_is_object=function(e){let n=s(e);return typeof n=="object"&&n!==null},t.wbg.__wbindgen_is_string=function(e){return typeof s(e)=="string"},t.wbg.__wbindgen_is_undefined=function(e){return s(e)===void 0},t.wbg.__wbindgen_jsval_loose_eq=function(e,n){return s(e)==s(n)},t.wbg.__wbindgen_memory=function(){let e=i.memory;return d(e)},t.wbg.__wbindgen_number_get=function(e,n){let r=s(n),o=typeof r=="number"?r:void 0;_().setFloat64(e+8*1,k(o)?0:o,!0),_().setInt32(e+4*0,!k(o),!0)},t.wbg.__wbindgen_number_new=function(e){return d(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=s(e);return d(n)},t.wbg.__wbindgen_object_drop_ref=function(e){w(e)},t.wbg.__wbindgen_string_get=function(e,n){let r=s(n),o=typeof r=="string"?r:void 0;var a=k(o)?0:y(o,i.__wbindgen_export_0,i.__wbindgen_export_1),c=b;_().setInt32(e+4*1,c,!0),_().setInt32(e+4*0,a,!0)},t.wbg.__wbindgen_string_new=function(e,n){let r=x(e,n);return d(r)},t.wbg.__wbindgen_throw=function(e,n){throw new Error(x(e,n))},t}function R(t,e){return i=t.exports,F.__wbindgen_wasm_module=e,h=null,A=null,i}function tt(t){if(i!==void 0)return i;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=E();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let n=new WebAssembly.Instance(t,e);return R(n,t)}async function F(t){if(i!==void 0)return i;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("mq_wasm_bg.wasm",import.meta.url));let e=E();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await Z(await t,e);return R(n,r)}var i,p,b,A,S,C,h,I,T,Y,V,v,M=B(()=>{"use strict";p=new Array(128).fill(void 0);p.push(void 0,null,!0,!1);b=0,A=null;S=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},C=typeof S.encodeInto=="function"?function(t,e){return S.encodeInto(t,e)}:function(t,e){let n=S.encode(t);return e.set(n),{read:t.length,written:n.length}};h=null;I=p.length;T=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&T.decode();Y=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>i.__wbg_runoptions_free(t>>>0,1)),V=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),e}free(){let e=this.__destroy_into_raw();i.__wbg_runoptions_free(e,0)}};v=F});M();var W=null;async function j(){return W||(await(async()=>{try{await v();let t=await Promise.resolve().then(()=>(M(),U));W={run:t.run,toAst:t.toAst,format:t.format,diagnostics:t.diagnostics,definedValues:t.definedValues}}catch(t){throw new Error(`Failed to initialize mq WebAssembly module: ${t}`)}})(),W)}async function et(t,e,n={}){return await(await j()).run(t,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function nt(t){return await(await j()).toAst(t)}async function rt(t){return await(await j()).format(t)}async function it(t){return await(await j()).diagnostics(t)}async function ot(t){return await(await j()).definedValues(t)}export{ot as definedValues,it as diagnostics,rt as format,et as run,nt as toAst};
1
+ var L=Object.defineProperty;var C=(t,e)=>()=>(t&&(e=t(t=0)),e);var N=(t,e)=>{for(var n in e)L(t,n,{get:e[n],enumerable:!0})};var P={};N(P,{RunOptions:()=>j,default:()=>V,definedValues:()=>tt,diagnostics:()=>Z,format:()=>Q,initSync:()=>it,run:()=>G,toAst:()=>K});function I(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(o.memory.buffer)),A}function Y(t,e){return k+=e,k>=X&&(E=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),E.decode(),k=e),E.decode(I().subarray(t,t+e))}function x(t,e){return t=t>>>0,Y(t,e)}function b(t){S===p.length&&p.push(p.length+1);let e=S;return S=p[e],p[e]=t,e}function c(t){return p[t]}function y(t,e,n){if(n===void 0){let f=O.encode(t),u=e(f.length,1)>>>0;return I().subarray(u,u+f.length).set(f),g=f.length,u}let r=t.length,i=e(r,1)>>>0,_=I(),s=0;for(;s<r;s++){let f=t.charCodeAt(s);if(f>127)break;_[i+s]=f}if(s!==r){s!==0&&(t=t.slice(s)),i=n(i,r,r=s+t.length*3,1)>>>0;let f=I().subarray(i+s,i+r),u=O.encodeInto(t,f);s+=u.written,i=n(i,r,s,1)>>>0}return g=s,i}function a(){return(h===null||h.buffer.detached===!0||h.buffer.detached===void 0&&h.buffer!==o.memory.buffer)&&(h=new DataView(o.memory.buffer)),h}function H(t,e){return t=t>>>0,I().subarray(t/1,t/1+e)}function J(t){t<132||(p[t]=S,S=t)}function w(t){let e=c(t);return J(t),e}function D(t){return t==null}function M(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){let i=t.length,_="[";i>0&&(_+=M(t[0]));for(let s=1;s<i;s++)_+=", "+M(t[s]);return _+="]",_}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
+ ${t.stack}`:r}function G(t,e,n){let r,i;try{let l=o.__wbindgen_add_to_stack_pointer(-16),$=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),q=g,B=y(e,o.__wbindgen_export_0,o.__wbindgen_export_1),z=g;o.run(l,$,q,B,z,b(n));var _=a().getInt32(l+4*0,!0),s=a().getInt32(l+4*1,!0),f=a().getInt32(l+4*2,!0),u=a().getInt32(l+4*3,!0),d=_,m=s;if(u)throw d=0,m=0,w(f);return r=d,i=m,x(d,m)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(r,i,1)}}function K(t){let e,n;try{let d=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=g;o.toAst(d,m,l);var r=a().getInt32(d+4*0,!0),i=a().getInt32(d+4*1,!0),_=a().getInt32(d+4*2,!0),s=a().getInt32(d+4*3,!0),f=r,u=i;if(s)throw f=0,u=0,w(_);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function Q(t){let e,n;try{let d=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=g;o.format(d,m,l);var r=a().getInt32(d+4*0,!0),i=a().getInt32(d+4*1,!0),_=a().getInt32(d+4*2,!0),s=a().getInt32(d+4*3,!0),f=r,u=i;if(s)throw f=0,u=0,w(_);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function Z(t){let e=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),n=g,r=o.diagnostics(e,n);return w(r)}function tt(t){try{let i=o.__wbindgen_add_to_stack_pointer(-16),_=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),s=g;o.definedValues(i,_,s);var e=a().getInt32(i+4*0,!0),n=a().getInt32(i+4*1,!0),r=a().getInt32(i+4*2,!0);if(r)throw w(n);return w(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}async function rt(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.ok&&nt.has(t.type)&&t.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function v(){let t={};return t.wbg={},t.wbg.__wbg_Error_e17e777aac105295=function(e,n){let r=Error(x(e,n));return b(r)},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(c(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),_=g;a().setInt32(e+4*1,_,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg_entries_2be2f15bd5554996=function(e){let n=Object.entries(c(e));return b(n)},t.wbg.__wbg_get_0da715ceaecea5c8=function(e,n){let r=c(e)[n>>>0];return b(r)},t.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(e,n){let r=c(e)[c(n)];return b(r)},t.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd=function(e){let n;try{n=c(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7=function(e){let n;try{n=c(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_length_186546c51cd61acd=function(e){return c(e).length},t.wbg.__wbg_length_6bb7e81f9d7713e4=function(e){return c(e).length},t.wbg.__wbg_new_19c25a3f2fa63a02=function(){let e=new Object;return b(e)},t.wbg.__wbg_new_1f3a344cf3123716=function(){let e=new Array;return b(e)},t.wbg.__wbg_new_638ebfaedbf32a5e=function(e){let n=new Uint8Array(c(e));return b(n)},t.wbg.__wbg_prototypesetcall_3d4a26c1ed734349=function(e,n,r){Uint8Array.prototype.set.call(H(e,n),c(r))},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){c(e)[w(n)]=w(r)},t.wbg.__wbg_set_90f6c0f7bd8c0415=function(e,n,r){c(e)[n>>>0]=w(r)},t.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746=function(e){let n=c(e),r=typeof n=="boolean"?n:void 0;return D(r)?16777215:r?1:0},t.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d=function(e,n){let r=M(c(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),_=g;a().setInt32(e+4*1,_,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg_wbindgenin_d7a1ee10933d2d55=function(e,n){return c(e)in c(n)},t.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8=function(e){let n=c(e);return typeof n=="object"&&n!==null},t.wbg.__wbg_wbindgenisstring_d4fa939789f003b0=function(e){return typeof c(e)=="string"},t.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5=function(e){return c(e)===void 0},t.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1=function(e,n){return c(e)==c(n)},t.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb=function(e,n){let r=c(n),i=typeof r=="number"?r:void 0;a().setFloat64(e+8*1,D(i)?0:i,!0),a().setInt32(e+4*0,!D(i),!0)},t.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f=function(e,n){let r=c(n),i=typeof r=="string"?r:void 0;var _=D(i)?0:y(i,o.__wbindgen_export_0,o.__wbindgen_export_1),s=g;a().setInt32(e+4*1,s,!0),a().setInt32(e+4*0,_,!0)},t.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6=function(e,n){throw new Error(x(e,n))},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){let r=x(e,n);return b(r)},t.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return b(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=c(e);return b(n)},t.wbg.__wbindgen_object_drop_ref=function(e){w(e)},t}function T(t,e){return o=t.exports,U.__wbindgen_wasm_module=e,h=null,A=null,o}function it(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=v();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let n=new WebAssembly.Instance(t,e);return T(n,t)}async function U(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("mq_wasm_bg.wasm",import.meta.url));let e=v();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await rt(await t,e);return T(n,r)}var o,A,E,X,k,p,S,g,O,h,et,j,nt,V,R=C(()=>{"use strict";A=null;E=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});E.decode();X=2146435072,k=0;p=new Array(128).fill(void 0);p.push(void 0,null,!0,!1);S=p.length;g=0,O=new TextEncoder;"encodeInto"in O||(O.encodeInto=function(t,e){let n=O.encode(t);return e.set(n),{read:t.length,written:n.length}});h=null;et=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>o.__wbg_runoptions_free(t>>>0,1)),j=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,et.unregister(this),e}free(){let e=this.__destroy_into_raw();o.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(j.prototype[Symbol.dispose]=j.prototype.free);nt=new Set(["basic","cors","default"]);V=U});R();var F=null;async function W(){return F||(await(async()=>{try{await V();let t=await Promise.resolve().then(()=>(R(),P));F={run:t.run,toAst:t.toAst,format:t.format,diagnostics:t.diagnostics,definedValues:t.definedValues}}catch(t){throw new Error(`Failed to initialize mq WebAssembly module: ${t}`)}})(),F)}async function ot(t,e,n={}){return await(await W()).run(t,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function st(t){return await(await W()).toAst(t)}async function ct(t){return await(await W()).format(t)}async function at(t){return await(await W()).diagnostics(t)}async function _t(t){return await(await W()).definedValues(t)}export{_t as definedValues,at as diagnostics,ct as format,ot as run,st as toAst};
package/dist/mq_wasm.js CHANGED
@@ -1,13 +1,5 @@
1
1
  let wasm;
2
2
 
3
- const heap = new Array(128).fill(undefined);
4
-
5
- heap.push(undefined, null, true, false);
6
-
7
- function getObject(idx) { return heap[idx]; }
8
-
9
- let WASM_VECTOR_LEN = 0;
10
-
11
3
  let cachedUint8ArrayMemory0 = null;
12
4
 
13
5
  function getUint8ArrayMemory0() {
@@ -17,20 +9,58 @@ function getUint8ArrayMemory0() {
17
9
  return cachedUint8ArrayMemory0;
18
10
  }
19
11
 
20
- const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
12
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
21
13
 
22
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
23
- ? function (arg, view) {
24
- return cachedTextEncoder.encodeInto(arg, view);
14
+ cachedTextDecoder.decode();
15
+
16
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
17
+ let numBytesDecoded = 0;
18
+ function decodeText(ptr, len) {
19
+ numBytesDecoded += len;
20
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
21
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
22
+ cachedTextDecoder.decode();
23
+ numBytesDecoded = len;
24
+ }
25
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
26
+ }
27
+
28
+ function getStringFromWasm0(ptr, len) {
29
+ ptr = ptr >>> 0;
30
+ return decodeText(ptr, len);
31
+ }
32
+
33
+ let heap = new Array(128).fill(undefined);
34
+
35
+ heap.push(undefined, null, true, false);
36
+
37
+ let heap_next = heap.length;
38
+
39
+ function addHeapObject(obj) {
40
+ if (heap_next === heap.length) heap.push(heap.length + 1);
41
+ const idx = heap_next;
42
+ heap_next = heap[idx];
43
+
44
+ heap[idx] = obj;
45
+ return idx;
46
+ }
47
+
48
+ function getObject(idx) { return heap[idx]; }
49
+
50
+ let WASM_VECTOR_LEN = 0;
51
+
52
+ const cachedTextEncoder = new TextEncoder();
53
+
54
+ if (!('encodeInto' in cachedTextEncoder)) {
55
+ cachedTextEncoder.encodeInto = function (arg, view) {
56
+ const buf = cachedTextEncoder.encode(arg);
57
+ view.set(buf);
58
+ return {
59
+ read: arg.length,
60
+ written: buf.length
61
+ };
62
+ }
25
63
  }
26
- : function (arg, view) {
27
- const buf = cachedTextEncoder.encode(arg);
28
- view.set(buf);
29
- return {
30
- read: arg.length,
31
- written: buf.length
32
- };
33
- });
34
64
 
35
65
  function passStringToWasm0(arg, malloc, realloc) {
36
66
 
@@ -61,7 +91,7 @@ function passStringToWasm0(arg, malloc, realloc) {
61
91
  }
62
92
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
63
93
  const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
64
- const ret = encodeString(arg, view);
94
+ const ret = cachedTextEncoder.encodeInto(arg, view);
65
95
 
66
96
  offset += ret.written;
67
97
  ptr = realloc(ptr, len, offset, 1) >>> 0;
@@ -80,15 +110,9 @@ function getDataViewMemory0() {
80
110
  return cachedDataViewMemory0;
81
111
  }
82
112
 
83
- let heap_next = heap.length;
84
-
85
- function addHeapObject(obj) {
86
- if (heap_next === heap.length) heap.push(heap.length + 1);
87
- const idx = heap_next;
88
- heap_next = heap[idx];
89
-
90
- heap[idx] = obj;
91
- return idx;
113
+ function getArrayU8FromWasm0(ptr, len) {
114
+ ptr = ptr >>> 0;
115
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
92
116
  }
93
117
 
94
118
  function dropObject(idx) {
@@ -103,6 +127,10 @@ function takeObject(idx) {
103
127
  return ret;
104
128
  }
105
129
 
130
+ function isLikeNone(x) {
131
+ return x === undefined || x === null;
132
+ }
133
+
106
134
  function debugString(val) {
107
135
  // primitive types
108
136
  const type = typeof val;
@@ -167,19 +195,6 @@ function debugString(val) {
167
195
  // TODO we could test for more things here, like `Set`s and `Map`s.
168
196
  return className;
169
197
  }
170
-
171
- const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
172
-
173
- if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
174
-
175
- function getStringFromWasm0(ptr, len) {
176
- ptr = ptr >>> 0;
177
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
178
- }
179
-
180
- function isLikeNone(x) {
181
- return x === undefined || x === null;
182
- }
183
198
  /**
184
199
  * @param {string} code
185
200
  * @param {string} content
@@ -328,6 +343,9 @@ export class RunOptions {
328
343
  wasm.__wbg_runoptions_free(ptr, 0);
329
344
  }
330
345
  }
346
+ if (Symbol.dispose) RunOptions.prototype[Symbol.dispose] = RunOptions.prototype.free;
347
+
348
+ const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
331
349
 
332
350
  async function __wbg_load(module, imports) {
333
351
  if (typeof Response === 'function' && module instanceof Response) {
@@ -336,7 +354,9 @@ async function __wbg_load(module, imports) {
336
354
  return await WebAssembly.instantiateStreaming(module, imports);
337
355
 
338
356
  } catch (e) {
339
- if (module.headers.get('Content-Type') != 'application/wasm') {
357
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
358
+
359
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
340
360
  console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
341
361
 
342
362
  } else {
@@ -363,6 +383,10 @@ async function __wbg_load(module, imports) {
363
383
  function __wbg_get_imports() {
364
384
  const imports = {};
365
385
  imports.wbg = {};
386
+ imports.wbg.__wbg_Error_e17e777aac105295 = function(arg0, arg1) {
387
+ const ret = Error(getStringFromWasm0(arg0, arg1));
388
+ return addHeapObject(ret);
389
+ };
366
390
  imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
367
391
  const ret = String(getObject(arg1));
368
392
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
@@ -370,15 +394,11 @@ function __wbg_get_imports() {
370
394
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
371
395
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
372
396
  };
373
- imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
374
- const ret = getObject(arg0).buffer;
375
- return addHeapObject(ret);
376
- };
377
- imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
397
+ imports.wbg.__wbg_entries_2be2f15bd5554996 = function(arg0) {
378
398
  const ret = Object.entries(getObject(arg0));
379
399
  return addHeapObject(ret);
380
400
  };
381
- imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
401
+ imports.wbg.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
382
402
  const ret = getObject(arg0)[arg1 >>> 0];
383
403
  return addHeapObject(ret);
384
404
  };
@@ -386,7 +406,7 @@ function __wbg_get_imports() {
386
406
  const ret = getObject(arg0)[getObject(arg1)];
387
407
  return addHeapObject(ret);
388
408
  };
389
- imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
409
+ imports.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd = function(arg0) {
390
410
  let result;
391
411
  try {
392
412
  result = getObject(arg0) instanceof ArrayBuffer;
@@ -396,7 +416,7 @@ function __wbg_get_imports() {
396
416
  const ret = result;
397
417
  return ret;
398
418
  };
399
- imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
419
+ imports.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7 = function(arg0) {
400
420
  let result;
401
421
  try {
402
422
  result = getObject(arg0) instanceof Uint8Array;
@@ -406,94 +426,75 @@ function __wbg_get_imports() {
406
426
  const ret = result;
407
427
  return ret;
408
428
  };
409
- imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
429
+ imports.wbg.__wbg_length_186546c51cd61acd = function(arg0) {
410
430
  const ret = getObject(arg0).length;
411
431
  return ret;
412
432
  };
413
- imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
433
+ imports.wbg.__wbg_length_6bb7e81f9d7713e4 = function(arg0) {
414
434
  const ret = getObject(arg0).length;
415
435
  return ret;
416
436
  };
417
- imports.wbg.__wbg_new_405e22f390576ce2 = function() {
437
+ imports.wbg.__wbg_new_19c25a3f2fa63a02 = function() {
418
438
  const ret = new Object();
419
439
  return addHeapObject(ret);
420
440
  };
421
- imports.wbg.__wbg_new_78feb108b6472713 = function() {
441
+ imports.wbg.__wbg_new_1f3a344cf3123716 = function() {
422
442
  const ret = new Array();
423
443
  return addHeapObject(ret);
424
444
  };
425
- imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
445
+ imports.wbg.__wbg_new_638ebfaedbf32a5e = function(arg0) {
426
446
  const ret = new Uint8Array(getObject(arg0));
427
447
  return addHeapObject(ret);
428
448
  };
429
- imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
430
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
449
+ imports.wbg.__wbg_prototypesetcall_3d4a26c1ed734349 = function(arg0, arg1, arg2) {
450
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
431
451
  };
432
452
  imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
433
453
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
434
454
  };
435
- imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
436
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
455
+ imports.wbg.__wbg_set_90f6c0f7bd8c0415 = function(arg0, arg1, arg2) {
456
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
437
457
  };
438
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
458
+ imports.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746 = function(arg0) {
439
459
  const v = getObject(arg0);
440
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
441
- return ret;
460
+ const ret = typeof(v) === 'boolean' ? v : undefined;
461
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
442
462
  };
443
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
463
+ imports.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d = function(arg0, arg1) {
444
464
  const ret = debugString(getObject(arg1));
445
465
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
446
466
  const len1 = WASM_VECTOR_LEN;
447
467
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
448
468
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
449
469
  };
450
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
451
- const ret = new Error(getStringFromWasm0(arg0, arg1));
452
- return addHeapObject(ret);
453
- };
454
- imports.wbg.__wbindgen_in = function(arg0, arg1) {
470
+ imports.wbg.__wbg_wbindgenin_d7a1ee10933d2d55 = function(arg0, arg1) {
455
471
  const ret = getObject(arg0) in getObject(arg1);
456
472
  return ret;
457
473
  };
458
- imports.wbg.__wbindgen_is_object = function(arg0) {
474
+ imports.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function(arg0) {
459
475
  const val = getObject(arg0);
460
476
  const ret = typeof(val) === 'object' && val !== null;
461
477
  return ret;
462
478
  };
463
- imports.wbg.__wbindgen_is_string = function(arg0) {
479
+ imports.wbg.__wbg_wbindgenisstring_d4fa939789f003b0 = function(arg0) {
464
480
  const ret = typeof(getObject(arg0)) === 'string';
465
481
  return ret;
466
482
  };
467
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
483
+ imports.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
468
484
  const ret = getObject(arg0) === undefined;
469
485
  return ret;
470
486
  };
471
- imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
487
+ imports.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1 = function(arg0, arg1) {
472
488
  const ret = getObject(arg0) == getObject(arg1);
473
489
  return ret;
474
490
  };
475
- imports.wbg.__wbindgen_memory = function() {
476
- const ret = wasm.memory;
477
- return addHeapObject(ret);
478
- };
479
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
491
+ imports.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb = function(arg0, arg1) {
480
492
  const obj = getObject(arg1);
481
493
  const ret = typeof(obj) === 'number' ? obj : undefined;
482
494
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
483
495
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
484
496
  };
485
- imports.wbg.__wbindgen_number_new = function(arg0) {
486
- const ret = arg0;
487
- return addHeapObject(ret);
488
- };
489
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
490
- const ret = getObject(arg0);
491
- return addHeapObject(ret);
492
- };
493
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
494
- takeObject(arg0);
495
- };
496
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
497
+ imports.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f = function(arg0, arg1) {
497
498
  const obj = getObject(arg1);
498
499
  const ret = typeof(obj) === 'string' ? obj : undefined;
499
500
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
@@ -501,12 +502,25 @@ function __wbg_get_imports() {
501
502
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
502
503
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
503
504
  };
504
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
505
+ imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
506
+ throw new Error(getStringFromWasm0(arg0, arg1));
507
+ };
508
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
509
+ // Cast intrinsic for `Ref(String) -> Externref`.
505
510
  const ret = getStringFromWasm0(arg0, arg1);
506
511
  return addHeapObject(ret);
507
512
  };
508
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
509
- throw new Error(getStringFromWasm0(arg0, arg1));
513
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
514
+ // Cast intrinsic for `F64 -> Externref`.
515
+ const ret = arg0;
516
+ return addHeapObject(ret);
517
+ };
518
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
519
+ const ret = getObject(arg0);
520
+ return addHeapObject(ret);
521
+ };
522
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
523
+ takeObject(arg0);
510
524
  };
511
525
 
512
526
  return imports;
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mq-web",
3
3
  "description": "A jq-like command-line tool for Markdown processing",
4
- "version": "0.2.23",
4
+ "version": "0.4.0",
5
5
  "author": "harehare",
6
6
  "license": "MIT",
7
7
  "bugs": {