2FAuth/public/build/assets/Capture-58b2ebb9.js
2023-12-29 17:55:28 +01:00

6 lines
107 KiB
JavaScript
Vendored

import{q as go,r as Ee,o as za,s as wo,v as va,x as ya,y as bo,f as Se,g as Ye,h as Z,z as $o,A as $a,B as Na,C as _o,u as Co,b as To,d as Po,e as ga,i as fe,t as gt,m as Ve,p as wa,D as So,k as Sa,l as Ea,E as Aa,F as Oa,G as Eo,H as Ao,n as ka,U as Da,I as ja}from"./app-7741c0f3.js";import{F as Oo}from"./Form-5d38519d.js";import{S as ko}from"./Spinner-1b0ef575.js";import{_ as Do}from"./QrContentDisplay-031be625.js";import{u as jo}from"./bus-7cf82b9d.js";/*! 2FAuth version 5.0.2 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */var Ba=(i,c,o)=>{if(!c.has(i))throw TypeError("Cannot "+o)},xa=(i,c,o)=>(Ba(i,c,"read from private field"),o?o.call(i):c.get(i)),xo=(i,c,o)=>{if(c.has(i))throw TypeError("Cannot add the same private member more than once");c instanceof WeakSet?c.add(i):c.set(i,o)},Mo=(i,c,o,h)=>(Ba(i,c,"write to private field"),h?h.call(i,o):c.set(i,o),o);const Ma=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function Ro(i){if(Ya(i))return{width:i.naturalWidth,height:i.naturalHeight};if(Ga(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(qa(i))return{width:i.videoWidth,height:i.videoHeight};if(Xa(i))return{width:i.width,height:i.height};if(Qa(i))return{width:i.displayWidth,height:i.displayHeight};if(Ja(i))return{width:i.width,height:i.height};if(Za(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 Ya(i){try{return i instanceof HTMLImageElement}catch{return!1}}function Ga(i){try{return i instanceof SVGImageElement}catch{return!1}}function qa(i){try{return i instanceof HTMLVideoElement}catch{return!1}}function Ja(i){try{return i instanceof HTMLCanvasElement}catch{return!1}}function Xa(i){try{return i instanceof ImageBitmap}catch{return!1}}function Za(i){try{return i instanceof OffscreenCanvas}catch{return!1}}function Qa(i){try{return i instanceof VideoFrame}catch{return!1}}function Ka(i){try{return i instanceof Blob}catch{return!1}}function Fo(i){try{return i instanceof ImageData}catch{return!1}}function Wo(i,c){try{const o=new OffscreenCanvas(i,c);if(o.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return o;throw void 0}catch{const h=document.createElement("canvas");return h.width=i,h.height=c,h}}async function eo(i){if(Ya(i)&&!await Vo(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Ga(i)&&!await Lo(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(Qa(i)&&zo(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(qa(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(Xa(i)&&Bo(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:c,height:o}=Ro(i);if(c===0||o===0)return null;const h=Wo(c,o).getContext("2d");h.drawImage(i,0,0);try{return h.getImageData(0,0,c,o)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Io(i){let c;try{if(createImageBitmap)c=await createImageBitmap(i);else if(Image){c=new Image;let o="";try{o=URL.createObjectURL(i),c.src=o,await c.decode()}finally{URL.revokeObjectURL(o)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await eo(c)}function Uo(i){const{width:c,height:o}=i;if(c===0||o===0)return null;const h=i.getContext("2d");try{return h.getImageData(0,0,c,o)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ho(i){if(Ka(i))return await Io(i);if(Fo(i)){if(No(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return Ja(i)||Za(i)?Uo(i):await eo(i)}async function Vo(i){try{return await i.decode(),!0}catch{return!1}}async function Lo(i){var c;try{return await((c=i.decode)==null?void 0:c.call(i)),!0}catch{return!1}}function zo(i){return i.format===null}function No(i){return i.data.buffer.byteLength===0}function Bo(i){return i.width===0&&i.height===0}function Ra(i,c){return i instanceof DOMException?new DOMException(`${c}: ${i.message}`,i.name):i instanceof Error?new i.constructor(`${c}: ${i.message}`):new Error(`${c}: ${i}`)}const Fa=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","UPC-A","UPC-E"];function Yo(i){return i.join("|")}function Go(i){const c=Wa(i);let o=0,h=Fa.length-1;for(;o<=h;){const v=Math.floor((o+h)/2),b=Fa[v],$=Wa(b);if($===c)return b;$<c?o=v+1:h=v-1}return"None"}function Wa(i){return i.toLowerCase().replace(/_-\[\]/g,"")}function qo(i,c){return i.Binarizer[c]}function Jo(i,c){return i.CharacterSet[c]}const Xo=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Zo(i){return Xo[i.value]}function Qo(i,c){return i.EanAddOnSymbol[c]}function Ko(i,c){return i.TextMode[c]}const lr={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 to(i,c){return{...c,formats:Yo(c.formats),binarizer:qo(i,c.binarizer),eanAddOnSymbol:Qo(i,c.eanAddOnSymbol),textMode:Ko(i,c.textMode),characterSet:Jo(i,c.characterSet)}}function ro(i){return{...i,format:Go(i.format),eccLevel:i.eccLevel,contentType:Zo(i.contentType)}}const ei={locateFile:(i,c)=>{const o=i.match(/_(.+?)\.wasm$/);return o?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.0.0-rc.3/dist/${o[1]}/${i}`:c+i}};let Ia=new WeakMap;function Ta(i,c){var o;const h=Ia.get(i);if(h!=null&&h.modulePromise&&(c===void 0||Object.is(c,h.moduleOverrides)))return h.modulePromise;const v=(o=c??(h==null?void 0:h.moduleOverrides))!=null?o:ei,b=i({...v});return Ia.set(i,{moduleOverrides:v,modulePromise:b}),b}async function ti(i,c,o=lr){const h={...lr,...o},v=await Ta(i),{size:b}=c,$=new Uint8Array(await c.arrayBuffer()),A=v._malloc(b);v.HEAPU8.set($,A);const y=v.readBarcodesFromImage(A,b,to(v,h));v._free(A);const _=[];for(let O=0;O<y.size();++O)_.push(ro(y.get(O)));return _}async function ri(i,c,o=lr){const h={...lr,...o},v=await Ta(i),{data:b,width:$,height:A,data:{byteLength:y}}=c,_=v._malloc(y);v.HEAPU8.set(b,_);const O=v.readBarcodesFromPixmap(_,$,A,to(v,h));v._free(_);const P=[];for(let B=0;B<O.size();++B)P.push(ro(O.get(B)));return P}var Pa=(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(c={}){var o=c,h,v;o.ready=new Promise((n,e)=>{h=n,v=e});var b=Object.assign({},o),$="./this.program",A=typeof window=="object",y=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var _="";function O(n){return o.locateFile?o.locateFile(n,_):_+n}var P;(A||y)&&(y?_=self.location.href:typeof document<"u"&&document.currentScript&&(_=document.currentScript.src),i&&(_=i),_.indexOf("blob:")!==0?_=_.substr(0,_.replace(/[?#].*/,"").lastIndexOf("/")+1):_="",y&&(P=n=>{var e=new XMLHttpRequest;return e.open("GET",n,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),o.print||console.log.bind(console);var B=o.printErr||console.error.bind(console);Object.assign(o,b),b=null,o.arguments&&o.arguments,o.thisProgram&&($=o.thisProgram),o.quit&&o.quit;var q;o.wasmBinary&&(q=o.wasmBinary),typeof WebAssembly!="object"&&pe("no native wasm support detected");var Y,X=!1;function oe(n,e){n||pe(e)}var x,D,N,J,R,E,we,Oe;function ze(){var n=Y.buffer;o.HEAP8=x=new Int8Array(n),o.HEAP16=N=new Int16Array(n),o.HEAPU8=D=new Uint8Array(n),o.HEAPU16=J=new Uint16Array(n),o.HEAP32=R=new Int32Array(n),o.HEAPU32=E=new Uint32Array(n),o.HEAPF32=we=new Float32Array(n),o.HEAPF64=Oe=new Float64Array(n)}var Ne=[],Be=[],Xe=[];function Ct(){if(o.preRun)for(typeof o.preRun=="function"&&(o.preRun=[o.preRun]);o.preRun.length;)Ze(o.preRun.shift());et(Ne)}function Tt(){et(Be)}function Pt(){if(o.postRun)for(typeof o.postRun=="function"&&(o.postRun=[o.postRun]);o.postRun.length;)St(o.postRun.shift());et(Xe)}function Ze(n){Ne.unshift(n)}function wt(n){Be.unshift(n)}function St(n){Xe.unshift(n)}var se=0,ie=null;function ye(n){se++,o.monitorRunDependencies&&o.monitorRunDependencies(se)}function Et(n){if(se--,o.monitorRunDependencies&&o.monitorRunDependencies(se),se==0&&ie){var e=ie;ie=null,e()}}function pe(n){o.onAbort&&o.onAbort(n),n="Aborted("+n+")",B(n),X=!0,n+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(n);throw v(e),e}var At="data:application/octet-stream;base64,",Qe=n=>n.startsWith(At),ce;ce="zxing_reader.wasm",Qe(ce)||(ce=O(ce));function Ke(n){if(n==ce&&q)return new Uint8Array(q);if(P)return P(n);throw"both async and sync fetching of the wasm failed"}function fr(n){return!q&&(A||y)&&typeof fetch=="function"?fetch(n,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+n+"'";return e.arrayBuffer()}).catch(()=>Ke(n)):Promise.resolve().then(()=>Ke(n))}function Ot(n,e,t){return fr(n).then(r=>WebAssembly.instantiate(r,e)).then(r=>r).then(t,r=>{B(`failed to asynchronously prepare wasm: ${r}`),pe(r)})}function hr(n,e,t,r){return!n&&typeof WebAssembly.instantiateStreaming=="function"&&!Qe(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var s=WebAssembly.instantiateStreaming(a,t);return s.then(r,function(u){return B(`wasm streaming compile failed: ${u}`),B("falling back to ArrayBuffer instantiation"),Ot(e,t,r)})}):Ot(e,t,r)}function pr(){var n={a:Jn};function e(r,a){return F=r.exports,Y=F.fa,ze(),Vt=F.ja,wt(F.ga),Et(),F}ye();function t(r){e(r.instance)}if(o.instantiateWasm)try{return o.instantiateWasm(n,e)}catch(r){B(`Module.instantiateWasm callback failed with error: ${r}`),v(r)}return hr(q,ce,n,t).catch(v),{}}var et=n=>{for(;n.length>0;)n.shift()(o)};o.noExitRuntime;var ke=[],De=0,mr=n=>{var e=new tt(n);return e.get_caught()||(e.set_caught(!0),De--),e.set_rethrown(!1),ke.push(e),nr(e.excPtr),e.get_exception_ptr()},ne=0,vr=()=>{M(0,0);var n=ke.pop();rr(n.excPtr),ne=0};function tt(n){this.excPtr=n,this.ptr=n-24,this.set_type=function(e){E[this.ptr+4>>2]=e},this.get_type=function(){return E[this.ptr+4>>2]},this.set_destructor=function(e){E[this.ptr+8>>2]=e},this.get_destructor=function(){return E[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,x[this.ptr+12>>0]=e},this.get_caught=function(){return x[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,x[this.ptr+13>>0]=e},this.get_rethrown=function(){return x[this.ptr+13>>0]!=0},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){E[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return E[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=or(this.get_type());if(e)return E[this.excPtr>>2];var t=this.get_adjusted_ptr();return t!==0?t:this.excPtr}}var yr=n=>{throw ne||(ne=n),ne},rt=n=>{var e=ne;if(!e)return Pe(0),0;var t=new tt(e);t.set_adjusted_ptr(e);var r=t.get_type();if(!r)return Pe(0),e;for(var a in n){var s=n[a];if(s===0||s===r)break;var u=t.ptr+16;if(ar(s,r,u))return Pe(s),e}return Pe(r),e},gr=()=>rt([]),wr=n=>rt([n]),br=(n,e)=>rt([n,e]),$r=()=>{var n=ke.pop();n||pe("no exception to throw");var e=n.excPtr;throw n.get_rethrown()||(ke.push(n),n.set_rethrown(!0),n.set_caught(!1),De++),ne=e,ne},_r=(n,e,t)=>{var r=new tt(n);throw r.init(e,t),ne=n,De++,ne},Cr=()=>De,je={},kt=n=>{for(;n.length;){var e=n.pop(),t=n.pop();t(e)}};function nt(n){return this.fromWireType(R[n>>2])}var me={},le={},xe={},Dt,Me=n=>{throw new Dt(n)},de=(n,e,t)=>{n.forEach(function(l){xe[l]=e});function r(l){var d=t(l);d.length!==n.length&&Me("Mismatched type converter count");for(var f=0;f<n.length;++f)te(n[f],d[f])}var a=new Array(e.length),s=[],u=0;e.forEach((l,d)=>{le.hasOwnProperty(l)?a[d]=le[l]:(s.push(l),me.hasOwnProperty(l)||(me[l]=[]),me[l].push(()=>{a[d]=le[l],++u,u===s.length&&r(a)}))}),s.length===0&&r(a)},Tr=n=>{var e=je[n];delete je[n];var t=e.rawConstructor,r=e.rawDestructor,a=e.fields,s=a.map(u=>u.getterReturnType).concat(a.map(u=>u.setterArgumentType));de([n],s,u=>{var l={};return a.forEach((d,f)=>{var m=d.fieldName,w=u[f],C=d.getter,S=d.getterContext,j=u[f+a.length],H=d.setter,V=d.setterContext;l[m]={read:L=>w.fromWireType(C(S,L)),write:(L,g)=>{var p=[];H(V,L,j.toWireType(p,g)),kt(p)}}}),[{name:e.name,fromWireType:d=>{var f={};for(var m in l)f[m]=l[m].read(d);return r(d),f},toWireType:(d,f)=>{for(var m in l)if(!(m in f))throw new TypeError(`Missing field: "${m}"`);var w=t();for(m in l)l[m].write(w,f[m]);return d!==null&&d.push(r,w),w},argPackAdvance:re,readValueFromPointer:nt,destructorFunction:r}]})},Pr=(n,e,t,r,a)=>{},Sr=()=>{for(var n=new Array(256),e=0;e<256;++e)n[e]=String.fromCharCode(e);jt=n},jt,G=n=>{for(var e="",t=n;D[t];)e+=jt[D[t++]];return e},ve,k=n=>{throw new ve(n)};function Er(n,e,t={}){var r=e.name;if(n||k(`type "${r}" must have a positive integer typeid pointer`),le.hasOwnProperty(n)){if(t.ignoreDuplicateRegistrations)return;k(`Cannot register type '${r}' twice`)}if(le[n]=e,delete xe[n],me.hasOwnProperty(n)){var a=me[n];delete me[n],a.forEach(s=>s())}}function te(n,e,t={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Er(n,e,t)}var re=8,Ar=(n,e,t,r)=>{e=G(e),te(n,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,s){return s?t:r},argPackAdvance:re,readValueFromPointer:function(a){return this.fromWireType(D[a])},destructorFunction:null})},Or=n=>({count:n.count,deleteScheduled:n.deleteScheduled,preservePointerOnDelete:n.preservePointerOnDelete,ptr:n.ptr,ptrType:n.ptrType,smartPtr:n.smartPtr,smartPtrType:n.smartPtrType}),at=n=>{function e(t){return t.$$.ptrType.registeredClass.name}k(e(n)+" instance already deleted")},ot=!1,xt=n=>{},kr=n=>{n.smartPtr?n.smartPtrType.rawDestructor(n.smartPtr):n.ptrType.registeredClass.rawDestructor(n.ptr)},Mt=n=>{n.count.value-=1;var e=n.count.value===0;e&&kr(n)},Rt=(n,e,t)=>{if(e===t)return n;if(t.baseClass===void 0)return null;var r=Rt(n,e,t.baseClass);return r===null?null:t.downcast(r)},Ft={},Dr=()=>Object.keys(_e).length,jr=()=>{var n=[];for(var e in _e)_e.hasOwnProperty(e)&&n.push(_e[e]);return n},be=[],it=()=>{for(;be.length;){var n=be.pop();n.$$.deleteScheduled=!1,n.delete()}},$e,xr=n=>{$e=n,be.length&&$e&&$e(it)},Mr=()=>{o.getInheritedInstanceCount=Dr,o.getLiveInheritedInstances=jr,o.flushPendingDeletes=it,o.setDelayFunction=xr},_e={},Rr=(n,e)=>{for(e===void 0&&k("ptr should not be undefined");n.baseClass;)e=n.upcast(e),n=n.baseClass;return e},Fr=(n,e)=>(e=Rr(n,e),_e[e]),Re=(n,e)=>{(!e.ptrType||!e.ptr)&&Me("makeClassHandle requires ptr and ptrType");var t=!!e.smartPtrType,r=!!e.smartPtr;return t!==r&&Me("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ce(Object.create(n,{$$:{value:e}}))};function Wr(n){var e=this.getPointee(n);if(!e)return this.destructor(n),null;var t=Fr(this.registeredClass,e);if(t!==void 0){if(t.$$.count.value===0)return t.$$.ptr=e,t.$$.smartPtr=n,t.clone();var r=t.clone();return this.destructor(n),r}function a(){return this.isSmartPointer?Re(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:n}):Re(this.registeredClass.instancePrototype,{ptrType:this,ptr:n})}var s=this.registeredClass.getActualType(e),u=Ft[s];if(!u)return a.call(this);var l;this.isConst?l=u.constPointerType:l=u.pointerType;var d=Rt(e,this.registeredClass,l.registeredClass);return d===null?a.call(this):this.isSmartPointer?Re(l.registeredClass.instancePrototype,{ptrType:l,ptr:d,smartPtrType:this,smartPtr:n}):Re(l.registeredClass.instancePrototype,{ptrType:l,ptr:d})}var Ce=n=>typeof FinalizationRegistry>"u"?(Ce=e=>e,n):(ot=new FinalizationRegistry(e=>{Mt(e.$$)}),Ce=e=>{var t=e.$$,r=!!t.smartPtr;if(r){var a={$$:t};ot.register(e,a,e)}return e},xt=e=>ot.unregister(e),Ce(n)),Ir=()=>{Object.assign(Fe.prototype,{isAliasOf(n){if(!(this instanceof Fe)||!(n instanceof Fe))return!1;var e=this.$$.ptrType.registeredClass,t=this.$$.ptr;n.$$=n.$$;for(var r=n.$$.ptrType.registeredClass,a=n.$$.ptr;e.baseClass;)t=e.upcast(t),e=e.baseClass;for(;r.baseClass;)a=r.upcast(a),r=r.baseClass;return e===r&&t===a},clone(){if(this.$$.ptr||at(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var n=Ce(Object.create(Object.getPrototypeOf(this),{$$:{value:Or(this.$$)}}));return n.$$.count.value+=1,n.$$.deleteScheduled=!1,n},delete(){this.$$.ptr||at(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&k("Object already scheduled for deletion"),xt(this),Mt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||at(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&k("Object already scheduled for deletion"),be.push(this),be.length===1&&$e&&$e(it),this.$$.deleteScheduled=!0,this}})};function Fe(){}var Ur=48,Hr=57,Wt=n=>{if(n===void 0)return"_unknown";n=n.replace(/[^a-zA-Z0-9_]/g,"$");var e=n.charCodeAt(0);return e>=Ur&&e<=Hr?`_${n}`:n};function st(n,e){return n=Wt(n),{[n]:function(){return e.apply(this,arguments)}}[n]}var It=(n,e,t)=>{if(n[e].overloadTable===void 0){var r=n[e];n[e]=function(){return n[e].overloadTable.hasOwnProperty(arguments.length)||k(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${n[e].overloadTable})!`),n[e].overloadTable[arguments.length].apply(this,arguments)},n[e].overloadTable=[],n[e].overloadTable[r.argCount]=r}},ut=(n,e,t)=>{o.hasOwnProperty(n)?((t===void 0||o[n].overloadTable!==void 0&&o[n].overloadTable[t]!==void 0)&&k(`Cannot register public name '${n}' twice`),It(o,n,n),o.hasOwnProperty(t)&&k(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),o[n].overloadTable[t]=e):(o[n]=e,t!==void 0&&(o[n].numArguments=t))};function Vr(n,e,t,r,a,s,u,l){this.name=n,this.constructor=e,this.instancePrototype=t,this.rawDestructor=r,this.baseClass=a,this.getActualType=s,this.upcast=u,this.downcast=l,this.pureVirtualFunctions=[]}var ct=(n,e,t)=>{for(;e!==t;)e.upcast||k(`Expected null or instance of ${t.name}, got an instance of ${e.name}`),n=e.upcast(n),e=e.baseClass;return n};function Lr(n,e){if(e===null)return this.isReference&&k(`null is not a valid ${this.name}`),0;e.$$||k(`Cannot pass "${ht(e)}" as a ${this.name}`),e.$$.ptr||k(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=e.$$.ptrType.registeredClass,r=ct(e.$$.ptr,t,this.registeredClass);return r}function zr(n,e){var t;if(e===null)return this.isReference&&k(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),n!==null&&n.push(this.rawDestructor,t),t):0;e.$$||k(`Cannot pass "${ht(e)}" as a ${this.name}`),e.$$.ptr||k(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&k(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass;if(t=ct(e.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&k("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?t=e.$$.smartPtr:k(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)t=e.$$.smartPtr;else{var a=e.clone();t=this.rawShare(t,ue.toHandle(()=>a.delete())),n!==null&&n.push(this.rawDestructor,t)}break;default:k("Unsupporting sharing policy")}return t}function Nr(n,e){if(e===null)return this.isReference&&k(`null is not a valid ${this.name}`),0;e.$$||k(`Cannot pass "${ht(e)}" as a ${this.name}`),e.$$.ptr||k(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&k(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var t=e.$$.ptrType.registeredClass,r=ct(e.$$.ptr,t,this.registeredClass);return r}function Ut(n){return this.fromWireType(E[n>>2])}var Br=()=>{Object.assign(We.prototype,{getPointee(n){return this.rawGetPointee&&(n=this.rawGetPointee(n)),n},destructor(n){this.rawDestructor&&this.rawDestructor(n)},argPackAdvance:re,readValueFromPointer:Ut,deleteObject(n){n!==null&&n.delete()},fromWireType:Wr})};function We(n,e,t,r,a,s,u,l,d,f,m){this.name=n,this.registeredClass=e,this.isReference=t,this.isConst=r,this.isSmartPointer=a,this.pointeeType=s,this.sharingPolicy=u,this.rawGetPointee=l,this.rawConstructor=d,this.rawShare=f,this.rawDestructor=m,!a&&e.baseClass===void 0?r?(this.toWireType=Lr,this.destructorFunction=null):(this.toWireType=Nr,this.destructorFunction=null):this.toWireType=zr}var Ht=(n,e,t)=>{o.hasOwnProperty(n)||Me("Replacing nonexistant public symbol"),o[n].overloadTable!==void 0&&t!==void 0?o[n].overloadTable[t]=e:(o[n]=e,o[n].argCount=t)},Yr=(n,e,t)=>{var r=o["dynCall_"+n];return t&&t.length?r.apply(null,[e].concat(t)):r.call(null,e)},Ie=[],Vt,W=n=>{var e=Ie[n];return e||(n>=Ie.length&&(Ie.length=n+1),Ie[n]=e=Vt.get(n)),e},Gr=(n,e,t)=>{if(n.includes("j"))return Yr(n,e,t);var r=W(e).apply(null,t);return r},qr=(n,e)=>{var t=[];return function(){return t.length=0,Object.assign(t,arguments),Gr(n,e,t)}},ee=(n,e)=>{n=G(n);function t(){return n.includes("j")?qr(n,e):W(e)}var r=t();return typeof r!="function"&&k(`unknown function pointer with signature ${n}: ${e}`),r},Jr=(n,e)=>{var t=st(e,function(r){this.name=e,this.message=r;var a=new Error(r).stack;a!==void 0&&(this.stack=this.toString()+`
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},t},Lt,zt=n=>{var e=tr(n),t=G(e);return ae(e),t},Ue=(n,e)=>{var t=[],r={};function a(s){if(!r[s]&&!le[s]){if(xe[s]){xe[s].forEach(a);return}t.push(s),r[s]=!0}}throw e.forEach(a),new Lt(`${n}: `+t.map(zt).join([", "]))},Xr=(n,e,t,r,a,s,u,l,d,f,m,w,C)=>{m=G(m),s=ee(a,s),l&&(l=ee(u,l)),f&&(f=ee(d,f)),C=ee(w,C);var S=Wt(m);ut(S,function(){Ue(`Cannot construct ${m} due to unbound types`,[r])}),de([n,e,t],r?[r]:[],function(j){j=j[0];var H,V;r?(H=j.registeredClass,V=H.instancePrototype):V=Fe.prototype;var L=st(S,function(){if(Object.getPrototypeOf(this)!==g)throw new ve("Use 'new' to construct "+m);if(p.constructor_body===void 0)throw new ve(m+" has no accessible constructor");var ge=p.constructor_body[arguments.length];if(ge===void 0)throw new ve(`Tried to invoke ctor of ${m} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(p.constructor_body).toString()}) parameters instead!`);return ge.apply(this,arguments)}),g=Object.create(V,{constructor:{value:L}});L.prototype=g;var p=new Vr(m,L,g,C,H,s,l,f);p.baseClass&&(p.baseClass.__derivedClasses===void 0&&(p.baseClass.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var T=new We(m,p,!0,!1,!1),z=new We(m+"*",p,!1,!1,!1),Q=new We(m+" const*",p,!1,!0,!1);return Ft[n]={pointerType:z,constPointerType:Q},Ht(S,L),[T,z,Q]})},lt=(n,e)=>{for(var t=[],r=0;r<n;r++)t.push(E[e+r*4>>2]);return t};function dt(n,e,t,r,a,s){var u=e.length;u<2&&k("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var l=e[1]!==null&&t!==null,d=!1,f=1;f<e.length;++f)if(e[f]!==null&&e[f].destructorFunction===void 0){d=!0;break}var m=e[0].name!=="void",w=u-2,C=new Array(w),S=[],j=[];return function(){arguments.length!==w&&k(`function ${n} called with ${arguments.length} arguments, expected ${w}`),j.length=0;var H;S.length=l?2:1,S[0]=a,l&&(H=e[1].toWireType(j,this),S[1]=H);for(var V=0;V<w;++V)C[V]=e[V+2].toWireType(j,arguments[V]),S.push(C[V]);var L=r.apply(null,S);function g(p){if(d)kt(j);else for(var T=l?1:2;T<e.length;T++){var z=T===1?H:C[T-2];e[T].destructorFunction!==null&&e[T].destructorFunction(z)}if(m)return e[0].fromWireType(p)}return g(L)}}var Zr=(n,e,t,r,a,s)=>{var u=lt(e,t);a=ee(r,a),de([],[n],function(l){l=l[0];var d=`constructor ${l.name}`;if(l.registeredClass.constructor_body===void 0&&(l.registeredClass.constructor_body=[]),l.registeredClass.constructor_body[e-1]!==void 0)throw new ve(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${l.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return l.registeredClass.constructor_body[e-1]=()=>{Ue(`Cannot construct ${l.name} due to unbound types`,u)},de([],u,f=>(f.splice(1,0,null),l.registeredClass.constructor_body[e-1]=dt(d,f,null,a,s),[])),[]})},Nt=n=>{n=n.trim();const e=n.indexOf("(");return e!==-1?(oe(n[n.length-1]==")","Parentheses for argument names should match."),n.substr(0,e)):n},Qr=(n,e,t,r,a,s,u,l,d)=>{var f=lt(t,r);e=G(e),e=Nt(e),s=ee(a,s),de([],[n],function(m){m=m[0];var w=`${m.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),l&&m.registeredClass.pureVirtualFunctions.push(e);function C(){Ue(`Cannot call ${w} due to unbound types`,f)}var S=m.registeredClass.instancePrototype,j=S[e];return j===void 0||j.overloadTable===void 0&&j.className!==m.name&&j.argCount===t-2?(C.argCount=t-2,C.className=m.name,S[e]=C):(It(S,e,w),S[e].overloadTable[t-2]=C),de([],f,function(H){var V=dt(w,H,m,s,u);return S[e].overloadTable===void 0?(V.argCount=t-2,S[e]=V):S[e].overloadTable[t-2]=V,[]}),[]})};function Kr(){Object.assign(Bt.prototype,{get(n){return this.allocated[n]},has(n){return this.allocated[n]!==void 0},allocate(n){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=n,e},free(n){this.allocated[n]=void 0,this.freelist.push(n)}})}function Bt(){this.allocated=[void 0],this.freelist=[]}var K=new Bt,Yt=n=>{n>=K.reserved&&--K.get(n).refcount===0&&K.free(n)},en=()=>{for(var n=0,e=K.reserved;e<K.allocated.length;++e)K.allocated[e]!==void 0&&++n;return n},tn=()=>{K.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),K.reserved=K.allocated.length,o.count_emval_handles=en},ue={toValue:n=>(n||k("Cannot use deleted val. handle = "+n),K.get(n).value),toHandle:n=>{switch(n){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return K.allocate({refcount:1,value:n})}}},rn=(n,e)=>{e=G(e),te(n,{name:e,fromWireType:t=>{var r=ue.toValue(t);return Yt(t),r},toWireType:(t,r)=>ue.toHandle(r),argPackAdvance:re,readValueFromPointer:nt,destructorFunction:null})},nn=(n,e,t)=>{switch(e){case 1:return t?function(r){return this.fromWireType(x[r>>0])}:function(r){return this.fromWireType(D[r>>0])};case 2:return t?function(r){return this.fromWireType(N[r>>1])}:function(r){return this.fromWireType(J[r>>1])};case 4:return t?function(r){return this.fromWireType(R[r>>2])}:function(r){return this.fromWireType(E[r>>2])};default:throw new TypeError(`invalid integer width (${e}): ${n}`)}},an=(n,e,t,r)=>{e=G(e);function a(){}a.values={},te(n,{name:e,constructor:a,fromWireType:function(s){return this.constructor.values[s]},toWireType:(s,u)=>u.value,argPackAdvance:re,readValueFromPointer:nn(e,t,r),destructorFunction:null}),ut(e,a)},ft=(n,e)=>{var t=le[n];return t===void 0&&k(e+" has unknown type "+zt(n)),t},on=(n,e,t)=>{var r=ft(n,"enum");e=G(e);var a=r.constructor,s=Object.create(r.constructor.prototype,{value:{value:t},constructor:{value:st(`${r.name}_${e}`,function(){})}});a.values[t]=s,a[e]=s},ht=n=>{if(n===null)return"null";var e=typeof n;return e==="object"||e==="array"||e==="function"?n.toString():""+n},sn=(n,e)=>{switch(e){case 4:return function(t){return this.fromWireType(we[t>>2])};case 8:return function(t){return this.fromWireType(Oe[t>>3])};default:throw new TypeError(`invalid float width (${e}): ${n}`)}},un=(n,e,t)=>{e=G(e),te(n,{name:e,fromWireType:r=>r,toWireType:(r,a)=>a,argPackAdvance:re,readValueFromPointer:sn(e,t),destructorFunction:null})},cn=(n,e,t,r,a,s,u)=>{var l=lt(e,t);n=G(n),n=Nt(n),a=ee(r,a),ut(n,function(){Ue(`Cannot call ${n} due to unbound types`,l)},e-1),de([],l,function(d){var f=[d[0],null].concat(d.slice(1));return Ht(n,dt(n,f,null,a,s),e-1),[]})},ln=(n,e,t)=>{switch(e){case 1:return t?r=>x[r>>0]:r=>D[r>>0];case 2:return t?r=>N[r>>1]:r=>J[r>>1];case 4:return t?r=>R[r>>2]:r=>E[r>>2];default:throw new TypeError(`invalid integer width (${e}): ${n}`)}},dn=(n,e,t,r,a)=>{e=G(e);var s=m=>m;if(r===0){var u=32-8*t;s=m=>m<<u>>>u}var l=e.includes("unsigned"),d=(m,w)=>{},f;l?f=function(m,w){return d(w,this.name),w>>>0}:f=function(m,w){return d(w,this.name),w},te(n,{name:e,fromWireType:s,toWireType:f,argPackAdvance:re,readValueFromPointer:ln(e,t,r!==0),destructorFunction:null})},fn=(n,e,t)=>{var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=r[e];function s(u){var l=E[u>>2],d=E[u+4>>2];return new a(x.buffer,d,l)}t=G(t),te(n,{name:t,fromWireType:s,argPackAdvance:re,readValueFromPointer:s},{ignoreDuplicateRegistrations:!0})},Gt=(n,e,t,r)=>{if(!(r>0))return 0;for(var a=t,s=t+r-1,u=0;u<n.length;++u){var l=n.charCodeAt(u);if(l>=55296&&l<=57343){var d=n.charCodeAt(++u);l=65536+((l&1023)<<10)|d&1023}if(l<=127){if(t>=s)break;e[t++]=l}else if(l<=2047){if(t+1>=s)break;e[t++]=192|l>>6,e[t++]=128|l&63}else if(l<=65535){if(t+2>=s)break;e[t++]=224|l>>12,e[t++]=128|l>>6&63,e[t++]=128|l&63}else{if(t+3>=s)break;e[t++]=240|l>>18,e[t++]=128|l>>12&63,e[t++]=128|l>>6&63,e[t++]=128|l&63}}return e[t]=0,t-a},hn=(n,e,t)=>Gt(n,D,e,t),qt=n=>{for(var e=0,t=0;t<n.length;++t){var r=n.charCodeAt(t);r<=127?e++:r<=2047?e+=2:r>=55296&&r<=57343?(e+=4,++t):e+=3}return e},Jt=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,pn=(n,e,t)=>{for(var r=e+t,a=e;n[a]&&!(a>=r);)++a;if(a-e>16&&n.buffer&&Jt)return Jt.decode(n.subarray(e,a));for(var s="";e<a;){var u=n[e++];if(!(u&128)){s+=String.fromCharCode(u);continue}var l=n[e++]&63;if((u&224)==192){s+=String.fromCharCode((u&31)<<6|l);continue}var d=n[e++]&63;if((u&240)==224?u=(u&15)<<12|l<<6|d:u=(u&7)<<18|l<<12|d<<6|n[e++]&63,u<65536)s+=String.fromCharCode(u);else{var f=u-65536;s+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return s},pt=(n,e)=>n?pn(D,n,e):"",mn=(n,e)=>{e=G(e);var t=e==="std::string";te(n,{name:e,fromWireType(r){var a=E[r>>2],s=r+4,u;if(t)for(var l=s,d=0;d<=a;++d){var f=s+d;if(d==a||D[f]==0){var m=f-l,w=pt(l,m);u===void 0?u=w:(u+=String.fromCharCode(0),u+=w),l=f+1}}else{for(var C=new Array(a),d=0;d<a;++d)C[d]=String.fromCharCode(D[s+d]);u=C.join("")}return ae(r),u},toWireType(r,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var s,u=typeof a=="string";u||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||k("Cannot pass non-string to std::string"),t&&u?s=qt(a):s=a.length;var l=vt(4+s+1),d=l+4;if(E[l>>2]=s,t&&u)hn(a,d,s+1);else if(u)for(var f=0;f<s;++f){var m=a.charCodeAt(f);m>255&&(ae(d),k("String has UTF-16 code units that do not fit in 8 bits")),D[d+f]=m}else for(var f=0;f<s;++f)D[d+f]=a[f];return r!==null&&r.push(ae,l),l},argPackAdvance:re,readValueFromPointer:Ut,destructorFunction(r){ae(r)}})},Xt=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,vn=(n,e)=>{for(var t=n,r=t>>1,a=r+e/2;!(r>=a)&&J[r];)++r;if(t=r<<1,t-n>32&&Xt)return Xt.decode(D.subarray(n,t));for(var s="",u=0;!(u>=e/2);++u){var l=N[n+u*2>>1];if(l==0)break;s+=String.fromCharCode(l)}return s},yn=(n,e,t)=>{if(t===void 0&&(t=2147483647),t<2)return 0;t-=2;for(var r=e,a=t<n.length*2?t/2:n.length,s=0;s<a;++s){var u=n.charCodeAt(s);N[e>>1]=u,e+=2}return N[e>>1]=0,e-r},gn=n=>n.length*2,wn=(n,e)=>{for(var t=0,r="";!(t>=e/4);){var a=R[n+t*4>>2];if(a==0)break;if(++t,a>=65536){var s=a-65536;r+=String.fromCharCode(55296|s>>10,56320|s&1023)}else r+=String.fromCharCode(a)}return r},bn=(n,e,t)=>{if(t===void 0&&(t=2147483647),t<4)return 0;for(var r=e,a=r+t-4,s=0;s<n.length;++s){var u=n.charCodeAt(s);if(u>=55296&&u<=57343){var l=n.charCodeAt(++s);u=65536+((u&1023)<<10)|l&1023}if(R[e>>2]=u,e+=4,e+4>a)break}return R[e>>2]=0,e-r},$n=n=>{for(var e=0,t=0;t<n.length;++t){var r=n.charCodeAt(t);r>=55296&&r<=57343&&++t,e+=4}return e},_n=(n,e,t)=>{t=G(t);var r,a,s,u,l;e===2?(r=vn,a=yn,u=gn,s=()=>J,l=1):e===4&&(r=wn,a=bn,u=$n,s=()=>E,l=2),te(n,{name:t,fromWireType:d=>{for(var f=E[d>>2],m=s(),w,C=d+4,S=0;S<=f;++S){var j=d+4+S*e;if(S==f||m[j>>l]==0){var H=j-C,V=r(C,H);w===void 0?w=V:(w+=String.fromCharCode(0),w+=V),C=j+e}}return ae(d),w},toWireType:(d,f)=>{typeof f!="string"&&k(`Cannot pass non-string to C++ string type ${t}`);var m=u(f),w=vt(4+m+e);return E[w>>2]=m>>l,a(f,w+4,m+e),d!==null&&d.push(ae,w),w},argPackAdvance:re,readValueFromPointer:nt,destructorFunction(d){ae(d)}})},Cn=(n,e,t,r,a,s)=>{je[n]={name:G(e),rawConstructor:ee(t,r),rawDestructor:ee(a,s),fields:[]}},Tn=(n,e,t,r,a,s,u,l,d,f)=>{je[n].fields.push({fieldName:G(e),getterReturnType:t,getter:ee(r,a),getterContext:s,setterArgumentType:u,setter:ee(l,d),setterContext:f})},Pn=(n,e)=>{e=G(e),te(n,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(t,r)=>{}})},Sn={},En=n=>{var e=Sn[n];return e===void 0?G(n):e},Zt=()=>{if(typeof globalThis=="object")return globalThis;function n(e){e.$$$embind_global$$$=e;var t=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return t||delete e.$$$embind_global$$$,t}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&n(global)?$$$embind_global$$$=global:typeof self=="object"&&n(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},An=n=>n===0?ue.toHandle(Zt()):(n=En(n),ue.toHandle(Zt()[n])),On=n=>{n>4&&(K.get(n).refcount+=1)},kn=n=>{var e=new Array(n+1);return function(t,r,a){e[0]=t;for(var s=0;s<n;++s){var u=ft(E[r+s*4>>2],"parameter "+s);e[s+1]=u.readValueFromPointer(a),a+=u.argPackAdvance}var l=new(t.bind.apply(t,e));return ue.toHandle(l)}},Qt={},Dn=(n,e,t,r)=>{n=ue.toValue(n);var a=Qt[e];return a||(a=kn(e),Qt[e]=a),a(n,t,r)},jn=(n,e)=>{n=ft(n,"_emval_take_value");var t=n.readValueFromPointer(e);return ue.toHandle(t)},xn=()=>{pe("")},Mn=(n,e,t)=>D.copyWithin(n,e,e+t),Rn=()=>2147483648,Fn=n=>{var e=Y.buffer,t=(n-e.byteLength+65535)/65536;try{return Y.grow(t),ze(),1}catch{}},Wn=n=>{var e=D.length;n>>>=0;var t=Rn();if(n>t)return!1;for(var r=(d,f)=>d+(f-d%f)%f,a=1;a<=4;a*=2){var s=e*(1+.2/a);s=Math.min(s,n+100663296);var u=Math.min(t,r(Math.max(n,s),65536)),l=Fn(u);if(l)return!0}return!1},mt={},In=()=>$||"./this.program",Te=()=>{if(!Te.strings){var n=(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:n,_:In()};for(var t in mt)mt[t]===void 0?delete e[t]:e[t]=mt[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Te.strings=r}return Te.strings},Un=(n,e)=>{for(var t=0;t<n.length;++t)x[e++>>0]=n.charCodeAt(t);x[e>>0]=0},Hn=(n,e)=>{var t=0;return Te().forEach((r,a)=>{var s=e+t;E[n+a*4>>2]=s,Un(r,s),t+=r.length+1}),0},Vn=(n,e)=>{var t=Te();E[n>>2]=t.length;var r=0;return t.forEach(a=>r+=a.length+1),E[e>>2]=r,0},Ln=n=>n,He=n=>n%4===0&&(n%100!==0||n%400===0),zn=(n,e)=>{for(var t=0,r=0;r<=e;t+=n[r++]);return t},Kt=[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],Nn=(n,e)=>{for(var t=new Date(n.getTime());e>0;){var r=He(t.getFullYear()),a=t.getMonth(),s=(r?Kt:er)[a];if(e>s-t.getDate())e-=s-t.getDate()+1,t.setDate(1),a<11?t.setMonth(a+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1));else return t.setDate(t.getDate()+e),t}return t};function Bn(n,e,t){var r=t>0?t:qt(n)+1,a=new Array(r),s=Gt(n,a,0,a.length);return e&&(a.length=s),a}var Yn=(n,e)=>{x.set(n,e)},Gn=(n,e,t,r)=>{var a=E[r+40>>2],s={tm_sec:R[r>>2],tm_min:R[r+4>>2],tm_hour:R[r+8>>2],tm_mday:R[r+12>>2],tm_mon:R[r+16>>2],tm_year:R[r+20>>2],tm_wday:R[r+24>>2],tm_yday:R[r+28>>2],tm_isdst:R[r+32>>2],tm_gmtoff:R[r+36>>2],tm_zone:a?pt(a):""},u=pt(t),l={"%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 d in l)u=u.replace(new RegExp(d,"g"),l[d]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],m=["January","February","March","April","May","June","July","August","September","October","November","December"];function w(g,p,T){for(var z=typeof g=="number"?g.toString():g||"";z.length<p;)z=T[0]+z;return z}function C(g,p){return w(g,p,"0")}function S(g,p){function T(Q){return Q<0?-1:Q>0?1:0}var z;return(z=T(g.getFullYear()-p.getFullYear()))===0&&(z=T(g.getMonth()-p.getMonth()))===0&&(z=T(g.getDate()-p.getDate())),z}function j(g){switch(g.getDay()){case 0:return new Date(g.getFullYear()-1,11,29);case 1:return g;case 2:return new Date(g.getFullYear(),0,3);case 3:return new Date(g.getFullYear(),0,2);case 4:return new Date(g.getFullYear(),0,1);case 5:return new Date(g.getFullYear()-1,11,31);case 6:return new Date(g.getFullYear()-1,11,30)}}function H(g){var p=Nn(new Date(g.tm_year+1900,0,1),g.tm_yday),T=new Date(p.getFullYear(),0,4),z=new Date(p.getFullYear()+1,0,4),Q=j(T),ge=j(z);return S(Q,p)<=0?S(ge,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var V={"%a":g=>f[g.tm_wday].substring(0,3),"%A":g=>f[g.tm_wday],"%b":g=>m[g.tm_mon].substring(0,3),"%B":g=>m[g.tm_mon],"%C":g=>{var p=g.tm_year+1900;return C(p/100|0,2)},"%d":g=>C(g.tm_mday,2),"%e":g=>w(g.tm_mday,2," "),"%g":g=>H(g).toString().substring(2),"%G":g=>H(g),"%H":g=>C(g.tm_hour,2),"%I":g=>{var p=g.tm_hour;return p==0?p=12:p>12&&(p-=12),C(p,2)},"%j":g=>C(g.tm_mday+zn(He(g.tm_year+1900)?Kt:er,g.tm_mon-1),3),"%m":g=>C(g.tm_mon+1,2),"%M":g=>C(g.tm_min,2),"%n":()=>`
`,"%p":g=>g.tm_hour>=0&&g.tm_hour<12?"AM":"PM","%S":g=>C(g.tm_sec,2),"%t":()=>" ","%u":g=>g.tm_wday||7,"%U":g=>{var p=g.tm_yday+7-g.tm_wday;return C(Math.floor(p/7),2)},"%V":g=>{var p=Math.floor((g.tm_yday+7-(g.tm_wday+6)%7)/7);if((g.tm_wday+371-g.tm_yday-2)%7<=2&&p++,p){if(p==53){var T=(g.tm_wday+371-g.tm_yday)%7;T!=4&&(T!=3||!He(g.tm_year))&&(p=1)}}else{p=52;var z=(g.tm_wday+7-g.tm_yday-1)%7;(z==4||z==5&&He(g.tm_year%400-1))&&p++}return C(p,2)},"%w":g=>g.tm_wday,"%W":g=>{var p=g.tm_yday+7-(g.tm_wday+6)%7;return C(Math.floor(p/7),2)},"%y":g=>(g.tm_year+1900).toString().substring(2),"%Y":g=>g.tm_year+1900,"%z":g=>{var p=g.tm_gmtoff,T=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(T?"+":"-")+("0000"+p).slice(-4)},"%Z":g=>g.tm_zone,"%%":()=>"%"};u=u.replace(/%%/g,"\0\0");for(var d in V)u.includes(d)&&(u=u.replace(new RegExp(d,"g"),V[d](s)));u=u.replace(/\0\0/g,"%");var L=Bn(u,!1);return L.length>e?0:(Yn(L,n),L.length-1)},qn=(n,e,t,r,a)=>Gn(n,e,t,r);Dt=o.InternalError=class extends Error{constructor(n){super(n),this.name="InternalError"}},Sr(),ve=o.BindingError=class extends Error{constructor(n){super(n),this.name="BindingError"}},Ir(),Mr(),Br(),Lt=o.UnboundTypeError=Jr(Error,"UnboundTypeError"),Kr(),tn();var Jn={s:mr,v:vr,b:gr,g:wr,q:br,I:$r,f:_r,T:Cr,d:yr,ba:Tr,P:Pr,Y:Ar,aa:Xr,$:Zr,w:Qr,X:rn,x:an,h:on,K:un,L:cn,t:dn,n:fn,J:mn,C:_n,A:Cn,ca:Tn,Z:Pn,ea:Yt,da:An,M:On,V:Dn,_:jn,B:xn,W:Mn,U:Wn,R:Hn,S:Vn,D:la,E:ca,m:da,a:Xn,e:ea,o:na,k:Kn,G:sa,u:oa,F:ua,z:ha,O:ma,l:ta,j:ra,c:Qn,p:Zn,H:ia,r:fa,i:aa,y:pa,N:Ln,Q:qn},F=pr(),ae=o._free=n=>(ae=o._free=F.ha)(n),vt=o._malloc=n=>(vt=o._malloc=F.ia)(n),tr=n=>(tr=F.ka)(n);o.__embind_initialize_bindings=()=>(o.__embind_initialize_bindings=F.la)();var M=(n,e)=>(M=F.ma)(n,e),Pe=n=>(Pe=F.na)(n),I=()=>(I=F.oa)(),U=n=>(U=F.pa)(n),rr=n=>(rr=F.qa)(n),nr=n=>(nr=F.ra)(n),ar=(n,e,t)=>(ar=F.sa)(n,e,t),or=n=>(or=F.ta)(n);o.dynCall_viijii=(n,e,t,r,a,s,u)=>(o.dynCall_viijii=F.ua)(n,e,t,r,a,s,u);var ir=o.dynCall_jiiii=(n,e,t,r,a)=>(ir=o.dynCall_jiiii=F.va)(n,e,t,r,a);o.dynCall_iiiiij=(n,e,t,r,a,s,u)=>(o.dynCall_iiiiij=F.wa)(n,e,t,r,a,s,u),o.dynCall_iiiiijj=(n,e,t,r,a,s,u,l,d)=>(o.dynCall_iiiiijj=F.xa)(n,e,t,r,a,s,u,l,d),o.dynCall_iiiiiijj=(n,e,t,r,a,s,u,l,d,f)=>(o.dynCall_iiiiiijj=F.ya)(n,e,t,r,a,s,u,l,d,f);function Xn(n,e){var t=I();try{return W(n)(e)}catch(r){if(U(t),r!==r+0)throw r;M(1,0)}}function Zn(n,e,t,r){var a=I();try{W(n)(e,t,r)}catch(s){if(U(a),s!==s+0)throw s;M(1,0)}}function Qn(n,e,t){var r=I();try{W(n)(e,t)}catch(a){if(U(r),a!==a+0)throw a;M(1,0)}}function Kn(n,e,t,r,a){var s=I();try{return W(n)(e,t,r,a)}catch(u){if(U(s),u!==u+0)throw u;M(1,0)}}function ea(n,e,t){var r=I();try{return W(n)(e,t)}catch(a){if(U(r),a!==a+0)throw a;M(1,0)}}function ta(n){var e=I();try{W(n)()}catch(t){if(U(e),t!==t+0)throw t;M(1,0)}}function ra(n,e){var t=I();try{W(n)(e)}catch(r){if(U(t),r!==r+0)throw r;M(1,0)}}function na(n,e,t,r){var a=I();try{return W(n)(e,t,r)}catch(s){if(U(a),s!==s+0)throw s;M(1,0)}}function aa(n,e,t,r,a,s,u,l,d,f,m){var w=I();try{W(n)(e,t,r,a,s,u,l,d,f,m)}catch(C){if(U(w),C!==C+0)throw C;M(1,0)}}function oa(n,e,t,r,a,s,u){var l=I();try{return W(n)(e,t,r,a,s,u)}catch(d){if(U(l),d!==d+0)throw d;M(1,0)}}function ia(n,e,t,r,a){var s=I();try{W(n)(e,t,r,a)}catch(u){if(U(s),u!==u+0)throw u;M(1,0)}}function sa(n,e,t,r,a,s){var u=I();try{return W(n)(e,t,r,a,s)}catch(l){if(U(u),l!==l+0)throw l;M(1,0)}}function ua(n,e,t,r,a,s,u,l){var d=I();try{return W(n)(e,t,r,a,s,u,l)}catch(f){if(U(d),f!==f+0)throw f;M(1,0)}}function ca(n,e,t,r){var a=I();try{return W(n)(e,t,r)}catch(s){if(U(a),s!==s+0)throw s;M(1,0)}}function la(n,e,t,r){var a=I();try{return W(n)(e,t,r)}catch(s){if(U(a),s!==s+0)throw s;M(1,0)}}function da(n){var e=I();try{return W(n)()}catch(t){if(U(e),t!==t+0)throw t;M(1,0)}}function fa(n,e,t,r,a,s,u,l){var d=I();try{W(n)(e,t,r,a,s,u,l)}catch(f){if(U(d),f!==f+0)throw f;M(1,0)}}function ha(n,e,t,r,a,s,u,l,d,f,m,w){var C=I();try{return W(n)(e,t,r,a,s,u,l,d,f,m,w)}catch(S){if(U(C),S!==S+0)throw S;M(1,0)}}function pa(n,e,t,r,a,s,u,l,d,f,m,w,C,S,j,H){var V=I();try{W(n)(e,t,r,a,s,u,l,d,f,m,w,C,S,j,H)}catch(L){if(U(V),L!==L+0)throw L;M(1,0)}}function ma(n,e,t,r,a){var s=I();try{return ir(n,e,t,r,a)}catch(u){if(U(s),u!==u+0)throw u;M(1,0)}}var bt;ie=function n(){bt||yt(),bt||(ie=n)};function yt(){if(se>0||(Ct(),se>0))return;function n(){bt||(bt=!0,o.calledRun=!0,!X&&(Tt(),h(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),Pt()))}o.setStatus?(o.setStatus("Running..."),setTimeout(function(){setTimeout(function(){o.setStatus("")},1),n()},1)):n()}if(o.preInit)for(typeof o.preInit=="function"&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return yt(),c.ready}})();function ni(i){return Ta(Pa,i)}async function ai(i,c){return ti(Pa,i,c)}async function oi(i,c){return ri(Pa,i,c)}(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(c={}){var o=c,h,v;o.ready=new Promise((e,t)=>{h=e,v=t});var b=Object.assign({},o),$="./this.program",A=typeof window=="object",y=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var _="";function O(e){return o.locateFile?o.locateFile(e,_):_+e}var P;(A||y)&&(y?_=self.location.href:typeof document<"u"&&document.currentScript&&(_=document.currentScript.src),i&&(_=i),_.indexOf("blob:")!==0?_=_.substr(0,_.replace(/[?#].*/,"").lastIndexOf("/")+1):_="",y&&(P=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),o.print||console.log.bind(console);var B=o.printErr||console.error.bind(console);Object.assign(o,b),b=null,o.arguments&&o.arguments,o.thisProgram&&($=o.thisProgram),o.quit&&o.quit;var q;o.wasmBinary&&(q=o.wasmBinary),typeof WebAssembly!="object"&&pe("no native wasm support detected");var Y,X=!1;function oe(e,t){e||pe(t)}var x,D,N,J,R,E,we,Oe;function ze(){var e=Y.buffer;o.HEAP8=x=new Int8Array(e),o.HEAP16=N=new Int16Array(e),o.HEAPU8=D=new Uint8Array(e),o.HEAPU16=J=new Uint16Array(e),o.HEAP32=R=new Int32Array(e),o.HEAPU32=E=new Uint32Array(e),o.HEAPF32=we=new Float32Array(e),o.HEAPF64=Oe=new Float64Array(e)}var Ne=[],Be=[],Xe=[];function Ct(){if(o.preRun)for(typeof o.preRun=="function"&&(o.preRun=[o.preRun]);o.preRun.length;)Ze(o.preRun.shift());et(Ne)}function Tt(){et(Be)}function Pt(){if(o.postRun)for(typeof o.postRun=="function"&&(o.postRun=[o.postRun]);o.postRun.length;)St(o.postRun.shift());et(Xe)}function Ze(e){Ne.unshift(e)}function wt(e){Be.unshift(e)}function St(e){Xe.unshift(e)}var se=0,ie=null;function ye(e){se++,o.monitorRunDependencies&&o.monitorRunDependencies(se)}function Et(e){if(se--,o.monitorRunDependencies&&o.monitorRunDependencies(se),se==0&&ie){var t=ie;ie=null,t()}}function pe(e){o.onAbort&&o.onAbort(e),e="Aborted("+e+")",B(e),X=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw v(t),t}var At="data:application/octet-stream;base64,",Qe=e=>e.startsWith(At),ce;ce="zxing_full.wasm",Qe(ce)||(ce=O(ce));function Ke(e){if(e==ce&&q)return new Uint8Array(q);if(P)return P(e);throw"both async and sync fetching of the wasm failed"}function fr(e){return!q&&(A||y)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(()=>Ke(e)):Promise.resolve().then(()=>Ke(e))}function Ot(e,t,r){return fr(e).then(a=>WebAssembly.instantiate(a,t)).then(a=>a).then(r,a=>{B(`failed to asynchronously prepare wasm: ${a}`),pe(a)})}function hr(e,t,r,a){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!Qe(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(s=>{var u=WebAssembly.instantiateStreaming(s,r);return u.then(a,function(l){return B(`wasm streaming compile failed: ${l}`),B("falling back to ArrayBuffer instantiation"),Ot(t,r,a)})}):Ot(t,r,a)}function pr(){var e={a:Jn};function t(a,s){return F=a.exports,Y=F.ga,ze(),Vt=F.ka,wt(F.ha),Et(),F}ye();function r(a){t(a.instance)}if(o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(a){B(`Module.instantiateWasm callback failed with error: ${a}`),v(a)}return hr(q,ce,e,r).catch(v),{}}var et=e=>{for(;e.length>0;)e.shift()(o)};o.noExitRuntime;var ke=[],De=0,mr=e=>{var t=new tt(e);return t.get_caught()||(t.set_caught(!0),De--),t.set_rethrown(!1),ke.push(t),nr(t.excPtr),t.get_exception_ptr()},ne=0,vr=()=>{M(0,0);var e=ke.pop();rr(e.excPtr),ne=0};function tt(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){E[this.ptr+4>>2]=t},this.get_type=function(){return E[this.ptr+4>>2]},this.set_destructor=function(t){E[this.ptr+8>>2]=t},this.get_destructor=function(){return E[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,x[this.ptr+12>>0]=t},this.get_caught=function(){return x[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,x[this.ptr+13>>0]=t},this.get_rethrown=function(){return x[this.ptr+13>>0]!=0},this.init=function(t,r){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(r)},this.set_adjusted_ptr=function(t){E[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return E[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=or(this.get_type());if(t)return E[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var yr=e=>{throw ne||(ne=e),ne},rt=e=>{var t=ne;if(!t)return Pe(0),0;var r=new tt(t);r.set_adjusted_ptr(t);var a=r.get_type();if(!a)return Pe(0),t;for(var s in e){var u=e[s];if(u===0||u===a)break;var l=r.ptr+16;if(ar(u,a,l))return Pe(u),t}return Pe(a),t},gr=()=>rt([]),wr=e=>rt([e]),br=(e,t)=>rt([e,t]),$r=()=>{var e=ke.pop();e||pe("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(ke.push(e),e.set_rethrown(!0),e.set_caught(!1),De++),ne=t,ne},_r=(e,t,r)=>{var a=new tt(e);throw a.init(t,r),ne=e,De++,ne},Cr=()=>De,je={},kt=e=>{for(;e.length;){var t=e.pop(),r=e.pop();r(t)}};function nt(e){return this.fromWireType(R[e>>2])}var me={},le={},xe={},Dt,Me=e=>{throw new Dt(e)},de=(e,t,r)=>{e.forEach(function(d){xe[d]=t});function a(d){var f=r(d);f.length!==e.length&&Me("Mismatched type converter count");for(var m=0;m<e.length;++m)te(e[m],f[m])}var s=new Array(t.length),u=[],l=0;t.forEach((d,f)=>{le.hasOwnProperty(d)?s[f]=le[d]:(u.push(d),me.hasOwnProperty(d)||(me[d]=[]),me[d].push(()=>{s[f]=le[d],++l,l===u.length&&a(s)}))}),u.length===0&&a(s)},Tr=e=>{var t=je[e];delete je[e];var r=t.rawConstructor,a=t.rawDestructor,s=t.fields,u=s.map(l=>l.getterReturnType).concat(s.map(l=>l.setterArgumentType));de([e],u,l=>{var d={};return s.forEach((f,m)=>{var w=f.fieldName,C=l[m],S=f.getter,j=f.getterContext,H=l[m+s.length],V=f.setter,L=f.setterContext;d[w]={read:g=>C.fromWireType(S(j,g)),write:(g,p)=>{var T=[];V(L,g,H.toWireType(T,p)),kt(T)}}}),[{name:t.name,fromWireType:f=>{var m={};for(var w in d)m[w]=d[w].read(f);return a(f),m},toWireType:(f,m)=>{for(var w in d)if(!(w in m))throw new TypeError(`Missing field: "${w}"`);var C=r();for(w in d)d[w].write(C,m[w]);return f!==null&&f.push(a,C),C},argPackAdvance:re,readValueFromPointer:nt,destructorFunction:a}]})},Pr=(e,t,r,a,s)=>{},Sr=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);jt=e},jt,G=e=>{for(var t="",r=e;D[r];)t+=jt[D[r++]];return t},ve,k=e=>{throw new ve(e)};function Er(e,t,r={}){var a=t.name;if(e||k(`type "${a}" must have a positive integer typeid pointer`),le.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;k(`Cannot register type '${a}' twice`)}if(le[e]=t,delete xe[e],me.hasOwnProperty(e)){var s=me[e];delete me[e],s.forEach(u=>u())}}function te(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Er(e,t,r)}var re=8,Ar=(e,t,r,a)=>{t=G(t),te(e,{name:t,fromWireType:function(s){return!!s},toWireType:function(s,u){return u?r:a},argPackAdvance:re,readValueFromPointer:function(s){return this.fromWireType(D[s])},destructorFunction:null})},Or=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),at=e=>{function t(r){return r.$$.ptrType.registeredClass.name}k(t(e)+" instance already deleted")},ot=!1,xt=e=>{},kr=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Mt=e=>{e.count.value-=1;var t=e.count.value===0;t&&kr(e)},Rt=(e,t,r)=>{if(t===r)return e;if(r.baseClass===void 0)return null;var a=Rt(e,t,r.baseClass);return a===null?null:r.downcast(a)},Ft={},Dr=()=>Object.keys(_e).length,jr=()=>{var e=[];for(var t in _e)_e.hasOwnProperty(t)&&e.push(_e[t]);return e},be=[],it=()=>{for(;be.length;){var e=be.pop();e.$$.deleteScheduled=!1,e.delete()}},$e,xr=e=>{$e=e,be.length&&$e&&$e(it)},Mr=()=>{o.getInheritedInstanceCount=Dr,o.getLiveInheritedInstances=jr,o.flushPendingDeletes=it,o.setDelayFunction=xr},_e={},Rr=(e,t)=>{for(t===void 0&&k("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},Fr=(e,t)=>(t=Rr(e,t),_e[t]),Re=(e,t)=>{(!t.ptrType||!t.ptr)&&Me("makeClassHandle requires ptr and ptrType");var r=!!t.smartPtrType,a=!!t.smartPtr;return r!==a&&Me("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Ce(Object.create(e,{$$:{value:t}}))};function Wr(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Fr(this.registeredClass,t);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var a=r.clone();return this.destructor(e),a}function s(){return this.isSmartPointer?Re(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Re(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var u=this.registeredClass.getActualType(t),l=Ft[u];if(!l)return s.call(this);var d;this.isConst?d=l.constPointerType:d=l.pointerType;var f=Rt(t,this.registeredClass,d.registeredClass);return f===null?s.call(this):this.isSmartPointer?Re(d.registeredClass.instancePrototype,{ptrType:d,ptr:f,smartPtrType:this,smartPtr:e}):Re(d.registeredClass.instancePrototype,{ptrType:d,ptr:f})}var Ce=e=>typeof FinalizationRegistry>"u"?(Ce=t=>t,e):(ot=new FinalizationRegistry(t=>{Mt(t.$$)}),Ce=t=>{var r=t.$$,a=!!r.smartPtr;if(a){var s={$$:r};ot.register(t,s,t)}return t},xt=t=>ot.unregister(t),Ce(e)),Ir=()=>{Object.assign(Fe.prototype,{isAliasOf(e){if(!(this instanceof Fe)||!(e instanceof Fe))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var a=e.$$.ptrType.registeredClass,s=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;a.baseClass;)s=a.upcast(s),a=a.baseClass;return t===a&&r===s},clone(){if(this.$$.ptr||at(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Ce(Object.create(Object.getPrototypeOf(this),{$$:{value:Or(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||at(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&k("Object already scheduled for deletion"),xt(this),Mt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||at(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&k("Object already scheduled for deletion"),be.push(this),be.length===1&&$e&&$e(it),this.$$.deleteScheduled=!0,this}})};function Fe(){}var Ur=48,Hr=57,Wt=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=Ur&&t<=Hr?`_${e}`:e};function st(e,t){return e=Wt(e),{[e]:function(){return t.apply(this,arguments)}}[e]}var It=(e,t,r)=>{if(e[t].overloadTable===void 0){var a=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||k(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[a.argCount]=a}},ut=(e,t,r)=>{o.hasOwnProperty(e)?((r===void 0||o[e].overloadTable!==void 0&&o[e].overloadTable[r]!==void 0)&&k(`Cannot register public name '${e}' twice`),It(o,e,e),o.hasOwnProperty(r)&&k(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),o[e].overloadTable[r]=t):(o[e]=t,r!==void 0&&(o[e].numArguments=r))};function Vr(e,t,r,a,s,u,l,d){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=a,this.baseClass=s,this.getActualType=u,this.upcast=l,this.downcast=d,this.pureVirtualFunctions=[]}var ct=(e,t,r)=>{for(;t!==r;)t.upcast||k(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Lr(e,t){if(t===null)return this.isReference&&k(`null is not a valid ${this.name}`),0;t.$$||k(`Cannot pass "${ht(t)}" as a ${this.name}`),t.$$.ptr||k(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass,a=ct(t.$$.ptr,r,this.registeredClass);return a}function zr(e,t){var r;if(t===null)return this.isReference&&k(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,r),r):0;t.$$||k(`Cannot pass "${ht(t)}" as a ${this.name}`),t.$$.ptr||k(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&k(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var a=t.$$.ptrType.registeredClass;if(r=ct(t.$$.ptr,a,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&k("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:k(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var s=t.clone();r=this.rawShare(r,ue.toHandle(()=>s.delete())),e!==null&&e.push(this.rawDestructor,r)}break;default:k("Unsupporting sharing policy")}return r}function Nr(e,t){if(t===null)return this.isReference&&k(`null is not a valid ${this.name}`),0;t.$$||k(`Cannot pass "${ht(t)}" as a ${this.name}`),t.$$.ptr||k(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&k(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass,a=ct(t.$$.ptr,r,this.registeredClass);return a}function Ut(e){return this.fromWireType(E[e>>2])}var Br=()=>{Object.assign(We.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:re,readValueFromPointer:Ut,deleteObject(e){e!==null&&e.delete()},fromWireType:Wr})};function We(e,t,r,a,s,u,l,d,f,m,w){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=a,this.isSmartPointer=s,this.pointeeType=u,this.sharingPolicy=l,this.rawGetPointee=d,this.rawConstructor=f,this.rawShare=m,this.rawDestructor=w,!s&&t.baseClass===void 0?a?(this.toWireType=Lr,this.destructorFunction=null):(this.toWireType=Nr,this.destructorFunction=null):this.toWireType=zr}var Ht=(e,t,r)=>{o.hasOwnProperty(e)||Me("Replacing nonexistant public symbol"),o[e].overloadTable!==void 0&&r!==void 0?o[e].overloadTable[r]=t:(o[e]=t,o[e].argCount=r)},Yr=(e,t,r)=>{var a=o["dynCall_"+e];return r&&r.length?a.apply(null,[t].concat(r)):a.call(null,t)},Ie=[],Vt,W=e=>{var t=Ie[e];return t||(e>=Ie.length&&(Ie.length=e+1),Ie[e]=t=Vt.get(e)),t},Gr=(e,t,r)=>{if(e.includes("j"))return Yr(e,t,r);var a=W(t).apply(null,r);return a},qr=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Gr(e,t,r)}},ee=(e,t)=>{e=G(e);function r(){return e.includes("j")?qr(e,t):W(t)}var a=r();return typeof a!="function"&&k(`unknown function pointer with signature ${e}: ${t}`),a},Jr=(e,t)=>{var r=st(t,function(a){this.name=t,this.message=a;var s=new Error(a).stack;s!==void 0&&(this.stack=this.toString()+`
`+s.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Lt,zt=e=>{var t=tr(e),r=G(t);return ae(t),r},Ue=(e,t)=>{var r=[],a={};function s(u){if(!a[u]&&!le[u]){if(xe[u]){xe[u].forEach(s);return}r.push(u),a[u]=!0}}throw t.forEach(s),new Lt(`${e}: `+r.map(zt).join([", "]))},Xr=(e,t,r,a,s,u,l,d,f,m,w,C,S)=>{w=G(w),u=ee(s,u),d&&(d=ee(l,d)),m&&(m=ee(f,m)),S=ee(C,S);var j=Wt(w);ut(j,function(){Ue(`Cannot construct ${w} due to unbound types`,[a])}),de([e,t,r],a?[a]:[],function(H){H=H[0];var V,L;a?(V=H.registeredClass,L=V.instancePrototype):L=Fe.prototype;var g=st(j,function(){if(Object.getPrototypeOf(this)!==p)throw new ve("Use 'new' to construct "+w);if(T.constructor_body===void 0)throw new ve(w+" has no accessible constructor");var ur=T.constructor_body[arguments.length];if(ur===void 0)throw new ve(`Tried to invoke ctor of ${w} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(T.constructor_body).toString()}) parameters instead!`);return ur.apply(this,arguments)}),p=Object.create(L,{constructor:{value:g}});g.prototype=p;var T=new Vr(w,g,p,S,V,u,d,m);T.baseClass&&(T.baseClass.__derivedClasses===void 0&&(T.baseClass.__derivedClasses=[]),T.baseClass.__derivedClasses.push(T));var z=new We(w,T,!0,!1,!1),Q=new We(w+"*",T,!1,!1,!1),ge=new We(w+" const*",T,!1,!0,!1);return Ft[e]={pointerType:Q,constPointerType:ge},Ht(j,g),[z,Q,ge]})},lt=(e,t)=>{for(var r=[],a=0;a<e;a++)r.push(E[t+a*4>>2]);return r};function dt(e,t,r,a,s,u){var l=t.length;l<2&&k("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var d=t[1]!==null&&r!==null,f=!1,m=1;m<t.length;++m)if(t[m]!==null&&t[m].destructorFunction===void 0){f=!0;break}var w=t[0].name!=="void",C=l-2,S=new Array(C),j=[],H=[];return function(){arguments.length!==C&&k(`function ${e} called with ${arguments.length} arguments, expected ${C}`),H.length=0;var V;j.length=d?2:1,j[0]=s,d&&(V=t[1].toWireType(H,this),j[1]=V);for(var L=0;L<C;++L)S[L]=t[L+2].toWireType(H,arguments[L]),j.push(S[L]);var g=a.apply(null,j);function p(T){if(f)kt(H);else for(var z=d?1:2;z<t.length;z++){var Q=z===1?V:S[z-2];t[z].destructorFunction!==null&&t[z].destructorFunction(Q)}if(w)return t[0].fromWireType(T)}return p(g)}}var Zr=(e,t,r,a,s,u)=>{var l=lt(t,r);s=ee(a,s),de([],[e],function(d){d=d[0];var f=`constructor ${d.name}`;if(d.registeredClass.constructor_body===void 0&&(d.registeredClass.constructor_body=[]),d.registeredClass.constructor_body[t-1]!==void 0)throw new ve(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${d.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return d.registeredClass.constructor_body[t-1]=()=>{Ue(`Cannot construct ${d.name} due to unbound types`,l)},de([],l,m=>(m.splice(1,0,null),d.registeredClass.constructor_body[t-1]=dt(f,m,null,s,u),[])),[]})},Nt=e=>{e=e.trim();const t=e.indexOf("(");return t!==-1?(oe(e[e.length-1]==")","Parentheses for argument names should match."),e.substr(0,t)):e},Qr=(e,t,r,a,s,u,l,d,f)=>{var m=lt(r,a);t=G(t),t=Nt(t),u=ee(s,u),de([],[e],function(w){w=w[0];var C=`${w.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),d&&w.registeredClass.pureVirtualFunctions.push(t);function S(){Ue(`Cannot call ${C} due to unbound types`,m)}var j=w.registeredClass.instancePrototype,H=j[t];return H===void 0||H.overloadTable===void 0&&H.className!==w.name&&H.argCount===r-2?(S.argCount=r-2,S.className=w.name,j[t]=S):(It(j,t,C),j[t].overloadTable[r-2]=S),de([],m,function(V){var L=dt(C,V,w,u,l);return j[t].overloadTable===void 0?(L.argCount=r-2,j[t]=L):j[t].overloadTable[r-2]=L,[]}),[]})};function Kr(){Object.assign(Bt.prototype,{get(e){return this.allocated[e]},has(e){return this.allocated[e]!==void 0},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Bt(){this.allocated=[void 0],this.freelist=[]}var K=new Bt,Yt=e=>{e>=K.reserved&&--K.get(e).refcount===0&&K.free(e)},en=()=>{for(var e=0,t=K.reserved;t<K.allocated.length;++t)K.allocated[t]!==void 0&&++e;return e},tn=()=>{K.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),K.reserved=K.allocated.length,o.count_emval_handles=en},ue={toValue:e=>(e||k("Cannot use deleted val. handle = "+e),K.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return K.allocate({refcount:1,value:e})}}},rn=(e,t)=>{t=G(t),te(e,{name:t,fromWireType:r=>{var a=ue.toValue(r);return Yt(r),a},toWireType:(r,a)=>ue.toHandle(a),argPackAdvance:re,readValueFromPointer:nt,destructorFunction:null})},nn=(e,t,r)=>{switch(t){case 1:return r?function(a){return this.fromWireType(x[a>>0])}:function(a){return this.fromWireType(D[a>>0])};case 2:return r?function(a){return this.fromWireType(N[a>>1])}:function(a){return this.fromWireType(J[a>>1])};case 4:return r?function(a){return this.fromWireType(R[a>>2])}:function(a){return this.fromWireType(E[a>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},an=(e,t,r,a)=>{t=G(t);function s(){}s.values={},te(e,{name:t,constructor:s,fromWireType:function(u){return this.constructor.values[u]},toWireType:(u,l)=>l.value,argPackAdvance:re,readValueFromPointer:nn(t,r,a),destructorFunction:null}),ut(t,s)},ft=(e,t)=>{var r=le[e];return r===void 0&&k(t+" has unknown type "+zt(e)),r},on=(e,t,r)=>{var a=ft(e,"enum");t=G(t);var s=a.constructor,u=Object.create(a.constructor.prototype,{value:{value:r},constructor:{value:st(`${a.name}_${t}`,function(){})}});s.values[r]=u,s[t]=u},ht=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},sn=(e,t)=>{switch(t){case 4:return function(r){return this.fromWireType(we[r>>2])};case 8:return function(r){return this.fromWireType(Oe[r>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},un=(e,t,r)=>{t=G(t),te(e,{name:t,fromWireType:a=>a,toWireType:(a,s)=>s,argPackAdvance:re,readValueFromPointer:sn(t,r),destructorFunction:null})},cn=(e,t,r,a,s,u,l)=>{var d=lt(t,r);e=G(e),e=Nt(e),s=ee(a,s),ut(e,function(){Ue(`Cannot call ${e} due to unbound types`,d)},t-1),de([],d,function(f){var m=[f[0],null].concat(f.slice(1));return Ht(e,dt(e,m,null,s,u),t-1),[]})},ln=(e,t,r)=>{switch(t){case 1:return r?a=>x[a>>0]:a=>D[a>>0];case 2:return r?a=>N[a>>1]:a=>J[a>>1];case 4:return r?a=>R[a>>2]:a=>E[a>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},dn=(e,t,r,a,s)=>{t=G(t);var u=w=>w;if(a===0){var l=32-8*r;u=w=>w<<l>>>l}var d=t.includes("unsigned"),f=(w,C)=>{},m;d?m=function(w,C){return f(C,this.name),C>>>0}:m=function(w,C){return f(C,this.name),C},te(e,{name:t,fromWireType:u,toWireType:m,argPackAdvance:re,readValueFromPointer:ln(t,r,a!==0),destructorFunction:null})},fn=(e,t,r)=>{var a=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],s=a[t];function u(l){var d=E[l>>2],f=E[l+4>>2];return new s(x.buffer,f,d)}r=G(r),te(e,{name:r,fromWireType:u,argPackAdvance:re,readValueFromPointer:u},{ignoreDuplicateRegistrations:!0})},Gt=(e,t,r,a)=>{if(!(a>0))return 0;for(var s=r,u=r+a-1,l=0;l<e.length;++l){var d=e.charCodeAt(l);if(d>=55296&&d<=57343){var f=e.charCodeAt(++l);d=65536+((d&1023)<<10)|f&1023}if(d<=127){if(r>=u)break;t[r++]=d}else if(d<=2047){if(r+1>=u)break;t[r++]=192|d>>6,t[r++]=128|d&63}else if(d<=65535){if(r+2>=u)break;t[r++]=224|d>>12,t[r++]=128|d>>6&63,t[r++]=128|d&63}else{if(r+3>=u)break;t[r++]=240|d>>18,t[r++]=128|d>>12&63,t[r++]=128|d>>6&63,t[r++]=128|d&63}}return t[r]=0,r-s},hn=(e,t,r)=>Gt(e,D,t,r),qt=e=>{for(var t=0,r=0;r<e.length;++r){var a=e.charCodeAt(r);a<=127?t++:a<=2047?t+=2:a>=55296&&a<=57343?(t+=4,++r):t+=3}return t},Jt=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,pn=(e,t,r)=>{for(var a=t+r,s=t;e[s]&&!(s>=a);)++s;if(s-t>16&&e.buffer&&Jt)return Jt.decode(e.subarray(t,s));for(var u="";t<s;){var l=e[t++];if(!(l&128)){u+=String.fromCharCode(l);continue}var d=e[t++]&63;if((l&224)==192){u+=String.fromCharCode((l&31)<<6|d);continue}var f=e[t++]&63;if((l&240)==224?l=(l&15)<<12|d<<6|f:l=(l&7)<<18|d<<12|f<<6|e[t++]&63,l<65536)u+=String.fromCharCode(l);else{var m=l-65536;u+=String.fromCharCode(55296|m>>10,56320|m&1023)}}return u},pt=(e,t)=>e?pn(D,e,t):"",mn=(e,t)=>{t=G(t);var r=t==="std::string";te(e,{name:t,fromWireType(a){var s=E[a>>2],u=a+4,l;if(r)for(var d=u,f=0;f<=s;++f){var m=u+f;if(f==s||D[m]==0){var w=m-d,C=pt(d,w);l===void 0?l=C:(l+=String.fromCharCode(0),l+=C),d=m+1}}else{for(var S=new Array(s),f=0;f<s;++f)S[f]=String.fromCharCode(D[u+f]);l=S.join("")}return ae(a),l},toWireType(a,s){s instanceof ArrayBuffer&&(s=new Uint8Array(s));var u,l=typeof s=="string";l||s instanceof Uint8Array||s instanceof Uint8ClampedArray||s instanceof Int8Array||k("Cannot pass non-string to std::string"),r&&l?u=qt(s):u=s.length;var d=vt(4+u+1),f=d+4;if(E[d>>2]=u,r&&l)hn(s,f,u+1);else if(l)for(var m=0;m<u;++m){var w=s.charCodeAt(m);w>255&&(ae(f),k("String has UTF-16 code units that do not fit in 8 bits")),D[f+m]=w}else for(var m=0;m<u;++m)D[f+m]=s[m];return a!==null&&a.push(ae,d),d},argPackAdvance:re,readValueFromPointer:Ut,destructorFunction(a){ae(a)}})},Xt=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,vn=(e,t)=>{for(var r=e,a=r>>1,s=a+t/2;!(a>=s)&&J[a];)++a;if(r=a<<1,r-e>32&&Xt)return Xt.decode(D.subarray(e,r));for(var u="",l=0;!(l>=t/2);++l){var d=N[e+l*2>>1];if(d==0)break;u+=String.fromCharCode(d)}return u},yn=(e,t,r)=>{if(r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var a=t,s=r<e.length*2?r/2:e.length,u=0;u<s;++u){var l=e.charCodeAt(u);N[t>>1]=l,t+=2}return N[t>>1]=0,t-a},gn=e=>e.length*2,wn=(e,t)=>{for(var r=0,a="";!(r>=t/4);){var s=R[e+r*4>>2];if(s==0)break;if(++r,s>=65536){var u=s-65536;a+=String.fromCharCode(55296|u>>10,56320|u&1023)}else a+=String.fromCharCode(s)}return a},bn=(e,t,r)=>{if(r===void 0&&(r=2147483647),r<4)return 0;for(var a=t,s=a+r-4,u=0;u<e.length;++u){var l=e.charCodeAt(u);if(l>=55296&&l<=57343){var d=e.charCodeAt(++u);l=65536+((l&1023)<<10)|d&1023}if(R[t>>2]=l,t+=4,t+4>s)break}return R[t>>2]=0,t-a},$n=e=>{for(var t=0,r=0;r<e.length;++r){var a=e.charCodeAt(r);a>=55296&&a<=57343&&++r,t+=4}return t},_n=(e,t,r)=>{r=G(r);var a,s,u,l,d;t===2?(a=vn,s=yn,l=gn,u=()=>J,d=1):t===4&&(a=wn,s=bn,l=$n,u=()=>E,d=2),te(e,{name:r,fromWireType:f=>{for(var m=E[f>>2],w=u(),C,S=f+4,j=0;j<=m;++j){var H=f+4+j*t;if(j==m||w[H>>d]==0){var V=H-S,L=a(S,V);C===void 0?C=L:(C+=String.fromCharCode(0),C+=L),S=H+t}}return ae(f),C},toWireType:(f,m)=>{typeof m!="string"&&k(`Cannot pass non-string to C++ string type ${r}`);var w=l(m),C=vt(4+w+t);return E[C>>2]=w>>d,s(m,C+4,w+t),f!==null&&f.push(ae,C),C},argPackAdvance:re,readValueFromPointer:nt,destructorFunction(f){ae(f)}})},Cn=(e,t,r,a,s,u)=>{je[e]={name:G(t),rawConstructor:ee(r,a),rawDestructor:ee(s,u),fields:[]}},Tn=(e,t,r,a,s,u,l,d,f,m)=>{je[e].fields.push({fieldName:G(t),getterReturnType:r,getter:ee(a,s),getterContext:u,setterArgumentType:l,setter:ee(d,f),setterContext:m})},Pn=(e,t)=>{t=G(t),te(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,a)=>{}})},Sn={},En=e=>{var t=Sn[e];return t===void 0?G(e):t},Zt=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var r=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return r||delete t.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},An=e=>e===0?ue.toHandle(Zt()):(e=En(e),ue.toHandle(Zt()[e])),On=e=>{e>4&&(K.get(e).refcount+=1)},kn=e=>{var t=new Array(e+1);return function(r,a,s){t[0]=r;for(var u=0;u<e;++u){var l=ft(E[a+u*4>>2],"parameter "+u);t[u+1]=l.readValueFromPointer(s),s+=l.argPackAdvance}var d=new(r.bind.apply(r,t));return ue.toHandle(d)}},Qt={},Dn=(e,t,r,a)=>{e=ue.toValue(e);var s=Qt[t];return s||(s=kn(t),Qt[t]=s),s(e,r,a)},jn=(e,t)=>{e=ft(e,"_emval_take_value");var r=e.readValueFromPointer(t);return ue.toHandle(r)},xn=()=>{pe("")},Mn=(e,t,r)=>D.copyWithin(e,t,t+r),Rn=()=>2147483648,Fn=e=>{var t=Y.buffer,r=(e-t.byteLength+65535)/65536;try{return Y.grow(r),ze(),1}catch{}},Wn=e=>{var t=D.length;e>>>=0;var r=Rn();if(e>r)return!1;for(var a=(f,m)=>f+(m-f%m)%m,s=1;s<=4;s*=2){var u=t*(1+.2/s);u=Math.min(u,e+100663296);var l=Math.min(r,a(Math.max(e,u),65536)),d=Fn(l);if(d)return!0}return!1},mt={},In=()=>$||"./this.program",Te=()=>{if(!Te.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:In()};for(var r in mt)mt[r]===void 0?delete t[r]:t[r]=mt[r];var a=[];for(var r in t)a.push(`${r}=${t[r]}`);Te.strings=a}return Te.strings},Un=(e,t)=>{for(var r=0;r<e.length;++r)x[t++>>0]=e.charCodeAt(r);x[t>>0]=0},Hn=(e,t)=>{var r=0;return Te().forEach((a,s)=>{var u=t+r;E[e+s*4>>2]=u,Un(a,u),r+=a.length+1}),0},Vn=(e,t)=>{var r=Te();E[e>>2]=r.length;var a=0;return r.forEach(s=>a+=s.length+1),E[t>>2]=a,0},Ln=e=>e,He=e=>e%4===0&&(e%100!==0||e%400===0),zn=(e,t)=>{for(var r=0,a=0;a<=t;r+=e[a++]);return r},Kt=[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],Nn=(e,t)=>{for(var r=new Date(e.getTime());t>0;){var a=He(r.getFullYear()),s=r.getMonth(),u=(a?Kt:er)[s];if(t>u-r.getDate())t-=u-r.getDate()+1,r.setDate(1),s<11?r.setMonth(s+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+t),r}return r};function Bn(e,t,r){var a=r>0?r:qt(e)+1,s=new Array(a),u=Gt(e,s,0,s.length);return t&&(s.length=u),s}var Yn=(e,t)=>{x.set(e,t)},Gn=(e,t,r,a)=>{var s=E[a+40>>2],u={tm_sec:R[a>>2],tm_min:R[a+4>>2],tm_hour:R[a+8>>2],tm_mday:R[a+12>>2],tm_mon:R[a+16>>2],tm_year:R[a+20>>2],tm_wday:R[a+24>>2],tm_yday:R[a+28>>2],tm_isdst:R[a+32>>2],tm_gmtoff:R[a+36>>2],tm_zone:s?pt(s):""},l=pt(r),d={"%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 f in d)l=l.replace(new RegExp(f,"g"),d[f]);var m=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],w=["January","February","March","April","May","June","July","August","September","October","November","December"];function C(p,T,z){for(var Q=typeof p=="number"?p.toString():p||"";Q.length<T;)Q=z[0]+Q;return Q}function S(p,T){return C(p,T,"0")}function j(p,T){function z(ge){return ge<0?-1:ge>0?1:0}var Q;return(Q=z(p.getFullYear()-T.getFullYear()))===0&&(Q=z(p.getMonth()-T.getMonth()))===0&&(Q=z(p.getDate()-T.getDate())),Q}function H(p){switch(p.getDay()){case 0:return new Date(p.getFullYear()-1,11,29);case 1:return p;case 2:return new Date(p.getFullYear(),0,3);case 3:return new Date(p.getFullYear(),0,2);case 4:return new Date(p.getFullYear(),0,1);case 5:return new Date(p.getFullYear()-1,11,31);case 6:return new Date(p.getFullYear()-1,11,30)}}function V(p){var T=Nn(new Date(p.tm_year+1900,0,1),p.tm_yday),z=new Date(T.getFullYear(),0,4),Q=new Date(T.getFullYear()+1,0,4),ge=H(z),ur=H(Q);return j(ge,T)<=0?j(ur,T)<=0?T.getFullYear()+1:T.getFullYear():T.getFullYear()-1}var L={"%a":p=>m[p.tm_wday].substring(0,3),"%A":p=>m[p.tm_wday],"%b":p=>w[p.tm_mon].substring(0,3),"%B":p=>w[p.tm_mon],"%C":p=>{var T=p.tm_year+1900;return S(T/100|0,2)},"%d":p=>S(p.tm_mday,2),"%e":p=>C(p.tm_mday,2," "),"%g":p=>V(p).toString().substring(2),"%G":p=>V(p),"%H":p=>S(p.tm_hour,2),"%I":p=>{var T=p.tm_hour;return T==0?T=12:T>12&&(T-=12),S(T,2)},"%j":p=>S(p.tm_mday+zn(He(p.tm_year+1900)?Kt:er,p.tm_mon-1),3),"%m":p=>S(p.tm_mon+1,2),"%M":p=>S(p.tm_min,2),"%n":()=>`
`,"%p":p=>p.tm_hour>=0&&p.tm_hour<12?"AM":"PM","%S":p=>S(p.tm_sec,2),"%t":()=>" ","%u":p=>p.tm_wday||7,"%U":p=>{var T=p.tm_yday+7-p.tm_wday;return S(Math.floor(T/7),2)},"%V":p=>{var T=Math.floor((p.tm_yday+7-(p.tm_wday+6)%7)/7);if((p.tm_wday+371-p.tm_yday-2)%7<=2&&T++,T){if(T==53){var z=(p.tm_wday+371-p.tm_yday)%7;z!=4&&(z!=3||!He(p.tm_year))&&(T=1)}}else{T=52;var Q=(p.tm_wday+7-p.tm_yday-1)%7;(Q==4||Q==5&&He(p.tm_year%400-1))&&T++}return S(T,2)},"%w":p=>p.tm_wday,"%W":p=>{var T=p.tm_yday+7-(p.tm_wday+6)%7;return S(Math.floor(T/7),2)},"%y":p=>(p.tm_year+1900).toString().substring(2),"%Y":p=>p.tm_year+1900,"%z":p=>{var T=p.tm_gmtoff,z=T>=0;return T=Math.abs(T)/60,T=T/60*100+T%60,(z?"+":"-")+("0000"+T).slice(-4)},"%Z":p=>p.tm_zone,"%%":()=>"%"};l=l.replace(/%%/g,"\0\0");for(var f in L)l.includes(f)&&(l=l.replace(new RegExp(f,"g"),L[f](u)));l=l.replace(/\0\0/g,"%");var g=Bn(l,!1);return g.length>t?0:(Yn(g,e),g.length-1)},qn=(e,t,r,a,s)=>Gn(e,t,r,a);Dt=o.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Sr(),ve=o.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Ir(),Mr(),Br(),Lt=o.UnboundTypeError=Jr(Error,"UnboundTypeError"),Kr(),tn();var Jn={s:mr,v:vr,b:gr,g:wr,m:br,K:$r,e:_r,T:Cr,d:yr,ba:Tr,P:Pr,Y:Ar,aa:Xr,$:Zr,x:Qr,X:rn,y:an,j:on,M:un,D:cn,t:dn,p:fn,L:mn,C:_n,w:Cn,ca:Tn,Z:Pn,fa:Yt,da:An,N:On,W:Dn,_:jn,B:xn,V:Mn,U:Wn,R:Hn,S:Vn,G:da,H:la,n:fa,a:Xn,f:ea,q:na,k:Kn,J:ua,u:sa,I:ca,A:pa,O:bt,l:ta,i:ra,c:Qn,o:Zn,E:oa,ea:aa,r:ha,h:ia,z:ma,F:Ln,Q:qn},F=pr(),ae=o._free=e=>(ae=o._free=F.ia)(e),vt=o._malloc=e=>(vt=o._malloc=F.ja)(e),tr=e=>(tr=F.la)(e);o.__embind_initialize_bindings=()=>(o.__embind_initialize_bindings=F.ma)();var M=(e,t)=>(M=F.na)(e,t),Pe=e=>(Pe=F.oa)(e),I=()=>(I=F.pa)(),U=e=>(U=F.qa)(e),rr=e=>(rr=F.ra)(e),nr=e=>(nr=F.sa)(e),ar=(e,t,r)=>(ar=F.ta)(e,t,r),or=e=>(or=F.ua)(e);o.dynCall_viijii=(e,t,r,a,s,u,l)=>(o.dynCall_viijii=F.va)(e,t,r,a,s,u,l);var ir=o.dynCall_jiiii=(e,t,r,a,s)=>(ir=o.dynCall_jiiii=F.wa)(e,t,r,a,s);o.dynCall_iiiiij=(e,t,r,a,s,u,l)=>(o.dynCall_iiiiij=F.xa)(e,t,r,a,s,u,l),o.dynCall_iiiiijj=(e,t,r,a,s,u,l,d,f)=>(o.dynCall_iiiiijj=F.ya)(e,t,r,a,s,u,l,d,f),o.dynCall_iiiiiijj=(e,t,r,a,s,u,l,d,f,m)=>(o.dynCall_iiiiiijj=F.za)(e,t,r,a,s,u,l,d,f,m);function Xn(e,t){var r=I();try{return W(e)(t)}catch(a){if(U(r),a!==a+0)throw a;M(1,0)}}function Zn(e,t,r,a){var s=I();try{W(e)(t,r,a)}catch(u){if(U(s),u!==u+0)throw u;M(1,0)}}function Qn(e,t,r){var a=I();try{W(e)(t,r)}catch(s){if(U(a),s!==s+0)throw s;M(1,0)}}function Kn(e,t,r,a,s){var u=I();try{return W(e)(t,r,a,s)}catch(l){if(U(u),l!==l+0)throw l;M(1,0)}}function ea(e,t,r){var a=I();try{return W(e)(t,r)}catch(s){if(U(a),s!==s+0)throw s;M(1,0)}}function ta(e){var t=I();try{W(e)()}catch(r){if(U(t),r!==r+0)throw r;M(1,0)}}function ra(e,t){var r=I();try{W(e)(t)}catch(a){if(U(r),a!==a+0)throw a;M(1,0)}}function na(e,t,r,a){var s=I();try{return W(e)(t,r,a)}catch(u){if(U(s),u!==u+0)throw u;M(1,0)}}function aa(e,t,r,a,s,u){var l=I();try{W(e)(t,r,a,s,u)}catch(d){if(U(l),d!==d+0)throw d;M(1,0)}}function oa(e,t,r,a,s){var u=I();try{W(e)(t,r,a,s)}catch(l){if(U(u),l!==l+0)throw l;M(1,0)}}function ia(e,t,r,a,s,u,l,d,f,m,w){var C=I();try{W(e)(t,r,a,s,u,l,d,f,m,w)}catch(S){if(U(C),S!==S+0)throw S;M(1,0)}}function sa(e,t,r,a,s,u,l){var d=I();try{return W(e)(t,r,a,s,u,l)}catch(f){if(U(d),f!==f+0)throw f;M(1,0)}}function ua(e,t,r,a,s,u){var l=I();try{return W(e)(t,r,a,s,u)}catch(d){if(U(l),d!==d+0)throw d;M(1,0)}}function ca(e,t,r,a,s,u,l,d){var f=I();try{return W(e)(t,r,a,s,u,l,d)}catch(m){if(U(f),m!==m+0)throw m;M(1,0)}}function la(e,t,r,a){var s=I();try{return W(e)(t,r,a)}catch(u){if(U(s),u!==u+0)throw u;M(1,0)}}function da(e,t,r,a){var s=I();try{return W(e)(t,r,a)}catch(u){if(U(s),u!==u+0)throw u;M(1,0)}}function fa(e){var t=I();try{return W(e)()}catch(r){if(U(t),r!==r+0)throw r;M(1,0)}}function ha(e,t,r,a,s,u,l,d){var f=I();try{W(e)(t,r,a,s,u,l,d)}catch(m){if(U(f),m!==m+0)throw m;M(1,0)}}function pa(e,t,r,a,s,u,l,d,f,m,w,C){var S=I();try{return W(e)(t,r,a,s,u,l,d,f,m,w,C)}catch(j){if(U(S),j!==j+0)throw j;M(1,0)}}function ma(e,t,r,a,s,u,l,d,f,m,w,C,S,j,H,V){var L=I();try{W(e)(t,r,a,s,u,l,d,f,m,w,C,S,j,H,V)}catch(g){if(U(L),g!==g+0)throw g;M(1,0)}}function bt(e,t,r,a,s){var u=I();try{return ir(e,t,r,a,s)}catch(l){if(U(u),l!==l+0)throw l;M(1,0)}}var yt;ie=function e(){yt||n(),yt||(ie=e)};function n(){if(se>0||(Ct(),se>0))return;function e(){yt||(yt=!0,o.calledRun=!0,!X&&(Tt(),h(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),Pt()))}o.setStatus?(o.setStatus("Running..."),setTimeout(function(){setTimeout(function(){o.setStatus("")},1),e()},1)):e()}if(o.preInit)for(typeof o.preInit=="function"&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return n(),c.ready}})();const _a=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 ii(i){for(const[c,o]of _a)if(i===o)return c;return"unknown"}var sr;class no extends EventTarget{constructor(c={}){var o;super(),xo(this,sr,void 0);try{const h=(o=c==null?void 0:c.formats)==null?void 0:o.filter(v=>v!=="unknown");if((h==null?void 0:h.length)===0)throw new TypeError("Hint option provided, but is empty.");h==null||h.forEach(v=>{if(!Ma.includes(v))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${v}' is not a valid enum value of type BarcodeFormat.`)}),Mo(this,sr,h??[]),ni().then(v=>{this.dispatchEvent(new CustomEvent("load",{detail:v}))}).catch(v=>{this.dispatchEvent(new CustomEvent("error",{detail:v}))})}catch(h){throw Ra(h,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Ma.filter(c=>c!=="unknown")}async detect(c){try{const o=await Ho(c);if(o===null)return[];let h;try{Ka(o)?h=await ai(o,{tryHarder:!0,formats:xa(this,sr).map(v=>_a.get(v))}):h=await oi(o,{tryHarder:!0,formats:xa(this,sr).map(v=>_a.get(v))})}catch(v){throw console.error(v),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return h.map(v=>{const{topLeft:{x:b,y:$},topRight:{x:A,y},bottomLeft:{x:_,y:O},bottomRight:{x:P,y:B}}=v.position,q=Math.min(b,A,_,P),Y=Math.min($,y,O,B),X=Math.max(b,A,_,P),oe=Math.max($,y,O,B);return{boundingBox:new DOMRectReadOnly(q,Y,X-q,oe-Y),rawValue:v.text,format:ii(v.format),cornerPoints:[{x:b,y:$},{x:A,y},{x:P,y:B},{x:_,y:O}]}})}catch(o){throw Ra(o,"Failed to execute 'detect' on 'BarcodeDetector'")}}}sr=new WeakMap;const ao=(i,c,o="error")=>{let h,v;const b=new Promise(($,A)=>{h=$,v=A,i.addEventListener(c,h),i.addEventListener(o,v)});return b.finally(()=>{i.removeEventListener(c,h),i.removeEventListener(o,v)}),b},Ua=i=>new Promise(c=>setTimeout(c,i));class oo extends Error{constructor(){super("this browser has no Stream API support"),this.name="StreamApiNotSupportedError"}}class si extends Error{constructor(){super("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."),this.name="InsecureContextError"}}class ui extends Error{constructor(){super("Loading camera stream timed out after 3 seconds. If you are on iOS in PWA mode, this is a known issue (see https://github.com/gruhn/vue-qrcode-reader/issues/298)"),this.name="StreamLoadTimeoutError"}}let Ca;const ci=i=>{Ca=new no({formats:i})},li=async(i,{detectHandler:c,locateHandler:o,minDelay:h,formats:v})=>{Ca=new no({formats:v});const b=$=>async A=>{if(i.readyState>1){const{lastScanned:y,contentBefore:_,lastScanHadContent:O}=$;if(A-y<h)window.requestAnimationFrame(b($));else{const P=await Ca.detect(i),B=P.some(X=>!_.includes(X.rawValue));B&&c(P);const q=P.length>0;q&&o(P),!q&&O&&o(P);const Y={lastScanned:A,lastScanHadContent:q,contentBefore:B?P.map(X=>X.rawValue):_};window.requestAnimationFrame(b(Y))}}};b({lastScanned:performance.now(),contentBefore:[],lastScanHadContent:!1})(performance.now())};var io={},he={};Object.defineProperty(he,"__esModule",{value:!0});he.compactObject=co;he.deprecated=wi;var di=he.detectBrowser=bi;he.disableLog=vi;he.disableWarnings=yi;he.extractVersion=cr;he.filterStats=$i;he.log=gi;he.walkStats=dr;he.wrapPeerConnectionEvent=mi;function fi(i,c,o){return c=hi(c),c in i?Object.defineProperty(i,c,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[c]=o,i}function hi(i){var c=pi(i,"string");return qe(c)==="symbol"?c:String(c)}function pi(i,c){if(qe(i)!=="object"||i===null)return i;var o=i[Symbol.toPrimitive];if(o!==void 0){var h=o.call(i,c||"default");if(qe(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(i)}function qe(i){"@babel/helpers - typeof";return qe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},qe(i)}var so=!0,uo=!0;function cr(i,c,o){var h=i.match(c);return h&&h.length>=o&&parseInt(h[o],10)}function mi(i,c,o){if(i.RTCPeerConnection){var h=i.RTCPeerConnection.prototype,v=h.addEventListener;h.addEventListener=function($,A){if($!==c)return v.apply(this,arguments);var y=function(_){var O=o(_);O&&(A.handleEvent?A.handleEvent(O):A(O))};return this._eventMap=this._eventMap||{},this._eventMap[c]||(this._eventMap[c]=new Map),this._eventMap[c].set(A,y),v.apply(this,[$,y])};var b=h.removeEventListener;h.removeEventListener=function($,A){if($!==c||!this._eventMap||!this._eventMap[c])return b.apply(this,arguments);if(!this._eventMap[c].has(A))return b.apply(this,arguments);var y=this._eventMap[c].get(A);return this._eventMap[c].delete(A),this._eventMap[c].size===0&&delete this._eventMap[c],Object.keys(this._eventMap).length===0&&delete this._eventMap,b.apply(this,[$,y])},Object.defineProperty(h,"on"+c,{get:function(){return this["_on"+c]},set:function($){this["_on"+c]&&(this.removeEventListener(c,this["_on"+c]),delete this["_on"+c]),$&&this.addEventListener(c,this["_on"+c]=$)},enumerable:!0,configurable:!0})}}function vi(i){return typeof i!="boolean"?new Error("Argument type: "+qe(i)+". Please use a boolean."):(so=i,i?"adapter.js logging disabled":"adapter.js logging enabled")}function yi(i){return typeof i!="boolean"?new Error("Argument type: "+qe(i)+". Please use a boolean."):(uo=!i,"adapter.js deprecation warnings "+(i?"disabled":"enabled"))}function gi(){if((typeof window>"u"?"undefined":qe(window))==="object"){if(so)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function wi(i,c){uo&&console.warn(i+" is deprecated, please use "+c+" instead.")}function bi(i){var c={browser:null,version:null};if(typeof i>"u"||!i.navigator||!i.navigator.userAgent)return c.browser="Not a browser.",c;var o=i.navigator;if(o.mozGetUserMedia)c.browser="firefox",c.version=cr(o.userAgent,/Firefox\/(\d+)\./,1);else if(o.webkitGetUserMedia||i.isSecureContext===!1&&i.webkitRTCPeerConnection)c.browser="chrome",c.version=cr(o.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(i.RTCPeerConnection&&o.userAgent.match(/AppleWebKit\/(\d+)\./))c.browser="safari",c.version=cr(o.userAgent,/AppleWebKit\/(\d+)\./,1),c.supportsUnifiedPlan=i.RTCRtpTransceiver&&"currentDirection"in i.RTCRtpTransceiver.prototype;else return c.browser="Not a supported browser.",c;return c}function Ha(i){return Object.prototype.toString.call(i)==="[object Object]"}function co(i){return Ha(i)?Object.keys(i).reduce(function(c,o){var h=Ha(i[o]),v=h?co(i[o]):i[o],b=h&&!Object.keys(v).length;return v===void 0||b?c:Object.assign(c,fi({},o,v))},{}):i}function dr(i,c,o){!c||o.has(c.id)||(o.set(c.id,c),Object.keys(c).forEach(function(h){h.endsWith("Id")?dr(i,i.get(c[h]),o):h.endsWith("Ids")&&c[h].forEach(function(v){dr(i,i.get(v),o)})}))}function $i(i,c,o){var h=o?"outbound-rtp":"inbound-rtp",v=new Map;if(c===null)return v;var b=[];return i.forEach(function($){$.type==="track"&&$.trackIdentifier===c.id&&b.push($)}),b.forEach(function($){i.forEach(function(A){A.type===h&&A.trackId===$.id&&dr(i,A,v)})}),v}Object.defineProperty(io,"__esModule",{value:!0});var _i=io.shimGetUserMedia=Pi,Ci=Ti(he);function lo(i){if(typeof WeakMap!="function")return null;var c=new WeakMap,o=new WeakMap;return(lo=function(h){return h?o:c})(i)}function Ti(i,c){if(!c&&i&&i.__esModule)return i;if(i===null||Ge(i)!=="object"&&typeof i!="function")return{default:i};var o=lo(c);if(o&&o.has(i))return o.get(i);var h={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var b in i)if(b!=="default"&&Object.prototype.hasOwnProperty.call(i,b)){var $=v?Object.getOwnPropertyDescriptor(i,b):null;$&&($.get||$.set)?Object.defineProperty(h,b,$):h[b]=i[b]}return h.default=i,o&&o.set(i,h),h}function Ge(i){"@babel/helpers - typeof";return Ge=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},Ge(i)}var Va=Ci.log;function Pi(i,c){var o=i&&i.navigator;if(o.mediaDevices){var h=function(y){if(Ge(y)!=="object"||y.mandatory||y.optional)return y;var _={};return Object.keys(y).forEach(function(O){if(!(O==="require"||O==="advanced"||O==="mediaSource")){var P=Ge(y[O])==="object"?y[O]:{ideal:y[O]};P.exact!==void 0&&typeof P.exact=="number"&&(P.min=P.max=P.exact);var B=function(Y,X){return Y?Y+X.charAt(0).toUpperCase()+X.slice(1):X==="deviceId"?"sourceId":X};if(P.ideal!==void 0){_.optional=_.optional||[];var q={};typeof P.ideal=="number"?(q[B("min",O)]=P.ideal,_.optional.push(q),q={},q[B("max",O)]=P.ideal,_.optional.push(q)):(q[B("",O)]=P.ideal,_.optional.push(q))}P.exact!==void 0&&typeof P.exact!="number"?(_.mandatory=_.mandatory||{},_.mandatory[B("",O)]=P.exact):["min","max"].forEach(function(Y){P[Y]!==void 0&&(_.mandatory=_.mandatory||{},_.mandatory[B(Y,O)]=P[Y])})}}),y.advanced&&(_.optional=(_.optional||[]).concat(y.advanced)),_},v=function(y,_){if(c.version>=61)return _(y);if(y=JSON.parse(JSON.stringify(y)),y&&Ge(y.audio)==="object"){var O=function(Y,X,oe){X in Y&&!(oe in Y)&&(Y[oe]=Y[X],delete Y[X])};y=JSON.parse(JSON.stringify(y)),O(y.audio,"autoGainControl","googAutoGainControl"),O(y.audio,"noiseSuppression","googNoiseSuppression"),y.audio=h(y.audio)}if(y&&Ge(y.video)==="object"){var P=y.video.facingMode;P=P&&(Ge(P)==="object"?P:{ideal:P});var B=c.version<66;if(P&&(P.exact==="user"||P.exact==="environment"||P.ideal==="user"||P.ideal==="environment")&&!(o.mediaDevices.getSupportedConstraints&&o.mediaDevices.getSupportedConstraints().facingMode&&!B)){delete y.video.facingMode;var q;if(P.exact==="environment"||P.ideal==="environment"?q=["back","rear"]:(P.exact==="user"||P.ideal==="user")&&(q=["front"]),q)return o.mediaDevices.enumerateDevices().then(function(Y){Y=Y.filter(function(oe){return oe.kind==="videoinput"});var X=Y.find(function(oe){return q.some(function(x){return oe.label.toLowerCase().includes(x)})});return!X&&Y.length&&q.includes("back")&&(X=Y[Y.length-1]),X&&(y.video.deviceId=P.exact?{exact:X.deviceId}:{ideal:X.deviceId}),y.video=h(y.video),Va("chrome: "+JSON.stringify(y)),_(y)})}y.video=h(y.video)}return Va("chrome: "+JSON.stringify(y)),_(y)},b=function(y){return c.version>=64?y:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[y.name]||y.name,message:y.message,constraint:y.constraint||y.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},$=function(y,_,O){v(y,function(P){o.webkitGetUserMedia(P,_,function(B){O&&O(b(B))})})};if(o.getUserMedia=$.bind(o),o.mediaDevices.getUserMedia){var A=o.mediaDevices.getUserMedia.bind(o.mediaDevices);o.mediaDevices.getUserMedia=function(y){return v(y,function(_){return A(_).then(function(O){if(_.audio&&!O.getAudioTracks().length||_.video&&!O.getVideoTracks().length)throw O.getTracks().forEach(function(P){P.stop()}),new DOMException("","NotFoundError");return O},function(O){return Promise.reject(b(O))})})}}}}var fo={};Object.defineProperty(fo,"__esModule",{value:!0});var Si=fo.shimGetUserMedia=Oi,Ei=Ai(he);function ho(i){if(typeof WeakMap!="function")return null;var c=new WeakMap,o=new WeakMap;return(ho=function(h){return h?o:c})(i)}function Ai(i,c){if(!c&&i&&i.__esModule)return i;if(i===null||$t(i)!=="object"&&typeof i!="function")return{default:i};var o=ho(c);if(o&&o.has(i))return o.get(i);var h={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var b in i)if(b!=="default"&&Object.prototype.hasOwnProperty.call(i,b)){var $=v?Object.getOwnPropertyDescriptor(i,b):null;$&&($.get||$.set)?Object.defineProperty(h,b,$):h[b]=i[b]}return h.default=i,o&&o.set(i,h),h}function $t(i){"@babel/helpers - typeof";return $t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},$t(i)}function Oi(i,c){var o=i&&i.navigator,h=i&&i.MediaStreamTrack;if(o.getUserMedia=function(y,_,O){Ei.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),o.mediaDevices.getUserMedia(y).then(_,O)},!(c.version>55&&"autoGainControl"in o.mediaDevices.getSupportedConstraints())){var v=function(y,_,O){_ in y&&!(O in y)&&(y[O]=y[_],delete y[_])},b=o.mediaDevices.getUserMedia.bind(o.mediaDevices);if(o.mediaDevices.getUserMedia=function(y){return $t(y)==="object"&&$t(y.audio)==="object"&&(y=JSON.parse(JSON.stringify(y)),v(y.audio,"autoGainControl","mozAutoGainControl"),v(y.audio,"noiseSuppression","mozNoiseSuppression")),b(y)},h&&h.prototype.getSettings){var $=h.prototype.getSettings;h.prototype.getSettings=function(){var y=$.apply(this,arguments);return v(y,"mozAutoGainControl","autoGainControl"),v(y,"mozNoiseSuppression","noiseSuppression"),y}}if(h&&h.prototype.applyConstraints){var A=h.prototype.applyConstraints;h.prototype.applyConstraints=function(y){return this.kind==="audio"&&$t(y)==="object"&&(y=JSON.parse(JSON.stringify(y)),v(y,"autoGainControl","mozAutoGainControl"),v(y,"noiseSuppression","mozNoiseSuppression")),A.apply(this,[y])}}}}var Ae={};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.shimAudioContext=Ui;Ae.shimCallbacksAPI=Mi;Ae.shimConstraints=vo;Ae.shimCreateOfferLegacy=Ii;var ki=Ae.shimGetUserMedia=Ri;Ae.shimLocalStreamsAPI=ji;Ae.shimRTCIceServerUrls=Fi;Ae.shimRemoteStreamsAPI=xi;Ae.shimTrackEventTransceiver=Wi;var po=Di(he);function mo(i){if(typeof WeakMap!="function")return null;var c=new WeakMap,o=new WeakMap;return(mo=function(h){return h?o:c})(i)}function Di(i,c){if(!c&&i&&i.__esModule)return i;if(i===null||Je(i)!=="object"&&typeof i!="function")return{default:i};var o=mo(c);if(o&&o.has(i))return o.get(i);var h={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var b in i)if(b!=="default"&&Object.prototype.hasOwnProperty.call(i,b)){var $=v?Object.getOwnPropertyDescriptor(i,b):null;$&&($.get||$.set)?Object.defineProperty(h,b,$):h[b]=i[b]}return h.default=i,o&&o.set(i,h),h}function Je(i){"@babel/helpers - typeof";return Je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},Je(i)}function ji(i){if(!(Je(i)!=="object"||!i.RTCPeerConnection)){if("getLocalStreams"in i.RTCPeerConnection.prototype||(i.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in i.RTCPeerConnection.prototype)){var c=i.RTCPeerConnection.prototype.addTrack;i.RTCPeerConnection.prototype.addStream=function(o){var h=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(o)||this._localStreams.push(o),o.getAudioTracks().forEach(function(v){return c.call(h,v,o)}),o.getVideoTracks().forEach(function(v){return c.call(h,v,o)})},i.RTCPeerConnection.prototype.addTrack=function(o){for(var h=this,v=arguments.length,b=new Array(v>1?v-1:0),$=1;$<v;$++)b[$-1]=arguments[$];return b&&b.forEach(function(A){h._localStreams?h._localStreams.includes(A)||h._localStreams.push(A):h._localStreams=[A]}),c.apply(this,arguments)}}"removeStream"in i.RTCPeerConnection.prototype||(i.RTCPeerConnection.prototype.removeStream=function(o){var h=this;this._localStreams||(this._localStreams=[]);var v=this._localStreams.indexOf(o);if(v!==-1){this._localStreams.splice(v,1);var b=o.getTracks();this.getSenders().forEach(function($){b.includes($.track)&&h.removeTrack($)})}})}}function xi(i){if(!(Je(i)!=="object"||!i.RTCPeerConnection)&&("getRemoteStreams"in i.RTCPeerConnection.prototype||(i.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in i.RTCPeerConnection.prototype))){Object.defineProperty(i.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(o){var h=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=o),this.addEventListener("track",this._onaddstreampoly=function(v){v.streams.forEach(function(b){if(h._remoteStreams||(h._remoteStreams=[]),!h._remoteStreams.includes(b)){h._remoteStreams.push(b);var $=new Event("addstream");$.stream=b,h.dispatchEvent($)}})})}});var c=i.RTCPeerConnection.prototype.setRemoteDescription;i.RTCPeerConnection.prototype.setRemoteDescription=function(){var o=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(h){h.streams.forEach(function(v){if(o._remoteStreams||(o._remoteStreams=[]),!(o._remoteStreams.indexOf(v)>=0)){o._remoteStreams.push(v);var b=new Event("addstream");b.stream=v,o.dispatchEvent(b)}})}),c.apply(o,arguments)}}}function Mi(i){if(!(Je(i)!=="object"||!i.RTCPeerConnection)){var c=i.RTCPeerConnection.prototype,o=c.createOffer,h=c.createAnswer,v=c.setLocalDescription,b=c.setRemoteDescription,$=c.addIceCandidate;c.createOffer=function(y,_){var O=arguments.length>=2?arguments[2]:arguments[0],P=o.apply(this,[O]);return _?(P.then(y,_),Promise.resolve()):P},c.createAnswer=function(y,_){var O=arguments.length>=2?arguments[2]:arguments[0],P=h.apply(this,[O]);return _?(P.then(y,_),Promise.resolve()):P};var A=function(y,_,O){var P=v.apply(this,[y]);return O?(P.then(_,O),Promise.resolve()):P};c.setLocalDescription=A,A=function(y,_,O){var P=b.apply(this,[y]);return O?(P.then(_,O),Promise.resolve()):P},c.setRemoteDescription=A,A=function(y,_,O){var P=$.apply(this,[y]);return O?(P.then(_,O),Promise.resolve()):P},c.addIceCandidate=A}}function Ri(i){var c=i&&i.navigator;if(c.mediaDevices&&c.mediaDevices.getUserMedia){var o=c.mediaDevices,h=o.getUserMedia.bind(o);c.mediaDevices.getUserMedia=function(v){return h(vo(v))}}!c.getUserMedia&&c.mediaDevices&&c.mediaDevices.getUserMedia&&(c.getUserMedia=(function(v,b,$){c.mediaDevices.getUserMedia(v).then(b,$)}).bind(c))}function vo(i){return i&&i.video!==void 0?Object.assign({},i,{video:po.compactObject(i.video)}):i}function Fi(i){if(i.RTCPeerConnection){var c=i.RTCPeerConnection;i.RTCPeerConnection=function(o,h){if(o&&o.iceServers){for(var v=[],b=0;b<o.iceServers.length;b++){var $=o.iceServers[b];$.urls===void 0&&$.url?(po.deprecated("RTCIceServer.url","RTCIceServer.urls"),$=JSON.parse(JSON.stringify($)),$.urls=$.url,delete $.url,v.push($)):v.push(o.iceServers[b])}o.iceServers=v}return new c(o,h)},i.RTCPeerConnection.prototype=c.prototype,"generateCertificate"in c&&Object.defineProperty(i.RTCPeerConnection,"generateCertificate",{get:function(){return c.generateCertificate}})}}function Wi(i){Je(i)==="object"&&i.RTCTrackEvent&&"receiver"in i.RTCTrackEvent.prototype&&!("transceiver"in i.RTCTrackEvent.prototype)&&Object.defineProperty(i.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function Ii(i){var c=i.RTCPeerConnection.prototype.createOffer;i.RTCPeerConnection.prototype.createOffer=function(o){if(o){typeof o.offerToReceiveAudio<"u"&&(o.offerToReceiveAudio=!!o.offerToReceiveAudio);var h=this.getTransceivers().find(function(b){return b.receiver.track.kind==="audio"});o.offerToReceiveAudio===!1&&h?h.direction==="sendrecv"?h.setDirection?h.setDirection("sendonly"):h.direction="sendonly":h.direction==="recvonly"&&(h.setDirection?h.setDirection("inactive"):h.direction="inactive"):o.offerToReceiveAudio===!0&&!h&&this.addTransceiver("audio",{direction:"recvonly"}),typeof o.offerToReceiveVideo<"u"&&(o.offerToReceiveVideo=!!o.offerToReceiveVideo);var v=this.getTransceivers().find(function(b){return b.receiver.track.kind==="video"});o.offerToReceiveVideo===!1&&v?v.direction==="sendrecv"?v.setDirection?v.setDirection("sendonly"):v.direction="sendonly":v.direction==="recvonly"&&(v.setDirection?v.setDirection("inactive"):v.direction="inactive"):o.offerToReceiveVideo===!0&&!v&&this.addTransceiver("video",{direction:"recvonly"})}return c.apply(this,arguments)}}function Ui(i){Je(i)!=="object"||i.AudioContext||(i.AudioContext=i.webkitAudioContext)}const Hi=i=>{let c=!1,o;return(...h)=>(c||(o=i(h),c=!0),o)};function Le(i,c){if(i===!1)throw new Error(c??"assertion failure")}const Vi=Hi(()=>{const i=di(window);switch(i.browser){case"chrome":_i(window,i);break;case"firefox":Si(window,i);break;case"safari":ki(window,i);break;default:throw new oo}});let _t=Promise.resolve({type:"stop",data:{}});async function La(i,c,o){var h,v,b;if(window.isSecureContext!==!0)throw new si;if(((h=navigator==null?void 0:navigator.mediaDevices)==null?void 0:h.getUserMedia)===void 0)throw new oo;Vi();const $=await navigator.mediaDevices.getUserMedia({audio:!1,video:c});i.srcObject!==void 0?i.srcObject=$:i.mozSrcObject!==void 0?i.mozSrcObject=$:window.URL.createObjectURL?i.src=window.URL.createObjectURL($):window.webkitURL?i.src=window.webkitURL.createObjectURL($):i.src=$.id,i.play(),await Promise.race([ao(i,"loadeddata"),Ua(3e3).then(()=>{throw new ui})]),await Ua(500);const[A]=$.getVideoTracks(),y=(b=(v=A==null?void 0:A.getCapabilities)==null?void 0:v.call(A))!=null?b:{};let _=!1;return o&&y.torch&&(await A.applyConstraints({advanced:[{torch:!0}]}),_=!0),{type:"start",data:{videoEl:i,stream:$,capabilities:y,constraints:c,isTorchOn:_}}}async function Li(i,{constraints:c,torch:o,restart:h=!1}){_t=_t.then(b=>{if(b.type==="start"){const{data:{videoEl:$,stream:A,constraints:y,isTorchOn:_}}=b;return!h&&i===$&&c===y&&o===_?b:yo($,A,_).then(()=>La(i,c,o))}return La(i,c,o)});const v=await _t;if(v.type==="stop")throw new Error("Something went wrong with the camera task queue (start task).");return v.data.capabilities}async function yo(i,c,o){i.src="",i.srcObject=null,i.load(),await ao(i,"error");for(const h of c.getTracks())o!=null||await h.applyConstraints({advanced:[{torch:!1}]}),c.removeTrack(h),h.stop();return{type:"stop",data:{}}}async function ba(){if(_t=_t.then(i=>{if(i.type==="stop")return i;const{data:{videoEl:c,stream:o,isTorchOn:h}}=i;return yo(c,o,h)}),(await _t).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")}const zi=go({__name:"QrcodeStream",props:{constraints:{type:Object,default(){return{facingMode:"environment"}}},formats:{type:Array,default:()=>["qr_code"]},paused:{type:Boolean,default:!1},torch:{type:Boolean,default:!1},track:{type:Function}},emits:["detect","camera-on","camera-off","error"],setup(i,{emit:c}){const o=i,h=c,v=Ee(),b=Ee(),$=Ee(),A=Ee(!1),y=Ee(!1);za(()=>{y.value=!0}),wo(()=>{ba()});const _=va(()=>({torch:o.torch,constraints:o.constraints,shouldStream:y.value&&!o.paused}));ya(_,async D=>{const N=$.value;Le(N!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus video element should always be defined.");const J=v.value;Le(J!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined.");const R=J.getContext("2d");if(Le(R!==null,"if cavnas is defined, canvas 2d context should also be non-null"),D.shouldStream)try{const E=await Li(N,D);y.value?(A.value=!0,h("camera-on",E)):await ba()}catch(E){h("error",E)}else J.width=N.videoWidth,J.height=N.videoHeight,R.drawImage(N,0,0,N.videoWidth,N.videoHeight),ba(),A.value=!1,h("camera-off")},{deep:!0});const{formats:O}=bo(o);ya(O,D=>{y.value&&ci(D)});const P=va(()=>_.value.shouldStream&&A.value);ya(P,D=>{if(D){Le(v.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined"),B(v.value),Le(b.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus tracking canvas is defined"),B(b.value);const N=()=>o.track===void 0?500:40;Le($.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus video element is defined"),li($.value,{detectHandler:J=>h("detect",J),formats:o.formats,locateHandler:q,minDelay:N()})}});const B=D=>{const N=D.getContext("2d");Le(N!==null,"canvas 2d context should always be non-null"),N.clearRect(0,0,D.width,D.height)},q=D=>{const N=b.value;Le(N!==void 0,"onLocate handler should only be called when component is mounted. Thus tracking canvas is always defined.");const J=$.value;if(Le(J!==void 0,"onLocate handler should only be called when component is mounted. Thus video element is always defined."),D.length===0||o.track===void 0)B(N);else{const R=J.offsetWidth,E=J.offsetHeight,we=J.videoWidth,Oe=J.videoHeight,ze=Math.max(R/we,E/Oe),Ne=we*ze,Be=Oe*ze,Xe=Ne/we,Ct=Be/Oe,Tt=(R-Ne)/2,Pt=(E-Be)/2,Ze=({x:ie,y:ye})=>({x:Math.floor(ie*Xe),y:Math.floor(ye*Ct)}),wt=({x:ie,y:ye})=>({x:Math.floor(ie+Tt),y:Math.floor(ye+Pt)}),St=D.map(ie=>{const{boundingBox:ye,cornerPoints:Et}=ie,{x:pe,y:At}=wt(Ze({x:ye.x,y:ye.y})),{x:Qe,y:ce}=Ze({x:ye.width,y:ye.height});return{...ie,cornerPoints:Et.map(Ke=>wt(Ze(Ke))),boundingBox:DOMRectReadOnly.fromRect({x:pe,y:At,width:Qe,height:ce})}});N.width=J.offsetWidth,N.height=J.offsetHeight;const se=N.getContext("2d");o.track(St,se)}},Y={width:"100%",height:"100%",position:"relative","z-index":"0"},X={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},oe={width:"100%",height:"100%","object-fit":"cover"},x=va(()=>P.value?oe:{...oe,visibility:"hidden",position:"absolute"});return(D,N)=>(Se(),Ye("div",{style:Y},[Z("video",{ref_key:"videoRef",ref:$,style:$o(x.value),autoplay:"",muted:"",playsinline:""},null,4),$a(Z("canvas",{id:"qrcode-stream-pause-frame",ref_key:"pauseFrameRef",ref:v,style:oe},null,512),[[Na,!P.value]]),Z("canvas",{id:"qrcode-stream-tracking-layer",ref_key:"trackingLayerRef",ref:b,style:X},null,512),Z("div",{style:X},[_o(D.$slots,"default")])]))}}),Ni={class:"modal is-active"},Bi=Z("div",{class:"modal-background"},null,-1),Yi={class:"modal-content"},Gi={class:"section"},qi={class:"columns is-centered"},Ji={class:"column is-three-quarters"},Xi={class:"modal-slot has-text-centered is-shadowless"},Zi={key:0},Qi={class:"block is-size-5"},Ki={key:0},es={class:"is-size-7 mb-3"},ts={class:"is-size-7 mb-3"},rs={class:"addressbar columns is-mobile is-gapless"},ns={class:"column is-narrow has-text-left circled"},as=Z("div",{class:"column has-text-left ml-3"}," http://my.2fauth.app/... ",-1),os={class:"column is-narrow has-text-right"},is=["onClick"],ss={key:1,class:"is-size-7"},us={class:"fullscreen-streamer"},cs={key:1,class:"field has-addons has-addons-centered mt-3"},ls={class:"control has-icons-left"},ds={class:"select"},fs=["value"],hs={class:"icon is-small is-left"},ps={class:"fullscreen-footer"},bs={__name:"Capture",setup(i){const c=Co(),o=jo(),h=To(),v=Ee(!1),b=Ee(null),$=Ee([]),A=Ee(""),y=Po(new Oo({qrcode:null,uri:""})),_=Ee(!1);za(async()=>{$.value=(await navigator.mediaDevices.enumerateDevices()).filter(({kind:x})=>x==="videoinput"),$.value.length>0&&(b.value=$.value[0])});const O=x=>{x.name==="NotAllowedError"?A.value="need_grant_permission":x.name==="NotFoundError"?A.value="no_cam_on_device":x.name==="NotSupportedError"||x.name==="InsecureContextError"?A.value="secured_context_required":x.name==="NotReadableError"?A.value="not_readable":x.name==="OverconstrainedError"?A.value="camera_not_suitable":x.name==="StreamApiNotSupportedError"?A.value="stream_api_not_supported":h.error(x)},P=async x=>{const[D]=x;y.uri=D.rawValue,y.uri?y.uri.slice(0,33).toLowerCase()=="otpauth-migration://offline?data="?(o.migrationUri=y.uri,c.push({name:"importAccounts"})):y.uri.slice(0,15).toLowerCase()!=="otpauth://totp/"&&y.uri.slice(0,15).toLowerCase()!=="otpauth://hotp/"?(_.value=!0,h.warn({text:ja("errors.no_valid_otp")})):(o.decodedUri=y.uri,c.push({name:"createAccount"})):h.warn({text:ja("errors.qrcode_cannot_be_read")})};function B(x){v.value=!0}function q(x){v.value=!1}function Y(){c.go(-1)}const X=(x,D)=>{for(const N of x){const[J,...R]=N.cornerPoints;D.strokeStyle="red",D.beginPath(),D.moveTo(J.x,J.y);for(const{x:E,y:we}of R)D.lineTo(E,we);D.lineTo(J.x,J.y),D.closePath(),D.stroke()}};function oe(){location.reload()}return(x,D)=>{const N=ga("FontAwesomeIcon"),J=ga("ButtonBackCloseCancel"),R=ga("modal");return Se(),Ye(Oa,null,[Z("div",Ni,[Bi,Z("div",Yi,[Z("section",Gi,[Z("div",qi,[Z("div",Ji,[Z("div",Xi,[fe(A)?(Se(),Ye("div",Zi,[Z("p",Qi,gt(x.$t("twofaccounts.stream.live_scan_cant_start")),1),Ve(fe(Da),null,{default:wa(({mode:E})=>[Z("p",{class:ka(["block",{"has-text-light":E=="dark"}])},gt(x.$t("twofaccounts.stream."+fe(A)+".reason")),3)]),_:1}),fe(A)=="need_grant_permission"?(Se(),Ye("div",Ki,[Z("p",es,gt(x.$t("twofaccounts.stream.need_grant_permission.solution")),1),Z("p",ts,gt(x.$t("twofaccounts.stream.need_grant_permission.click_camera_icon")),1),Z("div",rs,[Z("div",ns,[Ve(N,{icon:["fas","lock"],class:"ml-1",size:"xs"}),Ve(N,{icon:["fas","video-slash"],class:"ml-3",size:"xs"})]),as,Z("div",os,[Ve(N,{icon:["far","star"],class:"mr-1"})])]),Z("p",null,[Z("a",{onClick:So(oe,["stop"])},gt(x.$t("commons.refresh")),9,is)])])):(Se(),Ye("p",ss,gt(x.$t("twofaccounts.stream."+fe(A)+".solution")),1))])):(Se(),Sa(fe(Da),{key:1},{default:wa(({mode:E})=>[Z("span",{class:ka(["is-size-4",E=="dark"?"has-text-light":"has-text-grey-dark"])},[Ve(ko,{isVisible:!0,type:"raw",class:"is-size-1"})],2)]),_:1}))])])])])]),$a(Z("div",us,[fe(b)!==null?(Se(),Sa(fe(zi),{key:0,track:X,onDetect:P,onError:O,onCameraOn:B,onCameraOff:q})):Ea("",!0),fe(v)&&fe($).length>1?(Se(),Ye("div",cs,[Z("p",ls,[Z("span",ds,[$a(Z("select",{"onUpdate:modelValue":D[0]||(D[0]=E=>Aa(b)?b.value=E:null)},[(Se(!0),Ye(Oa,null,Eo(fe($),E=>(Se(),Ye("option",{key:E.label,value:E},gt(E.label?E.label:x.$t("commons.default")),9,fs))),128))],512),[[Ao,fe(b)]])]),Z("span",hs,[Ve(N,{icon:["fas","camera"]})])])])):Ea("",!0)],512),[[Na,!fe(A)]]),Z("div",ps,[Ve(J,{action:"cancel",isCapture:!0,useLinkTag:!1,onCanceled:D[1]||(D[1]=E=>Y())})])]),Ve(R,{modelValue:fe(_),"onUpdate:modelValue":D[2]||(D[2]=E=>Aa(_)?_.value=E:null)},{default:wa(()=>[Ve(Do,{qrContent:fe(y).uri},null,8,["qrContent"])]),_:1},8,["modelValue"])],64)}}};export{bs as default};