Socket
Socket
Sign inDemoInstall

barcode-detector

Package Overview
Dependencies
3
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.5 to 2.2.0

6

dist/cjs/BarcodeDetector.d.ts
/// <reference types="dom-webcodecs" />
import { type ZXingReaderModule } from "zxing-wasm/reader";
import { BARCODE_DETECTOR_FORMATS } from "./utils.js";
export type BarcodeFormat = (typeof BARCODE_DETECTOR_FORMATS)[number];
import { type BarcodeFormat, type ReadResultBarcodeFormat } from "./utils.js";
export { type BarcodeFormat } from "./utils.js";
export interface BarcodeDetectorOptions {

@@ -15,3 +15,3 @@ formats?: BarcodeFormat[];

rawValue: string;
format: BarcodeFormat;
format: ReadResultBarcodeFormat;
cornerPoints: [Point2D, Point2D, Point2D, Point2D];

@@ -18,0 +18,0 @@ }

@@ -1,3 +0,3 @@

"use strict";var Ye=(i,f,s)=>{if(!f.has(i))throw TypeError("Cannot "+s)};var Kt=(i,f,s)=>(Ye(i,f,"read from private field"),s?s.call(i):f.get(i)),ze=(i,f,s)=>{if(f.has(i))throw TypeError("Cannot add the same private member more than once");f instanceof WeakSet?f.add(i):f.set(i,s)},Ne=(i,f,s,w)=>(Ye(i,f,"write to private field"),w?w.call(i,s):f.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ge=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function ba(i){if(Ze(i))return{width:i.naturalWidth,height:i.naturalHeight};if(Je(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(Ke(i))return{width:i.videoWidth,height:i.videoHeight};if(er(i))return{width:i.width,height:i.height};if(nr(i))return{width:i.displayWidth,height:i.displayHeight};if(tr(i))return{width:i.width,height:i.height};if(rr(i))return{width:i.width,height:i.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 Ze(i){try{return i instanceof HTMLImageElement}catch{return!1}}function Je(i){try{return i instanceof SVGImageElement}catch{return!1}}function Ke(i){try{return i instanceof HTMLVideoElement}catch{return!1}}function tr(i){try{return i instanceof HTMLCanvasElement}catch{return!1}}function er(i){try{return i instanceof ImageBitmap}catch{return!1}}function rr(i){try{return i instanceof OffscreenCanvas}catch{return!1}}function nr(i){try{return i instanceof VideoFrame}catch{return!1}}function ar(i){try{return i instanceof Blob}catch{return!1}}function Ca(i){try{return i instanceof ImageData}catch{return!1}}function _a(i,f){try{const s=new OffscreenCanvas(i,f);if(s.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return s;throw void 0}catch{const s=document.createElement("canvas");return s.width=i,s.height=f,s}}async function or(i){if(Ze(i)&&!await Aa(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Je(i)&&!await Oa(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(nr(i)&&Da(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Ke(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(er(i)&&Fa(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:f,height:s}=ba(i);if(f===0||s===0)return null;const v=_a(f,s).getContext("2d");v.drawImage(i,0,0);try{return v.getImageData(0,0,f,s)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ta(i){let f;try{if(globalThis.createImageBitmap)f=await createImageBitmap(i);else if(globalThis.Image){f=new Image;let w="";try{w=URL.createObjectURL(i),f.src=w,await f.decode()}finally{URL.revokeObjectURL(w)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await or(f)}function Pa(i){const{width:f,height:s}=i;if(f===0||s===0)return null;const w=i.getContext("2d");try{return w.getImageData(0,0,f,s)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ea(i){if(ar(i))return await Ta(i);if(Ca(i)){if(Sa(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return tr(i)||rr(i)?Pa(i):await or(i)}async function Aa(i){try{return await i.decode(),!0}catch{return!1}}async function Oa(i){var f;try{return await((f=i.decode)==null?void 0:f.call(i)),!0}catch{return!1}}function Da(i){return i.format===null}function Sa(i){return i.data.buffer.byteLength===0}function Fa(i){return i.width===0&&i.height===0}function Xe(i,f){return i instanceof DOMException?new DOMException(`${f}: ${i.message}`,i.name):i instanceof Error?new i.constructor(`${f}: ${i.message}`):new Error(`${f}: ${i}`)}const qe=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function xa(i){return i.join("|")}function Ma(i){const f=Qe(i);let s=0,w=qe.length-1;for(;s<=w;){const v=Math.floor((s+w)/2),$=qe[v],H=Qe($);if(H===f)return $;H<f?s=v+1:w=v-1}return"None"}function Qe(i){return i.toLowerCase().replace(/_-\[\]/g,"")}function ja(i,f){return i.Binarizer[f]}function Ia(i,f){return i.CharacterSet[f]}const Ra=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Wa(i){return Ra[i.value]}function ka(i,f){return i.EanAddOnSymbol[f]}function Ha(i,f){return i.TextMode[f]}const $t={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function ir(i,f){return{...f,formats:xa(f.formats),binarizer:ja(i,f.binarizer),eanAddOnSymbol:ka(i,f.eanAddOnSymbol),textMode:Ha(i,f.textMode),characterSet:Ia(i,f.characterSet)}}const Ba={width:200,height:200,format:"QRCode",characterSet:"UTF8",eccLevel:-1,margin:10};function sr(i){return{...i,format:Ma(i.format),eccLevel:i.eccLevel,contentType:Wa(i.contentType)}}const Ua={locateFile:(i,f)=>{const s=i.match(/_(.+?)\.wasm$/);return s?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.0.0/dist/${s[1]}/${i}`:f+i}};let te=new WeakMap;function re(i,f){var s;const w=te.get(i);if(w!=null&&w.modulePromise&&(f===void 0||Object.is(f,w.moduleOverrides)))return w.modulePromise;const v=(s=f!=null?f:w==null?void 0:w.moduleOverrides)!=null?s:Ua,$=i({...v});return te.set(i,{moduleOverrides:v,modulePromise:$}),$}function Va(i,f){te.set(i,{moduleOverrides:f})}async function La(i,f,s=$t){const w={...$t,...s},v=await re(i),{size:$}=f,H=new Uint8Array(await f.arrayBuffer()),L=v._malloc($);v.HEAPU8.set(H,L);const B=v.readBarcodesFromImage(L,$,ir(v,w));v._free(L);const O=[];for(let Y=0;Y<B.size();++Y)O.push(sr(B.get(Y)));return O}async function Ya(i,f,s=$t){const w={...$t,...s},v=await re(i),{data:$,width:H,height:L,data:{byteLength:B}}=f,O=v._malloc(B);v.HEAPU8.set($,O);const Y=v.readBarcodesFromPixmap(O,H,L,ir(v,w));v._free(O);const G=[];for(let U=0;U<Y.size();++U)G.push(sr(Y.get(U)));return G}structuredClone($t);structuredClone(Ba);var jt=(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(f={}){var s=f,w,v;s.ready=new Promise((t,e)=>{w=t,v=e});var $=Object.assign({},s),H="./this.program",L=typeof window=="object",B=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var O="";function Y(t){return s.locateFile?s.locateFile(t,O):O+t}var G;(L||B)&&(B?O=self.location.href:typeof document<"u"&&document.currentScript&&(O=document.currentScript.src),i&&(O=i),O.indexOf("blob:")!==0?O=O.substr(0,O.replace(/[?#].*/,"").lastIndexOf("/")+1):O="",B&&(G=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),s.print||console.log.bind(console);var U=s.printErr||console.error.bind(console);Object.assign(s,$),$=null,s.arguments&&s.arguments,s.thisProgram&&(H=s.thisProgram),s.quit&&s.quit;var Q;s.wasmBinary&&(Q=s.wasmBinary),typeof WebAssembly!="object"&&ft("no native wasm support detected");var tt,lt=!1;function It(t,e){t||ft(e)}var V,k,ot,dt,W,_,ne,ae;function oe(){var t=tt.buffer;s.HEAP8=V=new Int8Array(t),s.HEAP16=ot=new Int16Array(t),s.HEAPU8=k=new Uint8Array(t),s.HEAPU16=dt=new Uint16Array(t),s.HEAP32=W=new Int32Array(t),s.HEAPU32=_=new Uint32Array(t),s.HEAPF32=ne=new Float32Array(t),s.HEAPF64=ae=new Float64Array(t)}var ie=[],se=[],ue=[];function ur(){if(s.preRun)for(typeof s.preRun=="function"&&(s.preRun=[s.preRun]);s.preRun.length;)dr(s.preRun.shift());Rt(ie)}function cr(){Rt(se)}function lr(){if(s.postRun)for(typeof s.postRun=="function"&&(s.postRun=[s.postRun]);s.postRun.length;)fr(s.postRun.shift());Rt(ue)}function dr(t){ie.unshift(t)}function hr(t){se.unshift(t)}function fr(t){ue.unshift(t)}var et=0,ht=null;function pr(t){et++,s.monitorRunDependencies&&s.monitorRunDependencies(et)}function mr(t){if(et--,s.monitorRunDependencies&&s.monitorRunDependencies(et),et==0&&ht){var e=ht;ht=null,e()}}function ft(t){s.onAbort&&s.onAbort(t),t="Aborted("+t+")",U(t),lt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw v(e),e}var yr="data:application/octet-stream;base64,",ce=t=>t.startsWith(yr),it;it="zxing_reader.wasm",ce(it)||(it=Y(it));function le(t){if(t==it&&Q)return new Uint8Array(Q);if(G)return G(t);throw"both async and sync fetching of the wasm failed"}function vr(t){return!Q&&(L||B)&&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(()=>le(t)):Promise.resolve().then(()=>le(t))}function de(t,e,r){return vr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{U(`failed to asynchronously prepare wasm: ${n}`),ft(n)})}function gr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!ce(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(u){return U(`wasm streaming compile failed: ${u}`),U("falling back to ArrayBuffer instantiation"),de(e,r,n)})}):de(e,r,n)}function wr(){var t={a:ta};function e(n,a){return E=n.exports,tt=E.fa,oe(),_e=E.ja,hr(E.ga),mr(),E}pr();function r(n){e(n.instance)}if(s.instantiateWasm)try{return s.instantiateWasm(t,e)}catch(n){U(`Module.instantiateWasm callback failed with error: ${n}`),v(n)}return gr(Q,it,t,r).catch(v),{}}var Rt=t=>{for(;t.length>0;)t.shift()(s)};s.noExitRuntime;var bt=[],Ct=0,$r=t=>{var e=new Wt(t);return e.get_caught()||(e.set_caught(!0),Ct--),e.set_rethrown(!1),bt.push(e),He(e.excPtr),e.get_exception_ptr()},Z=0,br=()=>{A(0,0);var t=bt.pop();ke(t.excPtr),Z=0};function Wt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,V[this.ptr+12>>0]=e},this.get_caught=function(){return V[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,V[this.ptr+13>>0]=e},this.get_rethrown=function(){return V[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){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=Ue(this.get_type());if(e)return _[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var Cr=t=>{throw Z||(Z=t),Z},kt=t=>{var e=Z;if(!e)return wt(0),0;var r=new Wt(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 u=r.ptr+16;if(Be(o,n,u))return wt(o),e}return wt(n),e},_r=()=>kt([]),Tr=t=>kt([t]),Pr=(t,e)=>kt([t,e]),Er=()=>{var t=bt.pop();t||ft("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(bt.push(t),t.set_rethrown(!0),t.set_caught(!1),Ct++),Z=e,Z},Ar=(t,e,r)=>{var n=new Wt(t);throw n.init(e,r),Z=t,Ct++,Z},Or=()=>Ct,_t={},he=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Ht(t){return this.fromWireType(W[t>>2])}var st={},rt={},Tt={},fe,Pt=t=>{throw new fe(t)},nt=(t,e,r)=>{t.forEach(function(c){Tt[c]=e});function n(c){var l=r(c);l.length!==t.length&&Pt("Mismatched type converter count");for(var h=0;h<t.length;++h)X(t[h],l[h])}var a=new Array(e.length),o=[],u=0;e.forEach((c,l)=>{rt.hasOwnProperty(c)?a[l]=rt[c]:(o.push(c),st.hasOwnProperty(c)||(st[c]=[]),st[c].push(()=>{a[l]=rt[c],++u,u===o.length&&n(a)}))}),o.length===0&&n(a)},Dr=t=>{var e=_t[t];delete _t[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(u=>u.getterReturnType).concat(a.map(u=>u.setterArgumentType));nt([t],o,u=>{var c={};return a.forEach((l,h)=>{var p=l.fieldName,y=u[h],g=l.getter,b=l.getterContext,T=u[h+a.length],I=l.setter,P=l.setterContext;c[p]={read:R=>y.fromWireType(g(b,R)),write:(R,d)=>{var m=[];I(P,R,T.toWireType(m,d)),he(m)}}}),[{name:e.name,fromWireType:l=>{var h={};for(var p in c)h[p]=c[p].read(l);return n(l),h},toWireType:(l,h)=>{for(var p in c)if(!(p in h))throw new TypeError(`Missing field: "${p}"`);var y=r();for(p in c)c[p].write(y,h[p]);return l!==null&&l.push(n,y),y},argPackAdvance:q,readValueFromPointer:Ht,destructorFunction:n}]})},Sr=(t,e,r,n,a)=>{},Fr=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);pe=t},pe,j=t=>{for(var e="",r=t;k[r];)e+=pe[k[r++]];return e},ut,C=t=>{throw new ut(t)};function xr(t,e,r={}){var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),rt.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(rt[t]=e,delete Tt[t],st.hasOwnProperty(t)){var a=st[t];delete st[t],a.forEach(o=>o())}}function X(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return xr(t,e,r)}var q=8,Mr=(t,e,r,n)=>{e=j(e),X(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:q,readValueFromPointer:function(a){return this.fromWireType(k[a])},destructorFunction:null})},jr=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Bt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}C(e(t)+" instance already deleted")},Ut=!1,me=t=>{},Ir=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},ye=t=>{t.count.value-=1;var e=t.count.value===0;e&&Ir(t)},ve=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=ve(t,e,r.baseClass);return n===null?null:r.downcast(n)},ge={},Rr=()=>Object.keys(yt).length,Wr=()=>{var t=[];for(var e in yt)yt.hasOwnProperty(e)&&t.push(yt[e]);return t},pt=[],Vt=()=>{for(;pt.length;){var t=pt.pop();t.$$.deleteScheduled=!1,t.delete()}},mt,kr=t=>{mt=t,pt.length&&mt&&mt(Vt)},Hr=()=>{s.getInheritedInstanceCount=Rr,s.getLiveInheritedInstances=Wr,s.flushPendingDeletes=Vt,s.setDelayFunction=kr},yt={},Br=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},Ur=(t,e)=>(e=Br(t,e),yt[e]),Et=(t,e)=>{(!e.ptrType||!e.ptr)&&Pt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Pt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},vt(Object.create(t,{$$:{value:e}}))};function Vr(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?Et(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Et(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),u=ge[o];if(!u)return a.call(this);var c;this.isConst?c=u.constPointerType:c=u.pointerType;var l=ve(e,this.registeredClass,c.registeredClass);return l===null?a.call(this):this.isSmartPointer?Et(c.registeredClass.instancePrototype,{ptrType:c,ptr:l,smartPtrType:this,smartPtr:t}):Et(c.registeredClass.instancePrototype,{ptrType:c,ptr:l})}var vt=t=>typeof FinalizationRegistry>"u"?(vt=e=>e,t):(Ut=new FinalizationRegistry(e=>{ye(e.$$)}),vt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Ut.register(e,a,e)}return e},me=e=>Ut.unregister(e),vt(t)),Lr=()=>{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||Bt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=vt(Object.create(Object.getPrototypeOf(this),{$$:{value:jr(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Bt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),me(this),ye(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Bt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),pt.push(this),pt.length===1&&mt&&mt(Vt),this.$$.deleteScheduled=!0,this}})};function At(){}var Yr=48,zr=57,we=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Yr&&e<=zr?`_${t}`:t};function Lt(t,e){return t=we(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var $e=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`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}},Yt=(t,e,r)=>{s.hasOwnProperty(t)?((r===void 0||s[t].overloadTable!==void 0&&s[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),$e(s,t,t),s.hasOwnProperty(r)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),s[t].overloadTable[r]=e):(s[t]=e,r!==void 0&&(s[t].numArguments=r))};function Nr(t,e,r,n,a,o,u,c){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=u,this.downcast=c,this.pureVirtualFunctions=[]}var zt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function Gr(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=zt(e.$$.ptr,r,this.registeredClass);return n}function Xr(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||C(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`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=zt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`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,K.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:C("Unsupporting sharing policy")}return r}function qr(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=zt(e.$$.ptr,r,this.registeredClass);return n}function be(t){return this.fromWireType(_[t>>2])}var Qr=()=>{Object.assign(Ot.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:q,readValueFromPointer:be,deleteObject(t){t!==null&&t.delete()},fromWireType:Vr})};function Ot(t,e,r,n,a,o,u,c,l,h,p){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=u,this.rawGetPointee=c,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=p,!a&&e.baseClass===void 0?n?(this.toWireType=Gr,this.destructorFunction=null):(this.toWireType=qr,this.destructorFunction=null):this.toWireType=Xr}var Ce=(t,e,r)=>{s.hasOwnProperty(t)||Pt("Replacing nonexistant public symbol"),s[t].overloadTable!==void 0&&r!==void 0?s[t].overloadTable[r]=e:(s[t]=e,s[t].argCount=r)},Zr=(t,e,r)=>{var n=s["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Dt=[],_e,D=t=>{var e=Dt[t];return e||(t>=Dt.length&&(Dt.length=t+1),Dt[t]=e=_e.get(t)),e},Jr=(t,e,r)=>{if(t.includes("j"))return Zr(t,e,r);var n=D(e).apply(null,r);return n},Kr=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Jr(t,e,r)}},N=(t,e)=>{t=j(t);function r(){return t.includes("j")?Kr(t,e):D(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},tn=(t,e)=>{var r=Lt(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},Te,Pe=t=>{var e=We(t),r=j(e);return J(e),r},St=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!rt[o]){if(Tt[o]){Tt[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Te(`${t}: `+r.map(Pe).join([", "]))},en=(t,e,r,n,a,o,u,c,l,h,p,y,g)=>{p=j(p),o=N(a,o),c&&(c=N(u,c)),h&&(h=N(l,h)),g=N(y,g);var b=we(p);Yt(b,function(){St(`Cannot construct ${p} due to unbound types`,[n])}),nt([t,e,r],n?[n]:[],function(T){T=T[0];var I,P;n?(I=T.registeredClass,P=I.instancePrototype):P=At.prototype;var R=Lt(b,function(){if(Object.getPrototypeOf(this)!==d)throw new ut("Use 'new' to construct "+p);if(m.constructor_body===void 0)throw new ut(p+" has no accessible constructor");var Mt=m.constructor_body[arguments.length];if(Mt===void 0)throw new ut(`Tried to invoke ctor of ${p} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return Mt.apply(this,arguments)}),d=Object.create(P,{constructor:{value:R}});R.prototype=d;var m=new Nr(p,R,d,g,I,o,c,h);m.baseClass&&(m.baseClass.__derivedClasses===void 0&&(m.baseClass.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m));var x=new Ot(p,m,!0,!1,!1),M=new Ot(p+"*",m,!1,!1,!1),at=new Ot(p+" const*",m,!1,!0,!1);return ge[t]={pointerType:M,constPointerType:at},Ce(b,R),[x,M,at]})},Nt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+n*4>>2]);return r};function Gt(t,e,r,n,a,o){var u=e.length;u<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var c=e[1]!==null&&r!==null,l=!1,h=1;h<e.length;++h)if(e[h]!==null&&e[h].destructorFunction===void 0){l=!0;break}var p=e[0].name!=="void",y=u-2,g=new Array(y),b=[],T=[];return function(){arguments.length!==y&&C(`function ${t} called with ${arguments.length} arguments, expected ${y}`),T.length=0;var I;b.length=c?2:1,b[0]=a,c&&(I=e[1].toWireType(T,this),b[1]=I);for(var P=0;P<y;++P)g[P]=e[P+2].toWireType(T,arguments[P]),b.push(g[P]);var R=n.apply(null,b);function d(m){if(l)he(T);else for(var x=c?1:2;x<e.length;x++){var M=x===1?I:g[x-2];e[x].destructorFunction!==null&&e[x].destructorFunction(M)}if(p)return e[0].fromWireType(m)}return d(R)}}var rn=(t,e,r,n,a,o)=>{var u=Nt(e,r);a=N(n,a),nt([],[t],function(c){c=c[0];var l=`constructor ${c.name}`;if(c.registeredClass.constructor_body===void 0&&(c.registeredClass.constructor_body=[]),c.registeredClass.constructor_body[e-1]!==void 0)throw new ut(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${c.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return c.registeredClass.constructor_body[e-1]=()=>{St(`Cannot construct ${c.name} due to unbound types`,u)},nt([],u,h=>(h.splice(1,0,null),c.registeredClass.constructor_body[e-1]=Gt(l,h,null,a,o),[])),[]})},Ee=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?(It(t[t.length-1]==")","Parentheses for argument names should match."),t.substr(0,e)):t},nn=(t,e,r,n,a,o,u,c,l)=>{var h=Nt(r,n);e=j(e),e=Ee(e),o=N(a,o),nt([],[t],function(p){p=p[0];var y=`${p.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),c&&p.registeredClass.pureVirtualFunctions.push(e);function g(){St(`Cannot call ${y} due to unbound types`,h)}var b=p.registeredClass.instancePrototype,T=b[e];return T===void 0||T.overloadTable===void 0&&T.className!==p.name&&T.argCount===r-2?(g.argCount=r-2,g.className=p.name,b[e]=g):($e(b,e,y),b[e].overloadTable[r-2]=g),nt([],h,function(I){var P=Gt(y,I,p,o,u);return b[e].overloadTable===void 0?(P.argCount=r-2,b[e]=P):b[e].overloadTable[r-2]=P,[]}),[]})};function an(){Object.assign(Ae.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 Ae(){this.allocated=[void 0],this.freelist=[]}var z=new Ae,Oe=t=>{t>=z.reserved&&--z.get(t).refcount===0&&z.free(t)},on=()=>{for(var t=0,e=z.reserved;e<z.allocated.length;++e)z.allocated[e]!==void 0&&++t;return t},sn=()=>{z.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),z.reserved=z.allocated.length,s.count_emval_handles=on},K={toValue:t=>(t||C("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})}}},un=(t,e)=>{e=j(e),X(t,{name:e,fromWireType:r=>{var n=K.toValue(r);return Oe(r),n},toWireType:(r,n)=>K.toHandle(n),argPackAdvance:q,readValueFromPointer:Ht,destructorFunction:null})},cn=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(V[n>>0])}:function(n){return this.fromWireType(k[n>>0])};case 2:return r?function(n){return this.fromWireType(ot[n>>1])}:function(n){return this.fromWireType(dt[n>>1])};case 4:return r?function(n){return this.fromWireType(W[n>>2])}:function(n){return this.fromWireType(_[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},ln=(t,e,r,n)=>{e=j(e);function a(){}a.values={},X(t,{name:e,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,u)=>u.value,argPackAdvance:q,readValueFromPointer:cn(e,r,n),destructorFunction:null}),Yt(e,a)},Xt=(t,e)=>{var r=rt[t];return r===void 0&&C(e+" has unknown type "+Pe(t)),r},dn=(t,e,r)=>{var n=Xt(t,"enum");e=j(e);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Lt(`${n.name}_${e}`,function(){})}});a.values[r]=o,a[e]=o},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(ne[r>>2])};case 8:return function(r){return this.fromWireType(ae[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},fn=(t,e,r)=>{e=j(e),X(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:q,readValueFromPointer:hn(e,r),destructorFunction:null})},pn=(t,e,r,n,a,o,u)=>{var c=Nt(e,r);t=j(t),t=Ee(t),a=N(n,a),Yt(t,function(){St(`Cannot call ${t} due to unbound types`,c)},e-1),nt([],c,function(l){var h=[l[0],null].concat(l.slice(1));return Ce(t,Gt(t,h,null,a,o),e-1),[]})},mn=(t,e,r)=>{switch(e){case 1:return r?n=>V[n>>0]:n=>k[n>>0];case 2:return r?n=>ot[n>>1]:n=>dt[n>>1];case 4:return r?n=>W[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},yn=(t,e,r,n,a)=>{e=j(e);var o=p=>p;if(n===0){var u=32-8*r;o=p=>p<<u>>>u}var c=e.includes("unsigned"),l=(p,y)=>{},h;c?h=function(p,y){return l(y,this.name),y>>>0}:h=function(p,y){return l(y,this.name),y},X(t,{name:e,fromWireType:o,toWireType:h,argPackAdvance:q,readValueFromPointer:mn(e,r,n!==0),destructorFunction:null})},vn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(u){var c=_[u>>2],l=_[u+4>>2];return new a(V.buffer,l,c)}r=j(r),X(t,{name:r,fromWireType:o,argPackAdvance:q,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},De=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,u=0;u<t.length;++u){var c=t.charCodeAt(u);if(c>=55296&&c<=57343){var l=t.charCodeAt(++u);c=65536+((c&1023)<<10)|l&1023}if(c<=127){if(r>=o)break;e[r++]=c}else if(c<=2047){if(r+1>=o)break;e[r++]=192|c>>6,e[r++]=128|c&63}else if(c<=65535){if(r+2>=o)break;e[r++]=224|c>>12,e[r++]=128|c>>6&63,e[r++]=128|c&63}else{if(r+3>=o)break;e[r++]=240|c>>18,e[r++]=128|c>>12&63,e[r++]=128|c>>6&63,e[r++]=128|c&63}}return e[r]=0,r-a},gn=(t,e,r)=>De(t,k,e,r),Se=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},Fe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,wn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Fe)return Fe.decode(t.subarray(e,a));for(var o="";e<a;){var u=t[e++];if(!(u&128)){o+=String.fromCharCode(u);continue}var c=t[e++]&63;if((u&224)==192){o+=String.fromCharCode((u&31)<<6|c);continue}var l=t[e++]&63;if((u&240)==224?u=(u&15)<<12|c<<6|l:u=(u&7)<<18|c<<12|l<<6|t[e++]&63,u<65536)o+=String.fromCharCode(u);else{var h=u-65536;o+=String.fromCharCode(55296|h>>10,56320|h&1023)}}return o},Qt=(t,e)=>t?wn(k,t,e):"",$n=(t,e)=>{e=j(e);var r=e==="std::string";X(t,{name:e,fromWireType(n){var a=_[n>>2],o=n+4,u;if(r)for(var c=o,l=0;l<=a;++l){var h=o+l;if(l==a||k[h]==0){var p=h-c,y=Qt(c,p);u===void 0?u=y:(u+="\0",u+=y),c=h+1}}else{for(var g=new Array(a),l=0;l<a;++l)g[l]=String.fromCharCode(k[o+l]);u=g.join("")}return J(n),u},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,u=typeof a=="string";u||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||C("Cannot pass non-string to std::string"),r&&u?o=Se(a):o=a.length;var c=Jt(4+o+1),l=c+4;if(_[c>>2]=o,r&&u)gn(a,l,o+1);else if(u)for(var h=0;h<o;++h){var p=a.charCodeAt(h);p>255&&(J(l),C("String has UTF-16 code units that do not fit in 8 bits")),k[l+h]=p}else for(var h=0;h<o;++h)k[l+h]=a[h];return n!==null&&n.push(J,c),c},argPackAdvance:q,readValueFromPointer:be,destructorFunction(n){J(n)}})},xe=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,bn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&dt[n];)++n;if(r=n<<1,r-t>32&&xe)return xe.decode(k.subarray(t,r));for(var o="",u=0;!(u>=e/2);++u){var c=ot[t+u*2>>1];if(c==0)break;o+=String.fromCharCode(c)}return o},Cn=(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 u=t.charCodeAt(o);ot[e>>1]=u,e+=2}return ot[e>>1]=0,e-n},_n=t=>t.length*2,Tn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=W[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},Pn=(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 u=t.charCodeAt(o);if(u>=55296&&u<=57343){var c=t.charCodeAt(++o);u=65536+((u&1023)<<10)|c&1023}if(W[e>>2]=u,e+=4,e+4>a)break}return W[e>>2]=0,e-n},En=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},An=(t,e,r)=>{r=j(r);var n,a,o,u,c;e===2?(n=bn,a=Cn,u=_n,o=()=>dt,c=1):e===4&&(n=Tn,a=Pn,u=En,o=()=>_,c=2),X(t,{name:r,fromWireType:l=>{for(var h=_[l>>2],p=o(),y,g=l+4,b=0;b<=h;++b){var T=l+4+b*e;if(b==h||p[T>>c]==0){var I=T-g,P=n(g,I);y===void 0?y=P:(y+="\0",y+=P),g=T+e}}return J(l),y},toWireType:(l,h)=>{typeof h!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var p=u(h),y=Jt(4+p+e);return _[y>>2]=p>>c,a(h,y+4,p+e),l!==null&&l.push(J,y),y},argPackAdvance:q,readValueFromPointer:Ht,destructorFunction(l){J(l)}})},On=(t,e,r,n,a,o)=>{_t[t]={name:j(e),rawConstructor:N(r,n),rawDestructor:N(a,o),fields:[]}},Dn=(t,e,r,n,a,o,u,c,l,h)=>{_t[t].fields.push({fieldName:j(e),getterReturnType:r,getter:N(n,a),getterContext:o,setterArgumentType:u,setter:N(c,l),setterContext:h})},Sn=(t,e)=>{e=j(e),X(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Fn={},xn=t=>{var e=Fn[t];return e===void 0?j(t):e},Me=()=>{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.")},Mn=t=>t===0?K.toHandle(Me()):(t=xn(t),K.toHandle(Me()[t])),jn=t=>{t>4&&(z.get(t).refcount+=1)},In=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var u=Xt(_[n+o*4>>2],"parameter "+o);e[o+1]=u.readValueFromPointer(a),a+=u.argPackAdvance}var c=new(r.bind.apply(r,e));return K.toHandle(c)}},je={},Rn=(t,e,r,n)=>{t=K.toValue(t);var a=je[e];return a||(a=In(e),je[e]=a),a(t,r,n)},Wn=(t,e)=>{t=Xt(t,"_emval_take_value");var r=t.readValueFromPointer(e);return K.toHandle(r)},kn=()=>{ft("")},Hn=(t,e,r)=>k.copyWithin(t,e,e+r),Bn=()=>2147483648,Un=t=>{var e=tt.buffer,r=(t-e.byteLength+65535)/65536;try{return tt.grow(r),oe(),1}catch{}},Vn=t=>{var e=k.length;t>>>=0;var r=Bn();if(t>r)return!1;for(var n=(l,h)=>l+(h-l%h)%h,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var u=Math.min(r,n(Math.max(t,o),65536)),c=Un(u);if(c)return!0}return!1},Zt={},Ln=()=>H||"./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,_:Ln()};for(var r in Zt)Zt[r]===void 0?delete e[r]:e[r]=Zt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);gt.strings=n}return gt.strings},Yn=(t,e)=>{for(var r=0;r<t.length;++r)V[e++>>0]=t.charCodeAt(r);V[e>>0]=0},zn=(t,e)=>{var r=0;return gt().forEach((n,a)=>{var o=e+r;_[t+a*4>>2]=o,Yn(n,o),r+=n.length+1}),0},Nn=(t,e)=>{var r=gt();_[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),_[e>>2]=n,0},Gn=t=>t,Ft=t=>t%4===0&&(t%100!==0||t%400===0),Xn=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Ie=[31,29,31,30,31,30,31,31,30,31,30,31],Re=[31,28,31,30,31,30,31,31,30,31,30,31],qn=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Ft(r.getFullYear()),a=r.getMonth(),o=(n?Ie:Re)[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 Qn(t,e,r){var n=r>0?r:Se(t)+1,a=new Array(n),o=De(t,a,0,a.length);return e&&(a.length=o),a}var Zn=(t,e)=>{V.set(t,e)},Jn=(t,e,r,n)=>{var a=_[n+40>>2],o={tm_sec:W[n>>2],tm_min:W[n+4>>2],tm_hour:W[n+8>>2],tm_mday:W[n+12>>2],tm_mon:W[n+16>>2],tm_year:W[n+20>>2],tm_wday:W[n+24>>2],tm_yday:W[n+28>>2],tm_isdst:W[n+32>>2],tm_gmtoff:W[n+36>>2],tm_zone:a?Qt(a):""},u=Qt(r),c={"%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 c)u=u.replace(new RegExp(l,"g"),c[l]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,m,x){for(var M=typeof d=="number"?d.toString():d||"";M.length<m;)M=x[0]+M;return M}function g(d,m){return y(d,m,"0")}function b(d,m){function x(at){return at<0?-1:at>0?1:0}var M;return(M=x(d.getFullYear()-m.getFullYear()))===0&&(M=x(d.getMonth()-m.getMonth()))===0&&(M=x(d.getDate()-m.getDate())),M}function T(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 I(d){var m=qn(new Date(d.tm_year+1900,0,1),d.tm_yday),x=new Date(m.getFullYear(),0,4),M=new Date(m.getFullYear()+1,0,4),at=T(x),Mt=T(M);return b(at,m)<=0?b(Mt,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var P={"%a":d=>h[d.tm_wday].substring(0,3),"%A":d=>h[d.tm_wday],"%b":d=>p[d.tm_mon].substring(0,3),"%B":d=>p[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=>I(d).toString().substring(2),"%G":d=>I(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+Xn(Ft(d.tm_year+1900)?Ie:Re,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 x=(d.tm_wday+371-d.tm_yday)%7;x!=4&&(x!=3||!Ft(d.tm_year))&&(m=1)}}else{m=52;var M=(d.tm_wday+7-d.tm_yday-1)%7;(M==4||M==5&&Ft(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,x=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(x?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};u=u.replace(/%%/g,"\0\0");for(var l in P)u.includes(l)&&(u=u.replace(new RegExp(l,"g"),P[l](o)));u=u.replace(/\0\0/g,"%");var R=Qn(u,!1);return R.length>e?0:(Zn(R,t),R.length-1)},Kn=(t,e,r,n,a)=>Jn(t,e,r,n);fe=s.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Fr(),ut=s.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Lr(),Hr(),Qr(),Te=s.UnboundTypeError=tn(Error,"UnboundTypeError"),an(),sn();var ta={s:$r,v:br,b:_r,g:Tr,q:Pr,I:Er,f:Ar,T:Or,d:Cr,ba:Dr,P:Sr,Y:Mr,aa:en,$:rn,w:nn,X:un,x:ln,h:dn,K:fn,L:pn,t:yn,n:vn,J:$n,C:An,A:On,ca:Dn,Z:Sn,ea:Oe,da:Mn,M:jn,V:Rn,_:Wn,B:kn,W:Hn,U:Vn,R:zn,S:Nn,D:ma,E:pa,m:ya,a:ea,e:oa,o:ua,k:aa,G:ha,u:la,F:fa,z:ga,O:$a,l:ia,j:sa,c:na,p:ra,H:da,r:va,i:ca,y:wa,N:Gn,Q:Kn},E=wr(),J=s._free=t=>(J=s._free=E.ha)(t),Jt=s._malloc=t=>(Jt=s._malloc=E.ia)(t),We=t=>(We=E.ka)(t);s.__embind_initialize_bindings=()=>(s.__embind_initialize_bindings=E.la)();var A=(t,e)=>(A=E.ma)(t,e),wt=t=>(wt=E.na)(t),S=()=>(S=E.oa)(),F=t=>(F=E.pa)(t),ke=t=>(ke=E.qa)(t),He=t=>(He=E.ra)(t),Be=(t,e,r)=>(Be=E.sa)(t,e,r),Ue=t=>(Ue=E.ta)(t);s.dynCall_viijii=(t,e,r,n,a,o,u)=>(s.dynCall_viijii=E.ua)(t,e,r,n,a,o,u);var Ve=s.dynCall_jiiii=(t,e,r,n,a)=>(Ve=s.dynCall_jiiii=E.va)(t,e,r,n,a);s.dynCall_iiiiij=(t,e,r,n,a,o,u)=>(s.dynCall_iiiiij=E.wa)(t,e,r,n,a,o,u),s.dynCall_iiiiijj=(t,e,r,n,a,o,u,c,l)=>(s.dynCall_iiiiijj=E.xa)(t,e,r,n,a,o,u,c,l),s.dynCall_iiiiiijj=(t,e,r,n,a,o,u,c,l,h)=>(s.dynCall_iiiiiijj=E.ya)(t,e,r,n,a,o,u,c,l,h);function ea(t,e){var r=S();try{return D(t)(e)}catch(n){if(F(r),n!==n+0)throw n;A(1,0)}}function ra(t,e,r,n){var a=S();try{D(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function na(t,e,r){var n=S();try{D(t)(e,r)}catch(a){if(F(n),a!==a+0)throw a;A(1,0)}}function aa(t,e,r,n,a){var o=S();try{return D(t)(e,r,n,a)}catch(u){if(F(o),u!==u+0)throw u;A(1,0)}}function oa(t,e,r){var n=S();try{return D(t)(e,r)}catch(a){if(F(n),a!==a+0)throw a;A(1,0)}}function ia(t){var e=S();try{D(t)()}catch(r){if(F(e),r!==r+0)throw r;A(1,0)}}function sa(t,e){var r=S();try{D(t)(e)}catch(n){if(F(r),n!==n+0)throw n;A(1,0)}}function ua(t,e,r,n){var a=S();try{return D(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function ca(t,e,r,n,a,o,u,c,l,h,p){var y=S();try{D(t)(e,r,n,a,o,u,c,l,h,p)}catch(g){if(F(y),g!==g+0)throw g;A(1,0)}}function la(t,e,r,n,a,o,u){var c=S();try{return D(t)(e,r,n,a,o,u)}catch(l){if(F(c),l!==l+0)throw l;A(1,0)}}function da(t,e,r,n,a){var o=S();try{D(t)(e,r,n,a)}catch(u){if(F(o),u!==u+0)throw u;A(1,0)}}function ha(t,e,r,n,a,o){var u=S();try{return D(t)(e,r,n,a,o)}catch(c){if(F(u),c!==c+0)throw c;A(1,0)}}function fa(t,e,r,n,a,o,u,c){var l=S();try{return D(t)(e,r,n,a,o,u,c)}catch(h){if(F(l),h!==h+0)throw h;A(1,0)}}function pa(t,e,r,n){var a=S();try{return D(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function ma(t,e,r,n){var a=S();try{return D(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function ya(t){var e=S();try{return D(t)()}catch(r){if(F(e),r!==r+0)throw r;A(1,0)}}function va(t,e,r,n,a,o,u,c){var l=S();try{D(t)(e,r,n,a,o,u,c)}catch(h){if(F(l),h!==h+0)throw h;A(1,0)}}function ga(t,e,r,n,a,o,u,c,l,h,p,y){var g=S();try{return D(t)(e,r,n,a,o,u,c,l,h,p,y)}catch(b){if(F(g),b!==b+0)throw b;A(1,0)}}function wa(t,e,r,n,a,o,u,c,l,h,p,y,g,b,T,I){var P=S();try{D(t)(e,r,n,a,o,u,c,l,h,p,y,g,b,T,I)}catch(R){if(F(P),R!==R+0)throw R;A(1,0)}}function $a(t,e,r,n,a){var o=S();try{return Ve(t,e,r,n,a)}catch(u){if(F(o),u!==u+0)throw u;A(1,0)}}var xt;ht=function t(){xt||Le(),xt||(ht=t)};function Le(){if(et>0||(ur(),et>0))return;function t(){xt||(xt=!0,s.calledRun=!0,!lt&&(cr(),w(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),lr()))}s.setStatus?(s.setStatus("Running..."),setTimeout(function(){setTimeout(function(){s.setStatus("")},1),t()},1)):t()}if(s.preInit)for(typeof s.preInit=="function"&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();return Le(),f.ready}})();function za(i){return re(jt,i)}function Na(i){return Va(jt,i)}async function Ga(i,f){return La(jt,i,f)}async function Xa(i,f){return Ya(jt,i,f)}const ee=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 qa(i){for(const[f,s]of ee)if(i===s)return f;return"unknown"}var ct;class Qa extends EventTarget{constructor(s={}){var w;super();ze(this,ct,void 0);try{const v=(w=s==null?void 0:s.formats)==null?void 0:w.filter($=>$!=="unknown");if((v==null?void 0:v.length)===0)throw new TypeError("Hint option provided, but is empty.");v==null||v.forEach($=>{if(!Ge.includes($))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${$}' is not a valid enum value of type BarcodeFormat.`)}),Ne(this,ct,v!=null?v:[]),za().then($=>{this.dispatchEvent(new CustomEvent("load",{detail:$}))}).catch($=>{this.dispatchEvent(new CustomEvent("error",{detail:$}))})}catch(v){throw Xe(v,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Ge.filter(s=>s!=="unknown")}async detect(s){try{const w=await Ea(s);if(w===null)return[];let v;try{ar(w)?v=await Ga(w,{tryHarder:!0,formats:Kt(this,ct).map($=>ee.get($))}):v=await Xa(w,{tryHarder:!0,formats:Kt(this,ct).map($=>ee.get($))})}catch($){throw console.error($),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return v.map($=>{const{topLeft:{x:H,y:L},topRight:{x:B,y:O},bottomLeft:{x:Y,y:G},bottomRight:{x:U,y:Q}}=$.position,tt=Math.min(H,B,Y,U),lt=Math.min(L,O,G,Q),It=Math.max(H,B,Y,U),V=Math.max(L,O,G,Q);return{boundingBox:new DOMRectReadOnly(tt,lt,It-tt,V-lt),rawValue:$.text,format:qa($.format),cornerPoints:[{x:H,y:L},{x:B,y:O},{x:U,y:Q},{x:Y,y:G}]}})}catch(w){throw Xe(w,"Failed to execute 'detect' on 'BarcodeDetector'")}}}ct=new WeakMap;exports.BarcodeDetector=Qa;exports.setZXingModuleOverrides=Na;
"use strict";var Ye=(o,f,s)=>{if(!f.has(o))throw TypeError("Cannot "+s)};var te=(o,f,s)=>(Ye(o,f,"read from private field"),s?s.call(o):f.get(o)),ze=(o,f,s)=>{if(f.has(o))throw TypeError("Cannot add the same private member more than once");f instanceof WeakSet?f.add(o):f.set(o,s)},Ne=(o,f,s,w)=>(Ye(o,f,"write to private field"),w?w.call(o,s):f.set(o,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Qe=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],ba=[...Qe,["unknown"]].map(o=>o[0]),jt=new Map(Qe);function Ca(o){for(const[f,s]of jt)if(o===s)return f;return"unknown"}function _a(o){if(Ze(o))return{width:o.naturalWidth,height:o.naturalHeight};if(Je(o))return{width:o.width.baseVal.value,height:o.height.baseVal.value};if(Ke(o))return{width:o.videoWidth,height:o.videoHeight};if(er(o))return{width:o.width,height:o.height};if(nr(o))return{width:o.displayWidth,height:o.displayHeight};if(tr(o))return{width:o.width,height:o.height};if(rr(o))return{width:o.width,height:o.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 Ze(o){try{return o instanceof HTMLImageElement}catch{return!1}}function Je(o){try{return o instanceof SVGImageElement}catch{return!1}}function Ke(o){try{return o instanceof HTMLVideoElement}catch{return!1}}function tr(o){try{return o instanceof HTMLCanvasElement}catch{return!1}}function er(o){try{return o instanceof ImageBitmap}catch{return!1}}function rr(o){try{return o instanceof OffscreenCanvas}catch{return!1}}function nr(o){try{return o instanceof VideoFrame}catch{return!1}}function ar(o){try{return o instanceof Blob}catch{return!1}}function Ta(o){try{return o instanceof ImageData}catch{return!1}}function Pa(o,f){try{const s=new OffscreenCanvas(o,f);if(s.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return s;throw void 0}catch{const s=document.createElement("canvas");return s.width=o,s.height=f,s}}async function or(o){if(Ze(o)&&!await Oa(o))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Je(o)&&!await xa(o))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(nr(o)&&Fa(o))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Ke(o)&&(o.readyState===0||o.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(er(o)&&Ma(o))throw new DOMException("The image source is detached.","InvalidStateError");const{width:f,height:s}=_a(o);if(f===0||s===0)return null;const v=Pa(f,s).getContext("2d");v.drawImage(o,0,0);try{return v.getImageData(0,0,f,s)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ea(o){let f;try{if(globalThis.createImageBitmap)f=await createImageBitmap(o);else if(globalThis.Image){f=new Image;let w="";try{w=URL.createObjectURL(o),f.src=w,await f.decode()}finally{URL.revokeObjectURL(w)}}else return o}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await or(f)}function Aa(o){const{width:f,height:s}=o;if(f===0||s===0)return null;const w=o.getContext("2d");try{return w.getImageData(0,0,f,s)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Da(o){if(ar(o))return await Ea(o);if(Ta(o)){if(Sa(o))throw new DOMException("The image data has been detached.","InvalidStateError");return o}return tr(o)||rr(o)?Aa(o):await or(o)}async function Oa(o){try{return await o.decode(),!0}catch{return!1}}async function xa(o){var f;try{return await((f=o.decode)==null?void 0:f.call(o)),!0}catch{return!1}}function Fa(o){return o.format===null}function Sa(o){return o.data.buffer.byteLength===0}function Ma(o){return o.width===0&&o.height===0}function Ge(o,f){return o instanceof DOMException?new DOMException(`${f}: ${o.message}`,o.name):o instanceof Error?new o.constructor(`${f}: ${o.message}`):new Error(`${f}: ${o}`)}const Xe=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function ja(o){return o.join("|")}function Ia(o){const f=qe(o);let s=0,w=Xe.length-1;for(;s<=w;){const v=Math.floor((s+w)/2),$=Xe[v],H=qe($);if(H===f)return $;H<f?s=v+1:w=v-1}return"None"}function qe(o){return o.toLowerCase().replace(/_-\[\]/g,"")}function Ra(o,f){return o.Binarizer[f]}function Wa(o,f){return o.CharacterSet[f]}const ka=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Ha(o){return ka[o.value]}function Ba(o,f){return o.EanAddOnSymbol[f]}function Ua(o,f){return o.TextMode[f]}const $t={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function ir(o,f){return{...f,formats:ja(f.formats),binarizer:Ra(o,f.binarizer),eanAddOnSymbol:Ba(o,f.eanAddOnSymbol),textMode:Ua(o,f.textMode),characterSet:Wa(o,f.characterSet)}}const La={width:200,height:200,format:"QRCode",characterSet:"UTF8",eccLevel:-1,margin:10};function sr(o){return{...o,format:Ia(o.format),eccLevel:o.eccLevel,contentType:Ha(o.contentType)}}const Va={locateFile:(o,f)=>{const s=o.match(/_(.+?)\.wasm$/);return s?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.1/dist/${s[1]}/${o}`:f+o}};let ee=new WeakMap;function re(o,f){var s;const w=ee.get(o);if(w!=null&&w.modulePromise&&(f===void 0||Object.is(f,w.moduleOverrides)))return w.modulePromise;const v=(s=f!=null?f:w==null?void 0:w.moduleOverrides)!=null?s:Va,$=o({...v});return ee.set(o,{moduleOverrides:v,modulePromise:$}),$}function Ya(o,f){ee.set(o,{moduleOverrides:f})}async function za(o,f,s=$t){const w={...$t,...s},v=await re(o),{size:$}=f,H=new Uint8Array(await f.arrayBuffer()),V=v._malloc($);v.HEAPU8.set(H,V);const B=v.readBarcodesFromImage(V,$,ir(v,w));v._free(V);const D=[];for(let Y=0;Y<B.size();++Y)D.push(sr(B.get(Y)));return D}async function Na(o,f,s=$t){const w={...$t,...s},v=await re(o),{data:$,width:H,height:V,data:{byteLength:B}}=f,D=v._malloc(B);v.HEAPU8.set($,D);const Y=v.readBarcodesFromPixmap(D,H,V,ir(v,w));v._free(D);const G=[];for(let U=0;U<Y.size();++U)G.push(sr(Y.get(U)));return G}structuredClone($t);structuredClone(La);var It=(()=>{var o=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(f={}){var s=f,w,v;s.ready=new Promise((t,e)=>{w=t,v=e});var $=Object.assign({},s),H="./this.program",V=typeof window=="object",B=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var D="";function Y(t){return s.locateFile?s.locateFile(t,D):D+t}var G;(V||B)&&(B?D=self.location.href:typeof document<"u"&&document.currentScript&&(D=document.currentScript.src),o&&(D=o),D.indexOf("blob:")!==0?D=D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1):D="",B&&(G=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),s.print||console.log.bind(console);var U=s.printErr||console.error.bind(console);Object.assign(s,$),$=null,s.arguments&&s.arguments,s.thisProgram&&(H=s.thisProgram),s.quit&&s.quit;var Q;s.wasmBinary&&(Q=s.wasmBinary),typeof WebAssembly!="object"&&ft("no native wasm support detected");var tt,lt=!1;function Rt(t,e){t||ft(e)}var L,k,ot,dt,W,_,ne,ae;function oe(){var t=tt.buffer;s.HEAP8=L=new Int8Array(t),s.HEAP16=ot=new Int16Array(t),s.HEAPU8=k=new Uint8Array(t),s.HEAPU16=dt=new Uint16Array(t),s.HEAP32=W=new Int32Array(t),s.HEAPU32=_=new Uint32Array(t),s.HEAPF32=ne=new Float32Array(t),s.HEAPF64=ae=new Float64Array(t)}var ie=[],se=[],ue=[];function ur(){if(s.preRun)for(typeof s.preRun=="function"&&(s.preRun=[s.preRun]);s.preRun.length;)dr(s.preRun.shift());Wt(ie)}function cr(){Wt(se)}function lr(){if(s.postRun)for(typeof s.postRun=="function"&&(s.postRun=[s.postRun]);s.postRun.length;)fr(s.postRun.shift());Wt(ue)}function dr(t){ie.unshift(t)}function hr(t){se.unshift(t)}function fr(t){ue.unshift(t)}var et=0,ht=null;function pr(t){et++,s.monitorRunDependencies&&s.monitorRunDependencies(et)}function mr(t){if(et--,s.monitorRunDependencies&&s.monitorRunDependencies(et),et==0&&ht){var e=ht;ht=null,e()}}function ft(t){s.onAbort&&s.onAbort(t),t="Aborted("+t+")",U(t),lt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw v(e),e}var yr="data:application/octet-stream;base64,",ce=t=>t.startsWith(yr),it;it="zxing_reader.wasm",ce(it)||(it=Y(it));function le(t){if(t==it&&Q)return new Uint8Array(Q);if(G)return G(t);throw"both async and sync fetching of the wasm failed"}function vr(t){return!Q&&(V||B)&&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(()=>le(t)):Promise.resolve().then(()=>le(t))}function de(t,e,r){return vr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{U(`failed to asynchronously prepare wasm: ${n}`),ft(n)})}function gr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!ce(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var i=WebAssembly.instantiateStreaming(a,r);return i.then(n,function(u){return U(`wasm streaming compile failed: ${u}`),U("falling back to ArrayBuffer instantiation"),de(e,r,n)})}):de(e,r,n)}function wr(){var t={a:ta};function e(n,a){return E=n.exports,tt=E.fa,oe(),_e=E.ja,hr(E.ga),mr(),E}pr();function r(n){e(n.instance)}if(s.instantiateWasm)try{return s.instantiateWasm(t,e)}catch(n){U(`Module.instantiateWasm callback failed with error: ${n}`),v(n)}return gr(Q,it,t,r).catch(v),{}}var Wt=t=>{for(;t.length>0;)t.shift()(s)};s.noExitRuntime;var bt=[],Ct=0,$r=t=>{var e=new kt(t);return e.get_caught()||(e.set_caught(!0),Ct--),e.set_rethrown(!1),bt.push(e),He(e.excPtr),e.get_exception_ptr()},Z=0,br=()=>{A(0,0);var t=bt.pop();ke(t.excPtr),Z=0};function kt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[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){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=Ue(this.get_type());if(e)return _[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var Cr=t=>{throw Z||(Z=t),Z},Ht=t=>{var e=Z;if(!e)return wt(0),0;var r=new kt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return wt(0),e;for(var a in t){var i=t[a];if(i===0||i===n)break;var u=r.ptr+16;if(Be(i,n,u))return wt(i),e}return wt(n),e},_r=()=>Ht([]),Tr=t=>Ht([t]),Pr=(t,e)=>Ht([t,e]),Er=()=>{var t=bt.pop();t||ft("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(bt.push(t),t.set_rethrown(!0),t.set_caught(!1),Ct++),Z=e,Z},Ar=(t,e,r)=>{var n=new kt(t);throw n.init(e,r),Z=t,Ct++,Z},Dr=()=>Ct,_t={},he=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Bt(t){return this.fromWireType(W[t>>2])}var st={},rt={},Tt={},fe,Pt=t=>{throw new fe(t)},nt=(t,e,r)=>{t.forEach(function(c){Tt[c]=e});function n(c){var l=r(c);l.length!==t.length&&Pt("Mismatched type converter count");for(var h=0;h<t.length;++h)X(t[h],l[h])}var a=new Array(e.length),i=[],u=0;e.forEach((c,l)=>{rt.hasOwnProperty(c)?a[l]=rt[c]:(i.push(c),st.hasOwnProperty(c)||(st[c]=[]),st[c].push(()=>{a[l]=rt[c],++u,u===i.length&&n(a)}))}),i.length===0&&n(a)},Or=t=>{var e=_t[t];delete _t[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,i=a.map(u=>u.getterReturnType).concat(a.map(u=>u.setterArgumentType));nt([t],i,u=>{var c={};return a.forEach((l,h)=>{var p=l.fieldName,y=u[h],g=l.getter,b=l.getterContext,T=u[h+a.length],I=l.setter,P=l.setterContext;c[p]={read:R=>y.fromWireType(g(b,R)),write:(R,d)=>{var m=[];I(P,R,T.toWireType(m,d)),he(m)}}}),[{name:e.name,fromWireType:l=>{var h={};for(var p in c)h[p]=c[p].read(l);return n(l),h},toWireType:(l,h)=>{for(var p in c)if(!(p in h))throw new TypeError(`Missing field: "${p}"`);var y=r();for(p in c)c[p].write(y,h[p]);return l!==null&&l.push(n,y),y},argPackAdvance:q,readValueFromPointer:Bt,destructorFunction:n}]})},xr=(t,e,r,n,a)=>{},Fr=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);pe=t},pe,j=t=>{for(var e="",r=t;k[r];)e+=pe[k[r++]];return e},ut,C=t=>{throw new ut(t)};function Sr(t,e,r={}){var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),rt.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(rt[t]=e,delete Tt[t],st.hasOwnProperty(t)){var a=st[t];delete st[t],a.forEach(i=>i())}}function X(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Sr(t,e,r)}var q=8,Mr=(t,e,r,n)=>{e=j(e),X(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,i){return i?r:n},argPackAdvance:q,readValueFromPointer:function(a){return this.fromWireType(k[a])},destructorFunction:null})},jr=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Ut=t=>{function e(r){return r.$$.ptrType.registeredClass.name}C(e(t)+" instance already deleted")},Lt=!1,me=t=>{},Ir=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},ye=t=>{t.count.value-=1;var e=t.count.value===0;e&&Ir(t)},ve=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=ve(t,e,r.baseClass);return n===null?null:r.downcast(n)},ge={},Rr=()=>Object.keys(yt).length,Wr=()=>{var t=[];for(var e in yt)yt.hasOwnProperty(e)&&t.push(yt[e]);return t},pt=[],Vt=()=>{for(;pt.length;){var t=pt.pop();t.$$.deleteScheduled=!1,t.delete()}},mt,kr=t=>{mt=t,pt.length&&mt&&mt(Vt)},Hr=()=>{s.getInheritedInstanceCount=Rr,s.getLiveInheritedInstances=Wr,s.flushPendingDeletes=Vt,s.setDelayFunction=kr},yt={},Br=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},Ur=(t,e)=>(e=Br(t,e),yt[e]),Et=(t,e)=>{(!e.ptrType||!e.ptr)&&Pt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Pt("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=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?Et(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Et(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i=this.registeredClass.getActualType(e),u=ge[i];if(!u)return a.call(this);var c;this.isConst?c=u.constPointerType:c=u.pointerType;var l=ve(e,this.registeredClass,c.registeredClass);return l===null?a.call(this):this.isSmartPointer?Et(c.registeredClass.instancePrototype,{ptrType:c,ptr:l,smartPtrType:this,smartPtr:t}):Et(c.registeredClass.instancePrototype,{ptrType:c,ptr:l})}var vt=t=>typeof FinalizationRegistry>"u"?(vt=e=>e,t):(Lt=new FinalizationRegistry(e=>{ye(e.$$)}),vt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Lt.register(e,a,e)}return e},me=e=>Lt.unregister(e),vt(t)),Vr=()=>{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||Ut(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=vt(Object.create(Object.getPrototypeOf(this),{$$:{value:jr(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Ut(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),me(this),ye(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Ut(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),pt.push(this),pt.length===1&&mt&&mt(Vt),this.$$.deleteScheduled=!0,this}})};function At(){}var Yr=48,zr=57,we=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Yr&&e<=zr?`_${t}`:t};function Yt(t,e){return t=we(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var $e=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`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}},zt=(t,e,r)=>{s.hasOwnProperty(t)?((r===void 0||s[t].overloadTable!==void 0&&s[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),$e(s,t,t),s.hasOwnProperty(r)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),s[t].overloadTable[r]=e):(s[t]=e,r!==void 0&&(s[t].numArguments=r))};function Nr(t,e,r,n,a,i,u,c){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=i,this.upcast=u,this.downcast=c,this.pureVirtualFunctions=[]}var Nt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function Gr(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${Qt(e)}" as a ${this.name}`),e.$$.ptr||C(`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 Xr(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||C(`Cannot pass "${Qt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`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&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`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,K.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:C("Unsupporting sharing policy")}return r}function qr(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${Qt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`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 be(t){return this.fromWireType(_[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:q,readValueFromPointer:be,deleteObject(t){t!==null&&t.delete()},fromWireType:Lr})};function Dt(t,e,r,n,a,i,u,c,l,h,p){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=i,this.sharingPolicy=u,this.rawGetPointee=c,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=p,!a&&e.baseClass===void 0?n?(this.toWireType=Gr,this.destructorFunction=null):(this.toWireType=qr,this.destructorFunction=null):this.toWireType=Xr}var Ce=(t,e,r)=>{s.hasOwnProperty(t)||Pt("Replacing nonexistant public symbol"),s[t].overloadTable!==void 0&&r!==void 0?s[t].overloadTable[r]=e:(s[t]=e,s[t].argCount=r)},Zr=(t,e,r)=>{var n=s["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Ot=[],_e,O=t=>{var e=Ot[t];return e||(t>=Ot.length&&(Ot.length=t+1),Ot[t]=e=_e.get(t)),e},Jr=(t,e,r)=>{if(t.includes("j"))return Zr(t,e,r);var n=O(e).apply(null,r);return n},Kr=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Jr(t,e,r)}},N=(t,e)=>{t=j(t);function r(){return t.includes("j")?Kr(t,e):O(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},tn=(t,e)=>{var r=Yt(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},Te,Pe=t=>{var e=We(t),r=j(e);return J(e),r},xt=(t,e)=>{var r=[],n={};function a(i){if(!n[i]&&!rt[i]){if(Tt[i]){Tt[i].forEach(a);return}r.push(i),n[i]=!0}}throw e.forEach(a),new Te(`${t}: `+r.map(Pe).join([", "]))},en=(t,e,r,n,a,i,u,c,l,h,p,y,g)=>{p=j(p),i=N(a,i),c&&(c=N(u,c)),h&&(h=N(l,h)),g=N(y,g);var b=we(p);zt(b,function(){xt(`Cannot construct ${p} due to unbound types`,[n])}),nt([t,e,r],n?[n]:[],function(T){T=T[0];var I,P;n?(I=T.registeredClass,P=I.instancePrototype):P=At.prototype;var R=Yt(b,function(){if(Object.getPrototypeOf(this)!==d)throw new ut("Use 'new' to construct "+p);if(m.constructor_body===void 0)throw new ut(p+" has no accessible constructor");var Mt=m.constructor_body[arguments.length];if(Mt===void 0)throw new ut(`Tried to invoke ctor of ${p} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return Mt.apply(this,arguments)}),d=Object.create(P,{constructor:{value:R}});R.prototype=d;var m=new Nr(p,R,d,g,I,i,c,h);m.baseClass&&(m.baseClass.__derivedClasses===void 0&&(m.baseClass.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m));var S=new Dt(p,m,!0,!1,!1),M=new Dt(p+"*",m,!1,!1,!1),at=new Dt(p+" const*",m,!1,!0,!1);return ge[t]={pointerType:M,constPointerType:at},Ce(b,R),[S,M,at]})},Gt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+n*4>>2]);return r};function Xt(t,e,r,n,a,i){var u=e.length;u<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var c=e[1]!==null&&r!==null,l=!1,h=1;h<e.length;++h)if(e[h]!==null&&e[h].destructorFunction===void 0){l=!0;break}var p=e[0].name!=="void",y=u-2,g=new Array(y),b=[],T=[];return function(){arguments.length!==y&&C(`function ${t} called with ${arguments.length} arguments, expected ${y}`),T.length=0;var I;b.length=c?2:1,b[0]=a,c&&(I=e[1].toWireType(T,this),b[1]=I);for(var P=0;P<y;++P)g[P]=e[P+2].toWireType(T,arguments[P]),b.push(g[P]);var R=n.apply(null,b);function d(m){if(l)he(T);else for(var S=c?1:2;S<e.length;S++){var M=S===1?I:g[S-2];e[S].destructorFunction!==null&&e[S].destructorFunction(M)}if(p)return e[0].fromWireType(m)}return d(R)}}var rn=(t,e,r,n,a,i)=>{var u=Gt(e,r);a=N(n,a),nt([],[t],function(c){c=c[0];var l=`constructor ${c.name}`;if(c.registeredClass.constructor_body===void 0&&(c.registeredClass.constructor_body=[]),c.registeredClass.constructor_body[e-1]!==void 0)throw new ut(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${c.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return c.registeredClass.constructor_body[e-1]=()=>{xt(`Cannot construct ${c.name} due to unbound types`,u)},nt([],u,h=>(h.splice(1,0,null),c.registeredClass.constructor_body[e-1]=Xt(l,h,null,a,i),[])),[]})},Ee=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?(Rt(t[t.length-1]==")","Parentheses for argument names should match."),t.substr(0,e)):t},nn=(t,e,r,n,a,i,u,c,l)=>{var h=Gt(r,n);e=j(e),e=Ee(e),i=N(a,i),nt([],[t],function(p){p=p[0];var y=`${p.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),c&&p.registeredClass.pureVirtualFunctions.push(e);function g(){xt(`Cannot call ${y} due to unbound types`,h)}var b=p.registeredClass.instancePrototype,T=b[e];return T===void 0||T.overloadTable===void 0&&T.className!==p.name&&T.argCount===r-2?(g.argCount=r-2,g.className=p.name,b[e]=g):($e(b,e,y),b[e].overloadTable[r-2]=g),nt([],h,function(I){var P=Xt(y,I,p,i,u);return b[e].overloadTable===void 0?(P.argCount=r-2,b[e]=P):b[e].overloadTable[r-2]=P,[]}),[]})};function an(){Object.assign(Ae.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 Ae(){this.allocated=[void 0],this.freelist=[]}var z=new Ae,De=t=>{t>=z.reserved&&--z.get(t).refcount===0&&z.free(t)},on=()=>{for(var t=0,e=z.reserved;e<z.allocated.length;++e)z.allocated[e]!==void 0&&++t;return t},sn=()=>{z.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),z.reserved=z.allocated.length,s.count_emval_handles=on},K={toValue:t=>(t||C("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})}}},un=(t,e)=>{e=j(e),X(t,{name:e,fromWireType:r=>{var n=K.toValue(r);return De(r),n},toWireType:(r,n)=>K.toHandle(n),argPackAdvance:q,readValueFromPointer:Bt,destructorFunction:null})},cn=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(L[n>>0])}:function(n){return this.fromWireType(k[n>>0])};case 2:return r?function(n){return this.fromWireType(ot[n>>1])}:function(n){return this.fromWireType(dt[n>>1])};case 4:return r?function(n){return this.fromWireType(W[n>>2])}:function(n){return this.fromWireType(_[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},ln=(t,e,r,n)=>{e=j(e);function a(){}a.values={},X(t,{name:e,constructor:a,fromWireType:function(i){return this.constructor.values[i]},toWireType:(i,u)=>u.value,argPackAdvance:q,readValueFromPointer:cn(e,r,n),destructorFunction:null}),zt(e,a)},qt=(t,e)=>{var r=rt[t];return r===void 0&&C(e+" has unknown type "+Pe(t)),r},dn=(t,e,r)=>{var n=qt(t,"enum");e=j(e);var a=n.constructor,i=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Yt(`${n.name}_${e}`,function(){})}});a.values[r]=i,a[e]=i},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(ne[r>>2])};case 8:return function(r){return this.fromWireType(ae[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},fn=(t,e,r)=>{e=j(e),X(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:q,readValueFromPointer:hn(e,r),destructorFunction:null})},pn=(t,e,r,n,a,i,u)=>{var c=Gt(e,r);t=j(t),t=Ee(t),a=N(n,a),zt(t,function(){xt(`Cannot call ${t} due to unbound types`,c)},e-1),nt([],c,function(l){var h=[l[0],null].concat(l.slice(1));return Ce(t,Xt(t,h,null,a,i),e-1),[]})},mn=(t,e,r)=>{switch(e){case 1:return r?n=>L[n>>0]:n=>k[n>>0];case 2:return r?n=>ot[n>>1]:n=>dt[n>>1];case 4:return r?n=>W[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},yn=(t,e,r,n,a)=>{e=j(e);var i=p=>p;if(n===0){var u=32-8*r;i=p=>p<<u>>>u}var c=e.includes("unsigned"),l=(p,y)=>{},h;c?h=function(p,y){return l(y,this.name),y>>>0}:h=function(p,y){return l(y,this.name),y},X(t,{name:e,fromWireType:i,toWireType:h,argPackAdvance:q,readValueFromPointer:mn(e,r,n!==0),destructorFunction:null})},vn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function i(u){var c=_[u>>2],l=_[u+4>>2];return new a(L.buffer,l,c)}r=j(r),X(t,{name:r,fromWireType:i,argPackAdvance:q,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},Oe=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,i=r+n-1,u=0;u<t.length;++u){var c=t.charCodeAt(u);if(c>=55296&&c<=57343){var l=t.charCodeAt(++u);c=65536+((c&1023)<<10)|l&1023}if(c<=127){if(r>=i)break;e[r++]=c}else if(c<=2047){if(r+1>=i)break;e[r++]=192|c>>6,e[r++]=128|c&63}else if(c<=65535){if(r+2>=i)break;e[r++]=224|c>>12,e[r++]=128|c>>6&63,e[r++]=128|c&63}else{if(r+3>=i)break;e[r++]=240|c>>18,e[r++]=128|c>>12&63,e[r++]=128|c>>6&63,e[r++]=128|c&63}}return e[r]=0,r-a},gn=(t,e,r)=>Oe(t,k,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},Fe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,wn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Fe)return Fe.decode(t.subarray(e,a));for(var i="";e<a;){var u=t[e++];if(!(u&128)){i+=String.fromCharCode(u);continue}var c=t[e++]&63;if((u&224)==192){i+=String.fromCharCode((u&31)<<6|c);continue}var l=t[e++]&63;if((u&240)==224?u=(u&15)<<12|c<<6|l:u=(u&7)<<18|c<<12|l<<6|t[e++]&63,u<65536)i+=String.fromCharCode(u);else{var h=u-65536;i+=String.fromCharCode(55296|h>>10,56320|h&1023)}}return i},Zt=(t,e)=>t?wn(k,t,e):"",$n=(t,e)=>{e=j(e);var r=e==="std::string";X(t,{name:e,fromWireType(n){var a=_[n>>2],i=n+4,u;if(r)for(var c=i,l=0;l<=a;++l){var h=i+l;if(l==a||k[h]==0){var p=h-c,y=Zt(c,p);u===void 0?u=y:(u+="\0",u+=y),c=h+1}}else{for(var g=new Array(a),l=0;l<a;++l)g[l]=String.fromCharCode(k[i+l]);u=g.join("")}return J(n),u},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var i,u=typeof a=="string";u||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||C("Cannot pass non-string to std::string"),r&&u?i=xe(a):i=a.length;var c=Kt(4+i+1),l=c+4;if(_[c>>2]=i,r&&u)gn(a,l,i+1);else if(u)for(var h=0;h<i;++h){var p=a.charCodeAt(h);p>255&&(J(l),C("String has UTF-16 code units that do not fit in 8 bits")),k[l+h]=p}else for(var h=0;h<i;++h)k[l+h]=a[h];return n!==null&&n.push(J,c),c},argPackAdvance:q,readValueFromPointer:be,destructorFunction(n){J(n)}})},Se=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,bn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&dt[n];)++n;if(r=n<<1,r-t>32&&Se)return Se.decode(k.subarray(t,r));for(var i="",u=0;!(u>=e/2);++u){var c=ot[t+u*2>>1];if(c==0)break;i+=String.fromCharCode(c)}return i},Cn=(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,i=0;i<a;++i){var u=t.charCodeAt(i);ot[e>>1]=u,e+=2}return ot[e>>1]=0,e-n},_n=t=>t.length*2,Tn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=W[t+r*4>>2];if(a==0)break;if(++r,a>=65536){var i=a-65536;n+=String.fromCharCode(55296|i>>10,56320|i&1023)}else n+=String.fromCharCode(a)}return n},Pn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,i=0;i<t.length;++i){var u=t.charCodeAt(i);if(u>=55296&&u<=57343){var c=t.charCodeAt(++i);u=65536+((u&1023)<<10)|c&1023}if(W[e>>2]=u,e+=4,e+4>a)break}return W[e>>2]=0,e-n},En=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},An=(t,e,r)=>{r=j(r);var n,a,i,u,c;e===2?(n=bn,a=Cn,u=_n,i=()=>dt,c=1):e===4&&(n=Tn,a=Pn,u=En,i=()=>_,c=2),X(t,{name:r,fromWireType:l=>{for(var h=_[l>>2],p=i(),y,g=l+4,b=0;b<=h;++b){var T=l+4+b*e;if(b==h||p[T>>c]==0){var I=T-g,P=n(g,I);y===void 0?y=P:(y+="\0",y+=P),g=T+e}}return J(l),y},toWireType:(l,h)=>{typeof h!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var p=u(h),y=Kt(4+p+e);return _[y>>2]=p>>c,a(h,y+4,p+e),l!==null&&l.push(J,y),y},argPackAdvance:q,readValueFromPointer:Bt,destructorFunction(l){J(l)}})},Dn=(t,e,r,n,a,i)=>{_t[t]={name:j(e),rawConstructor:N(r,n),rawDestructor:N(a,i),fields:[]}},On=(t,e,r,n,a,i,u,c,l,h)=>{_t[t].fields.push({fieldName:j(e),getterReturnType:r,getter:N(n,a),getterContext:i,setterArgumentType:u,setter:N(c,l),setterContext:h})},xn=(t,e)=>{e=j(e),X(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Fn={},Sn=t=>{var e=Fn[t];return e===void 0?j(t):e},Me=()=>{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.")},Mn=t=>t===0?K.toHandle(Me()):(t=Sn(t),K.toHandle(Me()[t])),jn=t=>{t>4&&(z.get(t).refcount+=1)},In=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var i=0;i<t;++i){var u=qt(_[n+i*4>>2],"parameter "+i);e[i+1]=u.readValueFromPointer(a),a+=u.argPackAdvance}var c=new(r.bind.apply(r,e));return K.toHandle(c)}},je={},Rn=(t,e,r,n)=>{t=K.toValue(t);var a=je[e];return a||(a=In(e),je[e]=a),a(t,r,n)},Wn=(t,e)=>{t=qt(t,"_emval_take_value");var r=t.readValueFromPointer(e);return K.toHandle(r)},kn=()=>{ft("")},Hn=(t,e,r)=>k.copyWithin(t,e,e+r),Bn=()=>2147483648,Un=t=>{var e=tt.buffer,r=(t-e.byteLength+65535)/65536;try{return tt.grow(r),oe(),1}catch{}},Ln=t=>{var e=k.length;t>>>=0;var r=Bn();if(t>r)return!1;for(var n=(l,h)=>l+(h-l%h)%h,a=1;a<=4;a*=2){var i=e*(1+.2/a);i=Math.min(i,t+100663296);var u=Math.min(r,n(Math.max(t,i),65536)),c=Un(u);if(c)return!0}return!1},Jt={},Vn=()=>H||"./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,_:Vn()};for(var r in Jt)Jt[r]===void 0?delete e[r]:e[r]=Jt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);gt.strings=n}return gt.strings},Yn=(t,e)=>{for(var r=0;r<t.length;++r)L[e++>>0]=t.charCodeAt(r);L[e>>0]=0},zn=(t,e)=>{var r=0;return gt().forEach((n,a)=>{var i=e+r;_[t+a*4>>2]=i,Yn(n,i),r+=n.length+1}),0},Nn=(t,e)=>{var r=gt();_[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),_[e>>2]=n,0},Gn=t=>t,Ft=t=>t%4===0&&(t%100!==0||t%400===0),Xn=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Ie=[31,29,31,30,31,30,31,31,30,31,30,31],Re=[31,28,31,30,31,30,31,31,30,31,30,31],qn=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Ft(r.getFullYear()),a=r.getMonth(),i=(n?Ie:Re)[a];if(e>i-r.getDate())e-=i-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 Qn(t,e,r){var n=r>0?r:xe(t)+1,a=new Array(n),i=Oe(t,a,0,a.length);return e&&(a.length=i),a}var Zn=(t,e)=>{L.set(t,e)},Jn=(t,e,r,n)=>{var a=_[n+40>>2],i={tm_sec:W[n>>2],tm_min:W[n+4>>2],tm_hour:W[n+8>>2],tm_mday:W[n+12>>2],tm_mon:W[n+16>>2],tm_year:W[n+20>>2],tm_wday:W[n+24>>2],tm_yday:W[n+28>>2],tm_isdst:W[n+32>>2],tm_gmtoff:W[n+36>>2],tm_zone:a?Zt(a):""},u=Zt(r),c={"%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 c)u=u.replace(new RegExp(l,"g"),c[l]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,m,S){for(var M=typeof d=="number"?d.toString():d||"";M.length<m;)M=S[0]+M;return M}function g(d,m){return y(d,m,"0")}function b(d,m){function S(at){return at<0?-1:at>0?1:0}var M;return(M=S(d.getFullYear()-m.getFullYear()))===0&&(M=S(d.getMonth()-m.getMonth()))===0&&(M=S(d.getDate()-m.getDate())),M}function T(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 I(d){var m=qn(new Date(d.tm_year+1900,0,1),d.tm_yday),S=new Date(m.getFullYear(),0,4),M=new Date(m.getFullYear()+1,0,4),at=T(S),Mt=T(M);return b(at,m)<=0?b(Mt,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var P={"%a":d=>h[d.tm_wday].substring(0,3),"%A":d=>h[d.tm_wday],"%b":d=>p[d.tm_mon].substring(0,3),"%B":d=>p[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=>I(d).toString().substring(2),"%G":d=>I(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+Xn(Ft(d.tm_year+1900)?Ie:Re,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 S=(d.tm_wday+371-d.tm_yday)%7;S!=4&&(S!=3||!Ft(d.tm_year))&&(m=1)}}else{m=52;var M=(d.tm_wday+7-d.tm_yday-1)%7;(M==4||M==5&&Ft(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,S=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(S?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};u=u.replace(/%%/g,"\0\0");for(var l in P)u.includes(l)&&(u=u.replace(new RegExp(l,"g"),P[l](i)));u=u.replace(/\0\0/g,"%");var R=Qn(u,!1);return R.length>e?0:(Zn(R,t),R.length-1)},Kn=(t,e,r,n,a)=>Jn(t,e,r,n);fe=s.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Fr(),ut=s.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Vr(),Hr(),Qr(),Te=s.UnboundTypeError=tn(Error,"UnboundTypeError"),an(),sn();var ta={s:$r,v:br,b:_r,g:Tr,q:Pr,I:Er,f:Ar,T:Dr,d:Cr,ba:Or,P:xr,Y:Mr,aa:en,$:rn,w:nn,X:un,x:ln,h:dn,K:fn,L:pn,t:yn,n:vn,J:$n,C:An,A:Dn,ca:On,Z:xn,ea:De,da:Mn,M:jn,V:Rn,_:Wn,B:kn,W:Hn,U:Ln,R:zn,S:Nn,D:ma,E:pa,m:ya,a:ea,e:oa,o:ua,k:aa,G:ha,u:la,F:fa,z:ga,O:$a,l:ia,j:sa,c:na,p:ra,H:da,r:va,i:ca,y:wa,N:Gn,Q:Kn},E=wr(),J=s._free=t=>(J=s._free=E.ha)(t),Kt=s._malloc=t=>(Kt=s._malloc=E.ia)(t),We=t=>(We=E.ka)(t);s.__embind_initialize_bindings=()=>(s.__embind_initialize_bindings=E.la)();var A=(t,e)=>(A=E.ma)(t,e),wt=t=>(wt=E.na)(t),x=()=>(x=E.oa)(),F=t=>(F=E.pa)(t),ke=t=>(ke=E.qa)(t),He=t=>(He=E.ra)(t),Be=(t,e,r)=>(Be=E.sa)(t,e,r),Ue=t=>(Ue=E.ta)(t);s.dynCall_viijii=(t,e,r,n,a,i,u)=>(s.dynCall_viijii=E.ua)(t,e,r,n,a,i,u);var Le=s.dynCall_jiiii=(t,e,r,n,a)=>(Le=s.dynCall_jiiii=E.va)(t,e,r,n,a);s.dynCall_iiiiij=(t,e,r,n,a,i,u)=>(s.dynCall_iiiiij=E.wa)(t,e,r,n,a,i,u),s.dynCall_iiiiijj=(t,e,r,n,a,i,u,c,l)=>(s.dynCall_iiiiijj=E.xa)(t,e,r,n,a,i,u,c,l),s.dynCall_iiiiiijj=(t,e,r,n,a,i,u,c,l,h)=>(s.dynCall_iiiiiijj=E.ya)(t,e,r,n,a,i,u,c,l,h);function ea(t,e){var r=x();try{return O(t)(e)}catch(n){if(F(r),n!==n+0)throw n;A(1,0)}}function ra(t,e,r,n){var a=x();try{O(t)(e,r,n)}catch(i){if(F(a),i!==i+0)throw i;A(1,0)}}function na(t,e,r){var n=x();try{O(t)(e,r)}catch(a){if(F(n),a!==a+0)throw a;A(1,0)}}function aa(t,e,r,n,a){var i=x();try{return O(t)(e,r,n,a)}catch(u){if(F(i),u!==u+0)throw u;A(1,0)}}function oa(t,e,r){var n=x();try{return O(t)(e,r)}catch(a){if(F(n),a!==a+0)throw a;A(1,0)}}function ia(t){var e=x();try{O(t)()}catch(r){if(F(e),r!==r+0)throw r;A(1,0)}}function sa(t,e){var r=x();try{O(t)(e)}catch(n){if(F(r),n!==n+0)throw n;A(1,0)}}function ua(t,e,r,n){var a=x();try{return O(t)(e,r,n)}catch(i){if(F(a),i!==i+0)throw i;A(1,0)}}function ca(t,e,r,n,a,i,u,c,l,h,p){var y=x();try{O(t)(e,r,n,a,i,u,c,l,h,p)}catch(g){if(F(y),g!==g+0)throw g;A(1,0)}}function la(t,e,r,n,a,i,u){var c=x();try{return O(t)(e,r,n,a,i,u)}catch(l){if(F(c),l!==l+0)throw l;A(1,0)}}function da(t,e,r,n,a){var i=x();try{O(t)(e,r,n,a)}catch(u){if(F(i),u!==u+0)throw u;A(1,0)}}function ha(t,e,r,n,a,i){var u=x();try{return O(t)(e,r,n,a,i)}catch(c){if(F(u),c!==c+0)throw c;A(1,0)}}function fa(t,e,r,n,a,i,u,c){var l=x();try{return O(t)(e,r,n,a,i,u,c)}catch(h){if(F(l),h!==h+0)throw h;A(1,0)}}function pa(t,e,r,n){var a=x();try{return O(t)(e,r,n)}catch(i){if(F(a),i!==i+0)throw i;A(1,0)}}function ma(t,e,r,n){var a=x();try{return O(t)(e,r,n)}catch(i){if(F(a),i!==i+0)throw i;A(1,0)}}function ya(t){var e=x();try{return O(t)()}catch(r){if(F(e),r!==r+0)throw r;A(1,0)}}function va(t,e,r,n,a,i,u,c){var l=x();try{O(t)(e,r,n,a,i,u,c)}catch(h){if(F(l),h!==h+0)throw h;A(1,0)}}function ga(t,e,r,n,a,i,u,c,l,h,p,y){var g=x();try{return O(t)(e,r,n,a,i,u,c,l,h,p,y)}catch(b){if(F(g),b!==b+0)throw b;A(1,0)}}function wa(t,e,r,n,a,i,u,c,l,h,p,y,g,b,T,I){var P=x();try{O(t)(e,r,n,a,i,u,c,l,h,p,y,g,b,T,I)}catch(R){if(F(P),R!==R+0)throw R;A(1,0)}}function $a(t,e,r,n,a){var i=x();try{return Le(t,e,r,n,a)}catch(u){if(F(i),u!==u+0)throw u;A(1,0)}}var St;ht=function t(){St||Ve(),St||(ht=t)};function Ve(){if(et>0||(ur(),et>0))return;function t(){St||(St=!0,s.calledRun=!0,!lt&&(cr(),w(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),lr()))}s.setStatus?(s.setStatus("Running..."),setTimeout(function(){setTimeout(function(){s.setStatus("")},1),t()},1)):t()}if(s.preInit)for(typeof s.preInit=="function"&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();return Ve(),f.ready}})();function Ga(o){return re(It,o)}function Xa(o){return Ya(It,o)}async function qa(o,f){return za(It,o,f)}async function Qa(o,f){return Na(It,o,f)}var ct;class Za extends EventTarget{constructor(s={}){var w;super();ze(this,ct,void 0);try{const v=(w=s==null?void 0:s.formats)==null?void 0:w.filter($=>$!=="unknown");if((v==null?void 0:v.length)===0)throw new TypeError("Hint option provided, but is empty.");v==null||v.forEach($=>{if(!jt.has($))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${$}' is not a valid enum value of type BarcodeFormat.`)}),Ne(this,ct,v!=null?v:[]),Ga().then($=>{this.dispatchEvent(new CustomEvent("load",{detail:$}))}).catch($=>{this.dispatchEvent(new CustomEvent("error",{detail:$}))})}catch(v){throw Ge(v,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return ba.filter(s=>s!=="unknown")}async detect(s){try{const w=await Da(s);if(w===null)return[];let v;try{ar(w)?v=await qa(w,{tryHarder:!0,formats:te(this,ct).map($=>jt.get($))}):v=await Qa(w,{tryHarder:!0,formats:te(this,ct).map($=>jt.get($))})}catch($){throw console.error($),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return v.map($=>{const{topLeft:{x:H,y:V},topRight:{x:B,y:D},bottomLeft:{x:Y,y:G},bottomRight:{x:U,y:Q}}=$.position,tt=Math.min(H,B,Y,U),lt=Math.min(V,D,G,Q),Rt=Math.max(H,B,Y,U),L=Math.max(V,D,G,Q);return{boundingBox:new DOMRectReadOnly(tt,lt,Rt-tt,L-lt),rawValue:$.text,format:Ca($.format),cornerPoints:[{x:H,y:V},{x:B,y:D},{x:U,y:Q},{x:Y,y:G}]}})}catch(w){throw Ge(w,"Failed to execute 'detect' on 'BarcodeDetector'")}}}ct=new WeakMap;exports.BarcodeDetector=Za;exports.setZXingModuleOverrides=Xa;

@@ -1,24 +0,8 @@

/// <reference types="dom-webcodecs" />
import { Point2D } from "./BarcodeDetector.js";
export { setZXingModuleOverrides } from "./BarcodeDetector.js";
import { BARCODE_DETECTOR_FORMATS } from "./utils.js";
declare global {
var BarcodeDetector: {
readonly prototype: BarcodeDetector;
new (barcodeDectorOptions?: BarcodeDetectorOptions): BarcodeDetector;
getSupportedFormats(): Promise<readonly BarcodeFormat[]>;
};
interface BarcodeDetector {
detect(image: ImageBitmapSourceWebCodecs): Promise<DetectedBarcode[]>;
}
type BarcodeFormat = (typeof BARCODE_DETECTOR_FORMATS)[number];
interface BarcodeDetectorOptions {
formats?: BarcodeFormat[];
}
interface DetectedBarcode {
boundingBox: DOMRectReadOnly;
rawValue: string;
format: BarcodeFormat;
cornerPoints: [Point2D, Point2D, Point2D, Point2D];
}
var BarcodeDetector: typeof import("./BarcodeDetector.js").BarcodeDetector;
type BarcodeDetector = import("./BarcodeDetector.js").BarcodeDetector;
type BarcodeFormat = import("./BarcodeDetector.js").BarcodeFormat;
type BarcodeDetectorOptions = import("./BarcodeDetector.js").BarcodeDetectorOptions;
type DetectedBarcode = import("./BarcodeDetector.js").DetectedBarcode;
}
/// <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"];
import { type ReadInputBarcodeFormat, type ReadOutputBarcodeFormat } from "zxing-wasm/reader";
export declare const BARCODE_FORMATS: ("aztec" | "code_128" | "code_39" | "code_93" | "codabar" | "databar" | "databar_expanded" | "data_matrix" | "dx_film_edge" | "ean_13" | "ean_8" | "itf" | "maxi_code" | "micro_qr_code" | "pdf417" | "qr_code" | "rm_qr_code" | "upc_a" | "upc_e" | "linear_codes" | "matrix_codes" | "unknown")[];
export type BarcodeFormat = (typeof BARCODE_FORMATS)[number];
export type ReadResultBarcodeFormat = Exclude<BarcodeFormat, "linear_codes" | "matrix_codes">;
export declare const formatMap: Map<"aztec" | "code_128" | "code_39" | "code_93" | "codabar" | "databar" | "databar_expanded" | "data_matrix" | "dx_film_edge" | "ean_13" | "ean_8" | "itf" | "maxi_code" | "micro_qr_code" | "pdf417" | "qr_code" | "rm_qr_code" | "upc_a" | "upc_e" | "linear_codes" | "matrix_codes" | "unknown", ReadInputBarcodeFormat>;
export declare function convertFormat(target: ReadOutputBarcodeFormat): ReadResultBarcodeFormat;
export declare function isBlob(image: ImageBitmapSourceWebCodecs): image is Blob;

@@ -4,0 +9,0 @@ export declare function getImageDataOrBlobFromImageBitmapSource(image: ImageBitmapSourceWebCodecs): Promise<ImageData | Blob | null>;

/// <reference types="dom-webcodecs" />
import { type ZXingReaderModule } from "zxing-wasm/reader";
import { BARCODE_DETECTOR_FORMATS } from "./utils.js";
export type BarcodeFormat = (typeof BARCODE_DETECTOR_FORMATS)[number];
import { type BarcodeFormat, type ReadResultBarcodeFormat } from "./utils.js";
export { type BarcodeFormat } from "./utils.js";
export interface BarcodeDetectorOptions {

@@ -15,3 +15,3 @@ formats?: BarcodeFormat[];

rawValue: string;
format: BarcodeFormat;
format: ReadResultBarcodeFormat;
cornerPoints: [Point2D, Point2D, Point2D, Point2D];

@@ -18,0 +18,0 @@ }

@@ -1,24 +0,8 @@

/// <reference types="dom-webcodecs" />
import { Point2D } from "./BarcodeDetector.js";
export { setZXingModuleOverrides } from "./BarcodeDetector.js";
import { BARCODE_DETECTOR_FORMATS } from "./utils.js";
declare global {
var BarcodeDetector: {
readonly prototype: BarcodeDetector;
new (barcodeDectorOptions?: BarcodeDetectorOptions): BarcodeDetector;
getSupportedFormats(): Promise<readonly BarcodeFormat[]>;
};
interface BarcodeDetector {
detect(image: ImageBitmapSourceWebCodecs): Promise<DetectedBarcode[]>;
}
type BarcodeFormat = (typeof BARCODE_DETECTOR_FORMATS)[number];
interface BarcodeDetectorOptions {
formats?: BarcodeFormat[];
}
interface DetectedBarcode {
boundingBox: DOMRectReadOnly;
rawValue: string;
format: BarcodeFormat;
cornerPoints: [Point2D, Point2D, Point2D, Point2D];
}
var BarcodeDetector: typeof import("./BarcodeDetector.js").BarcodeDetector;
type BarcodeDetector = import("./BarcodeDetector.js").BarcodeDetector;
type BarcodeFormat = import("./BarcodeDetector.js").BarcodeFormat;
type BarcodeDetectorOptions = import("./BarcodeDetector.js").BarcodeDetectorOptions;
type DetectedBarcode = import("./BarcodeDetector.js").DetectedBarcode;
}
/// <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"];
import { type ReadInputBarcodeFormat, type ReadOutputBarcodeFormat } from "zxing-wasm/reader";
export declare const BARCODE_FORMATS: ("aztec" | "code_128" | "code_39" | "code_93" | "codabar" | "databar" | "databar_expanded" | "data_matrix" | "dx_film_edge" | "ean_13" | "ean_8" | "itf" | "maxi_code" | "micro_qr_code" | "pdf417" | "qr_code" | "rm_qr_code" | "upc_a" | "upc_e" | "linear_codes" | "matrix_codes" | "unknown")[];
export type BarcodeFormat = (typeof BARCODE_FORMATS)[number];
export type ReadResultBarcodeFormat = Exclude<BarcodeFormat, "linear_codes" | "matrix_codes">;
export declare const formatMap: Map<"aztec" | "code_128" | "code_39" | "code_93" | "codabar" | "databar" | "databar_expanded" | "data_matrix" | "dx_film_edge" | "ean_13" | "ean_8" | "itf" | "maxi_code" | "micro_qr_code" | "pdf417" | "qr_code" | "rm_qr_code" | "upc_a" | "upc_e" | "linear_codes" | "matrix_codes" | "unknown", ReadInputBarcodeFormat>;
export declare function convertFormat(target: ReadOutputBarcodeFormat): ReadResultBarcodeFormat;
export declare function isBlob(image: ImageBitmapSourceWebCodecs): image is Blob;

@@ -4,0 +9,0 @@ export declare function getImageDataOrBlobFromImageBitmapSource(image: ImageBitmapSourceWebCodecs): Promise<ImageData | Blob | null>;

@@ -1,3 +0,3 @@

var BarcodeDetectionAPI=function(I){"use strict";var cr=(I,H,z)=>{if(!H.has(I))throw TypeError("Cannot "+z)};var ie=(I,H,z)=>(cr(I,H,"read from private field"),z?z.call(I):H.get(I)),lr=(I,H,z)=>{if(H.has(I))throw TypeError("Cannot add the same private member more than once");H instanceof WeakSet?H.add(I):H.set(I,z)},dr=(I,H,z,ft)=>(cr(I,H,"write to private field"),ft?ft.call(I,z):H.set(I,z),z);var ut,be;const H=["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(i){if(ft(i))return{width:i.naturalWidth,height:i.naturalHeight};if(se(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(ue(i))return{width:i.videoWidth,height:i.videoHeight};if(le(i))return{width:i.width,height:i.height};if(he(i))return{width:i.displayWidth,height:i.displayHeight};if(ce(i))return{width:i.width,height:i.height};if(de(i))return{width:i.width,height:i.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 ft(i){try{return i instanceof HTMLImageElement}catch{return!1}}function se(i){try{return i instanceof SVGImageElement}catch{return!1}}function ue(i){try{return i instanceof HTMLVideoElement}catch{return!1}}function ce(i){try{return i instanceof HTMLCanvasElement}catch{return!1}}function le(i){try{return i instanceof ImageBitmap}catch{return!1}}function de(i){try{return i instanceof OffscreenCanvas}catch{return!1}}function he(i){try{return i instanceof VideoFrame}catch{return!1}}function fe(i){try{return i instanceof Blob}catch{return!1}}function hr(i){try{return i instanceof ImageData}catch{return!1}}function fr(i,f){try{const u=new OffscreenCanvas(i,f);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=i,u.height=f,u}}async function pe(i){if(ft(i)&&!await vr(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(se(i)&&!await gr(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(he(i)&&wr(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(ue(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(le(i)&&br(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:f,height:u}=z(i);if(f===0||u===0)return null;const v=fr(f,u).getContext("2d");v.drawImage(i,0,0);try{return v.getImageData(0,0,f,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function pr(i){let f;try{if(globalThis.createImageBitmap)f=await createImageBitmap(i);else if(globalThis.Image){f=new Image;let w="";try{w=URL.createObjectURL(i),f.src=w,await f.decode()}finally{URL.revokeObjectURL(w)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await pe(f)}function mr(i){const{width:f,height:u}=i;if(f===0||u===0)return null;const w=i.getContext("2d");try{return w.getImageData(0,0,f,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function yr(i){if(fe(i))return await pr(i);if(hr(i)){if($r(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return ce(i)||de(i)?mr(i):await pe(i)}async function vr(i){try{return await i.decode(),!0}catch{return!1}}async function gr(i){var f;try{return await((f=i.decode)==null?void 0:f.call(i)),!0}catch{return!1}}function wr(i){return i.format===null}function $r(i){return i.data.buffer.byteLength===0}function br(i){return i.width===0&&i.height===0}function me(i,f){return i instanceof DOMException?new DOMException(`${f}: ${i.message}`,i.name):i instanceof Error?new i.constructor(`${f}: ${i.message}`):new Error(`${f}: ${i}`)}const ye=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function Cr(i){return i.join("|")}function _r(i){const f=ve(i);let u=0,w=ye.length-1;for(;u<=w;){const v=Math.floor((u+w)/2),$=ye[v],U=ve($);if(U===f)return $;U<f?u=v+1:w=v-1}return"None"}function ve(i){return i.toLowerCase().replace(/_-\[\]/g,"")}function Tr(i,f){return i.Binarizer[f]}function Pr(i,f){return i.CharacterSet[f]}const Er=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Ar(i){return Er[i.value]}function Dr(i,f){return i.EanAddOnSymbol[f]}function Or(i,f){return i.TextMode[f]}const pt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function ge(i,f){return{...f,formats:Cr(f.formats),binarizer:Tr(i,f.binarizer),eanAddOnSymbol:Dr(i,f.eanAddOnSymbol),textMode:Or(i,f.textMode),characterSet:Pr(i,f.characterSet)}}const Sr={width:200,height:200,format:"QRCode",characterSet:"UTF8",eccLevel:-1,margin:10};function we(i){return{...i,format:_r(i.format),eccLevel:i.eccLevel,contentType:Ar(i.contentType)}}const Fr={locateFile:(i,f)=>{const u=i.match(/_(.+?)\.wasm$/);return u?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.0.0/dist/${u[1]}/${i}`:f+i}};let Ht=new WeakMap;function Bt(i,f){var u;const w=Ht.get(i);if(w!=null&&w.modulePromise&&(f===void 0||Object.is(f,w.moduleOverrides)))return w.modulePromise;const v=(u=f!=null?f:w==null?void 0:w.moduleOverrides)!=null?u:Fr,$=i({...v});return Ht.set(i,{moduleOverrides:v,modulePromise:$}),$}function xr(i,f){Ht.set(i,{moduleOverrides:f})}async function Mr(i,f,u=pt){const w={...pt,...u},v=await Bt(i),{size:$}=f,U=new Uint8Array(await f.arrayBuffer()),N=v._malloc($);v.HEAPU8.set(U,N);const V=v.readBarcodesFromImage(N,$,ge(v,w));v._free(N);const D=[];for(let G=0;G<V.size();++G)D.push(we(V.get(G)));return D}async function Ir(i,f,u=pt){const w={...pt,...u},v=await Bt(i),{data:$,width:U,height:N,data:{byteLength:V}}=f,D=v._malloc(V);v.HEAPU8.set($,D);const G=v.readBarcodesFromPixmap(D,U,N,ge(v,w));v._free(D);const Q=[];for(let L=0;L<G.size();++L)Q.push(we(G.get(L)));return Q}structuredClone(pt),structuredClone(Sr);var Pt=(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(f={}){var u=f,w,v;u.ready=new Promise((t,e)=>{w=t,v=e});var $=Object.assign({},u),U="./this.program",N=typeof window=="object",V=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var D="";function G(t){return u.locateFile?u.locateFile(t,D):D+t}var Q;(N||V)&&(V?D=self.location.href:typeof document<"u"&&document.currentScript&&(D=document.currentScript.src),i&&(D=i),D.indexOf("blob:")!==0?D=D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1):D="",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 L=u.printErr||console.error.bind(console);Object.assign(u,$),$=null,u.arguments&&u.arguments,u.thisProgram&&(U=u.thisProgram),u.quit&&u.quit;var K;u.wasmBinary&&(K=u.wasmBinary),typeof WebAssembly!="object"&&gt("no native wasm support detected");var nt,mt=!1;function Vt(t,e){t||gt(e)}var Y,B,ct,yt,k,_,Ce,_e;function Te(){var t=nt.buffer;u.HEAP8=Y=new Int8Array(t),u.HEAP16=ct=new Int16Array(t),u.HEAPU8=B=new Uint8Array(t),u.HEAPU16=yt=new Uint16Array(t),u.HEAP32=k=new Int32Array(t),u.HEAPU32=_=new Uint32Array(t),u.HEAPF32=Ce=new Float32Array(t),u.HEAPF64=_e=new Float64Array(t)}var Pe=[],Ee=[],Ae=[];function Br(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Lr(u.preRun.shift());Lt(Pe)}function Ur(){Lt(Ee)}function Vr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)zr(u.postRun.shift());Lt(Ae)}function Lr(t){Pe.unshift(t)}function Yr(t){Ee.unshift(t)}function zr(t){Ae.unshift(t)}var at=0,vt=null;function Nr(t){at++,u.monitorRunDependencies&&u.monitorRunDependencies(at)}function Gr(t){if(at--,u.monitorRunDependencies&&u.monitorRunDependencies(at),at==0&&vt){var e=vt;vt=null,e()}}function gt(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",L(t),mt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw v(e),e}var Xr="data:application/octet-stream;base64,",De=t=>t.startsWith(Xr),lt;lt="zxing_reader.wasm",De(lt)||(lt=G(lt));function Oe(t){if(t==lt&&K)return new Uint8Array(K);if(Q)return Q(t);throw"both async and sync fetching of the wasm failed"}function qr(t){return!K&&(N||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(()=>Oe(t)):Promise.resolve().then(()=>Oe(t))}function Se(t,e,r){return qr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{L(`failed to asynchronously prepare wasm: ${n}`),gt(n)})}function Qr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!De(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(s){return L(`wasm streaming compile failed: ${s}`),L("falling back to ArrayBuffer instantiation"),Se(e,r,n)})}):Se(e,r,n)}function Zr(){var t={a:xa};function e(n,a){return E=n.exports,nt=E.fa,Te(),Ve=E.ja,Yr(E.ga),Gr(),E}Nr();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){L(`Module.instantiateWasm callback failed with error: ${n}`),v(n)}return Qr(K,lt,t,r).catch(v),{}}var Lt=t=>{for(;t.length>0;)t.shift()(u)};u.noExitRuntime;var Et=[],At=0,Jr=t=>{var e=new Yt(t);return e.get_caught()||(e.set_caught(!0),At--),e.set_rethrown(!1),Et.push(e),ar(e.excPtr),e.get_exception_ptr()},tt=0,Kr=()=>{A(0,0);var t=Et.pop();nr(t.excPtr),tt=0};function Yt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,Y[this.ptr+12>>0]=e},this.get_caught=function(){return Y[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,Y[this.ptr+13>>0]=e},this.get_rethrown=function(){return Y[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){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=ir(this.get_type());if(e)return _[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var tn=t=>{throw tt||(tt=t),tt},zt=t=>{var e=tt;if(!e)return Tt(0),0;var r=new Yt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return Tt(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(or(o,n,s))return Tt(o),e}return Tt(n),e},en=()=>zt([]),rn=t=>zt([t]),nn=(t,e)=>zt([t,e]),an=()=>{var t=Et.pop();t||gt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Et.push(t),t.set_rethrown(!0),t.set_caught(!1),At++),tt=e,tt},on=(t,e,r)=>{var n=new Yt(t);throw n.init(e,r),tt=t,At++,tt},sn=()=>At,Dt={},Fe=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Nt(t){return this.fromWireType(k[t>>2])}var dt={},ot={},Ot={},xe,St=t=>{throw new xe(t)},it=(t,e,r)=>{t.forEach(function(c){Ot[c]=e});function n(c){var l=r(c);l.length!==t.length&&St("Mismatched type converter count");for(var h=0;h<t.length;++h)Z(t[h],l[h])}var a=new Array(e.length),o=[],s=0;e.forEach((c,l)=>{ot.hasOwnProperty(c)?a[l]=ot[c]:(o.push(c),dt.hasOwnProperty(c)||(dt[c]=[]),dt[c].push(()=>{a[l]=ot[c],++s,s===o.length&&n(a)}))}),o.length===0&&n(a)},un=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));it([t],o,s=>{var c={};return a.forEach((l,h)=>{var p=l.fieldName,y=s[h],g=l.getter,b=l.getterContext,T=s[h+a.length],R=l.setter,P=l.setterContext;c[p]={read:W=>y.fromWireType(g(b,W)),write:(W,d)=>{var m=[];R(P,W,T.toWireType(m,d)),Fe(m)}}}),[{name:e.name,fromWireType:l=>{var h={};for(var p in c)h[p]=c[p].read(l);return n(l),h},toWireType:(l,h)=>{for(var p in c)if(!(p in h))throw new TypeError(`Missing field: "${p}"`);var y=r();for(p in c)c[p].write(y,h[p]);return l!==null&&l.push(n,y),y},argPackAdvance:J,readValueFromPointer:Nt,destructorFunction:n}]})},cn=(t,e,r,n,a)=>{},ln=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Me=t},Me,j=t=>{for(var e="",r=t;B[r];)e+=Me[B[r++]];return e},ht,C=t=>{throw new ht(t)};function dn(t,e,r={}){var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),ot.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(ot[t]=e,delete Ot[t],dt.hasOwnProperty(t)){var a=dt[t];delete dt[t],a.forEach(o=>o())}}function Z(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return dn(t,e,r)}var J=8,hn=(t,e,r,n)=>{e=j(e),Z(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:J,readValueFromPointer:function(a){return this.fromWireType(B[a])},destructorFunction:null})},fn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Gt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}C(e(t)+" instance already deleted")},Xt=!1,Ie=t=>{},pn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},je=t=>{t.count.value-=1;var e=t.count.value===0;e&&pn(t)},Re=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Re(t,e,r.baseClass);return n===null?null:r.downcast(n)},We={},mn=()=>Object.keys(bt).length,yn=()=>{var t=[];for(var e in bt)bt.hasOwnProperty(e)&&t.push(bt[e]);return t},wt=[],qt=()=>{for(;wt.length;){var t=wt.pop();t.$$.deleteScheduled=!1,t.delete()}},$t,vn=t=>{$t=t,wt.length&&$t&&$t(qt)},gn=()=>{u.getInheritedInstanceCount=mn,u.getLiveInheritedInstances=yn,u.flushPendingDeletes=qt,u.setDelayFunction=vn},bt={},wn=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},$n=(t,e)=>(e=wn(t,e),bt[e]),Ft=(t,e)=>{(!e.ptrType||!e.ptr)&&St("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&St("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ct(Object.create(t,{$$:{value:e}}))};function bn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=$n(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),s=We[o];if(!s)return a.call(this);var c;this.isConst?c=s.constPointerType:c=s.pointerType;var l=Re(e,this.registeredClass,c.registeredClass);return l===null?a.call(this):this.isSmartPointer?Ft(c.registeredClass.instancePrototype,{ptrType:c,ptr:l,smartPtrType:this,smartPtr:t}):Ft(c.registeredClass.instancePrototype,{ptrType:c,ptr:l})}var Ct=t=>typeof FinalizationRegistry>"u"?(Ct=e=>e,t):(Xt=new FinalizationRegistry(e=>{je(e.$$)}),Ct=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Xt.register(e,a,e)}return e},Ie=e=>Xt.unregister(e),Ct(t)),Cn=()=>{Object.assign(xt.prototype,{isAliasOf(t){if(!(this instanceof xt)||!(t instanceof xt))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||Gt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=Ct(Object.create(Object.getPrototypeOf(this),{$$:{value:fn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),Ie(this),je(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),wt.push(this),wt.length===1&&$t&&$t(qt),this.$$.deleteScheduled=!0,this}})};function xt(){}var _n=48,Tn=57,ke=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=_n&&e<=Tn?`_${t}`:t};function Qt(t,e){return t=ke(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var He=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`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}},Zt=(t,e,r)=>{u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),He(u,t,t),u.hasOwnProperty(r)&&C(`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 Pn(t,e,r,n,a,o,s,c){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=s,this.downcast=c,this.pureVirtualFunctions=[]}var Jt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function En(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Jt(e.$$.ptr,r,this.registeredClass);return n}function An(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`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=Jt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`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:C("Unsupporting sharing policy")}return r}function Dn(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Jt(e.$$.ptr,r,this.registeredClass);return n}function Be(t){return this.fromWireType(_[t>>2])}var On=()=>{Object.assign(Mt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:J,readValueFromPointer:Be,deleteObject(t){t!==null&&t.delete()},fromWireType:bn})};function Mt(t,e,r,n,a,o,s,c,l,h,p){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=c,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=p,!a&&e.baseClass===void 0?n?(this.toWireType=En,this.destructorFunction=null):(this.toWireType=Dn,this.destructorFunction=null):this.toWireType=An}var Ue=(t,e,r)=>{u.hasOwnProperty(t)||St("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)},Sn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},It=[],Ve,O=t=>{var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=Ve.get(t)),e},Fn=(t,e,r)=>{if(t.includes("j"))return Sn(t,e,r);var n=O(e).apply(null,r);return n},xn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Fn(t,e,r)}},q=(t,e)=>{t=j(t);function r(){return t.includes("j")?xn(t,e):O(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},Mn=(t,e)=>{var r=Qt(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},Le,Ye=t=>{var e=rr(t),r=j(e);return et(e),r},jt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!ot[o]){if(Ot[o]){Ot[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Le(`${t}: `+r.map(Ye).join([", "]))},In=(t,e,r,n,a,o,s,c,l,h,p,y,g)=>{p=j(p),o=q(a,o),c&&(c=q(s,c)),h&&(h=q(l,h)),g=q(y,g);var b=ke(p);Zt(b,function(){jt(`Cannot construct ${p} due to unbound types`,[n])}),it([t,e,r],n?[n]:[],function(T){T=T[0];var R,P;n?(R=T.registeredClass,P=R.instancePrototype):P=xt.prototype;var W=Qt(b,function(){if(Object.getPrototypeOf(this)!==d)throw new ht("Use 'new' to construct "+p);if(m.constructor_body===void 0)throw new ht(p+" has no accessible constructor");var kt=m.constructor_body[arguments.length];if(kt===void 0)throw new ht(`Tried to invoke ctor of ${p} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return kt.apply(this,arguments)}),d=Object.create(P,{constructor:{value:W}});W.prototype=d;var m=new Pn(p,W,d,g,R,o,c,h);m.baseClass&&(m.baseClass.__derivedClasses===void 0&&(m.baseClass.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m));var x=new Mt(p,m,!0,!1,!1),M=new Mt(p+"*",m,!1,!1,!1),st=new Mt(p+" const*",m,!1,!0,!1);return We[t]={pointerType:M,constPointerType:st},Ue(b,W),[x,M,st]})},Kt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+n*4>>2]);return r};function te(t,e,r,n,a,o){var s=e.length;s<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var c=e[1]!==null&&r!==null,l=!1,h=1;h<e.length;++h)if(e[h]!==null&&e[h].destructorFunction===void 0){l=!0;break}var p=e[0].name!=="void",y=s-2,g=new Array(y),b=[],T=[];return function(){arguments.length!==y&&C(`function ${t} called with ${arguments.length} arguments, expected ${y}`),T.length=0;var R;b.length=c?2:1,b[0]=a,c&&(R=e[1].toWireType(T,this),b[1]=R);for(var P=0;P<y;++P)g[P]=e[P+2].toWireType(T,arguments[P]),b.push(g[P]);var W=n.apply(null,b);function d(m){if(l)Fe(T);else for(var x=c?1:2;x<e.length;x++){var M=x===1?R:g[x-2];e[x].destructorFunction!==null&&e[x].destructorFunction(M)}if(p)return e[0].fromWireType(m)}return d(W)}}var jn=(t,e,r,n,a,o)=>{var s=Kt(e,r);a=q(n,a),it([],[t],function(c){c=c[0];var l=`constructor ${c.name}`;if(c.registeredClass.constructor_body===void 0&&(c.registeredClass.constructor_body=[]),c.registeredClass.constructor_body[e-1]!==void 0)throw new ht(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${c.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return c.registeredClass.constructor_body[e-1]=()=>{jt(`Cannot construct ${c.name} due to unbound types`,s)},it([],s,h=>(h.splice(1,0,null),c.registeredClass.constructor_body[e-1]=te(l,h,null,a,o),[])),[]})},ze=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?(Vt(t[t.length-1]==")","Parentheses for argument names should match."),t.substr(0,e)):t},Rn=(t,e,r,n,a,o,s,c,l)=>{var h=Kt(r,n);e=j(e),e=ze(e),o=q(a,o),it([],[t],function(p){p=p[0];var y=`${p.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),c&&p.registeredClass.pureVirtualFunctions.push(e);function g(){jt(`Cannot call ${y} due to unbound types`,h)}var b=p.registeredClass.instancePrototype,T=b[e];return T===void 0||T.overloadTable===void 0&&T.className!==p.name&&T.argCount===r-2?(g.argCount=r-2,g.className=p.name,b[e]=g):(He(b,e,y),b[e].overloadTable[r-2]=g),it([],h,function(R){var P=te(y,R,p,o,s);return b[e].overloadTable===void 0?(P.argCount=r-2,b[e]=P):b[e].overloadTable[r-2]=P,[]}),[]})};function Wn(){Object.assign(Ne.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 Ne(){this.allocated=[void 0],this.freelist=[]}var X=new Ne,Ge=t=>{t>=X.reserved&&--X.get(t).refcount===0&&X.free(t)},kn=()=>{for(var t=0,e=X.reserved;e<X.allocated.length;++e)X.allocated[e]!==void 0&&++t;return t},Hn=()=>{X.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),X.reserved=X.allocated.length,u.count_emval_handles=kn},rt={toValue:t=>(t||C("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})}}},Bn=(t,e)=>{e=j(e),Z(t,{name:e,fromWireType:r=>{var n=rt.toValue(r);return Ge(r),n},toWireType:(r,n)=>rt.toHandle(n),argPackAdvance:J,readValueFromPointer:Nt,destructorFunction:null})},Un=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(Y[n>>0])}:function(n){return this.fromWireType(B[n>>0])};case 2:return r?function(n){return this.fromWireType(ct[n>>1])}:function(n){return this.fromWireType(yt[n>>1])};case 4:return r?function(n){return this.fromWireType(k[n>>2])}:function(n){return this.fromWireType(_[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Vn=(t,e,r,n)=>{e=j(e);function a(){}a.values={},Z(t,{name:e,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,s)=>s.value,argPackAdvance:J,readValueFromPointer:Un(e,r,n),destructorFunction:null}),Zt(e,a)},ee=(t,e)=>{var r=ot[t];return r===void 0&&C(e+" has unknown type "+Ye(t)),r},Ln=(t,e,r)=>{var n=ee(t,"enum");e=j(e);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Qt(`${n.name}_${e}`,function(){})}});a.values[r]=o,a[e]=o},re=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(Ce[r>>2])};case 8:return function(r){return this.fromWireType(_e[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},zn=(t,e,r)=>{e=j(e),Z(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:J,readValueFromPointer:Yn(e,r),destructorFunction:null})},Nn=(t,e,r,n,a,o,s)=>{var c=Kt(e,r);t=j(t),t=ze(t),a=q(n,a),Zt(t,function(){jt(`Cannot call ${t} due to unbound types`,c)},e-1),it([],c,function(l){var h=[l[0],null].concat(l.slice(1));return Ue(t,te(t,h,null,a,o),e-1),[]})},Gn=(t,e,r)=>{switch(e){case 1:return r?n=>Y[n>>0]:n=>B[n>>0];case 2:return r?n=>ct[n>>1]:n=>yt[n>>1];case 4:return r?n=>k[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Xn=(t,e,r,n,a)=>{e=j(e);var o=p=>p;if(n===0){var s=32-8*r;o=p=>p<<s>>>s}var c=e.includes("unsigned"),l=(p,y)=>{},h;c?h=function(p,y){return l(y,this.name),y>>>0}:h=function(p,y){return l(y,this.name),y},Z(t,{name:e,fromWireType:o,toWireType:h,argPackAdvance:J,readValueFromPointer:Gn(e,r,n!==0),destructorFunction:null})},qn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(s){var c=_[s>>2],l=_[s+4>>2];return new a(Y.buffer,l,c)}r=j(r),Z(t,{name:r,fromWireType:o,argPackAdvance:J,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Xe=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,s=0;s<t.length;++s){var c=t.charCodeAt(s);if(c>=55296&&c<=57343){var l=t.charCodeAt(++s);c=65536+((c&1023)<<10)|l&1023}if(c<=127){if(r>=o)break;e[r++]=c}else if(c<=2047){if(r+1>=o)break;e[r++]=192|c>>6,e[r++]=128|c&63}else if(c<=65535){if(r+2>=o)break;e[r++]=224|c>>12,e[r++]=128|c>>6&63,e[r++]=128|c&63}else{if(r+3>=o)break;e[r++]=240|c>>18,e[r++]=128|c>>12&63,e[r++]=128|c>>6&63,e[r++]=128|c&63}}return e[r]=0,r-a},Qn=(t,e,r)=>Xe(t,B,e,r),qe=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},Qe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Zn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Qe)return Qe.decode(t.subarray(e,a));for(var o="";e<a;){var s=t[e++];if(!(s&128)){o+=String.fromCharCode(s);continue}var c=t[e++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|c);continue}var l=t[e++]&63;if((s&240)==224?s=(s&15)<<12|c<<6|l:s=(s&7)<<18|c<<12|l<<6|t[e++]&63,s<65536)o+=String.fromCharCode(s);else{var h=s-65536;o+=String.fromCharCode(55296|h>>10,56320|h&1023)}}return o},ne=(t,e)=>t?Zn(B,t,e):"",Jn=(t,e)=>{e=j(e);var r=e==="std::string";Z(t,{name:e,fromWireType(n){var a=_[n>>2],o=n+4,s;if(r)for(var c=o,l=0;l<=a;++l){var h=o+l;if(l==a||B[h]==0){var p=h-c,y=ne(c,p);s===void 0?s=y:(s+="\0",s+=y),c=h+1}}else{for(var g=new Array(a),l=0;l<a;++l)g[l]=String.fromCharCode(B[o+l]);s=g.join("")}return et(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||C("Cannot pass non-string to std::string"),r&&s?o=qe(a):o=a.length;var c=oe(4+o+1),l=c+4;if(_[c>>2]=o,r&&s)Qn(a,l,o+1);else if(s)for(var h=0;h<o;++h){var p=a.charCodeAt(h);p>255&&(et(l),C("String has UTF-16 code units that do not fit in 8 bits")),B[l+h]=p}else for(var h=0;h<o;++h)B[l+h]=a[h];return n!==null&&n.push(et,c),c},argPackAdvance:J,readValueFromPointer:Be,destructorFunction(n){et(n)}})},Ze=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Kn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&yt[n];)++n;if(r=n<<1,r-t>32&&Ze)return Ze.decode(B.subarray(t,r));for(var o="",s=0;!(s>=e/2);++s){var c=ct[t+s*2>>1];if(c==0)break;o+=String.fromCharCode(c)}return o},ta=(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);ct[e>>1]=s,e+=2}return ct[e>>1]=0,e-n},ea=t=>t.length*2,ra=(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},na=(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 c=t.charCodeAt(++o);s=65536+((s&1023)<<10)|c&1023}if(k[e>>2]=s,e+=4,e+4>a)break}return k[e>>2]=0,e-n},aa=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},oa=(t,e,r)=>{r=j(r);var n,a,o,s,c;e===2?(n=Kn,a=ta,s=ea,o=()=>yt,c=1):e===4&&(n=ra,a=na,s=aa,o=()=>_,c=2),Z(t,{name:r,fromWireType:l=>{for(var h=_[l>>2],p=o(),y,g=l+4,b=0;b<=h;++b){var T=l+4+b*e;if(b==h||p[T>>c]==0){var R=T-g,P=n(g,R);y===void 0?y=P:(y+="\0",y+=P),g=T+e}}return et(l),y},toWireType:(l,h)=>{typeof h!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var p=s(h),y=oe(4+p+e);return _[y>>2]=p>>c,a(h,y+4,p+e),l!==null&&l.push(et,y),y},argPackAdvance:J,readValueFromPointer:Nt,destructorFunction(l){et(l)}})},ia=(t,e,r,n,a,o)=>{Dt[t]={name:j(e),rawConstructor:q(r,n),rawDestructor:q(a,o),fields:[]}},sa=(t,e,r,n,a,o,s,c,l,h)=>{Dt[t].fields.push({fieldName:j(e),getterReturnType:r,getter:q(n,a),getterContext:o,setterArgumentType:s,setter:q(c,l),setterContext:h})},ua=(t,e)=>{e=j(e),Z(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},ca={},la=t=>{var e=ca[t];return e===void 0?j(t):e},Je=()=>{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.")},da=t=>t===0?rt.toHandle(Je()):(t=la(t),rt.toHandle(Je()[t])),ha=t=>{t>4&&(X.get(t).refcount+=1)},fa=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var s=ee(_[n+o*4>>2],"parameter "+o);e[o+1]=s.readValueFromPointer(a),a+=s.argPackAdvance}var c=new(r.bind.apply(r,e));return rt.toHandle(c)}},Ke={},pa=(t,e,r,n)=>{t=rt.toValue(t);var a=Ke[e];return a||(a=fa(e),Ke[e]=a),a(t,r,n)},ma=(t,e)=>{t=ee(t,"_emval_take_value");var r=t.readValueFromPointer(e);return rt.toHandle(r)},ya=()=>{gt("")},va=(t,e,r)=>B.copyWithin(t,e,e+r),ga=()=>2147483648,wa=t=>{var e=nt.buffer,r=(t-e.byteLength+65535)/65536;try{return nt.grow(r),Te(),1}catch{}},$a=t=>{var e=B.length;t>>>=0;var r=ga();if(t>r)return!1;for(var n=(l,h)=>l+(h-l%h)%h,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)),c=wa(s);if(c)return!0}return!1},ae={},ba=()=>U||"./this.program",_t=()=>{if(!_t.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,_:ba()};for(var r in ae)ae[r]===void 0?delete e[r]:e[r]=ae[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);_t.strings=n}return _t.strings},Ca=(t,e)=>{for(var r=0;r<t.length;++r)Y[e++>>0]=t.charCodeAt(r);Y[e>>0]=0},_a=(t,e)=>{var r=0;return _t().forEach((n,a)=>{var o=e+r;_[t+a*4>>2]=o,Ca(n,o),r+=n.length+1}),0},Ta=(t,e)=>{var r=_t();_[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),_[e>>2]=n,0},Pa=t=>t,Rt=t=>t%4===0&&(t%100!==0||t%400===0),Ea=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},tr=[31,29,31,30,31,30,31,31,30,31,30,31],er=[31,28,31,30,31,30,31,31,30,31,30,31],Aa=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Rt(r.getFullYear()),a=r.getMonth(),o=(n?tr:er)[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 Da(t,e,r){var n=r>0?r:qe(t)+1,a=new Array(n),o=Xe(t,a,0,a.length);return e&&(a.length=o),a}var Oa=(t,e)=>{Y.set(t,e)},Sa=(t,e,r,n)=>{var 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?ne(a):""},s=ne(r),c={"%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 c)s=s.replace(new RegExp(l,"g"),c[l]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,m,x){for(var M=typeof d=="number"?d.toString():d||"";M.length<m;)M=x[0]+M;return M}function g(d,m){return y(d,m,"0")}function b(d,m){function x(st){return st<0?-1:st>0?1:0}var M;return(M=x(d.getFullYear()-m.getFullYear()))===0&&(M=x(d.getMonth()-m.getMonth()))===0&&(M=x(d.getDate()-m.getDate())),M}function T(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=Aa(new Date(d.tm_year+1900,0,1),d.tm_yday),x=new Date(m.getFullYear(),0,4),M=new Date(m.getFullYear()+1,0,4),st=T(x),kt=T(M);return b(st,m)<=0?b(kt,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var P={"%a":d=>h[d.tm_wday].substring(0,3),"%A":d=>h[d.tm_wday],"%b":d=>p[d.tm_mon].substring(0,3),"%B":d=>p[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+Ea(Rt(d.tm_year+1900)?tr:er,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 x=(d.tm_wday+371-d.tm_yday)%7;x!=4&&(x!=3||!Rt(d.tm_year))&&(m=1)}}else{m=52;var M=(d.tm_wday+7-d.tm_yday-1)%7;(M==4||M==5&&Rt(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,x=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(x?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};s=s.replace(/%%/g,"\0\0");for(var l in P)s.includes(l)&&(s=s.replace(new RegExp(l,"g"),P[l](o)));s=s.replace(/\0\0/g,"%");var W=Da(s,!1);return W.length>e?0:(Oa(W,t),W.length-1)},Fa=(t,e,r,n,a)=>Sa(t,e,r,n);xe=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},ln(),ht=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Cn(),gn(),On(),Le=u.UnboundTypeError=Mn(Error,"UnboundTypeError"),Wn(),Hn();var xa={s:Jr,v:Kr,b:en,g:rn,q:nn,I:an,f:on,T:sn,d:tn,ba:un,P:cn,Y:hn,aa:In,$:jn,w:Rn,X:Bn,x:Vn,h:Ln,K:zn,L:Nn,t:Xn,n:qn,J:Jn,C:oa,A:ia,ca:sa,Z:ua,ea:Ge,da,M:ha,V:pa,_:ma,B:ya,W:va,U:$a,R:_a,S:Ta,D:Ga,E:Na,m:Xa,a:Ma,e:Wa,o:Ba,k:Ra,G:Ya,u:Va,F:za,z:Qa,O:Ja,l:ka,j:Ha,c:ja,p:Ia,H:La,r:qa,i:Ua,y:Za,N:Pa,Q:Fa},E=Zr(),et=u._free=t=>(et=u._free=E.ha)(t),oe=u._malloc=t=>(oe=u._malloc=E.ia)(t),rr=t=>(rr=E.ka)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=E.la)();var A=(t,e)=>(A=E.ma)(t,e),Tt=t=>(Tt=E.na)(t),S=()=>(S=E.oa)(),F=t=>(F=E.pa)(t),nr=t=>(nr=E.qa)(t),ar=t=>(ar=E.ra)(t),or=(t,e,r)=>(or=E.sa)(t,e,r),ir=t=>(ir=E.ta)(t);u.dynCall_viijii=(t,e,r,n,a,o,s)=>(u.dynCall_viijii=E.ua)(t,e,r,n,a,o,s);var sr=u.dynCall_jiiii=(t,e,r,n,a)=>(sr=u.dynCall_jiiii=E.va)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,s)=>(u.dynCall_iiiiij=E.wa)(t,e,r,n,a,o,s),u.dynCall_iiiiijj=(t,e,r,n,a,o,s,c,l)=>(u.dynCall_iiiiijj=E.xa)(t,e,r,n,a,o,s,c,l),u.dynCall_iiiiiijj=(t,e,r,n,a,o,s,c,l,h)=>(u.dynCall_iiiiiijj=E.ya)(t,e,r,n,a,o,s,c,l,h);function Ma(t,e){var r=S();try{return O(t)(e)}catch(n){if(F(r),n!==n+0)throw n;A(1,0)}}function Ia(t,e,r,n){var a=S();try{O(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function ja(t,e,r){var n=S();try{O(t)(e,r)}catch(a){if(F(n),a!==a+0)throw a;A(1,0)}}function Ra(t,e,r,n,a){var o=S();try{return O(t)(e,r,n,a)}catch(s){if(F(o),s!==s+0)throw s;A(1,0)}}function Wa(t,e,r){var n=S();try{return O(t)(e,r)}catch(a){if(F(n),a!==a+0)throw a;A(1,0)}}function ka(t){var e=S();try{O(t)()}catch(r){if(F(e),r!==r+0)throw r;A(1,0)}}function Ha(t,e){var r=S();try{O(t)(e)}catch(n){if(F(r),n!==n+0)throw n;A(1,0)}}function Ba(t,e,r,n){var a=S();try{return O(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function Ua(t,e,r,n,a,o,s,c,l,h,p){var y=S();try{O(t)(e,r,n,a,o,s,c,l,h,p)}catch(g){if(F(y),g!==g+0)throw g;A(1,0)}}function Va(t,e,r,n,a,o,s){var c=S();try{return O(t)(e,r,n,a,o,s)}catch(l){if(F(c),l!==l+0)throw l;A(1,0)}}function La(t,e,r,n,a){var o=S();try{O(t)(e,r,n,a)}catch(s){if(F(o),s!==s+0)throw s;A(1,0)}}function Ya(t,e,r,n,a,o){var s=S();try{return O(t)(e,r,n,a,o)}catch(c){if(F(s),c!==c+0)throw c;A(1,0)}}function za(t,e,r,n,a,o,s,c){var l=S();try{return O(t)(e,r,n,a,o,s,c)}catch(h){if(F(l),h!==h+0)throw h;A(1,0)}}function Na(t,e,r,n){var a=S();try{return O(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function Ga(t,e,r,n){var a=S();try{return O(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function Xa(t){var e=S();try{return O(t)()}catch(r){if(F(e),r!==r+0)throw r;A(1,0)}}function qa(t,e,r,n,a,o,s,c){var l=S();try{O(t)(e,r,n,a,o,s,c)}catch(h){if(F(l),h!==h+0)throw h;A(1,0)}}function Qa(t,e,r,n,a,o,s,c,l,h,p,y){var g=S();try{return O(t)(e,r,n,a,o,s,c,l,h,p,y)}catch(b){if(F(g),b!==b+0)throw b;A(1,0)}}function Za(t,e,r,n,a,o,s,c,l,h,p,y,g,b,T,R){var P=S();try{O(t)(e,r,n,a,o,s,c,l,h,p,y,g,b,T,R)}catch(W){if(F(P),W!==W+0)throw W;A(1,0)}}function Ja(t,e,r,n,a){var o=S();try{return sr(t,e,r,n,a)}catch(s){if(F(o),s!==s+0)throw s;A(1,0)}}var Wt;vt=function t(){Wt||ur(),Wt||(vt=t)};function ur(){if(at>0||(Br(),at>0))return;function t(){Wt||(Wt=!0,u.calledRun=!0,!mt&&(Ur(),w(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Vr()))}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 ur(),f.ready}})();function jr(i){return Bt(Pt,i)}function Rr(i){return xr(Pt,i)}async function Wr(i,f){return Mr(Pt,i,f)}async function kr(i,f){return Ir(Pt,i,f)}const Ut=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 Hr(i){for(const[f,u]of Ut)if(i===u)return f;return"unknown"}class $e extends EventTarget{constructor(u={}){var w;super();lr(this,ut,void 0);try{const v=(w=u==null?void 0:u.formats)==null?void 0:w.filter($=>$!=="unknown");if((v==null?void 0:v.length)===0)throw new TypeError("Hint option provided, but is empty.");v==null||v.forEach($=>{if(!H.includes($))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${$}' is not a valid enum value of type BarcodeFormat.`)}),dr(this,ut,v!=null?v:[]),jr().then($=>{this.dispatchEvent(new CustomEvent("load",{detail:$}))}).catch($=>{this.dispatchEvent(new CustomEvent("error",{detail:$}))})}catch(v){throw me(v,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return H.filter(u=>u!=="unknown")}async detect(u){try{const w=await yr(u);if(w===null)return[];let v;try{fe(w)?v=await Wr(w,{tryHarder:!0,formats:ie(this,ut).map($=>Ut.get($))}):v=await kr(w,{tryHarder:!0,formats:ie(this,ut).map($=>Ut.get($))})}catch($){throw console.error($),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return v.map($=>{const{topLeft:{x:U,y:N},topRight:{x:V,y:D},bottomLeft:{x:G,y:Q},bottomRight:{x:L,y:K}}=$.position,nt=Math.min(U,V,G,L),mt=Math.min(N,D,Q,K),Vt=Math.max(U,V,G,L),Y=Math.max(N,D,Q,K);return{boundingBox:new DOMRectReadOnly(nt,mt,Vt-nt,Y-mt),rawValue:$.text,format:Hr($.format),cornerPoints:[{x:U,y:N},{x:V,y:D},{x:L,y:K},{x:G,y:Q}]}})}catch(w){throw me(w,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ut=new WeakMap,(be=globalThis.BarcodeDetector)!=null||(globalThis.BarcodeDetector=$e),I.BarcodeDetector=$e,I.setZXingModuleOverrides=Rr,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"}),I}({});
var BarcodeDetectionAPI=function(I){"use strict";var cr=(I,B,z)=>{if(!B.has(I))throw TypeError("Cannot "+z)};var oe=(I,B,z)=>(cr(I,B,"read from private field"),z?z.call(I):B.get(I)),lr=(I,B,z)=>{if(B.has(I))throw TypeError("Cannot add the same private member more than once");B instanceof WeakSet?B.add(I):B.set(I,z)},dr=(I,B,z,nt)=>(cr(I,B,"write to private field"),nt?nt.call(I,z):B.set(I,z),z);var ct,be;const B=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],z=[...B,["unknown"]].map(i=>i[0]),nt=new Map(B);function hr(i){for(const[f,u]of nt)if(i===u)return f;return"unknown"}function fr(i){if(ie(i))return{width:i.naturalWidth,height:i.naturalHeight};if(se(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(ue(i))return{width:i.videoWidth,height:i.videoHeight};if(le(i))return{width:i.width,height:i.height};if(he(i))return{width:i.displayWidth,height:i.displayHeight};if(ce(i))return{width:i.width,height:i.height};if(de(i))return{width:i.width,height:i.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 ie(i){try{return i instanceof HTMLImageElement}catch{return!1}}function se(i){try{return i instanceof SVGImageElement}catch{return!1}}function ue(i){try{return i instanceof HTMLVideoElement}catch{return!1}}function ce(i){try{return i instanceof HTMLCanvasElement}catch{return!1}}function le(i){try{return i instanceof ImageBitmap}catch{return!1}}function de(i){try{return i instanceof OffscreenCanvas}catch{return!1}}function he(i){try{return i instanceof VideoFrame}catch{return!1}}function fe(i){try{return i instanceof Blob}catch{return!1}}function pr(i){try{return i instanceof ImageData}catch{return!1}}function mr(i,f){try{const u=new OffscreenCanvas(i,f);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=i,u.height=f,u}}async function pe(i){if(ie(i)&&!await wr(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(se(i)&&!await $r(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(he(i)&&br(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(ue(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(le(i)&&_r(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:f,height:u}=fr(i);if(f===0||u===0)return null;const v=mr(f,u).getContext("2d");v.drawImage(i,0,0);try{return v.getImageData(0,0,f,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function yr(i){let f;try{if(globalThis.createImageBitmap)f=await createImageBitmap(i);else if(globalThis.Image){f=new Image;let w="";try{w=URL.createObjectURL(i),f.src=w,await f.decode()}finally{URL.revokeObjectURL(w)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await pe(f)}function vr(i){const{width:f,height:u}=i;if(f===0||u===0)return null;const w=i.getContext("2d");try{return w.getImageData(0,0,f,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function gr(i){if(fe(i))return await yr(i);if(pr(i)){if(Cr(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return ce(i)||de(i)?vr(i):await pe(i)}async function wr(i){try{return await i.decode(),!0}catch{return!1}}async function $r(i){var f;try{return await((f=i.decode)==null?void 0:f.call(i)),!0}catch{return!1}}function br(i){return i.format===null}function Cr(i){return i.data.buffer.byteLength===0}function _r(i){return i.width===0&&i.height===0}function me(i,f){return i instanceof DOMException?new DOMException(`${f}: ${i.message}`,i.name):i instanceof Error?new i.constructor(`${f}: ${i.message}`):new Error(`${f}: ${i}`)}const ye=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function Tr(i){return i.join("|")}function Pr(i){const f=ve(i);let u=0,w=ye.length-1;for(;u<=w;){const v=Math.floor((u+w)/2),$=ye[v],U=ve($);if(U===f)return $;U<f?u=v+1:w=v-1}return"None"}function ve(i){return i.toLowerCase().replace(/_-\[\]/g,"")}function Er(i,f){return i.Binarizer[f]}function Ar(i,f){return i.CharacterSet[f]}const Dr=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Or(i){return Dr[i.value]}function Fr(i,f){return i.EanAddOnSymbol[f]}function Sr(i,f){return i.TextMode[f]}const pt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function ge(i,f){return{...f,formats:Tr(f.formats),binarizer:Er(i,f.binarizer),eanAddOnSymbol:Fr(i,f.eanAddOnSymbol),textMode:Sr(i,f.textMode),characterSet:Ar(i,f.characterSet)}}const xr={width:200,height:200,format:"QRCode",characterSet:"UTF8",eccLevel:-1,margin:10};function we(i){return{...i,format:Pr(i.format),eccLevel:i.eccLevel,contentType:Or(i.contentType)}}const Mr={locateFile:(i,f)=>{const u=i.match(/_(.+?)\.wasm$/);return u?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.1/dist/${u[1]}/${i}`:f+i}};let Bt=new WeakMap;function Ht(i,f){var u;const w=Bt.get(i);if(w!=null&&w.modulePromise&&(f===void 0||Object.is(f,w.moduleOverrides)))return w.modulePromise;const v=(u=f!=null?f:w==null?void 0:w.moduleOverrides)!=null?u:Mr,$=i({...v});return Bt.set(i,{moduleOverrides:v,modulePromise:$}),$}function Ir(i,f){Bt.set(i,{moduleOverrides:f})}async function jr(i,f,u=pt){const w={...pt,...u},v=await Ht(i),{size:$}=f,U=new Uint8Array(await f.arrayBuffer()),N=v._malloc($);v.HEAPU8.set(U,N);const L=v.readBarcodesFromImage(N,$,ge(v,w));v._free(N);const D=[];for(let G=0;G<L.size();++G)D.push(we(L.get(G)));return D}async function Rr(i,f,u=pt){const w={...pt,...u},v=await Ht(i),{data:$,width:U,height:N,data:{byteLength:L}}=f,D=v._malloc(L);v.HEAPU8.set($,D);const G=v.readBarcodesFromPixmap(D,U,N,ge(v,w));v._free(D);const Q=[];for(let V=0;V<G.size();++V)Q.push(we(G.get(V)));return Q}structuredClone(pt),structuredClone(xr);var Pt=(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(f={}){var u=f,w,v;u.ready=new Promise((t,e)=>{w=t,v=e});var $=Object.assign({},u),U="./this.program",N=typeof window=="object",L=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var D="";function G(t){return u.locateFile?u.locateFile(t,D):D+t}var Q;(N||L)&&(L?D=self.location.href:typeof document<"u"&&document.currentScript&&(D=document.currentScript.src),i&&(D=i),D.indexOf("blob:")!==0?D=D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1):D="",L&&(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 V=u.printErr||console.error.bind(console);Object.assign(u,$),$=null,u.arguments&&u.arguments,u.thisProgram&&(U=u.thisProgram),u.quit&&u.quit;var K;u.wasmBinary&&(K=u.wasmBinary),typeof WebAssembly!="object"&&gt("no native wasm support detected");var at,mt=!1;function Ut(t,e){t||gt(e)}var Y,H,lt,yt,k,_,Ce,_e;function Te(){var t=at.buffer;u.HEAP8=Y=new Int8Array(t),u.HEAP16=lt=new Int16Array(t),u.HEAPU8=H=new Uint8Array(t),u.HEAPU16=yt=new Uint16Array(t),u.HEAP32=k=new Int32Array(t),u.HEAPU32=_=new Uint32Array(t),u.HEAPF32=Ce=new Float32Array(t),u.HEAPF64=_e=new Float64Array(t)}var Pe=[],Ee=[],Ae=[];function Ur(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Yr(u.preRun.shift());Lt(Pe)}function Lr(){Lt(Ee)}function Vr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Nr(u.postRun.shift());Lt(Ae)}function Yr(t){Pe.unshift(t)}function zr(t){Ee.unshift(t)}function Nr(t){Ae.unshift(t)}var ot=0,vt=null;function Gr(t){ot++,u.monitorRunDependencies&&u.monitorRunDependencies(ot)}function Xr(t){if(ot--,u.monitorRunDependencies&&u.monitorRunDependencies(ot),ot==0&&vt){var e=vt;vt=null,e()}}function gt(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",V(t),mt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw v(e),e}var qr="data:application/octet-stream;base64,",De=t=>t.startsWith(qr),dt;dt="zxing_reader.wasm",De(dt)||(dt=G(dt));function Oe(t){if(t==dt&&K)return new Uint8Array(K);if(Q)return Q(t);throw"both async and sync fetching of the wasm failed"}function Qr(t){return!K&&(N||L)&&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(()=>Oe(t)):Promise.resolve().then(()=>Oe(t))}function Fe(t,e,r){return Qr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{V(`failed to asynchronously prepare wasm: ${n}`),gt(n)})}function Zr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!De(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"),Fe(e,r,n)})}):Fe(e,r,n)}function Jr(){var t={a:Ma};function e(n,a){return E=n.exports,at=E.fa,Te(),Le=E.ja,zr(E.ga),Xr(),E}Gr();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){V(`Module.instantiateWasm callback failed with error: ${n}`),v(n)}return Zr(K,dt,t,r).catch(v),{}}var Lt=t=>{for(;t.length>0;)t.shift()(u)};u.noExitRuntime;var Et=[],At=0,Kr=t=>{var e=new Vt(t);return e.get_caught()||(e.set_caught(!0),At--),e.set_rethrown(!1),Et.push(e),ar(e.excPtr),e.get_exception_ptr()},tt=0,tn=()=>{A(0,0);var t=Et.pop();nr(t.excPtr),tt=0};function Vt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,Y[this.ptr+12>>0]=e},this.get_caught=function(){return Y[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,Y[this.ptr+13>>0]=e},this.get_rethrown=function(){return Y[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){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=ir(this.get_type());if(e)return _[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var en=t=>{throw tt||(tt=t),tt},Yt=t=>{var e=tt;if(!e)return Tt(0),0;var r=new Vt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return Tt(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(or(o,n,s))return Tt(o),e}return Tt(n),e},rn=()=>Yt([]),nn=t=>Yt([t]),an=(t,e)=>Yt([t,e]),on=()=>{var t=Et.pop();t||gt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Et.push(t),t.set_rethrown(!0),t.set_caught(!1),At++),tt=e,tt},sn=(t,e,r)=>{var n=new Vt(t);throw n.init(e,r),tt=t,At++,tt},un=()=>At,Dt={},Se=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function zt(t){return this.fromWireType(k[t>>2])}var ht={},it={},Ot={},xe,Ft=t=>{throw new xe(t)},st=(t,e,r)=>{t.forEach(function(c){Ot[c]=e});function n(c){var l=r(c);l.length!==t.length&&Ft("Mismatched type converter count");for(var h=0;h<t.length;++h)Z(t[h],l[h])}var a=new Array(e.length),o=[],s=0;e.forEach((c,l)=>{it.hasOwnProperty(c)?a[l]=it[c]:(o.push(c),ht.hasOwnProperty(c)||(ht[c]=[]),ht[c].push(()=>{a[l]=it[c],++s,s===o.length&&n(a)}))}),o.length===0&&n(a)},cn=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 c={};return a.forEach((l,h)=>{var p=l.fieldName,y=s[h],g=l.getter,b=l.getterContext,T=s[h+a.length],R=l.setter,P=l.setterContext;c[p]={read:W=>y.fromWireType(g(b,W)),write:(W,d)=>{var m=[];R(P,W,T.toWireType(m,d)),Se(m)}}}),[{name:e.name,fromWireType:l=>{var h={};for(var p in c)h[p]=c[p].read(l);return n(l),h},toWireType:(l,h)=>{for(var p in c)if(!(p in h))throw new TypeError(`Missing field: "${p}"`);var y=r();for(p in c)c[p].write(y,h[p]);return l!==null&&l.push(n,y),y},argPackAdvance:J,readValueFromPointer:zt,destructorFunction:n}]})},ln=(t,e,r,n,a)=>{},dn=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Me=t},Me,j=t=>{for(var e="",r=t;H[r];)e+=Me[H[r++]];return e},ft,C=t=>{throw new ft(t)};function hn(t,e,r={}){var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),it.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(it[t]=e,delete Ot[t],ht.hasOwnProperty(t)){var a=ht[t];delete ht[t],a.forEach(o=>o())}}function Z(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return hn(t,e,r)}var J=8,fn=(t,e,r,n)=>{e=j(e),Z(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:J,readValueFromPointer:function(a){return this.fromWireType(H[a])},destructorFunction:null})},pn=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}C(e(t)+" instance already deleted")},Gt=!1,Ie=t=>{},mn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},je=t=>{t.count.value-=1;var e=t.count.value===0;e&&mn(t)},Re=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Re(t,e,r.baseClass);return n===null?null:r.downcast(n)},We={},yn=()=>Object.keys(bt).length,vn=()=>{var t=[];for(var e in bt)bt.hasOwnProperty(e)&&t.push(bt[e]);return t},wt=[],Xt=()=>{for(;wt.length;){var t=wt.pop();t.$$.deleteScheduled=!1,t.delete()}},$t,gn=t=>{$t=t,wt.length&&$t&&$t(Xt)},wn=()=>{u.getInheritedInstanceCount=yn,u.getLiveInheritedInstances=vn,u.flushPendingDeletes=Xt,u.setDelayFunction=gn},bt={},$n=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},bn=(t,e)=>(e=$n(t,e),bt[e]),St=(t,e)=>{(!e.ptrType||!e.ptr)&&Ft("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Ft("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ct(Object.create(t,{$$:{value:e}}))};function Cn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=bn(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=We[o];if(!s)return a.call(this);var c;this.isConst?c=s.constPointerType:c=s.pointerType;var l=Re(e,this.registeredClass,c.registeredClass);return l===null?a.call(this):this.isSmartPointer?St(c.registeredClass.instancePrototype,{ptrType:c,ptr:l,smartPtrType:this,smartPtr:t}):St(c.registeredClass.instancePrototype,{ptrType:c,ptr:l})}var Ct=t=>typeof FinalizationRegistry>"u"?(Ct=e=>e,t):(Gt=new FinalizationRegistry(e=>{je(e.$$)}),Ct=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Gt.register(e,a,e)}return e},Ie=e=>Gt.unregister(e),Ct(t)),_n=()=>{Object.assign(xt.prototype,{isAliasOf(t){if(!(this instanceof xt)||!(t instanceof xt))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=Ct(Object.create(Object.getPrototypeOf(this),{$$:{value:pn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),Ie(this),je(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&&C("Object already scheduled for deletion"),wt.push(this),wt.length===1&&$t&&$t(Xt),this.$$.deleteScheduled=!0,this}})};function xt(){}var Tn=48,Pn=57,ke=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Tn&&e<=Pn?`_${t}`:t};function qt(t,e){return t=ke(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var Be=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`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}},Qt=(t,e,r)=>{u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),Be(u,t,t),u.hasOwnProperty(r)&&C(`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 En(t,e,r,n,a,o,s,c){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=s,this.downcast=c,this.pureVirtualFunctions=[]}var Zt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function An(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${ee(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Zt(e.$$.ptr,r,this.registeredClass);return n}function Dn(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||C(`Cannot pass "${ee(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`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=Zt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`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:C("Unsupporting sharing policy")}return r}function On(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${ee(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Zt(e.$$.ptr,r,this.registeredClass);return n}function He(t){return this.fromWireType(_[t>>2])}var Fn=()=>{Object.assign(Mt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:J,readValueFromPointer:He,deleteObject(t){t!==null&&t.delete()},fromWireType:Cn})};function Mt(t,e,r,n,a,o,s,c,l,h,p){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=c,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=p,!a&&e.baseClass===void 0?n?(this.toWireType=An,this.destructorFunction=null):(this.toWireType=On,this.destructorFunction=null):this.toWireType=Dn}var Ue=(t,e,r)=>{u.hasOwnProperty(t)||Ft("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)},Sn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},It=[],Le,O=t=>{var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=Le.get(t)),e},xn=(t,e,r)=>{if(t.includes("j"))return Sn(t,e,r);var n=O(e).apply(null,r);return n},Mn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),xn(t,e,r)}},q=(t,e)=>{t=j(t);function r(){return t.includes("j")?Mn(t,e):O(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},In=(t,e)=>{var r=qt(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},Ve,Ye=t=>{var e=rr(t),r=j(e);return et(e),r},jt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!it[o]){if(Ot[o]){Ot[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Ve(`${t}: `+r.map(Ye).join([", "]))},jn=(t,e,r,n,a,o,s,c,l,h,p,y,g)=>{p=j(p),o=q(a,o),c&&(c=q(s,c)),h&&(h=q(l,h)),g=q(y,g);var b=ke(p);Qt(b,function(){jt(`Cannot construct ${p} due to unbound types`,[n])}),st([t,e,r],n?[n]:[],function(T){T=T[0];var R,P;n?(R=T.registeredClass,P=R.instancePrototype):P=xt.prototype;var W=qt(b,function(){if(Object.getPrototypeOf(this)!==d)throw new ft("Use 'new' to construct "+p);if(m.constructor_body===void 0)throw new ft(p+" has no accessible constructor");var kt=m.constructor_body[arguments.length];if(kt===void 0)throw new ft(`Tried to invoke ctor of ${p} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return kt.apply(this,arguments)}),d=Object.create(P,{constructor:{value:W}});W.prototype=d;var m=new En(p,W,d,g,R,o,c,h);m.baseClass&&(m.baseClass.__derivedClasses===void 0&&(m.baseClass.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m));var x=new Mt(p,m,!0,!1,!1),M=new Mt(p+"*",m,!1,!1,!1),ut=new Mt(p+" const*",m,!1,!0,!1);return We[t]={pointerType:M,constPointerType:ut},Ue(b,W),[x,M,ut]})},Jt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+n*4>>2]);return r};function Kt(t,e,r,n,a,o){var s=e.length;s<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var c=e[1]!==null&&r!==null,l=!1,h=1;h<e.length;++h)if(e[h]!==null&&e[h].destructorFunction===void 0){l=!0;break}var p=e[0].name!=="void",y=s-2,g=new Array(y),b=[],T=[];return function(){arguments.length!==y&&C(`function ${t} called with ${arguments.length} arguments, expected ${y}`),T.length=0;var R;b.length=c?2:1,b[0]=a,c&&(R=e[1].toWireType(T,this),b[1]=R);for(var P=0;P<y;++P)g[P]=e[P+2].toWireType(T,arguments[P]),b.push(g[P]);var W=n.apply(null,b);function d(m){if(l)Se(T);else for(var x=c?1:2;x<e.length;x++){var M=x===1?R:g[x-2];e[x].destructorFunction!==null&&e[x].destructorFunction(M)}if(p)return e[0].fromWireType(m)}return d(W)}}var Rn=(t,e,r,n,a,o)=>{var s=Jt(e,r);a=q(n,a),st([],[t],function(c){c=c[0];var l=`constructor ${c.name}`;if(c.registeredClass.constructor_body===void 0&&(c.registeredClass.constructor_body=[]),c.registeredClass.constructor_body[e-1]!==void 0)throw new ft(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${c.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return c.registeredClass.constructor_body[e-1]=()=>{jt(`Cannot construct ${c.name} due to unbound types`,s)},st([],s,h=>(h.splice(1,0,null),c.registeredClass.constructor_body[e-1]=Kt(l,h,null,a,o),[])),[]})},ze=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?(Ut(t[t.length-1]==")","Parentheses for argument names should match."),t.substr(0,e)):t},Wn=(t,e,r,n,a,o,s,c,l)=>{var h=Jt(r,n);e=j(e),e=ze(e),o=q(a,o),st([],[t],function(p){p=p[0];var y=`${p.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),c&&p.registeredClass.pureVirtualFunctions.push(e);function g(){jt(`Cannot call ${y} due to unbound types`,h)}var b=p.registeredClass.instancePrototype,T=b[e];return T===void 0||T.overloadTable===void 0&&T.className!==p.name&&T.argCount===r-2?(g.argCount=r-2,g.className=p.name,b[e]=g):(Be(b,e,y),b[e].overloadTable[r-2]=g),st([],h,function(R){var P=Kt(y,R,p,o,s);return b[e].overloadTable===void 0?(P.argCount=r-2,b[e]=P):b[e].overloadTable[r-2]=P,[]}),[]})};function kn(){Object.assign(Ne.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 Ne(){this.allocated=[void 0],this.freelist=[]}var X=new Ne,Ge=t=>{t>=X.reserved&&--X.get(t).refcount===0&&X.free(t)},Bn=()=>{for(var t=0,e=X.reserved;e<X.allocated.length;++e)X.allocated[e]!==void 0&&++t;return t},Hn=()=>{X.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),X.reserved=X.allocated.length,u.count_emval_handles=Bn},rt={toValue:t=>(t||C("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})}}},Un=(t,e)=>{e=j(e),Z(t,{name:e,fromWireType:r=>{var n=rt.toValue(r);return Ge(r),n},toWireType:(r,n)=>rt.toHandle(n),argPackAdvance:J,readValueFromPointer:zt,destructorFunction:null})},Ln=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(Y[n>>0])}:function(n){return this.fromWireType(H[n>>0])};case 2:return r?function(n){return this.fromWireType(lt[n>>1])}:function(n){return this.fromWireType(yt[n>>1])};case 4:return r?function(n){return this.fromWireType(k[n>>2])}:function(n){return this.fromWireType(_[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Vn=(t,e,r,n)=>{e=j(e);function a(){}a.values={},Z(t,{name:e,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,s)=>s.value,argPackAdvance:J,readValueFromPointer:Ln(e,r,n),destructorFunction:null}),Qt(e,a)},te=(t,e)=>{var r=it[t];return r===void 0&&C(e+" has unknown type "+Ye(t)),r},Yn=(t,e,r)=>{var n=te(t,"enum");e=j(e);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:qt(`${n.name}_${e}`,function(){})}});a.values[r]=o,a[e]=o},ee=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},zn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(Ce[r>>2])};case 8:return function(r){return this.fromWireType(_e[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Nn=(t,e,r)=>{e=j(e),Z(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:J,readValueFromPointer:zn(e,r),destructorFunction:null})},Gn=(t,e,r,n,a,o,s)=>{var c=Jt(e,r);t=j(t),t=ze(t),a=q(n,a),Qt(t,function(){jt(`Cannot call ${t} due to unbound types`,c)},e-1),st([],c,function(l){var h=[l[0],null].concat(l.slice(1));return Ue(t,Kt(t,h,null,a,o),e-1),[]})},Xn=(t,e,r)=>{switch(e){case 1:return r?n=>Y[n>>0]:n=>H[n>>0];case 2:return r?n=>lt[n>>1]:n=>yt[n>>1];case 4:return r?n=>k[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},qn=(t,e,r,n,a)=>{e=j(e);var o=p=>p;if(n===0){var s=32-8*r;o=p=>p<<s>>>s}var c=e.includes("unsigned"),l=(p,y)=>{},h;c?h=function(p,y){return l(y,this.name),y>>>0}:h=function(p,y){return l(y,this.name),y},Z(t,{name:e,fromWireType:o,toWireType:h,argPackAdvance:J,readValueFromPointer:Xn(e,r,n!==0),destructorFunction:null})},Qn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(s){var c=_[s>>2],l=_[s+4>>2];return new a(Y.buffer,l,c)}r=j(r),Z(t,{name:r,fromWireType:o,argPackAdvance:J,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Xe=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,s=0;s<t.length;++s){var c=t.charCodeAt(s);if(c>=55296&&c<=57343){var l=t.charCodeAt(++s);c=65536+((c&1023)<<10)|l&1023}if(c<=127){if(r>=o)break;e[r++]=c}else if(c<=2047){if(r+1>=o)break;e[r++]=192|c>>6,e[r++]=128|c&63}else if(c<=65535){if(r+2>=o)break;e[r++]=224|c>>12,e[r++]=128|c>>6&63,e[r++]=128|c&63}else{if(r+3>=o)break;e[r++]=240|c>>18,e[r++]=128|c>>12&63,e[r++]=128|c>>6&63,e[r++]=128|c&63}}return e[r]=0,r-a},Zn=(t,e,r)=>Xe(t,H,e,r),qe=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},Qe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Jn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Qe)return Qe.decode(t.subarray(e,a));for(var o="";e<a;){var s=t[e++];if(!(s&128)){o+=String.fromCharCode(s);continue}var c=t[e++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|c);continue}var l=t[e++]&63;if((s&240)==224?s=(s&15)<<12|c<<6|l:s=(s&7)<<18|c<<12|l<<6|t[e++]&63,s<65536)o+=String.fromCharCode(s);else{var h=s-65536;o+=String.fromCharCode(55296|h>>10,56320|h&1023)}}return o},re=(t,e)=>t?Jn(H,t,e):"",Kn=(t,e)=>{e=j(e);var r=e==="std::string";Z(t,{name:e,fromWireType(n){var a=_[n>>2],o=n+4,s;if(r)for(var c=o,l=0;l<=a;++l){var h=o+l;if(l==a||H[h]==0){var p=h-c,y=re(c,p);s===void 0?s=y:(s+="\0",s+=y),c=h+1}}else{for(var g=new Array(a),l=0;l<a;++l)g[l]=String.fromCharCode(H[o+l]);s=g.join("")}return et(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||C("Cannot pass non-string to std::string"),r&&s?o=qe(a):o=a.length;var c=ae(4+o+1),l=c+4;if(_[c>>2]=o,r&&s)Zn(a,l,o+1);else if(s)for(var h=0;h<o;++h){var p=a.charCodeAt(h);p>255&&(et(l),C("String has UTF-16 code units that do not fit in 8 bits")),H[l+h]=p}else for(var h=0;h<o;++h)H[l+h]=a[h];return n!==null&&n.push(et,c),c},argPackAdvance:J,readValueFromPointer:He,destructorFunction(n){et(n)}})},Ze=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,ta=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&yt[n];)++n;if(r=n<<1,r-t>32&&Ze)return Ze.decode(H.subarray(t,r));for(var o="",s=0;!(s>=e/2);++s){var c=lt[t+s*2>>1];if(c==0)break;o+=String.fromCharCode(c)}return o},ea=(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);lt[e>>1]=s,e+=2}return lt[e>>1]=0,e-n},ra=t=>t.length*2,na=(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},aa=(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 c=t.charCodeAt(++o);s=65536+((s&1023)<<10)|c&1023}if(k[e>>2]=s,e+=4,e+4>a)break}return k[e>>2]=0,e-n},oa=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},ia=(t,e,r)=>{r=j(r);var n,a,o,s,c;e===2?(n=ta,a=ea,s=ra,o=()=>yt,c=1):e===4&&(n=na,a=aa,s=oa,o=()=>_,c=2),Z(t,{name:r,fromWireType:l=>{for(var h=_[l>>2],p=o(),y,g=l+4,b=0;b<=h;++b){var T=l+4+b*e;if(b==h||p[T>>c]==0){var R=T-g,P=n(g,R);y===void 0?y=P:(y+="\0",y+=P),g=T+e}}return et(l),y},toWireType:(l,h)=>{typeof h!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var p=s(h),y=ae(4+p+e);return _[y>>2]=p>>c,a(h,y+4,p+e),l!==null&&l.push(et,y),y},argPackAdvance:J,readValueFromPointer:zt,destructorFunction(l){et(l)}})},sa=(t,e,r,n,a,o)=>{Dt[t]={name:j(e),rawConstructor:q(r,n),rawDestructor:q(a,o),fields:[]}},ua=(t,e,r,n,a,o,s,c,l,h)=>{Dt[t].fields.push({fieldName:j(e),getterReturnType:r,getter:q(n,a),getterContext:o,setterArgumentType:s,setter:q(c,l),setterContext:h})},ca=(t,e)=>{e=j(e),Z(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},la={},da=t=>{var e=la[t];return e===void 0?j(t):e},Je=()=>{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.")},ha=t=>t===0?rt.toHandle(Je()):(t=da(t),rt.toHandle(Je()[t])),fa=t=>{t>4&&(X.get(t).refcount+=1)},pa=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var s=te(_[n+o*4>>2],"parameter "+o);e[o+1]=s.readValueFromPointer(a),a+=s.argPackAdvance}var c=new(r.bind.apply(r,e));return rt.toHandle(c)}},Ke={},ma=(t,e,r,n)=>{t=rt.toValue(t);var a=Ke[e];return a||(a=pa(e),Ke[e]=a),a(t,r,n)},ya=(t,e)=>{t=te(t,"_emval_take_value");var r=t.readValueFromPointer(e);return rt.toHandle(r)},va=()=>{gt("")},ga=(t,e,r)=>H.copyWithin(t,e,e+r),wa=()=>2147483648,$a=t=>{var e=at.buffer,r=(t-e.byteLength+65535)/65536;try{return at.grow(r),Te(),1}catch{}},ba=t=>{var e=H.length;t>>>=0;var r=wa();if(t>r)return!1;for(var n=(l,h)=>l+(h-l%h)%h,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)),c=$a(s);if(c)return!0}return!1},ne={},Ca=()=>U||"./this.program",_t=()=>{if(!_t.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 ne)ne[r]===void 0?delete e[r]:e[r]=ne[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);_t.strings=n}return _t.strings},_a=(t,e)=>{for(var r=0;r<t.length;++r)Y[e++>>0]=t.charCodeAt(r);Y[e>>0]=0},Ta=(t,e)=>{var r=0;return _t().forEach((n,a)=>{var o=e+r;_[t+a*4>>2]=o,_a(n,o),r+=n.length+1}),0},Pa=(t,e)=>{var r=_t();_[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),_[e>>2]=n,0},Ea=t=>t,Rt=t=>t%4===0&&(t%100!==0||t%400===0),Aa=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},tr=[31,29,31,30,31,30,31,31,30,31,30,31],er=[31,28,31,30,31,30,31,31,30,31,30,31],Da=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Rt(r.getFullYear()),a=r.getMonth(),o=(n?tr:er)[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 Oa(t,e,r){var n=r>0?r:qe(t)+1,a=new Array(n),o=Xe(t,a,0,a.length);return e&&(a.length=o),a}var Fa=(t,e)=>{Y.set(t,e)},Sa=(t,e,r,n)=>{var 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?re(a):""},s=re(r),c={"%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 c)s=s.replace(new RegExp(l,"g"),c[l]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,m,x){for(var M=typeof d=="number"?d.toString():d||"";M.length<m;)M=x[0]+M;return M}function g(d,m){return y(d,m,"0")}function b(d,m){function x(ut){return ut<0?-1:ut>0?1:0}var M;return(M=x(d.getFullYear()-m.getFullYear()))===0&&(M=x(d.getMonth()-m.getMonth()))===0&&(M=x(d.getDate()-m.getDate())),M}function T(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=Da(new Date(d.tm_year+1900,0,1),d.tm_yday),x=new Date(m.getFullYear(),0,4),M=new Date(m.getFullYear()+1,0,4),ut=T(x),kt=T(M);return b(ut,m)<=0?b(kt,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var P={"%a":d=>h[d.tm_wday].substring(0,3),"%A":d=>h[d.tm_wday],"%b":d=>p[d.tm_mon].substring(0,3),"%B":d=>p[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+Aa(Rt(d.tm_year+1900)?tr:er,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 x=(d.tm_wday+371-d.tm_yday)%7;x!=4&&(x!=3||!Rt(d.tm_year))&&(m=1)}}else{m=52;var M=(d.tm_wday+7-d.tm_yday-1)%7;(M==4||M==5&&Rt(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,x=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(x?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};s=s.replace(/%%/g,"\0\0");for(var l in P)s.includes(l)&&(s=s.replace(new RegExp(l,"g"),P[l](o)));s=s.replace(/\0\0/g,"%");var W=Oa(s,!1);return W.length>e?0:(Fa(W,t),W.length-1)},xa=(t,e,r,n,a)=>Sa(t,e,r,n);xe=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},dn(),ft=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},_n(),wn(),Fn(),Ve=u.UnboundTypeError=In(Error,"UnboundTypeError"),kn(),Hn();var Ma={s:Kr,v:tn,b:rn,g:nn,q:an,I:on,f:sn,T:un,d:en,ba:cn,P:ln,Y:fn,aa:jn,$:Rn,w:Wn,X:Un,x:Vn,h:Yn,K:Nn,L:Gn,t:qn,n:Qn,J:Kn,C:ia,A:sa,ca:ua,Z:ca,ea:Ge,da:ha,M:fa,V:ma,_:ya,B:va,W:ga,U:ba,R:Ta,S:Pa,D:Xa,E:Ga,m:qa,a:Ia,e:ka,o:Ua,k:Wa,G:za,u:Va,F:Na,z:Za,O:Ka,l:Ba,j:Ha,c:Ra,p:ja,H:Ya,r:Qa,i:La,y:Ja,N:Ea,Q:xa},E=Jr(),et=u._free=t=>(et=u._free=E.ha)(t),ae=u._malloc=t=>(ae=u._malloc=E.ia)(t),rr=t=>(rr=E.ka)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=E.la)();var A=(t,e)=>(A=E.ma)(t,e),Tt=t=>(Tt=E.na)(t),F=()=>(F=E.oa)(),S=t=>(S=E.pa)(t),nr=t=>(nr=E.qa)(t),ar=t=>(ar=E.ra)(t),or=(t,e,r)=>(or=E.sa)(t,e,r),ir=t=>(ir=E.ta)(t);u.dynCall_viijii=(t,e,r,n,a,o,s)=>(u.dynCall_viijii=E.ua)(t,e,r,n,a,o,s);var sr=u.dynCall_jiiii=(t,e,r,n,a)=>(sr=u.dynCall_jiiii=E.va)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,s)=>(u.dynCall_iiiiij=E.wa)(t,e,r,n,a,o,s),u.dynCall_iiiiijj=(t,e,r,n,a,o,s,c,l)=>(u.dynCall_iiiiijj=E.xa)(t,e,r,n,a,o,s,c,l),u.dynCall_iiiiiijj=(t,e,r,n,a,o,s,c,l,h)=>(u.dynCall_iiiiiijj=E.ya)(t,e,r,n,a,o,s,c,l,h);function Ia(t,e){var r=F();try{return O(t)(e)}catch(n){if(S(r),n!==n+0)throw n;A(1,0)}}function ja(t,e,r,n){var a=F();try{O(t)(e,r,n)}catch(o){if(S(a),o!==o+0)throw o;A(1,0)}}function Ra(t,e,r){var n=F();try{O(t)(e,r)}catch(a){if(S(n),a!==a+0)throw a;A(1,0)}}function Wa(t,e,r,n,a){var o=F();try{return O(t)(e,r,n,a)}catch(s){if(S(o),s!==s+0)throw s;A(1,0)}}function ka(t,e,r){var n=F();try{return O(t)(e,r)}catch(a){if(S(n),a!==a+0)throw a;A(1,0)}}function Ba(t){var e=F();try{O(t)()}catch(r){if(S(e),r!==r+0)throw r;A(1,0)}}function Ha(t,e){var r=F();try{O(t)(e)}catch(n){if(S(r),n!==n+0)throw n;A(1,0)}}function Ua(t,e,r,n){var a=F();try{return O(t)(e,r,n)}catch(o){if(S(a),o!==o+0)throw o;A(1,0)}}function La(t,e,r,n,a,o,s,c,l,h,p){var y=F();try{O(t)(e,r,n,a,o,s,c,l,h,p)}catch(g){if(S(y),g!==g+0)throw g;A(1,0)}}function Va(t,e,r,n,a,o,s){var c=F();try{return O(t)(e,r,n,a,o,s)}catch(l){if(S(c),l!==l+0)throw l;A(1,0)}}function Ya(t,e,r,n,a){var o=F();try{O(t)(e,r,n,a)}catch(s){if(S(o),s!==s+0)throw s;A(1,0)}}function za(t,e,r,n,a,o){var s=F();try{return O(t)(e,r,n,a,o)}catch(c){if(S(s),c!==c+0)throw c;A(1,0)}}function Na(t,e,r,n,a,o,s,c){var l=F();try{return O(t)(e,r,n,a,o,s,c)}catch(h){if(S(l),h!==h+0)throw h;A(1,0)}}function Ga(t,e,r,n){var a=F();try{return O(t)(e,r,n)}catch(o){if(S(a),o!==o+0)throw o;A(1,0)}}function Xa(t,e,r,n){var a=F();try{return O(t)(e,r,n)}catch(o){if(S(a),o!==o+0)throw o;A(1,0)}}function qa(t){var e=F();try{return O(t)()}catch(r){if(S(e),r!==r+0)throw r;A(1,0)}}function Qa(t,e,r,n,a,o,s,c){var l=F();try{O(t)(e,r,n,a,o,s,c)}catch(h){if(S(l),h!==h+0)throw h;A(1,0)}}function Za(t,e,r,n,a,o,s,c,l,h,p,y){var g=F();try{return O(t)(e,r,n,a,o,s,c,l,h,p,y)}catch(b){if(S(g),b!==b+0)throw b;A(1,0)}}function Ja(t,e,r,n,a,o,s,c,l,h,p,y,g,b,T,R){var P=F();try{O(t)(e,r,n,a,o,s,c,l,h,p,y,g,b,T,R)}catch(W){if(S(P),W!==W+0)throw W;A(1,0)}}function Ka(t,e,r,n,a){var o=F();try{return sr(t,e,r,n,a)}catch(s){if(S(o),s!==s+0)throw s;A(1,0)}}var Wt;vt=function t(){Wt||ur(),Wt||(vt=t)};function ur(){if(ot>0||(Ur(),ot>0))return;function t(){Wt||(Wt=!0,u.calledRun=!0,!mt&&(Lr(),w(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Vr()))}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 ur(),f.ready}})();function Wr(i){return Ht(Pt,i)}function kr(i){return Ir(Pt,i)}async function Br(i,f){return jr(Pt,i,f)}async function Hr(i,f){return Rr(Pt,i,f)}class $e extends EventTarget{constructor(u={}){var w;super();lr(this,ct,void 0);try{const v=(w=u==null?void 0:u.formats)==null?void 0:w.filter($=>$!=="unknown");if((v==null?void 0:v.length)===0)throw new TypeError("Hint option provided, but is empty.");v==null||v.forEach($=>{if(!nt.has($))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${$}' is not a valid enum value of type BarcodeFormat.`)}),dr(this,ct,v!=null?v:[]),Wr().then($=>{this.dispatchEvent(new CustomEvent("load",{detail:$}))}).catch($=>{this.dispatchEvent(new CustomEvent("error",{detail:$}))})}catch(v){throw me(v,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return z.filter(u=>u!=="unknown")}async detect(u){try{const w=await gr(u);if(w===null)return[];let v;try{fe(w)?v=await Br(w,{tryHarder:!0,formats:oe(this,ct).map($=>nt.get($))}):v=await Hr(w,{tryHarder:!0,formats:oe(this,ct).map($=>nt.get($))})}catch($){throw console.error($),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return v.map($=>{const{topLeft:{x:U,y:N},topRight:{x:L,y:D},bottomLeft:{x:G,y:Q},bottomRight:{x:V,y:K}}=$.position,at=Math.min(U,L,G,V),mt=Math.min(N,D,Q,K),Ut=Math.max(U,L,G,V),Y=Math.max(N,D,Q,K);return{boundingBox:new DOMRectReadOnly(at,mt,Ut-at,Y-mt),rawValue:$.text,format:hr($.format),cornerPoints:[{x:U,y:N},{x:L,y:D},{x:V,y:K},{x:G,y:Q}]}})}catch(w){throw me(w,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ct=new WeakMap,(be=globalThis.BarcodeDetector)!=null||(globalThis.BarcodeDetector=$e),I.BarcodeDetector=$e,I.setZXingModuleOverrides=kr,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"}),I}({});

@@ -1,3 +0,3 @@

var BarcodeDetectionAPI=function(I){"use strict";var sr=(I,H,z)=>{if(!H.has(I))throw TypeError("Cannot "+z)};var ie=(I,H,z)=>(sr(I,H,"read from private field"),z?z.call(I):H.get(I)),ur=(I,H,z)=>{if(H.has(I))throw TypeError("Cannot add the same private member more than once");H instanceof WeakSet?H.add(I):H.set(I,z)},cr=(I,H,z,ft)=>(sr(I,H,"write to private field"),ft?ft.call(I,z):H.set(I,z),z);var ut;const H=["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(i){if(ft(i))return{width:i.naturalWidth,height:i.naturalHeight};if(se(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(ue(i))return{width:i.videoWidth,height:i.videoHeight};if(le(i))return{width:i.width,height:i.height};if(he(i))return{width:i.displayWidth,height:i.displayHeight};if(ce(i))return{width:i.width,height:i.height};if(de(i))return{width:i.width,height:i.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 ft(i){try{return i instanceof HTMLImageElement}catch{return!1}}function se(i){try{return i instanceof SVGImageElement}catch{return!1}}function ue(i){try{return i instanceof HTMLVideoElement}catch{return!1}}function ce(i){try{return i instanceof HTMLCanvasElement}catch{return!1}}function le(i){try{return i instanceof ImageBitmap}catch{return!1}}function de(i){try{return i instanceof OffscreenCanvas}catch{return!1}}function he(i){try{return i instanceof VideoFrame}catch{return!1}}function fe(i){try{return i instanceof Blob}catch{return!1}}function lr(i){try{return i instanceof ImageData}catch{return!1}}function dr(i,f){try{const u=new OffscreenCanvas(i,f);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=i,u.height=f,u}}async function pe(i){if(ft(i)&&!await mr(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(se(i)&&!await yr(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(he(i)&&vr(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(ue(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(le(i)&&wr(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:f,height:u}=z(i);if(f===0||u===0)return null;const v=dr(f,u).getContext("2d");v.drawImage(i,0,0);try{return v.getImageData(0,0,f,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function hr(i){let f;try{if(globalThis.createImageBitmap)f=await createImageBitmap(i);else if(globalThis.Image){f=new Image;let w="";try{w=URL.createObjectURL(i),f.src=w,await f.decode()}finally{URL.revokeObjectURL(w)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await pe(f)}function fr(i){const{width:f,height:u}=i;if(f===0||u===0)return null;const w=i.getContext("2d");try{return w.getImageData(0,0,f,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function pr(i){if(fe(i))return await hr(i);if(lr(i)){if(gr(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return ce(i)||de(i)?fr(i):await pe(i)}async function mr(i){try{return await i.decode(),!0}catch{return!1}}async function yr(i){var f;try{return await((f=i.decode)==null?void 0:f.call(i)),!0}catch{return!1}}function vr(i){return i.format===null}function gr(i){return i.data.buffer.byteLength===0}function wr(i){return i.width===0&&i.height===0}function me(i,f){return i instanceof DOMException?new DOMException(`${f}: ${i.message}`,i.name):i instanceof Error?new i.constructor(`${f}: ${i.message}`):new Error(`${f}: ${i}`)}const ye=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function $r(i){return i.join("|")}function br(i){const f=ve(i);let u=0,w=ye.length-1;for(;u<=w;){const v=Math.floor((u+w)/2),$=ye[v],U=ve($);if(U===f)return $;U<f?u=v+1:w=v-1}return"None"}function ve(i){return i.toLowerCase().replace(/_-\[\]/g,"")}function Cr(i,f){return i.Binarizer[f]}function _r(i,f){return i.CharacterSet[f]}const Tr=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Pr(i){return Tr[i.value]}function Er(i,f){return i.EanAddOnSymbol[f]}function Ar(i,f){return i.TextMode[f]}const pt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function ge(i,f){return{...f,formats:$r(f.formats),binarizer:Cr(i,f.binarizer),eanAddOnSymbol:Er(i,f.eanAddOnSymbol),textMode:Ar(i,f.textMode),characterSet:_r(i,f.characterSet)}}const Dr={width:200,height:200,format:"QRCode",characterSet:"UTF8",eccLevel:-1,margin:10};function we(i){return{...i,format:br(i.format),eccLevel:i.eccLevel,contentType:Pr(i.contentType)}}const Or={locateFile:(i,f)=>{const u=i.match(/_(.+?)\.wasm$/);return u?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.0.0/dist/${u[1]}/${i}`:f+i}};let Ht=new WeakMap;function Bt(i,f){var u;const w=Ht.get(i);if(w!=null&&w.modulePromise&&(f===void 0||Object.is(f,w.moduleOverrides)))return w.modulePromise;const v=(u=f!=null?f:w==null?void 0:w.moduleOverrides)!=null?u:Or,$=i({...v});return Ht.set(i,{moduleOverrides:v,modulePromise:$}),$}function Sr(i,f){Ht.set(i,{moduleOverrides:f})}async function Fr(i,f,u=pt){const w={...pt,...u},v=await Bt(i),{size:$}=f,U=new Uint8Array(await f.arrayBuffer()),N=v._malloc($);v.HEAPU8.set(U,N);const V=v.readBarcodesFromImage(N,$,ge(v,w));v._free(N);const D=[];for(let G=0;G<V.size();++G)D.push(we(V.get(G)));return D}async function xr(i,f,u=pt){const w={...pt,...u},v=await Bt(i),{data:$,width:U,height:N,data:{byteLength:V}}=f,D=v._malloc(V);v.HEAPU8.set($,D);const G=v.readBarcodesFromPixmap(D,U,N,ge(v,w));v._free(D);const Q=[];for(let L=0;L<G.size();++L)Q.push(we(G.get(L)));return Q}structuredClone(pt),structuredClone(Dr);var Pt=(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(f={}){var u=f,w,v;u.ready=new Promise((t,e)=>{w=t,v=e});var $=Object.assign({},u),U="./this.program",N=typeof window=="object",V=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var D="";function G(t){return u.locateFile?u.locateFile(t,D):D+t}var Q;(N||V)&&(V?D=self.location.href:typeof document<"u"&&document.currentScript&&(D=document.currentScript.src),i&&(D=i),D.indexOf("blob:")!==0?D=D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1):D="",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 L=u.printErr||console.error.bind(console);Object.assign(u,$),$=null,u.arguments&&u.arguments,u.thisProgram&&(U=u.thisProgram),u.quit&&u.quit;var K;u.wasmBinary&&(K=u.wasmBinary),typeof WebAssembly!="object"&&gt("no native wasm support detected");var nt,mt=!1;function Vt(t,e){t||gt(e)}var Y,B,ct,yt,k,_,$e,be;function Ce(){var t=nt.buffer;u.HEAP8=Y=new Int8Array(t),u.HEAP16=ct=new Int16Array(t),u.HEAPU8=B=new Uint8Array(t),u.HEAPU16=yt=new Uint16Array(t),u.HEAP32=k=new Int32Array(t),u.HEAPU32=_=new Uint32Array(t),u.HEAPF32=$e=new Float32Array(t),u.HEAPF64=be=new Float64Array(t)}var _e=[],Te=[],Pe=[];function Hr(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Vr(u.preRun.shift());Lt(_e)}function Br(){Lt(Te)}function Ur(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Yr(u.postRun.shift());Lt(Pe)}function Vr(t){_e.unshift(t)}function Lr(t){Te.unshift(t)}function Yr(t){Pe.unshift(t)}var at=0,vt=null;function zr(t){at++,u.monitorRunDependencies&&u.monitorRunDependencies(at)}function Nr(t){if(at--,u.monitorRunDependencies&&u.monitorRunDependencies(at),at==0&&vt){var e=vt;vt=null,e()}}function gt(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",L(t),mt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw v(e),e}var Gr="data:application/octet-stream;base64,",Ee=t=>t.startsWith(Gr),lt;lt="zxing_reader.wasm",Ee(lt)||(lt=G(lt));function Ae(t){if(t==lt&&K)return new Uint8Array(K);if(Q)return Q(t);throw"both async and sync fetching of the wasm failed"}function Xr(t){return!K&&(N||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(()=>Ae(t)):Promise.resolve().then(()=>Ae(t))}function De(t,e,r){return Xr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{L(`failed to asynchronously prepare wasm: ${n}`),gt(n)})}function qr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!Ee(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(s){return L(`wasm streaming compile failed: ${s}`),L("falling back to ArrayBuffer instantiation"),De(e,r,n)})}):De(e,r,n)}function Qr(){var t={a:Fa};function e(n,a){return E=n.exports,nt=E.fa,Ce(),Be=E.ja,Lr(E.ga),Nr(),E}zr();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){L(`Module.instantiateWasm callback failed with error: ${n}`),v(n)}return qr(K,lt,t,r).catch(v),{}}var Lt=t=>{for(;t.length>0;)t.shift()(u)};u.noExitRuntime;var Et=[],At=0,Zr=t=>{var e=new Yt(t);return e.get_caught()||(e.set_caught(!0),At--),e.set_rethrown(!1),Et.push(e),rr(e.excPtr),e.get_exception_ptr()},tt=0,Jr=()=>{A(0,0);var t=Et.pop();er(t.excPtr),tt=0};function Yt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,Y[this.ptr+12>>0]=e},this.get_caught=function(){return Y[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,Y[this.ptr+13>>0]=e},this.get_rethrown=function(){return Y[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){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=ar(this.get_type());if(e)return _[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var Kr=t=>{throw tt||(tt=t),tt},zt=t=>{var e=tt;if(!e)return Tt(0),0;var r=new Yt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return Tt(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(nr(o,n,s))return Tt(o),e}return Tt(n),e},tn=()=>zt([]),en=t=>zt([t]),rn=(t,e)=>zt([t,e]),nn=()=>{var t=Et.pop();t||gt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Et.push(t),t.set_rethrown(!0),t.set_caught(!1),At++),tt=e,tt},an=(t,e,r)=>{var n=new Yt(t);throw n.init(e,r),tt=t,At++,tt},on=()=>At,Dt={},Oe=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Nt(t){return this.fromWireType(k[t>>2])}var dt={},ot={},Ot={},Se,St=t=>{throw new Se(t)},it=(t,e,r)=>{t.forEach(function(c){Ot[c]=e});function n(c){var l=r(c);l.length!==t.length&&St("Mismatched type converter count");for(var h=0;h<t.length;++h)Z(t[h],l[h])}var a=new Array(e.length),o=[],s=0;e.forEach((c,l)=>{ot.hasOwnProperty(c)?a[l]=ot[c]:(o.push(c),dt.hasOwnProperty(c)||(dt[c]=[]),dt[c].push(()=>{a[l]=ot[c],++s,s===o.length&&n(a)}))}),o.length===0&&n(a)},sn=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));it([t],o,s=>{var c={};return a.forEach((l,h)=>{var p=l.fieldName,y=s[h],g=l.getter,b=l.getterContext,T=s[h+a.length],R=l.setter,P=l.setterContext;c[p]={read:W=>y.fromWireType(g(b,W)),write:(W,d)=>{var m=[];R(P,W,T.toWireType(m,d)),Oe(m)}}}),[{name:e.name,fromWireType:l=>{var h={};for(var p in c)h[p]=c[p].read(l);return n(l),h},toWireType:(l,h)=>{for(var p in c)if(!(p in h))throw new TypeError(`Missing field: "${p}"`);var y=r();for(p in c)c[p].write(y,h[p]);return l!==null&&l.push(n,y),y},argPackAdvance:J,readValueFromPointer:Nt,destructorFunction:n}]})},un=(t,e,r,n,a)=>{},cn=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Fe=t},Fe,j=t=>{for(var e="",r=t;B[r];)e+=Fe[B[r++]];return e},ht,C=t=>{throw new ht(t)};function ln(t,e,r={}){var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),ot.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(ot[t]=e,delete Ot[t],dt.hasOwnProperty(t)){var a=dt[t];delete dt[t],a.forEach(o=>o())}}function Z(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return ln(t,e,r)}var J=8,dn=(t,e,r,n)=>{e=j(e),Z(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:J,readValueFromPointer:function(a){return this.fromWireType(B[a])},destructorFunction:null})},hn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Gt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}C(e(t)+" instance already deleted")},Xt=!1,xe=t=>{},fn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Me=t=>{t.count.value-=1;var e=t.count.value===0;e&&fn(t)},Ie=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Ie(t,e,r.baseClass);return n===null?null:r.downcast(n)},je={},pn=()=>Object.keys(bt).length,mn=()=>{var t=[];for(var e in bt)bt.hasOwnProperty(e)&&t.push(bt[e]);return t},wt=[],qt=()=>{for(;wt.length;){var t=wt.pop();t.$$.deleteScheduled=!1,t.delete()}},$t,yn=t=>{$t=t,wt.length&&$t&&$t(qt)},vn=()=>{u.getInheritedInstanceCount=pn,u.getLiveInheritedInstances=mn,u.flushPendingDeletes=qt,u.setDelayFunction=yn},bt={},gn=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},wn=(t,e)=>(e=gn(t,e),bt[e]),Ft=(t,e)=>{(!e.ptrType||!e.ptr)&&St("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&St("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ct(Object.create(t,{$$:{value:e}}))};function $n(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=wn(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),s=je[o];if(!s)return a.call(this);var c;this.isConst?c=s.constPointerType:c=s.pointerType;var l=Ie(e,this.registeredClass,c.registeredClass);return l===null?a.call(this):this.isSmartPointer?Ft(c.registeredClass.instancePrototype,{ptrType:c,ptr:l,smartPtrType:this,smartPtr:t}):Ft(c.registeredClass.instancePrototype,{ptrType:c,ptr:l})}var Ct=t=>typeof FinalizationRegistry>"u"?(Ct=e=>e,t):(Xt=new FinalizationRegistry(e=>{Me(e.$$)}),Ct=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Xt.register(e,a,e)}return e},xe=e=>Xt.unregister(e),Ct(t)),bn=()=>{Object.assign(xt.prototype,{isAliasOf(t){if(!(this instanceof xt)||!(t instanceof xt))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||Gt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=Ct(Object.create(Object.getPrototypeOf(this),{$$:{value:hn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),xe(this),Me(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),wt.push(this),wt.length===1&&$t&&$t(qt),this.$$.deleteScheduled=!0,this}})};function xt(){}var Cn=48,_n=57,Re=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Cn&&e<=_n?`_${t}`:t};function Qt(t,e){return t=Re(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var We=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`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}},Zt=(t,e,r)=>{u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),We(u,t,t),u.hasOwnProperty(r)&&C(`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 Tn(t,e,r,n,a,o,s,c){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=s,this.downcast=c,this.pureVirtualFunctions=[]}var Jt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function Pn(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Jt(e.$$.ptr,r,this.registeredClass);return n}function En(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`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=Jt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`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:C("Unsupporting sharing policy")}return r}function An(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Jt(e.$$.ptr,r,this.registeredClass);return n}function ke(t){return this.fromWireType(_[t>>2])}var Dn=()=>{Object.assign(Mt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:J,readValueFromPointer:ke,deleteObject(t){t!==null&&t.delete()},fromWireType:$n})};function Mt(t,e,r,n,a,o,s,c,l,h,p){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=c,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=p,!a&&e.baseClass===void 0?n?(this.toWireType=Pn,this.destructorFunction=null):(this.toWireType=An,this.destructorFunction=null):this.toWireType=En}var He=(t,e,r)=>{u.hasOwnProperty(t)||St("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)},On=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},It=[],Be,O=t=>{var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=Be.get(t)),e},Sn=(t,e,r)=>{if(t.includes("j"))return On(t,e,r);var n=O(e).apply(null,r);return n},Fn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Sn(t,e,r)}},q=(t,e)=>{t=j(t);function r(){return t.includes("j")?Fn(t,e):O(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},xn=(t,e)=>{var r=Qt(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=j(e);return et(e),r},jt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!ot[o]){if(Ot[o]){Ot[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Ue(`${t}: `+r.map(Ve).join([", "]))},Mn=(t,e,r,n,a,o,s,c,l,h,p,y,g)=>{p=j(p),o=q(a,o),c&&(c=q(s,c)),h&&(h=q(l,h)),g=q(y,g);var b=Re(p);Zt(b,function(){jt(`Cannot construct ${p} due to unbound types`,[n])}),it([t,e,r],n?[n]:[],function(T){T=T[0];var R,P;n?(R=T.registeredClass,P=R.instancePrototype):P=xt.prototype;var W=Qt(b,function(){if(Object.getPrototypeOf(this)!==d)throw new ht("Use 'new' to construct "+p);if(m.constructor_body===void 0)throw new ht(p+" has no accessible constructor");var kt=m.constructor_body[arguments.length];if(kt===void 0)throw new ht(`Tried to invoke ctor of ${p} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return kt.apply(this,arguments)}),d=Object.create(P,{constructor:{value:W}});W.prototype=d;var m=new Tn(p,W,d,g,R,o,c,h);m.baseClass&&(m.baseClass.__derivedClasses===void 0&&(m.baseClass.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m));var x=new Mt(p,m,!0,!1,!1),M=new Mt(p+"*",m,!1,!1,!1),st=new Mt(p+" const*",m,!1,!0,!1);return je[t]={pointerType:M,constPointerType:st},He(b,W),[x,M,st]})},Kt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+n*4>>2]);return r};function te(t,e,r,n,a,o){var s=e.length;s<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var c=e[1]!==null&&r!==null,l=!1,h=1;h<e.length;++h)if(e[h]!==null&&e[h].destructorFunction===void 0){l=!0;break}var p=e[0].name!=="void",y=s-2,g=new Array(y),b=[],T=[];return function(){arguments.length!==y&&C(`function ${t} called with ${arguments.length} arguments, expected ${y}`),T.length=0;var R;b.length=c?2:1,b[0]=a,c&&(R=e[1].toWireType(T,this),b[1]=R);for(var P=0;P<y;++P)g[P]=e[P+2].toWireType(T,arguments[P]),b.push(g[P]);var W=n.apply(null,b);function d(m){if(l)Oe(T);else for(var x=c?1:2;x<e.length;x++){var M=x===1?R:g[x-2];e[x].destructorFunction!==null&&e[x].destructorFunction(M)}if(p)return e[0].fromWireType(m)}return d(W)}}var In=(t,e,r,n,a,o)=>{var s=Kt(e,r);a=q(n,a),it([],[t],function(c){c=c[0];var l=`constructor ${c.name}`;if(c.registeredClass.constructor_body===void 0&&(c.registeredClass.constructor_body=[]),c.registeredClass.constructor_body[e-1]!==void 0)throw new ht(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${c.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return c.registeredClass.constructor_body[e-1]=()=>{jt(`Cannot construct ${c.name} due to unbound types`,s)},it([],s,h=>(h.splice(1,0,null),c.registeredClass.constructor_body[e-1]=te(l,h,null,a,o),[])),[]})},Le=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?(Vt(t[t.length-1]==")","Parentheses for argument names should match."),t.substr(0,e)):t},jn=(t,e,r,n,a,o,s,c,l)=>{var h=Kt(r,n);e=j(e),e=Le(e),o=q(a,o),it([],[t],function(p){p=p[0];var y=`${p.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),c&&p.registeredClass.pureVirtualFunctions.push(e);function g(){jt(`Cannot call ${y} due to unbound types`,h)}var b=p.registeredClass.instancePrototype,T=b[e];return T===void 0||T.overloadTable===void 0&&T.className!==p.name&&T.argCount===r-2?(g.argCount=r-2,g.className=p.name,b[e]=g):(We(b,e,y),b[e].overloadTable[r-2]=g),it([],h,function(R){var P=te(y,R,p,o,s);return b[e].overloadTable===void 0?(P.argCount=r-2,b[e]=P):b[e].overloadTable[r-2]=P,[]}),[]})};function Rn(){Object.assign(Ye.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 Ye(){this.allocated=[void 0],this.freelist=[]}var X=new Ye,ze=t=>{t>=X.reserved&&--X.get(t).refcount===0&&X.free(t)},Wn=()=>{for(var t=0,e=X.reserved;e<X.allocated.length;++e)X.allocated[e]!==void 0&&++t;return t},kn=()=>{X.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),X.reserved=X.allocated.length,u.count_emval_handles=Wn},rt={toValue:t=>(t||C("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})}}},Hn=(t,e)=>{e=j(e),Z(t,{name:e,fromWireType:r=>{var n=rt.toValue(r);return ze(r),n},toWireType:(r,n)=>rt.toHandle(n),argPackAdvance:J,readValueFromPointer:Nt,destructorFunction:null})},Bn=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(Y[n>>0])}:function(n){return this.fromWireType(B[n>>0])};case 2:return r?function(n){return this.fromWireType(ct[n>>1])}:function(n){return this.fromWireType(yt[n>>1])};case 4:return r?function(n){return this.fromWireType(k[n>>2])}:function(n){return this.fromWireType(_[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Un=(t,e,r,n)=>{e=j(e);function a(){}a.values={},Z(t,{name:e,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,s)=>s.value,argPackAdvance:J,readValueFromPointer:Bn(e,r,n),destructorFunction:null}),Zt(e,a)},ee=(t,e)=>{var r=ot[t];return r===void 0&&C(e+" has unknown type "+Ve(t)),r},Vn=(t,e,r)=>{var n=ee(t,"enum");e=j(e);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Qt(`${n.name}_${e}`,function(){})}});a.values[r]=o,a[e]=o},re=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($e[r>>2])};case 8:return function(r){return this.fromWireType(be[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Yn=(t,e,r)=>{e=j(e),Z(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:J,readValueFromPointer:Ln(e,r),destructorFunction:null})},zn=(t,e,r,n,a,o,s)=>{var c=Kt(e,r);t=j(t),t=Le(t),a=q(n,a),Zt(t,function(){jt(`Cannot call ${t} due to unbound types`,c)},e-1),it([],c,function(l){var h=[l[0],null].concat(l.slice(1));return He(t,te(t,h,null,a,o),e-1),[]})},Nn=(t,e,r)=>{switch(e){case 1:return r?n=>Y[n>>0]:n=>B[n>>0];case 2:return r?n=>ct[n>>1]:n=>yt[n>>1];case 4:return r?n=>k[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Gn=(t,e,r,n,a)=>{e=j(e);var o=p=>p;if(n===0){var s=32-8*r;o=p=>p<<s>>>s}var c=e.includes("unsigned"),l=(p,y)=>{},h;c?h=function(p,y){return l(y,this.name),y>>>0}:h=function(p,y){return l(y,this.name),y},Z(t,{name:e,fromWireType:o,toWireType:h,argPackAdvance:J,readValueFromPointer:Nn(e,r,n!==0),destructorFunction:null})},Xn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(s){var c=_[s>>2],l=_[s+4>>2];return new a(Y.buffer,l,c)}r=j(r),Z(t,{name:r,fromWireType:o,argPackAdvance:J,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Ne=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,s=0;s<t.length;++s){var c=t.charCodeAt(s);if(c>=55296&&c<=57343){var l=t.charCodeAt(++s);c=65536+((c&1023)<<10)|l&1023}if(c<=127){if(r>=o)break;e[r++]=c}else if(c<=2047){if(r+1>=o)break;e[r++]=192|c>>6,e[r++]=128|c&63}else if(c<=65535){if(r+2>=o)break;e[r++]=224|c>>12,e[r++]=128|c>>6&63,e[r++]=128|c&63}else{if(r+3>=o)break;e[r++]=240|c>>18,e[r++]=128|c>>12&63,e[r++]=128|c>>6&63,e[r++]=128|c&63}}return e[r]=0,r-a},qn=(t,e,r)=>Ne(t,B,e,r),Ge=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},Xe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Qn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Xe)return Xe.decode(t.subarray(e,a));for(var o="";e<a;){var s=t[e++];if(!(s&128)){o+=String.fromCharCode(s);continue}var c=t[e++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|c);continue}var l=t[e++]&63;if((s&240)==224?s=(s&15)<<12|c<<6|l:s=(s&7)<<18|c<<12|l<<6|t[e++]&63,s<65536)o+=String.fromCharCode(s);else{var h=s-65536;o+=String.fromCharCode(55296|h>>10,56320|h&1023)}}return o},ne=(t,e)=>t?Qn(B,t,e):"",Zn=(t,e)=>{e=j(e);var r=e==="std::string";Z(t,{name:e,fromWireType(n){var a=_[n>>2],o=n+4,s;if(r)for(var c=o,l=0;l<=a;++l){var h=o+l;if(l==a||B[h]==0){var p=h-c,y=ne(c,p);s===void 0?s=y:(s+="\0",s+=y),c=h+1}}else{for(var g=new Array(a),l=0;l<a;++l)g[l]=String.fromCharCode(B[o+l]);s=g.join("")}return et(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||C("Cannot pass non-string to std::string"),r&&s?o=Ge(a):o=a.length;var c=oe(4+o+1),l=c+4;if(_[c>>2]=o,r&&s)qn(a,l,o+1);else if(s)for(var h=0;h<o;++h){var p=a.charCodeAt(h);p>255&&(et(l),C("String has UTF-16 code units that do not fit in 8 bits")),B[l+h]=p}else for(var h=0;h<o;++h)B[l+h]=a[h];return n!==null&&n.push(et,c),c},argPackAdvance:J,readValueFromPointer:ke,destructorFunction(n){et(n)}})},qe=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Jn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&yt[n];)++n;if(r=n<<1,r-t>32&&qe)return qe.decode(B.subarray(t,r));for(var o="",s=0;!(s>=e/2);++s){var c=ct[t+s*2>>1];if(c==0)break;o+=String.fromCharCode(c)}return o},Kn=(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);ct[e>>1]=s,e+=2}return ct[e>>1]=0,e-n},ta=t=>t.length*2,ea=(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},ra=(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 c=t.charCodeAt(++o);s=65536+((s&1023)<<10)|c&1023}if(k[e>>2]=s,e+=4,e+4>a)break}return k[e>>2]=0,e-n},na=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},aa=(t,e,r)=>{r=j(r);var n,a,o,s,c;e===2?(n=Jn,a=Kn,s=ta,o=()=>yt,c=1):e===4&&(n=ea,a=ra,s=na,o=()=>_,c=2),Z(t,{name:r,fromWireType:l=>{for(var h=_[l>>2],p=o(),y,g=l+4,b=0;b<=h;++b){var T=l+4+b*e;if(b==h||p[T>>c]==0){var R=T-g,P=n(g,R);y===void 0?y=P:(y+="\0",y+=P),g=T+e}}return et(l),y},toWireType:(l,h)=>{typeof h!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var p=s(h),y=oe(4+p+e);return _[y>>2]=p>>c,a(h,y+4,p+e),l!==null&&l.push(et,y),y},argPackAdvance:J,readValueFromPointer:Nt,destructorFunction(l){et(l)}})},oa=(t,e,r,n,a,o)=>{Dt[t]={name:j(e),rawConstructor:q(r,n),rawDestructor:q(a,o),fields:[]}},ia=(t,e,r,n,a,o,s,c,l,h)=>{Dt[t].fields.push({fieldName:j(e),getterReturnType:r,getter:q(n,a),getterContext:o,setterArgumentType:s,setter:q(c,l),setterContext:h})},sa=(t,e)=>{e=j(e),Z(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},ua={},ca=t=>{var e=ua[t];return e===void 0?j(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.")},la=t=>t===0?rt.toHandle(Qe()):(t=ca(t),rt.toHandle(Qe()[t])),da=t=>{t>4&&(X.get(t).refcount+=1)},ha=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var s=ee(_[n+o*4>>2],"parameter "+o);e[o+1]=s.readValueFromPointer(a),a+=s.argPackAdvance}var c=new(r.bind.apply(r,e));return rt.toHandle(c)}},Ze={},fa=(t,e,r,n)=>{t=rt.toValue(t);var a=Ze[e];return a||(a=ha(e),Ze[e]=a),a(t,r,n)},pa=(t,e)=>{t=ee(t,"_emval_take_value");var r=t.readValueFromPointer(e);return rt.toHandle(r)},ma=()=>{gt("")},ya=(t,e,r)=>B.copyWithin(t,e,e+r),va=()=>2147483648,ga=t=>{var e=nt.buffer,r=(t-e.byteLength+65535)/65536;try{return nt.grow(r),Ce(),1}catch{}},wa=t=>{var e=B.length;t>>>=0;var r=va();if(t>r)return!1;for(var n=(l,h)=>l+(h-l%h)%h,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)),c=ga(s);if(c)return!0}return!1},ae={},$a=()=>U||"./this.program",_t=()=>{if(!_t.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,_:$a()};for(var r in ae)ae[r]===void 0?delete e[r]:e[r]=ae[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);_t.strings=n}return _t.strings},ba=(t,e)=>{for(var r=0;r<t.length;++r)Y[e++>>0]=t.charCodeAt(r);Y[e>>0]=0},Ca=(t,e)=>{var r=0;return _t().forEach((n,a)=>{var o=e+r;_[t+a*4>>2]=o,ba(n,o),r+=n.length+1}),0},_a=(t,e)=>{var r=_t();_[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),_[e>>2]=n,0},Ta=t=>t,Rt=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},Je=[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],Ea=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Rt(r.getFullYear()),a=r.getMonth(),o=(n?Je: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 Aa(t,e,r){var n=r>0?r:Ge(t)+1,a=new Array(n),o=Ne(t,a,0,a.length);return e&&(a.length=o),a}var Da=(t,e)=>{Y.set(t,e)},Oa=(t,e,r,n)=>{var 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?ne(a):""},s=ne(r),c={"%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 c)s=s.replace(new RegExp(l,"g"),c[l]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,m,x){for(var M=typeof d=="number"?d.toString():d||"";M.length<m;)M=x[0]+M;return M}function g(d,m){return y(d,m,"0")}function b(d,m){function x(st){return st<0?-1:st>0?1:0}var M;return(M=x(d.getFullYear()-m.getFullYear()))===0&&(M=x(d.getMonth()-m.getMonth()))===0&&(M=x(d.getDate()-m.getDate())),M}function T(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=Ea(new Date(d.tm_year+1900,0,1),d.tm_yday),x=new Date(m.getFullYear(),0,4),M=new Date(m.getFullYear()+1,0,4),st=T(x),kt=T(M);return b(st,m)<=0?b(kt,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var P={"%a":d=>h[d.tm_wday].substring(0,3),"%A":d=>h[d.tm_wday],"%b":d=>p[d.tm_mon].substring(0,3),"%B":d=>p[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+Pa(Rt(d.tm_year+1900)?Je:Ke,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 x=(d.tm_wday+371-d.tm_yday)%7;x!=4&&(x!=3||!Rt(d.tm_year))&&(m=1)}}else{m=52;var M=(d.tm_wday+7-d.tm_yday-1)%7;(M==4||M==5&&Rt(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,x=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(x?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};s=s.replace(/%%/g,"\0\0");for(var l in P)s.includes(l)&&(s=s.replace(new RegExp(l,"g"),P[l](o)));s=s.replace(/\0\0/g,"%");var W=Aa(s,!1);return W.length>e?0:(Da(W,t),W.length-1)},Sa=(t,e,r,n,a)=>Oa(t,e,r,n);Se=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},cn(),ht=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},bn(),vn(),Dn(),Ue=u.UnboundTypeError=xn(Error,"UnboundTypeError"),Rn(),kn();var Fa={s:Zr,v:Jr,b:tn,g:en,q:rn,I:nn,f:an,T:on,d:Kr,ba:sn,P:un,Y:dn,aa:Mn,$:In,w:jn,X:Hn,x:Un,h:Vn,K:Yn,L:zn,t:Gn,n:Xn,J:Zn,C:aa,A:oa,ca:ia,Z:sa,ea:ze,da:la,M:da,V:fa,_:pa,B:ma,W:ya,U:wa,R:Ca,S:_a,D:Na,E:za,m:Ga,a:xa,e:Ra,o:Ha,k:ja,G:La,u:Ua,F:Ya,z:qa,O:Za,l:Wa,j:ka,c:Ia,p:Ma,H:Va,r:Xa,i:Ba,y:Qa,N:Ta,Q:Sa},E=Qr(),et=u._free=t=>(et=u._free=E.ha)(t),oe=u._malloc=t=>(oe=u._malloc=E.ia)(t),tr=t=>(tr=E.ka)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=E.la)();var A=(t,e)=>(A=E.ma)(t,e),Tt=t=>(Tt=E.na)(t),S=()=>(S=E.oa)(),F=t=>(F=E.pa)(t),er=t=>(er=E.qa)(t),rr=t=>(rr=E.ra)(t),nr=(t,e,r)=>(nr=E.sa)(t,e,r),ar=t=>(ar=E.ta)(t);u.dynCall_viijii=(t,e,r,n,a,o,s)=>(u.dynCall_viijii=E.ua)(t,e,r,n,a,o,s);var or=u.dynCall_jiiii=(t,e,r,n,a)=>(or=u.dynCall_jiiii=E.va)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,s)=>(u.dynCall_iiiiij=E.wa)(t,e,r,n,a,o,s),u.dynCall_iiiiijj=(t,e,r,n,a,o,s,c,l)=>(u.dynCall_iiiiijj=E.xa)(t,e,r,n,a,o,s,c,l),u.dynCall_iiiiiijj=(t,e,r,n,a,o,s,c,l,h)=>(u.dynCall_iiiiiijj=E.ya)(t,e,r,n,a,o,s,c,l,h);function xa(t,e){var r=S();try{return O(t)(e)}catch(n){if(F(r),n!==n+0)throw n;A(1,0)}}function Ma(t,e,r,n){var a=S();try{O(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function Ia(t,e,r){var n=S();try{O(t)(e,r)}catch(a){if(F(n),a!==a+0)throw a;A(1,0)}}function ja(t,e,r,n,a){var o=S();try{return O(t)(e,r,n,a)}catch(s){if(F(o),s!==s+0)throw s;A(1,0)}}function Ra(t,e,r){var n=S();try{return O(t)(e,r)}catch(a){if(F(n),a!==a+0)throw a;A(1,0)}}function Wa(t){var e=S();try{O(t)()}catch(r){if(F(e),r!==r+0)throw r;A(1,0)}}function ka(t,e){var r=S();try{O(t)(e)}catch(n){if(F(r),n!==n+0)throw n;A(1,0)}}function Ha(t,e,r,n){var a=S();try{return O(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function Ba(t,e,r,n,a,o,s,c,l,h,p){var y=S();try{O(t)(e,r,n,a,o,s,c,l,h,p)}catch(g){if(F(y),g!==g+0)throw g;A(1,0)}}function Ua(t,e,r,n,a,o,s){var c=S();try{return O(t)(e,r,n,a,o,s)}catch(l){if(F(c),l!==l+0)throw l;A(1,0)}}function Va(t,e,r,n,a){var o=S();try{O(t)(e,r,n,a)}catch(s){if(F(o),s!==s+0)throw s;A(1,0)}}function La(t,e,r,n,a,o){var s=S();try{return O(t)(e,r,n,a,o)}catch(c){if(F(s),c!==c+0)throw c;A(1,0)}}function Ya(t,e,r,n,a,o,s,c){var l=S();try{return O(t)(e,r,n,a,o,s,c)}catch(h){if(F(l),h!==h+0)throw h;A(1,0)}}function za(t,e,r,n){var a=S();try{return O(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function Na(t,e,r,n){var a=S();try{return O(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function Ga(t){var e=S();try{return O(t)()}catch(r){if(F(e),r!==r+0)throw r;A(1,0)}}function Xa(t,e,r,n,a,o,s,c){var l=S();try{O(t)(e,r,n,a,o,s,c)}catch(h){if(F(l),h!==h+0)throw h;A(1,0)}}function qa(t,e,r,n,a,o,s,c,l,h,p,y){var g=S();try{return O(t)(e,r,n,a,o,s,c,l,h,p,y)}catch(b){if(F(g),b!==b+0)throw b;A(1,0)}}function Qa(t,e,r,n,a,o,s,c,l,h,p,y,g,b,T,R){var P=S();try{O(t)(e,r,n,a,o,s,c,l,h,p,y,g,b,T,R)}catch(W){if(F(P),W!==W+0)throw W;A(1,0)}}function Za(t,e,r,n,a){var o=S();try{return or(t,e,r,n,a)}catch(s){if(F(o),s!==s+0)throw s;A(1,0)}}var Wt;vt=function t(){Wt||ir(),Wt||(vt=t)};function ir(){if(at>0||(Hr(),at>0))return;function t(){Wt||(Wt=!0,u.calledRun=!0,!mt&&(Br(),w(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Ur()))}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(),f.ready}})();function Mr(i){return Bt(Pt,i)}function Ir(i){return Sr(Pt,i)}async function jr(i,f){return Fr(Pt,i,f)}async function Rr(i,f){return xr(Pt,i,f)}const Ut=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 Wr(i){for(const[f,u]of Ut)if(i===u)return f;return"unknown"}class kr extends EventTarget{constructor(u={}){var w;super();ur(this,ut,void 0);try{const v=(w=u==null?void 0:u.formats)==null?void 0:w.filter($=>$!=="unknown");if((v==null?void 0:v.length)===0)throw new TypeError("Hint option provided, but is empty.");v==null||v.forEach($=>{if(!H.includes($))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${$}' is not a valid enum value of type BarcodeFormat.`)}),cr(this,ut,v!=null?v:[]),Mr().then($=>{this.dispatchEvent(new CustomEvent("load",{detail:$}))}).catch($=>{this.dispatchEvent(new CustomEvent("error",{detail:$}))})}catch(v){throw me(v,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return H.filter(u=>u!=="unknown")}async detect(u){try{const w=await pr(u);if(w===null)return[];let v;try{fe(w)?v=await jr(w,{tryHarder:!0,formats:ie(this,ut).map($=>Ut.get($))}):v=await Rr(w,{tryHarder:!0,formats:ie(this,ut).map($=>Ut.get($))})}catch($){throw console.error($),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return v.map($=>{const{topLeft:{x:U,y:N},topRight:{x:V,y:D},bottomLeft:{x:G,y:Q},bottomRight:{x:L,y:K}}=$.position,nt=Math.min(U,V,G,L),mt=Math.min(N,D,Q,K),Vt=Math.max(U,V,G,L),Y=Math.max(N,D,Q,K);return{boundingBox:new DOMRectReadOnly(nt,mt,Vt-nt,Y-mt),rawValue:$.text,format:Wr($.format),cornerPoints:[{x:U,y:N},{x:V,y:D},{x:L,y:K},{x:G,y:Q}]}})}catch(w){throw me(w,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ut=new WeakMap,I.BarcodeDetector=kr,I.setZXingModuleOverrides=Ir,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"}),I}({});
var BarcodeDetectionAPI=function(I){"use strict";var sr=(I,H,z)=>{if(!H.has(I))throw TypeError("Cannot "+z)};var oe=(I,H,z)=>(sr(I,H,"read from private field"),z?z.call(I):H.get(I)),ur=(I,H,z)=>{if(H.has(I))throw TypeError("Cannot add the same private member more than once");H instanceof WeakSet?H.add(I):H.set(I,z)},cr=(I,H,z,nt)=>(sr(I,H,"write to private field"),nt?nt.call(I,z):H.set(I,z),z);var ct;const H=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],z=[...H,["unknown"]].map(i=>i[0]),nt=new Map(H);function lr(i){for(const[f,u]of nt)if(i===u)return f;return"unknown"}function dr(i){if(ie(i))return{width:i.naturalWidth,height:i.naturalHeight};if(se(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(ue(i))return{width:i.videoWidth,height:i.videoHeight};if(le(i))return{width:i.width,height:i.height};if(he(i))return{width:i.displayWidth,height:i.displayHeight};if(ce(i))return{width:i.width,height:i.height};if(de(i))return{width:i.width,height:i.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 ie(i){try{return i instanceof HTMLImageElement}catch{return!1}}function se(i){try{return i instanceof SVGImageElement}catch{return!1}}function ue(i){try{return i instanceof HTMLVideoElement}catch{return!1}}function ce(i){try{return i instanceof HTMLCanvasElement}catch{return!1}}function le(i){try{return i instanceof ImageBitmap}catch{return!1}}function de(i){try{return i instanceof OffscreenCanvas}catch{return!1}}function he(i){try{return i instanceof VideoFrame}catch{return!1}}function fe(i){try{return i instanceof Blob}catch{return!1}}function hr(i){try{return i instanceof ImageData}catch{return!1}}function fr(i,f){try{const u=new OffscreenCanvas(i,f);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=i,u.height=f,u}}async function pe(i){if(ie(i)&&!await vr(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(se(i)&&!await gr(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(he(i)&&wr(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(ue(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(le(i)&&br(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:f,height:u}=dr(i);if(f===0||u===0)return null;const v=fr(f,u).getContext("2d");v.drawImage(i,0,0);try{return v.getImageData(0,0,f,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function pr(i){let f;try{if(globalThis.createImageBitmap)f=await createImageBitmap(i);else if(globalThis.Image){f=new Image;let w="";try{w=URL.createObjectURL(i),f.src=w,await f.decode()}finally{URL.revokeObjectURL(w)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await pe(f)}function mr(i){const{width:f,height:u}=i;if(f===0||u===0)return null;const w=i.getContext("2d");try{return w.getImageData(0,0,f,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function yr(i){if(fe(i))return await pr(i);if(hr(i)){if($r(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return ce(i)||de(i)?mr(i):await pe(i)}async function vr(i){try{return await i.decode(),!0}catch{return!1}}async function gr(i){var f;try{return await((f=i.decode)==null?void 0:f.call(i)),!0}catch{return!1}}function wr(i){return i.format===null}function $r(i){return i.data.buffer.byteLength===0}function br(i){return i.width===0&&i.height===0}function me(i,f){return i instanceof DOMException?new DOMException(`${f}: ${i.message}`,i.name):i instanceof Error?new i.constructor(`${f}: ${i.message}`):new Error(`${f}: ${i}`)}const ye=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function Cr(i){return i.join("|")}function _r(i){const f=ve(i);let u=0,w=ye.length-1;for(;u<=w;){const v=Math.floor((u+w)/2),$=ye[v],U=ve($);if(U===f)return $;U<f?u=v+1:w=v-1}return"None"}function ve(i){return i.toLowerCase().replace(/_-\[\]/g,"")}function Tr(i,f){return i.Binarizer[f]}function Pr(i,f){return i.CharacterSet[f]}const Er=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Ar(i){return Er[i.value]}function Dr(i,f){return i.EanAddOnSymbol[f]}function Or(i,f){return i.TextMode[f]}const pt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function ge(i,f){return{...f,formats:Cr(f.formats),binarizer:Tr(i,f.binarizer),eanAddOnSymbol:Dr(i,f.eanAddOnSymbol),textMode:Or(i,f.textMode),characterSet:Pr(i,f.characterSet)}}const Fr={width:200,height:200,format:"QRCode",characterSet:"UTF8",eccLevel:-1,margin:10};function we(i){return{...i,format:_r(i.format),eccLevel:i.eccLevel,contentType:Ar(i.contentType)}}const Sr={locateFile:(i,f)=>{const u=i.match(/_(.+?)\.wasm$/);return u?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.1/dist/${u[1]}/${i}`:f+i}};let Ht=new WeakMap;function Bt(i,f){var u;const w=Ht.get(i);if(w!=null&&w.modulePromise&&(f===void 0||Object.is(f,w.moduleOverrides)))return w.modulePromise;const v=(u=f!=null?f:w==null?void 0:w.moduleOverrides)!=null?u:Sr,$=i({...v});return Ht.set(i,{moduleOverrides:v,modulePromise:$}),$}function xr(i,f){Ht.set(i,{moduleOverrides:f})}async function Mr(i,f,u=pt){const w={...pt,...u},v=await Bt(i),{size:$}=f,U=new Uint8Array(await f.arrayBuffer()),N=v._malloc($);v.HEAPU8.set(U,N);const L=v.readBarcodesFromImage(N,$,ge(v,w));v._free(N);const D=[];for(let G=0;G<L.size();++G)D.push(we(L.get(G)));return D}async function Ir(i,f,u=pt){const w={...pt,...u},v=await Bt(i),{data:$,width:U,height:N,data:{byteLength:L}}=f,D=v._malloc(L);v.HEAPU8.set($,D);const G=v.readBarcodesFromPixmap(D,U,N,ge(v,w));v._free(D);const Q=[];for(let V=0;V<G.size();++V)Q.push(we(G.get(V)));return Q}structuredClone(pt),structuredClone(Fr);var Pt=(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(f={}){var u=f,w,v;u.ready=new Promise((t,e)=>{w=t,v=e});var $=Object.assign({},u),U="./this.program",N=typeof window=="object",L=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var D="";function G(t){return u.locateFile?u.locateFile(t,D):D+t}var Q;(N||L)&&(L?D=self.location.href:typeof document<"u"&&document.currentScript&&(D=document.currentScript.src),i&&(D=i),D.indexOf("blob:")!==0?D=D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1):D="",L&&(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 V=u.printErr||console.error.bind(console);Object.assign(u,$),$=null,u.arguments&&u.arguments,u.thisProgram&&(U=u.thisProgram),u.quit&&u.quit;var K;u.wasmBinary&&(K=u.wasmBinary),typeof WebAssembly!="object"&&gt("no native wasm support detected");var at,mt=!1;function Ut(t,e){t||gt(e)}var Y,B,lt,yt,k,_,$e,be;function Ce(){var t=at.buffer;u.HEAP8=Y=new Int8Array(t),u.HEAP16=lt=new Int16Array(t),u.HEAPU8=B=new Uint8Array(t),u.HEAPU16=yt=new Uint16Array(t),u.HEAP32=k=new Int32Array(t),u.HEAPU32=_=new Uint32Array(t),u.HEAPF32=$e=new Float32Array(t),u.HEAPF64=be=new Float64Array(t)}var _e=[],Te=[],Pe=[];function Br(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Vr(u.preRun.shift());Lt(_e)}function Ur(){Lt(Te)}function Lr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)zr(u.postRun.shift());Lt(Pe)}function Vr(t){_e.unshift(t)}function Yr(t){Te.unshift(t)}function zr(t){Pe.unshift(t)}var ot=0,vt=null;function Nr(t){ot++,u.monitorRunDependencies&&u.monitorRunDependencies(ot)}function Gr(t){if(ot--,u.monitorRunDependencies&&u.monitorRunDependencies(ot),ot==0&&vt){var e=vt;vt=null,e()}}function gt(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",V(t),mt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw v(e),e}var Xr="data:application/octet-stream;base64,",Ee=t=>t.startsWith(Xr),dt;dt="zxing_reader.wasm",Ee(dt)||(dt=G(dt));function Ae(t){if(t==dt&&K)return new Uint8Array(K);if(Q)return Q(t);throw"both async and sync fetching of the wasm failed"}function qr(t){return!K&&(N||L)&&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(()=>Ae(t)):Promise.resolve().then(()=>Ae(t))}function De(t,e,r){return qr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{V(`failed to asynchronously prepare wasm: ${n}`),gt(n)})}function Qr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!Ee(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"),De(e,r,n)})}):De(e,r,n)}function Zr(){var t={a:xa};function e(n,a){return E=n.exports,at=E.fa,Ce(),Be=E.ja,Yr(E.ga),Gr(),E}Nr();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){V(`Module.instantiateWasm callback failed with error: ${n}`),v(n)}return Qr(K,dt,t,r).catch(v),{}}var Lt=t=>{for(;t.length>0;)t.shift()(u)};u.noExitRuntime;var Et=[],At=0,Jr=t=>{var e=new Vt(t);return e.get_caught()||(e.set_caught(!0),At--),e.set_rethrown(!1),Et.push(e),rr(e.excPtr),e.get_exception_ptr()},tt=0,Kr=()=>{A(0,0);var t=Et.pop();er(t.excPtr),tt=0};function Vt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,Y[this.ptr+12>>0]=e},this.get_caught=function(){return Y[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,Y[this.ptr+13>>0]=e},this.get_rethrown=function(){return Y[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){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=ar(this.get_type());if(e)return _[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var tn=t=>{throw tt||(tt=t),tt},Yt=t=>{var e=tt;if(!e)return Tt(0),0;var r=new Vt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return Tt(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(nr(o,n,s))return Tt(o),e}return Tt(n),e},en=()=>Yt([]),rn=t=>Yt([t]),nn=(t,e)=>Yt([t,e]),an=()=>{var t=Et.pop();t||gt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Et.push(t),t.set_rethrown(!0),t.set_caught(!1),At++),tt=e,tt},on=(t,e,r)=>{var n=new Vt(t);throw n.init(e,r),tt=t,At++,tt},sn=()=>At,Dt={},Oe=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function zt(t){return this.fromWireType(k[t>>2])}var ht={},it={},Ot={},Fe,Ft=t=>{throw new Fe(t)},st=(t,e,r)=>{t.forEach(function(c){Ot[c]=e});function n(c){var l=r(c);l.length!==t.length&&Ft("Mismatched type converter count");for(var h=0;h<t.length;++h)Z(t[h],l[h])}var a=new Array(e.length),o=[],s=0;e.forEach((c,l)=>{it.hasOwnProperty(c)?a[l]=it[c]:(o.push(c),ht.hasOwnProperty(c)||(ht[c]=[]),ht[c].push(()=>{a[l]=it[c],++s,s===o.length&&n(a)}))}),o.length===0&&n(a)},un=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 c={};return a.forEach((l,h)=>{var p=l.fieldName,y=s[h],g=l.getter,b=l.getterContext,T=s[h+a.length],R=l.setter,P=l.setterContext;c[p]={read:W=>y.fromWireType(g(b,W)),write:(W,d)=>{var m=[];R(P,W,T.toWireType(m,d)),Oe(m)}}}),[{name:e.name,fromWireType:l=>{var h={};for(var p in c)h[p]=c[p].read(l);return n(l),h},toWireType:(l,h)=>{for(var p in c)if(!(p in h))throw new TypeError(`Missing field: "${p}"`);var y=r();for(p in c)c[p].write(y,h[p]);return l!==null&&l.push(n,y),y},argPackAdvance:J,readValueFromPointer:zt,destructorFunction:n}]})},cn=(t,e,r,n,a)=>{},ln=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Se=t},Se,j=t=>{for(var e="",r=t;B[r];)e+=Se[B[r++]];return e},ft,C=t=>{throw new ft(t)};function dn(t,e,r={}){var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),it.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(it[t]=e,delete Ot[t],ht.hasOwnProperty(t)){var a=ht[t];delete ht[t],a.forEach(o=>o())}}function Z(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return dn(t,e,r)}var J=8,hn=(t,e,r,n)=>{e=j(e),Z(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:J,readValueFromPointer:function(a){return this.fromWireType(B[a])},destructorFunction:null})},fn=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}C(e(t)+" instance already deleted")},Gt=!1,xe=t=>{},pn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Me=t=>{t.count.value-=1;var e=t.count.value===0;e&&pn(t)},Ie=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Ie(t,e,r.baseClass);return n===null?null:r.downcast(n)},je={},mn=()=>Object.keys(bt).length,yn=()=>{var t=[];for(var e in bt)bt.hasOwnProperty(e)&&t.push(bt[e]);return t},wt=[],Xt=()=>{for(;wt.length;){var t=wt.pop();t.$$.deleteScheduled=!1,t.delete()}},$t,vn=t=>{$t=t,wt.length&&$t&&$t(Xt)},gn=()=>{u.getInheritedInstanceCount=mn,u.getLiveInheritedInstances=yn,u.flushPendingDeletes=Xt,u.setDelayFunction=vn},bt={},wn=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},$n=(t,e)=>(e=wn(t,e),bt[e]),St=(t,e)=>{(!e.ptrType||!e.ptr)&&Ft("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Ft("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ct(Object.create(t,{$$:{value:e}}))};function bn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=$n(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=je[o];if(!s)return a.call(this);var c;this.isConst?c=s.constPointerType:c=s.pointerType;var l=Ie(e,this.registeredClass,c.registeredClass);return l===null?a.call(this):this.isSmartPointer?St(c.registeredClass.instancePrototype,{ptrType:c,ptr:l,smartPtrType:this,smartPtr:t}):St(c.registeredClass.instancePrototype,{ptrType:c,ptr:l})}var Ct=t=>typeof FinalizationRegistry>"u"?(Ct=e=>e,t):(Gt=new FinalizationRegistry(e=>{Me(e.$$)}),Ct=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Gt.register(e,a,e)}return e},xe=e=>Gt.unregister(e),Ct(t)),Cn=()=>{Object.assign(xt.prototype,{isAliasOf(t){if(!(this instanceof xt)||!(t instanceof xt))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=Ct(Object.create(Object.getPrototypeOf(this),{$$:{value:fn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),xe(this),Me(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&&C("Object already scheduled for deletion"),wt.push(this),wt.length===1&&$t&&$t(Xt),this.$$.deleteScheduled=!0,this}})};function xt(){}var _n=48,Tn=57,Re=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=_n&&e<=Tn?`_${t}`:t};function qt(t,e){return t=Re(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var We=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`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}},Qt=(t,e,r)=>{u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),We(u,t,t),u.hasOwnProperty(r)&&C(`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 Pn(t,e,r,n,a,o,s,c){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=s,this.downcast=c,this.pureVirtualFunctions=[]}var Zt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function En(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${ee(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Zt(e.$$.ptr,r,this.registeredClass);return n}function An(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||C(`Cannot pass "${ee(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`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=Zt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`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:C("Unsupporting sharing policy")}return r}function Dn(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${ee(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Zt(e.$$.ptr,r,this.registeredClass);return n}function ke(t){return this.fromWireType(_[t>>2])}var On=()=>{Object.assign(Mt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:J,readValueFromPointer:ke,deleteObject(t){t!==null&&t.delete()},fromWireType:bn})};function Mt(t,e,r,n,a,o,s,c,l,h,p){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=c,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=p,!a&&e.baseClass===void 0?n?(this.toWireType=En,this.destructorFunction=null):(this.toWireType=Dn,this.destructorFunction=null):this.toWireType=An}var He=(t,e,r)=>{u.hasOwnProperty(t)||Ft("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)},Fn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},It=[],Be,O=t=>{var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=Be.get(t)),e},Sn=(t,e,r)=>{if(t.includes("j"))return Fn(t,e,r);var n=O(e).apply(null,r);return n},xn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Sn(t,e,r)}},q=(t,e)=>{t=j(t);function r(){return t.includes("j")?xn(t,e):O(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},Mn=(t,e)=>{var r=qt(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,Le=t=>{var e=tr(t),r=j(e);return et(e),r},jt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!it[o]){if(Ot[o]){Ot[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Ue(`${t}: `+r.map(Le).join([", "]))},In=(t,e,r,n,a,o,s,c,l,h,p,y,g)=>{p=j(p),o=q(a,o),c&&(c=q(s,c)),h&&(h=q(l,h)),g=q(y,g);var b=Re(p);Qt(b,function(){jt(`Cannot construct ${p} due to unbound types`,[n])}),st([t,e,r],n?[n]:[],function(T){T=T[0];var R,P;n?(R=T.registeredClass,P=R.instancePrototype):P=xt.prototype;var W=qt(b,function(){if(Object.getPrototypeOf(this)!==d)throw new ft("Use 'new' to construct "+p);if(m.constructor_body===void 0)throw new ft(p+" has no accessible constructor");var kt=m.constructor_body[arguments.length];if(kt===void 0)throw new ft(`Tried to invoke ctor of ${p} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return kt.apply(this,arguments)}),d=Object.create(P,{constructor:{value:W}});W.prototype=d;var m=new Pn(p,W,d,g,R,o,c,h);m.baseClass&&(m.baseClass.__derivedClasses===void 0&&(m.baseClass.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m));var x=new Mt(p,m,!0,!1,!1),M=new Mt(p+"*",m,!1,!1,!1),ut=new Mt(p+" const*",m,!1,!0,!1);return je[t]={pointerType:M,constPointerType:ut},He(b,W),[x,M,ut]})},Jt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+n*4>>2]);return r};function Kt(t,e,r,n,a,o){var s=e.length;s<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var c=e[1]!==null&&r!==null,l=!1,h=1;h<e.length;++h)if(e[h]!==null&&e[h].destructorFunction===void 0){l=!0;break}var p=e[0].name!=="void",y=s-2,g=new Array(y),b=[],T=[];return function(){arguments.length!==y&&C(`function ${t} called with ${arguments.length} arguments, expected ${y}`),T.length=0;var R;b.length=c?2:1,b[0]=a,c&&(R=e[1].toWireType(T,this),b[1]=R);for(var P=0;P<y;++P)g[P]=e[P+2].toWireType(T,arguments[P]),b.push(g[P]);var W=n.apply(null,b);function d(m){if(l)Oe(T);else for(var x=c?1:2;x<e.length;x++){var M=x===1?R:g[x-2];e[x].destructorFunction!==null&&e[x].destructorFunction(M)}if(p)return e[0].fromWireType(m)}return d(W)}}var jn=(t,e,r,n,a,o)=>{var s=Jt(e,r);a=q(n,a),st([],[t],function(c){c=c[0];var l=`constructor ${c.name}`;if(c.registeredClass.constructor_body===void 0&&(c.registeredClass.constructor_body=[]),c.registeredClass.constructor_body[e-1]!==void 0)throw new ft(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${c.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return c.registeredClass.constructor_body[e-1]=()=>{jt(`Cannot construct ${c.name} due to unbound types`,s)},st([],s,h=>(h.splice(1,0,null),c.registeredClass.constructor_body[e-1]=Kt(l,h,null,a,o),[])),[]})},Ve=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?(Ut(t[t.length-1]==")","Parentheses for argument names should match."),t.substr(0,e)):t},Rn=(t,e,r,n,a,o,s,c,l)=>{var h=Jt(r,n);e=j(e),e=Ve(e),o=q(a,o),st([],[t],function(p){p=p[0];var y=`${p.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),c&&p.registeredClass.pureVirtualFunctions.push(e);function g(){jt(`Cannot call ${y} due to unbound types`,h)}var b=p.registeredClass.instancePrototype,T=b[e];return T===void 0||T.overloadTable===void 0&&T.className!==p.name&&T.argCount===r-2?(g.argCount=r-2,g.className=p.name,b[e]=g):(We(b,e,y),b[e].overloadTable[r-2]=g),st([],h,function(R){var P=Kt(y,R,p,o,s);return b[e].overloadTable===void 0?(P.argCount=r-2,b[e]=P):b[e].overloadTable[r-2]=P,[]}),[]})};function Wn(){Object.assign(Ye.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 Ye(){this.allocated=[void 0],this.freelist=[]}var X=new Ye,ze=t=>{t>=X.reserved&&--X.get(t).refcount===0&&X.free(t)},kn=()=>{for(var t=0,e=X.reserved;e<X.allocated.length;++e)X.allocated[e]!==void 0&&++t;return t},Hn=()=>{X.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),X.reserved=X.allocated.length,u.count_emval_handles=kn},rt={toValue:t=>(t||C("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})}}},Bn=(t,e)=>{e=j(e),Z(t,{name:e,fromWireType:r=>{var n=rt.toValue(r);return ze(r),n},toWireType:(r,n)=>rt.toHandle(n),argPackAdvance:J,readValueFromPointer:zt,destructorFunction:null})},Un=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(Y[n>>0])}:function(n){return this.fromWireType(B[n>>0])};case 2:return r?function(n){return this.fromWireType(lt[n>>1])}:function(n){return this.fromWireType(yt[n>>1])};case 4:return r?function(n){return this.fromWireType(k[n>>2])}:function(n){return this.fromWireType(_[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Ln=(t,e,r,n)=>{e=j(e);function a(){}a.values={},Z(t,{name:e,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,s)=>s.value,argPackAdvance:J,readValueFromPointer:Un(e,r,n),destructorFunction:null}),Qt(e,a)},te=(t,e)=>{var r=it[t];return r===void 0&&C(e+" has unknown type "+Le(t)),r},Vn=(t,e,r)=>{var n=te(t,"enum");e=j(e);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:qt(`${n.name}_${e}`,function(){})}});a.values[r]=o,a[e]=o},ee=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($e[r>>2])};case 8:return function(r){return this.fromWireType(be[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},zn=(t,e,r)=>{e=j(e),Z(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:J,readValueFromPointer:Yn(e,r),destructorFunction:null})},Nn=(t,e,r,n,a,o,s)=>{var c=Jt(e,r);t=j(t),t=Ve(t),a=q(n,a),Qt(t,function(){jt(`Cannot call ${t} due to unbound types`,c)},e-1),st([],c,function(l){var h=[l[0],null].concat(l.slice(1));return He(t,Kt(t,h,null,a,o),e-1),[]})},Gn=(t,e,r)=>{switch(e){case 1:return r?n=>Y[n>>0]:n=>B[n>>0];case 2:return r?n=>lt[n>>1]:n=>yt[n>>1];case 4:return r?n=>k[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Xn=(t,e,r,n,a)=>{e=j(e);var o=p=>p;if(n===0){var s=32-8*r;o=p=>p<<s>>>s}var c=e.includes("unsigned"),l=(p,y)=>{},h;c?h=function(p,y){return l(y,this.name),y>>>0}:h=function(p,y){return l(y,this.name),y},Z(t,{name:e,fromWireType:o,toWireType:h,argPackAdvance:J,readValueFromPointer:Gn(e,r,n!==0),destructorFunction:null})},qn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(s){var c=_[s>>2],l=_[s+4>>2];return new a(Y.buffer,l,c)}r=j(r),Z(t,{name:r,fromWireType:o,argPackAdvance:J,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Ne=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,s=0;s<t.length;++s){var c=t.charCodeAt(s);if(c>=55296&&c<=57343){var l=t.charCodeAt(++s);c=65536+((c&1023)<<10)|l&1023}if(c<=127){if(r>=o)break;e[r++]=c}else if(c<=2047){if(r+1>=o)break;e[r++]=192|c>>6,e[r++]=128|c&63}else if(c<=65535){if(r+2>=o)break;e[r++]=224|c>>12,e[r++]=128|c>>6&63,e[r++]=128|c&63}else{if(r+3>=o)break;e[r++]=240|c>>18,e[r++]=128|c>>12&63,e[r++]=128|c>>6&63,e[r++]=128|c&63}}return e[r]=0,r-a},Qn=(t,e,r)=>Ne(t,B,e,r),Ge=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},Xe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Zn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Xe)return Xe.decode(t.subarray(e,a));for(var o="";e<a;){var s=t[e++];if(!(s&128)){o+=String.fromCharCode(s);continue}var c=t[e++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|c);continue}var l=t[e++]&63;if((s&240)==224?s=(s&15)<<12|c<<6|l:s=(s&7)<<18|c<<12|l<<6|t[e++]&63,s<65536)o+=String.fromCharCode(s);else{var h=s-65536;o+=String.fromCharCode(55296|h>>10,56320|h&1023)}}return o},re=(t,e)=>t?Zn(B,t,e):"",Jn=(t,e)=>{e=j(e);var r=e==="std::string";Z(t,{name:e,fromWireType(n){var a=_[n>>2],o=n+4,s;if(r)for(var c=o,l=0;l<=a;++l){var h=o+l;if(l==a||B[h]==0){var p=h-c,y=re(c,p);s===void 0?s=y:(s+="\0",s+=y),c=h+1}}else{for(var g=new Array(a),l=0;l<a;++l)g[l]=String.fromCharCode(B[o+l]);s=g.join("")}return et(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||C("Cannot pass non-string to std::string"),r&&s?o=Ge(a):o=a.length;var c=ae(4+o+1),l=c+4;if(_[c>>2]=o,r&&s)Qn(a,l,o+1);else if(s)for(var h=0;h<o;++h){var p=a.charCodeAt(h);p>255&&(et(l),C("String has UTF-16 code units that do not fit in 8 bits")),B[l+h]=p}else for(var h=0;h<o;++h)B[l+h]=a[h];return n!==null&&n.push(et,c),c},argPackAdvance:J,readValueFromPointer:ke,destructorFunction(n){et(n)}})},qe=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Kn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&yt[n];)++n;if(r=n<<1,r-t>32&&qe)return qe.decode(B.subarray(t,r));for(var o="",s=0;!(s>=e/2);++s){var c=lt[t+s*2>>1];if(c==0)break;o+=String.fromCharCode(c)}return o},ta=(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);lt[e>>1]=s,e+=2}return lt[e>>1]=0,e-n},ea=t=>t.length*2,ra=(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},na=(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 c=t.charCodeAt(++o);s=65536+((s&1023)<<10)|c&1023}if(k[e>>2]=s,e+=4,e+4>a)break}return k[e>>2]=0,e-n},aa=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},oa=(t,e,r)=>{r=j(r);var n,a,o,s,c;e===2?(n=Kn,a=ta,s=ea,o=()=>yt,c=1):e===4&&(n=ra,a=na,s=aa,o=()=>_,c=2),Z(t,{name:r,fromWireType:l=>{for(var h=_[l>>2],p=o(),y,g=l+4,b=0;b<=h;++b){var T=l+4+b*e;if(b==h||p[T>>c]==0){var R=T-g,P=n(g,R);y===void 0?y=P:(y+="\0",y+=P),g=T+e}}return et(l),y},toWireType:(l,h)=>{typeof h!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var p=s(h),y=ae(4+p+e);return _[y>>2]=p>>c,a(h,y+4,p+e),l!==null&&l.push(et,y),y},argPackAdvance:J,readValueFromPointer:zt,destructorFunction(l){et(l)}})},ia=(t,e,r,n,a,o)=>{Dt[t]={name:j(e),rawConstructor:q(r,n),rawDestructor:q(a,o),fields:[]}},sa=(t,e,r,n,a,o,s,c,l,h)=>{Dt[t].fields.push({fieldName:j(e),getterReturnType:r,getter:q(n,a),getterContext:o,setterArgumentType:s,setter:q(c,l),setterContext:h})},ua=(t,e)=>{e=j(e),Z(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},ca={},la=t=>{var e=ca[t];return e===void 0?j(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.")},da=t=>t===0?rt.toHandle(Qe()):(t=la(t),rt.toHandle(Qe()[t])),ha=t=>{t>4&&(X.get(t).refcount+=1)},fa=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var s=te(_[n+o*4>>2],"parameter "+o);e[o+1]=s.readValueFromPointer(a),a+=s.argPackAdvance}var c=new(r.bind.apply(r,e));return rt.toHandle(c)}},Ze={},pa=(t,e,r,n)=>{t=rt.toValue(t);var a=Ze[e];return a||(a=fa(e),Ze[e]=a),a(t,r,n)},ma=(t,e)=>{t=te(t,"_emval_take_value");var r=t.readValueFromPointer(e);return rt.toHandle(r)},ya=()=>{gt("")},va=(t,e,r)=>B.copyWithin(t,e,e+r),ga=()=>2147483648,wa=t=>{var e=at.buffer,r=(t-e.byteLength+65535)/65536;try{return at.grow(r),Ce(),1}catch{}},$a=t=>{var e=B.length;t>>>=0;var r=ga();if(t>r)return!1;for(var n=(l,h)=>l+(h-l%h)%h,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)),c=wa(s);if(c)return!0}return!1},ne={},ba=()=>U||"./this.program",_t=()=>{if(!_t.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,_:ba()};for(var r in ne)ne[r]===void 0?delete e[r]:e[r]=ne[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);_t.strings=n}return _t.strings},Ca=(t,e)=>{for(var r=0;r<t.length;++r)Y[e++>>0]=t.charCodeAt(r);Y[e>>0]=0},_a=(t,e)=>{var r=0;return _t().forEach((n,a)=>{var o=e+r;_[t+a*4>>2]=o,Ca(n,o),r+=n.length+1}),0},Ta=(t,e)=>{var r=_t();_[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),_[e>>2]=n,0},Pa=t=>t,Rt=t=>t%4===0&&(t%100!==0||t%400===0),Ea=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Je=[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],Aa=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Rt(r.getFullYear()),a=r.getMonth(),o=(n?Je: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 Da(t,e,r){var n=r>0?r:Ge(t)+1,a=new Array(n),o=Ne(t,a,0,a.length);return e&&(a.length=o),a}var Oa=(t,e)=>{Y.set(t,e)},Fa=(t,e,r,n)=>{var 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?re(a):""},s=re(r),c={"%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 c)s=s.replace(new RegExp(l,"g"),c[l]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,m,x){for(var M=typeof d=="number"?d.toString():d||"";M.length<m;)M=x[0]+M;return M}function g(d,m){return y(d,m,"0")}function b(d,m){function x(ut){return ut<0?-1:ut>0?1:0}var M;return(M=x(d.getFullYear()-m.getFullYear()))===0&&(M=x(d.getMonth()-m.getMonth()))===0&&(M=x(d.getDate()-m.getDate())),M}function T(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=Aa(new Date(d.tm_year+1900,0,1),d.tm_yday),x=new Date(m.getFullYear(),0,4),M=new Date(m.getFullYear()+1,0,4),ut=T(x),kt=T(M);return b(ut,m)<=0?b(kt,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var P={"%a":d=>h[d.tm_wday].substring(0,3),"%A":d=>h[d.tm_wday],"%b":d=>p[d.tm_mon].substring(0,3),"%B":d=>p[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+Ea(Rt(d.tm_year+1900)?Je:Ke,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 x=(d.tm_wday+371-d.tm_yday)%7;x!=4&&(x!=3||!Rt(d.tm_year))&&(m=1)}}else{m=52;var M=(d.tm_wday+7-d.tm_yday-1)%7;(M==4||M==5&&Rt(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,x=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(x?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};s=s.replace(/%%/g,"\0\0");for(var l in P)s.includes(l)&&(s=s.replace(new RegExp(l,"g"),P[l](o)));s=s.replace(/\0\0/g,"%");var W=Da(s,!1);return W.length>e?0:(Oa(W,t),W.length-1)},Sa=(t,e,r,n,a)=>Fa(t,e,r,n);Fe=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},ln(),ft=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Cn(),gn(),On(),Ue=u.UnboundTypeError=Mn(Error,"UnboundTypeError"),Wn(),Hn();var xa={s:Jr,v:Kr,b:en,g:rn,q:nn,I:an,f:on,T:sn,d:tn,ba:un,P:cn,Y:hn,aa:In,$:jn,w:Rn,X:Bn,x:Ln,h:Vn,K:zn,L:Nn,t:Xn,n:qn,J:Jn,C:oa,A:ia,ca:sa,Z:ua,ea:ze,da,M:ha,V:pa,_:ma,B:ya,W:va,U:$a,R:_a,S:Ta,D:Ga,E:Na,m:Xa,a:Ma,e:Wa,o:Ba,k:Ra,G:Ya,u:La,F:za,z:Qa,O:Ja,l:ka,j:Ha,c:ja,p:Ia,H:Va,r:qa,i:Ua,y:Za,N:Pa,Q:Sa},E=Zr(),et=u._free=t=>(et=u._free=E.ha)(t),ae=u._malloc=t=>(ae=u._malloc=E.ia)(t),tr=t=>(tr=E.ka)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=E.la)();var A=(t,e)=>(A=E.ma)(t,e),Tt=t=>(Tt=E.na)(t),F=()=>(F=E.oa)(),S=t=>(S=E.pa)(t),er=t=>(er=E.qa)(t),rr=t=>(rr=E.ra)(t),nr=(t,e,r)=>(nr=E.sa)(t,e,r),ar=t=>(ar=E.ta)(t);u.dynCall_viijii=(t,e,r,n,a,o,s)=>(u.dynCall_viijii=E.ua)(t,e,r,n,a,o,s);var or=u.dynCall_jiiii=(t,e,r,n,a)=>(or=u.dynCall_jiiii=E.va)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,s)=>(u.dynCall_iiiiij=E.wa)(t,e,r,n,a,o,s),u.dynCall_iiiiijj=(t,e,r,n,a,o,s,c,l)=>(u.dynCall_iiiiijj=E.xa)(t,e,r,n,a,o,s,c,l),u.dynCall_iiiiiijj=(t,e,r,n,a,o,s,c,l,h)=>(u.dynCall_iiiiiijj=E.ya)(t,e,r,n,a,o,s,c,l,h);function Ma(t,e){var r=F();try{return O(t)(e)}catch(n){if(S(r),n!==n+0)throw n;A(1,0)}}function Ia(t,e,r,n){var a=F();try{O(t)(e,r,n)}catch(o){if(S(a),o!==o+0)throw o;A(1,0)}}function ja(t,e,r){var n=F();try{O(t)(e,r)}catch(a){if(S(n),a!==a+0)throw a;A(1,0)}}function Ra(t,e,r,n,a){var o=F();try{return O(t)(e,r,n,a)}catch(s){if(S(o),s!==s+0)throw s;A(1,0)}}function Wa(t,e,r){var n=F();try{return O(t)(e,r)}catch(a){if(S(n),a!==a+0)throw a;A(1,0)}}function ka(t){var e=F();try{O(t)()}catch(r){if(S(e),r!==r+0)throw r;A(1,0)}}function Ha(t,e){var r=F();try{O(t)(e)}catch(n){if(S(r),n!==n+0)throw n;A(1,0)}}function Ba(t,e,r,n){var a=F();try{return O(t)(e,r,n)}catch(o){if(S(a),o!==o+0)throw o;A(1,0)}}function Ua(t,e,r,n,a,o,s,c,l,h,p){var y=F();try{O(t)(e,r,n,a,o,s,c,l,h,p)}catch(g){if(S(y),g!==g+0)throw g;A(1,0)}}function La(t,e,r,n,a,o,s){var c=F();try{return O(t)(e,r,n,a,o,s)}catch(l){if(S(c),l!==l+0)throw l;A(1,0)}}function Va(t,e,r,n,a){var o=F();try{O(t)(e,r,n,a)}catch(s){if(S(o),s!==s+0)throw s;A(1,0)}}function Ya(t,e,r,n,a,o){var s=F();try{return O(t)(e,r,n,a,o)}catch(c){if(S(s),c!==c+0)throw c;A(1,0)}}function za(t,e,r,n,a,o,s,c){var l=F();try{return O(t)(e,r,n,a,o,s,c)}catch(h){if(S(l),h!==h+0)throw h;A(1,0)}}function Na(t,e,r,n){var a=F();try{return O(t)(e,r,n)}catch(o){if(S(a),o!==o+0)throw o;A(1,0)}}function Ga(t,e,r,n){var a=F();try{return O(t)(e,r,n)}catch(o){if(S(a),o!==o+0)throw o;A(1,0)}}function Xa(t){var e=F();try{return O(t)()}catch(r){if(S(e),r!==r+0)throw r;A(1,0)}}function qa(t,e,r,n,a,o,s,c){var l=F();try{O(t)(e,r,n,a,o,s,c)}catch(h){if(S(l),h!==h+0)throw h;A(1,0)}}function Qa(t,e,r,n,a,o,s,c,l,h,p,y){var g=F();try{return O(t)(e,r,n,a,o,s,c,l,h,p,y)}catch(b){if(S(g),b!==b+0)throw b;A(1,0)}}function Za(t,e,r,n,a,o,s,c,l,h,p,y,g,b,T,R){var P=F();try{O(t)(e,r,n,a,o,s,c,l,h,p,y,g,b,T,R)}catch(W){if(S(P),W!==W+0)throw W;A(1,0)}}function Ja(t,e,r,n,a){var o=F();try{return or(t,e,r,n,a)}catch(s){if(S(o),s!==s+0)throw s;A(1,0)}}var Wt;vt=function t(){Wt||ir(),Wt||(vt=t)};function ir(){if(ot>0||(Br(),ot>0))return;function t(){Wt||(Wt=!0,u.calledRun=!0,!mt&&(Ur(),w(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Lr()))}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(),f.ready}})();function jr(i){return Bt(Pt,i)}function Rr(i){return xr(Pt,i)}async function Wr(i,f){return Mr(Pt,i,f)}async function kr(i,f){return Ir(Pt,i,f)}class Hr extends EventTarget{constructor(u={}){var w;super();ur(this,ct,void 0);try{const v=(w=u==null?void 0:u.formats)==null?void 0:w.filter($=>$!=="unknown");if((v==null?void 0:v.length)===0)throw new TypeError("Hint option provided, but is empty.");v==null||v.forEach($=>{if(!nt.has($))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${$}' is not a valid enum value of type BarcodeFormat.`)}),cr(this,ct,v!=null?v:[]),jr().then($=>{this.dispatchEvent(new CustomEvent("load",{detail:$}))}).catch($=>{this.dispatchEvent(new CustomEvent("error",{detail:$}))})}catch(v){throw me(v,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return z.filter(u=>u!=="unknown")}async detect(u){try{const w=await yr(u);if(w===null)return[];let v;try{fe(w)?v=await Wr(w,{tryHarder:!0,formats:oe(this,ct).map($=>nt.get($))}):v=await kr(w,{tryHarder:!0,formats:oe(this,ct).map($=>nt.get($))})}catch($){throw console.error($),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return v.map($=>{const{topLeft:{x:U,y:N},topRight:{x:L,y:D},bottomLeft:{x:G,y:Q},bottomRight:{x:V,y:K}}=$.position,at=Math.min(U,L,G,V),mt=Math.min(N,D,Q,K),Ut=Math.max(U,L,G,V),Y=Math.max(N,D,Q,K);return{boundingBox:new DOMRectReadOnly(at,mt,Ut-at,Y-mt),rawValue:$.text,format:lr($.format),cornerPoints:[{x:U,y:N},{x:L,y:D},{x:V,y:K},{x:G,y:Q}]}})}catch(w){throw me(w,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ct=new WeakMap,I.BarcodeDetector=Hr,I.setZXingModuleOverrides=Rr,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"}),I}({});

@@ -1,3 +0,3 @@

var BarcodeDetectionAPI=function(W){"use strict";var ur=(W,H,z)=>{if(!H.has(W))throw TypeError("Cannot "+z)};var ie=(W,H,z)=>(ur(W,H,"read from private field"),z?z.call(W):H.get(W)),cr=(W,H,z)=>{if(H.has(W))throw TypeError("Cannot add the same private member more than once");H instanceof WeakSet?H.add(W):H.set(W,z)},lr=(W,H,z,ft)=>(ur(W,H,"write to private field"),ft?ft.call(W,z):H.set(W,z),z);var ut,$e;const H=["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(i){if(ft(i))return{width:i.naturalWidth,height:i.naturalHeight};if(se(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(ue(i))return{width:i.videoWidth,height:i.videoHeight};if(le(i))return{width:i.width,height:i.height};if(he(i))return{width:i.displayWidth,height:i.displayHeight};if(ce(i))return{width:i.width,height:i.height};if(de(i))return{width:i.width,height:i.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 ft(i){try{return i instanceof HTMLImageElement}catch{return!1}}function se(i){try{return i instanceof SVGImageElement}catch{return!1}}function ue(i){try{return i instanceof HTMLVideoElement}catch{return!1}}function ce(i){try{return i instanceof HTMLCanvasElement}catch{return!1}}function le(i){try{return i instanceof ImageBitmap}catch{return!1}}function de(i){try{return i instanceof OffscreenCanvas}catch{return!1}}function he(i){try{return i instanceof VideoFrame}catch{return!1}}function fe(i){try{return i instanceof Blob}catch{return!1}}function dr(i){try{return i instanceof ImageData}catch{return!1}}function hr(i,f){try{const u=new OffscreenCanvas(i,f);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=i,u.height=f,u}}async function pe(i){if(ft(i)&&!await yr(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(se(i)&&!await vr(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(he(i)&&gr(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(ue(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(le(i)&&$r(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:f,height:u}=z(i);if(f===0||u===0)return null;const v=hr(f,u).getContext("2d");v.drawImage(i,0,0);try{return v.getImageData(0,0,f,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function fr(i){let f;try{if(globalThis.createImageBitmap)f=await createImageBitmap(i);else if(globalThis.Image){f=new Image;let w="";try{w=URL.createObjectURL(i),f.src=w,await f.decode()}finally{URL.revokeObjectURL(w)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await pe(f)}function pr(i){const{width:f,height:u}=i;if(f===0||u===0)return null;const w=i.getContext("2d");try{return w.getImageData(0,0,f,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function mr(i){if(fe(i))return await fr(i);if(dr(i)){if(wr(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return ce(i)||de(i)?pr(i):await pe(i)}async function yr(i){try{return await i.decode(),!0}catch{return!1}}async function vr(i){var f;try{return await((f=i.decode)==null?void 0:f.call(i)),!0}catch{return!1}}function gr(i){return i.format===null}function wr(i){return i.data.buffer.byteLength===0}function $r(i){return i.width===0&&i.height===0}function me(i,f){return i instanceof DOMException?new DOMException(`${f}: ${i.message}`,i.name):i instanceof Error?new i.constructor(`${f}: ${i.message}`):new Error(`${f}: ${i}`)}const ye=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function br(i){return i.join("|")}function Cr(i){const f=ve(i);let u=0,w=ye.length-1;for(;u<=w;){const v=Math.floor((u+w)/2),$=ye[v],U=ve($);if(U===f)return $;U<f?u=v+1:w=v-1}return"None"}function ve(i){return i.toLowerCase().replace(/_-\[\]/g,"")}function _r(i,f){return i.Binarizer[f]}function Tr(i,f){return i.CharacterSet[f]}const Pr=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Er(i){return Pr[i.value]}function Ar(i,f){return i.EanAddOnSymbol[f]}function Dr(i,f){return i.TextMode[f]}const pt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function ge(i,f){return{...f,formats:br(f.formats),binarizer:_r(i,f.binarizer),eanAddOnSymbol:Ar(i,f.eanAddOnSymbol),textMode:Dr(i,f.textMode),characterSet:Tr(i,f.characterSet)}}const Or={width:200,height:200,format:"QRCode",characterSet:"UTF8",eccLevel:-1,margin:10};function we(i){return{...i,format:Cr(i.format),eccLevel:i.eccLevel,contentType:Er(i.contentType)}}const Sr={locateFile:(i,f)=>{const u=i.match(/_(.+?)\.wasm$/);return u?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.0.0/dist/${u[1]}/${i}`:f+i}};let Ht=new WeakMap;function Bt(i,f){var u;const w=Ht.get(i);if(w!=null&&w.modulePromise&&(f===void 0||Object.is(f,w.moduleOverrides)))return w.modulePromise;const v=(u=f!=null?f:w==null?void 0:w.moduleOverrides)!=null?u:Sr,$=i({...v});return Ht.set(i,{moduleOverrides:v,modulePromise:$}),$}function Fr(i,f){Ht.set(i,{moduleOverrides:f})}async function xr(i,f,u=pt){const w={...pt,...u},v=await Bt(i),{size:$}=f,U=new Uint8Array(await f.arrayBuffer()),N=v._malloc($);v.HEAPU8.set(U,N);const V=v.readBarcodesFromImage(N,$,ge(v,w));v._free(N);const D=[];for(let G=0;G<V.size();++G)D.push(we(V.get(G)));return D}async function Mr(i,f,u=pt){const w={...pt,...u},v=await Bt(i),{data:$,width:U,height:N,data:{byteLength:V}}=f,D=v._malloc(V);v.HEAPU8.set($,D);const G=v.readBarcodesFromPixmap(D,U,N,ge(v,w));v._free(D);const Q=[];for(let L=0;L<G.size();++L)Q.push(we(G.get(L)));return Q}structuredClone(pt),structuredClone(Or);var Pt=(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(f={}){var u=f,w,v;u.ready=new Promise((t,e)=>{w=t,v=e});var $=Object.assign({},u),U="./this.program",N=typeof window=="object",V=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var D="";function G(t){return u.locateFile?u.locateFile(t,D):D+t}var Q;(N||V)&&(V?D=self.location.href:typeof document<"u"&&document.currentScript&&(D=document.currentScript.src),i&&(D=i),D.indexOf("blob:")!==0?D=D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1):D="",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 L=u.printErr||console.error.bind(console);Object.assign(u,$),$=null,u.arguments&&u.arguments,u.thisProgram&&(U=u.thisProgram),u.quit&&u.quit;var K;u.wasmBinary&&(K=u.wasmBinary),typeof WebAssembly!="object"&&gt("no native wasm support detected");var nt,mt=!1;function Vt(t,e){t||gt(e)}var Y,B,ct,yt,k,_,be,Ce;function _e(){var t=nt.buffer;u.HEAP8=Y=new Int8Array(t),u.HEAP16=ct=new Int16Array(t),u.HEAPU8=B=new Uint8Array(t),u.HEAPU16=yt=new Uint16Array(t),u.HEAP32=k=new Int32Array(t),u.HEAPU32=_=new Uint32Array(t),u.HEAPF32=be=new Float32Array(t),u.HEAPF64=Ce=new Float64Array(t)}var Te=[],Pe=[],Ee=[];function Br(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Lr(u.preRun.shift());Lt(Te)}function Ur(){Lt(Pe)}function Vr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)zr(u.postRun.shift());Lt(Ee)}function Lr(t){Te.unshift(t)}function Yr(t){Pe.unshift(t)}function zr(t){Ee.unshift(t)}var at=0,vt=null;function Nr(t){at++,u.monitorRunDependencies&&u.monitorRunDependencies(at)}function Gr(t){if(at--,u.monitorRunDependencies&&u.monitorRunDependencies(at),at==0&&vt){var e=vt;vt=null,e()}}function gt(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",L(t),mt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw v(e),e}var Xr="data:application/octet-stream;base64,",Ae=t=>t.startsWith(Xr),lt;lt="zxing_reader.wasm",Ae(lt)||(lt=G(lt));function De(t){if(t==lt&&K)return new Uint8Array(K);if(Q)return Q(t);throw"both async and sync fetching of the wasm failed"}function qr(t){return!K&&(N||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(()=>De(t)):Promise.resolve().then(()=>De(t))}function Oe(t,e,r){return qr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{L(`failed to asynchronously prepare wasm: ${n}`),gt(n)})}function Qr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!Ae(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(s){return L(`wasm streaming compile failed: ${s}`),L("falling back to ArrayBuffer instantiation"),Oe(e,r,n)})}):Oe(e,r,n)}function Zr(){var t={a:xa};function e(n,a){return E=n.exports,nt=E.fa,_e(),Ue=E.ja,Yr(E.ga),Gr(),E}Nr();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){L(`Module.instantiateWasm callback failed with error: ${n}`),v(n)}return Qr(K,lt,t,r).catch(v),{}}var Lt=t=>{for(;t.length>0;)t.shift()(u)};u.noExitRuntime;var Et=[],At=0,Jr=t=>{var e=new Yt(t);return e.get_caught()||(e.set_caught(!0),At--),e.set_rethrown(!1),Et.push(e),nr(e.excPtr),e.get_exception_ptr()},tt=0,Kr=()=>{A(0,0);var t=Et.pop();rr(t.excPtr),tt=0};function Yt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,Y[this.ptr+12>>0]=e},this.get_caught=function(){return Y[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,Y[this.ptr+13>>0]=e},this.get_rethrown=function(){return Y[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){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=or(this.get_type());if(e)return _[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var tn=t=>{throw tt||(tt=t),tt},zt=t=>{var e=tt;if(!e)return Tt(0),0;var r=new Yt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return Tt(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(ar(o,n,s))return Tt(o),e}return Tt(n),e},en=()=>zt([]),rn=t=>zt([t]),nn=(t,e)=>zt([t,e]),an=()=>{var t=Et.pop();t||gt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Et.push(t),t.set_rethrown(!0),t.set_caught(!1),At++),tt=e,tt},on=(t,e,r)=>{var n=new Yt(t);throw n.init(e,r),tt=t,At++,tt},sn=()=>At,Dt={},Se=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Nt(t){return this.fromWireType(k[t>>2])}var dt={},ot={},Ot={},Fe,St=t=>{throw new Fe(t)},it=(t,e,r)=>{t.forEach(function(c){Ot[c]=e});function n(c){var l=r(c);l.length!==t.length&&St("Mismatched type converter count");for(var h=0;h<t.length;++h)Z(t[h],l[h])}var a=new Array(e.length),o=[],s=0;e.forEach((c,l)=>{ot.hasOwnProperty(c)?a[l]=ot[c]:(o.push(c),dt.hasOwnProperty(c)||(dt[c]=[]),dt[c].push(()=>{a[l]=ot[c],++s,s===o.length&&n(a)}))}),o.length===0&&n(a)},un=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));it([t],o,s=>{var c={};return a.forEach((l,h)=>{var p=l.fieldName,y=s[h],g=l.getter,b=l.getterContext,T=s[h+a.length],j=l.setter,P=l.setterContext;c[p]={read:R=>y.fromWireType(g(b,R)),write:(R,d)=>{var m=[];j(P,R,T.toWireType(m,d)),Se(m)}}}),[{name:e.name,fromWireType:l=>{var h={};for(var p in c)h[p]=c[p].read(l);return n(l),h},toWireType:(l,h)=>{for(var p in c)if(!(p in h))throw new TypeError(`Missing field: "${p}"`);var y=r();for(p in c)c[p].write(y,h[p]);return l!==null&&l.push(n,y),y},argPackAdvance:J,readValueFromPointer:Nt,destructorFunction:n}]})},cn=(t,e,r,n,a)=>{},ln=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);xe=t},xe,I=t=>{for(var e="",r=t;B[r];)e+=xe[B[r++]];return e},ht,C=t=>{throw new ht(t)};function dn(t,e,r={}){var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),ot.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(ot[t]=e,delete Ot[t],dt.hasOwnProperty(t)){var a=dt[t];delete dt[t],a.forEach(o=>o())}}function Z(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return dn(t,e,r)}var J=8,hn=(t,e,r,n)=>{e=I(e),Z(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:J,readValueFromPointer:function(a){return this.fromWireType(B[a])},destructorFunction:null})},fn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Gt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}C(e(t)+" instance already deleted")},Xt=!1,Me=t=>{},pn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Ie=t=>{t.count.value-=1;var e=t.count.value===0;e&&pn(t)},je=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=je(t,e,r.baseClass);return n===null?null:r.downcast(n)},Re={},mn=()=>Object.keys(bt).length,yn=()=>{var t=[];for(var e in bt)bt.hasOwnProperty(e)&&t.push(bt[e]);return t},wt=[],qt=()=>{for(;wt.length;){var t=wt.pop();t.$$.deleteScheduled=!1,t.delete()}},$t,vn=t=>{$t=t,wt.length&&$t&&$t(qt)},gn=()=>{u.getInheritedInstanceCount=mn,u.getLiveInheritedInstances=yn,u.flushPendingDeletes=qt,u.setDelayFunction=vn},bt={},wn=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},$n=(t,e)=>(e=wn(t,e),bt[e]),Ft=(t,e)=>{(!e.ptrType||!e.ptr)&&St("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&St("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ct(Object.create(t,{$$:{value:e}}))};function bn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=$n(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),s=Re[o];if(!s)return a.call(this);var c;this.isConst?c=s.constPointerType:c=s.pointerType;var l=je(e,this.registeredClass,c.registeredClass);return l===null?a.call(this):this.isSmartPointer?Ft(c.registeredClass.instancePrototype,{ptrType:c,ptr:l,smartPtrType:this,smartPtr:t}):Ft(c.registeredClass.instancePrototype,{ptrType:c,ptr:l})}var Ct=t=>typeof FinalizationRegistry>"u"?(Ct=e=>e,t):(Xt=new FinalizationRegistry(e=>{Ie(e.$$)}),Ct=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Xt.register(e,a,e)}return e},Me=e=>Xt.unregister(e),Ct(t)),Cn=()=>{Object.assign(xt.prototype,{isAliasOf(t){if(!(this instanceof xt)||!(t instanceof xt))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||Gt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=Ct(Object.create(Object.getPrototypeOf(this),{$$:{value:fn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),Me(this),Ie(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),wt.push(this),wt.length===1&&$t&&$t(qt),this.$$.deleteScheduled=!0,this}})};function xt(){}var _n=48,Tn=57,We=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=_n&&e<=Tn?`_${t}`:t};function Qt(t,e){return t=We(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var ke=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`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}},Zt=(t,e,r)=>{u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),ke(u,t,t),u.hasOwnProperty(r)&&C(`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 Pn(t,e,r,n,a,o,s,c){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=s,this.downcast=c,this.pureVirtualFunctions=[]}var Jt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function En(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Jt(e.$$.ptr,r,this.registeredClass);return n}function An(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`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=Jt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`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:C("Unsupporting sharing policy")}return r}function Dn(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Jt(e.$$.ptr,r,this.registeredClass);return n}function He(t){return this.fromWireType(_[t>>2])}var On=()=>{Object.assign(Mt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:J,readValueFromPointer:He,deleteObject(t){t!==null&&t.delete()},fromWireType:bn})};function Mt(t,e,r,n,a,o,s,c,l,h,p){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=c,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=p,!a&&e.baseClass===void 0?n?(this.toWireType=En,this.destructorFunction=null):(this.toWireType=Dn,this.destructorFunction=null):this.toWireType=An}var Be=(t,e,r)=>{u.hasOwnProperty(t)||St("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)},Sn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},It=[],Ue,O=t=>{var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=Ue.get(t)),e},Fn=(t,e,r)=>{if(t.includes("j"))return Sn(t,e,r);var n=O(e).apply(null,r);return n},xn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Fn(t,e,r)}},q=(t,e)=>{t=I(t);function r(){return t.includes("j")?xn(t,e):O(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},Mn=(t,e)=>{var r=Qt(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},Ve,Le=t=>{var e=er(t),r=I(e);return et(e),r},jt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!ot[o]){if(Ot[o]){Ot[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Ve(`${t}: `+r.map(Le).join([", "]))},In=(t,e,r,n,a,o,s,c,l,h,p,y,g)=>{p=I(p),o=q(a,o),c&&(c=q(s,c)),h&&(h=q(l,h)),g=q(y,g);var b=We(p);Zt(b,function(){jt(`Cannot construct ${p} due to unbound types`,[n])}),it([t,e,r],n?[n]:[],function(T){T=T[0];var j,P;n?(j=T.registeredClass,P=j.instancePrototype):P=xt.prototype;var R=Qt(b,function(){if(Object.getPrototypeOf(this)!==d)throw new ht("Use 'new' to construct "+p);if(m.constructor_body===void 0)throw new ht(p+" has no accessible constructor");var kt=m.constructor_body[arguments.length];if(kt===void 0)throw new ht(`Tried to invoke ctor of ${p} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return kt.apply(this,arguments)}),d=Object.create(P,{constructor:{value:R}});R.prototype=d;var m=new Pn(p,R,d,g,j,o,c,h);m.baseClass&&(m.baseClass.__derivedClasses===void 0&&(m.baseClass.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m));var x=new Mt(p,m,!0,!1,!1),M=new Mt(p+"*",m,!1,!1,!1),st=new Mt(p+" const*",m,!1,!0,!1);return Re[t]={pointerType:M,constPointerType:st},Be(b,R),[x,M,st]})},Kt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+n*4>>2]);return r};function te(t,e,r,n,a,o){var s=e.length;s<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var c=e[1]!==null&&r!==null,l=!1,h=1;h<e.length;++h)if(e[h]!==null&&e[h].destructorFunction===void 0){l=!0;break}var p=e[0].name!=="void",y=s-2,g=new Array(y),b=[],T=[];return function(){arguments.length!==y&&C(`function ${t} called with ${arguments.length} arguments, expected ${y}`),T.length=0;var j;b.length=c?2:1,b[0]=a,c&&(j=e[1].toWireType(T,this),b[1]=j);for(var P=0;P<y;++P)g[P]=e[P+2].toWireType(T,arguments[P]),b.push(g[P]);var R=n.apply(null,b);function d(m){if(l)Se(T);else for(var x=c?1:2;x<e.length;x++){var M=x===1?j:g[x-2];e[x].destructorFunction!==null&&e[x].destructorFunction(M)}if(p)return e[0].fromWireType(m)}return d(R)}}var jn=(t,e,r,n,a,o)=>{var s=Kt(e,r);a=q(n,a),it([],[t],function(c){c=c[0];var l=`constructor ${c.name}`;if(c.registeredClass.constructor_body===void 0&&(c.registeredClass.constructor_body=[]),c.registeredClass.constructor_body[e-1]!==void 0)throw new ht(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${c.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return c.registeredClass.constructor_body[e-1]=()=>{jt(`Cannot construct ${c.name} due to unbound types`,s)},it([],s,h=>(h.splice(1,0,null),c.registeredClass.constructor_body[e-1]=te(l,h,null,a,o),[])),[]})},Ye=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?(Vt(t[t.length-1]==")","Parentheses for argument names should match."),t.substr(0,e)):t},Rn=(t,e,r,n,a,o,s,c,l)=>{var h=Kt(r,n);e=I(e),e=Ye(e),o=q(a,o),it([],[t],function(p){p=p[0];var y=`${p.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),c&&p.registeredClass.pureVirtualFunctions.push(e);function g(){jt(`Cannot call ${y} due to unbound types`,h)}var b=p.registeredClass.instancePrototype,T=b[e];return T===void 0||T.overloadTable===void 0&&T.className!==p.name&&T.argCount===r-2?(g.argCount=r-2,g.className=p.name,b[e]=g):(ke(b,e,y),b[e].overloadTable[r-2]=g),it([],h,function(j){var P=te(y,j,p,o,s);return b[e].overloadTable===void 0?(P.argCount=r-2,b[e]=P):b[e].overloadTable[r-2]=P,[]}),[]})};function Wn(){Object.assign(ze.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 ze(){this.allocated=[void 0],this.freelist=[]}var X=new ze,Ne=t=>{t>=X.reserved&&--X.get(t).refcount===0&&X.free(t)},kn=()=>{for(var t=0,e=X.reserved;e<X.allocated.length;++e)X.allocated[e]!==void 0&&++t;return t},Hn=()=>{X.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),X.reserved=X.allocated.length,u.count_emval_handles=kn},rt={toValue:t=>(t||C("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})}}},Bn=(t,e)=>{e=I(e),Z(t,{name:e,fromWireType:r=>{var n=rt.toValue(r);return Ne(r),n},toWireType:(r,n)=>rt.toHandle(n),argPackAdvance:J,readValueFromPointer:Nt,destructorFunction:null})},Un=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(Y[n>>0])}:function(n){return this.fromWireType(B[n>>0])};case 2:return r?function(n){return this.fromWireType(ct[n>>1])}:function(n){return this.fromWireType(yt[n>>1])};case 4:return r?function(n){return this.fromWireType(k[n>>2])}:function(n){return this.fromWireType(_[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Vn=(t,e,r,n)=>{e=I(e);function a(){}a.values={},Z(t,{name:e,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,s)=>s.value,argPackAdvance:J,readValueFromPointer:Un(e,r,n),destructorFunction:null}),Zt(e,a)},ee=(t,e)=>{var r=ot[t];return r===void 0&&C(e+" has unknown type "+Le(t)),r},Ln=(t,e,r)=>{var n=ee(t,"enum");e=I(e);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Qt(`${n.name}_${e}`,function(){})}});a.values[r]=o,a[e]=o},re=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(be[r>>2])};case 8:return function(r){return this.fromWireType(Ce[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},zn=(t,e,r)=>{e=I(e),Z(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:J,readValueFromPointer:Yn(e,r),destructorFunction:null})},Nn=(t,e,r,n,a,o,s)=>{var c=Kt(e,r);t=I(t),t=Ye(t),a=q(n,a),Zt(t,function(){jt(`Cannot call ${t} due to unbound types`,c)},e-1),it([],c,function(l){var h=[l[0],null].concat(l.slice(1));return Be(t,te(t,h,null,a,o),e-1),[]})},Gn=(t,e,r)=>{switch(e){case 1:return r?n=>Y[n>>0]:n=>B[n>>0];case 2:return r?n=>ct[n>>1]:n=>yt[n>>1];case 4:return r?n=>k[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Xn=(t,e,r,n,a)=>{e=I(e);var o=p=>p;if(n===0){var s=32-8*r;o=p=>p<<s>>>s}var c=e.includes("unsigned"),l=(p,y)=>{},h;c?h=function(p,y){return l(y,this.name),y>>>0}:h=function(p,y){return l(y,this.name),y},Z(t,{name:e,fromWireType:o,toWireType:h,argPackAdvance:J,readValueFromPointer:Gn(e,r,n!==0),destructorFunction:null})},qn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(s){var c=_[s>>2],l=_[s+4>>2];return new a(Y.buffer,l,c)}r=I(r),Z(t,{name:r,fromWireType:o,argPackAdvance:J,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Ge=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,s=0;s<t.length;++s){var c=t.charCodeAt(s);if(c>=55296&&c<=57343){var l=t.charCodeAt(++s);c=65536+((c&1023)<<10)|l&1023}if(c<=127){if(r>=o)break;e[r++]=c}else if(c<=2047){if(r+1>=o)break;e[r++]=192|c>>6,e[r++]=128|c&63}else if(c<=65535){if(r+2>=o)break;e[r++]=224|c>>12,e[r++]=128|c>>6&63,e[r++]=128|c&63}else{if(r+3>=o)break;e[r++]=240|c>>18,e[r++]=128|c>>12&63,e[r++]=128|c>>6&63,e[r++]=128|c&63}}return e[r]=0,r-a},Qn=(t,e,r)=>Ge(t,B,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},qe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Zn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&qe)return qe.decode(t.subarray(e,a));for(var o="";e<a;){var s=t[e++];if(!(s&128)){o+=String.fromCharCode(s);continue}var c=t[e++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|c);continue}var l=t[e++]&63;if((s&240)==224?s=(s&15)<<12|c<<6|l:s=(s&7)<<18|c<<12|l<<6|t[e++]&63,s<65536)o+=String.fromCharCode(s);else{var h=s-65536;o+=String.fromCharCode(55296|h>>10,56320|h&1023)}}return o},ne=(t,e)=>t?Zn(B,t,e):"",Jn=(t,e)=>{e=I(e);var r=e==="std::string";Z(t,{name:e,fromWireType(n){var a=_[n>>2],o=n+4,s;if(r)for(var c=o,l=0;l<=a;++l){var h=o+l;if(l==a||B[h]==0){var p=h-c,y=ne(c,p);s===void 0?s=y:(s+="\0",s+=y),c=h+1}}else{for(var g=new Array(a),l=0;l<a;++l)g[l]=String.fromCharCode(B[o+l]);s=g.join("")}return et(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||C("Cannot pass non-string to std::string"),r&&s?o=Xe(a):o=a.length;var c=oe(4+o+1),l=c+4;if(_[c>>2]=o,r&&s)Qn(a,l,o+1);else if(s)for(var h=0;h<o;++h){var p=a.charCodeAt(h);p>255&&(et(l),C("String has UTF-16 code units that do not fit in 8 bits")),B[l+h]=p}else for(var h=0;h<o;++h)B[l+h]=a[h];return n!==null&&n.push(et,c),c},argPackAdvance:J,readValueFromPointer:He,destructorFunction(n){et(n)}})},Qe=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Kn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&yt[n];)++n;if(r=n<<1,r-t>32&&Qe)return Qe.decode(B.subarray(t,r));for(var o="",s=0;!(s>=e/2);++s){var c=ct[t+s*2>>1];if(c==0)break;o+=String.fromCharCode(c)}return o},ta=(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);ct[e>>1]=s,e+=2}return ct[e>>1]=0,e-n},ea=t=>t.length*2,ra=(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},na=(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 c=t.charCodeAt(++o);s=65536+((s&1023)<<10)|c&1023}if(k[e>>2]=s,e+=4,e+4>a)break}return k[e>>2]=0,e-n},aa=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},oa=(t,e,r)=>{r=I(r);var n,a,o,s,c;e===2?(n=Kn,a=ta,s=ea,o=()=>yt,c=1):e===4&&(n=ra,a=na,s=aa,o=()=>_,c=2),Z(t,{name:r,fromWireType:l=>{for(var h=_[l>>2],p=o(),y,g=l+4,b=0;b<=h;++b){var T=l+4+b*e;if(b==h||p[T>>c]==0){var j=T-g,P=n(g,j);y===void 0?y=P:(y+="\0",y+=P),g=T+e}}return et(l),y},toWireType:(l,h)=>{typeof h!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var p=s(h),y=oe(4+p+e);return _[y>>2]=p>>c,a(h,y+4,p+e),l!==null&&l.push(et,y),y},argPackAdvance:J,readValueFromPointer:Nt,destructorFunction(l){et(l)}})},ia=(t,e,r,n,a,o)=>{Dt[t]={name:I(e),rawConstructor:q(r,n),rawDestructor:q(a,o),fields:[]}},sa=(t,e,r,n,a,o,s,c,l,h)=>{Dt[t].fields.push({fieldName:I(e),getterReturnType:r,getter:q(n,a),getterContext:o,setterArgumentType:s,setter:q(c,l),setterContext:h})},ua=(t,e)=>{e=I(e),Z(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},ca={},la=t=>{var e=ca[t];return e===void 0?I(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.")},da=t=>t===0?rt.toHandle(Ze()):(t=la(t),rt.toHandle(Ze()[t])),ha=t=>{t>4&&(X.get(t).refcount+=1)},fa=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var s=ee(_[n+o*4>>2],"parameter "+o);e[o+1]=s.readValueFromPointer(a),a+=s.argPackAdvance}var c=new(r.bind.apply(r,e));return rt.toHandle(c)}},Je={},pa=(t,e,r,n)=>{t=rt.toValue(t);var a=Je[e];return a||(a=fa(e),Je[e]=a),a(t,r,n)},ma=(t,e)=>{t=ee(t,"_emval_take_value");var r=t.readValueFromPointer(e);return rt.toHandle(r)},ya=()=>{gt("")},va=(t,e,r)=>B.copyWithin(t,e,e+r),ga=()=>2147483648,wa=t=>{var e=nt.buffer,r=(t-e.byteLength+65535)/65536;try{return nt.grow(r),_e(),1}catch{}},$a=t=>{var e=B.length;t>>>=0;var r=ga();if(t>r)return!1;for(var n=(l,h)=>l+(h-l%h)%h,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)),c=wa(s);if(c)return!0}return!1},ae={},ba=()=>U||"./this.program",_t=()=>{if(!_t.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,_:ba()};for(var r in ae)ae[r]===void 0?delete e[r]:e[r]=ae[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);_t.strings=n}return _t.strings},Ca=(t,e)=>{for(var r=0;r<t.length;++r)Y[e++>>0]=t.charCodeAt(r);Y[e>>0]=0},_a=(t,e)=>{var r=0;return _t().forEach((n,a)=>{var o=e+r;_[t+a*4>>2]=o,Ca(n,o),r+=n.length+1}),0},Ta=(t,e)=>{var r=_t();_[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),_[e>>2]=n,0},Pa=t=>t,Rt=t=>t%4===0&&(t%100!==0||t%400===0),Ea=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Ke=[31,29,31,30,31,30,31,31,30,31,30,31],tr=[31,28,31,30,31,30,31,31,30,31,30,31],Aa=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Rt(r.getFullYear()),a=r.getMonth(),o=(n?Ke:tr)[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 Da(t,e,r){var n=r>0?r:Xe(t)+1,a=new Array(n),o=Ge(t,a,0,a.length);return e&&(a.length=o),a}var Oa=(t,e)=>{Y.set(t,e)},Sa=(t,e,r,n)=>{var 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?ne(a):""},s=ne(r),c={"%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 c)s=s.replace(new RegExp(l,"g"),c[l]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,m,x){for(var M=typeof d=="number"?d.toString():d||"";M.length<m;)M=x[0]+M;return M}function g(d,m){return y(d,m,"0")}function b(d,m){function x(st){return st<0?-1:st>0?1:0}var M;return(M=x(d.getFullYear()-m.getFullYear()))===0&&(M=x(d.getMonth()-m.getMonth()))===0&&(M=x(d.getDate()-m.getDate())),M}function T(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 j(d){var m=Aa(new Date(d.tm_year+1900,0,1),d.tm_yday),x=new Date(m.getFullYear(),0,4),M=new Date(m.getFullYear()+1,0,4),st=T(x),kt=T(M);return b(st,m)<=0?b(kt,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var P={"%a":d=>h[d.tm_wday].substring(0,3),"%A":d=>h[d.tm_wday],"%b":d=>p[d.tm_mon].substring(0,3),"%B":d=>p[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=>j(d).toString().substring(2),"%G":d=>j(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+Ea(Rt(d.tm_year+1900)?Ke:tr,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 x=(d.tm_wday+371-d.tm_yday)%7;x!=4&&(x!=3||!Rt(d.tm_year))&&(m=1)}}else{m=52;var M=(d.tm_wday+7-d.tm_yday-1)%7;(M==4||M==5&&Rt(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,x=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(x?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};s=s.replace(/%%/g,"\0\0");for(var l in P)s.includes(l)&&(s=s.replace(new RegExp(l,"g"),P[l](o)));s=s.replace(/\0\0/g,"%");var R=Da(s,!1);return R.length>e?0:(Oa(R,t),R.length-1)},Fa=(t,e,r,n,a)=>Sa(t,e,r,n);Fe=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},ln(),ht=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Cn(),gn(),On(),Ve=u.UnboundTypeError=Mn(Error,"UnboundTypeError"),Wn(),Hn();var xa={s:Jr,v:Kr,b:en,g:rn,q:nn,I:an,f:on,T:sn,d:tn,ba:un,P:cn,Y:hn,aa:In,$:jn,w:Rn,X:Bn,x:Vn,h:Ln,K:zn,L:Nn,t:Xn,n:qn,J:Jn,C:oa,A:ia,ca:sa,Z:ua,ea:Ne,da,M:ha,V:pa,_:ma,B:ya,W:va,U:$a,R:_a,S:Ta,D:Ga,E:Na,m:Xa,a:Ma,e:Wa,o:Ba,k:Ra,G:Ya,u:Va,F:za,z:Qa,O:Ja,l:ka,j:Ha,c:ja,p:Ia,H:La,r:qa,i:Ua,y:Za,N:Pa,Q:Fa},E=Zr(),et=u._free=t=>(et=u._free=E.ha)(t),oe=u._malloc=t=>(oe=u._malloc=E.ia)(t),er=t=>(er=E.ka)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=E.la)();var A=(t,e)=>(A=E.ma)(t,e),Tt=t=>(Tt=E.na)(t),S=()=>(S=E.oa)(),F=t=>(F=E.pa)(t),rr=t=>(rr=E.qa)(t),nr=t=>(nr=E.ra)(t),ar=(t,e,r)=>(ar=E.sa)(t,e,r),or=t=>(or=E.ta)(t);u.dynCall_viijii=(t,e,r,n,a,o,s)=>(u.dynCall_viijii=E.ua)(t,e,r,n,a,o,s);var ir=u.dynCall_jiiii=(t,e,r,n,a)=>(ir=u.dynCall_jiiii=E.va)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,s)=>(u.dynCall_iiiiij=E.wa)(t,e,r,n,a,o,s),u.dynCall_iiiiijj=(t,e,r,n,a,o,s,c,l)=>(u.dynCall_iiiiijj=E.xa)(t,e,r,n,a,o,s,c,l),u.dynCall_iiiiiijj=(t,e,r,n,a,o,s,c,l,h)=>(u.dynCall_iiiiiijj=E.ya)(t,e,r,n,a,o,s,c,l,h);function Ma(t,e){var r=S();try{return O(t)(e)}catch(n){if(F(r),n!==n+0)throw n;A(1,0)}}function Ia(t,e,r,n){var a=S();try{O(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function ja(t,e,r){var n=S();try{O(t)(e,r)}catch(a){if(F(n),a!==a+0)throw a;A(1,0)}}function Ra(t,e,r,n,a){var o=S();try{return O(t)(e,r,n,a)}catch(s){if(F(o),s!==s+0)throw s;A(1,0)}}function Wa(t,e,r){var n=S();try{return O(t)(e,r)}catch(a){if(F(n),a!==a+0)throw a;A(1,0)}}function ka(t){var e=S();try{O(t)()}catch(r){if(F(e),r!==r+0)throw r;A(1,0)}}function Ha(t,e){var r=S();try{O(t)(e)}catch(n){if(F(r),n!==n+0)throw n;A(1,0)}}function Ba(t,e,r,n){var a=S();try{return O(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function Ua(t,e,r,n,a,o,s,c,l,h,p){var y=S();try{O(t)(e,r,n,a,o,s,c,l,h,p)}catch(g){if(F(y),g!==g+0)throw g;A(1,0)}}function Va(t,e,r,n,a,o,s){var c=S();try{return O(t)(e,r,n,a,o,s)}catch(l){if(F(c),l!==l+0)throw l;A(1,0)}}function La(t,e,r,n,a){var o=S();try{O(t)(e,r,n,a)}catch(s){if(F(o),s!==s+0)throw s;A(1,0)}}function Ya(t,e,r,n,a,o){var s=S();try{return O(t)(e,r,n,a,o)}catch(c){if(F(s),c!==c+0)throw c;A(1,0)}}function za(t,e,r,n,a,o,s,c){var l=S();try{return O(t)(e,r,n,a,o,s,c)}catch(h){if(F(l),h!==h+0)throw h;A(1,0)}}function Na(t,e,r,n){var a=S();try{return O(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function Ga(t,e,r,n){var a=S();try{return O(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function Xa(t){var e=S();try{return O(t)()}catch(r){if(F(e),r!==r+0)throw r;A(1,0)}}function qa(t,e,r,n,a,o,s,c){var l=S();try{O(t)(e,r,n,a,o,s,c)}catch(h){if(F(l),h!==h+0)throw h;A(1,0)}}function Qa(t,e,r,n,a,o,s,c,l,h,p,y){var g=S();try{return O(t)(e,r,n,a,o,s,c,l,h,p,y)}catch(b){if(F(g),b!==b+0)throw b;A(1,0)}}function Za(t,e,r,n,a,o,s,c,l,h,p,y,g,b,T,j){var P=S();try{O(t)(e,r,n,a,o,s,c,l,h,p,y,g,b,T,j)}catch(R){if(F(P),R!==R+0)throw R;A(1,0)}}function Ja(t,e,r,n,a){var o=S();try{return ir(t,e,r,n,a)}catch(s){if(F(o),s!==s+0)throw s;A(1,0)}}var Wt;vt=function t(){Wt||sr(),Wt||(vt=t)};function sr(){if(at>0||(Br(),at>0))return;function t(){Wt||(Wt=!0,u.calledRun=!0,!mt&&(Ur(),w(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Vr()))}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(),f.ready}})();function Ir(i){return Bt(Pt,i)}function jr(i){return Fr(Pt,i)}async function Rr(i,f){return xr(Pt,i,f)}async function Wr(i,f){return Mr(Pt,i,f)}const Ut=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 kr(i){for(const[f,u]of Ut)if(i===u)return f;return"unknown"}class Hr extends EventTarget{constructor(u={}){var w;super();cr(this,ut,void 0);try{const v=(w=u==null?void 0:u.formats)==null?void 0:w.filter($=>$!=="unknown");if((v==null?void 0:v.length)===0)throw new TypeError("Hint option provided, but is empty.");v==null||v.forEach($=>{if(!H.includes($))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${$}' is not a valid enum value of type BarcodeFormat.`)}),lr(this,ut,v!=null?v:[]),Ir().then($=>{this.dispatchEvent(new CustomEvent("load",{detail:$}))}).catch($=>{this.dispatchEvent(new CustomEvent("error",{detail:$}))})}catch(v){throw me(v,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return H.filter(u=>u!=="unknown")}async detect(u){try{const w=await mr(u);if(w===null)return[];let v;try{fe(w)?v=await Rr(w,{tryHarder:!0,formats:ie(this,ut).map($=>Ut.get($))}):v=await Wr(w,{tryHarder:!0,formats:ie(this,ut).map($=>Ut.get($))})}catch($){throw console.error($),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return v.map($=>{const{topLeft:{x:U,y:N},topRight:{x:V,y:D},bottomLeft:{x:G,y:Q},bottomRight:{x:L,y:K}}=$.position,nt=Math.min(U,V,G,L),mt=Math.min(N,D,Q,K),Vt=Math.max(U,V,G,L),Y=Math.max(N,D,Q,K);return{boundingBox:new DOMRectReadOnly(nt,mt,Vt-nt,Y-mt),rawValue:$.text,format:kr($.format),cornerPoints:[{x:U,y:N},{x:V,y:D},{x:L,y:K},{x:G,y:Q}]}})}catch(w){throw me(w,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ut=new WeakMap,($e=globalThis.BarcodeDetector)!=null||(globalThis.BarcodeDetector=Hr),W.setZXingModuleOverrides=jr,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"}),W}({});
var BarcodeDetectionAPI=function(W){"use strict";var ur=(W,H,z)=>{if(!H.has(W))throw TypeError("Cannot "+z)};var oe=(W,H,z)=>(ur(W,H,"read from private field"),z?z.call(W):H.get(W)),cr=(W,H,z)=>{if(H.has(W))throw TypeError("Cannot add the same private member more than once");H instanceof WeakSet?H.add(W):H.set(W,z)},lr=(W,H,z,nt)=>(ur(W,H,"write to private field"),nt?nt.call(W,z):H.set(W,z),z);var ct,$e;const H=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],z=[...H,["unknown"]].map(i=>i[0]),nt=new Map(H);function dr(i){for(const[f,u]of nt)if(i===u)return f;return"unknown"}function hr(i){if(ie(i))return{width:i.naturalWidth,height:i.naturalHeight};if(se(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(ue(i))return{width:i.videoWidth,height:i.videoHeight};if(le(i))return{width:i.width,height:i.height};if(he(i))return{width:i.displayWidth,height:i.displayHeight};if(ce(i))return{width:i.width,height:i.height};if(de(i))return{width:i.width,height:i.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 ie(i){try{return i instanceof HTMLImageElement}catch{return!1}}function se(i){try{return i instanceof SVGImageElement}catch{return!1}}function ue(i){try{return i instanceof HTMLVideoElement}catch{return!1}}function ce(i){try{return i instanceof HTMLCanvasElement}catch{return!1}}function le(i){try{return i instanceof ImageBitmap}catch{return!1}}function de(i){try{return i instanceof OffscreenCanvas}catch{return!1}}function he(i){try{return i instanceof VideoFrame}catch{return!1}}function fe(i){try{return i instanceof Blob}catch{return!1}}function fr(i){try{return i instanceof ImageData}catch{return!1}}function pr(i,f){try{const u=new OffscreenCanvas(i,f);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=i,u.height=f,u}}async function pe(i){if(ie(i)&&!await gr(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(se(i)&&!await wr(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(he(i)&&$r(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(ue(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(le(i)&&Cr(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:f,height:u}=hr(i);if(f===0||u===0)return null;const v=pr(f,u).getContext("2d");v.drawImage(i,0,0);try{return v.getImageData(0,0,f,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function mr(i){let f;try{if(globalThis.createImageBitmap)f=await createImageBitmap(i);else if(globalThis.Image){f=new Image;let w="";try{w=URL.createObjectURL(i),f.src=w,await f.decode()}finally{URL.revokeObjectURL(w)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await pe(f)}function yr(i){const{width:f,height:u}=i;if(f===0||u===0)return null;const w=i.getContext("2d");try{return w.getImageData(0,0,f,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function vr(i){if(fe(i))return await mr(i);if(fr(i)){if(br(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return ce(i)||de(i)?yr(i):await pe(i)}async function gr(i){try{return await i.decode(),!0}catch{return!1}}async function wr(i){var f;try{return await((f=i.decode)==null?void 0:f.call(i)),!0}catch{return!1}}function $r(i){return i.format===null}function br(i){return i.data.buffer.byteLength===0}function Cr(i){return i.width===0&&i.height===0}function me(i,f){return i instanceof DOMException?new DOMException(`${f}: ${i.message}`,i.name):i instanceof Error?new i.constructor(`${f}: ${i.message}`):new Error(`${f}: ${i}`)}const ye=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function _r(i){return i.join("|")}function Tr(i){const f=ve(i);let u=0,w=ye.length-1;for(;u<=w;){const v=Math.floor((u+w)/2),$=ye[v],U=ve($);if(U===f)return $;U<f?u=v+1:w=v-1}return"None"}function ve(i){return i.toLowerCase().replace(/_-\[\]/g,"")}function Pr(i,f){return i.Binarizer[f]}function Er(i,f){return i.CharacterSet[f]}const Ar=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Dr(i){return Ar[i.value]}function Or(i,f){return i.EanAddOnSymbol[f]}function Fr(i,f){return i.TextMode[f]}const pt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function ge(i,f){return{...f,formats:_r(f.formats),binarizer:Pr(i,f.binarizer),eanAddOnSymbol:Or(i,f.eanAddOnSymbol),textMode:Fr(i,f.textMode),characterSet:Er(i,f.characterSet)}}const xr={width:200,height:200,format:"QRCode",characterSet:"UTF8",eccLevel:-1,margin:10};function we(i){return{...i,format:Tr(i.format),eccLevel:i.eccLevel,contentType:Dr(i.contentType)}}const Sr={locateFile:(i,f)=>{const u=i.match(/_(.+?)\.wasm$/);return u?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.1/dist/${u[1]}/${i}`:f+i}};let Ht=new WeakMap;function Bt(i,f){var u;const w=Ht.get(i);if(w!=null&&w.modulePromise&&(f===void 0||Object.is(f,w.moduleOverrides)))return w.modulePromise;const v=(u=f!=null?f:w==null?void 0:w.moduleOverrides)!=null?u:Sr,$=i({...v});return Ht.set(i,{moduleOverrides:v,modulePromise:$}),$}function Mr(i,f){Ht.set(i,{moduleOverrides:f})}async function Ir(i,f,u=pt){const w={...pt,...u},v=await Bt(i),{size:$}=f,U=new Uint8Array(await f.arrayBuffer()),N=v._malloc($);v.HEAPU8.set(U,N);const L=v.readBarcodesFromImage(N,$,ge(v,w));v._free(N);const D=[];for(let G=0;G<L.size();++G)D.push(we(L.get(G)));return D}async function jr(i,f,u=pt){const w={...pt,...u},v=await Bt(i),{data:$,width:U,height:N,data:{byteLength:L}}=f,D=v._malloc(L);v.HEAPU8.set($,D);const G=v.readBarcodesFromPixmap(D,U,N,ge(v,w));v._free(D);const Q=[];for(let V=0;V<G.size();++V)Q.push(we(G.get(V)));return Q}structuredClone(pt),structuredClone(xr);var Pt=(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(f={}){var u=f,w,v;u.ready=new Promise((t,e)=>{w=t,v=e});var $=Object.assign({},u),U="./this.program",N=typeof window=="object",L=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var D="";function G(t){return u.locateFile?u.locateFile(t,D):D+t}var Q;(N||L)&&(L?D=self.location.href:typeof document<"u"&&document.currentScript&&(D=document.currentScript.src),i&&(D=i),D.indexOf("blob:")!==0?D=D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1):D="",L&&(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 V=u.printErr||console.error.bind(console);Object.assign(u,$),$=null,u.arguments&&u.arguments,u.thisProgram&&(U=u.thisProgram),u.quit&&u.quit;var K;u.wasmBinary&&(K=u.wasmBinary),typeof WebAssembly!="object"&&gt("no native wasm support detected");var at,mt=!1;function Ut(t,e){t||gt(e)}var Y,B,lt,yt,k,_,be,Ce;function _e(){var t=at.buffer;u.HEAP8=Y=new Int8Array(t),u.HEAP16=lt=new Int16Array(t),u.HEAPU8=B=new Uint8Array(t),u.HEAPU16=yt=new Uint16Array(t),u.HEAP32=k=new Int32Array(t),u.HEAPU32=_=new Uint32Array(t),u.HEAPF32=be=new Float32Array(t),u.HEAPF64=Ce=new Float64Array(t)}var Te=[],Pe=[],Ee=[];function Ur(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Yr(u.preRun.shift());Lt(Te)}function Lr(){Lt(Pe)}function Vr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Nr(u.postRun.shift());Lt(Ee)}function Yr(t){Te.unshift(t)}function zr(t){Pe.unshift(t)}function Nr(t){Ee.unshift(t)}var ot=0,vt=null;function Gr(t){ot++,u.monitorRunDependencies&&u.monitorRunDependencies(ot)}function Xr(t){if(ot--,u.monitorRunDependencies&&u.monitorRunDependencies(ot),ot==0&&vt){var e=vt;vt=null,e()}}function gt(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",V(t),mt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw v(e),e}var qr="data:application/octet-stream;base64,",Ae=t=>t.startsWith(qr),dt;dt="zxing_reader.wasm",Ae(dt)||(dt=G(dt));function De(t){if(t==dt&&K)return new Uint8Array(K);if(Q)return Q(t);throw"both async and sync fetching of the wasm failed"}function Qr(t){return!K&&(N||L)&&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(()=>De(t)):Promise.resolve().then(()=>De(t))}function Oe(t,e,r){return Qr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{V(`failed to asynchronously prepare wasm: ${n}`),gt(n)})}function Zr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!Ae(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"),Oe(e,r,n)})}):Oe(e,r,n)}function Jr(){var t={a:Ma};function e(n,a){return E=n.exports,at=E.fa,_e(),Ue=E.ja,zr(E.ga),Xr(),E}Gr();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){V(`Module.instantiateWasm callback failed with error: ${n}`),v(n)}return Zr(K,dt,t,r).catch(v),{}}var Lt=t=>{for(;t.length>0;)t.shift()(u)};u.noExitRuntime;var Et=[],At=0,Kr=t=>{var e=new Vt(t);return e.get_caught()||(e.set_caught(!0),At--),e.set_rethrown(!1),Et.push(e),nr(e.excPtr),e.get_exception_ptr()},tt=0,tn=()=>{A(0,0);var t=Et.pop();rr(t.excPtr),tt=0};function Vt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,Y[this.ptr+12>>0]=e},this.get_caught=function(){return Y[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,Y[this.ptr+13>>0]=e},this.get_rethrown=function(){return Y[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){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=or(this.get_type());if(e)return _[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var en=t=>{throw tt||(tt=t),tt},Yt=t=>{var e=tt;if(!e)return Tt(0),0;var r=new Vt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return Tt(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(ar(o,n,s))return Tt(o),e}return Tt(n),e},rn=()=>Yt([]),nn=t=>Yt([t]),an=(t,e)=>Yt([t,e]),on=()=>{var t=Et.pop();t||gt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Et.push(t),t.set_rethrown(!0),t.set_caught(!1),At++),tt=e,tt},sn=(t,e,r)=>{var n=new Vt(t);throw n.init(e,r),tt=t,At++,tt},un=()=>At,Dt={},Fe=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function zt(t){return this.fromWireType(k[t>>2])}var ht={},it={},Ot={},xe,Ft=t=>{throw new xe(t)},st=(t,e,r)=>{t.forEach(function(c){Ot[c]=e});function n(c){var l=r(c);l.length!==t.length&&Ft("Mismatched type converter count");for(var h=0;h<t.length;++h)Z(t[h],l[h])}var a=new Array(e.length),o=[],s=0;e.forEach((c,l)=>{it.hasOwnProperty(c)?a[l]=it[c]:(o.push(c),ht.hasOwnProperty(c)||(ht[c]=[]),ht[c].push(()=>{a[l]=it[c],++s,s===o.length&&n(a)}))}),o.length===0&&n(a)},cn=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 c={};return a.forEach((l,h)=>{var p=l.fieldName,y=s[h],g=l.getter,b=l.getterContext,T=s[h+a.length],j=l.setter,P=l.setterContext;c[p]={read:R=>y.fromWireType(g(b,R)),write:(R,d)=>{var m=[];j(P,R,T.toWireType(m,d)),Fe(m)}}}),[{name:e.name,fromWireType:l=>{var h={};for(var p in c)h[p]=c[p].read(l);return n(l),h},toWireType:(l,h)=>{for(var p in c)if(!(p in h))throw new TypeError(`Missing field: "${p}"`);var y=r();for(p in c)c[p].write(y,h[p]);return l!==null&&l.push(n,y),y},argPackAdvance:J,readValueFromPointer:zt,destructorFunction:n}]})},ln=(t,e,r,n,a)=>{},dn=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Se=t},Se,I=t=>{for(var e="",r=t;B[r];)e+=Se[B[r++]];return e},ft,C=t=>{throw new ft(t)};function hn(t,e,r={}){var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),it.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(it[t]=e,delete Ot[t],ht.hasOwnProperty(t)){var a=ht[t];delete ht[t],a.forEach(o=>o())}}function Z(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return hn(t,e,r)}var J=8,fn=(t,e,r,n)=>{e=I(e),Z(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:J,readValueFromPointer:function(a){return this.fromWireType(B[a])},destructorFunction:null})},pn=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}C(e(t)+" instance already deleted")},Gt=!1,Me=t=>{},mn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Ie=t=>{t.count.value-=1;var e=t.count.value===0;e&&mn(t)},je=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=je(t,e,r.baseClass);return n===null?null:r.downcast(n)},Re={},yn=()=>Object.keys(bt).length,vn=()=>{var t=[];for(var e in bt)bt.hasOwnProperty(e)&&t.push(bt[e]);return t},wt=[],Xt=()=>{for(;wt.length;){var t=wt.pop();t.$$.deleteScheduled=!1,t.delete()}},$t,gn=t=>{$t=t,wt.length&&$t&&$t(Xt)},wn=()=>{u.getInheritedInstanceCount=yn,u.getLiveInheritedInstances=vn,u.flushPendingDeletes=Xt,u.setDelayFunction=gn},bt={},$n=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},bn=(t,e)=>(e=$n(t,e),bt[e]),xt=(t,e)=>{(!e.ptrType||!e.ptr)&&Ft("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Ft("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ct(Object.create(t,{$$:{value:e}}))};function Cn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=bn(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?xt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):xt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),s=Re[o];if(!s)return a.call(this);var c;this.isConst?c=s.constPointerType:c=s.pointerType;var l=je(e,this.registeredClass,c.registeredClass);return l===null?a.call(this):this.isSmartPointer?xt(c.registeredClass.instancePrototype,{ptrType:c,ptr:l,smartPtrType:this,smartPtr:t}):xt(c.registeredClass.instancePrototype,{ptrType:c,ptr:l})}var Ct=t=>typeof FinalizationRegistry>"u"?(Ct=e=>e,t):(Gt=new FinalizationRegistry(e=>{Ie(e.$$)}),Ct=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Gt.register(e,a,e)}return e},Me=e=>Gt.unregister(e),Ct(t)),_n=()=>{Object.assign(St.prototype,{isAliasOf(t){if(!(this instanceof St)||!(t instanceof St))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=Ct(Object.create(Object.getPrototypeOf(this),{$$:{value:pn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),Me(this),Ie(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&&C("Object already scheduled for deletion"),wt.push(this),wt.length===1&&$t&&$t(Xt),this.$$.deleteScheduled=!0,this}})};function St(){}var Tn=48,Pn=57,We=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Tn&&e<=Pn?`_${t}`:t};function qt(t,e){return t=We(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var ke=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`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}},Qt=(t,e,r)=>{u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),ke(u,t,t),u.hasOwnProperty(r)&&C(`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 En(t,e,r,n,a,o,s,c){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=s,this.downcast=c,this.pureVirtualFunctions=[]}var Zt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function An(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${ee(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Zt(e.$$.ptr,r,this.registeredClass);return n}function Dn(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||C(`Cannot pass "${ee(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`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=Zt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`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:C("Unsupporting sharing policy")}return r}function On(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${ee(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Zt(e.$$.ptr,r,this.registeredClass);return n}function He(t){return this.fromWireType(_[t>>2])}var Fn=()=>{Object.assign(Mt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:J,readValueFromPointer:He,deleteObject(t){t!==null&&t.delete()},fromWireType:Cn})};function Mt(t,e,r,n,a,o,s,c,l,h,p){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=c,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=p,!a&&e.baseClass===void 0?n?(this.toWireType=An,this.destructorFunction=null):(this.toWireType=On,this.destructorFunction=null):this.toWireType=Dn}var Be=(t,e,r)=>{u.hasOwnProperty(t)||Ft("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)},xn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},It=[],Ue,O=t=>{var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=Ue.get(t)),e},Sn=(t,e,r)=>{if(t.includes("j"))return xn(t,e,r);var n=O(e).apply(null,r);return n},Mn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Sn(t,e,r)}},q=(t,e)=>{t=I(t);function r(){return t.includes("j")?Mn(t,e):O(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},In=(t,e)=>{var r=qt(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},Le,Ve=t=>{var e=er(t),r=I(e);return et(e),r},jt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!it[o]){if(Ot[o]){Ot[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Le(`${t}: `+r.map(Ve).join([", "]))},jn=(t,e,r,n,a,o,s,c,l,h,p,y,g)=>{p=I(p),o=q(a,o),c&&(c=q(s,c)),h&&(h=q(l,h)),g=q(y,g);var b=We(p);Qt(b,function(){jt(`Cannot construct ${p} due to unbound types`,[n])}),st([t,e,r],n?[n]:[],function(T){T=T[0];var j,P;n?(j=T.registeredClass,P=j.instancePrototype):P=St.prototype;var R=qt(b,function(){if(Object.getPrototypeOf(this)!==d)throw new ft("Use 'new' to construct "+p);if(m.constructor_body===void 0)throw new ft(p+" has no accessible constructor");var kt=m.constructor_body[arguments.length];if(kt===void 0)throw new ft(`Tried to invoke ctor of ${p} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return kt.apply(this,arguments)}),d=Object.create(P,{constructor:{value:R}});R.prototype=d;var m=new En(p,R,d,g,j,o,c,h);m.baseClass&&(m.baseClass.__derivedClasses===void 0&&(m.baseClass.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m));var S=new Mt(p,m,!0,!1,!1),M=new Mt(p+"*",m,!1,!1,!1),ut=new Mt(p+" const*",m,!1,!0,!1);return Re[t]={pointerType:M,constPointerType:ut},Be(b,R),[S,M,ut]})},Jt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+n*4>>2]);return r};function Kt(t,e,r,n,a,o){var s=e.length;s<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var c=e[1]!==null&&r!==null,l=!1,h=1;h<e.length;++h)if(e[h]!==null&&e[h].destructorFunction===void 0){l=!0;break}var p=e[0].name!=="void",y=s-2,g=new Array(y),b=[],T=[];return function(){arguments.length!==y&&C(`function ${t} called with ${arguments.length} arguments, expected ${y}`),T.length=0;var j;b.length=c?2:1,b[0]=a,c&&(j=e[1].toWireType(T,this),b[1]=j);for(var P=0;P<y;++P)g[P]=e[P+2].toWireType(T,arguments[P]),b.push(g[P]);var R=n.apply(null,b);function d(m){if(l)Fe(T);else for(var S=c?1:2;S<e.length;S++){var M=S===1?j:g[S-2];e[S].destructorFunction!==null&&e[S].destructorFunction(M)}if(p)return e[0].fromWireType(m)}return d(R)}}var Rn=(t,e,r,n,a,o)=>{var s=Jt(e,r);a=q(n,a),st([],[t],function(c){c=c[0];var l=`constructor ${c.name}`;if(c.registeredClass.constructor_body===void 0&&(c.registeredClass.constructor_body=[]),c.registeredClass.constructor_body[e-1]!==void 0)throw new ft(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${c.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return c.registeredClass.constructor_body[e-1]=()=>{jt(`Cannot construct ${c.name} due to unbound types`,s)},st([],s,h=>(h.splice(1,0,null),c.registeredClass.constructor_body[e-1]=Kt(l,h,null,a,o),[])),[]})},Ye=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?(Ut(t[t.length-1]==")","Parentheses for argument names should match."),t.substr(0,e)):t},Wn=(t,e,r,n,a,o,s,c,l)=>{var h=Jt(r,n);e=I(e),e=Ye(e),o=q(a,o),st([],[t],function(p){p=p[0];var y=`${p.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),c&&p.registeredClass.pureVirtualFunctions.push(e);function g(){jt(`Cannot call ${y} due to unbound types`,h)}var b=p.registeredClass.instancePrototype,T=b[e];return T===void 0||T.overloadTable===void 0&&T.className!==p.name&&T.argCount===r-2?(g.argCount=r-2,g.className=p.name,b[e]=g):(ke(b,e,y),b[e].overloadTable[r-2]=g),st([],h,function(j){var P=Kt(y,j,p,o,s);return b[e].overloadTable===void 0?(P.argCount=r-2,b[e]=P):b[e].overloadTable[r-2]=P,[]}),[]})};function kn(){Object.assign(ze.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 ze(){this.allocated=[void 0],this.freelist=[]}var X=new ze,Ne=t=>{t>=X.reserved&&--X.get(t).refcount===0&&X.free(t)},Hn=()=>{for(var t=0,e=X.reserved;e<X.allocated.length;++e)X.allocated[e]!==void 0&&++t;return t},Bn=()=>{X.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),X.reserved=X.allocated.length,u.count_emval_handles=Hn},rt={toValue:t=>(t||C("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})}}},Un=(t,e)=>{e=I(e),Z(t,{name:e,fromWireType:r=>{var n=rt.toValue(r);return Ne(r),n},toWireType:(r,n)=>rt.toHandle(n),argPackAdvance:J,readValueFromPointer:zt,destructorFunction:null})},Ln=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(Y[n>>0])}:function(n){return this.fromWireType(B[n>>0])};case 2:return r?function(n){return this.fromWireType(lt[n>>1])}:function(n){return this.fromWireType(yt[n>>1])};case 4:return r?function(n){return this.fromWireType(k[n>>2])}:function(n){return this.fromWireType(_[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Vn=(t,e,r,n)=>{e=I(e);function a(){}a.values={},Z(t,{name:e,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,s)=>s.value,argPackAdvance:J,readValueFromPointer:Ln(e,r,n),destructorFunction:null}),Qt(e,a)},te=(t,e)=>{var r=it[t];return r===void 0&&C(e+" has unknown type "+Ve(t)),r},Yn=(t,e,r)=>{var n=te(t,"enum");e=I(e);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:qt(`${n.name}_${e}`,function(){})}});a.values[r]=o,a[e]=o},ee=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},zn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(be[r>>2])};case 8:return function(r){return this.fromWireType(Ce[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Nn=(t,e,r)=>{e=I(e),Z(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:J,readValueFromPointer:zn(e,r),destructorFunction:null})},Gn=(t,e,r,n,a,o,s)=>{var c=Jt(e,r);t=I(t),t=Ye(t),a=q(n,a),Qt(t,function(){jt(`Cannot call ${t} due to unbound types`,c)},e-1),st([],c,function(l){var h=[l[0],null].concat(l.slice(1));return Be(t,Kt(t,h,null,a,o),e-1),[]})},Xn=(t,e,r)=>{switch(e){case 1:return r?n=>Y[n>>0]:n=>B[n>>0];case 2:return r?n=>lt[n>>1]:n=>yt[n>>1];case 4:return r?n=>k[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},qn=(t,e,r,n,a)=>{e=I(e);var o=p=>p;if(n===0){var s=32-8*r;o=p=>p<<s>>>s}var c=e.includes("unsigned"),l=(p,y)=>{},h;c?h=function(p,y){return l(y,this.name),y>>>0}:h=function(p,y){return l(y,this.name),y},Z(t,{name:e,fromWireType:o,toWireType:h,argPackAdvance:J,readValueFromPointer:Xn(e,r,n!==0),destructorFunction:null})},Qn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(s){var c=_[s>>2],l=_[s+4>>2];return new a(Y.buffer,l,c)}r=I(r),Z(t,{name:r,fromWireType:o,argPackAdvance:J,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Ge=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,s=0;s<t.length;++s){var c=t.charCodeAt(s);if(c>=55296&&c<=57343){var l=t.charCodeAt(++s);c=65536+((c&1023)<<10)|l&1023}if(c<=127){if(r>=o)break;e[r++]=c}else if(c<=2047){if(r+1>=o)break;e[r++]=192|c>>6,e[r++]=128|c&63}else if(c<=65535){if(r+2>=o)break;e[r++]=224|c>>12,e[r++]=128|c>>6&63,e[r++]=128|c&63}else{if(r+3>=o)break;e[r++]=240|c>>18,e[r++]=128|c>>12&63,e[r++]=128|c>>6&63,e[r++]=128|c&63}}return e[r]=0,r-a},Zn=(t,e,r)=>Ge(t,B,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},qe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Jn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&qe)return qe.decode(t.subarray(e,a));for(var o="";e<a;){var s=t[e++];if(!(s&128)){o+=String.fromCharCode(s);continue}var c=t[e++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|c);continue}var l=t[e++]&63;if((s&240)==224?s=(s&15)<<12|c<<6|l:s=(s&7)<<18|c<<12|l<<6|t[e++]&63,s<65536)o+=String.fromCharCode(s);else{var h=s-65536;o+=String.fromCharCode(55296|h>>10,56320|h&1023)}}return o},re=(t,e)=>t?Jn(B,t,e):"",Kn=(t,e)=>{e=I(e);var r=e==="std::string";Z(t,{name:e,fromWireType(n){var a=_[n>>2],o=n+4,s;if(r)for(var c=o,l=0;l<=a;++l){var h=o+l;if(l==a||B[h]==0){var p=h-c,y=re(c,p);s===void 0?s=y:(s+="\0",s+=y),c=h+1}}else{for(var g=new Array(a),l=0;l<a;++l)g[l]=String.fromCharCode(B[o+l]);s=g.join("")}return et(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||C("Cannot pass non-string to std::string"),r&&s?o=Xe(a):o=a.length;var c=ae(4+o+1),l=c+4;if(_[c>>2]=o,r&&s)Zn(a,l,o+1);else if(s)for(var h=0;h<o;++h){var p=a.charCodeAt(h);p>255&&(et(l),C("String has UTF-16 code units that do not fit in 8 bits")),B[l+h]=p}else for(var h=0;h<o;++h)B[l+h]=a[h];return n!==null&&n.push(et,c),c},argPackAdvance:J,readValueFromPointer:He,destructorFunction(n){et(n)}})},Qe=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,ta=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&yt[n];)++n;if(r=n<<1,r-t>32&&Qe)return Qe.decode(B.subarray(t,r));for(var o="",s=0;!(s>=e/2);++s){var c=lt[t+s*2>>1];if(c==0)break;o+=String.fromCharCode(c)}return o},ea=(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);lt[e>>1]=s,e+=2}return lt[e>>1]=0,e-n},ra=t=>t.length*2,na=(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},aa=(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 c=t.charCodeAt(++o);s=65536+((s&1023)<<10)|c&1023}if(k[e>>2]=s,e+=4,e+4>a)break}return k[e>>2]=0,e-n},oa=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},ia=(t,e,r)=>{r=I(r);var n,a,o,s,c;e===2?(n=ta,a=ea,s=ra,o=()=>yt,c=1):e===4&&(n=na,a=aa,s=oa,o=()=>_,c=2),Z(t,{name:r,fromWireType:l=>{for(var h=_[l>>2],p=o(),y,g=l+4,b=0;b<=h;++b){var T=l+4+b*e;if(b==h||p[T>>c]==0){var j=T-g,P=n(g,j);y===void 0?y=P:(y+="\0",y+=P),g=T+e}}return et(l),y},toWireType:(l,h)=>{typeof h!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var p=s(h),y=ae(4+p+e);return _[y>>2]=p>>c,a(h,y+4,p+e),l!==null&&l.push(et,y),y},argPackAdvance:J,readValueFromPointer:zt,destructorFunction(l){et(l)}})},sa=(t,e,r,n,a,o)=>{Dt[t]={name:I(e),rawConstructor:q(r,n),rawDestructor:q(a,o),fields:[]}},ua=(t,e,r,n,a,o,s,c,l,h)=>{Dt[t].fields.push({fieldName:I(e),getterReturnType:r,getter:q(n,a),getterContext:o,setterArgumentType:s,setter:q(c,l),setterContext:h})},ca=(t,e)=>{e=I(e),Z(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},la={},da=t=>{var e=la[t];return e===void 0?I(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.")},ha=t=>t===0?rt.toHandle(Ze()):(t=da(t),rt.toHandle(Ze()[t])),fa=t=>{t>4&&(X.get(t).refcount+=1)},pa=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var s=te(_[n+o*4>>2],"parameter "+o);e[o+1]=s.readValueFromPointer(a),a+=s.argPackAdvance}var c=new(r.bind.apply(r,e));return rt.toHandle(c)}},Je={},ma=(t,e,r,n)=>{t=rt.toValue(t);var a=Je[e];return a||(a=pa(e),Je[e]=a),a(t,r,n)},ya=(t,e)=>{t=te(t,"_emval_take_value");var r=t.readValueFromPointer(e);return rt.toHandle(r)},va=()=>{gt("")},ga=(t,e,r)=>B.copyWithin(t,e,e+r),wa=()=>2147483648,$a=t=>{var e=at.buffer,r=(t-e.byteLength+65535)/65536;try{return at.grow(r),_e(),1}catch{}},ba=t=>{var e=B.length;t>>>=0;var r=wa();if(t>r)return!1;for(var n=(l,h)=>l+(h-l%h)%h,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)),c=$a(s);if(c)return!0}return!1},ne={},Ca=()=>U||"./this.program",_t=()=>{if(!_t.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 ne)ne[r]===void 0?delete e[r]:e[r]=ne[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);_t.strings=n}return _t.strings},_a=(t,e)=>{for(var r=0;r<t.length;++r)Y[e++>>0]=t.charCodeAt(r);Y[e>>0]=0},Ta=(t,e)=>{var r=0;return _t().forEach((n,a)=>{var o=e+r;_[t+a*4>>2]=o,_a(n,o),r+=n.length+1}),0},Pa=(t,e)=>{var r=_t();_[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),_[e>>2]=n,0},Ea=t=>t,Rt=t=>t%4===0&&(t%100!==0||t%400===0),Aa=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Ke=[31,29,31,30,31,30,31,31,30,31,30,31],tr=[31,28,31,30,31,30,31,31,30,31,30,31],Da=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Rt(r.getFullYear()),a=r.getMonth(),o=(n?Ke:tr)[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 Oa(t,e,r){var n=r>0?r:Xe(t)+1,a=new Array(n),o=Ge(t,a,0,a.length);return e&&(a.length=o),a}var Fa=(t,e)=>{Y.set(t,e)},xa=(t,e,r,n)=>{var 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?re(a):""},s=re(r),c={"%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 c)s=s.replace(new RegExp(l,"g"),c[l]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,m,S){for(var M=typeof d=="number"?d.toString():d||"";M.length<m;)M=S[0]+M;return M}function g(d,m){return y(d,m,"0")}function b(d,m){function S(ut){return ut<0?-1:ut>0?1:0}var M;return(M=S(d.getFullYear()-m.getFullYear()))===0&&(M=S(d.getMonth()-m.getMonth()))===0&&(M=S(d.getDate()-m.getDate())),M}function T(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 j(d){var m=Da(new Date(d.tm_year+1900,0,1),d.tm_yday),S=new Date(m.getFullYear(),0,4),M=new Date(m.getFullYear()+1,0,4),ut=T(S),kt=T(M);return b(ut,m)<=0?b(kt,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var P={"%a":d=>h[d.tm_wday].substring(0,3),"%A":d=>h[d.tm_wday],"%b":d=>p[d.tm_mon].substring(0,3),"%B":d=>p[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=>j(d).toString().substring(2),"%G":d=>j(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+Aa(Rt(d.tm_year+1900)?Ke:tr,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 S=(d.tm_wday+371-d.tm_yday)%7;S!=4&&(S!=3||!Rt(d.tm_year))&&(m=1)}}else{m=52;var M=(d.tm_wday+7-d.tm_yday-1)%7;(M==4||M==5&&Rt(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,S=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(S?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};s=s.replace(/%%/g,"\0\0");for(var l in P)s.includes(l)&&(s=s.replace(new RegExp(l,"g"),P[l](o)));s=s.replace(/\0\0/g,"%");var R=Oa(s,!1);return R.length>e?0:(Fa(R,t),R.length-1)},Sa=(t,e,r,n,a)=>xa(t,e,r,n);xe=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},dn(),ft=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},_n(),wn(),Fn(),Le=u.UnboundTypeError=In(Error,"UnboundTypeError"),kn(),Bn();var Ma={s:Kr,v:tn,b:rn,g:nn,q:an,I:on,f:sn,T:un,d:en,ba:cn,P:ln,Y:fn,aa:jn,$:Rn,w:Wn,X:Un,x:Vn,h:Yn,K:Nn,L:Gn,t:qn,n:Qn,J:Kn,C:ia,A:sa,ca:ua,Z:ca,ea:Ne,da:ha,M:fa,V:ma,_:ya,B:va,W:ga,U:ba,R:Ta,S:Pa,D:Xa,E:Ga,m:qa,a:Ia,e:ka,o:Ua,k:Wa,G:za,u:Va,F:Na,z:Za,O:Ka,l:Ha,j:Ba,c:Ra,p:ja,H:Ya,r:Qa,i:La,y:Ja,N:Ea,Q:Sa},E=Jr(),et=u._free=t=>(et=u._free=E.ha)(t),ae=u._malloc=t=>(ae=u._malloc=E.ia)(t),er=t=>(er=E.ka)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=E.la)();var A=(t,e)=>(A=E.ma)(t,e),Tt=t=>(Tt=E.na)(t),F=()=>(F=E.oa)(),x=t=>(x=E.pa)(t),rr=t=>(rr=E.qa)(t),nr=t=>(nr=E.ra)(t),ar=(t,e,r)=>(ar=E.sa)(t,e,r),or=t=>(or=E.ta)(t);u.dynCall_viijii=(t,e,r,n,a,o,s)=>(u.dynCall_viijii=E.ua)(t,e,r,n,a,o,s);var ir=u.dynCall_jiiii=(t,e,r,n,a)=>(ir=u.dynCall_jiiii=E.va)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,s)=>(u.dynCall_iiiiij=E.wa)(t,e,r,n,a,o,s),u.dynCall_iiiiijj=(t,e,r,n,a,o,s,c,l)=>(u.dynCall_iiiiijj=E.xa)(t,e,r,n,a,o,s,c,l),u.dynCall_iiiiiijj=(t,e,r,n,a,o,s,c,l,h)=>(u.dynCall_iiiiiijj=E.ya)(t,e,r,n,a,o,s,c,l,h);function Ia(t,e){var r=F();try{return O(t)(e)}catch(n){if(x(r),n!==n+0)throw n;A(1,0)}}function ja(t,e,r,n){var a=F();try{O(t)(e,r,n)}catch(o){if(x(a),o!==o+0)throw o;A(1,0)}}function Ra(t,e,r){var n=F();try{O(t)(e,r)}catch(a){if(x(n),a!==a+0)throw a;A(1,0)}}function Wa(t,e,r,n,a){var o=F();try{return O(t)(e,r,n,a)}catch(s){if(x(o),s!==s+0)throw s;A(1,0)}}function ka(t,e,r){var n=F();try{return O(t)(e,r)}catch(a){if(x(n),a!==a+0)throw a;A(1,0)}}function Ha(t){var e=F();try{O(t)()}catch(r){if(x(e),r!==r+0)throw r;A(1,0)}}function Ba(t,e){var r=F();try{O(t)(e)}catch(n){if(x(r),n!==n+0)throw n;A(1,0)}}function Ua(t,e,r,n){var a=F();try{return O(t)(e,r,n)}catch(o){if(x(a),o!==o+0)throw o;A(1,0)}}function La(t,e,r,n,a,o,s,c,l,h,p){var y=F();try{O(t)(e,r,n,a,o,s,c,l,h,p)}catch(g){if(x(y),g!==g+0)throw g;A(1,0)}}function Va(t,e,r,n,a,o,s){var c=F();try{return O(t)(e,r,n,a,o,s)}catch(l){if(x(c),l!==l+0)throw l;A(1,0)}}function Ya(t,e,r,n,a){var o=F();try{O(t)(e,r,n,a)}catch(s){if(x(o),s!==s+0)throw s;A(1,0)}}function za(t,e,r,n,a,o){var s=F();try{return O(t)(e,r,n,a,o)}catch(c){if(x(s),c!==c+0)throw c;A(1,0)}}function Na(t,e,r,n,a,o,s,c){var l=F();try{return O(t)(e,r,n,a,o,s,c)}catch(h){if(x(l),h!==h+0)throw h;A(1,0)}}function Ga(t,e,r,n){var a=F();try{return O(t)(e,r,n)}catch(o){if(x(a),o!==o+0)throw o;A(1,0)}}function Xa(t,e,r,n){var a=F();try{return O(t)(e,r,n)}catch(o){if(x(a),o!==o+0)throw o;A(1,0)}}function qa(t){var e=F();try{return O(t)()}catch(r){if(x(e),r!==r+0)throw r;A(1,0)}}function Qa(t,e,r,n,a,o,s,c){var l=F();try{O(t)(e,r,n,a,o,s,c)}catch(h){if(x(l),h!==h+0)throw h;A(1,0)}}function Za(t,e,r,n,a,o,s,c,l,h,p,y){var g=F();try{return O(t)(e,r,n,a,o,s,c,l,h,p,y)}catch(b){if(x(g),b!==b+0)throw b;A(1,0)}}function Ja(t,e,r,n,a,o,s,c,l,h,p,y,g,b,T,j){var P=F();try{O(t)(e,r,n,a,o,s,c,l,h,p,y,g,b,T,j)}catch(R){if(x(P),R!==R+0)throw R;A(1,0)}}function Ka(t,e,r,n,a){var o=F();try{return ir(t,e,r,n,a)}catch(s){if(x(o),s!==s+0)throw s;A(1,0)}}var Wt;vt=function t(){Wt||sr(),Wt||(vt=t)};function sr(){if(ot>0||(Ur(),ot>0))return;function t(){Wt||(Wt=!0,u.calledRun=!0,!mt&&(Lr(),w(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Vr()))}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(),f.ready}})();function Rr(i){return Bt(Pt,i)}function Wr(i){return Mr(Pt,i)}async function kr(i,f){return Ir(Pt,i,f)}async function Hr(i,f){return jr(Pt,i,f)}class Br extends EventTarget{constructor(u={}){var w;super();cr(this,ct,void 0);try{const v=(w=u==null?void 0:u.formats)==null?void 0:w.filter($=>$!=="unknown");if((v==null?void 0:v.length)===0)throw new TypeError("Hint option provided, but is empty.");v==null||v.forEach($=>{if(!nt.has($))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${$}' is not a valid enum value of type BarcodeFormat.`)}),lr(this,ct,v!=null?v:[]),Rr().then($=>{this.dispatchEvent(new CustomEvent("load",{detail:$}))}).catch($=>{this.dispatchEvent(new CustomEvent("error",{detail:$}))})}catch(v){throw me(v,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return z.filter(u=>u!=="unknown")}async detect(u){try{const w=await vr(u);if(w===null)return[];let v;try{fe(w)?v=await kr(w,{tryHarder:!0,formats:oe(this,ct).map($=>nt.get($))}):v=await Hr(w,{tryHarder:!0,formats:oe(this,ct).map($=>nt.get($))})}catch($){throw console.error($),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return v.map($=>{const{topLeft:{x:U,y:N},topRight:{x:L,y:D},bottomLeft:{x:G,y:Q},bottomRight:{x:V,y:K}}=$.position,at=Math.min(U,L,G,V),mt=Math.min(N,D,Q,K),Ut=Math.max(U,L,G,V),Y=Math.max(N,D,Q,K);return{boundingBox:new DOMRectReadOnly(at,mt,Ut-at,Y-mt),rawValue:$.text,format:dr($.format),cornerPoints:[{x:U,y:N},{x:L,y:D},{x:V,y:K},{x:G,y:Q}]}})}catch(w){throw me(w,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ct=new WeakMap,($e=globalThis.BarcodeDetector)!=null||(globalThis.BarcodeDetector=Br),W.setZXingModuleOverrides=Wr,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"}),W}({});

@@ -5,3 +5,3 @@ {

"private": false,
"version": "2.1.5",
"version": "2.2.0",
"type": "module",

@@ -81,4 +81,4 @@ "files": [

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@vitest/browser": "^1.0.4",

@@ -88,5 +88,5 @@ "@vitest/coverage-istanbul": "^1.0.4",

"concurrently": "^8.2.2",
"eslint": "^8.55.0",
"eslint": "^8.56.0",
"http-server": "^14.1.1",
"npm-check-updates": "^16.14.11",
"npm-check-updates": "^16.14.12",
"playwright": "^1.40.1",

@@ -98,3 +98,3 @@ "prettier": "^3.1.1",

"typescript": "^5.3.3",
"vite": "^5.0.7",
"vite": "^5.0.10",
"vitest": "^1.0.4"

@@ -104,4 +104,4 @@ },

"@types/dom-webcodecs": "^0.1.11",
"zxing-wasm": "1.0.0"
"zxing-wasm": "1.1.1"
}
}

@@ -7,3 +7,3 @@ # barcode-detector

> This package was originally published as [`@sec-ant/barcode-detector`](https://www.npmjs.com/package/@sec-ant/barcode-detector) on the npm registry. With appreciation for the generous offer from [@gruhn](https://github.com/gruhn), the package is now released under the name `barcode-detector` starting from version 2.0.0. The original package under the name `@sec-ant/barcode-detector` is deprecated.
Supported barcode formats: `aztec`, `code_128`, `code_39`, `code_93`, `codabar`, `databar`, `databar_expanded`, `data_matrix`, `dx_film_edge`, `ean_13`, `ean_8`, `itf`, `maxi_code` (only generated ones, and no position info), `micro_qr_code`, `pdf417`, `qr_code`, `rm_qr_code`, `upc_a`, `upc_e`, `linear_codes` and `matrix_codes` (for convenience).

@@ -10,0 +10,0 @@ ## Install

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc