You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3 lines
22 KiB
3 lines
22 KiB
8 months ago
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../core-CzvqAd2a.js");var wr=(()=>{var G;var S=typeof document<"u"&&((G=document.currentScript)==null?void 0:G.tagName.toUpperCase())==="SCRIPT"?document.currentScript.src:void 0;return function(ie={}){var Tr,f=ie,$r,K,oe=new Promise((r,e)=>{$r=r,K=e}),se=typeof window=="object",ue=typeof Bun<"u",ur=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";var Ar=Object.assign({},f),A="";function fe(r){return f.locateFile?f.locateFile(r,A):A+r}var Er,fr;if(se||ur||ue){var cr;ur?A=self.location.href:typeof document<"u"&&((cr=document.currentScript)===null||cr===void 0?void 0:cr.tagName.toUpperCase())==="SCRIPT"&&(A=document.currentScript.src),S&&(A=S),A.startsWith("blob:")?A="":A=A.substr(0,A.replace(/[?#].*/,"").lastIndexOf("/")+1),ur&&(fr=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),Er=r=>fetch(r,{credentials:"same-origin"}).then(e=>e.ok?e.arrayBuffer():Promise.reject(new Error(e.status+" : "+e.url)))}f.print||console.log.bind(console);var B=f.printErr||console.error.bind(console);Object.assign(f,Ar),Ar=null,f.arguments&&f.arguments,f.thisProgram&&f.thisProgram;var J=f.wasmBinary,Q,Cr=!1,U,b,j,N,D,_,Fr,Rr;function Pr(){var r=Q.buffer;f.HEAP8=U=new Int8Array(r),f.HEAP16=j=new Int16Array(r),f.HEAPU8=b=new Uint8Array(r),f.HEAPU16=N=new Uint16Array(r),f.HEAP32=D=new Int32Array(r),f.HEAPU32=_=new Uint32Array(r),f.HEAPF32=Fr=new Float32Array(r),f.HEAPF64=Rr=new Float64Array(r)}var Wr=[],kr=[],Sr=[];function ce(){var r=f.preRun;r&&(typeof r=="function"&&(r=[r]),r.forEach(de)),lr(Wr)}function ve(){lr(kr)}function le(){var r=f.postRun;r&&(typeof r=="function"&&(r=[r]),r.forEach(he)),lr(Sr)}function de(r){Wr.unshift(r)}function _e(r){kr.unshift(r)}function he(r){Sr.unshift(r)}var x=0,X=null;function pe(r){var e;x++,(e=f.monitorRunDependencies)===null||e===void 0||e.call(f,x)}function ge(r){var e;if(x--,(e=f.monitorRunDependencies)===null||e===void 0||e.call(f,x),x==0&&X){var t=X;X=null,t()}}function vr(r){var e;(e=f.onAbort)===null||e===void 0||e.call(f,r),r="Aborted("+r+")",B(r),Cr=!0,r+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(r);throw K(t),t}var me="data:application/octet-stream;base64,",Ur=r=>r.startsWith(me);function ye(){var r="zxing_writer.wasm";return Ur(r)?r:fe(r)}var Y;function Mr(r){if(r==Y&&J)return new Uint8Array(J);if(fr)return fr(r);throw"both async and sync fetching of the wasm failed"}function be(r){return J?Promise.resolve().then(()=>Mr(r)):Er(r).then(e=>new Uint8Array(e),()=>Mr(r))}function xr(r,e,t){return be(r).then(n=>WebAssembly.instantiate(n,e)).then(t,n=>{B(`failed to asynchronously prepare wasm: ${n}`),vr(n)})}function we(r,e,t,n){return!r&&typeof WebAssembly.instantiateStreaming=="function"&&!Ur(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var i=WebAssembly.instantiateStreaming(a,t);return i.then(n,function(o){return B(`wasm streaming compile failed: ${o}`),B("falling back to ArrayBuffer instantiation"),xr(e,t,n)})}):xr(e,t,n)}function Te(){return{a:Ht}}function $e(){var r,e=Te();function t(a,i){return y=a.exports,Q=y.Y,Pr(),Xr=y.$,_e(y.Z),ge(),y}pe();function n(a){t(a.instance)}if(f.instantiateWasm)try{return f.instantiateWasm(e,t)}catch(a){B(`Module.instantiateWasm callback failed with error: ${a}`),K(a)}return(r=Y)!==null&&r!==void 0||(Y=ye()),we(J,Y,e,n).catch(K),{}}var lr=r=>{r.forEach(e=>e(f))};f.noExitRuntime;var g=r=>Qr(r),m=()=>Yr(),z=[],Ae=r=>{var e=new dr(r);return e.get_caught()||e.set_caught(!0),e.set_rethrown(!1),z.push(e),re(r),te(r)},F=0,Ee=()=>{p(0,0);var r=z.pop();zr(r.excPtr),F=0};class dr{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){_[this.ptr+4>>2]=e}get_type(){return _[this.ptr+4>>2]}set_destructor(e){_[this.ptr+8>>2]=e}get_destructor(){return _[this.ptr+8>>2]}set_caught(e){e=e?1:0,U[this.ptr+12]=e}get_caught(){return U[this.ptr+12
|
||
|
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},t},Zr,tt=(r,e)=>{var t=[],n={};function a(i){if(!n[i]&&!I[i]){if(nr[i]){nr[i].forEach(a);return}t.push(i),n[i]=!0}}throw e.forEach(a),new Zr(`${r}: `+t.map(Br).join([", "]))},nt=r=>{r=r.trim();const e=r.indexOf("(");return e!==-1?r.substr(0,e):r},at=(r,e,t,n,a,i,o,s)=>{var u=Je(e,t);r=w(r),r=nt(r),a=Z(n,a),Hr(r,function(){tt(`Cannot call ${r} due to unbound types`,u)},e-1),jr([],u,c=>{var v=[c[0],null].concat(c.slice(1));return Qe(r,Ke(r,v,null,a,i),e-1),[]})},it=(r,e,t)=>{switch(e){case 1:return t?n=>U[n]:n=>b[n];case 2:return t?n=>j[n>>1]:n=>N[n>>1];case 4:return t?n=>D[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},ot=(r,e,t,n,a)=>{e=w(e);var i=v=>v;if(n===0){var o=32-8*t;i=v=>v<<o>>>o}var s=e.includes("unsigned"),u=(v,l)=>{},c;s?c=function(v,l){return u(l,this.name),l>>>0}:c=function(v,l){return u(l,this.name),l},E(r,{name:e,fromWireType:i,toWireType:c,argPackAdvance:R,readValueFromPointer:it(e,t,n!==0),destructorFunction:null})},st=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function i(o){var s=_[o>>2],u=_[o+4>>2];return new a(U.buffer,u,s)}t=w(t),E(r,{name:t,fromWireType:i,argPackAdvance:R,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},ut=(r,e,t,n)=>{if(!(n>0))return 0;for(var a=t,i=t+n-1,o=0;o<r.length;++o){var s=r.charCodeAt(o);if(s>=55296&&s<=57343){var u=r.charCodeAt(++o);s=65536+((s&1023)<<10)|u&1023}if(s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|s&63}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|s&63}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|s&63}}return e[t]=0,t-a},ft=(r,e,t)=>ut(r,b,e,t),ct=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},Lr=typeof TextDecoder<"u"?new TextDecoder:void 0,vt=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN;for(var n=e+t,a=e;r[a]&&!(a>=n);)++a;if(a-e>16&&r.buffer&&Lr)return Lr.decode(r.subarray(e,a));for(var i="";e<a;){var o=r[e++];if(!(o&128)){i+=String.fromCharCode(o);continue}var s=r[e++]&63;if((o&224)==192){i+=String.fromCharCode((o&31)<<6|s);continue}var u=r[e++]&63;if((o&240)==224?o=(o&15)<<12|s<<6|u:o=(o&7)<<18|s<<12|u<<6|r[e++]&63,o<65536)i+=String.fromCharCode(o);else{var c=o-65536;i+=String.fromCharCode(55296|c>>10,56320|c&1023)}}return i},lt=(r,e)=>r?vt(b,r,e):"",dt=(r,e)=>{e=w(e);var t=e==="std::string";E(r,{name:e,fromWireType(n){var a=_[n>>2],i=n+4,o;if(t)for(var s=i,u=0;u<=a;++u){var c=i+u;if(u==a||b[c]==0){var v=c-s,l=lt(s,v);o===void 0?o=l:(o+="\0",o+=l),s=c+1}}else{for(var d=new Array(a),u=0;u<a;++u)d[u]=String.fromCharCode(b[i+u]);o=d.join("")}return W(n),o},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var i,o=typeof a=="string";o||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||$("Cannot pass non-string to std::string"),t&&o?i=ct(a):i=a.length;var s=yr(4+i+1),u=s+4;if(_[s>>2]=i,t&&o)ft(a,u,i+1);else if(o)for(var c=0;c<i;++c){var v=a.charCodeAt(c);v>255&&(W(u),$("String has UTF-16 code units that do not fit in 8 bits")),b[u+c]=v}else for(var c=0;c<i;++c)b[u+c]=a[c];return n!==null&&n.push(W,s),s},argPackAdvance:R,readValueFromPointer:tr,destructorFunction(n){W(n)}})},qr=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,_t=(r,e)=>{for(var t=r,n=t>>1,a=n+e/2;!(n>=a)&&N[n];)++n;if(t=n<<1,t-r>32&&qr)return qr.decode(b.subarray(r,t));for(var i="",o=0;!(o>=e/2);++o){var s=j[r+o*2>>1];if(s==0)break;i+=String.fromCharCode(s)}return i},ht=(r,e,t)=>{var n;if((n=t)!==null&&n!==void 0||(t=2147483647),t<2)return 0;t-=2;for(var a=e,i=t<r.length*2?t/2:r.length,o=0;o<i;++o){var s=r.charCodeAt
|