nfets 0.0.53 → 0.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/addons/linux-arm64/libxml2.so.2 +0 -0
- package/build/addons/linux-arm64/xml_validator.node +0 -0
- package/dist/{chunk-6WZVXTNU.mjs → chunk-NGK3NG4O.mjs} +1 -1
- package/dist/{chunk-EEQXUQ6P.mjs → chunk-YLUIYK2U.mjs} +51 -51
- package/dist/core/index.cjs +58 -58
- package/dist/core/index.mjs +1 -1
- package/dist/index.cjs +72 -72
- package/dist/index.mjs +1 -1
- package/dist/nfe/index.cjs +71 -71
- package/dist/nfe/index.mjs +1 -1
- package/package.json +2 -2
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{A as uf,B as hf,D as mf,E as gf,F as vf,G as yf,H as Kn,J as H,K as p,L as Ns,M as ui,d as cf,f as d,g as ff,h as y,i as Ss,j as Ge,l as Wn,n as Ue,o as U,p as pf,q as df,v as lf,w as eo,y as w,z as at}from"./chunk-
|
|
2
|
+
import{A as uf,B as hf,D as mf,E as gf,F as vf,G as yf,H as Kn,J as H,K as p,L as Ns,M as ui,d as cf,f as d,g as ff,h as y,i as Ss,j as Ge,l as Wn,n as Ue,o as U,p as pf,q as df,v as lf,w as eo,y as w,z as at}from"./chunk-YLUIYK2U.mjs";import{a as s,b as ye,d as b,f as Zl}from"./chunk-W6MRGYXP.mjs";var gc=b((fI,Dp)=>{"use strict";Dp.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var xi=b(ir=>{"use strict";var vc,lh=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];ir.getSymbolSize=s(function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17},"getSymbolSize");ir.getSymbolTotalCodewords=s(function(e){return lh[e]},"getSymbolTotalCodewords");ir.getBCHDigit=function(o){let e=0;for(;o!==0;)e++,o>>>=1;return e};ir.setToSJISFunction=s(function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');vc=e},"setToSJISFunction");ir.isKanjiModeEnabled=function(){return typeof vc<"u"};ir.toSJIS=s(function(e){return vc(e)},"toSJIS")});var _a=b(zt=>{"use strict";zt.L={bit:1};zt.M={bit:0};zt.Q={bit:3};zt.H={bit:2};function uh(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"l":case"low":return zt.L;case"m":case"medium":return zt.M;case"q":case"quartile":return zt.Q;case"h":case"high":return zt.H;default:throw new Error("Unknown EC Level: "+o)}}s(uh,"fromString");zt.isValid=s(function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4},"isValid");zt.from=s(function(e,t){if(zt.isValid(e))return e;try{return uh(e)}catch{return t}},"from")});var jp=b((hI,Tp)=>{"use strict";function Ep(){this.buffer=[],this.length=0}s(Ep,"BitBuffer");Ep.prototype={get:s(function(o){let e=Math.floor(o/8);return(this.buffer[e]>>>7-o%8&1)===1},"get"),put:s(function(o,e){for(let t=0;t<e;t++)this.putBit((o>>>e-t-1&1)===1)},"put"),getLengthInBits:s(function(){return this.length},"getLengthInBits"),putBit:s(function(o){let e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),o&&(this.buffer[e]|=128>>>this.length%8),this.length++},"putBit")};Tp.exports=Ep});var Lp=b((gI,Mp)=>{"use strict";function Ln(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}s(Ln,"BitMatrix");Ln.prototype.set=function(o,e,t,i){let n=o*this.size+e;this.data[n]=t,i&&(this.reservedBit[n]=!0)};Ln.prototype.get=function(o,e){return this.data[o*this.size+e]};Ln.prototype.xor=function(o,e,t){this.data[o*this.size+e]^=t};Ln.prototype.isReserved=function(o,e){return this.reservedBit[o*this.size+e]};Mp.exports=Ln});var Bp=b($a=>{"use strict";var hh=xi().getSymbolSize;$a.getRowColCoords=s(function(e){if(e===1)return[];let t=Math.floor(e/7)+2,i=hh(e),n=i===145?26:Math.ceil((i-13)/(2*t-2))*2,r=[i-7];for(let a=1;a<t-1;a++)r[a]=r[a-1]-n;return r.push(6),r.reverse()},"getRowColCoords");$a.getPositions=s(function(e){let t=[],i=$a.getRowColCoords(e),n=i.length;for(let r=0;r<n;r++)for(let a=0;a<n;a++)r===0&&a===0||r===0&&a===n-1||r===n-1&&a===0||t.push([i[r],i[a]]);return t},"getPositions")});var Qp=b(Hp=>{"use strict";var mh=xi().getSymbolSize,Vp=7;Hp.getPositions=s(function(e){let t=mh(e);return[[0,0],[t-Vp,0],[0,t-Vp]]},"getPositions")});var Gp=b(X=>{"use strict";X.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var rr={N1:3,N2:3,N3:40,N4:10};X.isValid=s(function(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7},"isValid");X.from=s(function(e){return X.isValid(e)?parseInt(e,10):void 0},"from");X.getPenaltyN1=s(function(e){let t=e.size,i=0,n=0,r=0,a=null,c=null;for(let f=0;f<t;f++){n=r=0,a=c=null;for(let l=0;l<t;l++){let m=e.get(f,l);m===a?n++:(n>=5&&(i+=rr.N1+(n-5)),a=m,n=1),m=e.get(l,f),m===c?r++:(r>=5&&(i+=rr.N1+(r-5)),c=m,r=1)}n>=5&&(i+=rr.N1+(n-5)),r>=5&&(i+=rr.N1+(r-5))}return i},"getPenaltyN1");X.getPenaltyN2=s(function(e){let t=e.size,i=0;for(let n=0;n<t-1;n++)for(let r=0;r<t-1;r++){let a=e.get(n,r)+e.get(n,r+1)+e.get(n+1,r)+e.get(n+1,r+1);(a===4||a===0)&&i++}return i*rr.N2},"getPenaltyN2");X.getPenaltyN3=s(function(e){let t=e.size,i=0,n=0,r=0;for(let a=0;a<t;a++){n=r=0;for(let c=0;c<t;c++)n=n<<1&2047|e.get(a,c),c>=10&&(n===1488||n===93)&&i++,r=r<<1&2047|e.get(c,a),c>=10&&(r===1488||r===93)&&i++}return i*rr.N3},"getPenaltyN3");X.getPenaltyN4=s(function(e){let t=0,i=e.data.length;for(let r=0;r<i;r++)t+=e.data[r];return Math.abs(Math.ceil(t*100/i/5)-10)*rr.N4},"getPenaltyN4");function gh(o,e,t){switch(o){case X.Patterns.PATTERN000:return(e+t)%2===0;case X.Patterns.PATTERN001:return e%2===0;case X.Patterns.PATTERN010:return t%3===0;case X.Patterns.PATTERN011:return(e+t)%3===0;case X.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(t/3))%2===0;case X.Patterns.PATTERN101:return e*t%2+e*t%3===0;case X.Patterns.PATTERN110:return(e*t%2+e*t%3)%2===0;case X.Patterns.PATTERN111:return(e*t%3+(e+t)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}s(gh,"getMaskAt");X.applyMask=s(function(e,t){let i=t.size;for(let n=0;n<i;n++)for(let r=0;r<i;r++)t.isReserved(r,n)||t.xor(r,n,gh(e,r,n))},"applyMask");X.getBestMask=s(function(e,t){let i=Object.keys(X.Patterns).length,n=0,r=1/0;for(let a=0;a<i;a++){t(a),X.applyMask(a,e);let c=X.getPenaltyN1(e)+X.getPenaltyN2(e)+X.getPenaltyN3(e)+X.getPenaltyN4(e);X.applyMask(a,e),c<r&&(r=c,n=a)}return n},"getBestMask")});var Sc=b(yc=>{"use strict";var Ai=_a(),es=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],ts=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];yc.getBlocksCount=s(function(e,t){switch(t){case Ai.L:return es[(e-1)*4+0];case Ai.M:return es[(e-1)*4+1];case Ai.Q:return es[(e-1)*4+2];case Ai.H:return es[(e-1)*4+3];default:return}},"getBlocksCount");yc.getTotalCodewordsCount=s(function(e,t){switch(t){case Ai.L:return ts[(e-1)*4+0];case Ai.M:return ts[(e-1)*4+1];case Ai.Q:return ts[(e-1)*4+2];case Ai.H:return ts[(e-1)*4+3];default:return}},"getTotalCodewordsCount")});var Up=b(is=>{"use strict";var Bn=new Uint8Array(512),os=new Uint8Array(256);s((function(){let e=1;for(let t=0;t<255;t++)Bn[t]=e,os[e]=t,e<<=1,e&256&&(e^=285);for(let t=255;t<512;t++)Bn[t]=Bn[t-255]}),"initTables")();is.log=s(function(e){if(e<1)throw new Error("log("+e+")");return os[e]},"log");is.exp=s(function(e){return Bn[e]},"exp");is.mul=s(function(e,t){return e===0||t===0?0:Bn[os[e]+os[t]]},"mul")});var Yp=b(Vn=>{"use strict";var Nc=Up();Vn.mul=s(function(e,t){let i=new Uint8Array(e.length+t.length-1);for(let n=0;n<e.length;n++)for(let r=0;r<t.length;r++)i[n+r]^=Nc.mul(e[n],t[r]);return i},"mul");Vn.mod=s(function(e,t){let i=new Uint8Array(e);for(;i.length-t.length>=0;){let n=i[0];for(let a=0;a<t.length;a++)i[a]^=Nc.mul(t[a],n);let r=0;for(;r<i.length&&i[r]===0;)r++;i=i.slice(r)}return i},"mod");Vn.generateECPolynomial=s(function(e){let t=new Uint8Array([1]);for(let i=0;i<e;i++)t=Vn.mul(t,new Uint8Array([1,Nc.exp(i)]));return t},"generateECPolynomial")});var Xp=b((OI,qp)=>{"use strict";var Zp=Yp();function bc(o){this.genPoly=void 0,this.degree=o,this.degree&&this.initialize(this.degree)}s(bc,"ReedSolomonEncoder");bc.prototype.initialize=s(function(e){this.degree=e,this.genPoly=Zp.generateECPolynomial(this.degree)},"initialize");bc.prototype.encode=s(function(e){if(!this.genPoly)throw new Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let i=Zp.mod(t,this.genPoly),n=this.degree-i.length;if(n>0){let r=new Uint8Array(this.degree);return r.set(i,n),r}return i},"encode");qp.exports=bc});var Cc=b(Jp=>{"use strict";Jp.isValid=s(function(e){return!isNaN(e)&&e>=1&&e<=40},"isValid")});var Rc=b(li=>{"use strict";var Wp="[0-9]+",vh="[A-Z $%*+\\-./:]+",Hn="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Hn=Hn.replace(/u/g,"\\u");var yh="(?:(?![A-Z0-9 $%*+\\-./:]|"+Hn+`)(?:.|[\r
|
|
3
3
|
]))+`;li.KANJI=new RegExp(Hn,"g");li.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");li.BYTE=new RegExp(yh,"g");li.NUMERIC=new RegExp(Wp,"g");li.ALPHANUMERIC=new RegExp(vh,"g");var Sh=new RegExp("^"+Hn+"$"),Nh=new RegExp("^"+Wp+"$"),bh=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");li.testKanji=s(function(e){return Sh.test(e)},"testKanji");li.testNumeric=s(function(e){return Nh.test(e)},"testNumeric");li.testAlphanumeric=s(function(e){return bh.test(e)},"testAlphanumeric")});var Oi=b(ve=>{"use strict";var Ch=Cc(),Fc=Rc();ve.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};ve.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};ve.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};ve.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};ve.MIXED={bit:-1};ve.getCharCountIndicator=s(function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!Ch.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},"getCharCountIndicator");ve.getBestModeForData=s(function(e){return Fc.testNumeric(e)?ve.NUMERIC:Fc.testAlphanumeric(e)?ve.ALPHANUMERIC:Fc.testKanji(e)?ve.KANJI:ve.BYTE},"getBestModeForData");ve.toString=s(function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},"toString");ve.isValid=s(function(e){return e&&e.bit&&e.ccBits},"isValid");function Rh(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return ve.NUMERIC;case"alphanumeric":return ve.ALPHANUMERIC;case"kanji":return ve.KANJI;case"byte":return ve.BYTE;default:throw new Error("Unknown mode: "+o)}}s(Rh,"fromString");ve.from=s(function(e,t){if(ve.isValid(e))return e;try{return Rh(e)}catch{return t}},"from")});var ed=b(nr=>{"use strict";var rs=xi(),Fh=Sc(),Kp=_a(),Pi=Oi(),Ic=Cc(),_p=7973,kp=rs.getBCHDigit(_p);function Ih(o,e,t){for(let i=1;i<=40;i++)if(e<=nr.getCapacity(i,t,o))return i}s(Ih,"getBestVersionForDataLength");function $p(o,e){return Pi.getCharCountIndicator(o,e)+4}s($p,"getReservedBitsCount");function wh(o,e){let t=0;return o.forEach(function(i){let n=$p(i.mode,e);t+=n+i.getBitsLength()}),t}s(wh,"getTotalBitsFromDataArray");function zh(o,e){for(let t=1;t<=40;t++)if(wh(o,t)<=nr.getCapacity(t,e,Pi.MIXED))return t}s(zh,"getBestVersionForMixedData");nr.from=s(function(e,t){return Ic.isValid(e)?parseInt(e,10):t},"from");nr.getCapacity=s(function(e,t,i){if(!Ic.isValid(e))throw new Error("Invalid QR Code version");typeof i>"u"&&(i=Pi.BYTE);let n=rs.getSymbolTotalCodewords(e),r=Fh.getTotalCodewordsCount(e,t),a=(n-r)*8;if(i===Pi.MIXED)return a;let c=a-$p(i,e);switch(i){case Pi.NUMERIC:return Math.floor(c/10*3);case Pi.ALPHANUMERIC:return Math.floor(c/11*2);case Pi.KANJI:return Math.floor(c/13);case Pi.BYTE:default:return Math.floor(c/8)}},"getCapacity");nr.getBestVersionForData=s(function(e,t){let i,n=Kp.from(t,Kp.M);if(Array.isArray(e)){if(e.length>1)return zh(e,n);if(e.length===0)return 1;i=e[0]}else i=e;return Ih(i.mode,i.getLength(),n)},"getBestVersionForData");nr.getEncodedBits=s(function(e){if(!Ic.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;rs.getBCHDigit(t)-kp>=0;)t^=_p<<rs.getBCHDigit(t)-kp;return e<<12|t},"getEncodedBits")});var rd=b(id=>{"use strict";var wc=xi(),od=1335,xh=21522,td=wc.getBCHDigit(od);id.getEncodedBits=s(function(e,t){let i=e.bit<<3|t,n=i<<10;for(;wc.getBCHDigit(n)-td>=0;)n^=od<<wc.getBCHDigit(n)-td;return(i<<10|n)^xh},"getEncodedBits")});var ad=b((GI,nd)=>{"use strict";var Ah=Oi();function tn(o){this.mode=Ah.NUMERIC,this.data=o.toString()}s(tn,"NumericData");tn.getBitsLength=s(function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},"getBitsLength");tn.prototype.getLength=s(function(){return this.data.length},"getLength");tn.prototype.getBitsLength=s(function(){return tn.getBitsLength(this.data.length)},"getBitsLength");tn.prototype.write=s(function(e){let t,i,n;for(t=0;t+3<=this.data.length;t+=3)i=this.data.substr(t,3),n=parseInt(i,10),e.put(n,10);let r=this.data.length-t;r>0&&(i=this.data.substr(t),n=parseInt(i,10),e.put(n,r*3+1))},"write");nd.exports=tn});var cd=b((YI,sd)=>{"use strict";var Oh=Oi(),zc=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function on(o){this.mode=Oh.ALPHANUMERIC,this.data=o}s(on,"AlphanumericData");on.getBitsLength=s(function(e){return 11*Math.floor(e/2)+6*(e%2)},"getBitsLength");on.prototype.getLength=s(function(){return this.data.length},"getLength");on.prototype.getBitsLength=s(function(){return on.getBitsLength(this.data.length)},"getBitsLength");on.prototype.write=s(function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let i=zc.indexOf(this.data[t])*45;i+=zc.indexOf(this.data[t+1]),e.put(i,11)}this.data.length%2&&e.put(zc.indexOf(this.data[t]),6)},"write");sd.exports=on});var pd=b((qI,fd)=>{"use strict";var Ph=Oi();function rn(o){this.mode=Ph.BYTE,typeof o=="string"?this.data=new TextEncoder().encode(o):this.data=new Uint8Array(o)}s(rn,"ByteData");rn.getBitsLength=s(function(e){return e*8},"getBitsLength");rn.prototype.getLength=s(function(){return this.data.length},"getLength");rn.prototype.getBitsLength=s(function(){return rn.getBitsLength(this.data.length)},"getBitsLength");rn.prototype.write=function(o){for(let e=0,t=this.data.length;e<t;e++)o.put(this.data[e],8)};fd.exports=rn});var ld=b((JI,dd)=>{"use strict";var Dh=Oi(),Eh=xi();function nn(o){this.mode=Dh.KANJI,this.data=o}s(nn,"KanjiData");nn.getBitsLength=s(function(e){return e*13},"getBitsLength");nn.prototype.getLength=s(function(){return this.data.length},"getLength");nn.prototype.getBitsLength=s(function(){return nn.getBitsLength(this.data.length)},"getBitsLength");nn.prototype.write=function(o){let e;for(e=0;e<this.data.length;e++){let t=Eh.toSJIS(this.data[e]);if(t>=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
|
|
4
4
|
Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),o.put(t,13)}};dd.exports=nn});var ud=b((KI,xc)=>{"use strict";var Qn={single_source_shortest_paths:s(function(o,e,t){var i={},n={};n[e]=0;var r=Qn.PriorityQueue.make();r.push(e,0);for(var a,c,f,l,m,g,S,N,F;!r.empty();){a=r.pop(),c=a.value,l=a.cost,m=o[c]||{};for(f in m)m.hasOwnProperty(f)&&(g=m[f],S=l+g,N=n[f],F=typeof n[f]>"u",(F||N>S)&&(n[f]=S,r.push(f,S),i[f]=c))}if(typeof t<"u"&&typeof n[t]>"u"){var O=["Could not find a path from ",e," to ",t,"."].join("");throw new Error(O)}return i},"single_source_shortest_paths"),extract_shortest_path_from_predecessor_list:s(function(o,e){for(var t=[],i=e,n;i;)t.push(i),n=o[i],i=o[i];return t.reverse(),t},"extract_shortest_path_from_predecessor_list"),find_path:s(function(o,e,t){var i=Qn.single_source_shortest_paths(o,e,t);return Qn.extract_shortest_path_from_predecessor_list(i,t)},"find_path"),PriorityQueue:{make:s(function(o){var e=Qn.PriorityQueue,t={},i;o=o||{};for(i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t.queue=[],t.sorter=o.sorter||e.default_sorter,t},"make"),default_sorter:s(function(o,e){return o.cost-e.cost},"default_sorter"),push:s(function(o,e){var t={value:o,cost:e};this.queue.push(t),this.queue.sort(this.sorter)},"push"),pop:s(function(){return this.queue.shift()},"pop"),empty:s(function(){return this.queue.length===0},"empty")}};typeof xc<"u"&&(xc.exports=Qn)});var bd=b(an=>{"use strict";var V=Oi(),gd=ad(),vd=cd(),yd=pd(),Sd=ld(),Gn=Rc(),ns=xi(),Th=ud();function hd(o){return unescape(encodeURIComponent(o)).length}s(hd,"getStringByteLength");function Un(o,e,t){let i=[],n;for(;(n=o.exec(t))!==null;)i.push({data:n[0],index:n.index,mode:e,length:n[0].length});return i}s(Un,"getSegments");function Nd(o){let e=Un(Gn.NUMERIC,V.NUMERIC,o),t=Un(Gn.ALPHANUMERIC,V.ALPHANUMERIC,o),i,n;return ns.isKanjiModeEnabled()?(i=Un(Gn.BYTE,V.BYTE,o),n=Un(Gn.KANJI,V.KANJI,o)):(i=Un(Gn.BYTE_KANJI,V.BYTE,o),n=[]),e.concat(t,i,n).sort(function(a,c){return a.index-c.index}).map(function(a){return{data:a.data,mode:a.mode,length:a.length}})}s(Nd,"getSegmentsFromString");function Ac(o,e){switch(e){case V.NUMERIC:return gd.getBitsLength(o);case V.ALPHANUMERIC:return vd.getBitsLength(o);case V.KANJI:return Sd.getBitsLength(o);case V.BYTE:return yd.getBitsLength(o)}}s(Ac,"getSegmentBitsLength");function jh(o){return o.reduce(function(e,t){let i=e.length-1>=0?e[e.length-1]:null;return i&&i.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}s(jh,"mergeSegments");function Mh(o){let e=[];for(let t=0;t<o.length;t++){let i=o[t];switch(i.mode){case V.NUMERIC:e.push([i,{data:i.data,mode:V.ALPHANUMERIC,length:i.length},{data:i.data,mode:V.BYTE,length:i.length}]);break;case V.ALPHANUMERIC:e.push([i,{data:i.data,mode:V.BYTE,length:i.length}]);break;case V.KANJI:e.push([i,{data:i.data,mode:V.BYTE,length:hd(i.data)}]);break;case V.BYTE:e.push([{data:i.data,mode:V.BYTE,length:hd(i.data)}])}}return e}s(Mh,"buildNodes");function Lh(o,e){let t={},i={start:{}},n=["start"];for(let r=0;r<o.length;r++){let a=o[r],c=[];for(let f=0;f<a.length;f++){let l=a[f],m=""+r+f;c.push(m),t[m]={node:l,lastCount:0},i[m]={};for(let g=0;g<n.length;g++){let S=n[g];t[S]&&t[S].node.mode===l.mode?(i[S][m]=Ac(t[S].lastCount+l.length,l.mode)-Ac(t[S].lastCount,l.mode),t[S].lastCount+=l.length):(t[S]&&(t[S].lastCount=l.length),i[S][m]=Ac(l.length,l.mode)+4+V.getCharCountIndicator(l.mode,e))}}n=c}for(let r=0;r<n.length;r++)i[n[r]].end=0;return{map:i,table:t}}s(Lh,"buildGraph");function md(o,e){let t,i=V.getBestModeForData(o);if(t=V.from(e,i),t!==V.BYTE&&t.bit<i.bit)throw new Error('"'+o+'" cannot be encoded with mode '+V.toString(t)+`.
|
|
5
5
|
Suggested mode is: `+V.toString(i));switch(t===V.KANJI&&!ns.isKanjiModeEnabled()&&(t=V.BYTE),t){case V.NUMERIC:return new gd(o);case V.ALPHANUMERIC:return new vd(o);case V.KANJI:return new Sd(o);case V.BYTE:return new yd(o)}}s(md,"buildSingleSegment");an.fromArray=s(function(e){return e.reduce(function(t,i){return typeof i=="string"?t.push(md(i,null)):i.data&&t.push(md(i.data,i.mode)),t},[])},"fromArray");an.fromString=s(function(e,t){let i=Nd(e,ns.isKanjiModeEnabled()),n=Mh(i),r=Lh(n,t),a=Th.find_path(r.map,"start","end"),c=[];for(let f=1;f<a.length-1;f++)c.push(r.table[a[f]].node);return an.fromArray(jh(c))},"fromString");an.rawSplit=s(function(e){return an.fromArray(Nd(e,ns.isKanjiModeEnabled()))},"rawSplit")});var jc=b(Cd=>{"use strict";var ss=xi(),Oc=_a(),Bh=jp(),Vh=Lp(),Hh=Bp(),Qh=Qp(),Ec=Gp(),Tc=Sc(),Gh=Xp(),as=ed(),Uh=rd(),Yh=Oi(),Pc=bd();function Zh(o,e){let t=o.size,i=Qh.getPositions(e);for(let n=0;n<i.length;n++){let r=i[n][0],a=i[n][1];for(let c=-1;c<=7;c++)if(!(r+c<=-1||t<=r+c))for(let f=-1;f<=7;f++)a+f<=-1||t<=a+f||(c>=0&&c<=6&&(f===0||f===6)||f>=0&&f<=6&&(c===0||c===6)||c>=2&&c<=4&&f>=2&&f<=4?o.set(r+c,a+f,!0,!0):o.set(r+c,a+f,!1,!0))}}s(Zh,"setupFinderPattern");function qh(o){let e=o.size;for(let t=8;t<e-8;t++){let i=t%2===0;o.set(t,6,i,!0),o.set(6,t,i,!0)}}s(qh,"setupTimingPattern");function Xh(o,e){let t=Hh.getPositions(e);for(let i=0;i<t.length;i++){let n=t[i][0],r=t[i][1];for(let a=-2;a<=2;a++)for(let c=-2;c<=2;c++)a===-2||a===2||c===-2||c===2||a===0&&c===0?o.set(n+a,r+c,!0,!0):o.set(n+a,r+c,!1,!0)}}s(Xh,"setupAlignmentPattern");function Jh(o,e){let t=o.size,i=as.getEncodedBits(e),n,r,a;for(let c=0;c<18;c++)n=Math.floor(c/3),r=c%3+t-8-3,a=(i>>c&1)===1,o.set(n,r,a,!0),o.set(r,n,a,!0)}s(Jh,"setupVersionInfo");function Dc(o,e,t){let i=o.size,n=Uh.getEncodedBits(e,t),r,a;for(r=0;r<15;r++)a=(n>>r&1)===1,r<6?o.set(r,8,a,!0):r<8?o.set(r+1,8,a,!0):o.set(i-15+r,8,a,!0),r<8?o.set(8,i-r-1,a,!0):r<9?o.set(8,15-r-1+1,a,!0):o.set(8,15-r-1,a,!0);o.set(i-8,8,1,!0)}s(Dc,"setupFormatInfo");function Wh(o,e){let t=o.size,i=-1,n=t-1,r=7,a=0;for(let c=t-1;c>0;c-=2)for(c===6&&c--;;){for(let f=0;f<2;f++)if(!o.isReserved(n,c-f)){let l=!1;a<e.length&&(l=(e[a]>>>r&1)===1),o.set(n,c-f,l),r--,r===-1&&(a++,r=7)}if(n+=i,n<0||t<=n){n-=i,i=-i;break}}}s(Wh,"setupData");function Kh(o,e,t){let i=new Bh;t.forEach(function(f){i.put(f.mode.bit,4),i.put(f.getLength(),Yh.getCharCountIndicator(f.mode,o)),f.write(i)});let n=ss.getSymbolTotalCodewords(o),r=Tc.getTotalCodewordsCount(o,e),a=(n-r)*8;for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);let c=(a-i.getLengthInBits())/8;for(let f=0;f<c;f++)i.put(f%2?17:236,8);return kh(i,o,e)}s(Kh,"createData");function kh(o,e,t){let i=ss.getSymbolTotalCodewords(e),n=Tc.getTotalCodewordsCount(e,t),r=i-n,a=Tc.getBlocksCount(e,t),c=i%a,f=a-c,l=Math.floor(i/a),m=Math.floor(r/a),g=m+1,S=l-m,N=new Gh(S),F=0,O=new Array(a),A=new Array(a),L=0,At=new Uint8Array(o.buffer);for(let fr=0;fr<a;fr++){let ys=fr<f?m:g;O[fr]=At.slice(F,F+ys),A[fr]=N.encode(O[fr]),F+=ys,L=Math.max(L,ys)}let bo=new Uint8Array(i),Qe=0,vt,Co;for(vt=0;vt<L;vt++)for(Co=0;Co<a;Co++)vt<O[Co].length&&(bo[Qe++]=O[Co][vt]);for(vt=0;vt<S;vt++)for(Co=0;Co<a;Co++)bo[Qe++]=A[Co][vt];return bo}s(kh,"createCodewords");function _h(o,e,t,i){let n;if(Array.isArray(o))n=Pc.fromArray(o);else if(typeof o=="string"){let l=e;if(!l){let m=Pc.rawSplit(o);l=as.getBestVersionForData(m,t)}n=Pc.fromString(o,l||40)}else throw new Error("Invalid data");let r=as.getBestVersionForData(n,t);if(!r)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=r;else if(e<r)throw new Error(`
|