nfets 0.0.78 → 0.0.79

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.
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{A as Xp,B as Jp,C as _p,E as Wp,F as Kp,G as Vc,H as kp,I as cs,K as H,L as p,M as Hc,N as Vi,d as Up,f as d,g as Gp,h as y,i as Lc,j as _e,l as ss,n as We,o as G,p as qp,q as Zp,v as Yp,w as No,y as F,z as k}from"./chunk-Q5JCTIBQ.mjs";import{a as s,b as Ie,d as C,f as Zm}from"./chunk-W6MRGYXP.mjs";var Kf=C((mx,Dl)=>{"use strict";Dl.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var gn=C(Xn=>{"use strict";var kf,mh=[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 mh[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.');kf=e},"setToSJISFunction");Xn.isKanjiModeEnabled=function(){return typeof kf<"u"};Xn.toSJIS=s(function(e){return kf(e)},"toSJIS")});var yc=C(Gt=>{"use strict";Gt.L={bit:1};Gt.M={bit:0};Gt.Q={bit:3};Gt.H={bit:2};function gh(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"l":case"low":return Gt.L;case"m":case"medium":return Gt.M;case"q":case"quartile":return Gt.Q;case"h":case"high":return Gt.H;default:throw new Error("Unknown EC Level: "+o)}}s(gh,"fromString");Gt.isValid=s(function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4},"isValid");Gt.from=s(function(e,t){if(Gt.isValid(e))return e;try{return gh(e)}catch{return t}},"from")});var Tl=C((Sx,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((Cx,Bl)=>{"use strict";function _a(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(_a,"BitMatrix");_a.prototype.set=function(o,e,t,n){let r=o*this.size+e;this.data[r]=t,n&&(this.reservedBit[r]=!0)};_a.prototype.get=function(o,e){return this.data[o*this.size+e]};_a.prototype.xor=function(o,e,t){this.data[o*this.size+e]^=t};_a.prototype.isReserved=function(o,e){return this.reservedBit[o*this.size+e]};Bl.exports=_a});var Ll=C(Sc=>{"use strict";var hh=gn().getSymbolSize;Sc.getRowColCoords=s(function(e){if(e===1)return[];let t=Math.floor(e/7)+2,n=hh(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");Sc.getPositions=s(function(e){let t=[],n=Sc.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 vh=gn().getSymbolSize,Vl=7;Hl.getPositions=s(function(e){let t=vh(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 g=e.get(f,l);g===a?r++:(r>=5&&(n+=Jn.N1+(r-5)),a=g,r=1),g=e.get(l,f),g===c?i++:(i>=5&&(n+=Jn.N1+(i-5)),c=g,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 yh(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(yh,"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,yh(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 ep=C($f=>{"use strict";var hn=yc(),bc=[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],Cc=[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];$f.getBlocksCount=s(function(e,t){switch(t){case hn.L:return bc[(e-1)*4+0];case hn.M:return bc[(e-1)*4+1];case hn.Q:return bc[(e-1)*4+2];case hn.H:return bc[(e-1)*4+3];default:return}},"getBlocksCount");$f.getTotalCodewordsCount=s(function(e,t){switch(t){case hn.L:return Cc[(e-1)*4+0];case hn.M:return Cc[(e-1)*4+1];case hn.Q:return Cc[(e-1)*4+2];case hn.H:return Cc[(e-1)*4+3];default:return}},"getTotalCodewordsCount")});var Gl=C(Rc=>{"use strict";var Wa=new Uint8Array(512),Nc=new Uint8Array(256);s((function(){let e=1;for(let t=0;t<255;t++)Wa[t]=e,Nc[e]=t,e<<=1,e&256&&(e^=285);for(let t=255;t<512;t++)Wa[t]=Wa[t-255]}),"initTables")();Rc.log=s(function(e){if(e<1)throw new Error("log("+e+")");return Nc[e]},"log");Rc.exp=s(function(e){return Wa[e]},"exp");Rc.mul=s(function(e,t){return e===0||t===0?0:Wa[Nc[e]+Nc[t]]},"mul")});var ql=C(Ka=>{"use strict";var tp=Gl();Ka.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]^=tp.mul(e[r],t[i]);return n},"mul");Ka.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]^=tp.mul(t[a],r);let i=0;for(;i<n.length&&n[i]===0;)i++;n=n.slice(i)}return n},"mod");Ka.generateECPolynomial=s(function(e){let t=new Uint8Array([1]);for(let n=0;n<e;n++)t=Ka.mul(t,new Uint8Array([1,tp.exp(n)]));return t},"generateECPolynomial")});var Xl=C((Tx,Yl)=>{"use strict";var Zl=ql();function op(o){this.genPoly=void 0,this.degree=o,this.degree&&this.initialize(this.degree)}s(op,"ReedSolomonEncoder");op.prototype.initialize=s(function(e){this.degree=e,this.genPoly=Zl.generateECPolynomial(this.degree)},"initialize");op.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=op});var ip=C(Jl=>{"use strict";Jl.isValid=s(function(e){return!isNaN(e)&&e>=1&&e<=40},"isValid")});var np=C(Li=>{"use strict";var _l="[0-9]+",Sh="[A-Z $%*+\\-./:]+",ka="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ka=ka.replace(/u/g,"\\u");var bh="(?:(?![A-Z0-9 $%*+\\-./:]|"+ka+`)(?:.|[\r
2
+ import{A as Xp,B as Jp,C as _p,E as Wp,F as Kp,G as Vc,H as kp,I as cs,K as H,L as p,M as Hc,N as Vi,d as Up,f as d,g as Gp,h as y,i as Lc,j as _e,l as ss,n as We,o as G,p as qp,q as Zp,v as Yp,w as No,y as F,z as k}from"./chunk-4WBTBSE6.mjs";import{a as s,b as Ie,d as C,f as Zm}from"./chunk-W6MRGYXP.mjs";var Kf=C((mx,Dl)=>{"use strict";Dl.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var gn=C(Xn=>{"use strict";var kf,mh=[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 mh[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.');kf=e},"setToSJISFunction");Xn.isKanjiModeEnabled=function(){return typeof kf<"u"};Xn.toSJIS=s(function(e){return kf(e)},"toSJIS")});var yc=C(Gt=>{"use strict";Gt.L={bit:1};Gt.M={bit:0};Gt.Q={bit:3};Gt.H={bit:2};function gh(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"l":case"low":return Gt.L;case"m":case"medium":return Gt.M;case"q":case"quartile":return Gt.Q;case"h":case"high":return Gt.H;default:throw new Error("Unknown EC Level: "+o)}}s(gh,"fromString");Gt.isValid=s(function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4},"isValid");Gt.from=s(function(e,t){if(Gt.isValid(e))return e;try{return gh(e)}catch{return t}},"from")});var Tl=C((Sx,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((Cx,Bl)=>{"use strict";function _a(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(_a,"BitMatrix");_a.prototype.set=function(o,e,t,n){let r=o*this.size+e;this.data[r]=t,n&&(this.reservedBit[r]=!0)};_a.prototype.get=function(o,e){return this.data[o*this.size+e]};_a.prototype.xor=function(o,e,t){this.data[o*this.size+e]^=t};_a.prototype.isReserved=function(o,e){return this.reservedBit[o*this.size+e]};Bl.exports=_a});var Ll=C(Sc=>{"use strict";var hh=gn().getSymbolSize;Sc.getRowColCoords=s(function(e){if(e===1)return[];let t=Math.floor(e/7)+2,n=hh(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");Sc.getPositions=s(function(e){let t=[],n=Sc.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 vh=gn().getSymbolSize,Vl=7;Hl.getPositions=s(function(e){let t=vh(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 g=e.get(f,l);g===a?r++:(r>=5&&(n+=Jn.N1+(r-5)),a=g,r=1),g=e.get(l,f),g===c?i++:(i>=5&&(n+=Jn.N1+(i-5)),c=g,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 yh(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(yh,"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,yh(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 ep=C($f=>{"use strict";var hn=yc(),bc=[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],Cc=[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];$f.getBlocksCount=s(function(e,t){switch(t){case hn.L:return bc[(e-1)*4+0];case hn.M:return bc[(e-1)*4+1];case hn.Q:return bc[(e-1)*4+2];case hn.H:return bc[(e-1)*4+3];default:return}},"getBlocksCount");$f.getTotalCodewordsCount=s(function(e,t){switch(t){case hn.L:return Cc[(e-1)*4+0];case hn.M:return Cc[(e-1)*4+1];case hn.Q:return Cc[(e-1)*4+2];case hn.H:return Cc[(e-1)*4+3];default:return}},"getTotalCodewordsCount")});var Gl=C(Rc=>{"use strict";var Wa=new Uint8Array(512),Nc=new Uint8Array(256);s((function(){let e=1;for(let t=0;t<255;t++)Wa[t]=e,Nc[e]=t,e<<=1,e&256&&(e^=285);for(let t=255;t<512;t++)Wa[t]=Wa[t-255]}),"initTables")();Rc.log=s(function(e){if(e<1)throw new Error("log("+e+")");return Nc[e]},"log");Rc.exp=s(function(e){return Wa[e]},"exp");Rc.mul=s(function(e,t){return e===0||t===0?0:Wa[Nc[e]+Nc[t]]},"mul")});var ql=C(Ka=>{"use strict";var tp=Gl();Ka.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]^=tp.mul(e[r],t[i]);return n},"mul");Ka.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]^=tp.mul(t[a],r);let i=0;for(;i<n.length&&n[i]===0;)i++;n=n.slice(i)}return n},"mod");Ka.generateECPolynomial=s(function(e){let t=new Uint8Array([1]);for(let n=0;n<e;n++)t=Ka.mul(t,new Uint8Array([1,tp.exp(n)]));return t},"generateECPolynomial")});var Xl=C((Tx,Yl)=>{"use strict";var Zl=ql();function op(o){this.genPoly=void 0,this.degree=o,this.degree&&this.initialize(this.degree)}s(op,"ReedSolomonEncoder");op.prototype.initialize=s(function(e){this.degree=e,this.genPoly=Zl.generateECPolynomial(this.degree)},"initialize");op.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=op});var ip=C(Jl=>{"use strict";Jl.isValid=s(function(e){return!isNaN(e)&&e>=1&&e<=40},"isValid")});var np=C(Li=>{"use strict";var _l="[0-9]+",Sh="[A-Z $%*+\\-./:]+",ka="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ka=ka.replace(/u/g,"\\u");var bh="(?:(?![A-Z0-9 $%*+\\-./:]|"+ka+`)(?:.|[\r
3
3
  ]))+`;Li.KANJI=new RegExp(ka,"g");Li.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Li.BYTE=new RegExp(bh,"g");Li.NUMERIC=new RegExp(_l,"g");Li.ALPHANUMERIC=new RegExp(Sh,"g");var Ch=new RegExp("^"+ka+"$"),Nh=new RegExp("^"+_l+"$"),Rh=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Li.testKanji=s(function(e){return Ch.test(e)},"testKanji");Li.testNumeric=s(function(e){return Nh.test(e)},"testNumeric");Li.testAlphanumeric=s(function(e){return Rh.test(e)},"testAlphanumeric")});var vn=C(Re=>{"use strict";var Ih=ip(),rp=np();Re.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};Re.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};Re.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};Re.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};Re.MIXED={bit:-1};Re.getCharCountIndicator=s(function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!Ih.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");Re.getBestModeForData=s(function(e){return rp.testNumeric(e)?Re.NUMERIC:rp.testAlphanumeric(e)?Re.ALPHANUMERIC:rp.testKanji(e)?Re.KANJI:Re.BYTE},"getBestModeForData");Re.toString=s(function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},"toString");Re.isValid=s(function(e){return e&&e.bit&&e.ccBits},"isValid");function Fh(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return Re.NUMERIC;case"alphanumeric":return Re.ALPHANUMERIC;case"kanji":return Re.KANJI;case"byte":return Re.BYTE;default:throw new Error("Unknown mode: "+o)}}s(Fh,"fromString");Re.from=s(function(e,t){if(Re.isValid(e))return e;try{return Fh(e)}catch{return t}},"from")});var eu=C(_n=>{"use strict";var Ic=gn(),Oh=ep(),Wl=yc(),yn=vn(),ap=ip(),kl=7973,Kl=Ic.getBCHDigit(kl);function wh(o,e,t){for(let n=1;n<=40;n++)if(e<=_n.getCapacity(n,t,o))return n}s(wh,"getBestVersionForDataLength");function $l(o,e){return yn.getCharCountIndicator(o,e)+4}s($l,"getReservedBitsCount");function xh(o,e){let t=0;return o.forEach(function(n){let r=$l(n.mode,e);t+=r+n.getBitsLength()}),t}s(xh,"getTotalBitsFromDataArray");function zh(o,e){for(let t=1;t<=40;t++)if(xh(o,t)<=_n.getCapacity(t,e,yn.MIXED))return t}s(zh,"getBestVersionForMixedData");_n.from=s(function(e,t){return ap.isValid(e)?parseInt(e,10):t},"from");_n.getCapacity=s(function(e,t,n){if(!ap.isValid(e))throw new Error("Invalid QR Code version");typeof n>"u"&&(n=yn.BYTE);let r=Ic.getSymbolTotalCodewords(e),i=Oh.getTotalCodewordsCount(e,t),a=(r-i)*8;if(n===yn.MIXED)return a;let c=a-$l(n,e);switch(n){case yn.NUMERIC:return Math.floor(c/10*3);case yn.ALPHANUMERIC:return Math.floor(c/11*2);case yn.KANJI:return Math.floor(c/13);case yn.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 zh(e,r);if(e.length===0)return 1;n=e[0]}else n=e;return wh(n.mode,n.getLength(),r)},"getBestVersionForData");_n.getEncodedBits=s(function(e){if(!ap.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;Ic.getBCHDigit(t)-Kl>=0;)t^=kl<<Ic.getBCHDigit(t)-Kl;return e<<12|t},"getEncodedBits")});var nu=C(iu=>{"use strict";var sp=gn(),ou=1335,Ah=21522,tu=sp.getBCHDigit(ou);iu.getEncodedBits=s(function(e,t){let n=e.bit<<3|t,r=n<<10;for(;sp.getBCHDigit(r)-tu>=0;)r^=ou<<sp.getBCHDigit(r)-tu;return(n<<10|r)^Ah},"getEncodedBits")});var au=C((Xx,ru)=>{"use strict";var Ph=vn();function ea(o){this.mode=Ph.NUMERIC,this.data=o.toString()}s(ea,"NumericData");ea.getBitsLength=s(function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},"getBitsLength");ea.prototype.getLength=s(function(){return this.data.length},"getLength");ea.prototype.getBitsLength=s(function(){return ea.getBitsLength(this.data.length)},"getBitsLength");ea.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=ea});var cu=C((_x,su)=>{"use strict";var Dh=vn(),cp=["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 ta(o){this.mode=Dh.ALPHANUMERIC,this.data=o}s(ta,"AlphanumericData");ta.getBitsLength=s(function(e){return 11*Math.floor(e/2)+6*(e%2)},"getBitsLength");ta.prototype.getLength=s(function(){return this.data.length},"getLength");ta.prototype.getBitsLength=s(function(){return ta.getBitsLength(this.data.length)},"getBitsLength");ta.prototype.write=s(function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=cp.indexOf(this.data[t])*45;n+=cp.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(cp.indexOf(this.data[t]),6)},"write");su.exports=ta});var pu=C((Kx,fu)=>{"use strict";var Eh=vn();function oa(o){this.mode=Eh.BYTE,typeof o=="string"?this.data=new TextEncoder().encode(o):this.data=new Uint8Array(o)}s(oa,"ByteData");oa.getBitsLength=s(function(e){return e*8},"getBitsLength");oa.prototype.getLength=s(function(){return this.data.length},"getLength");oa.prototype.getBitsLength=s(function(){return oa.getBitsLength(this.data.length)},"getBitsLength");oa.prototype.write=function(o){for(let e=0,t=this.data.length;e<t;e++)o.put(this.data[e],8)};fu.exports=oa});var lu=C(($x,du)=>{"use strict";var jh=vn(),Th=gn();function ia(o){this.mode=jh.KANJI,this.data=o}s(ia,"KanjiData");ia.getBitsLength=s(function(e){return e*13},"getBitsLength");ia.prototype.getLength=s(function(){return this.data.length},"getLength");ia.prototype.getBitsLength=s(function(){return ia.getBitsLength(this.data.length)},"getBitsLength");ia.prototype.write=function(o){let e;for(e=0;e<this.data.length;e++){let t=Th.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=ia});var uu=C((tz,fp)=>{"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,g,h,S,b,I;!i.empty();){a=i.pop(),c=a.value,l=a.cost,g=o[c]||{};for(f in g)g.hasOwnProperty(f)&&(h=g[f],S=l+h,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 j=["Could not find a path from ",e," to ",t,"."].join("");throw new Error(j)}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 fp<"u"&&(fp.exports=$a)});var Cu=C(na=>{"use strict";var V=vn(),hu=au(),vu=cu(),yu=pu(),Su=lu(),es=np(),Fc=gn(),Bh=uu();function mu(o){return unescape(encodeURIComponent(o)).length}s(mu,"getStringByteLength");function ts(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(ts,"getSegments");function bu(o){let e=ts(es.NUMERIC,V.NUMERIC,o),t=ts(es.ALPHANUMERIC,V.ALPHANUMERIC,o),n,r;return Fc.isKanjiModeEnabled()?(n=ts(es.BYTE,V.BYTE,o),r=ts(es.KANJI,V.KANJI,o)):(n=ts(es.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 pp(o,e){switch(e){case V.NUMERIC:return hu.getBitsLength(o);case V.ALPHANUMERIC:return vu.getBitsLength(o);case V.KANJI:return Su.getBitsLength(o);case V.BYTE:return yu.getBitsLength(o)}}s(pp,"getSegmentBitsLength");function Mh(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(Mh,"mergeSegments");function Lh(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(Lh,"buildNodes");function Vh(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],g=""+i+f;c.push(g),t[g]={node:l,lastCount:0},n[g]={};for(let h=0;h<r.length;h++){let S=r[h];t[S]&&t[S].node.mode===l.mode?(n[S][g]=pp(t[S].lastCount+l.length,l.mode)-pp(t[S].lastCount,l.mode),t[S].lastCount+=l.length):(t[S]&&(t[S].lastCount=l.length),n[S][g]=pp(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(Vh,"buildGraph");function gu(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&&!Fc.isKanjiModeEnabled()&&(t=V.BYTE),t){case V.NUMERIC:return new hu(o);case V.ALPHANUMERIC:return new vu(o);case V.KANJI:return new Su(o);case V.BYTE:return new yu(o)}}s(gu,"buildSingleSegment");na.fromArray=s(function(e){return e.reduce(function(t,n){return typeof n=="string"?t.push(gu(n,null)):n.data&&t.push(gu(n.data,n.mode)),t},[])},"fromArray");na.fromString=s(function(e,t){let n=bu(e,Fc.isKanjiModeEnabled()),r=Lh(n),i=Vh(r,t),a=Bh.find_path(i.map,"start","end"),c=[];for(let f=1;f<a.length-1;f++)c.push(i.table[a[f]].node);return na.fromArray(Mh(c))},"fromString");na.rawSplit=s(function(e){return na.fromArray(bu(e,Fc.isKanjiModeEnabled()))},"rawSplit")});var hp=C(Nu=>{"use strict";var wc=gn(),dp=yc(),Hh=Tl(),Qh=Ml(),Uh=Ll(),Gh=Ql(),mp=Ul(),gp=ep(),qh=Xl(),Oc=eu(),Zh=nu(),Yh=vn(),lp=Cu();function Xh(o,e){let t=o.size,n=Gh.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(Xh,"setupFinderPattern");function Jh(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(Jh,"setupTimingPattern");function _h(o,e){let t=Uh.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(_h,"setupAlignmentPattern");function Wh(o,e){let t=o.size,n=Oc.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(Wh,"setupVersionInfo");function up(o,e,t){let n=o.size,r=Zh.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(up,"setupFormatInfo");function Kh(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(Kh,"setupData");function kh(o,e,t){let n=new Hh;t.forEach(function(f){n.put(f.mode.bit,4),n.put(f.getLength(),Yh.getCharCountIndicator(f.mode,o)),f.write(n)});let r=wc.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 $h(n,o,e)}s(kh,"createData");function $h(o,e,t){let n=wc.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),g=Math.floor(i/a),h=g+1,S=l-g,b=new qh(S),I=0,j=new Array(a),P=new Array(a),M=0,Nn=new Uint8Array(o.buffer);for(let $n=0;$n<a;$n++){let Mc=$n<f?g:h;j[$n]=Nn.slice(I,I+Mc),P[$n]=b.encode(j[$n]),I+=Mc,M=Math.max(M,Mc)}let Zo=new Uint8Array(n),Je=0,At,Yo;for(At=0;At<M;At++)for(Yo=0;Yo<a;Yo++)At<j[Yo].length&&(Zo[Je++]=j[Yo][At]);for(At=0;At<S;At++)for(Yo=0;Yo<a;Yo++)Zo[Je++]=P[Yo][At];return Zo}s($h,"createCodewords");function ev(o,e,t,n){let r;if(Array.isArray(o))r=lp.fromArray(o);else if(typeof o=="string"){let l=e;if(!l){let g=lp.rawSplit(o);l=Oc.getBestVersionForData(g,t)}r=lp.fromString(o,l||40)}else throw new Error("Invalid data");let i=Oc.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(`