PageSourceSearch

https://buk.pt/chunk-T74OSBEN.js

js buk.pt collected 2026-09-28 08:49:17 UTC 178,492 bytes, 33 lines download raw bytes

1import{a as jr}from"./chunk-KAR65GDY.js";import{a as Gr}from"./chunk-2ERYRARB.js";import{a as $r}from"./chunk-NIONRHWP.js";import{a as Wr}from"./chunk-RJCZALW7.js";import{U as zr}from"./chunk-BTFQ6KY7.js";import"./chunk-YYP6GBHO.js";import{H as Br,J as Vr,K as Hr,c as Dr,j as wn,m as Lr,n as Mr,na as qr,s as xr,w as Ur,z as Fr}from"./chunk-DXO35ZLD.js";import"./chunk-SZ3RYLDE.js";import"./chunk-GID2AQ6H.js";import"./chunk-Z73XETQO.js";import{J as Nr,h as Pr,i as Or}from"./chunk-JUPH277U.js";import{Bb as ft,Bc as Cr,Dc as Ot,Hc as _n,Ic as yn,Ja as br,Jc as vn,Ka as Er,Nb as st,Pc as Rr,Sc as pt,Tb as Sr,Tc as kr,Yb as Pt,a as ae,b as Ue,d as gn,e as Vs,g as Hs,h as Ze,i as w,jc as ot,kc as Ae,lc as Oe,mc as mn,vb as Tr,vc as Ar}from"./chunk-4ITSOKTZ.js";var Kr=Vs((Nt,In)=>{(function(t,e){typeof Nt=="object"&&typeof In=="object"?In.exports=e():typeof define=="function"&&define.amd?define([],e):typeof Nt=="object"?Nt.QRCodeStyling=e():t.QRCodeStyling=e()})(self,function(){return(()=>{var t={192:(r,i)=>{var o,l,v=(function(){var I=function(k,R){var A=k,T=Y[R],_=null,O=0,x=null,L=[],U={},de=function(d,f){_=(function(u){for(var m=new Array(u),y=0;y<u;y+=1){m[y]=new Array(u);for(var N=0;N<u;N+=1)m[y][N]=null}return m})(O=4*A+17),b(0,0),b(O-7,0),b(0,O-7),c(),s(),h(d,f),A>=7&&a(d),x==null&&(x=p(A,T,L)),g(x,f)},b=function(d,f){for(var u=-1;u<=7;u+=1)if(!(d+u<=-1||O<=d+u))for(var m=-1;m<=7;m+=1)f+m<=-1||O<=f+m||(_[d+u][f+m]=0<=u&&u<=6&&(m==0||m==6)||0<=m&&m<=6&&(u==0||u==6)||2<=u&&u<=4&&2<=m&&m<=4)},s=function(){for(var d=8;d<O-8;d+=1)_[d][6]==null&&(_[d][6]=d%2==0);for(var f=8;f<O-8;f+=1)_[6][f]==null&&(_[6][f]=f%2==0)},c=function(){for(var d=J.getPatternPosition(A),f=0;f<d.length;f+=1)for(var u=0;u<d.length;u+=1){var m=d[f],y=d[u];if(_[m][y]==null)for(var N=-2;N<=2;N+=1)for(var M=-2;M<=2;M+=1)_[m+N][y+M]=N==-2||N==2||M==-2||M==2||N==0&&M==0}},a=function(d){for(var f=J.getBCHTypeNumber(A),u=0;u<18;u+=1){var m=!d&&(f>>u&1)==1;_[Math.floor(u/3)][u%3+O-8-3]=m}for(u=0;u<18;u+=1)m=!d&&(f>>u&1)==1,_[u%3+O-8-3][Math.floor(u/3)]=m},h=function(d,f){for(var u=T<<3|f,m=J.getBCHTypeInfo(u),y=0;y<15;y+=1){var N=!d&&(m>>y&1)==1;
vendor: 15,426 bytes, lines 1-3
1y<6?_[y][8]=N:y<8?_[y+1][8]=N:_[O-15+y][8]=N}for(y=0;y<15;y+=1)N=!d&&(m>>y&1)==1,y<8?_[8][O-y-1]=N:y<9?_[8][15-y-1+1]=N:_[8][15-y-1]=N;_[O-8][8]=!d},g=function(d,f){for(var u=-1,m=O-1,y=7,N=0,M=J.getMaskFunction(f),S=O-1;S>0;S-=2)for(S==6&&(S-=1);;){for(var B=0;B<2;B+=1)if(_[m][S-B]==null){var q=!1;N<d.length&&(q=(d[N]>>>y&1)==1),M(m,S-B)&&(q=!q),_[m][S-B]=q,(y-=1)==-1&&(N+=1,y=7)}if((m+=u)<0||O<=m){m-=u,u=-u;break}}},p=function(d,f,u){for(var m=ie.getRSBlocks(d,f),y=se(),N=0;N<u.length;N+=1){var M=u[N];y.put(M.getMode(),4),y.put(M.getLength(),J.getLengthInBits(M.getMode(),d)),M.write(y)}var S=0;for(N=0;N<m.length;N+=1)S+=m[N].dataCount;if(y.getLengthInBits()>8*S)throw"code length overflow. ("+y.getLengthInBits()+">"+8*S+")";for(y.getLengthInBits()+4<=8*S&&y.put(0,4);y.getLengthInBits()%8!=0;)y.putBit(!1);for(;!(y.getLengthInBits()>=8*S||(y.put(236,8),y.getLengthInBits()>=8*S));)y.put(17,8);return(function(B,q){for(var W=0,Q=0,H=0,j=new Array(q.length),z=new Array(q.length),G=0;G<q.length;G+=1){var _e=q[G].dataCount,ne=q[G].totalCount-_e;Q=Math.max(Q,_e),H=Math.max(H,ne),j[G]=new Array(_e);for(var K=0;K<j[G].length;K+=1)j[G][K]=255&B.getBuffer()[K+W];W+=_e;var re=J.getErrorCorrectPolynomial(ne),Z=ee(j[G],re.getLength()-1).mod(re);for(z[G]=new Array(re.getLength()-1),K=0;K<z[G].length;K+=1){var oe=K+Z.getLength()-z[G].length;z[G][K]=oe>=0?Z.getAt(oe):0}}var he=0;for(K=0;K<q.length;K+=1)he+=q[K].totalCount;var fe=new Array(he),me=0;for(K=0;K<Q;K+=1)for(G=0;G<q.length;G+=1)K<j[G].length&&(fe[me]=j[G][K],me+=1);for(K=0;K<H;K+=1)for(G=0;G<q.length;G+=1)K<z[G].length&&(fe[me]=z[G][K],me+=1);return fe})(y,m)};U.addData=function(d,f){var u=null;switch(f=f||"Byte"){case"Numeric":u=ue(d);break;case"Alphanumeric":u=ke(d);break;case"Byte":u=ye(d);break;case"Kanji":u=Ee(d);break;default:throw"mode:"+f}L.push(u),x=null},U.isDark=function(d,f){if(d<0||O<=d||f<0||O<=f)throw d+","+f;return _[d][f]},U.getModuleCount=function(){return O},U.make=function(){if(A<1){for(var d=1;d<40;d++){for(var f=ie.getRSBlocks(d,T),u=se(),m=0;m<L.length;m++){var y=L[m];u.put(y.getMode(),4),u.put(y.getLength(),J.getLengthInBits(y.getMode(),d)),y.write(u)}var N=0;for(m=0;m<f.length;m++)N+=f[m].dataCount;if(u.getLengthInBits()<=8*N)break}A=d}de(!1,(function(){for(var M=0,S=0,B=0;B<8;B+=1){de(!0,B);var q=J.getLostPoint(U);(B==0||M>q)&&(M=q,S=B)}return S})())},U.createTableTag=function(d,f){d=d||2;var u="";u+='<table style="',u+=" border-width: 0px; border-style: none;",u+=" border-collapse: collapse;",u+=" padding: 0px; margin: "+(f=f===void 0?4*d:f)+"px;",u+='">',u+="<tbody>";for(var m=0;m<U.getModuleCount();m+=1){u+="<tr>";for(var y=0;y<U.getModuleCount();y+=1)u+='<td style="',u+=" border-width: 0px; border-style: none;",u+=" border-collapse: collapse;",u+=" padding: 0px; margin: 0px;",u+=" width: "+d+"px;",u+=" height: "+d+"px;",u+=" background-color: ",u+=U.isDark(m,y)?"#000000":"#ffffff",u+=";",u+='"/>';u+="</tr>"}return(u+="</tbody>")+"</table>"},U.createSvgTag=function(d,f,u,m){var y={};typeof arguments[0]=="object"&&(d=(y=arguments[0]).cellSize,f=y.margin,u=y.alt,m=y.title),d=d||2,f=f===void 0?4*d:f,(u=typeof u=="string"?{text:u}:u||{}).text=u.text||null,u.id=u.text?u.id||"qrcode-description":null,(m=typeof m=="string"?{text:m}:m||{}).text=m.text||null,m.id=m.text?m.id||"qrcode-title":null;var N,M,S,B,q=U.getModuleCount()*d+2*f,W="";for(B="l"+d+",0 0,"+d+" -"+d+",0 0,-"+d+"z ",W+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',W+=y.scalable?"":' width="'+q+'px" height="'+q+'px"',W+=' viewBox="0 0 '+q+" "+q+'" ',W+=' preserveAspectRatio="xMinYMin meet"',W+=m.text||u.text?' role="img" aria-labelledby="'+E([m.id,u.id].join(" ").trim())+'"':"",W+=">",W+=m.text?'<title id="'+E(m.id)+'">'+E(m.text)+"</title>":"",W+=u.text?'<description id="'+E(u.id)+'">'+E(u.text)+"</description>":"",W+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',W+='<path d="',M=0;M<U.getModuleCount();M+=1)for(S=M*d+f,N=0;N<U.getModuleCount();N+=1)U.isDark(M,N)&&(W+="M"+(N*d+f)+","+S+B);return(W+='" stroke="transparent" fill="black"/>')+"</svg>"},U.createDataURL=function(d,f){d=d||2,f=f===void 0?4*d:f;var u=U.getModuleCount()*d+2*f,m=f,y=u-f;return kt(u,u,function(N,M){if(m<=N&&N<y&&m<=M&&M<y){var S=Math.floor((N-m)/d),B=Math.floor((M-m)/d);return U.isDark(B,S)?0:1}return 1})},U.createImgTag=function(d,f,u){d=d||2,f=f===void 0?4*d:f;var m=U.getModuleCount()*d+2*f,y="";return y+="<img",y+=' src="',y+=U.createDataURL(d,f),y+='"',y+=' width="',y+=m,y+='"',y+=' height="',y+=m,y+='"',u&&(y+=' alt="',y+=E(u),y+='"'),y+"/>"};var E=function(d){for(var f="",u=0;u<d.length;u+=1){var m=d.charAt(u);switch(m){case"<":f+="&lt;";break;case">":f+="&gt;";break;case"&":f+="&amp;";break;case'"':f+="&quot;";break;default:f+=m}}return f};return U.createASCII=function(d,f){if((d=d||1)<2)return(function(j){j=j===void 0?2:j;var z,G,_e,ne,K,re=1*U.getModuleCount()+2*j,Z=j,oe=re-j,he={"\u2588\u2588":"\u2588","\u2588 ":"\u2580"," \u2588":"\u2584","  ":" "},fe={"\u2588\u2588":"\u2580","\u2588 ":"\u2580"," \u2588":" ","  ":" "},me="";for(z=0;z<re;z+=2){for(_e=Math.floor((z-Z)/1),ne=Math.floor((z+1-Z)/1),G=0;G<re;G+=1)K="\u2588",Z<=G&&G<oe&&Z<=z&&z<oe&&U.isDark(_e,Math.floor((G-Z)/1))&&(K=" "),Z<=G&&G<oe&&Z<=z+1&&z+1<oe&&U.isDark(ne,Math.floor((G-Z)/1))?K+=" ":K+="\u2588",me+=j<1&&z+1>=oe?fe[K]:he[K];me+=`
2`}return re%2&&j>0?me.substring(0,me.length-re-1)+Array(re+1).join("\u2580"):me.substring(0,me.length-1)})(f);d-=1,f=f===void 0?2*d:f;var u,m,y,N,M=U.getModuleCount()*d+2*f,S=f,B=M-f,q=Array(d+1).join("\u2588\u2588"),W=Array(d+1).join("  "),Q="",H="";for(u=0;u<M;u+=1){for(y=Math.floor((u-S)/d),H="",m=0;m<M;m+=1)N=1,S<=m&&m<B&&S<=u&&u<B&&U.isDark(y,Math.floor((m-S)/d))&&(N=0),H+=N?q:W;for(y=0;y<d;y+=1)Q+=H+`
3`}return Q.substring(0,Q.length-1)},U.renderTo2dContext=function(d,f){f=f||2;for(var u=U.getModuleCount(),m=0;m<u;m++)for(var y=0;y<u;y++)d.fillStyle=U.isDark(m,y)?"black":"white",d.fillRect(m*f,y*f,f,f)},U};I.stringToBytes=(I.stringToBytesFuncs={default:function(k){for(var R=[],A=0;A<k.length;A+=1){var T=k.charCodeAt(A);R.push(255&T)}return R}}).default,I.createStringToBytes=function(k,R){var A=(function(){for(var _=ht(k),O=function(){var s=_.read();if(s==-1)throw"eof";return s},x=0,L={};;){var U=_.read();if(U==-1)break;var de=O(),b=O()<<8|O();L[String.fromCharCode(U<<8|de)]=b,x+=1}if(x!=R)throw x+" != "+R;return L})(),T=63;return function(_){for(var O=[],x=0;x<_.length;x+=1){var L=_.charCodeAt(x);if(L<128)O.push(L);else{var U=A[_.charAt(x)];typeof U=="number"?(255&U)==U?O.push(U):(O.push(U>>>8),O.push(255&U)):O.push(T)}}return O}};var P,D,V,C,F,Y={L:1,M:0,Q:3,H:2},J=(P=[[],[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]],D=1335,V=7973,F=function(k){for(var R=0;k!=0;)R+=1,k>>>=1;return R},(C={}).getBCHTypeInfo=function(k){for(var R=k<<10;F(R)-F(D)>=0;)R^=D<<F(R)-F(D);return 21522^(k<<10|R)},C.getBCHTypeNumber=function(k){for(var R=k<<12;F(R)-F(V)>=0;)R^=V<<F(R)-F(V);return k<<12|R},C.getPatternPosition=function(k){return P[k-1]},C.getMaskFunction=function(k){switch(k){case 0:return function(R,A){return(R+A)%2==0};case 1:return function(R,A){return R%2==0};case 2:return function(R,A){return A%3==0};case 3:return function(R,A){return(R+A)%3==0};case 4:return function(R,A){return(Math.floor(R/2)+Math.floor(A/3))%2==0};case 5:return function(R,A){return R*A%2+R*A%3==0};case 6:return function(R,A){return(R*A%2+R*A%3)%2==0};case 7:return function(R,A){return(R*A%3+(R+A)%2)%2==0};default:throw"bad maskPattern:"+k}},C.getErrorCorrectPolynomial=function(k){for(var R=ee([1],0),A=0;A<k;A+=1)R=R.multiply(ee([1,X.gexp(A)],0));return R},C.getLengthInBits=function(k,R){if(1<=R&&R<10)switch(k){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+k}else if(R<27)switch(k){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+k}else{if(!(R<41))throw"type:"+R;switch(k){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+k}}},C.getLostPoint=function(k){for(var R=k.getModuleCount(),A=0,T=0;T<R;T+=1)for(var _=0;_<R;_+=1){for(var O=0,x=k.isDark(T,_),L=-1;L<=1;L+=1)if(!(T+L<0||R<=T+L))for(var U=-1;U<=1;U+=1)_+U<0||R<=_+U||L==0&&U==0||x==k.isDark(T+L,_+U)&&(O+=1);O>5&&(A+=3+O-5)}for(T=0;T<R-1;T+=1)for(_=0;_<R-1;_+=1){var de=0;k.isDark(T,_)&&(de+=1),k.isDark(T+1,_)&&(de+=1),k.isDark(T,_+1)&&(de+=1),k.isDark(T+1,_+1)&&(de+=1),de!=0&&de!=4||(A+=3)}for(T=0;T<R;T+=1)for(_=0;_<R-6;_+=1)k.isDark(T,_)&&!k.isDark(T,_+1)&&k.isDark(T,_+2)&&k.isDark(T,_+3)&&k.isDark(T,_+4)&&!k.isDark(T,_+5)&&k.isDark(T,_+6)&&(A+=40);for(_=0;_<R;_+=1)for(T=0;T<R-6;T+=1)k.isDark(T,_)&&!k.isDark(T+1,_)&&k.isDark(T+2,_)&&k.isDark(T+3,_)&&k.isDark(T+4,_)&&!k.isDark(T+5,_)&&k.isDark(T+6,_)&&(A+=40);var b=0;for(_=0;_<R;_+=1)for(T=0;T<R;T+=1)k.isDark(T,_)&&(b+=1);return A+Math.abs(100*b/R/R-50)/5*10},C),X=(function(){for(var k=new Array(256),R=new Array(256),A=0;A<8;A+=1)k[A]=1<<A;for(A=8;A<256;A+=1)k[A]=k[A-4]^k[A-5]^k[A-6]^k[A-8];for(A=0;A<255;A+=1)R[k[A]]=A;return{glog:function(T){if(T<1)throw"glog("+T+")";return R[T]},gexp:function(T){for(;T<0;)T+=255;for(;T>=256;)T-=255;return k[T]}}})();function ee(k,R){if(k.length===void 0)throw k.length+"/"+R;var A=(function(){for(var _=0;_<k.length&&k[_]==0;)_+=1;for(var O=new Array(k.length-_+R),x=0;x<k.length-_;x+=1)O[x]=k[x+_];return O})(),T={getAt:function(_){return A[_]},getLength:function(){return A.length},multiply:function(_){for(var O=new Array(T.getLength()+_.getLength()-1),x=0;x<T.getLength();x+=1)for(var L=0;L<_.getLength();L+=1)O[x+L]^=X.gexp(X.glog(T.getAt(x))+X.glog(_.getAt(L)));return ee(O,0)},mod:function(_){if(T.getLength()-_.getLength()<0)return T;for(var O=X.glog(T.getAt(0))-X.glog(_.getAt(0)),x=new Array(T.getLength()),L=0;L<T.getLength();L+=1)x[L]=T.getAt(L);for(L=0;L<_.getLength();L+=1)x[L]^=X.gexp(X.glog(_.getAt(L))+O);return ee(x,0).mod(_)}};return T}var ie=(function(){var k=[[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]],R=function(T,_){var O={};return O.totalCount=T,O.dataCount=_,O},A={getRSBlocks:function(T,_){var O=(function(a,h){switch(h){case Y.L:return k[4*(a-1)+0];case Y.M:return k[4*(a-1)+1];case Y.Q:return k[4*(a-1)+2];case Y.H:return k[4*(a-1)+3];default:return}})(T,_);if(O===void 0)throw"bad rs block @ typeNumber:"+T+"/errorCorrectionLevel:"+_;for(var x=O.length/3,L=[],U=0;U<x;U+=1)for(var de=O[3*U+0],b=O[3*U+1],s=O[3*U+2],c=0;c<de;c+=1)L.push(R(b,s));return L}};return A})(),se=function(){var k=[],R=0,A={getBuffer:function(){return k},getAt:function(T){var _=Math.floor(T/8);return(k[_]>>>7-T%8&1)==1},put:function(T,_){for(var O=0;O<_;O+=1)A.putBit((T>>>_-O-1&1)==1)},getLengthInBits:function(){return R},putBit:function(T){var _=Math.floor(R/8);k.length<=_&&k.push(0),T&&(k[_]|=128>>>R%8),R+=1}};return A},ue=function(k){var R=k,A={getMode:function(){return 1},getLength:function(O){return R.length},write:function(O){for(var x=R,L=0;L+2<x.length;)O.put(T(x.substring(L,L+3)),10),L+=3;L<x.length&&(x.length-L==1?O.put(T(x.substring(L,L+1)),4):x.length-L==2&&O.put(T(x.substring(L,L+2)),7))}},T=function(O){for(var x=0,L=0;L<O.length;L+=1)x=10*x+_(O.charAt(L));return x},_=function(O){if("0"<=O&&O<="9")return O.charCodeAt(0)-48;throw"illegal char :"+O};return A},ke=function(k){var R=k,A={getMode:function(){return 2},getLength:function(_){return R.length},write:function(_){for(var O=R,x=0;x+1<O.length;)_.put(45*T(O.charAt(x))+T(O.charAt(x+1)),11),x+=2;x<O.length&&_.put(T(O.charAt(x)),6)}},T=function(_){if("0"<=_&&_<="9")return _.charCodeAt(0)-48;if("A"<=_&&_<="Z")return _.charCodeAt(0)-65+10;switch(_){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 :"+_}};return A},ye=function(k){var R=I.stringToBytes(k);return{getMode:function(){return 4},getLength:function(A){return R.length},write:function(A){for(var T=0;T<R.length;T+=1)A.put(R[T],8)}}},Ee=function(k){var R=I.stringToBytesFuncs.SJIS;if(!R)throw"sjis not supported.";(function(T,_){var O=R("\u53CB");
3if(O.length!=2||(O[0]<<8|O[1])!=38726)throw"sjis not supported."})();var A=R(k);return{getMode:function(){return 8},getLength:function(T){return~~(A.length/2)},write:function(T){for(var _=A,O=0;O+1<_.length;){var x=(255&_[O])<<8|255&_[O+1];if(33088<=x&&x<=40956)x-=33088;else{if(!(57408<=x&&x<=60351))throw"illegal char at "+(O+1)+"/"+x;x-=49472}x=192*(x>>>8&255)+(255&x),T.put(x,13),O+=2}if(O<_.length)throw"illegal char at "+(O+1)}}},xe=function(){var k=[],R={writeByte:function(A){k.push(255&A)},writeShort:function(A){R.writeByte(A),R.writeByte(A>>>8)},writeBytes:function(A,T,_){T=T||0,_=_||A.length;for(var O=0;O<_;O+=1)R.writeByte(A[O+T])},writeString:function(A){for(var T=0;T<A.length;T+=1)R.writeByte(A.charCodeAt(T))},toByteArray:function(){return k},toString:function(){var A="";A+="[";for(var T=0;T<k.length;T+=1)T>0&&(A+=","),A+=k[T];return A+"]"}};return R},ht=function(k){var R=k,A=0,T=0,_=0,O={read:function(){for(;_<8;){if(A>=R.length){if(_==0)return-1;throw"unexpected end of file./"+_}var L=R.charAt(A);if(A+=1,L=="=")return _=0,-1;L.match(/^\s$/)||(T=T<<6|x(L.charCodeAt(0)),_+=6)}var U=T>>>_-8&255;return _-=8,U}},x=function(L){if(65<=L&&L<=90)return L-65;if(97<=L&&L<=122)return L-97+26;if(48<=L&&L<=57)return L-48+52;if(L==43)return 62;if(L==47)return 63;throw"c:"+L};return O},kt=function(k,R,A){for(var T=(function(b,s){var c=b,a=s,h=new Array(b*s),g={setPixel:function(d,f,u){h[f*c+d]=u},write:function(d){d.writeString("GIF87a"),d.writeShort(c),d.writeShort(a),d.writeByte(128),d.writeByte(0),d.writeByte(0),d.writeByte(0),d.writeByte(0),d.writeByte(0),d.writeByte(255),d.writeByte(255),d.writeByte(255),d.writeString(","),d.writeShort(0),d.writeShort(0),d.writeShort(c),d.writeShort(a),d.writeByte(0);var f=p(2);d.writeByte(2);for(var u=0;f.length-u>255;)d.writeByte(255),d.writeBytes(f,u,255),u+=255;d.writeByte(f.length-u),d.writeBytes(f,u,f.length-u),d.writeByte(0),d.writeString(";")}},p=function(d){for(var f=1<<d,u=1+(1<<d),m=d+1,y=E(),N=0;N<f;N+=1)y.add(String.fromCharCode(N));y.add(String.fromCharCode(f)),y.add(String.fromCharCode(u));var M,S,B,q=xe(),W=(M=q,S=0,B=0,{write:function(z,G){if(z>>>G)throw"length over";for(;S+G>=8;)M.writeByte(255&(z<<S|B)),G-=8-S,z>>>=8-S,B=0,S=0;B|=z<<S,S+=G},flush:function(){S>0&&M.writeByte(B)}});W.write(f,m);var Q=0,H=String.fromCharCode(h[Q]);for(Q+=1;Q<h.length;){var j=String.fromCharCode(h[Q]);Q+=1,y.contains(H+j)?H+=j:(W.write(y.indexOf(H),m),y.size()<4095&&(y.size()==1<<m&&(m+=1),y.add(H+j)),H=j)}return W.write(y.indexOf(H),m),W.write(u,m),W.flush(),q.toByteArray()},E=function(){var d={},f=0,u={add:function(m){if(u.contains(m))throw"dup key:"+m;d[m]=f,f+=1},size:function(){return f},indexOf:function(m){return d[m]},contains:function(m){return d[m]!==void 0}};return u};return g})(k,R),_=0;_<R;_+=1)for(var O=0;O<k;O+=1)T.setPixel(O,_,A(O,_));var x=xe();T.write(x);for(var L=(function(){var b=0,s=0,c=0,a="",h={},g=function(E){a+=String.fromCharCode(p(63&E))},p=function(E){if(!(E<0)){if(E<26)return 65+E;if(E<52)return E-26+97;if(E<62)return E-52+48;if(E==62)return 43;if(E==63)return 47}throw"n:"+E};return h.writeByte=function(E){for(b=b<<8|255&E,s+=8,c+=1;s>=6;)g(b>>>s-6),s-=6},h.flush=function(){if(s>0&&(g(b<<6-s),b=0,s=0),c%3!=0)for(var E=3-c%3,d=0;d<E;d+=1)a+="="},h.toString=function(){return a},h})(),U=x.toByteArray(),de=0;de<U.length;de+=1)L.writeByte(U[de]);return L.flush(),"data:image/gif;base64,"+L};return I})();v.stringToBytesFuncs["UTF-8"]=function(I){return(function(P){for(var D=[],V=0;V<P.length;V++){var C=P.charCodeAt(V);C<128?D.push(C):C<2048?D.push(192|C>>6,128|63&C):C<55296||C>=57344?D.push(224|C>>12,128|C>>6&63,128|63&C):(V++,C=65536+((1023&C)<<10|1023&P.charCodeAt(V)),D.push(240|C>>18,128|C>>12&63,128|C>>6&63,128|63&C))}return D})(I)},(l=typeof(o=function(){return v})=="function"?o.apply(i,[]):o)===void 0||(r.exports=l)},676:(r,i,o)=>{"use strict";o.d(i,{default:()=>de});var l=function(){return(l=Object.assign||function(b){for(var s,c=1,a=arguments.length;c<a;c++)for(var h in s=arguments[c])Object.prototype.hasOwnProperty.call(s,h)&&(b[h]=s[h]);return b}).apply(this,arguments)},v=function(){for(var b=0,s=0,c=arguments.length;s<c;s++)b+=arguments[s].length;var a=Array(b),h=0;for(s=0;s<c;s++)for(var g=arguments[s],p=0,E=g.length;p<E;p++,h++)a[h]=g[p];return a},I=function(b){return!!b&&typeof b=="object"&&!Array.isArray(b)};function P(b){for(var s=[],c=1;c<arguments.length;c++)s[c-1]=arguments[c];if(!s.length)return b;var a=s.shift();return a!==void 0&&I(b)&&I(a)?(b=l({}
3,b),Object.keys(a).forEach(function(h){var g=b[h],p=a[h];Array.isArray(g)&&Array.isArray(p)?b[h]=p:I(g)&&I(p)?b[h]=P(Object.assign({},g),p):b[h]=p}),P.apply(void 0,v([b],s))):b}function D(b,s){var c=document.createElement("a");c.download=s,c.href=b,document.body.appendChild(c),c.click(),document.body.removeChild(c)}function V(b){return s=this,c=void 0,h=function(){return(function(g,p){var E,d,f,u,m={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return u={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function y(N){return function(M){return(function(S){if(E)throw new TypeError("Generator is already executing.");for(;m;)try{if(E=1,d&&(f=2&S[0]?d.return:S[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,S[1])).done)return f;switch(d=0,f&&(S=[2&S[0],f.value]),S[0]){case 0:case 1:f=S;break;case 4:return m.label++,{value:S[1],done:!1};case 5:m.label++,d=S[1],S=[0];continue;case 7:S=m.ops.pop(),m.trys.pop();continue;default:if(!((f=(f=m.trys).length>0&&f[f.length-1])||S[0]!==6&&S[0]!==2)){m=0;continue}if(S[0]===3&&(!f||S[1]>f[0]&&S[1]<f[3])){m.label=S[1];break}if(S[0]===6&&m.label<f[1]){m.label=f[1],f=S;break}if(f&&m.label<f[2]){m.label=f[2],m.ops.push(S);break}f[2]&&m.ops.pop(),m.trys.pop();continue}S=p.call(g,m)}catch(B){S=[6,B],d=0}finally{E=f=0}if(5&S[0])throw S[1];return{value:S[0]?S[1]:void 0,done:!0}})([N,M])}}})(this,function(g){return[2,new Promise(function(p){var E=new XMLHttpRequest;E.onload=function(){var d=new FileReader;d.onloadend=function(){p(d.result)},d.readAsDataURL(E.response)},E.open("GET",b),E.responseType="blob",E.send()})]})},new((a=void 0)||(a=Promise))(function(g,p){function E(u){try{f(h.next(u))}catch(m){p(m)}}function d(u){try{f(h.throw(u))}catch(m){p(m)}}function f(u){var m;u.done?g(u.value):(m=u.value,m instanceof a?m:new a(function(y){y(m)})).then(E,d)}f((h=h.apply(s,c||[])).next())});var s,c,a,h}let C={L:.07,M:.15,Q:.25,H:.3};var F=function(){return(F=Object.assign||function(b){for(var s,c=1,a=arguments.length;c<a;c++)for(var h in s=arguments[c])Object.prototype.hasOwnProperty.call(s,h)&&(b[h]=s[h]);return b}).apply(this,arguments)};let Y=(function(){function b(s){var c=s.svg,a=s.type;this._svg=c,this._type=a}return b.prototype.draw=function(s,c,a,h){var g;switch(this._type){case"dots":g=this._drawDot;break;case"classy":g=this._drawClassy;break;case"classy-rounded":g=this._drawClassyRounded;break;case"rounded":g=this._drawRounded;break;case"extra-rounded":g=this._drawExtraRounded;break;case"square":default:g=this._drawSquare}g.call(this,{x:s,y:c,size:a,getNeighbor:h})},b.prototype._rotateFigure=function(s){var c,a=s.x,h=s.y,g=s.size,p=s.rotation,E=p===void 0?0:p,d=a+g/2,f=h+g/2;(0,s.draw)(),(c=this._element)===null||c===void 0||c.setAttribute("transform","rotate("+180*E/Math.PI+","+d+","+f+")")},b.prototype._basicDot=function(s){var c=this,a=s.size,h=s.x,g=s.y;this._rotateFigure(F(F({},s),{draw:function(){c._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),c._element.setAttribute("cx",String(h+a/2)),c._element.setAttribute("cy",String(g+a/2)),c._element.setAttribute("r",String(a/2))}}))},b.prototype._basicSquare=function(s){var c=this,a=s.size,h=s.x,g=s.y;this._rotateFigure(F(F({},s),{draw:function(){c._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),c._element.setAttribute("x",String(h)),c._element.setAttribute("y",String(g)),c._element.setAttribute("width",String(a)),c._element.setAttribute("height",String(a))}}))},b.prototype._basicSideRounded=function(s){var c=this,a=s.size,h=s.x,g=s.y;this._rotateFigure(F(F({},s),{draw:function(){c._element=document.createElementNS("http://www.w3.org/2000/svg","path"),c._element.setAttribute("d","M "+h+" "+g+"v "+a+"h "+a/2+"a "+a/2+" "+a/2+", 0, 0, 0, 0 "+-a)}}))},b.prototype._basicCornerRounded=function(s){var c=this,a=s.size,h=s.x,g=s.y;this._rotateFigure(F(F({},s),{draw:function(){c._element=document.createElementNS("http://www.w3.org/2000/svg","path"),c._element.setAttribute("d","M "+h+" "+g+"v "+a+"h "+a+"v "+-a/2+"a "+a/2+" "+a/2+", 0, 0, 0, "+-a/2+" "+-a/2)}}))},b.prototype._basicCornerExtraRounded=function(s){var c=this,a=s.size,h=s.x,g=s.y;this._rotateFigure(F(F({},s),{draw:function(){c._element=document.createElementNS("http://www.w3.org/2000/svg","path"),c._element.setAttribute("d","M "+h+" "+g+"v "+a+"h "+a+"a "+a+" "+a+", 0, 0, 0, "+-a+" "+-a)}}))},b.prototype._basicCornersRounded=function(s){var c=this,a=s.size,h=s.x,g=s.y;this._rotateFigure(F(F({},s),{draw:function(){c._element=document.createElementNS("http://www.w3.org/2000/svg","path"),c._element.setAttribute("d","M "+h+" "+g+"v "+a/2+"a "+a/2+" "+a/2+", 0, 0, 0, "+a/2+" "+a/2+"h "+a/2+"v "+-a/2+"a "+a/2+" "+a/2+", 0, 0, 0, "+-a/2+" "+-a/2)}}))},b.prototype._drawDot=function(s){var c=s.x,a=s.y,h=s.size;this._basicDot({x:c,y:a,size:h,rotation:0})},b.prototype._drawSquare=function(s){var c=s.x,a=s.y,h=s.size;this._basicSquare({x:c,y:a,size:h,rotation:0})},b.prototype._drawRounded=function(s){var c=s.x,a=s.y,h=s.size,g=s.getNeighbor,p=g?+g(-1,0):0,E=g?+g(1,0):0,d=g?+g(0,-1):0,f=g?+g(0,1):0,u=p+E+d+f;if(u!==0)if(u>2||p&&E||d&&f)this._basicSquare({x:c,y:a,size:h,rotation:0});else{if(u===2){var m=0;return p&&d?m=Math.PI/2:d&&E?m=Math.PI:E&&f&&(m=-Math.PI/2),void this._basicCornerRounded({x:c,y:a,size:h,rotation:m})}if(u===1)return m=0,d?m=Math.PI/2:E?m=Math.PI:f&&(m=-Math.PI/2),void this._basicSideRounded({x:c,y:a,size:h,rotation:m})}else this._basicDot({x:c,y:a,size:h,rotation:0})},b.prototype._drawExtraRounded=function(s){var c=s.x,a=s.y,h=s.size,g=s.getNeighbor,p=g?+g(-1,0):0,E=g?+g(1,0):0,d=g?+g(0,-1):0,f=g?+g(0,1):0,u=p+E+d+f;if(u!==0)if(u>2||p&&E||d&&f)this._basicSquare({x:c,y:a,size:h,rotation:0});else{if(u===2){var m=0;return p&&d?m=Math.PI/2:d&&E?m=Math.PI:E&&f&&(m=-Math.PI/2),void this._basicCornerExtraRounded({x:c,y:a,size:h,rotation:m})}if(u===1)return m=0,d?m=Math.PI/2:E?m=Math.PI:f&&(m=-Math.PI/2),void this._basicSideRounded({x:c,y:a,size:h,rotation:m})}else this._basicDot({x:c,y:a,size:h,rotation:0})},b.prototype._drawClassy=function(s){var c=s.x,a=s.y,h=s.size,g=s.getNeighbor,p=g?+g(-1,0):0,E=g?+g(1,0):0,d=g?+g(0,-1):0,f=g?+g(0,1):0;p+E+d+f!==0?p||d?E||f?this._basicSquare({x:c,y:a,size:h,rotation:0}):this._basicCornerRounded({x:c,y:a,size:h,rotation:Math.PI/2}):this._basicCornerRounded({x:c,y:a,size:h,rotation:-Math.PI/2}):this._basicCornersRounded({x:c,y:a,size:h,rotation:Math.PI/2})},b.prototype._drawClassyRounded=function(s){var c=s.x,a=s.y,h=s.size,g=s.getNeighbor,p=g?+g(-1,0):0,E=g?+g(1,0):0,d=g?+g(0,-1):0,f=g?+g(0,1):0;p+E+d+f!==0?p||d?E||f?this._basicSquare({x:c,y:a,size:h,rotation:0}):this._basicCornerExtraRounded({x:c,y:a,size:h,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:c,y:a,size:h,rotation:-Math.PI/2}):this._basicCornersRounded({x:c,y:a,size:h,rotation:Math.PI/2})},b})();var J=function(){return(J=Object.assign||function(b){for(var s,c=1,a=arguments.length;c<a;c++)for(var h in s=arguments[c])Object.prototype.hasOwnProperty.call(s,h)&&(b[h]=s[h]);return b}).apply(this,arguments)};let X=(function(){function b(s){var c=s.svg,a=s.type;this._svg=c,this._type=a}return b.prototype.draw=function(s,c,a,h){var g;switch(this._type){case"square":g=this._drawSquare;break;case"extra-rounded":g=this._drawExtraRounded;break;case"dot":default:g=this._drawDot}g.call(this,{x:s,y:c,size:a,rotation:h})},b.prototype._rotateFigure=function(s){var c,a=s.x,h=s.y,g=s.size,p=s.rotation,E=p===void 0?0:p,d=a+g/2,f=h+g/2;(0,s.draw)(),(c=this._element)===null||c===void 0||c.setAttribute("transform","rotate("+180*E/Math.PI+","+d+","+f+")")},b.prototype._basicDot=function(s){var c=this,a=s.size,h=s.x,g=s.y,p=a/7;this._rotateFigure(J(J({},s),{draw:function(){c._element=document.createElementNS("http://www.w3.org/2000/svg","path"),c._element.setAttribute("clip-rule","evenodd"),c._element.setAttribute("d","M "+(h+a/2)+" "+g+"a "+a/2+" "+a/2+" 0 1 0 0.1 0zm 0 "+p+"a "+(a/2-p)+" "+(a/2-p)+" 0 1 1 -0.1 0Z")}}))},b.prototype._basicSquare=function(s){var c=this,a=s.size,h=s.x,g=s.y,p=a/7;this._rotateFigure(J(J({},s),{draw:function(){c._element=document.createElementNS("http://www.w3.org/2000/svg","path"),c._element.setAttribute("clip-rule","evenodd"),c._element.setAttribute("d","M "+h+" "+g+"v "+a+"h "+a+"v "+-a+"zM "+(h+p)+" "+(g+p)+"h "+(a-2*p)+"v "+(a-2*p)+"h "+(2*p-a)+"z")}}))},b.prototype._basicExtraRounded=function(s){var c=this,a=s.size,h=s.x,g=s.y,p=a/7;this._rotateFigure(J(J({},s),{draw:function(){c._element=document.createElementNS("http://www.w3.org/2000/svg","path"),c._element.setAttribute("clip-rule","evenodd"),c._element.setAttribute("d","M "+h+" "+(g+2.5*p)+"v "+2*p+"a "+2.5*p+" "+2.5*p+", 0, 0, 0, "+2.5*p+" "+2.5*p+"h "+2*p+"a "+2.5*p+" "+2.5*p+", 0, 0, 0, "+2.5*p+" "+2.5*-p+"v "+-2*p+"a "+2.5*p+" "+2.5*p+", 0, 0, 0, "+2.5*-p+" "+2.5*-p+"h "+-2*p+"a "+2.5*p+" "+2.5*p+", 0, 0, 0, "+2.5*-p+" "+2.5*p+"M "+(h+2.5*p)+" "+(g+p)+"h "+2*p+"a "+1.5*p+" "+1.5*p+", 0, 0, 1, "+1.5*p+" "+1.5*p+"v "+2*p+"a "+1.5*p+" "+1.5*p+", 0, 0, 1, "+1.5*-p+" "+1.5*p+"h "+-2*p+"a "+1.5*p+" "+1.5*p+", 0, 0, 1, "+1.5*-p+" "+1.5*-p+"v "+-2*p+"a "+1.5*p+" "+1.5*p+", 0, 0, 1, "+1.5*p+" "+1.5*-p)}}))},b.prototype._drawDot=function(s){var c=s.x,a=s.y,h=s.size,g=s.rotation;this._basicDot({x:c,y:a,size:h,rotation:g})},b.prototype._drawSquare=function(s){var c=s.x,a=s.y,h=s.size,g=s.rotation;this._basicSquare({x:c,y:a,size:h,rotation:g})},b.prototype._drawExtraRounded=function(s){var c=s.x,a=s.y,h=s.size,g=s.rotation;this._basicExtraRounded({x:c,y:a,size:h,rotation:g})},b})();var ee=function(){return(ee=Object.assign||function(b){for(var s,c=1,a=arguments.length;c<a;c++)for(var h in s=arguments[c])Object.prototype.hasOwnProperty.call(s,h)&&(b[h]=s[h]);return b}).apply(this,arguments)};let ie=(function(){function b(s){var c=s.svg,a=s.type;this._svg=c,this._type=a}return b.prototype.draw=function(s,c,a,h){var g;switch(this._type){case"square":g=this._drawSquare;break;case"dot":default:g=this._drawDot}g.call(this,{x:s,y:c,size:a,rotation:h})},b.prototype._rotateFigure=function(s){var c,a=s.x,h=s.y,g=s.size,p=s.rotation,E=p===void 0?0:p,d=a+g/2,f=h+g/2;(0,s.draw)(),(c=this._element)===null||c===void 0||c.setAttribute("transform","rotate("+180*E/Math.PI+","+d+","+f+")")},b.prototype._basicDot=function(s){var c=this,a=s.size,h=s.x,g=s.y;this._rotateFigure(ee(ee({},s),{draw:function(){c._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),c._element.setAttribute("cx",String(h+a/2)),c._element.setAttribute("cy",String(g+a/2)),c._element.setAttribute("r",String(a/2))}}))},b.prototype._basicSquare=function(s){var c=this,a=s.size,h=s.x,g=s.y;this._rotateFigure(ee(ee({},s),{draw:function(){c._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),c._element.setAttribute("x",String(h)),c._element.setAttribute("y",String(g)),c._element.setAttribute("width",String(a)),c._element.setAttribute("height",String(a))}}))},b.prototype._drawDot=function(s){var c=s.x,a=s.y,h=s.size,g=s.rotation;this._basicDot({x:c,y:a,size:h,rotation:g})},b.prototype._drawSquare=function(s){var c=s.x,a=s.y,h=s.size,g=s.rotation;this._basicSquare({x:c,y:a,size:h,rotation:g})},b})(),se="circle";var ue=function(b,s,c,a){return new(c||(c=Promise))(function(h,g){function p(f){try{d(a.next(f))}catch(u){g(u)}}function E(f){try{d(a.throw(f))}catch(u){g(u)}}function d(f){var u;f.done?h(f.value):(u=f.value,u instanceof c?u:new c(function(m){m(u)})).then(p,E)}d((a=a.apply(b,s||[])).next())})},ke=function(b,s){var c,a,h,g,p={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]};return g={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function E(d){return function(f){return(function(u){if(c)throw new TypeError("Generator is already executing.");for(;p;)try{if(c=1,a&&(h=2&u[0]?a.return:u[0]?a.throw||((h=a.return)&&h.call(a),0):a.next)&&!(
3h=h.call(a,u[1])).done)return h;switch(a=0,h&&(u=[2&u[0],h.value]),u[0]){case 0:case 1:h=u;break;case 4:return p.label++,{value:u[1],done:!1};case 5:p.label++,a=u[1],u=[0];continue;case 7:u=p.ops.pop(),p.trys.pop();continue;default:if(!((h=(h=p.trys).length>0&&h[h.length-1])||u[0]!==6&&u[0]!==2)){p=0;continue}if(u[0]===3&&(!h||u[1]>h[0]&&u[1]<h[3])){p.label=u[1];break}if(u[0]===6&&p.label<h[1]){p.label=h[1],h=u;break}if(h&&p.label<h[2]){p.label=h[2],p.ops.push(u);break}h[2]&&p.ops.pop(),p.trys.pop();continue}u=s.call(b,p)}catch(m){u=[6,m],a=0}finally{c=h=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}})([d,f])}}},ye=[[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]],Ee=[[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]];let xe=(function(){function b(s){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(s.width)),this._element.setAttribute("height",String(s.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._options=s}return Object.defineProperty(b.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),b.prototype.getElement=function(){return this._element},b.prototype.drawQR=function(s){return ue(this,void 0,void 0,function(){var c,a,h,g,p,E,d,f,u,m,y=this;return ke(this,function(N){switch(N.label){case 0:return c=s.getModuleCount(),a=Math.min(this._options.width,this._options.height)-2*this._options.margin,h=this._options.shape===se?a/Math.sqrt(2):a,g=Math.floor(h/c),p={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=s,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(N.sent(),!this._image)return[2];E=this._options,d=E.imageOptions,f=E.qrOptions,u=d.imageSize*C[f.errorCorrectionLevel],m=Math.floor(u*c*c),p=(function(M){var S=M.originalHeight,B=M.originalWidth,q=M.maxHiddenDots,W=M.maxHiddenAxisDots,Q=M.dotSize,H={x:0,y:0},j={x:0,y:0};if(S<=0||B<=0||q<=0||Q<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var z=S/B;return H.x=Math.floor(Math.sqrt(q/z)),H.x<=0&&(H.x=1),W&&W<H.x&&(H.x=W),H.x%2==0&&H.x--,j.x=H.x*Q,H.y=1+2*Math.ceil((H.x*z-1)/2),j.y=Math.round(j.x*z),(H.y*H.x>q||W&&W<H.y)&&(W&&W<H.y?(H.y=W,H.y%2==0&&H.x--):H.y-=2,j.y=H.y*Q,H.x=1+2*Math.ceil((H.y/z-1)/2),j.x=Math.round(j.y/z)),{height:j.y,width:j.x,hideYDots:H.y,hideXDots:H.x}})({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:m,maxHiddenAxisDots:c-14,dotSize:g}),N.label=2;case 2:return this.drawBackground(),this.drawDots(function(M,S){var B,q,W,Q,H,j;return!(y._options.imageOptions.hideBackgroundDots&&M>=(c-p.hideXDots)/2&&M<(c+p.hideXDots)/2&&S>=(c-p.hideYDots)/2&&S<(c+p.hideYDots)/2||!((B=ye[M])===null||B===void 0)&&B[S]||!((q=ye[M-c+7])===null||q===void 0)&&q[S]||!((W=ye[M])===null||W===void 0)&&W[S-c+7]||!((Q=Ee[M])===null||Q===void 0)&&Q[S]||!((H=Ee[M-c+7])===null||H===void 0)&&H[S]||!((j=Ee[M])===null||j===void 0)&&j[S-c+7])}),this.drawCorners(),this._options.image?[4,this.drawImage({width:p.width,height:p.height,count:c,dotSize:g})]:[3,4];case 3:N.sent(),N.label=4;case 4:return[2]}})})},b.prototype.drawBackground=function(){var s,c,a,h=this._element,g=this._options;if(h){var p=(s=g.backgroundOptions)===null||s===void 0?void 0:s.gradient,E=(c=g.backgroundOptions)===null||c===void 0?void 0:c.color;if((p||E)&&this._createColor({options:p,color:E,additionalRotation:0,x:0,y:0,height:g.height,width:g.width,name:"background-color"}),(a=g.backgroundOptions)===null||a===void 0?void 0:a.round){var d=Math.min(g.width,g.height),f=document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id","clip-path-background-color"),this._defs.appendChild(this._backgroundClipPath),f.setAttribute("x",String((g.width-d)/2)),f.setAttribute("y",String((g.height-d)/2)),f.setAttribute("width",String(d)),f.setAttribute("height",String(d)),f.setAttribute("rx",String(d/2*g.backgroundOptions.round)),this._backgroundClipPath.appendChild(f)}}},b.prototype.drawDots=function(s){var c,a,h=this;if(!this._qr)throw"QR code is not defined";var g=this._options,p=this._qr.getModuleCount();if(p>g.width||p>g.height)throw"The canvas is too small.";var E=Math.min(g.width,g.height)-2*g.margin,d=g.shape===se?E/Math.sqrt(2):E,f=Math.floor(d/p),u=Math.floor((g.width-p*f)/2),m=Math.floor((g.height-p*f)/2),y=new Y({svg:this._element,type:g.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:(c=g.dotsOptions)===null||c===void 0?void 0:c.gradient,color:g.dotsOptions.color,additionalRotation:0,x:0,y:0,height:g.height,width:g.width,name:"dot-color"});for(var N=function(ne){for(var K=function(Z){return s&&!s(ne,Z)?"continue":!((a=M._qr)===null||a===void 0)&&a.isDark(ne,Z)?(y.draw(u+ne*f,m+Z*f,f,function(oe,he){return!(ne+oe<0||Z+he<0||ne+oe>=p||Z+he>
3=p)&&!(s&&!s(ne+oe,Z+he))&&!!h._qr&&h._qr.isDark(ne+oe,Z+he)}),void(y._element&&M._dotsClipPath&&M._dotsClipPath.appendChild(y._element))):"continue"},re=0;re<p;re++)K(re)},M=this,S=0;S<p;S++)N(S);if(g.shape===se){var B=Math.floor((E/f-p)/2),q=p+2*B,W=u-B*f,Q=m-B*f,H=[],j=Math.floor(q/2);for(S=0;S<q;S++){H[S]=[];for(var z=0;z<q;z++)S>=B-1&&S<=q-B&&z>=B-1&&z<=q-B||Math.sqrt((S-j)*(S-j)+(z-j)*(z-j))>j?H[S][z]=0:H[S][z]=this._qr.isDark(z-2*B<0?z:z>=p?z-2*B:z-B,S-2*B<0?S:S>=p?S-2*B:S-B)?1:0}var G=function(ne){for(var K=function(Z){if(!H[ne][Z])return"continue";y.draw(W+ne*f,Q+Z*f,f,function(oe,he){var fe;return!!(!((fe=H[ne+oe])===null||fe===void 0)&&fe[Z+he])}),y._element&&_e._dotsClipPath&&_e._dotsClipPath.appendChild(y._element)},re=0;re<q;re++)K(re)},_e=this;for(S=0;S<q;S++)G(S)}},b.prototype.drawCorners=function(){var s=this;if(!this._qr)throw"QR code is not defined";var c=this._element,a=this._options;if(!c)throw"Element code is not defined";var h=this._qr.getModuleCount(),g=Math.min(a.width,a.height)-2*a.margin,p=a.shape===se?g/Math.sqrt(2):g,E=Math.floor(p/h),d=7*E,f=3*E,u=Math.floor((a.width-h*E)/2),m=Math.floor((a.height-h*E)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(function(y){var N,M,S,B,q,W,Q,H,j,z,G,_e,ne=y[0],K=y[1],re=y[2],Z=u+ne*E*(h-7),oe=m+K*E*(h-7),he=s._dotsClipPath,fe=s._dotsClipPath;if((!((N=a.cornersSquareOptions)===null||N===void 0)&&N.gradient||!((M=a.cornersSquareOptions)===null||M===void 0)&&M.color)&&((he=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+ne+"-"+K),s._defs.appendChild(he),s._cornersSquareClipPath=s._cornersDotClipPath=fe=he,s._createColor({options:(S=a.cornersSquareOptions)===null||S===void 0?void 0:S.gradient,color:(B=a.cornersSquareOptions)===null||B===void 0?void 0:B.color,additionalRotation:re,x:Z,y:oe,height:d,width:d,name:"corners-square-color-"+ne+"-"+K})),(q=a.cornersSquareOptions)===null||q===void 0?void 0:q.type){var me=new X({svg:s._element,type:a.cornersSquareOptions.type});me.draw(Z,oe,d,re),me._element&&he&&he.appendChild(me._element)}else for(var Ke=new Y({svg:s._element,type:a.dotsOptions.type}),Fs=function(Pe){for(var hn=function(Xe){if(!(!((W=ye[Pe])===null||W===void 0)&&W[Xe]))return"continue";Ke.draw(Z+Pe*E,oe+Xe*E,E,function(fn,pn){var Qe;return!!(!((Qe=ye[Pe+fn])===null||Qe===void 0)&&Qe[Xe+pn])}),Ke._element&&he&&he.appendChild(Ke._element)},Je=0;Je<ye[Pe].length;Je++)hn(Je)},Ye=0;Ye<ye.length;Ye++)Fs(Ye);if((!((Q=a.cornersDotOptions)===null||Q===void 0)&&Q.gradient||!((H=a.cornersDotOptions)===null||H===void 0)&&H.color)&&((fe=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+ne+"-"+K),s._defs.appendChild(fe),s._cornersDotClipPath=fe,s._createColor({options:(j=a.cornersDotOptions)===null||j===void 0?void 0:j.gradient,color:(z=a.cornersDotOptions)===null||z===void 0?void 0:z.color,additionalRotation:re,x:Z+2*E,y:oe+2*E,height:f,width:f,name:"corners-dot-color-"+ne+"-"+K})),(G=a.cornersDotOptions)===null||G===void 0?void 0:G.type){var dn=new ie({svg:s._element,type:a.cornersDotOptions.type});dn.draw(Z+2*E,oe+2*E,f,re),dn._element&&fe&&fe.appendChild(dn._element)}else{Ke=new Y({svg:s._element,type:a.dotsOptions.type});var Bs=function(Pe){for(var hn=function(Xe){if(!(!((_e=Ee[Pe])===null||_e===void 0)&&_e[Xe]))return"continue";Ke.draw(Z+Pe*E,oe+Xe*E,E,function(fn,pn){var Qe;return!!(!((Qe=Ee[Pe+fn])===null||Qe===void 0)&&Qe[Xe+pn])}),Ke._element&&fe&&fe.appendChild(Ke._element)},Je=0;Je<Ee[Pe].length;Je++)hn(Je)};for(Ye=0;Ye<Ee.length;Ye++)Bs(Ye)}})},b.prototype.loadImage=function(){var s=this;return new Promise(function(c,a){var h=s._options,g=new Image;if(!h.image)return a("Image is not defined");typeof h.imageOptions.crossOrigin=="string"&&(g.crossOrigin=h.imageOptions.crossOrigin),s._image=g,g.onload=function(){c()},g.src=h.image})},b.prototype.drawImage=function(s){var c=s.width,a=s.height,h=s.count,g=s.dotSize;return ue(this,void 0,void 0,function(){var p,E,d,f,u,m,y,N,M;return ke(this,function(S){switch(S.label){case 0:return p=this._options,E=Math.floor((p.width-h*g)/2),d=Math.floor((p.height-h*g)/2),f=E+p.imageOptions.margin+(h*g-c)/2,u=d+p.imageOptions.margin+(h*g-a)/2,m=c-2*p.imageOptions.margin,y=a-2*p.imageOptions.margin,(N=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(f)),N.setAttribute("y",String(u)),N.setAttribute("width",m+"px"),N.setAttribute("height",y+"px"),[4,V(p.image||"")];case 1:return M=S.sent(),N.setAttribute("href",M||""),this._element.appendChild(N),[2]}})})},b.prototype._createColor=function(s){var c=s.options,a=s.color,h=s.additionalRotation,g=s.x,p=s.y,E=s.height,d=s.width,f=s.name,u=d>E?d:E,m=document.createElementNS("http://www.w3.org/2000/svg","rect");if(m.setAttribute("x",String(g)),m.setAttribute("y",String(p)),m.setAttribute("height",String(E)),m.setAttribute("width",String(d)),m.setAttribute("clip-path","url('#clip-path-"+f+"')"),c){var y;if(c.type==="radial")(y=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",f),y.setAttribute("gradientUnits","userSpaceOnUse"),y.setAttribute("fx",String(g+d/2)),y.setAttribute("fy",String(p+E/2)),y.setAttribute("cx",String(g+d/2)),y.setAttribute("cy",String(p+E/2)),y.setAttribute("r",String(u/2));else{var N=((c.rotation||0)+h)%(2*Math.PI),M=(N+2*Math.PI)%(2*Math.PI),S=g+d/2,B=p+E/2,q=g+d/2,W=p+E/2;M>=0&&M<=.25*Math.PI||M>1.75*Math.PI&&M<=2*Math.PI?(S-=d/2,B-=E/2*Math.tan(N),q+=d/2,W+=E/2*Math.tan(N)):M>.25*Math.PI&&M<=.75*Math.PI?(B-=E/2,S-=d/2/Math.tan(N),W+=E/2,q+=d/2/Math.tan(N)):M>.75*Math.PI&&M<=1.25*Math.PI?(S+=d/2,B+=E/2*Math.tan(N),q-=d/2,W-=E/2*Math.tan(N)):M>1.25*Math.PI&&M<=1.75*Math.PI&&(B+=E/2,S+=d/2/Math.tan(N),W-=E/2,q-=d/2/Math.tan(N)),(y=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",f),y.setAttribute("gradientUnits","userSpaceOnUse"),y.setAttribute("x1",String(Math.round(S))),y.setAttribute("y1",String(Math.round(B))),y.setAttribute("x2",String(Math.round(q))),y.setAttribute("y2",String(Math.round(W)))}
3c.colorStops.forEach(function(Q){var H=Q.offset,j=Q.color,z=document.createElementNS("http://www.w3.org/2000/svg","stop");z.setAttribute("offset",100*H+"%"),z.setAttribute("stop-color",j),y.appendChild(z)}),m.setAttribute("fill","url('#"+f+"')"),this._defs.appendChild(y)}else a&&m.setAttribute("fill",a);this._element.appendChild(m)},b})(),ht="canvas";for(var kt={},k=0;k<=40;k++)kt[k]=k;let R={type:ht,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:kt[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{round:0,color:"#fff"}};var A=function(){return(A=Object.assign||function(b){for(var s,c=1,a=arguments.length;c<a;c++)for(var h in s=arguments[c])Object.prototype.hasOwnProperty.call(s,h)&&(b[h]=s[h]);return b}).apply(this,arguments)};function T(b){var s=A({},b);if(!s.colorStops||!s.colorStops.length)throw"Field 'colorStops' is required in gradient";return s.rotation?s.rotation=Number(s.rotation):s.rotation=0,s.colorStops=s.colorStops.map(function(c){return A(A({},c),{offset:Number(c.offset)})}),s}function _(b){var s=A({},b);return s.width=Number(s.width),s.height=Number(s.height),s.margin=Number(s.margin),s.imageOptions=A(A({},s.imageOptions),{hideBackgroundDots:!!s.imageOptions.hideBackgroundDots,imageSize:Number(s.imageOptions.imageSize),margin:Number(s.imageOptions.margin)}),s.margin>Math.min(s.width,s.height)&&(s.margin=Math.min(s.width,s.height)),s.dotsOptions=A({},s.dotsOptions),s.dotsOptions.gradient&&(s.dotsOptions.gradient=T(s.dotsOptions.gradient)),s.cornersSquareOptions&&(s.cornersSquareOptions=A({},s.cornersSquareOptions),s.cornersSquareOptions.gradient&&(s.cornersSquareOptions.gradient=T(s.cornersSquareOptions.gradient))),s.cornersDotOptions&&(s.cornersDotOptions=A({},s.cornersDotOptions),s.cornersDotOptions.gradient&&(s.cornersDotOptions.gradient=T(s.cornersDotOptions.gradient))),s.backgroundOptions&&(s.backgroundOptions=A({},s.backgroundOptions),s.backgroundOptions.gradient&&(s.backgroundOptions.gradient=T(s.backgroundOptions.gradient))),s}var O=o(192),x=o.n(O),L=function(b,s,c,a){return new(c||(c=Promise))(function(h,g){function p(f){try{d(a.next(f))}catch(u){g(u)}}function E(f){try{d(a.throw(f))}catch(u){g(u)}}function d(f){var u;f.done?h(f.value):(u=f.value,u instanceof c?u:new c(function(m){m(u)})).then(p,E)}d((a=a.apply(b,s||[])).next())})},U=function(b,s){var c,a,h,g,p={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]};return g={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function E(d){return function(f){return(function(u){if(c)throw new TypeError("Generator is already executing.");for(;p;)try{if(c=1,a&&(h=2&u[0]?a.return:u[0]?a.throw||((h=a.return)&&h.call(a),0):a.next)&&!(h=h.call(a,u[1])).done)return h;switch(a=0,h&&(u=[2&u[0],h.value]),u[0]){case 0:case 1:h=u;break;case 4:return p.label++,{value:u[1],done:!1};case 5:p.label++,a=u[1],u=[0];continue;case 7:u=p.ops.pop(),p.trys.pop();continue;default:if(!((h=(h=p.trys).length>0&&h[h.length-1])||u[0]!==6&&u[0]!==2)){p=0;continue}if(u[0]===3&&(!h||u[1]>h[0]&&u[1]<h[3])){p.label=u[1];break}if(u[0]===6&&p.label<h[1]){p.label=h[1],h=u;break}if(h&&p.label<h[2]){p.label=h[2],p.ops.push(u);break}h[2]&&p.ops.pop(),p.trys.pop();continue}u=s.call(b,p)}catch(m){u=[6,m],a=0}finally{c=h=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}})([d,f])}}};let de=(function(){function b(s){this._options=s?_(P(R,s)):R,this.update()}return b._clearContainer=function(s){s&&(s.innerHTML="")},b.prototype._setupSvg=function(){var s=this;if(this._qr){var c=new xe(this._options);this._svg=c.getElement(),this._svgDrawingPromise=c.drawQR(this._qr).then(function(){var a;s._svg&&((a=s._extension)===null||a===void 0||a.call(s,c.getElement(),s._options))})}},b.prototype._setupCanvas=function(){var s,c=this;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=(s=this._svgDrawingPromise)===null||s===void 0?void 0:s.then(function(){if(c._svg){var a=c._svg,h=new XMLSerializer().serializeToString(a),g="data:image/svg+xml;base64,"+btoa(h),p=new Image;return new Promise(function(E){p.onload=function(){var d,f;(f=(d=c._canvas)===null||d===void 0?void 0:d.getContext("2d"))===null||f===void 0||f.drawImage(p,0,0),E()},p.src=g})}}))},b.prototype._getElement=function(s){return s===void 0&&(s="png"),L(this,void 0,void 0,function(){return U(this,function(c){switch(c.label){case 0:if(!this._qr)throw"QR code is empty";return s.toLowerCase()!=="svg"?[3,2]:(this._svg&&this._svgDrawingPromise||this._setupSvg(),[4,this._svgDrawingPromise]);case 1:return c.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return c.sent(),[2,this._canvas]}})})},b.prototype.update=function(s){b._clearContainer(this._container),this._options=s?_(P(this._options,s)):this._options,this._options.data&&(this._qr=x()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||(function(c){switch(!0){case/^[0-9]*$/.test(c):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(c):return"Alphanumeric";default:return"Byte"}})(this._options.data)),this._qr.make(),this._options.type===ht?this._setupCanvas():this._setupSvg(),this.append(this._container))},b.prototype.append=function(s){if(s){if(typeof s.appendChild!="function")throw"Container should be a single DOM node";this._options.type===ht?this._canvas&&s.appendChild(this._canvas):this._svg&&s.appendChild(this._svg),this._container=s}},b.prototype.applyExtension=function(s){if(!s)throw"Extension function should be defined.";this._extension=s,this.update()},b.prototype.deleteExtension=function(){this._extension=void 0,this.update()},b.prototype.getRawData=function(s){return s===void 0&&(s="png"),L(this,void 0,void 0,function(){var c,a,h;return U(this,function(g){switch(g.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getElement(s)];case 1:return(c=g.sent())?s.toLowerCase()==="svg"?(a=new XMLSerializer,h=a.serializeToString(c),[2,new Blob([`<?xml version="1.0" standalone="no"?>\r
4`+h],{type:"image/svg+xml"})]):[2,new Promise(function(p){return c.toBlob(p,"image/"+s,1)})]:[2,null]}})})},b.prototype.download=function(s){return L(this,void 0,void 0,function(){var c,a,h,g,p;return U(this,function(E){switch(E.label){case 0:if(!this._qr)throw"QR code is empty";return c="png",a="qr",typeof s=="string"?(c=s,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof s=="object"&&s!==null&&(s.name&&(a=s.name),s.extension&&(c=s.extension)),[4,this._getElement(c)];case 1:return(h=E.sent())?(c.toLowerCase()==="svg"?(g=new XMLSerializer,p=`<?xml version="1.0" standalone="no"?>\r
5`+(p=g.serializeToString(h)),D("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(p),a+".svg")):D(h.toDataURL("image/"+c),a+"."+c),[2]):[2]}})})},b})()}},e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}return n.n=r=>{var i=r&&r.__esModule?()=>r.default:()=>r;return n.d(i,{a:i}),i},n.d=(r,i)=>{for(var o in i)n.o(i,o)&&!n.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:i[o]})},n.o=(r,i)=>Object.prototype.hasOwnProperty.call(r,i),n(676)})().default})});var Us=Hs(Kr(),1);var Yr=()=>{};var Qr=function(t){let e=[],n=0;for(let r=0;r<t.length;r++){let i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1<t.length&&(t.charCodeAt(r+1)&64512)===56320?(i=65536+((i&1023)<<10)+(t.charCodeAt(++r)&1023),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},qs=function(t){let e=[],n=0,r=0;for(;n<t.length;){let i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){let o=t[n++];e[r++]=String.fromCharCode((i&31)<<6|o&63)}else if(i>239&&i<365){let o=t[n++],l=t[n++],v=t[n++],I=((i&7)<<18|(o&63)<<12|(l&63)<<6|v&63)-65536;e[r++]=String.fromCharCode(55296+(I>>10)),e[r++]=String.fromCharCode(56320+(I&1023))}else{let o=t[n++],l=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(o&63)<<6|l&63)}}return e.join("")},Zr={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();let n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<t.length;i+=3){let o=t[i],l=i+1<t.length,v=l?t[i+1]:0,I=i+2<t.length,P=I?t[i+2]:0,D=o>>2,V=(o&3)<<4|v>>4,C=(v&15)<<2|P>>6,F=P&63;I||(F=64,l||(C=64)),r.push(n[D],n[V],n[C],n[F])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(Qr(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):qs(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();let n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<t.length;){let o=n[t.charAt(i++)],v=i<t.length?n[t.charAt(i)]:0;++i;let P=i<t.length?n[t.charAt(i)]:64;++i;let V=i<t.length?n[t.charAt(i)]:64;if(++i,o==null||v==null||P==null||V==null)throw new En;let C=o<<2|v>>4;if(r.push(C),P!==64){let F=v<<4&240|P>>2;if(r.push(F),V!==64){let Y=P<<6&192|V;r.push(Y)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}}
vendor: 4,914 bytes, lines 5-13
5,En=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}},zs=function(t){let e=Qr(t);return Zr.encodeByteArray(e,!0)},mt=function(t){return zs(t).replace(/\./g,"")},Lt=function(t){try{return Zr.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function Ws(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}var $s=()=>Ws().__FIREBASE_DEFAULTS__,js=()=>{if(typeof process>"u"||typeof process.env>"u")return;let t=process.env.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},Gs=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let e=t&&Lt(t[1]);return e&&JSON.parse(e)},Sn=()=>{try{return Yr()||$s()||js()||Gs()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},An=t=>Sn()?.emulatorHosts?.[t],ei=t=>{let e=An(t);if(!e)return;let n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);let r=parseInt(e.substring(n+1),10);return e[0]==="["?[e.substring(1,n-1),r]:[e.substring(0,n),r]},Cn=()=>Sn()?.config,Rn=t=>Sn()?.[`_${t}`];var Dt=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,r))}}};function Fe(t){try{return(t.startsWith("http://")||t.startsWith("https://")?new URL(t).hostname:t).endsWith(".cloudworkstations.dev")}catch{return!1}}function Mt(t){return w(this,null,function*(){return(yield fetch(t,{credentials:"include"})).ok})}function ti(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let n={alg:"none",type:"JWT"},r=e||"demo-project",i=t.iat||0,o=t.sub||t.user_id;if(!o)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");let l=ae({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:o,user_id:o,firebase:{sign_in_provider:"custom",identities:{}}},t);return[mt(JSON.stringify(n)),mt(JSON.stringify(l)),""].join(".")}var gt={};function Ks(){let t={prod:[],emulator:[]};for(let e of Object.keys(gt))gt[e]?t.emulator.push(e):t.prod.push(e);return t}function Ys(t){let e=document.getElementById(t),n=!1;return e||(e=document.createElement("div"),e.setAttribute("id",t),n=!0),{created:n,element:e}}var Jr=!1;function xt(t,e){if(typeof window>"u"||typeof document>"u"||!Fe(window.location.host)||gt[t]===e||gt[t]||Jr)return;gt[t]=e;function n(C){return`__firebase__banner__${C}`}let r="__firebase__banner",o=Ks().prod.length>0;function l(){let C=document.getElementById(r);C&&C.remove()}function v(C){C.style.display="flex",C.style.background="#7faaf0",C.style.position="fixed",C.style.bottom="5px",C.style.left="5px",C.style.padding=".5em",C.style.borderRadius="5px",C.style.alignItems="center"}function I(C,F){C.setAttribute("width","24"),C.setAttribute("id",F),C.setAttribute("height","24"),C.setAttribute("viewBox","0 0 24 24"),C.setAttribute("fill","none"),C.style.marginLeft="-6px"}function P(){let C=document.createElement("span");return C.style.cursor="pointer",C.style.marginLeft="16px",C.style.fontSize="24px",C.innerHTML=" &times;",C.onclick=()=>{Jr=!0,l()},C}function D(C,F){C.setAttribute("id",F),C.innerText="Learn more",C.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",C.setAttribute("target","__blank"),C.style.paddingLeft="5px",C.style.textDecoration="underline"}function V(){let C=Ys(r),F=n("text"),Y=document.getElementById(F)||document.createElement("span"),J=n("learnmore"),X=document.getElementById(J)||document.createElement("a"),ee=n("preprendIcon"),ie=document.getElementById(ee)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(C.created){let se=C.element;v(se),D(X,J);let ue=P();I(ie,ee),se.append(ie,Y,X,ue),document.body.appendChild(se)}o?(Y.innerText="Preview backend disconnected.",ie.innerHTML=`<g clip-path="url(#clip0_6013_33858)">
6<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/>
7</g>
8<defs>
9<clipPath id="clip0_6013_33858">
10<rect width="24" height="24" fill="white"/>
11</clipPath>
12</defs>`):(ie.innerHTML=`<g clip-path="url(#clip0_6083_34804)">
13<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 
1312.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/>
14</g>
15<defs>
16<clipPath id="clip0_6083_34804">
17<rect width="24" height="24" fill="white"/>
18</clipPath>
19</defs>`,Y.innerText="Preview backend running in this workspace."),Y.setAttribute("id",F)}document.readyState==="loading"?window.addEventListener("DOMContentLoaded",V):V()}function ge(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function ni(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(ge())}function ri(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function ii(){let t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function si(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function oi(){let t=ge();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function ai(){try{return typeof indexedDB=="object"}catch{return!1}}function ci(){return new Promise((t,e)=>{try{let n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{e(i.error?.message||"")}}catch(n){e(n)}})}var Js="FirebaseError",ve=class t extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=Js,Object.setPrototypeOf(this,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Ne.prototype.create)}},Ne=class{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){let r=n[0]||{},i=`${this.service}/${e}`,o=this.errors[e],l=o?Xs(o,r):"Error",v=`${this.serviceName}: ${l} (${i}).`;return new ve(i,v,r)}};function Xs(t,e){return t.replace(Qs,(n,r)=>{let i=e[r];return i!=null?String(i):`<${r}?>`})}var Qs=/\{\$([^}]+)}/g;function ui(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function Be(t,e){if(t===e)return!0;let n=Object.keys(t),r=Object.keys(e);for(let i of n){if(!r.includes(i))return!1;let o=t[i],l=e[i];if(Xr(o)&&Xr(l)){if(!Be(o,l))return!1}else if(o!==l)return!1}for(let i of r)if(!n.includes(i))return!1;return!0}function Xr(t){return t!==null&&typeof t=="object"}function _t(t){let e=[];for(let[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(i=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}function li(t,e){let n=new Tn(t,e);return n.subscribe.bind(n)}var Tn=class{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{e(this)}).catch(r=>{this.error(r)})}next(e){this.forEachObserver(n=>{n.next(e)})}error(e){this.forEachObserver(n=>{n.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,n,r){let i;if(e===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");Zs(e,["next","error","complete"])?i=e:i={next:e,error:n,complete:r},i.next===void 0&&(i.next=bn),i.error===void 0&&(i.error=bn),i.complete===void 0&&(i.complete=bn);let o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),o}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,e)}sendOne(e,n){this.task.then(()=>
vendor: 9,311 bytes, line 19
19{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function Zs(t,e){if(typeof t!="object"||t===null)return!1;for(let n of e)if(n in t&&typeof t[n]=="function")return!0;return!1}function bn(){}var qu=14400*1e3;function Ie(t){return t&&t._delegate?t._delegate:t}var be=class{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}};var et="[DEFAULT]";var kn=class{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){let r=new Dt;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{let i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){let n=this.normalizeInstanceIdentifier(e?.identifier),r=e?.optional??!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(i){if(r)return null;throw i}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(to(e))try{this.getOrInitializeService({instanceIdentifier:et})}catch{}for(let[n,r]of this.instancesDeferred.entries()){let i=this.normalizeInstanceIdentifier(n);try{let o=this.getOrInitializeService({instanceIdentifier:i});r.resolve(o)}catch{}}}}clearInstance(e=et){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}delete(){return w(this,null,function*(){let e=Array.from(this.instances.values());yield Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])})}isComponentSet(){return this.component!=null}isInitialized(e=et){return this.instances.has(e)}getOptions(e=et){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(let[o,l]of this.instancesDeferred.entries()){let v=this.normalizeInstanceIdentifier(o);r===v&&l.resolve(i)}return i}onInit(e,n){let r=this.normalizeInstanceIdentifier(n),i=this.onInitCallbacks.get(r)??new Set;i.add(e),this.onInitCallbacks.set(r,i);let o=this.instances.get(r);return o&&e(o,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,n){let r=this.onInitCallbacks.get(n);if(r)for(let i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:eo(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=et){return this.component?this.component.multipleInstances?e:et:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function eo(t){return t===et?void 0:t}function to(t){return t.instantiationMode==="EAGER"}var Ut=class{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let n=new kn(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}};var no=[],te=(function(t){return t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT",t})(te||{}),ro={debug:te.DEBUG,verbose:te.VERBOSE,info:te.INFO,warn:te.WARN,error:te.ERROR,silent:te.SILENT},io=te.INFO,so={[te.DEBUG]:"log",[te.VERBOSE]:"log",[te.INFO]:"info",[te.WARN]:"warn",[te.ERROR]:"error"},oo=(t,e,...n)=>{if(e<t.logLevel)return;let r=new Date().toISOString(),i=so[e];if(i)console[i](`[${r}]  ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)},at=class{constructor(e){this.name=e,this._logLevel=io,this._logHandler=oo,this._userLogHandler=null,no.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in te))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?ro[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,te.DEBUG,...e),this._logHandler(this,te.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,te.VERBOSE,...e),this._logHandler(this,te.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,te.INFO,...e),this._logHandler(this,te.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,te.WARN,...e),this._logHandler(this,te.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,te.ERROR,...e),this._logHandler(this,te.ERROR,...e)}};var On=class{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(ao(n)){let r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}};function ao(t){return t.getComponent()?.type==="VERSION"}var Nn="@firebase/app",di="0.14.8";var De=new at("@firebase/app"),co="@firebase/app-compat",uo="@firebase/analytics-compat",lo="@firebase/analytics",ho="@firebase/app-check-compat",fo="@firebase/app-check",po="@firebase/auth",go="@firebase/auth-compat",mo="@firebase/database",_o="@firebase/data-connect",yo="@firebase/database-compat",vo="@firebase/functions",wo="@firebase/functions-compat",Io="@firebase/installations",bo="@firebase/installations-compat",Eo="@firebase/messaging",To="@firebase/messaging-compat",So="@firebase/performance",Ao="@firebase/performance-compat",Co="@firebase/remote-config",Ro="@firebase/remote-config-compat",ko="@firebase/storage",Po="@firebase/storage-compat",Oo="@firebase/firestore",No="@firebase/ai",Do="@firebase/firestore-compat",Lo="firebase",Mo="12.9.0";var Dn="[DEFAULT]",xo={[Nn]:"fire-core",[co]:"fire-core-compat",[lo]:"fire-analytics",[uo]:"fire-analytics-compat",[fo]:"fire-app-check",[ho]:"fire-app-check-compat",[po]:"fire-auth",[go]:"fire-auth-compat",[mo]:"fire-rtdb",[_o]:"fire-data-connect",[yo]:"fire-rtdb-compat",[vo]:"fire-fn",[wo]:"fire-fn-compat",[Io]:"fire-iid",[bo]:"fire-iid-compat",[Eo]:"fire-fcm",[To]:"fire-fcm-compat",[So]:"fire-perf",[Ao]:"fire-perf-compat",[Co]:"fire-rc",[Ro]:"fire-rc-compat",[ko]:"fire-gcs",[Po]:"fire-gcs-compat",[Oo]:"fire-fst",[Do]:"fire-fst-compat",[No]:"fire-vertex","fire-js":"fire-js",[Lo]:"fire-js-all"};var Ft=new Map,Uo=new Map,Ln=new Map;function hi(t,e){try{t.container.addComponent(e)}catch(n){De.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function He(t){let e=t.name;if(Ln.has(e))return De.debug(`There were multiple attempts to register component ${e}.`),!1;Ln.set(e,t);for(let n of Ft.values())hi(n,t);for(let n of Uo.values())hi(n,t);return!0}function vt(t,e){let n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function we(t){return t==null?!1:t.settings!==void 0}var Fo={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
19d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},Ve=new Ne("app","Firebase",Fo);var Mn=class{constructor(e,n,r){this._isDeleted=!1,this._options=ae({},e),this._config=ae({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new be("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Ve.create("app-deleted",{appName:this._name})}};var qe=Mo;function Fn(t,e={}){let n=t;typeof e!="object"&&(e={name:e});let r=ae({name:Dn,automaticDataCollectionEnabled:!0},e),i=r.name;if(typeof i!="string"||!i)throw Ve.create("bad-app-name",{appName:String(i)});if(n||(n=Cn()),!n)throw Ve.create("no-options");let o=Ft.get(i);if(o){if(Be(n,o.options)&&Be(r,o.config))return o;throw Ve.create("duplicate-app",{appName:i})}let l=new Ut(i);for(let I of Ln.values())l.addComponent(I);let v=new Mn(n,r,l);return Ft.set(i,v),v}function Bt(t=Dn){let e=Ft.get(t);if(!e&&t===Dn&&Cn())return Fn();if(!e)throw Ve.create("no-app",{appName:t});return e}function Te(t,e,n){let r=xo[t]??t;n&&(r+=`-${n}`);let i=r.match(/\s|\//),o=e.match(/\s|\//);if(i||o){let l=[`Unable to register library "${r}" with version "${e}":`];i&&l.push(`library name "${r}" contains illegal characters (whitespace or "/")`),i&&o&&l.push("and"),o&&l.push(`version name "${e}" contains illegal characters (whitespace or "/")`),De.warn(l.join(" "));return}He(new be(`${r}-version`,()=>({library:r,version:e}),"VERSION"))}var Bo="firebase-heartbeat-database",Vo=1,yt="firebase-heartbeat-store",Pn=null;function mi(){return Pn||(Pn=Gr(Bo,Vo,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(yt)}catch(n){console.warn(n)}}}}).catch(t=>{throw Ve.create("idb-open",{originalErrorMessage:t.message})})),Pn}function Ho(t){return w(this,null,function*(){try{let n=(yield mi()).transaction(yt),r=yield n.objectStore(yt).get(_i(t));return yield n.done,r}catch(e){if(e instanceof ve)De.warn(e.message);else{let n=Ve.create("idb-get",{originalErrorMessage:e?.message});De.warn(n.message)}}})}function fi(t,e){return w(this,null,function*(){try{let r=(yield mi()).transaction(yt,"readwrite");yield r.objectStore(yt).put(e,_i(t)),yield r.done}catch(n){if(n instanceof ve)De.warn(n.message);else{let r=Ve.create("idb-set",{originalErrorMessage:n?.message});De.warn(r.message)}}})}function _i(t){return`${t.name}!${t.options.appId}`}var qo=1024,zo=30,xn=class{constructor(e){this.container=e,this._heartbeatsCache=null;let n=this.container.getProvider("app").getImmediate();this._storage=new Un(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}triggerHeartbeat(){return w(this,null,function*(){try{let n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=pi();if(this._heartbeatsCache?.heartbeats==null&&(this._heartbeatsCache=yield this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null)||this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(i=>i.date===r))return;if(this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats.length>zo){let i=$o(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(i,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(e){De.warn(e)}})}getHeartbeatsHeader(){return w(this,null,function*(){try{if(this._heartbeatsCache===null&&(yield this._heartbeatsCachePromise),this._heartbeatsCache?.heartbeats==null||this._heartbeatsCache.heartbeats.length===0)return"";let e=pi(),{heartbeatsToSend:n,unsentEntries:r}=Wo(this._heartbeatsCache.heartbeats),i=mt(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}catch(e){return De.warn(e),""}})}};function pi(){return new Date().toISOString().substring(0,10)}function Wo(t,e=qo){let n=[],r=t.slice();for(let i of t){let o=n.find(l=>l.agent===i.agent);if(o){if(o.dates.push(i.date),gi(n)>e){o.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),gi(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}var Un=class{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return w(this,null,function*(){return ai()?ci().then(()=>!0).catch(()=>!1):!1})}read(){return w(this,null,function*(){if(yield this._canUseIndexedDBPromise){let n=yield Ho(this.app);return n?.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}})}overwrite(e){return w(this,null,function*(){if(yield this._canUseIndexedDBPromise){let r=yield this.read();return fi(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return})}add(e){return w(this,null,function*(){if(yield this._canUseIndexedDBPromise){let r=yield this.read();return fi(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return})}};function gi(t){return mt(JSON.stringify({version:2,heartbeats:t})).length}function $o(t){if(t.length===0)return-1;let e=0,n=t[0].date;for(let r=1;r<t.length;r++)t[r].date<n&&(n=t[r].date,e=r);return e}function jo(t){He(new be("platform-logger",e=>new On(e),"PRIVATE")),He(new be("heartbeat",e=>new xn(e),"PRIVATE")),Te(Nn,di,t),Te(Nn,di,"esm2020"),Te("fire-js","")}jo("");var Ti="firebasestorage.googleapis.com",Si="storageBucket",Go=120*1e3,Ko=600*1e3;var ce=class t extends ve{constructor(e,n,r=0){super(Bn(e),`Firebase Storage: ${n} (${Bn(e)})`),this.status_=r,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,t.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return Bn(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage}
20${this.customData.serverResponse}`:this.message=this._baseMessage}},le=(function(t){return t.UNKNOWN="unknown",t.OBJECT_NOT_FOUND="object-not-found",t.BUCKET_NOT_FOUND="bucket-not-found",t.PROJECT_NOT_FOUND="project-not-found",t.QUOTA_EXCEEDED="quota-exceeded",t.UNAUTHENTICATED="unauthenticated",t.UNAUTHORIZED="unauthorized",t.UNAUTHORIZED_APP="unauthorized-app",t.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",t.INVALID_CHECKSUM="invalid-checksum",t.CANCELED="canceled",t.INVALID_EVENT_NAME="invalid-event-name",t.INVA
vendor: 13,897 bytes, line 20
20LID_URL="invalid-url",t.INVALID_DEFAULT_BUCKET="invalid-default-bucket",t.NO_DEFAULT_BUCKET="no-default-bucket",t.CANNOT_SLICE_BLOB="cannot-slice-blob",t.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",t.NO_DOWNLOAD_URL="no-download-url",t.INVALID_ARGUMENT="invalid-argument",t.INVALID_ARGUMENT_COUNT="invalid-argument-count",t.APP_DELETED="app-deleted",t.INVALID_ROOT_OPERATION="invalid-root-operation",t.INVALID_FORMAT="invalid-format",t.INTERNAL_ERROR="internal-error",t.UNSUPPORTED_ENVIRONMENT="unsupported-environment",t})(le||{});function Bn(t){return"storage/"+t}function $n(){let t="An unknown error occurred, please check the error payload for server response.";return new ce(le.UNKNOWN,t)}function Yo(t){return new ce(le.OBJECT_NOT_FOUND,"Object '"+t+"' does not exist.")}function Jo(t){return new ce(le.QUOTA_EXCEEDED,"Quota for bucket '"+t+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function Xo(){let t="User is not authenticated, please authenticate using Firebase Authentication and try again.";return new ce(le.UNAUTHENTICATED,t)}function Qo(){return new ce(le.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project.")}function Zo(t){return new ce(le.UNAUTHORIZED,"User does not have permission to access '"+t+"'.")}function ea(){return new ce(le.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function ta(){return new ce(le.CANCELED,"User canceled the upload/download.")}function na(t){return new ce(le.INVALID_URL,"Invalid URL '"+t+"'.")}function ra(t){return new ce(le.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}function ia(){return new ce(le.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+Si+"' property when initializing the app?")}function sa(){return new ce(le.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function oa(){return new ce(le.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function aa(t){return new ce(le.UNSUPPORTED_ENVIRONMENT,`${t} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`)}function Vn(t){return new ce(le.INVALID_ARGUMENT,t)}function Ai(){return new ce(le.APP_DELETED,"The Firebase app was deleted.")}function ca(t){return new ce(le.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function It(t,e){return new ce(le.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function wt(t){throw new ce(le.INTERNAL_ERROR,"Internal error: "+t)}var Se=class t{constructor(e,n){this.bucket=e,this.path_=n}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){let e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,n){let r;try{r=t.makeFromUrl(e,n)}catch{return new t(e,"")}if(r.path==="")return r;throw ra(e)}static makeFromUrl(e,n){let r=null,i="([A-Za-z0-9.\\-_]+)";function o(ue){ue.path.charAt(ue.path.length-1)==="/"&&(ue.path_=ue.path_.slice(0,-1))}let l="(/(.*))?$",v=new RegExp("^gs://"+i+l,"i"),I={bucket:1,path:3};function P(ue){ue.path_=decodeURIComponent(ue.path)}let D="v[A-Za-z0-9_]+",V=n.replace(/[.]/g,"\\."),C="(/([^?#]*).*)?$",F=new RegExp(`^https?://${V}/${D}/b/${i}/o${C}`,"i"),Y={bucket:1,path:3},J=n===Ti?"(?:storage.googleapis.com|storage.cloud.google.com)":n,X="([^?#]*)",ee=new RegExp(`^https?://${J}/${i}/${X}`,"i"),se=[{regex:v,indices:I,postModify:o},{regex:F,indices:Y,postModify:P},{regex:ee,indices:{bucket:1,path:2},postModify:P}];for(let ue=0;ue<se.length;ue++){let ke=se[ue],ye=ke.regex.exec(e);if(ye){let Ee=ye[ke.indices.bucket],xe=ye[ke.indices.path];xe||(xe=""),r=new t(Ee,xe),ke.postModify(r);break}}if(r==null)throw na(e);return r}},Hn=class{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}};function ua(t,e,n){let r=1,i=null,o=null,l=!1,v=0;function I(){return v===2}let P=!1;function D(...X){P||(P=!0,e.apply(null,X))}function V(X){i=setTimeout(()=>{i=null,t(F,I())},X)}function C(){o&&clearTimeout(o)}function F(X,...ee){if(P){C();return}if(X){C(),D.call(null,X,...ee);return}if(I()||l){C(),D.call(null,X,...ee);return}r<64&&(r*=2);let se;v===1?(v=2,se=0):se=(r+Math.random())*1e3,V(se)}let Y=!1;function J(X){Y||(Y=!0,C(),!P&&(i!==null?(X||(v=2),clearTimeout(i),V(0)):X||(v=1)))}return V(0),o=setTimeout(()=>{l=!0,J(!0)},n),J}function la(t){t(!1)}function da(t){return t!==void 0}function ha(t){return typeof t=="object"&&!Array.isArray(t)}function jn(t){return typeof t=="string"||t instanceof String}function yi(t){return Gn()&&t instanceof Blob}function Gn(){return typeof Blob<"u"}function vi(t,e,n,r){if(r<e)throw Vn(`Invalid value for '${t}'. Expected ${e} or greater.`);if(r>n)throw Vn(`Invalid value for '${t}'. Expected ${n} or less.`)}function Kn(t,e,n){let r=e;return n==null&&(r=`https://${e}`),`${n}://${r}/v0${t}`}function Ci(t){let e=encodeURIComponent,n="?";for(let r in t)if(t.hasOwnProperty(r)){let i=e(r)+"="+e(t[r]);n=n+i+"&"}return n=n.slice(0,-1),n}var ut=(function(t){return t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT",t})(ut||{});function fa(t,e){let n=t>=500&&t<600,i=[408,429].indexOf(t)!==-1,o=e.indexOf(t)!==-1;return n||i||o}var qn=class{constructor(e,n,r,i,o,l,v,I,P,D,V,C=!0,F=!1){this.url_=e,this.method_=n,this.headers_=r,this.body_=i,this.successCodes_=o,this.additionalRetryCodes_=l,this.callback_=v,this.errorCallback_=I,this.timeout_=P,this.progressCallback_=D,this.connectionFactory_=V,this.retry=C,this.isUsingEmulator=F,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((Y,J)=>{this.resolve_=Y,this.reject_=J,this.start_()})}start_(){let e=(r,i)=>{if(i){r(!1,new ct(!1,null,!0));return}let o=this.connectionFactory_();this.pendingConnection_=o;let l=v=>{let I=v.loaded,P=v.lengthComputable?v.total:-1;this.progressCallback_!==null&&this.progressCallback_(I,P)};this.progressCallback_!==null&&o.addUploadProgressListener(l),o.send(this.url_,this.method_,this.isUsingEmulator,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&o.removeUploadProgressListener(l),this.pendingConnection_=null;let v=o.getErrorCode()===ut.NO_ERROR,I=o.getStatus();if(!v||fa(I,this.additionalRetryCodes_)&&this.retry){let D=o.getErrorCode()===ut.ABORT;r(!1,new ct(!1,null,D));return}let P=this.successCodes_.indexOf(I)!==-1;r(!0,new ct(P,o))})},n=(r,i)=>{let o=this.resolve_,l=this.reject_,v=i.connection;if(i.wasSuccessCode)try{let I=this.callback_(v,v.getResponse());da(I)?o(I):o()}catch(I){l(I)}else if(v!==null){let I=$n();I.serverResponse=v.getErrorText(),this.errorCallback_?l(this.errorCallback_(v,I)):l(I)}else if(i.canceled){let I=this.appDelete_?Ai():ta();l(I)}else{let I=ea();l(I)}};this.canceled_?n(!1,new ct(!1,null,!0)):this.backoffId_=ua(e,n,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,this.backoffId_!==null&&la(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}},ct=class{constructor(e,n,r){this.wasSuccessCode=e,this.connection=n,this.canceled=!!r}};function pa(t,e){e!==null&&e.length>0&&(t.Authorization="Firebase "+e)}function ga(t,e){t["X-Firebase-Storage-Version"]="webjs/"+(e??"AppManager")}function ma(t,e){e&&(t["X-Firebase-GMPID"]=e)}function _a(t,e){e!==null&&(t["X-Firebase-AppCheck"]=e)}function ya(t,e,n,r,i,o,l=!0,v=!1){let I=Ci(t.urlParams),P=t.url+I,D=Object.assign({},t.headers);return ma(D,e),pa(D,n),ga(D,o),_a(D,r),new qn(P,t.method,D,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,i,l,v)}function va(){return typeof BlobBuilder<"u"?BlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:void 0}function wa(...t){let e=va();if(e!==void 0){let n=new e;for(let r=0;r<t.length;r++)n.append(t[r]);return n.getBlob()}else{if(Gn())return new Blob(t);throw new ce(le.UNSUPPORTED_ENVIRONMENT,"This browser doesn't seem to support creating Blobs")}}function Ia(t,e,n){return t.webkitSlice?t.webkitSlice(e,n):t.mozSlice?t.mozSlice(e,n):t.slice?t.slice(e,n):null}function ba(t){if(typeof atob>"u")throw aa("base-64");return atob(t)}var Ce={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},bt=class{constructor(e,n){this.data=e,this.contentType=n||null}};function Ea(t,e){switch(t){case Ce.RAW:return new bt(Ri(e));case Ce.BASE64:case Ce.BASE64URL:return new bt(ki(t,e));case Ce.DATA_URL:return new bt(Sa(e),Aa(e))}throw $n()}function Ri(t){let e=[];for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(r<=127)e.push(r);else if(r<=2047)e.push(192|r>>6,128|r&63);else if((r&64512)===55296)if(!(n<t.length-1&&(t.charCodeAt(n+1)&64512)===56320))e.push(239,191,189);else{let o=r,l=t.charCodeAt(++n);r=65536|(o&1023)<<10|l&1023,e.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|r&63)}else(r&64512)===56320?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|r&63)}return new Uint8Array(e)}function Ta(t){let e;try{e=decodeURIComponent(t)}catch{throw It(Ce.DATA_URL,"Malformed data URL.")}return Ri(e)}function ki(t,e){switch(t){case Ce.BASE64:{let i=e.indexOf("-")!==-1,o=e.indexOf("_")!==-1;if(i||o)throw It(t,"Invalid character '"+(i?"-":"_")+"' found: is it base64url encoded?");break}case Ce.BASE64URL:{let i=e.indexOf("+")!==-1,o=e.indexOf("/")!==-1;if(i||o)throw It(t,"Invalid character '"+(i?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=ba(e)}catch(i){throw i.message.includes("polyfill")?i:It(t,"Invalid character found")}let r=new Uint8Array(n.length);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r}var Ht=class{constructor(e){this.base64=!1,this.contentType=null;let n=e.match(/^data:([^,]+)?,/);if(n===null)throw It(Ce.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");let r=n[1]||null;r!=null&&(this.base64=Ca(r,";base64"),this.contentType=this.base64?r.substring(0,r.length-7):r),this.rest=e.substring(e.indexOf(",")+1)}};function Sa(t){let e=new Ht(t);return e.base64?ki(Ce.BASE64,e.rest):Ta(e.rest)}function Aa(t){return new Ht(t).contentType}function Ca(t,e){return t.length>=e.length?t.substring(t.length-e.length)===e:!1}var qt=class t{constructor(e,n){let r=0,i="";yi(e)?(this.data_=e,r=e.size,i=e.type):e instanceof ArrayBuffer?(n?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),r=this.data_.length):e instanceof Uint8Array&&(n?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),r=e.length),this.size_=r,this.type_=i}size(){return this.size_}type(){return this.type_}slice(e,n){if(yi(this.data_)){let r=this.data_,i=Ia(r,e,n);return i===null?null:new t(i)}else{let r=new Uint8Array(this.data_.buffer,e,n-e);return new t(r,!0)}}static getBlob(...e){if(Gn()){let n=e.map(r=>r instanceof t?r.data_:r);return new t(wa.apply(null,n))}else{let n=e.map(l=>jn(l)?Ea(Ce.RAW,l).data:l.data_),r=0;n.forEach(l=>{r+=l.byteLength});let i=new Uint8Array(r),o=0;return n.forEach(l=>{for(let v=0;v<l.length;v++)i[o++]=l[v]}),new t(i,!0)}}uploadData(){return this.data_}};function Pi(t){let e;try{e=JSON.parse(t)}catch{return null}return ha(e)?e:null}function Ra(t){if(t.length===0)return null;let e=t.lastIndexOf("/");return e===-1?"":t.slice(0,e)}function ka(t,e){let n=e.split("/").filter(r=>r.length>0).join("/");return t.length===0?n:t+"/"+n}function Oi(t){let e=t.lastIndexOf("/",t.length-2);return e===-1?t:t.slice(e+1)}function Pa(t,e){return e}var pe=class{constructor(e,n,r,i){this.server=e,this.local=n||e,this.writable=!!r,this.xform=i||Pa}},Vt=null;function Oa(t){return!jn(t)||t.length<2?t:Oi(t)}function Ni(){if(Vt)return Vt;let t=[];t.push(new pe("bucket")),t.push(new pe("generation")),t.push(new pe("metageneration")),t.push(new pe("name","fullPath",!0));function e(o,l){return Oa(l)}let n=new pe("name");n.xform=e,t.push(n);function r(o,l){return l!==void 0?Number(l):l}let i=new pe("size");return i.xform=r,t.push(i),t.push(new pe("timeCreated")),t.push(new pe("updated")),t.push(new pe("md5Hash",null,!0)),t.push(new pe("cacheControl",null,!0)),t.push(new pe("contentDisposition",null,!0)),t.push(new pe("contentEncoding",null,!0)),t.push(new pe("contentLanguage",null,!0)),t.push(new pe("contentType",null,!0)),t.push(new pe("metadata","customMetadata",!0)),Vt=t,Vt}function Na(t,e){function n(){let r=t.bucket,i=t.fullPath,o=new Se(r,i);return e._makeStorageReference(o)}Object.defineProperty(t,"ref",{get:n})}function Da(t,e,n){let r={};r.type="file";let i=n.length;for(let o=0;o<i;o++){let l=n[o];r[l.local]=l.xform(r,e[l.server])}return Na(r,t),r}function Di(t,e,n){let r=Pi(e);return r===null?null:Da(t,r,n)}function La(t,e,n,r){let i=Pi(e);if(i===null||!jn(i.downloadTokens))return null;let o=i.downloadTokens;if(o.length===0)return null;let l=encodeURIComponent;return o.split(",").map(P=>{let D=t.bucket,V=t.fullPath,C="/b/"+l(D)+"/o/"+l(V),F=Kn(C,n,r),Y=Ci({alt:"media",token:P});return F+Y})[0]}function Ma(t,e){let n={},r=e.length;for(let i=0;i<r;i++){let o=e[i];o.writable&&(n[o.server]=t[o.local])}return JSON.stringify(n)}var zt=class{constructor(e,n,r,i){this.url=e,this.method=n,this.handler=r,this.timeout=i,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}};function Li(t){if(!t)throw $n()}function xa(t,e){function n(r,i){let o=Di(t,i,e);return Li(o!==null),o}return n}function Ua(t,e){function n(r,i){let o=Di(t,i,e);return Li(o!==null),La(o,i,t.host,t._protocol)}return n}function Mi(t){function e(n,r){let i;return n.getStatus()===401?n.getErrorText().includes("Firebase App Check token is invali
20d")?i=Qo():i=Xo():n.getStatus()===402?i=Jo(t.bucket):n.getStatus()===403?i=Zo(t.path):i=r,i.status=n.getStatus(),i.serverResponse=r.serverResponse,i}return e}function Fa(t){let e=Mi(t);function n(r,i){let o=e(r,i);return r.getStatus()===404&&(o=Yo(t.path)),o.serverResponse=i.serverResponse,o}return n}function Ba(t,e,n){let r=e.fullServerUrl(),i=Kn(r,t.host,t._protocol),o="GET",l=t.maxOperationRetryTime,v=new zt(i,o,Ua(t,n),l);return v.errorHandler=Fa(e),v}function Va(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}function Ha(t,e,n){let r=Object.assign({},n);return r.fullPath=t.path,r.size=e.size(),r.contentType||(r.contentType=Va(null,e)),r}function qa(t,e,n,r,i){let o=e.bucketOnlyServerUrl(),l={"X-Goog-Upload-Protocol":"multipart"};function v(){let se="";for(let ue=0;ue<2;ue++)se=se+Math.random().toString().slice(2);return se}let I=v();l["Content-Type"]="multipart/related; boundary="+I;let P=Ha(e,r,i),D=Ma(P,n),V="--"+I+`\r
21Content-Type: application/json; charset=utf-8\r
22\r
23`+D+`\r
24--`+I+`\r
25Content-Type: `+P.contentType+`\r
26\r
27`,C=`\r
28--`+I+"--",F=qt.getBlob(V,r,C);if(F===null)throw sa();let Y={name:P.fullPath},J=Kn(o,t.host,t._protocol),X="POST",ee=t.maxUploadRetryTime,ie=new zt(J,X,xa(t,n),ee);return ie.urlParams=Y,ie.headers=l,ie.body=F.uploadData(),ie.errorHandler=Mi(e),ie}var ul=256*1024;var wi=null,zn=class{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=ut.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=ut.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=ut.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,n,r,i,o){if(this.sent_)throw wt("cannot .send() more than once");if(Fe(e)&&r&&(this.xhr_.withCredentials=!0),this.sent_=!0,this.xhr_.open(n,e,!0),o!==void 0)for(let l in o)o.hasOwnProperty(l)&&this.xhr_.setRequestHeader(l,o[l].toString());return i!==void 0?this.xhr_.send(i):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw wt("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw wt("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw wt("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw wt("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener("progress",e)}},Wn=class extends zn{initXhr(){this.xhr_.responseType="text"}};function xi(){return wi?wi():new Wn}var lt=class t{constructor(e,n){this._service=e,n instanceof Se?this._location=n:this._location=Se.makeFromUrl(n,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,n){return new t(e,n)}get root(){let e=new Se(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return Oi(this._location.path)}get storage(){return this._service}get parent(){let e=Ra(this._location.path);if(e===null)return null;let n=new Se(this._location.bucket,e);return new t(this._service,n)}_throwIfRoot(e){if(this._location.path==="")throw ca(e)}};function za(t,e,n){t._throwIfRoot("uploadBytes");let r=qa(t.storage,t._location,Ni(),new qt(e,!0),n);return t.storage.makeRequestWithTokens(r,xi).then(i=>({metadata:i,ref:t}))}function Wa(t){t._throwIfRoot("getDownloadURL");let e=Ba(t.storage,t._location,Ni());return t.storage.makeRequestWithTokens(e,xi).then(n=>{if(n===null)throw oa();return n})}function $a(t,e){let n=ka(t._location.path,e),r=new Se(t._location.bucket,n);return new lt(t.storage,r)}function ja(t){return/^[A-Za-z]+:\/\//.test(t)}function Ga(t,e){return new lt(t,e)}function Ui(t,e){if(t instanceof Et){let n=t;if(n._bucket==null)throw ia();let r=new lt(n,n._bucket);return e!=null?Ui(r,e):r}else return e!==void 0?$a(t,e):t}function Ka(t,e){if(e&&ja(e)){if(t instanceof Et)return Ga(t,e);throw Vn("To use ref(service, url), the first argument must be a Storage instance.")}else return Ui(t,e)}function Ii(t,e){let n=e?.[Si];return n==null?null:Se.makeFromBucketSpec(n,t)}function Ya(t,e,n,r={}){t.host=`${e}:${n}`;let i=Fe(e);i&&(Mt(`https://${t.host}/b`),xt("Storage",!0)),t._isUsingEmulator=!0,t._protocol=i?"https":"http";let{mockUserToken:o}=r;
28o&&(t._overrideAuthToken=typeof o=="string"?o:ti(o,t.app.options.projectId))}var Et=class{constructor(e,n,r,i,o,l=!1){this.app=e,this._authProvider=n,this._appCheckProvider=r,this._url=i,this._firebaseVersion=o,this._isUsingEmulator=l,this._bucket=null,this._host=Ti,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=Go,this._maxUploadRetryTime=Ko,this._requests=new Set,i!=null?this._bucket=Se.makeFromBucketSpec(i,this._host):this._bucket=Ii(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,this._url!=null?this._bucket=Se.makeFromBucketSpec(this._url,e):this._bucket=Ii(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){vi("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){vi("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}_getAuthToken(){return w(this,null,function*(){if(this._overrideAuthToken)return this._overrideAuthToken;let e=this._authProvider.getImmediate({optional:!0});if(e){let n=yield e.getToken();if(n!==null)return n.accessToken}return null})}_getAppCheckToken(){return w(this,null,function*(){if(we(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let e=this._appCheckProvider.getImmediate({optional:!0});return e?(yield e.getToken()).token:null})}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new lt(this,e)}_makeRequest(e,n,r,i,o=!0){if(this._deleted)return new Hn(Ai());{let l=ya(e,this._appId,r,i,n,this._firebaseVersion,o,this._isUsingEmulator);return this._requests.add(l),l.getPromise().then(()=>this._requests.delete(l),()=>this._requests.delete(l)),l}}makeRequestWithTokens(e,n){return w(this,null,function*(){let[r,i]=yield Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,n,r,i).getPromise()})}},bi="@firebase/storage",Ei="0.14.0";var Fi="storage";function Bi(t,e,n){return t=Ie(t),za(t,e,n)}function Vi(t){return t=Ie(t),Wa(t)}function Hi(t,e){return t=Ie(t),Ka(t,e)}function qi(t=Bt(),e){t=Ie(t);let r=vt(t,Fi).getImmediate({identifier:e}),i=ei("storage");return i&&Ja(r,...i),r}function Ja(t,e,n,r={}){Ya(t,e,n,r)}function Xa(t,{instanceIdentifier:e}){let n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal"),i=t.getProvider("app-check-internal");return new Et(n,r,i,e,qe)}function Qa(){He(new be(Fi,Xa,"PUBLIC").setMultipleInstances(!0)),Te(bi,Ei,""),Te(bi,Ei,"esm2020")}Qa();var Za="firebase",ec="12.9.0";Te(Za,ec,"app");function rs(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}var is=rs,ss=new Ne("auth","Firebase",rs());var Yt=new at("@firebase/auth");function tc(t,...e){Yt.logLevel<=te.WARN&&Yt.warn(`Auth (${qe}): ${t}`,...e)}function $t(t,...e){Yt.logLevel<=te.ERROR&&Yt.error(`Auth (${qe}): ${t}`,...e)}function je(t,...e){throw pr(t,...e)}function tt(t,...e){return pr(t,...e)}function os(t,e,n){let r=Ue(ae({},is()),{[e]:n});return new Ne("auth","Firebase",r).create(e,{appName:t.name})}function $e(t){return os(t,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function pr(t,...e){if(typeof t!="string"){let n=e[0],r=[...e.slice(1)];return r[0]&&(r[0].appName=t.name),t._errorFactory.create(n,...r)}return ss.create(t,...e)}function $(t,e,...n){if(!t)throw pr(e,...n)}function Le(t){let e="INTERNAL ASSERTION FAILED: "+t;throw $t(e),new Error(e)}function Ge(t,e){t||Le(e)}function Qn(){return typeof self<"u"&&self.location?.href||""}function nc(){return zi()==="http:"||zi()==="https:"}function zi(){return typeof self<"u"&&self.location?.protocol||null}function rc(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(nc()||ii()||"connection"in navigator)?navigator.onLine:!0}function ic(){if(typeof navigator>"u")return null;let t=navigator;return t.languages&&t.languages[0]||t.language||null}var nt=class{constructor(e,n){this.shortDelay=e,this.longDelay=n,Ge(n>
vendor: 20,430 bytes, line 28
28e,"Short delay should be less than long delay!"),this.isMobile=ni()||si()}get(){return rc()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}};function gr(t,e){Ge(t.emulator,"Emulator should always be set here");let{url:n}=t.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`:n}var Jt=class{static initialize(e,n,r){this.fetchImpl=e,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;Le("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;Le("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;Le("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}};var sc={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};var oc=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],ac=new nt(3e4,6e4);function cn(t,e){return t.tenantId&&!e.tenantId?Ue(ae({},e),{tenantId:t.tenantId}):e}function dt(o,l,v,I){return w(this,arguments,function*(t,e,n,r,i={}){return as(t,i,()=>w(null,null,function*(){let P={},D={};r&&(e==="GET"?D=r:P={body:JSON.stringify(r)});let V=_t(ae({key:t.config.apiKey},D)).slice(1),C=yield t._getAdditionalHeaders();C["Content-Type"]="application/json",t.languageCode&&(C["X-Firebase-Locale"]=t.languageCode);let F=ae({method:e,headers:C},P);return ri()||(F.referrerPolicy="no-referrer"),t.emulatorConfig&&Fe(t.emulatorConfig.host)&&(F.credentials="include"),Jt.fetch()(yield us(t,t.config.apiHost,n,V),F)}))})}function as(t,e,n){return w(this,null,function*(){t._canInitEmulator=!1;let r=ae(ae({},sc),e);try{let i=new Zn(t),o=yield Promise.race([n(),i.promise]);i.clearNetworkTimeout();let l=yield o.json();if("needConfirmation"in l)throw Wt(t,"account-exists-with-different-credential",l);if(o.ok&&!("errorMessage"in l))return l;{let v=o.ok?l.errorMessage:l.error.message,[I,P]=v.split(" : ");if(I==="FEDERATED_USER_ID_ALREADY_LINKED")throw Wt(t,"credential-already-in-use",l);if(I==="EMAIL_EXISTS")throw Wt(t,"email-already-in-use",l);if(I==="USER_DISABLED")throw Wt(t,"user-disabled",l);let D=r[I]||I.toLowerCase().replace(/[_\s]+/g,"-");if(P)throw os(t,D,P);je(t,D)}}catch(i){if(i instanceof ve)throw i;je(t,"network-request-failed",{message:String(i)})}})}function cs(o,l,v,I){return w(this,arguments,function*(t,e,n,r,i={}){let P=yield dt(t,e,n,r,i);return"mfaPendingCredential"in P&&je(t,"multi-factor-auth-required",{_serverResponse:P}),P})}function us(t,e,n,r){return w(this,null,function*(){let i=`${e}${n}?${r}`,o=t,l=o.config.emulator?gr(t.config,i):`${t.config.apiScheme}://${i}`;return oc.includes(n)&&(yield o._persistenceManagerAvailable,o._getPersistenceType()==="COOKIE")?o._getPersistence()._getFinalTarget(l).toString():l})}var Zn=class{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(tt(this.auth,"network-request-failed")),ac.get())})}};function Wt(t,e,n){let r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);let i=tt(t,e,r);return i.customData._tokenResponse=n,i}function cc(t,e){return w(this,null,function*(){return dt(t,"POST","/v1/accounts:delete",e)})}function Xt(t,e){return w(this,null,function*(){return dt(t,"POST","/v1/accounts:lookup",e)})}function Tt(t){if(t)try{let e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}function ls(t,e=!1){return w(this,null,function*(){let n=Ie(t),r=yield n.getIdToken(e),i=mr(r);$(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");let o=typeof i.firebase=="object"?i.firebase:void 0,l=o?.sign_in_provider;return{claims:i,token:r,authTime:Tt(Yn(i.auth_time)),issuedAtTime:Tt(Yn(i.iat)),expirationTime:Tt(Yn(i.exp)),signInProvider:l||null,signInSecondFactor:o?.sign_in_second_factor||null}})}function Yn(t){return Number(t)*1e3}function mr(t){let[e,n,r]=t.split(".");if(e===void 0||n===void 0||r===void 0)return $t("JWT malformed, contained fewer than 3 sections"),null;try{let i=Lt(n);return i?JSON.parse(i):($t("Failed to decode base64 JWT payload"),null)}catch(i){return $t("Caught error parsing JWT payload as JSON",i?.toString()),null}}function Wi(t){let e=mr(t);return $(e,"internal-error"),$(typeof e.exp<"u","internal-error"),$(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}function At(t,e,n=!1){return w(this,null,function*(){if(n)return e;try{return yield e}catch(r){throw r instanceof ve&&uc(r)&&t.auth.currentUser===t&&(yield t.auth.signOut()),r}})}function uc({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}var er=class{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){if(e){let n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;let r=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,r)}}schedule(e=!1){if(!this.isRunning)return;let n=this.getInterval(e);this.timerId=setTimeout(()=>w(this,null,function*(){yield this.iteration()}),n)}iteration(){return w(this,null,function*(){try{yield this.user.getIdToken(!0)}catch(e){e?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()})}};var Ct=class{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=Tt(this.lastLoginAt),this.creationTime=Tt(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}};function Qt(t){return w(this,null,function*(){let e=t.auth,n=yield t.getIdToken(),r=yield At(t,Xt(e,{idToken:n}));$(r?.users.length,e,"internal-error");let i=r.users[0];t._notifyReloadListener(i);let o=i.providerUserInfo?.length?hs(i.providerUserInfo):[],l=lc(t.providerData,o),v=t.isAnonymous,I=!(t.email&&i.passwordHash)&&!l?.length,P=v?I:!1,D={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:l,metadata:new Ct(i.createdAt,i.lastLoginAt),isAnonymous:P};Object.assign(t,D)})}function ds(t){return w(this,null,function*(){let e=Ie(t);yield Qt(e),yield e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)})}function lc(t,e){return[...t.filter(r=>!e.some(i=>i.providerId===r.providerId)),...e]}function hs(t){return t.map(r=>{var i=r,{providerId:e}=i,n=gn(i,["providerId"]);return{providerId:e,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})}function dc(t,e){return w(this,null,function*(){let n=yield as(t,{},()=>w(null,null,function*(){let r=_t({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:o}=t.config,l=yield us(t,i,"/v1/token",`key=${o}`),v=yield t._getAdditionalHeaders();v["Content-Type"]="application/x-www-form-urlencoded";let I={method:"POST",headers:v,body:r};return t.emulatorConfig&&Fe(t.emulatorConfig.host)&&(I.credentials="include"),Jt.fetch()(l,I)}));return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}})}function hc(t,e){return w(this,null,function*(){return dt(t,"POST","/v2/accounts:revokeToken",cn(t,e))})}var St=class t{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){$(e.idToken,"internal-error"),$(typeof e.idToken<"u","internal-error"),$(typeof e.refreshToken<"u","internal-error");let n="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):Wi(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}updateFromIdToken(e){$(e.length!==0,"internal-error");let n=Wi(e);this.updateTokensAndExpiration(e,null,n)}getToken(e,n=!1){return w(this,null,function*(){return!n&&this.accessToken&&!this.isExpired?this.accessToken:($(this.refreshToken,e,"user-token-expired"),this.refreshToken?(yield this.refresh(e,this.refreshToken),this.accessToken):null)})}clearRefreshToken(){this.refreshToken=null}refresh(e,n){return w(this,null,function*(){let{accessToken:r,refreshToken:i,expiresIn:o}=yield dc(e,n);this.updateTokensAndExpiration(r,i,Number(o))})}updateTokensAndExpiration(e,n,r){this.refreshToken=n||null,this.accessToken=e||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(e,n){let{refreshToken:r,accessToken:i,expirationTime:o}=n,l=new t;return r&&($(typeof r=="string","internal-error",{appName:e}),l.refreshToken=r),i&&($(typeof i=="string","internal-error",{appName:e}),l.accessToken=i),o&&($(typeof o=="number","internal-error",{appName:e}),l.expirationTime=o),l}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new t,this.toJSON())}_performRefresh(){return Le("not implemented")}};function ze(t,e){$(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}var We=class t{constructor(o){var l=o,{uid:e,auth:n,stsTokenManager:r}=l,i=gn(l,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new er(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new Ct(i.createdAt||void 0,i.lastLoginAt||void 0)}getIdToken(e){return w(this,null,function*(){let n=yield At(this,this.stsTokenManager.getToken(this.auth,e));return $(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n})}getIdTokenResult(e){return ls(this,e)}reload(){return ds(this)}_assign(e){this!==e&&($(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(n=>ae({},n)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let n=new t(Ue(ae({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(e){$(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(e,n=!1){return w(this,null,function*(){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),n&&(yield Qt(this)),yield this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)})}delete(){return w(this,null,function*(){if(we(this.auth.app))return Promise.reject($e(this.auth));let e=yield this.getIdToken();return yield At(this,cc(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()})}toJSON(){return Ue(ae({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>ae({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,n){let r=n.displayName??void 0,i=n.email??void 0,o=n.phoneNumber??void 0,l=n.photoURL??void 0,v=n.tenantId??void 0,I=n._redirectEventId??void 0,P=n.createdAt??void 0,D=n.lastLoginAt??void 0,{uid:V,emailVerified:C,isAnonymous:F,providerData:Y,stsTokenManager:J}=n;$(V&&J,e,"internal-error");let X=St.fromJSON(this.name,J);$(typeof V=="string",e,"internal-error"),ze(r,e.name),ze(i,e.name),$(typeof C=="boolean",e,"internal-error"),$(typeof F=="boolean",e,"internal-error"),ze(o,e.name),ze(l,e.name),ze(v,e.name),ze(I,e.name),ze(P,e.name),ze(D,e.name);let ee=new t({uid:V,auth:e,email:i,emailVerified:C,displayName:r,isAnonymous:F,photoURL:l,phoneNumber:o,tenantId:v,stsTokenManager:X,createdAt:P,lastLoginAt:D});return Y&&Array.isArray(Y)&&(ee.providerData=Y.map(ie=>ae({},ie))),I&&(ee._redirectEventId=I),ee}static _fromIdTokenResponse(e,n,r=!1){return w(this,null,function*(){let i=new St;i.updateFromServerResponse(n);let o=new t({uid:n.localId,auth:e,stsTokenManager:i,isAnonymous:r});return yield Qt(o),o})}static _fromGetAccountInfoResponse(e,n,r){return w(this,null,function*(){let i=n.users[0];$(i.localId!==void 0,"internal-error");let o=i.providerUserInfo!==void 0?hs(i.providerUserInfo):[],l=!(i.email&&i.passwordHash)&&!o?.length,v=new St;v.updateFromIdToken(r);let I=new t({uid:i.localId,auth:e,stsTokenManager:v,isAnonymous:l}),P={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:o,metadata:new Ct(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!o?.length};return Object.assign(I,P),I})}};var $i=new Map;function Me(t){Ge(t instanceof Function,"Expected a class definition");let e=$i.get(t);return e?(Ge(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,$i.set(t,e),e)}var fc=(()=>{class t{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return w(this,null,function*(){return!0})}_set(n,r){return w(this,null,function*(){this.storage[n]=r})}_get(n){return w(this,null,function*(){let r=this.storage[n];return r===void 0?null:r})}_remove(n){return w(this,null,function*(){delete this.storage[n]})}_addListener(n,r){}_removeListener(n,r){}}return t.type="NONE",t})(),tr=fc;function jt(t,e,n){return`firebase:${t}:${e}:${n}`}var Zt=class t{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;let{config:i,name:o}=this.auth;this.fullUserKey=jt(this.userKey,i.apiKey,o),this.fullPersistenceKey=jt("persistence",i.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}getCurrentUser(){return w(this,null,function*(){let e=yield this.persistence._get(this.fullUserKey);if(!e)return null;if(typeof e=="string"){let n=yield Xt(this.auth,{idToken:e}).catch(()=>{});return n?We._fromGetAccountInfoResponse(this.auth,n,e):null}return We._fromJSON(this.auth,e)})}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(e){return w(this,null,function*(){if(this.persistence===e)return;let n=yield this.getCurrentUser();if(yield this.removeCurrentUser(),this.persistence=e,n)return this.setCurrentUser(n)})}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(e,n,r="authUser"){return w(this,null,function*(){if(!n.length)return new t(Me(tr),e,r);let i=(yield Promise.all(n.map(P=>w(null,null,function*(){if(yield P._isAvailable())return P})))).filter(P=>P),o=i[0]||Me(tr),l=jt(r,e.config.apiKey,e.name),v=null;for(let P of n)try{let D=yield P._get(l);if(D){let V;if(typeof D=="string"){let C=yield Xt(e,{idToken:D}).catch(()=>{});if(!C)break;V=yield We._fromGetAccountInfoResponse(e,C,D)}else V=We._fromJSON(e,D);P!==o&&(v=V),o=P;break}}catch{}let I=i.filter(P=>P._shouldAllowMigration);return!o._shouldAllowMigration||!I.length?new t(o,e,r):(o=I[0],v&&(yield o._set(l,v.toJSON())),yield Promise.all(n.map(P=>w(null,null,function*(){if(P!==o)try{yield P._remove(l)}catch{}}))),new t(o,e,r))})}};function ji(t){let e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(ms(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(fs(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(ys(e))return"Blackberry";if(vs(e))return"Webos";if(ps(e))return"Safari";if((e.includes("chrome/")||gs(e))&&!e.includes("edge/"))return"Chrome";if(_s(e))return"Android";{let n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=t.match(n);if(r?.length===2)return r[1]}return"Other"}function fs(t=ge()){return/firefox\//i.test(t)}function ps(t=ge()){let e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function gs(t=ge()){return/crios\//i.test(t)}function ms(t=ge()){return/iemobile/i.test(t)}
28function _s(t=ge()){return/android/i.test(t)}function ys(t=ge()){return/blackberry/i.test(t)}function vs(t=ge()){return/webos/i.test(t)}function _r(t=ge()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function pc(t=ge()){return _r(t)&&!!window.navigator?.standalone}function gc(){return oi()&&document.documentMode===10}function ws(t=ge()){return _r(t)||_s(t)||vs(t)||ys(t)||/windows phone/i.test(t)||ms(t)}function Is(t,e=[]){let n;switch(t){case"Browser":n=ji(ge());break;case"Worker":n=`${ji(ge())}-${t}`;break;default:n=t}let r=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${qe}/${r}`}var nr=class{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,n){let r=o=>new Promise((l,v)=>{try{let I=e(o);l(I)}catch(I){v(I)}});r.onAbort=n,this.queue.push(r);let i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}runMiddleware(e){return w(this,null,function*(){if(this.auth.currentUser===e)return;let n=[];try{for(let r of this.queue)yield r(e),r.onAbort&&n.push(r.onAbort)}catch(r){n.reverse();for(let i of n)try{i()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r?.message})}})}};function mc(n){return w(this,arguments,function*(t,e={}){return dt(t,"GET","/v2/passwordPolicy",cn(t,e))})}var _c=6,rr=class{constructor(e){let n=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=n.minPasswordLength??_c,n.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=n.maxPasswordLength),n.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=n.containsLowercaseCharacter),n.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=n.containsUppercaseCharacter),n.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=n.containsNumericCharacter),n.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=n.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=e.allowedNonAlphanumericCharacters?.join("")??"",this.forceUpgradeOnSignin=e.forceUpgradeOnSignin??!1,this.schemaVersion=e.schemaVersion}validatePassword(e){let n={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,n),this.validatePasswordCharacterOptions(e,n),n.isValid&&(n.isValid=n.meetsMinPasswordLength??!0),n.isValid&&(n.isValid=n.meetsMaxPasswordLength??!0),n.isValid&&(n.isValid=n.containsLowercaseLetter??!0),n.isValid&&(n.isValid=n.containsUppercaseLetter??!0),n.isValid&&(n.isValid=n.containsNumericCharacter??!0),n.isValid&&(n.isValid=n.containsNonAlphanumericCharacter??!0),n}validatePasswordLengthOptions(e,n){let r=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=e.length>=r),i&&(n.meetsMaxPasswordLength=e.length<=i)}validatePasswordCharacterOptions(e,n){this.updatePasswordCharacterOptionsStatuses(n,!1,
vendor: 11,622 bytes, line 28
28!1,!1,!1);let r;for(let i=0;i<e.length;i++)r=e.charAt(i),this.updatePasswordCharacterOptionsStatuses(n,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,n,r,i,o){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=o))}};var ir=class{constructor(e,n,r,i){this.app=e,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new en(this),this.idTokenSubscription=new en(this),this.beforeStateQueue=new nr(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=ss,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=i.sdkClientVersion,this._persistenceManagerAvailable=new Promise(o=>this._resolvePersistenceManagerAvailable=o)}_initializeWithPersistence(e,n){return n&&(this._popupRedirectResolver=Me(n)),this._initializationPromise=this.queue(()=>w(this,null,function*(){if(!this._deleted&&(this.persistenceManager=yield Zt.create(this,e),this._resolvePersistenceManagerAvailable?.(),!this._deleted)){if(this._popupRedirectResolver?._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch{}yield this.initializeCurrentUser(n),this.lastNotifiedUid=this.currentUser?.uid||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return w(this,null,function*(){if(this._deleted)return;let e=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(e,!0)}})}initializeCurrentUserFromIdToken(e){return w(this,null,function*(){try{let n=yield Xt(this,{idToken:e}),r=yield We._fromGetAccountInfoResponse(this,n,e);yield this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(e){return w(this,null,function*(){if(we(this.app)){let o=this.app.settings.authIdToken;return o?new Promise(l=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(o).then(l,l))}):this.directlySetCurrentUser(null)}let n=yield this.assertedPersistence.getCurrentUser(),r=n,i=!1;if(e&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();let o=this.redirectUser?._redirectEventId,l=r?._redirectEventId,v=yield this.tryRedirectSignIn(e);(!o||o===l)&&v?.user&&(r=v.user,i=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(i)try{yield this.beforeStateQueue.runMiddleware(r)}catch(o){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return $(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)})}tryRedirectSignIn(e){return w(this,null,function*(){let n=null;try{n=yield this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{yield this._setRedirectUser(null)}return n})}reloadAndSetCurrentUserOrClear(e){return w(this,null,function*(){try{yield Qt(e)}catch(n){if(n?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)})}useDeviceLanguage(){this.languageCode=ic()}_delete(){return w(this,null,function*(){this._deleted=!0})}updateCurrentUser(e){return w(this,null,function*(){if(we(this.app))return Promise.reject($e(this));let n=e?Ie(e):null;return n&&$(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))})}_updateCurrentUser(e,n=!1){return w(this,null,function*(){if(!this._deleted)return e&&$(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),n||(yield this.beforeStateQueue.runMiddleware(e)),this.queue(()=>w(this,null,function*(){yield this.directlySetCurrentUser(e),this.notifyAuthListeners()}))})}signOut(){return w(this,null,function*(){return we(this.app)?Promise.reject($e(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(e){return we(this.app)?Promise.reject($e(this)):this.queue(()=>w(this,null,function*(){yield this.assertedPersistence.setPersistence(Me(e))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(e){return w(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());let n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(e)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return w(this,null,function*(){let e=yield mc(this),n=new rr(e);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n})}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new Ne("auth","Firebase",e())}onAuthStateChanged(e,n,r){return this.registerStateListener(this.authStateSubscription,e,n,r)}beforeAuthStateChanged(e,n){return this.beforeStateQueue.pushCallback(e,n)}onIdTokenChanged(e,n,r){return this.registerStateListener(this.idTokenSubscription,e,n,r)}authStateReady(){return new Promise((e,n)=>{if(this.currentUser)e();else{let r=this.onAuthStateChanged(()=>{r(),e()},n)}})}revokeAccessToken(e){return w(this,null,function*(){if(this.currentUser){let n=yield this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),yield hc(this,r)}})}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}_setRedirectUser(e,n){return w(this,null,function*(){let r=yield this.getOrInitRedirectPersistenceManager(n);return e===null?r.removeCurrentUser():r.setCurrentUser(e)})}getOrInitRedirectPersistenceManager(e){return w(this,null,function*(){if(!this.redirectPersistenceManager){let n=e&&Me(e)||this._popupRedirectResolver;$(n,this,"argument-error"),this.redirectPersistenceManager=yield Zt.create(this,[Me(n._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(e){return w(this,null,function*(){return this._isInitialized&&(yield this.queue(()=>w(this,null,function*(){}))),this._currentUser?._redirectEventId===e?this._currentUser:this.redirectUser?._redirectEventId===e?this.redirectUser:null})}_persistUserIfCurrent(e){return w(this,null,function*(){if(e===this.currentUser)return this.queue(()=>w(this,null,function*(){return this.directlySetCurrentUser(e)}))})}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let e=this.currentUser?.uid??null;this.lastNotifiedUid!==e&&(this.lastNotifiedUid=e,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,n,r,i){if(this._deleted)return()=>{};let o=typeof n=="function"?n:n.next.bind(n),l=!1,v=this._isInitialized?Promise.resolve():this._initializationPromise;if($(v,this,"internal-error"),v.then(()=>{l||o(this.currentUser)}),typeof n=="function"){let I=e.addObserver(n,r,i);return()=>{l=!0,I()}}else{let I=e.addObserver(n);return()=>{l=!0,I()}}}directlySetCurrentUser(e){return w(this,null,function*(){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?yield this.assertedPersistence.setCurrentUser(e):yield this.assertedPersistence.removeCurrentUser()})}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return $(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Is(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return w(this,null,function*(){let e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId);let n=yield this.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader();n&&(e["X-Firebase-Client"]=n);let r=yield this._getAppCheckToken();return r&&(e["X-Firebase-AppCheck"]=r),e})}_getAppCheckToken(){return w(this,null,function*(){if(we(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let e=yield this.appCheckServiceProvider.getImmediate({optional:!0})?.getToken();return e?.error&&tc(`Error while retrieving App Check token: ${e.error}`),e?.token})}};function un(t){return Ie(t)}var en=class{constructor(e){this.auth=e,this.observer=null,this.addObserver=li(n=>this.observer=n)}get next(){return $(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}};var yr={loadJS(){return w(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function yc(t){yr=t}function vc(t){return yr.loadJS(t)}function wc(){return yr.gapiScript}function bs(t){return`__${t}${Math.floor(Math.random()*1e6)}`}function Es(t,e){let n=vt(t,"auth");if(n.isInitialized()){let i=n.getImmediate(),o=n.getOptions();if(Be(o,e??{}))return i;je(i,"already-initialized")}return n.initialize({options:e})}function Ic(t,e){let n=e?.persistence||[],r=(Array.isArray(n)?n:[n]).map(Me);e?.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(r,e?.popupRedirectResolver)}function Ts(t,e,n){let r=un(t);
28$(/^https?:\/\//.test(e),r,"invalid-emulator-scheme");let i=!!n?.disableWarnings,o=Ss(e),{host:l,port:v}=bc(e),I=v===null?"":`:${v}`,P={url:`${o}//${l}${I}/`},D=Object.freeze({host:l,port:v,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:i})});if(!r._canInitEmulator){$(r.config.emulator&&r.emulatorConfig,r,"emulator-config-failed"),$(Be(P,r.config.emulator)&&Be(D,r.emulatorConfig),r,"emulator-config-failed");return}r.config.emulator=P,r.emulatorConfig=D,r.settings.appVerificationDisabledForTesting=!0,Fe(l)?(Mt(`${o}//${l}${I}`),xt("Auth",!0)):i||Ec()}function Ss(t){let e=t.indexOf(":");return e<0?"":t.substr(0,e+1)}function bc(t){let e=Ss(t),n=/(\/\/)?([^?#/]+)/.exec(t.substr(e.length));if(!n)return{host:"",port:null};let r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){let o=i[1];return{host:o,port:Gi(r.substr(o.length+1))}}else{let[o,l]=r.split(":");return{host:o,port:Gi(l)}}}function Gi(t){if(!t)return null;let e=Number(t);return isNaN(e)?null:e}function Ec(){function t(){let e=d
28ocument.createElement("p"),n=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",t):t())}var tn=class{constructor(e,n){this.providerId=e,this.signInMethod=n}toJSON(){return Le("not implemented")}_getIdTokenResponse(e){return Le("not implemented")}_linkToIdToken(e,n){return Le("not implemented")}_getReauthenticationResolver(e){return Le("not implemented")}};function Jn(t,e){return w(this,null,function*(){return cs(t,"POST","/v1/accounts:signInWithIdp",cn(t,e))})}var nn=class{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}};var sr=class extends nn{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}};function Tc(t,e){return w(this,null,function*(){return cs(t,"POST","/v1/accounts:signUp",cn(t,e))})}var rt=class t{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static _fromIdTokenResponse(e,n,r,i=!1){return w(this,null,function*(){let o=yield We._fromIdTokenResponse(e,r,i),l=Ki(r);return new t({user:o,providerId:l,_tokenResponse:r,operationType:n})})}static _forOperation(e,n,r){return w(this,null,function*(){yield e._updateTokensIfNecessary(r,!0);let i=Ki(r);return new t({user:e,providerId:i,_tokenResponse:r,operationType:n})})}};function Ki(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}function vr(t){return w(this,null,function*(){if(we(t.app))return Promise.reject($e(t));let e=un(t);if(yield e._initializationPromise,e.currentUser?.isAnonymous)return new rt({user:e.currentUser,providerId:null,operationType:"signIn"});let n=yield Tc(e,{returnSecureToken:!0}),r=yield rt._fromIdTokenResponse(e,"signIn",n,!0);return yield e._updateCurrentUser(r.user),r})}var or=class t extends ve{constructor(e,n,r,i){super(n.code,n.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,t.prototype),this.customData={appName:e.name,tenantId:e.tenantId??void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,n,r,i){return new t(e,n,r,i)}};function As(t,e,n,r){return(e==="reauthenticate"?n._getReauthenticationResolver(t):n._getIdTokenResponse(t)).catch(o=>{throw o.code==="auth/multi-factor-auth-required"?or._fromErrorAndOperation(t,o,e,r):o})}function Sc(t,e,n=!1){return w(this,null,function*(){let r=yield At(t,e._linkToIdToken(t.auth,yield t.getIdToken()),n);return rt._forOperation(t,"link",r)})}function Ac(t,e,n=!1){return w(this,null,function*(){let{auth:r}=t;if(we(r.app))return Promise.reject($e(r));let i="reauthenticate";try{let o=yield At(t,As(r,i,e,t),n);$(o.idToken,r,"internal-error");let l=mr(o.idToken);$(l,r,"internal-error");let{sub:v}=l;return $(t.uid===v,r,"user-mismatch"),rt._forOperation(t,i,o)}catch(o){throw o?.code==="auth/user-not-found"&&je(r,"user-mismatch"),o}})}function Cc(t,e,n=!1){return w(this,null,function*(){if(we(t.app))return Promise.reject($e(t));let r="signIn",i=yield As(t,r,e),o=yield rt._fromIdTokenResponse(t,r,i);return n||(yield t._updateCurrentUser(o.user)),o})}function Cs(t,e,n,r){return Ie(t).onIdTokenChanged(e,n,r)}function Rs(t,e,n){return Ie(t).beforeAuthStateChanged(e,n)}var rn="__sak";var sn=class{constructor(e,n){this.storageRetriever=e,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(rn,"1"),this.storage.removeItem(rn),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,n){return this.storage.setItem(e,JSON.stringify(n)),Promise.resolve()}_get(e){let n=this.storage.getItem(e);return Promise.resolve(n?JSON.parse(n):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}};var Rc=1e3,kc=10,Pc=(()=>{class t extends sn{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(n,r)=>this.onStorageEvent(n,r),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=ws(),this._shouldAllowMigration=!0}forAllChangedKeys(n){for(let r of Object.keys(this.listeners)){let i=this.storage.getItem(r),o=this.localCache[r];i!==o&&n(r,o,i)}}onStorageEvent(n,r=!1){if(!n.key){this.forAllChangedKeys((v,I,P)=>{this.notifyListeners(v,P)});return}let i=n.key;r?this.detachListener():this.stopPolling();let o=()=>{let v=this.storage.getItem(i);!r&&this.localCache[i]===v||this.notifyListeners(i,v)},l=this.storage.getItem(i);gc()&&l!==n.newValue&&n.newValue!==n.oldValue?setTimeout(o,kc):o()}notifyListeners(n,r){this.localCache[n]=r;let i=this.listeners[n];
vendor: 10,198 bytes, line 28
28if(i)for(let o of Array.from(i))o(r&&JSON.parse(r))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((n,r,i)=>{this.onStorageEvent(new StorageEvent("storage",{key:n,oldValue:r,newValue:i}),!0)})},Rc)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(n,r){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[n]||(this.listeners[n]=new Set,this.localCache[n]=this.storage.getItem(n)),this.listeners[n].add(r)}_removeListener(n,r){this.listeners[n]&&(this.listeners[n].delete(r),this.listeners[n].size===0&&delete this.listeners[n]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}_set(n,r){return w(this,null,function*(){yield Ze(t.prototype,this,"_set").call(this,n,r),this.localCache[n]=JSON.stringify(r)})}_get(n){return w(this,null,function*(){let r=yield Ze(t.prototype,this,"_get").call(this,n);return this.localCache[n]=JSON.stringify(r),r})}_remove(n){return w(this,null,function*(){yield Ze(t.prototype,this,"_remove").call(this,n),delete this.localCache[n]})}}return t.type="LOCAL",t})(),ks=Pc;var Oc=(()=>{class t extends sn{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(n,r){}_removeListener(n,r){}}return t.type="SESSION",t})(),wr=Oc;function Nc(t){return Promise.all(t.map(e=>w(null,null,function*(){try{return{fulfilled:!0,value:yield e}}catch(n){return{fulfilled:!1,reason:n}}})))}var Dc=(()=>{class t{constructor(n){this.eventTarget=n,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(n){let r=this.receivers.find(o=>o.isListeningto(n));if(r)return r;let i=new t(n);return this.receivers.push(i),i}isListeningto(n){return this.eventTarget===n}handleEvent(n){return w(this,null,function*(){let r=n,{eventId:i,eventType:o,data:l}=r.data,v=this.handlersMap[o];if(!v?.size)return;r.ports[0].postMessage({status:"ack",eventId:i,eventType:o});let I=Array.from(v).map(D=>w(this,null,function*(){return D(r.origin,l)})),P=yield Nc(I);r.ports[0].postMessage({status:"done",eventId:i,eventType:o,response:P})})}_subscribe(n,r){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[n]||(this.handlersMap[n]=new Set),this.handlersMap[n].add(r)}_unsubscribe(n,r){this.handlersMap[n]&&r&&this.handlersMap[n].delete(r),(!r||this.handlersMap[n].size===0)&&delete this.handlersMap[n],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}t.receivers=[];return t})();function Ps(t="",e=10){let n="";for(let r=0;r<e;r++)n+=Math.floor(Math.random()*10);return t+n}var ar=class{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}_send(e,n,r=50){return w(this,null,function*(){let i=typeof MessageChannel<"u"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let o,l;return new Promise((v,I)=>{let P=Ps("",20);i.port1.start();let D=setTimeout(()=>{I(new Error("unsupported_event"))},r);l={messageChannel:i,onMessage(V){let C=V;if(C.data.eventId===P)switch(C.data.status){case"ack":clearTimeout(D),o=setTimeout(()=>{I(new Error("timeout"))},3e3);break;case"done":clearTimeout(o),v(C.data.response);break;default:clearTimeout(D),clearTimeout(o),I(new Error("invalid_response"));break}}},this.handlers.add(l),i.port1.addEventListener("message",l.onMessage),this.target.postMessage({eventType:e,eventId:P,data:n},[i.port2])}).finally(()=>{l&&this.removeMessageHandler(l)})})}};function Re(){return window}function Lc(t){Re().location.href=t}function Os(){return typeof Re().WorkerGlobalScope<"u"&&typeof Re().importScripts=="function"}function Mc(){return w(this,null,function*(){if(!navigator?.serviceWorker)return null;try{return(yield navigator.serviceWorker.ready).active}catch{return null}})}function xc(){return navigator?.serviceWorker?.controller||null}function Uc(){return Os()?self:null}var Ns="firebaseLocalStorageDb",Fc=1,on="firebaseLocalStorage",Ds="fbase_key",it=class{constructor(e){this.request=e}toPromise(){return new Promise((e,n)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}};function ln(t,e){return t.transaction([on],e?"readwrite":"readonly").objectStore(on)}function Bc(){let t=indexedDB.deleteDatabase(Ns);return new it(t).toPromise()}function cr(){let t=indexedDB.open(Ns,Fc);return new Promise((e,n)=>{t.addEventListener("error",()=>{n(t.error)}),t.addEventListener("upgradeneeded",()=>{let r=t.result;try{r.createObjectStore(on,{keyPath:Ds})}catch(i){n(i)}}),t.addEventListener("success",()=>w(null,null,function*(){let r=t.result;r.objectStoreNames.contains(on)?e(r):(r.close(),yield Bc(),e(yield cr()))}))})}function Yi(t,e,n){return w(this,null,function*(){let r=ln(t,!0).put({[Ds]:e,value:n});return new it(r).toPromise()})}function Vc(t,e){return w(this,null,function*(){let n=ln(t,!1).get(e),r=yield new it(n).toPromise();return r===void 0?null:r.value})}function Ji(t,e){let n=ln(t,!0).delete(e);return new it(n).toPromise()}var Hc=800,qc=3,zc=(()=>{class t{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}_openDb(){return w(this,null,function*(){return this.db?this.db:(this.db=yield cr(),this.db)})}_withRetries(n){return w(this,null,function*(){let r=0;for(;;)try{let i=yield this._openDb();return yield n(i)}catch(i){if(r++>qc)throw i;this.db&&(this.db.close(),this.db=void 0)}})}initializeServiceWorkerMessaging(){return w(this,null,function*(){return Os()?this.initializeReceiver():this.initializeSender()})}initializeReceiver(){return w(this,null,function*(){this.receiver=Dc._getInstance(Uc()),this.receiver._subscribe("keyChanged",(n,r)=>w(this,null,function*(){return{keyProcessed:(yield this._poll()).includes(r.key)}})),this.receiver._subscribe("ping",(n,r)=>w(this,null,function*(){return["keyChanged"]}))})}initializeSender(){return w(this,null,function*(){if(this.activeServiceWorker=yield Mc(),!this.activeServiceWorker)return;this.sender=new ar(this.activeServiceWorker);let n=yield this.sender._send("ping",{},800);n&&n[0]?.fulfilled&&n[0]?.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)})}notifyServiceWorker(n){return w(this,null,function*(){if(!(!this.sender||!this.activeServiceWorker||xc()!==this.activeServiceWorker))try{yield this.sender._send("keyChanged",{key:n},this.serviceWorkerReceiverAvailable?800:50)}catch{}})}_isAvailable(){return w(this,null,function*(){try{if(!indexedDB)return!1;let n=yield cr();return yield Yi(n,rn,"1"),yield Ji(n,rn),!0}catch{}return!1})}_withPendingWrite(n){return w(this,null,function*(){this.pendingWrites++;try{yield n()}finally{this.pendingWrites--}})}_set(n,r){return w(this,null,function*(){return this._withPendingWrite(()=>w(this,null,function*(){return yield this._withRetries(i=>Yi(i,n,r)),this.localCache[n]=r,this.notifyServiceWorker(n)}))})}_get(n){return w(this,null,function*(){let r=yield this._withRetries(i=>Vc(i,n));return this.localCache[n]=r,r})}_remove(n){return w(this,null,function*(){return this._withPendingWrite(()=>w(this,null,function*(){return yield this._withRetries(r=>Ji(r,n)),delete this.localCache[n],this.notifyServiceWorker(n)}))})}_poll(){return w(this,null,function*(){let n=yield this._withRetries(o=>{let l=ln(o,!1).getAll();return new it(l).toPromise()});if(!n)return[];if(this.pendingWrites!==0)return[];let r=[],i=new Set;if(n.length!==0)for(let{fbase_key:o,value:l}of n)i.add(o),JSON.stringify(this.localCache[o])!==JSON.stringify(l)&&(this.notifyListeners(o,l),r.push(o));for(let o of Object.keys(this.localCache))this.localCache[o]&&!i.has(o)&&(this.notifyListeners(o,null),r.push(o));return r})}notifyListeners(n,r){this.localCache[n]=r;let i=this.listeners[n];if(i)for(let o of Array.from(i))o(r)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>w(this,null,function*(){return this._poll()}),Hc)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(n,r){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[n]||(this.listeners[n]=new Set,this._get(n)),this.listeners[n].add(r)}_removeListener(n,r){this.listeners[n]&&(this.listeners[n].delete(r),this.listeners[n].size===0&&delete this.listeners[n]),Object.keys(this.listeners).length===0&&this.stopPolling()}}return t.type="LOCAL",t})(),Ls=zc;var El=bs("rcb"),Tl=new nt(3e4,6e4);function Wc(t,e){return e?Me(e):($(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}var Rt=class extends tn{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return Jn(e,this._buildIdpRequest())}_linkToIdToken(e,n){return Jn(e,this._buildIdpRequest(n))}_getReauthenticationResolver(e){return Jn(e,this._buildIdpRequest())}_buildIdpRequest(e){let n={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(n.idToken=e),n}};function $c(t){return Cc(t.auth,new Rt(t),t.bypassAuthState)}function jc(t){let{auth:e,user:n}=t;return $(n,e,"internal-error"),Ac(n,new Rt(t),t.bypassAuthState)}function Gc(t){return w(this,null,function*(){let{auth:e,user:n}=t;return $(n,e,"internal-error"),Sc(n,new Rt(t),t.bypassAuthState)})}var ur=class{constructor(e,n,r,i,o=!1){this.auth=e,this.resolver=r,this.user=i,this.bypassAuthState=o,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}
28execute(){return new Promise((e,n)=>w(this,null,function*(){this.pendingPromise={resolve:e,reject:n};try{this.eventManager=yield this.resolver._initialize(this.auth),yield this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}}))}onAuthEvent(e){return w(this,null,function*(){let{urlResponse:n,sessionId:r,postBody:i,tenantId:o,error:l,type:v}=e;if(l){this.reject(l);return}let I={auth:this.auth,requestUri:n,sessionId:r,tenantId:o||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(yield this.getIdpTask(v)(I))}catch(P){this.reject(P)}})}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return $c;case"linkViaPopup":case"linkViaRedirect":return Gc;case"reauthViaPopup":case"reauthViaRedirect":return jc;default:je(this.auth,"internal-error")}}resolve(e){Ge(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){Ge(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}};var Sl=new nt(2e3,1e4);var Kc="pendingRedirect",Gt=new Map,lr=class t extends ur{constructor(e,n,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}execute(){return w(this,null,function*(){let e=Gt.get(this.auth._key());if(!e){try{let r=(yield Yc(this.resolver,this.auth))?yield Ze(t.prototype,this,"execute").call(this):null;e=()=>Promise.resolve(r)}catch(n){e=()=>Promise.reject(n)}Gt.set(this.auth._key(),e)}return this.bypassAuthState||Gt.set(this.auth._key(),()=>Promise.resolve(null)),e()})}onAuthEvent(e){return w(this,null,function*(){if(e.type==="signInViaRedirect")return Ze(t.prototype,this,"onAuthEvent").call(this,e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){let n=yield this.auth._redirectUserForId(e.eventId);if(n)return this.user=n,Ze(t.prototype,this,"onAuthEvent").call(this,e);this.resolve(null)}})}onExecution(){return w(this,null,function*(){})}cleanUp(){}};function Yc(t,e){return w(this,null,function*(){let n=Qc(e),r=Xc(t);if(!(yield r._isAvailable()))return!1;let i=(yield r._get(n))==="true";return yield r._remove(n),i})}function Jc(t,e){Gt.set(t._key(),e)}function Xc(t){return Me(t._redirectPersistence)}function Qc(t){return jt(Kc,t.config.apiKey,t.name)}function Zc(t,e,n=!1){return w(this,null,function*(){if(we(t.app))return Promise.reject($e(t));let r=un(t),i=Wc(r,e),l=yield new lr(r,i,n).execute();return l&&!n&&(delete l.user._redirectEventId,yield r._persistUserIfCurrent(l.user),yield r._setRedirectUser(null,e)),l})}var eu=600*1e3,dr=class{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(n=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!tu(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}sendToConsumer(e,n){if(e.error&&!Ms(e)){let r=e.error.code?.split("auth/")[1]||"internal-error";n.onError(tt(this.auth,r))}else n.onAuthEvent(e)}isEventForConsumer(e,n){let r=n.eventId===null||!!e.eventId&&e.eventId===n.eventId;return n.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=eu&&this.cachedEventUids.clear(),this.cachedEventUids.has(Xi(e))}saveEventToCache(e){this.cachedEventUids.add(Xi(e)),this.lastProcessedEventTime=Date.now()}};function Xi(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function Ms({type:t,error:e}){return t==="unknown"&&e?.code==="auth/no-auth-event"}function tu(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Ms(t);default:return!1}}function nu(n){return w(this,arguments,function*(t,e={}){return dt(t,"GET","/v1/projects",e)})}var ru=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,iu=/^https?/;function su(t){return w(this,null,function*(){if(t.config.emulator)return;let{authorizedDomains:e}=yield nu(t);for(let n of e)try{if(ou(n))return}catch{}je(t,"unauthorized-domain")})}function ou(t){let e=Qn(),{protocol:n,hostname:r}=new URL(e);if(t.startsWith("chrome-extension://")){let l=new URL(t);return l.hostname===""&&r===""?n==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):n==="chrome-extension:"&&l.hostname===r}if(!iu.test(n))return!1;if(ru.test(t))return r===t;let i=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}var au=new nt(3e4,6e4);function Qi(){let t=Re().___jsl;if(t?.H){for(let e of Object.keys(t.H))if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=[...t.H[e].L],t.CP)for(let n=0;n<t.CP.length;n++)t.CP[n]=null}}
28function cu(t){return new Promise((e,n)=>{function r(){Qi(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{Qi(),n(tt(t,"network-request-failed"))},timeout:au.get()})}if(Re().gapi?.iframes?.Iframe)e(gapi.iframes.getContext());else if(Re().gapi?.load)r();else{let i=bs("iframefcb");return Re()[i]=()=>{gapi.load?r():n(tt(t,"network-request-failed"))},vc(`${wc()}?onload=${i}`).catch(o=>n(o))}}).catch(e=>{throw Kt=null,e})}var Kt=null;function uu(t){return Kt=Kt||cu(t),Kt}var lu=new nt(5e3,15e3),du="__/auth/iframe",hu="emulator/auth/iframe",fu={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},pu=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function gu(t){let e=t.config;$(e.authDomain,t,"auth-domain-config-required");let n=e.emulator?gr(e,hu):`https://${t.config.authDomain}/${du}`,r={apiKey:e.apiKey,appName:t.name,v:qe},i=pu.get(t.config.apiHost);i&&(r.eid=i);let o=t._getFrameworks();return o.length&&(r.fw=o.join(",")),`${n}?${_t(r).slice(1)}`}function mu(t){return w(this,null,function*(){let e=yield uu(t),n=Re().gapi;return $(n,t,"internal-error"),e.open({where:document.body,url:gu(t),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:fu,dontclear:!0},r=>new Promise((i,o)=>w(null,null,function*(){yield r.restyle({setHideOnLeave:!1});let l=tt(t,"network-request-failed"),v=Re().setTimeout(()=>{o(l)},lu.get());function I(){Re().clearTimeout(v),i(r)}r.ping(I).then(I,()=>{o(l)})})))})}var _u={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},yu=500,vu=600,wu="_blank",Iu="http://localhost",an=class{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}};function bu(t,e,n,r=yu,i=vu){let o=Math.max((window.screen.availHeight-i)/2,0).toString(),l=Math.max((window.screen.availWidth-r)/2,0).toString(),v="",I=Ue(ae({},_u),{width:r.toString(),height:i.toString(),top:o,left:l}),P=ge().toLowerCase();n&&(v=gs(P)?wu:n),fs(P)&&(e=e||Iu,I.scrollbars="yes");let D=Object.entries(I).reduce((C,[F,Y])=>`${C}${F}=${Y},`,"");if(pc(P)&&v!=="_self")return Eu(e||"",v),new an(null);let V=window.open(e||"",v,D);$(V,t,"popup-blocked");try{V.focus()}catch{}return new an(V)}function Eu(t,e){let n=document.createElement("a");n.href=t,n.target=e;let r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}var Tu="__/auth/handler",Su="emulator/auth/handler",Au=encodeURIComponent("fac");function Zi(t,e,n,r,i,o){return w(this,null,function*(){$(t.config.authDomain,t,"auth-domain-config-required"),$(t.config.apiKey,t,"invalid-api-key");let l={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:qe,eventId:i};if(e instanceof nn){e.setDefaultLanguage(t.languageCode),l.providerId=e.providerId||"",ui(e.getCustomParameters())||(l.customParameters=JSON.stringify(e.getCustomParameters()));for(let[D,V]of Object.entries(o||{}))l[D]=V}if(e instanceof sr){let D=e.getScopes().filter(V=>V!=="");D.length>0&&(l.scopes=D.join(","))}t.tenantId&&(l.tid=t.tenantId);let v=l;for(let D of Object.keys(v))v[D]===void 0&&delete v[D];let I=yield t._getAppCheckToken(),P=I?`#${Au}=${encodeURIComponent(I)}`:"";return`${Cu(t)}?${_t(v).slice(1)}${P}`})}function Cu({config:t}){return t.emulator?gr(t,Su):`https://${t.authDomain}/${Tu}`}var Xn="webStorageSupport",hr=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=wr,this._completeRedirectFn=Zc,this._overrideRedirectResult=Jc}_openPopup(e,n,r,i){return w(this,null,function*(){Ge(this.eventManagers[e._key()]?.manager,"_initialize() not called before _openPopup()");let o=yield Zi(e,n,r,Qn(),i);return bu(e,o,Ps())})}_openRedirect(e,n,r,i){return w(this,null,function*(){yield this._originValidation(e);let o=yield Zi(e,n,r,Qn(),i);return Lc(o),new Promise(()=>{})})}_initialize(e){let n=e._key();if(this.eventManagers[n]){let{manager:i,promise:o}=this.eventManagers[n];return i?Promise.resolve(i):(Ge(o,"If manager is not set, promise should be"),o)}let r=this.initAndGetManager(e);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}initAndGetManager(e){return w(this,null,function*(){let n=yield mu(e),r=new dr(e);return n.register("authEvent",i=>
28($(i?.authEvent,e,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=n,r})}_isIframeWebStorageSupported(e,n){this.iframes[e._key()].send(Xn,{type:Xn},i=>{let o=i?.[0]?.[Xn];o!==void 0&&n(!!o),je(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=su(e)),this.originValidationPromises[n]}get _shouldInitProactively(){return ws()||ps()||_r()}},xs=hr;var es="@firebase/auth",ts="1.12.0";var fr=class{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){return this.assertAuthConfigured(),this.auth.currentUser?.uid||null}getToken(e){return w(this,null,function*(){return this.assertAuthConfigured(),yield this.auth._initializationPromise,this.auth.currentUser?{accessToken:yield this.auth.currentUser.getIdToken(e)}:null})}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let n=this.auth.onIdTokenChanged(r=>{e(r?.stsTokenManager.accessToken||null)});this.internalListeners.set(e,n),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let n=this.internalListeners.get(e);n&&(this.internalListeners.delete(e),n(),this.updateProactiveRefresh())}assertAuthConfigured(){$(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}};function Ru(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function ku(t){He(new be("auth",(e,{options:n})=>{let r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),o=e.getProvider("app-check-internal"),{apiKey:l,authDomain:v}=r.options;$(l&&!l.includes(":"),"invalid-api-key",{appName:r.name});let I={apiKey:l,authDomain:v,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Is(t)},P=new ir(r,i,o,I);return Ic(P,n),P},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,r)=>{e.getProvider("auth-internal").initialize()})),He(new be("auth-internal",e=>{let n=un(e.getProvider("auth").getImmediate());return(r=>new fr(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),Te(es,ts,Ru(t)),Te(es,ts,"esm2020")}var Pu=300,Ou=Rn("authIdTokenMaxAge")||Pu,ns=null,Nu=t=>e=>w(null,null,function*(){let n=e&&(yield e.getIdTokenResult()),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>Ou)return;let i=n?.token;ns!==i&&(ns=i,yield fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))});function Ir(t=Bt()){let e=vt(t,"auth");if(e.isInitialized())return e.getImmediate();let n=Es(t,{popupRedirectResolver:xs,persistence:[Ls,ks,wr]}),r=Rn("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){let o=new URL(r,location.origin);if(location.origin===o.origin){let l=Nu(o.toString());Rs(n,l,()=>l(n.currentUser)),Cs(n,v=>l(v))}}let i=An("auth");return i&&Ts(n,`http://${i}`),n}function Du(){return document.getElementsByTagName("head")?.[0]??document}yc({loadJS(t){return new Promise((e,n)=>{let r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{let o=tt("internal-error");o.customData=i,n(o)},r.type="text/javascript",r.charset="UTF-8",Du().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});ku("Browser");var Lu=["qrCodeContainerCanvas"],Mu=["displayLog"];function xu(t,e){if(t&1){let n=Ar();Ae(0,"form",10)(1,"h3",11),pt(2,"Bulk generate/download"),Oe(),mn(3,"app-text-input",12),Ae(4,"app-submit-btn",13),Cr("click",function(){br(n);let i=Ot();return Er(i.bulkGenerate())}),Oe()()}if(t&2){let n=Ot();Rr("disabled",n.loadingMultiple||n.loadingMultiple),ot("formGroup",n.formMultiple)}}function Uu(t,e){if(t&1&&(Ae(0,"a",14),pt(1,"Download CSV file"),Oe()),t&2){let n=Ot();ot("href",n.csvDowloadLink,Tr)}}function Fu(t,e){if(t&1&&(Ae(0,"p"),pt(1),Oe()),t&2){let n=e.$implicit;ft(),kr(n)}}var Bu={width:1200,height:1200,data:"https://buk.app/",margin:0,qrOptions:{typeNumber:"0",mode:"Byte",errorCorrectionLevel:"Q"}
28,imageOptions:{hideBackgroundDots:!1,imageSize:0,margin:0},dotsOptions:{type:"dots",color:"#5055b7",gradient:null},backgroundOptions:{color:"#ffffff"},dotsOptionsHelper:{colorType:{single:!0,gradient:!1},gradient:{linear:!0,radial:!1,color1:"#6a1a4c",color2:"#6a1a4c",rotation:"0"}},cornersSquareOptions:{type:"square",color:"#5055b7"},cornersSquareOptionsHelper:{colorType:{single:!0,gradient:!1},gradient:{linear:!0,radial:!1,color1:"#000000",color2:"#000000",rotation:"0"}},cornersDotOptions:{type:"square",color:"#5053b7"},cornersDotOptionsHelper:{colorType:{single:!0,gradient:!1},gradient:{linear:!0,radial:!1,color1:"#000000",color2:"#000000",rotation:"0"}},backgroundOptionsHelper:{colorType:{single:!0,gradient:!1},gradient:{linear:!0,radial:!1,color1:"#ffffff",color2:"#ffffff",rotation:"0"}}},vh=(()=>{let e=class e{constructor(r,i,o,l,v){this.fb=r,this.adminService=i,this.sanitizer=o,this.toolsService=l,this.intlService=v,this.URL="https://image-uploader-service.firebaseapp.com/upload/qr",this.loading=!1,this.loadingMultiple=!1,this.jsonForCsv=[],this.log=["Generating template"]}ngAfterViewInit(){Fn(Dr.firebase);let r=Ir();vr(r).then(()=>{this.loadTemplateImage()})}loadTemplateImage(){let l=this.qrCodeContainerCanvas.nativeElement,v=l.getContext("2d");l.width=2250,l.height=2250;let I=new Image;I.src="./assets/admin/buk-qr-template2.png",I.onload=()=>{v.drawImage(I,763/2,10,1487,2230),this.addToLog("Generated template"),this.generateForm()}}generateForm(){this.form=this.fb.group({merchantSlug:["",[wn.required]]}),this.formMultiple=this.fb.group({merchantSlugs:["",[wn.required]]})}generateSingle(){if(this.singleFileUrl=null,this.form.invalid)return;this.loading=!0;let r=this.form.get("merchantSlug").value;this.generateQRcode(r,i=>{this.singleFileUrl=i,this.loading=!1})}generateQRcode(r,i){this.addToLog("Generating QR code for merchant: "+r),this.adminService.getMerchantBySlug(r).subscribe(o=>{let l="https://"+this.intlService.getHost()+"/qr/"+o.uuid+"?utm_source=qr_code&utm_medium=site&utm_campaign=qr_code";this.addToLog("Generating qrCodeUrl: "+l),this.qrCode=new Us.default(Ue(ae({},Bu),{data:l}));let v=this.qrCodeContainerCanvas.nativeElement;this.qrCode.getRawData("png").then(I=>{let P=v.getContext("2d"),D=new Image;D.src=URL.createObjectURL(I),D.onload=()=>{P.drawImage(D,600,675,1050,1050),this.addToLog("Uploading QR code to firebase: "+o.slug);let C=qi(),F=Hi(C,"qr-codes/"+o.slug+".png"),J=this.qrCodeContainerCanvas.nativeElement.toDataURL(),X=this.dataURItoBlob(J);Bi(F,X).then(ee=>{Vi(ee.ref).then(ie=>{this.addToLog("File uploaded to firebase: "+ie),i(ie,o)})}).catch(ee=>{this.addToLog("ERROR!!! Uploading QR code to firebase: "+o.slug+ee),i("error")})}})})}bulkGenerate(){if(this.formMultiple.invalid)return;this.loadingMultiple=!0,this.csvDowloadLink=null,this.jsonForCsv=[];let r=this.formMultiple.get("merchantSlugs").value.split(",").map(o=>o.trim());this.recursiveBulkGenerate(r,0)}recursiveBulkGenerate(r,i){if(i>=r.length){this.generateCsvFile();return}this.generateQRcode(r[i],(o,l)=>{this.addToCsv(r[i],o,l),i++,this.recursiveBulkGenerate(r,i)})}addToCsv(r,i,o){let l=o.slug,v=o.name,I="https://firebasestorage.googleapis.com/v0/b/buk-pt.appspot.com/o/qr-codes%2Fslip%2Fbuk_insert.png?alt=media&token=e62d60eb-fe20-42e4-a302-59bb6f36b5a2",P=o.stores.filter(F=>F.status==="open")?.length||1,D=o.address,V=o.stores?.find(F=>F.googlePlaceAddress);V&&(D=V.googlePlaceAddress);let C=this.toolsService.addressStringToAddressComponents(D);this.jsonForCsv.push({"Order ID":l,Shipping:"BUDGET",Sku:"GLOBAL-STI-5_5X5_5-G",Quantity:P,fileurl:i,"Packing Slip":I,"Recipient Name":v,"Address 1":C?.street||"","Address 2":" ",Town:C?.city||" ","State/County":C?.city||" ","Country Code":"PT",Postcode:C?.postalCode||" "})}generateCsvFile(){this.addToLog("Generating final CSV file");let r=this.convertToCSV(this.jsonForCsv),i=new Blob([r],{type:"text/csv"}),o=window.URL.createObjectURL(i);this.csvDowloadLink=this.sanitizer.bypassSecurityTrustResourceUrl(o),this.loadingMultiple=!1}dataURItoBlob(r){let i=atob(r.split(",")[1]),o=r.split(",")[0].split(":")[1].split(";")[0],l=new ArrayBuffer(i.length),v=new DataView(l);for(let I=0;I<i.length;
28I++)v.setUint8(I,i.charCodeAt(I));return new Blob([l],{type:o})}convertToCSV(r){let i=typeof r!="object"?JSON.parse(r):r,o="",l="";for(let v in r[0])l+=v+",";l=l.slice(0,-1),o+=l+`\r
29`;for(let v=0;v<i.length;v++){let I="";for(let P in i[v])I!==""&&(I+=","),I+=i[v][P];o+=I+`\r
30`}return o}addToLog(r){this.log.push(r),setTimeout(()=>{this.displayLog.nativeElement.scrollTop=this.displayLog.nativeElement.scrollHeight},100)}};e.\u0275fac=function(i){return new(i||e)(st(Br),st(jr),st(Nr),st(zr),st(qr))},e.\u0275cmp=Sr({type:e,selectors:[["app-qrcode-generator"]],viewQuery:function(i,o){if(i&1&&(_n(Lu,5),_n(Mu,5)),i&2){let l;yn(l=vn())&&(o.qrCodeContainerCanvas=l.first),yn(l=vn())&&(o.displayLog=l.first)}},decls:13,vars:3,consts:[["displayLog",""],["qrCodeContainerCanvas",""],[1,"row"],[1,"col-7"],["class","mb-4",3,"formGroup","disabled",4,"ngIf"],[3,"href",4,"ngIf"],[1,"display-log"],[4,"ngFor","ngForOf"],[1,"col-5"],["id","qr-code"],[1,"mb-4",3,"formGroup"],[1,"mt-4"],["formControlName","merchantSlugs","label","Merchant slugs (comma separated)"],["type","button","btnCopy","Upload and Generate CSV",3,"click"],[3,"href"]],template:function(i,o){i&1&&(Ae(0,"div",2)(1,"div",3),Pt(2,xu,5,3,"form",4),Ae(3,"p"),Pt(4,Uu,2,1,"a",5),Oe(),Ae(5,"div"),pt(6,"Log:"),Oe(),Ae(7,"div",6,0),Pt(9,Fu,2,1,"p",7),Oe()(),Ae(10,"div",8),mn(11,"canvas",9,1),Oe()()),i&2&&(ft(2),ot("ngIf",o.formMultiple),ft(2),ot("ngIf",o.csvDowloadLink),ft(5),ot("ngForOf",o.log))},dependencies:[Or,Vr,xr,Lr,Mr,Hr,Ur,Fr,Wr,$r,Pr],styles:[`canvas[_ngcontent-%COMP%]{width:100%!important}.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.4}.display-log[_ngcontent-%COMP%]{background-color:#d3d3d3;width:100%;height:100px;overflow-y:scroll;font-size:12px;font-family:monospace}.display-log[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin-bottom:0}.display-log[_ngcontent-%COMP%]::-webkit-scrollbar{-webkit-appearance:none;width:7px}.display-log[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:4px;background-color:#00000080;-webkit-box-shadow:0 0 1px rgba(255,255,255,.5)}
31/*# sourceMappingURL=qrcode-generator.component-VDYIGJB7.css.map */`]});let t=e;return t})();export{vh as QrcodeGeneratorComponent,Bu as qrCodeOptions};
32/**i18n:28945ee13b8e098859cdfd20e56ed1b4fbfdbb0f15acd44f32a354ab994688a6*/
33//# sourceMappingURL=chunk-T74OSBEN.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.