@gmb/bitmark-parser 7.4.0 → 7.5.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/config/bitmark.json +2 -2
- package/dist/browser/bitmark-parser.min.js +1 -1
- package/dist/browser/bitmark-parser.min.js.map +1 -1
- package/dist/browser/cjs/index.cjs +1 -1
- package/dist/browser/cjs/index.cjs.map +1 -1
- package/dist/browser/esm/index.js +1 -1
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/browser/wasm/bitmark_browser_full_wasm_bg.wasm +0 -0
- package/dist/browser/wasm/bitmark_json_wasm_bg.wasm +0 -0
- package/dist/browser/wasm/bitmark_wasm_bg.wasm +0 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.cjs +1 -1
- package/dist/legacy.cjs.map +1 -1
- package/dist/legacy.js +1 -1
- package/dist/legacy.js.map +1 -1
- package/package.json +6 -6
- package/schema/bitmark.schema.json +1 -1
- package/wasm/bitmark_wasm_bg.wasm +0 -0
- package/wasm/package.json +1 -1
- package/wasm-bitmark-json/bitmark_json_wasm_bg.wasm +0 -0
- package/wasm-bitmark-json/package.json +1 -1
- package/wasm-browser-full/bitmark_browser_full_wasm_bg.wasm +0 -0
- package/wasm-browser-full/package.json +1 -1
package/config/bitmark.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var fe=Object.defineProperty;var yn=(t,e,r)=>e in t?fe(t,e,{enumerable:true,configurable:true,writable:true,value:r}):t[e]=r;var Rt=(t,e)=>{for(var r in e)fe(t,r,{get:e[r],enumerable:true});};var C=(t,e,r)=>yn(t,typeof e!="symbol"?e+"":e,r);var qt={};Rt(qt,{breakscape_text:()=>vn,canonicalize:()=>Dn,complete:()=>Pn,convert:()=>Cn,convert_text:()=>En,count_bits:()=>Wn,default:()=>Kt,diff:()=>Bn,hover:()=>jn,info:()=>In,info_text_supported:()=>On,initSync:()=>$t,is_bitmark:()=>Mn,prettify:()=>Vn,register:()=>Ln,resolve:()=>An,resolve_patch_document:()=>Sn,split_bits:()=>Jn,split_json_bits:()=>Nn,transform:()=>Rn,unbreakscape_text:()=>hn});var c,me=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:true,fatal:true}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&me.decode();var kt=null;function St(){return (kt===null||kt.byteLength===0)&&(kt=new Uint8Array(c.memory.buffer)),kt}function N(t,e){return t=t>>>0,me.decode(St().subarray(t,t+e))}var nt=new Array(128).fill(void 0);nt.push(void 0,null,true,false);var vt=nt.length;function wn(t){vt===nt.length&&nt.push(nt.length+1);let e=vt;return vt=nt[e],nt[e]=t,e}var T=0,Bt=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},kn=typeof Bt.encodeInto=="function"?function(t,e){return Bt.encodeInto(t,e)}:function(t,e){let r=Bt.encode(t);return e.set(r),{read:t.length,written:r.length}};function E(t,e,r){if(r===void 0){let i=Bt.encode(t),p=e(i.length,1)>>>0;return St().subarray(p,p+i.length).set(i),T=i.length,p}let n=t.length,o=e(n,1)>>>0,a=St(),s=0;for(;s<n;s++){let i=t.charCodeAt(s);if(i>127)break;a[o+s]=i;}if(s!==n){s!==0&&(t=t.slice(s)),o=r(o,n,n=s+t.length*3,1)>>>0;let i=St().subarray(o+s,o+n),p=kn(t,i);s+=p.written,o=r(o,n,s,1)>>>0;}return T=s,o}function be(t){return t==null}var ct=null;function h(){return (ct===null||ct.buffer.detached===true||ct.buffer.detached===void 0&&ct.buffer!==c.memory.buffer)&&(ct=new DataView(c.memory.buffer)),ct}function vn(t,e,r,n){let o,a;try{let l=c.__wbindgen_add_to_stack_pointer(-16),g=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),f=T,x=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),m=T,y=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),b=T;var s=be(n)?0:E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),i=T;c.breakscape_text(l,g,f,x,m,y,b,s,i);var p=h().getInt32(l+0,!0),u=h().getInt32(l+4,!0);return o=p,a=u,N(p,u)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(o,a,1);}}function hn(t,e,r,n){let o,a;try{let l=c.__wbindgen_add_to_stack_pointer(-16),g=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),f=T,x=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),m=T,y=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),b=T;var s=be(n)?0:E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),i=T;c.unbreakscape_text(l,g,f,x,m,y,b,s,i);var p=h().getInt32(l+0,!0),u=h().getInt32(l+4,!0);return o=p,a=u,N(p,u)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(o,a,1);}}function In(t,e,r,n,o,a,s,i,p){let u,l;try{let x=c.__wbindgen_add_to_stack_pointer(-16),m=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),y=T,b=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),w=T,k=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),v=T,O=E(p,c.__wbindgen_export_0,c.__wbindgen_export_1),A=T;c.info(x,m,y,b,w,k,v,n,o,a,s,i,O,A);var g=h().getInt32(x+0,!0),f=h().getInt32(x+4,!0);return u=g,l=f,N(g,f)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(u,l,1);}}function On(){return c.info_text_supported()!==0}function Tn(t){return nt[t]}function Fn(t){t<132||(nt[t]=vt,vt=t);}function Y(t){let e=Tn(t);return Fn(t),e}function En(t,e,r,n){let o,a;try{let f=c.__wbindgen_add_to_stack_pointer(-16),x=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),m=T,y=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),b=T,w=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),k=T,v=E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),O=T;c.convert_text(f,x,m,y,b,w,k,v,O);var s=h().getInt32(f+0,!0),i=h().getInt32(f+4,!0),p=h().getInt32(f+8,!0),u=h().getInt32(f+12,!0),l=s,g=i;if(u)throw l=0,g=0,Y(p);return o=l,a=g,N(l,g)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(o,a,1);}}function Rn(t,e,r,n,o,a,s,i){let p,u;try{let b=c.__wbindgen_add_to_stack_pointer(-16),w=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),k=T,v=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),O=T,A=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),U=T,G=E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),z=T,$=E(o,c.__wbindgen_export_0,c.__wbindgen_export_1),Q=T;c.transform(b,w,k,v,O,A,U,G,z,$,Q,a,s,i);var l=h().getInt32(b+0,!0),g=h().getInt32(b+4,!0),f=h().getInt32(b+8,!0),x=h().getInt32(b+12,!0),m=l,y=g;if(x)throw m=0,y=0,Y(f);return p=m,u=y,N(m,y)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(p,u,1);}}function Sn(t,e,r){let n,o;try{let g=c.__wbindgen_add_to_stack_pointer(-16),f=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),x=T,m=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),y=T,b=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),w=T;c.resolve_patch_document(g,f,x,m,y,b,w);var a=h().getInt32(g+0,!0),s=h().getInt32(g+4,!0),i=h().getInt32(g+8,!0),p=h().getInt32(g+12,!0),u=a,l=s;if(p)throw u=0,l=0,Y(i);return n=u,o=l,N(u,l)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(n,o,1);}}function Bn(t,e,r,n,o,a,s,i,p){let u,l;try{let w=c.__wbindgen_add_to_stack_pointer(-16),k=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),v=T,O=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),A=T,U=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),G=T,z=E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),$=T;c.diff(w,k,v,O,A,U,G,z,$,o,a,s,i,p);var g=h().getInt32(w+0,!0),f=h().getInt32(w+4,!0),x=h().getInt32(w+8,!0),m=h().getInt32(w+12,!0),y=g,b=f;if(m)throw y=0,b=0,Y(x);return u=y,l=b,N(y,b)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(u,l,1);}}function Pn(t,e,r,n,o,a){let s,i;try{let m=c.__wbindgen_add_to_stack_pointer(-16),y=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),b=T,w=E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),k=T,v=E(a,c.__wbindgen_export_0,c.__wbindgen_export_1),O=T;c.complete(m,y,b,e,r,w,k,o,v,O);var p=h().getInt32(m+0,!0),u=h().getInt32(m+4,!0),l=h().getInt32(m+8,!0),g=h().getInt32(m+12,!0),f=p,x=u;if(g)throw f=0,x=0,Y(l);return s=f,i=x,N(f,x)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(s,i,1);}}function An(t,e,r,n,o,a,s){let i,p;try{let y=c.__wbindgen_add_to_stack_pointer(-16),b=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),w=T,k=E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),v=T,O=E(a,c.__wbindgen_export_0,c.__wbindgen_export_1),A=T;c.resolve(y,b,w,e,r,k,v,o,O,A,s);var u=h().getInt32(y+0,!0),l=h().getInt32(y+4,!0),g=h().getInt32(y+8,!0),f=h().getInt32(y+12,!0),x=u,m=l;if(f)throw x=0,m=0,Y(g);return i=x,p=m,N(x,m)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(i,p,1);}}function jn(t,e,r,n){let o,a;try{let f=c.__wbindgen_add_to_stack_pointer(-16),x=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),m=T,y=E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),b=T;c.hover(f,x,m,e,r,y,b);var s=h().getInt32(f+0,!0),i=h().getInt32(f+4,!0),p=h().getInt32(f+8,!0),u=h().getInt32(f+12,!0),l=s,g=i;if(u)throw l=0,g=0,Y(p);return o=l,a=g,N(l,g)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(o,a,1);}}function Ln(t,e){try{let o=c.__wbindgen_add_to_stack_pointer(-16),a=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),s=T,i=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),p=T;c.register(o,a,s,i,p);var r=h().getInt32(o+0,!0),n=h().getInt32(o+4,!0);if(n)throw Y(r)}finally{c.__wbindgen_add_to_stack_pointer(16);}}function Cn(t,e,r,n,o,a,s,i,p,u,l){let g,f;try{let v=c.__wbindgen_add_to_stack_pointer(-16),O=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),A=T,U=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),G=T,z=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),$=T,Q=E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),mt=T,bt=E(u,c.__wbindgen_export_0,c.__wbindgen_export_1),xt=T,yt=E(l,c.__wbindgen_export_0,c.__wbindgen_export_1),wt=T;c.convert(v,O,A,U,G,z,$,Q,mt,o,a,s,i,p,bt,xt,yt,wt);var x=h().getInt32(v+0,!0),m=h().getInt32(v+4,!0),y=h().getInt32(v+8,!0),b=h().getInt32(v+12,!0),w=x,k=m;if(b)throw w=0,k=0,Y(y);return g=w,f=k,N(w,k)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(g,f,1);}}function Dn(t,e,r,n,o,a){let s,i;try{let m=c.__wbindgen_add_to_stack_pointer(-16),y=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),b=T,w=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),k=T,v=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),O=T;c.canonicalize(m,y,b,w,k,v,O,n,o,a);var p=h().getInt32(m+0,!0),u=h().getInt32(m+4,!0),l=h().getInt32(m+8,!0),g=h().getInt32(m+12,!0),f=p,x=u;if(g)throw f=0,x=0,Y(l);return s=f,i=x,N(f,x)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(s,i,1);}}function Wn(t){let e,r;try{let u=c.__wbindgen_add_to_stack_pointer(-16),l=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),g=T;c.count_bits(u,l,g);var n=h().getInt32(u+0,!0),o=h().getInt32(u+4,!0),a=h().getInt32(u+8,!0),s=h().getInt32(u+12,!0),i=n,p=o;if(s)throw i=0,p=0,Y(a);return e=i,r=p,N(i,p)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(e,r,1);}}function Jn(t){let e,r;try{let a=c.__wbindgen_add_to_stack_pointer(-16),s=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),i=T;c.split_bits(a,s,i);var n=h().getInt32(a+0,!0),o=h().getInt32(a+4,!0);return e=n,r=o,N(n,o)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(e,r,1);}}function Mn(t){let e=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),r=T;return c.is_bitmark(e,r)!==0}function Nn(t){let e,r;try{let u=c.__wbindgen_add_to_stack_pointer(-16),l=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),g=T;c.split_json_bits(u,l,g);var n=h().getInt32(u+0,!0),o=h().getInt32(u+4,!0),a=h().getInt32(u+8,!0),s=h().getInt32(u+12,!0),i=n,p=o;if(s)throw i=0,p=0,Y(a);return e=i,r=p,N(i,p)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(e,r,1);}}function Vn(t,e){let r,n;try{let s=c.__wbindgen_add_to_stack_pointer(-16),i=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),p=T;c.prettify(s,i,p,e);var o=h().getInt32(s+0,!0),a=h().getInt32(s+4,!0);return r=o,n=a,N(o,a)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(r,n,1);}}async function Hn(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(n){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",n);else throw n}let r=await t.arrayBuffer();return await WebAssembly.instantiate(r,e)}else {let r=await WebAssembly.instantiate(t,e);return r instanceof WebAssembly.Instance?{instance:r,module:t}:r}}function xe(){let t={};return t.wbg={},t.wbg.__wbindgen_error_new=function(e,r){let n=new Error(N(e,r));return wn(n)},t}function ye(t,e){return c=t.exports,we.__wbindgen_wasm_module=e,ct=null,kt=null,c}function $t(t){if(c!==void 0)return c;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=xe();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let r=new WebAssembly.Instance(t,e);return ye(r,t)}async function we(t){if(c!==void 0)return c;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("bitmark_wasm_bg.wasm",import.meta.url));let e=xe();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:r,module:n}=await Hn(await t,e);return ye(r,n)}var Kt=we;var Qt={};Rt(Qt,{breakscape_text:()=>zn,canonicalize:()=>ar,complete:()=>nr,convert:()=>sr,convert_text:()=>Qn,count_bits:()=>pr,default:()=>Xt,diff:()=>er,hover:()=>or,info:()=>Kn,info_text_supported:()=>qn,initSync:()=>Yt,is_bitmark:()=>_r,prettify:()=>dr,register:()=>ir,resolve:()=>rr,resolve_patch_document:()=>tr,split_bits:()=>cr,split_json_bits:()=>ur,transform:()=>Zn,unbreakscape_text:()=>$n});var _,ke=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:true,fatal:true}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&ke.decode();var ht=null;function Pt(){return (ht===null||ht.byteLength===0)&&(ht=new Uint8Array(_.memory.buffer)),ht}function V(t,e){return t=t>>>0,ke.decode(Pt().subarray(t,t+e))}var rt=new Array(128).fill(void 0);rt.push(void 0,null,true,false);var It=rt.length;function Un(t){It===rt.length&&rt.push(rt.length+1);let e=It;return It=rt[e],rt[e]=t,e}var F=0,At=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},Gn=typeof At.encodeInto=="function"?function(t,e){return At.encodeInto(t,e)}:function(t,e){let r=At.encode(t);return e.set(r),{read:t.length,written:r.length}};function R(t,e,r){if(r===void 0){let i=At.encode(t),p=e(i.length,1)>>>0;return Pt().subarray(p,p+i.length).set(i),F=i.length,p}let n=t.length,o=e(n,1)>>>0,a=Pt(),s=0;for(;s<n;s++){let i=t.charCodeAt(s);if(i>127)break;a[o+s]=i;}if(s!==n){s!==0&&(t=t.slice(s)),o=r(o,n,n=s+t.length*3,1)>>>0;let i=Pt().subarray(o+s,o+n),p=Gn(t,i);s+=p.written,o=r(o,n,s,1)>>>0;}return F=s,o}function ve(t){return t==null}var _t=null;function I(){return (_t===null||_t.buffer.detached===true||_t.buffer.detached===void 0&&_t.buffer!==_.memory.buffer)&&(_t=new DataView(_.memory.buffer)),_t}function zn(t,e,r,n){let o,a;try{let l=_.__wbindgen_add_to_stack_pointer(-16),g=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),f=F,x=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),m=F,y=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),b=F;var s=ve(n)?0:R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),i=F;_.breakscape_text(l,g,f,x,m,y,b,s,i);var p=I().getInt32(l+0,!0),u=I().getInt32(l+4,!0);return o=p,a=u,V(p,u)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(o,a,1);}}function $n(t,e,r,n){let o,a;try{let l=_.__wbindgen_add_to_stack_pointer(-16),g=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),f=F,x=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),m=F,y=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),b=F;var s=ve(n)?0:R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),i=F;_.unbreakscape_text(l,g,f,x,m,y,b,s,i);var p=I().getInt32(l+0,!0),u=I().getInt32(l+4,!0);return o=p,a=u,V(p,u)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(o,a,1);}}function Kn(t,e,r,n,o,a,s,i,p){let u,l;try{let x=_.__wbindgen_add_to_stack_pointer(-16),m=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),y=F,b=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),w=F,k=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),v=F,O=R(p,_.__wbindgen_export_0,_.__wbindgen_export_1),A=F;_.info(x,m,y,b,w,k,v,n,o,a,s,i,O,A);var g=I().getInt32(x+0,!0),f=I().getInt32(x+4,!0);return u=g,l=f,V(g,f)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(u,l,1);}}function qn(){return _.info_text_supported()!==0}function Yn(t){return rt[t]}function Xn(t){t<132||(rt[t]=It,It=t);}function X(t){let e=Yn(t);return Xn(t),e}function Qn(t,e,r,n){let o,a;try{let f=_.__wbindgen_add_to_stack_pointer(-16),x=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),m=F,y=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),b=F,w=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),k=F,v=R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),O=F;_.convert_text(f,x,m,y,b,w,k,v,O);var s=I().getInt32(f+0,!0),i=I().getInt32(f+4,!0),p=I().getInt32(f+8,!0),u=I().getInt32(f+12,!0),l=s,g=i;if(u)throw l=0,g=0,X(p);return o=l,a=g,V(l,g)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(o,a,1);}}function Zn(t,e,r,n,o,a,s,i){let p,u;try{let b=_.__wbindgen_add_to_stack_pointer(-16),w=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),k=F,v=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),O=F,A=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),U=F,G=R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),z=F,$=R(o,_.__wbindgen_export_0,_.__wbindgen_export_1),Q=F;_.transform(b,w,k,v,O,A,U,G,z,$,Q,a,s,i);var l=I().getInt32(b+0,!0),g=I().getInt32(b+4,!0),f=I().getInt32(b+8,!0),x=I().getInt32(b+12,!0),m=l,y=g;if(x)throw m=0,y=0,X(f);return p=m,u=y,V(m,y)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(p,u,1);}}function tr(t,e,r){let n,o;try{let g=_.__wbindgen_add_to_stack_pointer(-16),f=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),x=F,m=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),y=F,b=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),w=F;_.resolve_patch_document(g,f,x,m,y,b,w);var a=I().getInt32(g+0,!0),s=I().getInt32(g+4,!0),i=I().getInt32(g+8,!0),p=I().getInt32(g+12,!0),u=a,l=s;if(p)throw u=0,l=0,X(i);return n=u,o=l,V(u,l)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(n,o,1);}}function er(t,e,r,n,o,a,s,i,p){let u,l;try{let w=_.__wbindgen_add_to_stack_pointer(-16),k=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),v=F,O=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),A=F,U=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),G=F,z=R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),$=F;_.diff(w,k,v,O,A,U,G,z,$,o,a,s,i,p);var g=I().getInt32(w+0,!0),f=I().getInt32(w+4,!0),x=I().getInt32(w+8,!0),m=I().getInt32(w+12,!0),y=g,b=f;if(m)throw y=0,b=0,X(x);return u=y,l=b,V(y,b)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(u,l,1);}}function nr(t,e,r,n,o,a){let s,i;try{let m=_.__wbindgen_add_to_stack_pointer(-16),y=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),b=F,w=R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),k=F,v=R(a,_.__wbindgen_export_0,_.__wbindgen_export_1),O=F;_.complete(m,y,b,e,r,w,k,o,v,O);var p=I().getInt32(m+0,!0),u=I().getInt32(m+4,!0),l=I().getInt32(m+8,!0),g=I().getInt32(m+12,!0),f=p,x=u;if(g)throw f=0,x=0,X(l);return s=f,i=x,V(f,x)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(s,i,1);}}function rr(t,e,r,n,o,a,s){let i,p;try{let y=_.__wbindgen_add_to_stack_pointer(-16),b=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),w=F,k=R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),v=F,O=R(a,_.__wbindgen_export_0,_.__wbindgen_export_1),A=F;_.resolve(y,b,w,e,r,k,v,o,O,A,s);var u=I().getInt32(y+0,!0),l=I().getInt32(y+4,!0),g=I().getInt32(y+8,!0),f=I().getInt32(y+12,!0),x=u,m=l;if(f)throw x=0,m=0,X(g);return i=x,p=m,V(x,m)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(i,p,1);}}function or(t,e,r,n){let o,a;try{let f=_.__wbindgen_add_to_stack_pointer(-16),x=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),m=F,y=R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),b=F;_.hover(f,x,m,e,r,y,b);var s=I().getInt32(f+0,!0),i=I().getInt32(f+4,!0),p=I().getInt32(f+8,!0),u=I().getInt32(f+12,!0),l=s,g=i;if(u)throw l=0,g=0,X(p);return o=l,a=g,V(l,g)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(o,a,1);}}function ir(t,e){try{let o=_.__wbindgen_add_to_stack_pointer(-16),a=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),s=F,i=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),p=F;_.register(o,a,s,i,p);var r=I().getInt32(o+0,!0),n=I().getInt32(o+4,!0);if(n)throw X(r)}finally{_.__wbindgen_add_to_stack_pointer(16);}}function sr(t,e,r,n,o,a,s,i,p,u,l){let g,f;try{let v=_.__wbindgen_add_to_stack_pointer(-16),O=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),A=F,U=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),G=F,z=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),$=F,Q=R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),mt=F,bt=R(u,_.__wbindgen_export_0,_.__wbindgen_export_1),xt=F,yt=R(l,_.__wbindgen_export_0,_.__wbindgen_export_1),wt=F;_.convert(v,O,A,U,G,z,$,Q,mt,o,a,s,i,p,bt,xt,yt,wt);var x=I().getInt32(v+0,!0),m=I().getInt32(v+4,!0),y=I().getInt32(v+8,!0),b=I().getInt32(v+12,!0),w=x,k=m;if(b)throw w=0,k=0,X(y);return g=w,f=k,V(w,k)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(g,f,1);}}function ar(t,e,r,n,o,a){let s,i;try{let m=_.__wbindgen_add_to_stack_pointer(-16),y=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),b=F,w=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),k=F,v=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),O=F;_.canonicalize(m,y,b,w,k,v,O,n,o,a);var p=I().getInt32(m+0,!0),u=I().getInt32(m+4,!0),l=I().getInt32(m+8,!0),g=I().getInt32(m+12,!0),f=p,x=u;if(g)throw f=0,x=0,X(l);return s=f,i=x,V(f,x)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(s,i,1);}}function pr(t){let e,r;try{let u=_.__wbindgen_add_to_stack_pointer(-16),l=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),g=F;_.count_bits(u,l,g);var n=I().getInt32(u+0,!0),o=I().getInt32(u+4,!0),a=I().getInt32(u+8,!0),s=I().getInt32(u+12,!0),i=n,p=o;if(s)throw i=0,p=0,X(a);return e=i,r=p,V(i,p)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(e,r,1);}}function cr(t){let e,r;try{let a=_.__wbindgen_add_to_stack_pointer(-16),s=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),i=F;_.split_bits(a,s,i);var n=I().getInt32(a+0,!0),o=I().getInt32(a+4,!0);return e=n,r=o,V(n,o)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(e,r,1);}}function _r(t){let e=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),r=F;return _.is_bitmark(e,r)!==0}function ur(t){let e,r;try{let u=_.__wbindgen_add_to_stack_pointer(-16),l=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),g=F;_.split_json_bits(u,l,g);var n=I().getInt32(u+0,!0),o=I().getInt32(u+4,!0),a=I().getInt32(u+8,!0),s=I().getInt32(u+12,!0),i=n,p=o;if(s)throw i=0,p=0,X(a);return e=i,r=p,V(i,p)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(e,r,1);}}function dr(t,e){let r,n;try{let s=_.__wbindgen_add_to_stack_pointer(-16),i=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),p=F;_.prettify(s,i,p,e);var o=I().getInt32(s+0,!0),a=I().getInt32(s+4,!0);return r=o,n=a,V(o,a)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(r,n,1);}}async function lr(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(n){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",n);else throw n}let r=await t.arrayBuffer();return await WebAssembly.instantiate(r,e)}else {let r=await WebAssembly.instantiate(t,e);return r instanceof WebAssembly.Instance?{instance:r,module:t}:r}}function he(){let t={};return t.wbg={},t.wbg.__wbindgen_error_new=function(e,r){let n=new Error(V(e,r));return Un(n)},t}function Ie(t,e){return _=t.exports,Oe.__wbindgen_wasm_module=e,_t=null,ht=null,_}function Yt(t){if(_!==void 0)return _;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=he();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let r=new WebAssembly.Instance(t,e);return Ie(r,t)}async function Oe(t){if(_!==void 0)return _;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("bitmark_browser_full_wasm_bg.wasm",import.meta.url));let e=he();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:r,module:n}=await lr(await t,e);return Ie(r,n)}var Xt=Oe;var ee={};Rt(ee,{breakscape_text:()=>mr,canonicalize:()=>Er,complete:()=>Ir,convert:()=>Fr,convert_text:()=>jr,count_bits:()=>Rr,default:()=>te,hover:()=>Tr,info:()=>xr,initSync:()=>Zt,is_bitmark:()=>Br,prettify:()=>Ar,register:()=>kr,resolve:()=>Or,resolve_patch_document:()=>hr,split_bits:()=>Sr,split_json_bits:()=>Pr,transform:()=>vr,unbreakscape_text:()=>br});var d,Te=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:true,fatal:true}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&Te.decode();var Ot=null;function jt(){return (Ot===null||Ot.byteLength===0)&&(Ot=new Uint8Array(d.memory.buffer)),Ot}function H(t,e){return t=t>>>0,Te.decode(jt().subarray(t,t+e))}var ot=new Array(128).fill(void 0);ot.push(void 0,null,true,false);var Tt=ot.length;function gr(t){Tt===ot.length&&ot.push(ot.length+1);let e=Tt;return Tt=ot[e],ot[e]=t,e}var B=0,Lt=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},fr=typeof Lt.encodeInto=="function"?function(t,e){return Lt.encodeInto(t,e)}:function(t,e){let r=Lt.encode(t);return e.set(r),{read:t.length,written:r.length}};function P(t,e,r){if(r===void 0){let i=Lt.encode(t),p=e(i.length,1)>>>0;return jt().subarray(p,p+i.length).set(i),B=i.length,p}let n=t.length,o=e(n,1)>>>0,a=jt(),s=0;for(;s<n;s++){let i=t.charCodeAt(s);if(i>127)break;a[o+s]=i;}if(s!==n){s!==0&&(t=t.slice(s)),o=r(o,n,n=s+t.length*3,1)>>>0;let i=jt().subarray(o+s,o+n),p=fr(t,i);s+=p.written,o=r(o,n,s,1)>>>0;}return B=s,o}function Fe(t){return t==null}var ut=null;function S(){return (ut===null||ut.buffer.detached===true||ut.buffer.detached===void 0&&ut.buffer!==d.memory.buffer)&&(ut=new DataView(d.memory.buffer)),ut}function mr(t,e,r,n){let o,a;try{let l=d.__wbindgen_add_to_stack_pointer(-16),g=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),f=B,x=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),m=B,y=P(r,d.__wbindgen_export_0,d.__wbindgen_export_1),b=B;var s=Fe(n)?0:P(n,d.__wbindgen_export_0,d.__wbindgen_export_1),i=B;d.breakscape_text(l,g,f,x,m,y,b,s,i);var p=S().getInt32(l+0,!0),u=S().getInt32(l+4,!0);return o=p,a=u,H(p,u)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(o,a,1);}}function br(t,e,r,n){let o,a;try{let l=d.__wbindgen_add_to_stack_pointer(-16),g=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),f=B,x=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),m=B,y=P(r,d.__wbindgen_export_0,d.__wbindgen_export_1),b=B;var s=Fe(n)?0:P(n,d.__wbindgen_export_0,d.__wbindgen_export_1),i=B;d.unbreakscape_text(l,g,f,x,m,y,b,s,i);var p=S().getInt32(l+0,!0),u=S().getInt32(l+4,!0);return o=p,a=u,H(p,u)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(o,a,1);}}function xr(t,e,r,n,o,a,s,i,p){let u,l;try{let x=d.__wbindgen_add_to_stack_pointer(-16),m=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),y=B,b=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),w=B,k=P(r,d.__wbindgen_export_0,d.__wbindgen_export_1),v=B,O=P(p,d.__wbindgen_export_0,d.__wbindgen_export_1),A=B;d.info(x,m,y,b,w,k,v,n,o,a,s,i,O,A);var g=S().getInt32(x+0,!0),f=S().getInt32(x+4,!0);return u=g,l=f,H(g,f)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(u,l,1);}}function yr(t){return ot[t]}function wr(t){t<132||(ot[t]=Tt,Tt=t);}function Z(t){let e=yr(t);return wr(t),e}function kr(t,e){try{let o=d.__wbindgen_add_to_stack_pointer(-16),a=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),s=B,i=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),p=B;d.register(o,a,s,i,p);var r=S().getInt32(o+0,!0),n=S().getInt32(o+4,!0);if(n)throw Z(r)}finally{d.__wbindgen_add_to_stack_pointer(16);}}function vr(t,e,r,n,o,a,s,i){let p,u;try{let b=d.__wbindgen_add_to_stack_pointer(-16),w=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),k=B,v=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),O=B,A=P(r,d.__wbindgen_export_0,d.__wbindgen_export_1),U=B,G=P(n,d.__wbindgen_export_0,d.__wbindgen_export_1),z=B,$=P(o,d.__wbindgen_export_0,d.__wbindgen_export_1),Q=B;d.transform(b,w,k,v,O,A,U,G,z,$,Q,a,s,i);var l=S().getInt32(b+0,!0),g=S().getInt32(b+4,!0),f=S().getInt32(b+8,!0),x=S().getInt32(b+12,!0),m=l,y=g;if(x)throw m=0,y=0,Z(f);return p=m,u=y,H(m,y)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(p,u,1);}}function hr(t,e,r){let n,o;try{let g=d.__wbindgen_add_to_stack_pointer(-16),f=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),x=B,m=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),y=B,b=P(r,d.__wbindgen_export_0,d.__wbindgen_export_1),w=B;d.resolve_patch_document(g,f,x,m,y,b,w);var a=S().getInt32(g+0,!0),s=S().getInt32(g+4,!0),i=S().getInt32(g+8,!0),p=S().getInt32(g+12,!0),u=a,l=s;if(p)throw u=0,l=0,Z(i);return n=u,o=l,H(u,l)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(n,o,1);}}function Ir(t,e,r,n,o,a){let s,i;try{let m=d.__wbindgen_add_to_stack_pointer(-16),y=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),b=B,w=P(n,d.__wbindgen_export_0,d.__wbindgen_export_1),k=B,v=P(a,d.__wbindgen_export_0,d.__wbindgen_export_1),O=B;d.complete(m,y,b,e,r,w,k,o,v,O);var p=S().getInt32(m+0,!0),u=S().getInt32(m+4,!0),l=S().getInt32(m+8,!0),g=S().getInt32(m+12,!0),f=p,x=u;if(g)throw f=0,x=0,Z(l);return s=f,i=x,H(f,x)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(s,i,1);}}function Or(t,e,r,n,o,a,s){let i,p;try{let y=d.__wbindgen_add_to_stack_pointer(-16),b=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),w=B,k=P(n,d.__wbindgen_export_0,d.__wbindgen_export_1),v=B,O=P(a,d.__wbindgen_export_0,d.__wbindgen_export_1),A=B;d.resolve(y,b,w,e,r,k,v,o,O,A,s);var u=S().getInt32(y+0,!0),l=S().getInt32(y+4,!0),g=S().getInt32(y+8,!0),f=S().getInt32(y+12,!0),x=u,m=l;if(f)throw x=0,m=0,Z(g);return i=x,p=m,H(x,m)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(i,p,1);}}function Tr(t,e,r,n){let o,a;try{let f=d.__wbindgen_add_to_stack_pointer(-16),x=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),m=B,y=P(n,d.__wbindgen_export_0,d.__wbindgen_export_1),b=B;d.hover(f,x,m,e,r,y,b);var s=S().getInt32(f+0,!0),i=S().getInt32(f+4,!0),p=S().getInt32(f+8,!0),u=S().getInt32(f+12,!0),l=s,g=i;if(u)throw l=0,g=0,Z(p);return o=l,a=g,H(l,g)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(o,a,1);}}function Fr(t,e,r,n,o,a,s,i,p,u,l){let g,f;try{let v=d.__wbindgen_add_to_stack_pointer(-16),O=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),A=B,U=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),G=B,z=P(r,d.__wbindgen_export_0,d.__wbindgen_export_1),$=B,Q=P(n,d.__wbindgen_export_0,d.__wbindgen_export_1),mt=B,bt=P(u,d.__wbindgen_export_0,d.__wbindgen_export_1),xt=B,yt=P(l,d.__wbindgen_export_0,d.__wbindgen_export_1),wt=B;d.convert(v,O,A,U,G,z,$,Q,mt,o,a,s,i,p,bt,xt,yt,wt);var x=S().getInt32(v+0,!0),m=S().getInt32(v+4,!0),y=S().getInt32(v+8,!0),b=S().getInt32(v+12,!0),w=x,k=m;if(b)throw w=0,k=0,Z(y);return g=w,f=k,H(w,k)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(g,f,1);}}function Er(t,e,r,n,o,a){let s,i;try{let m=d.__wbindgen_add_to_stack_pointer(-16),y=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),b=B,w=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),k=B,v=P(r,d.__wbindgen_export_0,d.__wbindgen_export_1),O=B;d.canonicalize(m,y,b,w,k,v,O,n,o,a);var p=S().getInt32(m+0,!0),u=S().getInt32(m+4,!0),l=S().getInt32(m+8,!0),g=S().getInt32(m+12,!0),f=p,x=u;if(g)throw f=0,x=0,Z(l);return s=f,i=x,H(f,x)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(s,i,1);}}function Rr(t){let e,r;try{let u=d.__wbindgen_add_to_stack_pointer(-16),l=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),g=B;d.count_bits(u,l,g);var n=S().getInt32(u+0,!0),o=S().getInt32(u+4,!0),a=S().getInt32(u+8,!0),s=S().getInt32(u+12,!0),i=n,p=o;if(s)throw i=0,p=0,Z(a);return e=i,r=p,H(i,p)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(e,r,1);}}function Sr(t){let e,r;try{let a=d.__wbindgen_add_to_stack_pointer(-16),s=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),i=B;d.split_bits(a,s,i);var n=S().getInt32(a+0,!0),o=S().getInt32(a+4,!0);return e=n,r=o,H(n,o)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(e,r,1);}}function Br(t){let e=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),r=B;return d.is_bitmark(e,r)!==0}function Pr(t){let e,r;try{let u=d.__wbindgen_add_to_stack_pointer(-16),l=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),g=B;d.split_json_bits(u,l,g);var n=S().getInt32(u+0,!0),o=S().getInt32(u+4,!0),a=S().getInt32(u+8,!0),s=S().getInt32(u+12,!0),i=n,p=o;if(s)throw i=0,p=0,Z(a);return e=i,r=p,H(i,p)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(e,r,1);}}function Ar(t,e){let r,n;try{let s=d.__wbindgen_add_to_stack_pointer(-16),i=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),p=B;d.prettify(s,i,p,e);var o=S().getInt32(s+0,!0),a=S().getInt32(s+4,!0);return r=o,n=a,H(o,a)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(r,n,1);}}function jr(t,e,r,n){let o,a;try{let f=d.__wbindgen_add_to_stack_pointer(-16),x=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),m=B,y=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),b=B,w=P(r,d.__wbindgen_export_0,d.__wbindgen_export_1),k=B,v=P(n,d.__wbindgen_export_0,d.__wbindgen_export_1),O=B;d.convert_text(f,x,m,y,b,w,k,v,O);var s=S().getInt32(f+0,!0),i=S().getInt32(f+4,!0),p=S().getInt32(f+8,!0),u=S().getInt32(f+12,!0),l=s,g=i;if(u)throw l=0,g=0,Z(p);return o=l,a=g,H(l,g)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(o,a,1);}}async function Lr(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(n){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",n);else throw n}let r=await t.arrayBuffer();return await WebAssembly.instantiate(r,e)}else {let r=await WebAssembly.instantiate(t,e);return r instanceof WebAssembly.Instance?{instance:r,module:t}:r}}function Ee(){let t={};return t.wbg={},t.wbg.__wbindgen_error_new=function(e,r){let n=new Error(H(e,r));return gr(n)},t}function Re(t,e){return d=t.exports,Se.__wbindgen_wasm_module=e,ut=null,Ot=null,d}function Zt(t){if(d!==void 0)return d;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=Ee();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let r=new WebAssembly.Instance(t,e);return Re(r,t)}async function Se(t){if(d!==void 0)return d;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("bitmark_json_wasm_bg.wasm",import.meta.url));let e=Ee();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:r,module:n}=await Lr(await t,e);return Re(r,n)}var te=Se;var Ft={version:"7.4.0"};var ne="browser-full",Dt=class extends Error{constructor(){super("wasm not initialised: call init() (or init({ feature: \u2026 })) first"),this.name="NotInitializedError";}},lt=class extends Error{constructor(e){super(e),this.name="RegisterError";}},it=class extends Error{constructor(r){let n=r.map(o=>`${o.kind} at ${o.path}: ${o.message}`);super(`${r.length} patch ${r.length===1?"entry was":"entries were"} skipped:
|
|
1
|
+
var fe=Object.defineProperty;var yn=(t,e,r)=>e in t?fe(t,e,{enumerable:true,configurable:true,writable:true,value:r}):t[e]=r;var Rt=(t,e)=>{for(var r in e)fe(t,r,{get:e[r],enumerable:true});};var C=(t,e,r)=>yn(t,typeof e!="symbol"?e+"":e,r);var qt={};Rt(qt,{breakscape_text:()=>vn,canonicalize:()=>Dn,complete:()=>Pn,convert:()=>Cn,convert_text:()=>En,count_bits:()=>Wn,default:()=>Kt,diff:()=>Bn,hover:()=>jn,info:()=>In,info_text_supported:()=>On,initSync:()=>$t,is_bitmark:()=>Mn,prettify:()=>Vn,register:()=>Ln,resolve:()=>An,resolve_patch_document:()=>Sn,split_bits:()=>Jn,split_json_bits:()=>Nn,transform:()=>Rn,unbreakscape_text:()=>hn});var c,me=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:true,fatal:true}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&me.decode();var kt=null;function St(){return (kt===null||kt.byteLength===0)&&(kt=new Uint8Array(c.memory.buffer)),kt}function N(t,e){return t=t>>>0,me.decode(St().subarray(t,t+e))}var nt=new Array(128).fill(void 0);nt.push(void 0,null,true,false);var vt=nt.length;function wn(t){vt===nt.length&&nt.push(nt.length+1);let e=vt;return vt=nt[e],nt[e]=t,e}var T=0,Bt=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},kn=typeof Bt.encodeInto=="function"?function(t,e){return Bt.encodeInto(t,e)}:function(t,e){let r=Bt.encode(t);return e.set(r),{read:t.length,written:r.length}};function E(t,e,r){if(r===void 0){let i=Bt.encode(t),p=e(i.length,1)>>>0;return St().subarray(p,p+i.length).set(i),T=i.length,p}let n=t.length,o=e(n,1)>>>0,a=St(),s=0;for(;s<n;s++){let i=t.charCodeAt(s);if(i>127)break;a[o+s]=i;}if(s!==n){s!==0&&(t=t.slice(s)),o=r(o,n,n=s+t.length*3,1)>>>0;let i=St().subarray(o+s,o+n),p=kn(t,i);s+=p.written,o=r(o,n,s,1)>>>0;}return T=s,o}function be(t){return t==null}var ct=null;function h(){return (ct===null||ct.buffer.detached===true||ct.buffer.detached===void 0&&ct.buffer!==c.memory.buffer)&&(ct=new DataView(c.memory.buffer)),ct}function vn(t,e,r,n){let o,a;try{let l=c.__wbindgen_add_to_stack_pointer(-16),g=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),f=T,x=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),m=T,y=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),b=T;var s=be(n)?0:E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),i=T;c.breakscape_text(l,g,f,x,m,y,b,s,i);var p=h().getInt32(l+0,!0),u=h().getInt32(l+4,!0);return o=p,a=u,N(p,u)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(o,a,1);}}function hn(t,e,r,n){let o,a;try{let l=c.__wbindgen_add_to_stack_pointer(-16),g=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),f=T,x=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),m=T,y=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),b=T;var s=be(n)?0:E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),i=T;c.unbreakscape_text(l,g,f,x,m,y,b,s,i);var p=h().getInt32(l+0,!0),u=h().getInt32(l+4,!0);return o=p,a=u,N(p,u)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(o,a,1);}}function In(t,e,r,n,o,a,s,i,p){let u,l;try{let x=c.__wbindgen_add_to_stack_pointer(-16),m=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),y=T,b=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),w=T,k=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),v=T,O=E(p,c.__wbindgen_export_0,c.__wbindgen_export_1),A=T;c.info(x,m,y,b,w,k,v,n,o,a,s,i,O,A);var g=h().getInt32(x+0,!0),f=h().getInt32(x+4,!0);return u=g,l=f,N(g,f)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(u,l,1);}}function On(){return c.info_text_supported()!==0}function Tn(t){return nt[t]}function Fn(t){t<132||(nt[t]=vt,vt=t);}function Y(t){let e=Tn(t);return Fn(t),e}function En(t,e,r,n){let o,a;try{let f=c.__wbindgen_add_to_stack_pointer(-16),x=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),m=T,y=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),b=T,w=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),k=T,v=E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),O=T;c.convert_text(f,x,m,y,b,w,k,v,O);var s=h().getInt32(f+0,!0),i=h().getInt32(f+4,!0),p=h().getInt32(f+8,!0),u=h().getInt32(f+12,!0),l=s,g=i;if(u)throw l=0,g=0,Y(p);return o=l,a=g,N(l,g)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(o,a,1);}}function Rn(t,e,r,n,o,a,s,i){let p,u;try{let b=c.__wbindgen_add_to_stack_pointer(-16),w=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),k=T,v=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),O=T,A=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),U=T,G=E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),z=T,$=E(o,c.__wbindgen_export_0,c.__wbindgen_export_1),Q=T;c.transform(b,w,k,v,O,A,U,G,z,$,Q,a,s,i);var l=h().getInt32(b+0,!0),g=h().getInt32(b+4,!0),f=h().getInt32(b+8,!0),x=h().getInt32(b+12,!0),m=l,y=g;if(x)throw m=0,y=0,Y(f);return p=m,u=y,N(m,y)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(p,u,1);}}function Sn(t,e,r){let n,o;try{let g=c.__wbindgen_add_to_stack_pointer(-16),f=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),x=T,m=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),y=T,b=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),w=T;c.resolve_patch_document(g,f,x,m,y,b,w);var a=h().getInt32(g+0,!0),s=h().getInt32(g+4,!0),i=h().getInt32(g+8,!0),p=h().getInt32(g+12,!0),u=a,l=s;if(p)throw u=0,l=0,Y(i);return n=u,o=l,N(u,l)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(n,o,1);}}function Bn(t,e,r,n,o,a,s,i,p){let u,l;try{let w=c.__wbindgen_add_to_stack_pointer(-16),k=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),v=T,O=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),A=T,U=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),G=T,z=E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),$=T;c.diff(w,k,v,O,A,U,G,z,$,o,a,s,i,p);var g=h().getInt32(w+0,!0),f=h().getInt32(w+4,!0),x=h().getInt32(w+8,!0),m=h().getInt32(w+12,!0),y=g,b=f;if(m)throw y=0,b=0,Y(x);return u=y,l=b,N(y,b)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(u,l,1);}}function Pn(t,e,r,n,o,a){let s,i;try{let m=c.__wbindgen_add_to_stack_pointer(-16),y=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),b=T,w=E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),k=T,v=E(a,c.__wbindgen_export_0,c.__wbindgen_export_1),O=T;c.complete(m,y,b,e,r,w,k,o,v,O);var p=h().getInt32(m+0,!0),u=h().getInt32(m+4,!0),l=h().getInt32(m+8,!0),g=h().getInt32(m+12,!0),f=p,x=u;if(g)throw f=0,x=0,Y(l);return s=f,i=x,N(f,x)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(s,i,1);}}function An(t,e,r,n,o,a,s){let i,p;try{let y=c.__wbindgen_add_to_stack_pointer(-16),b=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),w=T,k=E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),v=T,O=E(a,c.__wbindgen_export_0,c.__wbindgen_export_1),A=T;c.resolve(y,b,w,e,r,k,v,o,O,A,s);var u=h().getInt32(y+0,!0),l=h().getInt32(y+4,!0),g=h().getInt32(y+8,!0),f=h().getInt32(y+12,!0),x=u,m=l;if(f)throw x=0,m=0,Y(g);return i=x,p=m,N(x,m)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(i,p,1);}}function jn(t,e,r,n){let o,a;try{let f=c.__wbindgen_add_to_stack_pointer(-16),x=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),m=T,y=E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),b=T;c.hover(f,x,m,e,r,y,b);var s=h().getInt32(f+0,!0),i=h().getInt32(f+4,!0),p=h().getInt32(f+8,!0),u=h().getInt32(f+12,!0),l=s,g=i;if(u)throw l=0,g=0,Y(p);return o=l,a=g,N(l,g)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(o,a,1);}}function Ln(t,e){try{let o=c.__wbindgen_add_to_stack_pointer(-16),a=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),s=T,i=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),p=T;c.register(o,a,s,i,p);var r=h().getInt32(o+0,!0),n=h().getInt32(o+4,!0);if(n)throw Y(r)}finally{c.__wbindgen_add_to_stack_pointer(16);}}function Cn(t,e,r,n,o,a,s,i,p,u,l){let g,f;try{let v=c.__wbindgen_add_to_stack_pointer(-16),O=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),A=T,U=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),G=T,z=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),$=T,Q=E(n,c.__wbindgen_export_0,c.__wbindgen_export_1),mt=T,bt=E(u,c.__wbindgen_export_0,c.__wbindgen_export_1),xt=T,yt=E(l,c.__wbindgen_export_0,c.__wbindgen_export_1),wt=T;c.convert(v,O,A,U,G,z,$,Q,mt,o,a,s,i,p,bt,xt,yt,wt);var x=h().getInt32(v+0,!0),m=h().getInt32(v+4,!0),y=h().getInt32(v+8,!0),b=h().getInt32(v+12,!0),w=x,k=m;if(b)throw w=0,k=0,Y(y);return g=w,f=k,N(w,k)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(g,f,1);}}function Dn(t,e,r,n,o,a){let s,i;try{let m=c.__wbindgen_add_to_stack_pointer(-16),y=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),b=T,w=E(e,c.__wbindgen_export_0,c.__wbindgen_export_1),k=T,v=E(r,c.__wbindgen_export_0,c.__wbindgen_export_1),O=T;c.canonicalize(m,y,b,w,k,v,O,n,o,a);var p=h().getInt32(m+0,!0),u=h().getInt32(m+4,!0),l=h().getInt32(m+8,!0),g=h().getInt32(m+12,!0),f=p,x=u;if(g)throw f=0,x=0,Y(l);return s=f,i=x,N(f,x)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(s,i,1);}}function Wn(t){let e,r;try{let u=c.__wbindgen_add_to_stack_pointer(-16),l=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),g=T;c.count_bits(u,l,g);var n=h().getInt32(u+0,!0),o=h().getInt32(u+4,!0),a=h().getInt32(u+8,!0),s=h().getInt32(u+12,!0),i=n,p=o;if(s)throw i=0,p=0,Y(a);return e=i,r=p,N(i,p)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(e,r,1);}}function Jn(t){let e,r;try{let a=c.__wbindgen_add_to_stack_pointer(-16),s=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),i=T;c.split_bits(a,s,i);var n=h().getInt32(a+0,!0),o=h().getInt32(a+4,!0);return e=n,r=o,N(n,o)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(e,r,1);}}function Mn(t){let e=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),r=T;return c.is_bitmark(e,r)!==0}function Nn(t){let e,r;try{let u=c.__wbindgen_add_to_stack_pointer(-16),l=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),g=T;c.split_json_bits(u,l,g);var n=h().getInt32(u+0,!0),o=h().getInt32(u+4,!0),a=h().getInt32(u+8,!0),s=h().getInt32(u+12,!0),i=n,p=o;if(s)throw i=0,p=0,Y(a);return e=i,r=p,N(i,p)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(e,r,1);}}function Vn(t,e){let r,n;try{let s=c.__wbindgen_add_to_stack_pointer(-16),i=E(t,c.__wbindgen_export_0,c.__wbindgen_export_1),p=T;c.prettify(s,i,p,e);var o=h().getInt32(s+0,!0),a=h().getInt32(s+4,!0);return r=o,n=a,N(o,a)}finally{c.__wbindgen_add_to_stack_pointer(16),c.__wbindgen_export_2(r,n,1);}}async function Hn(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(n){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",n);else throw n}let r=await t.arrayBuffer();return await WebAssembly.instantiate(r,e)}else {let r=await WebAssembly.instantiate(t,e);return r instanceof WebAssembly.Instance?{instance:r,module:t}:r}}function xe(){let t={};return t.wbg={},t.wbg.__wbindgen_error_new=function(e,r){let n=new Error(N(e,r));return wn(n)},t}function ye(t,e){return c=t.exports,we.__wbindgen_wasm_module=e,ct=null,kt=null,c}function $t(t){if(c!==void 0)return c;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=xe();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let r=new WebAssembly.Instance(t,e);return ye(r,t)}async function we(t){if(c!==void 0)return c;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("bitmark_wasm_bg.wasm",import.meta.url));let e=xe();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:r,module:n}=await Hn(await t,e);return ye(r,n)}var Kt=we;var Qt={};Rt(Qt,{breakscape_text:()=>zn,canonicalize:()=>ar,complete:()=>nr,convert:()=>sr,convert_text:()=>Qn,count_bits:()=>pr,default:()=>Xt,diff:()=>er,hover:()=>or,info:()=>Kn,info_text_supported:()=>qn,initSync:()=>Yt,is_bitmark:()=>_r,prettify:()=>dr,register:()=>ir,resolve:()=>rr,resolve_patch_document:()=>tr,split_bits:()=>cr,split_json_bits:()=>ur,transform:()=>Zn,unbreakscape_text:()=>$n});var _,ke=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:true,fatal:true}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&ke.decode();var ht=null;function Pt(){return (ht===null||ht.byteLength===0)&&(ht=new Uint8Array(_.memory.buffer)),ht}function V(t,e){return t=t>>>0,ke.decode(Pt().subarray(t,t+e))}var rt=new Array(128).fill(void 0);rt.push(void 0,null,true,false);var It=rt.length;function Un(t){It===rt.length&&rt.push(rt.length+1);let e=It;return It=rt[e],rt[e]=t,e}var F=0,At=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},Gn=typeof At.encodeInto=="function"?function(t,e){return At.encodeInto(t,e)}:function(t,e){let r=At.encode(t);return e.set(r),{read:t.length,written:r.length}};function R(t,e,r){if(r===void 0){let i=At.encode(t),p=e(i.length,1)>>>0;return Pt().subarray(p,p+i.length).set(i),F=i.length,p}let n=t.length,o=e(n,1)>>>0,a=Pt(),s=0;for(;s<n;s++){let i=t.charCodeAt(s);if(i>127)break;a[o+s]=i;}if(s!==n){s!==0&&(t=t.slice(s)),o=r(o,n,n=s+t.length*3,1)>>>0;let i=Pt().subarray(o+s,o+n),p=Gn(t,i);s+=p.written,o=r(o,n,s,1)>>>0;}return F=s,o}function ve(t){return t==null}var _t=null;function I(){return (_t===null||_t.buffer.detached===true||_t.buffer.detached===void 0&&_t.buffer!==_.memory.buffer)&&(_t=new DataView(_.memory.buffer)),_t}function zn(t,e,r,n){let o,a;try{let l=_.__wbindgen_add_to_stack_pointer(-16),g=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),f=F,x=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),m=F,y=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),b=F;var s=ve(n)?0:R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),i=F;_.breakscape_text(l,g,f,x,m,y,b,s,i);var p=I().getInt32(l+0,!0),u=I().getInt32(l+4,!0);return o=p,a=u,V(p,u)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(o,a,1);}}function $n(t,e,r,n){let o,a;try{let l=_.__wbindgen_add_to_stack_pointer(-16),g=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),f=F,x=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),m=F,y=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),b=F;var s=ve(n)?0:R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),i=F;_.unbreakscape_text(l,g,f,x,m,y,b,s,i);var p=I().getInt32(l+0,!0),u=I().getInt32(l+4,!0);return o=p,a=u,V(p,u)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(o,a,1);}}function Kn(t,e,r,n,o,a,s,i,p){let u,l;try{let x=_.__wbindgen_add_to_stack_pointer(-16),m=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),y=F,b=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),w=F,k=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),v=F,O=R(p,_.__wbindgen_export_0,_.__wbindgen_export_1),A=F;_.info(x,m,y,b,w,k,v,n,o,a,s,i,O,A);var g=I().getInt32(x+0,!0),f=I().getInt32(x+4,!0);return u=g,l=f,V(g,f)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(u,l,1);}}function qn(){return _.info_text_supported()!==0}function Yn(t){return rt[t]}function Xn(t){t<132||(rt[t]=It,It=t);}function X(t){let e=Yn(t);return Xn(t),e}function Qn(t,e,r,n){let o,a;try{let f=_.__wbindgen_add_to_stack_pointer(-16),x=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),m=F,y=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),b=F,w=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),k=F,v=R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),O=F;_.convert_text(f,x,m,y,b,w,k,v,O);var s=I().getInt32(f+0,!0),i=I().getInt32(f+4,!0),p=I().getInt32(f+8,!0),u=I().getInt32(f+12,!0),l=s,g=i;if(u)throw l=0,g=0,X(p);return o=l,a=g,V(l,g)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(o,a,1);}}function Zn(t,e,r,n,o,a,s,i){let p,u;try{let b=_.__wbindgen_add_to_stack_pointer(-16),w=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),k=F,v=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),O=F,A=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),U=F,G=R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),z=F,$=R(o,_.__wbindgen_export_0,_.__wbindgen_export_1),Q=F;_.transform(b,w,k,v,O,A,U,G,z,$,Q,a,s,i);var l=I().getInt32(b+0,!0),g=I().getInt32(b+4,!0),f=I().getInt32(b+8,!0),x=I().getInt32(b+12,!0),m=l,y=g;if(x)throw m=0,y=0,X(f);return p=m,u=y,V(m,y)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(p,u,1);}}function tr(t,e,r){let n,o;try{let g=_.__wbindgen_add_to_stack_pointer(-16),f=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),x=F,m=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),y=F,b=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),w=F;_.resolve_patch_document(g,f,x,m,y,b,w);var a=I().getInt32(g+0,!0),s=I().getInt32(g+4,!0),i=I().getInt32(g+8,!0),p=I().getInt32(g+12,!0),u=a,l=s;if(p)throw u=0,l=0,X(i);return n=u,o=l,V(u,l)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(n,o,1);}}function er(t,e,r,n,o,a,s,i,p){let u,l;try{let w=_.__wbindgen_add_to_stack_pointer(-16),k=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),v=F,O=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),A=F,U=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),G=F,z=R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),$=F;_.diff(w,k,v,O,A,U,G,z,$,o,a,s,i,p);var g=I().getInt32(w+0,!0),f=I().getInt32(w+4,!0),x=I().getInt32(w+8,!0),m=I().getInt32(w+12,!0),y=g,b=f;if(m)throw y=0,b=0,X(x);return u=y,l=b,V(y,b)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(u,l,1);}}function nr(t,e,r,n,o,a){let s,i;try{let m=_.__wbindgen_add_to_stack_pointer(-16),y=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),b=F,w=R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),k=F,v=R(a,_.__wbindgen_export_0,_.__wbindgen_export_1),O=F;_.complete(m,y,b,e,r,w,k,o,v,O);var p=I().getInt32(m+0,!0),u=I().getInt32(m+4,!0),l=I().getInt32(m+8,!0),g=I().getInt32(m+12,!0),f=p,x=u;if(g)throw f=0,x=0,X(l);return s=f,i=x,V(f,x)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(s,i,1);}}function rr(t,e,r,n,o,a,s){let i,p;try{let y=_.__wbindgen_add_to_stack_pointer(-16),b=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),w=F,k=R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),v=F,O=R(a,_.__wbindgen_export_0,_.__wbindgen_export_1),A=F;_.resolve(y,b,w,e,r,k,v,o,O,A,s);var u=I().getInt32(y+0,!0),l=I().getInt32(y+4,!0),g=I().getInt32(y+8,!0),f=I().getInt32(y+12,!0),x=u,m=l;if(f)throw x=0,m=0,X(g);return i=x,p=m,V(x,m)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(i,p,1);}}function or(t,e,r,n){let o,a;try{let f=_.__wbindgen_add_to_stack_pointer(-16),x=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),m=F,y=R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),b=F;_.hover(f,x,m,e,r,y,b);var s=I().getInt32(f+0,!0),i=I().getInt32(f+4,!0),p=I().getInt32(f+8,!0),u=I().getInt32(f+12,!0),l=s,g=i;if(u)throw l=0,g=0,X(p);return o=l,a=g,V(l,g)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(o,a,1);}}function ir(t,e){try{let o=_.__wbindgen_add_to_stack_pointer(-16),a=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),s=F,i=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),p=F;_.register(o,a,s,i,p);var r=I().getInt32(o+0,!0),n=I().getInt32(o+4,!0);if(n)throw X(r)}finally{_.__wbindgen_add_to_stack_pointer(16);}}function sr(t,e,r,n,o,a,s,i,p,u,l){let g,f;try{let v=_.__wbindgen_add_to_stack_pointer(-16),O=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),A=F,U=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),G=F,z=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),$=F,Q=R(n,_.__wbindgen_export_0,_.__wbindgen_export_1),mt=F,bt=R(u,_.__wbindgen_export_0,_.__wbindgen_export_1),xt=F,yt=R(l,_.__wbindgen_export_0,_.__wbindgen_export_1),wt=F;_.convert(v,O,A,U,G,z,$,Q,mt,o,a,s,i,p,bt,xt,yt,wt);var x=I().getInt32(v+0,!0),m=I().getInt32(v+4,!0),y=I().getInt32(v+8,!0),b=I().getInt32(v+12,!0),w=x,k=m;if(b)throw w=0,k=0,X(y);return g=w,f=k,V(w,k)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(g,f,1);}}function ar(t,e,r,n,o,a){let s,i;try{let m=_.__wbindgen_add_to_stack_pointer(-16),y=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),b=F,w=R(e,_.__wbindgen_export_0,_.__wbindgen_export_1),k=F,v=R(r,_.__wbindgen_export_0,_.__wbindgen_export_1),O=F;_.canonicalize(m,y,b,w,k,v,O,n,o,a);var p=I().getInt32(m+0,!0),u=I().getInt32(m+4,!0),l=I().getInt32(m+8,!0),g=I().getInt32(m+12,!0),f=p,x=u;if(g)throw f=0,x=0,X(l);return s=f,i=x,V(f,x)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(s,i,1);}}function pr(t){let e,r;try{let u=_.__wbindgen_add_to_stack_pointer(-16),l=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),g=F;_.count_bits(u,l,g);var n=I().getInt32(u+0,!0),o=I().getInt32(u+4,!0),a=I().getInt32(u+8,!0),s=I().getInt32(u+12,!0),i=n,p=o;if(s)throw i=0,p=0,X(a);return e=i,r=p,V(i,p)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(e,r,1);}}function cr(t){let e,r;try{let a=_.__wbindgen_add_to_stack_pointer(-16),s=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),i=F;_.split_bits(a,s,i);var n=I().getInt32(a+0,!0),o=I().getInt32(a+4,!0);return e=n,r=o,V(n,o)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(e,r,1);}}function _r(t){let e=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),r=F;return _.is_bitmark(e,r)!==0}function ur(t){let e,r;try{let u=_.__wbindgen_add_to_stack_pointer(-16),l=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),g=F;_.split_json_bits(u,l,g);var n=I().getInt32(u+0,!0),o=I().getInt32(u+4,!0),a=I().getInt32(u+8,!0),s=I().getInt32(u+12,!0),i=n,p=o;if(s)throw i=0,p=0,X(a);return e=i,r=p,V(i,p)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(e,r,1);}}function dr(t,e){let r,n;try{let s=_.__wbindgen_add_to_stack_pointer(-16),i=R(t,_.__wbindgen_export_0,_.__wbindgen_export_1),p=F;_.prettify(s,i,p,e);var o=I().getInt32(s+0,!0),a=I().getInt32(s+4,!0);return r=o,n=a,V(o,a)}finally{_.__wbindgen_add_to_stack_pointer(16),_.__wbindgen_export_2(r,n,1);}}async function lr(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(n){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",n);else throw n}let r=await t.arrayBuffer();return await WebAssembly.instantiate(r,e)}else {let r=await WebAssembly.instantiate(t,e);return r instanceof WebAssembly.Instance?{instance:r,module:t}:r}}function he(){let t={};return t.wbg={},t.wbg.__wbindgen_error_new=function(e,r){let n=new Error(V(e,r));return Un(n)},t}function Ie(t,e){return _=t.exports,Oe.__wbindgen_wasm_module=e,_t=null,ht=null,_}function Yt(t){if(_!==void 0)return _;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=he();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let r=new WebAssembly.Instance(t,e);return Ie(r,t)}async function Oe(t){if(_!==void 0)return _;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("bitmark_browser_full_wasm_bg.wasm",import.meta.url));let e=he();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:r,module:n}=await lr(await t,e);return Ie(r,n)}var Xt=Oe;var ee={};Rt(ee,{breakscape_text:()=>mr,canonicalize:()=>Er,complete:()=>Ir,convert:()=>Fr,convert_text:()=>jr,count_bits:()=>Rr,default:()=>te,hover:()=>Tr,info:()=>xr,initSync:()=>Zt,is_bitmark:()=>Br,prettify:()=>Ar,register:()=>kr,resolve:()=>Or,resolve_patch_document:()=>hr,split_bits:()=>Sr,split_json_bits:()=>Pr,transform:()=>vr,unbreakscape_text:()=>br});var d,Te=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:true,fatal:true}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&Te.decode();var Ot=null;function jt(){return (Ot===null||Ot.byteLength===0)&&(Ot=new Uint8Array(d.memory.buffer)),Ot}function H(t,e){return t=t>>>0,Te.decode(jt().subarray(t,t+e))}var ot=new Array(128).fill(void 0);ot.push(void 0,null,true,false);var Tt=ot.length;function gr(t){Tt===ot.length&&ot.push(ot.length+1);let e=Tt;return Tt=ot[e],ot[e]=t,e}var B=0,Lt=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},fr=typeof Lt.encodeInto=="function"?function(t,e){return Lt.encodeInto(t,e)}:function(t,e){let r=Lt.encode(t);return e.set(r),{read:t.length,written:r.length}};function P(t,e,r){if(r===void 0){let i=Lt.encode(t),p=e(i.length,1)>>>0;return jt().subarray(p,p+i.length).set(i),B=i.length,p}let n=t.length,o=e(n,1)>>>0,a=jt(),s=0;for(;s<n;s++){let i=t.charCodeAt(s);if(i>127)break;a[o+s]=i;}if(s!==n){s!==0&&(t=t.slice(s)),o=r(o,n,n=s+t.length*3,1)>>>0;let i=jt().subarray(o+s,o+n),p=fr(t,i);s+=p.written,o=r(o,n,s,1)>>>0;}return B=s,o}function Fe(t){return t==null}var ut=null;function S(){return (ut===null||ut.buffer.detached===true||ut.buffer.detached===void 0&&ut.buffer!==d.memory.buffer)&&(ut=new DataView(d.memory.buffer)),ut}function mr(t,e,r,n){let o,a;try{let l=d.__wbindgen_add_to_stack_pointer(-16),g=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),f=B,x=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),m=B,y=P(r,d.__wbindgen_export_0,d.__wbindgen_export_1),b=B;var s=Fe(n)?0:P(n,d.__wbindgen_export_0,d.__wbindgen_export_1),i=B;d.breakscape_text(l,g,f,x,m,y,b,s,i);var p=S().getInt32(l+0,!0),u=S().getInt32(l+4,!0);return o=p,a=u,H(p,u)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(o,a,1);}}function br(t,e,r,n){let o,a;try{let l=d.__wbindgen_add_to_stack_pointer(-16),g=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),f=B,x=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),m=B,y=P(r,d.__wbindgen_export_0,d.__wbindgen_export_1),b=B;var s=Fe(n)?0:P(n,d.__wbindgen_export_0,d.__wbindgen_export_1),i=B;d.unbreakscape_text(l,g,f,x,m,y,b,s,i);var p=S().getInt32(l+0,!0),u=S().getInt32(l+4,!0);return o=p,a=u,H(p,u)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(o,a,1);}}function xr(t,e,r,n,o,a,s,i,p){let u,l;try{let x=d.__wbindgen_add_to_stack_pointer(-16),m=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),y=B,b=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),w=B,k=P(r,d.__wbindgen_export_0,d.__wbindgen_export_1),v=B,O=P(p,d.__wbindgen_export_0,d.__wbindgen_export_1),A=B;d.info(x,m,y,b,w,k,v,n,o,a,s,i,O,A);var g=S().getInt32(x+0,!0),f=S().getInt32(x+4,!0);return u=g,l=f,H(g,f)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(u,l,1);}}function yr(t){return ot[t]}function wr(t){t<132||(ot[t]=Tt,Tt=t);}function Z(t){let e=yr(t);return wr(t),e}function kr(t,e){try{let o=d.__wbindgen_add_to_stack_pointer(-16),a=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),s=B,i=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),p=B;d.register(o,a,s,i,p);var r=S().getInt32(o+0,!0),n=S().getInt32(o+4,!0);if(n)throw Z(r)}finally{d.__wbindgen_add_to_stack_pointer(16);}}function vr(t,e,r,n,o,a,s,i){let p,u;try{let b=d.__wbindgen_add_to_stack_pointer(-16),w=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),k=B,v=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),O=B,A=P(r,d.__wbindgen_export_0,d.__wbindgen_export_1),U=B,G=P(n,d.__wbindgen_export_0,d.__wbindgen_export_1),z=B,$=P(o,d.__wbindgen_export_0,d.__wbindgen_export_1),Q=B;d.transform(b,w,k,v,O,A,U,G,z,$,Q,a,s,i);var l=S().getInt32(b+0,!0),g=S().getInt32(b+4,!0),f=S().getInt32(b+8,!0),x=S().getInt32(b+12,!0),m=l,y=g;if(x)throw m=0,y=0,Z(f);return p=m,u=y,H(m,y)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(p,u,1);}}function hr(t,e,r){let n,o;try{let g=d.__wbindgen_add_to_stack_pointer(-16),f=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),x=B,m=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),y=B,b=P(r,d.__wbindgen_export_0,d.__wbindgen_export_1),w=B;d.resolve_patch_document(g,f,x,m,y,b,w);var a=S().getInt32(g+0,!0),s=S().getInt32(g+4,!0),i=S().getInt32(g+8,!0),p=S().getInt32(g+12,!0),u=a,l=s;if(p)throw u=0,l=0,Z(i);return n=u,o=l,H(u,l)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(n,o,1);}}function Ir(t,e,r,n,o,a){let s,i;try{let m=d.__wbindgen_add_to_stack_pointer(-16),y=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),b=B,w=P(n,d.__wbindgen_export_0,d.__wbindgen_export_1),k=B,v=P(a,d.__wbindgen_export_0,d.__wbindgen_export_1),O=B;d.complete(m,y,b,e,r,w,k,o,v,O);var p=S().getInt32(m+0,!0),u=S().getInt32(m+4,!0),l=S().getInt32(m+8,!0),g=S().getInt32(m+12,!0),f=p,x=u;if(g)throw f=0,x=0,Z(l);return s=f,i=x,H(f,x)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(s,i,1);}}function Or(t,e,r,n,o,a,s){let i,p;try{let y=d.__wbindgen_add_to_stack_pointer(-16),b=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),w=B,k=P(n,d.__wbindgen_export_0,d.__wbindgen_export_1),v=B,O=P(a,d.__wbindgen_export_0,d.__wbindgen_export_1),A=B;d.resolve(y,b,w,e,r,k,v,o,O,A,s);var u=S().getInt32(y+0,!0),l=S().getInt32(y+4,!0),g=S().getInt32(y+8,!0),f=S().getInt32(y+12,!0),x=u,m=l;if(f)throw x=0,m=0,Z(g);return i=x,p=m,H(x,m)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(i,p,1);}}function Tr(t,e,r,n){let o,a;try{let f=d.__wbindgen_add_to_stack_pointer(-16),x=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),m=B,y=P(n,d.__wbindgen_export_0,d.__wbindgen_export_1),b=B;d.hover(f,x,m,e,r,y,b);var s=S().getInt32(f+0,!0),i=S().getInt32(f+4,!0),p=S().getInt32(f+8,!0),u=S().getInt32(f+12,!0),l=s,g=i;if(u)throw l=0,g=0,Z(p);return o=l,a=g,H(l,g)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(o,a,1);}}function Fr(t,e,r,n,o,a,s,i,p,u,l){let g,f;try{let v=d.__wbindgen_add_to_stack_pointer(-16),O=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),A=B,U=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),G=B,z=P(r,d.__wbindgen_export_0,d.__wbindgen_export_1),$=B,Q=P(n,d.__wbindgen_export_0,d.__wbindgen_export_1),mt=B,bt=P(u,d.__wbindgen_export_0,d.__wbindgen_export_1),xt=B,yt=P(l,d.__wbindgen_export_0,d.__wbindgen_export_1),wt=B;d.convert(v,O,A,U,G,z,$,Q,mt,o,a,s,i,p,bt,xt,yt,wt);var x=S().getInt32(v+0,!0),m=S().getInt32(v+4,!0),y=S().getInt32(v+8,!0),b=S().getInt32(v+12,!0),w=x,k=m;if(b)throw w=0,k=0,Z(y);return g=w,f=k,H(w,k)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(g,f,1);}}function Er(t,e,r,n,o,a){let s,i;try{let m=d.__wbindgen_add_to_stack_pointer(-16),y=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),b=B,w=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),k=B,v=P(r,d.__wbindgen_export_0,d.__wbindgen_export_1),O=B;d.canonicalize(m,y,b,w,k,v,O,n,o,a);var p=S().getInt32(m+0,!0),u=S().getInt32(m+4,!0),l=S().getInt32(m+8,!0),g=S().getInt32(m+12,!0),f=p,x=u;if(g)throw f=0,x=0,Z(l);return s=f,i=x,H(f,x)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(s,i,1);}}function Rr(t){let e,r;try{let u=d.__wbindgen_add_to_stack_pointer(-16),l=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),g=B;d.count_bits(u,l,g);var n=S().getInt32(u+0,!0),o=S().getInt32(u+4,!0),a=S().getInt32(u+8,!0),s=S().getInt32(u+12,!0),i=n,p=o;if(s)throw i=0,p=0,Z(a);return e=i,r=p,H(i,p)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(e,r,1);}}function Sr(t){let e,r;try{let a=d.__wbindgen_add_to_stack_pointer(-16),s=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),i=B;d.split_bits(a,s,i);var n=S().getInt32(a+0,!0),o=S().getInt32(a+4,!0);return e=n,r=o,H(n,o)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(e,r,1);}}function Br(t){let e=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),r=B;return d.is_bitmark(e,r)!==0}function Pr(t){let e,r;try{let u=d.__wbindgen_add_to_stack_pointer(-16),l=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),g=B;d.split_json_bits(u,l,g);var n=S().getInt32(u+0,!0),o=S().getInt32(u+4,!0),a=S().getInt32(u+8,!0),s=S().getInt32(u+12,!0),i=n,p=o;if(s)throw i=0,p=0,Z(a);return e=i,r=p,H(i,p)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(e,r,1);}}function Ar(t,e){let r,n;try{let s=d.__wbindgen_add_to_stack_pointer(-16),i=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),p=B;d.prettify(s,i,p,e);var o=S().getInt32(s+0,!0),a=S().getInt32(s+4,!0);return r=o,n=a,H(o,a)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(r,n,1);}}function jr(t,e,r,n){let o,a;try{let f=d.__wbindgen_add_to_stack_pointer(-16),x=P(t,d.__wbindgen_export_0,d.__wbindgen_export_1),m=B,y=P(e,d.__wbindgen_export_0,d.__wbindgen_export_1),b=B,w=P(r,d.__wbindgen_export_0,d.__wbindgen_export_1),k=B,v=P(n,d.__wbindgen_export_0,d.__wbindgen_export_1),O=B;d.convert_text(f,x,m,y,b,w,k,v,O);var s=S().getInt32(f+0,!0),i=S().getInt32(f+4,!0),p=S().getInt32(f+8,!0),u=S().getInt32(f+12,!0),l=s,g=i;if(u)throw l=0,g=0,Z(p);return o=l,a=g,H(l,g)}finally{d.__wbindgen_add_to_stack_pointer(16),d.__wbindgen_export_2(o,a,1);}}async function Lr(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(n){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",n);else throw n}let r=await t.arrayBuffer();return await WebAssembly.instantiate(r,e)}else {let r=await WebAssembly.instantiate(t,e);return r instanceof WebAssembly.Instance?{instance:r,module:t}:r}}function Ee(){let t={};return t.wbg={},t.wbg.__wbindgen_error_new=function(e,r){let n=new Error(H(e,r));return gr(n)},t}function Re(t,e){return d=t.exports,Se.__wbindgen_wasm_module=e,ut=null,Ot=null,d}function Zt(t){if(d!==void 0)return d;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=Ee();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let r=new WebAssembly.Instance(t,e);return Re(r,t)}async function Se(t){if(d!==void 0)return d;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("bitmark_json_wasm_bg.wasm",import.meta.url));let e=Ee();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:r,module:n}=await Lr(await t,e);return Re(r,n)}var te=Se;var Ft={version:"7.5.0"};var ne="browser-full",Dt=class extends Error{constructor(){super("wasm not initialised: call init() (or init({ feature: \u2026 })) first"),this.name="NotInitializedError";}},lt=class extends Error{constructor(e){super(e),this.name="RegisterError";}},it=class extends Error{constructor(r){let n=r.map(o=>`${o.kind} at ${o.path}: ${o.message}`);super(`${r.length} patch ${r.length===1?"entry was":"entries were"} skipped:
|
|
2
2
|
`+n.join(`
|
|
3
3
|
`));C(this,"diagnostics");this.name="PatchError",this.diagnostics=r;}},st=class extends Error{constructor(e,r){super(`${e} is not available in the loaded wasm module${r?` (feature: "${r}")`:""}; init({ feature: "full" }) to load it`),this.name="UnsupportedFeatureError";}},Ct,Pe,Be,Ae=new Map;function D(){if(!Ct&&Be&&Be(),!Ct)throw new Dt;return Ct}function re(t,e){for(let[r,n]of Ae)try{e.register(r,n);}catch(o){throw new lt(o instanceof Error?o.message:String(o))}Ct=e,Pe=t;}function je(t,e){Ae.set(t,e);}function et(){return Pe}function Cr(t){let e=t.trim();return e.startsWith("[")&&e.endsWith("]")?e.slice(1,-1):t}function Dr(t){return t===void 0?"":typeof t=="string"?t.trim():JSON.stringify(t)}function Wr(t,e,r){if(r){let o=JSON.parse(t.split_bits(e));return o.map(a=>({view:{format:"bitmark",index:a.index,total:o.length,source:a.source},source:a.source}))}let n=JSON.parse(t.split_json_bits(e));return n.map((o,a)=>({view:{format:"json",index:a,total:n.length,bit:o.bit??{}},source:JSON.stringify([o])}))}function oe(t,e,r){let n=r.mode??"optimized",o=r.outputFormat??"json",a=r.spacesAroundValues??1,s=r.indent??2,i=r.pretty??false,p=r.inputFormat??"auto",u=p==="bitmark"||p!=="json"&&t.is_bitmark(e),l=u?"bitmark":"json";t.transform("","bitmark",o,n,"",false,s,a);let g=Wr(t,e,u),f=g.length,x=[];for(let k=0;k<f;k++){let{view:v}=g[k];v.index=k,v.total=f;let O=r.preHook?r.preHook(v)||{}:{};x.push(O.drop?null:{patches:O.patches??[],outputFormat:O.outputFormat??o});}let m=Dr(r.patch),y;m===""?y=g.map((k,v)=>({source:v,bit:null,patch:[]})):y=JSON.parse(t.resolve_patch_document(e,l,m));let b=[],w=[];for(let k of y)if(k.source!==null){let v=x[k.source];if(!v)continue;b.push({index:k.source,source:g[k.source].source,inputFormat:l,outputFormat:v.outputFormat,mode:n,patchJson:JSON.stringify([...k.patch,...v.patches]),spacesAroundValues:a}),w.push(g[k.source].view);}else if(typeof k.bit=="string"){let v=b.length;b.push({index:v,source:k.bit,inputFormat:"bitmark",outputFormat:o,mode:n,patchJson:JSON.stringify(k.patch),spacesAroundValues:a}),w.push({format:"bitmark",index:v,total:f,source:k.bit});}else {let v=k.bit??{},O=b.length;b.push({index:O,source:JSON.stringify([{bit:v}]),inputFormat:"json",outputFormat:o,mode:n,patchJson:JSON.stringify(k.patch),spacesAroundValues:a}),w.push({format:"json",index:O,total:f,bit:v});}return {jobs:b,views:w,output:o,pretty:i,indent:s}}function Jr(t,e){let{data:r,diagnostics:n}=JSON.parse(t);return {element:e==="json"?Cr(r):r,diagnostics:n}}function Mr(t,e){return Jr(t.transform(e.source,e.inputFormat,e.outputFormat,e.mode,e.patchJson,false,2,e.spacesAroundValues),e.outputFormat)}function ie(t,e,r,n,o){if(r!=="json")return e.join(`
|
|
4
4
|
`);let a=`[${e.join(",")}]`;return n?t.prettify(a,o):a}function Le(t,e,r){let n=oe(t,e,r),o=[],a=[];for(let s=0;s<n.jobs.length;s++){let{element:i,diagnostics:p}=Mr(t,n.jobs[s]);a.push(...p),r.postHook?.(n.views[s],i),o.push(i);}if(a.length>0)throw new it(a);return ie(t,o,n.output,n.pretty,n.indent)}async function Ce(t,e,r,n){let o=oe(t,e,r),a=await n(o.jobs,r.workers??4),s=[],i=[];for(let p=0;p<a.length;p++)s.push(a[p].element),i.push(...a[p].diagnostics),r.postHook?.(o.views[p],a[p].element);if(i.length>0)throw new it(i);return ie(t,s,o.output,o.pretty,o.indent)}var se;function De(t){se=t;}function W(){if(!se)throw new Error("legacy API not initialised: the WASM module has not been provided (browser consumers must call init() first)");return se()}function We(t,e,r){if(t.length===0)return Promise.resolve([]);let n=Math.max(1,Math.min(e,t.length));return new Promise((o,a)=>{let s=new Array(t.length),i=0,p=0,u=false,l=[],g=x=>{if(!u){u=true;for(let m of l)m.terminate();x?a(x):o(s);}},f=x=>{if(u||i>=t.length)return;let m=i++;x.post({id:m,job:t[m]});};for(let x=0;x<n;x++){let m=r(y=>{if(!u){if(!y.ok)return g(new Error(y.error??"worker job failed"));s[y.id]={element:y.element,diagnostics:y.diagnostics??[]},++p===t.length?g():f(m);}},g);l.push(m);}for(let x of l)f(x);})}function Je(t,e,r){let n=new URL("./worker-entry.js",import.meta.url);return We(t,e,(o,a)=>{let s=new Worker(n,{type:"module"});return s.onmessage=i=>o(i.data),s.onerror=i=>a(new Error(i.message||"worker error")),{post:i=>s.postMessage({...i,feature:r}),terminate:()=>s.terminate()}})}var ln={};Rt(ln,{Ast:()=>Qe,BitType:()=>Ke,BitmarkFileGenerator:()=>en,BitmarkGenerator:()=>Ze,BitmarkParser:()=>pn,BitmarkParserGenerator:()=>Ut,BitmarkParserType:()=>Xr,BitmarkStringGenerator:()=>tn,BitmarkVersion:()=>qr,BodyTextFormat:()=>to,BoundingBoxIndex:()=>Xe,Builder:()=>Ht,CardSetVersion:()=>Yr,FileWriter:()=>un,HtmlTableGenerator:()=>sn,HtmlTableParser:()=>an,InfoFormat:()=>Zr,InfoType:()=>Qr,Input:()=>zr,InputFormat:()=>Kr,JsonFileGenerator:()=>on,JsonGenerator:()=>nn,JsonParser:()=>cn,JsonStringGenerator:()=>rn,LegacyUnsupportedError:()=>gt,NodeType:()=>Ye,Output:()=>$r,ResourceBuilder:()=>Gt,StreamWriter:()=>dn,StringWriter:()=>_n,TextLocation:()=>eo,TextMarkType:()=>ze,TextNodeType:()=>$e,bitmarkTextParse:()=>Ue,isPseudoAst:()=>Ne});var gt=class extends Error{constructor(e){super(e),this.name="LegacyUnsupportedError";}};function pt(t,e){throw new gt(`'${t}' is not supported by the @gmb/bitmark-parser legacy API`+(e?`: ${e}`:""))}function tt(t,e){throw new gt(`Option '${t}' is not supported by the @gmb/bitmark-parser legacy API`+(e?`: ${e}`:""))}var ae="bitmark v2 output is not supported (this parser is bitmark v3 only)";function pe(t){t.bitmarkVersion===2&&tt("bitmarkVersion: 2",ae);}function Jt(t){t.explicitTextFormat&&tt("bitmarkOptions.explicitTextFormat"),t.cardSetVersion===1&&tt("bitmarkOptions.cardSetVersion: 1",ae),t.debugGenerationInline&&tt("bitmarkOptions.debugGenerationInline"),t.noBreakscaping&&tt("bitmarkOptions.noBreakscaping");}function Mt(t){t.textAsPlainText&&tt("jsonOptions.textAsPlainText",ae),t.debugGenerationInline&&tt("jsonOptions.debugGenerationInline");}function dt(t){return t===true?{pretty:true,indent:2}:typeof t=="number"&&t>0?{pretty:true,indent:t}:{pretty:false,indent:2}}function Nt(t){return t===void 0||t===true?1:t===false?0:Math.max(0,Math.min(10,t))}function Vt(t){switch(t){case "text":case "latex":case "json":case "xml":return "plainText";default:return "bitmark++"}}var Me=Symbol.for("@gmb/bitmark-parser/legacy-pseudo-ast");function ft(t){let e={bits:t};return Object.defineProperty(e,Me,{value:true,enumerable:false}),e}function Ne(t){return t!==null&&typeof t=="object"&&(Me in t||Array.isArray(t.bits))}var Ve={"extractor-image":{key:"images",resourceType:"image"},"extractor-image-collapsible":{key:"images",resourceType:"image"},"images-logo-grave":{key:"logos",resourceType:"image"},"prototype-images":{key:"images",resourceType:"image"}};var ce=Symbol.for("@gmb/bitmark-parser/legacy-built-bit-parser"),Vr={bitType:"type",textFormat:"format",flashcards:"cards",markConfig:"marks"},Hr={"bitmark--":"bitmark++","bitmark+":"bitmark++"},Ur={bitmark:"bitmark++",text:"text",json:"json",latex:"latex",xml:"xml"},Gr=["title","subtitle","item","lead","pageNumber","marginNumber","hint","instruction","caption"],Ht=class{buildBitmark(e){let r=ft(e.bits??[]);return e.errors!==void 0&&(r.errors=e.errors),r}buildBit(e,r){let n=W(),o={...e},a=o.bitType,s=this.getBitConfig(a),i={};i.type=a,o.isCommented&&(i.type="_comment",i.originalType=a),delete o.bitType,delete o.isCommented;let p=o.textFormat;p!==void 0?(i.format=Hr[p]??p,delete o.textFormat):i.format=Ur[s.bodyFormat??""]??"bitmark++",delete o.resourceType;let u=o.body;u!=null&&typeof u=="object"&&"body"in u&&(i.body=u.body,delete o.body),o.example!==void 0?(i.isExample=true,i.example=o.example,delete o.example,delete o.__isDefaultExample):o.__isDefaultExample&&(i.isExample=true,delete o.__isDefaultExample);let l=o.resources;if(l!==void 0&&a!==void 0){let b=Array.isArray(l)?l:[l],w=Ve[a];w?i[w.key]=b.filter(k=>k!==null&&typeof k=="object"&&k.type===w.resourceType):b.length>=1&&(i.resource=b[0]),delete o.resources;}let g=o.parser;delete o.parser;let f=o.extraProperties;delete o.extraProperties;for(let[b,w]of Object.entries(o))w!==void 0&&(i[Vr[b]??b]=w);if(f)for(let[b,w]of Object.entries(f))b in i||(i[b]=w);this.parseStringTexts(i);let x=n.convert(JSON.stringify([{bit:i}]),"json","json","optimized",false,2,1,false,false,"",""),y=JSON.parse(x)[0]?.bit??i;for(let[b,w]of Object.entries(i))b in y||w===false||w===""||w===null||Array.isArray(w)&&w.length===0||(y[b]=w);return g!==void 0&&Object.defineProperty(y,ce,{value:g,enumerable:false}),y}buildHighlight(e,r){if(!r)return;let n={...r},o=n.attrs;return o&&Object.assign(n,o),{type:"highlight",texts:Array.isArray(n.texts)?n.texts.filter(i=>i!=null).map(i=>({text:i.text??"",isCorrect:i.isCorrect??false,isHighlighted:i.isHighlighted??false,...He(i,["text","isCorrect","isHighlighted"])})):[],prefix:n.prefix??"",postfix:n.postfix??"",...He(n,["type","texts","prefix","postfix","attrs"]),attrs:{}}}parseStringTexts(e){let r=W(),n=(s,i)=>{if(s==="")return s;let p=r.convert_text(s,"textToAst","bitmark++",i);try{return JSON.parse(p)}catch{return s}},o=e.format,a=o===void 0||o==="bitmark++"||o==="bitmark+";if(typeof e.body=="string")if(o==="json")try{e.body=JSON.parse(e.body);}catch{e.body=null;}else a&&(e.body=n(e.body,"body"));for(let s of Gr){let i=e[s];typeof i=="string"&&(e[s]=n(i,"tag"));}}getBitConfig(e){let r=W();if(e!==void 0)try{let n=JSON.parse(r.info("bit","json",e,!1,2,!1,!1,!0,""));if(n.error===void 0)return {bodyFormat:n.body?.format}}catch{}throw new Error(`No config found for bit: ${e}`)}};function He(t,e){let r={};for(let[n,o]of Object.entries(t))o!==void 0&&!e.includes(n)&&(r[n]=o);return r}var Ut=class{version(){return Ft.version}convert(e,r){let n=Object.assign({},r),o=Object.assign({},n.jsonOptions),a=Object.assign({},n.bitmarkOptions);pe(n),Jt(a),Mt(o),this.checkBrowserFileWrite(n.outputFile);let s=W(),{source:i,isBitmark:p}=this.resolveInput(e,n.inputFormat),u=n.outputFormat??(p?"json":"bitmark"),l=u==="ast"?"json":u,{pretty:g,indent:f}=dt(o.prettify),x=l==="bitmark"?dt(a.prettifyJson):{pretty:g,indent:f},m=Nt(a.spacesAroundValues),y=!o.excludeUnknownProperties,b=s.convert(i,p?"bitmark":"json",l,"optimized",x.pretty,x.indent,m,y,false,"","");if(u==="bitmark"||u==="text")return this.deliver(b,n.outputFile,n.fileOptions);if(u==="json")return n.outputFile?this.deliver(b,n.outputFile,n.fileOptions):g||o.stringify?b:JSON.parse(b);let w=ft(JSON.parse(b));return n.outputFile?this.deliver(JSON.stringify(w),n.outputFile,n.fileOptions):w}upgrade(e,r){let n=Object.assign({},r),o=Object.assign({},n.jsonOptions),a=Object.assign({},n.bitmarkOptions);pe(n),Jt(a),Mt(o),this.checkBrowserFileWrite(n.outputFile);let s=W(),{source:i,isBitmark:p}=this.resolveInput(e,n.inputFormat),{pretty:u,indent:l}=dt(p?a.prettifyJson:o.prettify),g=Nt(a.spacesAroundValues),f=s.canonicalize(i,p?"bitmark":"json","optimized",u,l,g);return p?this.deliver(f,n.outputFile,n.fileOptions):n.outputFile?this.deliver(f,n.outputFile,n.fileOptions):u||o.stringify?f:JSON.parse(f)}info(e){let r=Object.assign({},e),n=W(),o=r.type??"list",a=r.outputFormat??"text",{pretty:s,indent:i}=dt(r.prettify),p=a==="pojo"?"json":a,u=n.info(o,p,r.bit??"",s,i,false,false,true,"");return a==="pojo"?JSON.parse(u):u}generateConfig(e){pt("BitmarkParserGenerator.generateConfig","bpg-internal development tool");}convertHtmlTable(e,r){let n=Object.assign({},r),o=Object.assign({},n.jsonOptions),a=Object.assign({},n.bitmarkOptions);Jt(a),Mt(o),n.keepUnknownTags&&tt("keepUnknownTags"),n.noBreakscaping&&tt("noBreakscaping"),this.checkBrowserFileWrite(n.outputFile);let s=W(),i=typeof e=="string"?this.maybeReadFile(e,void 0):"";if(!(n.inputFormat==="html"||n.inputFormat===void 0&&typeof e=="string"&&/<table[\s>]/iu.test(i))){let{source:k,isBitmark:v}=this.resolveInput(e,void 0),O=s.convert(k,v?"bitmark":"json","html","optimized",false,2,1,false,false,"","");return this.deliver(_e(O).join(`
|