nfets 0.0.65 → 0.0.66
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/dist/{chunk-TG5H65GZ.mjs → chunk-XCB2NSTT.mjs} +1 -1
- package/dist/{chunk-EF64O2NU.mjs → chunk-XGHFCC2Z.mjs} +37 -37
- package/dist/core/index.cjs +58 -58
- package/dist/core/index.mjs +1 -1
- package/dist/index.cjs +71 -71
- package/dist/index.mjs +1 -1
- package/dist/nfe/index.cjs +71 -71
- package/dist/nfe/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{A as Jp,B as _p,D as Wp,E as Kp,F as Bc,G as kp,H as ns,J as H,K as p,L as Mc,M as Hi,d as Gp,f as d,g as qp,h as y,i as Tc,j as Je,l as is,n as _e,o as G,p as Zp,q as Yp,v as Xp,w as No,y as F,z as mt}from"./chunk-
|
|
2
|
+
import{A as Jp,B as _p,D as Wp,E as Kp,F as Bc,G as kp,H as ns,J as H,K as p,L as Mc,M as Hi,d as Gp,f as d,g as qp,h as y,i as Tc,j as Je,l as is,n as _e,o as G,p as Zp,q as Yp,v as Xp,w as No,y as F,z as mt}from"./chunk-XGHFCC2Z.mjs";import{a as s,b as Re,d as C,f as Zm}from"./chunk-W6MRGYXP.mjs";var kf=C((ux,Dl)=>{"use strict";Dl.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var gn=C(Xn=>{"use strict";var $f,mg=[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];Xn.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");Xn.getSymbolTotalCodewords=s(function(e){return mg[e]},"getSymbolTotalCodewords");Xn.getBCHDigit=function(o){let e=0;for(;o!==0;)e++,o>>>=1;return e};Xn.setToSJISFunction=s(function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');$f=e},"setToSJISFunction");Xn.isKanjiModeEnabled=function(){return typeof $f<"u"};Xn.toSJIS=s(function(e){return $f(e)},"toSJIS")});var mc=C(Ut=>{"use strict";Ut.L={bit:1};Ut.M={bit:0};Ut.Q={bit:3};Ut.H={bit:2};function hg(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"l":case"low":return Ut.L;case"m":case"medium":return Ut.M;case"q":case"quartile":return Ut.Q;case"h":case"high":return Ut.H;default:throw new Error("Unknown EC Level: "+o)}}s(hg,"fromString");Ut.isValid=s(function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4},"isValid");Ut.from=s(function(e,t){if(Ut.isValid(e))return e;try{return hg(e)}catch{return t}},"from")});var Tl=C((yx,jl)=>{"use strict";function El(){this.buffer=[],this.length=0}s(El,"BitBuffer");El.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")};jl.exports=El});var Ml=C((bx,Bl)=>{"use strict";function Za(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(Za,"BitMatrix");Za.prototype.set=function(o,e,t,n){let r=o*this.size+e;this.data[r]=t,n&&(this.reservedBit[r]=!0)};Za.prototype.get=function(o,e){return this.data[o*this.size+e]};Za.prototype.xor=function(o,e,t){this.data[o*this.size+e]^=t};Za.prototype.isReserved=function(o,e){return this.reservedBit[o*this.size+e]};Bl.exports=Za});var Ll=C(hc=>{"use strict";var gg=gn().getSymbolSize;hc.getRowColCoords=s(function(e){if(e===1)return[];let t=Math.floor(e/7)+2,n=gg(e),r=n===145?26:Math.ceil((n-13)/(2*t-2))*2,i=[n-7];for(let a=1;a<t-1;a++)i[a]=i[a-1]-r;return i.push(6),i.reverse()},"getRowColCoords");hc.getPositions=s(function(e){let t=[],n=hc.getRowColCoords(e),r=n.length;for(let i=0;i<r;i++)for(let a=0;a<r;a++)i===0&&a===0||i===0&&a===r-1||i===r-1&&a===0||t.push([n[i],n[a]]);return t},"getPositions")});var Ql=C(Hl=>{"use strict";var vg=gn().getSymbolSize,Vl=7;Hl.getPositions=s(function(e){let t=vg(e);return[[0,0],[t-Vl,0],[0,t-Vl]]},"getPositions")});var Ul=C(J=>{"use strict";J.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var Jn={N1:3,N2:3,N3:40,N4:10};J.isValid=s(function(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7},"isValid");J.from=s(function(e){return J.isValid(e)?parseInt(e,10):void 0},"from");J.getPenaltyN1=s(function(e){let t=e.size,n=0,r=0,i=0,a=null,c=null;for(let f=0;f<t;f++){r=i=0,a=c=null;for(let l=0;l<t;l++){let h=e.get(f,l);h===a?r++:(r>=5&&(n+=Jn.N1+(r-5)),a=h,r=1),h=e.get(l,f),h===c?i++:(i>=5&&(n+=Jn.N1+(i-5)),c=h,i=1)}r>=5&&(n+=Jn.N1+(r-5)),i>=5&&(n+=Jn.N1+(i-5))}return n},"getPenaltyN1");J.getPenaltyN2=s(function(e){let t=e.size,n=0;for(let r=0;r<t-1;r++)for(let i=0;i<t-1;i++){let a=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);(a===4||a===0)&&n++}return n*Jn.N2},"getPenaltyN2");J.getPenaltyN3=s(function(e){let t=e.size,n=0,r=0,i=0;for(let a=0;a<t;a++){r=i=0;for(let c=0;c<t;c++)r=r<<1&2047|e.get(a,c),c>=10&&(r===1488||r===93)&&n++,i=i<<1&2047|e.get(c,a),c>=10&&(i===1488||i===93)&&n++}return n*Jn.N3},"getPenaltyN3");J.getPenaltyN4=s(function(e){let t=0,n=e.data.length;for(let i=0;i<n;i++)t+=e.data[i];return Math.abs(Math.ceil(t*100/n/5)-10)*Jn.N4},"getPenaltyN4");function yg(o,e,t){switch(o){case J.Patterns.PATTERN000:return(e+t)%2===0;case J.Patterns.PATTERN001:return e%2===0;case J.Patterns.PATTERN010:return t%3===0;case J.Patterns.PATTERN011:return(e+t)%3===0;case J.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(t/3))%2===0;case J.Patterns.PATTERN101:return e*t%2+e*t%3===0;case J.Patterns.PATTERN110:return(e*t%2+e*t%3)%2===0;case J.Patterns.PATTERN111:return(e*t%3+(e+t)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}s(yg,"getMaskAt");J.applyMask=s(function(e,t){let n=t.size;for(let r=0;r<n;r++)for(let i=0;i<n;i++)t.isReserved(i,r)||t.xor(i,r,yg(e,i,r))},"applyMask");J.getBestMask=s(function(e,t){let n=Object.keys(J.Patterns).length,r=0,i=1/0;for(let a=0;a<n;a++){t(a),J.applyMask(a,e);let c=J.getPenaltyN1(e)+J.getPenaltyN2(e)+J.getPenaltyN3(e)+J.getPenaltyN4(e);J.applyMask(a,e),c<i&&(i=c,r=a)}return r},"getBestMask")});var tp=C(ep=>{"use strict";var vn=mc(),gc=[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],vc=[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];ep.getBlocksCount=s(function(e,t){switch(t){case vn.L:return gc[(e-1)*4+0];case vn.M:return gc[(e-1)*4+1];case vn.Q:return gc[(e-1)*4+2];case vn.H:return gc[(e-1)*4+3];default:return}},"getBlocksCount");ep.getTotalCodewordsCount=s(function(e,t){switch(t){case vn.L:return vc[(e-1)*4+0];case vn.M:return vc[(e-1)*4+1];case vn.Q:return vc[(e-1)*4+2];case vn.H:return vc[(e-1)*4+3];default:return}},"getTotalCodewordsCount")});var Gl=C(Sc=>{"use strict";var Ya=new Uint8Array(512),yc=new Uint8Array(256);s((function(){let e=1;for(let t=0;t<255;t++)Ya[t]=e,yc[e]=t,e<<=1,e&256&&(e^=285);for(let t=255;t<512;t++)Ya[t]=Ya[t-255]}),"initTables")();Sc.log=s(function(e){if(e<1)throw new Error("log("+e+")");return yc[e]},"log");Sc.exp=s(function(e){return Ya[e]},"exp");Sc.mul=s(function(e,t){return e===0||t===0?0:Ya[yc[e]+yc[t]]},"mul")});var ql=C(Xa=>{"use strict";var op=Gl();Xa.mul=s(function(e,t){let n=new Uint8Array(e.length+t.length-1);for(let r=0;r<e.length;r++)for(let i=0;i<t.length;i++)n[r+i]^=op.mul(e[r],t[i]);return n},"mul");Xa.mod=s(function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){let r=n[0];for(let a=0;a<t.length;a++)n[a]^=op.mul(t[a],r);let i=0;for(;i<n.length&&n[i]===0;)i++;n=n.slice(i)}return n},"mod");Xa.generateECPolynomial=s(function(e){let t=new Uint8Array([1]);for(let n=0;n<e;n++)t=Xa.mul(t,new Uint8Array([1,op.exp(n)]));return t},"generateECPolynomial")});var Xl=C((jx,Yl)=>{"use strict";var Zl=ql();function ip(o){this.genPoly=void 0,this.degree=o,this.degree&&this.initialize(this.degree)}s(ip,"ReedSolomonEncoder");ip.prototype.initialize=s(function(e){this.degree=e,this.genPoly=Zl.generateECPolynomial(this.degree)},"initialize");ip.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 n=Zl.mod(t,this.genPoly),r=this.degree-n.length;if(r>0){let i=new Uint8Array(this.degree);return i.set(n,r),i}return n},"encode");Yl.exports=ip});var np=C(Jl=>{"use strict";Jl.isValid=s(function(e){return!isNaN(e)&&e>=1&&e<=40},"isValid")});var rp=C(Vi=>{"use strict";var _l="[0-9]+",Sg="[A-Z $%*+\\-./:]+",Ja="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ja=Ja.replace(/u/g,"\\u");var bg="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ja+`)(?:.|[\r
|
|
3
3
|
]))+`;Vi.KANJI=new RegExp(Ja,"g");Vi.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Vi.BYTE=new RegExp(bg,"g");Vi.NUMERIC=new RegExp(_l,"g");Vi.ALPHANUMERIC=new RegExp(Sg,"g");var Cg=new RegExp("^"+Ja+"$"),Ng=new RegExp("^"+_l+"$"),Rg=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Vi.testKanji=s(function(e){return Cg.test(e)},"testKanji");Vi.testNumeric=s(function(e){return Ng.test(e)},"testNumeric");Vi.testAlphanumeric=s(function(e){return Rg.test(e)},"testAlphanumeric")});var yn=C(Ne=>{"use strict";var Ig=np(),ap=rp();Ne.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};Ne.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};Ne.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};Ne.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};Ne.MIXED={bit:-1};Ne.getCharCountIndicator=s(function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!Ig.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");Ne.getBestModeForData=s(function(e){return ap.testNumeric(e)?Ne.NUMERIC:ap.testAlphanumeric(e)?Ne.ALPHANUMERIC:ap.testKanji(e)?Ne.KANJI:Ne.BYTE},"getBestModeForData");Ne.toString=s(function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},"toString");Ne.isValid=s(function(e){return e&&e.bit&&e.ccBits},"isValid");function Fg(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return Ne.NUMERIC;case"alphanumeric":return Ne.ALPHANUMERIC;case"kanji":return Ne.KANJI;case"byte":return Ne.BYTE;default:throw new Error("Unknown mode: "+o)}}s(Fg,"fromString");Ne.from=s(function(e,t){if(Ne.isValid(e))return e;try{return Fg(e)}catch{return t}},"from")});var eu=C(_n=>{"use strict";var bc=gn(),wg=tp(),Wl=mc(),Sn=yn(),sp=np(),kl=7973,Kl=bc.getBCHDigit(kl);function Og(o,e,t){for(let n=1;n<=40;n++)if(e<=_n.getCapacity(n,t,o))return n}s(Og,"getBestVersionForDataLength");function $l(o,e){return Sn.getCharCountIndicator(o,e)+4}s($l,"getReservedBitsCount");function xg(o,e){let t=0;return o.forEach(function(n){let r=$l(n.mode,e);t+=r+n.getBitsLength()}),t}s(xg,"getTotalBitsFromDataArray");function zg(o,e){for(let t=1;t<=40;t++)if(xg(o,t)<=_n.getCapacity(t,e,Sn.MIXED))return t}s(zg,"getBestVersionForMixedData");_n.from=s(function(e,t){return sp.isValid(e)?parseInt(e,10):t},"from");_n.getCapacity=s(function(e,t,n){if(!sp.isValid(e))throw new Error("Invalid QR Code version");typeof n>"u"&&(n=Sn.BYTE);let r=bc.getSymbolTotalCodewords(e),i=wg.getTotalCodewordsCount(e,t),a=(r-i)*8;if(n===Sn.MIXED)return a;let c=a-$l(n,e);switch(n){case Sn.NUMERIC:return Math.floor(c/10*3);case Sn.ALPHANUMERIC:return Math.floor(c/11*2);case Sn.KANJI:return Math.floor(c/13);case Sn.BYTE:default:return Math.floor(c/8)}},"getCapacity");_n.getBestVersionForData=s(function(e,t){let n,r=Wl.from(t,Wl.M);if(Array.isArray(e)){if(e.length>1)return zg(e,r);if(e.length===0)return 1;n=e[0]}else n=e;return Og(n.mode,n.getLength(),r)},"getBestVersionForData");_n.getEncodedBits=s(function(e){if(!sp.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;bc.getBCHDigit(t)-Kl>=0;)t^=kl<<bc.getBCHDigit(t)-Kl;return e<<12|t},"getEncodedBits")});var nu=C(iu=>{"use strict";var cp=gn(),ou=1335,Ag=21522,tu=cp.getBCHDigit(ou);iu.getEncodedBits=s(function(e,t){let n=e.bit<<3|t,r=n<<10;for(;cp.getBCHDigit(r)-tu>=0;)r^=ou<<cp.getBCHDigit(r)-tu;return(n<<10|r)^Ag},"getEncodedBits")});var au=C((Yx,ru)=>{"use strict";var Pg=yn();function Wr(o){this.mode=Pg.NUMERIC,this.data=o.toString()}s(Wr,"NumericData");Wr.getBitsLength=s(function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},"getBitsLength");Wr.prototype.getLength=s(function(){return this.data.length},"getLength");Wr.prototype.getBitsLength=s(function(){return Wr.getBitsLength(this.data.length)},"getBitsLength");Wr.prototype.write=s(function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},"write");ru.exports=Wr});var cu=C((Jx,su)=>{"use strict";var Dg=yn(),fp=["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 Kr(o){this.mode=Dg.ALPHANUMERIC,this.data=o}s(Kr,"AlphanumericData");Kr.getBitsLength=s(function(e){return 11*Math.floor(e/2)+6*(e%2)},"getBitsLength");Kr.prototype.getLength=s(function(){return this.data.length},"getLength");Kr.prototype.getBitsLength=s(function(){return Kr.getBitsLength(this.data.length)},"getBitsLength");Kr.prototype.write=s(function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=fp.indexOf(this.data[t])*45;n+=fp.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(fp.indexOf(this.data[t]),6)},"write");su.exports=Kr});var pu=C((Wx,fu)=>{"use strict";var Eg=yn();function kr(o){this.mode=Eg.BYTE,typeof o=="string"?this.data=new TextEncoder().encode(o):this.data=new Uint8Array(o)}s(kr,"ByteData");kr.getBitsLength=s(function(e){return e*8},"getBitsLength");kr.prototype.getLength=s(function(){return this.data.length},"getLength");kr.prototype.getBitsLength=s(function(){return kr.getBitsLength(this.data.length)},"getBitsLength");kr.prototype.write=function(o){for(let e=0,t=this.data.length;e<t;e++)o.put(this.data[e],8)};fu.exports=kr});var lu=C((kx,du)=>{"use strict";var jg=yn(),Tg=gn();function $r(o){this.mode=jg.KANJI,this.data=o}s($r,"KanjiData");$r.getBitsLength=s(function(e){return e*13},"getBitsLength");$r.prototype.getLength=s(function(){return this.data.length},"getLength");$r.prototype.getBitsLength=s(function(){return $r.getBitsLength(this.data.length)},"getBitsLength");$r.prototype.write=function(o){let e;for(e=0;e<this.data.length;e++){let t=Tg.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)}};du.exports=$r});var uu=C((ez,pp)=>{"use strict";var _a={single_source_shortest_paths:s(function(o,e,t){var n={},r={};r[e]=0;var i=_a.PriorityQueue.make();i.push(e,0);for(var a,c,f,l,h,g,S,b,I;!i.empty();){a=i.pop(),c=a.value,l=a.cost,h=o[c]||{};for(f in h)h.hasOwnProperty(f)&&(g=h[f],S=l+g,b=r[f],I=typeof r[f]>"u",(I||b>S)&&(r[f]=S,i.push(f,S),n[f]=c))}if(typeof t<"u"&&typeof r[t]>"u"){var A=["Could not find a path from ",e," to ",t,"."].join("");throw new Error(A)}return n},"single_source_shortest_paths"),extract_shortest_path_from_predecessor_list:s(function(o,e){for(var t=[],n=e,r;n;)t.push(n),r=o[n],n=o[n];return t.reverse(),t},"extract_shortest_path_from_predecessor_list"),find_path:s(function(o,e,t){var n=_a.single_source_shortest_paths(o,e,t);return _a.extract_shortest_path_from_predecessor_list(n,t)},"find_path"),PriorityQueue:{make:s(function(o){var e=_a.PriorityQueue,t={},n;o=o||{};for(n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);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 pp<"u"&&(pp.exports=_a)});var Cu=C(ea=>{"use strict";var V=yn(),gu=au(),vu=cu(),yu=pu(),Su=lu(),Wa=rp(),Cc=gn(),Bg=uu();function mu(o){return unescape(encodeURIComponent(o)).length}s(mu,"getStringByteLength");function Ka(o,e,t){let n=[],r;for(;(r=o.exec(t))!==null;)n.push({data:r[0],index:r.index,mode:e,length:r[0].length});return n}s(Ka,"getSegments");function bu(o){let e=Ka(Wa.NUMERIC,V.NUMERIC,o),t=Ka(Wa.ALPHANUMERIC,V.ALPHANUMERIC,o),n,r;return Cc.isKanjiModeEnabled()?(n=Ka(Wa.BYTE,V.BYTE,o),r=Ka(Wa.KANJI,V.KANJI,o)):(n=Ka(Wa.BYTE_KANJI,V.BYTE,o),r=[]),e.concat(t,n,r).sort(function(a,c){return a.index-c.index}).map(function(a){return{data:a.data,mode:a.mode,length:a.length}})}s(bu,"getSegmentsFromString");function dp(o,e){switch(e){case V.NUMERIC:return gu.getBitsLength(o);case V.ALPHANUMERIC:return vu.getBitsLength(o);case V.KANJI:return Su.getBitsLength(o);case V.BYTE:return yu.getBitsLength(o)}}s(dp,"getSegmentBitsLength");function Mg(o){return o.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}s(Mg,"mergeSegments");function Lg(o){let e=[];for(let t=0;t<o.length;t++){let n=o[t];switch(n.mode){case V.NUMERIC:e.push([n,{data:n.data,mode:V.ALPHANUMERIC,length:n.length},{data:n.data,mode:V.BYTE,length:n.length}]);break;case V.ALPHANUMERIC:e.push([n,{data:n.data,mode:V.BYTE,length:n.length}]);break;case V.KANJI:e.push([n,{data:n.data,mode:V.BYTE,length:mu(n.data)}]);break;case V.BYTE:e.push([{data:n.data,mode:V.BYTE,length:mu(n.data)}])}}return e}s(Lg,"buildNodes");function Vg(o,e){let t={},n={start:{}},r=["start"];for(let i=0;i<o.length;i++){let a=o[i],c=[];for(let f=0;f<a.length;f++){let l=a[f],h=""+i+f;c.push(h),t[h]={node:l,lastCount:0},n[h]={};for(let g=0;g<r.length;g++){let S=r[g];t[S]&&t[S].node.mode===l.mode?(n[S][h]=dp(t[S].lastCount+l.length,l.mode)-dp(t[S].lastCount,l.mode),t[S].lastCount+=l.length):(t[S]&&(t[S].lastCount=l.length),n[S][h]=dp(l.length,l.mode)+4+V.getCharCountIndicator(l.mode,e))}}r=c}for(let i=0;i<r.length;i++)n[r[i]].end=0;return{map:n,table:t}}s(Vg,"buildGraph");function hu(o,e){let t,n=V.getBestModeForData(o);if(t=V.from(e,n),t!==V.BYTE&&t.bit<n.bit)throw new Error('"'+o+'" cannot be encoded with mode '+V.toString(t)+`.
|
|
5
5
|
Suggested mode is: `+V.toString(n));switch(t===V.KANJI&&!Cc.isKanjiModeEnabled()&&(t=V.BYTE),t){case V.NUMERIC:return new gu(o);case V.ALPHANUMERIC:return new vu(o);case V.KANJI:return new Su(o);case V.BYTE:return new yu(o)}}s(hu,"buildSingleSegment");ea.fromArray=s(function(e){return e.reduce(function(t,n){return typeof n=="string"?t.push(hu(n,null)):n.data&&t.push(hu(n.data,n.mode)),t},[])},"fromArray");ea.fromString=s(function(e,t){let n=bu(e,Cc.isKanjiModeEnabled()),r=Lg(n),i=Vg(r,t),a=Bg.find_path(i.map,"start","end"),c=[];for(let f=1;f<a.length-1;f++)c.push(i.table[a[f]].node);return ea.fromArray(Mg(c))},"fromString");ea.rawSplit=s(function(e){return ea.fromArray(bu(e,Cc.isKanjiModeEnabled()))},"rawSplit")});var vp=C(Nu=>{"use strict";var Rc=gn(),lp=mc(),Hg=Tl(),Qg=Ml(),Ug=Ll(),Gg=Ql(),hp=Ul(),gp=tp(),qg=Xl(),Nc=eu(),Zg=nu(),Yg=yn(),up=Cu();function Xg(o,e){let t=o.size,n=Gg.getPositions(e);for(let r=0;r<n.length;r++){let i=n[r][0],a=n[r][1];for(let c=-1;c<=7;c++)if(!(i+c<=-1||t<=i+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(i+c,a+f,!0,!0):o.set(i+c,a+f,!1,!0))}}s(Xg,"setupFinderPattern");function Jg(o){let e=o.size;for(let t=8;t<e-8;t++){let n=t%2===0;o.set(t,6,n,!0),o.set(6,t,n,!0)}}s(Jg,"setupTimingPattern");function _g(o,e){let t=Ug.getPositions(e);for(let n=0;n<t.length;n++){let r=t[n][0],i=t[n][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(r+a,i+c,!0,!0):o.set(r+a,i+c,!1,!0)}}s(_g,"setupAlignmentPattern");function Wg(o,e){let t=o.size,n=Nc.getEncodedBits(e),r,i,a;for(let c=0;c<18;c++)r=Math.floor(c/3),i=c%3+t-8-3,a=(n>>c&1)===1,o.set(r,i,a,!0),o.set(i,r,a,!0)}s(Wg,"setupVersionInfo");function mp(o,e,t){let n=o.size,r=Zg.getEncodedBits(e,t),i,a;for(i=0;i<15;i++)a=(r>>i&1)===1,i<6?o.set(i,8,a,!0):i<8?o.set(i+1,8,a,!0):o.set(n-15+i,8,a,!0),i<8?o.set(8,n-i-1,a,!0):i<9?o.set(8,15-i-1+1,a,!0):o.set(8,15-i-1,a,!0);o.set(n-8,8,1,!0)}s(mp,"setupFormatInfo");function Kg(o,e){let t=o.size,n=-1,r=t-1,i=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(r,c-f)){let l=!1;a<e.length&&(l=(e[a]>>>i&1)===1),o.set(r,c-f,l),i--,i===-1&&(a++,i=7)}if(r+=n,r<0||t<=r){r-=n,n=-n;break}}}s(Kg,"setupData");function kg(o,e,t){let n=new Hg;t.forEach(function(f){n.put(f.mode.bit,4),n.put(f.getLength(),Yg.getCharCountIndicator(f.mode,o)),f.write(n)});let r=Rc.getSymbolTotalCodewords(o),i=gp.getTotalCodewordsCount(o,e),a=(r-i)*8;for(n.getLengthInBits()+4<=a&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);let c=(a-n.getLengthInBits())/8;for(let f=0;f<c;f++)n.put(f%2?17:236,8);return $g(n,o,e)}s(kg,"createData");function $g(o,e,t){let n=Rc.getSymbolTotalCodewords(e),r=gp.getTotalCodewordsCount(e,t),i=n-r,a=gp.getBlocksCount(e,t),c=n%a,f=a-c,l=Math.floor(n/a),h=Math.floor(i/a),g=h+1,S=l-h,b=new qg(S),I=0,A=new Array(a),z=new Array(a),M=0,qt=new Uint8Array(o.buffer);for(let $n=0;$n<a;$n++){let jc=$n<f?h:g;A[$n]=qt.slice(I,I+jc),z[$n]=b.encode(A[$n]),I+=jc,M=Math.max(M,jc)}let Yo=new Uint8Array(n),Xe=0,zt,Xo;for(zt=0;zt<M;zt++)for(Xo=0;Xo<a;Xo++)zt<A[Xo].length&&(Yo[Xe++]=A[Xo][zt]);for(zt=0;zt<S;zt++)for(Xo=0;Xo<a;Xo++)Yo[Xe++]=z[Xo][zt];return Yo}s($g,"createCodewords");function ev(o,e,t,n){let r;if(Array.isArray(o))r=up.fromArray(o);else if(typeof o=="string"){let l=e;if(!l){let h=up.rawSplit(o);l=Nc.getBestVersionForData(h,t)}r=up.fromString(o,l||40)}else throw new Error("Invalid data");let i=Nc.getBestVersionForData(r,t);if(!i)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=i;else if(e<i)throw new Error(`
|