mq-web 0.5.16 → 0.5.18
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 +2 -2
- package/dist/core.js +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/mq_wasm.js +114 -81
- package/dist/mq_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/dist/core.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
${
|
|
1
|
+
"use strict";var j=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var C=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{for(var e in t)j(n,e,{get:t[e],enumerable:!0})},$=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of B(t))!q.call(n,o)&&o!==e&&j(n,o,{get:()=>t[o],enumerable:!(r=L(t,o))||r.enumerable});return n};var N=n=>$(j({},"__esModule",{value:!0}),n);var z={};P(z,{ConversionOptions:()=>h,RunOptions:()=>O,default:()=>R,definedValues:()=>G,diagnostics:()=>J,format:()=>X,htmlToMarkdown:()=>Y,initSync:()=>gt,inlayHints:()=>K,run:()=>Q,toAst:()=>Z,toHtml:()=>tt});function G(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u;var o=w(t)?0:g(t,i.__wbindgen_export,i.__wbindgen_export2),c=u;let a=i.definedValues(e,r,o,c);return b(a)}function J(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=i.diagnostics(e,r,w(t)?16777215:t?1:0);return b(o)}function X(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.format(t,e);return b(r)}function Y(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=0;w(t)||(_t(t,h),o=t.__destroy_into_raw());let c=i.htmlToMarkdown(e,r,o);return b(c)}function K(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.inlayHints(t,e);return b(r)}function Q(n,t,e){let r=g(n,i.__wbindgen_export,i.__wbindgen_export2),o=u,c=g(t,i.__wbindgen_export,i.__wbindgen_export2),a=u,f=i.run(r,o,c,a,s(e));return b(f)}function Z(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toAst(t,e);return b(r)}function tt(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toHtml(t,e);return b(r)}function U(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_83742b46f01ce22d:function(t,e){let r=Error(W(t,e));return s(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(_(e)),o=g(r,i.__wbindgen_export,i.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1:function(t){let e=_(t),r=typeof e=="boolean"?e:void 0;return w(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_5398f5bb970e0daa:function(t,e){let r=I(_(e)),o=g(r,i.__wbindgen_export,i.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,o,!0)},__wbg___wbindgen_in_41dbb8413020e076:function(t,e){return _(t)in _(e)},__wbg___wbindgen_is_function_3c846841762788c1:function(t){return typeof _(t)=="function"},__wbg___wbindgen_is_object_781bc9f159099513:function(t){let e=_(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_7ef6b97b02428fae:function(t){return typeof _(t)=="string"},__wbg___wbindgen_is_undefined_52709e72fb9f179c:function(t){return _(t)===void 0},__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b:function(t,e){return _(t)==_(e)},__wbg___wbindgen_number_get_34bb9d9dcfa21373:function(t,e){let r=_(e),o=typeof r=="number"?r:void 0;d().setFloat64(t+8,w(o)?0:o,!0),d().setInt32(t+0,!w(o),!0)},__wbg___wbindgen_string_get_395e606bd0ee4427:function(t,e){let r=_(e),o=typeof r=="string"?r:void 0;var c=w(o)?0:g(o,i.__wbindgen_export,i.__wbindgen_export2),a=u;d().setInt32(t+4,a,!0),d().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_6ddd609b62940d55:function(t,e){throw new Error(W(t,e))},__wbg__wbg_cb_unref_6b5b6b8576d35cb1:function(t){_(t)._wbg_cb_unref()},__wbg_arrayBuffer_7ff5e58aa85a64f7:function(t){let e=_(t).arrayBuffer();return s(e)},__wbg_call_2d781c1f4d5c0ef8:function(){return E(function(t,e,r){let o=_(t).call(_(e),_(r));return s(o)},arguments)},__wbg_done_08ce71ee07e3bd17:function(t){return _(t).done},__wbg_entries_310f5926c32b5bcb:function(t){let e=_(t).entries();return s(e)},__wbg_entries_e8a20ff8c9757101:function(t){let e=Object.entries(_(t));return s(e)},__wbg_from_4bdf88943703fd48:function(t){let e=Array.from(_(t));return s(e)},__wbg_getDirectory_2406d369de179ff0:function(t){let e=_(t).getDirectory();return s(e)},__wbg_getFile_30341f4730c33225:function(t){let e=_(t).getFile();return s(e)},__wbg_get_a8ee5c45dabc1b3b:function(t,e){let r=_(t)[e>>>0];return s(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=_(t)[_(e)];return s(r)},__wbg_instanceof_ArrayBuffer_101e2bf31071a9f6:function(t){let e;try{e=_(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_FileSystemDirectoryHandle_2944d0641b4ea10c:function(t){let e;try{e=_(t)instanceof FileSystemDirectoryHandle}catch{e=!1}return e},__wbg_instanceof_FileSystemFileHandle_37ac45c6adcff28f:function(t){let e;try{e=_(t)instanceof FileSystemFileHandle}catch{e=!1}return e},__wbg_instanceof_Uint8Array_740438561a5b956d:function(t){let e;try{e=_(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_instanceof_Window_23e677d2c6843922:function(t){let e;try{e=_(t)instanceof Window}catch{e=!1}return e},__wbg_length_b3416cf66a5452c8:function(t){return _(t).length},__wbg_length_ea16607d7b61445b:function(t){return _(t).length},__wbg_navigator_9cebf56f28aa719b:function(t){let e=_(t).navigator;return s(e)},__wbg_new_5f486cdf45a04d78:function(t){let e=new Uint8Array(_(t));return s(e)},__wbg_new_a70fbab9066b301f:function(){let t=new Array;return s(t)},__wbg_new_ab79df5bd7c26067:function(){let t=new Object;return s(t)},__wbg_new_typed_aaaeaf29cf802876:function(t,e){try{var r={a:t,b:e},o=(a,f)=>{let p=r.a;r.a=0;try{return rt(p,r.b,a,f)}finally{r.a=p}};let c=new Promise(o);return s(c)}finally{r.a=r.b=0}},__wbg_next_9c645ba5e1273237:function(){return E(function(t){let e=_(t).next();return s(e)},arguments)},__wbg_prototypesetcall_d62e5099504357e6:function(t,e,r){Uint8Array.prototype.set.call(ct(t,e),_(r))},__wbg_queueMicrotask_0c399741342fb10f:function(t){let e=_(t).queueMicrotask;return s(e)},__wbg_queueMicrotask_a082d78ce798393e:function(t){queueMicrotask(_(t))},__wbg_resolve_ae8d83246e5bcc12:function(t){let e=Promise.resolve(_(t));return s(e)},__wbg_set_282384002438957f:function(t,e,r){_(t)[e>>>0]=b(r)},__wbg_set_6be42768c690e380:function(t,e,r){_(t)[b(e)]=b(r)},__wbg_size_819df95195daae81:function(t){return _(t).size},__wbg_static_accessor_GLOBAL_8adb955bd33fac2f:function(){let t=typeof global>"u"?null:global;return w(t)?0:s(t)},__wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913:function(){let t=typeof globalThis>"u"?null:globalThis;return w(t)?0:s(t)},__wbg_static_accessor_SELF_f207c857566db248:function(){let t=typeof self>"u"?null:self;return w(t)?0:s(t)},__wbg_static_accessor_WINDOW_bb9f1ba69d61b386:function(){let t=typeof window>"u"?null:window;return w(t)?0:s(t)},__wbg_storage_63fa6fa9455d2153:function(t){let e=_(t).storage;return s(e)},__wbg_then_098abe61755d12f6:function(t,e){let r=_(t).then(_(e));return s(r)},__wbg_then_9e335f6dd892bc11:function(t,e,r){let o=_(t).then(_(e),_(r));return s(o)},__wbg_value_21fc78aab0322612:function(t){let e=_(t).value;return s(e)},__wbindgen_cast_0000000000000001:function(t,e){let r=H(t,e,i.__wasm_bindgen_func_elem_135,nt);return s(r)},__wbindgen_cast_0000000000000002:function(t,e){let r=H(t,e,i.__wasm_bindgen_func_elem_135,et);return s(r)},__wbindgen_cast_0000000000000003:function(t){return s(t)},__wbindgen_cast_0000000000000004:function(t,e){let r=W(t,e);return s(r)},__wbindgen_object_clone_ref:function(t){let e=_(t);return s(e)},__wbindgen_object_drop_ref:function(t){b(t)}}}}function nt(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_136(c,n,t,s(e));var r=d().getInt32(c+0,!0),o=d().getInt32(c+4,!0);if(o)throw b(r)}finally{i.__wbindgen_add_to_stack_pointer(16)}}function et(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_136_1(c,n,t,s(e));var r=d().getInt32(c+0,!0),o=d().getInt32(c+4,!0);if(o)throw b(r)}finally{i.__wbindgen_add_to_stack_pointer(16)}}function rt(n,t,e,r){i.__wasm_bindgen_func_elem_967(n,t,s(e),s(r))}function s(n){F===l.length&&l.push(l.length+1);let t=F;return F=l[t],l[t]=n,t}function _t(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function I(n){let t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,c="[";o>0&&(c+=I(n[0]));for(let a=1;a<o;a++)c+=", "+I(n[a]);return c+="]",c}let e=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
|
2
|
+
${n.stack}`:r}function st(n){n<1028||(l[n]=F,F=n)}function ct(n,t){return n=n>>>0,A().subarray(n/1,n/1+t)}function d(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==i.memory.buffer)&&(y=new DataView(i.memory.buffer)),y}function W(n,t){return n=n>>>0,ft(n,t)}function A(){return(x===null||x.byteLength===0)&&(x=new Uint8Array(i.memory.buffer)),x}function _(n){return l[n]}function E(n,t){try{return n.apply(this,t)}catch(e){i.__wbindgen_export3(s(e))}}function w(n){return n==null}function H(n,t,e,r){let o={a:n,b:t,cnt:1,dtor:e},c=(...a)=>{o.cnt++;let f=o.a;o.a=0;try{return r(f,o.b,...a)}finally{o.a=f,c._wbg_cb_unref()}};return c._wbg_cb_unref=()=>{--o.cnt===0&&(o.dtor(o.a,o.b),o.a=0,v.unregister(o))},v.register(c,o,o),c}function g(n,t,e){if(e===void 0){let f=S.encode(n),p=t(f.length,1)>>>0;return A().subarray(p,p+f.length).set(f),u=f.length,p}let r=n.length,o=t(r,1)>>>0,c=A(),a=0;for(;a<r;a++){let f=n.charCodeAt(a);if(f>127)break;c[o+a]=f}if(a!==r){a!==0&&(n=n.slice(a)),o=e(o,r,r=a+n.length*3,1)>>>0;let f=A().subarray(o+a,o+r),p=S.encodeInto(n,f);a+=p.written,o=e(o,r,a,1)>>>0}return u=a,o}function b(n){let t=_(n);return st(n),t}function ft(n,t){return T+=t,T>=at&&(M=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),M.decode(),T=t),M.decode(A().subarray(n,n+t))}function V(n,t){return i=n.exports,ut=t,y=null,x=null,i}async function bt(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(o){if(n.ok&&e(n.type)&&n.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",o);else throw o}let r=await n.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let r=await WebAssembly.instantiate(n,t);return r instanceof WebAssembly.Instance?{instance:r,module:n}:r}function e(r){switch(r){case"basic":case"cors":case"default":return!0}return!1}}function gt(n){if(i!==void 0)return i;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=U();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let e=new WebAssembly.Instance(n,t);return V(e,n)}async function R(n){if(i!==void 0)return i;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),n===void 0&&(n=new URL("mq_wasm_bg.wasm",dt.url));let t=U();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:e,module:r}=await bt(await n,t);return V(e,r)}var dt,h,O,ot,it,v,y,x,l,F,M,at,T,S,u,ut,i,D=C(()=>{"use strict";dt={},h=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ot.unregister(this),t}free(){let t=this.__destroy_into_raw();i.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return i.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return i.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return i.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){i.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){i.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){i.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(h.prototype[Symbol.dispose]=h.prototype.free);O=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,it.unregister(this),t}free(){let t=this.__destroy_into_raw();i.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(O.prototype[Symbol.dispose]=O.prototype.free);ot=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_conversionoptions_free(n>>>0,1)),it=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_runoptions_free(n>>>0,1));v=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));y=null;x=null;l=new Array(1024).fill(void 0);l.push(void 0,null,!0,!1);F=l.length;M=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});M.decode();at=2146435072,T=0;S=new TextEncoder;"encodeInto"in S||(S.encodeInto=function(n,t){let e=S.encode(n);return t.set(e),{read:n.length,written:e.length}});u=0});var At={};P(At,{definedValues:()=>mt,diagnostics:()=>yt,format:()=>pt,htmlToMarkdown:()=>ht,run:()=>wt,toAst:()=>lt,toHtml:()=>xt});module.exports=N(At);D();var k=null;async function m(){return k||(await(async()=>{try{await R();let n=await Promise.resolve().then(()=>(D(),z));k={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,definedValues:n.definedValues,htmlToMarkdown:n.htmlToMarkdown,toHtml:n.toHtml}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),k)}async function wt(n,t,e={}){return await(await m()).run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function lt(n){return await(await m()).toAst(n)}async function pt(n){return await(await m()).format(n)}async function yt(n){return await(await m()).diagnostics(n)}async function mt(n,t){return await(await m()).definedValues(n,t)}async function ht(n,t){return await(await m()).htmlToMarkdown(n,t)}async function xt(n){return await(await m()).toHtml(n)}0&&(module.exports={definedValues,diagnostics,format,htmlToMarkdown,run,toAst,toHtml});
|
package/dist/core.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var V=Object.defineProperty;var z=(
|
|
2
|
-
${
|
|
1
|
+
var V=Object.defineProperty;var z=(n,t)=>()=>(n&&(t=n(n=0)),t);var L=(n,t)=>{for(var e in t)V(n,e,{get:t[e],enumerable:!0})};var U={};L(U,{ConversionOptions:()=>h,RunOptions:()=>O,default:()=>I,definedValues:()=>B,diagnostics:()=>q,format:()=>C,htmlToMarkdown:()=>$,initSync:()=>ct,inlayHints:()=>N,run:()=>G,toAst:()=>J,toHtml:()=>X});function B(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u;var o=w(t)?0:g(t,i.__wbindgen_export,i.__wbindgen_export2),c=u;let a=i.definedValues(e,r,o,c);return b(a)}function q(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=i.diagnostics(e,r,w(t)?16777215:t?1:0);return b(o)}function C(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.format(t,e);return b(r)}function $(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=0;w(t)||(nt(t,h),o=t.__destroy_into_raw());let c=i.htmlToMarkdown(e,r,o);return b(c)}function N(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.inlayHints(t,e);return b(r)}function G(n,t,e){let r=g(n,i.__wbindgen_export,i.__wbindgen_export2),o=u,c=g(t,i.__wbindgen_export,i.__wbindgen_export2),a=u,f=i.run(r,o,c,a,s(e));return b(f)}function J(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toAst(t,e);return b(r)}function X(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toHtml(t,e);return b(r)}function E(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_83742b46f01ce22d:function(t,e){let r=Error(j(t,e));return s(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(_(e)),o=g(r,i.__wbindgen_export,i.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1:function(t){let e=_(t),r=typeof e=="boolean"?e:void 0;return w(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_5398f5bb970e0daa:function(t,e){let r=T(_(e)),o=g(r,i.__wbindgen_export,i.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,o,!0)},__wbg___wbindgen_in_41dbb8413020e076:function(t,e){return _(t)in _(e)},__wbg___wbindgen_is_function_3c846841762788c1:function(t){return typeof _(t)=="function"},__wbg___wbindgen_is_object_781bc9f159099513:function(t){let e=_(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_7ef6b97b02428fae:function(t){return typeof _(t)=="string"},__wbg___wbindgen_is_undefined_52709e72fb9f179c:function(t){return _(t)===void 0},__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b:function(t,e){return _(t)==_(e)},__wbg___wbindgen_number_get_34bb9d9dcfa21373:function(t,e){let r=_(e),o=typeof r=="number"?r:void 0;d().setFloat64(t+8,w(o)?0:o,!0),d().setInt32(t+0,!w(o),!0)},__wbg___wbindgen_string_get_395e606bd0ee4427:function(t,e){let r=_(e),o=typeof r=="string"?r:void 0;var c=w(o)?0:g(o,i.__wbindgen_export,i.__wbindgen_export2),a=u;d().setInt32(t+4,a,!0),d().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_6ddd609b62940d55:function(t,e){throw new Error(j(t,e))},__wbg__wbg_cb_unref_6b5b6b8576d35cb1:function(t){_(t)._wbg_cb_unref()},__wbg_arrayBuffer_7ff5e58aa85a64f7:function(t){let e=_(t).arrayBuffer();return s(e)},__wbg_call_2d781c1f4d5c0ef8:function(){return P(function(t,e,r){let o=_(t).call(_(e),_(r));return s(o)},arguments)},__wbg_done_08ce71ee07e3bd17:function(t){return _(t).done},__wbg_entries_310f5926c32b5bcb:function(t){let e=_(t).entries();return s(e)},__wbg_entries_e8a20ff8c9757101:function(t){let e=Object.entries(_(t));return s(e)},__wbg_from_4bdf88943703fd48:function(t){let e=Array.from(_(t));return s(e)},__wbg_getDirectory_2406d369de179ff0:function(t){let e=_(t).getDirectory();return s(e)},__wbg_getFile_30341f4730c33225:function(t){let e=_(t).getFile();return s(e)},__wbg_get_a8ee5c45dabc1b3b:function(t,e){let r=_(t)[e>>>0];return s(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=_(t)[_(e)];return s(r)},__wbg_instanceof_ArrayBuffer_101e2bf31071a9f6:function(t){let e;try{e=_(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_FileSystemDirectoryHandle_2944d0641b4ea10c:function(t){let e;try{e=_(t)instanceof FileSystemDirectoryHandle}catch{e=!1}return e},__wbg_instanceof_FileSystemFileHandle_37ac45c6adcff28f:function(t){let e;try{e=_(t)instanceof FileSystemFileHandle}catch{e=!1}return e},__wbg_instanceof_Uint8Array_740438561a5b956d:function(t){let e;try{e=_(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_instanceof_Window_23e677d2c6843922:function(t){let e;try{e=_(t)instanceof Window}catch{e=!1}return e},__wbg_length_b3416cf66a5452c8:function(t){return _(t).length},__wbg_length_ea16607d7b61445b:function(t){return _(t).length},__wbg_navigator_9cebf56f28aa719b:function(t){let e=_(t).navigator;return s(e)},__wbg_new_5f486cdf45a04d78:function(t){let e=new Uint8Array(_(t));return s(e)},__wbg_new_a70fbab9066b301f:function(){let t=new Array;return s(t)},__wbg_new_ab79df5bd7c26067:function(){let t=new Object;return s(t)},__wbg_new_typed_aaaeaf29cf802876:function(t,e){try{var r={a:t,b:e},o=(a,f)=>{let p=r.a;r.a=0;try{return Q(p,r.b,a,f)}finally{r.a=p}};let c=new Promise(o);return s(c)}finally{r.a=r.b=0}},__wbg_next_9c645ba5e1273237:function(){return P(function(t){let e=_(t).next();return s(e)},arguments)},__wbg_prototypesetcall_d62e5099504357e6:function(t,e,r){Uint8Array.prototype.set.call(rt(t,e),_(r))},__wbg_queueMicrotask_0c399741342fb10f:function(t){let e=_(t).queueMicrotask;return s(e)},__wbg_queueMicrotask_a082d78ce798393e:function(t){queueMicrotask(_(t))},__wbg_resolve_ae8d83246e5bcc12:function(t){let e=Promise.resolve(_(t));return s(e)},__wbg_set_282384002438957f:function(t,e,r){_(t)[e>>>0]=b(r)},__wbg_set_6be42768c690e380:function(t,e,r){_(t)[b(e)]=b(r)},__wbg_size_819df95195daae81:function(t){return _(t).size},__wbg_static_accessor_GLOBAL_8adb955bd33fac2f:function(){let t=typeof global>"u"?null:global;return w(t)?0:s(t)},__wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913:function(){let t=typeof globalThis>"u"?null:globalThis;return w(t)?0:s(t)},__wbg_static_accessor_SELF_f207c857566db248:function(){let t=typeof self>"u"?null:self;return w(t)?0:s(t)},__wbg_static_accessor_WINDOW_bb9f1ba69d61b386:function(){let t=typeof window>"u"?null:window;return w(t)?0:s(t)},__wbg_storage_63fa6fa9455d2153:function(t){let e=_(t).storage;return s(e)},__wbg_then_098abe61755d12f6:function(t,e){let r=_(t).then(_(e));return s(r)},__wbg_then_9e335f6dd892bc11:function(t,e,r){let o=_(t).then(_(e),_(r));return s(o)},__wbg_value_21fc78aab0322612:function(t){let e=_(t).value;return s(e)},__wbindgen_cast_0000000000000001:function(t,e){let r=v(t,e,i.__wasm_bindgen_func_elem_135,Y);return s(r)},__wbindgen_cast_0000000000000002:function(t,e){let r=v(t,e,i.__wasm_bindgen_func_elem_135,K);return s(r)},__wbindgen_cast_0000000000000003:function(t){return s(t)},__wbindgen_cast_0000000000000004:function(t,e){let r=j(t,e);return s(r)},__wbindgen_object_clone_ref:function(t){let e=_(t);return s(e)},__wbindgen_object_drop_ref:function(t){b(t)}}}}function Y(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_136(c,n,t,s(e));var r=d().getInt32(c+0,!0),o=d().getInt32(c+4,!0);if(o)throw b(r)}finally{i.__wbindgen_add_to_stack_pointer(16)}}function K(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_136_1(c,n,t,s(e));var r=d().getInt32(c+0,!0),o=d().getInt32(c+4,!0);if(o)throw b(r)}finally{i.__wbindgen_add_to_stack_pointer(16)}}function Q(n,t,e,r){i.__wasm_bindgen_func_elem_967(n,t,s(e),s(r))}function s(n){F===l.length&&l.push(l.length+1);let t=F;return F=l[t],l[t]=n,t}function nt(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function T(n){let t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,c="[";o>0&&(c+=T(n[0]));for(let a=1;a<o;a++)c+=", "+T(n[a]);return c+="]",c}let e=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
|
2
|
+
${n.stack}`:r}function et(n){n<1028||(l[n]=F,F=n)}function rt(n,t){return n=n>>>0,A().subarray(n/1,n/1+t)}function d(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==i.memory.buffer)&&(y=new DataView(i.memory.buffer)),y}function j(n,t){return n=n>>>0,it(n,t)}function A(){return(x===null||x.byteLength===0)&&(x=new Uint8Array(i.memory.buffer)),x}function _(n){return l[n]}function P(n,t){try{return n.apply(this,t)}catch(e){i.__wbindgen_export3(s(e))}}function w(n){return n==null}function v(n,t,e,r){let o={a:n,b:t,cnt:1,dtor:e},c=(...a)=>{o.cnt++;let f=o.a;o.a=0;try{return r(f,o.b,...a)}finally{o.a=f,c._wbg_cb_unref()}};return c._wbg_cb_unref=()=>{--o.cnt===0&&(o.dtor(o.a,o.b),o.a=0,D.unregister(o))},D.register(c,o,o),c}function g(n,t,e){if(e===void 0){let f=S.encode(n),p=t(f.length,1)>>>0;return A().subarray(p,p+f.length).set(f),u=f.length,p}let r=n.length,o=t(r,1)>>>0,c=A(),a=0;for(;a<r;a++){let f=n.charCodeAt(a);if(f>127)break;c[o+a]=f}if(a!==r){a!==0&&(n=n.slice(a)),o=e(o,r,r=a+n.length*3,1)>>>0;let f=A().subarray(o+a,o+r),p=S.encodeInto(n,f);a+=p.written,o=e(o,r,a,1)>>>0}return u=a,o}function b(n){let t=_(n);return et(n),t}function it(n,t){return W+=t,W>=ot&&(M=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),M.decode(),W=t),M.decode(A().subarray(n,n+t))}function H(n,t){return i=n.exports,_t=t,y=null,x=null,i}async function st(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(o){if(n.ok&&e(n.type)&&n.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",o);else throw o}let r=await n.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let r=await WebAssembly.instantiate(n,t);return r instanceof WebAssembly.Instance?{instance:r,module:n}:r}function e(r){switch(r){case"basic":case"cors":case"default":return!0}return!1}}function ct(n){if(i!==void 0)return i;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=E();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let e=new WebAssembly.Instance(n,t);return H(e,n)}async function I(n){if(i!==void 0)return i;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),n===void 0&&(n=new URL("mq_wasm_bg.wasm",import.meta.url));let t=E();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:e,module:r}=await st(await n,t);return H(e,r)}var h,O,Z,tt,D,y,x,l,F,M,ot,W,S,u,_t,i,R=z(()=>{"use strict";h=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),t}free(){let t=this.__destroy_into_raw();i.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return i.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return i.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return i.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){i.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){i.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){i.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(h.prototype[Symbol.dispose]=h.prototype.free);O=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,tt.unregister(this),t}free(){let t=this.__destroy_into_raw();i.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(O.prototype[Symbol.dispose]=O.prototype.free);Z=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_conversionoptions_free(n>>>0,1)),tt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_runoptions_free(n>>>0,1));D=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));y=null;x=null;l=new Array(1024).fill(void 0);l.push(void 0,null,!0,!1);F=l.length;M=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});M.decode();ot=2146435072,W=0;S=new TextEncoder;"encodeInto"in S||(S.encodeInto=function(n,t){let e=S.encode(n);return t.set(e),{read:n.length,written:e.length}});u=0});R();var k=null;async function m(){return k||(await(async()=>{try{await I();let n=await Promise.resolve().then(()=>(R(),U));k={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,definedValues:n.definedValues,htmlToMarkdown:n.htmlToMarkdown,toHtml:n.toHtml}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),k)}async function wt(n,t,e={}){return await(await m()).run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function lt(n){return await(await m()).toAst(n)}async function pt(n){return await(await m()).format(n)}async function yt(n){return await(await m()).diagnostics(n)}async function mt(n,t){return await(await m()).definedValues(n,t)}async function ht(n,t){return await(await m()).htmlToMarkdown(n,t)}async function xt(n){return await(await m()).toHtml(n)}export{mt as definedValues,yt as diagnostics,pt as format,ht as htmlToMarkdown,wt as run,lt as toAst,xt as toHtml};
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
${
|
|
1
|
+
"use strict";var j=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var J=Object.prototype.hasOwnProperty;var X=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{for(var e in t)j(n,e,{get:t[e],enumerable:!0})},Y=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of G(t))!J.call(n,o)&&o!==e&&j(n,o,{get:()=>t[o],enumerable:!(r=N(t,o))||r.enumerable});return n};var K=n=>Y(j({},"__esModule",{value:!0}),n);var z={};P(z,{ConversionOptions:()=>m,RunOptions:()=>O,default:()=>I,definedValues:()=>Q,diagnostics:()=>Z,format:()=>tt,htmlToMarkdown:()=>nt,initSync:()=>yt,inlayHints:()=>et,run:()=>rt,toAst:()=>ot,toHtml:()=>it});function Q(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u;var o=w(t)?0:g(t,i.__wbindgen_export,i.__wbindgen_export2),c=u;let a=i.definedValues(e,r,o,c);return b(a)}function Z(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=i.diagnostics(e,r,w(t)?16777215:t?1:0);return b(o)}function tt(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.format(t,e);return b(r)}function nt(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=0;w(t)||(ut(t,m),o=t.__destroy_into_raw());let c=i.htmlToMarkdown(e,r,o);return b(c)}function et(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.inlayHints(t,e);return b(r)}function rt(n,t,e){let r=g(n,i.__wbindgen_export,i.__wbindgen_export2),o=u,c=g(t,i.__wbindgen_export,i.__wbindgen_export2),a=u,f=i.run(r,o,c,a,s(e));return b(f)}function ot(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toAst(t,e);return b(r)}function it(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toHtml(t,e);return b(r)}function H(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_83742b46f01ce22d:function(t,e){let r=Error(D(t,e));return s(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(_(e)),o=g(r,i.__wbindgen_export,i.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1:function(t){let e=_(t),r=typeof e=="boolean"?e:void 0;return w(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_5398f5bb970e0daa:function(t,e){let r=W(_(e)),o=g(r,i.__wbindgen_export,i.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,o,!0)},__wbg___wbindgen_in_41dbb8413020e076:function(t,e){return _(t)in _(e)},__wbg___wbindgen_is_function_3c846841762788c1:function(t){return typeof _(t)=="function"},__wbg___wbindgen_is_object_781bc9f159099513:function(t){let e=_(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_7ef6b97b02428fae:function(t){return typeof _(t)=="string"},__wbg___wbindgen_is_undefined_52709e72fb9f179c:function(t){return _(t)===void 0},__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b:function(t,e){return _(t)==_(e)},__wbg___wbindgen_number_get_34bb9d9dcfa21373:function(t,e){let r=_(e),o=typeof r=="number"?r:void 0;d().setFloat64(t+8,w(o)?0:o,!0),d().setInt32(t+0,!w(o),!0)},__wbg___wbindgen_string_get_395e606bd0ee4427:function(t,e){let r=_(e),o=typeof r=="string"?r:void 0;var c=w(o)?0:g(o,i.__wbindgen_export,i.__wbindgen_export2),a=u;d().setInt32(t+4,a,!0),d().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_6ddd609b62940d55:function(t,e){throw new Error(D(t,e))},__wbg__wbg_cb_unref_6b5b6b8576d35cb1:function(t){_(t)._wbg_cb_unref()},__wbg_arrayBuffer_7ff5e58aa85a64f7:function(t){let e=_(t).arrayBuffer();return s(e)},__wbg_call_2d781c1f4d5c0ef8:function(){return E(function(t,e,r){let o=_(t).call(_(e),_(r));return s(o)},arguments)},__wbg_done_08ce71ee07e3bd17:function(t){return _(t).done},__wbg_entries_310f5926c32b5bcb:function(t){let e=_(t).entries();return s(e)},__wbg_entries_e8a20ff8c9757101:function(t){let e=Object.entries(_(t));return s(e)},__wbg_from_4bdf88943703fd48:function(t){let e=Array.from(_(t));return s(e)},__wbg_getDirectory_2406d369de179ff0:function(t){let e=_(t).getDirectory();return s(e)},__wbg_getFile_30341f4730c33225:function(t){let e=_(t).getFile();return s(e)},__wbg_get_a8ee5c45dabc1b3b:function(t,e){let r=_(t)[e>>>0];return s(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=_(t)[_(e)];return s(r)},__wbg_instanceof_ArrayBuffer_101e2bf31071a9f6:function(t){let e;try{e=_(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_FileSystemDirectoryHandle_2944d0641b4ea10c:function(t){let e;try{e=_(t)instanceof FileSystemDirectoryHandle}catch{e=!1}return e},__wbg_instanceof_FileSystemFileHandle_37ac45c6adcff28f:function(t){let e;try{e=_(t)instanceof FileSystemFileHandle}catch{e=!1}return e},__wbg_instanceof_Uint8Array_740438561a5b956d:function(t){let e;try{e=_(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_instanceof_Window_23e677d2c6843922:function(t){let e;try{e=_(t)instanceof Window}catch{e=!1}return e},__wbg_length_b3416cf66a5452c8:function(t){return _(t).length},__wbg_length_ea16607d7b61445b:function(t){return _(t).length},__wbg_navigator_9cebf56f28aa719b:function(t){let e=_(t).navigator;return s(e)},__wbg_new_5f486cdf45a04d78:function(t){let e=new Uint8Array(_(t));return s(e)},__wbg_new_a70fbab9066b301f:function(){let t=new Array;return s(t)},__wbg_new_ab79df5bd7c26067:function(){let t=new Object;return s(t)},__wbg_new_typed_aaaeaf29cf802876:function(t,e){try{var r={a:t,b:e},o=(a,f)=>{let p=r.a;r.a=0;try{return ct(p,r.b,a,f)}finally{r.a=p}};let c=new Promise(o);return s(c)}finally{r.a=r.b=0}},__wbg_next_9c645ba5e1273237:function(){return E(function(t){let e=_(t).next();return s(e)},arguments)},__wbg_prototypesetcall_d62e5099504357e6:function(t,e,r){Uint8Array.prototype.set.call(gt(t,e),_(r))},__wbg_queueMicrotask_0c399741342fb10f:function(t){let e=_(t).queueMicrotask;return s(e)},__wbg_queueMicrotask_a082d78ce798393e:function(t){queueMicrotask(_(t))},__wbg_resolve_ae8d83246e5bcc12:function(t){let e=Promise.resolve(_(t));return s(e)},__wbg_set_282384002438957f:function(t,e,r){_(t)[e>>>0]=b(r)},__wbg_set_6be42768c690e380:function(t,e,r){_(t)[b(e)]=b(r)},__wbg_size_819df95195daae81:function(t){return _(t).size},__wbg_static_accessor_GLOBAL_8adb955bd33fac2f:function(){let t=typeof global>"u"?null:global;return w(t)?0:s(t)},__wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913:function(){let t=typeof globalThis>"u"?null:globalThis;return w(t)?0:s(t)},__wbg_static_accessor_SELF_f207c857566db248:function(){let t=typeof self>"u"?null:self;return w(t)?0:s(t)},__wbg_static_accessor_WINDOW_bb9f1ba69d61b386:function(){let t=typeof window>"u"?null:window;return w(t)?0:s(t)},__wbg_storage_63fa6fa9455d2153:function(t){let e=_(t).storage;return s(e)},__wbg_then_098abe61755d12f6:function(t,e){let r=_(t).then(_(e));return s(r)},__wbg_then_9e335f6dd892bc11:function(t,e,r){let o=_(t).then(_(e),_(r));return s(o)},__wbg_value_21fc78aab0322612:function(t){let e=_(t).value;return s(e)},__wbindgen_cast_0000000000000001:function(t,e){let r=V(t,e,i.__wasm_bindgen_func_elem_135,_t);return s(r)},__wbindgen_cast_0000000000000002:function(t,e){let r=V(t,e,i.__wasm_bindgen_func_elem_135,st);return s(r)},__wbindgen_cast_0000000000000003:function(t){return s(t)},__wbindgen_cast_0000000000000004:function(t,e){let r=D(t,e);return s(r)},__wbindgen_object_clone_ref:function(t){let e=_(t);return s(e)},__wbindgen_object_drop_ref:function(t){b(t)}}}}function _t(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_136(c,n,t,s(e));var r=d().getInt32(c+0,!0),o=d().getInt32(c+4,!0);if(o)throw b(r)}finally{i.__wbindgen_add_to_stack_pointer(16)}}function st(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_136_1(c,n,t,s(e));var r=d().getInt32(c+0,!0),o=d().getInt32(c+4,!0);if(o)throw b(r)}finally{i.__wbindgen_add_to_stack_pointer(16)}}function ct(n,t,e,r){i.__wasm_bindgen_func_elem_967(n,t,s(e),s(r))}function s(n){A===l.length&&l.push(l.length+1);let t=A;return A=l[t],l[t]=n,t}function ut(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function W(n){let t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,c="[";o>0&&(c+=W(n[0]));for(let a=1;a<o;a++)c+=", "+W(n[a]);return c+="]",c}let e=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
|
2
|
+
${n.stack}`:r}function bt(n){n<1028||(l[n]=A,A=n)}function gt(n,t){return n=n>>>0,x().subarray(n/1,n/1+t)}function d(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==i.memory.buffer)&&(y=new DataView(i.memory.buffer)),y}function D(n,t){return n=n>>>0,wt(n,t)}function x(){return(h===null||h.byteLength===0)&&(h=new Uint8Array(i.memory.buffer)),h}function _(n){return l[n]}function E(n,t){try{return n.apply(this,t)}catch(e){i.__wbindgen_export3(s(e))}}function w(n){return n==null}function V(n,t,e,r){let o={a:n,b:t,cnt:1,dtor:e},c=(...a)=>{o.cnt++;let f=o.a;o.a=0;try{return r(f,o.b,...a)}finally{o.a=f,c._wbg_cb_unref()}};return c._wbg_cb_unref=()=>{--o.cnt===0&&(o.dtor(o.a,o.b),o.a=0,v.unregister(o))},v.register(c,o,o),c}function g(n,t,e){if(e===void 0){let f=F.encode(n),p=t(f.length,1)>>>0;return x().subarray(p,p+f.length).set(f),u=f.length,p}let r=n.length,o=t(r,1)>>>0,c=x(),a=0;for(;a<r;a++){let f=n.charCodeAt(a);if(f>127)break;c[o+a]=f}if(a!==r){a!==0&&(n=n.slice(a)),o=e(o,r,r=a+n.length*3,1)>>>0;let f=x().subarray(o+a,o+r),p=F.encodeInto(n,f);a+=p.written,o=e(o,r,a,1)>>>0}return u=a,o}function b(n){let t=_(n);return bt(n),t}function wt(n,t){return T+=t,T>=dt&&(M=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),M.decode(),T=t),M.decode(x().subarray(n,n+t))}function U(n,t){return i=n.exports,lt=t,y=null,h=null,i}async function pt(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(o){if(n.ok&&e(n.type)&&n.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",o);else throw o}let r=await n.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let r=await WebAssembly.instantiate(n,t);return r instanceof WebAssembly.Instance?{instance:r,module:n}:r}function e(r){switch(r){case"basic":case"cors":case"default":return!0}return!1}}function yt(n){if(i!==void 0)return i;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=H();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let e=new WebAssembly.Instance(n,t);return U(e,n)}async function I(n){if(i!==void 0)return i;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),n===void 0&&(n=new URL("mq_wasm_bg.wasm",mt.url));let t=H();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:e,module:r}=await pt(await n,t);return U(e,r)}var mt,m,O,at,ft,v,y,h,l,A,M,dt,T,F,u,lt,i,R=X(()=>{"use strict";mt={},m=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,at.unregister(this),t}free(){let t=this.__destroy_into_raw();i.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return i.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return i.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return i.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){i.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){i.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){i.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(m.prototype[Symbol.dispose]=m.prototype.free);O=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ft.unregister(this),t}free(){let t=this.__destroy_into_raw();i.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(O.prototype[Symbol.dispose]=O.prototype.free);at=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_conversionoptions_free(n>>>0,1)),ft=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_runoptions_free(n>>>0,1));v=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));y=null;h=null;l=new Array(1024).fill(void 0);l.push(void 0,null,!0,!1);A=l.length;M=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});M.decode();dt=2146435072,T=0;F=new TextEncoder;"encodeInto"in F||(F.encodeInto=function(n,t){let e=F.encode(n);return t.set(e),{read:n.length,written:e.length}});u=0});var ht={};P(ht,{definedValues:()=>$,diagnostics:()=>C,format:()=>B,run:()=>q,toAst:()=>L});module.exports=K(ht);R();var k=null;async function S(){return k||(await(async()=>{try{await I();let n=await Promise.resolve().then(()=>(R(),z));k={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,definedValues:n.definedValues,htmlToMarkdown:n.htmlToMarkdown,toHtml:n.toHtml}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),k)}async function q(n,t,e={}){return await(await S()).run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function L(n){return await(await S()).toAst(n)}async function B(n){return await(await S()).format(n)}async function C(n){return await(await S()).diagnostics(n)}async function $(n,t){return await(await S()).definedValues(n,t)}0&&(module.exports={definedValues,diagnostics,format,run,toAst});
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var U=Object.defineProperty;var z=(
|
|
2
|
-
${
|
|
1
|
+
var U=Object.defineProperty;var z=(n,t)=>()=>(n&&(t=n(n=0)),t);var q=(n,t)=>{for(var e in t)U(n,e,{get:t[e],enumerable:!0})};var H={};q(H,{ConversionOptions:()=>m,RunOptions:()=>O,default:()=>W,definedValues:()=>L,diagnostics:()=>B,format:()=>C,htmlToMarkdown:()=>$,initSync:()=>ct,inlayHints:()=>N,run:()=>G,toAst:()=>J,toHtml:()=>X});function L(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u;var o=w(t)?0:g(t,i.__wbindgen_export,i.__wbindgen_export2),c=u;let a=i.definedValues(e,r,o,c);return b(a)}function B(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=i.diagnostics(e,r,w(t)?16777215:t?1:0);return b(o)}function C(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.format(t,e);return b(r)}function $(n,t){let e=g(n,i.__wbindgen_export,i.__wbindgen_export2),r=u,o=0;w(t)||(nt(t,m),o=t.__destroy_into_raw());let c=i.htmlToMarkdown(e,r,o);return b(c)}function N(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.inlayHints(t,e);return b(r)}function G(n,t,e){let r=g(n,i.__wbindgen_export,i.__wbindgen_export2),o=u,c=g(t,i.__wbindgen_export,i.__wbindgen_export2),a=u,f=i.run(r,o,c,a,s(e));return b(f)}function J(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toAst(t,e);return b(r)}function X(n){let t=g(n,i.__wbindgen_export,i.__wbindgen_export2),e=u,r=i.toHtml(t,e);return b(r)}function E(){return{__proto__:null,"./mq_wasm_bg.js":{__proto__:null,__wbg_Error_83742b46f01ce22d:function(t,e){let r=Error(j(t,e));return s(r)},__wbg_String_8564e559799eccda:function(t,e){let r=String(_(e)),o=g(r,i.__wbindgen_export,i.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,o,!0)},__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1:function(t){let e=_(t),r=typeof e=="boolean"?e:void 0;return w(r)?16777215:r?1:0},__wbg___wbindgen_debug_string_5398f5bb970e0daa:function(t,e){let r=T(_(e)),o=g(r,i.__wbindgen_export,i.__wbindgen_export2),c=u;d().setInt32(t+4,c,!0),d().setInt32(t+0,o,!0)},__wbg___wbindgen_in_41dbb8413020e076:function(t,e){return _(t)in _(e)},__wbg___wbindgen_is_function_3c846841762788c1:function(t){return typeof _(t)=="function"},__wbg___wbindgen_is_object_781bc9f159099513:function(t){let e=_(t);return typeof e=="object"&&e!==null},__wbg___wbindgen_is_string_7ef6b97b02428fae:function(t){return typeof _(t)=="string"},__wbg___wbindgen_is_undefined_52709e72fb9f179c:function(t){return _(t)===void 0},__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b:function(t,e){return _(t)==_(e)},__wbg___wbindgen_number_get_34bb9d9dcfa21373:function(t,e){let r=_(e),o=typeof r=="number"?r:void 0;d().setFloat64(t+8,w(o)?0:o,!0),d().setInt32(t+0,!w(o),!0)},__wbg___wbindgen_string_get_395e606bd0ee4427:function(t,e){let r=_(e),o=typeof r=="string"?r:void 0;var c=w(o)?0:g(o,i.__wbindgen_export,i.__wbindgen_export2),a=u;d().setInt32(t+4,a,!0),d().setInt32(t+0,c,!0)},__wbg___wbindgen_throw_6ddd609b62940d55:function(t,e){throw new Error(j(t,e))},__wbg__wbg_cb_unref_6b5b6b8576d35cb1:function(t){_(t)._wbg_cb_unref()},__wbg_arrayBuffer_7ff5e58aa85a64f7:function(t){let e=_(t).arrayBuffer();return s(e)},__wbg_call_2d781c1f4d5c0ef8:function(){return P(function(t,e,r){let o=_(t).call(_(e),_(r));return s(o)},arguments)},__wbg_done_08ce71ee07e3bd17:function(t){return _(t).done},__wbg_entries_310f5926c32b5bcb:function(t){let e=_(t).entries();return s(e)},__wbg_entries_e8a20ff8c9757101:function(t){let e=Object.entries(_(t));return s(e)},__wbg_from_4bdf88943703fd48:function(t){let e=Array.from(_(t));return s(e)},__wbg_getDirectory_2406d369de179ff0:function(t){let e=_(t).getDirectory();return s(e)},__wbg_getFile_30341f4730c33225:function(t){let e=_(t).getFile();return s(e)},__wbg_get_a8ee5c45dabc1b3b:function(t,e){let r=_(t)[e>>>0];return s(r)},__wbg_get_with_ref_key_6412cf3094599694:function(t,e){let r=_(t)[_(e)];return s(r)},__wbg_instanceof_ArrayBuffer_101e2bf31071a9f6:function(t){let e;try{e=_(t)instanceof ArrayBuffer}catch{e=!1}return e},__wbg_instanceof_FileSystemDirectoryHandle_2944d0641b4ea10c:function(t){let e;try{e=_(t)instanceof FileSystemDirectoryHandle}catch{e=!1}return e},__wbg_instanceof_FileSystemFileHandle_37ac45c6adcff28f:function(t){let e;try{e=_(t)instanceof FileSystemFileHandle}catch{e=!1}return e},__wbg_instanceof_Uint8Array_740438561a5b956d:function(t){let e;try{e=_(t)instanceof Uint8Array}catch{e=!1}return e},__wbg_instanceof_Window_23e677d2c6843922:function(t){let e;try{e=_(t)instanceof Window}catch{e=!1}return e},__wbg_length_b3416cf66a5452c8:function(t){return _(t).length},__wbg_length_ea16607d7b61445b:function(t){return _(t).length},__wbg_navigator_9cebf56f28aa719b:function(t){let e=_(t).navigator;return s(e)},__wbg_new_5f486cdf45a04d78:function(t){let e=new Uint8Array(_(t));return s(e)},__wbg_new_a70fbab9066b301f:function(){let t=new Array;return s(t)},__wbg_new_ab79df5bd7c26067:function(){let t=new Object;return s(t)},__wbg_new_typed_aaaeaf29cf802876:function(t,e){try{var r={a:t,b:e},o=(a,f)=>{let p=r.a;r.a=0;try{return Q(p,r.b,a,f)}finally{r.a=p}};let c=new Promise(o);return s(c)}finally{r.a=r.b=0}},__wbg_next_9c645ba5e1273237:function(){return P(function(t){let e=_(t).next();return s(e)},arguments)},__wbg_prototypesetcall_d62e5099504357e6:function(t,e,r){Uint8Array.prototype.set.call(rt(t,e),_(r))},__wbg_queueMicrotask_0c399741342fb10f:function(t){let e=_(t).queueMicrotask;return s(e)},__wbg_queueMicrotask_a082d78ce798393e:function(t){queueMicrotask(_(t))},__wbg_resolve_ae8d83246e5bcc12:function(t){let e=Promise.resolve(_(t));return s(e)},__wbg_set_282384002438957f:function(t,e,r){_(t)[e>>>0]=b(r)},__wbg_set_6be42768c690e380:function(t,e,r){_(t)[b(e)]=b(r)},__wbg_size_819df95195daae81:function(t){return _(t).size},__wbg_static_accessor_GLOBAL_8adb955bd33fac2f:function(){let t=typeof global>"u"?null:global;return w(t)?0:s(t)},__wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913:function(){let t=typeof globalThis>"u"?null:globalThis;return w(t)?0:s(t)},__wbg_static_accessor_SELF_f207c857566db248:function(){let t=typeof self>"u"?null:self;return w(t)?0:s(t)},__wbg_static_accessor_WINDOW_bb9f1ba69d61b386:function(){let t=typeof window>"u"?null:window;return w(t)?0:s(t)},__wbg_storage_63fa6fa9455d2153:function(t){let e=_(t).storage;return s(e)},__wbg_then_098abe61755d12f6:function(t,e){let r=_(t).then(_(e));return s(r)},__wbg_then_9e335f6dd892bc11:function(t,e,r){let o=_(t).then(_(e),_(r));return s(o)},__wbg_value_21fc78aab0322612:function(t){let e=_(t).value;return s(e)},__wbindgen_cast_0000000000000001:function(t,e){let r=v(t,e,i.__wasm_bindgen_func_elem_135,Y);return s(r)},__wbindgen_cast_0000000000000002:function(t,e){let r=v(t,e,i.__wasm_bindgen_func_elem_135,K);return s(r)},__wbindgen_cast_0000000000000003:function(t){return s(t)},__wbindgen_cast_0000000000000004:function(t,e){let r=j(t,e);return s(r)},__wbindgen_object_clone_ref:function(t){let e=_(t);return s(e)},__wbindgen_object_drop_ref:function(t){b(t)}}}}function Y(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_136(c,n,t,s(e));var r=d().getInt32(c+0,!0),o=d().getInt32(c+4,!0);if(o)throw b(r)}finally{i.__wbindgen_add_to_stack_pointer(16)}}function K(n,t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16);i.__wasm_bindgen_func_elem_136_1(c,n,t,s(e));var r=d().getInt32(c+0,!0),o=d().getInt32(c+4,!0);if(o)throw b(r)}finally{i.__wbindgen_add_to_stack_pointer(16)}}function Q(n,t,e,r){i.__wasm_bindgen_func_elem_967(n,t,s(e),s(r))}function s(n){A===l.length&&l.push(l.length+1);let t=A;return A=l[t],l[t]=n,t}function nt(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function T(n){let t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){let o=n.description;return o==null?"Symbol":`Symbol(${o})`}if(t=="function"){let o=n.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(n)){let o=n.length,c="[";o>0&&(c+=T(n[0]));for(let a=1;a<o;a++)c+=", "+T(n[a]);return c+="]",c}let e=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
|
2
|
+
${n.stack}`:r}function et(n){n<1028||(l[n]=A,A=n)}function rt(n,t){return n=n>>>0,x().subarray(n/1,n/1+t)}function d(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==i.memory.buffer)&&(y=new DataView(i.memory.buffer)),y}function j(n,t){return n=n>>>0,it(n,t)}function x(){return(h===null||h.byteLength===0)&&(h=new Uint8Array(i.memory.buffer)),h}function _(n){return l[n]}function P(n,t){try{return n.apply(this,t)}catch(e){i.__wbindgen_export3(s(e))}}function w(n){return n==null}function v(n,t,e,r){let o={a:n,b:t,cnt:1,dtor:e},c=(...a)=>{o.cnt++;let f=o.a;o.a=0;try{return r(f,o.b,...a)}finally{o.a=f,c._wbg_cb_unref()}};return c._wbg_cb_unref=()=>{--o.cnt===0&&(o.dtor(o.a,o.b),o.a=0,R.unregister(o))},R.register(c,o,o),c}function g(n,t,e){if(e===void 0){let f=F.encode(n),p=t(f.length,1)>>>0;return x().subarray(p,p+f.length).set(f),u=f.length,p}let r=n.length,o=t(r,1)>>>0,c=x(),a=0;for(;a<r;a++){let f=n.charCodeAt(a);if(f>127)break;c[o+a]=f}if(a!==r){a!==0&&(n=n.slice(a)),o=e(o,r,r=a+n.length*3,1)>>>0;let f=x().subarray(o+a,o+r),p=F.encodeInto(n,f);a+=p.written,o=e(o,r,a,1)>>>0}return u=a,o}function b(n){let t=_(n);return et(n),t}function it(n,t){return D+=t,D>=ot&&(M=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),M.decode(),D=t),M.decode(x().subarray(n,n+t))}function V(n,t){return i=n.exports,_t=t,y=null,h=null,i}async function st(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(o){if(n.ok&&e(n.type)&&n.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",o);else throw o}let r=await n.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let r=await WebAssembly.instantiate(n,t);return r instanceof WebAssembly.Instance?{instance:r,module:n}:r}function e(r){switch(r){case"basic":case"cors":case"default":return!0}return!1}}function ct(n){if(i!==void 0)return i;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module:n}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=E();n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));let e=new WebAssembly.Instance(n,t);return V(e,n)}async function W(n){if(i!==void 0)return i;n!==void 0&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),n===void 0&&(n=new URL("mq_wasm_bg.wasm",import.meta.url));let t=E();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:e,module:r}=await st(await n,t);return V(e,r)}var m,O,Z,tt,R,y,h,l,A,M,ot,D,F,u,_t,i,I=z(()=>{"use strict";m=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),t}free(){let t=this.__destroy_into_raw();i.__wbg_conversionoptions_free(t,0)}get extract_scripts_as_code_blocks(){return i.__wbg_get_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr)!==0}get generate_front_matter(){return i.__wbg_get_conversionoptions_generate_front_matter(this.__wbg_ptr)!==0}get use_title_as_h1(){return i.__wbg_get_conversionoptions_use_title_as_h1(this.__wbg_ptr)!==0}set extract_scripts_as_code_blocks(t){i.__wbg_set_conversionoptions_extract_scripts_as_code_blocks(this.__wbg_ptr,t)}set generate_front_matter(t){i.__wbg_set_conversionoptions_generate_front_matter(this.__wbg_ptr,t)}set use_title_as_h1(t){i.__wbg_set_conversionoptions_use_title_as_h1(this.__wbg_ptr,t)}};Symbol.dispose&&(m.prototype[Symbol.dispose]=m.prototype.free);O=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,tt.unregister(this),t}free(){let t=this.__destroy_into_raw();i.__wbg_runoptions_free(t,0)}};Symbol.dispose&&(O.prototype[Symbol.dispose]=O.prototype.free);Z=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_conversionoptions_free(n>>>0,1)),tt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>i.__wbg_runoptions_free(n>>>0,1));R=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>n.dtor(n.a,n.b));y=null;h=null;l=new Array(1024).fill(void 0);l.push(void 0,null,!0,!1);A=l.length;M=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});M.decode();ot=2146435072,D=0;F=new TextEncoder;"encodeInto"in F||(F.encodeInto=function(n,t){let e=F.encode(n);return t.set(e),{read:n.length,written:e.length}});u=0});I();var k=null;async function S(){return k||(await(async()=>{try{await W();let n=await Promise.resolve().then(()=>(I(),H));k={run:n.run,toAst:n.toAst,format:n.format,diagnostics:n.diagnostics,definedValues:n.definedValues,htmlToMarkdown:n.htmlToMarkdown,toHtml:n.toHtml}}catch(n){throw new Error(`Failed to initialize mq WebAssembly module: ${n}`)}})(),k)}async function at(n,t,e={}){return await(await S()).run(n,t,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...e})}async function ft(n){return await(await S()).toAst(n)}async function ut(n){return await(await S()).format(n)}async function bt(n){return await(await S()).diagnostics(n)}async function gt(n,t){return await(await S()).definedValues(n,t)}export{gt as definedValues,bt as diagnostics,ut as format,at as run,ft as toAst};
|
package/dist/mq_wasm.js
CHANGED
|
@@ -83,12 +83,13 @@ export function definedValues(code, module) {
|
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* @param {string} code
|
|
86
|
+
* @param {boolean | null} [enable_type_check]
|
|
86
87
|
* @returns {Promise<any>}
|
|
87
88
|
*/
|
|
88
|
-
export function diagnostics(code) {
|
|
89
|
+
export function diagnostics(code, enable_type_check) {
|
|
89
90
|
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
90
91
|
const len0 = WASM_VECTOR_LEN;
|
|
91
|
-
const ret = wasm.diagnostics(ptr0, len0);
|
|
92
|
+
const ret = wasm.diagnostics(ptr0, len0, isLikeNone(enable_type_check) ? 0xFFFFFF : enable_type_check ? 1 : 0);
|
|
92
93
|
return takeObject(ret);
|
|
93
94
|
}
|
|
94
95
|
|
|
@@ -120,6 +121,17 @@ export function htmlToMarkdown(html_input, options) {
|
|
|
120
121
|
return takeObject(ret);
|
|
121
122
|
}
|
|
122
123
|
|
|
124
|
+
/**
|
|
125
|
+
* @param {string} code
|
|
126
|
+
* @returns {Promise<any>}
|
|
127
|
+
*/
|
|
128
|
+
export function inlayHints(code) {
|
|
129
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
130
|
+
const len0 = WASM_VECTOR_LEN;
|
|
131
|
+
const ret = wasm.inlayHints(ptr0, len0);
|
|
132
|
+
return takeObject(ret);
|
|
133
|
+
}
|
|
134
|
+
|
|
123
135
|
/**
|
|
124
136
|
* @param {string} code
|
|
125
137
|
* @param {string} content
|
|
@@ -160,61 +172,61 @@ export function toHtml(markdown_input) {
|
|
|
160
172
|
function __wbg_get_imports() {
|
|
161
173
|
const import0 = {
|
|
162
174
|
__proto__: null,
|
|
163
|
-
|
|
175
|
+
__wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
|
|
164
176
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
165
177
|
return addHeapObject(ret);
|
|
166
178
|
},
|
|
167
|
-
|
|
179
|
+
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
168
180
|
const ret = String(getObject(arg1));
|
|
169
181
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
170
182
|
const len1 = WASM_VECTOR_LEN;
|
|
171
183
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
172
184
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
173
185
|
},
|
|
174
|
-
|
|
186
|
+
__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
|
|
175
187
|
const v = getObject(arg0);
|
|
176
188
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
177
189
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
178
190
|
},
|
|
179
|
-
|
|
191
|
+
__wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
|
|
180
192
|
const ret = debugString(getObject(arg1));
|
|
181
193
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
182
194
|
const len1 = WASM_VECTOR_LEN;
|
|
183
195
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
184
196
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
185
197
|
},
|
|
186
|
-
|
|
198
|
+
__wbg___wbindgen_in_41dbb8413020e076: function(arg0, arg1) {
|
|
187
199
|
const ret = getObject(arg0) in getObject(arg1);
|
|
188
200
|
return ret;
|
|
189
201
|
},
|
|
190
|
-
|
|
202
|
+
__wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
|
|
191
203
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
192
204
|
return ret;
|
|
193
205
|
},
|
|
194
|
-
|
|
206
|
+
__wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {
|
|
195
207
|
const val = getObject(arg0);
|
|
196
208
|
const ret = typeof(val) === 'object' && val !== null;
|
|
197
209
|
return ret;
|
|
198
210
|
},
|
|
199
|
-
|
|
211
|
+
__wbg___wbindgen_is_string_7ef6b97b02428fae: function(arg0) {
|
|
200
212
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
201
213
|
return ret;
|
|
202
214
|
},
|
|
203
|
-
|
|
215
|
+
__wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
|
|
204
216
|
const ret = getObject(arg0) === undefined;
|
|
205
217
|
return ret;
|
|
206
218
|
},
|
|
207
|
-
|
|
219
|
+
__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {
|
|
208
220
|
const ret = getObject(arg0) == getObject(arg1);
|
|
209
221
|
return ret;
|
|
210
222
|
},
|
|
211
|
-
|
|
223
|
+
__wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
|
|
212
224
|
const obj = getObject(arg1);
|
|
213
225
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
214
226
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
215
227
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
216
228
|
},
|
|
217
|
-
|
|
229
|
+
__wbg___wbindgen_string_get_395e606bd0ee4427: function(arg0, arg1) {
|
|
218
230
|
const obj = getObject(arg1);
|
|
219
231
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
220
232
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -222,57 +234,53 @@ function __wbg_get_imports() {
|
|
|
222
234
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
223
235
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
224
236
|
},
|
|
225
|
-
|
|
237
|
+
__wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
|
|
226
238
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
227
239
|
},
|
|
228
|
-
|
|
240
|
+
__wbg__wbg_cb_unref_6b5b6b8576d35cb1: function(arg0) {
|
|
229
241
|
getObject(arg0)._wbg_cb_unref();
|
|
230
242
|
},
|
|
231
|
-
|
|
243
|
+
__wbg_arrayBuffer_7ff5e58aa85a64f7: function(arg0) {
|
|
232
244
|
const ret = getObject(arg0).arrayBuffer();
|
|
233
245
|
return addHeapObject(ret);
|
|
234
246
|
},
|
|
235
|
-
|
|
236
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
237
|
-
return addHeapObject(ret);
|
|
238
|
-
}, arguments); },
|
|
239
|
-
__wbg_call_4708e0c13bdc8e95: function() { return handleError(function (arg0, arg1, arg2) {
|
|
247
|
+
__wbg_call_2d781c1f4d5c0ef8: function() { return handleError(function (arg0, arg1, arg2) {
|
|
240
248
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
241
249
|
return addHeapObject(ret);
|
|
242
250
|
}, arguments); },
|
|
243
|
-
|
|
251
|
+
__wbg_done_08ce71ee07e3bd17: function(arg0) {
|
|
244
252
|
const ret = getObject(arg0).done;
|
|
245
253
|
return ret;
|
|
246
254
|
},
|
|
247
|
-
|
|
255
|
+
__wbg_entries_310f5926c32b5bcb: function(arg0) {
|
|
248
256
|
const ret = getObject(arg0).entries();
|
|
249
257
|
return addHeapObject(ret);
|
|
250
258
|
},
|
|
251
|
-
|
|
259
|
+
__wbg_entries_e8a20ff8c9757101: function(arg0) {
|
|
252
260
|
const ret = Object.entries(getObject(arg0));
|
|
253
261
|
return addHeapObject(ret);
|
|
254
262
|
},
|
|
255
|
-
|
|
263
|
+
__wbg_from_4bdf88943703fd48: function(arg0) {
|
|
256
264
|
const ret = Array.from(getObject(arg0));
|
|
257
265
|
return addHeapObject(ret);
|
|
258
266
|
},
|
|
259
|
-
|
|
267
|
+
__wbg_getDirectory_2406d369de179ff0: function(arg0) {
|
|
260
268
|
const ret = getObject(arg0).getDirectory();
|
|
261
269
|
return addHeapObject(ret);
|
|
262
270
|
},
|
|
263
|
-
|
|
271
|
+
__wbg_getFile_30341f4730c33225: function(arg0) {
|
|
264
272
|
const ret = getObject(arg0).getFile();
|
|
265
273
|
return addHeapObject(ret);
|
|
266
274
|
},
|
|
267
|
-
|
|
275
|
+
__wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
|
|
268
276
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
269
277
|
return addHeapObject(ret);
|
|
270
278
|
},
|
|
271
|
-
|
|
279
|
+
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
272
280
|
const ret = getObject(arg0)[getObject(arg1)];
|
|
273
281
|
return addHeapObject(ret);
|
|
274
282
|
},
|
|
275
|
-
|
|
283
|
+
__wbg_instanceof_ArrayBuffer_101e2bf31071a9f6: function(arg0) {
|
|
276
284
|
let result;
|
|
277
285
|
try {
|
|
278
286
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
@@ -282,7 +290,7 @@ function __wbg_get_imports() {
|
|
|
282
290
|
const ret = result;
|
|
283
291
|
return ret;
|
|
284
292
|
},
|
|
285
|
-
|
|
293
|
+
__wbg_instanceof_FileSystemDirectoryHandle_2944d0641b4ea10c: function(arg0) {
|
|
286
294
|
let result;
|
|
287
295
|
try {
|
|
288
296
|
result = getObject(arg0) instanceof FileSystemDirectoryHandle;
|
|
@@ -292,7 +300,7 @@ function __wbg_get_imports() {
|
|
|
292
300
|
const ret = result;
|
|
293
301
|
return ret;
|
|
294
302
|
},
|
|
295
|
-
|
|
303
|
+
__wbg_instanceof_FileSystemFileHandle_37ac45c6adcff28f: function(arg0) {
|
|
296
304
|
let result;
|
|
297
305
|
try {
|
|
298
306
|
result = getObject(arg0) instanceof FileSystemFileHandle;
|
|
@@ -302,7 +310,7 @@ function __wbg_get_imports() {
|
|
|
302
310
|
const ret = result;
|
|
303
311
|
return ret;
|
|
304
312
|
},
|
|
305
|
-
|
|
313
|
+
__wbg_instanceof_Uint8Array_740438561a5b956d: function(arg0) {
|
|
306
314
|
let result;
|
|
307
315
|
try {
|
|
308
316
|
result = getObject(arg0) instanceof Uint8Array;
|
|
@@ -312,7 +320,7 @@ function __wbg_get_imports() {
|
|
|
312
320
|
const ret = result;
|
|
313
321
|
return ret;
|
|
314
322
|
},
|
|
315
|
-
|
|
323
|
+
__wbg_instanceof_Window_23e677d2c6843922: function(arg0) {
|
|
316
324
|
let result;
|
|
317
325
|
try {
|
|
318
326
|
result = getObject(arg0) instanceof Window;
|
|
@@ -322,34 +330,38 @@ function __wbg_get_imports() {
|
|
|
322
330
|
const ret = result;
|
|
323
331
|
return ret;
|
|
324
332
|
},
|
|
325
|
-
|
|
333
|
+
__wbg_length_b3416cf66a5452c8: function(arg0) {
|
|
326
334
|
const ret = getObject(arg0).length;
|
|
327
335
|
return ret;
|
|
328
336
|
},
|
|
329
|
-
|
|
337
|
+
__wbg_length_ea16607d7b61445b: function(arg0) {
|
|
330
338
|
const ret = getObject(arg0).length;
|
|
331
339
|
return ret;
|
|
332
340
|
},
|
|
333
|
-
|
|
341
|
+
__wbg_navigator_9cebf56f28aa719b: function(arg0) {
|
|
334
342
|
const ret = getObject(arg0).navigator;
|
|
335
343
|
return addHeapObject(ret);
|
|
336
344
|
},
|
|
337
|
-
|
|
338
|
-
const ret = new
|
|
345
|
+
__wbg_new_5f486cdf45a04d78: function(arg0) {
|
|
346
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
339
347
|
return addHeapObject(ret);
|
|
340
348
|
},
|
|
341
|
-
|
|
349
|
+
__wbg_new_a70fbab9066b301f: function() {
|
|
342
350
|
const ret = new Array();
|
|
343
351
|
return addHeapObject(ret);
|
|
344
352
|
},
|
|
345
|
-
|
|
353
|
+
__wbg_new_ab79df5bd7c26067: function() {
|
|
354
|
+
const ret = new Object();
|
|
355
|
+
return addHeapObject(ret);
|
|
356
|
+
},
|
|
357
|
+
__wbg_new_typed_aaaeaf29cf802876: function(arg0, arg1) {
|
|
346
358
|
try {
|
|
347
359
|
var state0 = {a: arg0, b: arg1};
|
|
348
360
|
var cb0 = (arg0, arg1) => {
|
|
349
361
|
const a = state0.a;
|
|
350
362
|
state0.a = 0;
|
|
351
363
|
try {
|
|
352
|
-
return
|
|
364
|
+
return __wasm_bindgen_func_elem_967(a, state0.b, arg0, arg1);
|
|
353
365
|
} finally {
|
|
354
366
|
state0.a = a;
|
|
355
367
|
}
|
|
@@ -360,85 +372,82 @@ function __wbg_get_imports() {
|
|
|
360
372
|
state0.a = state0.b = 0;
|
|
361
373
|
}
|
|
362
374
|
},
|
|
363
|
-
|
|
364
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
365
|
-
return addHeapObject(ret);
|
|
366
|
-
},
|
|
367
|
-
__wbg_new_no_args_1c7c842f08d00ebb: function(arg0, arg1) {
|
|
368
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
369
|
-
return addHeapObject(ret);
|
|
370
|
-
},
|
|
371
|
-
__wbg_next_0a5e0f8af98146aa: function() { return handleError(function (arg0) {
|
|
375
|
+
__wbg_next_9c645ba5e1273237: function() { return handleError(function (arg0) {
|
|
372
376
|
const ret = getObject(arg0).next();
|
|
373
377
|
return addHeapObject(ret);
|
|
374
378
|
}, arguments); },
|
|
375
|
-
|
|
379
|
+
__wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
|
|
376
380
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
377
381
|
},
|
|
378
|
-
|
|
382
|
+
__wbg_queueMicrotask_0c399741342fb10f: function(arg0) {
|
|
379
383
|
const ret = getObject(arg0).queueMicrotask;
|
|
380
384
|
return addHeapObject(ret);
|
|
381
385
|
},
|
|
382
|
-
|
|
386
|
+
__wbg_queueMicrotask_a082d78ce798393e: function(arg0) {
|
|
383
387
|
queueMicrotask(getObject(arg0));
|
|
384
388
|
},
|
|
385
|
-
|
|
389
|
+
__wbg_resolve_ae8d83246e5bcc12: function(arg0) {
|
|
386
390
|
const ret = Promise.resolve(getObject(arg0));
|
|
387
391
|
return addHeapObject(ret);
|
|
388
392
|
},
|
|
389
|
-
|
|
390
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
391
|
-
},
|
|
392
|
-
__wbg_set_f43e577aea94465b: function(arg0, arg1, arg2) {
|
|
393
|
+
__wbg_set_282384002438957f: function(arg0, arg1, arg2) {
|
|
393
394
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
394
395
|
},
|
|
395
|
-
|
|
396
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
397
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
398
|
+
},
|
|
399
|
+
__wbg_size_819df95195daae81: function(arg0) {
|
|
396
400
|
const ret = getObject(arg0).size;
|
|
397
401
|
return ret;
|
|
398
402
|
},
|
|
399
|
-
|
|
403
|
+
__wbg_static_accessor_GLOBAL_8adb955bd33fac2f: function() {
|
|
400
404
|
const ret = typeof global === 'undefined' ? null : global;
|
|
401
405
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
402
406
|
},
|
|
403
|
-
|
|
407
|
+
__wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913: function() {
|
|
404
408
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
405
409
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
406
410
|
},
|
|
407
|
-
|
|
411
|
+
__wbg_static_accessor_SELF_f207c857566db248: function() {
|
|
408
412
|
const ret = typeof self === 'undefined' ? null : self;
|
|
409
413
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
410
414
|
},
|
|
411
|
-
|
|
415
|
+
__wbg_static_accessor_WINDOW_bb9f1ba69d61b386: function() {
|
|
412
416
|
const ret = typeof window === 'undefined' ? null : window;
|
|
413
417
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
414
418
|
},
|
|
415
|
-
|
|
419
|
+
__wbg_storage_63fa6fa9455d2153: function(arg0) {
|
|
416
420
|
const ret = getObject(arg0).storage;
|
|
417
421
|
return addHeapObject(ret);
|
|
418
422
|
},
|
|
419
|
-
|
|
420
|
-
const ret = getObject(arg0).then(getObject(arg1)
|
|
423
|
+
__wbg_then_098abe61755d12f6: function(arg0, arg1) {
|
|
424
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
421
425
|
return addHeapObject(ret);
|
|
422
426
|
},
|
|
423
|
-
|
|
424
|
-
const ret = getObject(arg0).then(getObject(arg1));
|
|
427
|
+
__wbg_then_9e335f6dd892bc11: function(arg0, arg1, arg2) {
|
|
428
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
425
429
|
return addHeapObject(ret);
|
|
426
430
|
},
|
|
427
|
-
|
|
431
|
+
__wbg_value_21fc78aab0322612: function(arg0) {
|
|
428
432
|
const ret = getObject(arg0).value;
|
|
429
433
|
return addHeapObject(ret);
|
|
430
434
|
},
|
|
431
435
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
432
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
433
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
436
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 6, function: Function { arguments: [Externref], shim_idx: 7, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
437
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_135, __wasm_bindgen_func_elem_136);
|
|
434
438
|
return addHeapObject(ret);
|
|
435
439
|
},
|
|
436
|
-
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
440
|
+
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
441
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 6, function: Function { arguments: [NamedExternref("IteratorResult<any>")], shim_idx: 7, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
442
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_135, __wasm_bindgen_func_elem_136_1);
|
|
443
|
+
return addHeapObject(ret);
|
|
444
|
+
},
|
|
445
|
+
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
437
446
|
// Cast intrinsic for `F64 -> Externref`.
|
|
438
447
|
const ret = arg0;
|
|
439
448
|
return addHeapObject(ret);
|
|
440
449
|
},
|
|
441
|
-
|
|
450
|
+
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
442
451
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
443
452
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
444
453
|
return addHeapObject(ret);
|
|
@@ -457,12 +466,36 @@ function __wbg_get_imports() {
|
|
|
457
466
|
};
|
|
458
467
|
}
|
|
459
468
|
|
|
460
|
-
function
|
|
461
|
-
|
|
469
|
+
function __wasm_bindgen_func_elem_136(arg0, arg1, arg2) {
|
|
470
|
+
try {
|
|
471
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
472
|
+
wasm.__wasm_bindgen_func_elem_136(retptr, arg0, arg1, addHeapObject(arg2));
|
|
473
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
474
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
475
|
+
if (r1) {
|
|
476
|
+
throw takeObject(r0);
|
|
477
|
+
}
|
|
478
|
+
} finally {
|
|
479
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
function __wasm_bindgen_func_elem_136_1(arg0, arg1, arg2) {
|
|
484
|
+
try {
|
|
485
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
486
|
+
wasm.__wasm_bindgen_func_elem_136_1(retptr, arg0, arg1, addHeapObject(arg2));
|
|
487
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
488
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
489
|
+
if (r1) {
|
|
490
|
+
throw takeObject(r0);
|
|
491
|
+
}
|
|
492
|
+
} finally {
|
|
493
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
494
|
+
}
|
|
462
495
|
}
|
|
463
496
|
|
|
464
|
-
function
|
|
465
|
-
wasm.
|
|
497
|
+
function __wasm_bindgen_func_elem_967(arg0, arg1, arg2, arg3) {
|
|
498
|
+
wasm.__wasm_bindgen_func_elem_967(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
466
499
|
}
|
|
467
500
|
|
|
468
501
|
const ConversionOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -557,7 +590,7 @@ function debugString(val) {
|
|
|
557
590
|
}
|
|
558
591
|
|
|
559
592
|
function dropObject(idx) {
|
|
560
|
-
if (idx <
|
|
593
|
+
if (idx < 1028) return;
|
|
561
594
|
heap[idx] = heap_next;
|
|
562
595
|
heap_next = idx;
|
|
563
596
|
}
|
|
@@ -598,7 +631,7 @@ function handleError(f, args) {
|
|
|
598
631
|
}
|
|
599
632
|
}
|
|
600
633
|
|
|
601
|
-
let heap = new Array(
|
|
634
|
+
let heap = new Array(1024).fill(undefined);
|
|
602
635
|
heap.push(undefined, null, true, false);
|
|
603
636
|
|
|
604
637
|
let heap_next = heap.length;
|
package/dist/mq_wasm_bg.wasm
CHANGED
|
Binary file
|