@sec-ant/barcode-detector
Advanced tools
Comparing version 1.3.2 to 1.3.3
@@ -1,3 +0,3 @@ | ||
"use strict";var ke=(c,p,i)=>{if(!p.has(c))throw TypeError("Cannot "+i)};var Ue=(c,p,i)=>(ke(c,p,"read from private field"),i?i.call(c):p.get(c)),Be=(c,p,i)=>{if(p.has(c))throw TypeError("Cannot add the same private member more than once");p instanceof WeakSet?p.add(c):p.set(c,i)},Ve=(c,p,i,g)=>(ke(c,p,"write to private field"),g?g.call(c,i):p.set(c,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Le=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function Ia(c){if(Xe(c))return{width:c.naturalWidth,height:c.naturalHeight};if(qe(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(Ze(c))return{width:c.videoWidth,height:c.videoHeight};if(Je(c))return{width:c.width,height:c.height};if(tr(c))return{width:c.displayWidth,height:c.displayHeight};if(Qe(c))return{width:c.width,height:c.height};if(Ke(c))return{width:c.width,height:c.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function Xe(c){try{return c instanceof HTMLImageElement}catch{return!1}}function qe(c){try{return c instanceof SVGImageElement}catch{return!1}}function Ze(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function Qe(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function Je(c){try{return c instanceof ImageBitmap}catch{return!1}}function Ke(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function tr(c){try{return c instanceof VideoFrame}catch{return!1}}function Wa(c){try{return c instanceof Blob}catch{return!1}}function Ha(c){try{return c instanceof ImageData}catch{return!1}}function ka(c,p){try{const i=new OffscreenCanvas(c,p);if(i.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return i;throw void 0}catch{const i=document.createElement("canvas");return i.width=c,i.height=p,i}}async function er(c){if(Xe(c)&&!await La(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(qe(c)&&!await za(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(tr(c)&&Ya(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Ze(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(Je(c)&&Ga(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:p,height:i}=Ia(c);if(p===0||i===0)return null;const w=ka(p,i).getContext("2d");w.drawImage(c,0,0);try{return w.getImageData(0,0,p,i)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ua(c){let p;try{if(createImageBitmap)p=await createImageBitmap(c);else{p=new Image;let g="";try{g=URL.createObjectURL(c),p.src=g,await p.decode()}finally{URL.revokeObjectURL(g)}}}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await er(p)}function Ba(c){const{width:p,height:i}=c;if(p===0||i===0)return null;const g=c.getContext("2d");try{return g.getImageData(0,0,p,i)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Va(c){if(Wa(c))return await Ua(c);if(Ha(c)){if(Na(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return Qe(c)||Ke(c)?Ba(c):await er(c)}async function La(c){try{return await c.decode(),!0}catch{return!1}}async function za(c){var p;try{return await((p=c.decode)==null?void 0:p.call(c)),!0}catch{return!1}}function Ya(c){return c.format===null}function Na(c){return c.data.buffer.byteLength===0}function Ga(c){return c.width===0&&c.height===0}function ze(c,p){return c instanceof DOMException?new DOMException(`${p}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${p}: ${c.message}`):new Error(`${p}: ${c}`)}const Ye=c=>{let p;const i=new Set,g=(M,Y)=>{const U=typeof M=="function"?M(p):M;if(!Object.is(U,p)){const j=p;p=Y??typeof U!="object"?U:Object.assign({},p,U),i.forEach(N=>N(p,j))}},w=()=>p,E={setState:g,getState:w,subscribe:M=>(i.add(M),()=>i.delete(M)),destroy:()=>{i.clear()}};return p=c(g,w,E),E},Xa=c=>c?Ye(c):Ye,qa={locateFile:(c,p)=>{var i;const g=(i=c.match(/_(.+?)\.wasm$/))==null?void 0:i[1];return g?`https://cdn.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.4/dist/${g}/${c}`:p+c}},dt=Xa()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:qa}));function Za(c){dt.setState({zxingModuleOverrides:c})}function rr(c,p=dt.getState().zxingModuleOverrides){const{zxingModuleWeakMap:i}=dt.getState(),g=i.get(c);if(g&&Object.is(p,dt.getState().zxingModuleOverrides))return g;{dt.setState({zxingModuleOverrides:p});const w=c(p);return i.set(c,w),w}}const Ne=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","UPC-A","UPC-E"],nt={tryHarder:!0,formats:[],maxSymbols:255};async function Qa(c,{tryHarder:p=nt.tryHarder,formats:i=nt.formats,maxSymbols:g=nt.maxSymbols}=nt,w){const E=await rr(w,dt.getState().zxingModuleOverrides),{data:M,width:Y,height:U,data:{byteLength:j}}=c,N=E._malloc(j);E.HEAP8.set(M,N);const X=E.readBarcodesFromPixmap(N,Y,U,p,Ja(i),g);E._free(N);const V=[];for(let B=0;B<X.size();++B){const q=X.get(B);V.push({...q,format:Ka(q.format)})}return V}function Ja(c){return c.join("|")}function Ka(c){const p=Ge(c);let i=0,g=Ne.length-1;for(;i<=g;){const w=Math.floor((i+g)/2),E=Ne[w],M=Ge(E);if(M===p)return E;M<p?i=w+1:g=w-1}return"None"}function Ge(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var nr=(()=>{var c=typeof document>"u"?require("url").pathToFileURL(__filename).href:document.currentScript&&document.currentScript.src||new URL("pure.js",document.baseURI).href;return function(p={}){var i=p,g,w;i.ready=new Promise((t,e)=>{g=t,w=e});var E=Object.assign({},i),M="./this.program",Y=typeof window=="object",U=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var j="";function N(t){return i.locateFile?i.locateFile(t,j):j+t}var X;(Y||U)&&(U?j=self.location.href:typeof document<"u"&&document.currentScript&&(j=document.currentScript.src),c&&(j=c),j.indexOf("blob:")!==0?j=j.substr(0,j.replace(/[?#].*/,"").lastIndexOf("/")+1):j="",U&&(X=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),i.print||console.log.bind(console);var V=i.printErr||console.error.bind(console);Object.assign(i,E),E=null,i.arguments&&i.arguments,i.thisProgram&&(M=i.thisProgram),i.quit&&i.quit;var B;i.wasmBinary&&(B=i.wasmBinary),i.noExitRuntime,typeof WebAssembly!="object"&&_t("no native wasm support detected");var q,ft=!1,L,W,ht,Ct,H,A,qt,Zt;function Qt(){var t=q.buffer;i.HEAP8=L=new Int8Array(t),i.HEAP16=ht=new Int16Array(t),i.HEAPU8=W=new Uint8Array(t),i.HEAPU16=Ct=new Uint16Array(t),i.HEAP32=H=new Int32Array(t),i.HEAPU32=A=new Uint32Array(t),i.HEAPF32=qt=new Float32Array(t),i.HEAPF64=Zt=new Float64Array(t)}var Jt,Kt=[],te=[],ee=[];function or(){if(i.preRun)for(typeof i.preRun=="function"&&(i.preRun=[i.preRun]);i.preRun.length;)ur(i.preRun.shift());It(Kt)}function ir(){It(te)}function sr(){if(i.postRun)for(typeof i.postRun=="function"&&(i.postRun=[i.postRun]);i.postRun.length;)lr(i.postRun.shift());It(ee)}function ur(t){Kt.unshift(t)}function cr(t){te.unshift(t)}function lr(t){ee.unshift(t)}var at=0,pt=null;function dr(t){at++,i.monitorRunDependencies&&i.monitorRunDependencies(at)}function fr(t){if(at--,i.monitorRunDependencies&&i.monitorRunDependencies(at),at==0&&pt){var e=pt;pt=null,e()}}function _t(t){i.onAbort&&i.onAbort(t),t="Aborted("+t+")",V(t),ft=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw w(e),e}var hr="data:application/octet-stream;base64,";function re(t){return t.startsWith(hr)}var ot;i.locateFile?(ot="zxing_reader.wasm",re(ot)||(ot=N(ot))):ot=new URL("/reader/zxing_reader.wasm",self.location).href;function ne(t){if(t==ot&&B)return new Uint8Array(B);if(X)return X(t);throw"both async and sync fetching of the wasm failed"}function pr(t){return!B&&(Y||U)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>ne(t)):Promise.resolve().then(()=>ne(t))}function ae(t,e,r){return pr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{V(`failed to asynchronously prepare wasm: ${n}`),_t(n)})}function yr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!re(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(s){return V(`wasm streaming compile failed: ${s}`),V("falling back to ArrayBuffer instantiation"),ae(e,r,n)})}):ae(e,r,n)}function mr(){var t={a:na};function e(n,a){var o=n.exports;return S=o,q=S.qa,Qt(),Jt=S.ua,cr(S.ra),fr(),o}dr();function r(n){e(n.instance)}if(i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(n){V(`Module.instantiateWasm callback failed with error: ${n}`),w(n)}return yr(B,ot,t,r).catch(w),{}}var It=t=>{for(;t.length>0;)t.shift()(i)},Tt=[],Pt=0,vr=t=>{var e=new Et(t);return e.get_caught()||(e.set_caught(!0),Pt--),e.set_rethrown(!1),Tt.push(e),Me(e.excPtr),e.get_exception_ptr()},Z=0,gr=()=>{$(0,0);var t=Tt.pop();Oe(t.excPtr),Z=0};function Et(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){A[this.ptr+4>>2]=e},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(e){A[this.ptr+8>>2]=e},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,L[this.ptr+12>>0]=e},this.get_caught=function(){return L[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,L[this.ptr+13>>0]=e},this.get_rethrown=function(){return L[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){A[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=Re(this.get_type());if(e)return A[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var wr=t=>{throw Z||(Z=t),Z},Wt=t=>{var e=Z;if(!e)return $t(0),0;var r=new Et(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return $t(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(je(o,n,s))return $t(o),e}return $t(n),e},$r=()=>Wt([]),br=t=>Wt([t]),Cr=(t,e)=>Wt([t,e]),_r=t=>{var e=new Et(t).get_exception_ptr();return e},Tr=()=>{var t=Tt.pop();t||_t("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Tt.push(t),t.set_rethrown(!0),t.set_caught(!1),Pt++),Z=e,Z},Pr=(t,e,r)=>{var n=new Et(t);throw n.init(e,r),Z=t,Pt++,Z},Er=()=>Pt,Dt={},oe=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Ht(t){return this.fromWireType(H[t>>2])}var ct={},it={},xt={},ie=void 0,At=t=>{throw new ie(t)},st=(t,e,r)=>{t.forEach(function(u){xt[u]=e});function n(u){var l=r(u);l.length!==t.length&&At("Mismatched type converter count");for(var d=0;d<t.length;++d)Q(t[d],l[d])}var a=new Array(e.length),o=[],s=0;e.forEach((u,l)=>{it.hasOwnProperty(u)?a[l]=it[u]:(o.push(u),ct.hasOwnProperty(u)||(ct[u]=[]),ct[u].push(()=>{a[l]=it[u],++s,s===o.length&&n(a)}))}),o.length===0&&n(a)},Dr=t=>{var e=Dt[t];delete Dt[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(s=>s.getterReturnType).concat(a.map(s=>s.setterArgumentType));st([t],o,s=>{var u={};return a.forEach((l,d)=>{var h=l.fieldName,m=s[d],v=l.getter,_=l.getterContext,D=s[d+a.length],R=l.setter,x=l.setterContext;u[h]={read:I=>m.fromWireType(v(_,I)),write:(I,f)=>{var y=[];R(x,I,D.toWireType(y,f)),oe(y)}}}),[{name:e.name,fromWireType:l=>{var d={};for(var h in u)d[h]=u[h].read(l);return n(l),d},toWireType:(l,d)=>{for(var h in u)if(!(h in d))throw new TypeError(`Missing field: "${h}"`);var m=r();for(h in u)u[h].write(m,d[h]);return l!==null&&l.push(n,m),m},argPackAdvance:J,readValueFromPointer:Ht,destructorFunction:n}]})},xr=(t,e,r,n,a)=>{},Ar=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);se=t},se=void 0,k=t=>{for(var e="",r=t;W[r];)e+=se[W[r++]];return e},lt=void 0,T=t=>{throw new lt(t)};function Sr(t,e,r={}){var n=e.name;if(t||T(`type "${n}" must have a positive integer typeid pointer`),it.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;T(`Cannot register type '${n}' twice`)}if(it[t]=e,delete xt[t],ct.hasOwnProperty(t)){var a=ct[t];delete ct[t],a.forEach(o=>o())}}function Q(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Sr(t,e,r)}var J=8,Fr=(t,e,r,n)=>{e=k(e),Q(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:J,readValueFromPointer:function(a){return this.fromWireType(W[a])},destructorFunction:null})};function Or(t){if(!(this instanceof et)||!(t instanceof et))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a}var Mr=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),kt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}T(e(t)+" instance already deleted")},Ut=!1,ue=t=>{},jr=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},ce=t=>{t.count.value-=1;var e=t.count.value===0;e&&jr(t)},le=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=le(t,e,r.baseClass);return n===null?null:r.downcast(n)},de={},Rr=()=>Object.keys(vt).length,Ir=()=>{var t=[];for(var e in vt)vt.hasOwnProperty(e)&&t.push(vt[e]);return t},yt=[],Bt=()=>{for(;yt.length;){var t=yt.pop();t.$$.deleteScheduled=!1,t.delete()}},mt=void 0,Wr=t=>{mt=t,yt.length&&mt&&mt(Bt)},Hr=()=>{i.getInheritedInstanceCount=Rr,i.getLiveInheritedInstances=Ir,i.flushPendingDeletes=Bt,i.setDelayFunction=Wr},vt={},kr=(t,e)=>{for(e===void 0&&T("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},Ur=(t,e)=>(e=kr(t,e),vt[e]),St=(t,e)=>{(!e.ptrType||!e.ptr)&&At("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&At("Both smartPtrType and smartPtr must be specified"),e.count={value:1},gt(Object.create(t,{$$:{value:e}}))};function Br(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Ur(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?St(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):St(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),s=de[o];if(!s)return a.call(this);var u;this.isConst?u=s.constPointerType:u=s.pointerType;var l=le(e,this.registeredClass,u.registeredClass);return l===null?a.call(this):this.isSmartPointer?St(u.registeredClass.instancePrototype,{ptrType:u,ptr:l,smartPtrType:this,smartPtr:t}):St(u.registeredClass.instancePrototype,{ptrType:u,ptr:l})}var gt=t=>typeof FinalizationRegistry>"u"?(gt=e=>e,t):(Ut=new FinalizationRegistry(e=>{ce(e.$$)}),gt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Ut.register(e,a,e)}return e},ue=e=>Ut.unregister(e),gt(t));function Vr(){if(this.$$.ptr||kt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=gt(Object.create(Object.getPrototypeOf(this),{$$:{value:Mr(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function Lr(){this.$$.ptr||kt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&T("Object already scheduled for deletion"),ue(this),ce(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function zr(){return!this.$$.ptr}function Yr(){return this.$$.ptr||kt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&T("Object already scheduled for deletion"),yt.push(this),yt.length===1&&mt&&mt(Bt),this.$$.deleteScheduled=!0,this}var Nr=()=>{et.prototype.isAliasOf=Or,et.prototype.clone=Vr,et.prototype.delete=Lr,et.prototype.isDeleted=zr,et.prototype.deleteLater=Yr};function et(){}var Gr=48,Xr=57,fe=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Gr&&e<=Xr?`_${t}`:t};function he(t,e){return t=fe(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var pe=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||T(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},ye=(t,e,r)=>{i.hasOwnProperty(t)?((r===void 0||i[t].overloadTable!==void 0&&i[t].overloadTable[r]!==void 0)&&T(`Cannot register public name '${t}' twice`),pe(i,t,t),i.hasOwnProperty(r)&&T(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),i[t].overloadTable[r]=e):(i[t]=e,r!==void 0&&(i[t].numArguments=r))};function qr(t,e,r,n,a,o,s,u){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=s,this.downcast=u,this.pureVirtualFunctions=[]}var Vt=(t,e,r)=>{for(;e!==r;)e.upcast||T(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function Zr(t,e){if(e===null)return this.isReference&&T(`null is not a valid ${this.name}`),0;e.$$||T(`Cannot pass "${Yt(e)}" as a ${this.name}`),e.$$.ptr||T(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Vt(e.$$.ptr,r,this.registeredClass);return n}function Qr(t,e){var r;if(e===null)return this.isReference&&T(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||T(`Cannot pass "${Yt(e)}" as a ${this.name}`),e.$$.ptr||T(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&T(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=Vt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&T("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:T(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,rt.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:T("Unsupporting sharing policy")}return r}function Jr(t,e){if(e===null)return this.isReference&&T(`null is not a valid ${this.name}`),0;e.$$||T(`Cannot pass "${Yt(e)}" as a ${this.name}`),e.$$.ptr||T(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&T(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Vt(e.$$.ptr,r,this.registeredClass);return n}function me(t){return this.fromWireType(A[t>>2])}function Kr(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function tn(t){this.rawDestructor&&this.rawDestructor(t)}var en=t=>{t!==null&&t.delete()},rn=()=>{K.prototype.getPointee=Kr,K.prototype.destructor=tn,K.prototype.argPackAdvance=J,K.prototype.readValueFromPointer=me,K.prototype.deleteObject=en,K.prototype.fromWireType=Br};function K(t,e,r,n,a,o,s,u,l,d,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=u,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=Zr,this.destructorFunction=null):(this.toWireType=Jr,this.destructorFunction=null):this.toWireType=Qr}var ve=(t,e,r)=>{i.hasOwnProperty(t)||At("Replacing nonexistant public symbol"),i[t].overloadTable!==void 0&&r!==void 0?i[t].overloadTable[r]=e:(i[t]=e,i[t].argCount=r)},nn=(t,e,r)=>{var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Ft=[],P=t=>{var e=Ft[t];return e||(t>=Ft.length&&(Ft.length=t+1),Ft[t]=e=Jt.get(t)),e},an=(t,e,r)=>{if(t.includes("j"))return nn(t,e,r);var n=P(e).apply(null,r);return n},on=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),an(t,e,r)}},G=(t,e)=>{t=k(t);function r(){return t.includes("j")?on(t,e):P(e)}var n=r();return typeof n!="function"&&T(`unknown function pointer with signature ${t}: ${e}`),n},sn=(t,e)=>{var r=he(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` | ||
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},ge=void 0,we=t=>{var e=Fe(t),r=k(e);return tt(e),r},Ot=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!it[o]){if(xt[o]){xt[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new ge(`${t}: `+r.map(we).join([", "]))},un=(t,e,r,n,a,o,s,u,l,d,h,m,v)=>{h=k(h),o=G(a,o),u&&(u=G(s,u)),d&&(d=G(l,d)),v=G(m,v);var _=fe(h);ye(_,function(){Ot(`Cannot construct ${h} due to unbound types`,[n])}),st([t,e,r],n?[n]:[],function(D){D=D[0];var R,x;n?(R=D.registeredClass,x=R.instancePrototype):x=et.prototype;var I=he(_,function(){if(Object.getPrototypeOf(this)!==f)throw new lt("Use 'new' to construct "+h);if(y.constructor_body===void 0)throw new lt(h+" has no accessible constructor");var Rt=y.constructor_body[arguments.length];if(Rt===void 0)throw new lt(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(y.constructor_body).toString()}) parameters instead!`);return Rt.apply(this,arguments)}),f=Object.create(x,{constructor:{value:I}});I.prototype=f;var y=new qr(h,I,f,v,R,o,u,d);y.baseClass&&(y.baseClass.__derivedClasses===void 0&&(y.baseClass.__derivedClasses=[]),y.baseClass.__derivedClasses.push(y));var F=new K(h,y,!0,!1,!1),O=new K(h+"*",y,!1,!1,!1),ut=new K(h+" const*",y,!1,!0,!1);return de[t]={pointerType:O,constPointerType:ut},ve(_,I),[F,O,ut]})},Lt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(A[e+n*4>>2]);return r};function zt(t,e,r,n,a,o){var s=e.length;s<2&&T("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var u=e[1]!==null&&r!==null,l=!1,d=1;d<e.length;++d)if(e[d]!==null&&e[d].destructorFunction===void 0){l=!0;break}var h=e[0].name!=="void",m=s-2,v=new Array(m),_=[],D=[];return function(){arguments.length!==m&&T(`function ${t} called with ${arguments.length} arguments, expected ${m}`),D.length=0;var R;_.length=u?2:1,_[0]=a,u&&(R=e[1].toWireType(D,this),_[1]=R);for(var x=0;x<m;++x)v[x]=e[x+2].toWireType(D,arguments[x]),_.push(v[x]);var I=n.apply(null,_);function f(y){if(l)oe(D);else for(var F=u?1:2;F<e.length;F++){var O=F===1?R:v[F-2];e[F].destructorFunction!==null&&e[F].destructorFunction(O)}if(h)return e[0].fromWireType(y)}return f(I)}}var cn=(t,e,r,n,a,o)=>{var s=Lt(e,r);a=G(n,a),st([],[t],function(u){u=u[0];var l=`constructor ${u.name}`;if(u.registeredClass.constructor_body===void 0&&(u.registeredClass.constructor_body=[]),u.registeredClass.constructor_body[e-1]!==void 0)throw new lt(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${u.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return u.registeredClass.constructor_body[e-1]=()=>{Ot(`Cannot construct ${u.name} due to unbound types`,s)},st([],s,d=>(d.splice(1,0,null),u.registeredClass.constructor_body[e-1]=zt(l,d,null,a,o),[])),[]})},ln=(t,e,r,n,a,o,s,u,l)=>{var d=Lt(r,n);e=k(e),o=G(a,o),st([],[t],function(h){h=h[0];var m=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),u&&h.registeredClass.pureVirtualFunctions.push(e);function v(){Ot(`Cannot call ${m} due to unbound types`,d)}var _=h.registeredClass.instancePrototype,D=_[e];return D===void 0||D.overloadTable===void 0&&D.className!==h.name&&D.argCount===r-2?(v.argCount=r-2,v.className=h.name,_[e]=v):(pe(_,e,m),_[e].overloadTable[r-2]=v),st([],d,function(R){var x=zt(m,R,h,o,s);return _[e].overloadTable===void 0?(x.argCount=r-2,_[e]=x):_[e].overloadTable[r-2]=x,[]}),[]})};function dn(){Object.assign($e.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function $e(){this.allocated=[void 0],this.freelist=[]}var z=new $e,be=t=>{t>=z.reserved&&--z.get(t).refcount===0&&z.free(t)},fn=()=>{for(var t=0,e=z.reserved;e<z.allocated.length;++e)z.allocated[e]!==void 0&&++t;return t},hn=()=>{z.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),z.reserved=z.allocated.length,i.count_emval_handles=fn},rt={toValue:t=>(t||T("Cannot use deleted val. handle = "+t),z.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return z.allocate({refcount:1,value:t})}}},pn=(t,e)=>{e=k(e),Q(t,{name:e,fromWireType:r=>{var n=rt.toValue(r);return be(r),n},toWireType:(r,n)=>rt.toHandle(n),argPackAdvance:J,readValueFromPointer:Ht,destructorFunction:null})},Yt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},yn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(qt[r>>2])};case 8:return function(r){return this.fromWireType(Zt[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},mn=(t,e,r)=>{e=k(e),Q(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:J,readValueFromPointer:yn(e,r),destructorFunction:null})},vn=(t,e,r,n,a,o,s)=>{var u=Lt(e,r);t=k(t),a=G(n,a),ye(t,function(){Ot(`Cannot call ${t} due to unbound types`,u)},e-1),st([],u,function(l){var d=[l[0],null].concat(l.slice(1));return ve(t,zt(t,d,null,a,o),e-1),[]})},gn=(t,e,r)=>{switch(e){case 1:return r?n=>L[n>>0]:n=>W[n>>0];case 2:return r?n=>ht[n>>1]:n=>Ct[n>>1];case 4:return r?n=>H[n>>2]:n=>A[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},wn=(t,e,r,n,a)=>{e=k(e);var o=h=>h;if(n===0){var s=32-8*r;o=h=>h<<s>>>s}var u=e.includes("unsigned"),l=(h,m)=>{},d;u?d=function(h,m){return l(m,this.name),m>>>0}:d=function(h,m){return l(m,this.name),m},Q(t,{name:e,fromWireType:o,toWireType:d,argPackAdvance:J,readValueFromPointer:gn(e,r,n!==0),destructorFunction:null})},$n=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(s){var u=A[s>>2],l=A[s+4>>2];return new a(L.buffer,l,u)}r=k(r),Q(t,{name:r,fromWireType:o,argPackAdvance:J,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Ce=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,s=0;s<t.length;++s){var u=t.charCodeAt(s);if(u>=55296&&u<=57343){var l=t.charCodeAt(++s);u=65536+((u&1023)<<10)|l&1023}if(u<=127){if(r>=o)break;e[r++]=u}else if(u<=2047){if(r+1>=o)break;e[r++]=192|u>>6,e[r++]=128|u&63}else if(u<=65535){if(r+2>=o)break;e[r++]=224|u>>12,e[r++]=128|u>>6&63,e[r++]=128|u&63}else{if(r+3>=o)break;e[r++]=240|u>>18,e[r++]=128|u>>12&63,e[r++]=128|u>>6&63,e[r++]=128|u&63}}return e[r]=0,r-a},bn=(t,e,r)=>Ce(t,W,e,r),_e=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},Te=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Cn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Te)return Te.decode(t.subarray(e,a));for(var o="";e<a;){var s=t[e++];if(!(s&128)){o+=String.fromCharCode(s);continue}var u=t[e++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|u);continue}var l=t[e++]&63;if((s&240)==224?s=(s&15)<<12|u<<6|l:s=(s&7)<<18|u<<12|l<<6|t[e++]&63,s<65536)o+=String.fromCharCode(s);else{var d=s-65536;o+=String.fromCharCode(55296|d>>10,56320|d&1023)}}return o},Nt=(t,e)=>t?Cn(W,t,e):"",_n=(t,e)=>{e=k(e);var r=e==="std::string";Q(t,{name:e,fromWireType:n=>{var a=A[n>>2],o=n+4,s;if(r)for(var u=o,l=0;l<=a;++l){var d=o+l;if(l==a||W[d]==0){var h=d-u,m=Nt(u,h);s===void 0?s=m:(s+=String.fromCharCode(0),s+=m),u=d+1}}else{for(var v=new Array(a),l=0;l<a;++l)v[l]=String.fromCharCode(W[o+l]);s=v.join("")}return tt(n),s},toWireType:(n,a)=>{a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,s=typeof a=="string";s||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||T("Cannot pass non-string to std::string"),r&&s?o=_e(a):o=a.length;var u=Xt(4+o+1),l=u+4;if(A[u>>2]=o,r&&s)bn(a,l,o+1);else if(s)for(var d=0;d<o;++d){var h=a.charCodeAt(d);h>255&&(tt(l),T("String has UTF-16 code units that do not fit in 8 bits")),W[l+d]=h}else for(var d=0;d<o;++d)W[l+d]=a[d];return n!==null&&n.push(tt,u),u},argPackAdvance:J,readValueFromPointer:me,destructorFunction:n=>tt(n)})},Pe=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Tn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Ct[n];)++n;if(r=n<<1,r-t>32&&Pe)return Pe.decode(W.subarray(t,r));for(var o="",s=0;!(s>=e/2);++s){var u=ht[t+s*2>>1];if(u==0)break;o+=String.fromCharCode(u)}return o},Pn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var n=e,a=r<t.length*2?r/2:t.length,o=0;o<a;++o){var s=t.charCodeAt(o);ht[e>>1]=s,e+=2}return ht[e>>1]=0,e-n},En=t=>t.length*2,Dn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=H[t+r*4>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},xn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,o=0;o<t.length;++o){var s=t.charCodeAt(o);if(s>=55296&&s<=57343){var u=t.charCodeAt(++o);s=65536+((s&1023)<<10)|u&1023}if(H[e>>2]=s,e+=4,e+4>a)break}return H[e>>2]=0,e-n},An=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},Sn=(t,e,r)=>{r=k(r);var n,a,o,s,u;e===2?(n=Tn,a=Pn,s=En,o=()=>Ct,u=1):e===4&&(n=Dn,a=xn,s=An,o=()=>A,u=2),Q(t,{name:r,fromWireType:l=>{for(var d=A[l>>2],h=o(),m,v=l+4,_=0;_<=d;++_){var D=l+4+_*e;if(_==d||h[D>>u]==0){var R=D-v,x=n(v,R);m===void 0?m=x:(m+=String.fromCharCode(0),m+=x),v=D+e}}return tt(l),m},toWireType:(l,d)=>{typeof d!="string"&&T(`Cannot pass non-string to C++ string type ${r}`);var h=s(d),m=Xt(4+h+e);return A[m>>2]=h>>u,a(d,m+4,h+e),l!==null&&l.push(tt,m),m},argPackAdvance:J,readValueFromPointer:Ht,destructorFunction:l=>tt(l)})},Fn=(t,e,r,n,a,o)=>{Dt[t]={name:k(e),rawConstructor:G(r,n),rawDestructor:G(a,o),fields:[]}},On=(t,e,r,n,a,o,s,u,l,d)=>{Dt[t].fields.push({fieldName:k(e),getterReturnType:r,getter:G(n,a),getterContext:o,setterArgumentType:s,setter:G(u,l),setterContext:d})},Mn=(t,e)=>{e=k(e),Q(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},jn={},Rn=t=>{var e=jn[t];return e===void 0?k(t):e},Ee=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},In=t=>t===0?rt.toHandle(Ee()):(t=Rn(t),rt.toHandle(Ee()[t])),Wn=t=>{t>4&&(z.get(t).refcount+=1)},De=(t,e)=>{var r=it[t];return r===void 0&&T(e+" has unknown type "+we(t)),r},Hn=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var s=De(A[n+o*4>>2],"parameter "+o);e[o+1]=s.readValueFromPointer(a),a+=s.argPackAdvance}var u=new(r.bind.apply(r,e));return rt.toHandle(u)}},xe={},kn=(t,e,r,n)=>{t=rt.toValue(t);var a=xe[e];return a||(a=Hn(e),xe[e]=a),a(t,r,n)},Un=(t,e)=>{t=De(t,"_emval_take_value");var r=t.readValueFromPointer(e);return rt.toHandle(r)},Bn=()=>{_t("")},Vn=(t,e,r)=>W.copyWithin(t,e,e+r),Ln=()=>2147483648,zn=t=>{var e=q.buffer,r=(t-e.byteLength+65535)/65536;try{return q.grow(r),Qt(),1}catch{}},Yn=t=>{var e=W.length;t>>>=0;var r=Ln();if(t>r)return!1;for(var n=(l,d)=>l+(d-l%d)%d,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var s=Math.min(r,n(Math.max(t,o),65536)),u=zn(s);if(u)return!0}return!1},Gt={},Nn=()=>M||"./this.program",wt=()=>{if(!wt.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:Nn()};for(var r in Gt)Gt[r]===void 0?delete e[r]:e[r]=Gt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);wt.strings=n}return wt.strings},Gn=(t,e)=>{for(var r=0;r<t.length;++r)L[e++>>0]=t.charCodeAt(r);L[e>>0]=0},Xn=(t,e)=>{var r=0;return wt().forEach((n,a)=>{var o=e+r;A[t+a*4>>2]=o,Gn(n,o),r+=n.length+1}),0},qn=(t,e)=>{var r=wt();A[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),A[e>>2]=n,0},Zn=t=>t,Mt=t=>t%4===0&&(t%100!==0||t%400===0),Qn=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Ae=[31,29,31,30,31,30,31,31,30,31,30,31],Se=[31,28,31,30,31,30,31,31,30,31,30,31],Jn=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Mt(r.getFullYear()),a=r.getMonth(),o=(n?Ae:Se)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function Kn(t,e,r){var n=r>0?r:_e(t)+1,a=new Array(n),o=Ce(t,a,0,a.length);return e&&(a.length=o),a}var ta=(t,e)=>{L.set(t,e)},ea=(t,e,r,n)=>{var a=A[n+40>>2],o={tm_sec:H[n>>2],tm_min:H[n+4>>2],tm_hour:H[n+8>>2],tm_mday:H[n+12>>2],tm_mon:H[n+16>>2],tm_year:H[n+20>>2],tm_wday:H[n+24>>2],tm_yday:H[n+28>>2],tm_isdst:H[n+32>>2],tm_gmtoff:H[n+36>>2],tm_zone:a?Nt(a):""},s=Nt(r),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in u)s=s.replace(new RegExp(l,"g"),u[l]);var d=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function m(f,y,F){for(var O=typeof f=="number"?f.toString():f||"";O.length<y;)O=F[0]+O;return O}function v(f,y){return m(f,y,"0")}function _(f,y){function F(ut){return ut<0?-1:ut>0?1:0}var O;return(O=F(f.getFullYear()-y.getFullYear()))===0&&(O=F(f.getMonth()-y.getMonth()))===0&&(O=F(f.getDate()-y.getDate())),O}function D(f){switch(f.getDay()){case 0:return new Date(f.getFullYear()-1,11,29);case 1:return f;case 2:return new Date(f.getFullYear(),0,3);case 3:return new Date(f.getFullYear(),0,2);case 4:return new Date(f.getFullYear(),0,1);case 5:return new Date(f.getFullYear()-1,11,31);case 6:return new Date(f.getFullYear()-1,11,30)}}function R(f){var y=Jn(new Date(f.tm_year+1900,0,1),f.tm_yday),F=new Date(y.getFullYear(),0,4),O=new Date(y.getFullYear()+1,0,4),ut=D(F),Rt=D(O);return _(ut,y)<=0?_(Rt,y)<=0?y.getFullYear()+1:y.getFullYear():y.getFullYear()-1}var x={"%a":f=>d[f.tm_wday].substring(0,3),"%A":f=>d[f.tm_wday],"%b":f=>h[f.tm_mon].substring(0,3),"%B":f=>h[f.tm_mon],"%C":f=>{var y=f.tm_year+1900;return v(y/100|0,2)},"%d":f=>v(f.tm_mday,2),"%e":f=>m(f.tm_mday,2," "),"%g":f=>R(f).toString().substring(2),"%G":f=>R(f),"%H":f=>v(f.tm_hour,2),"%I":f=>{var y=f.tm_hour;return y==0?y=12:y>12&&(y-=12),v(y,2)},"%j":f=>v(f.tm_mday+Qn(Mt(f.tm_year+1900)?Ae:Se,f.tm_mon-1),3),"%m":f=>v(f.tm_mon+1,2),"%M":f=>v(f.tm_min,2),"%n":()=>` | ||
`,"%p":f=>f.tm_hour>=0&&f.tm_hour<12?"AM":"PM","%S":f=>v(f.tm_sec,2),"%t":()=>" ","%u":f=>f.tm_wday||7,"%U":f=>{var y=f.tm_yday+7-f.tm_wday;return v(Math.floor(y/7),2)},"%V":f=>{var y=Math.floor((f.tm_yday+7-(f.tm_wday+6)%7)/7);if((f.tm_wday+371-f.tm_yday-2)%7<=2&&y++,y){if(y==53){var F=(f.tm_wday+371-f.tm_yday)%7;F!=4&&(F!=3||!Mt(f.tm_year))&&(y=1)}}else{y=52;var O=(f.tm_wday+7-f.tm_yday-1)%7;(O==4||O==5&&Mt(f.tm_year%400-1))&&y++}return v(y,2)},"%w":f=>f.tm_wday,"%W":f=>{var y=f.tm_yday+7-(f.tm_wday+6)%7;return v(Math.floor(y/7),2)},"%y":f=>(f.tm_year+1900).toString().substring(2),"%Y":f=>f.tm_year+1900,"%z":f=>{var y=f.tm_gmtoff,F=y>=0;return y=Math.abs(y)/60,y=y/60*100+y%60,(F?"+":"-")+("0000"+y).slice(-4)},"%Z":f=>f.tm_zone,"%%":()=>"%"};s=s.replace(/%%/g,"\0\0");for(var l in x)s.includes(l)&&(s=s.replace(new RegExp(l,"g"),x[l](o)));s=s.replace(/\0\0/g,"%");var I=Kn(s,!1);return I.length>e?0:(ta(I,t),I.length-1)},ra=(t,e,r,n,a)=>ea(t,e,r,n);ie=i.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Ar(),lt=i.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Nr(),Hr(),rn(),ge=i.UnboundTypeError=sn(Error,"UnboundTypeError"),dn(),hn();var na={q:vr,u:gr,a:$r,h:br,l:Cr,I:_r,P:Tr,n:Pr,ba:Er,d:wr,oa:Dr,Y:xr,fa:Fr,na:un,ma:cn,D:ln,ea:pn,W:mn,J:vn,w:wn,s:$n,V:_n,L:Sn,Q:Fn,pa:On,ga:Mn,U:be,la:In,R:Wn,ia:kn,ka:Un,K:Bn,da:Vn,ca:Yn,$:Xn,aa:qn,H:Ca,T:Fa,B:Ta,p:wa,b:aa,C:ba,ha:Ea,c:ca,j:da,i:sa,x:_a,O:$a,v:va,G:xa,N:Aa,A:Pa,F:Oa,Z:ja,X:Ra,k:la,f:ua,e:ia,g:oa,M:Sa,m:ma,o:fa,S:ha,t:ya,ja:ga,y:Da,r:pa,E:Ma,z:Zn,_:ra},S=mr(),tt=i._free=t=>(tt=i._free=S.sa)(t),Xt=i._malloc=t=>(Xt=i._malloc=S.ta)(t),Fe=t=>(Fe=S.va)(t);i.__embind_initialize_bindings=()=>(i.__embind_initialize_bindings=S.wa)();var $=(t,e)=>($=S.xa)(t,e),$t=t=>($t=S.ya)(t),b=()=>(b=S.za)(),C=t=>(C=S.Aa)(t),Oe=t=>(Oe=S.Ba)(t),Me=t=>(Me=S.Ca)(t),je=(t,e,r)=>(je=S.Da)(t,e,r),Re=t=>(Re=S.Ea)(t);i.dynCall_viijii=(t,e,r,n,a,o,s)=>(i.dynCall_viijii=S.Fa)(t,e,r,n,a,o,s);var Ie=i.dynCall_jiii=(t,e,r,n)=>(Ie=i.dynCall_jiii=S.Ga)(t,e,r,n),We=i.dynCall_jiiii=(t,e,r,n,a)=>(We=i.dynCall_jiiii=S.Ha)(t,e,r,n,a);i.dynCall_iiiiij=(t,e,r,n,a,o,s)=>(i.dynCall_iiiiij=S.Ia)(t,e,r,n,a,o,s),i.dynCall_iiiiijj=(t,e,r,n,a,o,s,u,l)=>(i.dynCall_iiiiijj=S.Ja)(t,e,r,n,a,o,s,u,l),i.dynCall_iiiiiijj=(t,e,r,n,a,o,s,u,l,d)=>(i.dynCall_iiiiiijj=S.Ka)(t,e,r,n,a,o,s,u,l,d);function aa(t,e){var r=b();try{return P(t)(e)}catch(n){if(C(r),n!==n+0)throw n;$(1,0)}}function oa(t,e,r,n){var a=b();try{P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function ia(t,e,r){var n=b();try{P(t)(e,r)}catch(a){if(C(n),a!==a+0)throw a;$(1,0)}}function sa(t,e,r,n,a){var o=b();try{return P(t)(e,r,n,a)}catch(s){if(C(o),s!==s+0)throw s;$(1,0)}}function ua(t,e){var r=b();try{P(t)(e)}catch(n){if(C(r),n!==n+0)throw n;$(1,0)}}function ca(t,e,r){var n=b();try{return P(t)(e,r)}catch(a){if(C(n),a!==a+0)throw a;$(1,0)}}function la(t){var e=b();try{P(t)()}catch(r){if(C(e),r!==r+0)throw r;$(1,0)}}function da(t,e,r,n){var a=b();try{return P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function fa(t,e,r,n,a,o){var s=b();try{P(t)(e,r,n,a,o)}catch(u){if(C(s),u!==u+0)throw u;$(1,0)}}function ha(t,e,r,n,a,o,s){var u=b();try{P(t)(e,r,n,a,o,s)}catch(l){if(C(u),l!==l+0)throw l;$(1,0)}}function pa(t,e,r,n,a,o,s,u,l,d,h){var m=b();try{P(t)(e,r,n,a,o,s,u,l,d,h)}catch(v){if(C(m),v!==v+0)throw v;$(1,0)}}function ya(t,e,r,n,a,o,s,u){var l=b();try{P(t)(e,r,n,a,o,s,u)}catch(d){if(C(l),d!==d+0)throw d;$(1,0)}}function ma(t,e,r,n,a){var o=b();try{P(t)(e,r,n,a)}catch(s){if(C(o),s!==s+0)throw s;$(1,0)}}function va(t,e,r,n,a,o,s){var u=b();try{return P(t)(e,r,n,a,o,s)}catch(l){if(C(u),l!==l+0)throw l;$(1,0)}}function ga(t,e,r,n,a,o,s,u,l){var d=b();try{P(t)(e,r,n,a,o,s,u,l)}catch(h){if(C(d),h!==h+0)throw h;$(1,0)}}function wa(t){var e=b();try{return P(t)()}catch(r){if(C(e),r!==r+0)throw r;$(1,0)}}function $a(t,e,r,n,a,o,s){var u=b();try{return P(t)(e,r,n,a,o,s)}catch(l){if(C(u),l!==l+0)throw l;$(1,0)}}function ba(t,e,r,n){var a=b();try{return P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function Ca(t,e,r,n){var a=b();try{return P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function _a(t,e,r,n,a,o){var s=b();try{return P(t)(e,r,n,a,o)}catch(u){if(C(s),u!==u+0)throw u;$(1,0)}}function Ta(t,e,r,n,a,o){var s=b();try{return P(t)(e,r,n,a,o)}catch(u){if(C(s),u!==u+0)throw u;$(1,0)}}function Pa(t,e,r,n,a,o,s,u,l,d){var h=b();try{return P(t)(e,r,n,a,o,s,u,l,d)}catch(m){if(C(h),m!==m+0)throw m;$(1,0)}}function Ea(t,e,r){var n=b();try{return P(t)(e,r)}catch(a){if(C(n),a!==a+0)throw a;$(1,0)}}function Da(t,e,r,n,a,o,s,u,l,d){var h=b();try{P(t)(e,r,n,a,o,s,u,l,d)}catch(m){if(C(h),m!==m+0)throw m;$(1,0)}}function xa(t,e,r,n,a,o,s,u){var l=b();try{return P(t)(e,r,n,a,o,s,u)}catch(d){if(C(l),d!==d+0)throw d;$(1,0)}}function Aa(t,e,r,n,a,o,s,u,l){var d=b();try{return P(t)(e,r,n,a,o,s,u,l)}catch(h){if(C(d),h!==h+0)throw h;$(1,0)}}function Sa(t,e,r,n,a,o,s){var u=b();try{P(t)(e,r,n,a,o,s)}catch(l){if(C(u),l!==l+0)throw l;$(1,0)}}function Fa(t,e,r,n){var a=b();try{return P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function Oa(t,e,r,n,a,o,s,u,l,d,h,m){var v=b();try{return P(t)(e,r,n,a,o,s,u,l,d,h,m)}catch(_){if(C(v),_!==_+0)throw _;$(1,0)}}function Ma(t,e,r,n,a,o,s,u,l,d,h,m,v,_,D,R){var x=b();try{P(t)(e,r,n,a,o,s,u,l,d,h,m,v,_,D,R)}catch(I){if(C(x),I!==I+0)throw I;$(1,0)}}function ja(t,e,r,n){var a=b();try{return Ie(t,e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function Ra(t,e,r,n,a){var o=b();try{return We(t,e,r,n,a)}catch(s){if(C(o),s!==s+0)throw s;$(1,0)}}var jt;pt=function t(){jt||He(),jt||(pt=t)};function He(){if(at>0||(or(),at>0))return;function t(){jt||(jt=!0,i.calledRun=!0,!ft&&(ir(),g(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),sr()))}i.setStatus?(i.setStatus("Running..."),setTimeout(function(){setTimeout(function(){i.setStatus("")},1),t()},1)):t()}if(i.preInit)for(typeof i.preInit=="function"&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return He(),p.ready}})();function to(c){return rr(nr,c)}async function eo(c,{tryHarder:p=nt.tryHarder,formats:i=nt.formats,maxSymbols:g=nt.maxSymbols}=nt){return Qa(c,{tryHarder:p,formats:i,maxSymbols:g},nr)}const ar=new Map([["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["data_matrix","DataMatrix"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["pdf417","PDF417"],["qr_code","QRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"]]);function ro(c){for(const[p,i]of ar)if(c===i)return p;return"unknown"}var bt;class no extends EventTarget{constructor(i={}){var g;super();Be(this,bt,void 0);try{const w=(g=i==null?void 0:i.formats)==null?void 0:g.filter(E=>E!=="unknown");if((w==null?void 0:w.length)===0)throw new TypeError("Hint option provided, but is empty.");w==null||w.forEach(E=>{if(!Le.includes(E))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${E}' is not a valid enum value of type BarcodeFormat.`)}),Ve(this,bt,w??[]),to().then(E=>{this.dispatchEvent(new CustomEvent("load",{detail:E}))}).catch(E=>{this.dispatchEvent(new CustomEvent("error",{detail:E}))})}catch(w){throw ze(w,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Le.filter(i=>i!=="unknown")}async detect(i){try{const g=await Va(i);if(g===null)return[];let w;try{w=await eo(g,{tryHarder:!0,formats:Ue(this,bt).map(E=>ar.get(E))})}catch{throw new DOMException("Barcode detection service unavailable. Use 'setZXingModuleOverrides' in offline or strict CSP environments.","NotSupportedError")}return w.map(E=>{const{topLeft:{x:M,y:Y},topRight:{x:U,y:j},bottomLeft:{x:N,y:X},bottomRight:{x:V,y:B}}=E.position,q=Math.min(M,U,N,V),ft=Math.min(Y,j,X,B),L=Math.max(M,U,N,V),W=Math.max(Y,j,X,B);return{boundingBox:new DOMRectReadOnly(q,ft,L-q,W-ft),rawValue:new TextDecoder().decode(E.bytes),format:ro(E.format),cornerPoints:[{x:M,y:Y},{x:U,y:j},{x:V,y:B},{x:N,y:X}]}})}catch(g){throw ze(g,"Failed to execute 'detect' on 'BarcodeDetector'")}}}bt=new WeakMap;exports.BarcodeDetector=no;exports.setZXingModuleOverrides=Za; | ||
"use strict";var Le=(c,p,i)=>{if(!p.has(c))throw TypeError("Cannot "+i)};var qt=(c,p,i)=>(Le(c,p,"read from private field"),i?i.call(c):p.get(c)),ze=(c,p,i)=>{if(p.has(c))throw TypeError("Cannot add the same private member more than once");p instanceof WeakSet?p.add(c):p.set(c,i)},Ye=(c,p,i,v)=>(Le(c,p,"write to private field"),v?v.call(c,i):p.set(c,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ne=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function Oa(c){if(Qe(c))return{width:c.naturalWidth,height:c.naturalHeight};if(Ze(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(Ke(c))return{width:c.videoWidth,height:c.videoHeight};if(er(c))return{width:c.width,height:c.height};if(nr(c))return{width:c.displayWidth,height:c.displayHeight};if(tr(c))return{width:c.width,height:c.height};if(rr(c))return{width:c.width,height:c.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function Qe(c){try{return c instanceof HTMLImageElement}catch{return!1}}function Ze(c){try{return c instanceof SVGImageElement}catch{return!1}}function Ke(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function tr(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function er(c){try{return c instanceof ImageBitmap}catch{return!1}}function rr(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function nr(c){try{return c instanceof VideoFrame}catch{return!1}}function ar(c){try{return c instanceof Blob}catch{return!1}}function Fa(c){try{return c instanceof ImageData}catch{return!1}}function Ma(c,p){try{const i=new OffscreenCanvas(c,p);if(i.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return i;throw void 0}catch{const i=document.createElement("canvas");return i.width=c,i.height=p,i}}async function or(c){if(Qe(c)&&!await Ha(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Ze(c)&&!await Wa(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(nr(c)&&ka(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Ke(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(er(c)&&Ua(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:p,height:i}=Oa(c);if(p===0||i===0)return null;const $=Ma(p,i).getContext("2d");$.drawImage(c,0,0);try{return $.getImageData(0,0,p,i)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function ja(c){let p;try{if(createImageBitmap)p=await createImageBitmap(c);else if(Image){p=new Image;let v="";try{v=URL.createObjectURL(c),p.src=v,await p.decode()}finally{URL.revokeObjectURL(v)}}else return c}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await or(p)}function Ia(c){const{width:p,height:i}=c;if(p===0||i===0)return null;const v=c.getContext("2d");try{return v.getImageData(0,0,p,i)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ra(c){if(ar(c))return await ja(c);if(Fa(c)){if(Ba(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return tr(c)||rr(c)?Ia(c):await or(c)}async function Ha(c){try{return await c.decode(),!0}catch{return!1}}async function Wa(c){var p;try{return await((p=c.decode)==null?void 0:p.call(c)),!0}catch{return!1}}function ka(c){return c.format===null}function Ba(c){return c.data.buffer.byteLength===0}function Ua(c){return c.width===0&&c.height===0}function Ge(c,p){return c instanceof DOMException?new DOMException(`${p}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${p}: ${c.message}`):new Error(`${p}: ${c}`)}const Xe=c=>{let p;const i=new Set,v=(O,Y)=>{const j=typeof O=="function"?O(p):O;if(!Object.is(j,p)){const F=p;p=Y??typeof j!="object"?j:Object.assign({},p,j),i.forEach(L=>L(p,F))}},$=()=>p,w={setState:v,getState:$,subscribe:O=>(i.add(O),()=>i.delete(O)),destroy:()=>{i.clear()}};return p=c(v,$,w),w},Va=c=>c?Xe(c):Xe,La={locateFile:(c,p)=>{var i;const v=(i=c.match(/_(.+?)\.wasm$/))==null?void 0:i[1];return v?`https://fastly.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.5/dist/${v}/${c}`:p+c}},st=Va()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:La}));function za(c){st.setState({zxingModuleOverrides:c})}function Qt(c,p=st.getState().zxingModuleOverrides){const{zxingModuleWeakMap:i}=st.getState(),v=i.get(c);if(v&&Object.is(p,st.getState().zxingModuleOverrides))return v;{st.setState({zxingModuleOverrides:p});const $=c(p);return i.set(c,$),$}}const qe=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","UPC-A","UPC-E"],U={tryHarder:!0,formats:[],maxSymbols:255};async function Ya(c,{tryHarder:p=U.tryHarder,formats:i=U.formats,maxSymbols:v=U.maxSymbols}=U,$){const w=await Qt($,st.getState().zxingModuleOverrides),{size:O}=c,Y=new Uint8Array(await c.arrayBuffer()),j=w._malloc(O);w.HEAP8.set(Y,j);const F=w.readBarcodesFromImage(j,O,p,ir(i),v);w._free(j);const L=[];for(let z=0;z<F.size();++z){const V=F.get(z);L.push({...V,format:sr(V.format)})}return L}async function Na(c,{tryHarder:p=U.tryHarder,formats:i=U.formats,maxSymbols:v=U.maxSymbols}=U,$){const w=await Qt($,st.getState().zxingModuleOverrides),{data:O,width:Y,height:j,data:{byteLength:F}}=c,L=w._malloc(F);w.HEAP8.set(O,L);const z=w.readBarcodesFromPixmap(L,Y,j,p,ir(i),v);w._free(L);const V=[];for(let N=0;N<z.size();++N){const J=z.get(N);V.push({...J,format:sr(J.format)})}return V}function ir(c){return c.join("|")}function sr(c){const p=Je(c);let i=0,v=qe.length-1;for(;i<=v;){const $=Math.floor((i+v)/2),w=qe[$],O=Je(w);if(O===p)return w;O<p?i=$+1:v=$-1}return"None"}function Je(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var Zt=(()=>{var c=typeof document>"u"?require("url").pathToFileURL(__filename).href:document.currentScript&&document.currentScript.src||new URL("pure.js",document.baseURI).href;return function(p={}){var i=p,v,$;i.ready=new Promise((t,e)=>{v=t,$=e});var w=Object.assign({},i),O="./this.program",Y=typeof window=="object",j=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var F="";function L(t){return i.locateFile?i.locateFile(t,F):F+t}var z;(Y||j)&&(j?F=self.location.href:typeof document<"u"&&document.currentScript&&(F=document.currentScript.src),c&&(F=c),F.indexOf("blob:")!==0?F=F.substr(0,F.replace(/[?#].*/,"").lastIndexOf("/")+1):F="",j&&(z=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),i.print||console.log.bind(console);var V=i.printErr||console.error.bind(console);Object.assign(i,w),w=null,i.arguments&&i.arguments,i.thisProgram&&(O=i.thisProgram),i.quit&&i.quit;var N;i.wasmBinary&&(N=i.wasmBinary),i.noExitRuntime,typeof WebAssembly!="object"&&bt("no native wasm support detected");var J,ft=!1,G,W,dt,$t,k,A,Kt,te;function ee(){var t=J.buffer;i.HEAP8=G=new Int8Array(t),i.HEAP16=dt=new Int16Array(t),i.HEAPU8=W=new Uint8Array(t),i.HEAPU16=$t=new Uint16Array(t),i.HEAP32=k=new Int32Array(t),i.HEAPU32=A=new Uint32Array(t),i.HEAPF32=Kt=new Float32Array(t),i.HEAPF64=te=new Float64Array(t)}var re=[],ne=[],ae=[];function ur(){if(i.preRun)for(typeof i.preRun=="function"&&(i.preRun=[i.preRun]);i.preRun.length;)fr(i.preRun.shift());Rt(re)}function cr(){Rt(ne)}function lr(){if(i.postRun)for(typeof i.postRun=="function"&&(i.postRun=[i.postRun]);i.postRun.length;)hr(i.postRun.shift());Rt(ae)}function fr(t){re.unshift(t)}function dr(t){ne.unshift(t)}function hr(t){ae.unshift(t)}var rt=0,ht=null;function pr(t){rt++,i.monitorRunDependencies&&i.monitorRunDependencies(rt)}function mr(t){if(rt--,i.monitorRunDependencies&&i.monitorRunDependencies(rt),rt==0&&ht){var e=ht;ht=null,e()}}function bt(t){i.onAbort&&i.onAbort(t),t="Aborted("+t+")",V(t),ft=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw $(e),e}var yr="data:application/octet-stream;base64,";function oe(t){return t.startsWith(yr)}var nt;i.locateFile?(nt="zxing_reader.wasm",oe(nt)||(nt=L(nt))):nt=new URL("/reader/zxing_reader.wasm",self.location).href;function ie(t){if(t==nt&&N)return new Uint8Array(N);if(z)return z(t);throw"both async and sync fetching of the wasm failed"}function vr(t){return!N&&(Y||j)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>ie(t)):Promise.resolve().then(()=>ie(t))}function se(t,e,r){return vr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{V(`failed to asynchronously prepare wasm: ${n}`),bt(n)})}function gr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!oe(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(s){return V(`wasm streaming compile failed: ${s}`),V("falling back to ArrayBuffer instantiation"),se(e,r,n)})}):se(e,r,n)}function wr(){var t={a:Zn};function e(n,a){return D=n.exports,J=D.qa,ee(),be=D.ua,dr(D.ra),mr(),D}pr();function r(n){e(n.instance)}if(i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(n){V(`Module.instantiateWasm callback failed with error: ${n}`),$(n)}return gr(N,nt,t,r).catch($),{}}var Rt=t=>{for(;t.length>0;)t.shift()(i)},Ct=[],_t=0,$r=t=>{var e=new Tt(t);return e.get_caught()||(e.set_caught(!0),_t--),e.set_rethrown(!1),Ct.push(e),He(e.excPtr),e.get_exception_ptr()},Q=0,br=()=>{b(0,0);var t=Ct.pop();Re(t.excPtr),Q=0};function Tt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){A[this.ptr+4>>2]=e},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(e){A[this.ptr+8>>2]=e},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,G[this.ptr+12>>0]=e},this.get_caught=function(){return G[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,G[this.ptr+13>>0]=e},this.get_rethrown=function(){return G[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){A[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=ke(this.get_type());if(e)return A[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var Cr=t=>{throw Q||(Q=t),Q},Ht=t=>{var e=Q;if(!e)return wt(0),0;var r=new Tt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return wt(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(We(o,n,s))return wt(o),e}return wt(n),e},_r=()=>Ht([]),Tr=t=>Ht([t]),Pr=(t,e)=>Ht([t,e]),Er=t=>{var e=new Tt(t).get_exception_ptr();return e},xr=()=>{var t=Ct.pop();t||bt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Ct.push(t),t.set_rethrown(!0),t.set_caught(!1),_t++),Q=e,Q},Sr=(t,e,r)=>{var n=new Tt(t);throw n.init(e,r),Q=t,_t++,Q},Ar=()=>_t,Pt={},ue=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Wt(t){return this.fromWireType(k[t>>2])}var ut={},at={},Et={},ce,xt=t=>{throw new ce(t)},ot=(t,e,r)=>{t.forEach(function(u){Et[u]=e});function n(u){var l=r(u);l.length!==t.length&&xt("Mismatched type converter count");for(var f=0;f<t.length;++f)Z(t[f],l[f])}var a=new Array(e.length),o=[],s=0;e.forEach((u,l)=>{at.hasOwnProperty(u)?a[l]=at[u]:(o.push(u),ut.hasOwnProperty(u)||(ut[u]=[]),ut[u].push(()=>{a[l]=at[u],++s,s===o.length&&n(a)}))}),o.length===0&&n(a)},Dr=t=>{var e=Pt[t];delete Pt[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(s=>s.getterReturnType).concat(a.map(s=>s.setterArgumentType));ot([t],o,s=>{var u={};return a.forEach((l,f)=>{var h=l.fieldName,y=s[f],g=l.getter,T=l.getterContext,x=s[f+a.length],R=l.setter,S=l.setterContext;u[h]={read:H=>y.fromWireType(g(T,H)),write:(H,d)=>{var m=[];R(S,H,x.toWireType(m,d)),ue(m)}}}),[{name:e.name,fromWireType:l=>{var f={};for(var h in u)f[h]=u[h].read(l);return n(l),f},toWireType:(l,f)=>{for(var h in u)if(!(h in f))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in u)u[h].write(y,f[h]);return l!==null&&l.push(n,y),y},argPackAdvance:K,readValueFromPointer:Wt,destructorFunction:n}]})},Or=(t,e,r,n,a)=>{},Fr=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);le=t},le,B=t=>{for(var e="",r=t;W[r];)e+=le[W[r++]];return e},ct,P=t=>{throw new ct(t)};function Mr(t,e,r={}){var n=e.name;if(t||P(`type "${n}" must have a positive integer typeid pointer`),at.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;P(`Cannot register type '${n}' twice`)}if(at[t]=e,delete Et[t],ut.hasOwnProperty(t)){var a=ut[t];delete ut[t],a.forEach(o=>o())}}function Z(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Mr(t,e,r)}var K=8,jr=(t,e,r,n)=>{e=B(e),Z(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:K,readValueFromPointer:function(a){return this.fromWireType(W[a])},destructorFunction:null})},Ir=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),kt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}P(e(t)+" instance already deleted")},Bt=!1,fe=t=>{},Rr=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},de=t=>{t.count.value-=1;var e=t.count.value===0;e&&Rr(t)},he=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=he(t,e,r.baseClass);return n===null?null:r.downcast(n)},pe={},Hr=()=>Object.keys(yt).length,Wr=()=>{var t=[];for(var e in yt)yt.hasOwnProperty(e)&&t.push(yt[e]);return t},pt=[],Ut=()=>{for(;pt.length;){var t=pt.pop();t.$$.deleteScheduled=!1,t.delete()}},mt,kr=t=>{mt=t,pt.length&&mt&&mt(Ut)},Br=()=>{i.getInheritedInstanceCount=Hr,i.getLiveInheritedInstances=Wr,i.flushPendingDeletes=Ut,i.setDelayFunction=kr},yt={},Ur=(t,e)=>{for(e===void 0&&P("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},Vr=(t,e)=>(e=Ur(t,e),yt[e]),St=(t,e)=>{(!e.ptrType||!e.ptr)&&xt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&xt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},vt(Object.create(t,{$$:{value:e}}))};function Lr(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Vr(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?St(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):St(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),s=pe[o];if(!s)return a.call(this);var u;this.isConst?u=s.constPointerType:u=s.pointerType;var l=he(e,this.registeredClass,u.registeredClass);return l===null?a.call(this):this.isSmartPointer?St(u.registeredClass.instancePrototype,{ptrType:u,ptr:l,smartPtrType:this,smartPtr:t}):St(u.registeredClass.instancePrototype,{ptrType:u,ptr:l})}var vt=t=>typeof FinalizationRegistry>"u"?(vt=e=>e,t):(Bt=new FinalizationRegistry(e=>{de(e.$$)}),vt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Bt.register(e,a,e)}return e},fe=e=>Bt.unregister(e),vt(t)),zr=()=>{Object.assign(At.prototype,{isAliasOf(t){if(!(this instanceof At)||!(t instanceof At))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||kt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=vt(Object.create(Object.getPrototypeOf(this),{$$:{value:Ir(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||kt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),fe(this),de(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||kt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),pt.push(this),pt.length===1&&mt&&mt(Ut),this.$$.deleteScheduled=!0,this}})};function At(){}var Yr=48,Nr=57,me=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Yr&&e<=Nr?`_${t}`:t};function ye(t,e){return t=me(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var ve=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||P(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},ge=(t,e,r)=>{i.hasOwnProperty(t)?((r===void 0||i[t].overloadTable!==void 0&&i[t].overloadTable[r]!==void 0)&&P(`Cannot register public name '${t}' twice`),ve(i,t,t),i.hasOwnProperty(r)&&P(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),i[t].overloadTable[r]=e):(i[t]=e,r!==void 0&&(i[t].numArguments=r))};function Gr(t,e,r,n,a,o,s,u){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=s,this.downcast=u,this.pureVirtualFunctions=[]}var Vt=(t,e,r)=>{for(;e!==r;)e.upcast||P(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function Xr(t,e){if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;e.$$||P(`Cannot pass "${Yt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Vt(e.$$.ptr,r,this.registeredClass);return n}function qr(t,e){var r;if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||P(`Cannot pass "${Yt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&P(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=Vt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&P("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:P(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,et.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:P("Unsupporting sharing policy")}return r}function Jr(t,e){if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;e.$$||P(`Cannot pass "${Yt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&P(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Vt(e.$$.ptr,r,this.registeredClass);return n}function we(t){return this.fromWireType(A[t>>2])}var Qr=()=>{Object.assign(Dt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:K,readValueFromPointer:we,deleteObject(t){t!==null&&t.delete()},fromWireType:Lr})};function Dt(t,e,r,n,a,o,s,u,l,f,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=u,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=Xr,this.destructorFunction=null):(this.toWireType=Jr,this.destructorFunction=null):this.toWireType=qr}var $e=(t,e,r)=>{i.hasOwnProperty(t)||xt("Replacing nonexistant public symbol"),i[t].overloadTable!==void 0&&r!==void 0?i[t].overloadTable[r]=e:(i[t]=e,i[t].argCount=r)},Zr=(t,e,r)=>{var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Ot=[],be,E=t=>{var e=Ot[t];return e||(t>=Ot.length&&(Ot.length=t+1),Ot[t]=e=be.get(t)),e},Kr=(t,e,r)=>{if(t.includes("j"))return Zr(t,e,r);var n=E(e).apply(null,r);return n},tn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Kr(t,e,r)}},q=(t,e)=>{t=B(t);function r(){return t.includes("j")?tn(t,e):E(e)}var n=r();return typeof n!="function"&&P(`unknown function pointer with signature ${t}: ${e}`),n},en=(t,e)=>{var r=ye(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` | ||
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Ce,_e=t=>{var e=Ie(t),r=B(e);return tt(e),r},Ft=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!at[o]){if(Et[o]){Et[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Ce(`${t}: `+r.map(_e).join([", "]))},rn=(t,e,r,n,a,o,s,u,l,f,h,y,g)=>{h=B(h),o=q(a,o),u&&(u=q(s,u)),f&&(f=q(l,f)),g=q(y,g);var T=me(h);ge(T,function(){Ft(`Cannot construct ${h} due to unbound types`,[n])}),ot([t,e,r],n?[n]:[],function(x){x=x[0];var R,S;n?(R=x.registeredClass,S=R.instancePrototype):S=At.prototype;var H=ye(T,function(){if(Object.getPrototypeOf(this)!==d)throw new ct("Use 'new' to construct "+h);if(m.constructor_body===void 0)throw new ct(h+" has no accessible constructor");var It=m.constructor_body[arguments.length];if(It===void 0)throw new ct(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return It.apply(this,arguments)}),d=Object.create(S,{constructor:{value:H}});H.prototype=d;var m=new Gr(h,H,d,g,R,o,u,f);m.baseClass&&(m.baseClass.__derivedClasses===void 0&&(m.baseClass.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m));var M=new Dt(h,m,!0,!1,!1),I=new Dt(h+"*",m,!1,!1,!1),it=new Dt(h+" const*",m,!1,!0,!1);return pe[t]={pointerType:I,constPointerType:it},$e(T,H),[M,I,it]})},Lt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(A[e+n*4>>2]);return r};function zt(t,e,r,n,a,o){var s=e.length;s<2&&P("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var u=e[1]!==null&&r!==null,l=!1,f=1;f<e.length;++f)if(e[f]!==null&&e[f].destructorFunction===void 0){l=!0;break}var h=e[0].name!=="void",y=s-2,g=new Array(y),T=[],x=[];return function(){arguments.length!==y&&P(`function ${t} called with ${arguments.length} arguments, expected ${y}`),x.length=0;var R;T.length=u?2:1,T[0]=a,u&&(R=e[1].toWireType(x,this),T[1]=R);for(var S=0;S<y;++S)g[S]=e[S+2].toWireType(x,arguments[S]),T.push(g[S]);var H=n.apply(null,T);function d(m){if(l)ue(x);else for(var M=u?1:2;M<e.length;M++){var I=M===1?R:g[M-2];e[M].destructorFunction!==null&&e[M].destructorFunction(I)}if(h)return e[0].fromWireType(m)}return d(H)}}var nn=(t,e,r,n,a,o)=>{var s=Lt(e,r);a=q(n,a),ot([],[t],function(u){u=u[0];var l=`constructor ${u.name}`;if(u.registeredClass.constructor_body===void 0&&(u.registeredClass.constructor_body=[]),u.registeredClass.constructor_body[e-1]!==void 0)throw new ct(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${u.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return u.registeredClass.constructor_body[e-1]=()=>{Ft(`Cannot construct ${u.name} due to unbound types`,s)},ot([],s,f=>(f.splice(1,0,null),u.registeredClass.constructor_body[e-1]=zt(l,f,null,a,o),[])),[]})},an=(t,e,r,n,a,o,s,u,l)=>{var f=Lt(r,n);e=B(e),o=q(a,o),ot([],[t],function(h){h=h[0];var y=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),u&&h.registeredClass.pureVirtualFunctions.push(e);function g(){Ft(`Cannot call ${y} due to unbound types`,f)}var T=h.registeredClass.instancePrototype,x=T[e];return x===void 0||x.overloadTable===void 0&&x.className!==h.name&&x.argCount===r-2?(g.argCount=r-2,g.className=h.name,T[e]=g):(ve(T,e,y),T[e].overloadTable[r-2]=g),ot([],f,function(R){var S=zt(y,R,h,o,s);return T[e].overloadTable===void 0?(S.argCount=r-2,T[e]=S):T[e].overloadTable[r-2]=S,[]}),[]})};function on(){Object.assign(Te.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function Te(){this.allocated=[void 0],this.freelist=[]}var X=new Te,Pe=t=>{t>=X.reserved&&--X.get(t).refcount===0&&X.free(t)},sn=()=>{for(var t=0,e=X.reserved;e<X.allocated.length;++e)X.allocated[e]!==void 0&&++t;return t},un=()=>{X.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),X.reserved=X.allocated.length,i.count_emval_handles=sn},et={toValue:t=>(t||P("Cannot use deleted val. handle = "+t),X.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return X.allocate({refcount:1,value:t})}}},cn=(t,e)=>{e=B(e),Z(t,{name:e,fromWireType:r=>{var n=et.toValue(r);return Pe(r),n},toWireType:(r,n)=>et.toHandle(n),argPackAdvance:K,readValueFromPointer:Wt,destructorFunction:null})},Yt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},ln=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(Kt[r>>2])};case 8:return function(r){return this.fromWireType(te[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},fn=(t,e,r)=>{e=B(e),Z(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:K,readValueFromPointer:ln(e,r),destructorFunction:null})},dn=(t,e,r,n,a,o,s)=>{var u=Lt(e,r);t=B(t),a=q(n,a),ge(t,function(){Ft(`Cannot call ${t} due to unbound types`,u)},e-1),ot([],u,function(l){var f=[l[0],null].concat(l.slice(1));return $e(t,zt(t,f,null,a,o),e-1),[]})},hn=(t,e,r)=>{switch(e){case 1:return r?n=>G[n>>0]:n=>W[n>>0];case 2:return r?n=>dt[n>>1]:n=>$t[n>>1];case 4:return r?n=>k[n>>2]:n=>A[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},pn=(t,e,r,n,a)=>{e=B(e);var o=h=>h;if(n===0){var s=32-8*r;o=h=>h<<s>>>s}var u=e.includes("unsigned"),l=(h,y)=>{},f;u?f=function(h,y){return l(y,this.name),y>>>0}:f=function(h,y){return l(y,this.name),y},Z(t,{name:e,fromWireType:o,toWireType:f,argPackAdvance:K,readValueFromPointer:hn(e,r,n!==0),destructorFunction:null})},mn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(s){var u=A[s>>2],l=A[s+4>>2];return new a(G.buffer,l,u)}r=B(r),Z(t,{name:r,fromWireType:o,argPackAdvance:K,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Ee=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,s=0;s<t.length;++s){var u=t.charCodeAt(s);if(u>=55296&&u<=57343){var l=t.charCodeAt(++s);u=65536+((u&1023)<<10)|l&1023}if(u<=127){if(r>=o)break;e[r++]=u}else if(u<=2047){if(r+1>=o)break;e[r++]=192|u>>6,e[r++]=128|u&63}else if(u<=65535){if(r+2>=o)break;e[r++]=224|u>>12,e[r++]=128|u>>6&63,e[r++]=128|u&63}else{if(r+3>=o)break;e[r++]=240|u>>18,e[r++]=128|u>>12&63,e[r++]=128|u>>6&63,e[r++]=128|u&63}}return e[r]=0,r-a},yn=(t,e,r)=>Ee(t,W,e,r),xe=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},Se=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,vn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Se)return Se.decode(t.subarray(e,a));for(var o="";e<a;){var s=t[e++];if(!(s&128)){o+=String.fromCharCode(s);continue}var u=t[e++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|u);continue}var l=t[e++]&63;if((s&240)==224?s=(s&15)<<12|u<<6|l:s=(s&7)<<18|u<<12|l<<6|t[e++]&63,s<65536)o+=String.fromCharCode(s);else{var f=s-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return o},Nt=(t,e)=>t?vn(W,t,e):"",gn=(t,e)=>{e=B(e);var r=e==="std::string";Z(t,{name:e,fromWireType(n){var a=A[n>>2],o=n+4,s;if(r)for(var u=o,l=0;l<=a;++l){var f=o+l;if(l==a||W[f]==0){var h=f-u,y=Nt(u,h);s===void 0?s=y:(s+=String.fromCharCode(0),s+=y),u=f+1}}else{for(var g=new Array(a),l=0;l<a;++l)g[l]=String.fromCharCode(W[o+l]);s=g.join("")}return tt(n),s},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,s=typeof a=="string";s||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||P("Cannot pass non-string to std::string"),r&&s?o=xe(a):o=a.length;var u=Xt(4+o+1),l=u+4;if(A[u>>2]=o,r&&s)yn(a,l,o+1);else if(s)for(var f=0;f<o;++f){var h=a.charCodeAt(f);h>255&&(tt(l),P("String has UTF-16 code units that do not fit in 8 bits")),W[l+f]=h}else for(var f=0;f<o;++f)W[l+f]=a[f];return n!==null&&n.push(tt,u),u},argPackAdvance:K,readValueFromPointer:we,destructorFunction(n){tt(n)}})},Ae=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,wn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&$t[n];)++n;if(r=n<<1,r-t>32&&Ae)return Ae.decode(W.subarray(t,r));for(var o="",s=0;!(s>=e/2);++s){var u=dt[t+s*2>>1];if(u==0)break;o+=String.fromCharCode(u)}return o},$n=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var n=e,a=r<t.length*2?r/2:t.length,o=0;o<a;++o){var s=t.charCodeAt(o);dt[e>>1]=s,e+=2}return dt[e>>1]=0,e-n},bn=t=>t.length*2,Cn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=k[t+r*4>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},_n=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,o=0;o<t.length;++o){var s=t.charCodeAt(o);if(s>=55296&&s<=57343){var u=t.charCodeAt(++o);s=65536+((s&1023)<<10)|u&1023}if(k[e>>2]=s,e+=4,e+4>a)break}return k[e>>2]=0,e-n},Tn=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},Pn=(t,e,r)=>{r=B(r);var n,a,o,s,u;e===2?(n=wn,a=$n,s=bn,o=()=>$t,u=1):e===4&&(n=Cn,a=_n,s=Tn,o=()=>A,u=2),Z(t,{name:r,fromWireType:l=>{for(var f=A[l>>2],h=o(),y,g=l+4,T=0;T<=f;++T){var x=l+4+T*e;if(T==f||h[x>>u]==0){var R=x-g,S=n(g,R);y===void 0?y=S:(y+=String.fromCharCode(0),y+=S),g=x+e}}return tt(l),y},toWireType:(l,f)=>{typeof f!="string"&&P(`Cannot pass non-string to C++ string type ${r}`);var h=s(f),y=Xt(4+h+e);return A[y>>2]=h>>u,a(f,y+4,h+e),l!==null&&l.push(tt,y),y},argPackAdvance:K,readValueFromPointer:Wt,destructorFunction(l){tt(l)}})},En=(t,e,r,n,a,o)=>{Pt[t]={name:B(e),rawConstructor:q(r,n),rawDestructor:q(a,o),fields:[]}},xn=(t,e,r,n,a,o,s,u,l,f)=>{Pt[t].fields.push({fieldName:B(e),getterReturnType:r,getter:q(n,a),getterContext:o,setterArgumentType:s,setter:q(u,l),setterContext:f})},Sn=(t,e)=>{e=B(e),Z(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},An={},Dn=t=>{var e=An[t];return e===void 0?B(t):e},De=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},On=t=>t===0?et.toHandle(De()):(t=Dn(t),et.toHandle(De()[t])),Fn=t=>{t>4&&(X.get(t).refcount+=1)},Oe=(t,e)=>{var r=at[t];return r===void 0&&P(e+" has unknown type "+_e(t)),r},Mn=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var s=Oe(A[n+o*4>>2],"parameter "+o);e[o+1]=s.readValueFromPointer(a),a+=s.argPackAdvance}var u=new(r.bind.apply(r,e));return et.toHandle(u)}},Fe={},jn=(t,e,r,n)=>{t=et.toValue(t);var a=Fe[e];return a||(a=Mn(e),Fe[e]=a),a(t,r,n)},In=(t,e)=>{t=Oe(t,"_emval_take_value");var r=t.readValueFromPointer(e);return et.toHandle(r)},Rn=()=>{bt("")},Hn=(t,e,r)=>W.copyWithin(t,e,e+r),Wn=()=>2147483648,kn=t=>{var e=J.buffer,r=(t-e.byteLength+65535)/65536;try{return J.grow(r),ee(),1}catch{}},Bn=t=>{var e=W.length;t>>>=0;var r=Wn();if(t>r)return!1;for(var n=(l,f)=>l+(f-l%f)%f,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var s=Math.min(r,n(Math.max(t,o),65536)),u=kn(s);if(u)return!0}return!1},Gt={},Un=()=>O||"./this.program",gt=()=>{if(!gt.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:Un()};for(var r in Gt)Gt[r]===void 0?delete e[r]:e[r]=Gt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);gt.strings=n}return gt.strings},Vn=(t,e)=>{for(var r=0;r<t.length;++r)G[e++>>0]=t.charCodeAt(r);G[e>>0]=0},Ln=(t,e)=>{var r=0;return gt().forEach((n,a)=>{var o=e+r;A[t+a*4>>2]=o,Vn(n,o),r+=n.length+1}),0},zn=(t,e)=>{var r=gt();A[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),A[e>>2]=n,0},Yn=t=>t,Mt=t=>t%4===0&&(t%100!==0||t%400===0),Nn=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Me=[31,29,31,30,31,30,31,31,30,31,30,31],je=[31,28,31,30,31,30,31,31,30,31,30,31],Gn=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Mt(r.getFullYear()),a=r.getMonth(),o=(n?Me:je)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function Xn(t,e,r){var n=r>0?r:xe(t)+1,a=new Array(n),o=Ee(t,a,0,a.length);return e&&(a.length=o),a}var qn=(t,e)=>{G.set(t,e)},Jn=(t,e,r,n)=>{var a=A[n+40>>2],o={tm_sec:k[n>>2],tm_min:k[n+4>>2],tm_hour:k[n+8>>2],tm_mday:k[n+12>>2],tm_mon:k[n+16>>2],tm_year:k[n+20>>2],tm_wday:k[n+24>>2],tm_yday:k[n+28>>2],tm_isdst:k[n+32>>2],tm_gmtoff:k[n+36>>2],tm_zone:a?Nt(a):""},s=Nt(r),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in u)s=s.replace(new RegExp(l,"g"),u[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,m,M){for(var I=typeof d=="number"?d.toString():d||"";I.length<m;)I=M[0]+I;return I}function g(d,m){return y(d,m,"0")}function T(d,m){function M(it){return it<0?-1:it>0?1:0}var I;return(I=M(d.getFullYear()-m.getFullYear()))===0&&(I=M(d.getMonth()-m.getMonth()))===0&&(I=M(d.getDate()-m.getDate())),I}function x(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function R(d){var m=Gn(new Date(d.tm_year+1900,0,1),d.tm_yday),M=new Date(m.getFullYear(),0,4),I=new Date(m.getFullYear()+1,0,4),it=x(M),It=x(I);return T(it,m)<=0?T(It,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var S={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>h[d.tm_mon].substring(0,3),"%B":d=>h[d.tm_mon],"%C":d=>{var m=d.tm_year+1900;return g(m/100|0,2)},"%d":d=>g(d.tm_mday,2),"%e":d=>y(d.tm_mday,2," "),"%g":d=>R(d).toString().substring(2),"%G":d=>R(d),"%H":d=>g(d.tm_hour,2),"%I":d=>{var m=d.tm_hour;return m==0?m=12:m>12&&(m-=12),g(m,2)},"%j":d=>g(d.tm_mday+Nn(Mt(d.tm_year+1900)?Me:je,d.tm_mon-1),3),"%m":d=>g(d.tm_mon+1,2),"%M":d=>g(d.tm_min,2),"%n":()=>` | ||
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>g(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var m=d.tm_yday+7-d.tm_wday;return g(Math.floor(m/7),2)},"%V":d=>{var m=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&m++,m){if(m==53){var M=(d.tm_wday+371-d.tm_yday)%7;M!=4&&(M!=3||!Mt(d.tm_year))&&(m=1)}}else{m=52;var I=(d.tm_wday+7-d.tm_yday-1)%7;(I==4||I==5&&Mt(d.tm_year%400-1))&&m++}return g(m,2)},"%w":d=>d.tm_wday,"%W":d=>{var m=d.tm_yday+7-(d.tm_wday+6)%7;return g(Math.floor(m/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var m=d.tm_gmtoff,M=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(M?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};s=s.replace(/%%/g,"\0\0");for(var l in S)s.includes(l)&&(s=s.replace(new RegExp(l,"g"),S[l](o)));s=s.replace(/\0\0/g,"%");var H=Xn(s,!1);return H.length>e?0:(qn(H,t),H.length-1)},Qn=(t,e,r,n,a)=>Jn(t,e,r,n);ce=i.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Fr(),ct=i.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},zr(),Br(),Qr(),Ce=i.UnboundTypeError=en(Error,"UnboundTypeError"),on(),un();var Zn={q:$r,u:br,a:_r,h:Tr,l:Pr,I:Er,P:xr,n:Sr,ba:Ar,d:Cr,oa:Dr,Y:Or,fa:jr,na:rn,ma:nn,D:an,ea:cn,W:fn,J:dn,w:pn,s:mn,V:gn,L:Pn,Q:En,pa:xn,ga:Sn,U:Pe,la:On,R:Fn,ia:jn,ka:In,K:Rn,da:Hn,ca:Bn,$:Ln,aa:zn,H:va,T:Ea,B:wa,p:pa,b:Kn,C:ya,ha:ba,c:aa,j:ia,i:ra,x:ga,O:ma,v:da,G:_a,N:Ta,A:$a,F:xa,Z:Aa,X:Da,k:oa,f:na,e:ea,g:ta,M:Pa,m:fa,o:sa,S:ua,t:la,ja:ha,y:Ca,r:ca,E:Sa,z:Yn,_:Qn},D=wr(),tt=i._free=t=>(tt=i._free=D.sa)(t),Xt=i._malloc=t=>(Xt=i._malloc=D.ta)(t),Ie=t=>(Ie=D.va)(t);i.__embind_initialize_bindings=()=>(i.__embind_initialize_bindings=D.wa)();var b=(t,e)=>(b=D.xa)(t,e),wt=t=>(wt=D.ya)(t),C=()=>(C=D.za)(),_=t=>(_=D.Aa)(t),Re=t=>(Re=D.Ba)(t),He=t=>(He=D.Ca)(t),We=(t,e,r)=>(We=D.Da)(t,e,r),ke=t=>(ke=D.Ea)(t);i.dynCall_viijii=(t,e,r,n,a,o,s)=>(i.dynCall_viijii=D.Fa)(t,e,r,n,a,o,s);var Be=i.dynCall_jiii=(t,e,r,n)=>(Be=i.dynCall_jiii=D.Ga)(t,e,r,n),Ue=i.dynCall_jiiii=(t,e,r,n,a)=>(Ue=i.dynCall_jiiii=D.Ha)(t,e,r,n,a);i.dynCall_iiiiij=(t,e,r,n,a,o,s)=>(i.dynCall_iiiiij=D.Ia)(t,e,r,n,a,o,s),i.dynCall_iiiiijj=(t,e,r,n,a,o,s,u,l)=>(i.dynCall_iiiiijj=D.Ja)(t,e,r,n,a,o,s,u,l),i.dynCall_iiiiiijj=(t,e,r,n,a,o,s,u,l,f)=>(i.dynCall_iiiiiijj=D.Ka)(t,e,r,n,a,o,s,u,l,f);function Kn(t,e){var r=C();try{return E(t)(e)}catch(n){if(_(r),n!==n+0)throw n;b(1,0)}}function ta(t,e,r,n){var a=C();try{E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function ea(t,e,r){var n=C();try{E(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function ra(t,e,r,n,a){var o=C();try{return E(t)(e,r,n,a)}catch(s){if(_(o),s!==s+0)throw s;b(1,0)}}function na(t,e){var r=C();try{E(t)(e)}catch(n){if(_(r),n!==n+0)throw n;b(1,0)}}function aa(t,e,r){var n=C();try{return E(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function oa(t){var e=C();try{E(t)()}catch(r){if(_(e),r!==r+0)throw r;b(1,0)}}function ia(t,e,r,n){var a=C();try{return E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function sa(t,e,r,n,a,o){var s=C();try{E(t)(e,r,n,a,o)}catch(u){if(_(s),u!==u+0)throw u;b(1,0)}}function ua(t,e,r,n,a,o,s){var u=C();try{E(t)(e,r,n,a,o,s)}catch(l){if(_(u),l!==l+0)throw l;b(1,0)}}function ca(t,e,r,n,a,o,s,u,l,f,h){var y=C();try{E(t)(e,r,n,a,o,s,u,l,f,h)}catch(g){if(_(y),g!==g+0)throw g;b(1,0)}}function la(t,e,r,n,a,o,s,u){var l=C();try{E(t)(e,r,n,a,o,s,u)}catch(f){if(_(l),f!==f+0)throw f;b(1,0)}}function fa(t,e,r,n,a){var o=C();try{E(t)(e,r,n,a)}catch(s){if(_(o),s!==s+0)throw s;b(1,0)}}function da(t,e,r,n,a,o,s){var u=C();try{return E(t)(e,r,n,a,o,s)}catch(l){if(_(u),l!==l+0)throw l;b(1,0)}}function ha(t,e,r,n,a,o,s,u,l){var f=C();try{E(t)(e,r,n,a,o,s,u,l)}catch(h){if(_(f),h!==h+0)throw h;b(1,0)}}function pa(t){var e=C();try{return E(t)()}catch(r){if(_(e),r!==r+0)throw r;b(1,0)}}function ma(t,e,r,n,a,o,s){var u=C();try{return E(t)(e,r,n,a,o,s)}catch(l){if(_(u),l!==l+0)throw l;b(1,0)}}function ya(t,e,r,n){var a=C();try{return E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function va(t,e,r,n){var a=C();try{return E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function ga(t,e,r,n,a,o){var s=C();try{return E(t)(e,r,n,a,o)}catch(u){if(_(s),u!==u+0)throw u;b(1,0)}}function wa(t,e,r,n,a,o){var s=C();try{return E(t)(e,r,n,a,o)}catch(u){if(_(s),u!==u+0)throw u;b(1,0)}}function $a(t,e,r,n,a,o,s,u,l,f){var h=C();try{return E(t)(e,r,n,a,o,s,u,l,f)}catch(y){if(_(h),y!==y+0)throw y;b(1,0)}}function ba(t,e,r){var n=C();try{return E(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function Ca(t,e,r,n,a,o,s,u,l,f){var h=C();try{E(t)(e,r,n,a,o,s,u,l,f)}catch(y){if(_(h),y!==y+0)throw y;b(1,0)}}function _a(t,e,r,n,a,o,s,u){var l=C();try{return E(t)(e,r,n,a,o,s,u)}catch(f){if(_(l),f!==f+0)throw f;b(1,0)}}function Ta(t,e,r,n,a,o,s,u,l){var f=C();try{return E(t)(e,r,n,a,o,s,u,l)}catch(h){if(_(f),h!==h+0)throw h;b(1,0)}}function Pa(t,e,r,n,a,o,s){var u=C();try{E(t)(e,r,n,a,o,s)}catch(l){if(_(u),l!==l+0)throw l;b(1,0)}}function Ea(t,e,r,n){var a=C();try{return E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function xa(t,e,r,n,a,o,s,u,l,f,h,y){var g=C();try{return E(t)(e,r,n,a,o,s,u,l,f,h,y)}catch(T){if(_(g),T!==T+0)throw T;b(1,0)}}function Sa(t,e,r,n,a,o,s,u,l,f,h,y,g,T,x,R){var S=C();try{E(t)(e,r,n,a,o,s,u,l,f,h,y,g,T,x,R)}catch(H){if(_(S),H!==H+0)throw H;b(1,0)}}function Aa(t,e,r,n){var a=C();try{return Be(t,e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Da(t,e,r,n,a){var o=C();try{return Ue(t,e,r,n,a)}catch(s){if(_(o),s!==s+0)throw s;b(1,0)}}var jt;ht=function t(){jt||Ve(),jt||(ht=t)};function Ve(){if(rt>0||(ur(),rt>0))return;function t(){jt||(jt=!0,i.calledRun=!0,!ft&&(cr(),v(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),lr()))}i.setStatus?(i.setStatus("Running..."),setTimeout(function(){setTimeout(function(){i.setStatus("")},1),t()},1)):t()}if(i.preInit)for(typeof i.preInit=="function"&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ve(),p.ready}})();function Ga(c){return Qt(Zt,c)}async function Xa(c,{tryHarder:p=U.tryHarder,formats:i=U.formats,maxSymbols:v=U.maxSymbols}=U){return Ya(c,{tryHarder:p,formats:i,maxSymbols:v},Zt)}async function qa(c,{tryHarder:p=U.tryHarder,formats:i=U.formats,maxSymbols:v=U.maxSymbols}=U){return Na(c,{tryHarder:p,formats:i,maxSymbols:v},Zt)}const Jt=new Map([["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["data_matrix","DataMatrix"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["pdf417","PDF417"],["qr_code","QRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"]]);function Ja(c){for(const[p,i]of Jt)if(c===i)return p;return"unknown"}var lt;class Qa extends EventTarget{constructor(i={}){var v;super();ze(this,lt,void 0);try{const $=(v=i==null?void 0:i.formats)==null?void 0:v.filter(w=>w!=="unknown");if(($==null?void 0:$.length)===0)throw new TypeError("Hint option provided, but is empty.");$==null||$.forEach(w=>{if(!Ne.includes(w))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${w}' is not a valid enum value of type BarcodeFormat.`)}),Ye(this,lt,$??[]),Ga().then(w=>{this.dispatchEvent(new CustomEvent("load",{detail:w}))}).catch(w=>{this.dispatchEvent(new CustomEvent("error",{detail:w}))})}catch($){throw Ge($,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Ne.filter(i=>i!=="unknown")}async detect(i){try{const v=await Ra(i);if(v===null)return[];let $;try{ar(v)?$=await Xa(v,{tryHarder:!0,formats:qt(this,lt).map(w=>Jt.get(w))}):$=await qa(v,{tryHarder:!0,formats:qt(this,lt).map(w=>Jt.get(w))})}catch(w){throw console.error(w),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return $.map(w=>{const{topLeft:{x:O,y:Y},topRight:{x:j,y:F},bottomLeft:{x:L,y:z},bottomRight:{x:V,y:N}}=w.position,J=Math.min(O,j,L,V),ft=Math.min(Y,F,z,N),G=Math.max(O,j,L,V),W=Math.max(Y,F,z,N);return{boundingBox:new DOMRectReadOnly(J,ft,G-J,W-ft),rawValue:new TextDecoder().decode(w.bytes),format:Ja(w.format),cornerPoints:[{x:O,y:Y},{x:j,y:F},{x:V,y:N},{x:L,y:z}]}})}catch(v){throw Ge(v,"Failed to execute 'detect' on 'BarcodeDetector'")}}}lt=new WeakMap;exports.BarcodeDetector=Qa;exports.setZXingModuleOverrides=za; |
/// <reference types="dom-webcodecs" /> | ||
export declare const BARCODE_DETECTOR_FORMATS: readonly ["aztec", "code_128", "code_39", "code_93", "codabar", "data_matrix", "ean_13", "ean_8", "itf", "pdf417", "qr_code", "upc_a", "upc_e", "unknown"]; | ||
export declare function getImageDataFromImageBitmapSource(image: ImageBitmapSourceWebCodecs): Promise<ImageData | null>; | ||
export declare function isBlob(image: ImageBitmapSourceWebCodecs): image is Blob; | ||
export declare function getImageDataOrBlobFromImageBitmapSource(image: ImageBitmapSourceWebCodecs): Promise<ImageData | Blob | null>; | ||
declare global { | ||
@@ -5,0 +6,0 @@ interface SVGImageElement { |
/// <reference types="dom-webcodecs" /> | ||
export declare const BARCODE_DETECTOR_FORMATS: readonly ["aztec", "code_128", "code_39", "code_93", "codabar", "data_matrix", "ean_13", "ean_8", "itf", "pdf417", "qr_code", "upc_a", "upc_e", "unknown"]; | ||
export declare function getImageDataFromImageBitmapSource(image: ImageBitmapSourceWebCodecs): Promise<ImageData | null>; | ||
export declare function isBlob(image: ImageBitmapSourceWebCodecs): image is Blob; | ||
export declare function getImageDataOrBlobFromImageBitmapSource(image: ImageBitmapSourceWebCodecs): Promise<ImageData | Blob | null>; | ||
declare global { | ||
@@ -5,0 +6,0 @@ interface SVGImageElement { |
@@ -1,3 +0,3 @@ | ||
var ar=(M,U,z)=>{if(!U.has(M))throw TypeError("Cannot "+z)};var or=(M,U,z)=>(ar(M,U,"read from private field"),z?z.call(M):U.get(M)),ir=(M,U,z)=>{if(U.has(M))throw TypeError("Cannot add the same private member more than once");U instanceof WeakSet?U.add(M):U.set(M,z)},sr=(M,U,z,yt)=>(ar(M,U,"write to private field"),yt?yt.call(M,z):U.set(M,z),z);var BarcodeDetectionAPI=function(M){var mt;"use strict";const U=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function z(c){if(yt(c))return{width:c.naturalWidth,height:c.naturalHeight};if(Kt(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(te(c))return{width:c.videoWidth,height:c.videoHeight};if(re(c))return{width:c.width,height:c.height};if(ae(c))return{width:c.displayWidth,height:c.displayHeight};if(ee(c))return{width:c.width,height:c.height};if(ne(c))return{width:c.width,height:c.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function yt(c){try{return c instanceof HTMLImageElement}catch{return!1}}function Kt(c){try{return c instanceof SVGImageElement}catch{return!1}}function te(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function ee(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function re(c){try{return c instanceof ImageBitmap}catch{return!1}}function ne(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function ae(c){try{return c instanceof VideoFrame}catch{return!1}}function ur(c){try{return c instanceof Blob}catch{return!1}}function cr(c){try{return c instanceof ImageData}catch{return!1}}function lr(c,m){try{const u=new OffscreenCanvas(c,m);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=m,u}}async function oe(c){if(yt(c)&&!await pr(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Kt(c)&&!await yr(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(ae(c)&&mr(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(te(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(re(c)&&gr(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:m,height:u}=z(c);if(m===0||u===0)return null;const w=lr(m,u).getContext("2d");w.drawImage(c,0,0);try{return w.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function dr(c){let m;try{if(createImageBitmap)m=await createImageBitmap(c);else{m=new Image;let g="";try{g=URL.createObjectURL(c),m.src=g,await m.decode()}finally{URL.revokeObjectURL(g)}}}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await oe(m)}function fr(c){const{width:m,height:u}=c;if(m===0||u===0)return null;const g=c.getContext("2d");try{return g.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function hr(c){if(ur(c))return await dr(c);if(cr(c)){if(vr(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return ee(c)||ne(c)?fr(c):await oe(c)}async function pr(c){try{return await c.decode(),!0}catch{return!1}}async function yr(c){var m;try{return await((m=c.decode)==null?void 0:m.call(c)),!0}catch{return!1}}function mr(c){return c.format===null}function vr(c){return c.data.buffer.byteLength===0}function gr(c){return c.width===0&&c.height===0}function ie(c,m){return c instanceof DOMException?new DOMException(`${m}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${m}: ${c.message}`):new Error(`${m}: ${c}`)}const se=c=>{let m;const u=new Set,g=(j,X)=>{const V=typeof j=="function"?j(m):j;if(!Object.is(V,m)){const R=m;m=X??typeof V!="object"?V:Object.assign({},m,V),u.forEach(q=>q(m,R))}},w=()=>m,E={setState:g,getState:w,subscribe:j=>(u.add(j),()=>u.delete(j)),destroy:()=>{u.clear()}};return m=c(g,w,E),E},wr=c=>c?se(c):se,$r={locateFile:(c,m)=>{var u;const g=(u=c.match(/_(.+?)\.wasm$/))==null?void 0:u[1];return g?`https://cdn.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.4/dist/${g}/${c}`:m+c}},ft=wr()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:$r}));function br(c){ft.setState({zxingModuleOverrides:c})}function ue(c,m=ft.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=ft.getState(),g=u.get(c);if(g&&Object.is(m,ft.getState().zxingModuleOverrides))return g;{ft.setState({zxingModuleOverrides:m});const w=c(m);return u.set(c,w),w}}const ce=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","UPC-A","UPC-E"],at={tryHarder:!0,formats:[],maxSymbols:255};async function Cr(c,{tryHarder:m=at.tryHarder,formats:u=at.formats,maxSymbols:g=at.maxSymbols}=at,w){const E=await ue(w,ft.getState().zxingModuleOverrides),{data:j,width:X,height:V,data:{byteLength:R}}=c,q=E._malloc(R);E.HEAP8.set(j,q);const Q=E.readBarcodesFromPixmap(q,X,V,m,_r(u),g);E._free(q);const Y=[];for(let L=0;L<Q.size();++L){const J=Q.get(L);Y.push({...J,format:Tr(J.format)})}return Y}function _r(c){return c.join("|")}function Tr(c){const m=le(c);let u=0,g=ce.length-1;for(;u<=g;){const w=Math.floor((u+g)/2),E=ce[w],j=le(E);if(j===m)return E;j<m?u=w+1:g=w-1}return"None"}function le(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var de=(()=>{var c=document.currentScript&&document.currentScript.src||new URL("index.js",document.baseURI).href;return function(m={}){var u=m,g,w;u.ready=new Promise((t,e)=>{g=t,w=e});var E=Object.assign({},u),j="./this.program",X=typeof window=="object",V=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var R="";function q(t){return u.locateFile?u.locateFile(t,R):R+t}var Q;(X||V)&&(V?R=self.location.href:typeof document<"u"&&document.currentScript&&(R=document.currentScript.src),c&&(R=c),R.indexOf("blob:")!==0?R=R.substr(0,R.replace(/[?#].*/,"").lastIndexOf("/")+1):R="",V&&(Q=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),u.print||console.log.bind(console);var Y=u.printErr||console.error.bind(console);Object.assign(u,E),E=null,u.arguments&&u.arguments,u.thisProgram&&(j=u.thisProgram),u.quit&&u.quit;var L;u.wasmBinary&&(L=u.wasmBinary),u.noExitRuntime,typeof WebAssembly!="object"&&Dt("no native wasm support detected");var J,vt=!1,N,H,gt,Et,k,x,pe,ye;function me(){var t=J.buffer;u.HEAP8=N=new Int8Array(t),u.HEAP16=gt=new Int16Array(t),u.HEAPU8=H=new Uint8Array(t),u.HEAPU16=Et=new Uint16Array(t),u.HEAP32=k=new Int32Array(t),u.HEAPU32=x=new Uint32Array(t),u.HEAPF32=pe=new Float32Array(t),u.HEAPF64=ye=new Float64Array(t)}var ve,ge=[],we=[],$e=[];function Ar(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Or(u.preRun.shift());Bt(ge)}function xr(){Bt(we)}function Sr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Mr(u.postRun.shift());Bt($e)}function Or(t){ge.unshift(t)}function Fr(t){we.unshift(t)}function Mr(t){$e.unshift(t)}var st=0,wt=null;function jr(t){st++,u.monitorRunDependencies&&u.monitorRunDependencies(st)}function Rr(t){if(st--,u.monitorRunDependencies&&u.monitorRunDependencies(st),st==0&&wt){var e=wt;wt=null,e()}}function Dt(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",Y(t),vt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw w(e),e}var Ir="data:application/octet-stream;base64,";function be(t){return t.startsWith(Ir)}var ut;u.locateFile?(ut="zxing_reader.wasm",be(ut)||(ut=q(ut))):ut=new URL("/reader/zxing_reader.wasm",self.location).href;function Ce(t){if(t==ut&&L)return new Uint8Array(L);if(Q)return Q(t);throw"both async and sync fetching of the wasm failed"}function Wr(t){return!L&&(X||V)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>Ce(t)):Promise.resolve().then(()=>Ce(t))}function _e(t,e,r){return Wr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{Y(`failed to asynchronously prepare wasm: ${n}`),Dt(n)})}function Hr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!be(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(i){return Y(`wasm streaming compile failed: ${i}`),Y("falling back to ArrayBuffer instantiation"),_e(e,r,n)})}):_e(e,r,n)}function kr(){var t={a:Ea};function e(n,a){var o=n.exports;return S=o,J=S.qa,me(),ve=S.ua,Fr(S.ra),Rr(),o}jr();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){Y(`Module.instantiateWasm callback failed with error: ${n}`),w(n)}return Hr(L,ut,t,r).catch(w),{}}var Bt=t=>{for(;t.length>0;)t.shift()(u)},At=[],xt=0,Br=t=>{var e=new St(t);return e.get_caught()||(e.set_caught(!0),xt--),e.set_rethrown(!1),At.push(e),Je(e.excPtr),e.get_exception_ptr()},K=0,Ur=()=>{$(0,0);var t=At.pop();Qe(t.excPtr),K=0};function St(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){x[this.ptr+4>>2]=e},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(e){x[this.ptr+8>>2]=e},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,N[this.ptr+12>>0]=e},this.get_caught=function(){return N[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,N[this.ptr+13>>0]=e},this.get_rethrown=function(){return N[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){x[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=tr(this.get_type());if(e)return x[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var Vr=t=>{throw K||(K=t),K},Ut=t=>{var e=K;if(!e)return Pt(0),0;var r=new St(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return Pt(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var i=r.ptr+16;if(Ke(o,n,i))return Pt(o),e}return Pt(n),e},Lr=()=>Ut([]),zr=t=>Ut([t]),Yr=(t,e)=>Ut([t,e]),Nr=t=>{var e=new St(t).get_exception_ptr();return e},Gr=()=>{var t=At.pop();t||Dt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(At.push(t),t.set_rethrown(!0),t.set_caught(!1),xt++),K=e,K},Xr=(t,e,r)=>{var n=new St(t);throw n.init(e,r),K=t,xt++,K},qr=()=>xt,Ot={},Te=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Vt(t){return this.fromWireType(k[t>>2])}var ht={},ct={},Ft={},Pe=void 0,Mt=t=>{throw new Pe(t)},lt=(t,e,r)=>{t.forEach(function(s){Ft[s]=e});function n(s){var l=r(s);l.length!==t.length&&Mt("Mismatched type converter count");for(var d=0;d<t.length;++d)tt(t[d],l[d])}var a=new Array(e.length),o=[],i=0;e.forEach((s,l)=>{ct.hasOwnProperty(s)?a[l]=ct[s]:(o.push(s),ht.hasOwnProperty(s)||(ht[s]=[]),ht[s].push(()=>{a[l]=ct[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)},Zr=t=>{var e=Ot[t];delete Ot[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(i=>i.getterReturnType).concat(a.map(i=>i.setterArgumentType));lt([t],o,i=>{var s={};return a.forEach((l,d)=>{var h=l.fieldName,y=i[d],v=l.getter,_=l.getterContext,D=i[d+a.length],I=l.setter,A=l.setterContext;s[h]={read:W=>y.fromWireType(v(_,W)),write:(W,f)=>{var p=[];I(A,W,D.toWireType(p,f)),Te(p)}}}),[{name:e.name,fromWireType:l=>{var d={};for(var h in s)d[h]=s[h].read(l);return n(l),d},toWireType:(l,d)=>{for(var h in s)if(!(h in d))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in s)s[h].write(y,d[h]);return l!==null&&l.push(n,y),y},argPackAdvance:et,readValueFromPointer:Vt,destructorFunction:n}]})},Qr=(t,e,r,n,a)=>{},Jr=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Ee=t},Ee=void 0,B=t=>{for(var e="",r=t;H[r];)e+=Ee[H[r++]];return e},pt=void 0,T=t=>{throw new pt(t)};function Kr(t,e,r={}){var n=e.name;if(t||T(`type "${n}" must have a positive integer typeid pointer`),ct.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;T(`Cannot register type '${n}' twice`)}if(ct[t]=e,delete Ft[t],ht.hasOwnProperty(t)){var a=ht[t];delete ht[t],a.forEach(o=>o())}}function tt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Kr(t,e,r)}var et=8,tn=(t,e,r,n)=>{e=B(e),tt(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:et,readValueFromPointer:function(a){return this.fromWireType(H[a])},destructorFunction:null})};function en(t){if(!(this instanceof ot)||!(t instanceof ot))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a}var rn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Lt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}T(e(t)+" instance already deleted")},zt=!1,De=t=>{},nn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Ae=t=>{t.count.value-=1;var e=t.count.value===0;e&&nn(t)},xe=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=xe(t,e,r.baseClass);return n===null?null:r.downcast(n)},Se={},an=()=>Object.keys(Ct).length,on=()=>{var t=[];for(var e in Ct)Ct.hasOwnProperty(e)&&t.push(Ct[e]);return t},$t=[],Yt=()=>{for(;$t.length;){var t=$t.pop();t.$$.deleteScheduled=!1,t.delete()}},bt=void 0,sn=t=>{bt=t,$t.length&&bt&&bt(Yt)},un=()=>{u.getInheritedInstanceCount=an,u.getLiveInheritedInstances=on,u.flushPendingDeletes=Yt,u.setDelayFunction=sn},Ct={},cn=(t,e)=>{for(e===void 0&&T("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},ln=(t,e)=>(e=cn(t,e),Ct[e]),jt=(t,e)=>{(!e.ptrType||!e.ptr)&&Mt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Mt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},_t(Object.create(t,{$$:{value:e}}))};function dn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=ln(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=Se[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var l=xe(e,this.registeredClass,s.registeredClass);return l===null?a.call(this):this.isSmartPointer?jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:t}):jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var _t=t=>typeof FinalizationRegistry>"u"?(_t=e=>e,t):(zt=new FinalizationRegistry(e=>{Ae(e.$$)}),_t=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};zt.register(e,a,e)}return e},De=e=>zt.unregister(e),_t(t));function fn(){if(this.$$.ptr||Lt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=_t(Object.create(Object.getPrototypeOf(this),{$$:{value:rn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function hn(){this.$$.ptr||Lt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&T("Object already scheduled for deletion"),De(this),Ae(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function pn(){return!this.$$.ptr}function yn(){return this.$$.ptr||Lt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&T("Object already scheduled for deletion"),$t.push(this),$t.length===1&&bt&&bt(Yt),this.$$.deleteScheduled=!0,this}var mn=()=>{ot.prototype.isAliasOf=en,ot.prototype.clone=fn,ot.prototype.delete=hn,ot.prototype.isDeleted=pn,ot.prototype.deleteLater=yn};function ot(){}var vn=48,gn=57,Oe=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=vn&&e<=gn?`_${t}`:t};function Fe(t,e){return t=Oe(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var Me=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||T(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},je=(t,e,r)=>{u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&T(`Cannot register public name '${t}' twice`),Me(u,t,t),u.hasOwnProperty(r)&&T(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),u[t].overloadTable[r]=e):(u[t]=e,r!==void 0&&(u[t].numArguments=r))};function wn(t,e,r,n,a,o,i,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var Nt=(t,e,r)=>{for(;e!==r;)e.upcast||T(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function $n(t,e){if(e===null)return this.isReference&&T(`null is not a valid ${this.name}`),0;e.$$||T(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||T(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function bn(t,e){var r;if(e===null)return this.isReference&&T(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||T(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||T(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&T(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=Nt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&T("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:T(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,it.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:T("Unsupporting sharing policy")}return r}function Cn(t,e){if(e===null)return this.isReference&&T(`null is not a valid ${this.name}`),0;e.$$||T(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||T(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&T(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function Re(t){return this.fromWireType(x[t>>2])}function _n(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Tn(t){this.rawDestructor&&this.rawDestructor(t)}var Pn=t=>{t!==null&&t.delete()},En=()=>{rt.prototype.getPointee=_n,rt.prototype.destructor=Tn,rt.prototype.argPackAdvance=et,rt.prototype.readValueFromPointer=Re,rt.prototype.deleteObject=Pn,rt.prototype.fromWireType=dn};function rt(t,e,r,n,a,o,i,s,l,d,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=$n,this.destructorFunction=null):(this.toWireType=Cn,this.destructorFunction=null):this.toWireType=bn}var Ie=(t,e,r)=>{u.hasOwnProperty(t)||Mt("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)},Dn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Rt=[],P=t=>{var e=Rt[t];return e||(t>=Rt.length&&(Rt.length=t+1),Rt[t]=e=ve.get(t)),e},An=(t,e,r)=>{if(t.includes("j"))return Dn(t,e,r);var n=P(e).apply(null,r);return n},xn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),An(t,e,r)}},Z=(t,e)=>{t=B(t);function r(){return t.includes("j")?xn(t,e):P(e)}var n=r();return typeof n!="function"&&T(`unknown function pointer with signature ${t}: ${e}`),n},Sn=(t,e)=>{var r=Fe(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` | ||
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},We=void 0,He=t=>{var e=Ze(t),r=B(e);return nt(e),r},It=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!ct[o]){if(Ft[o]){Ft[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new We(`${t}: `+r.map(He).join([", "]))},On=(t,e,r,n,a,o,i,s,l,d,h,y,v)=>{h=B(h),o=Z(a,o),s&&(s=Z(i,s)),d&&(d=Z(l,d)),v=Z(y,v);var _=Oe(h);je(_,function(){It(`Cannot construct ${h} due to unbound types`,[n])}),lt([t,e,r],n?[n]:[],function(D){D=D[0];var I,A;n?(I=D.registeredClass,A=I.instancePrototype):A=ot.prototype;var W=Fe(_,function(){if(Object.getPrototypeOf(this)!==f)throw new pt("Use 'new' to construct "+h);if(p.constructor_body===void 0)throw new pt(h+" has no accessible constructor");var kt=p.constructor_body[arguments.length];if(kt===void 0)throw new pt(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(p.constructor_body).toString()}) parameters instead!`);return kt.apply(this,arguments)}),f=Object.create(A,{constructor:{value:W}});W.prototype=f;var p=new wn(h,W,f,v,I,o,s,d);p.baseClass&&(p.baseClass.__derivedClasses===void 0&&(p.baseClass.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var O=new rt(h,p,!0,!1,!1),F=new rt(h+"*",p,!1,!1,!1),dt=new rt(h+" const*",p,!1,!0,!1);return Se[t]={pointerType:F,constPointerType:dt},Ie(_,W),[O,F,dt]})},Gt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(x[e+n*4>>2]);return r};function Xt(t,e,r,n,a,o){var i=e.length;i<2&&T("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=e[1]!==null&&r!==null,l=!1,d=1;d<e.length;++d)if(e[d]!==null&&e[d].destructorFunction===void 0){l=!0;break}var h=e[0].name!=="void",y=i-2,v=new Array(y),_=[],D=[];return function(){arguments.length!==y&&T(`function ${t} called with ${arguments.length} arguments, expected ${y}`),D.length=0;var I;_.length=s?2:1,_[0]=a,s&&(I=e[1].toWireType(D,this),_[1]=I);for(var A=0;A<y;++A)v[A]=e[A+2].toWireType(D,arguments[A]),_.push(v[A]);var W=n.apply(null,_);function f(p){if(l)Te(D);else for(var O=s?1:2;O<e.length;O++){var F=O===1?I:v[O-2];e[O].destructorFunction!==null&&e[O].destructorFunction(F)}if(h)return e[0].fromWireType(p)}return f(W)}}var Fn=(t,e,r,n,a,o)=>{var i=Gt(e,r);a=Z(n,a),lt([],[t],function(s){s=s[0];var l=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[e-1]!==void 0)throw new pt(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return s.registeredClass.constructor_body[e-1]=()=>{It(`Cannot construct ${s.name} due to unbound types`,i)},lt([],i,d=>(d.splice(1,0,null),s.registeredClass.constructor_body[e-1]=Xt(l,d,null,a,o),[])),[]})},Mn=(t,e,r,n,a,o,i,s,l)=>{var d=Gt(r,n);e=B(e),o=Z(a,o),lt([],[t],function(h){h=h[0];var y=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&h.registeredClass.pureVirtualFunctions.push(e);function v(){It(`Cannot call ${y} due to unbound types`,d)}var _=h.registeredClass.instancePrototype,D=_[e];return D===void 0||D.overloadTable===void 0&&D.className!==h.name&&D.argCount===r-2?(v.argCount=r-2,v.className=h.name,_[e]=v):(Me(_,e,y),_[e].overloadTable[r-2]=v),lt([],d,function(I){var A=Xt(y,I,h,o,i);return _[e].overloadTable===void 0?(A.argCount=r-2,_[e]=A):_[e].overloadTable[r-2]=A,[]}),[]})};function jn(){Object.assign(ke.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function ke(){this.allocated=[void 0],this.freelist=[]}var G=new ke,Be=t=>{t>=G.reserved&&--G.get(t).refcount===0&&G.free(t)},Rn=()=>{for(var t=0,e=G.reserved;e<G.allocated.length;++e)G.allocated[e]!==void 0&&++t;return t},In=()=>{G.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),G.reserved=G.allocated.length,u.count_emval_handles=Rn},it={toValue:t=>(t||T("Cannot use deleted val. handle = "+t),G.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return G.allocate({refcount:1,value:t})}}},Wn=(t,e)=>{e=B(e),tt(t,{name:e,fromWireType:r=>{var n=it.toValue(r);return Be(r),n},toWireType:(r,n)=>it.toHandle(n),argPackAdvance:et,readValueFromPointer:Vt,destructorFunction:null})},qt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},Hn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(pe[r>>2])};case 8:return function(r){return this.fromWireType(ye[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},kn=(t,e,r)=>{e=B(e),tt(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:et,readValueFromPointer:Hn(e,r),destructorFunction:null})},Bn=(t,e,r,n,a,o,i)=>{var s=Gt(e,r);t=B(t),a=Z(n,a),je(t,function(){It(`Cannot call ${t} due to unbound types`,s)},e-1),lt([],s,function(l){var d=[l[0],null].concat(l.slice(1));return Ie(t,Xt(t,d,null,a,o),e-1),[]})},Un=(t,e,r)=>{switch(e){case 1:return r?n=>N[n>>0]:n=>H[n>>0];case 2:return r?n=>gt[n>>1]:n=>Et[n>>1];case 4:return r?n=>k[n>>2]:n=>x[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Vn=(t,e,r,n,a)=>{e=B(e);var o=h=>h;if(n===0){var i=32-8*r;o=h=>h<<i>>>i}var s=e.includes("unsigned"),l=(h,y)=>{},d;s?d=function(h,y){return l(y,this.name),y>>>0}:d=function(h,y){return l(y,this.name),y},tt(t,{name:e,fromWireType:o,toWireType:d,argPackAdvance:et,readValueFromPointer:Un(e,r,n!==0),destructorFunction:null})},Ln=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(i){var s=x[i>>2],l=x[i+4>>2];return new a(N.buffer,l,s)}r=B(r),tt(t,{name:r,fromWireType:o,argPackAdvance:et,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Ue=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,i=0;i<t.length;++i){var s=t.charCodeAt(i);if(s>=55296&&s<=57343){var l=t.charCodeAt(++i);s=65536+((s&1023)<<10)|l&1023}if(s<=127){if(r>=o)break;e[r++]=s}else if(s<=2047){if(r+1>=o)break;e[r++]=192|s>>6,e[r++]=128|s&63}else if(s<=65535){if(r+2>=o)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|s&63}else{if(r+3>=o)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|s&63}}return e[r]=0,r-a},zn=(t,e,r)=>Ue(t,H,e,r),Ve=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},Le=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Yn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Le)return Le.decode(t.subarray(e,a));for(var o="";e<a;){var i=t[e++];if(!(i&128)){o+=String.fromCharCode(i);continue}var s=t[e++]&63;if((i&224)==192){o+=String.fromCharCode((i&31)<<6|s);continue}var l=t[e++]&63;if((i&240)==224?i=(i&15)<<12|s<<6|l:i=(i&7)<<18|s<<12|l<<6|t[e++]&63,i<65536)o+=String.fromCharCode(i);else{var d=i-65536;o+=String.fromCharCode(55296|d>>10,56320|d&1023)}}return o},Zt=(t,e)=>t?Yn(H,t,e):"",Nn=(t,e)=>{e=B(e);var r=e==="std::string";tt(t,{name:e,fromWireType:n=>{var a=x[n>>2],o=n+4,i;if(r)for(var s=o,l=0;l<=a;++l){var d=o+l;if(l==a||H[d]==0){var h=d-s,y=Zt(s,h);i===void 0?i=y:(i+=String.fromCharCode(0),i+=y),s=d+1}}else{for(var v=new Array(a),l=0;l<a;++l)v[l]=String.fromCharCode(H[o+l]);i=v.join("")}return nt(n),i},toWireType:(n,a)=>{a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,i=typeof a=="string";i||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||T("Cannot pass non-string to std::string"),r&&i?o=Ve(a):o=a.length;var s=Jt(4+o+1),l=s+4;if(x[s>>2]=o,r&&i)zn(a,l,o+1);else if(i)for(var d=0;d<o;++d){var h=a.charCodeAt(d);h>255&&(nt(l),T("String has UTF-16 code units that do not fit in 8 bits")),H[l+d]=h}else for(var d=0;d<o;++d)H[l+d]=a[d];return n!==null&&n.push(nt,s),s},argPackAdvance:et,readValueFromPointer:Re,destructorFunction:n=>nt(n)})},ze=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Gn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Et[n];)++n;if(r=n<<1,r-t>32&&ze)return ze.decode(H.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=gt[t+i*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Xn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var n=e,a=r<t.length*2?r/2:t.length,o=0;o<a;++o){var i=t.charCodeAt(o);gt[e>>1]=i,e+=2}return gt[e>>1]=0,e-n},qn=t=>t.length*2,Zn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=k[t+r*4>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},Qn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,o=0;o<t.length;++o){var i=t.charCodeAt(o);if(i>=55296&&i<=57343){var s=t.charCodeAt(++o);i=65536+((i&1023)<<10)|s&1023}if(k[e>>2]=i,e+=4,e+4>a)break}return k[e>>2]=0,e-n},Jn=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},Kn=(t,e,r)=>{r=B(r);var n,a,o,i,s;e===2?(n=Gn,a=Xn,i=qn,o=()=>Et,s=1):e===4&&(n=Zn,a=Qn,i=Jn,o=()=>x,s=2),tt(t,{name:r,fromWireType:l=>{for(var d=x[l>>2],h=o(),y,v=l+4,_=0;_<=d;++_){var D=l+4+_*e;if(_==d||h[D>>s]==0){var I=D-v,A=n(v,I);y===void 0?y=A:(y+=String.fromCharCode(0),y+=A),v=D+e}}return nt(l),y},toWireType:(l,d)=>{typeof d!="string"&&T(`Cannot pass non-string to C++ string type ${r}`);var h=i(d),y=Jt(4+h+e);return x[y>>2]=h>>s,a(d,y+4,h+e),l!==null&&l.push(nt,y),y},argPackAdvance:et,readValueFromPointer:Vt,destructorFunction:l=>nt(l)})},ta=(t,e,r,n,a,o)=>{Ot[t]={name:B(e),rawConstructor:Z(r,n),rawDestructor:Z(a,o),fields:[]}},ea=(t,e,r,n,a,o,i,s,l,d)=>{Ot[t].fields.push({fieldName:B(e),getterReturnType:r,getter:Z(n,a),getterContext:o,setterArgumentType:i,setter:Z(s,l),setterContext:d})},ra=(t,e)=>{e=B(e),tt(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},na={},aa=t=>{var e=na[t];return e===void 0?B(t):e},Ye=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},oa=t=>t===0?it.toHandle(Ye()):(t=aa(t),it.toHandle(Ye()[t])),ia=t=>{t>4&&(G.get(t).refcount+=1)},Ne=(t,e)=>{var r=ct[t];return r===void 0&&T(e+" has unknown type "+He(t)),r},sa=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var i=Ne(x[n+o*4>>2],"parameter "+o);e[o+1]=i.readValueFromPointer(a),a+=i.argPackAdvance}var s=new(r.bind.apply(r,e));return it.toHandle(s)}},Ge={},ua=(t,e,r,n)=>{t=it.toValue(t);var a=Ge[e];return a||(a=sa(e),Ge[e]=a),a(t,r,n)},ca=(t,e)=>{t=Ne(t,"_emval_take_value");var r=t.readValueFromPointer(e);return it.toHandle(r)},la=()=>{Dt("")},da=(t,e,r)=>H.copyWithin(t,e,e+r),fa=()=>2147483648,ha=t=>{var e=J.buffer,r=(t-e.byteLength+65535)/65536;try{return J.grow(r),me(),1}catch{}},pa=t=>{var e=H.length;t>>>=0;var r=fa();if(t>r)return!1;for(var n=(l,d)=>l+(d-l%d)%d,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var i=Math.min(r,n(Math.max(t,o),65536)),s=ha(i);if(s)return!0}return!1},Qt={},ya=()=>j||"./this.program",Tt=()=>{if(!Tt.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:ya()};for(var r in Qt)Qt[r]===void 0?delete e[r]:e[r]=Qt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);Tt.strings=n}return Tt.strings},ma=(t,e)=>{for(var r=0;r<t.length;++r)N[e++>>0]=t.charCodeAt(r);N[e>>0]=0},va=(t,e)=>{var r=0;return Tt().forEach((n,a)=>{var o=e+r;x[t+a*4>>2]=o,ma(n,o),r+=n.length+1}),0},ga=(t,e)=>{var r=Tt();x[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),x[e>>2]=n,0},wa=t=>t,Wt=t=>t%4===0&&(t%100!==0||t%400===0),$a=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Xe=[31,29,31,30,31,30,31,31,30,31,30,31],qe=[31,28,31,30,31,30,31,31,30,31,30,31],ba=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Wt(r.getFullYear()),a=r.getMonth(),o=(n?Xe:qe)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function Ca(t,e,r){var n=r>0?r:Ve(t)+1,a=new Array(n),o=Ue(t,a,0,a.length);return e&&(a.length=o),a}var _a=(t,e)=>{N.set(t,e)},Ta=(t,e,r,n)=>{var a=x[n+40>>2],o={tm_sec:k[n>>2],tm_min:k[n+4>>2],tm_hour:k[n+8>>2],tm_mday:k[n+12>>2],tm_mon:k[n+16>>2],tm_year:k[n+20>>2],tm_wday:k[n+24>>2],tm_yday:k[n+28>>2],tm_isdst:k[n+32>>2],tm_gmtoff:k[n+36>>2],tm_zone:a?Zt(a):""},i=Zt(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in s)i=i.replace(new RegExp(l,"g"),s[l]);var d=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(f,p,O){for(var F=typeof f=="number"?f.toString():f||"";F.length<p;)F=O[0]+F;return F}function v(f,p){return y(f,p,"0")}function _(f,p){function O(dt){return dt<0?-1:dt>0?1:0}var F;return(F=O(f.getFullYear()-p.getFullYear()))===0&&(F=O(f.getMonth()-p.getMonth()))===0&&(F=O(f.getDate()-p.getDate())),F}function D(f){switch(f.getDay()){case 0:return new Date(f.getFullYear()-1,11,29);case 1:return f;case 2:return new Date(f.getFullYear(),0,3);case 3:return new Date(f.getFullYear(),0,2);case 4:return new Date(f.getFullYear(),0,1);case 5:return new Date(f.getFullYear()-1,11,31);case 6:return new Date(f.getFullYear()-1,11,30)}}function I(f){var p=ba(new Date(f.tm_year+1900,0,1),f.tm_yday),O=new Date(p.getFullYear(),0,4),F=new Date(p.getFullYear()+1,0,4),dt=D(O),kt=D(F);return _(dt,p)<=0?_(kt,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var A={"%a":f=>d[f.tm_wday].substring(0,3),"%A":f=>d[f.tm_wday],"%b":f=>h[f.tm_mon].substring(0,3),"%B":f=>h[f.tm_mon],"%C":f=>{var p=f.tm_year+1900;return v(p/100|0,2)},"%d":f=>v(f.tm_mday,2),"%e":f=>y(f.tm_mday,2," "),"%g":f=>I(f).toString().substring(2),"%G":f=>I(f),"%H":f=>v(f.tm_hour,2),"%I":f=>{var p=f.tm_hour;return p==0?p=12:p>12&&(p-=12),v(p,2)},"%j":f=>v(f.tm_mday+$a(Wt(f.tm_year+1900)?Xe:qe,f.tm_mon-1),3),"%m":f=>v(f.tm_mon+1,2),"%M":f=>v(f.tm_min,2),"%n":()=>` | ||
`,"%p":f=>f.tm_hour>=0&&f.tm_hour<12?"AM":"PM","%S":f=>v(f.tm_sec,2),"%t":()=>" ","%u":f=>f.tm_wday||7,"%U":f=>{var p=f.tm_yday+7-f.tm_wday;return v(Math.floor(p/7),2)},"%V":f=>{var p=Math.floor((f.tm_yday+7-(f.tm_wday+6)%7)/7);if((f.tm_wday+371-f.tm_yday-2)%7<=2&&p++,p){if(p==53){var O=(f.tm_wday+371-f.tm_yday)%7;O!=4&&(O!=3||!Wt(f.tm_year))&&(p=1)}}else{p=52;var F=(f.tm_wday+7-f.tm_yday-1)%7;(F==4||F==5&&Wt(f.tm_year%400-1))&&p++}return v(p,2)},"%w":f=>f.tm_wday,"%W":f=>{var p=f.tm_yday+7-(f.tm_wday+6)%7;return v(Math.floor(p/7),2)},"%y":f=>(f.tm_year+1900).toString().substring(2),"%Y":f=>f.tm_year+1900,"%z":f=>{var p=f.tm_gmtoff,O=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(O?"+":"-")+("0000"+p).slice(-4)},"%Z":f=>f.tm_zone,"%%":()=>"%"};i=i.replace(/%%/g,"\0\0");for(var l in A)i.includes(l)&&(i=i.replace(new RegExp(l,"g"),A[l](o)));i=i.replace(/\0\0/g,"%");var W=Ca(i,!1);return W.length>e?0:(_a(W,t),W.length-1)},Pa=(t,e,r,n,a)=>Ta(t,e,r,n);Pe=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Jr(),pt=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},mn(),un(),En(),We=u.UnboundTypeError=Sn(Error,"UnboundTypeError"),jn(),In();var Ea={q:Br,u:Ur,a:Lr,h:zr,l:Yr,I:Nr,P:Gr,n:Xr,ba:qr,d:Vr,oa:Zr,Y:Qr,fa:tn,na:On,ma:Fn,D:Mn,ea:Wn,W:kn,J:Bn,w:Vn,s:Ln,V:Nn,L:Kn,Q:ta,pa:ea,ga:ra,U:Be,la:oa,R:ia,ia:ua,ka:ca,K:la,da,ca:pa,$:va,aa:ga,H:Ya,T:to,B:Ga,p:Va,b:Da,C:za,ha:qa,c:Fa,j:ja,i:Sa,x:Na,O:La,v:Ba,G:Qa,N:Ja,A:Xa,F:eo,Z:no,X:ao,k:Ma,f:Oa,e:xa,g:Aa,M:Ka,m:ka,o:Ra,S:Ia,t:Ha,ja:Ua,y:Za,r:Wa,E:ro,z:wa,_:Pa},S=kr(),nt=u._free=t=>(nt=u._free=S.sa)(t),Jt=u._malloc=t=>(Jt=u._malloc=S.ta)(t),Ze=t=>(Ze=S.va)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=S.wa)();var $=(t,e)=>($=S.xa)(t,e),Pt=t=>(Pt=S.ya)(t),b=()=>(b=S.za)(),C=t=>(C=S.Aa)(t),Qe=t=>(Qe=S.Ba)(t),Je=t=>(Je=S.Ca)(t),Ke=(t,e,r)=>(Ke=S.Da)(t,e,r),tr=t=>(tr=S.Ea)(t);u.dynCall_viijii=(t,e,r,n,a,o,i)=>(u.dynCall_viijii=S.Fa)(t,e,r,n,a,o,i);var er=u.dynCall_jiii=(t,e,r,n)=>(er=u.dynCall_jiii=S.Ga)(t,e,r,n),rr=u.dynCall_jiiii=(t,e,r,n,a)=>(rr=u.dynCall_jiiii=S.Ha)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,i)=>(u.dynCall_iiiiij=S.Ia)(t,e,r,n,a,o,i),u.dynCall_iiiiijj=(t,e,r,n,a,o,i,s,l)=>(u.dynCall_iiiiijj=S.Ja)(t,e,r,n,a,o,i,s,l),u.dynCall_iiiiiijj=(t,e,r,n,a,o,i,s,l,d)=>(u.dynCall_iiiiiijj=S.Ka)(t,e,r,n,a,o,i,s,l,d);function Da(t,e){var r=b();try{return P(t)(e)}catch(n){if(C(r),n!==n+0)throw n;$(1,0)}}function Aa(t,e,r,n){var a=b();try{P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function xa(t,e,r){var n=b();try{P(t)(e,r)}catch(a){if(C(n),a!==a+0)throw a;$(1,0)}}function Sa(t,e,r,n,a){var o=b();try{return P(t)(e,r,n,a)}catch(i){if(C(o),i!==i+0)throw i;$(1,0)}}function Oa(t,e){var r=b();try{P(t)(e)}catch(n){if(C(r),n!==n+0)throw n;$(1,0)}}function Fa(t,e,r){var n=b();try{return P(t)(e,r)}catch(a){if(C(n),a!==a+0)throw a;$(1,0)}}function Ma(t){var e=b();try{P(t)()}catch(r){if(C(e),r!==r+0)throw r;$(1,0)}}function ja(t,e,r,n){var a=b();try{return P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function Ra(t,e,r,n,a,o){var i=b();try{P(t)(e,r,n,a,o)}catch(s){if(C(i),s!==s+0)throw s;$(1,0)}}function Ia(t,e,r,n,a,o,i){var s=b();try{P(t)(e,r,n,a,o,i)}catch(l){if(C(s),l!==l+0)throw l;$(1,0)}}function Wa(t,e,r,n,a,o,i,s,l,d,h){var y=b();try{P(t)(e,r,n,a,o,i,s,l,d,h)}catch(v){if(C(y),v!==v+0)throw v;$(1,0)}}function Ha(t,e,r,n,a,o,i,s){var l=b();try{P(t)(e,r,n,a,o,i,s)}catch(d){if(C(l),d!==d+0)throw d;$(1,0)}}function ka(t,e,r,n,a){var o=b();try{P(t)(e,r,n,a)}catch(i){if(C(o),i!==i+0)throw i;$(1,0)}}function Ba(t,e,r,n,a,o,i){var s=b();try{return P(t)(e,r,n,a,o,i)}catch(l){if(C(s),l!==l+0)throw l;$(1,0)}}function Ua(t,e,r,n,a,o,i,s,l){var d=b();try{P(t)(e,r,n,a,o,i,s,l)}catch(h){if(C(d),h!==h+0)throw h;$(1,0)}}function Va(t){var e=b();try{return P(t)()}catch(r){if(C(e),r!==r+0)throw r;$(1,0)}}function La(t,e,r,n,a,o,i){var s=b();try{return P(t)(e,r,n,a,o,i)}catch(l){if(C(s),l!==l+0)throw l;$(1,0)}}function za(t,e,r,n){var a=b();try{return P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function Ya(t,e,r,n){var a=b();try{return P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function Na(t,e,r,n,a,o){var i=b();try{return P(t)(e,r,n,a,o)}catch(s){if(C(i),s!==s+0)throw s;$(1,0)}}function Ga(t,e,r,n,a,o){var i=b();try{return P(t)(e,r,n,a,o)}catch(s){if(C(i),s!==s+0)throw s;$(1,0)}}function Xa(t,e,r,n,a,o,i,s,l,d){var h=b();try{return P(t)(e,r,n,a,o,i,s,l,d)}catch(y){if(C(h),y!==y+0)throw y;$(1,0)}}function qa(t,e,r){var n=b();try{return P(t)(e,r)}catch(a){if(C(n),a!==a+0)throw a;$(1,0)}}function Za(t,e,r,n,a,o,i,s,l,d){var h=b();try{P(t)(e,r,n,a,o,i,s,l,d)}catch(y){if(C(h),y!==y+0)throw y;$(1,0)}}function Qa(t,e,r,n,a,o,i,s){var l=b();try{return P(t)(e,r,n,a,o,i,s)}catch(d){if(C(l),d!==d+0)throw d;$(1,0)}}function Ja(t,e,r,n,a,o,i,s,l){var d=b();try{return P(t)(e,r,n,a,o,i,s,l)}catch(h){if(C(d),h!==h+0)throw h;$(1,0)}}function Ka(t,e,r,n,a,o,i){var s=b();try{P(t)(e,r,n,a,o,i)}catch(l){if(C(s),l!==l+0)throw l;$(1,0)}}function to(t,e,r,n){var a=b();try{return P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function eo(t,e,r,n,a,o,i,s,l,d,h,y){var v=b();try{return P(t)(e,r,n,a,o,i,s,l,d,h,y)}catch(_){if(C(v),_!==_+0)throw _;$(1,0)}}function ro(t,e,r,n,a,o,i,s,l,d,h,y,v,_,D,I){var A=b();try{P(t)(e,r,n,a,o,i,s,l,d,h,y,v,_,D,I)}catch(W){if(C(A),W!==W+0)throw W;$(1,0)}}function no(t,e,r,n){var a=b();try{return er(t,e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function ao(t,e,r,n,a){var o=b();try{return rr(t,e,r,n,a)}catch(i){if(C(o),i!==i+0)throw i;$(1,0)}}var Ht;wt=function t(){Ht||nr(),Ht||(wt=t)};function nr(){if(st>0||(Ar(),st>0))return;function t(){Ht||(Ht=!0,u.calledRun=!0,!vt&&(xr(),g(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Sr()))}u.setStatus?(u.setStatus("Running..."),setTimeout(function(){setTimeout(function(){u.setStatus("")},1),t()},1)):t()}if(u.preInit)for(typeof u.preInit=="function"&&(u.preInit=[u.preInit]);u.preInit.length>0;)u.preInit.pop()();return nr(),m.ready}})();function Pr(c){return ue(de,c)}async function Er(c,{tryHarder:m=at.tryHarder,formats:u=at.formats,maxSymbols:g=at.maxSymbols}=at){return Cr(c,{tryHarder:m,formats:u,maxSymbols:g},de)}const fe=new Map([["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["data_matrix","DataMatrix"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["pdf417","PDF417"],["qr_code","QRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"]]);function Dr(c){for(const[m,u]of fe)if(c===u)return m;return"unknown"}class he extends EventTarget{constructor(u={}){var g;super();ir(this,mt,void 0);try{const w=(g=u==null?void 0:u.formats)==null?void 0:g.filter(E=>E!=="unknown");if((w==null?void 0:w.length)===0)throw new TypeError("Hint option provided, but is empty.");w==null||w.forEach(E=>{if(!U.includes(E))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${E}' is not a valid enum value of type BarcodeFormat.`)}),sr(this,mt,w??[]),Pr().then(E=>{this.dispatchEvent(new CustomEvent("load",{detail:E}))}).catch(E=>{this.dispatchEvent(new CustomEvent("error",{detail:E}))})}catch(w){throw ie(w,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return U.filter(u=>u!=="unknown")}async detect(u){try{const g=await hr(u);if(g===null)return[];let w;try{w=await Er(g,{tryHarder:!0,formats:or(this,mt).map(E=>fe.get(E))})}catch{throw new DOMException("Barcode detection service unavailable. Use 'setZXingModuleOverrides' in offline or strict CSP environments.","NotSupportedError")}return w.map(E=>{const{topLeft:{x:j,y:X},topRight:{x:V,y:R},bottomLeft:{x:q,y:Q},bottomRight:{x:Y,y:L}}=E.position,J=Math.min(j,V,q,Y),vt=Math.min(X,R,Q,L),N=Math.max(j,V,q,Y),H=Math.max(X,R,Q,L);return{boundingBox:new DOMRectReadOnly(J,vt,N-J,H-vt),rawValue:new TextDecoder().decode(E.bytes),format:Dr(E.format),cornerPoints:[{x:j,y:X},{x:V,y:R},{x:Y,y:L},{x:q,y:Q}]}})}catch(g){throw ie(g,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return mt=new WeakMap,globalThis.BarcodeDetector??(globalThis.BarcodeDetector=he),M.BarcodeDetector=he,M.setZXingModuleOverrides=br,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),M}({}); | ||
var ur=(R,L,q)=>{if(!L.has(R))throw TypeError("Cannot "+q)};var re=(R,L,q)=>(ur(R,L,"read from private field"),q?q.call(R):L.get(R)),cr=(R,L,q)=>{if(L.has(R))throw TypeError("Cannot add the same private member more than once");L instanceof WeakSet?L.add(R):L.set(R,q)},lr=(R,L,q,pt)=>(ur(R,L,"write to private field"),pt?pt.call(R,q):L.set(R,q),q);var BarcodeDetectionAPI=function(R){var ft;"use strict";const L=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function q(c){if(pt(c))return{width:c.naturalWidth,height:c.naturalHeight};if(ne(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(ae(c))return{width:c.videoWidth,height:c.videoHeight};if(ie(c))return{width:c.width,height:c.height};if(ue(c))return{width:c.displayWidth,height:c.displayHeight};if(oe(c))return{width:c.width,height:c.height};if(se(c))return{width:c.width,height:c.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function pt(c){try{return c instanceof HTMLImageElement}catch{return!1}}function ne(c){try{return c instanceof SVGImageElement}catch{return!1}}function ae(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function oe(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function ie(c){try{return c instanceof ImageBitmap}catch{return!1}}function se(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function ue(c){try{return c instanceof VideoFrame}catch{return!1}}function ce(c){try{return c instanceof Blob}catch{return!1}}function fr(c){try{return c instanceof ImageData}catch{return!1}}function dr(c,m){try{const u=new OffscreenCanvas(c,m);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=m,u}}async function le(c){if(pt(c)&&!await yr(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ne(c)&&!await vr(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(ue(c)&&gr(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(ae(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ie(c)&&$r(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:m,height:u}=q(c);if(m===0||u===0)return null;const $=dr(m,u).getContext("2d");$.drawImage(c,0,0);try{return $.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function hr(c){let m;try{if(createImageBitmap)m=await createImageBitmap(c);else if(Image){m=new Image;let g="";try{g=URL.createObjectURL(c),m.src=g,await m.decode()}finally{URL.revokeObjectURL(g)}}else return c}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await le(m)}function pr(c){const{width:m,height:u}=c;if(m===0||u===0)return null;const g=c.getContext("2d");try{return g.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function mr(c){if(ce(c))return await hr(c);if(fr(c)){if(wr(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return oe(c)||se(c)?pr(c):await le(c)}async function yr(c){try{return await c.decode(),!0}catch{return!1}}async function vr(c){var m;try{return await((m=c.decode)==null?void 0:m.call(c)),!0}catch{return!1}}function gr(c){return c.format===null}function wr(c){return c.data.buffer.byteLength===0}function $r(c){return c.width===0&&c.height===0}function fe(c,m){return c instanceof DOMException?new DOMException(`${m}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${m}: ${c.message}`):new Error(`${m}: ${c}`)}const de=c=>{let m;const u=new Set,g=(O,G)=>{const j=typeof O=="function"?O(m):O;if(!Object.is(j,m)){const F=m;m=G??typeof j!="object"?j:Object.assign({},m,j),u.forEach(Y=>Y(m,F))}},$=()=>m,w={setState:g,getState:$,subscribe:O=>(u.add(O),()=>u.delete(O)),destroy:()=>{u.clear()}};return m=c(g,$,w),w},br=c=>c?de(c):de,Cr={locateFile:(c,m)=>{var u;const g=(u=c.match(/_(.+?)\.wasm$/))==null?void 0:u[1];return g?`https://fastly.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.5/dist/${g}/${c}`:m+c}},ot=br()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:Cr}));function _r(c){ot.setState({zxingModuleOverrides:c})}function Bt(c,m=ot.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=ot.getState(),g=u.get(c);if(g&&Object.is(m,ot.getState().zxingModuleOverrides))return g;{ot.setState({zxingModuleOverrides:m});const $=c(m);return u.set(c,$),$}}const he=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","UPC-A","UPC-E"],k={tryHarder:!0,formats:[],maxSymbols:255};async function Tr(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k,$){const w=await Bt($,ot.getState().zxingModuleOverrides),{size:O}=c,G=new Uint8Array(await c.arrayBuffer()),j=w._malloc(O);w.HEAP8.set(G,j);const F=w.readBarcodesFromImage(j,O,m,pe(u),g);w._free(j);const Y=[];for(let N=0;N<F.size();++N){const z=F.get(N);Y.push({...z,format:me(z.format)})}return Y}async function Pr(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k,$){const w=await Bt($,ot.getState().zxingModuleOverrides),{data:O,width:G,height:j,data:{byteLength:F}}=c,Y=w._malloc(F);w.HEAP8.set(O,Y);const N=w.readBarcodesFromPixmap(Y,G,j,m,pe(u),g);w._free(Y);const z=[];for(let X=0;X<N.size();++X){const K=N.get(X);z.push({...K,format:me(K.format)})}return z}function pe(c){return c.join("|")}function me(c){const m=ye(c);let u=0,g=he.length-1;for(;u<=g;){const $=Math.floor((u+g)/2),w=he[$],O=ye(w);if(O===m)return w;O<m?u=$+1:g=$-1}return"None"}function ye(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var Ut=(()=>{var c=document.currentScript&&document.currentScript.src||new URL("index.js",document.baseURI).href;return function(m={}){var u=m,g,$;u.ready=new Promise((t,e)=>{g=t,$=e});var w=Object.assign({},u),O="./this.program",G=typeof window=="object",j=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var F="";function Y(t){return u.locateFile?u.locateFile(t,F):F+t}var N;(G||j)&&(j?F=self.location.href:typeof document<"u"&&document.currentScript&&(F=document.currentScript.src),c&&(F=c),F.indexOf("blob:")!==0?F=F.substr(0,F.replace(/[?#].*/,"").lastIndexOf("/")+1):F="",j&&(N=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),u.print||console.log.bind(console);var z=u.printErr||console.error.bind(console);Object.assign(u,w),w=null,u.arguments&&u.arguments,u.thisProgram&&(O=u.thisProgram),u.quit&&u.quit;var X;u.wasmBinary&&(X=u.wasmBinary),u.noExitRuntime,typeof WebAssembly!="object"&&Pt("no native wasm support detected");var K,mt=!1,J,B,yt,Tt,U,D,ge,we;function $e(){var t=K.buffer;u.HEAP8=J=new Int8Array(t),u.HEAP16=yt=new Int16Array(t),u.HEAPU8=B=new Uint8Array(t),u.HEAPU16=Tt=new Uint16Array(t),u.HEAP32=U=new Int32Array(t),u.HEAPU32=D=new Uint32Array(t),u.HEAPF32=ge=new Float32Array(t),u.HEAPF64=we=new Float64Array(t)}var be=[],Ce=[],_e=[];function Sr(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Mr(u.preRun.shift());Lt(be)}function Or(){Lt(Ce)}function Fr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Ir(u.postRun.shift());Lt(_e)}function Mr(t){be.unshift(t)}function jr(t){Ce.unshift(t)}function Ir(t){_e.unshift(t)}var it=0,vt=null;function Rr(t){it++,u.monitorRunDependencies&&u.monitorRunDependencies(it)}function Hr(t){if(it--,u.monitorRunDependencies&&u.monitorRunDependencies(it),it==0&&vt){var e=vt;vt=null,e()}}function Pt(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",z(t),mt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw $(e),e}var Wr="data:application/octet-stream;base64,";function Te(t){return t.startsWith(Wr)}var st;u.locateFile?(st="zxing_reader.wasm",Te(st)||(st=Y(st))):st=new URL("/reader/zxing_reader.wasm",self.location).href;function Pe(t){if(t==st&&X)return new Uint8Array(X);if(N)return N(t);throw"both async and sync fetching of the wasm failed"}function kr(t){return!X&&(G||j)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>Pe(t)):Promise.resolve().then(()=>Pe(t))}function Ee(t,e,r){return kr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{z(`failed to asynchronously prepare wasm: ${n}`),Pt(n)})}function Br(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!Te(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(i){return z(`wasm streaming compile failed: ${i}`),z("falling back to ArrayBuffer instantiation"),Ee(e,r,n)})}):Ee(e,r,n)}function Ur(){var t={a:$a};function e(n,a){return S=n.exports,K=S.qa,$e(),Be=S.ua,jr(S.ra),Hr(),S}Rr();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){z(`Module.instantiateWasm callback failed with error: ${n}`),$(n)}return Br(X,st,t,r).catch($),{}}var Lt=t=>{for(;t.length>0;)t.shift()(u)},Et=[],xt=0,Vr=t=>{var e=new At(t);return e.get_caught()||(e.set_caught(!0),xt--),e.set_rethrown(!1),Et.push(e),rr(e.excPtr),e.get_exception_ptr()},tt=0,Lr=()=>{b(0,0);var t=Et.pop();er(t.excPtr),tt=0};function At(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){D[this.ptr+4>>2]=e},this.get_type=function(){return D[this.ptr+4>>2]},this.set_destructor=function(e){D[this.ptr+8>>2]=e},this.get_destructor=function(){return D[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,J[this.ptr+12>>0]=e},this.get_caught=function(){return J[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,J[this.ptr+13>>0]=e},this.get_rethrown=function(){return J[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){D[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return D[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=ar(this.get_type());if(e)return D[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var zr=t=>{throw tt||(tt=t),tt},zt=t=>{var e=tt;if(!e)return _t(0),0;var r=new At(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return _t(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var i=r.ptr+16;if(nr(o,n,i))return _t(o),e}return _t(n),e},Yr=()=>zt([]),Nr=t=>zt([t]),Gr=(t,e)=>zt([t,e]),Xr=t=>{var e=new At(t).get_exception_ptr();return e},qr=()=>{var t=Et.pop();t||Pt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Et.push(t),t.set_rethrown(!0),t.set_caught(!1),xt++),tt=e,tt},Jr=(t,e,r)=>{var n=new At(t);throw n.init(e,r),tt=t,xt++,tt},Qr=()=>xt,Dt={},xe=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Yt(t){return this.fromWireType(U[t>>2])}var dt={},ut={},St={},Ae,Ot=t=>{throw new Ae(t)},ct=(t,e,r)=>{t.forEach(function(s){St[s]=e});function n(s){var l=r(s);l.length!==t.length&&Ot("Mismatched type converter count");for(var f=0;f<t.length;++f)et(t[f],l[f])}var a=new Array(e.length),o=[],i=0;e.forEach((s,l)=>{ut.hasOwnProperty(s)?a[l]=ut[s]:(o.push(s),dt.hasOwnProperty(s)||(dt[s]=[]),dt[s].push(()=>{a[l]=ut[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)},Zr=t=>{var e=Dt[t];delete Dt[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(i=>i.getterReturnType).concat(a.map(i=>i.setterArgumentType));ct([t],o,i=>{var s={};return a.forEach((l,f)=>{var h=l.fieldName,y=i[f],v=l.getter,T=l.getterContext,x=i[f+a.length],H=l.setter,A=l.setterContext;s[h]={read:W=>y.fromWireType(v(T,W)),write:(W,d)=>{var p=[];H(A,W,x.toWireType(p,d)),xe(p)}}}),[{name:e.name,fromWireType:l=>{var f={};for(var h in s)f[h]=s[h].read(l);return n(l),f},toWireType:(l,f)=>{for(var h in s)if(!(h in f))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in s)s[h].write(y,f[h]);return l!==null&&l.push(n,y),y},argPackAdvance:rt,readValueFromPointer:Yt,destructorFunction:n}]})},Kr=(t,e,r,n,a)=>{},tn=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);De=t},De,V=t=>{for(var e="",r=t;B[r];)e+=De[B[r++]];return e},ht,P=t=>{throw new ht(t)};function en(t,e,r={}){var n=e.name;if(t||P(`type "${n}" must have a positive integer typeid pointer`),ut.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;P(`Cannot register type '${n}' twice`)}if(ut[t]=e,delete St[t],dt.hasOwnProperty(t)){var a=dt[t];delete dt[t],a.forEach(o=>o())}}function et(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return en(t,e,r)}var rt=8,rn=(t,e,r,n)=>{e=V(e),et(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:rt,readValueFromPointer:function(a){return this.fromWireType(B[a])},destructorFunction:null})},nn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Nt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}P(e(t)+" instance already deleted")},Gt=!1,Se=t=>{},an=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Oe=t=>{t.count.value-=1;var e=t.count.value===0;e&&an(t)},Fe=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Fe(t,e,r.baseClass);return n===null?null:r.downcast(n)},Me={},on=()=>Object.keys($t).length,sn=()=>{var t=[];for(var e in $t)$t.hasOwnProperty(e)&&t.push($t[e]);return t},gt=[],Xt=()=>{for(;gt.length;){var t=gt.pop();t.$$.deleteScheduled=!1,t.delete()}},wt,un=t=>{wt=t,gt.length&&wt&&wt(Xt)},cn=()=>{u.getInheritedInstanceCount=on,u.getLiveInheritedInstances=sn,u.flushPendingDeletes=Xt,u.setDelayFunction=un},$t={},ln=(t,e)=>{for(e===void 0&&P("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},fn=(t,e)=>(e=ln(t,e),$t[e]),Ft=(t,e)=>{(!e.ptrType||!e.ptr)&&Ot("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Ot("Both smartPtrType and smartPtr must be specified"),e.count={value:1},bt(Object.create(t,{$$:{value:e}}))};function dn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=fn(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?Ft(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Ft(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=Me[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var l=Fe(e,this.registeredClass,s.registeredClass);return l===null?a.call(this):this.isSmartPointer?Ft(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:t}):Ft(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var bt=t=>typeof FinalizationRegistry>"u"?(bt=e=>e,t):(Gt=new FinalizationRegistry(e=>{Oe(e.$$)}),bt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Gt.register(e,a,e)}return e},Se=e=>Gt.unregister(e),bt(t)),hn=()=>{Object.assign(Mt.prototype,{isAliasOf(t){if(!(this instanceof Mt)||!(t instanceof Mt))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||Nt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=bt(Object.create(Object.getPrototypeOf(this),{$$:{value:nn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),Se(this),Oe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),gt.push(this),gt.length===1&&wt&&wt(Xt),this.$$.deleteScheduled=!0,this}})};function Mt(){}var pn=48,mn=57,je=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=pn&&e<=mn?`_${t}`:t};function Ie(t,e){return t=je(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var Re=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||P(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},He=(t,e,r)=>{u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&P(`Cannot register public name '${t}' twice`),Re(u,t,t),u.hasOwnProperty(r)&&P(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),u[t].overloadTable[r]=e):(u[t]=e,r!==void 0&&(u[t].numArguments=r))};function yn(t,e,r,n,a,o,i,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var qt=(t,e,r)=>{for(;e!==r;)e.upcast||P(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function vn(t,e){if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;e.$$||P(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=qt(e.$$.ptr,r,this.registeredClass);return n}function gn(t,e){var r;if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||P(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&P(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=qt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&P("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:P(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,at.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:P("Unsupporting sharing policy")}return r}function wn(t,e){if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;e.$$||P(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&P(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=qt(e.$$.ptr,r,this.registeredClass);return n}function We(t){return this.fromWireType(D[t>>2])}var $n=()=>{Object.assign(jt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:rt,readValueFromPointer:We,deleteObject(t){t!==null&&t.delete()},fromWireType:dn})};function jt(t,e,r,n,a,o,i,s,l,f,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=vn,this.destructorFunction=null):(this.toWireType=wn,this.destructorFunction=null):this.toWireType=gn}var ke=(t,e,r)=>{u.hasOwnProperty(t)||Ot("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)},bn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},It=[],Be,E=t=>{var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=Be.get(t)),e},Cn=(t,e,r)=>{if(t.includes("j"))return bn(t,e,r);var n=E(e).apply(null,r);return n},_n=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Cn(t,e,r)}},Z=(t,e)=>{t=V(t);function r(){return t.includes("j")?_n(t,e):E(e)}var n=r();return typeof n!="function"&&P(`unknown function pointer with signature ${t}: ${e}`),n},Tn=(t,e)=>{var r=Ie(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` | ||
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Ue,Ve=t=>{var e=tr(t),r=V(e);return nt(e),r},Rt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!ut[o]){if(St[o]){St[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Ue(`${t}: `+r.map(Ve).join([", "]))},Pn=(t,e,r,n,a,o,i,s,l,f,h,y,v)=>{h=V(h),o=Z(a,o),s&&(s=Z(i,s)),f&&(f=Z(l,f)),v=Z(y,v);var T=je(h);He(T,function(){Rt(`Cannot construct ${h} due to unbound types`,[n])}),ct([t,e,r],n?[n]:[],function(x){x=x[0];var H,A;n?(H=x.registeredClass,A=H.instancePrototype):A=Mt.prototype;var W=Ie(T,function(){if(Object.getPrototypeOf(this)!==d)throw new ht("Use 'new' to construct "+h);if(p.constructor_body===void 0)throw new ht(h+" has no accessible constructor");var kt=p.constructor_body[arguments.length];if(kt===void 0)throw new ht(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(p.constructor_body).toString()}) parameters instead!`);return kt.apply(this,arguments)}),d=Object.create(A,{constructor:{value:W}});W.prototype=d;var p=new yn(h,W,d,v,H,o,s,f);p.baseClass&&(p.baseClass.__derivedClasses===void 0&&(p.baseClass.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var M=new jt(h,p,!0,!1,!1),I=new jt(h+"*",p,!1,!1,!1),lt=new jt(h+" const*",p,!1,!0,!1);return Me[t]={pointerType:I,constPointerType:lt},ke(T,W),[M,I,lt]})},Jt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(D[e+n*4>>2]);return r};function Qt(t,e,r,n,a,o){var i=e.length;i<2&&P("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=e[1]!==null&&r!==null,l=!1,f=1;f<e.length;++f)if(e[f]!==null&&e[f].destructorFunction===void 0){l=!0;break}var h=e[0].name!=="void",y=i-2,v=new Array(y),T=[],x=[];return function(){arguments.length!==y&&P(`function ${t} called with ${arguments.length} arguments, expected ${y}`),x.length=0;var H;T.length=s?2:1,T[0]=a,s&&(H=e[1].toWireType(x,this),T[1]=H);for(var A=0;A<y;++A)v[A]=e[A+2].toWireType(x,arguments[A]),T.push(v[A]);var W=n.apply(null,T);function d(p){if(l)xe(x);else for(var M=s?1:2;M<e.length;M++){var I=M===1?H:v[M-2];e[M].destructorFunction!==null&&e[M].destructorFunction(I)}if(h)return e[0].fromWireType(p)}return d(W)}}var En=(t,e,r,n,a,o)=>{var i=Jt(e,r);a=Z(n,a),ct([],[t],function(s){s=s[0];var l=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[e-1]!==void 0)throw new ht(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return s.registeredClass.constructor_body[e-1]=()=>{Rt(`Cannot construct ${s.name} due to unbound types`,i)},ct([],i,f=>(f.splice(1,0,null),s.registeredClass.constructor_body[e-1]=Qt(l,f,null,a,o),[])),[]})},xn=(t,e,r,n,a,o,i,s,l)=>{var f=Jt(r,n);e=V(e),o=Z(a,o),ct([],[t],function(h){h=h[0];var y=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&h.registeredClass.pureVirtualFunctions.push(e);function v(){Rt(`Cannot call ${y} due to unbound types`,f)}var T=h.registeredClass.instancePrototype,x=T[e];return x===void 0||x.overloadTable===void 0&&x.className!==h.name&&x.argCount===r-2?(v.argCount=r-2,v.className=h.name,T[e]=v):(Re(T,e,y),T[e].overloadTable[r-2]=v),ct([],f,function(H){var A=Qt(y,H,h,o,i);return T[e].overloadTable===void 0?(A.argCount=r-2,T[e]=A):T[e].overloadTable[r-2]=A,[]}),[]})};function An(){Object.assign(Le.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function Le(){this.allocated=[void 0],this.freelist=[]}var Q=new Le,ze=t=>{t>=Q.reserved&&--Q.get(t).refcount===0&&Q.free(t)},Dn=()=>{for(var t=0,e=Q.reserved;e<Q.allocated.length;++e)Q.allocated[e]!==void 0&&++t;return t},Sn=()=>{Q.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Q.reserved=Q.allocated.length,u.count_emval_handles=Dn},at={toValue:t=>(t||P("Cannot use deleted val. handle = "+t),Q.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Q.allocate({refcount:1,value:t})}}},On=(t,e)=>{e=V(e),et(t,{name:e,fromWireType:r=>{var n=at.toValue(r);return ze(r),n},toWireType:(r,n)=>at.toHandle(n),argPackAdvance:rt,readValueFromPointer:Yt,destructorFunction:null})},Zt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},Fn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(ge[r>>2])};case 8:return function(r){return this.fromWireType(we[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Mn=(t,e,r)=>{e=V(e),et(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:rt,readValueFromPointer:Fn(e,r),destructorFunction:null})},jn=(t,e,r,n,a,o,i)=>{var s=Jt(e,r);t=V(t),a=Z(n,a),He(t,function(){Rt(`Cannot call ${t} due to unbound types`,s)},e-1),ct([],s,function(l){var f=[l[0],null].concat(l.slice(1));return ke(t,Qt(t,f,null,a,o),e-1),[]})},In=(t,e,r)=>{switch(e){case 1:return r?n=>J[n>>0]:n=>B[n>>0];case 2:return r?n=>yt[n>>1]:n=>Tt[n>>1];case 4:return r?n=>U[n>>2]:n=>D[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Rn=(t,e,r,n,a)=>{e=V(e);var o=h=>h;if(n===0){var i=32-8*r;o=h=>h<<i>>>i}var s=e.includes("unsigned"),l=(h,y)=>{},f;s?f=function(h,y){return l(y,this.name),y>>>0}:f=function(h,y){return l(y,this.name),y},et(t,{name:e,fromWireType:o,toWireType:f,argPackAdvance:rt,readValueFromPointer:In(e,r,n!==0),destructorFunction:null})},Hn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(i){var s=D[i>>2],l=D[i+4>>2];return new a(J.buffer,l,s)}r=V(r),et(t,{name:r,fromWireType:o,argPackAdvance:rt,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Ye=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,i=0;i<t.length;++i){var s=t.charCodeAt(i);if(s>=55296&&s<=57343){var l=t.charCodeAt(++i);s=65536+((s&1023)<<10)|l&1023}if(s<=127){if(r>=o)break;e[r++]=s}else if(s<=2047){if(r+1>=o)break;e[r++]=192|s>>6,e[r++]=128|s&63}else if(s<=65535){if(r+2>=o)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|s&63}else{if(r+3>=o)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|s&63}}return e[r]=0,r-a},Wn=(t,e,r)=>Ye(t,B,e,r),Ne=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},Ge=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,kn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Ge)return Ge.decode(t.subarray(e,a));for(var o="";e<a;){var i=t[e++];if(!(i&128)){o+=String.fromCharCode(i);continue}var s=t[e++]&63;if((i&224)==192){o+=String.fromCharCode((i&31)<<6|s);continue}var l=t[e++]&63;if((i&240)==224?i=(i&15)<<12|s<<6|l:i=(i&7)<<18|s<<12|l<<6|t[e++]&63,i<65536)o+=String.fromCharCode(i);else{var f=i-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return o},Kt=(t,e)=>t?kn(B,t,e):"",Bn=(t,e)=>{e=V(e);var r=e==="std::string";et(t,{name:e,fromWireType(n){var a=D[n>>2],o=n+4,i;if(r)for(var s=o,l=0;l<=a;++l){var f=o+l;if(l==a||B[f]==0){var h=f-s,y=Kt(s,h);i===void 0?i=y:(i+=String.fromCharCode(0),i+=y),s=f+1}}else{for(var v=new Array(a),l=0;l<a;++l)v[l]=String.fromCharCode(B[o+l]);i=v.join("")}return nt(n),i},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,i=typeof a=="string";i||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||P("Cannot pass non-string to std::string"),r&&i?o=Ne(a):o=a.length;var s=ee(4+o+1),l=s+4;if(D[s>>2]=o,r&&i)Wn(a,l,o+1);else if(i)for(var f=0;f<o;++f){var h=a.charCodeAt(f);h>255&&(nt(l),P("String has UTF-16 code units that do not fit in 8 bits")),B[l+f]=h}else for(var f=0;f<o;++f)B[l+f]=a[f];return n!==null&&n.push(nt,s),s},argPackAdvance:rt,readValueFromPointer:We,destructorFunction(n){nt(n)}})},Xe=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Un=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Tt[n];)++n;if(r=n<<1,r-t>32&&Xe)return Xe.decode(B.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=yt[t+i*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Vn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var n=e,a=r<t.length*2?r/2:t.length,o=0;o<a;++o){var i=t.charCodeAt(o);yt[e>>1]=i,e+=2}return yt[e>>1]=0,e-n},Ln=t=>t.length*2,zn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=U[t+r*4>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},Yn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,o=0;o<t.length;++o){var i=t.charCodeAt(o);if(i>=55296&&i<=57343){var s=t.charCodeAt(++o);i=65536+((i&1023)<<10)|s&1023}if(U[e>>2]=i,e+=4,e+4>a)break}return U[e>>2]=0,e-n},Nn=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},Gn=(t,e,r)=>{r=V(r);var n,a,o,i,s;e===2?(n=Un,a=Vn,i=Ln,o=()=>Tt,s=1):e===4&&(n=zn,a=Yn,i=Nn,o=()=>D,s=2),et(t,{name:r,fromWireType:l=>{for(var f=D[l>>2],h=o(),y,v=l+4,T=0;T<=f;++T){var x=l+4+T*e;if(T==f||h[x>>s]==0){var H=x-v,A=n(v,H);y===void 0?y=A:(y+=String.fromCharCode(0),y+=A),v=x+e}}return nt(l),y},toWireType:(l,f)=>{typeof f!="string"&&P(`Cannot pass non-string to C++ string type ${r}`);var h=i(f),y=ee(4+h+e);return D[y>>2]=h>>s,a(f,y+4,h+e),l!==null&&l.push(nt,y),y},argPackAdvance:rt,readValueFromPointer:Yt,destructorFunction(l){nt(l)}})},Xn=(t,e,r,n,a,o)=>{Dt[t]={name:V(e),rawConstructor:Z(r,n),rawDestructor:Z(a,o),fields:[]}},qn=(t,e,r,n,a,o,i,s,l,f)=>{Dt[t].fields.push({fieldName:V(e),getterReturnType:r,getter:Z(n,a),getterContext:o,setterArgumentType:i,setter:Z(s,l),setterContext:f})},Jn=(t,e)=>{e=V(e),et(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Qn={},Zn=t=>{var e=Qn[t];return e===void 0?V(t):e},qe=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},Kn=t=>t===0?at.toHandle(qe()):(t=Zn(t),at.toHandle(qe()[t])),ta=t=>{t>4&&(Q.get(t).refcount+=1)},Je=(t,e)=>{var r=ut[t];return r===void 0&&P(e+" has unknown type "+Ve(t)),r},ea=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var i=Je(D[n+o*4>>2],"parameter "+o);e[o+1]=i.readValueFromPointer(a),a+=i.argPackAdvance}var s=new(r.bind.apply(r,e));return at.toHandle(s)}},Qe={},ra=(t,e,r,n)=>{t=at.toValue(t);var a=Qe[e];return a||(a=ea(e),Qe[e]=a),a(t,r,n)},na=(t,e)=>{t=Je(t,"_emval_take_value");var r=t.readValueFromPointer(e);return at.toHandle(r)},aa=()=>{Pt("")},oa=(t,e,r)=>B.copyWithin(t,e,e+r),ia=()=>2147483648,sa=t=>{var e=K.buffer,r=(t-e.byteLength+65535)/65536;try{return K.grow(r),$e(),1}catch{}},ua=t=>{var e=B.length;t>>>=0;var r=ia();if(t>r)return!1;for(var n=(l,f)=>l+(f-l%f)%f,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var i=Math.min(r,n(Math.max(t,o),65536)),s=sa(i);if(s)return!0}return!1},te={},ca=()=>O||"./this.program",Ct=()=>{if(!Ct.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:ca()};for(var r in te)te[r]===void 0?delete e[r]:e[r]=te[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);Ct.strings=n}return Ct.strings},la=(t,e)=>{for(var r=0;r<t.length;++r)J[e++>>0]=t.charCodeAt(r);J[e>>0]=0},fa=(t,e)=>{var r=0;return Ct().forEach((n,a)=>{var o=e+r;D[t+a*4>>2]=o,la(n,o),r+=n.length+1}),0},da=(t,e)=>{var r=Ct();D[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),D[e>>2]=n,0},ha=t=>t,Ht=t=>t%4===0&&(t%100!==0||t%400===0),pa=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Ze=[31,29,31,30,31,30,31,31,30,31,30,31],Ke=[31,28,31,30,31,30,31,31,30,31,30,31],ma=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Ht(r.getFullYear()),a=r.getMonth(),o=(n?Ze:Ke)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function ya(t,e,r){var n=r>0?r:Ne(t)+1,a=new Array(n),o=Ye(t,a,0,a.length);return e&&(a.length=o),a}var va=(t,e)=>{J.set(t,e)},ga=(t,e,r,n)=>{var a=D[n+40>>2],o={tm_sec:U[n>>2],tm_min:U[n+4>>2],tm_hour:U[n+8>>2],tm_mday:U[n+12>>2],tm_mon:U[n+16>>2],tm_year:U[n+20>>2],tm_wday:U[n+24>>2],tm_yday:U[n+28>>2],tm_isdst:U[n+32>>2],tm_gmtoff:U[n+36>>2],tm_zone:a?Kt(a):""},i=Kt(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in s)i=i.replace(new RegExp(l,"g"),s[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,p,M){for(var I=typeof d=="number"?d.toString():d||"";I.length<p;)I=M[0]+I;return I}function v(d,p){return y(d,p,"0")}function T(d,p){function M(lt){return lt<0?-1:lt>0?1:0}var I;return(I=M(d.getFullYear()-p.getFullYear()))===0&&(I=M(d.getMonth()-p.getMonth()))===0&&(I=M(d.getDate()-p.getDate())),I}function x(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function H(d){var p=ma(new Date(d.tm_year+1900,0,1),d.tm_yday),M=new Date(p.getFullYear(),0,4),I=new Date(p.getFullYear()+1,0,4),lt=x(M),kt=x(I);return T(lt,p)<=0?T(kt,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var A={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>h[d.tm_mon].substring(0,3),"%B":d=>h[d.tm_mon],"%C":d=>{var p=d.tm_year+1900;return v(p/100|0,2)},"%d":d=>v(d.tm_mday,2),"%e":d=>y(d.tm_mday,2," "),"%g":d=>H(d).toString().substring(2),"%G":d=>H(d),"%H":d=>v(d.tm_hour,2),"%I":d=>{var p=d.tm_hour;return p==0?p=12:p>12&&(p-=12),v(p,2)},"%j":d=>v(d.tm_mday+pa(Ht(d.tm_year+1900)?Ze:Ke,d.tm_mon-1),3),"%m":d=>v(d.tm_mon+1,2),"%M":d=>v(d.tm_min,2),"%n":()=>` | ||
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>v(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var p=d.tm_yday+7-d.tm_wday;return v(Math.floor(p/7),2)},"%V":d=>{var p=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&p++,p){if(p==53){var M=(d.tm_wday+371-d.tm_yday)%7;M!=4&&(M!=3||!Ht(d.tm_year))&&(p=1)}}else{p=52;var I=(d.tm_wday+7-d.tm_yday-1)%7;(I==4||I==5&&Ht(d.tm_year%400-1))&&p++}return v(p,2)},"%w":d=>d.tm_wday,"%W":d=>{var p=d.tm_yday+7-(d.tm_wday+6)%7;return v(Math.floor(p/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var p=d.tm_gmtoff,M=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(M?"+":"-")+("0000"+p).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};i=i.replace(/%%/g,"\0\0");for(var l in A)i.includes(l)&&(i=i.replace(new RegExp(l,"g"),A[l](o)));i=i.replace(/\0\0/g,"%");var W=ya(i,!1);return W.length>e?0:(va(W,t),W.length-1)},wa=(t,e,r,n,a)=>ga(t,e,r,n);Ae=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},tn(),ht=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},hn(),cn(),$n(),Ue=u.UnboundTypeError=Tn(Error,"UnboundTypeError"),An(),Sn();var $a={q:Vr,u:Lr,a:Yr,h:Nr,l:Gr,I:Xr,P:qr,n:Jr,ba:Qr,d:zr,oa:Zr,Y:Kr,fa:rn,na:Pn,ma:En,D:xn,ea:On,W:Mn,J:jn,w:Rn,s:Hn,V:Bn,L:Gn,Q:Xn,pa:qn,ga:Jn,U:ze,la:Kn,R:ta,ia:ra,ka:na,K:aa,da:oa,ca:ua,$:fa,aa:da,H:ka,T:Xa,B:Ua,p:Ra,b:ba,C:Wa,ha:La,c:Ea,j:Aa,i:Ta,x:Ba,O:Ha,v:ja,G:Ya,N:Na,A:Va,F:qa,Z:Qa,X:Za,k:xa,f:Pa,e:_a,g:Ca,M:Ga,m:Ma,o:Da,S:Sa,t:Fa,ja:Ia,y:za,r:Oa,E:Ja,z:ha,_:wa},S=Ur(),nt=u._free=t=>(nt=u._free=S.sa)(t),ee=u._malloc=t=>(ee=u._malloc=S.ta)(t),tr=t=>(tr=S.va)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=S.wa)();var b=(t,e)=>(b=S.xa)(t,e),_t=t=>(_t=S.ya)(t),C=()=>(C=S.za)(),_=t=>(_=S.Aa)(t),er=t=>(er=S.Ba)(t),rr=t=>(rr=S.Ca)(t),nr=(t,e,r)=>(nr=S.Da)(t,e,r),ar=t=>(ar=S.Ea)(t);u.dynCall_viijii=(t,e,r,n,a,o,i)=>(u.dynCall_viijii=S.Fa)(t,e,r,n,a,o,i);var or=u.dynCall_jiii=(t,e,r,n)=>(or=u.dynCall_jiii=S.Ga)(t,e,r,n),ir=u.dynCall_jiiii=(t,e,r,n,a)=>(ir=u.dynCall_jiiii=S.Ha)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,i)=>(u.dynCall_iiiiij=S.Ia)(t,e,r,n,a,o,i),u.dynCall_iiiiijj=(t,e,r,n,a,o,i,s,l)=>(u.dynCall_iiiiijj=S.Ja)(t,e,r,n,a,o,i,s,l),u.dynCall_iiiiiijj=(t,e,r,n,a,o,i,s,l,f)=>(u.dynCall_iiiiiijj=S.Ka)(t,e,r,n,a,o,i,s,l,f);function ba(t,e){var r=C();try{return E(t)(e)}catch(n){if(_(r),n!==n+0)throw n;b(1,0)}}function Ca(t,e,r,n){var a=C();try{E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function _a(t,e,r){var n=C();try{E(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function Ta(t,e,r,n,a){var o=C();try{return E(t)(e,r,n,a)}catch(i){if(_(o),i!==i+0)throw i;b(1,0)}}function Pa(t,e){var r=C();try{E(t)(e)}catch(n){if(_(r),n!==n+0)throw n;b(1,0)}}function Ea(t,e,r){var n=C();try{return E(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function xa(t){var e=C();try{E(t)()}catch(r){if(_(e),r!==r+0)throw r;b(1,0)}}function Aa(t,e,r,n){var a=C();try{return E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Da(t,e,r,n,a,o){var i=C();try{E(t)(e,r,n,a,o)}catch(s){if(_(i),s!==s+0)throw s;b(1,0)}}function Sa(t,e,r,n,a,o,i){var s=C();try{E(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Oa(t,e,r,n,a,o,i,s,l,f,h){var y=C();try{E(t)(e,r,n,a,o,i,s,l,f,h)}catch(v){if(_(y),v!==v+0)throw v;b(1,0)}}function Fa(t,e,r,n,a,o,i,s){var l=C();try{E(t)(e,r,n,a,o,i,s)}catch(f){if(_(l),f!==f+0)throw f;b(1,0)}}function Ma(t,e,r,n,a){var o=C();try{E(t)(e,r,n,a)}catch(i){if(_(o),i!==i+0)throw i;b(1,0)}}function ja(t,e,r,n,a,o,i){var s=C();try{return E(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Ia(t,e,r,n,a,o,i,s,l){var f=C();try{E(t)(e,r,n,a,o,i,s,l)}catch(h){if(_(f),h!==h+0)throw h;b(1,0)}}function Ra(t){var e=C();try{return E(t)()}catch(r){if(_(e),r!==r+0)throw r;b(1,0)}}function Ha(t,e,r,n,a,o,i){var s=C();try{return E(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Wa(t,e,r,n){var a=C();try{return E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function ka(t,e,r,n){var a=C();try{return E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Ba(t,e,r,n,a,o){var i=C();try{return E(t)(e,r,n,a,o)}catch(s){if(_(i),s!==s+0)throw s;b(1,0)}}function Ua(t,e,r,n,a,o){var i=C();try{return E(t)(e,r,n,a,o)}catch(s){if(_(i),s!==s+0)throw s;b(1,0)}}function Va(t,e,r,n,a,o,i,s,l,f){var h=C();try{return E(t)(e,r,n,a,o,i,s,l,f)}catch(y){if(_(h),y!==y+0)throw y;b(1,0)}}function La(t,e,r){var n=C();try{return E(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function za(t,e,r,n,a,o,i,s,l,f){var h=C();try{E(t)(e,r,n,a,o,i,s,l,f)}catch(y){if(_(h),y!==y+0)throw y;b(1,0)}}function Ya(t,e,r,n,a,o,i,s){var l=C();try{return E(t)(e,r,n,a,o,i,s)}catch(f){if(_(l),f!==f+0)throw f;b(1,0)}}function Na(t,e,r,n,a,o,i,s,l){var f=C();try{return E(t)(e,r,n,a,o,i,s,l)}catch(h){if(_(f),h!==h+0)throw h;b(1,0)}}function Ga(t,e,r,n,a,o,i){var s=C();try{E(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Xa(t,e,r,n){var a=C();try{return E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function qa(t,e,r,n,a,o,i,s,l,f,h,y){var v=C();try{return E(t)(e,r,n,a,o,i,s,l,f,h,y)}catch(T){if(_(v),T!==T+0)throw T;b(1,0)}}function Ja(t,e,r,n,a,o,i,s,l,f,h,y,v,T,x,H){var A=C();try{E(t)(e,r,n,a,o,i,s,l,f,h,y,v,T,x,H)}catch(W){if(_(A),W!==W+0)throw W;b(1,0)}}function Qa(t,e,r,n){var a=C();try{return or(t,e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Za(t,e,r,n,a){var o=C();try{return ir(t,e,r,n,a)}catch(i){if(_(o),i!==i+0)throw i;b(1,0)}}var Wt;vt=function t(){Wt||sr(),Wt||(vt=t)};function sr(){if(it>0||(Sr(),it>0))return;function t(){Wt||(Wt=!0,u.calledRun=!0,!mt&&(Or(),g(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Fr()))}u.setStatus?(u.setStatus("Running..."),setTimeout(function(){setTimeout(function(){u.setStatus("")},1),t()},1)):t()}if(u.preInit)for(typeof u.preInit=="function"&&(u.preInit=[u.preInit]);u.preInit.length>0;)u.preInit.pop()();return sr(),m.ready}})();function Er(c){return Bt(Ut,c)}async function xr(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k){return Tr(c,{tryHarder:m,formats:u,maxSymbols:g},Ut)}async function Ar(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k){return Pr(c,{tryHarder:m,formats:u,maxSymbols:g},Ut)}const Vt=new Map([["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["data_matrix","DataMatrix"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["pdf417","PDF417"],["qr_code","QRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"]]);function Dr(c){for(const[m,u]of Vt)if(c===u)return m;return"unknown"}class ve extends EventTarget{constructor(u={}){var g;super();cr(this,ft,void 0);try{const $=(g=u==null?void 0:u.formats)==null?void 0:g.filter(w=>w!=="unknown");if(($==null?void 0:$.length)===0)throw new TypeError("Hint option provided, but is empty.");$==null||$.forEach(w=>{if(!L.includes(w))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${w}' is not a valid enum value of type BarcodeFormat.`)}),lr(this,ft,$??[]),Er().then(w=>{this.dispatchEvent(new CustomEvent("load",{detail:w}))}).catch(w=>{this.dispatchEvent(new CustomEvent("error",{detail:w}))})}catch($){throw fe($,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return L.filter(u=>u!=="unknown")}async detect(u){try{const g=await mr(u);if(g===null)return[];let $;try{ce(g)?$=await xr(g,{tryHarder:!0,formats:re(this,ft).map(w=>Vt.get(w))}):$=await Ar(g,{tryHarder:!0,formats:re(this,ft).map(w=>Vt.get(w))})}catch(w){throw console.error(w),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return $.map(w=>{const{topLeft:{x:O,y:G},topRight:{x:j,y:F},bottomLeft:{x:Y,y:N},bottomRight:{x:z,y:X}}=w.position,K=Math.min(O,j,Y,z),mt=Math.min(G,F,N,X),J=Math.max(O,j,Y,z),B=Math.max(G,F,N,X);return{boundingBox:new DOMRectReadOnly(K,mt,J-K,B-mt),rawValue:new TextDecoder().decode(w.bytes),format:Dr(w.format),cornerPoints:[{x:O,y:G},{x:j,y:F},{x:z,y:X},{x:Y,y:N}]}})}catch(g){throw fe(g,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ft=new WeakMap,globalThis.BarcodeDetector??(globalThis.BarcodeDetector=ve),R.BarcodeDetector=ve,R.setZXingModuleOverrides=_r,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),R}({}); |
@@ -1,3 +0,3 @@ | ||
var nr=(M,U,z)=>{if(!U.has(M))throw TypeError("Cannot "+z)};var ar=(M,U,z)=>(nr(M,U,"read from private field"),z?z.call(M):U.get(M)),or=(M,U,z)=>{if(U.has(M))throw TypeError("Cannot add the same private member more than once");U instanceof WeakSet?U.add(M):U.set(M,z)},ir=(M,U,z,yt)=>(nr(M,U,"write to private field"),yt?yt.call(M,z):U.set(M,z),z);var BarcodeDetectionAPI=function(M){var mt;"use strict";const U=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function z(c){if(yt(c))return{width:c.naturalWidth,height:c.naturalHeight};if(Kt(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(te(c))return{width:c.videoWidth,height:c.videoHeight};if(re(c))return{width:c.width,height:c.height};if(ae(c))return{width:c.displayWidth,height:c.displayHeight};if(ee(c))return{width:c.width,height:c.height};if(ne(c))return{width:c.width,height:c.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function yt(c){try{return c instanceof HTMLImageElement}catch{return!1}}function Kt(c){try{return c instanceof SVGImageElement}catch{return!1}}function te(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function ee(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function re(c){try{return c instanceof ImageBitmap}catch{return!1}}function ne(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function ae(c){try{return c instanceof VideoFrame}catch{return!1}}function sr(c){try{return c instanceof Blob}catch{return!1}}function ur(c){try{return c instanceof ImageData}catch{return!1}}function cr(c,m){try{const u=new OffscreenCanvas(c,m);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=m,u}}async function oe(c){if(yt(c)&&!await hr(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Kt(c)&&!await pr(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(ae(c)&&yr(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(te(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(re(c)&&vr(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:m,height:u}=z(c);if(m===0||u===0)return null;const w=cr(m,u).getContext("2d");w.drawImage(c,0,0);try{return w.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function lr(c){let m;try{if(createImageBitmap)m=await createImageBitmap(c);else{m=new Image;let g="";try{g=URL.createObjectURL(c),m.src=g,await m.decode()}finally{URL.revokeObjectURL(g)}}}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await oe(m)}function dr(c){const{width:m,height:u}=c;if(m===0||u===0)return null;const g=c.getContext("2d");try{return g.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function fr(c){if(sr(c))return await lr(c);if(ur(c)){if(mr(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return ee(c)||ne(c)?dr(c):await oe(c)}async function hr(c){try{return await c.decode(),!0}catch{return!1}}async function pr(c){var m;try{return await((m=c.decode)==null?void 0:m.call(c)),!0}catch{return!1}}function yr(c){return c.format===null}function mr(c){return c.data.buffer.byteLength===0}function vr(c){return c.width===0&&c.height===0}function ie(c,m){return c instanceof DOMException?new DOMException(`${m}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${m}: ${c.message}`):new Error(`${m}: ${c}`)}const se=c=>{let m;const u=new Set,g=(j,X)=>{const V=typeof j=="function"?j(m):j;if(!Object.is(V,m)){const R=m;m=X??typeof V!="object"?V:Object.assign({},m,V),u.forEach(q=>q(m,R))}},w=()=>m,E={setState:g,getState:w,subscribe:j=>(u.add(j),()=>u.delete(j)),destroy:()=>{u.clear()}};return m=c(g,w,E),E},gr=c=>c?se(c):se,wr={locateFile:(c,m)=>{var u;const g=(u=c.match(/_(.+?)\.wasm$/))==null?void 0:u[1];return g?`https://cdn.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.4/dist/${g}/${c}`:m+c}},ft=gr()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:wr}));function $r(c){ft.setState({zxingModuleOverrides:c})}function ue(c,m=ft.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=ft.getState(),g=u.get(c);if(g&&Object.is(m,ft.getState().zxingModuleOverrides))return g;{ft.setState({zxingModuleOverrides:m});const w=c(m);return u.set(c,w),w}}const ce=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","UPC-A","UPC-E"],at={tryHarder:!0,formats:[],maxSymbols:255};async function br(c,{tryHarder:m=at.tryHarder,formats:u=at.formats,maxSymbols:g=at.maxSymbols}=at,w){const E=await ue(w,ft.getState().zxingModuleOverrides),{data:j,width:X,height:V,data:{byteLength:R}}=c,q=E._malloc(R);E.HEAP8.set(j,q);const Q=E.readBarcodesFromPixmap(q,X,V,m,Cr(u),g);E._free(q);const Y=[];for(let L=0;L<Q.size();++L){const J=Q.get(L);Y.push({...J,format:_r(J.format)})}return Y}function Cr(c){return c.join("|")}function _r(c){const m=le(c);let u=0,g=ce.length-1;for(;u<=g;){const w=Math.floor((u+g)/2),E=ce[w],j=le(E);if(j===m)return E;j<m?u=w+1:g=w-1}return"None"}function le(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var de=(()=>{var c=document.currentScript&&document.currentScript.src||new URL("pure.js",document.baseURI).href;return function(m={}){var u=m,g,w;u.ready=new Promise((t,e)=>{g=t,w=e});var E=Object.assign({},u),j="./this.program",X=typeof window=="object",V=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var R="";function q(t){return u.locateFile?u.locateFile(t,R):R+t}var Q;(X||V)&&(V?R=self.location.href:typeof document<"u"&&document.currentScript&&(R=document.currentScript.src),c&&(R=c),R.indexOf("blob:")!==0?R=R.substr(0,R.replace(/[?#].*/,"").lastIndexOf("/")+1):R="",V&&(Q=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),u.print||console.log.bind(console);var Y=u.printErr||console.error.bind(console);Object.assign(u,E),E=null,u.arguments&&u.arguments,u.thisProgram&&(j=u.thisProgram),u.quit&&u.quit;var L;u.wasmBinary&&(L=u.wasmBinary),u.noExitRuntime,typeof WebAssembly!="object"&&Dt("no native wasm support detected");var J,vt=!1,N,H,gt,Et,k,S,he,pe;function ye(){var t=J.buffer;u.HEAP8=N=new Int8Array(t),u.HEAP16=gt=new Int16Array(t),u.HEAPU8=H=new Uint8Array(t),u.HEAPU16=Et=new Uint16Array(t),u.HEAP32=k=new Int32Array(t),u.HEAPU32=S=new Uint32Array(t),u.HEAPF32=he=new Float32Array(t),u.HEAPF64=pe=new Float64Array(t)}var me,ve=[],ge=[],we=[];function Ar(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Or(u.preRun.shift());Bt(ve)}function Sr(){Bt(ge)}function xr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Mr(u.postRun.shift());Bt(we)}function Or(t){ve.unshift(t)}function Fr(t){ge.unshift(t)}function Mr(t){we.unshift(t)}var st=0,wt=null;function jr(t){st++,u.monitorRunDependencies&&u.monitorRunDependencies(st)}function Rr(t){if(st--,u.monitorRunDependencies&&u.monitorRunDependencies(st),st==0&&wt){var e=wt;wt=null,e()}}function Dt(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",Y(t),vt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw w(e),e}var Ir="data:application/octet-stream;base64,";function $e(t){return t.startsWith(Ir)}var ut;u.locateFile?(ut="zxing_reader.wasm",$e(ut)||(ut=q(ut))):ut=new URL("/reader/zxing_reader.wasm",self.location).href;function be(t){if(t==ut&&L)return new Uint8Array(L);if(Q)return Q(t);throw"both async and sync fetching of the wasm failed"}function Wr(t){return!L&&(X||V)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>be(t)):Promise.resolve().then(()=>be(t))}function Ce(t,e,r){return Wr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{Y(`failed to asynchronously prepare wasm: ${n}`),Dt(n)})}function Hr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!$e(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(i){return Y(`wasm streaming compile failed: ${i}`),Y("falling back to ArrayBuffer instantiation"),Ce(e,r,n)})}):Ce(e,r,n)}function kr(){var t={a:Ea};function e(n,a){var o=n.exports;return x=o,J=x.qa,ye(),me=x.ua,Fr(x.ra),Rr(),o}jr();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){Y(`Module.instantiateWasm callback failed with error: ${n}`),w(n)}return Hr(L,ut,t,r).catch(w),{}}var Bt=t=>{for(;t.length>0;)t.shift()(u)},At=[],St=0,Br=t=>{var e=new xt(t);return e.get_caught()||(e.set_caught(!0),St--),e.set_rethrown(!1),At.push(e),Qe(e.excPtr),e.get_exception_ptr()},K=0,Ur=()=>{$(0,0);var t=At.pop();Ze(t.excPtr),K=0};function xt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){S[this.ptr+4>>2]=e},this.get_type=function(){return S[this.ptr+4>>2]},this.set_destructor=function(e){S[this.ptr+8>>2]=e},this.get_destructor=function(){return S[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,N[this.ptr+12>>0]=e},this.get_caught=function(){return N[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,N[this.ptr+13>>0]=e},this.get_rethrown=function(){return N[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){S[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return S[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=Ke(this.get_type());if(e)return S[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var Vr=t=>{throw K||(K=t),K},Ut=t=>{var e=K;if(!e)return Pt(0),0;var r=new xt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return Pt(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var i=r.ptr+16;if(Je(o,n,i))return Pt(o),e}return Pt(n),e},Lr=()=>Ut([]),zr=t=>Ut([t]),Yr=(t,e)=>Ut([t,e]),Nr=t=>{var e=new xt(t).get_exception_ptr();return e},Gr=()=>{var t=At.pop();t||Dt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(At.push(t),t.set_rethrown(!0),t.set_caught(!1),St++),K=e,K},Xr=(t,e,r)=>{var n=new xt(t);throw n.init(e,r),K=t,St++,K},qr=()=>St,Ot={},_e=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Vt(t){return this.fromWireType(k[t>>2])}var ht={},ct={},Ft={},Te=void 0,Mt=t=>{throw new Te(t)},lt=(t,e,r)=>{t.forEach(function(s){Ft[s]=e});function n(s){var l=r(s);l.length!==t.length&&Mt("Mismatched type converter count");for(var d=0;d<t.length;++d)tt(t[d],l[d])}var a=new Array(e.length),o=[],i=0;e.forEach((s,l)=>{ct.hasOwnProperty(s)?a[l]=ct[s]:(o.push(s),ht.hasOwnProperty(s)||(ht[s]=[]),ht[s].push(()=>{a[l]=ct[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)},Zr=t=>{var e=Ot[t];delete Ot[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(i=>i.getterReturnType).concat(a.map(i=>i.setterArgumentType));lt([t],o,i=>{var s={};return a.forEach((l,d)=>{var h=l.fieldName,y=i[d],v=l.getter,_=l.getterContext,D=i[d+a.length],I=l.setter,A=l.setterContext;s[h]={read:W=>y.fromWireType(v(_,W)),write:(W,f)=>{var p=[];I(A,W,D.toWireType(p,f)),_e(p)}}}),[{name:e.name,fromWireType:l=>{var d={};for(var h in s)d[h]=s[h].read(l);return n(l),d},toWireType:(l,d)=>{for(var h in s)if(!(h in d))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in s)s[h].write(y,d[h]);return l!==null&&l.push(n,y),y},argPackAdvance:et,readValueFromPointer:Vt,destructorFunction:n}]})},Qr=(t,e,r,n,a)=>{},Jr=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Pe=t},Pe=void 0,B=t=>{for(var e="",r=t;H[r];)e+=Pe[H[r++]];return e},pt=void 0,T=t=>{throw new pt(t)};function Kr(t,e,r={}){var n=e.name;if(t||T(`type "${n}" must have a positive integer typeid pointer`),ct.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;T(`Cannot register type '${n}' twice`)}if(ct[t]=e,delete Ft[t],ht.hasOwnProperty(t)){var a=ht[t];delete ht[t],a.forEach(o=>o())}}function tt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Kr(t,e,r)}var et=8,tn=(t,e,r,n)=>{e=B(e),tt(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:et,readValueFromPointer:function(a){return this.fromWireType(H[a])},destructorFunction:null})};function en(t){if(!(this instanceof ot)||!(t instanceof ot))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a}var rn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Lt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}T(e(t)+" instance already deleted")},zt=!1,Ee=t=>{},nn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},De=t=>{t.count.value-=1;var e=t.count.value===0;e&&nn(t)},Ae=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Ae(t,e,r.baseClass);return n===null?null:r.downcast(n)},Se={},an=()=>Object.keys(Ct).length,on=()=>{var t=[];for(var e in Ct)Ct.hasOwnProperty(e)&&t.push(Ct[e]);return t},$t=[],Yt=()=>{for(;$t.length;){var t=$t.pop();t.$$.deleteScheduled=!1,t.delete()}},bt=void 0,sn=t=>{bt=t,$t.length&&bt&&bt(Yt)},un=()=>{u.getInheritedInstanceCount=an,u.getLiveInheritedInstances=on,u.flushPendingDeletes=Yt,u.setDelayFunction=sn},Ct={},cn=(t,e)=>{for(e===void 0&&T("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},ln=(t,e)=>(e=cn(t,e),Ct[e]),jt=(t,e)=>{(!e.ptrType||!e.ptr)&&Mt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Mt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},_t(Object.create(t,{$$:{value:e}}))};function dn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=ln(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=Se[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var l=Ae(e,this.registeredClass,s.registeredClass);return l===null?a.call(this):this.isSmartPointer?jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:t}):jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var _t=t=>typeof FinalizationRegistry>"u"?(_t=e=>e,t):(zt=new FinalizationRegistry(e=>{De(e.$$)}),_t=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};zt.register(e,a,e)}return e},Ee=e=>zt.unregister(e),_t(t));function fn(){if(this.$$.ptr||Lt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=_t(Object.create(Object.getPrototypeOf(this),{$$:{value:rn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function hn(){this.$$.ptr||Lt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&T("Object already scheduled for deletion"),Ee(this),De(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function pn(){return!this.$$.ptr}function yn(){return this.$$.ptr||Lt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&T("Object already scheduled for deletion"),$t.push(this),$t.length===1&&bt&&bt(Yt),this.$$.deleteScheduled=!0,this}var mn=()=>{ot.prototype.isAliasOf=en,ot.prototype.clone=fn,ot.prototype.delete=hn,ot.prototype.isDeleted=pn,ot.prototype.deleteLater=yn};function ot(){}var vn=48,gn=57,xe=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=vn&&e<=gn?`_${t}`:t};function Oe(t,e){return t=xe(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var Fe=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||T(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},Me=(t,e,r)=>{u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&T(`Cannot register public name '${t}' twice`),Fe(u,t,t),u.hasOwnProperty(r)&&T(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),u[t].overloadTable[r]=e):(u[t]=e,r!==void 0&&(u[t].numArguments=r))};function wn(t,e,r,n,a,o,i,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var Nt=(t,e,r)=>{for(;e!==r;)e.upcast||T(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function $n(t,e){if(e===null)return this.isReference&&T(`null is not a valid ${this.name}`),0;e.$$||T(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||T(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function bn(t,e){var r;if(e===null)return this.isReference&&T(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||T(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||T(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&T(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=Nt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&T("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:T(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,it.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:T("Unsupporting sharing policy")}return r}function Cn(t,e){if(e===null)return this.isReference&&T(`null is not a valid ${this.name}`),0;e.$$||T(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||T(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&T(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function je(t){return this.fromWireType(S[t>>2])}function _n(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Tn(t){this.rawDestructor&&this.rawDestructor(t)}var Pn=t=>{t!==null&&t.delete()},En=()=>{rt.prototype.getPointee=_n,rt.prototype.destructor=Tn,rt.prototype.argPackAdvance=et,rt.prototype.readValueFromPointer=je,rt.prototype.deleteObject=Pn,rt.prototype.fromWireType=dn};function rt(t,e,r,n,a,o,i,s,l,d,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=$n,this.destructorFunction=null):(this.toWireType=Cn,this.destructorFunction=null):this.toWireType=bn}var Re=(t,e,r)=>{u.hasOwnProperty(t)||Mt("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)},Dn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Rt=[],P=t=>{var e=Rt[t];return e||(t>=Rt.length&&(Rt.length=t+1),Rt[t]=e=me.get(t)),e},An=(t,e,r)=>{if(t.includes("j"))return Dn(t,e,r);var n=P(e).apply(null,r);return n},Sn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),An(t,e,r)}},Z=(t,e)=>{t=B(t);function r(){return t.includes("j")?Sn(t,e):P(e)}var n=r();return typeof n!="function"&&T(`unknown function pointer with signature ${t}: ${e}`),n},xn=(t,e)=>{var r=Oe(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` | ||
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Ie=void 0,We=t=>{var e=qe(t),r=B(e);return nt(e),r},It=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!ct[o]){if(Ft[o]){Ft[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Ie(`${t}: `+r.map(We).join([", "]))},On=(t,e,r,n,a,o,i,s,l,d,h,y,v)=>{h=B(h),o=Z(a,o),s&&(s=Z(i,s)),d&&(d=Z(l,d)),v=Z(y,v);var _=xe(h);Me(_,function(){It(`Cannot construct ${h} due to unbound types`,[n])}),lt([t,e,r],n?[n]:[],function(D){D=D[0];var I,A;n?(I=D.registeredClass,A=I.instancePrototype):A=ot.prototype;var W=Oe(_,function(){if(Object.getPrototypeOf(this)!==f)throw new pt("Use 'new' to construct "+h);if(p.constructor_body===void 0)throw new pt(h+" has no accessible constructor");var kt=p.constructor_body[arguments.length];if(kt===void 0)throw new pt(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(p.constructor_body).toString()}) parameters instead!`);return kt.apply(this,arguments)}),f=Object.create(A,{constructor:{value:W}});W.prototype=f;var p=new wn(h,W,f,v,I,o,s,d);p.baseClass&&(p.baseClass.__derivedClasses===void 0&&(p.baseClass.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var O=new rt(h,p,!0,!1,!1),F=new rt(h+"*",p,!1,!1,!1),dt=new rt(h+" const*",p,!1,!0,!1);return Se[t]={pointerType:F,constPointerType:dt},Re(_,W),[O,F,dt]})},Gt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(S[e+n*4>>2]);return r};function Xt(t,e,r,n,a,o){var i=e.length;i<2&&T("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=e[1]!==null&&r!==null,l=!1,d=1;d<e.length;++d)if(e[d]!==null&&e[d].destructorFunction===void 0){l=!0;break}var h=e[0].name!=="void",y=i-2,v=new Array(y),_=[],D=[];return function(){arguments.length!==y&&T(`function ${t} called with ${arguments.length} arguments, expected ${y}`),D.length=0;var I;_.length=s?2:1,_[0]=a,s&&(I=e[1].toWireType(D,this),_[1]=I);for(var A=0;A<y;++A)v[A]=e[A+2].toWireType(D,arguments[A]),_.push(v[A]);var W=n.apply(null,_);function f(p){if(l)_e(D);else for(var O=s?1:2;O<e.length;O++){var F=O===1?I:v[O-2];e[O].destructorFunction!==null&&e[O].destructorFunction(F)}if(h)return e[0].fromWireType(p)}return f(W)}}var Fn=(t,e,r,n,a,o)=>{var i=Gt(e,r);a=Z(n,a),lt([],[t],function(s){s=s[0];var l=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[e-1]!==void 0)throw new pt(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return s.registeredClass.constructor_body[e-1]=()=>{It(`Cannot construct ${s.name} due to unbound types`,i)},lt([],i,d=>(d.splice(1,0,null),s.registeredClass.constructor_body[e-1]=Xt(l,d,null,a,o),[])),[]})},Mn=(t,e,r,n,a,o,i,s,l)=>{var d=Gt(r,n);e=B(e),o=Z(a,o),lt([],[t],function(h){h=h[0];var y=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&h.registeredClass.pureVirtualFunctions.push(e);function v(){It(`Cannot call ${y} due to unbound types`,d)}var _=h.registeredClass.instancePrototype,D=_[e];return D===void 0||D.overloadTable===void 0&&D.className!==h.name&&D.argCount===r-2?(v.argCount=r-2,v.className=h.name,_[e]=v):(Fe(_,e,y),_[e].overloadTable[r-2]=v),lt([],d,function(I){var A=Xt(y,I,h,o,i);return _[e].overloadTable===void 0?(A.argCount=r-2,_[e]=A):_[e].overloadTable[r-2]=A,[]}),[]})};function jn(){Object.assign(He.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function He(){this.allocated=[void 0],this.freelist=[]}var G=new He,ke=t=>{t>=G.reserved&&--G.get(t).refcount===0&&G.free(t)},Rn=()=>{for(var t=0,e=G.reserved;e<G.allocated.length;++e)G.allocated[e]!==void 0&&++t;return t},In=()=>{G.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),G.reserved=G.allocated.length,u.count_emval_handles=Rn},it={toValue:t=>(t||T("Cannot use deleted val. handle = "+t),G.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return G.allocate({refcount:1,value:t})}}},Wn=(t,e)=>{e=B(e),tt(t,{name:e,fromWireType:r=>{var n=it.toValue(r);return ke(r),n},toWireType:(r,n)=>it.toHandle(n),argPackAdvance:et,readValueFromPointer:Vt,destructorFunction:null})},qt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},Hn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(he[r>>2])};case 8:return function(r){return this.fromWireType(pe[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},kn=(t,e,r)=>{e=B(e),tt(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:et,readValueFromPointer:Hn(e,r),destructorFunction:null})},Bn=(t,e,r,n,a,o,i)=>{var s=Gt(e,r);t=B(t),a=Z(n,a),Me(t,function(){It(`Cannot call ${t} due to unbound types`,s)},e-1),lt([],s,function(l){var d=[l[0],null].concat(l.slice(1));return Re(t,Xt(t,d,null,a,o),e-1),[]})},Un=(t,e,r)=>{switch(e){case 1:return r?n=>N[n>>0]:n=>H[n>>0];case 2:return r?n=>gt[n>>1]:n=>Et[n>>1];case 4:return r?n=>k[n>>2]:n=>S[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Vn=(t,e,r,n,a)=>{e=B(e);var o=h=>h;if(n===0){var i=32-8*r;o=h=>h<<i>>>i}var s=e.includes("unsigned"),l=(h,y)=>{},d;s?d=function(h,y){return l(y,this.name),y>>>0}:d=function(h,y){return l(y,this.name),y},tt(t,{name:e,fromWireType:o,toWireType:d,argPackAdvance:et,readValueFromPointer:Un(e,r,n!==0),destructorFunction:null})},Ln=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(i){var s=S[i>>2],l=S[i+4>>2];return new a(N.buffer,l,s)}r=B(r),tt(t,{name:r,fromWireType:o,argPackAdvance:et,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Be=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,i=0;i<t.length;++i){var s=t.charCodeAt(i);if(s>=55296&&s<=57343){var l=t.charCodeAt(++i);s=65536+((s&1023)<<10)|l&1023}if(s<=127){if(r>=o)break;e[r++]=s}else if(s<=2047){if(r+1>=o)break;e[r++]=192|s>>6,e[r++]=128|s&63}else if(s<=65535){if(r+2>=o)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|s&63}else{if(r+3>=o)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|s&63}}return e[r]=0,r-a},zn=(t,e,r)=>Be(t,H,e,r),Ue=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},Ve=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Yn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Ve)return Ve.decode(t.subarray(e,a));for(var o="";e<a;){var i=t[e++];if(!(i&128)){o+=String.fromCharCode(i);continue}var s=t[e++]&63;if((i&224)==192){o+=String.fromCharCode((i&31)<<6|s);continue}var l=t[e++]&63;if((i&240)==224?i=(i&15)<<12|s<<6|l:i=(i&7)<<18|s<<12|l<<6|t[e++]&63,i<65536)o+=String.fromCharCode(i);else{var d=i-65536;o+=String.fromCharCode(55296|d>>10,56320|d&1023)}}return o},Zt=(t,e)=>t?Yn(H,t,e):"",Nn=(t,e)=>{e=B(e);var r=e==="std::string";tt(t,{name:e,fromWireType:n=>{var a=S[n>>2],o=n+4,i;if(r)for(var s=o,l=0;l<=a;++l){var d=o+l;if(l==a||H[d]==0){var h=d-s,y=Zt(s,h);i===void 0?i=y:(i+=String.fromCharCode(0),i+=y),s=d+1}}else{for(var v=new Array(a),l=0;l<a;++l)v[l]=String.fromCharCode(H[o+l]);i=v.join("")}return nt(n),i},toWireType:(n,a)=>{a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,i=typeof a=="string";i||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||T("Cannot pass non-string to std::string"),r&&i?o=Ue(a):o=a.length;var s=Jt(4+o+1),l=s+4;if(S[s>>2]=o,r&&i)zn(a,l,o+1);else if(i)for(var d=0;d<o;++d){var h=a.charCodeAt(d);h>255&&(nt(l),T("String has UTF-16 code units that do not fit in 8 bits")),H[l+d]=h}else for(var d=0;d<o;++d)H[l+d]=a[d];return n!==null&&n.push(nt,s),s},argPackAdvance:et,readValueFromPointer:je,destructorFunction:n=>nt(n)})},Le=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Gn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Et[n];)++n;if(r=n<<1,r-t>32&&Le)return Le.decode(H.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=gt[t+i*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Xn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var n=e,a=r<t.length*2?r/2:t.length,o=0;o<a;++o){var i=t.charCodeAt(o);gt[e>>1]=i,e+=2}return gt[e>>1]=0,e-n},qn=t=>t.length*2,Zn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=k[t+r*4>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},Qn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,o=0;o<t.length;++o){var i=t.charCodeAt(o);if(i>=55296&&i<=57343){var s=t.charCodeAt(++o);i=65536+((i&1023)<<10)|s&1023}if(k[e>>2]=i,e+=4,e+4>a)break}return k[e>>2]=0,e-n},Jn=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},Kn=(t,e,r)=>{r=B(r);var n,a,o,i,s;e===2?(n=Gn,a=Xn,i=qn,o=()=>Et,s=1):e===4&&(n=Zn,a=Qn,i=Jn,o=()=>S,s=2),tt(t,{name:r,fromWireType:l=>{for(var d=S[l>>2],h=o(),y,v=l+4,_=0;_<=d;++_){var D=l+4+_*e;if(_==d||h[D>>s]==0){var I=D-v,A=n(v,I);y===void 0?y=A:(y+=String.fromCharCode(0),y+=A),v=D+e}}return nt(l),y},toWireType:(l,d)=>{typeof d!="string"&&T(`Cannot pass non-string to C++ string type ${r}`);var h=i(d),y=Jt(4+h+e);return S[y>>2]=h>>s,a(d,y+4,h+e),l!==null&&l.push(nt,y),y},argPackAdvance:et,readValueFromPointer:Vt,destructorFunction:l=>nt(l)})},ta=(t,e,r,n,a,o)=>{Ot[t]={name:B(e),rawConstructor:Z(r,n),rawDestructor:Z(a,o),fields:[]}},ea=(t,e,r,n,a,o,i,s,l,d)=>{Ot[t].fields.push({fieldName:B(e),getterReturnType:r,getter:Z(n,a),getterContext:o,setterArgumentType:i,setter:Z(s,l),setterContext:d})},ra=(t,e)=>{e=B(e),tt(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},na={},aa=t=>{var e=na[t];return e===void 0?B(t):e},ze=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},oa=t=>t===0?it.toHandle(ze()):(t=aa(t),it.toHandle(ze()[t])),ia=t=>{t>4&&(G.get(t).refcount+=1)},Ye=(t,e)=>{var r=ct[t];return r===void 0&&T(e+" has unknown type "+We(t)),r},sa=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var i=Ye(S[n+o*4>>2],"parameter "+o);e[o+1]=i.readValueFromPointer(a),a+=i.argPackAdvance}var s=new(r.bind.apply(r,e));return it.toHandle(s)}},Ne={},ua=(t,e,r,n)=>{t=it.toValue(t);var a=Ne[e];return a||(a=sa(e),Ne[e]=a),a(t,r,n)},ca=(t,e)=>{t=Ye(t,"_emval_take_value");var r=t.readValueFromPointer(e);return it.toHandle(r)},la=()=>{Dt("")},da=(t,e,r)=>H.copyWithin(t,e,e+r),fa=()=>2147483648,ha=t=>{var e=J.buffer,r=(t-e.byteLength+65535)/65536;try{return J.grow(r),ye(),1}catch{}},pa=t=>{var e=H.length;t>>>=0;var r=fa();if(t>r)return!1;for(var n=(l,d)=>l+(d-l%d)%d,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var i=Math.min(r,n(Math.max(t,o),65536)),s=ha(i);if(s)return!0}return!1},Qt={},ya=()=>j||"./this.program",Tt=()=>{if(!Tt.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:ya()};for(var r in Qt)Qt[r]===void 0?delete e[r]:e[r]=Qt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);Tt.strings=n}return Tt.strings},ma=(t,e)=>{for(var r=0;r<t.length;++r)N[e++>>0]=t.charCodeAt(r);N[e>>0]=0},va=(t,e)=>{var r=0;return Tt().forEach((n,a)=>{var o=e+r;S[t+a*4>>2]=o,ma(n,o),r+=n.length+1}),0},ga=(t,e)=>{var r=Tt();S[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),S[e>>2]=n,0},wa=t=>t,Wt=t=>t%4===0&&(t%100!==0||t%400===0),$a=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Ge=[31,29,31,30,31,30,31,31,30,31,30,31],Xe=[31,28,31,30,31,30,31,31,30,31,30,31],ba=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Wt(r.getFullYear()),a=r.getMonth(),o=(n?Ge:Xe)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function Ca(t,e,r){var n=r>0?r:Ue(t)+1,a=new Array(n),o=Be(t,a,0,a.length);return e&&(a.length=o),a}var _a=(t,e)=>{N.set(t,e)},Ta=(t,e,r,n)=>{var a=S[n+40>>2],o={tm_sec:k[n>>2],tm_min:k[n+4>>2],tm_hour:k[n+8>>2],tm_mday:k[n+12>>2],tm_mon:k[n+16>>2],tm_year:k[n+20>>2],tm_wday:k[n+24>>2],tm_yday:k[n+28>>2],tm_isdst:k[n+32>>2],tm_gmtoff:k[n+36>>2],tm_zone:a?Zt(a):""},i=Zt(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in s)i=i.replace(new RegExp(l,"g"),s[l]);var d=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(f,p,O){for(var F=typeof f=="number"?f.toString():f||"";F.length<p;)F=O[0]+F;return F}function v(f,p){return y(f,p,"0")}function _(f,p){function O(dt){return dt<0?-1:dt>0?1:0}var F;return(F=O(f.getFullYear()-p.getFullYear()))===0&&(F=O(f.getMonth()-p.getMonth()))===0&&(F=O(f.getDate()-p.getDate())),F}function D(f){switch(f.getDay()){case 0:return new Date(f.getFullYear()-1,11,29);case 1:return f;case 2:return new Date(f.getFullYear(),0,3);case 3:return new Date(f.getFullYear(),0,2);case 4:return new Date(f.getFullYear(),0,1);case 5:return new Date(f.getFullYear()-1,11,31);case 6:return new Date(f.getFullYear()-1,11,30)}}function I(f){var p=ba(new Date(f.tm_year+1900,0,1),f.tm_yday),O=new Date(p.getFullYear(),0,4),F=new Date(p.getFullYear()+1,0,4),dt=D(O),kt=D(F);return _(dt,p)<=0?_(kt,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var A={"%a":f=>d[f.tm_wday].substring(0,3),"%A":f=>d[f.tm_wday],"%b":f=>h[f.tm_mon].substring(0,3),"%B":f=>h[f.tm_mon],"%C":f=>{var p=f.tm_year+1900;return v(p/100|0,2)},"%d":f=>v(f.tm_mday,2),"%e":f=>y(f.tm_mday,2," "),"%g":f=>I(f).toString().substring(2),"%G":f=>I(f),"%H":f=>v(f.tm_hour,2),"%I":f=>{var p=f.tm_hour;return p==0?p=12:p>12&&(p-=12),v(p,2)},"%j":f=>v(f.tm_mday+$a(Wt(f.tm_year+1900)?Ge:Xe,f.tm_mon-1),3),"%m":f=>v(f.tm_mon+1,2),"%M":f=>v(f.tm_min,2),"%n":()=>` | ||
`,"%p":f=>f.tm_hour>=0&&f.tm_hour<12?"AM":"PM","%S":f=>v(f.tm_sec,2),"%t":()=>" ","%u":f=>f.tm_wday||7,"%U":f=>{var p=f.tm_yday+7-f.tm_wday;return v(Math.floor(p/7),2)},"%V":f=>{var p=Math.floor((f.tm_yday+7-(f.tm_wday+6)%7)/7);if((f.tm_wday+371-f.tm_yday-2)%7<=2&&p++,p){if(p==53){var O=(f.tm_wday+371-f.tm_yday)%7;O!=4&&(O!=3||!Wt(f.tm_year))&&(p=1)}}else{p=52;var F=(f.tm_wday+7-f.tm_yday-1)%7;(F==4||F==5&&Wt(f.tm_year%400-1))&&p++}return v(p,2)},"%w":f=>f.tm_wday,"%W":f=>{var p=f.tm_yday+7-(f.tm_wday+6)%7;return v(Math.floor(p/7),2)},"%y":f=>(f.tm_year+1900).toString().substring(2),"%Y":f=>f.tm_year+1900,"%z":f=>{var p=f.tm_gmtoff,O=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(O?"+":"-")+("0000"+p).slice(-4)},"%Z":f=>f.tm_zone,"%%":()=>"%"};i=i.replace(/%%/g,"\0\0");for(var l in A)i.includes(l)&&(i=i.replace(new RegExp(l,"g"),A[l](o)));i=i.replace(/\0\0/g,"%");var W=Ca(i,!1);return W.length>e?0:(_a(W,t),W.length-1)},Pa=(t,e,r,n,a)=>Ta(t,e,r,n);Te=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Jr(),pt=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},mn(),un(),En(),Ie=u.UnboundTypeError=xn(Error,"UnboundTypeError"),jn(),In();var Ea={q:Br,u:Ur,a:Lr,h:zr,l:Yr,I:Nr,P:Gr,n:Xr,ba:qr,d:Vr,oa:Zr,Y:Qr,fa:tn,na:On,ma:Fn,D:Mn,ea:Wn,W:kn,J:Bn,w:Vn,s:Ln,V:Nn,L:Kn,Q:ta,pa:ea,ga:ra,U:ke,la:oa,R:ia,ia:ua,ka:ca,K:la,da,ca:pa,$:va,aa:ga,H:Ya,T:to,B:Ga,p:Va,b:Da,C:za,ha:qa,c:Fa,j:ja,i:xa,x:Na,O:La,v:Ba,G:Qa,N:Ja,A:Xa,F:eo,Z:no,X:ao,k:Ma,f:Oa,e:Sa,g:Aa,M:Ka,m:ka,o:Ra,S:Ia,t:Ha,ja:Ua,y:Za,r:Wa,E:ro,z:wa,_:Pa},x=kr(),nt=u._free=t=>(nt=u._free=x.sa)(t),Jt=u._malloc=t=>(Jt=u._malloc=x.ta)(t),qe=t=>(qe=x.va)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=x.wa)();var $=(t,e)=>($=x.xa)(t,e),Pt=t=>(Pt=x.ya)(t),b=()=>(b=x.za)(),C=t=>(C=x.Aa)(t),Ze=t=>(Ze=x.Ba)(t),Qe=t=>(Qe=x.Ca)(t),Je=(t,e,r)=>(Je=x.Da)(t,e,r),Ke=t=>(Ke=x.Ea)(t);u.dynCall_viijii=(t,e,r,n,a,o,i)=>(u.dynCall_viijii=x.Fa)(t,e,r,n,a,o,i);var tr=u.dynCall_jiii=(t,e,r,n)=>(tr=u.dynCall_jiii=x.Ga)(t,e,r,n),er=u.dynCall_jiiii=(t,e,r,n,a)=>(er=u.dynCall_jiiii=x.Ha)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,i)=>(u.dynCall_iiiiij=x.Ia)(t,e,r,n,a,o,i),u.dynCall_iiiiijj=(t,e,r,n,a,o,i,s,l)=>(u.dynCall_iiiiijj=x.Ja)(t,e,r,n,a,o,i,s,l),u.dynCall_iiiiiijj=(t,e,r,n,a,o,i,s,l,d)=>(u.dynCall_iiiiiijj=x.Ka)(t,e,r,n,a,o,i,s,l,d);function Da(t,e){var r=b();try{return P(t)(e)}catch(n){if(C(r),n!==n+0)throw n;$(1,0)}}function Aa(t,e,r,n){var a=b();try{P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function Sa(t,e,r){var n=b();try{P(t)(e,r)}catch(a){if(C(n),a!==a+0)throw a;$(1,0)}}function xa(t,e,r,n,a){var o=b();try{return P(t)(e,r,n,a)}catch(i){if(C(o),i!==i+0)throw i;$(1,0)}}function Oa(t,e){var r=b();try{P(t)(e)}catch(n){if(C(r),n!==n+0)throw n;$(1,0)}}function Fa(t,e,r){var n=b();try{return P(t)(e,r)}catch(a){if(C(n),a!==a+0)throw a;$(1,0)}}function Ma(t){var e=b();try{P(t)()}catch(r){if(C(e),r!==r+0)throw r;$(1,0)}}function ja(t,e,r,n){var a=b();try{return P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function Ra(t,e,r,n,a,o){var i=b();try{P(t)(e,r,n,a,o)}catch(s){if(C(i),s!==s+0)throw s;$(1,0)}}function Ia(t,e,r,n,a,o,i){var s=b();try{P(t)(e,r,n,a,o,i)}catch(l){if(C(s),l!==l+0)throw l;$(1,0)}}function Wa(t,e,r,n,a,o,i,s,l,d,h){var y=b();try{P(t)(e,r,n,a,o,i,s,l,d,h)}catch(v){if(C(y),v!==v+0)throw v;$(1,0)}}function Ha(t,e,r,n,a,o,i,s){var l=b();try{P(t)(e,r,n,a,o,i,s)}catch(d){if(C(l),d!==d+0)throw d;$(1,0)}}function ka(t,e,r,n,a){var o=b();try{P(t)(e,r,n,a)}catch(i){if(C(o),i!==i+0)throw i;$(1,0)}}function Ba(t,e,r,n,a,o,i){var s=b();try{return P(t)(e,r,n,a,o,i)}catch(l){if(C(s),l!==l+0)throw l;$(1,0)}}function Ua(t,e,r,n,a,o,i,s,l){var d=b();try{P(t)(e,r,n,a,o,i,s,l)}catch(h){if(C(d),h!==h+0)throw h;$(1,0)}}function Va(t){var e=b();try{return P(t)()}catch(r){if(C(e),r!==r+0)throw r;$(1,0)}}function La(t,e,r,n,a,o,i){var s=b();try{return P(t)(e,r,n,a,o,i)}catch(l){if(C(s),l!==l+0)throw l;$(1,0)}}function za(t,e,r,n){var a=b();try{return P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function Ya(t,e,r,n){var a=b();try{return P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function Na(t,e,r,n,a,o){var i=b();try{return P(t)(e,r,n,a,o)}catch(s){if(C(i),s!==s+0)throw s;$(1,0)}}function Ga(t,e,r,n,a,o){var i=b();try{return P(t)(e,r,n,a,o)}catch(s){if(C(i),s!==s+0)throw s;$(1,0)}}function Xa(t,e,r,n,a,o,i,s,l,d){var h=b();try{return P(t)(e,r,n,a,o,i,s,l,d)}catch(y){if(C(h),y!==y+0)throw y;$(1,0)}}function qa(t,e,r){var n=b();try{return P(t)(e,r)}catch(a){if(C(n),a!==a+0)throw a;$(1,0)}}function Za(t,e,r,n,a,o,i,s,l,d){var h=b();try{P(t)(e,r,n,a,o,i,s,l,d)}catch(y){if(C(h),y!==y+0)throw y;$(1,0)}}function Qa(t,e,r,n,a,o,i,s){var l=b();try{return P(t)(e,r,n,a,o,i,s)}catch(d){if(C(l),d!==d+0)throw d;$(1,0)}}function Ja(t,e,r,n,a,o,i,s,l){var d=b();try{return P(t)(e,r,n,a,o,i,s,l)}catch(h){if(C(d),h!==h+0)throw h;$(1,0)}}function Ka(t,e,r,n,a,o,i){var s=b();try{P(t)(e,r,n,a,o,i)}catch(l){if(C(s),l!==l+0)throw l;$(1,0)}}function to(t,e,r,n){var a=b();try{return P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function eo(t,e,r,n,a,o,i,s,l,d,h,y){var v=b();try{return P(t)(e,r,n,a,o,i,s,l,d,h,y)}catch(_){if(C(v),_!==_+0)throw _;$(1,0)}}function ro(t,e,r,n,a,o,i,s,l,d,h,y,v,_,D,I){var A=b();try{P(t)(e,r,n,a,o,i,s,l,d,h,y,v,_,D,I)}catch(W){if(C(A),W!==W+0)throw W;$(1,0)}}function no(t,e,r,n){var a=b();try{return tr(t,e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function ao(t,e,r,n,a){var o=b();try{return er(t,e,r,n,a)}catch(i){if(C(o),i!==i+0)throw i;$(1,0)}}var Ht;wt=function t(){Ht||rr(),Ht||(wt=t)};function rr(){if(st>0||(Ar(),st>0))return;function t(){Ht||(Ht=!0,u.calledRun=!0,!vt&&(Sr(),g(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),xr()))}u.setStatus?(u.setStatus("Running..."),setTimeout(function(){setTimeout(function(){u.setStatus("")},1),t()},1)):t()}if(u.preInit)for(typeof u.preInit=="function"&&(u.preInit=[u.preInit]);u.preInit.length>0;)u.preInit.pop()();return rr(),m.ready}})();function Tr(c){return ue(de,c)}async function Pr(c,{tryHarder:m=at.tryHarder,formats:u=at.formats,maxSymbols:g=at.maxSymbols}=at){return br(c,{tryHarder:m,formats:u,maxSymbols:g},de)}const fe=new Map([["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["data_matrix","DataMatrix"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["pdf417","PDF417"],["qr_code","QRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"]]);function Er(c){for(const[m,u]of fe)if(c===u)return m;return"unknown"}class Dr extends EventTarget{constructor(u={}){var g;super();or(this,mt,void 0);try{const w=(g=u==null?void 0:u.formats)==null?void 0:g.filter(E=>E!=="unknown");if((w==null?void 0:w.length)===0)throw new TypeError("Hint option provided, but is empty.");w==null||w.forEach(E=>{if(!U.includes(E))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${E}' is not a valid enum value of type BarcodeFormat.`)}),ir(this,mt,w??[]),Tr().then(E=>{this.dispatchEvent(new CustomEvent("load",{detail:E}))}).catch(E=>{this.dispatchEvent(new CustomEvent("error",{detail:E}))})}catch(w){throw ie(w,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return U.filter(u=>u!=="unknown")}async detect(u){try{const g=await fr(u);if(g===null)return[];let w;try{w=await Pr(g,{tryHarder:!0,formats:ar(this,mt).map(E=>fe.get(E))})}catch{throw new DOMException("Barcode detection service unavailable. Use 'setZXingModuleOverrides' in offline or strict CSP environments.","NotSupportedError")}return w.map(E=>{const{topLeft:{x:j,y:X},topRight:{x:V,y:R},bottomLeft:{x:q,y:Q},bottomRight:{x:Y,y:L}}=E.position,J=Math.min(j,V,q,Y),vt=Math.min(X,R,Q,L),N=Math.max(j,V,q,Y),H=Math.max(X,R,Q,L);return{boundingBox:new DOMRectReadOnly(J,vt,N-J,H-vt),rawValue:new TextDecoder().decode(E.bytes),format:Er(E.format),cornerPoints:[{x:j,y:X},{x:V,y:R},{x:Y,y:L},{x:q,y:Q}]}})}catch(g){throw ie(g,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return mt=new WeakMap,M.BarcodeDetector=Dr,M.setZXingModuleOverrides=$r,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),M}({}); | ||
var sr=(R,L,q)=>{if(!L.has(R))throw TypeError("Cannot "+q)};var re=(R,L,q)=>(sr(R,L,"read from private field"),q?q.call(R):L.get(R)),ur=(R,L,q)=>{if(L.has(R))throw TypeError("Cannot add the same private member more than once");L instanceof WeakSet?L.add(R):L.set(R,q)},cr=(R,L,q,pt)=>(sr(R,L,"write to private field"),pt?pt.call(R,q):L.set(R,q),q);var BarcodeDetectionAPI=function(R){var ft;"use strict";const L=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function q(c){if(pt(c))return{width:c.naturalWidth,height:c.naturalHeight};if(ne(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(ae(c))return{width:c.videoWidth,height:c.videoHeight};if(ie(c))return{width:c.width,height:c.height};if(ue(c))return{width:c.displayWidth,height:c.displayHeight};if(oe(c))return{width:c.width,height:c.height};if(se(c))return{width:c.width,height:c.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function pt(c){try{return c instanceof HTMLImageElement}catch{return!1}}function ne(c){try{return c instanceof SVGImageElement}catch{return!1}}function ae(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function oe(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function ie(c){try{return c instanceof ImageBitmap}catch{return!1}}function se(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function ue(c){try{return c instanceof VideoFrame}catch{return!1}}function ce(c){try{return c instanceof Blob}catch{return!1}}function lr(c){try{return c instanceof ImageData}catch{return!1}}function fr(c,m){try{const u=new OffscreenCanvas(c,m);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=m,u}}async function le(c){if(pt(c)&&!await mr(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ne(c)&&!await yr(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(ue(c)&&vr(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(ae(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ie(c)&&wr(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:m,height:u}=q(c);if(m===0||u===0)return null;const $=fr(m,u).getContext("2d");$.drawImage(c,0,0);try{return $.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function dr(c){let m;try{if(createImageBitmap)m=await createImageBitmap(c);else if(Image){m=new Image;let g="";try{g=URL.createObjectURL(c),m.src=g,await m.decode()}finally{URL.revokeObjectURL(g)}}else return c}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await le(m)}function hr(c){const{width:m,height:u}=c;if(m===0||u===0)return null;const g=c.getContext("2d");try{return g.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function pr(c){if(ce(c))return await dr(c);if(lr(c)){if(gr(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return oe(c)||se(c)?hr(c):await le(c)}async function mr(c){try{return await c.decode(),!0}catch{return!1}}async function yr(c){var m;try{return await((m=c.decode)==null?void 0:m.call(c)),!0}catch{return!1}}function vr(c){return c.format===null}function gr(c){return c.data.buffer.byteLength===0}function wr(c){return c.width===0&&c.height===0}function fe(c,m){return c instanceof DOMException?new DOMException(`${m}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${m}: ${c.message}`):new Error(`${m}: ${c}`)}const de=c=>{let m;const u=new Set,g=(O,G)=>{const j=typeof O=="function"?O(m):O;if(!Object.is(j,m)){const F=m;m=G??typeof j!="object"?j:Object.assign({},m,j),u.forEach(Y=>Y(m,F))}},$=()=>m,w={setState:g,getState:$,subscribe:O=>(u.add(O),()=>u.delete(O)),destroy:()=>{u.clear()}};return m=c(g,$,w),w},$r=c=>c?de(c):de,br={locateFile:(c,m)=>{var u;const g=(u=c.match(/_(.+?)\.wasm$/))==null?void 0:u[1];return g?`https://fastly.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.5/dist/${g}/${c}`:m+c}},ot=$r()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:br}));function Cr(c){ot.setState({zxingModuleOverrides:c})}function Bt(c,m=ot.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=ot.getState(),g=u.get(c);if(g&&Object.is(m,ot.getState().zxingModuleOverrides))return g;{ot.setState({zxingModuleOverrides:m});const $=c(m);return u.set(c,$),$}}const he=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","UPC-A","UPC-E"],k={tryHarder:!0,formats:[],maxSymbols:255};async function _r(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k,$){const w=await Bt($,ot.getState().zxingModuleOverrides),{size:O}=c,G=new Uint8Array(await c.arrayBuffer()),j=w._malloc(O);w.HEAP8.set(G,j);const F=w.readBarcodesFromImage(j,O,m,pe(u),g);w._free(j);const Y=[];for(let N=0;N<F.size();++N){const z=F.get(N);Y.push({...z,format:me(z.format)})}return Y}async function Tr(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k,$){const w=await Bt($,ot.getState().zxingModuleOverrides),{data:O,width:G,height:j,data:{byteLength:F}}=c,Y=w._malloc(F);w.HEAP8.set(O,Y);const N=w.readBarcodesFromPixmap(Y,G,j,m,pe(u),g);w._free(Y);const z=[];for(let X=0;X<N.size();++X){const K=N.get(X);z.push({...K,format:me(K.format)})}return z}function pe(c){return c.join("|")}function me(c){const m=ye(c);let u=0,g=he.length-1;for(;u<=g;){const $=Math.floor((u+g)/2),w=he[$],O=ye(w);if(O===m)return w;O<m?u=$+1:g=$-1}return"None"}function ye(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var Ut=(()=>{var c=document.currentScript&&document.currentScript.src||new URL("pure.js",document.baseURI).href;return function(m={}){var u=m,g,$;u.ready=new Promise((t,e)=>{g=t,$=e});var w=Object.assign({},u),O="./this.program",G=typeof window=="object",j=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var F="";function Y(t){return u.locateFile?u.locateFile(t,F):F+t}var N;(G||j)&&(j?F=self.location.href:typeof document<"u"&&document.currentScript&&(F=document.currentScript.src),c&&(F=c),F.indexOf("blob:")!==0?F=F.substr(0,F.replace(/[?#].*/,"").lastIndexOf("/")+1):F="",j&&(N=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),u.print||console.log.bind(console);var z=u.printErr||console.error.bind(console);Object.assign(u,w),w=null,u.arguments&&u.arguments,u.thisProgram&&(O=u.thisProgram),u.quit&&u.quit;var X;u.wasmBinary&&(X=u.wasmBinary),u.noExitRuntime,typeof WebAssembly!="object"&&Pt("no native wasm support detected");var K,mt=!1,J,B,yt,Tt,U,S,ve,ge;function we(){var t=K.buffer;u.HEAP8=J=new Int8Array(t),u.HEAP16=yt=new Int16Array(t),u.HEAPU8=B=new Uint8Array(t),u.HEAPU16=Tt=new Uint16Array(t),u.HEAP32=U=new Int32Array(t),u.HEAPU32=S=new Uint32Array(t),u.HEAPF32=ve=new Float32Array(t),u.HEAPF64=ge=new Float64Array(t)}var $e=[],be=[],Ce=[];function Dr(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Mr(u.preRun.shift());Lt($e)}function Or(){Lt(be)}function Fr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Ir(u.postRun.shift());Lt(Ce)}function Mr(t){$e.unshift(t)}function jr(t){be.unshift(t)}function Ir(t){Ce.unshift(t)}var it=0,vt=null;function Rr(t){it++,u.monitorRunDependencies&&u.monitorRunDependencies(it)}function Hr(t){if(it--,u.monitorRunDependencies&&u.monitorRunDependencies(it),it==0&&vt){var e=vt;vt=null,e()}}function Pt(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",z(t),mt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw $(e),e}var Wr="data:application/octet-stream;base64,";function _e(t){return t.startsWith(Wr)}var st;u.locateFile?(st="zxing_reader.wasm",_e(st)||(st=Y(st))):st=new URL("/reader/zxing_reader.wasm",self.location).href;function Te(t){if(t==st&&X)return new Uint8Array(X);if(N)return N(t);throw"both async and sync fetching of the wasm failed"}function kr(t){return!X&&(G||j)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>Te(t)):Promise.resolve().then(()=>Te(t))}function Pe(t,e,r){return kr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{z(`failed to asynchronously prepare wasm: ${n}`),Pt(n)})}function Br(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!_e(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(i){return z(`wasm streaming compile failed: ${i}`),z("falling back to ArrayBuffer instantiation"),Pe(e,r,n)})}):Pe(e,r,n)}function Ur(){var t={a:$a};function e(n,a){return D=n.exports,K=D.qa,we(),ke=D.ua,jr(D.ra),Hr(),D}Rr();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){z(`Module.instantiateWasm callback failed with error: ${n}`),$(n)}return Br(X,st,t,r).catch($),{}}var Lt=t=>{for(;t.length>0;)t.shift()(u)},Et=[],xt=0,Vr=t=>{var e=new At(t);return e.get_caught()||(e.set_caught(!0),xt--),e.set_rethrown(!1),Et.push(e),er(e.excPtr),e.get_exception_ptr()},tt=0,Lr=()=>{b(0,0);var t=Et.pop();tr(t.excPtr),tt=0};function At(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){S[this.ptr+4>>2]=e},this.get_type=function(){return S[this.ptr+4>>2]},this.set_destructor=function(e){S[this.ptr+8>>2]=e},this.get_destructor=function(){return S[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,J[this.ptr+12>>0]=e},this.get_caught=function(){return J[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,J[this.ptr+13>>0]=e},this.get_rethrown=function(){return J[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){S[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return S[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=nr(this.get_type());if(e)return S[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var zr=t=>{throw tt||(tt=t),tt},zt=t=>{var e=tt;if(!e)return _t(0),0;var r=new At(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return _t(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var i=r.ptr+16;if(rr(o,n,i))return _t(o),e}return _t(n),e},Yr=()=>zt([]),Nr=t=>zt([t]),Gr=(t,e)=>zt([t,e]),Xr=t=>{var e=new At(t).get_exception_ptr();return e},qr=()=>{var t=Et.pop();t||Pt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Et.push(t),t.set_rethrown(!0),t.set_caught(!1),xt++),tt=e,tt},Jr=(t,e,r)=>{var n=new At(t);throw n.init(e,r),tt=t,xt++,tt},Qr=()=>xt,St={},Ee=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Yt(t){return this.fromWireType(U[t>>2])}var dt={},ut={},Dt={},xe,Ot=t=>{throw new xe(t)},ct=(t,e,r)=>{t.forEach(function(s){Dt[s]=e});function n(s){var l=r(s);l.length!==t.length&&Ot("Mismatched type converter count");for(var f=0;f<t.length;++f)et(t[f],l[f])}var a=new Array(e.length),o=[],i=0;e.forEach((s,l)=>{ut.hasOwnProperty(s)?a[l]=ut[s]:(o.push(s),dt.hasOwnProperty(s)||(dt[s]=[]),dt[s].push(()=>{a[l]=ut[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)},Zr=t=>{var e=St[t];delete St[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(i=>i.getterReturnType).concat(a.map(i=>i.setterArgumentType));ct([t],o,i=>{var s={};return a.forEach((l,f)=>{var h=l.fieldName,y=i[f],v=l.getter,T=l.getterContext,x=i[f+a.length],H=l.setter,A=l.setterContext;s[h]={read:W=>y.fromWireType(v(T,W)),write:(W,d)=>{var p=[];H(A,W,x.toWireType(p,d)),Ee(p)}}}),[{name:e.name,fromWireType:l=>{var f={};for(var h in s)f[h]=s[h].read(l);return n(l),f},toWireType:(l,f)=>{for(var h in s)if(!(h in f))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in s)s[h].write(y,f[h]);return l!==null&&l.push(n,y),y},argPackAdvance:rt,readValueFromPointer:Yt,destructorFunction:n}]})},Kr=(t,e,r,n,a)=>{},tn=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Ae=t},Ae,V=t=>{for(var e="",r=t;B[r];)e+=Ae[B[r++]];return e},ht,P=t=>{throw new ht(t)};function en(t,e,r={}){var n=e.name;if(t||P(`type "${n}" must have a positive integer typeid pointer`),ut.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;P(`Cannot register type '${n}' twice`)}if(ut[t]=e,delete Dt[t],dt.hasOwnProperty(t)){var a=dt[t];delete dt[t],a.forEach(o=>o())}}function et(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return en(t,e,r)}var rt=8,rn=(t,e,r,n)=>{e=V(e),et(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:rt,readValueFromPointer:function(a){return this.fromWireType(B[a])},destructorFunction:null})},nn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Nt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}P(e(t)+" instance already deleted")},Gt=!1,Se=t=>{},an=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},De=t=>{t.count.value-=1;var e=t.count.value===0;e&&an(t)},Oe=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Oe(t,e,r.baseClass);return n===null?null:r.downcast(n)},Fe={},on=()=>Object.keys($t).length,sn=()=>{var t=[];for(var e in $t)$t.hasOwnProperty(e)&&t.push($t[e]);return t},gt=[],Xt=()=>{for(;gt.length;){var t=gt.pop();t.$$.deleteScheduled=!1,t.delete()}},wt,un=t=>{wt=t,gt.length&&wt&&wt(Xt)},cn=()=>{u.getInheritedInstanceCount=on,u.getLiveInheritedInstances=sn,u.flushPendingDeletes=Xt,u.setDelayFunction=un},$t={},ln=(t,e)=>{for(e===void 0&&P("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},fn=(t,e)=>(e=ln(t,e),$t[e]),Ft=(t,e)=>{(!e.ptrType||!e.ptr)&&Ot("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Ot("Both smartPtrType and smartPtr must be specified"),e.count={value:1},bt(Object.create(t,{$$:{value:e}}))};function dn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=fn(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?Ft(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Ft(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=Fe[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var l=Oe(e,this.registeredClass,s.registeredClass);return l===null?a.call(this):this.isSmartPointer?Ft(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:t}):Ft(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var bt=t=>typeof FinalizationRegistry>"u"?(bt=e=>e,t):(Gt=new FinalizationRegistry(e=>{De(e.$$)}),bt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Gt.register(e,a,e)}return e},Se=e=>Gt.unregister(e),bt(t)),hn=()=>{Object.assign(Mt.prototype,{isAliasOf(t){if(!(this instanceof Mt)||!(t instanceof Mt))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||Nt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=bt(Object.create(Object.getPrototypeOf(this),{$$:{value:nn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),Se(this),De(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),gt.push(this),gt.length===1&&wt&&wt(Xt),this.$$.deleteScheduled=!0,this}})};function Mt(){}var pn=48,mn=57,Me=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=pn&&e<=mn?`_${t}`:t};function je(t,e){return t=Me(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var Ie=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||P(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},Re=(t,e,r)=>{u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&P(`Cannot register public name '${t}' twice`),Ie(u,t,t),u.hasOwnProperty(r)&&P(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),u[t].overloadTable[r]=e):(u[t]=e,r!==void 0&&(u[t].numArguments=r))};function yn(t,e,r,n,a,o,i,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var qt=(t,e,r)=>{for(;e!==r;)e.upcast||P(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function vn(t,e){if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;e.$$||P(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=qt(e.$$.ptr,r,this.registeredClass);return n}function gn(t,e){var r;if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||P(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&P(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=qt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&P("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:P(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,at.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:P("Unsupporting sharing policy")}return r}function wn(t,e){if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;e.$$||P(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&P(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=qt(e.$$.ptr,r,this.registeredClass);return n}function He(t){return this.fromWireType(S[t>>2])}var $n=()=>{Object.assign(jt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:rt,readValueFromPointer:He,deleteObject(t){t!==null&&t.delete()},fromWireType:dn})};function jt(t,e,r,n,a,o,i,s,l,f,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=vn,this.destructorFunction=null):(this.toWireType=wn,this.destructorFunction=null):this.toWireType=gn}var We=(t,e,r)=>{u.hasOwnProperty(t)||Ot("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)},bn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},It=[],ke,E=t=>{var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=ke.get(t)),e},Cn=(t,e,r)=>{if(t.includes("j"))return bn(t,e,r);var n=E(e).apply(null,r);return n},_n=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Cn(t,e,r)}},Z=(t,e)=>{t=V(t);function r(){return t.includes("j")?_n(t,e):E(e)}var n=r();return typeof n!="function"&&P(`unknown function pointer with signature ${t}: ${e}`),n},Tn=(t,e)=>{var r=je(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` | ||
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Be,Ue=t=>{var e=Ke(t),r=V(e);return nt(e),r},Rt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!ut[o]){if(Dt[o]){Dt[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Be(`${t}: `+r.map(Ue).join([", "]))},Pn=(t,e,r,n,a,o,i,s,l,f,h,y,v)=>{h=V(h),o=Z(a,o),s&&(s=Z(i,s)),f&&(f=Z(l,f)),v=Z(y,v);var T=Me(h);Re(T,function(){Rt(`Cannot construct ${h} due to unbound types`,[n])}),ct([t,e,r],n?[n]:[],function(x){x=x[0];var H,A;n?(H=x.registeredClass,A=H.instancePrototype):A=Mt.prototype;var W=je(T,function(){if(Object.getPrototypeOf(this)!==d)throw new ht("Use 'new' to construct "+h);if(p.constructor_body===void 0)throw new ht(h+" has no accessible constructor");var kt=p.constructor_body[arguments.length];if(kt===void 0)throw new ht(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(p.constructor_body).toString()}) parameters instead!`);return kt.apply(this,arguments)}),d=Object.create(A,{constructor:{value:W}});W.prototype=d;var p=new yn(h,W,d,v,H,o,s,f);p.baseClass&&(p.baseClass.__derivedClasses===void 0&&(p.baseClass.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var M=new jt(h,p,!0,!1,!1),I=new jt(h+"*",p,!1,!1,!1),lt=new jt(h+" const*",p,!1,!0,!1);return Fe[t]={pointerType:I,constPointerType:lt},We(T,W),[M,I,lt]})},Jt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(S[e+n*4>>2]);return r};function Qt(t,e,r,n,a,o){var i=e.length;i<2&&P("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=e[1]!==null&&r!==null,l=!1,f=1;f<e.length;++f)if(e[f]!==null&&e[f].destructorFunction===void 0){l=!0;break}var h=e[0].name!=="void",y=i-2,v=new Array(y),T=[],x=[];return function(){arguments.length!==y&&P(`function ${t} called with ${arguments.length} arguments, expected ${y}`),x.length=0;var H;T.length=s?2:1,T[0]=a,s&&(H=e[1].toWireType(x,this),T[1]=H);for(var A=0;A<y;++A)v[A]=e[A+2].toWireType(x,arguments[A]),T.push(v[A]);var W=n.apply(null,T);function d(p){if(l)Ee(x);else for(var M=s?1:2;M<e.length;M++){var I=M===1?H:v[M-2];e[M].destructorFunction!==null&&e[M].destructorFunction(I)}if(h)return e[0].fromWireType(p)}return d(W)}}var En=(t,e,r,n,a,o)=>{var i=Jt(e,r);a=Z(n,a),ct([],[t],function(s){s=s[0];var l=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[e-1]!==void 0)throw new ht(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return s.registeredClass.constructor_body[e-1]=()=>{Rt(`Cannot construct ${s.name} due to unbound types`,i)},ct([],i,f=>(f.splice(1,0,null),s.registeredClass.constructor_body[e-1]=Qt(l,f,null,a,o),[])),[]})},xn=(t,e,r,n,a,o,i,s,l)=>{var f=Jt(r,n);e=V(e),o=Z(a,o),ct([],[t],function(h){h=h[0];var y=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&h.registeredClass.pureVirtualFunctions.push(e);function v(){Rt(`Cannot call ${y} due to unbound types`,f)}var T=h.registeredClass.instancePrototype,x=T[e];return x===void 0||x.overloadTable===void 0&&x.className!==h.name&&x.argCount===r-2?(v.argCount=r-2,v.className=h.name,T[e]=v):(Ie(T,e,y),T[e].overloadTable[r-2]=v),ct([],f,function(H){var A=Qt(y,H,h,o,i);return T[e].overloadTable===void 0?(A.argCount=r-2,T[e]=A):T[e].overloadTable[r-2]=A,[]}),[]})};function An(){Object.assign(Ve.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function Ve(){this.allocated=[void 0],this.freelist=[]}var Q=new Ve,Le=t=>{t>=Q.reserved&&--Q.get(t).refcount===0&&Q.free(t)},Sn=()=>{for(var t=0,e=Q.reserved;e<Q.allocated.length;++e)Q.allocated[e]!==void 0&&++t;return t},Dn=()=>{Q.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Q.reserved=Q.allocated.length,u.count_emval_handles=Sn},at={toValue:t=>(t||P("Cannot use deleted val. handle = "+t),Q.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Q.allocate({refcount:1,value:t})}}},On=(t,e)=>{e=V(e),et(t,{name:e,fromWireType:r=>{var n=at.toValue(r);return Le(r),n},toWireType:(r,n)=>at.toHandle(n),argPackAdvance:rt,readValueFromPointer:Yt,destructorFunction:null})},Zt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},Fn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(ve[r>>2])};case 8:return function(r){return this.fromWireType(ge[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Mn=(t,e,r)=>{e=V(e),et(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:rt,readValueFromPointer:Fn(e,r),destructorFunction:null})},jn=(t,e,r,n,a,o,i)=>{var s=Jt(e,r);t=V(t),a=Z(n,a),Re(t,function(){Rt(`Cannot call ${t} due to unbound types`,s)},e-1),ct([],s,function(l){var f=[l[0],null].concat(l.slice(1));return We(t,Qt(t,f,null,a,o),e-1),[]})},In=(t,e,r)=>{switch(e){case 1:return r?n=>J[n>>0]:n=>B[n>>0];case 2:return r?n=>yt[n>>1]:n=>Tt[n>>1];case 4:return r?n=>U[n>>2]:n=>S[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Rn=(t,e,r,n,a)=>{e=V(e);var o=h=>h;if(n===0){var i=32-8*r;o=h=>h<<i>>>i}var s=e.includes("unsigned"),l=(h,y)=>{},f;s?f=function(h,y){return l(y,this.name),y>>>0}:f=function(h,y){return l(y,this.name),y},et(t,{name:e,fromWireType:o,toWireType:f,argPackAdvance:rt,readValueFromPointer:In(e,r,n!==0),destructorFunction:null})},Hn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(i){var s=S[i>>2],l=S[i+4>>2];return new a(J.buffer,l,s)}r=V(r),et(t,{name:r,fromWireType:o,argPackAdvance:rt,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},ze=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,i=0;i<t.length;++i){var s=t.charCodeAt(i);if(s>=55296&&s<=57343){var l=t.charCodeAt(++i);s=65536+((s&1023)<<10)|l&1023}if(s<=127){if(r>=o)break;e[r++]=s}else if(s<=2047){if(r+1>=o)break;e[r++]=192|s>>6,e[r++]=128|s&63}else if(s<=65535){if(r+2>=o)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|s&63}else{if(r+3>=o)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|s&63}}return e[r]=0,r-a},Wn=(t,e,r)=>ze(t,B,e,r),Ye=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},Ne=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,kn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Ne)return Ne.decode(t.subarray(e,a));for(var o="";e<a;){var i=t[e++];if(!(i&128)){o+=String.fromCharCode(i);continue}var s=t[e++]&63;if((i&224)==192){o+=String.fromCharCode((i&31)<<6|s);continue}var l=t[e++]&63;if((i&240)==224?i=(i&15)<<12|s<<6|l:i=(i&7)<<18|s<<12|l<<6|t[e++]&63,i<65536)o+=String.fromCharCode(i);else{var f=i-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return o},Kt=(t,e)=>t?kn(B,t,e):"",Bn=(t,e)=>{e=V(e);var r=e==="std::string";et(t,{name:e,fromWireType(n){var a=S[n>>2],o=n+4,i;if(r)for(var s=o,l=0;l<=a;++l){var f=o+l;if(l==a||B[f]==0){var h=f-s,y=Kt(s,h);i===void 0?i=y:(i+=String.fromCharCode(0),i+=y),s=f+1}}else{for(var v=new Array(a),l=0;l<a;++l)v[l]=String.fromCharCode(B[o+l]);i=v.join("")}return nt(n),i},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,i=typeof a=="string";i||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||P("Cannot pass non-string to std::string"),r&&i?o=Ye(a):o=a.length;var s=ee(4+o+1),l=s+4;if(S[s>>2]=o,r&&i)Wn(a,l,o+1);else if(i)for(var f=0;f<o;++f){var h=a.charCodeAt(f);h>255&&(nt(l),P("String has UTF-16 code units that do not fit in 8 bits")),B[l+f]=h}else for(var f=0;f<o;++f)B[l+f]=a[f];return n!==null&&n.push(nt,s),s},argPackAdvance:rt,readValueFromPointer:He,destructorFunction(n){nt(n)}})},Ge=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Un=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Tt[n];)++n;if(r=n<<1,r-t>32&&Ge)return Ge.decode(B.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=yt[t+i*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Vn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var n=e,a=r<t.length*2?r/2:t.length,o=0;o<a;++o){var i=t.charCodeAt(o);yt[e>>1]=i,e+=2}return yt[e>>1]=0,e-n},Ln=t=>t.length*2,zn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=U[t+r*4>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},Yn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,o=0;o<t.length;++o){var i=t.charCodeAt(o);if(i>=55296&&i<=57343){var s=t.charCodeAt(++o);i=65536+((i&1023)<<10)|s&1023}if(U[e>>2]=i,e+=4,e+4>a)break}return U[e>>2]=0,e-n},Nn=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},Gn=(t,e,r)=>{r=V(r);var n,a,o,i,s;e===2?(n=Un,a=Vn,i=Ln,o=()=>Tt,s=1):e===4&&(n=zn,a=Yn,i=Nn,o=()=>S,s=2),et(t,{name:r,fromWireType:l=>{for(var f=S[l>>2],h=o(),y,v=l+4,T=0;T<=f;++T){var x=l+4+T*e;if(T==f||h[x>>s]==0){var H=x-v,A=n(v,H);y===void 0?y=A:(y+=String.fromCharCode(0),y+=A),v=x+e}}return nt(l),y},toWireType:(l,f)=>{typeof f!="string"&&P(`Cannot pass non-string to C++ string type ${r}`);var h=i(f),y=ee(4+h+e);return S[y>>2]=h>>s,a(f,y+4,h+e),l!==null&&l.push(nt,y),y},argPackAdvance:rt,readValueFromPointer:Yt,destructorFunction(l){nt(l)}})},Xn=(t,e,r,n,a,o)=>{St[t]={name:V(e),rawConstructor:Z(r,n),rawDestructor:Z(a,o),fields:[]}},qn=(t,e,r,n,a,o,i,s,l,f)=>{St[t].fields.push({fieldName:V(e),getterReturnType:r,getter:Z(n,a),getterContext:o,setterArgumentType:i,setter:Z(s,l),setterContext:f})},Jn=(t,e)=>{e=V(e),et(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Qn={},Zn=t=>{var e=Qn[t];return e===void 0?V(t):e},Xe=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},Kn=t=>t===0?at.toHandle(Xe()):(t=Zn(t),at.toHandle(Xe()[t])),ta=t=>{t>4&&(Q.get(t).refcount+=1)},qe=(t,e)=>{var r=ut[t];return r===void 0&&P(e+" has unknown type "+Ue(t)),r},ea=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var i=qe(S[n+o*4>>2],"parameter "+o);e[o+1]=i.readValueFromPointer(a),a+=i.argPackAdvance}var s=new(r.bind.apply(r,e));return at.toHandle(s)}},Je={},ra=(t,e,r,n)=>{t=at.toValue(t);var a=Je[e];return a||(a=ea(e),Je[e]=a),a(t,r,n)},na=(t,e)=>{t=qe(t,"_emval_take_value");var r=t.readValueFromPointer(e);return at.toHandle(r)},aa=()=>{Pt("")},oa=(t,e,r)=>B.copyWithin(t,e,e+r),ia=()=>2147483648,sa=t=>{var e=K.buffer,r=(t-e.byteLength+65535)/65536;try{return K.grow(r),we(),1}catch{}},ua=t=>{var e=B.length;t>>>=0;var r=ia();if(t>r)return!1;for(var n=(l,f)=>l+(f-l%f)%f,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var i=Math.min(r,n(Math.max(t,o),65536)),s=sa(i);if(s)return!0}return!1},te={},ca=()=>O||"./this.program",Ct=()=>{if(!Ct.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:ca()};for(var r in te)te[r]===void 0?delete e[r]:e[r]=te[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);Ct.strings=n}return Ct.strings},la=(t,e)=>{for(var r=0;r<t.length;++r)J[e++>>0]=t.charCodeAt(r);J[e>>0]=0},fa=(t,e)=>{var r=0;return Ct().forEach((n,a)=>{var o=e+r;S[t+a*4>>2]=o,la(n,o),r+=n.length+1}),0},da=(t,e)=>{var r=Ct();S[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),S[e>>2]=n,0},ha=t=>t,Ht=t=>t%4===0&&(t%100!==0||t%400===0),pa=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Qe=[31,29,31,30,31,30,31,31,30,31,30,31],Ze=[31,28,31,30,31,30,31,31,30,31,30,31],ma=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Ht(r.getFullYear()),a=r.getMonth(),o=(n?Qe:Ze)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function ya(t,e,r){var n=r>0?r:Ye(t)+1,a=new Array(n),o=ze(t,a,0,a.length);return e&&(a.length=o),a}var va=(t,e)=>{J.set(t,e)},ga=(t,e,r,n)=>{var a=S[n+40>>2],o={tm_sec:U[n>>2],tm_min:U[n+4>>2],tm_hour:U[n+8>>2],tm_mday:U[n+12>>2],tm_mon:U[n+16>>2],tm_year:U[n+20>>2],tm_wday:U[n+24>>2],tm_yday:U[n+28>>2],tm_isdst:U[n+32>>2],tm_gmtoff:U[n+36>>2],tm_zone:a?Kt(a):""},i=Kt(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in s)i=i.replace(new RegExp(l,"g"),s[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,p,M){for(var I=typeof d=="number"?d.toString():d||"";I.length<p;)I=M[0]+I;return I}function v(d,p){return y(d,p,"0")}function T(d,p){function M(lt){return lt<0?-1:lt>0?1:0}var I;return(I=M(d.getFullYear()-p.getFullYear()))===0&&(I=M(d.getMonth()-p.getMonth()))===0&&(I=M(d.getDate()-p.getDate())),I}function x(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function H(d){var p=ma(new Date(d.tm_year+1900,0,1),d.tm_yday),M=new Date(p.getFullYear(),0,4),I=new Date(p.getFullYear()+1,0,4),lt=x(M),kt=x(I);return T(lt,p)<=0?T(kt,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var A={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>h[d.tm_mon].substring(0,3),"%B":d=>h[d.tm_mon],"%C":d=>{var p=d.tm_year+1900;return v(p/100|0,2)},"%d":d=>v(d.tm_mday,2),"%e":d=>y(d.tm_mday,2," "),"%g":d=>H(d).toString().substring(2),"%G":d=>H(d),"%H":d=>v(d.tm_hour,2),"%I":d=>{var p=d.tm_hour;return p==0?p=12:p>12&&(p-=12),v(p,2)},"%j":d=>v(d.tm_mday+pa(Ht(d.tm_year+1900)?Qe:Ze,d.tm_mon-1),3),"%m":d=>v(d.tm_mon+1,2),"%M":d=>v(d.tm_min,2),"%n":()=>` | ||
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>v(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var p=d.tm_yday+7-d.tm_wday;return v(Math.floor(p/7),2)},"%V":d=>{var p=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&p++,p){if(p==53){var M=(d.tm_wday+371-d.tm_yday)%7;M!=4&&(M!=3||!Ht(d.tm_year))&&(p=1)}}else{p=52;var I=(d.tm_wday+7-d.tm_yday-1)%7;(I==4||I==5&&Ht(d.tm_year%400-1))&&p++}return v(p,2)},"%w":d=>d.tm_wday,"%W":d=>{var p=d.tm_yday+7-(d.tm_wday+6)%7;return v(Math.floor(p/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var p=d.tm_gmtoff,M=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(M?"+":"-")+("0000"+p).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};i=i.replace(/%%/g,"\0\0");for(var l in A)i.includes(l)&&(i=i.replace(new RegExp(l,"g"),A[l](o)));i=i.replace(/\0\0/g,"%");var W=ya(i,!1);return W.length>e?0:(va(W,t),W.length-1)},wa=(t,e,r,n,a)=>ga(t,e,r,n);xe=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},tn(),ht=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},hn(),cn(),$n(),Be=u.UnboundTypeError=Tn(Error,"UnboundTypeError"),An(),Dn();var $a={q:Vr,u:Lr,a:Yr,h:Nr,l:Gr,I:Xr,P:qr,n:Jr,ba:Qr,d:zr,oa:Zr,Y:Kr,fa:rn,na:Pn,ma:En,D:xn,ea:On,W:Mn,J:jn,w:Rn,s:Hn,V:Bn,L:Gn,Q:Xn,pa:qn,ga:Jn,U:Le,la:Kn,R:ta,ia:ra,ka:na,K:aa,da:oa,ca:ua,$:fa,aa:da,H:ka,T:Xa,B:Ua,p:Ra,b:ba,C:Wa,ha:La,c:Ea,j:Aa,i:Ta,x:Ba,O:Ha,v:ja,G:Ya,N:Na,A:Va,F:qa,Z:Qa,X:Za,k:xa,f:Pa,e:_a,g:Ca,M:Ga,m:Ma,o:Sa,S:Da,t:Fa,ja:Ia,y:za,r:Oa,E:Ja,z:ha,_:wa},D=Ur(),nt=u._free=t=>(nt=u._free=D.sa)(t),ee=u._malloc=t=>(ee=u._malloc=D.ta)(t),Ke=t=>(Ke=D.va)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=D.wa)();var b=(t,e)=>(b=D.xa)(t,e),_t=t=>(_t=D.ya)(t),C=()=>(C=D.za)(),_=t=>(_=D.Aa)(t),tr=t=>(tr=D.Ba)(t),er=t=>(er=D.Ca)(t),rr=(t,e,r)=>(rr=D.Da)(t,e,r),nr=t=>(nr=D.Ea)(t);u.dynCall_viijii=(t,e,r,n,a,o,i)=>(u.dynCall_viijii=D.Fa)(t,e,r,n,a,o,i);var ar=u.dynCall_jiii=(t,e,r,n)=>(ar=u.dynCall_jiii=D.Ga)(t,e,r,n),or=u.dynCall_jiiii=(t,e,r,n,a)=>(or=u.dynCall_jiiii=D.Ha)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,i)=>(u.dynCall_iiiiij=D.Ia)(t,e,r,n,a,o,i),u.dynCall_iiiiijj=(t,e,r,n,a,o,i,s,l)=>(u.dynCall_iiiiijj=D.Ja)(t,e,r,n,a,o,i,s,l),u.dynCall_iiiiiijj=(t,e,r,n,a,o,i,s,l,f)=>(u.dynCall_iiiiiijj=D.Ka)(t,e,r,n,a,o,i,s,l,f);function ba(t,e){var r=C();try{return E(t)(e)}catch(n){if(_(r),n!==n+0)throw n;b(1,0)}}function Ca(t,e,r,n){var a=C();try{E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function _a(t,e,r){var n=C();try{E(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function Ta(t,e,r,n,a){var o=C();try{return E(t)(e,r,n,a)}catch(i){if(_(o),i!==i+0)throw i;b(1,0)}}function Pa(t,e){var r=C();try{E(t)(e)}catch(n){if(_(r),n!==n+0)throw n;b(1,0)}}function Ea(t,e,r){var n=C();try{return E(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function xa(t){var e=C();try{E(t)()}catch(r){if(_(e),r!==r+0)throw r;b(1,0)}}function Aa(t,e,r,n){var a=C();try{return E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Sa(t,e,r,n,a,o){var i=C();try{E(t)(e,r,n,a,o)}catch(s){if(_(i),s!==s+0)throw s;b(1,0)}}function Da(t,e,r,n,a,o,i){var s=C();try{E(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Oa(t,e,r,n,a,o,i,s,l,f,h){var y=C();try{E(t)(e,r,n,a,o,i,s,l,f,h)}catch(v){if(_(y),v!==v+0)throw v;b(1,0)}}function Fa(t,e,r,n,a,o,i,s){var l=C();try{E(t)(e,r,n,a,o,i,s)}catch(f){if(_(l),f!==f+0)throw f;b(1,0)}}function Ma(t,e,r,n,a){var o=C();try{E(t)(e,r,n,a)}catch(i){if(_(o),i!==i+0)throw i;b(1,0)}}function ja(t,e,r,n,a,o,i){var s=C();try{return E(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Ia(t,e,r,n,a,o,i,s,l){var f=C();try{E(t)(e,r,n,a,o,i,s,l)}catch(h){if(_(f),h!==h+0)throw h;b(1,0)}}function Ra(t){var e=C();try{return E(t)()}catch(r){if(_(e),r!==r+0)throw r;b(1,0)}}function Ha(t,e,r,n,a,o,i){var s=C();try{return E(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Wa(t,e,r,n){var a=C();try{return E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function ka(t,e,r,n){var a=C();try{return E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Ba(t,e,r,n,a,o){var i=C();try{return E(t)(e,r,n,a,o)}catch(s){if(_(i),s!==s+0)throw s;b(1,0)}}function Ua(t,e,r,n,a,o){var i=C();try{return E(t)(e,r,n,a,o)}catch(s){if(_(i),s!==s+0)throw s;b(1,0)}}function Va(t,e,r,n,a,o,i,s,l,f){var h=C();try{return E(t)(e,r,n,a,o,i,s,l,f)}catch(y){if(_(h),y!==y+0)throw y;b(1,0)}}function La(t,e,r){var n=C();try{return E(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function za(t,e,r,n,a,o,i,s,l,f){var h=C();try{E(t)(e,r,n,a,o,i,s,l,f)}catch(y){if(_(h),y!==y+0)throw y;b(1,0)}}function Ya(t,e,r,n,a,o,i,s){var l=C();try{return E(t)(e,r,n,a,o,i,s)}catch(f){if(_(l),f!==f+0)throw f;b(1,0)}}function Na(t,e,r,n,a,o,i,s,l){var f=C();try{return E(t)(e,r,n,a,o,i,s,l)}catch(h){if(_(f),h!==h+0)throw h;b(1,0)}}function Ga(t,e,r,n,a,o,i){var s=C();try{E(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Xa(t,e,r,n){var a=C();try{return E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function qa(t,e,r,n,a,o,i,s,l,f,h,y){var v=C();try{return E(t)(e,r,n,a,o,i,s,l,f,h,y)}catch(T){if(_(v),T!==T+0)throw T;b(1,0)}}function Ja(t,e,r,n,a,o,i,s,l,f,h,y,v,T,x,H){var A=C();try{E(t)(e,r,n,a,o,i,s,l,f,h,y,v,T,x,H)}catch(W){if(_(A),W!==W+0)throw W;b(1,0)}}function Qa(t,e,r,n){var a=C();try{return ar(t,e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Za(t,e,r,n,a){var o=C();try{return or(t,e,r,n,a)}catch(i){if(_(o),i!==i+0)throw i;b(1,0)}}var Wt;vt=function t(){Wt||ir(),Wt||(vt=t)};function ir(){if(it>0||(Dr(),it>0))return;function t(){Wt||(Wt=!0,u.calledRun=!0,!mt&&(Or(),g(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Fr()))}u.setStatus?(u.setStatus("Running..."),setTimeout(function(){setTimeout(function(){u.setStatus("")},1),t()},1)):t()}if(u.preInit)for(typeof u.preInit=="function"&&(u.preInit=[u.preInit]);u.preInit.length>0;)u.preInit.pop()();return ir(),m.ready}})();function Pr(c){return Bt(Ut,c)}async function Er(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k){return _r(c,{tryHarder:m,formats:u,maxSymbols:g},Ut)}async function xr(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k){return Tr(c,{tryHarder:m,formats:u,maxSymbols:g},Ut)}const Vt=new Map([["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["data_matrix","DataMatrix"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["pdf417","PDF417"],["qr_code","QRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"]]);function Ar(c){for(const[m,u]of Vt)if(c===u)return m;return"unknown"}class Sr extends EventTarget{constructor(u={}){var g;super();ur(this,ft,void 0);try{const $=(g=u==null?void 0:u.formats)==null?void 0:g.filter(w=>w!=="unknown");if(($==null?void 0:$.length)===0)throw new TypeError("Hint option provided, but is empty.");$==null||$.forEach(w=>{if(!L.includes(w))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${w}' is not a valid enum value of type BarcodeFormat.`)}),cr(this,ft,$??[]),Pr().then(w=>{this.dispatchEvent(new CustomEvent("load",{detail:w}))}).catch(w=>{this.dispatchEvent(new CustomEvent("error",{detail:w}))})}catch($){throw fe($,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return L.filter(u=>u!=="unknown")}async detect(u){try{const g=await pr(u);if(g===null)return[];let $;try{ce(g)?$=await Er(g,{tryHarder:!0,formats:re(this,ft).map(w=>Vt.get(w))}):$=await xr(g,{tryHarder:!0,formats:re(this,ft).map(w=>Vt.get(w))})}catch(w){throw console.error(w),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return $.map(w=>{const{topLeft:{x:O,y:G},topRight:{x:j,y:F},bottomLeft:{x:Y,y:N},bottomRight:{x:z,y:X}}=w.position,K=Math.min(O,j,Y,z),mt=Math.min(G,F,N,X),J=Math.max(O,j,Y,z),B=Math.max(G,F,N,X);return{boundingBox:new DOMRectReadOnly(K,mt,J-K,B-mt),rawValue:new TextDecoder().decode(w.bytes),format:Ar(w.format),cornerPoints:[{x:O,y:G},{x:j,y:F},{x:z,y:X},{x:Y,y:N}]}})}catch(g){throw fe(g,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ft=new WeakMap,R.BarcodeDetector=Sr,R.setZXingModuleOverrides=Cr,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),R}({}); |
@@ -1,3 +0,3 @@ | ||
var nr=(W,U,z)=>{if(!U.has(W))throw TypeError("Cannot "+z)};var ar=(W,U,z)=>(nr(W,U,"read from private field"),z?z.call(W):U.get(W)),or=(W,U,z)=>{if(U.has(W))throw TypeError("Cannot add the same private member more than once");U instanceof WeakSet?U.add(W):U.set(W,z)},ir=(W,U,z,yt)=>(nr(W,U,"write to private field"),yt?yt.call(W,z):U.set(W,z),z);var BarcodeDetectionAPI=function(W){var mt;"use strict";const U=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function z(c){if(yt(c))return{width:c.naturalWidth,height:c.naturalHeight};if(Kt(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(te(c))return{width:c.videoWidth,height:c.videoHeight};if(re(c))return{width:c.width,height:c.height};if(ae(c))return{width:c.displayWidth,height:c.displayHeight};if(ee(c))return{width:c.width,height:c.height};if(ne(c))return{width:c.width,height:c.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function yt(c){try{return c instanceof HTMLImageElement}catch{return!1}}function Kt(c){try{return c instanceof SVGImageElement}catch{return!1}}function te(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function ee(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function re(c){try{return c instanceof ImageBitmap}catch{return!1}}function ne(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function ae(c){try{return c instanceof VideoFrame}catch{return!1}}function sr(c){try{return c instanceof Blob}catch{return!1}}function ur(c){try{return c instanceof ImageData}catch{return!1}}function cr(c,m){try{const u=new OffscreenCanvas(c,m);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=m,u}}async function oe(c){if(yt(c)&&!await hr(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Kt(c)&&!await pr(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(ae(c)&&yr(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(te(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(re(c)&&vr(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:m,height:u}=z(c);if(m===0||u===0)return null;const w=cr(m,u).getContext("2d");w.drawImage(c,0,0);try{return w.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function lr(c){let m;try{if(createImageBitmap)m=await createImageBitmap(c);else{m=new Image;let g="";try{g=URL.createObjectURL(c),m.src=g,await m.decode()}finally{URL.revokeObjectURL(g)}}}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await oe(m)}function dr(c){const{width:m,height:u}=c;if(m===0||u===0)return null;const g=c.getContext("2d");try{return g.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function fr(c){if(sr(c))return await lr(c);if(ur(c)){if(mr(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return ee(c)||ne(c)?dr(c):await oe(c)}async function hr(c){try{return await c.decode(),!0}catch{return!1}}async function pr(c){var m;try{return await((m=c.decode)==null?void 0:m.call(c)),!0}catch{return!1}}function yr(c){return c.format===null}function mr(c){return c.data.buffer.byteLength===0}function vr(c){return c.width===0&&c.height===0}function ie(c,m){return c instanceof DOMException?new DOMException(`${m}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${m}: ${c.message}`):new Error(`${m}: ${c}`)}const se=c=>{let m;const u=new Set,g=(M,X)=>{const V=typeof M=="function"?M(m):M;if(!Object.is(V,m)){const j=m;m=X??typeof V!="object"?V:Object.assign({},m,V),u.forEach(q=>q(m,j))}},w=()=>m,E={setState:g,getState:w,subscribe:M=>(u.add(M),()=>u.delete(M)),destroy:()=>{u.clear()}};return m=c(g,w,E),E},gr=c=>c?se(c):se,wr={locateFile:(c,m)=>{var u;const g=(u=c.match(/_(.+?)\.wasm$/))==null?void 0:u[1];return g?`https://cdn.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.4/dist/${g}/${c}`:m+c}},ft=gr()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:wr}));function $r(c){ft.setState({zxingModuleOverrides:c})}function ue(c,m=ft.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=ft.getState(),g=u.get(c);if(g&&Object.is(m,ft.getState().zxingModuleOverrides))return g;{ft.setState({zxingModuleOverrides:m});const w=c(m);return u.set(c,w),w}}const ce=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","UPC-A","UPC-E"],at={tryHarder:!0,formats:[],maxSymbols:255};async function br(c,{tryHarder:m=at.tryHarder,formats:u=at.formats,maxSymbols:g=at.maxSymbols}=at,w){const E=await ue(w,ft.getState().zxingModuleOverrides),{data:M,width:X,height:V,data:{byteLength:j}}=c,q=E._malloc(j);E.HEAP8.set(M,q);const Q=E.readBarcodesFromPixmap(q,X,V,m,Cr(u),g);E._free(q);const Y=[];for(let L=0;L<Q.size();++L){const J=Q.get(L);Y.push({...J,format:_r(J.format)})}return Y}function Cr(c){return c.join("|")}function _r(c){const m=le(c);let u=0,g=ce.length-1;for(;u<=g;){const w=Math.floor((u+g)/2),E=ce[w],M=le(E);if(M===m)return E;M<m?u=w+1:g=w-1}return"None"}function le(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var de=(()=>{var c=document.currentScript&&document.currentScript.src||new URL("side-effects.js",document.baseURI).href;return function(m={}){var u=m,g,w;u.ready=new Promise((t,e)=>{g=t,w=e});var E=Object.assign({},u),M="./this.program",X=typeof window=="object",V=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var j="";function q(t){return u.locateFile?u.locateFile(t,j):j+t}var Q;(X||V)&&(V?j=self.location.href:typeof document<"u"&&document.currentScript&&(j=document.currentScript.src),c&&(j=c),j.indexOf("blob:")!==0?j=j.substr(0,j.replace(/[?#].*/,"").lastIndexOf("/")+1):j="",V&&(Q=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),u.print||console.log.bind(console);var Y=u.printErr||console.error.bind(console);Object.assign(u,E),E=null,u.arguments&&u.arguments,u.thisProgram&&(M=u.thisProgram),u.quit&&u.quit;var L;u.wasmBinary&&(L=u.wasmBinary),u.noExitRuntime,typeof WebAssembly!="object"&&Dt("no native wasm support detected");var J,vt=!1,N,H,gt,Et,k,x,he,pe;function ye(){var t=J.buffer;u.HEAP8=N=new Int8Array(t),u.HEAP16=gt=new Int16Array(t),u.HEAPU8=H=new Uint8Array(t),u.HEAPU16=Et=new Uint16Array(t),u.HEAP32=k=new Int32Array(t),u.HEAPU32=x=new Uint32Array(t),u.HEAPF32=he=new Float32Array(t),u.HEAPF64=pe=new Float64Array(t)}var me,ve=[],ge=[],we=[];function Ar(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Or(u.preRun.shift());Bt(ve)}function xr(){Bt(ge)}function Sr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Mr(u.postRun.shift());Bt(we)}function Or(t){ve.unshift(t)}function Fr(t){ge.unshift(t)}function Mr(t){we.unshift(t)}var st=0,wt=null;function jr(t){st++,u.monitorRunDependencies&&u.monitorRunDependencies(st)}function Rr(t){if(st--,u.monitorRunDependencies&&u.monitorRunDependencies(st),st==0&&wt){var e=wt;wt=null,e()}}function Dt(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",Y(t),vt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw w(e),e}var Ir="data:application/octet-stream;base64,";function $e(t){return t.startsWith(Ir)}var ut;u.locateFile?(ut="zxing_reader.wasm",$e(ut)||(ut=q(ut))):ut=new URL("/reader/zxing_reader.wasm",self.location).href;function be(t){if(t==ut&&L)return new Uint8Array(L);if(Q)return Q(t);throw"both async and sync fetching of the wasm failed"}function Wr(t){return!L&&(X||V)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>be(t)):Promise.resolve().then(()=>be(t))}function Ce(t,e,r){return Wr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{Y(`failed to asynchronously prepare wasm: ${n}`),Dt(n)})}function Hr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!$e(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(i){return Y(`wasm streaming compile failed: ${i}`),Y("falling back to ArrayBuffer instantiation"),Ce(e,r,n)})}):Ce(e,r,n)}function kr(){var t={a:Ea};function e(n,a){var o=n.exports;return S=o,J=S.qa,ye(),me=S.ua,Fr(S.ra),Rr(),o}jr();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){Y(`Module.instantiateWasm callback failed with error: ${n}`),w(n)}return Hr(L,ut,t,r).catch(w),{}}var Bt=t=>{for(;t.length>0;)t.shift()(u)},At=[],xt=0,Br=t=>{var e=new St(t);return e.get_caught()||(e.set_caught(!0),xt--),e.set_rethrown(!1),At.push(e),Qe(e.excPtr),e.get_exception_ptr()},K=0,Ur=()=>{$(0,0);var t=At.pop();Ze(t.excPtr),K=0};function St(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){x[this.ptr+4>>2]=e},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(e){x[this.ptr+8>>2]=e},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,N[this.ptr+12>>0]=e},this.get_caught=function(){return N[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,N[this.ptr+13>>0]=e},this.get_rethrown=function(){return N[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){x[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=Ke(this.get_type());if(e)return x[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var Vr=t=>{throw K||(K=t),K},Ut=t=>{var e=K;if(!e)return Pt(0),0;var r=new St(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return Pt(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var i=r.ptr+16;if(Je(o,n,i))return Pt(o),e}return Pt(n),e},Lr=()=>Ut([]),zr=t=>Ut([t]),Yr=(t,e)=>Ut([t,e]),Nr=t=>{var e=new St(t).get_exception_ptr();return e},Gr=()=>{var t=At.pop();t||Dt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(At.push(t),t.set_rethrown(!0),t.set_caught(!1),xt++),K=e,K},Xr=(t,e,r)=>{var n=new St(t);throw n.init(e,r),K=t,xt++,K},qr=()=>xt,Ot={},_e=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Vt(t){return this.fromWireType(k[t>>2])}var ht={},ct={},Ft={},Te=void 0,Mt=t=>{throw new Te(t)},lt=(t,e,r)=>{t.forEach(function(s){Ft[s]=e});function n(s){var l=r(s);l.length!==t.length&&Mt("Mismatched type converter count");for(var d=0;d<t.length;++d)tt(t[d],l[d])}var a=new Array(e.length),o=[],i=0;e.forEach((s,l)=>{ct.hasOwnProperty(s)?a[l]=ct[s]:(o.push(s),ht.hasOwnProperty(s)||(ht[s]=[]),ht[s].push(()=>{a[l]=ct[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)},Zr=t=>{var e=Ot[t];delete Ot[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(i=>i.getterReturnType).concat(a.map(i=>i.setterArgumentType));lt([t],o,i=>{var s={};return a.forEach((l,d)=>{var h=l.fieldName,y=i[d],v=l.getter,_=l.getterContext,D=i[d+a.length],R=l.setter,A=l.setterContext;s[h]={read:I=>y.fromWireType(v(_,I)),write:(I,f)=>{var p=[];R(A,I,D.toWireType(p,f)),_e(p)}}}),[{name:e.name,fromWireType:l=>{var d={};for(var h in s)d[h]=s[h].read(l);return n(l),d},toWireType:(l,d)=>{for(var h in s)if(!(h in d))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in s)s[h].write(y,d[h]);return l!==null&&l.push(n,y),y},argPackAdvance:et,readValueFromPointer:Vt,destructorFunction:n}]})},Qr=(t,e,r,n,a)=>{},Jr=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Pe=t},Pe=void 0,B=t=>{for(var e="",r=t;H[r];)e+=Pe[H[r++]];return e},pt=void 0,T=t=>{throw new pt(t)};function Kr(t,e,r={}){var n=e.name;if(t||T(`type "${n}" must have a positive integer typeid pointer`),ct.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;T(`Cannot register type '${n}' twice`)}if(ct[t]=e,delete Ft[t],ht.hasOwnProperty(t)){var a=ht[t];delete ht[t],a.forEach(o=>o())}}function tt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Kr(t,e,r)}var et=8,tn=(t,e,r,n)=>{e=B(e),tt(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:et,readValueFromPointer:function(a){return this.fromWireType(H[a])},destructorFunction:null})};function en(t){if(!(this instanceof ot)||!(t instanceof ot))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a}var rn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Lt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}T(e(t)+" instance already deleted")},zt=!1,Ee=t=>{},nn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},De=t=>{t.count.value-=1;var e=t.count.value===0;e&&nn(t)},Ae=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Ae(t,e,r.baseClass);return n===null?null:r.downcast(n)},xe={},an=()=>Object.keys(Ct).length,on=()=>{var t=[];for(var e in Ct)Ct.hasOwnProperty(e)&&t.push(Ct[e]);return t},$t=[],Yt=()=>{for(;$t.length;){var t=$t.pop();t.$$.deleteScheduled=!1,t.delete()}},bt=void 0,sn=t=>{bt=t,$t.length&&bt&&bt(Yt)},un=()=>{u.getInheritedInstanceCount=an,u.getLiveInheritedInstances=on,u.flushPendingDeletes=Yt,u.setDelayFunction=sn},Ct={},cn=(t,e)=>{for(e===void 0&&T("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},ln=(t,e)=>(e=cn(t,e),Ct[e]),jt=(t,e)=>{(!e.ptrType||!e.ptr)&&Mt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Mt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},_t(Object.create(t,{$$:{value:e}}))};function dn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=ln(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=xe[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var l=Ae(e,this.registeredClass,s.registeredClass);return l===null?a.call(this):this.isSmartPointer?jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:t}):jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var _t=t=>typeof FinalizationRegistry>"u"?(_t=e=>e,t):(zt=new FinalizationRegistry(e=>{De(e.$$)}),_t=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};zt.register(e,a,e)}return e},Ee=e=>zt.unregister(e),_t(t));function fn(){if(this.$$.ptr||Lt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=_t(Object.create(Object.getPrototypeOf(this),{$$:{value:rn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function hn(){this.$$.ptr||Lt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&T("Object already scheduled for deletion"),Ee(this),De(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function pn(){return!this.$$.ptr}function yn(){return this.$$.ptr||Lt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&T("Object already scheduled for deletion"),$t.push(this),$t.length===1&&bt&&bt(Yt),this.$$.deleteScheduled=!0,this}var mn=()=>{ot.prototype.isAliasOf=en,ot.prototype.clone=fn,ot.prototype.delete=hn,ot.prototype.isDeleted=pn,ot.prototype.deleteLater=yn};function ot(){}var vn=48,gn=57,Se=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=vn&&e<=gn?`_${t}`:t};function Oe(t,e){return t=Se(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var Fe=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||T(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},Me=(t,e,r)=>{u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&T(`Cannot register public name '${t}' twice`),Fe(u,t,t),u.hasOwnProperty(r)&&T(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),u[t].overloadTable[r]=e):(u[t]=e,r!==void 0&&(u[t].numArguments=r))};function wn(t,e,r,n,a,o,i,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var Nt=(t,e,r)=>{for(;e!==r;)e.upcast||T(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function $n(t,e){if(e===null)return this.isReference&&T(`null is not a valid ${this.name}`),0;e.$$||T(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||T(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function bn(t,e){var r;if(e===null)return this.isReference&&T(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||T(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||T(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&T(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=Nt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&T("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:T(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,it.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:T("Unsupporting sharing policy")}return r}function Cn(t,e){if(e===null)return this.isReference&&T(`null is not a valid ${this.name}`),0;e.$$||T(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||T(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&T(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function je(t){return this.fromWireType(x[t>>2])}function _n(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Tn(t){this.rawDestructor&&this.rawDestructor(t)}var Pn=t=>{t!==null&&t.delete()},En=()=>{rt.prototype.getPointee=_n,rt.prototype.destructor=Tn,rt.prototype.argPackAdvance=et,rt.prototype.readValueFromPointer=je,rt.prototype.deleteObject=Pn,rt.prototype.fromWireType=dn};function rt(t,e,r,n,a,o,i,s,l,d,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=$n,this.destructorFunction=null):(this.toWireType=Cn,this.destructorFunction=null):this.toWireType=bn}var Re=(t,e,r)=>{u.hasOwnProperty(t)||Mt("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)},Dn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Rt=[],P=t=>{var e=Rt[t];return e||(t>=Rt.length&&(Rt.length=t+1),Rt[t]=e=me.get(t)),e},An=(t,e,r)=>{if(t.includes("j"))return Dn(t,e,r);var n=P(e).apply(null,r);return n},xn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),An(t,e,r)}},Z=(t,e)=>{t=B(t);function r(){return t.includes("j")?xn(t,e):P(e)}var n=r();return typeof n!="function"&&T(`unknown function pointer with signature ${t}: ${e}`),n},Sn=(t,e)=>{var r=Oe(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` | ||
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Ie=void 0,We=t=>{var e=qe(t),r=B(e);return nt(e),r},It=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!ct[o]){if(Ft[o]){Ft[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Ie(`${t}: `+r.map(We).join([", "]))},On=(t,e,r,n,a,o,i,s,l,d,h,y,v)=>{h=B(h),o=Z(a,o),s&&(s=Z(i,s)),d&&(d=Z(l,d)),v=Z(y,v);var _=Se(h);Me(_,function(){It(`Cannot construct ${h} due to unbound types`,[n])}),lt([t,e,r],n?[n]:[],function(D){D=D[0];var R,A;n?(R=D.registeredClass,A=R.instancePrototype):A=ot.prototype;var I=Oe(_,function(){if(Object.getPrototypeOf(this)!==f)throw new pt("Use 'new' to construct "+h);if(p.constructor_body===void 0)throw new pt(h+" has no accessible constructor");var kt=p.constructor_body[arguments.length];if(kt===void 0)throw new pt(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(p.constructor_body).toString()}) parameters instead!`);return kt.apply(this,arguments)}),f=Object.create(A,{constructor:{value:I}});I.prototype=f;var p=new wn(h,I,f,v,R,o,s,d);p.baseClass&&(p.baseClass.__derivedClasses===void 0&&(p.baseClass.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var O=new rt(h,p,!0,!1,!1),F=new rt(h+"*",p,!1,!1,!1),dt=new rt(h+" const*",p,!1,!0,!1);return xe[t]={pointerType:F,constPointerType:dt},Re(_,I),[O,F,dt]})},Gt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(x[e+n*4>>2]);return r};function Xt(t,e,r,n,a,o){var i=e.length;i<2&&T("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=e[1]!==null&&r!==null,l=!1,d=1;d<e.length;++d)if(e[d]!==null&&e[d].destructorFunction===void 0){l=!0;break}var h=e[0].name!=="void",y=i-2,v=new Array(y),_=[],D=[];return function(){arguments.length!==y&&T(`function ${t} called with ${arguments.length} arguments, expected ${y}`),D.length=0;var R;_.length=s?2:1,_[0]=a,s&&(R=e[1].toWireType(D,this),_[1]=R);for(var A=0;A<y;++A)v[A]=e[A+2].toWireType(D,arguments[A]),_.push(v[A]);var I=n.apply(null,_);function f(p){if(l)_e(D);else for(var O=s?1:2;O<e.length;O++){var F=O===1?R:v[O-2];e[O].destructorFunction!==null&&e[O].destructorFunction(F)}if(h)return e[0].fromWireType(p)}return f(I)}}var Fn=(t,e,r,n,a,o)=>{var i=Gt(e,r);a=Z(n,a),lt([],[t],function(s){s=s[0];var l=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[e-1]!==void 0)throw new pt(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return s.registeredClass.constructor_body[e-1]=()=>{It(`Cannot construct ${s.name} due to unbound types`,i)},lt([],i,d=>(d.splice(1,0,null),s.registeredClass.constructor_body[e-1]=Xt(l,d,null,a,o),[])),[]})},Mn=(t,e,r,n,a,o,i,s,l)=>{var d=Gt(r,n);e=B(e),o=Z(a,o),lt([],[t],function(h){h=h[0];var y=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&h.registeredClass.pureVirtualFunctions.push(e);function v(){It(`Cannot call ${y} due to unbound types`,d)}var _=h.registeredClass.instancePrototype,D=_[e];return D===void 0||D.overloadTable===void 0&&D.className!==h.name&&D.argCount===r-2?(v.argCount=r-2,v.className=h.name,_[e]=v):(Fe(_,e,y),_[e].overloadTable[r-2]=v),lt([],d,function(R){var A=Xt(y,R,h,o,i);return _[e].overloadTable===void 0?(A.argCount=r-2,_[e]=A):_[e].overloadTable[r-2]=A,[]}),[]})};function jn(){Object.assign(He.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function He(){this.allocated=[void 0],this.freelist=[]}var G=new He,ke=t=>{t>=G.reserved&&--G.get(t).refcount===0&&G.free(t)},Rn=()=>{for(var t=0,e=G.reserved;e<G.allocated.length;++e)G.allocated[e]!==void 0&&++t;return t},In=()=>{G.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),G.reserved=G.allocated.length,u.count_emval_handles=Rn},it={toValue:t=>(t||T("Cannot use deleted val. handle = "+t),G.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return G.allocate({refcount:1,value:t})}}},Wn=(t,e)=>{e=B(e),tt(t,{name:e,fromWireType:r=>{var n=it.toValue(r);return ke(r),n},toWireType:(r,n)=>it.toHandle(n),argPackAdvance:et,readValueFromPointer:Vt,destructorFunction:null})},qt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},Hn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(he[r>>2])};case 8:return function(r){return this.fromWireType(pe[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},kn=(t,e,r)=>{e=B(e),tt(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:et,readValueFromPointer:Hn(e,r),destructorFunction:null})},Bn=(t,e,r,n,a,o,i)=>{var s=Gt(e,r);t=B(t),a=Z(n,a),Me(t,function(){It(`Cannot call ${t} due to unbound types`,s)},e-1),lt([],s,function(l){var d=[l[0],null].concat(l.slice(1));return Re(t,Xt(t,d,null,a,o),e-1),[]})},Un=(t,e,r)=>{switch(e){case 1:return r?n=>N[n>>0]:n=>H[n>>0];case 2:return r?n=>gt[n>>1]:n=>Et[n>>1];case 4:return r?n=>k[n>>2]:n=>x[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Vn=(t,e,r,n,a)=>{e=B(e);var o=h=>h;if(n===0){var i=32-8*r;o=h=>h<<i>>>i}var s=e.includes("unsigned"),l=(h,y)=>{},d;s?d=function(h,y){return l(y,this.name),y>>>0}:d=function(h,y){return l(y,this.name),y},tt(t,{name:e,fromWireType:o,toWireType:d,argPackAdvance:et,readValueFromPointer:Un(e,r,n!==0),destructorFunction:null})},Ln=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(i){var s=x[i>>2],l=x[i+4>>2];return new a(N.buffer,l,s)}r=B(r),tt(t,{name:r,fromWireType:o,argPackAdvance:et,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Be=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,i=0;i<t.length;++i){var s=t.charCodeAt(i);if(s>=55296&&s<=57343){var l=t.charCodeAt(++i);s=65536+((s&1023)<<10)|l&1023}if(s<=127){if(r>=o)break;e[r++]=s}else if(s<=2047){if(r+1>=o)break;e[r++]=192|s>>6,e[r++]=128|s&63}else if(s<=65535){if(r+2>=o)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|s&63}else{if(r+3>=o)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|s&63}}return e[r]=0,r-a},zn=(t,e,r)=>Be(t,H,e,r),Ue=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},Ve=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Yn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Ve)return Ve.decode(t.subarray(e,a));for(var o="";e<a;){var i=t[e++];if(!(i&128)){o+=String.fromCharCode(i);continue}var s=t[e++]&63;if((i&224)==192){o+=String.fromCharCode((i&31)<<6|s);continue}var l=t[e++]&63;if((i&240)==224?i=(i&15)<<12|s<<6|l:i=(i&7)<<18|s<<12|l<<6|t[e++]&63,i<65536)o+=String.fromCharCode(i);else{var d=i-65536;o+=String.fromCharCode(55296|d>>10,56320|d&1023)}}return o},Zt=(t,e)=>t?Yn(H,t,e):"",Nn=(t,e)=>{e=B(e);var r=e==="std::string";tt(t,{name:e,fromWireType:n=>{var a=x[n>>2],o=n+4,i;if(r)for(var s=o,l=0;l<=a;++l){var d=o+l;if(l==a||H[d]==0){var h=d-s,y=Zt(s,h);i===void 0?i=y:(i+=String.fromCharCode(0),i+=y),s=d+1}}else{for(var v=new Array(a),l=0;l<a;++l)v[l]=String.fromCharCode(H[o+l]);i=v.join("")}return nt(n),i},toWireType:(n,a)=>{a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,i=typeof a=="string";i||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||T("Cannot pass non-string to std::string"),r&&i?o=Ue(a):o=a.length;var s=Jt(4+o+1),l=s+4;if(x[s>>2]=o,r&&i)zn(a,l,o+1);else if(i)for(var d=0;d<o;++d){var h=a.charCodeAt(d);h>255&&(nt(l),T("String has UTF-16 code units that do not fit in 8 bits")),H[l+d]=h}else for(var d=0;d<o;++d)H[l+d]=a[d];return n!==null&&n.push(nt,s),s},argPackAdvance:et,readValueFromPointer:je,destructorFunction:n=>nt(n)})},Le=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Gn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Et[n];)++n;if(r=n<<1,r-t>32&&Le)return Le.decode(H.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=gt[t+i*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Xn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var n=e,a=r<t.length*2?r/2:t.length,o=0;o<a;++o){var i=t.charCodeAt(o);gt[e>>1]=i,e+=2}return gt[e>>1]=0,e-n},qn=t=>t.length*2,Zn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=k[t+r*4>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},Qn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,o=0;o<t.length;++o){var i=t.charCodeAt(o);if(i>=55296&&i<=57343){var s=t.charCodeAt(++o);i=65536+((i&1023)<<10)|s&1023}if(k[e>>2]=i,e+=4,e+4>a)break}return k[e>>2]=0,e-n},Jn=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},Kn=(t,e,r)=>{r=B(r);var n,a,o,i,s;e===2?(n=Gn,a=Xn,i=qn,o=()=>Et,s=1):e===4&&(n=Zn,a=Qn,i=Jn,o=()=>x,s=2),tt(t,{name:r,fromWireType:l=>{for(var d=x[l>>2],h=o(),y,v=l+4,_=0;_<=d;++_){var D=l+4+_*e;if(_==d||h[D>>s]==0){var R=D-v,A=n(v,R);y===void 0?y=A:(y+=String.fromCharCode(0),y+=A),v=D+e}}return nt(l),y},toWireType:(l,d)=>{typeof d!="string"&&T(`Cannot pass non-string to C++ string type ${r}`);var h=i(d),y=Jt(4+h+e);return x[y>>2]=h>>s,a(d,y+4,h+e),l!==null&&l.push(nt,y),y},argPackAdvance:et,readValueFromPointer:Vt,destructorFunction:l=>nt(l)})},ta=(t,e,r,n,a,o)=>{Ot[t]={name:B(e),rawConstructor:Z(r,n),rawDestructor:Z(a,o),fields:[]}},ea=(t,e,r,n,a,o,i,s,l,d)=>{Ot[t].fields.push({fieldName:B(e),getterReturnType:r,getter:Z(n,a),getterContext:o,setterArgumentType:i,setter:Z(s,l),setterContext:d})},ra=(t,e)=>{e=B(e),tt(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},na={},aa=t=>{var e=na[t];return e===void 0?B(t):e},ze=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},oa=t=>t===0?it.toHandle(ze()):(t=aa(t),it.toHandle(ze()[t])),ia=t=>{t>4&&(G.get(t).refcount+=1)},Ye=(t,e)=>{var r=ct[t];return r===void 0&&T(e+" has unknown type "+We(t)),r},sa=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var i=Ye(x[n+o*4>>2],"parameter "+o);e[o+1]=i.readValueFromPointer(a),a+=i.argPackAdvance}var s=new(r.bind.apply(r,e));return it.toHandle(s)}},Ne={},ua=(t,e,r,n)=>{t=it.toValue(t);var a=Ne[e];return a||(a=sa(e),Ne[e]=a),a(t,r,n)},ca=(t,e)=>{t=Ye(t,"_emval_take_value");var r=t.readValueFromPointer(e);return it.toHandle(r)},la=()=>{Dt("")},da=(t,e,r)=>H.copyWithin(t,e,e+r),fa=()=>2147483648,ha=t=>{var e=J.buffer,r=(t-e.byteLength+65535)/65536;try{return J.grow(r),ye(),1}catch{}},pa=t=>{var e=H.length;t>>>=0;var r=fa();if(t>r)return!1;for(var n=(l,d)=>l+(d-l%d)%d,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var i=Math.min(r,n(Math.max(t,o),65536)),s=ha(i);if(s)return!0}return!1},Qt={},ya=()=>M||"./this.program",Tt=()=>{if(!Tt.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:ya()};for(var r in Qt)Qt[r]===void 0?delete e[r]:e[r]=Qt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);Tt.strings=n}return Tt.strings},ma=(t,e)=>{for(var r=0;r<t.length;++r)N[e++>>0]=t.charCodeAt(r);N[e>>0]=0},va=(t,e)=>{var r=0;return Tt().forEach((n,a)=>{var o=e+r;x[t+a*4>>2]=o,ma(n,o),r+=n.length+1}),0},ga=(t,e)=>{var r=Tt();x[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),x[e>>2]=n,0},wa=t=>t,Wt=t=>t%4===0&&(t%100!==0||t%400===0),$a=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Ge=[31,29,31,30,31,30,31,31,30,31,30,31],Xe=[31,28,31,30,31,30,31,31,30,31,30,31],ba=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Wt(r.getFullYear()),a=r.getMonth(),o=(n?Ge:Xe)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function Ca(t,e,r){var n=r>0?r:Ue(t)+1,a=new Array(n),o=Be(t,a,0,a.length);return e&&(a.length=o),a}var _a=(t,e)=>{N.set(t,e)},Ta=(t,e,r,n)=>{var a=x[n+40>>2],o={tm_sec:k[n>>2],tm_min:k[n+4>>2],tm_hour:k[n+8>>2],tm_mday:k[n+12>>2],tm_mon:k[n+16>>2],tm_year:k[n+20>>2],tm_wday:k[n+24>>2],tm_yday:k[n+28>>2],tm_isdst:k[n+32>>2],tm_gmtoff:k[n+36>>2],tm_zone:a?Zt(a):""},i=Zt(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in s)i=i.replace(new RegExp(l,"g"),s[l]);var d=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(f,p,O){for(var F=typeof f=="number"?f.toString():f||"";F.length<p;)F=O[0]+F;return F}function v(f,p){return y(f,p,"0")}function _(f,p){function O(dt){return dt<0?-1:dt>0?1:0}var F;return(F=O(f.getFullYear()-p.getFullYear()))===0&&(F=O(f.getMonth()-p.getMonth()))===0&&(F=O(f.getDate()-p.getDate())),F}function D(f){switch(f.getDay()){case 0:return new Date(f.getFullYear()-1,11,29);case 1:return f;case 2:return new Date(f.getFullYear(),0,3);case 3:return new Date(f.getFullYear(),0,2);case 4:return new Date(f.getFullYear(),0,1);case 5:return new Date(f.getFullYear()-1,11,31);case 6:return new Date(f.getFullYear()-1,11,30)}}function R(f){var p=ba(new Date(f.tm_year+1900,0,1),f.tm_yday),O=new Date(p.getFullYear(),0,4),F=new Date(p.getFullYear()+1,0,4),dt=D(O),kt=D(F);return _(dt,p)<=0?_(kt,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var A={"%a":f=>d[f.tm_wday].substring(0,3),"%A":f=>d[f.tm_wday],"%b":f=>h[f.tm_mon].substring(0,3),"%B":f=>h[f.tm_mon],"%C":f=>{var p=f.tm_year+1900;return v(p/100|0,2)},"%d":f=>v(f.tm_mday,2),"%e":f=>y(f.tm_mday,2," "),"%g":f=>R(f).toString().substring(2),"%G":f=>R(f),"%H":f=>v(f.tm_hour,2),"%I":f=>{var p=f.tm_hour;return p==0?p=12:p>12&&(p-=12),v(p,2)},"%j":f=>v(f.tm_mday+$a(Wt(f.tm_year+1900)?Ge:Xe,f.tm_mon-1),3),"%m":f=>v(f.tm_mon+1,2),"%M":f=>v(f.tm_min,2),"%n":()=>` | ||
`,"%p":f=>f.tm_hour>=0&&f.tm_hour<12?"AM":"PM","%S":f=>v(f.tm_sec,2),"%t":()=>" ","%u":f=>f.tm_wday||7,"%U":f=>{var p=f.tm_yday+7-f.tm_wday;return v(Math.floor(p/7),2)},"%V":f=>{var p=Math.floor((f.tm_yday+7-(f.tm_wday+6)%7)/7);if((f.tm_wday+371-f.tm_yday-2)%7<=2&&p++,p){if(p==53){var O=(f.tm_wday+371-f.tm_yday)%7;O!=4&&(O!=3||!Wt(f.tm_year))&&(p=1)}}else{p=52;var F=(f.tm_wday+7-f.tm_yday-1)%7;(F==4||F==5&&Wt(f.tm_year%400-1))&&p++}return v(p,2)},"%w":f=>f.tm_wday,"%W":f=>{var p=f.tm_yday+7-(f.tm_wday+6)%7;return v(Math.floor(p/7),2)},"%y":f=>(f.tm_year+1900).toString().substring(2),"%Y":f=>f.tm_year+1900,"%z":f=>{var p=f.tm_gmtoff,O=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(O?"+":"-")+("0000"+p).slice(-4)},"%Z":f=>f.tm_zone,"%%":()=>"%"};i=i.replace(/%%/g,"\0\0");for(var l in A)i.includes(l)&&(i=i.replace(new RegExp(l,"g"),A[l](o)));i=i.replace(/\0\0/g,"%");var I=Ca(i,!1);return I.length>e?0:(_a(I,t),I.length-1)},Pa=(t,e,r,n,a)=>Ta(t,e,r,n);Te=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Jr(),pt=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},mn(),un(),En(),Ie=u.UnboundTypeError=Sn(Error,"UnboundTypeError"),jn(),In();var Ea={q:Br,u:Ur,a:Lr,h:zr,l:Yr,I:Nr,P:Gr,n:Xr,ba:qr,d:Vr,oa:Zr,Y:Qr,fa:tn,na:On,ma:Fn,D:Mn,ea:Wn,W:kn,J:Bn,w:Vn,s:Ln,V:Nn,L:Kn,Q:ta,pa:ea,ga:ra,U:ke,la:oa,R:ia,ia:ua,ka:ca,K:la,da,ca:pa,$:va,aa:ga,H:Ya,T:to,B:Ga,p:Va,b:Da,C:za,ha:qa,c:Fa,j:ja,i:Sa,x:Na,O:La,v:Ba,G:Qa,N:Ja,A:Xa,F:eo,Z:no,X:ao,k:Ma,f:Oa,e:xa,g:Aa,M:Ka,m:ka,o:Ra,S:Ia,t:Ha,ja:Ua,y:Za,r:Wa,E:ro,z:wa,_:Pa},S=kr(),nt=u._free=t=>(nt=u._free=S.sa)(t),Jt=u._malloc=t=>(Jt=u._malloc=S.ta)(t),qe=t=>(qe=S.va)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=S.wa)();var $=(t,e)=>($=S.xa)(t,e),Pt=t=>(Pt=S.ya)(t),b=()=>(b=S.za)(),C=t=>(C=S.Aa)(t),Ze=t=>(Ze=S.Ba)(t),Qe=t=>(Qe=S.Ca)(t),Je=(t,e,r)=>(Je=S.Da)(t,e,r),Ke=t=>(Ke=S.Ea)(t);u.dynCall_viijii=(t,e,r,n,a,o,i)=>(u.dynCall_viijii=S.Fa)(t,e,r,n,a,o,i);var tr=u.dynCall_jiii=(t,e,r,n)=>(tr=u.dynCall_jiii=S.Ga)(t,e,r,n),er=u.dynCall_jiiii=(t,e,r,n,a)=>(er=u.dynCall_jiiii=S.Ha)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,i)=>(u.dynCall_iiiiij=S.Ia)(t,e,r,n,a,o,i),u.dynCall_iiiiijj=(t,e,r,n,a,o,i,s,l)=>(u.dynCall_iiiiijj=S.Ja)(t,e,r,n,a,o,i,s,l),u.dynCall_iiiiiijj=(t,e,r,n,a,o,i,s,l,d)=>(u.dynCall_iiiiiijj=S.Ka)(t,e,r,n,a,o,i,s,l,d);function Da(t,e){var r=b();try{return P(t)(e)}catch(n){if(C(r),n!==n+0)throw n;$(1,0)}}function Aa(t,e,r,n){var a=b();try{P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function xa(t,e,r){var n=b();try{P(t)(e,r)}catch(a){if(C(n),a!==a+0)throw a;$(1,0)}}function Sa(t,e,r,n,a){var o=b();try{return P(t)(e,r,n,a)}catch(i){if(C(o),i!==i+0)throw i;$(1,0)}}function Oa(t,e){var r=b();try{P(t)(e)}catch(n){if(C(r),n!==n+0)throw n;$(1,0)}}function Fa(t,e,r){var n=b();try{return P(t)(e,r)}catch(a){if(C(n),a!==a+0)throw a;$(1,0)}}function Ma(t){var e=b();try{P(t)()}catch(r){if(C(e),r!==r+0)throw r;$(1,0)}}function ja(t,e,r,n){var a=b();try{return P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function Ra(t,e,r,n,a,o){var i=b();try{P(t)(e,r,n,a,o)}catch(s){if(C(i),s!==s+0)throw s;$(1,0)}}function Ia(t,e,r,n,a,o,i){var s=b();try{P(t)(e,r,n,a,o,i)}catch(l){if(C(s),l!==l+0)throw l;$(1,0)}}function Wa(t,e,r,n,a,o,i,s,l,d,h){var y=b();try{P(t)(e,r,n,a,o,i,s,l,d,h)}catch(v){if(C(y),v!==v+0)throw v;$(1,0)}}function Ha(t,e,r,n,a,o,i,s){var l=b();try{P(t)(e,r,n,a,o,i,s)}catch(d){if(C(l),d!==d+0)throw d;$(1,0)}}function ka(t,e,r,n,a){var o=b();try{P(t)(e,r,n,a)}catch(i){if(C(o),i!==i+0)throw i;$(1,0)}}function Ba(t,e,r,n,a,o,i){var s=b();try{return P(t)(e,r,n,a,o,i)}catch(l){if(C(s),l!==l+0)throw l;$(1,0)}}function Ua(t,e,r,n,a,o,i,s,l){var d=b();try{P(t)(e,r,n,a,o,i,s,l)}catch(h){if(C(d),h!==h+0)throw h;$(1,0)}}function Va(t){var e=b();try{return P(t)()}catch(r){if(C(e),r!==r+0)throw r;$(1,0)}}function La(t,e,r,n,a,o,i){var s=b();try{return P(t)(e,r,n,a,o,i)}catch(l){if(C(s),l!==l+0)throw l;$(1,0)}}function za(t,e,r,n){var a=b();try{return P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function Ya(t,e,r,n){var a=b();try{return P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function Na(t,e,r,n,a,o){var i=b();try{return P(t)(e,r,n,a,o)}catch(s){if(C(i),s!==s+0)throw s;$(1,0)}}function Ga(t,e,r,n,a,o){var i=b();try{return P(t)(e,r,n,a,o)}catch(s){if(C(i),s!==s+0)throw s;$(1,0)}}function Xa(t,e,r,n,a,o,i,s,l,d){var h=b();try{return P(t)(e,r,n,a,o,i,s,l,d)}catch(y){if(C(h),y!==y+0)throw y;$(1,0)}}function qa(t,e,r){var n=b();try{return P(t)(e,r)}catch(a){if(C(n),a!==a+0)throw a;$(1,0)}}function Za(t,e,r,n,a,o,i,s,l,d){var h=b();try{P(t)(e,r,n,a,o,i,s,l,d)}catch(y){if(C(h),y!==y+0)throw y;$(1,0)}}function Qa(t,e,r,n,a,o,i,s){var l=b();try{return P(t)(e,r,n,a,o,i,s)}catch(d){if(C(l),d!==d+0)throw d;$(1,0)}}function Ja(t,e,r,n,a,o,i,s,l){var d=b();try{return P(t)(e,r,n,a,o,i,s,l)}catch(h){if(C(d),h!==h+0)throw h;$(1,0)}}function Ka(t,e,r,n,a,o,i){var s=b();try{P(t)(e,r,n,a,o,i)}catch(l){if(C(s),l!==l+0)throw l;$(1,0)}}function to(t,e,r,n){var a=b();try{return P(t)(e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function eo(t,e,r,n,a,o,i,s,l,d,h,y){var v=b();try{return P(t)(e,r,n,a,o,i,s,l,d,h,y)}catch(_){if(C(v),_!==_+0)throw _;$(1,0)}}function ro(t,e,r,n,a,o,i,s,l,d,h,y,v,_,D,R){var A=b();try{P(t)(e,r,n,a,o,i,s,l,d,h,y,v,_,D,R)}catch(I){if(C(A),I!==I+0)throw I;$(1,0)}}function no(t,e,r,n){var a=b();try{return tr(t,e,r,n)}catch(o){if(C(a),o!==o+0)throw o;$(1,0)}}function ao(t,e,r,n,a){var o=b();try{return er(t,e,r,n,a)}catch(i){if(C(o),i!==i+0)throw i;$(1,0)}}var Ht;wt=function t(){Ht||rr(),Ht||(wt=t)};function rr(){if(st>0||(Ar(),st>0))return;function t(){Ht||(Ht=!0,u.calledRun=!0,!vt&&(xr(),g(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Sr()))}u.setStatus?(u.setStatus("Running..."),setTimeout(function(){setTimeout(function(){u.setStatus("")},1),t()},1)):t()}if(u.preInit)for(typeof u.preInit=="function"&&(u.preInit=[u.preInit]);u.preInit.length>0;)u.preInit.pop()();return rr(),m.ready}})();function Tr(c){return ue(de,c)}async function Pr(c,{tryHarder:m=at.tryHarder,formats:u=at.formats,maxSymbols:g=at.maxSymbols}=at){return br(c,{tryHarder:m,formats:u,maxSymbols:g},de)}const fe=new Map([["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["data_matrix","DataMatrix"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["pdf417","PDF417"],["qr_code","QRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"]]);function Er(c){for(const[m,u]of fe)if(c===u)return m;return"unknown"}class Dr extends EventTarget{constructor(u={}){var g;super();or(this,mt,void 0);try{const w=(g=u==null?void 0:u.formats)==null?void 0:g.filter(E=>E!=="unknown");if((w==null?void 0:w.length)===0)throw new TypeError("Hint option provided, but is empty.");w==null||w.forEach(E=>{if(!U.includes(E))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${E}' is not a valid enum value of type BarcodeFormat.`)}),ir(this,mt,w??[]),Tr().then(E=>{this.dispatchEvent(new CustomEvent("load",{detail:E}))}).catch(E=>{this.dispatchEvent(new CustomEvent("error",{detail:E}))})}catch(w){throw ie(w,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return U.filter(u=>u!=="unknown")}async detect(u){try{const g=await fr(u);if(g===null)return[];let w;try{w=await Pr(g,{tryHarder:!0,formats:ar(this,mt).map(E=>fe.get(E))})}catch{throw new DOMException("Barcode detection service unavailable. Use 'setZXingModuleOverrides' in offline or strict CSP environments.","NotSupportedError")}return w.map(E=>{const{topLeft:{x:M,y:X},topRight:{x:V,y:j},bottomLeft:{x:q,y:Q},bottomRight:{x:Y,y:L}}=E.position,J=Math.min(M,V,q,Y),vt=Math.min(X,j,Q,L),N=Math.max(M,V,q,Y),H=Math.max(X,j,Q,L);return{boundingBox:new DOMRectReadOnly(J,vt,N-J,H-vt),rawValue:new TextDecoder().decode(E.bytes),format:Er(E.format),cornerPoints:[{x:M,y:X},{x:V,y:j},{x:Y,y:L},{x:q,y:Q}]}})}catch(g){throw ie(g,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return mt=new WeakMap,globalThis.BarcodeDetector??(globalThis.BarcodeDetector=Dr),W.setZXingModuleOverrides=$r,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"}),W}({}); | ||
var sr=(W,L,q)=>{if(!L.has(W))throw TypeError("Cannot "+q)};var re=(W,L,q)=>(sr(W,L,"read from private field"),q?q.call(W):L.get(W)),ur=(W,L,q)=>{if(L.has(W))throw TypeError("Cannot add the same private member more than once");L instanceof WeakSet?L.add(W):L.set(W,q)},cr=(W,L,q,pt)=>(sr(W,L,"write to private field"),pt?pt.call(W,q):L.set(W,q),q);var BarcodeDetectionAPI=function(W){var ft;"use strict";const L=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function q(c){if(pt(c))return{width:c.naturalWidth,height:c.naturalHeight};if(ne(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(ae(c))return{width:c.videoWidth,height:c.videoHeight};if(ie(c))return{width:c.width,height:c.height};if(ue(c))return{width:c.displayWidth,height:c.displayHeight};if(oe(c))return{width:c.width,height:c.height};if(se(c))return{width:c.width,height:c.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function pt(c){try{return c instanceof HTMLImageElement}catch{return!1}}function ne(c){try{return c instanceof SVGImageElement}catch{return!1}}function ae(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function oe(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function ie(c){try{return c instanceof ImageBitmap}catch{return!1}}function se(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function ue(c){try{return c instanceof VideoFrame}catch{return!1}}function ce(c){try{return c instanceof Blob}catch{return!1}}function lr(c){try{return c instanceof ImageData}catch{return!1}}function fr(c,m){try{const u=new OffscreenCanvas(c,m);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=m,u}}async function le(c){if(pt(c)&&!await mr(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ne(c)&&!await yr(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(ue(c)&&vr(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(ae(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ie(c)&&wr(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:m,height:u}=q(c);if(m===0||u===0)return null;const $=fr(m,u).getContext("2d");$.drawImage(c,0,0);try{return $.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function dr(c){let m;try{if(createImageBitmap)m=await createImageBitmap(c);else if(Image){m=new Image;let g="";try{g=URL.createObjectURL(c),m.src=g,await m.decode()}finally{URL.revokeObjectURL(g)}}else return c}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await le(m)}function hr(c){const{width:m,height:u}=c;if(m===0||u===0)return null;const g=c.getContext("2d");try{return g.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function pr(c){if(ce(c))return await dr(c);if(lr(c)){if(gr(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return oe(c)||se(c)?hr(c):await le(c)}async function mr(c){try{return await c.decode(),!0}catch{return!1}}async function yr(c){var m;try{return await((m=c.decode)==null?void 0:m.call(c)),!0}catch{return!1}}function vr(c){return c.format===null}function gr(c){return c.data.buffer.byteLength===0}function wr(c){return c.width===0&&c.height===0}function fe(c,m){return c instanceof DOMException?new DOMException(`${m}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${m}: ${c.message}`):new Error(`${m}: ${c}`)}const de=c=>{let m;const u=new Set,g=(O,G)=>{const j=typeof O=="function"?O(m):O;if(!Object.is(j,m)){const F=m;m=G??typeof j!="object"?j:Object.assign({},m,j),u.forEach(Y=>Y(m,F))}},$=()=>m,w={setState:g,getState:$,subscribe:O=>(u.add(O),()=>u.delete(O)),destroy:()=>{u.clear()}};return m=c(g,$,w),w},$r=c=>c?de(c):de,br={locateFile:(c,m)=>{var u;const g=(u=c.match(/_(.+?)\.wasm$/))==null?void 0:u[1];return g?`https://fastly.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.5/dist/${g}/${c}`:m+c}},ot=$r()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:br}));function Cr(c){ot.setState({zxingModuleOverrides:c})}function Bt(c,m=ot.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=ot.getState(),g=u.get(c);if(g&&Object.is(m,ot.getState().zxingModuleOverrides))return g;{ot.setState({zxingModuleOverrides:m});const $=c(m);return u.set(c,$),$}}const he=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","UPC-A","UPC-E"],k={tryHarder:!0,formats:[],maxSymbols:255};async function _r(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k,$){const w=await Bt($,ot.getState().zxingModuleOverrides),{size:O}=c,G=new Uint8Array(await c.arrayBuffer()),j=w._malloc(O);w.HEAP8.set(G,j);const F=w.readBarcodesFromImage(j,O,m,pe(u),g);w._free(j);const Y=[];for(let N=0;N<F.size();++N){const z=F.get(N);Y.push({...z,format:me(z.format)})}return Y}async function Tr(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k,$){const w=await Bt($,ot.getState().zxingModuleOverrides),{data:O,width:G,height:j,data:{byteLength:F}}=c,Y=w._malloc(F);w.HEAP8.set(O,Y);const N=w.readBarcodesFromPixmap(Y,G,j,m,pe(u),g);w._free(Y);const z=[];for(let X=0;X<N.size();++X){const K=N.get(X);z.push({...K,format:me(K.format)})}return z}function pe(c){return c.join("|")}function me(c){const m=ye(c);let u=0,g=he.length-1;for(;u<=g;){const $=Math.floor((u+g)/2),w=he[$],O=ye(w);if(O===m)return w;O<m?u=$+1:g=$-1}return"None"}function ye(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var Ut=(()=>{var c=document.currentScript&&document.currentScript.src||new URL("side-effects.js",document.baseURI).href;return function(m={}){var u=m,g,$;u.ready=new Promise((t,e)=>{g=t,$=e});var w=Object.assign({},u),O="./this.program",G=typeof window=="object",j=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var F="";function Y(t){return u.locateFile?u.locateFile(t,F):F+t}var N;(G||j)&&(j?F=self.location.href:typeof document<"u"&&document.currentScript&&(F=document.currentScript.src),c&&(F=c),F.indexOf("blob:")!==0?F=F.substr(0,F.replace(/[?#].*/,"").lastIndexOf("/")+1):F="",j&&(N=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),u.print||console.log.bind(console);var z=u.printErr||console.error.bind(console);Object.assign(u,w),w=null,u.arguments&&u.arguments,u.thisProgram&&(O=u.thisProgram),u.quit&&u.quit;var X;u.wasmBinary&&(X=u.wasmBinary),u.noExitRuntime,typeof WebAssembly!="object"&&Pt("no native wasm support detected");var K,mt=!1,J,B,yt,Tt,U,S,ve,ge;function we(){var t=K.buffer;u.HEAP8=J=new Int8Array(t),u.HEAP16=yt=new Int16Array(t),u.HEAPU8=B=new Uint8Array(t),u.HEAPU16=Tt=new Uint16Array(t),u.HEAP32=U=new Int32Array(t),u.HEAPU32=S=new Uint32Array(t),u.HEAPF32=ve=new Float32Array(t),u.HEAPF64=ge=new Float64Array(t)}var $e=[],be=[],Ce=[];function Dr(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Mr(u.preRun.shift());Lt($e)}function Or(){Lt(be)}function Fr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Ir(u.postRun.shift());Lt(Ce)}function Mr(t){$e.unshift(t)}function jr(t){be.unshift(t)}function Ir(t){Ce.unshift(t)}var it=0,vt=null;function Rr(t){it++,u.monitorRunDependencies&&u.monitorRunDependencies(it)}function Hr(t){if(it--,u.monitorRunDependencies&&u.monitorRunDependencies(it),it==0&&vt){var e=vt;vt=null,e()}}function Pt(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",z(t),mt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw $(e),e}var Wr="data:application/octet-stream;base64,";function _e(t){return t.startsWith(Wr)}var st;u.locateFile?(st="zxing_reader.wasm",_e(st)||(st=Y(st))):st=new URL("/reader/zxing_reader.wasm",self.location).href;function Te(t){if(t==st&&X)return new Uint8Array(X);if(N)return N(t);throw"both async and sync fetching of the wasm failed"}function kr(t){return!X&&(G||j)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>Te(t)):Promise.resolve().then(()=>Te(t))}function Pe(t,e,r){return kr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{z(`failed to asynchronously prepare wasm: ${n}`),Pt(n)})}function Br(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!_e(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(i){return z(`wasm streaming compile failed: ${i}`),z("falling back to ArrayBuffer instantiation"),Pe(e,r,n)})}):Pe(e,r,n)}function Ur(){var t={a:$a};function e(n,a){return D=n.exports,K=D.qa,we(),ke=D.ua,jr(D.ra),Hr(),D}Rr();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){z(`Module.instantiateWasm callback failed with error: ${n}`),$(n)}return Br(X,st,t,r).catch($),{}}var Lt=t=>{for(;t.length>0;)t.shift()(u)},Et=[],xt=0,Vr=t=>{var e=new At(t);return e.get_caught()||(e.set_caught(!0),xt--),e.set_rethrown(!1),Et.push(e),er(e.excPtr),e.get_exception_ptr()},tt=0,Lr=()=>{b(0,0);var t=Et.pop();tr(t.excPtr),tt=0};function At(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){S[this.ptr+4>>2]=e},this.get_type=function(){return S[this.ptr+4>>2]},this.set_destructor=function(e){S[this.ptr+8>>2]=e},this.get_destructor=function(){return S[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,J[this.ptr+12>>0]=e},this.get_caught=function(){return J[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,J[this.ptr+13>>0]=e},this.get_rethrown=function(){return J[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){S[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return S[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=nr(this.get_type());if(e)return S[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var zr=t=>{throw tt||(tt=t),tt},zt=t=>{var e=tt;if(!e)return _t(0),0;var r=new At(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return _t(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var i=r.ptr+16;if(rr(o,n,i))return _t(o),e}return _t(n),e},Yr=()=>zt([]),Nr=t=>zt([t]),Gr=(t,e)=>zt([t,e]),Xr=t=>{var e=new At(t).get_exception_ptr();return e},qr=()=>{var t=Et.pop();t||Pt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Et.push(t),t.set_rethrown(!0),t.set_caught(!1),xt++),tt=e,tt},Jr=(t,e,r)=>{var n=new At(t);throw n.init(e,r),tt=t,xt++,tt},Qr=()=>xt,St={},Ee=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Yt(t){return this.fromWireType(U[t>>2])}var dt={},ut={},Dt={},xe,Ot=t=>{throw new xe(t)},ct=(t,e,r)=>{t.forEach(function(s){Dt[s]=e});function n(s){var l=r(s);l.length!==t.length&&Ot("Mismatched type converter count");for(var f=0;f<t.length;++f)et(t[f],l[f])}var a=new Array(e.length),o=[],i=0;e.forEach((s,l)=>{ut.hasOwnProperty(s)?a[l]=ut[s]:(o.push(s),dt.hasOwnProperty(s)||(dt[s]=[]),dt[s].push(()=>{a[l]=ut[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)},Zr=t=>{var e=St[t];delete St[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(i=>i.getterReturnType).concat(a.map(i=>i.setterArgumentType));ct([t],o,i=>{var s={};return a.forEach((l,f)=>{var h=l.fieldName,y=i[f],v=l.getter,T=l.getterContext,x=i[f+a.length],R=l.setter,A=l.setterContext;s[h]={read:H=>y.fromWireType(v(T,H)),write:(H,d)=>{var p=[];R(A,H,x.toWireType(p,d)),Ee(p)}}}),[{name:e.name,fromWireType:l=>{var f={};for(var h in s)f[h]=s[h].read(l);return n(l),f},toWireType:(l,f)=>{for(var h in s)if(!(h in f))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in s)s[h].write(y,f[h]);return l!==null&&l.push(n,y),y},argPackAdvance:rt,readValueFromPointer:Yt,destructorFunction:n}]})},Kr=(t,e,r,n,a)=>{},tn=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Ae=t},Ae,V=t=>{for(var e="",r=t;B[r];)e+=Ae[B[r++]];return e},ht,P=t=>{throw new ht(t)};function en(t,e,r={}){var n=e.name;if(t||P(`type "${n}" must have a positive integer typeid pointer`),ut.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;P(`Cannot register type '${n}' twice`)}if(ut[t]=e,delete Dt[t],dt.hasOwnProperty(t)){var a=dt[t];delete dt[t],a.forEach(o=>o())}}function et(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return en(t,e,r)}var rt=8,rn=(t,e,r,n)=>{e=V(e),et(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:rt,readValueFromPointer:function(a){return this.fromWireType(B[a])},destructorFunction:null})},nn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Nt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}P(e(t)+" instance already deleted")},Gt=!1,Se=t=>{},an=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},De=t=>{t.count.value-=1;var e=t.count.value===0;e&&an(t)},Oe=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Oe(t,e,r.baseClass);return n===null?null:r.downcast(n)},Fe={},on=()=>Object.keys($t).length,sn=()=>{var t=[];for(var e in $t)$t.hasOwnProperty(e)&&t.push($t[e]);return t},gt=[],Xt=()=>{for(;gt.length;){var t=gt.pop();t.$$.deleteScheduled=!1,t.delete()}},wt,un=t=>{wt=t,gt.length&&wt&&wt(Xt)},cn=()=>{u.getInheritedInstanceCount=on,u.getLiveInheritedInstances=sn,u.flushPendingDeletes=Xt,u.setDelayFunction=un},$t={},ln=(t,e)=>{for(e===void 0&&P("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},fn=(t,e)=>(e=ln(t,e),$t[e]),Ft=(t,e)=>{(!e.ptrType||!e.ptr)&&Ot("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Ot("Both smartPtrType and smartPtr must be specified"),e.count={value:1},bt(Object.create(t,{$$:{value:e}}))};function dn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=fn(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?Ft(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Ft(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=Fe[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var l=Oe(e,this.registeredClass,s.registeredClass);return l===null?a.call(this):this.isSmartPointer?Ft(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:t}):Ft(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var bt=t=>typeof FinalizationRegistry>"u"?(bt=e=>e,t):(Gt=new FinalizationRegistry(e=>{De(e.$$)}),bt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Gt.register(e,a,e)}return e},Se=e=>Gt.unregister(e),bt(t)),hn=()=>{Object.assign(Mt.prototype,{isAliasOf(t){if(!(this instanceof Mt)||!(t instanceof Mt))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||Nt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=bt(Object.create(Object.getPrototypeOf(this),{$$:{value:nn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),Se(this),De(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),gt.push(this),gt.length===1&&wt&&wt(Xt),this.$$.deleteScheduled=!0,this}})};function Mt(){}var pn=48,mn=57,Me=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=pn&&e<=mn?`_${t}`:t};function je(t,e){return t=Me(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var Ie=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||P(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},Re=(t,e,r)=>{u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&P(`Cannot register public name '${t}' twice`),Ie(u,t,t),u.hasOwnProperty(r)&&P(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),u[t].overloadTable[r]=e):(u[t]=e,r!==void 0&&(u[t].numArguments=r))};function yn(t,e,r,n,a,o,i,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var qt=(t,e,r)=>{for(;e!==r;)e.upcast||P(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function vn(t,e){if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;e.$$||P(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=qt(e.$$.ptr,r,this.registeredClass);return n}function gn(t,e){var r;if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||P(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&P(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=qt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&P("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:P(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,at.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:P("Unsupporting sharing policy")}return r}function wn(t,e){if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;e.$$||P(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&P(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=qt(e.$$.ptr,r,this.registeredClass);return n}function He(t){return this.fromWireType(S[t>>2])}var $n=()=>{Object.assign(jt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:rt,readValueFromPointer:He,deleteObject(t){t!==null&&t.delete()},fromWireType:dn})};function jt(t,e,r,n,a,o,i,s,l,f,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=vn,this.destructorFunction=null):(this.toWireType=wn,this.destructorFunction=null):this.toWireType=gn}var We=(t,e,r)=>{u.hasOwnProperty(t)||Ot("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)},bn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},It=[],ke,E=t=>{var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=ke.get(t)),e},Cn=(t,e,r)=>{if(t.includes("j"))return bn(t,e,r);var n=E(e).apply(null,r);return n},_n=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Cn(t,e,r)}},Z=(t,e)=>{t=V(t);function r(){return t.includes("j")?_n(t,e):E(e)}var n=r();return typeof n!="function"&&P(`unknown function pointer with signature ${t}: ${e}`),n},Tn=(t,e)=>{var r=je(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` | ||
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Be,Ue=t=>{var e=Ke(t),r=V(e);return nt(e),r},Rt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!ut[o]){if(Dt[o]){Dt[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Be(`${t}: `+r.map(Ue).join([", "]))},Pn=(t,e,r,n,a,o,i,s,l,f,h,y,v)=>{h=V(h),o=Z(a,o),s&&(s=Z(i,s)),f&&(f=Z(l,f)),v=Z(y,v);var T=Me(h);Re(T,function(){Rt(`Cannot construct ${h} due to unbound types`,[n])}),ct([t,e,r],n?[n]:[],function(x){x=x[0];var R,A;n?(R=x.registeredClass,A=R.instancePrototype):A=Mt.prototype;var H=je(T,function(){if(Object.getPrototypeOf(this)!==d)throw new ht("Use 'new' to construct "+h);if(p.constructor_body===void 0)throw new ht(h+" has no accessible constructor");var kt=p.constructor_body[arguments.length];if(kt===void 0)throw new ht(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(p.constructor_body).toString()}) parameters instead!`);return kt.apply(this,arguments)}),d=Object.create(A,{constructor:{value:H}});H.prototype=d;var p=new yn(h,H,d,v,R,o,s,f);p.baseClass&&(p.baseClass.__derivedClasses===void 0&&(p.baseClass.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var M=new jt(h,p,!0,!1,!1),I=new jt(h+"*",p,!1,!1,!1),lt=new jt(h+" const*",p,!1,!0,!1);return Fe[t]={pointerType:I,constPointerType:lt},We(T,H),[M,I,lt]})},Jt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(S[e+n*4>>2]);return r};function Qt(t,e,r,n,a,o){var i=e.length;i<2&&P("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=e[1]!==null&&r!==null,l=!1,f=1;f<e.length;++f)if(e[f]!==null&&e[f].destructorFunction===void 0){l=!0;break}var h=e[0].name!=="void",y=i-2,v=new Array(y),T=[],x=[];return function(){arguments.length!==y&&P(`function ${t} called with ${arguments.length} arguments, expected ${y}`),x.length=0;var R;T.length=s?2:1,T[0]=a,s&&(R=e[1].toWireType(x,this),T[1]=R);for(var A=0;A<y;++A)v[A]=e[A+2].toWireType(x,arguments[A]),T.push(v[A]);var H=n.apply(null,T);function d(p){if(l)Ee(x);else for(var M=s?1:2;M<e.length;M++){var I=M===1?R:v[M-2];e[M].destructorFunction!==null&&e[M].destructorFunction(I)}if(h)return e[0].fromWireType(p)}return d(H)}}var En=(t,e,r,n,a,o)=>{var i=Jt(e,r);a=Z(n,a),ct([],[t],function(s){s=s[0];var l=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[e-1]!==void 0)throw new ht(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return s.registeredClass.constructor_body[e-1]=()=>{Rt(`Cannot construct ${s.name} due to unbound types`,i)},ct([],i,f=>(f.splice(1,0,null),s.registeredClass.constructor_body[e-1]=Qt(l,f,null,a,o),[])),[]})},xn=(t,e,r,n,a,o,i,s,l)=>{var f=Jt(r,n);e=V(e),o=Z(a,o),ct([],[t],function(h){h=h[0];var y=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&h.registeredClass.pureVirtualFunctions.push(e);function v(){Rt(`Cannot call ${y} due to unbound types`,f)}var T=h.registeredClass.instancePrototype,x=T[e];return x===void 0||x.overloadTable===void 0&&x.className!==h.name&&x.argCount===r-2?(v.argCount=r-2,v.className=h.name,T[e]=v):(Ie(T,e,y),T[e].overloadTable[r-2]=v),ct([],f,function(R){var A=Qt(y,R,h,o,i);return T[e].overloadTable===void 0?(A.argCount=r-2,T[e]=A):T[e].overloadTable[r-2]=A,[]}),[]})};function An(){Object.assign(Ve.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function Ve(){this.allocated=[void 0],this.freelist=[]}var Q=new Ve,Le=t=>{t>=Q.reserved&&--Q.get(t).refcount===0&&Q.free(t)},Sn=()=>{for(var t=0,e=Q.reserved;e<Q.allocated.length;++e)Q.allocated[e]!==void 0&&++t;return t},Dn=()=>{Q.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Q.reserved=Q.allocated.length,u.count_emval_handles=Sn},at={toValue:t=>(t||P("Cannot use deleted val. handle = "+t),Q.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Q.allocate({refcount:1,value:t})}}},On=(t,e)=>{e=V(e),et(t,{name:e,fromWireType:r=>{var n=at.toValue(r);return Le(r),n},toWireType:(r,n)=>at.toHandle(n),argPackAdvance:rt,readValueFromPointer:Yt,destructorFunction:null})},Zt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},Fn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(ve[r>>2])};case 8:return function(r){return this.fromWireType(ge[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Mn=(t,e,r)=>{e=V(e),et(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:rt,readValueFromPointer:Fn(e,r),destructorFunction:null})},jn=(t,e,r,n,a,o,i)=>{var s=Jt(e,r);t=V(t),a=Z(n,a),Re(t,function(){Rt(`Cannot call ${t} due to unbound types`,s)},e-1),ct([],s,function(l){var f=[l[0],null].concat(l.slice(1));return We(t,Qt(t,f,null,a,o),e-1),[]})},In=(t,e,r)=>{switch(e){case 1:return r?n=>J[n>>0]:n=>B[n>>0];case 2:return r?n=>yt[n>>1]:n=>Tt[n>>1];case 4:return r?n=>U[n>>2]:n=>S[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Rn=(t,e,r,n,a)=>{e=V(e);var o=h=>h;if(n===0){var i=32-8*r;o=h=>h<<i>>>i}var s=e.includes("unsigned"),l=(h,y)=>{},f;s?f=function(h,y){return l(y,this.name),y>>>0}:f=function(h,y){return l(y,this.name),y},et(t,{name:e,fromWireType:o,toWireType:f,argPackAdvance:rt,readValueFromPointer:In(e,r,n!==0),destructorFunction:null})},Hn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(i){var s=S[i>>2],l=S[i+4>>2];return new a(J.buffer,l,s)}r=V(r),et(t,{name:r,fromWireType:o,argPackAdvance:rt,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},ze=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,i=0;i<t.length;++i){var s=t.charCodeAt(i);if(s>=55296&&s<=57343){var l=t.charCodeAt(++i);s=65536+((s&1023)<<10)|l&1023}if(s<=127){if(r>=o)break;e[r++]=s}else if(s<=2047){if(r+1>=o)break;e[r++]=192|s>>6,e[r++]=128|s&63}else if(s<=65535){if(r+2>=o)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|s&63}else{if(r+3>=o)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|s&63}}return e[r]=0,r-a},Wn=(t,e,r)=>ze(t,B,e,r),Ye=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},Ne=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,kn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Ne)return Ne.decode(t.subarray(e,a));for(var o="";e<a;){var i=t[e++];if(!(i&128)){o+=String.fromCharCode(i);continue}var s=t[e++]&63;if((i&224)==192){o+=String.fromCharCode((i&31)<<6|s);continue}var l=t[e++]&63;if((i&240)==224?i=(i&15)<<12|s<<6|l:i=(i&7)<<18|s<<12|l<<6|t[e++]&63,i<65536)o+=String.fromCharCode(i);else{var f=i-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return o},Kt=(t,e)=>t?kn(B,t,e):"",Bn=(t,e)=>{e=V(e);var r=e==="std::string";et(t,{name:e,fromWireType(n){var a=S[n>>2],o=n+4,i;if(r)for(var s=o,l=0;l<=a;++l){var f=o+l;if(l==a||B[f]==0){var h=f-s,y=Kt(s,h);i===void 0?i=y:(i+=String.fromCharCode(0),i+=y),s=f+1}}else{for(var v=new Array(a),l=0;l<a;++l)v[l]=String.fromCharCode(B[o+l]);i=v.join("")}return nt(n),i},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,i=typeof a=="string";i||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||P("Cannot pass non-string to std::string"),r&&i?o=Ye(a):o=a.length;var s=ee(4+o+1),l=s+4;if(S[s>>2]=o,r&&i)Wn(a,l,o+1);else if(i)for(var f=0;f<o;++f){var h=a.charCodeAt(f);h>255&&(nt(l),P("String has UTF-16 code units that do not fit in 8 bits")),B[l+f]=h}else for(var f=0;f<o;++f)B[l+f]=a[f];return n!==null&&n.push(nt,s),s},argPackAdvance:rt,readValueFromPointer:He,destructorFunction(n){nt(n)}})},Ge=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Un=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Tt[n];)++n;if(r=n<<1,r-t>32&&Ge)return Ge.decode(B.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=yt[t+i*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Vn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var n=e,a=r<t.length*2?r/2:t.length,o=0;o<a;++o){var i=t.charCodeAt(o);yt[e>>1]=i,e+=2}return yt[e>>1]=0,e-n},Ln=t=>t.length*2,zn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=U[t+r*4>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},Yn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,o=0;o<t.length;++o){var i=t.charCodeAt(o);if(i>=55296&&i<=57343){var s=t.charCodeAt(++o);i=65536+((i&1023)<<10)|s&1023}if(U[e>>2]=i,e+=4,e+4>a)break}return U[e>>2]=0,e-n},Nn=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},Gn=(t,e,r)=>{r=V(r);var n,a,o,i,s;e===2?(n=Un,a=Vn,i=Ln,o=()=>Tt,s=1):e===4&&(n=zn,a=Yn,i=Nn,o=()=>S,s=2),et(t,{name:r,fromWireType:l=>{for(var f=S[l>>2],h=o(),y,v=l+4,T=0;T<=f;++T){var x=l+4+T*e;if(T==f||h[x>>s]==0){var R=x-v,A=n(v,R);y===void 0?y=A:(y+=String.fromCharCode(0),y+=A),v=x+e}}return nt(l),y},toWireType:(l,f)=>{typeof f!="string"&&P(`Cannot pass non-string to C++ string type ${r}`);var h=i(f),y=ee(4+h+e);return S[y>>2]=h>>s,a(f,y+4,h+e),l!==null&&l.push(nt,y),y},argPackAdvance:rt,readValueFromPointer:Yt,destructorFunction(l){nt(l)}})},Xn=(t,e,r,n,a,o)=>{St[t]={name:V(e),rawConstructor:Z(r,n),rawDestructor:Z(a,o),fields:[]}},qn=(t,e,r,n,a,o,i,s,l,f)=>{St[t].fields.push({fieldName:V(e),getterReturnType:r,getter:Z(n,a),getterContext:o,setterArgumentType:i,setter:Z(s,l),setterContext:f})},Jn=(t,e)=>{e=V(e),et(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Qn={},Zn=t=>{var e=Qn[t];return e===void 0?V(t):e},Xe=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},Kn=t=>t===0?at.toHandle(Xe()):(t=Zn(t),at.toHandle(Xe()[t])),ta=t=>{t>4&&(Q.get(t).refcount+=1)},qe=(t,e)=>{var r=ut[t];return r===void 0&&P(e+" has unknown type "+Ue(t)),r},ea=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var i=qe(S[n+o*4>>2],"parameter "+o);e[o+1]=i.readValueFromPointer(a),a+=i.argPackAdvance}var s=new(r.bind.apply(r,e));return at.toHandle(s)}},Je={},ra=(t,e,r,n)=>{t=at.toValue(t);var a=Je[e];return a||(a=ea(e),Je[e]=a),a(t,r,n)},na=(t,e)=>{t=qe(t,"_emval_take_value");var r=t.readValueFromPointer(e);return at.toHandle(r)},aa=()=>{Pt("")},oa=(t,e,r)=>B.copyWithin(t,e,e+r),ia=()=>2147483648,sa=t=>{var e=K.buffer,r=(t-e.byteLength+65535)/65536;try{return K.grow(r),we(),1}catch{}},ua=t=>{var e=B.length;t>>>=0;var r=ia();if(t>r)return!1;for(var n=(l,f)=>l+(f-l%f)%f,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var i=Math.min(r,n(Math.max(t,o),65536)),s=sa(i);if(s)return!0}return!1},te={},ca=()=>O||"./this.program",Ct=()=>{if(!Ct.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:ca()};for(var r in te)te[r]===void 0?delete e[r]:e[r]=te[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);Ct.strings=n}return Ct.strings},la=(t,e)=>{for(var r=0;r<t.length;++r)J[e++>>0]=t.charCodeAt(r);J[e>>0]=0},fa=(t,e)=>{var r=0;return Ct().forEach((n,a)=>{var o=e+r;S[t+a*4>>2]=o,la(n,o),r+=n.length+1}),0},da=(t,e)=>{var r=Ct();S[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),S[e>>2]=n,0},ha=t=>t,Ht=t=>t%4===0&&(t%100!==0||t%400===0),pa=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Qe=[31,29,31,30,31,30,31,31,30,31,30,31],Ze=[31,28,31,30,31,30,31,31,30,31,30,31],ma=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Ht(r.getFullYear()),a=r.getMonth(),o=(n?Qe:Ze)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function ya(t,e,r){var n=r>0?r:Ye(t)+1,a=new Array(n),o=ze(t,a,0,a.length);return e&&(a.length=o),a}var va=(t,e)=>{J.set(t,e)},ga=(t,e,r,n)=>{var a=S[n+40>>2],o={tm_sec:U[n>>2],tm_min:U[n+4>>2],tm_hour:U[n+8>>2],tm_mday:U[n+12>>2],tm_mon:U[n+16>>2],tm_year:U[n+20>>2],tm_wday:U[n+24>>2],tm_yday:U[n+28>>2],tm_isdst:U[n+32>>2],tm_gmtoff:U[n+36>>2],tm_zone:a?Kt(a):""},i=Kt(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in s)i=i.replace(new RegExp(l,"g"),s[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,p,M){for(var I=typeof d=="number"?d.toString():d||"";I.length<p;)I=M[0]+I;return I}function v(d,p){return y(d,p,"0")}function T(d,p){function M(lt){return lt<0?-1:lt>0?1:0}var I;return(I=M(d.getFullYear()-p.getFullYear()))===0&&(I=M(d.getMonth()-p.getMonth()))===0&&(I=M(d.getDate()-p.getDate())),I}function x(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function R(d){var p=ma(new Date(d.tm_year+1900,0,1),d.tm_yday),M=new Date(p.getFullYear(),0,4),I=new Date(p.getFullYear()+1,0,4),lt=x(M),kt=x(I);return T(lt,p)<=0?T(kt,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var A={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>h[d.tm_mon].substring(0,3),"%B":d=>h[d.tm_mon],"%C":d=>{var p=d.tm_year+1900;return v(p/100|0,2)},"%d":d=>v(d.tm_mday,2),"%e":d=>y(d.tm_mday,2," "),"%g":d=>R(d).toString().substring(2),"%G":d=>R(d),"%H":d=>v(d.tm_hour,2),"%I":d=>{var p=d.tm_hour;return p==0?p=12:p>12&&(p-=12),v(p,2)},"%j":d=>v(d.tm_mday+pa(Ht(d.tm_year+1900)?Qe:Ze,d.tm_mon-1),3),"%m":d=>v(d.tm_mon+1,2),"%M":d=>v(d.tm_min,2),"%n":()=>` | ||
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>v(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var p=d.tm_yday+7-d.tm_wday;return v(Math.floor(p/7),2)},"%V":d=>{var p=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&p++,p){if(p==53){var M=(d.tm_wday+371-d.tm_yday)%7;M!=4&&(M!=3||!Ht(d.tm_year))&&(p=1)}}else{p=52;var I=(d.tm_wday+7-d.tm_yday-1)%7;(I==4||I==5&&Ht(d.tm_year%400-1))&&p++}return v(p,2)},"%w":d=>d.tm_wday,"%W":d=>{var p=d.tm_yday+7-(d.tm_wday+6)%7;return v(Math.floor(p/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var p=d.tm_gmtoff,M=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(M?"+":"-")+("0000"+p).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};i=i.replace(/%%/g,"\0\0");for(var l in A)i.includes(l)&&(i=i.replace(new RegExp(l,"g"),A[l](o)));i=i.replace(/\0\0/g,"%");var H=ya(i,!1);return H.length>e?0:(va(H,t),H.length-1)},wa=(t,e,r,n,a)=>ga(t,e,r,n);xe=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},tn(),ht=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},hn(),cn(),$n(),Be=u.UnboundTypeError=Tn(Error,"UnboundTypeError"),An(),Dn();var $a={q:Vr,u:Lr,a:Yr,h:Nr,l:Gr,I:Xr,P:qr,n:Jr,ba:Qr,d:zr,oa:Zr,Y:Kr,fa:rn,na:Pn,ma:En,D:xn,ea:On,W:Mn,J:jn,w:Rn,s:Hn,V:Bn,L:Gn,Q:Xn,pa:qn,ga:Jn,U:Le,la:Kn,R:ta,ia:ra,ka:na,K:aa,da:oa,ca:ua,$:fa,aa:da,H:ka,T:Xa,B:Ua,p:Ra,b:ba,C:Wa,ha:La,c:Ea,j:Aa,i:Ta,x:Ba,O:Ha,v:ja,G:Ya,N:Na,A:Va,F:qa,Z:Qa,X:Za,k:xa,f:Pa,e:_a,g:Ca,M:Ga,m:Ma,o:Sa,S:Da,t:Fa,ja:Ia,y:za,r:Oa,E:Ja,z:ha,_:wa},D=Ur(),nt=u._free=t=>(nt=u._free=D.sa)(t),ee=u._malloc=t=>(ee=u._malloc=D.ta)(t),Ke=t=>(Ke=D.va)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=D.wa)();var b=(t,e)=>(b=D.xa)(t,e),_t=t=>(_t=D.ya)(t),C=()=>(C=D.za)(),_=t=>(_=D.Aa)(t),tr=t=>(tr=D.Ba)(t),er=t=>(er=D.Ca)(t),rr=(t,e,r)=>(rr=D.Da)(t,e,r),nr=t=>(nr=D.Ea)(t);u.dynCall_viijii=(t,e,r,n,a,o,i)=>(u.dynCall_viijii=D.Fa)(t,e,r,n,a,o,i);var ar=u.dynCall_jiii=(t,e,r,n)=>(ar=u.dynCall_jiii=D.Ga)(t,e,r,n),or=u.dynCall_jiiii=(t,e,r,n,a)=>(or=u.dynCall_jiiii=D.Ha)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,i)=>(u.dynCall_iiiiij=D.Ia)(t,e,r,n,a,o,i),u.dynCall_iiiiijj=(t,e,r,n,a,o,i,s,l)=>(u.dynCall_iiiiijj=D.Ja)(t,e,r,n,a,o,i,s,l),u.dynCall_iiiiiijj=(t,e,r,n,a,o,i,s,l,f)=>(u.dynCall_iiiiiijj=D.Ka)(t,e,r,n,a,o,i,s,l,f);function ba(t,e){var r=C();try{return E(t)(e)}catch(n){if(_(r),n!==n+0)throw n;b(1,0)}}function Ca(t,e,r,n){var a=C();try{E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function _a(t,e,r){var n=C();try{E(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function Ta(t,e,r,n,a){var o=C();try{return E(t)(e,r,n,a)}catch(i){if(_(o),i!==i+0)throw i;b(1,0)}}function Pa(t,e){var r=C();try{E(t)(e)}catch(n){if(_(r),n!==n+0)throw n;b(1,0)}}function Ea(t,e,r){var n=C();try{return E(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function xa(t){var e=C();try{E(t)()}catch(r){if(_(e),r!==r+0)throw r;b(1,0)}}function Aa(t,e,r,n){var a=C();try{return E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Sa(t,e,r,n,a,o){var i=C();try{E(t)(e,r,n,a,o)}catch(s){if(_(i),s!==s+0)throw s;b(1,0)}}function Da(t,e,r,n,a,o,i){var s=C();try{E(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Oa(t,e,r,n,a,o,i,s,l,f,h){var y=C();try{E(t)(e,r,n,a,o,i,s,l,f,h)}catch(v){if(_(y),v!==v+0)throw v;b(1,0)}}function Fa(t,e,r,n,a,o,i,s){var l=C();try{E(t)(e,r,n,a,o,i,s)}catch(f){if(_(l),f!==f+0)throw f;b(1,0)}}function Ma(t,e,r,n,a){var o=C();try{E(t)(e,r,n,a)}catch(i){if(_(o),i!==i+0)throw i;b(1,0)}}function ja(t,e,r,n,a,o,i){var s=C();try{return E(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Ia(t,e,r,n,a,o,i,s,l){var f=C();try{E(t)(e,r,n,a,o,i,s,l)}catch(h){if(_(f),h!==h+0)throw h;b(1,0)}}function Ra(t){var e=C();try{return E(t)()}catch(r){if(_(e),r!==r+0)throw r;b(1,0)}}function Ha(t,e,r,n,a,o,i){var s=C();try{return E(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Wa(t,e,r,n){var a=C();try{return E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function ka(t,e,r,n){var a=C();try{return E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Ba(t,e,r,n,a,o){var i=C();try{return E(t)(e,r,n,a,o)}catch(s){if(_(i),s!==s+0)throw s;b(1,0)}}function Ua(t,e,r,n,a,o){var i=C();try{return E(t)(e,r,n,a,o)}catch(s){if(_(i),s!==s+0)throw s;b(1,0)}}function Va(t,e,r,n,a,o,i,s,l,f){var h=C();try{return E(t)(e,r,n,a,o,i,s,l,f)}catch(y){if(_(h),y!==y+0)throw y;b(1,0)}}function La(t,e,r){var n=C();try{return E(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function za(t,e,r,n,a,o,i,s,l,f){var h=C();try{E(t)(e,r,n,a,o,i,s,l,f)}catch(y){if(_(h),y!==y+0)throw y;b(1,0)}}function Ya(t,e,r,n,a,o,i,s){var l=C();try{return E(t)(e,r,n,a,o,i,s)}catch(f){if(_(l),f!==f+0)throw f;b(1,0)}}function Na(t,e,r,n,a,o,i,s,l){var f=C();try{return E(t)(e,r,n,a,o,i,s,l)}catch(h){if(_(f),h!==h+0)throw h;b(1,0)}}function Ga(t,e,r,n,a,o,i){var s=C();try{E(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Xa(t,e,r,n){var a=C();try{return E(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function qa(t,e,r,n,a,o,i,s,l,f,h,y){var v=C();try{return E(t)(e,r,n,a,o,i,s,l,f,h,y)}catch(T){if(_(v),T!==T+0)throw T;b(1,0)}}function Ja(t,e,r,n,a,o,i,s,l,f,h,y,v,T,x,R){var A=C();try{E(t)(e,r,n,a,o,i,s,l,f,h,y,v,T,x,R)}catch(H){if(_(A),H!==H+0)throw H;b(1,0)}}function Qa(t,e,r,n){var a=C();try{return ar(t,e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Za(t,e,r,n,a){var o=C();try{return or(t,e,r,n,a)}catch(i){if(_(o),i!==i+0)throw i;b(1,0)}}var Wt;vt=function t(){Wt||ir(),Wt||(vt=t)};function ir(){if(it>0||(Dr(),it>0))return;function t(){Wt||(Wt=!0,u.calledRun=!0,!mt&&(Or(),g(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Fr()))}u.setStatus?(u.setStatus("Running..."),setTimeout(function(){setTimeout(function(){u.setStatus("")},1),t()},1)):t()}if(u.preInit)for(typeof u.preInit=="function"&&(u.preInit=[u.preInit]);u.preInit.length>0;)u.preInit.pop()();return ir(),m.ready}})();function Pr(c){return Bt(Ut,c)}async function Er(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k){return _r(c,{tryHarder:m,formats:u,maxSymbols:g},Ut)}async function xr(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k){return Tr(c,{tryHarder:m,formats:u,maxSymbols:g},Ut)}const Vt=new Map([["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["data_matrix","DataMatrix"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["pdf417","PDF417"],["qr_code","QRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"]]);function Ar(c){for(const[m,u]of Vt)if(c===u)return m;return"unknown"}class Sr extends EventTarget{constructor(u={}){var g;super();ur(this,ft,void 0);try{const $=(g=u==null?void 0:u.formats)==null?void 0:g.filter(w=>w!=="unknown");if(($==null?void 0:$.length)===0)throw new TypeError("Hint option provided, but is empty.");$==null||$.forEach(w=>{if(!L.includes(w))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${w}' is not a valid enum value of type BarcodeFormat.`)}),cr(this,ft,$??[]),Pr().then(w=>{this.dispatchEvent(new CustomEvent("load",{detail:w}))}).catch(w=>{this.dispatchEvent(new CustomEvent("error",{detail:w}))})}catch($){throw fe($,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return L.filter(u=>u!=="unknown")}async detect(u){try{const g=await pr(u);if(g===null)return[];let $;try{ce(g)?$=await Er(g,{tryHarder:!0,formats:re(this,ft).map(w=>Vt.get(w))}):$=await xr(g,{tryHarder:!0,formats:re(this,ft).map(w=>Vt.get(w))})}catch(w){throw console.error(w),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return $.map(w=>{const{topLeft:{x:O,y:G},topRight:{x:j,y:F},bottomLeft:{x:Y,y:N},bottomRight:{x:z,y:X}}=w.position,K=Math.min(O,j,Y,z),mt=Math.min(G,F,N,X),J=Math.max(O,j,Y,z),B=Math.max(G,F,N,X);return{boundingBox:new DOMRectReadOnly(K,mt,J-K,B-mt),rawValue:new TextDecoder().decode(w.bytes),format:Ar(w.format),cornerPoints:[{x:O,y:G},{x:j,y:F},{x:z,y:X},{x:Y,y:N}]}})}catch(g){throw fe(g,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ft=new WeakMap,globalThis.BarcodeDetector??(globalThis.BarcodeDetector=Sr),W.setZXingModuleOverrides=Cr,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"}),W}({}); |
@@ -5,3 +5,3 @@ { | ||
"private": false, | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"type": "module", | ||
@@ -77,26 +77,27 @@ "files": [ | ||
"ncu": "npx npm-check-updates -u", | ||
"postncu": "npm i" | ||
"postncu": "npm i", | ||
"bump-zxing-wasm": "npm i @sec-ant/zxing-wasm@latest --save-exact" | ||
}, | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^6.6.0", | ||
"@typescript-eslint/parser": "^6.6.0", | ||
"@vitest/browser": "^0.34.3", | ||
"@vitest/coverage-istanbul": "^0.34.3", | ||
"@vitest/ui": "^0.34.3", | ||
"eslint": "^8.48.0", | ||
"@typescript-eslint/eslint-plugin": "^6.7.0", | ||
"@typescript-eslint/parser": "^6.7.0", | ||
"@vitest/browser": "^0.34.4", | ||
"@vitest/coverage-istanbul": "^0.34.4", | ||
"@vitest/ui": "^0.34.4", | ||
"eslint": "^8.49.0", | ||
"http-server": "^14.1.1", | ||
"npm-check-updates": "^16.13.3", | ||
"playwright": "^1.37.1", | ||
"npm-check-updates": "^16.14.3", | ||
"playwright": "^1.38.0", | ||
"prettier": "^3.0.3", | ||
"rimraf": "^5.0.1", | ||
"start-server-and-test": "^2.0.0", | ||
"tsx": "^3.12.8", | ||
"tsx": "^3.12.10", | ||
"typescript": "^5.2.2", | ||
"vite": "^4.4.9", | ||
"vitest": "^0.34.3" | ||
"vitest": "^0.34.4" | ||
}, | ||
"dependencies": { | ||
"@sec-ant/zxing-wasm": "^2.1.4", | ||
"@sec-ant/zxing-wasm": "2.1.5", | ||
"@types/dom-webcodecs": "^0.1.8" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
267592
2826
+ Added@sec-ant/zxing-wasm@2.1.5(transitive)
- Removed@sec-ant/zxing-wasm@2.2.0(transitive)
Updated@sec-ant/zxing-wasm@2.1.5