mirror of
https://codeberg.org/kirche-im-netz/Startodon-Hub.git
synced 2025-06-21 00:26:08 +02:00
2 lines
No EOL
26 KiB
JavaScript
2 lines
No EOL
26 KiB
JavaScript
/*! kjua v0.10.0 - undefined */
|
|
((t,r)=>{"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("kjua",[],r):"object"==typeof exports?exports.kjua=r():t.kjua=r()})("undefined"!=typeof self?self:this,()=>{return n=[(t,r,e)=>{function n(t){var t=Object.assign({},o,t),r=i(t.text,t.ecLevel,t.minVersion,t.quiet);return"svg"===t.render?u(r,t):a(r,t,"image"===t.render)}var o=e(1),i=e(2),a=e(4),u=e(8);t.exports=n;try{jQuery.fn.kjua=function(e){return this.each(function(t,r){return r.appendChild(n(e))})}}catch(t){}},t=>{t.exports={render:"image",crisp:!0,minVersion:1,ecLevel:"L",size:200,ratio:null,fill:"#333",back:"#fff",text:"no text",rounded:0,quiet:0,mode:"plain",mSize:30,mPosX:50,mPosY:50,label:"no label",fontname:"sans",fontcolor:"#333",image:null}},(t,r,e)=>{function i(t,r){for(var e,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,o=Math.max(1,n);o<=40;o+=1)if(e=(()=>{try{var e=u(o,r),n=(e.addData(t),e.make(),e.getModuleCount());return{v:{text:t,level:r,version:o,module_count:n,is_dark:function(t,r){return 0<=t&&t<n&&0<=r&&r<n&&e.isDark(t,r)}}}}catch(t){if(!(o<40&&a.test(t)))throw new Error(t)}})())return e.v;return null}var a=/code length overflow/i,u=e(3);u.stringToBytes=u.stringToBytesFuncs["UTF-8"];t.exports=function(){var e,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"L",n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,t=i(t,r,n);return t&&(e=t.is_dark,t.module_count+=2*o,t.is_dark=function(t,r){return e(t-o,r-o)}),t}},(t,r)=>{z.stringToBytes=(z.stringToBytesFuncs={default:function(t){for(var r=[],e=0;e<t.length;e+=1){var n=t.charCodeAt(e);r.push(255&n)}return r}}).default,z.createStringToBytes=function(f,l){var o=(()=>{for(var r=y(f),t=function(){var t=r.read();if(-1==t)throw"eof";return t},e=0,n={};;){var o=r.read();if(-1==o)break;var i=t(),a=t(),u=t();n[String.fromCharCode(o<<8|i)]=a<<8|u,e+=1}if(e!=l)throw e+" != "+l;return n})(),i="?".charCodeAt(0);return function(t){for(var r=[],e=0;e<t.length;e+=1){var n=t.charCodeAt(e);n<128?r.push(n):"number"==typeof(n=o[t.charAt(e)])?(255&n)==n?r.push(n):(r.push(n>>>8),r.push(255&n)):r.push(i)}return r}},u=8,k={L:a=1,M:0,Q:3,H:i=2},o=0,f=1,l=2,c=3,s=n=4,g=5,d=7,e=[[],[h=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]],(w={}).getBCHTypeInfo=function(t){for(var r=t<<10;0<=T(r)-T(1335);)r^=1335<<T(r)-T(1335);return 21522^(t<<10|r)},w.getBCHTypeNumber=function(t){for(var r=t<<12;0<=T(r)-T(7973);)r^=7973<<T(r)-T(7973);return t<<12|r},w.getPatternPosition=function(t){return e[t-1]},w.getMaskFunction=function(t){switch(t){case o:return function(t,r){return(t+r)%2==0};case f:return function(t,r){return t%2==0};case l:return function(t,r){return r%3==0};case c:return function(t,r){return(t+r)%3==0};case s:return function(t,r){return(Math.floor(t/2)+Math.floor(r/3))%2==0};case g:return function(t,r){return t*r%2+t*r%3==0};case h:return function(t,r){return(t*r%2+t*r%3)%2==0};case d:return function(t,r){return(t*r%3+(t+r)%2)%2==0};default:throw"bad maskPattern:"+t}},w.getErrorCorrectPolynomial=function(t){for(var r=_([1],0),e=0;e<t;e+=1)r=r.multiply(_([1,v.gexp(e)],0));return r},w.getLengthInBits=function(t,r){if(1<=r&&r<10)switch(t){case a:return 10;case i:return 9;case n:case u:return 8;default:throw"mode:"+t}else if(r<27)switch(t){case a:return 12;case i:return 11;case n:return 16;case u:return 10;default:throw"mode:"+t}else{if(!(r<41))throw"type:"+r;switch(t){case a:return 14;case i:return 13;case n:return 16;case u:return 12;default:throw"mode:"+t}}},w.getLostPoint=function(t){for(var r=t.getModuleCount(),e=0,n=0;n<r;n+=1)for(var o=0;o<r;o+=1){for(var i=0,a=t.isDark(n,o),u=-1;u<=1;u+=1)if(!(n+u<0||r<=n+u))for(var f=-1;f<=1;f+=1)o+f<0||r<=o+f||0==u&&0==f||a==t.isDark(n+u,o+f)&&(i+=1);5<i&&(e+=3+i-5)}for(n=0;n<r-1;n+=1)for(o=0;o<r-1;o+=1){var l=0;t.isDark(n,o)&&(l+=1),t.isDark(n+1,o)&&(l+=1),t.isDark(n,o+1)&&(l+=1),t.isDark(n+1,o+1)&&(l+=1),0!=l&&4!=l||(e+=3)}for(n=0;n<r;n+=1)for(o=0;o<r-6;o+=1)t.isDark(n,o)&&!t.isDark(n,o+1)&&t.isDark(n,o+2)&&t.isDark(n,o+3)&&t.isDark(n,o+4)&&!t.isDark(n,o+5)&&t.isDark(n,o+6)&&(e+=40);for(o=0;o<r;o+=1)for(n=0;n<r-6;n+=1)t.isDark(n,o)&&!t.isDark(n+1,o)&&t.isDark(n+2,o)&&t.isDark(n+3,o)&&t.isDark(n+4,o)&&!t.isDark(n+5,o)&&t.isDark(n+6,o)&&(e+=40);for(var c=0,o=0;o<r;o+=1)for(n=0;n<r;n+=1)t.isDark(n,o)&&(c+=1);return e+=10*(Math.abs(100*c/r/r-50)/5)},x=w,v=(()=>{for(var r=new Array(256),e=new Array(256),t=0;t<8;t+=1)r[t]=1<<t;for(t=8;t<256;t+=1)r[t]=r[t-4]^r[t-5]^r[t-6]^r[t-8];for(t=0;t<255;t+=1)e[r[t]]=t;var n={glog:function(t){if(t<1)throw"glog("+t+")";return e[t]},gexp:function(t){for(;t<0;)t+=255;for(;256<=t;)t-=255;return r[t]}};return n})(),p=[[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]],(w={}).getRSBlocks=function(t,r){var e=((t,r)=>{switch(r){case k.L:return p[4*(t-1)+0];case k.M:return p[4*(t-1)+1];case k.Q:return p[4*(t-1)+2];case k.H:return p[4*(t-1)+3];default:return}})(t,r);if(void 0===e)throw"bad rs block @ typeNumber:"+t+"/errorCorrectionLevel:"+r;for(var n,o,i=e.length/3,a=[],u=0;u<i;u+=1)for(var f=e[3*u+0],l=e[3*u+1],c=e[3*u+2],s=0;s<f;s+=1)a.push((n=c,void 0,(o={}).totalCount=l,o.dataCount=n,o));return a},b=w,B=function(){var e=[],n=0,o={getBuffer:function(){return e},getAt:function(t){var r=Math.floor(t/8);return 1==(e[r]>>>7-t%8&1)},put:function(t,r){for(var e=0;e<r;e+=1)o.putBit(1==(t>>>r-e-1&1))},getLengthInBits:function(){return n},putBit:function(t){var r=Math.floor(n/8);e.length<=r&&e.push(0),t&&(e[r]|=128>>>n%8),n+=1}};return o},C=function(t){var r=a,n=t,t={getMode:function(){return r},getLength:function(t){return n.length},write:function(t){for(var r=n,e=0;e+2<r.length;)t.put(o(r.substring(e,e+3)),10),e+=3;e<r.length&&(r.length-e==1?t.put(o(r.substring(e,e+1)),4):r.length-e==2&&t.put(o(r.substring(e,e+2)),7))}},o=function(t){for(var r=0,e=0;e<t.length;e+=1)r=10*r+i(t.charAt(e));return r},i=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+t};return t},M=function(t){var r=i,n=t,t={getMode:function(){return r},getLength:function(t){return n.length},write:function(t){for(var r=n,e=0;e+1<r.length;)t.put(45*o(r.charAt(e))+o(r.charAt(e+1)),11),e+=2;e<r.length&&t.put(o(r.charAt(e)),6)}},o=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);if("A"<=t&&t<="Z")return t.charCodeAt(0)-"A".charCodeAt(0)+10;switch(t){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 :"+t}};return t},S=function(t){var r=n,e=z.stringToBytes(t),t={getMode:function(){return r},getLength:function(t){return e.length},write:function(t){for(var r=0;r<e.length;r+=1)t.put(e[r],8)}};return t},L=function(t){var r=u,e=z.stringToBytesFuncs.SJIS;if(!e)throw"sjis not supported.";var n=e("友");if(2!=n.length||38726!=(n[0]<<8|n[1]))throw"sjis not supported.";var o=e(t),n={getMode:function(){return r},getLength:function(t){return~~(o.length/2)},write:function(t){for(var r=o,e=0;e+1<r.length;){var n=(255&r[e])<<8|255&r[e+1];if(33088<=n&&n<=40956)n-=33088;else{if(!(57408<=n&&n<=60351))throw"illegal char at "+(e+1)+"/"+n;n-=49472}t.put(n=192*(n>>>8&255)+(255&n),13),e+=2}if(e<r.length)throw"illegal char at "+(e+1)}};return n},m=function(){var e=[],o={writeByte:function(t){e.push(255&t)},writeShort:function(t){o.writeByte(t),o.writeByte(t>>>8)},writeBytes:function(t,r,e){r=r||0,e=e||t.length;for(var n=0;n<e;n+=1)o.writeByte(t[n+r])},writeString:function(t){for(var r=0;r<t.length;r+=1)o.writeByte(t.charCodeAt(r))},toByteArray:function(){return e},toString:function(){var t="";t+="[";for(var r=0;r<e.length;r+=1)0<r&&(t+=","),t+=e[r];return t+="]"}};return o},y=function(t){var e=t,n=0,o=0,i=0,t={read:function(){for(;i<8;){if(n>=e.length){if(0==i)return-1;throw"unexpected end of file./"+i}var t=e.charAt(n);if(n+=1,"="==t)return i=0,-1;t.match(/^\s$/)||(o=o<<6|a(t.charCodeAt(0)),i+=6)}var r=o>>>i-8&255;return i-=8,r}},a=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw"c:"+t};return t},D=function(t,r,e){for(var n=j(t,r),o=0;o<r;o+=1)for(var i=0;i<t;i+=1)n.setPixel(i,o,e(i,o));for(var a=m(),u=(n.write(a),P()),f=a.toByteArray(),l=0;l<f.length;l+=1)u.writeByte(f[l]);return u.flush(),"data:image/gif;base64,"+u};var e,a,i,n,u,k,o,f,l,c,s,g,h,d,x,v,p,w,b,B,C,M,S,L,m,y,D,A=z;function z(t,r){function a(t,r){s=(t=>{for(var r=new Array(t),e=0;e<t;e+=1){r[e]=new Array(t);for(var n=0;n<t;n+=1)r[e][n]=null}return r})(g=4*u+17),e(0,0),e(g-7,0),e(0,g-7),i(),o(),v(t,r),7<=u&&d(t),null==n&&(n=m(u,c,h)),p(n,r)}var f=236,l=17,u=t,c=k[r],s=null,g=0,n=null,h=[],A={},e=function(t,r){for(var e=-1;e<=7;e+=1)if(!(t+e<=-1||g<=t+e))for(var n=-1;n<=7;n+=1)r+n<=-1||g<=r+n||(s[t+e][r+n]=0<=e&&e<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==e||6==e)||2<=e&&e<=4&&2<=n&&n<=4)},o=function(){for(var t=8;t<g-8;t+=1)null==s[t][6]&&(s[t][6]=t%2==0);for(var r=8;r<g-8;r+=1)null==s[6][r]&&(s[6][r]=r%2==0)},i=function(){for(var t=x.getPatternPosition(u),r=0;r<t.length;r+=1)for(var e=0;e<t.length;e+=1){var n=t[r],o=t[e];if(null==s[n][o])for(var i=-2;i<=2;i+=1)for(var a=-2;a<=2;a+=1)s[n+i][o+a]=-2==i||2==i||-2==a||2==a||0==i&&0==a}},d=function(t){for(var r=x.getBCHTypeNumber(u),e=0;e<18;e+=1){var n=!t&&1==(r>>e&1);s[Math.floor(e/3)][e%3+g-8-3]=n}for(e=0;e<18;e+=1){n=!t&&1==(r>>e&1);s[e%3+g-8-3][Math.floor(e/3)]=n}},v=function(t,r){for(var r=c<<3|r,e=x.getBCHTypeInfo(r),n=0;n<15;n+=1){var o=!t&&1==(e>>n&1);n<6?s[n][8]=o:n<8?s[n+1][8]=o:s[g-15+n][8]=o}for(n=0;n<15;n+=1){o=!t&&1==(e>>n&1);n<8?s[8][g-n-1]=o:n<9?s[8][15-n-1+1]=o:s[8][15-n-1]=o}s[g-8][8]=!t},p=function(t,r){for(var e=-1,n=g-1,o=7,i=0,a=x.getMaskFunction(r),u=g-1;0<u;u-=2)for(6==u&&--u;;){for(var f,l,c=0;c<2;c+=1)null==s[n][u-c]&&(f=!1,i<t.length&&(f=1==(t[i]>>>o&1)),l=a(n,u-c),s[n][u-c]=f=l?!f:f,-1==--o)&&(i+=1,o=7);if((n+=e)<0||g<=n){n-=e,e=-e;break}}},w=function(t,r){for(var e=0,n=0,o=0,i=new Array(r.length),a=new Array(r.length),u=0;u<r.length;u+=1){var f=r[u].dataCount,l=r[u].totalCount-f,n=Math.max(n,f),o=Math.max(o,l);i[u]=new Array(f);for(var c=0;c<i[u].length;c+=1)i[u][c]=255&t.getBuffer()[c+e];e+=f;var f=x.getErrorCorrectPolynomial(l),s=_(i[u],f.getLength()-1).mod(f);a[u]=new Array(f.getLength()-1);for(c=0;c<a[u].length;c+=1){var g=c+s.getLength()-a[u].length;a[u][c]=0<=g?s.getAt(g):0}}for(var h=0,c=0;c<r.length;c+=1)h+=r[c].totalCount;for(var d=new Array(h),v=0,c=0;c<n;c+=1)for(u=0;u<r.length;u+=1)c<i[u].length&&(d[v]=i[u][c],v+=1);for(c=0;c<o;c+=1)for(u=0;u<r.length;u+=1)c<a[u].length&&(d[v]=a[u][c],v+=1);return d},m=function(t,r,e){for(var n=b.getRSBlocks(t,r),o=B(),i=0;i<e.length;i+=1){var a=e[i];o.put(a.getMode(),4),o.put(a.getLength(),x.getLengthInBits(a.getMode(),t)),a.write(o)}for(var u=0,i=0;i<n.length;i+=1)u+=n[i].dataCount;if(o.getLengthInBits()>8*u)throw"code length overflow. ("+o.getLengthInBits()+">"+8*u+")";for(o.getLengthInBits()+4<=8*u&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;;){if(o.getLengthInBits()>=8*u)break;if(o.put(f,8),o.getLengthInBits()>=8*u)break;o.put(l,8)}return w(o,n)},y=(A.addData=function(t,r){var e=null;switch(r=r||"Byte"){case"Numeric":e=C(t);break;case"Alphanumeric":e=M(t);break;case"Byte":e=S(t);break;case"Kanji":e=L(t);break;default:throw"mode:"+r}h.push(e),n=null},A.isDark=function(t,r){if(t<0||g<=t||r<0||g<=r)throw t+","+r;return s[t][r]},A.getModuleCount=function(){return g},A.make=function(){if(u<1){for(var t=1;t<40;t++){for(var r=b.getRSBlocks(t,c),e=B(),n=0;n<h.length;n++){var o=h[n];e.put(o.getMode(),4),e.put(o.getLength(),x.getLengthInBits(o.getMode(),t)),o.write(e)}for(var i=0,n=0;n<r.length;n++)i+=r[n].dataCount;if(e.getLengthInBits()<=8*i)break}u=t}a(!1,(()=>{for(var t=0,r=0,e=0;e<8;e+=1){a(!0,e);var n=x.getLostPoint(A);(0==e||n<t)&&(t=n,r=e)}return r})())},A.createTableTag=function(t,r){t=t||2;for(var e=(e=(e=(e="")+'<table style="'+" border-width: 0px; border-style: none;")+" border-collapse: collapse;"+(" padding: 0px; margin: "+(r=void 0===r?4*t:r)+"px;"))+'">'+"<tbody>",n=0;n<A.getModuleCount();n+=1){e+="<tr>";for(var o=0;o<A.getModuleCount();o+=1)e=(e=(e=(e+='<td style=" border-width: 0px; border-style: none; border-collapse: collapse;')+" padding: 0px; margin: 0px; width: "+t+"px;")+" height: "+t+"px; background-color: ")+(A.isDark(n,o)?"#000000":"#ffffff")+';"/>';e+="</tr>"}return e=e+"</tbody>"+"</table>"},A.createSvgTag=function(t,r,e,n){for(var o,i,a={},u=("object"==typeof arguments[0]&&(t=(a=arguments[0]).cellSize,r=a.margin,e=a.alt,n=a.title),t=t||2,r=void 0===r?4*t:r,(e="string"==typeof e?{text:e}:e||{}).text=e.text||null,e.id=e.text?e.id||"qrcode-description":null,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-title":null,A.getModuleCount()*t+2*r),f="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",l=(l=(l=(l=(l=(l=(l="")+'<svg version="1.1" xmlns="http://www.w3.org/2000/svg"'+(a.scalable?"":' width="'+u+'px" height="'+u+'px"'))+(' viewBox="0 0 '+u+" "+u+'" ')+' preserveAspectRatio="xMinYMin meet"')+(n.text||e.text?' role="img" aria-labelledby="'+y([n.id,e.id].join(" ").trim())+'"':"")+">")+(n.text?'<title id="'+y(n.id)+'">'+y(n.text)+"</title>":""))+(e.text?'<description id="'+y(e.id)+'">'+y(e.text)+"</description>":""))+'<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>'+'<path d="',c=0;c<A.getModuleCount();c+=1)for(i=c*t+r,o=0;o<A.getModuleCount();o+=1)A.isDark(c,o)&&(l+="M"+(o*t+r)+","+i+f);return l=l+'" stroke="transparent" fill="black"/>'+"</svg>"},A.createDataURL=function(e,t){e=e||2,t=void 0===t?4*e:t;var r=A.getModuleCount()*e+2*t,n=t,o=r-t;return D(r,r,function(t,r){return n<=t&&t<o&&n<=r&&r<o&&(t=Math.floor((t-n)/e),r=Math.floor((r-n)/e),A.isDark(r,t))?0:1})},A.createImgTag=function(t,r,e){t=t||2,r=void 0===r?4*t:r;var n=A.getModuleCount()*t+2*r,o=(o=(o=(o=(o=(o="")+"<img"+' src="')+A.createDataURL(t,r)+'"')+' width="'+n)+'"'+' height="')+n+'"';return e&&(o=(o+=' alt="')+y(e)+'"'),o+="/>"},function(t){for(var r="",e=0;e<t.length;e+=1){var n=t.charAt(e);switch(n){case"<":r+="<";break;case">":r+=">";break;case"&":r+="&";break;case'"':r+=""";break;default:r+=n}}return r});return A.createASCII=function(t,r){if((t=t||1)<2){var e=r;e=void 0===e?2:e;for(var n,o,i,a,u=+A.getModuleCount()+2*e,f=e,l=u-e,c={"██":"█","█ ":"▀"," █":"▄"," ":" "},s={"██":"▀","█ ":"▀"," █":" "," ":" "},g="",h=0;h<u;h+=2){for(o=Math.floor(h-f),i=Math.floor(h+1-f),n=0;n<u;n+=1)a="█",f<=n&&n<l&&f<=h&&h<l&&A.isDark(o,Math.floor(n-f))&&(a=" "),f<=n&&n<l&&f<=h+1&&h+1<l&&A.isDark(i,Math.floor(n-f))?a+=" ":a+="█",g+=(e<1&&l<=h+1?s:c)[a];g+="\n"}return u%2&&0<e?g.substring(0,g.length-u-1)+Array(1+u).join("▀"):g.substring(0,g.length-1)}--t,r=void 0===r?2*t:r;for(var d,v,p,w=A.getModuleCount()*t+2*r,m=r,y=w-r,k=Array(t+1).join("██"),x=Array(t+1).join(" "),b="",B="",C=0;C<w;C+=1){for(v=Math.floor((C-m)/t),B="",d=0;d<w;d+=1)p=1,B+=(p=m<=d&&d<y&&m<=C&&C<y&&A.isDark(v,Math.floor((d-m)/t))?0:p)?k:x;for(v=0;v<t;v+=1)b+=B+"\n"}return b.substring(0,b.length-1)},A.renderTo2dContext=function(t,r){r=r||2;for(var e=A.getModuleCount(),n=0;n<e;n++)for(var o=0;o<e;o++)t.fillStyle=A.isDark(n,o)?"black":"white",t.fillRect(n*r,o*r,r,r)},A}function T(t){for(var r=0;0!=t;)r+=1,t>>>=1;return r}function _(n,o){if(void 0===n.length)throw n.length+"/"+o;var r=(()=>{for(var t=0;t<n.length&&0==n[t];)t+=1;for(var r=new Array(n.length-t+o),e=0;e<n.length-t;e+=1)r[e]=n[e+t];return r})(),i={getAt:function(t){return r[t]},getLength:function(){return r.length},multiply:function(t){for(var r=new Array(i.getLength()+t.getLength()-1),e=0;e<i.getLength();e+=1)for(var n=0;n<t.getLength();n+=1)r[e+n]^=v.gexp(v.glog(i.getAt(e))+v.glog(t.getAt(n)));return _(r,0)},mod:function(t){if(i.getLength()-t.getLength()<0)return i;for(var r=v.glog(i.getAt(0))-v.glog(t.getAt(0)),e=new Array(i.getLength()),n=0;n<i.getLength();n+=1)e[n]=i.getAt(n);for(n=0;n<t.getLength();n+=1)e[n]^=v.gexp(v.glog(t.getAt(n))+r);return _(e,0).mod(t)}};return i}function P(){function e(t){a+=String.fromCharCode((t=>{if(!(t<0)){if(t<26)return 65+t;if(t<52)return t-26+97;if(t<62)return t-52+48;if(62==t)return 43;if(63==t)return 47}throw"n:"+t})(63&t))}var n=0,o=0,i=0,a="",t={writeByte:function(t){for(n=n<<8|255&t,o+=8,i+=1;6<=o;)e(n>>>o-6),o-=6},flush:function(){if(0<o&&(e(n<<6-o),o=n=0),i%3!=0)for(var t=3-i%3,r=0;r<t;r+=1)a+="="},toString:function(){return a}};return t}function j(t,r){var n=t,o=r,h=new Array(t*r),i=function(t){for(var r=1<<t,e=1+(1<<t),n=t+1,o=d(),i=0;i<r;i+=1)o.add(String.fromCharCode(i));o.add(String.fromCharCode(r)),o.add(String.fromCharCode(e));var a,u,f,t=m(),l=(a=t,f=u=0,{write:function(t,r){if(t>>>r!=0)throw"length over";for(;8<=u+r;)a.writeByte(255&(t<<u|f)),r-=8-u,t>>>=8-u,u=f=0;f|=t<<u,u+=r},flush:function(){0<u&&a.writeByte(f)}}),c=(l.write(r,n),0),s=String.fromCharCode(h[c]);for(c+=1;c<h.length;){var g=String.fromCharCode(h[c]);c+=1,o.contains(s+g)?s+=g:(l.write(o.indexOf(s),n),o.size()<4095&&(o.size()==1<<n&&(n+=1),o.add(s+g)),s=g)}return l.write(o.indexOf(s),n),l.write(e,n),l.flush(),t.toByteArray()},d=function(){var r={},e=0,n={add:function(t){if(n.contains(t))throw"dup key:"+t;r[t]=e,e+=1},size:function(){return e},indexOf:function(t){return r[t]},contains:function(t){return void 0!==r[t]}};return n};return t={setPixel:function(t,r,e){h[r*n+t]=e},write:function(t){t.writeString("GIF87a"),t.writeShort(n),t.writeShort(o),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(","),t.writeShort(0),t.writeShort(0),t.writeShort(n),t.writeShort(o),t.writeByte(0);for(var r=i(2),e=(t.writeByte(2),0);255<r.length-e;)t.writeByte(255),t.writeBytes(r,e,255),e+=255;t.writeByte(r.length-e),t.writeBytes(r,e,r.length-e),t.writeByte(0),t.writeString(";")}}}A.stringToBytesFuncs["UTF-8"]=function(t){for(var r=t,e=[],n=0;n<r.length;n++){var o=r.charCodeAt(n);o<128?e.push(o):o<2048?e.push(192|o>>6,128|63&o):o<55296||57344<=o?e.push(224|o>>12,128|o>>6&63,128|63&o):(n++,o=65536+((1023&o)<<10|1023&r.charCodeAt(n)),e.push(240|o>>18,128|o>>12&63,128|o>>6&63,128|63&o))}return e},void 0!==(r="function"==typeof(w=function(){return A})?w.apply(r,[]):w)&&(t.exports=r)},(t,r,e)=>{var a=e(5),l=e(6),u=e(7),f=function(t,r){r.back&&(t.fillStyle=r.back,t.fillRect(0,0,r.size,r.size))},c=function(t,r,e,n,o,i){t.is_dark(o,i)&&r.rect(i*n,o*n,n,n)},s=function(t,r,e){if(t){var n=0<e.rounded&&e.rounded<=100?l:c,o=t.module_count,i=e.size/o,a=0;e.crisp&&(i=Math.floor(i),a=Math.floor((e.size-i*o)/2)),r.translate(a,a),r.beginPath();for(var u=0;u<o;u+=1)for(var f=0;f<o;f+=1)n(t,r,e,i,u,f);r.fillStyle=e.fill,r.fill(),r.translate(-a,-a)}};t.exports=function(t,r,e){var n=r.ratio||a.dpr,o=a.create_canvas(r.size,n),i=o.getContext("2d");return i.scale(n,n),n=t,f(t=i,i=r),s(n,t,i),u(t,i),e?a.canvas_to_img(o):o}},t=>{function e(t,r){return t.getAttribute(r)}function n(r,e){return Object.keys(e||{}).forEach(function(t){r.setAttribute(t,e[t])}),r}function o(t,r){return n(i.createElement(t),r)}var r=window,i=r.document,a="http://www.w3.org/2000/svg";t.exports={dpr:r.devicePixelRatio||1,SVG_NS:a,get_attr:e,create_el:o,create_svg_el:function(t,r){return n(i.createElementNS(a,t),r)},create_canvas:function(t,r){r=o("canvas",{width:t*r,height:t*r});return r.style.width="".concat(t,"px"),r.style.height="".concat(t,"px"),r},canvas_to_img:function(t){var r=o("img",{crossOrigin:"anonymous",src:t.toDataURL("image/png"),width:e(t,"width"),height:e(t,"height")});return r.style.width=t.style.width,r.style.height=t.style.height,r}}},t=>{t.exports=function(t,r,e,n,o,i){var a,u,f,l,c,s,g,h,d=i*n,v=o*n,p=d+n,w=v+n,e=.005*e.rounded*n,n=t.is_dark,t=o-1,m=o+1,y=i-1,k=i+1,x=n(o,i),b=n(t,y),B=n(t,i),t=n(t,k),C=n(o,k),k=n(m,k),i=n(m,i),m=n(m,y),n=n(o,y),o=(a=r,{m:function(t,r){return a.moveTo(t,r),this},l:function(t,r){return a.lineTo(t,r),this},a:function(){return a.arcTo.apply(a,arguments),this}});x?(y=o,r=d,x=v,u=p,f=w,l=e,s=!B&&!C,g=!i&&!C,h=!i&&!n,(c=!B&&!n)?y.m(r+l,x):y.m(r,x),s?y.l(u-l,x).a(u,x,u,f,l):y.l(u,x),g?y.l(u,f-l).a(u,f,r,f,l):y.l(u,f),h?y.l(r+l,f).a(r,f,r,x,l):y.l(r,f),c?y.l(r,x+l).a(r,x,u,x,l):y.l(r,x)):(s=o,g=d,h=v,f=p,c=w,u=e,l=B&&C&&t,y=i&&C&&k,r=i&&n&&m,B&&n&&b&&s.m(g+u,h).l(g,h).l(g,h+u).a(g,h,g+u,h,u),l&&s.m(f-u,h).l(f,h).l(f,h+u).a(f,h,f-u,h,u),y&&s.m(f-u,c).l(f,c).l(f,c-u).a(f,c,f-u,c,u),r&&s.m(g+u,c).l(g,c).l(g,c-u).a(g,c,g+u,c,u))}},t=>{t.exports=function(t,r){var e,n,o,i,a,u=r.mode;"label"===u?(e=t,o=(n=r).size,i="bold "+.01*n.mSize*o+"px "+n.fontname,e.strokeStyle=n.back,e.lineWidth=.01*n.mSize*o*.1,e.fillStyle=n.fontcolor,e.font=i,i=e.measureText(n.label).width,a=.01*n.mSize,i=(1-i/o)*n.mPosX*.01*o,a=(1-a)*n.mPosY*.01*o+.75*n.mSize*.01*o,e.strokeText(n.label,i,a),e.fillText(n.label,i,a)):"image"===u&&(o=r.size,e=r.image.naturalWidth||1,n=r.image.naturalHeight||1,e=(i=.01*r.mSize)*e/n,t.drawImage(r.image,(1-e)*r.mPosX*.01*o,(1-i)*r.mPosY*.01*o,e*o,i*o))}},(t,r,c)=>{var e=c(5),s=e.SVG_NS,g=e.get_attr,h=e.create_svg_el,d=function(n){function o(t){return Math.round(10*t)/10}function i(t){return Math.round(10*t)/10+n.o}return{m:function(t,r){return n.p+="M ".concat(i(t)," ").concat(i(r)," "),this},l:function(t,r){return n.p+="L ".concat(i(t)," ").concat(i(r)," "),this},a:function(t,r,e){return n.p+="A ".concat(o(e)," ").concat(o(e)," 0 0 1 ").concat(i(t)," ").concat(i(r)," "),this}}},w=function(t,r,e,n,o,i,a,u,f,l){a?t.m(r+i,e):t.m(r,e),u?t.l(n-i,e).a(n,e+i,i):t.l(n,e),f?t.l(n,o-i).a(n-i,o,i):t.l(n,o),l?t.l(r+i,o).a(r,o-i,i):t.l(r,o),a?t.l(r,e+i).a(r+i,e,i):t.l(r,e)},m=function(t,r,e,n,o,i,a,u,f,l){a&&t.m(r+i,e).l(r,e).l(r,e+i).a(r+i,e,i),u&&t.m(n,e+i).l(n,e).l(n-i,e).a(n,e+i,i),f&&t.m(n-i,o).l(n,o).l(n,o-i).a(n-i,o,i),l&&t.m(r,o-i).l(r,o).l(r+i,o).a(r,o-i,i)},v=function(t,r,e,n,o,i){var a=i*n,u=o*n,f=a+n,l=u+n,e=.005*e.rounded*n,n=t.is_dark,t=o-1,c=o+1,s=i-1,g=i+1,h=n(o,i),d=n(t,s),v=n(t,i),t=n(t,g),p=n(o,g),g=n(c,g),i=n(c,i),c=n(c,s),n=n(o,s);h?w(r,a,u,f,l,e,!v&&!n,!v&&!p,!i&&!p,!i&&!n):m(r,a,u,f,l,e,v&&n&&d,v&&p&&t,i&&p&&g,i&&n&&c)};t.exports=function(t,r){var e,n,o,i,a,u=r.size,f=r.mode,l=h("svg",{xmlns:s,width:u,height:u,viewBox:"0 0 ".concat(u," ").concat(u)});return l.style.width="".concat(u,"px"),l.style.height="".concat(u,"px"),r.back&&l.appendChild(h("rect",{x:0,y:0,width:u,height:u,fill:r.back})),l.appendChild(h("path",{d:((t,r)=>{if(!t)return"";for(var e={p:"",o:0},n=t.module_count,o=r.size/n,i=(r.crisp&&(o=Math.floor(o),e.o=Math.floor((r.size-o*n)/2)),d(e)),a=0;a<n;a+=1)for(var u=0;u<n;u+=1)v(t,i,r,o,a,u);return e.p})(t,r),fill:r.fill})),"label"===f?(u=l,e=(t=r).size,n="bold "+.01*t.mSize*e+"px "+t.fontname,o=c(5),i=t.ratio||o.dpr,(o=o.create_canvas(e,i).getContext("2d")).strokeStyle=t.back,o.lineWidth=.01*t.mSize*e*.1,o.fillStyle=t.fontcolor,o.font=n,i=o.measureText(t.label).width,a=.01*t.mSize,i=h("text",{x:(1-i/e)*t.mPosX*.01*e,y:(1-a)*t.mPosY*.01*e+.75*t.mSize*.01*e}),Object.assign(i.style,{font:n,fill:t.fontcolor,"paint-order":"stroke",stroke:t.back,"stroke-width":o.lineWidth}),i.textContent=t.label,u.appendChild(i)):"image"===f&&(a=l,e=r.size,n=r.image.naturalWidth||1,o=r.image.naturalHeight||1,o=(1-(n=(t=.01*r.mSize)*n/o))*r.mPosX*.01*e,u=(1-t)*r.mPosY*.01*e,n*=e,t*=e,e=h("image",{href:g(r.image,"src"),x:o,y:u,width:n,height:t}),a.appendChild(e)),l}}],o={},function t(r){var e=o[r];return void 0===e&&(e=o[r]={exports:{}},n[r](e,e.exports,t)),e.exports}(0);var n,o}); |