var A={};A.byteLength=p,A.toByteArray=C,A.fromByteArray=i;for(var c=[],F=[],u=typeof Uint8Array<"u"?Uint8Array:Array,x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,s=x.length;d<s;++d)c[d]=x[d],F[x.charCodeAt(d)]=d;function l(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=r.indexOf("="),e;return-1===n&&(n=t),[n,n===t?0:4-n%4]}function p(r){var t=l(r),n=t[0],e=t[1];return 3*(n+e)/4-e}function y(r,t,n){return 3*(t+n)/4-n}function C(r){var t,n=l(r),e=n[0],o=n[1],c=new u(y(r,e,o)),a=0,h=o>0?e-4:e,A;for(A=0;A<h;A+=4)t=F[r.charCodeAt(A)]<<18|F[r.charCodeAt(A+1)]<<12|F[r.charCodeAt(A+2)]<<6|F[r.charCodeAt(A+3)],c[a++]=t>>16&255,c[a++]=t>>8&255,c[a++]=255&t;return 2===o&&(t=F[r.charCodeAt(A)]<<2|F[r.charCodeAt(A+1)]>>4,c[a++]=255&t),1===o&&(t=F[r.charCodeAt(A)]<<10|F[r.charCodeAt(A+1)]<<4|F[r.charCodeAt(A+2)]>>2,c[a++]=t>>8&255,c[a++]=255&t),c}function L(r){return c[r>>18&63]+c[r>>12&63]+c[r>>6&63]+c[63&r]}function g(r,t,n){for(var e,o=[],c=t;c<n;c+=3)e=(r[c]<<16&16711680)+(r[c+1]<<8&65280)+(255&r[c+2]),o.push(L(e));return o.join("")}function i(r){for(var t,n=r.length,e=n%3,o=[],a=16383,u=0,h=n-e;u<h;u+=a)o.push(g(r,u,u+a>h?h:u+a));return 1===e?(t=r[n-1],o.push(c[t>>2]+c[t<<4&63]+"==")):2===e&&(t=(r[n-2]<<8)+r[n-1],o.push(c[t>>10]+c[t>>4&63]+c[t<<2&63]+"=")),o.join("")}F[45]=62,F[95]=63;export{A as b};