import{as as Le}from"./index-Csef3-wA.js";var De={exports:{}};(function(Re,He){(function(Gt,ie){Re.exports=ie()})(self,()=>(()=>{var Gt,ie,Me={192:(q,et)=>{var J,st,G=function(){var Z=function(x,y){var _=x,g=_t[y],u=null,b=0,O=null,M=[],k={},ct=function(l,v){u=function(p){for(var w=new Array(p),m=0;m<p;m+=1){w[m]=new Array(p);for(var R=0;R<p;R+=1)w[m][R]=null}return w}(b=4*_+17),ht(0,0),ht(b-7,0),ht(0,b-7),zt(),W(),gt(l,v),_>=7&&yt(l),O==null&&(O=H(_,g,M)),Lt(O,v)},ht=function(l,v){for(var p=-1;p<=7;p+=1)if(!(l+p<=-1||b<=l+p))for(var w=-1;w<=7;w+=1)v+w<=-1||b<=v+w||(u[l+p][v+w]=0<=p&&p<=6&&(w==0||w==6)||0<=w&&w<=6&&(p==0||p==6)||2<=p&&p<=4&&2<=w&&w<=4)},W=function(){for(var l=8;l<b-8;l+=1)u[l][6]==null&&(u[l][6]=l%2==0);for(var v=8;v<b-8;v+=1)u[6][v]==null&&(u[6][v]=v%2==0)},zt=function(){for(var l=xt.getPatternPosition(_),v=0;v<l.length;v+=1)for(var p=0;p<l.length;p+=1){var w=l[v],m=l[p];if(u[w][m]==null)for(var R=-2;R<=2;R+=1)for(var L=-2;L<=2;L+=1)u[w+R][m+L]=R==-2||R==2||L==-2||L==2||R==0&&L==0}},yt=function(l){for(var v=xt.getBCHTypeNumber(_),p=0;p<18;p+=1){var w=!l&&(v>>p&1)==1;u[Math.floor(p/3)][p%3+b-8-3]=w}for(p=0;p<18;p+=1)w=!l&&(v>>p&1)==1,u[p%3+b-8-3][Math.floor(p/3)]=w},gt=function(l,v){for(var p=g<<3|v,w=xt.getBCHTypeInfo(p),m=0;m<15;m+=1){var R=!l&&(w>>m&1)==1;m<6?u[m][8]=R:m<8?u[m+1][8]=R:u[b-15+m][8]=R}for(m=0;m<15;m+=1)R=!l&&(w>>m&1)==1,m<8?u[8][b-m-1]=R:m<9?u[8][15-m-1+1]=R:u[8][15-m-1]=R;u[b-8][8]=!l},Lt=function(l,v){for(var p=-1,w=b-1,m=7,R=0,L=xt.getMaskFunction(v),T=b-1;T>0;T-=2)for(T==6&&(T-=1);;){for(var Y=0;Y<2;Y+=1)if(u[w][T-Y]==null){var U=!1;R<l.length&&(U=(l[R]>>>m&1)==1),L(w,T-Y)&&(U=!U),u[w][T-Y]=U,(m-=1)==-1&&(R+=1,m=7)}if((w+=p)<0||b<=w){w-=p,p=-p;break}}},H=function(l,v,p){for(var w=vt.getRSBlocks(l,v),m=ae(),R=0;R<p.length;R+=1){var L=p[R];m.put(L.getMode(),4),m.put(L.getLength(),xt.getLengthInBits(L.getMode(),l)),L.write(m)}var T=0;for(R=0;R<w.length;R+=1)T+=w[R].dataCount;if(m.getLengthInBits()>8*T)throw"code length overflow. ("+m.getLengthInBits()+">"+8*T+")";for(m.getLengthInBits()+4<=8*T&&m.put(0,4);m.getLengthInBits()%8!=0;)m.putBit(!1);for(;!(m.getLengthInBits()>=8*T||(m.put(236,8),m.getLengthInBits()>=8*T));)m.put(17,8);return function(Y,U){for(var K=0,dt=0,ut=0,rt=new Array(U.length),ot=new Array(U.length),j=0;j<U.length;j+=1){var Et=U[j].dataCount,Tt=U[j].totalCount-Et;dt=Math.max(dt,Et),ut=Math.max(ut,Tt),rt[j]=new Array(Et);for(var X=0;X<rt[j].length;X+=1)rt[j][X]=255&Y.getBuffer()[X+K];K+=Et;var wt=xt.getErrorCorrectPolynomial(Tt),Mt=A(rt[j],wt.getLength()-1).mod(wt);for(ot[j]=new Array(wt.getLength()-1),X=0;X<ot[j].length;X+=1){var Ct=X+Mt.getLength()-ot[j].length;ot[j][X]=Ct>=0?Mt.getAt(Ct):0}}var re=0;for(X=0;X<U.length;X+=1)re+=U[X].totalCount;var Q=new Array(re),Ot=0;for(X=0;X<dt;X+=1)for(j=0;j<U.length;j+=1)X<rt[j].length&&(Q[Ot]=rt[j][X],Ot+=1);for(X=0;X<ut;X+=1)for(j=0;j<U.length;j+=1)X<ot[j].length&&(Q[Ot]=ot[j][X],Ot+=1);return Q}(m,w)};k.addData=function(l,v){var p=null;switch(v=v||"Byte"){case"Numeric":p=ye(l);break;case"Alphanumeric":p=he(l);break;case"Byte":p=ue(l);break;case"Kanji":p=de(l);break;default:throw"mode:"+v}M.push(p),O=null},k.isDark=function(l,v){if(l<0||b<=l||v<0||b<=v)throw l+","+v;return u[l][v]},k.getModuleCount=function(){return b},k.make=function(){if(_<1){for(var l=1;l<40;l++){for(var v=vt.getRSBlocks(l,g),p=ae(),w=0;w<M.length;w++){var m=M[w];p.put(m.getMode(),4),p.put(m.getLength(),xt.getLengthInBits(m.getMode(),l)),m.write(p)}var R=0;for(w=0;w<v.length;w++)R+=v[w].dataCount;if(p.getLengthInBits()<=8*R)break}_=l}ct(!1,function(){for(var L=0,T=0,Y=0;Y<8;Y+=1){ct(!0,Y);var U=xt.getLostPoint(k);(Y==0||L>U)&&(L=U,T=Y)}return T}())},k.createTableTag=function(l,v){l=l||2;var p="";p+='<table style="',p+=" border-width: 0px; border-style: none;",p+=" border-collapse: collapse;",p+=" padding: 0px; margin: "+(v=v===void 0?4*l:v)+"px;",p+='">',p+="<tbody>";for(var w=0;w<k.getModuleCount();w+=1){p+="<tr>";for(var m=0;m<k.getModuleCount();m+=1)p+='<td style="',p+=" border-width: 0px; border-style: none;",p+=" border-collapse: collapse;",p+=" padding: 0px; margin: 0px;",p+=" width: "+l+"px;",p+=" height: "+l+"px;",p+=" background-color: ",p+=k.isDark(w,m)?"#000000":"#ffffff",p+=";",p+='"/>';p+="</tr>"}return(p+="</tbody>")+"</table>"},k.createSvgTag=function(l,v,p,w){var m={};typeof arguments[0]=="object"&&(l=(m=arguments[0]).cellSize,v=m.margin,p=m.alt,w=m.title),l=l||2,v=v===void 0?4*l:v,(p=typeof p=="string"?{text:p}:p||{}).text=p.text||null,p.id=p.text?p.id||"qrcode-description":null,(w=typeof w=="string"?{text:w}:w||{}).text=w.text||null,w.id=w.text?w.id||"qrcode-title":null;var R,L,T,Y,U=k.getModuleCount()*l+2*v,K="";for(Y="l"+l+",0 0,"+l+" -"+l+",0 0,-"+l+"z ",K+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',K+=m.scalable?"":' width="'+U+'px" height="'+U+'px"',K+=' viewBox="0 0 '+U+" "+U+'" ',K+=' preserveAspectRatio="xMinYMin meet"',K+=w.text||p.text?' role="img" aria-labelledby="'+tt([w.id,p.id].join(" ").trim())+'"':"",K+=">",K+=w.text?'<title id="'+tt(w.id)+'">'+tt(w.text)+"</title>":"",K+=p.text?'<description id="'+tt(p.id)+'">'+tt(p.text)+"</description>":"",K+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',K+='<path d="',L=0;L<k.getModuleCount();L+=1)for(T=L*l+v,R=0;R<k.getModuleCount();R+=1)k.isDark(L,R)&&(K+="M"+(R*l+v)+","+T+Y);return(K+='" stroke="transparent" fill="black"/>')+"</svg>"},k.createDataURL=function(l,v){l=l||2,v=v===void 0?4*l:v;var p=k.getModuleCount()*l+2*v,w=v,m=p-v;return V(p,p,function(R,L){if(w<=R&&R<m&&w<=L&&L<m){var T=Math.floor((R-w)/l),Y=Math.floor((L-w)/l);return k.isDark(Y,T)?0:1}return 1})},k.createImgTag=function(l,v,p){l=l||2,v=v===void 0?4*l:v;var w=k.getModuleCount()*l+2*v,m="";return m+="<img",m+=' src="',m+=k.createDataURL(l,v),m+='"',m+=' width="',m+=w,m+='"',m+=' height="',m+=w,m+='"',p&&(m+=' alt="',m+=tt(p),m+='"'),m+"/>"};var tt=function(l){for(var v="",p=0;p<l.length;p+=1){var w=l.charAt(p);switch(w){case"<":v+="<";break;case">":v+=">";break;case"&":v+="&";break;case'"':v+=""";break;default:v+=w}}return v};return k.createASCII=function(l,v){if((l=l||1)<2)return function(rt){rt=rt===void 0?2:rt;var ot,j,Et,Tt,X,wt=1*k.getModuleCount()+2*rt,Mt=rt,Ct=wt-rt,re={"██":"â–ˆ","â–ˆ ":"â–€"," â–ˆ":"â–„"," ":" "},Q={"██":"â–€","â–ˆ ":"â–€"," â–ˆ":" "," ":" "},Ot="";for(ot=0;ot<wt;ot+=2){for(Et=Math.floor((ot-Mt)/1),Tt=Math.floor((ot+1-Mt)/1),j=0;j<wt;j+=1)X="â–ˆ",Mt<=j&&j<Ct&&Mt<=ot&&ot<Ct&&k.isDark(Et,Math.floor((j-Mt)/1))&&(X=" "),Mt<=j&&j<Ct&&Mt<=ot+1&&ot+1<Ct&&k.isDark(Tt,Math.floor((j-Mt)/1))?X+=" ":X+="â–ˆ",Ot+=rt<1&&ot+1>=Ct?Q[X]:re[X];Ot+=` `}return wt%2&&rt>0?Ot.substring(0,Ot.length-wt-1)+Array(wt+1).join("â–€"):Ot.substring(0,Ot.length-1)}(v);l-=1,v=v===void 0?2*l:v;var p,w,m,R,L=k.getModuleCount()*l+2*v,T=v,Y=L-v,U=Array(l+1).join("██"),K=Array(l+1).join(" "),dt="",ut="";for(p=0;p<L;p+=1){for(m=Math.floor((p-T)/l),ut="",w=0;w<L;w+=1)R=1,T<=w&&w<Y&&T<=p&&p<Y&&k.isDark(m,Math.floor((w-T)/l))&&(R=0),ut+=R?U:K;for(m=0;m<l;m+=1)dt+=ut+` `}return dt.substring(0,dt.length-1)},k.renderTo2dContext=function(l,v){v=v||2;for(var p=k.getModuleCount(),w=0;w<p;w++)for(var m=0;m<p;m++)l.fillStyle=k.isDark(w,m)?"black":"white",l.fillRect(w*v,m*v,v,v)},k};Z.stringToBytes=(Z.stringToBytesFuncs={default:function(x){for(var y=[],_=0;_<x.length;_+=1){var g=x.charCodeAt(_);y.push(255&g)}return y}}).default,Z.createStringToBytes=function(x,y){var _=function(){for(var u=pe(x),b=function(){var W=u.read();if(W==-1)throw"eof";return W},O=0,M={};;){var k=u.read();if(k==-1)break;var ct=b(),ht=b()<<8|b();M[String.fromCharCode(k<<8|ct)]=ht,O+=1}if(O!=y)throw O+" != "+y;return M}(),g=63;return function(u){for(var b=[],O=0;O<u.length;O+=1){var M=u.charCodeAt(O);if(M<128)b.push(M);else{var k=_[u.charAt(O)];typeof k=="number"?(255&k)==k?b.push(k):(b.push(k>>>8),b.push(255&k)):b.push(g)}}return b}};var pt,nt,P,D,at,_t={L:1,M:0,Q:3,H:2},xt=(pt=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],nt=1335,P=7973,at=function(x){for(var y=0;x!=0;)y+=1,x>>>=1;return y},(D={}).getBCHTypeInfo=function(x){for(var y=x<<10;at(y)-at(nt)>=0;)y^=nt<<at(y)-at(nt);return 21522^(x<<10|y)},D.getBCHTypeNumber=function(x){for(var y=x<<12;at(y)-at(P)>=0;)y^=P<<at(y)-at(P);return x<<12|y},D.getPatternPosition=function(x){return pt[x-1]},D.getMaskFunction=function(x){switch(x){case 0:return function(y,_){return(y+_)%2==0};case 1:return function(y,_){return y%2==0};case 2:return function(y,_){return _%3==0};case 3:return function(y,_){return(y+_)%3==0};case 4:return function(y,_){return(Math.floor(y/2)+Math.floor(_/3))%2==0};case 5:return function(y,_){return y*_%2+y*_%3==0};case 6:return function(y,_){return(y*_%2+y*_%3)%2==0};case 7:return function(y,_){return(y*_%3+(y+_)%2)%2==0};default:throw"bad maskPattern:"+x}},D.getErrorCorrectPolynomial=function(x){for(var y=A([1],0),_=0;_<x;_+=1)y=y.multiply(A([1,St.gexp(_)],0));return y},D.getLengthInBits=function(x,y){if(1<=y&&y<10)switch(x){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+x}else if(y<27)switch(x){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+x}else{if(!(y<41))throw"type:"+y;switch(x){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+x}}},D.getLostPoint=function(x){for(var y=x.getModuleCount(),_=0,g=0;g<y;g+=1)for(var u=0;u<y;u+=1){for(var b=0,O=x.isDark(g,u),M=-1;M<=1;M+=1)if(!(g+M<0||y<=g+M))for(var k=-1;k<=1;k+=1)u+k<0||y<=u+k||M==0&&k==0||O==x.isDark(g+M,u+k)&&(b+=1);b>5&&(_+=3+b-5)}for(g=0;g<y-1;g+=1)for(u=0;u<y-1;u+=1){var ct=0;x.isDark(g,u)&&(ct+=1),x.isDark(g+1,u)&&(ct+=1),x.isDark(g,u+1)&&(ct+=1),x.isDark(g+1,u+1)&&(ct+=1),ct!=0&&ct!=4||(_+=3)}for(g=0;g<y;g+=1)for(u=0;u<y-6;u+=1)x.isDark(g,u)&&!x.isDark(g,u+1)&&x.isDark(g,u+2)&&x.isDark(g,u+3)&&x.isDark(g,u+4)&&!x.isDark(g,u+5)&&x.isDark(g,u+6)&&(_+=40);for(u=0;u<y;u+=1)for(g=0;g<y-6;g+=1)x.isDark(g,u)&&!x.isDark(g+1,u)&&x.isDark(g+2,u)&&x.isDark(g+3,u)&&x.isDark(g+4,u)&&!x.isDark(g+5,u)&&x.isDark(g+6,u)&&(_+=40);var ht=0;for(u=0;u<y;u+=1)for(g=0;g<y;g+=1)x.isDark(g,u)&&(ht+=1);return _+Math.abs(100*ht/y/y-50)/5*10},D),St=function(){for(var x=new Array(256),y=new Array(256),_=0;_<8;_+=1)x[_]=1<<_;for(_=8;_<256;_+=1)x[_]=x[_-4]^x[_-5]^x[_-6]^x[_-8];for(_=0;_<255;_+=1)y[x[_]]=_;return{glog:function(g){if(g<1)throw"glog("+g+")";return y[g]},gexp:function(g){for(;g<0;)g+=255;for(;g>=256;)g-=255;return x[g]}}}();function A(x,y){if(x.length===void 0)throw x.length+"/"+y;var _=function(){for(var u=0;u<x.length&&x[u]==0;)u+=1;for(var b=new Array(x.length-u+y),O=0;O<x.length-u;O+=1)b[O]=x[O+u];return b}(),g={getAt:function(u){return _[u]},getLength:function(){return _.length},multiply:function(u){for(var b=new Array(g.getLength()+u.getLength()-1),O=0;O<g.getLength();O+=1)for(var M=0;M<u.getLength();M+=1)b[O+M]^=St.gexp(St.glog(g.getAt(O))+St.glog(u.getAt(M)));return A(b,0)},mod:function(u){if(g.getLength()-u.getLength()<0)return g;for(var b=St.glog(g.getAt(0))-St.glog(u.getAt(0)),O=new Array(g.getLength()),M=0;M<g.getLength();M+=1)O[M]=g.getAt(M);for(M=0;M<u.getLength();M+=1)O[M]^=St.gexp(St.glog(u.getAt(M))+b);return A(O,0).mod(u)}};return g}var vt=function(){var x=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],y=function(g,u){var b={};return b.totalCount=g,b.dataCount=u,b},_={getRSBlocks:function(g,u){var b=function(yt,gt){switch(gt){case _t.L:return x[4*(yt-1)+0];case _t.M:return x[4*(yt-1)+1];case _t.Q:return x[4*(yt-1)+2];case _t.H:return x[4*(yt-1)+3];default:return}}(g,u);if(b===void 0)throw"bad rs block @ typeNumber:"+g+"/errorCorrectionLevel:"+u;for(var O=b.length/3,M=[],k=0;k<O;k+=1)for(var ct=b[3*k+0],ht=b[3*k+1],W=b[3*k+2],zt=0;zt<ct;zt+=1)M.push(y(ht,W));return M}};return _}(),ae=function(){var x=[],y=0,_={getBuffer:function(){return x},getAt:function(g){var u=Math.floor(g/8);return(x[u]>>>7-g%8&1)==1},put:function(g,u){for(var b=0;b<u;b+=1)_.putBit((g>>>u-b-1&1)==1)},getLengthInBits:function(){return y},putBit:function(g){var u=Math.floor(y/8);x.length<=u&&x.push(0),g&&(x[u]|=128>>>y%8),y+=1}};return _},ye=function(x){var y=x,_={getMode:function(){return 1},getLength:function(b){return y.length},write:function(b){for(var O=y,M=0;M+2<O.length;)b.put(g(O.substring(M,M+3)),10),M+=3;M<O.length&&(O.length-M==1?b.put(g(O.substring(M,M+1)),4):O.length-M==2&&b.put(g(O.substring(M,M+2)),7))}},g=function(b){for(var O=0,M=0;M<b.length;M+=1)O=10*O+u(b.charAt(M));return O},u=function(b){if("0"<=b&&b<="9")return b.charCodeAt(0)-48;throw"illegal char :"+b};return _},he=function(x){var y=x,_={getMode:function(){return 2},getLength:function(u){return y.length},write:function(u){for(var b=y,O=0;O+1<b.length;)u.put(45*g(b.charAt(O))+g(b.charAt(O+1)),11),O+=2;O<b.length&&u.put(g(b.charAt(O)),6)}},g=function(u){if("0"<=u&&u<="9")return u.charCodeAt(0)-48;if("A"<=u&&u<="Z")return u.charCodeAt(0)-65+10;switch(u){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+u}};return _},ue=function(x){var y=Z.stringToBytes(x);return{getMode:function(){return 4},getLength:function(_){return y.length},write:function(_){for(var g=0;g<y.length;g+=1)_.put(y[g],8)}}},de=function(x){var y=Z.stringToBytesFuncs.SJIS;if(!y)throw"sjis not supported.";(function(u,b){var O=y("å‹");if(O.length!=2||(O[0]<<8|O[1])!=38726)throw"sjis not supported."})();var _=y(x),g={getMode:function(){return 8},getLength:function(u){return~~(_.length/2)},write:function(u){for(var b=_,O=0;O+1<b.length;){var M=(255&b[O])<<8|255&b[O+1];if(33088<=M&&M<=40956)M-=33088;else{if(!(57408<=M&&M<=60351))throw"illegal char at "+(O+1)+"/"+M;M-=49472}M=192*(M>>>8&255)+(255&M),u.put(M,13),O+=2}if(O<b.length)throw"illegal char at "+(O+1)}};return g},le=function(){var x=[],y={writeByte:function(_){x.push(255&_)},writeShort:function(_){y.writeByte(_),y.writeByte(_>>>8)},writeBytes:function(_,g,u){g=g||0,u=u||_.length;for(var b=0;b<u;b+=1)y.writeByte(_[b+g])},writeString:function(_){for(var g=0;g<_.length;g+=1)y.writeByte(_.charCodeAt(g))},toByteArray:function(){return x},toString:function(){var _="";_+="[";for(var g=0;g<x.length;g+=1)g>0&&(_+=","),_+=x[g];return _+"]"}};return y},pe=function(x){var y=x,_=0,g=0,u=0,b={read:function(){for(;u<8;){if(_>=y.length){if(u==0)return-1;throw"unexpected end of file./"+u}var M=y.charAt(_);if(_+=1,M=="=")return u=0,-1;M.match(/^\s$/)||(g=g<<6|O(M.charCodeAt(0)),u+=6)}var k=g>>>u-8&255;return u-=8,k}},O=function(M){if(65<=M&&M<=90)return M-65;if(97<=M&&M<=122)return M-97+26;if(48<=M&&M<=57)return M-48+52;if(M==43)return 62;if(M==47)return 63;throw"c:"+M};return b},V=function(x,y,_){for(var g=function(ht,W){var zt=ht,yt=W,gt=new Array(ht*W),Lt={setPixel:function(l,v,p){gt[v*zt+l]=p},write:function(l){l.writeString("GIF87a"),l.writeShort(zt),l.writeShort(yt),l.writeByte(128),l.writeByte(0),l.writeByte(0),l.writeByte(0),l.writeByte(0),l.writeByte(0),l.writeByte(255),l.writeByte(255),l.writeByte(255),l.writeString(","),l.writeShort(0),l.writeShort(0),l.writeShort(zt),l.writeShort(yt),l.writeByte(0);var v=H(2);l.writeByte(2);for(var p=0;v.length-p>255;)l.writeByte(255),l.writeBytes(v,p,255),p+=255;l.writeByte(v.length-p),l.writeBytes(v,p,v.length-p),l.writeByte(0),l.writeString(";")}},H=function(l){for(var v=1<<l,p=1+(1<<l),w=l+1,m=tt(),R=0;R<v;R+=1)m.add(String.fromCharCode(R));m.add(String.fromCharCode(v)),m.add(String.fromCharCode(p));var L,T,Y,U=le(),K=(L=U,T=0,Y=0,{write:function(ot,j){if(ot>>>j)throw"length over";for(;T+j>=8;)L.writeByte(255&(ot<<T|Y)),j-=8-T,ot>>>=8-T,Y=0,T=0;Y|=ot<<T,T+=j},flush:function(){T>0&&L.writeByte(Y)}});K.write(v,w);var dt=0,ut=String.fromCharCode(gt[dt]);for(dt+=1;dt<gt.length;){var rt=String.fromCharCode(gt[dt]);dt+=1,m.contains(ut+rt)?ut+=rt:(K.write(m.indexOf(ut),w),m.size()<4095&&(m.size()==1<<w&&(w+=1),m.add(ut+rt)),ut=rt)}return K.write(m.indexOf(ut),w),K.write(p,w),K.flush(),U.toByteArray()},tt=function(){var l={},v=0,p={add:function(w){if(p.contains(w))throw"dup key:"+w;l[w]=v,v+=1},size:function(){return v},indexOf:function(w){return l[w]},contains:function(w){return l[w]!==void 0}};return p};return Lt}(x,y),u=0;u<y;u+=1)for(var b=0;b<x;b+=1)g.setPixel(b,u,_(b,u));var O=le();g.write(O);for(var M=function(){var ht=0,W=0,zt=0,yt="",gt={},Lt=function(tt){yt+=String.fromCharCode(H(63&tt))},H=function(tt){if(!(tt<0)){if(tt<26)return 65+tt;if(tt<52)return tt-26+97;if(tt<62)return tt-52+48;if(tt==62)return 43;if(tt==63)return 47}throw"n:"+tt};return gt.writeByte=function(tt){for(ht=ht<<8|255&tt,W+=8,zt+=1;W>=6;)Lt(ht>>>W-6),W-=6},gt.flush=function(){if(W>0&&(Lt(ht<<6-W),ht=0,W=0),zt%3!=0)for(var tt=3-zt%3,l=0;l<tt;l+=1)yt+="="},gt.toString=function(){return yt},gt}(),k=O.toByteArray(),ct=0;ct<k.length;ct+=1)M.writeByte(k[ct]);return M.flush(),"data:image/gif;base64,"+M};return Z}();G.stringToBytesFuncs["UTF-8"]=function(Z){return function(pt){for(var nt=[],P=0;P<pt.length;P++){var D=pt.charCodeAt(P);D<128?nt.push(D):D<2048?nt.push(192|D>>6,128|63&D):D<55296||D>=57344?nt.push(224|D>>12,128|D>>6&63,128|63&D):(P++,D=65536+((1023&D)<<10|1023&pt.charCodeAt(P)),nt.push(240|D>>18,128|D>>12&63,128|D>>6&63,128|63&D))}return nt}(Z)},(st=typeof(J=function(){return G})=="function"?J.apply(et,[]):J)===void 0||(q.exports=st)}},Oe={};function N(q){var et=Oe[q];if(et!==void 0)return et.exports;var J=Oe[q]={exports:{}};return Me[q](J,J.exports,N),J.exports}N.m=Me,N.n=q=>{var et=q&&q.__esModule?()=>q.default:()=>q;return N.d(et,{a:et}),et},N.d=(q,et)=>{for(var J in et)N.o(et,J)&&!N.o(q,J)&&Object.defineProperty(q,J,{enumerable:!0,get:et[J]})},N.f={},N.e=q=>Promise.all(Object.keys(N.f).reduce((et,J)=>(N.f[J](q,et),et),[])),N.u=q=>q+".qr-code-styling.js",N.o=(q,et)=>Object.prototype.hasOwnProperty.call(q,et),Gt={},ie="QRCodeStyling:",N.l=(q,et,J,st)=>{if(Gt[q])Gt[q].push(et);else{var G,Z;if(J!==void 0)for(var pt=document.getElementsByTagName("script"),nt=0;nt<pt.length;nt++){var P=pt[nt];if(P.getAttribute("src")==q||P.getAttribute("data-webpack")==ie+J){G=P;break}}G||(Z=!0,(G=document.createElement("script")).charset="utf-8",G.timeout=120,N.nc&&G.setAttribute("nonce",N.nc),G.setAttribute("data-webpack",ie+J),G.src=q),Gt[q]=[et];var D=(_t,xt)=>{G.onerror=G.onload=null,clearTimeout(at);var St=Gt[q];if(delete Gt[q],G.parentNode&&G.parentNode.removeChild(G),St&&St.forEach(A=>A(xt)),_t)return _t(xt)},at=setTimeout(D.bind(null,void 0,{type:"timeout",target:G}),12e4);G.onerror=D.bind(null,G.onerror),G.onload=D.bind(null,G.onload),Z&&document.head.appendChild(G)}},N.r=q=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(q,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(q,"__esModule",{value:!0})},N.p="/static/js/",(()=>{var q={179:0};N.f.j=(st,G)=>{var Z=N.o(q,st)?q[st]:void 0;if(Z!==0)if(Z)G.push(Z[2]);else{var pt=new Promise((D,at)=>Z=q[st]=[D,at]);G.push(Z[2]=pt);var nt=N.p+N.u(st),P=new Error;N.l(nt,D=>{if(N.o(q,st)&&((Z=q[st])!==0&&(q[st]=void 0),Z)){var at=D&&(D.type==="load"?"missing":D.type),_t=D&&D.target&&D.target.src;P.message="Loading chunk "+st+` failed. (`+at+": "+_t+")",P.name="ChunkLoadError",P.type=at,P.request=_t,Z[1](P)}},"chunk-"+st,st)}};var et=(st,G)=>{var Z,pt,[nt,P,D]=G,at=0;if(nt.some(_t=>q[_t]!==0)){for(Z in P)N.o(P,Z)&&(N.m[Z]=P[Z]);D&&D(N)}for(st&&st(G);at<nt.length;at++)pt=nt[at],N.o(q,pt)&&q[pt]&&q[pt][0](),q[pt]=0},J=self.webpackChunkQRCodeStyling=self.webpackChunkQRCodeStyling||[];J.forEach(et.bind(null,0)),J.push=et.bind(null,J.push.bind(J))})();var me={};return(()=>{N.r(me),N.d(me,{cornerDotLazyPaths:()=>he,cornerDotPaths:()=>ue,cornerDotTypes:()=>A,cornerSquareLazyPaths:()=>xt,cornerSquarePaths:()=>St,cornerSquareTypes:()=>P,default:()=>Fe,dotPaths:()=>O,dotTypes:()=>u,drawTypes:()=>wt,errorCorrectionLevels:()=>Mt,errorCorrectionPercents:()=>nt,modes:()=>q,qrTypes:()=>X});const q={numeric:"Numeric",alphanumeric:"Alphanumeric",byte:"Byte",kanji:"Kanji"};function et(s){switch(!0){case/^[0-9]*$/.test(s):return q.numeric;case/^[0-9A-Z $%*+\-./:]*$/.test(s):return q.alphanumeric;default:return q.byte}}var J=function(){return J=Object.assign||function(s){for(var t,r=1,n=arguments.length;r<n;r++)for(var e in t=arguments[r])Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=t[e]);return s},J.apply(this,arguments)},st=function(s){return!!s&&typeof s=="object"&&!Array.isArray(s)};function G(s){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(!t.length)return s;var n=t.shift();return n!==void 0&&st(s)&&st(n)?(s=J({},s),Object.keys(n).forEach(function(e){var o=s[e],i=n[e];Array.isArray(o)&&Array.isArray(i)?s[e]=i:st(o)&&st(i)?s[e]=G(Object.assign({},o),i):s[e]=i}),G.apply(void 0,function(e,o,i){if(arguments.length===2)for(var a,c=0,d=o.length;c<d;c++)!a&&c in o||(a||(a=Array.prototype.slice.call(o,0,c)),a[c]=o[c]);return e.concat(a||Array.prototype.slice.call(o))}([s],t,!1))):s}function Z(s,t){var r=document.createElement("a");r.download=t,r.href=s,document.body.appendChild(r),r.click(),document.body.removeChild(r)}function pt(s){var t=s.originalHeight,r=s.originalWidth,n=s.maxHiddenDots,e=s.maxHiddenAxisDots,o=s.dotSize,i={x:0,y:0},a={x:0,y:0};if(t<=0||r<=0||n<=0||o<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var c=t/r;return i.x=Math.floor(Math.sqrt(n/c)),i.x<=0&&(i.x=1),e&&e<i.x&&(i.x=e),i.x%2==0&&i.x--,a.x=i.x*o,i.y=1+2*Math.ceil((i.x*c-1)/2),a.y=Math.round(a.x*c),(i.y*i.x>n||e&&e<i.y)&&(e&&e<i.y?(i.y=e,i.y%2==0&&i.x--):i.y-=2,a.y=i.y*o,i.x=1+2*Math.ceil((i.y/c-1)/2),a.x=Math.round(a.y/c)),{height:a.y,width:a.x,hideYDots:i.y,hideXDots:i.x}}const nt={L:.07,M:.15,Q:.25,H:.3},P={dot:"dot",square:"square",extraRounded:"extra-rounded",shape1:"shape1",shape2:"shape2",shape3:"shape3",shape4:"shape4",shape5:"shape5",shape6:"shape6",shape7:"shape7",shape8:"shape8",shape9:"shape9",shape10:"shape10",shape11:"shape11",shape12:"shape12"};var D,at,_t=((D={})[P.shape1]={path:"m21 1.9-21-1.9 2 21c0 1.1.9 2 2 2h19v-19.1c0-1.1-.9-2-2-2zm-1.05 18.05h-13.45c-.8 0-1.45-.65-1.45-1.45l-1.1-14.5 14.55 1.05c.8 0 1.45.65 1.45 1.44v13.46z",size:24},D[P.shape2]={path:"m12 0h-12v12c0 6.63 5.37 12 12 12s12-5.37 12-12c0-6.63-5.37-12-12-12zm0 21c-4.96 0-9-4.04-9-9v-9h9c4.96 0 9 4.04 9 9s-4.04 9-9 9z",size:24},D[P.shape3]={path:"m12 0c-6.63 0-12 5.37-12 12 0 6.63 5.37 12 12 12h12v-12c0-6.63-5.37-12-12-12zm9 21h-9c-4.96 0-9-4.04-9-9s4.04-9 9-9 9 4.04 9 9v9z",size:24},D[P.shape4]={path:"m23.46 8.43c-.47-1.5-1.22-2.88-2.2-4.06-.49-.59-1.03-1.14-1.63-1.63-1.19-.98-2.56-1.73-4.06-2.2-1.13-.35-2.33-.54-3.57-.54h-12v12c0 1.24.19 2.44.54 3.57.47 1.5 1.22 2.88 2.2 4.06.49.59 1.03 1.14 1.63 1.63 1.19.98 2.56 1.73 4.06 2.2 1.13.35 2.33.54 3.57.54h12v-12c0-1.24-.19-2.44-.54-3.57zm-2.46 12.57h-9c-4.96 0-9-4.04-9-9v-9h9c4.96 0 9 4.04 9 9v9z",size:24},D[P.shape5]={path:"m23.46 8.43c-.47-1.5-1.22-2.88-2.2-4.06-.49-.59-1.03-1.14-1.63-1.63-1.19-.98-2.56-1.73-4.06-2.2-1.13-.35-2.33-.54-3.57-.54h-12v12c0 1.24.19 2.44.54 3.57.47 1.5 1.22 2.88 2.2 4.06.49.59 1.03 1.14 1.63 1.63 1.19.98 2.56 1.73 4.06 2.2 1.13.35 2.33.54 3.57.54h12v-12c0-1.24-.19-2.44-.54-3.57zm-2.46 12.57h-9c-4.97 0-9-4.03-9-9v0c0-4.97 4.03-9 9-9h0c4.97 0 9 4.03 9 9v9z",size:24},D[P.shape6]={path:"m23.46 8.43c-.47-1.5-1.22-2.88-2.2-4.06-.49-.59-1.03-1.14-1.63-1.63-1.19-.98-2.56-1.73-4.06-2.2-1.13-.35-2.33-.54-3.57-.54h-12v12c0 1.24.19 2.44.54 3.57.47 1.5 1.22 2.88 2.2 4.06.49.59 1.03 1.14 1.63 1.63 1.19.98 2.56 1.73 4.06 2.2 1.13.35 2.33.54 3.57.54h12v-12c0-1.24-.19-2.44-.54-3.57zm-11.46 12.57 0 0c-4.97 0-9-4.03-9-9v0c0-4.97 4.03-9 9-9h0c4.97 0 9 4.03 9 9v0c0 4.97-4.03 9-9 9z",size:24},D[P.shape7]={path:"m.54 15.57c.47 1.5 1.22 2.88 2.2 4.06.49.59 1.03 1.14 1.63 1.63 1.19.98 2.56 1.73 4.06 2.2 1.13.35 2.33.54 3.57.54h12v-12c0-1.24-.19-2.44-.54-3.57-.47-1.5-1.22-2.88-2.2-4.06-.49-.59-1.03-1.14-1.63-1.63-1.19-.98-2.56-1.73-4.06-2.2-1.13-.35-2.33-.54-3.57-.54h-12v12c0 1.24.19 2.44.54 3.57zm2.46-12.57h9c4.97 0 9 4.03 9 9v0c0 4.97-4.03 9-9 9h0c-4.97 0-9-4.03-9-9v-9z",size:24},D[P.shape8]={path:"m0 0v24h24v-24h-24zm12 21c-4.97 0-9-4.03-9-9 0-4.97 4.03-9 9-9s9 4.03 9 9c0 4.97-4.03 9-9 9z",size:24},D[P.shape9]={path:"m16.28 0h-16.28v16.28c0 4.26 3.46 7.72 7.72 7.72h8.56c4.26 0 7.72-3.46 7.72-7.72v-8.56c0-4.26-3.46-7.72-7.72-7.72zm4.72 16.28c0 2.6-2.12 4.72-4.72 4.72h-8.56c-2.6 0-4.72-2.12-4.72-4.72v-13.28h13.28c2.6 0 4.72 2.12 4.72 4.72v8.56z",size:24},D[P.shape10]={path:"m7.72 24h16.28v-16.28c0-4.26-3.46-7.72-7.72-7.72h-8.56c-4.26 0-7.72 3.46-7.72 7.72v8.56c0 4.26 3.46 7.72 7.72 7.72zm-4.72-16.28c0-2.6 2.12-4.72 4.72-4.72h8.56c2.6 0 4.72 2.12 4.72 4.72v13.28h-13.28c-2.6 0-4.72-2.12-4.72-4.72v-8.56z",size:24},D[P.shape11]={path:"m16.28 0h-16.28v16.28c0 4.26 3.46 7.72 7.72 7.72h16.28v-16.28c0-4.26-3.46-7.72-7.72-7.72zm4.72 21h-13.28c-2.6 0-4.72-2.12-4.72-4.72v-13.28h13.28c2.6 0 4.72 2.12 4.72 4.72v13.28z",size:24},D),xt=((at={})[P.shape12]=function(){return N.e(630).then(N.bind(N,630))},at);const St=_t,A={dot:"dot",square:"square",rounded:"rounded",square2:"square2",square3:"square3",dot2:"dot2",dot3:"dot3",dot4:"dot4",sun:"sun",star:"star",diamond:"diamond",x:"x",xRounded:"x-rounded",cross:"cross",crossRounded:"cross-rounded",heart:"heart"};var vt,ae,ye=((vt={})[A.rounded]={path:"m10 14h-6c-2.21 0-4-1.79-4-4v-6c0-2.21 1.79-4 4-4h6c2.21 0 4 1.79 4 4v6c0 2.21-1.79 4-4 4z",size:14},vt[A.square2]={path:"m15 15-13.9 0-1.1-15 15 1.1z",size:15},vt[A.dot2]={path:"m7 14 0 0c-3.87 0-7-3.13-7-7v-7h7c3.87 0 7 3.13 7 7v0c0 3.87-3.13 7-7 7z",size:14},vt[A.dot3]={path:"m7 0 0 0c3.87 0 7 3.13 7 7v7h-7c-3.87 0-7-3.13-7-7v0c0-3.87 3.13-7 7-7z",size:14},vt[A.dot4]={path:"m0 0h7c3.87 0 7 3.13 7 7v7h-7c-3.87 0-7-3.13-7-7v-7z",size:14},vt[A.sun]={path:"m7.8 1.4 1.38-1.05.49 1.66 1.65-.52-.11 1.74 1.73.07-.69 1.59 1.6.67-1.2 1.26 1.28 1.17-1.56.77.8 1.54-1.72.19.22 1.72-1.68-.41-.38 1.7-1.45-.97-.93 1.47-1.03-1.4-1.38 1.05-.49-1.66-1.65.52.11-1.74-1.73-.07.69-1.59-1.6-.67 1.2-1.26-1.28-1.17 1.56-.77-.8-1.54 1.72-.19-.22-1.72 1.68.41.38-1.7 1.45.97.93-1.47z",size:14},vt[A.star]={path:"m7.28 11.95 3.23 1.49c.47.22 1.01-.17.94-.69l-.42-3.53c-.02-.19.04-.39.17-.53l2.41-2.61c.35-.38.15-1.01-.36-1.11l-3.49-.7c-.19-.04-.36-.16-.45-.33l-1.74-3.1c-.26-.46-.91-.46-1.17 0l-1.74 3.1c-.1.17-.26.29-.45.33l-3.49.7c-.51.1-.71.73-.36 1.11l2.41 2.61c.13.14.2.34.17.53l-.42 3.53c-.06.52.47.9.94.69l3.23-1.49c.21-.08.41-.08.59 0z",size:14},vt[A.diamond]={path:"m4 0 4 4-4 4-4-4 4-4 4 4z",size:8},vt[A.x]={path:"m8 0-3 0-1 1-1-1-3 0 0 3 1 1-1 1 0 3 3 0 1-1 1 1 3 0 0-3-1-1 1-1z",size:8},vt[A.xRounded]={path:"m10.29 0 0 0c-.98 0-1.93.39-2.63 1.09l-.66.66-.66-.66c-.7-.7-1.64-1.09-2.63-1.09h0c-2.05 0-3.71 1.66-3.71 3.71v0c0 .98.39 1.93 1.09 2.62l.66.67-.66.66c-.7.7-1.09 1.64-1.09 2.63v0c0 2.05 1.66 3.71 3.71 3.71h0c.98 0 1.93-.39 2.62-1.09l.67-.66.66.66c.7.7 1.64 1.09 2.62 1.09h0c2.05 0 3.71-1.66 3.71-3.71v0c0-.98-.39-1.93-1.09-2.62l-.65-.67.66-.66c.7-.7 1.09-1.64 1.09-2.63v0c0-2.05-1.66-3.71-3.71-3.71z",size:14},vt[A.cross]={path:"m10.5 3.5 0-3.5-7 0 0 3.5-3.5 0 0 7 3.5 0 0 3.5 7 0 0-3.5 3.5 0 0-7z",size:14},vt[A.crossRounded]={path:"m10.5 3.5 0 0c0-1.93-1.57-3.5-3.5-3.5h0c-1.93 0-3.5 1.57-3.5 3.5v0h0c-1.93 0-3.5 1.57-3.5 3.5v0c0 1.93 1.57 3.5 3.5 3.5h0v0c0 1.93 1.57 3.5 3.5 3.5h0c1.93 0 3.5-1.57 3.5-3.5v0h0c1.93 0 3.5-1.57 3.5-3.5v0c0-1.93-1.57-3.5-3.5-3.5l0 0z",size:14},vt[A.heart]={path:"m7.01 2.89c3.5-3.46 6.97-1.73 6.99 1.72.01 2.83-4.65 6.81-6.37 8.17-.37.29-.88.29-1.25 0-1.71-1.36-6.38-5.34-6.38-8.16 0-3.46 3.5-5.19 7.01-1.73z",size:14},vt),he=((ae={})[A.square3]=function(){return N.e(107).then(N.bind(N,107))},ae);const ue=ye;var de=function(s,t,r){for(var n,e=0,o=t.length;e<o;e++)!n&&e in t||(n||(n=Array.prototype.slice.call(t,0,e)),n[e]=t[e]);return s.concat(n||Array.prototype.slice.call(t))},le=/^[\t\n\f\r ]*([MLHVZCSQTAmlhvzcsqta])[\t\n\f\r ]*/,pe=/^[01]/,V=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/,x=/^(([\t\n\f\r ]+,?[\t\n\f\r ]*)|(,[\t\n\f\r ]*))/,y={M:[V,V],L:[V,V],H:[V],V:[V],Z:[],C:[V,V,V,V,V,V],S:[V,V,V,V],Q:[V,V,V,V],T:[V,V],A:[V,V,V,pe,pe,V,V]},_=function(){function s(){}return s.components=function(t,r,n,e){for(var o=y[t.toUpperCase()],i=[];n<=r.length;){for(var a=[t],c=0,d=o;c<d.length;c++){var h=d[c],f=r.slice(n).match(h);if(f===null){if(a.length===1)return[n,i];throw new Error("malformed path (first error at "+n+")")}a.push(Number(f[0])/e),n+=f[0].length;var S=r.slice(n).match(x);S!==null&&(n+=S[0].length)}if(i.push.apply(i,a),o.length===0)return[n,i];t==="m"&&(t="l"),t==="M"&&(t="L")}throw new Error("malformed path (first error at "+n+")")},s.parse=function(t,r){for(var n=0,e=[];n<t.length;){var o=t.slice(n).match(le);if(o===null)throw new Error("malformed path (first error at "+n+")");var i=o[1];n+=o[0].length;var a=s.components(i,t,n,r);n=a[0],e=de(de([],e,!0),a[1])}return e},s}();const g=_,u={dots:"dots",rounded:"rounded",classy:"classy",classyRounded:"classy-rounded",square:"square",extraRounded:"extra-rounded",horizontalRounded:"horizontal-rounded",verticalRounded:"vertical-rounded",star:"star",diamond:"diamond",x:"x",cross:"cross",crossRounded:"cross-rounded",xRounded:"x-rounded",heart:"heart",sparkle:"sparkle",ribbon:"ribbon",diamondSpecial:"diamond-special",shake:"shake"};var b;const O=((b={})[u.star]={path:"m4 0 1.24 2.63 2.76.43-2 2.05.47 2.89-2.47-1.37-2.47 1.37.47-2.89-2-2.05 2.76-.43z",size:8},b[u.diamond]={path:"m4 0 4 4-4 4-4-4 4-4 4 4z",size:8},b[u.x]={path:"m8 0-3 0-1 1-1-1-3 0 0 3 1 1-1 1 0 3 3 0 1-1 1 1 3 0 0-3-1-1 1-1z",size:8},b[u.cross]={path:"m5.5 2.5 0-2.5-3 0 0 2.5-2.5 0 0 3 2.5 0 0 2.5 3 0 0-2.5 2.5 0 0-3z",size:8},b[u.crossRounded]={path:"m6.5 2.5h-1v-1c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v1h-1c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5h1v1c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-1h1c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5z",size:8},b[u.xRounded]={path:"m5.88 0 0 0c-.56 0-1.1.22-1.5.62l-.38.38-.38-.38c-.4-.4-.94-.62-1.5-.62h0c-1.17 0-2.12.95-2.12 2.12v0c0 .56.22 1.1.62 1.5l.38.38-.38.38c-.4.4-.62.94-.62 1.5v0c0 1.17.95 2.12 2.12 2.12h0c.56 0 1.1-.22 1.5-.62l.38-.38.38.38c.4.4.94.62 1.5.62h0c1.17 0 2.12-.95 2.12-2.12v0c0-.56-.22-1.1-.62-1.5l-.38-.38.38-.38c.4-.4.62-.94.62-1.5v0c0-1.17-.95-2.12-2.12-2.12z",size:8},b[u.heart]={path:"m4.01 1.58c2-1.98 3.98-.99 3.99.98.01 1.98-3.99 4.94-3.99 4.94s-4.01-2.96-4.01-4.94 2-2.96 4.01-.98z",size:8},b[u.sparkle]={path:"m.19 4.01c3.22-1.38 2.99-2.23 4.06-3.86.16-.24.6-.18.66.1.68 3.19 2.68 3.19 3.07 3.95.08.17-.07.36-.28.39-1.49.24-2.76.98-2.99 3.23-.03.28-.57.24-.66-.17-.36-1.52-.94-2.82-3.74-3.08-.34-.03-.43-.43-.12-.56z",size:8},b);var M=function(){function s(t,r){r===void 0&&(r={}),this.cachedPaths={},this.cachedRelativePaths={},this.paths=t,this.lazyPaths=r}return s.prototype.loadPath=function(t){return r=this,n=void 0,o=function(){var i;return function(a,c){var d,h,f,S,z={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return S={next:C(0),throw:C(1),return:C(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function C(E){return function(F){return function(I){if(d)throw new TypeError("Generator is already executing.");for(;z;)try{if(d=1,h&&(f=2&I[0]?h.return:I[0]?h.throw||((f=h.return)&&f.call(h),0):h.next)&&!(f=f.call(h,I[1])).done)return f;switch(h=0,f&&(I=[2&I[0],f.value]),I[0]){case 0:case 1:f=I;break;case 4:return z.label++,{value:I[1],done:!1};case 5:z.label++,h=I[1],I=[0];continue;case 7:I=z.ops.pop(),z.trys.pop();continue;default:if(!((f=(f=z.trys).length>0&&f[f.length-1])||I[0]!==6&&I[0]!==2)){z=0;continue}if(I[0]===3&&(!f||I[1]>f[0]&&I[1]<f[3])){z.label=I[1];break}if(I[0]===6&&z.label<f[1]){z.label=f[1],f=I;break}if(f&&z.label<f[2]){z.label=f[2],z.ops.push(I);break}f[2]&&z.ops.pop(),z.trys.pop();continue}I=c.call(a,z)}catch(B){I=[6,B],h=0}finally{d=f=0}if(5&I[0])throw I[1];return{value:I[0]?I[1]:void 0,done:!0}}([E,F])}}}(this,function(a){switch(a.label){case 0:return t&&this.lazyPaths[t]&&!this.paths[t]?[4,this.lazyPaths[t]()]:[2];case 1:return i=a.sent(),this.paths[t]=i.default,[2]}})},new((e=void 0)||(e=Promise))(function(i,a){function c(f){try{h(o.next(f))}catch(S){a(S)}}function d(f){try{h(o.throw(f))}catch(S){a(S)}}function h(f){var S;f.done?i(f.value):(S=f.value,S instanceof e?S:new e(function(z){z(S)})).then(c,d)}h((o=o.apply(r,n||[])).next())});var r,n,e,o},s.prototype.build=function(t){var r=t.type,n=t.size,e=t.x,o=t.y,i=this.paths[r],a=this.cachedPaths[r]=this.cachedPaths[r]||{};return i?(this.cachedRelativePaths[r]||(this.cachedRelativePaths[r]=g.parse(i.path,i.size)),a[n]||(a[n]=this.cachedRelativePaths[r].map(function(c){return typeof c=="string"?c:Math.round(c*n*1e3)/1e3}).join(" ")),"m ".concat(e," ").concat(o," ").concat(a[n])):""},s}(),k=new M(St,xt),ct=new M(ue,he),ht=new M(O),W=function(){return W=Object.assign||function(s){for(var t,r=1,n=arguments.length;r<n;r++)for(var e in t=arguments[r])Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=t[e]);return s},W.apply(this,arguments)},zt=function(){function s(){}return s.prototype.draw=function(t){var r,n=t.x,e=t.y,o=t.xIndex,i=t.yIndex,a=t.size,c=t.getNeighbor,d=t.cornerIndex,h=d===void 0?0:d;switch(this._type){case u.dots:r=this._drawDot;break;case u.classy:r=this._drawClassy;break;case u.classyRounded:r=this._drawClassyRounded;break;case u.rounded:r=this._drawRounded;break;case u.extraRounded:r=this._drawExtraRounded;break;case u.horizontalRounded:r=this._drawHorizontalRounded;break;case u.verticalRounded:r=this._drawVerticalRounded;break;case u.ribbon:r=this._drawRibbon;break;case u.diamondSpecial:r=this._drawDiamondSpecial;break;case u.shake:r=this._drawShake;break;case u.star:case u.diamond:case u.x:case u.cross:case u.crossRounded:case u.xRounded:case u.heart:case u.sparkle:r=this._drawPath;break;case u.square:default:r=this._drawSquare}r.call(this,{x:n,y:e,xIndex:o,yIndex:i,size:a,getNeighbor:c,cornerIndex:h})},s.prototype._getNeighbors=function(t){var r=+t(-1,0),n=+t(1,0),e=+t(0,-1),o=+t(0,1);return{left:r,right:n,top:e,bottom:o,count:r+n+e+o}},s.prototype._getSideRotation=function(t){var r=t.right,n=t.top,e=t.bottom;return r?Math.PI:n?Math.PI/2:e?-Math.PI/2:0},s.prototype._drawClassyRounded=function(t){var r=t.x,n=t.y,e=t.size,o=t.getNeighbor,i=+o(-1,0),a=+o(1,0),c=+o(0,-1),d=+o(0,1);i+a+c+d!==0?i||c?a||d?this._basicSquare({x:r,y:n,size:e,rotation:0}):this._basicCornerExtraRounded({x:r,y:n,size:e,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:r,y:n,size:e,rotation:-Math.PI/2}):this._basicCornersRounded({x:r,y:n,size:e,rotation:Math.PI/2})},s.prototype._drawDot=function(t){var r=t.x,n=t.y,e=t.size;this._basicDot({x:r,y:n,size:e,rotation:0})},s.prototype._drawSquare=function(t){var r=t.x,n=t.y,e=t.size;this._basicSquare({x:r,y:n,size:e,rotation:0})},s.prototype._drawRounded=function(t){var r=t.x,n=t.y,e=t.size,o=t.getNeighbor,i=+o(-1,0),a=+o(1,0),c=+o(0,-1),d=+o(0,1),h=i+a+c+d;if(h!==0)if(h>2||i&&a||c&&d)this._basicSquare({x:r,y:n,size:e,rotation:0});else{if(h===2){var f=0;return i&&c?f=Math.PI/2:c&&a?f=Math.PI:a&&d&&(f=-Math.PI/2),void this._basicCornerRounded({x:r,y:n,size:e,rotation:f})}if(h===1)return f=0,c?f=Math.PI/2:a?f=Math.PI:d&&(f=-Math.PI/2),void this._basicSideRounded({x:r,y:n,size:e,rotation:f})}else this._basicDot({x:r,y:n,size:e,rotation:0})},s.prototype._drawExtraRounded=function(t){var r=t.x,n=t.y,e=t.size,o=t.getNeighbor,i=+o(-1,0),a=+o(1,0),c=+o(0,-1),d=+o(0,1),h=i+a+c+d;if(h!==0)if(h>2||i&&a||c&&d)this._basicSquare({x:r,y:n,size:e,rotation:0});else{if(h===2){var f=0;return i&&c?f=Math.PI/2:c&&a?f=Math.PI:a&&d&&(f=-Math.PI/2),void this._basicCornerExtraRounded({x:r,y:n,size:e,rotation:f})}if(h===1)return f=0,c?f=Math.PI/2:a?f=Math.PI:d&&(f=-Math.PI/2),void this._basicSideRounded({x:r,y:n,size:e,rotation:f})}else this._basicDot({x:r,y:n,size:e,rotation:0})},s.prototype._drawClassy=function(t){var r=t.x,n=t.y,e=t.size,o=t.getNeighbor,i=+o(-1,0),a=+o(1,0),c=+o(0,-1),d=+o(0,1);i+a+c+d!==0?i||c?a||d?this._basicSquare({x:r,y:n,size:e,rotation:0}):this._basicCornerRounded({x:r,y:n,size:e,rotation:Math.PI/2}):this._basicCornerRounded({x:r,y:n,size:e,rotation:-Math.PI/2}):this._basicCornersRounded({x:r,y:n,size:e,rotation:Math.PI/2})},s.prototype._drawHorizontalRounded=function(t){var r=t.x,n=t.y,e=t.size,o=t.getNeighbor,i=this._getNeighbors(o),a=i.left,c=i.right,d=.86*e,h={x:r,y:n,size:d};return a&&c?this._basicRectangle({x:r,y:n,xSize:e,ySize:d}):a&&!c||!a&&c?this._reducedBasicSideRounded(W(W({},h),{rotation:c?Math.PI:0}),e):void this._basicReducedDot(W(W({},h),{rotation:0}),e)},s.prototype._drawVerticalRounded=function(t){var r=t.x,n=t.y,e=t.size,o=t.getNeighbor,i=this._getNeighbors(o),a=i.top,c=i.bottom,d=.86*e,h={x:r,y:n,size:d};return a&&c?this._basicRectangle({x:r,y:n,xSize:d,ySize:e}):a&&!c||!a&&c?this._reducedBasicSideRounded(W(W({},h),{rotation:a?Math.PI/2:-Math.PI/2}),e):void this._basicReducedDot(W(W({},h),{rotation:0}),e)},s.prototype._drawRibbon=function(t){var r=t.x,n=t.y,e=t.size,o=t.getNeighbor,i=this._getNeighbors(o),a=i.top,c=i.bottom,d=i.right,h={x:r,y:n,size:e};if(i.count!==1)return this._basicSquare(W(W({},h),{rotation:0}));this._basicCornerRibbon(W(W({},h),{rotation:this._getSideRotation({right:d,top:a,bottom:c})}))},s.prototype._drawDiamondSpecial=function(t){var r=t.x,n=t.y,e=t.size,o=t.getNeighbor,i=this._getNeighbors(o),a=i.top,c=i.bottom,d=i.left,h=i.right,f=i.count,S={x:r,y:n,size:e,rotation:0};if(f===0)return this._basicDiamond(S);if(f===1)return this._basicSideDiamond(W(W({},S),{rotation:this._getSideRotation({right:h,top:a,bottom:c})}));if(!(f!==2||d&&h||a&&c)){var z=0;return a&&d?z=Math.PI/2:a&&h?z=Math.PI:c&&h&&(z=-Math.PI/2),this._basicCornerDiamond(W(W({},S),{rotation:z}))}this._basicSquare(S)},s.prototype._drawShake=function(t){var r=t.x,n=t.y,e=t.xIndex,o=t.yIndex,i=t.size,a=t.cornerIndex,c=.9*i,d=Math.PI/16,h=(e+1)*(o+1)+a;h=73244475*((h=73244475*(h>>16^h))>>16^h),h^=h>>16,h=(h%=18)<9?h-9-1:h-9+2,h/=10,this._basicReducedSquare({x:r,y:n,size:c,rotation:h*d},i)},s}();const yt=zt;var gt,Lt=(gt=function(s,t){return gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(r[e]=n[e])},gt(s,t)},function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=s}gt(s,t),s.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}),H=function(){return H=Object.assign||function(s){for(var t,r=1,n=arguments.length;r<n;r++)for(var e in t=arguments[r])Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=t[e]);return s},H.apply(this,arguments)},tt=function(s){function t(r){var n=r.context,e=r.type,o=s.call(this)||this;return o._context=n,o._type=e,o}return Lt(t,s),t.prototype._rotateFigure=function(r){var n=r.x,e=r.y,o=r.size,i=r.rotation,a=r.draw,c=n+o/2,d=e+o/2;this._context.translate(c,d),i&&this._context.rotate(i),a(),this._context.closePath(),i&&this._context.rotate(-i),this._context.translate(-c,-d)},t.prototype._rotateRectangle=function(r){var n=r.x,e=r.y,o=r.xSize,i=r.ySize,a=r.rotation,c=r.draw,d=Math.round(n+o/2),h=Math.round(e+i/2);this._context.translate(d,h),a&&this._context.rotate(a),c(),this._context.closePath(),a&&this._context.rotate(-a),this._context.translate(-d,-h)},t.prototype._basicDot=function(r){var n=this,e=r.size;this._rotateFigure(H(H({},r),{draw:function(){n._context.arc(0,0,e/2,0,2*Math.PI)}}))},t.prototype._basicReducedDot=function(r,n){var e=this,o=r.size,i=Math.round((n-o)/2),a=r.x+i,c=r.y+i;this._rotateFigure(H(H({},r),{x:a,y:c,draw:function(){e._context.arc(0,0,o/2,0,2*Math.PI)}}))},t.prototype._basicSquare=function(r){var n=this,e=r.size;this._rotateFigure(H(H({},r),{draw:function(){n._context.rect(-e/2,-e/2,e,e)}}))},t.prototype._basicReducedSquare=function(r,n){var e=this,o=r.size,i=r.x,a=r.y,c=Math.round((n-o)/2);this._rotateFigure(H(H({},r),{x:i,y:a,draw:function(){e._context.rect(-o/2+c,-o/2+c,o,o)}}))},t.prototype._basicSideRounded=function(r){var n=r.size,e=this._context;this._rotateFigure(H(H({},r),{draw:function(){e.arc(0,0,n/2,-Math.PI/2,Math.PI/2),e.lineTo(-n/2,n/2),e.lineTo(-n/2,-n/2),e.lineTo(0,-n/2)}}))},t.prototype._reducedBasicSideRounded=function(r,n){var e=r.size,o=r.x,i=r.y,a=r.rotation,c=this._context,d=e,h=e;(a===0||a===Math.PI)&&(d=n),h=n,this._rotateRectangle({x:o+Math.round((n-e)/2),y:i,xSize:d,ySize:h,rotation:a,draw:function(){c.arc(0,0,e/2,-Math.PI/2,Math.PI/2),c.lineTo(-n/2,e/2),c.lineTo(-n/2,-e/2),c.lineTo(0,-e/2)}})},t.prototype._basicCornerRounded=function(r){var n=this,e=r.size;this._rotateFigure(H(H({},r),{draw:function(){n._context.arc(0,0,e/2,-Math.PI/2,0),n._context.lineTo(e/2,e/2),n._context.lineTo(-e/2,e/2),n._context.lineTo(-e/2,-e/2),n._context.lineTo(0,-e/2)}}))},t.prototype._basicCornerExtraRounded=function(r){var n=this,e=r.size;this._rotateFigure(H(H({},r),{draw:function(){n._context.arc(-e/2,e/2,e,-Math.PI/2,0),n._context.lineTo(-e/2,e/2),n._context.lineTo(-e/2,-e/2)}}))},t.prototype._basicCornersRounded=function(r){var n=this,e=r.size;this._rotateFigure(H(H({},r),{draw:function(){n._context.arc(0,0,e/2,-Math.PI/2,0),n._context.lineTo(e/2,e/2),n._context.lineTo(0,e/2),n._context.arc(0,0,e/2,Math.PI/2,Math.PI),n._context.lineTo(-e/2,-e/2),n._context.lineTo(0,-e/2)}}))},t.prototype._basicCornersExtraRounded=function(r){var n=this,e=r.size;this._rotateFigure(H(H({},r),{draw:function(){n._context.arc(-e/2,e/2,e,-Math.PI/2,0),n._context.arc(e/2,-e/2,e,Math.PI/2,Math.PI)}}))},t.prototype._basicRectangle=function(r){var n=r.xSize,e=r.ySize,o=r.x,i=r.y,a=this._context;n<e?o+=Math.round((e-n)/2):(o+=Math.round((n-e)/2),i+=Math.round((n-e)/2)),this._rotateRectangle({x:o,y:i,xSize:n,ySize:e,rotation:0,draw:function(){a.rect(-n/2,-e/2,n,e)}})},t.prototype._basicCornerRibbon=function(r){var n=r.size,e=this._context,o=n/2,i=-o,a=-o;this._rotateFigure(H(H({},r),{draw:function(){e.lineTo(i,a),e.lineTo(i+n,a),e.lineTo(i+o,a+o),e.lineTo(i+n,a+n),e.lineTo(i,a+n)}}))},t.prototype._basicDiamond=function(r){var n=r.size,e=this._context,o=n/2,i=-o;this._rotateFigure(H(H({},r),{draw:function(){e.lineTo(0,i),e.lineTo(0+o,i+o),e.lineTo(0,i+n),e.lineTo(0-o,i+o),e.lineTo(0,i)}}))},t.prototype._basicSideDiamond=function(r){var n=r.size,e=this._context,o=n/2,i=-o,a=-o;this._rotateFigure(H(H({},r),{draw:function(){e.lineTo(i,a),e.lineTo(i+o,a),e.lineTo(i+n,a+o),e.lineTo(i+o,a+n),e.lineTo(i,a+n),e.lineTo(i,a)}}))},t.prototype._basicCornerDiamond=function(r){var n=r.size,e=this._context,o=n/2,i=-o,a=-o;this._rotateFigure(H(H({},r),{draw:function(){e.lineTo(i,a),e.lineTo(i+o,a),e.lineTo(i+n,a+o),e.lineTo(i+n,a+n),e.lineTo(i,a+n),e.lineTo(i,a)}}))},t.prototype._drawPath=function(r){var n=r.x,e=r.y,o=r.size,i=new Path2D(ht.build({type:this._type,size:o,x:n,y:e}));this._context.fill(i)},t}(yt);const l=tt;var v=function(){return v=Object.assign||function(s){for(var t,r=1,n=arguments.length;r<n;r++)for(var e in t=arguments[r])Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=t[e]);return s},v.apply(this,arguments)},p=function(){function s(t){var r=t.context,n=t.type;this._context=r,this._type=n}return s.loadPath=function(t){return k.loadPath(t)},s.prototype.draw=function(t,r,n,e){var o,i=this._context;switch(this._type){case P.square:o=this._drawSquare;break;case P.extraRounded:o=this._drawExtraRounded;break;case P.shape1:case P.shape2:case P.shape3:case P.shape4:case P.shape5:case P.shape6:case P.shape7:case P.shape8:case P.shape9:case P.shape10:case P.shape11:case P.shape12:o=this._drawPath;break;case P.dot:default:o=this._drawDot}o.call(this,{x:t,y:r,size:n,context:i,rotation:e})},s.prototype._rotateFigure=function(t){var r=t.x,n=t.y,e=t.size,o=t.context,i=t.rotation,a=t.draw,c=r+e/2,d=n+e/2;o.translate(c,d),i&&o.rotate(i),a(),o.closePath(),i&&o.rotate(-i),o.translate(-c,-d)},s.prototype._basicDot=function(t){var r=t.size,n=t.context,e=r/7;this._rotateFigure(v(v({},t),{draw:function(){n.arc(0,0,r/2,0,2*Math.PI),n.arc(0,0,r/2-e,0,2*Math.PI)}}))},s.prototype._basicSquare=function(t){var r=t.size,n=t.context,e=r/7;this._rotateFigure(v(v({},t),{draw:function(){n.rect(-r/2,-r/2,r,r),n.rect(-r/2+e,-r/2+e,r-2*e,r-2*e)}}))},s.prototype._basicExtraRounded=function(t){var r=t.size,n=t.context,e=r/7;this._rotateFigure(v(v({},t),{draw:function(){n.arc(-e,-e,2.5*e,Math.PI,-Math.PI/2),n.lineTo(e,-3.5*e),n.arc(e,-e,2.5*e,-Math.PI/2,0),n.lineTo(3.5*e,-e),n.arc(e,e,2.5*e,0,Math.PI/2),n.lineTo(-e,3.5*e),n.arc(-e,e,2.5*e,Math.PI/2,Math.PI),n.lineTo(-3.5*e,-e),n.arc(-e,-e,1.5*e,Math.PI,-Math.PI/2),n.lineTo(e,-2.5*e),n.arc(e,-e,1.5*e,-Math.PI/2,0),n.lineTo(2.5*e,-e),n.arc(e,e,1.5*e,0,Math.PI/2),n.lineTo(-e,2.5*e),n.arc(-e,e,1.5*e,Math.PI/2,Math.PI),n.lineTo(-2.5*e,-e)}}))},s.prototype._drawDot=function(t){var r=t.x,n=t.y,e=t.size,o=t.context,i=t.rotation;this._basicDot({x:r,y:n,size:e,context:o,rotation:i})},s.prototype._drawSquare=function(t){var r=t.x,n=t.y,e=t.size,o=t.context,i=t.rotation;this._basicSquare({x:r,y:n,size:e,context:o,rotation:i})},s.prototype._drawExtraRounded=function(t){var r=t.x,n=t.y,e=t.size,o=t.context,i=t.rotation;this._basicExtraRounded({x:r,y:n,size:e,context:o,rotation:i})},s.prototype._drawPath=function(t){var r=t.x,n=t.y,e=t.size,o=t.context,i=new Path2D(k.build({type:this._type,size:e,x:r,y:n}));o.fill(i)},s}();const w=p;var m=function(){return m=Object.assign||function(s){for(var t,r=1,n=arguments.length;r<n;r++)for(var e in t=arguments[r])Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=t[e]);return s},m.apply(this,arguments)},R=function(){function s(t){var r=t.context,n=t.type;this._context=r,this._type=n}return s.loadPath=function(t){return ct.loadPath(t)},s.prototype.draw=function(t,r,n,e){var o,i=this._context;switch(this._type){case A.square:o=this._drawSquare;break;case A.rounded:case A.square2:case A.square3:case A.dot2:case A.dot3:case A.dot4:case A.sun:case A.star:case A.diamond:case A.x:case A.xRounded:case A.cross:case A.crossRounded:case A.heart:o=this._drawPath;break;case A.dot:default:o=this._drawDot}o.call(this,{x:t,y:r,size:n,context:i,rotation:e})},s.prototype._rotateFigure=function(t){var r=t.x,n=t.y,e=t.size,o=t.context,i=t.rotation,a=t.draw,c=r+e/2,d=n+e/2;o.translate(c,d),i&&o.rotate(i),a(),o.closePath(),i&&o.rotate(-i),o.translate(-c,-d)},s.prototype._basicDot=function(t){var r=t.size,n=t.context;this._rotateFigure(m(m({},t),{draw:function(){n.arc(0,0,r/2,0,2*Math.PI)}}))},s.prototype._basicSquare=function(t){var r=t.size,n=t.context;this._rotateFigure(m(m({},t),{draw:function(){n.rect(-r/2,-r/2,r,r)}}))},s.prototype._drawDot=function(t){var r=t.x,n=t.y,e=t.size,o=t.context,i=t.rotation;this._basicDot({x:r,y:n,size:e,context:o,rotation:i})},s.prototype._drawSquare=function(t){var r=t.x,n=t.y,e=t.size,o=t.context,i=t.rotation;this._basicSquare({x:r,y:n,size:e,context:o,rotation:i})},s.prototype._drawPath=function(t){var r=t.x,n=t.y,e=t.size,o=t.context,i=new Path2D(ct.build({type:this._type,size:e,x:r,y:n}));o.fill(i)},s}();const L=R,T="radial";var Y=function(){return Y=Object.assign||function(s){for(var t,r=1,n=arguments.length;r<n;r++)for(var e in t=arguments[r])Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=t[e]);return s},Y.apply(this,arguments)},U=function(s,t,r,n){return new(r||(r=Promise))(function(e,o){function i(d){try{c(n.next(d))}catch(h){o(h)}}function a(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){var h;d.done?e(d.value):(h=d.value,h instanceof r?h:new r(function(f){f(h)})).then(i,a)}c((n=n.apply(s,[])).next())})},K=function(s,t){var r,n,e,o,i={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(d){return function(h){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(e=2&h[0]?n.return:h[0]?n.throw||((e=n.return)&&e.call(n),0):n.next)&&!(e=e.call(n,h[1])).done)return e;switch(n=0,e&&(h=[2&h[0],e.value]),h[0]){case 0:case 1:e=h;break;case 4:return i.label++,{value:h[1],done:!1};case 5:i.label++,n=h[1],h=[0];continue;case 7:h=i.ops.pop(),i.trys.pop();continue;default:if(!((e=(e=i.trys).length>0&&e[e.length-1])||h[0]!==6&&h[0]!==2)){i=0;continue}if(h[0]===3&&(!e||h[1]>e[0]&&h[1]<e[3])){i.label=h[1];break}if(h[0]===6&&i.label<e[1]){i.label=e[1],e=h;break}if(e&&i.label<e[2]){i.label=e[2],i.ops.push(h);break}e[2]&&i.ops.pop(),i.trys.pop();continue}h=t.call(s,i)}catch(f){h=[6,f],n=0}finally{r=e=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([c,d])}}},dt=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],ut=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]],rt={src:"",element:null},ot=function(){function s(t,r,n,e){this._workerCtx=self,this._frameImage=n,this._image=e,this._canvas=r;var o=t.frameOptions,i=o.topSize,a=o.bottomSize,c=this.getXPadding(t.frameOptions);this._originalWidth=t.width,t.width=t.width+c,t.height=t.height+i+a,this._canvas.width=t.width,this._canvas.height=t.height,this._options=t}return s.prototype.getXPadding=function(t){if(t.rightSize){var r=t.leftSize,n=r===void 0?0:r,e=t.rightSize;return n+(e===void 0?0:e)}var o=t.xSize;return 2*(o===void 0?0:o)},Object.defineProperty(s.prototype,"context",{get:function(){return this._canvas.getContext("2d")},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"width",{get:function(){return this._canvas.width},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"height",{get:function(){return this._canvas.height},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isWorker",{get:function(){return!("document"in this._workerCtx)},enumerable:!1,configurable:!0}),s.prototype.getCanvas=function(){return this._canvas},s.prototype.clear=function(){var t=this.context;t&&t.clearRect(0,0,this._canvas.width,this._canvas.height)},s.prototype.drawQR=function(t){return U(this,void 0,void 0,function(){var r,n,e,o,i,a,c,d,h,f=this;return K(this,function(S){switch(S.label){case 0:return r=t.getModuleCount(),n=Math.min(this._options.width,this._options.height)-2*this._options.margin-this.getXPadding(this._options.frameOptions),e=Math.floor(n/r),o={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=t,[4,this.loadAssets()];case 1:if(S.sent(),this._options.image){if(!this._image)return[2];i=this._options,a=i.imageOptions,c=i.qrOptions,d=a.imageSize*nt[c.errorCorrectionLevel],h=Math.floor(d*r*r),o=pt({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:h,maxHiddenAxisDots:r-14,dotSize:e})}return this.clear(),this.drawFrameBackground(),this.drawFrame(),this.drawBackground(),this.drawDots(function(z,C){var E,F,I,B,$,it;return!(f._options.imageOptions.hideBackgroundDots&&z>=(r-o.hideXDots)/2&&z<(r+o.hideXDots)/2&&C>=(r-o.hideYDots)/2&&C<(r+o.hideYDots)/2||!((E=dt[z])===null||E===void 0)&&E[C]||!((F=dt[z-r+7])===null||F===void 0)&&F[C]||!((I=dt[z])===null||I===void 0)&&I[C-r+7]||!((B=ut[z])===null||B===void 0)&&B[C]||!(($=ut[z-r+7])===null||$===void 0)&&$[C]||!((it=ut[z])===null||it===void 0)&&it[C-r+7])}),[4,this.drawCorners()];case 2:return S.sent(),this._options.image&&this.drawImage({width:o.width,height:o.height,count:r,dotSize:e}),[2]}})})},s.prototype.loadFrameImage=function(){var t=this;return this.isWorker?Promise.resolve():new Promise(function(r,n){var e=t._options,o=new Image;t._frameImage=o,o.onload=function(){r()},o.onerror=function(){n(new Error("Frame image error"))},o.src=e.frameOptions.image})},s.prototype.drawFrame=function(){var t=this.context,r=this._options;t&&r.frameOptions.image&&this._frameImage&&t.drawImage(this._frameImage,0,0,r.width,r.height)},s.prototype.drawFrameBackground=function(){var t=this.context,r=this._options,n=r.frameOptions.background;t&&(n!=null&&n.color||n!=null&&n.gradient)&&(this._setColor({color:n.color,stroke:!1,context:t,options:n.gradient,additionalRotation:0,x:0,y:0,width:this._canvas.width,height:this._canvas.height}),this.fillRoundRect(0,0,this._canvas.width,this._canvas.height,r.borderRadius))},s.prototype.drawBackground=function(){var t=this.context,r=this._options;if(t){if(r.backgroundOptions.gradient){if(!this._qr)throw"QR code is not defined";var n=this._qr.getModuleCount();if(n>r.width||n>r.height)throw"The canvas is too small.";var e=Math.min(r.width,r.height)-2*r.margin-this.getXPadding(r.frameOptions),o=Math.floor(e/n),i=this.getXBeginning(n,o),a=Math.floor((r.height-r.frameOptions.topSize-r.frameOptions.bottomSize-n*o)/2)+r.frameOptions.topSize,c=this._createGradient({context:t,options:r.backgroundOptions.gradient,additionalRotation:0,x:i,y:a,width:e});t.fillStyle=c}else r.backgroundOptions.color&&(t.fillStyle=r.backgroundOptions.color);var d=r.frameOptions.leftSize||r.frameOptions.xSize||0;this.fillRoundRect(d,r.frameOptions.topSize,this._canvas.width-this.getXPadding(r.frameOptions),this._canvas.height-r.frameOptions.topSize-r.frameOptions.bottomSize,r.borderRadius)}},s.prototype.getXBeginning=function(t,r){var n=this._options,e=n.width,o=n.frameOptions;if(o.xSize)return Math.floor((e-t*r)/2);var i=o.leftSize,a=i===void 0?0:i,c=o.rightSize,d=c===void 0?0:c;return Math.floor((e-a-d-t*r)/2)+a},s.prototype.drawDots=function(t){var r=this;if(!this._qr)throw"QR code is not defined";var n=this.context;if(!n)throw"QR code is not defined";var e=this._options,o=this._qr.getModuleCount();if(o>e.width||o>e.height)throw"The canvas is too small.";var i=Math.min(e.width,e.height)-2*e.margin-this.getXPadding(e.frameOptions),a=Math.floor(i/o),c=this.getXBeginning(o,a),d=Math.floor((e.height-e.frameOptions.topSize-e.frameOptions.bottomSize-o*a)/2)+e.frameOptions.topSize,h=new l({context:n,type:e.dotsOptions.type});this._setColor({color:e.dotsOptions.color,context:n,options:e.dotsOptions.gradient,additionalRotation:0,x:c,y:d,width:o*a});for(var f=function(C){for(var E=function(I){return t&&!t(C,I)?"continue":S._qr.isDark(C,I)?(n.beginPath(),h.draw({x:c+C*a,y:d+I*a,xIndex:C,yIndex:I,size:a,getNeighbor:function(B,$){return!(C+B<0||I+$<0||C+B>=o||I+$>=o)&&!(t&&!t(C+B,I+$))&&!!r._qr&&r._qr.isDark(C+B,I+$)}}),void n.fill("evenodd")):"continue"},F=0;F<o;F++)E(F)},S=this,z=0;z<o;z++)f(z)},s.prototype.drawCorners=function(t){var r,n;return U(this,void 0,void 0,function(){var e,o,i,a,c,d,h,f,S,z=this;return K(this,function(C){switch(C.label){case 0:if(!this._qr||!(e=this.context))throw"QR code is not defined";return o=this._options,i=this._qr.getModuleCount(),a=Math.min(o.width,o.height)-2*o.margin-this.getXPadding(o.frameOptions),c=Math.floor(a/i),d=7*c,h=3*c,f=this.getXBeginning(i,c),S=Math.floor((o.height-o.frameOptions.topSize-o.frameOptions.bottomSize-i*c)/2)+o.frameOptions.topSize,[4,Promise.all([w.loadPath((r=o.cornersSquareOptions)===null||r===void 0?void 0:r.type),L.loadPath((n=o.cornersDotOptions)===null||n===void 0?void 0:n.type)])];case 1:return C.sent(),[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(function(E,F){var I,B,$,it,Pt,bt,$t,Vt,Zt,Kt,oe=E[0],Qt=E[1],Bt=E[2];if(!t||t(oe,Qt)){var At=f+oe*c*(i-7),It=S+Qt*c*(i-7);if(z._setColor({color:(I=o.cornersSquareOptions)===null||I===void 0?void 0:I.color,context:e,options:(B=o.cornersSquareOptions)===null||B===void 0?void 0:B.gradient,additionalRotation:Bt,x:At,y:It,width:d}),($=o.cornersSquareOptions)===null||$===void 0?void 0:$.type){var Xt=new w({context:e,type:(it=o.cornersSquareOptions)===null||it===void 0?void 0:it.type});e.beginPath(),Xt.draw(At,It,d,Bt)}else{var Dt=new l({context:e,type:o.dotsOptions.type});e.beginPath();for(var Nt=function(ft){for(var Jt=function(lt){if(!(!((Pt=dt[ft])===null||Pt===void 0)&&Pt[lt]))return"continue";Dt.draw({x:At+ft*c,y:It+lt*c,xIndex:ft,yIndex:lt,size:c,cornerIndex:F+1,getNeighbor:function(te,qt){var mt;return!!(!((mt=dt[ft+te])===null||mt===void 0)&&mt[lt+qt])}})},Ft=0;Ft<dt[ft].length;Ft++)Jt(Ft)},Rt=0;Rt<dt.length;Rt++)Nt(Rt)}if(e.fill("evenodd"),z._setColor({color:(bt=o.cornersDotOptions)===null||bt===void 0?void 0:bt.color,context:e,options:($t=o.cornersDotOptions)===null||$t===void 0?void 0:$t.gradient,additionalRotation:Bt,x:At+2*c,y:It+2*c,width:h}),(Vt=o.cornersDotOptions)===null||Vt===void 0?void 0:Vt.type){var jt=new L({context:e,type:(Zt=o.cornersDotOptions)===null||Zt===void 0?void 0:Zt.type});e.beginPath(),jt.draw(At+2*c,It+2*c,h,Bt)}else{Dt=new l({context:e,type:o.dotsOptions.type}),e.beginPath();var xe=function(ft){for(var Jt=function(lt){if(!(!((Kt=ut[ft])===null||Kt===void 0)&&Kt[lt]))return"continue";Dt.draw({x:At+ft*c,y:It+lt*c,xIndex:ft,yIndex:lt,size:c,cornerIndex:F+4,getNeighbor:function(te,qt){var mt;return!!(!((mt=ut[ft+te])===null||mt===void 0)&&mt[lt+qt])}})},Ft=0;Ft<ut[ft].length;Ft++)Jt(Ft)};for(Rt=0;Rt<ut.length;Rt++)xe(Rt)}e.fill("evenodd")}}),[2]}})})},s.prototype.loadAssets=function(){var t=[];return this._options.image&&t.push(this.loadImage()),this._options.frameOptions.image&&t.push(this.loadFrameImage()),Promise.all(t)},s.prototype.fixSvgImage=function(t){return U(this,void 0,void 0,function(){var r,n,e,o,i,a,c,d,h=this;return K(this,function(f){switch(f.label){case 0:return t.width?[2]:(t.style.visibility="hidden",document.body.appendChild(t),r=t.width,n=t.height,t.remove(),[4,fetch(t.src)]);case 1:return[4,f.sent().text()];case 2:return e=f.sent(),o=new DOMParser,i=/^data:image\/svg\+xml/.test(e),a=i?o.parseFromString(window.atob(t.src),"image/svg+xml"):o.parseFromString(e,"text/xml"),(c=a.querySelector("svg"))?(c.setAttribute("width",r.toString()),c.setAttribute("height",n.toString()),d=window.btoa(new XMLSerializer().serializeToString(c)),[2,new Promise(function(S,z){var C=new Image;C.onload=function(){rt.src=t.src,rt.element=C,h._image=C,S()},C.onerror=z,C.src="data:image/svg+xml;base64,".concat(d)})]):[2]}})})},s.prototype.loadImage=function(){var t=this;return this.isWorker?this.loadImageFromWorker():new Promise(function(r,n){var e=t._options,o=new Image;return e.image?e.image===rt.src&&rt.element?(t._image=rt.element,r()):(typeof e.imageOptions.crossOrigin=="string"&&(o.crossOrigin=e.imageOptions.crossOrigin),t._image=o,o.onload=function(){/(^data:image\/svg\+xml)|(\.svg$)/.test(e.image||"")?t.fixSvgImage(o).then(r).catch(function(){n(new Error("Svg image load error - src: ".concat(o.src)))}):r()},o.onerror=function(){n(new Error("Image load error - src: ".concat(e.image)))},void(o.src=e.image)):n(new Error("Image is not defined"))})},s.prototype.loadImageFromWorker=function(){return U(this,void 0,void 0,function(){var t=this;return K(this,function(r){return this._image?[2]:this._options.image?[2,fetch(this._options.image).then(function(n){return n.blob()}).then(function(n){return createImageBitmap(n)}).then(function(n){t._image=n}).catch(function(n){throw n})]:[2,Promise.reject(new Error("image is not defined"))]})})},s.prototype.drawImage=function(t){var r=t.width,n=t.height,e=t.count,o=t.dotSize,i=this.context;if(!i)throw"canvasContext is not defined";if(!this._image)throw"image is not defined";var a=this._options,c=Math.floor((a.width-e*o)/2);a.frameOptions.leftSize&&(c=Math.floor((this._originalWidth-e*o)/2+a.frameOptions.leftSize));var d=Math.floor((a.height-a.frameOptions.topSize-a.frameOptions.bottomSize-e*o)/2)+a.frameOptions.topSize,h=c+a.imageOptions.margin+(e*o-r)/2,f=d+a.imageOptions.margin+(e*o-n)/2,S=r-2*a.imageOptions.margin,z=n-2*a.imageOptions.margin;i.drawImage(this._image,h,f,S<0?0:S,z<0?0:z)},s.prototype.fillRoundRect=function(t,r,n,e,o){var i=this.context;i&&(i.beginPath(),i.moveTo(t+o,r),i.lineTo(t+n-o,r),i.quadraticCurveTo(t+n,r,t+n,r+o),i.lineTo(t+n,r+e-o),i.quadraticCurveTo(t+n,r+e,t+n-o,r+e),i.lineTo(t+o,r+e),i.quadraticCurveTo(t,r+e,t,r+e-o),i.lineTo(t,r+o),i.quadraticCurveTo(t,r,t+o,r),i.closePath(),i.fill())},s.prototype._createGradient=function(t){var r,n=t.context,e=t.options,o=t.additionalRotation,i=t.x,a=t.y,c=t.width,d=t.height||c;if(e.type===T){var h=i+c/2,f=a+d/2;r=n.createRadialGradient(h,f,0,h,f,c/2)}else{var S=((e.rotation||0)+o)%(2*Math.PI),z=(S+2*Math.PI)%(2*Math.PI),C=i+c/2,E=a+d/2,F=i+c/2,I=a+d/2;z>=0&&z<=.25*Math.PI||z>1.75*Math.PI&&z<=2*Math.PI?(C-=c/2,E-=d/2*Math.tan(S),F+=c/2,I+=d/2*Math.tan(S)):z>.25*Math.PI&&z<=.75*Math.PI?(E-=d/2,C-=c/2/Math.tan(S),I+=d/2,F+=c/2/Math.tan(S)):z>.75*Math.PI&&z<=1.25*Math.PI?(C+=c/2,E+=d/2*Math.tan(S),F-=c/2,I-=d/2*Math.tan(S)):z>1.25*Math.PI&&z<=1.75*Math.PI&&(E+=d/2,C+=c/2/Math.tan(S),I-=d/2,F-=c/2/Math.tan(S)),r=n.createLinearGradient(Math.round(C),Math.round(E),Math.round(F),Math.round(I))}return e.colorStops.forEach(function(B){var $=B.offset,it=B.color;r.addColorStop($,it)}),r},s.prototype._setColor=function(t){var r=t.color,n=t.options,e=t.context,o=t.stroke,i=o===void 0||o,a=function(d,h){var f={};for(var S in d)Object.prototype.hasOwnProperty.call(d,S)&&h.indexOf(S)<0&&(f[S]=d[S]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function"){var z=0;for(S=Object.getOwnPropertySymbols(d);z<S.length;z++)h.indexOf(S[z])<0&&Object.prototype.propertyIsEnumerable.call(d,S[z])&&(f[S[z]]=d[S[z]])}return f}(t,["color","options","context","stroke"]),c="";n?c=this._createGradient(Y({context:e,options:n},a)):r&&(c=r),c&&(e.fillStyle=c,i&&(e.strokeStyle=c))},s}();const j=ot;for(var Et={},Tt=0;Tt<=40;Tt++)Et[Tt]=Tt;const X=Et,wt={canvas:"canvas",svg:"svg"},Mt={L:"L",M:"M",Q:"Q",H:"H"},Ct={type:wt.canvas,width:300,height:300,data:"",margin:0,borderRadius:0,offscreen:!1,qrOptions:{typeNumber:X[0],mode:void 0,errorCorrectionLevel:Mt.Q},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{color:"#fff"},frameOptions:{xSize:0,leftSize:0,rightSize:0,topSize:0,bottomSize:0,image:"",background:{color:""},svgContent:"",svgWidth:0,svgHeight:0}};var re=function(){var s=function(t,r){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])},s(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}s(t,r),t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Q=function(){return Q=Object.assign||function(s){for(var t,r=1,n=arguments.length;r<n;r++)for(var e in t=arguments[r])Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=t[e]);return s},Q.apply(this,arguments)},Ot=function(s){function t(r){var n=r.svg,e=r.type,o=s.call(this)||this;return o._svg=n,o._type=e,o}return re(t,s),t.prototype._rotateFigure=function(r){var n,e=r.x,o=r.y,i=r.size,a=r.rotation,c=e+i/2,d=o+i/2;(0,r.draw)(),(n=this._element)===null||n===void 0||n.setAttribute("transform","rotate(".concat(180*a/Math.PI,",").concat(c,",").concat(d,")"))},t.prototype._rotateRectangle=function(r){var n,e=r.x,o=r.y,i=r.xSize,a=r.ySize,c=r.rotation,d=e+i/2,h=o+a/2;(0,r.draw)(),(n=this._element)===null||n===void 0||n.setAttribute("transform","rotate(".concat(180*c/Math.PI,",").concat(d,",").concat(h,")"))},t.prototype._basicDot=function(r){var n=this,e=r.size,o=r.x,i=r.y;this._rotateFigure(Q(Q({},r),{draw:function(){n._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),n._element.setAttribute("cx",String(o+e/2)),n._element.setAttribute("cy",String(i+e/2)),n._element.setAttribute("r",String(e/2))}}))},t.prototype._basicReducedDot=function(r,n){var e=this,o=r.size,i=(n-o)/2,a=r.x+i,c=r.y+i;this._rotateFigure(Q(Q({},r),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),e._element.setAttribute("cx",String(a+o/2)),e._element.setAttribute("cy",String(c+o/2)),e._element.setAttribute("r",String(o/2))}}))},t.prototype._basicSquare=function(r){var n=this,e=r.size,o=r.x,i=r.y;this._rotateFigure(Q(Q({},r),{draw:function(){n._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),n._element.setAttribute("x",String(o)),n._element.setAttribute("y",String(i)),n._element.setAttribute("width",String(e)),n._element.setAttribute("height",String(e))}}))},t.prototype._basicReducedSquare=function(r,n){var e=this,o=r.size,i=Math.round((n-o)/2),a=r.x+i,c=r.y+i;this._rotateFigure(Q(Q({},r),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),e._element.setAttribute("x",String(a)),e._element.setAttribute("y",String(c)),e._element.setAttribute("width",String(o)),e._element.setAttribute("height",String(o))}}))},t.prototype._basicRectangle=function(r){var n=this,e=r.xSize,o=r.ySize,i=r.x,a=r.y;e<o?i+=(o-e)/2:a+=(e-o)/2,this._rotateRectangle(Q(Q({},r),{rotation:0,draw:function(){n._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),n._element.setAttribute("x",String(i)),n._element.setAttribute("y",String(a)),n._element.setAttribute("width",String(e)),n._element.setAttribute("height",String(o))}}))},t.prototype._basicSideRounded=function(r){var n=this,e=r.size,o=r.x,i=r.y;this._rotateFigure(Q(Q({},r),{draw:function(){n._element=document.createElementNS("http://www.w3.org/2000/svg","path"),n._element.setAttribute("d","M ".concat(o," ").concat(i)+"v ".concat(e)+"h ".concat(e/2)+"a ".concat(e/2," ").concat(e/2,", 0, 0, 0, 0 ").concat(-e))}}))},t.prototype._reducedBasicSideRounded=function(r,n){var e=this,o=r.size,i=r.rotation,a=n/2+o/2,c=r.x,d=r.y;i===Math.PI/2||i===-Math.PI/2?(c+=(n-a)/2,d+=(n-a)/2+(i===Math.PI/2?0:n/2-o/2)):(c+=i===0?0:n-a,d+=(n-o)/2),this._rotateRectangle({x:c,y:d,xSize:a,ySize:o,rotation:i,draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M ".concat(c," ").concat(d)+"v ".concat(o)+"h ".concat(n/2)+"a ".concat(o/2," ").concat(o/2,", 0, 0, 0, 0 ").concat(-o))}})},t.prototype._basicCornerRounded=function(r){var n=this,e=r.size,o=r.x,i=r.y;this._rotateFigure(Q(Q({},r),{draw:function(){n._element=document.createElementNS("http://www.w3.org/2000/svg","path"),n._element.setAttribute("d","M ".concat(o," ").concat(i)+"v ".concat(e)+"h ".concat(e)+"v ".concat(-e/2)+"a ".concat(e/2," ").concat(e/2,", 0, 0, 0, ").concat(-e/2," ").concat(-e/2))}}))},t.prototype._basicCornerExtraRounded=function(r){var n=this,e=r.size,o=r.x,i=r.y;this._rotateFigure(Q(Q({},r),{draw:function(){n._element=document.createElementNS("http://www.w3.org/2000/svg","path"),n._element.setAttribute("d","M ".concat(o," ").concat(i)+"v ".concat(e)+"h ".concat(e)+"a ".concat(e," ").concat(e,", 0, 0, 0, ").concat(-e," ").concat(-e))}}))},t.prototype._basicCornersRounded=function(r){var n=this,e=r.size,o=r.x,i=r.y;this._rotateFigure(Q(Q({},r),{draw:function(){n._element=document.createElementNS("http://www.w3.org/2000/svg","path"),n._element.setAttribute("d","M ".concat(o," ").concat(i)+"v ".concat(e/2)+"a ".concat(e/2," ").concat(e/2,", 0, 0, 0, ").concat(e/2," ").concat(e/2)+"h ".concat(e/2)+"v ".concat(-e/2)+"a ".concat(e/2," ").concat(e/2,", 0, 0, 0, ").concat(-e/2," ").concat(-e/2))}}))},t.prototype._basicCornerRibbon=function(r){var n=this,e=r.size,o=r.x,i=r.y,a=e/2;this._rotateFigure(Q(Q({},r),{draw:function(){n._element=document.createElementNS("http://www.w3.org/2000/svg","path"),n._element.setAttribute("d","M ".concat(o," ").concat(i," h ").concat(e," l ").concat(-a," ").concat(a," l ").concat(a," ").concat(a," h ").concat(-e," z"))}}))},t.prototype._basicDiamond=function(r){var n=this,e=r.size,o=r.x,i=r.y,a=e/2;this._rotateFigure(Q(Q({},r),{draw:function(){n._element=document.createElementNS("http://www.w3.org/2000/svg","path"),n._element.setAttribute("d","M ".concat(o+a," ").concat(i," l ").concat(a," ").concat(a," l ").concat(-a," ").concat(a," l ").concat(-a," ").concat(-a," z"))}}))},t.prototype._basicSideDiamond=function(r){var n=this,e=r.size,o=r.x,i=r.y,a=e/2;this._rotateFigure(Q(Q({},r),{draw:function(){n._element=document.createElementNS("http://www.w3.org/2000/svg","path"),n._element.setAttribute("d","M ".concat(o," ").concat(i," h ").concat(a," l ").concat(a," ").concat(a," l ").concat(-a," ").concat(a," h ").concat(-a," z"))}}))},t.prototype._basicCornerDiamond=function(r){var n=this,e=r.size,o=r.x,i=r.y,a=e/2;this._rotateFigure(Q(Q({},r),{draw:function(){n._element=document.createElementNS("http://www.w3.org/2000/svg","path"),n._element.setAttribute("d","M ".concat(o," ").concat(i," h ").concat(a," l ").concat(a," ").concat(a," v ").concat(a," h ").concat(-e," z"))}}))},t.prototype._drawPath=function(r){var n=r.x,e=r.y,o=r.size;this._element=document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",ht.build({type:this._type,size:o,x:n,y:e}))},t}(yt);const we=Ot;var Wt=function(){return Wt=Object.assign||function(s){for(var t,r=1,n=arguments.length;r<n;r++)for(var e in t=arguments[r])Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=t[e]);return s},Wt.apply(this,arguments)},qe=function(){function s(t){var r=t.svg,n=t.type;this._svg=r,this._type=n}return s.loadPath=function(t){return k.loadPath(t)},s.prototype.draw=function(t,r,n,e){var o;switch(this._type){case P.square:o=this._drawSquare;break;case P.extraRounded:o=this._drawExtraRounded;break;case P.shape1:case P.shape2:case P.shape3:case P.shape4:case P.shape5:case P.shape6:case P.shape7:case P.shape8:case P.shape9:case P.shape10:case P.shape11:case P.shape12:o=this._drawPath;break;case P.dot:default:o=this._drawDot}o.call(this,{x:t,y:r,size:n,rotation:e})},s.prototype._rotateFigure=function(t){var r,n=t.x,e=t.y,o=t.size,i=t.rotation,a=n+o/2,c=e+o/2;(0,t.draw)(),(r=this._element)===null||r===void 0||r.setAttribute("transform","rotate(".concat(180*i/Math.PI,",").concat(a,",").concat(c,")"))},s.prototype._basicDot=function(t){var r=this,n=t.size,e=t.x,o=t.y,i=n/7;this._rotateFigure(Wt(Wt({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M ".concat(e+n/2," ").concat(o+n/2)+"m ".concat(0," ").concat(-n/2)+"a ".concat(n/2," ").concat(n/2," 0 1 0 1 0")+"z"+"m 0 ".concat(i)+"a ".concat(n/2-i," ").concat(n/2-i," 0 1 1 -1 0")+"Z")}}))},s.prototype._basicSquare=function(t){var r=this,n=t.size,e=t.x,o=t.y,i=n/7;this._rotateFigure(Wt(Wt({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M ".concat(e," ").concat(o)+"v ".concat(n)+"h ".concat(n)+"v ".concat(-n)+"z"+"M ".concat(e+i," ").concat(o+i)+"h ".concat(n-2*i)+"v ".concat(n-2*i)+"h ".concat(2*i-n)+"z")}}))},s.prototype._basicExtraRounded=function(t){var r=this,n=t.size,e=t.x,o=t.y,i=n/7;this._rotateFigure(Wt(Wt({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M ".concat(e," ").concat(o+2.5*i)+"v ".concat(2*i)+"a ".concat(2.5*i," ").concat(2.5*i,", 0, 0, 0, ").concat(2.5*i," ").concat(2.5*i)+"h ".concat(2*i)+"a ".concat(2.5*i," ").concat(2.5*i,", 0, 0, 0, ").concat(2.5*i," ").concat(2.5*-i)+"v ".concat(-2*i)+"a ".concat(2.5*i," ").concat(2.5*i,", 0, 0, 0, ").concat(2.5*-i," ").concat(2.5*-i)+"h ".concat(-2*i)+"a ".concat(2.5*i," ").concat(2.5*i,", 0, 0, 0, ").concat(2.5*-i," ").concat(2.5*i)+"M ".concat(e+2.5*i," ").concat(o+i)+"h ".concat(2*i)+"a ".concat(1.5*i," ").concat(1.5*i,", 0, 0, 1, ").concat(1.5*i," ").concat(1.5*i)+"v ".concat(2*i)+"a ".concat(1.5*i," ").concat(1.5*i,", 0, 0, 1, ").concat(1.5*-i," ").concat(1.5*i)+"h ".concat(-2*i)+"a ".concat(1.5*i," ").concat(1.5*i,", 0, 0, 1, ").concat(1.5*-i," ").concat(1.5*-i)+"v ".concat(-2*i)+"a ".concat(1.5*i," ").concat(1.5*i,", 0, 0, 1, ").concat(1.5*i," ").concat(1.5*-i))}}))},s.prototype._drawDot=function(t){var r=t.x,n=t.y,e=t.size,o=t.rotation;this._basicDot({x:r,y:n,size:e,rotation:o})},s.prototype._drawSquare=function(t){var r=t.x,n=t.y,e=t.size,o=t.rotation;this._basicSquare({x:r,y:n,size:e,rotation:o})},s.prototype._drawExtraRounded=function(t){var r=t.x,n=t.y,e=t.size,o=t.rotation;this._basicExtraRounded({x:r,y:n,size:e,rotation:o})},s.prototype._drawPath=function(t){var r=t.x,n=t.y,e=t.size;this._element=document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",k.build({type:this._type,size:e,x:r,y:n}))},s}();const Pe=qe;var ne=function(){return ne=Object.assign||function(s){for(var t,r=1,n=arguments.length;r<n;r++)for(var e in t=arguments[r])Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=t[e]);return s},ne.apply(this,arguments)},Ee=function(){function s(t){var r=t.svg,n=t.type;this._svg=r,this._type=n}return s.loadPath=function(t){return ct.loadPath(t)},s.prototype.draw=function(t,r,n,e){var o;switch(this._type){case A.square:o=this._drawSquare;break;case A.rounded:case A.square2:case A.square3:case A.dot2:case A.dot3:case A.dot4:case A.sun:case A.star:case A.diamond:case A.x:case A.xRounded:case A.cross:case A.crossRounded:case A.heart:o=this._drawPath;break;case A.dot:default:o=this._drawDot}o.call(this,{x:t,y:r,size:n,rotation:e})},s.prototype._rotateFigure=function(t){var r,n=t.x,e=t.y,o=t.size,i=t.rotation,a=n+o/2,c=e+o/2;(0,t.draw)(),(r=this._element)===null||r===void 0||r.setAttribute("transform","rotate(".concat(180*i/Math.PI,",").concat(a,",").concat(c,")"))},s.prototype._basicDot=function(t){var r=this,n=t.size,e=t.x,o=t.y;this._rotateFigure(ne(ne({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),r._element.setAttribute("cx",String(e+n/2)),r._element.setAttribute("cy",String(o+n/2)),r._element.setAttribute("r",String(n/2))}}))},s.prototype._basicSquare=function(t){var r=this,n=t.size,e=t.x,o=t.y;this._rotateFigure(ne(ne({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),r._element.setAttribute("x",String(e)),r._element.setAttribute("y",String(o)),r._element.setAttribute("width",String(n)),r._element.setAttribute("height",String(n))}}))},s.prototype._drawDot=function(t){var r=t.x,n=t.y,e=t.size,o=t.rotation;this._basicDot({x:r,y:n,size:e,rotation:o})},s.prototype._drawSquare=function(t){var r=t.x,n=t.y,e=t.size,o=t.rotation;this._basicSquare({x:r,y:n,size:e,rotation:o})},s.prototype._drawPath=function(t){var r=t.x,n=t.y,e=t.size;this._element=document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",ct.build({type:this._type,size:e,x:r,y:n}))},s}();const Ie=Ee;var _e=function(s,t,r,n){return new(r||(r=Promise))(function(e,o){function i(d){try{c(n.next(d))}catch(h){o(h)}}function a(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){var h;d.done?e(d.value):(h=d.value,h instanceof r?h:new r(function(f){f(h)})).then(i,a)}c((n=n.apply(s,[])).next())})},be=function(s,t){var r,n,e,o,i={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(d){return function(h){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(e=2&h[0]?n.return:h[0]?n.throw||((e=n.return)&&e.call(n),0):n.next)&&!(e=e.call(n,h[1])).done)return e;switch(n=0,e&&(h=[2&h[0],e.value]),h[0]){case 0:case 1:e=h;break;case 4:return i.label++,{value:h[1],done:!1};case 5:i.label++,n=h[1],h=[0];continue;case 7:h=i.ops.pop(),i.trys.pop();continue;default:if(!((e=(e=i.trys).length>0&&e[e.length-1])||h[0]!==6&&h[0]!==2)){i=0;continue}if(h[0]===3&&(!e||h[1]>e[0]&&h[1]<e[3])){i.label=h[1];break}if(h[0]===6&&i.label<e[1]){i.label=e[1],e=h;break}if(e&&i.label<e[2]){i.label=e[2],i.ops.push(h);break}e[2]&&i.ops.pop(),i.trys.pop();continue}h=t.call(s,i)}catch(f){h=[6,f],n=0}finally{r=e=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([c,d])}}},Ut=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],Yt=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]],Te=function(){function s(t){this._baseWidth=0,this._svgWidth=0,this._svgHeight=0,this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._options=t,this.processSizes(),this._element.setAttribute("width",String(this._svgWidth)),this._element.setAttribute("height",String(this._svgHeight)),this._element.setAttribute("viewBox","0 0 ".concat(this.width," ").concat(this.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs)}return Object.defineProperty(s.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"xPadding",{get:function(){var t=this._options.frameOptions;if(t.rightSize){var r=t.leftSize,n=r===void 0?0:r,e=t.rightSize;return n+(e===void 0?0:e)}var o=t.xSize;return 2*(o===void 0?0:o)},enumerable:!1,configurable:!0}),s.prototype.calcSize=function(t,r){return r?Math.round(t*r):r||0},s.prototype.processSizes=function(){var t=this._options,r=t.frameOptions,n=t.width,e=t.height;if(!r.svgContent)return this._svgWidth=n,this._svgHeight=e,void(this._baseWidth=n);var o=r.svgWidth/(n+this.xPadding);r.leftSize=this.calcSize(o,r.leftSize),r.rightSize=this.calcSize(o,r.rightSize),r.xSize=this.calcSize(o,r.xSize),r.topSize=this.calcSize(o,r.topSize),r.bottomSize=this.calcSize(o,r.bottomSize),this._options.margin=this.calcSize(o,this._options.margin),this._baseWidth=r.svgWidth-this.xPadding,this._svgWidth=n,this._svgHeight=Math.round(n*(r.svgHeight/r.svgWidth)),this._options.width=r.svgWidth,this._options.height=r.svgHeight},s.prototype.getElement=function(){return this._element},s.prototype.clear=function(){var t,r;(r=(t=this._element)===null||t===void 0?void 0:t.parentNode)===null||r===void 0||r.replaceChild(this._element.cloneNode(!1),this._element)},s.prototype.drawQR=function(t){var r,n;return _e(this,void 0,void 0,function(){var e,o,i,a,c,d,h,f,S,z=this;return be(this,function(C){switch(C.label){case 0:return e=t.getModuleCount(),o=Math.min(this._options.width,this._options.height)-2*this._options.margin-this.xPadding,i=Math.floor(o/e),a={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=t,this.clear(),this._options.image?[4,this.loadImage()]:[3,2];case 1:if(C.sent(),!this._image&&!this._svgImageElement)return[2];c=this._options,d=c.imageOptions,h=c.qrOptions,f=d.imageSize*nt[h.errorCorrectionLevel],S=Math.floor(f*e*e),a=pt({originalWidth:((r=this._image)===null||r===void 0?void 0:r.width)||this._svgImageWidth||0,originalHeight:((n=this._image)===null||n===void 0?void 0:n.height)||this._svgImageHeight||0,maxHiddenDots:S,maxHiddenAxisDots:e-14,dotSize:i}),C.label=2;case 2:return this.drawFrameBackground(),this.drawFrame(),this.drawBackground(),this.drawDots(function(E,F){var I,B,$,it,Pt,bt;return!(z._options.imageOptions.hideBackgroundDots&&E>=(e-a.hideXDots)/2&&E<(e+a.hideXDots)/2&&F>=(e-a.hideYDots)/2&&F<(e+a.hideYDots)/2||!((I=Ut[E])===null||I===void 0)&&I[F]||!((B=Ut[E-e+7])===null||B===void 0)&&B[F]||!(($=Ut[E])===null||$===void 0)&&$[F-e+7]||!((it=Yt[E])===null||it===void 0)&&it[F]||!((Pt=Yt[E-e+7])===null||Pt===void 0)&&Pt[F]||!((bt=Yt[E])===null||bt===void 0)&&bt[F-e+7])}),[4,this.drawCorners()];case 3:return C.sent(),this._options.image&&this.drawImage({width:a.width,height:a.height,count:e,dotSize:i}),[2]}})})},s.prototype.drawFrame=function(){this._element.insertAdjacentHTML("beforeend",this._options.frameOptions.svgContent)},s.prototype.drawFrameBackground=function(){var t,r,n=this._element,e=this._options.frameOptions;n&&(!((t=e==null?void 0:e.background)===null||t===void 0)&&t.color||!((r=e==null?void 0:e.background)===null||r===void 0)&&r.gradient)&&this._createColor({options:e.background.gradient,color:e.background.color,additionalRotation:0,x:0,y:0,height:this.height,width:this.width,name:"frame-background-color"})},s.prototype.drawBackground=function(){var t,r,n=this._element,e=this._options;if(n){var o=(t=e.backgroundOptions)===null||t===void 0?void 0:t.gradient,i=(r=e.backgroundOptions)===null||r===void 0?void 0:r.color;if(!o&&i==="transparent")return;(o||i)&&this._createColor({options:o,color:i,additionalRotation:0,x:e.frameOptions.leftSize||e.frameOptions.xSize||0,y:e.frameOptions.topSize,height:this.height-e.frameOptions.topSize-e.frameOptions.bottomSize,width:this.width-this.xPadding,name:"background-color"})}},s.prototype.getXBeginning=function(t,r){var n=this._options,e=n.width,o=n.frameOptions;if(o.xSize)return Math.floor((e-t*r)/2);var i=o.leftSize,a=i===void 0?0:i,c=o.rightSize,d=c===void 0?0:c;return Math.floor((e-a-d-t*r)/2)+a},s.prototype.drawDots=function(t){var r,n,e=this;if(!this._qr)throw"QR code is not defined";var o=this._options,i=this._qr.getModuleCount();if(i>o.width||i>o.height)throw"The canvas is too small.";var a=Math.min(o.width,o.height)-2*o.margin-this.xPadding,c=Math.floor(a/i),d=this.getXBeginning(i,c),h=Math.floor((o.height-o.frameOptions.topSize-o.frameOptions.bottomSize-i*c)/2)+o.frameOptions.topSize,f=new we({svg:this._element,type:o.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:(r=o.dotsOptions)===null||r===void 0?void 0:r.gradient,color:o.dotsOptions.color,additionalRotation:0,x:d,y:h,height:i*c,width:i*c,name:"dot-color"});for(var S=function(E){for(var F=function(B){return t&&!t(E,B)?"continue":!((n=z._qr)===null||n===void 0)&&n.isDark(E,B)?(f.draw({x:d+E*c,y:h+B*c,xIndex:E,yIndex:B,size:c,getNeighbor:function($,it){return!(E+$<0||B+it<0||E+$>=i||B+it>=i)&&!(t&&!t(E+$,B+it))&&!!e._qr&&e._qr.isDark(E+$,B+it)}}),void(f._element&&z._dotsClipPath&&z._dotsClipPath.appendChild(f._element))):"continue"},I=0;I<i;I++)F(I)},z=this,C=0;C<i;C++)S(C)},s.prototype.drawCorners=function(){var t,r;return _e(this,void 0,void 0,function(){var n,e,o,i,a,c,d,h,f,S=this;return be(this,function(z){switch(z.label){case 0:if(!this._qr)throw"QR code is not defined";if(n=this._element,e=this._options,!n)throw"Element code is not defined";return o=this._qr.getModuleCount(),i=Math.min(e.width,e.height)-2*e.margin-this.xPadding,a=Math.floor(i/o),c=7*a,d=3*a,h=this.getXBeginning(o,a),f=Math.floor((e.height-e.frameOptions.topSize-e.frameOptions.bottomSize-o*a)/2)+e.frameOptions.topSize,[4,Promise.all([Pe.loadPath((t=e.cornersSquareOptions)===null||t===void 0?void 0:t.type),Ie.loadPath((r=e.cornersDotOptions)===null||r===void 0?void 0:r.type)])];case 1:return z.sent(),[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(function(C,E){var F,I,B,$,it,Pt,bt,$t,Vt,Zt,Kt,oe,Qt=C[0],Bt=C[1],At=C[2],It=h+Qt*a*(o-7),Xt=f+Bt*a*(o-7),Dt=S._dotsClipPath,Nt=S._dotsClipPath;if((!((F=e.cornersSquareOptions)===null||F===void 0)&&F.gradient||!((I=e.cornersSquareOptions)===null||I===void 0)&&I.color)&&((Dt=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-".concat(Qt,"-").concat(Bt)),S._defs.appendChild(Dt),S._cornersSquareClipPath=S._cornersDotClipPath=Nt=Dt,S._createColor({options:(B=e.cornersSquareOptions)===null||B===void 0?void 0:B.gradient,color:($=e.cornersSquareOptions)===null||$===void 0?void 0:$.color,additionalRotation:At,x:It,y:Xt,height:c,width:c,name:"corners-square-color-".concat(Qt,"-").concat(Bt)})),(it=e.cornersSquareOptions)===null||it===void 0?void 0:it.type){var Rt=new Pe({svg:S._element,type:e.cornersSquareOptions.type});Rt.draw(It,Xt,c,At),Rt._element&&Dt&&Dt.appendChild(Rt._element)}else for(var jt=new we({svg:S._element,type:e.dotsOptions.type}),xe=function(lt){for(var te=function(mt){if(!(!((Pt=Ut[lt])===null||Pt===void 0)&&Pt[mt]))return"continue";jt.draw({x:It+lt*a,y:Xt+mt*a,xIndex:lt,yIndex:mt,size:a,cornerIndex:E+1,getNeighbor:function(Se,ze){var ee;return!!(!((ee=Ut[lt+Se])===null||ee===void 0)&&ee[mt+ze])}}),jt._element&&Dt&&Dt.appendChild(jt._element)},qt=0;qt<Ut[lt].length;qt++)te(qt)},ft=0;ft<Ut.length;ft++)xe(ft);if((!((bt=e.cornersDotOptions)===null||bt===void 0)&&bt.gradient||!(($t=e.cornersDotOptions)===null||$t===void 0)&&$t.color)&&((Nt=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-".concat(Qt,"-").concat(Bt)),S._defs.appendChild(Nt),S._cornersDotClipPath=Nt,S._createColor({options:(Vt=e.cornersDotOptions)===null||Vt===void 0?void 0:Vt.gradient,color:(Zt=e.cornersDotOptions)===null||Zt===void 0?void 0:Zt.color,additionalRotation:At,x:It+2*a,y:Xt+2*a,height:d,width:d,name:"corners-dot-color-".concat(Qt,"-").concat(Bt)})),(Kt=e.cornersDotOptions)===null||Kt===void 0?void 0:Kt.type){var Jt=new Ie({svg:S._element,type:e.cornersDotOptions.type});Jt.draw(It+2*a,Xt+2*a,d,At),Jt._element&&Nt&&Nt.appendChild(Jt._element)}else{jt=new we({svg:S._element,type:e.dotsOptions.type});var Ft=function(lt){for(var te=function(mt){if(!(!((oe=Yt[lt])===null||oe===void 0)&&oe[mt]))return"continue";jt.draw({x:It+lt*a,y:Xt+mt*a,xIndex:lt,yIndex:mt,size:a,cornerIndex:E+4,getNeighbor:function(Se,ze){var ee;return!!(!((ee=Yt[lt+Se])===null||ee===void 0)&&ee[mt+ze])}}),jt._element&&Nt&&Nt.appendChild(jt._element)},qt=0;qt<Yt[lt].length;qt++)te(qt)};for(ft=0;ft<Yt.length;ft++)Ft(ft)}}),[2]}})})},s.prototype.loadSvgImage=function(t){return _e(this,void 0,void 0,function(){var r,n,e,o,i;return be(this,function(a){switch(a.label){case 0:return[4,fetch(t)];case 1:return[4,a.sent().text()];case 2:return r=a.sent(),(n=document.createElement("div")).style.visibility="hidden",n.innerHTML=r,this._svgImageElement=n.querySelector("svg"),document.body.appendChild(n),e=this._svgImageElement.getBBox(),o=e.width,i=e.height,this._svgImageWidth=o,this._svgImageHeight=i,n.remove(),[2]}})})},s.prototype.loadImage=function(){var t=this;return new Promise(function(r,n){var e=t._options,o=new Image;if(!e.image)return n("Image is not defined");typeof e.imageOptions.crossOrigin=="string"&&(o.crossOrigin=e.imageOptions.crossOrigin),e.image.slice(-4)!==".svg"?(t._image=o,o.onload=function(){r()},o.onerror=function(){n(new Error("Image load error - src: ".concat(e.image)))},o.src=e.image):t.loadSvgImage(e.image).then(r).catch(function(){n(new Error("SVG image load error - src: ".concat(e.image)))})})},s.prototype.drawImage=function(t){var r=t.width,n=t.height,e=t.count,o=t.dotSize;if(!this._image&&!this._svgImageElement)throw"image is not defined";var i=this._options,a=Math.floor((i.width-e*o)/2);i.frameOptions.leftSize&&(a=Math.floor((this._baseWidth-e*o)/2+i.frameOptions.leftSize));var c=Math.floor((i.height-i.frameOptions.topSize-i.frameOptions.bottomSize-e*o)/2)+i.frameOptions.topSize,d=a+i.imageOptions.margin+(e*o-r)/2,h=c+i.imageOptions.margin+(e*o-n)/2,f=r-2*i.imageOptions.margin,S=n-2*i.imageOptions.margin,z=null;this._svgImageElement?((z=this._svgImageElement).setAttribute("x",String(d)),z.setAttribute("y",String(h)),z.setAttribute("width","".concat(f,"px")),z.setAttribute("height","".concat(S,"px"))):((z=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("href",i.image||""),z.setAttribute("x",String(d)),z.setAttribute("y",String(h)),z.setAttribute("width","".concat(f,"px")),z.setAttribute("height","".concat(S,"px"))),this._element.appendChild(z)},s.prototype._createColor=function(t){var r=t.options,n=t.color,e=t.additionalRotation,o=t.x,i=t.y,a=t.height,c=t.width,d=t.name,h=c>a?c:a,f=document.createElementNS("http://www.w3.org/2000/svg","rect");if(f.setAttribute("x",String(o)),f.setAttribute("y",String(i)),f.setAttribute("height",String(a)),f.setAttribute("width",String(c)),f.setAttribute("clip-path","url('#clip-path-".concat(d,"')")),r){var S;if(r.type===T)(S=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",d),S.setAttribute("gradientUnits","userSpaceOnUse"),S.setAttribute("fx",String(o+c/2)),S.setAttribute("fy",String(i+a/2)),S.setAttribute("cx",String(o+c/2)),S.setAttribute("cy",String(i+a/2)),S.setAttribute("r",String(h/2));else{var z=((r.rotation||0)+e)%(2*Math.PI),C=(z+2*Math.PI)%(2*Math.PI),E=o+c/2,F=i+a/2,I=o+c/2,B=i+a/2;C>=0&&C<=.25*Math.PI||C>1.75*Math.PI&&C<=2*Math.PI?(E-=c/2,F-=a/2*Math.tan(z),I+=c/2,B+=a/2*Math.tan(z)):C>.25*Math.PI&&C<=.75*Math.PI?(F-=a/2,E-=c/2/Math.tan(z),B+=a/2,I+=c/2/Math.tan(z)):C>.75*Math.PI&&C<=1.25*Math.PI?(E+=c/2,F+=a/2*Math.tan(z),I-=c/2,B-=a/2*Math.tan(z)):C>1.25*Math.PI&&C<=1.75*Math.PI&&(F+=a/2,E+=c/2/Math.tan(z),B-=a/2,I-=c/2/Math.tan(z)),(S=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",d),S.setAttribute("gradientUnits","userSpaceOnUse"),S.setAttribute("x1",String(Math.round(E))),S.setAttribute("y1",String(Math.round(F))),S.setAttribute("x2",String(Math.round(I))),S.setAttribute("y2",String(Math.round(B)))}r.colorStops.forEach(function($){var it=$.offset,Pt=$.color,bt=document.createElementNS("http://www.w3.org/2000/svg","stop");bt.setAttribute("offset","".concat(100*it,"%")),bt.setAttribute("stop-color",Pt),S.appendChild(bt)}),f.setAttribute("fill","url('#".concat(d,"')")),this._defs.appendChild(S)}else n&&f.setAttribute("fill",n);this._element.appendChild(f)},s}();const ke=Te;var kt=function(){return kt=Object.assign||function(s){for(var t,r=1,n=arguments.length;r<n;r++)for(var e in t=arguments[r])Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=t[e]);return s},kt.apply(this,arguments)};function fe(s){var t=kt({},s);if(!t.colorStops||!t.colorStops.length)throw"Field 'colorStops' is required in gradient";return t.rotation?t.rotation=Number(t.rotation):t.rotation=0,t.colorStops=t.colorStops.map(function(r){return kt(kt({},r),{offset:Number(r.offset)})}),t}function Ce(s){var t=kt({},s);return t.width=Number(t.width),t.height=Number(t.height),t.margin=Number(t.margin),t.imageOptions=kt(kt({},t.imageOptions),{hideBackgroundDots:!!t.imageOptions.hideBackgroundDots,imageSize:Number(t.imageOptions.imageSize),margin:Number(t.imageOptions.margin)}),t.margin>Math.min(t.width,t.height)&&(t.margin=Math.min(t.width,t.height)),t.dotsOptions=kt({},t.dotsOptions),t.dotsOptions.gradient&&(t.dotsOptions.gradient=fe(t.dotsOptions.gradient)),t.cornersSquareOptions&&(t.cornersSquareOptions=kt({},t.cornersSquareOptions),t.cornersSquareOptions.gradient&&(t.cornersSquareOptions.gradient=fe(t.cornersSquareOptions.gradient))),t.cornersDotOptions&&(t.cornersDotOptions=kt({},t.cornersDotOptions),t.cornersDotOptions.gradient&&(t.cornersDotOptions.gradient=fe(t.cornersDotOptions.gradient))),t.backgroundOptions&&(t.backgroundOptions=kt({},t.backgroundOptions),t.backgroundOptions.gradient&&(t.backgroundOptions.gradient=fe(t.backgroundOptions.gradient))),t}var Be=N(192),ge=N.n(Be),Ht=function(){return Ht=Object.assign||function(s){for(var t,r=1,n=arguments.length;r<n;r++)for(var e in t=arguments[r])Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=t[e]);return s},Ht.apply(this,arguments)},se=function(s,t,r,n){return new(r||(r=Promise))(function(e,o){function i(d){try{c(n.next(d))}catch(h){o(h)}}function a(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){var h;d.done?e(d.value):(h=d.value,h instanceof r?h:new r(function(f){f(h)})).then(i,a)}c((n=n.apply(s,[])).next())})},ce=function(s,t){var r,n,e,o,i={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(d){return function(h){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(e=2&h[0]?n.return:h[0]?n.throw||((e=n.return)&&e.call(n),0):n.next)&&!(e=e.call(n,h[1])).done)return e;switch(n=0,e&&(h=[2&h[0],e.value]),h[0]){case 0:case 1:e=h;break;case 4:return i.label++,{value:h[1],done:!1};case 5:i.label++,n=h[1],h=[0];continue;case 7:h=i.ops.pop(),i.trys.pop();continue;default:if(!((e=(e=i.trys).length>0&&e[e.length-1])||h[0]!==6&&h[0]!==2)){i=0;continue}if(h[0]===3&&(!e||h[1]>e[0]&&h[1]<e[3])){i.label=h[1];break}if(h[0]===6&&i.label<e[1]){i.label=e[1],e=h;break}if(e&&i.label<e[2]){i.label=e[2],i.ops.push(h);break}e[2]&&i.ops.pop(),i.trys.pop();continue}h=t.call(s,i)}catch(f){h=[6,f],n=0}finally{r=e=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([c,d])}}};ge().stringToBytes=ge().stringToBytesFuncs["UTF-8"];var Ae=!1,ve=new function(){return new Worker(N.p+"qr-code-styling.worker.e10363abd4d012f5d803.js")};ve.onerror=function(s){Ae=!0,window.dispatchEvent(new CustomEvent("workerError")),console.error("Worker error: ".concat(s.message))};var Ne=0,je=function(){function s(t,r){this._retryCount=0,this._options=t?Ce(G(Ct,t)):Ct,this._originalOptions=Ht({},this._options),this._options.offscreen=!Ae&&this._options.offscreen,this._id=Ne++,this._started=!1,this._container=r,this.handleWorkerMessage=this.handleWorkerMessage.bind(this),this.handleWorkerError=this.handleWorkerError.bind(this),this.clear=this.clear.bind(this),this._resolveImages=function(){return null},this.update(),this._options.offscreen&&window.addEventListener("workerError",this.handleWorkerError)}return s._clearContainer=function(t){t&&(t.innerHTML="")},s.prototype.handleWorkerError=function(){this._options.offscreen=!1,this.update(),window.removeEventListener("workerError",this.handleWorkerError)},s.prototype.update=function(t){if(s._clearContainer(this._container),t!=null&&t.frameOptions&&(this._options.frameOptions=Ht({},t==null?void 0:t.frameOptions)),t!=null&&t.backgroundOptions&&(this._options.backgroundOptions=Ht({},t==null?void 0:t.backgroundOptions)),t!=null&&t.cornersDotOptions&&(this._options.cornersDotOptions=Ht({},t==null?void 0:t.cornersDotOptions)),t!=null&&t.cornersSquareOptions&&(this._options.cornersSquareOptions=Ht({},t==null?void 0:t.cornersSquareOptions)),t!=null&&t.dotsOptions&&(this._options.dotsOptions=Ht({},t==null?void 0:t.dotsOptions)),this._options=t?Ce(G(this._options,t)):this._options,this._options.data){if(this._options.type===wt.svg)return this.drawSvgQR();this._canvas=document.createElement("canvas"),this.append(this._container),this._options.offscreen&&"OffscreenCanvas"in window&&"createImageBitmap"in window?this.drawQRFromWorker():this.drawQR()}},s.prototype.drawQR=function(){if(this._canvas){this._qr=ge()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||et(this._options.data)),this._qr.make();var t=new j(this._options,this._canvas);this._drawingPromise?t.drawQR(this._qr).then(this._resolveDrawingEnded,this._rejectDrawingEnded):this._drawingPromise=t.drawQR(this._qr)}},s.prototype.drawSvgQR=function(){this._qr=ge()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||et(this._options.data)),this._qr.make(),this._svg=new ke(this._options),this.append(this._container),this._drawingPromise=this._svg.drawQR(this._qr)},s.prototype.getImage=function(t,r,n){return new Promise(function(e,o){if(!t)return e(void 0);var i=new Image;i.crossOrigin="anonymous",i.onload=function(){var a=Math.round(n||i.height/(i.width/r));a||(i.style.visibility="hidden",document.body.appendChild(i),a=Math.round(i.height/(i.width/r)),i.remove()),createImageBitmap(i,{resizeWidth:Math.round(r),resizeHeight:a,resizeQuality:"high"}).then(e).catch(o)},i.onerror=function(){o(new Error("Image load error"))},i.src=t})},s.prototype.getXPadding=function(t){if(t.rightSize){var r=t.leftSize,n=r===void 0?0:r,e=t.rightSize;return n+(e===void 0?0:e)}var o=t.xSize;return 2*(o===void 0?0:o)},s.prototype.getImages=function(){var t=this;return new Promise(function(r,n){t._resolveImages=r;var e=t.getImage(t._options.frameOptions.image,t._options.width+t.getXPadding(t._options.frameOptions),t._options.height+t._options.frameOptions.topSize+t._options.frameOptions.bottomSize),o=/\.svg$/.test(t._options.image||"")?t._options.image:"",i=t.getImage(o||"",t._options.width/2,0);Promise.all([e,i]).then(r).catch(n)})},s.prototype.handleWorkerMessage=function(t){t.data.key==="drawingEnded"&&t.data.id===this._id&&(this._canvas&&this._canvas.width===10&&this._retryCount===0?(this._retryCount++,this.update()):this._resolveDrawingEnded&&this._resolveDrawingEnded()),t.data.key==="error"&&this._rejectDrawingEnded&&t.data.id===this._id&&this._rejectDrawingEnded(t.data.error)},s.prototype.drawQRFromWorker=function(){return se(this,void 0,void 0,function(){var t,r,n,e,o,i=this;return ce(this,function(a){switch(a.label){case 0:if(!this._canvas)return[2];this._started||(this._started=!0,ve.addEventListener("message",this.handleWorkerMessage)),this._canvas.width=10,this._drawingPromise||(this._drawingPromise=new Promise(function(c,d){i._resolveDrawingEnded=c,i._rejectDrawingEnded=d})),this._resolveImages(null),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.getImages()];case 2:return(t=a.sent())!==null&&(r=t[0],n=t[1],e=this._canvas.transferControlToOffscreen(),ve.postMessage({key:"initCanvas",canvas:e,options:this._options,id:this._id,frameImage:r,qrImage:n},[e])),[3,4];case 3:return o=a.sent(),this._rejectDrawingEnded&&this._rejectDrawingEnded(o),[3,4];case 4:return[2]}})})},s.prototype.append=function(t){if(t){if(typeof t.appendChild!="function")throw"Container should be a single DOM node";this._options.type===wt.canvas?this._canvas&&t.appendChild(this._canvas):(this._svg&&t.appendChild(this._svg.getElement()),this._container=t)}},s.prototype.parseDownloadOptions=function(t){var r="png",n="qr";return typeof t=="string"?(r=t,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof t=="object"&&t!==null&&(t.name&&(n=t.name),t.extension&&(r=t.extension)),{name:n,extension:r}},s.prototype.download=function(t){return se(this,void 0,void 0,function(){var r,n,e;return ce(this,function(o){switch(o.label){case 0:return this._drawingPromise?(r=this.parseDownloadOptions(t),n=r.name,(e=r.extension).toLowerCase()==="svg"?[2,this.downloadSvg(n)]:[4,this._drawingPromise]):[2,Promise.resolve()];case 1:return o.sent(),this._canvas?(Z(this._canvas.toDataURL("image/".concat(e)),"".concat(n,".").concat(e)),[2]):[2]}})})},s.prototype.getSvgString=function(){return se(this,void 0,void 0,function(){var t;return ce(this,function(r){switch(r.label){case 0:if(!this._drawingPromise)return[2,""];if(!this._qr)throw"QR code is empty";return this._options.type!==wt.svg?[3,2]:(t=this._svg,[4,this._drawingPromise]);case 1:return r.sent(),[3,4];case 2:return[4,(t=new ke(this._originalOptions)).drawQR(this._qr)];case 3:r.sent(),r.label=4;case 4:return[2,`<?xml version="1.0" standalone="no"?>\r `+new XMLSerializer().serializeToString(t.getElement())]}})})},s.prototype.downloadSvg=function(t){return se(this,void 0,void 0,function(){var r;return ce(this,function(n){switch(n.label){case 0:return[4,this.getSvgString()];case 1:return r=n.sent(),Z("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(r),"".concat(t,".svg")),[2]}})})},s.prototype.getSvgFile=function(){return se(this,void 0,void 0,function(){var t;return ce(this,function(r){switch(r.label){case 0:return[4,this.getSvgString()];case 1:return t=r.sent(),[2,new Blob([t],{type:"image/svg+xml"})]}})})},s.prototype.clear=function(){this._options.offscreen&&(ve.removeEventListener("message",this.handleWorkerMessage),window.removeEventListener("workerError",this.handleWorkerError))},s}();const Fe=je})(),me})())})(De);var We=De.exports;const Xe=Le(We);export{Xe as Q,We as q};