@gataca/qr 2.0.2 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/cjs/gataca-autoqr.cjs.entry.js +105 -0
  2. package/dist/cjs/gataca-qr_2.cjs.entry.js +219 -0
  3. package/dist/cjs/gataca-qrws.cjs.entry.js +176 -0
  4. package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +129 -0
  5. package/dist/cjs/gatacaqr.cjs.js +19 -0
  6. package/dist/cjs/index-4be0cdca.js +1435 -0
  7. package/dist/cjs/index.cjs.js +16 -0
  8. package/dist/cjs/loader.cjs.js +21 -0
  9. package/dist/cjs/logo_gataca-f3dc6840.js +14 -0
  10. package/dist/cjs/qr-code-styling-412bbc7a.js +28 -0
  11. package/dist/cjs/utils-383ee834.js +26 -0
  12. package/dist/collection/assets/icons/gat-icon-alert.svg +5 -0
  13. package/dist/collection/assets/icons/gat-icon-check.svg +5 -0
  14. package/dist/collection/assets/icons/gat-icon-refresh.svg +4 -0
  15. package/dist/collection/assets/images/logo_gataca.svg +26 -0
  16. package/dist/collection/collection-manifest.json +17 -0
  17. package/dist/collection/components/gataca-autoqr/gataca-autoqr.css +116 -0
  18. package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +323 -0
  19. package/dist/collection/components/gataca-qr/gataca-qr.css +261 -0
  20. package/dist/collection/components/gataca-qr/gataca-qr.js +828 -0
  21. package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +154 -0
  22. package/dist/collection/components/gataca-qrws/gataca-qrws.css +251 -0
  23. package/dist/collection/components/gataca-qrws/gataca-qrws.js +566 -0
  24. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.css +116 -0
  25. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +679 -0
  26. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.css +116 -0
  27. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +410 -0
  28. package/dist/collection/index.js +2 -0
  29. package/dist/collection/utils/index.js +1 -0
  30. package/dist/collection/utils/utils.js +21 -0
  31. package/dist/{gatacaqr/gat-icon-refresh-8d3dc25f.js → components/gat-icon-refresh.js} +23 -1
  32. package/dist/components/gataca-autoqr.js +161 -0
  33. package/dist/components/gataca-qr.js +6 -0
  34. package/dist/components/gataca-qr2.js +227 -0
  35. package/dist/components/gataca-qrdisplay.js +6 -0
  36. package/dist/components/gataca-qrdisplay2.js +93 -0
  37. package/dist/components/gataca-qrws.js +6 -0
  38. package/dist/components/gataca-qrws2.js +212 -0
  39. package/dist/components/gataca-ssibutton.js +6 -0
  40. package/dist/{gatacaqr/gataca-ssibutton.entry.js → components/gataca-ssibutton2.js} +83 -9
  41. package/dist/components/gataca-ssibuttonws.js +6 -0
  42. package/dist/{gatacaqr/gataca-ssibuttonws.entry.js → components/gataca-ssibuttonws2.js} +53 -7
  43. package/dist/components/index.js +8 -0
  44. package/dist/{gatacaqr → esm}/gataca-autoqr.entry.js +1 -1
  45. package/dist/esm/gataca-qr_2.entry.js +214 -0
  46. package/dist/{gatacaqr → esm}/gataca-qrws.entry.js +4 -4
  47. package/dist/esm/gataca-ssibutton_2.entry.js +124 -0
  48. package/dist/esm/gatacaqr.js +17 -0
  49. package/dist/esm/index-80311733.js +1409 -0
  50. package/dist/esm/index.js +1 -0
  51. package/dist/esm/loader.js +17 -0
  52. package/dist/esm/logo_gataca-57ad0363.js +9 -0
  53. package/dist/esm/polyfills/core-js.js +11 -0
  54. package/dist/esm/polyfills/css-shim.js +1 -0
  55. package/dist/esm/polyfills/dom.js +79 -0
  56. package/dist/esm/polyfills/es5-html-element.js +1 -0
  57. package/dist/esm/polyfills/index.js +34 -0
  58. package/dist/esm/polyfills/system.js +6 -0
  59. package/dist/esm/qr-code-styling-0eeb38d5.js +26 -0
  60. package/dist/gatacaqr/gatacaqr.esm.js +1 -129
  61. package/dist/gatacaqr/index.esm.js +1 -1
  62. package/dist/gatacaqr/p-0be4566d.js +1 -0
  63. package/dist/gatacaqr/p-5b17ef39.entry.js +1 -0
  64. package/dist/gatacaqr/p-5eb106c0.entry.js +1 -0
  65. package/dist/gatacaqr/p-66ad21ac.entry.js +1 -0
  66. package/dist/gatacaqr/p-6adc6933.js +1 -0
  67. package/dist/gatacaqr/p-a5648391.js +2 -0
  68. package/dist/gatacaqr/p-b834ef88.entry.js +1 -0
  69. package/dist/gatacaqr/p-b8ba109f.js +1 -0
  70. package/dist/index.cjs.js +1 -0
  71. package/dist/index.js +1 -0
  72. package/dist/types/components/gataca-qr/gataca-qr.d.ts +76 -1
  73. package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +75 -0
  74. package/dist/types/components.d.ts +242 -2
  75. package/package.json +2 -2
  76. package/dist/gatacaqr/app-globals-0f993ce5.js +0 -3
  77. package/dist/gatacaqr/css-shim-8eec97b3.js +0 -4
  78. package/dist/gatacaqr/dom-1b0cf05d.js +0 -73
  79. package/dist/gatacaqr/gataca-qr.entry.js +0 -171
  80. package/dist/gatacaqr/gataca-qrdisplay-0320bb25.js +0 -97
  81. package/dist/gatacaqr/gataca-qrdisplay.entry.js +0 -2
  82. package/dist/gatacaqr/index-d0db23e4.js +0 -3262
  83. package/dist/gatacaqr/shadow-css-146f2f6f.js +0 -387
  84. /package/dist/{gatacaqr → esm}/utils-05ba6c9f.js +0 -0
@@ -0,0 +1,26 @@
1
+ function getDefaultExportFromCjs (x) {
2
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3
+ }
4
+
5
+ function createCommonjsModule(fn, basedir, module) {
6
+ return module = {
7
+ path: basedir,
8
+ exports: {},
9
+ require: function (path, base) {
10
+ return commonjsRequire();
11
+ }
12
+ }, fn(module, module.exports), module.exports;
13
+ }
14
+
15
+ function commonjsRequire () {
16
+ throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
17
+ }
18
+
19
+ var qrCodeStyling = createCommonjsModule(function (module, exports) {
20
+ !function(t,e){module.exports=e();}(self,(function(){return (()=>{var t={192:(t,e)=>{var r,n,o=function(){var t=function(t,e){var r=t,n=a[e],o=null,i=0,u=null,v=[],w={},m=function(t,e){o=function(t){for(var e=new Array(t),r=0;r<t;r+=1){e[r]=new Array(t);for(var n=0;n<t;n+=1)e[r][n]=null;}return e}(i=4*r+17),b(0,0),b(i-7,0),b(0,i-7),x(),_(),M(t,e),r>=7&&S(t),null==u&&(u=A(r,n,v)),C(u,e);},b=function(t,e){for(var r=-1;r<=7;r+=1)if(!(t+r<=-1||i<=t+r))for(var n=-1;n<=7;n+=1)e+n<=-1||i<=e+n||(o[t+r][e+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4);},_=function(){for(var t=8;t<i-8;t+=1)null==o[t][6]&&(o[t][6]=t%2==0);for(var e=8;e<i-8;e+=1)null==o[6][e]&&(o[6][e]=e%2==0);},x=function(){for(var t=s.getPatternPosition(r),e=0;e<t.length;e+=1)for(var n=0;n<t.length;n+=1){var i=t[e],a=t[n];if(null==o[i][a])for(var u=-2;u<=2;u+=1)for(var h=-2;h<=2;h+=1)o[i+u][a+h]=-2==u||2==u||-2==h||2==h||0==u&&0==h;}},S=function(t){for(var e=s.getBCHTypeNumber(r),n=0;n<18;n+=1){var a=!t&&1==(e>>n&1);o[Math.floor(n/3)][n%3+i-8-3]=a;}for(n=0;n<18;n+=1)a=!t&&1==(e>>n&1),o[n%3+i-8-3][Math.floor(n/3)]=a;},M=function(t,e){for(var r=n<<3|e,a=s.getBCHTypeInfo(r),u=0;u<15;u+=1){var h=!t&&1==(a>>u&1);u<6?o[u][8]=h:u<8?o[u+1][8]=h:o[i-15+u][8]=h;}for(u=0;u<15;u+=1)h=!t&&1==(a>>u&1),u<8?o[8][i-u-1]=h:u<9?o[8][15-u-1+1]=h:o[8][15-u-1]=h;o[i-8][8]=!t;},C=function(t,e){for(var r=-1,n=i-1,a=7,u=0,h=s.getMaskFunction(e),c=i-1;c>0;c-=2)for(6==c&&(c-=1);;){for(var l=0;l<2;l+=1)if(null==o[n][c-l]){var d=!1;u<t.length&&(d=1==(t[u]>>>a&1)),h(n,c-l)&&(d=!d),o[n][c-l]=d,-1==(a-=1)&&(u+=1,a=7);}if((n+=r)<0||i<=n){n-=r,r=-r;break}}},A=function(t,e,r){for(var n=c.getRSBlocks(t,e),o=l(),i=0;i<r.length;i+=1){var a=r[i];o.put(a.getMode(),4),o.put(a.getLength(),s.getLengthInBits(a.getMode(),t)),a.write(o);}var u=0;for(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(;!(o.getLengthInBits()>=8*u||(o.put(236,8),o.getLengthInBits()>=8*u));)o.put(17,8);return function(t,e){for(var r=0,n=0,o=0,i=new Array(e.length),a=new Array(e.length),u=0;u<e.length;u+=1){var c=e[u].dataCount,l=e[u].totalCount-c;n=Math.max(n,c),o=Math.max(o,l),i[u]=new Array(c);for(var d=0;d<i[u].length;d+=1)i[u][d]=255&t.getBuffer()[d+r];r+=c;var f=s.getErrorCorrectPolynomial(l),g=h(i[u],f.getLength()-1).mod(f);for(a[u]=new Array(f.getLength()-1),d=0;d<a[u].length;d+=1){var p=d+g.getLength()-a[u].length;a[u][d]=p>=0?g.getAt(p):0;}}var v=0;for(d=0;d<e.length;d+=1)v+=e[d].totalCount;var w=new Array(v),y=0;for(d=0;d<n;d+=1)for(u=0;u<e.length;u+=1)d<i[u].length&&(w[y]=i[u][d],y+=1);for(d=0;d<o;d+=1)for(u=0;u<e.length;u+=1)d<a[u].length&&(w[y]=a[u][d],y+=1);return w}(o,n)};w.addData=function(t,e){var r=null;switch(e=e||"Byte"){case"Numeric":r=d(t);break;case"Alphanumeric":r=f(t);break;case"Byte":r=g(t);break;case"Kanji":r=p(t);break;default:throw "mode:"+e}v.push(r),u=null;},w.isDark=function(t,e){if(t<0||i<=t||e<0||i<=e)throw t+","+e;return o[t][e]},w.getModuleCount=function(){return i},w.make=function(){if(r<1){for(var t=1;t<40;t++){for(var e=c.getRSBlocks(t,n),o=l(),i=0;i<v.length;i++){var a=v[i];o.put(a.getMode(),4),o.put(a.getLength(),s.getLengthInBits(a.getMode(),t)),a.write(o);}var u=0;for(i=0;i<e.length;i++)u+=e[i].dataCount;if(o.getLengthInBits()<=8*u)break}r=t;}m(!1,function(){for(var t=0,e=0,r=0;r<8;r+=1){m(!0,r);var n=s.getLostPoint(w);(0==r||t>n)&&(t=n,e=r);}return e}());},w.createTableTag=function(t,e){t=t||2;var r="";r+='<table style="',r+=" border-width: 0px; border-style: none;",r+=" border-collapse: collapse;",r+=" padding: 0px; margin: "+(e=void 0===e?4*t:e)+"px;",r+='">',r+="<tbody>";for(var n=0;n<w.getModuleCount();n+=1){r+="<tr>";for(var o=0;o<w.getModuleCount();o+=1)r+='<td style="',r+=" border-width: 0px; border-style: none;",r+=" border-collapse: collapse;",r+=" padding: 0px; margin: 0px;",r+=" width: "+t+"px;",r+=" height: "+t+"px;",r+=" background-color: ",r+=w.isDark(n,o)?"#000000":"#ffffff",r+=";",r+='"/>';r+="</tr>";}return (r+="</tbody>")+"</table>"},w.createSvgTag=function(t,e,r,n){var o={};"object"==typeof arguments[0]&&(t=(o=arguments[0]).cellSize,e=o.margin,r=o.alt,n=o.title),t=t||2,e=void 0===e?4*t:e,(r="string"==typeof r?{text:r}:r||{}).text=r.text||null,r.id=r.text?r.id||"qrcode-description":null,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-title":null;var i,a,s,u,h=w.getModuleCount()*t+2*e,c="";for(u="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",c+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',c+=o.scalable?"":' width="'+h+'px" height="'+h+'px"',c+=' viewBox="0 0 '+h+" "+h+'" ',c+=' preserveAspectRatio="xMinYMin meet"',c+=n.text||r.text?' role="img" aria-labelledby="'+k([n.id,r.id].join(" ").trim())+'"':"",c+=">",c+=n.text?'<title id="'+k(n.id)+'">'+k(n.text)+"</title>":"",c+=r.text?'<description id="'+k(r.id)+'">'+k(r.text)+"</description>":"",c+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',c+='<path d="',a=0;a<w.getModuleCount();a+=1)for(s=a*t+e,i=0;i<w.getModuleCount();i+=1)w.isDark(a,i)&&(c+="M"+(i*t+e)+","+s+u);return (c+='" stroke="transparent" fill="black"/>')+"</svg>"},w.createDataURL=function(t,e){t=t||2,e=void 0===e?4*t:e;var r=w.getModuleCount()*t+2*e,n=e,o=r-e;return y(r,r,(function(e,r){if(n<=e&&e<o&&n<=r&&r<o){var i=Math.floor((e-n)/t),a=Math.floor((r-n)/t);return w.isDark(a,i)?0:1}return 1}))},w.createImgTag=function(t,e,r){t=t||2,e=void 0===e?4*t:e;var n=w.getModuleCount()*t+2*e,o="";return o+="<img",o+=' src="',o+=w.createDataURL(t,e),o+='"',o+=' width="',o+=n,o+='"',o+=' height="',o+=n,o+='"',r&&(o+=' alt="',o+=k(r),o+='"'),o+"/>"};var k=function(t){for(var e="",r=0;r<t.length;r+=1){var n=t.charAt(r);switch(n){case"<":e+="&lt;";break;case">":e+="&gt;";break;case"&":e+="&amp;";break;case'"':e+="&quot;";break;default:e+=n;}}return e};return w.createASCII=function(t,e){if((t=t||1)<2)return function(t){t=void 0===t?2:t;var e,r,n,o,i,a=1*w.getModuleCount()+2*t,s=t,u=a-t,h={"██":"█","█ ":"▀"," █":"▄"," ":" "},c={"██":"▀","█ ":"▀"," █":" "," ":" "},l="";for(e=0;e<a;e+=2){for(n=Math.floor((e-s)/1),o=Math.floor((e+1-s)/1),r=0;r<a;r+=1)i="█",s<=r&&r<u&&s<=e&&e<u&&w.isDark(n,Math.floor((r-s)/1))&&(i=" "),s<=r&&r<u&&s<=e+1&&e+1<u&&w.isDark(o,Math.floor((r-s)/1))?i+=" ":i+="█",l+=t<1&&e+1>=u?c[i]:h[i];l+="\n";}return a%2&&t>0?l.substring(0,l.length-a-1)+Array(a+1).join("▀"):l.substring(0,l.length-1)}(e);t-=1,e=void 0===e?2*t:e;var r,n,o,i,a=w.getModuleCount()*t+2*e,s=e,u=a-e,h=Array(t+1).join("██"),c=Array(t+1).join(" "),l="",d="";for(r=0;r<a;r+=1){for(o=Math.floor((r-s)/t),d="",n=0;n<a;n+=1)i=1,s<=n&&n<u&&s<=r&&r<u&&w.isDark(o,Math.floor((n-s)/t))&&(i=0),d+=i?h:c;for(o=0;o<t;o+=1)l+=d+"\n";}return l.substring(0,l.length-1)},w.renderTo2dContext=function(t,e){e=e||2;for(var r=w.getModuleCount(),n=0;n<r;n++)for(var o=0;o<r;o++)t.fillStyle=w.isDark(n,o)?"black":"white",t.fillRect(n*e,o*e,e,e);},w};t.stringToBytes=(t.stringToBytesFuncs={default:function(t){for(var e=[],r=0;r<t.length;r+=1){var n=t.charCodeAt(r);e.push(255&n);}return e}}).default,t.createStringToBytes=function(t,e){var r=function(){for(var r=w(t),n=function(){var t=r.read();if(-1==t)throw "eof";return t},o=0,i={};;){var a=r.read();if(-1==a)break;var s=n(),u=n()<<8|n();i[String.fromCharCode(a<<8|s)]=u,o+=1;}if(o!=e)throw o+" != "+e;return i}(),n="?".charCodeAt(0);return function(t){for(var e=[],o=0;o<t.length;o+=1){var i=t.charCodeAt(o);if(i<128)e.push(i);else {var a=r[t.charAt(o)];"number"==typeof a?(255&a)==a?e.push(a):(e.push(a>>>8),e.push(255&a)):e.push(n);}}return e}};var e,r,n,o,i,a={L:1,M:0,Q:3,H:2},s=(e=[[],[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]],r=1335,n=7973,i=function(t){for(var e=0;0!=t;)e+=1,t>>>=1;return e},(o={}).getBCHTypeInfo=function(t){for(var e=t<<10;i(e)-i(r)>=0;)e^=r<<i(e)-i(r);return 21522^(t<<10|e)},o.getBCHTypeNumber=function(t){for(var e=t<<12;i(e)-i(n)>=0;)e^=n<<i(e)-i(n);return t<<12|e},o.getPatternPosition=function(t){return e[t-1]},o.getMaskFunction=function(t){switch(t){case 0:return function(t,e){return (t+e)%2==0};case 1:return function(t,e){return t%2==0};case 2:return function(t,e){return e%3==0};case 3:return function(t,e){return (t+e)%3==0};case 4:return function(t,e){return (Math.floor(t/2)+Math.floor(e/3))%2==0};case 5:return function(t,e){return t*e%2+t*e%3==0};case 6:return function(t,e){return (t*e%2+t*e%3)%2==0};case 7:return function(t,e){return (t*e%3+(t+e)%2)%2==0};default:throw "bad maskPattern:"+t}},o.getErrorCorrectPolynomial=function(t){for(var e=h([1],0),r=0;r<t;r+=1)e=e.multiply(h([1,u.gexp(r)],0));return e},o.getLengthInBits=function(t,e){if(1<=e&&e<10)switch(t){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw "mode:"+t}else if(e<27)switch(t){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw "mode:"+t}else {if(!(e<41))throw "type:"+e;switch(t){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw "mode:"+t}}},o.getLostPoint=function(t){for(var e=t.getModuleCount(),r=0,n=0;n<e;n+=1)for(var o=0;o<e;o+=1){for(var i=0,a=t.isDark(n,o),s=-1;s<=1;s+=1)if(!(n+s<0||e<=n+s))for(var u=-1;u<=1;u+=1)o+u<0||e<=o+u||0==s&&0==u||a==t.isDark(n+s,o+u)&&(i+=1);i>5&&(r+=3+i-5);}for(n=0;n<e-1;n+=1)for(o=0;o<e-1;o+=1){var h=0;t.isDark(n,o)&&(h+=1),t.isDark(n+1,o)&&(h+=1),t.isDark(n,o+1)&&(h+=1),t.isDark(n+1,o+1)&&(h+=1),0!=h&&4!=h||(r+=3);}for(n=0;n<e;n+=1)for(o=0;o<e-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)&&(r+=40);for(o=0;o<e;o+=1)for(n=0;n<e-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)&&(r+=40);var c=0;for(o=0;o<e;o+=1)for(n=0;n<e;n+=1)t.isDark(n,o)&&(c+=1);return r+Math.abs(100*c/e/e-50)/5*10},o),u=function(){for(var t=new Array(256),e=new Array(256),r=0;r<8;r+=1)t[r]=1<<r;for(r=8;r<256;r+=1)t[r]=t[r-4]^t[r-5]^t[r-6]^t[r-8];for(r=0;r<255;r+=1)e[t[r]]=r;return {glog:function(t){if(t<1)throw "glog("+t+")";return e[t]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return t[e]}}}();function h(t,e){if(void 0===t.length)throw t.length+"/"+e;var r=function(){for(var r=0;r<t.length&&0==t[r];)r+=1;for(var n=new Array(t.length-r+e),o=0;o<t.length-r;o+=1)n[o]=t[o+r];return n}(),n={getAt:function(t){return r[t]},getLength:function(){return r.length},multiply:function(t){for(var e=new Array(n.getLength()+t.getLength()-1),r=0;r<n.getLength();r+=1)for(var o=0;o<t.getLength();o+=1)e[r+o]^=u.gexp(u.glog(n.getAt(r))+u.glog(t.getAt(o)));return h(e,0)},mod:function(t){if(n.getLength()-t.getLength()<0)return n;for(var e=u.glog(n.getAt(0))-u.glog(t.getAt(0)),r=new Array(n.getLength()),o=0;o<n.getLength();o+=1)r[o]=n.getAt(o);for(o=0;o<t.getLength();o+=1)r[o]^=u.gexp(u.glog(t.getAt(o))+e);return h(r,0).mod(t)}};return n}var c=function(){var t=[[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]],e=function(t,e){var r={};return r.totalCount=t,r.dataCount=e,r},r={getRSBlocks:function(r,n){var o=function(e,r){switch(r){case a.L:return t[4*(e-1)+0];case a.M:return t[4*(e-1)+1];case a.Q:return t[4*(e-1)+2];case a.H:return t[4*(e-1)+3];default:return}}(r,n);if(void 0===o)throw "bad rs block @ typeNumber:"+r+"/errorCorrectionLevel:"+n;for(var i=o.length/3,s=[],u=0;u<i;u+=1)for(var h=o[3*u+0],c=o[3*u+1],l=o[3*u+2],d=0;d<h;d+=1)s.push(e(c,l));return s}};return r}(),l=function(){var t=[],e=0,r={getBuffer:function(){return t},getAt:function(e){var r=Math.floor(e/8);return 1==(t[r]>>>7-e%8&1)},put:function(t,e){for(var n=0;n<e;n+=1)r.putBit(1==(t>>>e-n-1&1));},getLengthInBits:function(){return e},putBit:function(r){var n=Math.floor(e/8);t.length<=n&&t.push(0),r&&(t[n]|=128>>>e%8),e+=1;}};return r},d=function(t){var e=t,r={getMode:function(){return 1},getLength:function(t){return e.length},write:function(t){for(var r=e,o=0;o+2<r.length;)t.put(n(r.substring(o,o+3)),10),o+=3;o<r.length&&(r.length-o==1?t.put(n(r.substring(o,o+1)),4):r.length-o==2&&t.put(n(r.substring(o,o+2)),7));}},n=function(t){for(var e=0,r=0;r<t.length;r+=1)e=10*e+o(t.charAt(r));return e},o=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);throw "illegal char :"+t};return r},f=function(t){var e=t,r={getMode:function(){return 2},getLength:function(t){return e.length},write:function(t){for(var r=e,o=0;o+1<r.length;)t.put(45*n(r.charAt(o))+n(r.charAt(o+1)),11),o+=2;o<r.length&&t.put(n(r.charAt(o)),6);}},n=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 r},g=function(e){var r=t.stringToBytes(e);return {getMode:function(){return 4},getLength:function(t){return r.length},write:function(t){for(var e=0;e<r.length;e+=1)t.put(r[e],8);}}},p=function(e){var r=t.stringToBytesFuncs.SJIS;if(!r)throw "sjis not supported.";!function(t,e){var n=r("友");if(2!=n.length||38726!=(n[0]<<8|n[1]))throw "sjis not supported."}();var n=r(e);return {getMode:function(){return 8},getLength:function(t){return ~~(n.length/2)},write:function(t){for(var e=n,r=0;r+1<e.length;){var o=(255&e[r])<<8|255&e[r+1];if(33088<=o&&o<=40956)o-=33088;else {if(!(57408<=o&&o<=60351))throw "illegal char at "+(r+1)+"/"+o;o-=49472;}o=192*(o>>>8&255)+(255&o),t.put(o,13),r+=2;}if(r<e.length)throw "illegal char at "+(r+1)}}},v=function(){var t=[],e={writeByte:function(e){t.push(255&e);},writeShort:function(t){e.writeByte(t),e.writeByte(t>>>8);},writeBytes:function(t,r,n){r=r||0,n=n||t.length;for(var o=0;o<n;o+=1)e.writeByte(t[o+r]);},writeString:function(t){for(var r=0;r<t.length;r+=1)e.writeByte(t.charCodeAt(r));},toByteArray:function(){return t},toString:function(){var e="";e+="[";for(var r=0;r<t.length;r+=1)r>0&&(e+=","),e+=t[r];return e+"]"}};return e},w=function(t){var e=t,r=0,n=0,o=0,i={read:function(){for(;o<8;){if(r>=e.length){if(0==o)return -1;throw "unexpected end of file./"+o}var t=e.charAt(r);if(r+=1,"="==t)return o=0,-1;t.match(/^\s$/)||(n=n<<6|a(t.charCodeAt(0)),o+=6);}var i=n>>>o-8&255;return o-=8,i}},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 i},y=function(t,e,r){for(var n=function(t,e){var r=t,n=e,o=new Array(t*e),i={setPixel:function(t,e,n){o[e*r+t]=n;},write:function(t){t.writeString("GIF87a"),t.writeShort(r),t.writeShort(n),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(r),t.writeShort(n),t.writeByte(0);var e=a(2);t.writeByte(2);for(var o=0;e.length-o>255;)t.writeByte(255),t.writeBytes(e,o,255),o+=255;t.writeByte(e.length-o),t.writeBytes(e,o,e.length-o),t.writeByte(0),t.writeString(";");}},a=function(t){for(var e=1<<t,r=1+(1<<t),n=t+1,i=s(),a=0;a<e;a+=1)i.add(String.fromCharCode(a));i.add(String.fromCharCode(e)),i.add(String.fromCharCode(r));var u,h,c,l=v(),d=(u=l,h=0,c=0,{write:function(t,e){if(t>>>e!=0)throw "length over";for(;h+e>=8;)u.writeByte(255&(t<<h|c)),e-=8-h,t>>>=8-h,c=0,h=0;c|=t<<h,h+=e;},flush:function(){h>0&&u.writeByte(c);}});d.write(e,n);var f=0,g=String.fromCharCode(o[f]);for(f+=1;f<o.length;){var p=String.fromCharCode(o[f]);f+=1,i.contains(g+p)?g+=p:(d.write(i.indexOf(g),n),i.size()<4095&&(i.size()==1<<n&&(n+=1),i.add(g+p)),g=p);}return d.write(i.indexOf(g),n),d.write(r,n),d.flush(),l.toByteArray()},s=function(){var t={},e=0,r={add:function(n){if(r.contains(n))throw "dup key:"+n;t[n]=e,e+=1;},size:function(){return e},indexOf:function(e){return t[e]},contains:function(e){return void 0!==t[e]}};return r};return i}(t,e),o=0;o<e;o+=1)for(var i=0;i<t;i+=1)n.setPixel(i,o,r(i,o));var a=v();n.write(a);for(var s=function(){var t=0,e=0,r=0,n="",o={},i=function(t){n+=String.fromCharCode(a(63&t));},a=function(t){if(t<0);else {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};return o.writeByte=function(n){for(t=t<<8|255&n,e+=8,r+=1;e>=6;)i(t>>>e-6),e-=6;},o.flush=function(){if(e>0&&(i(t<<6-e),t=0,e=0),r%3!=0)for(var o=3-r%3,a=0;a<o;a+=1)n+="=";},o.toString=function(){return n},o}(),u=a.toByteArray(),h=0;h<u.length;h+=1)s.writeByte(u[h]);return s.flush(),"data:image/gif;base64,"+s};return t}();o.stringToBytesFuncs["UTF-8"]=function(t){return function(t){for(var e=[],r=0;r<t.length;r++){var n=t.charCodeAt(r);n<128?e.push(n):n<2048?e.push(192|n>>6,128|63&n):n<55296||n>=57344?e.push(224|n>>12,128|n>>6&63,128|63&n):(r++,n=65536+((1023&n)<<10|1023&t.charCodeAt(r)),e.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n));}return e}(t)},void 0===(n="function"==typeof(r=function(){return o})?r.apply(e,[]):r)||(t.exports=n);},676:(t,e,r)=>{r.d(e,{default:()=>q});var n=function(){return (n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n},i=function(t){return !!t&&"object"==typeof t&&!Array.isArray(t)};function a(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(!e.length)return t;var s=e.shift();return void 0!==s&&i(t)&&i(s)?(t=n({},t),Object.keys(s).forEach((function(e){var r=t[e],n=s[e];Array.isArray(r)&&Array.isArray(n)?t[e]=n:i(r)&&i(n)?t[e]=a(Object.assign({},r),n):t[e]=n;})),a.apply(void 0,o([t],e))):t}function s(t,e){var r=document.createElement("a");r.download=e,r.href=t,document.body.appendChild(r),r.click(),document.body.removeChild(r);}function u(t){return e=this,r=void 0,o=function(){return function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a);}catch(t){i=[6,t],n=0;}finally{r=o=0;}if(5&i[0])throw i[1];return {value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}(this,(function(e){return [2,new Promise((function(e){var r=new XMLHttpRequest;r.onload=function(){var t=new FileReader;t.onloadend=function(){e(t.result);},t.readAsDataURL(r.response);},r.open("GET",t),r.responseType="blob",r.send();}))]}))},new((n=void 0)||(n=Promise))((function(t,i){function a(t){try{u(o.next(t));}catch(t){i(t);}}function s(t){try{u(o.throw(t));}catch(t){i(t);}}function u(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(t){t(r);}))).then(a,s);}u((o=o.apply(e,r||[])).next());}));var e,r,n,o;}const h={L:.07,M:.15,Q:.25,H:.3};var c=function(){return (c=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};const l=function(){function t(t){var e=t.svg,r=t.type;this._svg=e,this._type=r;}return t.prototype.draw=function(t,e,r,n){var o;switch(this._type){case"dots":o=this._drawDot;break;case"classy":o=this._drawClassy;break;case"classy-rounded":o=this._drawClassyRounded;break;case"rounded":o=this._drawRounded;break;case"extra-rounded":o=this._drawExtraRounded;break;case"square":default:o=this._drawSquare;}o.call(this,{x:t,y:e,size:r,getNeighbor:n});},t.prototype._rotateFigure=function(t){var e,r=t.x,n=t.y,o=t.size,i=t.rotation,a=void 0===i?0:i,s=r+o/2,u=n+o/2;(0, t.draw)(),null===(e=this._element)||void 0===e||e.setAttribute("transform","rotate("+180*a/Math.PI+","+s+","+u+")");},t.prototype._basicDot=function(t){var e=this,r=t.size,n=t.x,o=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),e._element.setAttribute("cx",String(n+r/2)),e._element.setAttribute("cy",String(o+r/2)),e._element.setAttribute("r",String(r/2));}}));},t.prototype._basicSquare=function(t){var e=this,r=t.size,n=t.x,o=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),e._element.setAttribute("x",String(n)),e._element.setAttribute("y",String(o)),e._element.setAttribute("width",String(r)),e._element.setAttribute("height",String(r));}}));},t.prototype._basicSideRounded=function(t){var e=this,r=t.size,n=t.x,o=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+n+" "+o+"v "+r+"h "+r/2+"a "+r/2+" "+r/2+", 0, 0, 0, 0 "+-r);}}));},t.prototype._basicCornerRounded=function(t){var e=this,r=t.size,n=t.x,o=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+n+" "+o+"v "+r+"h "+r+"v "+-r/2+"a "+r/2+" "+r/2+", 0, 0, 0, "+-r/2+" "+-r/2);}}));},t.prototype._basicCornerExtraRounded=function(t){var e=this,r=t.size,n=t.x,o=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+n+" "+o+"v "+r+"h "+r+"a "+r+" "+r+", 0, 0, 0, "+-r+" "+-r);}}));},t.prototype._basicCornersRounded=function(t){var e=this,r=t.size,n=t.x,o=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+n+" "+o+"v "+r/2+"a "+r/2+" "+r/2+", 0, 0, 0, "+r/2+" "+r/2+"h "+r/2+"v "+-r/2+"a "+r/2+" "+r/2+", 0, 0, 0, "+-r/2+" "+-r/2);}}));},t.prototype._drawDot=function(t){var e=t.x,r=t.y,n=t.size;this._basicDot({x:e,y:r,size:n,rotation:0});},t.prototype._drawSquare=function(t){var e=t.x,r=t.y,n=t.size;this._basicSquare({x:e,y:r,size:n,rotation:0});},t.prototype._drawRounded=function(t){var e=t.x,r=t.y,n=t.size,o=t.getNeighbor,i=o?+o(-1,0):0,a=o?+o(1,0):0,s=o?+o(0,-1):0,u=o?+o(0,1):0,h=i+a+s+u;if(0!==h)if(h>2||i&&a||s&&u)this._basicSquare({x:e,y:r,size:n,rotation:0});else {if(2===h){var c=0;return i&&s?c=Math.PI/2:s&&a?c=Math.PI:a&&u&&(c=-Math.PI/2),void this._basicCornerRounded({x:e,y:r,size:n,rotation:c})}if(1===h)return c=0,s?c=Math.PI/2:a?c=Math.PI:u&&(c=-Math.PI/2),void this._basicSideRounded({x:e,y:r,size:n,rotation:c})}else this._basicDot({x:e,y:r,size:n,rotation:0});},t.prototype._drawExtraRounded=function(t){var e=t.x,r=t.y,n=t.size,o=t.getNeighbor,i=o?+o(-1,0):0,a=o?+o(1,0):0,s=o?+o(0,-1):0,u=o?+o(0,1):0,h=i+a+s+u;if(0!==h)if(h>2||i&&a||s&&u)this._basicSquare({x:e,y:r,size:n,rotation:0});else {if(2===h){var c=0;return i&&s?c=Math.PI/2:s&&a?c=Math.PI:a&&u&&(c=-Math.PI/2),void this._basicCornerExtraRounded({x:e,y:r,size:n,rotation:c})}if(1===h)return c=0,s?c=Math.PI/2:a?c=Math.PI:u&&(c=-Math.PI/2),void this._basicSideRounded({x:e,y:r,size:n,rotation:c})}else this._basicDot({x:e,y:r,size:n,rotation:0});},t.prototype._drawClassy=function(t){var e=t.x,r=t.y,n=t.size,o=t.getNeighbor,i=o?+o(-1,0):0,a=o?+o(1,0):0,s=o?+o(0,-1):0,u=o?+o(0,1):0;0!==i+a+s+u?i||s?a||u?this._basicSquare({x:e,y:r,size:n,rotation:0}):this._basicCornerRounded({x:e,y:r,size:n,rotation:Math.PI/2}):this._basicCornerRounded({x:e,y:r,size:n,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:r,size:n,rotation:Math.PI/2});},t.prototype._drawClassyRounded=function(t){var e=t.x,r=t.y,n=t.size,o=t.getNeighbor,i=o?+o(-1,0):0,a=o?+o(1,0):0,s=o?+o(0,-1):0,u=o?+o(0,1):0;0!==i+a+s+u?i||s?a||u?this._basicSquare({x:e,y:r,size:n,rotation:0}):this._basicCornerExtraRounded({x:e,y:r,size:n,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:e,y:r,size:n,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:r,size:n,rotation:Math.PI/2});},t}();var d=function(){return (d=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};const f=function(){function t(t){var e=t.svg,r=t.type;this._svg=e,this._type=r;}return t.prototype.draw=function(t,e,r,n){var o;switch(this._type){case"square":o=this._drawSquare;break;case"extra-rounded":o=this._drawExtraRounded;break;case"dot":default:o=this._drawDot;}o.call(this,{x:t,y:e,size:r,rotation:n});},t.prototype._rotateFigure=function(t){var e,r=t.x,n=t.y,o=t.size,i=t.rotation,a=void 0===i?0:i,s=r+o/2,u=n+o/2;(0, t.draw)(),null===(e=this._element)||void 0===e||e.setAttribute("transform","rotate("+180*a/Math.PI+","+s+","+u+")");},t.prototype._basicDot=function(t){var e=this,r=t.size,n=t.x,o=t.y,i=r/7;this._rotateFigure(d(d({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("clip-rule","evenodd"),e._element.setAttribute("d","M "+(n+r/2)+" "+o+"a "+r/2+" "+r/2+" 0 1 0 0.1 0zm 0 "+i+"a "+(r/2-i)+" "+(r/2-i)+" 0 1 1 -0.1 0Z");}}));},t.prototype._basicSquare=function(t){var e=this,r=t.size,n=t.x,o=t.y,i=r/7;this._rotateFigure(d(d({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("clip-rule","evenodd"),e._element.setAttribute("d","M "+n+" "+o+"v "+r+"h "+r+"v "+-r+"zM "+(n+i)+" "+(o+i)+"h "+(r-2*i)+"v "+(r-2*i)+"h "+(2*i-r)+"z");}}));},t.prototype._basicExtraRounded=function(t){var e=this,r=t.size,n=t.x,o=t.y,i=r/7;this._rotateFigure(d(d({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("clip-rule","evenodd"),e._element.setAttribute("d","M "+n+" "+(o+2.5*i)+"v "+2*i+"a "+2.5*i+" "+2.5*i+", 0, 0, 0, "+2.5*i+" "+2.5*i+"h "+2*i+"a "+2.5*i+" "+2.5*i+", 0, 0, 0, "+2.5*i+" "+2.5*-i+"v "+-2*i+"a "+2.5*i+" "+2.5*i+", 0, 0, 0, "+2.5*-i+" "+2.5*-i+"h "+-2*i+"a "+2.5*i+" "+2.5*i+", 0, 0, 0, "+2.5*-i+" "+2.5*i+"M "+(n+2.5*i)+" "+(o+i)+"h "+2*i+"a "+1.5*i+" "+1.5*i+", 0, 0, 1, "+1.5*i+" "+1.5*i+"v "+2*i+"a "+1.5*i+" "+1.5*i+", 0, 0, 1, "+1.5*-i+" "+1.5*i+"h "+-2*i+"a "+1.5*i+" "+1.5*i+", 0, 0, 1, "+1.5*-i+" "+1.5*-i+"v "+-2*i+"a "+1.5*i+" "+1.5*i+", 0, 0, 1, "+1.5*i+" "+1.5*-i);}}));},t.prototype._drawDot=function(t){var e=t.x,r=t.y,n=t.size,o=t.rotation;this._basicDot({x:e,y:r,size:n,rotation:o});},t.prototype._drawSquare=function(t){var e=t.x,r=t.y,n=t.size,o=t.rotation;this._basicSquare({x:e,y:r,size:n,rotation:o});},t.prototype._drawExtraRounded=function(t){var e=t.x,r=t.y,n=t.size,o=t.rotation;this._basicExtraRounded({x:e,y:r,size:n,rotation:o});},t}();var g=function(){return (g=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};const p=function(){function t(t){var e=t.svg,r=t.type;this._svg=e,this._type=r;}return t.prototype.draw=function(t,e,r,n){var o;switch(this._type){case"square":o=this._drawSquare;break;case"dot":default:o=this._drawDot;}o.call(this,{x:t,y:e,size:r,rotation:n});},t.prototype._rotateFigure=function(t){var e,r=t.x,n=t.y,o=t.size,i=t.rotation,a=void 0===i?0:i,s=r+o/2,u=n+o/2;(0, t.draw)(),null===(e=this._element)||void 0===e||e.setAttribute("transform","rotate("+180*a/Math.PI+","+s+","+u+")");},t.prototype._basicDot=function(t){var e=this,r=t.size,n=t.x,o=t.y;this._rotateFigure(g(g({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),e._element.setAttribute("cx",String(n+r/2)),e._element.setAttribute("cy",String(o+r/2)),e._element.setAttribute("r",String(r/2));}}));},t.prototype._basicSquare=function(t){var e=this,r=t.size,n=t.x,o=t.y;this._rotateFigure(g(g({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),e._element.setAttribute("x",String(n)),e._element.setAttribute("y",String(o)),e._element.setAttribute("width",String(r)),e._element.setAttribute("height",String(r));}}));},t.prototype._drawDot=function(t){var e=t.x,r=t.y,n=t.size,o=t.rotation;this._basicDot({x:e,y:r,size:n,rotation:o});},t.prototype._drawSquare=function(t){var e=t.x,r=t.y,n=t.size,o=t.rotation;this._basicSquare({x:e,y:r,size:n,rotation:o});},t}(),v="circle";var w=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t));}catch(t){i(t);}}function s(t){try{u(n.throw(t));}catch(t){i(t);}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e);}))).then(a,s);}u((n=n.apply(t,e||[])).next());}))},y=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a);}catch(t){i=[6,t],n=0;}finally{r=o=0;}if(5&i[0])throw i[1];return {value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},m=[[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]],b=[[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]];const _=function(){function t(t){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(t.width)),this._element.setAttribute("height",String(t.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._options=t;}return Object.defineProperty(t.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),t.prototype.getElement=function(){return this._element},t.prototype.drawQR=function(t){return w(this,void 0,void 0,(function(){var e,r,n,o,i,a,s,u,c,l,d=this;return y(this,(function(f){switch(f.label){case 0:return e=t.getModuleCount(),r=Math.min(this._options.width,this._options.height)-2*this._options.margin,n=this._options.shape===v?r/Math.sqrt(2):r,o=Math.floor(n/e),i={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=t,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(f.sent(),!this._image)return [2];a=this._options,s=a.imageOptions,u=a.qrOptions,c=s.imageSize*h[u.errorCorrectionLevel],l=Math.floor(c*e*e),i=function(t){var e=t.originalHeight,r=t.originalWidth,n=t.maxHiddenDots,o=t.maxHiddenAxisDots,i=t.dotSize,a={x:0,y:0},s={x:0,y:0};if(e<=0||r<=0||n<=0||i<=0)return {height:0,width:0,hideYDots:0,hideXDots:0};var u=e/r;return a.x=Math.floor(Math.sqrt(n/u)),a.x<=0&&(a.x=1),o&&o<a.x&&(a.x=o),a.x%2==0&&a.x--,s.x=a.x*i,a.y=1+2*Math.ceil((a.x*u-1)/2),s.y=Math.round(s.x*u),(a.y*a.x>n||o&&o<a.y)&&(o&&o<a.y?(a.y=o,a.y%2==0&&a.x--):a.y-=2,s.y=a.y*i,a.x=1+2*Math.ceil((a.y/u-1)/2),s.x=Math.round(s.y/u)),{height:s.y,width:s.x,hideYDots:a.y,hideXDots:a.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:l,maxHiddenAxisDots:e-14,dotSize:o}),f.label=2;case 2:return this.drawBackground(),this.drawDots((function(t,r){var n,o,a,s,u,h;return !(d._options.imageOptions.hideBackgroundDots&&t>=(e-i.hideXDots)/2&&t<(e+i.hideXDots)/2&&r>=(e-i.hideYDots)/2&&r<(e+i.hideYDots)/2||(null===(n=m[t])||void 0===n?void 0:n[r])||(null===(o=m[t-e+7])||void 0===o?void 0:o[r])||(null===(a=m[t])||void 0===a?void 0:a[r-e+7])||(null===(s=b[t])||void 0===s?void 0:s[r])||(null===(u=b[t-e+7])||void 0===u?void 0:u[r])||(null===(h=b[t])||void 0===h?void 0:h[r-e+7]))})),this.drawCorners(),this._options.image?[4,this.drawImage({width:i.width,height:i.height,count:e,dotSize:o})]:[3,4];case 3:f.sent(),f.label=4;case 4:return [2]}}))}))},t.prototype.drawBackground=function(){var t,e,r,n=this._element,o=this._options;if(n){var i=null===(t=o.backgroundOptions)||void 0===t?void 0:t.gradient,a=null===(e=o.backgroundOptions)||void 0===e?void 0:e.color;if((i||a)&&this._createColor({options:i,color:a,additionalRotation:0,x:0,y:0,height:o.height,width:o.width,name:"background-color"}),null===(r=o.backgroundOptions)||void 0===r?void 0:r.round){var s=Math.min(o.width,o.height),u=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),u.setAttribute("x",String((o.width-s)/2)),u.setAttribute("y",String((o.height-s)/2)),u.setAttribute("width",String(s)),u.setAttribute("height",String(s)),u.setAttribute("rx",String(s/2*o.backgroundOptions.round)),this._backgroundClipPath.appendChild(u);}}},t.prototype.drawDots=function(t){var e,r,n=this;if(!this._qr)throw "QR code is not defined";var o=this._options,i=this._qr.getModuleCount();if(i>o.width||i>o.height)throw "The canvas is too small.";var a=Math.min(o.width,o.height)-2*o.margin,s=o.shape===v?a/Math.sqrt(2):a,u=Math.floor(s/i),h=Math.floor((o.width-i*u)/2),c=Math.floor((o.height-i*u)/2),d=new l({svg:this._element,type:o.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(e=o.dotsOptions)||void 0===e?void 0:e.gradient,color:o.dotsOptions.color,additionalRotation:0,x:0,y:0,height:o.height,width:o.width,name:"dot-color"});for(var f=function(e){for(var o=function(o){return t&&!t(e,o)?"continue":(null===(r=g._qr)||void 0===r?void 0:r.isDark(e,o))?(d.draw(h+e*u,c+o*u,u,(function(r,a){return !(e+r<0||o+a<0||e+r>=i||o+a>=i)&&!(t&&!t(e+r,o+a))&&!!n._qr&&n._qr.isDark(e+r,o+a)})),void(d._element&&g._dotsClipPath&&g._dotsClipPath.appendChild(d._element))):"continue"},a=0;a<i;a++)o(a);},g=this,p=0;p<i;p++)f(p);if(o.shape===v){var w=Math.floor((a/u-i)/2),y=i+2*w,m=h-w*u,b=c-w*u,_=[],x=Math.floor(y/2);for(p=0;p<y;p++){_[p]=[];for(var S=0;S<y;S++)p>=w-1&&p<=y-w&&S>=w-1&&S<=y-w||Math.sqrt((p-x)*(p-x)+(S-x)*(S-x))>x?_[p][S]=0:_[p][S]=this._qr.isDark(S-2*w<0?S:S>=i?S-2*w:S-w,p-2*w<0?p:p>=i?p-2*w:p-w)?1:0;}var M=function(t){for(var e=function(e){if(!_[t][e])return "continue";d.draw(m+t*u,b+e*u,u,(function(r,n){var o;return !!(null===(o=_[t+r])||void 0===o?void 0:o[e+n])})),d._element&&C._dotsClipPath&&C._dotsClipPath.appendChild(d._element);},r=0;r<y;r++)e(r);},C=this;for(p=0;p<y;p++)M(p);}},t.prototype.drawCorners=function(){var t=this;if(!this._qr)throw "QR code is not defined";var e=this._element,r=this._options;if(!e)throw "Element code is not defined";var n=this._qr.getModuleCount(),o=Math.min(r.width,r.height)-2*r.margin,i=r.shape===v?o/Math.sqrt(2):o,a=Math.floor(i/n),s=7*a,u=3*a,h=Math.floor((r.width-n*a)/2),c=Math.floor((r.height-n*a)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((function(e){var o,i,d,g,v,w,y,_,x,S,M,C,A=e[0],k=e[1],O=e[2],D=h+A*a*(n-7),P=c+k*a*(n-7),z=t._dotsClipPath,B=t._dotsClipPath;if(((null===(o=r.cornersSquareOptions)||void 0===o?void 0:o.gradient)||(null===(i=r.cornersSquareOptions)||void 0===i?void 0:i.color))&&((z=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+A+"-"+k),t._defs.appendChild(z),t._cornersSquareClipPath=t._cornersDotClipPath=B=z,t._createColor({options:null===(d=r.cornersSquareOptions)||void 0===d?void 0:d.gradient,color:null===(g=r.cornersSquareOptions)||void 0===g?void 0:g.color,additionalRotation:O,x:D,y:P,height:s,width:s,name:"corners-square-color-"+A+"-"+k})),null===(v=r.cornersSquareOptions)||void 0===v?void 0:v.type){var q=new f({svg:t._element,type:r.cornersSquareOptions.type});q.draw(D,P,s,O),q._element&&z&&z.appendChild(q._element);}else for(var I=new l({svg:t._element,type:r.dotsOptions.type}),E=function(t){for(var e=function(e){if(!(null===(w=m[t])||void 0===w?void 0:w[e]))return "continue";I.draw(D+t*a,P+e*a,a,(function(r,n){var o;return !!(null===(o=m[t+r])||void 0===o?void 0:o[e+n])})),I._element&&z&&z.appendChild(I._element);},r=0;r<m[t].length;r++)e(r);},L=0;L<m.length;L++)E(L);if(((null===(y=r.cornersDotOptions)||void 0===y?void 0:y.gradient)||(null===(_=r.cornersDotOptions)||void 0===_?void 0:_.color))&&((B=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+A+"-"+k),t._defs.appendChild(B),t._cornersDotClipPath=B,t._createColor({options:null===(x=r.cornersDotOptions)||void 0===x?void 0:x.gradient,color:null===(S=r.cornersDotOptions)||void 0===S?void 0:S.color,additionalRotation:O,x:D+2*a,y:P+2*a,height:u,width:u,name:"corners-dot-color-"+A+"-"+k})),null===(M=r.cornersDotOptions)||void 0===M?void 0:M.type){var R=new p({svg:t._element,type:r.cornersDotOptions.type});R.draw(D+2*a,P+2*a,u,O),R._element&&B&&B.appendChild(R._element);}else {I=new l({svg:t._element,type:r.dotsOptions.type});var N=function(t){for(var e=function(e){if(!(null===(C=b[t])||void 0===C?void 0:C[e]))return "continue";I.draw(D+t*a,P+e*a,a,(function(r,n){var o;return !!(null===(o=b[t+r])||void 0===o?void 0:o[e+n])})),I._element&&B&&B.appendChild(I._element);},r=0;r<b[t].length;r++)e(r);};for(L=0;L<b.length;L++)N(L);}}));},t.prototype.loadImage=function(){var t=this;return new Promise((function(e,r){var n=t._options,o=new Image;if(!n.image)return r("Image is not defined");"string"==typeof n.imageOptions.crossOrigin&&(o.crossOrigin=n.imageOptions.crossOrigin),t._image=o,o.onload=function(){e();},o.src=n.image;}))},t.prototype.drawImage=function(t){var e=t.width,r=t.height,n=t.count,o=t.dotSize;return w(this,void 0,void 0,(function(){var t,i,a,s,h,c,l,d,f;return y(this,(function(g){switch(g.label){case 0:return t=this._options,i=Math.floor((t.width-n*o)/2),a=Math.floor((t.height-n*o)/2),s=i+t.imageOptions.margin+(n*o-e)/2,h=a+t.imageOptions.margin+(n*o-r)/2,c=e-2*t.imageOptions.margin,l=r-2*t.imageOptions.margin,(d=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(s)),d.setAttribute("y",String(h)),d.setAttribute("width",c+"px"),d.setAttribute("height",l+"px"),[4,u(t.image||"")];case 1:return f=g.sent(),d.setAttribute("href",f||""),this._element.appendChild(d),[2]}}))}))},t.prototype._createColor=function(t){var e=t.options,r=t.color,n=t.additionalRotation,o=t.x,i=t.y,a=t.height,s=t.width,u=t.name,h=s>a?s:a,c=document.createElementNS("http://www.w3.org/2000/svg","rect");if(c.setAttribute("x",String(o)),c.setAttribute("y",String(i)),c.setAttribute("height",String(a)),c.setAttribute("width",String(s)),c.setAttribute("clip-path","url('#clip-path-"+u+"')"),e){var l;if("radial"===e.type)(l=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",u),l.setAttribute("gradientUnits","userSpaceOnUse"),l.setAttribute("fx",String(o+s/2)),l.setAttribute("fy",String(i+a/2)),l.setAttribute("cx",String(o+s/2)),l.setAttribute("cy",String(i+a/2)),l.setAttribute("r",String(h/2));else {var d=((e.rotation||0)+n)%(2*Math.PI),f=(d+2*Math.PI)%(2*Math.PI),g=o+s/2,p=i+a/2,v=o+s/2,w=i+a/2;f>=0&&f<=.25*Math.PI||f>1.75*Math.PI&&f<=2*Math.PI?(g-=s/2,p-=a/2*Math.tan(d),v+=s/2,w+=a/2*Math.tan(d)):f>.25*Math.PI&&f<=.75*Math.PI?(p-=a/2,g-=s/2/Math.tan(d),w+=a/2,v+=s/2/Math.tan(d)):f>.75*Math.PI&&f<=1.25*Math.PI?(g+=s/2,p+=a/2*Math.tan(d),v-=s/2,w-=a/2*Math.tan(d)):f>1.25*Math.PI&&f<=1.75*Math.PI&&(p+=a/2,g+=s/2/Math.tan(d),w-=a/2,v-=s/2/Math.tan(d)),(l=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",u),l.setAttribute("gradientUnits","userSpaceOnUse"),l.setAttribute("x1",String(Math.round(g))),l.setAttribute("y1",String(Math.round(p))),l.setAttribute("x2",String(Math.round(v))),l.setAttribute("y2",String(Math.round(w)));}e.colorStops.forEach((function(t){var e=t.offset,r=t.color,n=document.createElementNS("http://www.w3.org/2000/svg","stop");n.setAttribute("offset",100*e+"%"),n.setAttribute("stop-color",r),l.appendChild(n);})),c.setAttribute("fill","url('#"+u+"')"),this._defs.appendChild(l);}else r&&c.setAttribute("fill",r);this._element.appendChild(c);},t}(),x="canvas";for(var S={},M=0;M<=40;M++)S[M]=M;const C={type:x,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:S[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(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function k(t){var e=A({},t);if(!e.colorStops||!e.colorStops.length)throw "Field 'colorStops' is required in gradient";return e.rotation?e.rotation=Number(e.rotation):e.rotation=0,e.colorStops=e.colorStops.map((function(t){return A(A({},t),{offset:Number(t.offset)})})),e}function O(t){var e=A({},t);return e.width=Number(e.width),e.height=Number(e.height),e.margin=Number(e.margin),e.imageOptions=A(A({},e.imageOptions),{hideBackgroundDots:Boolean(e.imageOptions.hideBackgroundDots),imageSize:Number(e.imageOptions.imageSize),margin:Number(e.imageOptions.margin)}),e.margin>Math.min(e.width,e.height)&&(e.margin=Math.min(e.width,e.height)),e.dotsOptions=A({},e.dotsOptions),e.dotsOptions.gradient&&(e.dotsOptions.gradient=k(e.dotsOptions.gradient)),e.cornersSquareOptions&&(e.cornersSquareOptions=A({},e.cornersSquareOptions),e.cornersSquareOptions.gradient&&(e.cornersSquareOptions.gradient=k(e.cornersSquareOptions.gradient))),e.cornersDotOptions&&(e.cornersDotOptions=A({},e.cornersDotOptions),e.cornersDotOptions.gradient&&(e.cornersDotOptions.gradient=k(e.cornersDotOptions.gradient))),e.backgroundOptions&&(e.backgroundOptions=A({},e.backgroundOptions),e.backgroundOptions.gradient&&(e.backgroundOptions.gradient=k(e.backgroundOptions.gradient))),e}var D=r(192),P=r.n(D),z=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t));}catch(t){i(t);}}function s(t){try{u(n.throw(t));}catch(t){i(t);}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e);}))).then(a,s);}u((n=n.apply(t,e||[])).next());}))},B=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a);}catch(t){i=[6,t],n=0;}finally{r=o=0;}if(5&i[0])throw i[1];return {value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};const q=function(){function t(t){this._options=t?O(a(C,t)):C,this.update();}return t._clearContainer=function(t){t&&(t.innerHTML="");},t.prototype._setupSvg=function(){var t=this;if(this._qr){var e=new _(this._options);this._svg=e.getElement(),this._svgDrawingPromise=e.drawQR(this._qr).then((function(){var r;t._svg&&(null===(r=t._extension)||void 0===r||r.call(t,e.getElement(),t._options));}));}},t.prototype._setupCanvas=function(){var t,e=this;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=null===(t=this._svgDrawingPromise)||void 0===t?void 0:t.then((function(){if(e._svg){var t=e._svg,r=(new XMLSerializer).serializeToString(t),n="data:image/svg+xml;base64,"+btoa(r),o=new Image;return new Promise((function(t){o.onload=function(){var r,n;null===(n=null===(r=e._canvas)||void 0===r?void 0:r.getContext("2d"))||void 0===n||n.drawImage(o,0,0),t();},o.src=n;}))}})));},t.prototype._getElement=function(t){return void 0===t&&(t="png"),z(this,void 0,void 0,(function(){return B(this,(function(e){switch(e.label){case 0:if(!this._qr)throw "QR code is empty";return "svg"!==t.toLowerCase()?[3,2]:(this._svg&&this._svgDrawingPromise||this._setupSvg(),[4,this._svgDrawingPromise]);case 1:return e.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return e.sent(),[2,this._canvas]}}))}))},t.prototype.update=function(e){t._clearContainer(this._container),this._options=e?O(a(this._options,e)):this._options,this._options.data&&(this._qr=P()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(t){switch(!0){case/^[0-9]*$/.test(t):return "Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(t):return "Alphanumeric";default:return "Byte"}}(this._options.data)),this._qr.make(),this._options.type===x?this._setupCanvas():this._setupSvg(),this.append(this._container));},t.prototype.append=function(t){if(t){if("function"!=typeof t.appendChild)throw "Container should be a single DOM node";this._options.type===x?this._canvas&&t.appendChild(this._canvas):this._svg&&t.appendChild(this._svg),this._container=t;}},t.prototype.applyExtension=function(t){if(!t)throw "Extension function should be defined.";this._extension=t,this.update();},t.prototype.deleteExtension=function(){this._extension=void 0,this.update();},t.prototype.getRawData=function(t){return void 0===t&&(t="png"),z(this,void 0,void 0,(function(){var e,r,n;return B(this,(function(o){switch(o.label){case 0:if(!this._qr)throw "QR code is empty";return [4,this._getElement(t)];case 1:return (e=o.sent())?"svg"===t.toLowerCase()?(r=new XMLSerializer,n=r.serializeToString(e),[2,new Blob(['<?xml version="1.0" standalone="no"?>\r\n'+n],{type:"image/svg+xml"})]):[2,new Promise((function(r){return e.toBlob(r,"image/"+t,1)}))]:[2,null]}}))}))},t.prototype.download=function(t){return z(this,void 0,void 0,(function(){var e,r,n,o,i;return B(this,(function(a){switch(a.label){case 0:if(!this._qr)throw "QR code is empty";return e="png",r="qr","string"==typeof t?(e=t,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof t&&null!==t&&(t.name&&(r=t.name),t.extension&&(e=t.extension)),[4,this._getElement(e)];case 1:return (n=a.sent())?("svg"===e.toLowerCase()?(o=new XMLSerializer,i='<?xml version="1.0" standalone="no"?>\r\n'+(i=o.serializeToString(n)),s("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i),r+".svg")):s(n.toDataURL("image/"+e),r+"."+e),[2]):[2]}}))}))},t}();}},e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}return r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]});},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r(676)})().default}));
21
+ //# sourceMappingURL=qr-code-styling.js.map
22
+ });
23
+
24
+ const QRCodeStyling = /*@__PURE__*/getDefaultExportFromCjs(qrCodeStyling);
25
+
26
+ export { QRCodeStyling as Q };
@@ -1,129 +1 @@
1
- import { B as BUILD, c as consoleDevInfo, p as plt, w as win, H, d as doc, N as NAMESPACE, a as promiseResolve, b as bootstrapLazy } from './index-d0db23e4.js';
2
- import { g as globalScripts } from './app-globals-0f993ce5.js';
3
-
4
- /*
5
- Stencil Client Patch Browser v2.19.3 | MIT Licensed | https://stenciljs.com
6
- */
7
- const getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`;
8
- const patchBrowser = () => {
9
- // NOTE!! This fn cannot use async/await!
10
- if (BUILD.isDev && !BUILD.isTesting) {
11
- consoleDevInfo('Running in development mode.');
12
- }
13
- if (BUILD.cssVarShim) {
14
- // shim css vars
15
- plt.$cssShim$ = win.__cssshim;
16
- }
17
- if (BUILD.cloneNodeFix) {
18
- // opted-in to polyfill cloneNode() for slot polyfilled components
19
- patchCloneNodeFix(H.prototype);
20
- }
21
- if (BUILD.profile && !performance.mark) {
22
- // not all browsers support performance.mark/measure (Safari 10)
23
- // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,
24
- // simply stub the implementations out.
25
- // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)
26
- // @ts-ignore
27
- performance.mark = performance.measure = () => {
28
- /*noop*/
29
- };
30
- performance.getEntriesByName = () => [];
31
- }
32
- // @ts-ignore
33
- const scriptElm = BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim
34
- ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) ||
35
- s.getAttribute('data-stencil-namespace') === NAMESPACE)
36
- : null;
37
- const importMeta = import.meta.url;
38
- const opts = BUILD.scriptDataOpts ? scriptElm['data-opts'] || {} : {};
39
- if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {
40
- // Safari < v11 support: This IF is true if it's Safari below v11.
41
- // This fn cannot use async/await since Safari didn't support it until v11,
42
- // however, Safari 10 did support modules. Safari 10 also didn't support "nomodule",
43
- // so both the ESM file and nomodule file would get downloaded. Only Safari
44
- // has 'onbeforeload' in the script, and "history.scrollRestoration" was added
45
- // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.
46
- // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.
47
- return {
48
- then() {
49
- /* promise noop */
50
- },
51
- };
52
- }
53
- if (!BUILD.safari10 && importMeta !== '') {
54
- opts.resourcesUrl = new URL('.', importMeta).href;
55
- }
56
- else if (BUILD.dynamicImportShim || BUILD.safari10) {
57
- opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;
58
- if (BUILD.dynamicImportShim) {
59
- patchDynamicImport(opts.resourcesUrl, scriptElm);
60
- }
61
- if (BUILD.dynamicImportShim && !win.customElements) {
62
- // module support, but no custom elements support (Old Edge)
63
- // @ts-ignore
64
- return import(/* webpackChunkName: "polyfills-dom" */ './dom-1b0cf05d.js').then(() => opts);
65
- }
66
- }
67
- return promiseResolve(opts);
68
- };
69
- const patchDynamicImport = (base, orgScriptElm) => {
70
- const importFunctionName = getDynamicImportFunction(NAMESPACE);
71
- try {
72
- // test if this browser supports dynamic imports
73
- // There is a caching issue in V8, that breaks using import() in Function
74
- // By generating a random string, we can workaround it
75
- // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info
76
- win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);
77
- }
78
- catch (e) {
79
- // this shim is specifically for browsers that do support "esm" imports
80
- // however, they do NOT support "dynamic" imports
81
- // basically this code is for old Edge, v18 and below
82
- const moduleMap = new Map();
83
- win[importFunctionName] = (src) => {
84
- const url = new URL(src, base).href;
85
- let mod = moduleMap.get(url);
86
- if (!mod) {
87
- const script = doc.createElement('script');
88
- script.type = 'module';
89
- script.crossOrigin = orgScriptElm.crossOrigin;
90
- script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {
91
- type: 'application/javascript',
92
- }));
93
- mod = new Promise((resolve) => {
94
- script.onload = () => {
95
- resolve(win[importFunctionName].m);
96
- script.remove();
97
- };
98
- });
99
- moduleMap.set(url, mod);
100
- doc.head.appendChild(script);
101
- }
102
- return mod;
103
- };
104
- }
105
- };
106
- const patchCloneNodeFix = (HTMLElementPrototype) => {
107
- const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
108
- HTMLElementPrototype.cloneNode = function (deep) {
109
- if (this.nodeName === 'TEMPLATE') {
110
- return nativeCloneNodeFn.call(this, deep);
111
- }
112
- const clonedNode = nativeCloneNodeFn.call(this, false);
113
- const srcChildNodes = this.childNodes;
114
- if (deep) {
115
- for (let i = 0; i < srcChildNodes.length; i++) {
116
- // Node.ATTRIBUTE_NODE === 2, and checking because IE11
117
- if (srcChildNodes[i].nodeType !== 2) {
118
- clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
119
- }
120
- }
121
- }
122
- return clonedNode;
123
- };
124
- };
125
-
126
- patchBrowser().then(options => {
127
- globalScripts();
128
- return bootstrapLazy([["gataca-qrdisplay",[[0,"gataca-qrdisplay",{"qrData":[1,"qr-data"],"size":[2],"logoSize":[2,"logo-size"],"logoSrc":[1,"logo-src"],"qrColor":[1,"qr-color"],"rounded":[4]}]]],["gataca-ssibutton",[[1,"gataca-ssibutton",{"buttonText":[1,"button-text"],"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"open":[32],"getSessionData":[64]}]]],["gataca-ssibuttonws",[[1,"gataca-ssibuttonws",{"buttonText":[1,"button-text"],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"open":[32],"getSessionData":[64]}]]],["gataca-qr",[[1,"gataca-qr",{"checkStatus":[16],"createSession":[16],"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"autostart":[4],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"sessionTimeout":[2,"session-timeout"],"pollingFrequency":[2,"polling-frequency"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]}]]],["gataca-qrws",[[1,"gataca-qrws",{"successCallback":[16],"errorCallback":[16],"qrRole":[1,"qr-role"],"callbackServer":[1,"callback-server"],"socketEndpoint":[1,"socket-endpoint"],"sessionTimeout":[2,"session-timeout"],"wsOnOpen":[16],"wsOnMessage":[16],"autostart":[4],"autorefresh":[4],"v2":[4,"v-2"],"qrModalTitle":[1,"qr-modal-title"],"qrModalDescription":[1,"qr-modal-description"],"hideBrandTitle":[4,"hide-brand-title"],"dynamicLink":[4,"dynamic-link"],"sessionId":[32],"authenticationRequest":[32],"sessionData":[32],"result":[32],"display":[64],"stop":[64],"getSessionData":[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["gataca-autoqr",[[1,"gataca-autoqr",{"configId":[1,"config-id"],"configRepository":[1,"config-repository"],"successCallback":[16],"errorCallback":[16],"checkStatus":[16],"createSession":[16],"wsOnOpen":[16],"wsOnMessage":[16],"config":[32],"loading":[32],"getSessionData":[64]}]]]], options);
129
- });
1
+ import{p as e,b as a}from"./p-a5648391.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-5b17ef39",[[1,"gataca-qr",{checkStatus:[16],createSession:[16],successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],autostart:[4],autorefresh:[4],v2:[4,"v-2"],qrModalTitle:[1,"qr-modal-title"],modalTitleColor:[1,"modal-title-color"],qrModalDescription:[1,"qr-modal-description"],hideBrandTitle:[4,"hide-brand-title"],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrCodeExpiredLabel:[1,"qr-code-expired-label"],credentialsNotValidatedLabel:[1,"credentials-not-validated-label"],clickInsideBoxLabel:[1,"click-inside-box-label"],refreshQrLabel:[1,"refresh-qr-label"],scanQrLabel:[1,"scan-qr-label"],userNotScanInTimeErrorLabel:[1,"user-not-scan-in-time-error-label"],credsNotValidatedErrorLabel:[1,"creds-not-validated-error-label"],failedLoginErrorLabel:[1,"failed-login-error-label"],successLoginLabel:[1,"success-login-label"],byBrandLabel:[1,"by-brand-label"],waitingStartSessionLabel:[1,"waiting-start-session-label"],hideQrModalDescription:[4,"hide-qr-modal-description"],sessionTimeout:[2,"session-timeout"],pollingFrequency:[2,"polling-frequency"],dynamicLink:[4,"dynamic-link"],sessionId:[32],authenticationRequest:[32],sessionData:[32],result:[32],display:[64],stop:[64],getSessionData:[64]}],[0,"gataca-qrdisplay",{qrData:[1,"qr-data"],size:[2],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrColor:[1,"qr-color"],rounded:[4]}]]],["p-5eb106c0",[[1,"gataca-qrws",{successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],socketEndpoint:[1,"socket-endpoint"],sessionTimeout:[2,"session-timeout"],wsOnOpen:[16],wsOnMessage:[16],autostart:[4],autorefresh:[4],v2:[4,"v-2"],qrModalTitle:[1,"qr-modal-title"],qrModalDescription:[1,"qr-modal-description"],hideBrandTitle:[4,"hide-brand-title"],dynamicLink:[4,"dynamic-link"],sessionId:[32],authenticationRequest:[32],sessionData:[32],result:[32],display:[64],stop:[64],getSessionData:[64]},[[2,"sessionMsg","sessionMsgReceived"]]]]],["p-66ad21ac",[[1,"gataca-ssibutton",{buttonText:[1,"button-text"],checkStatus:[16],createSession:[16],successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],sessionTimeout:[2,"session-timeout"],pollingFrequency:[2,"polling-frequency"],autorefresh:[4],v2:[4,"v-2"],qrModalTitle:[1,"qr-modal-title"],modalTitleColor:[1,"modal-title-color"],qrModalDescription:[1,"qr-modal-description"],hideBrandTitle:[4,"hide-brand-title"],dynamicLink:[4,"dynamic-link"],logoSize:[2,"logo-size"],logoSrc:[1,"logo-src"],qrCodeExpiredLabel:[1,"qr-code-expired-label"],credentialsNotValidatedLabel:[1,"credentials-not-validated-label"],clickInsideBoxLabel:[1,"click-inside-box-label"],refreshQrLabel:[1,"refresh-qr-label"],scanQrLabel:[1,"scan-qr-label"],userNotScanInTimeErrorLabel:[1,"user-not-scan-in-time-error-label"],credsNotValidatedErrorLabel:[1,"creds-not-validated-error-label"],failedLoginErrorLabel:[1,"failed-login-error-label"],successLoginLabel:[1,"success-login-label"],byBrandLabel:[1,"by-brand-label"],waitingStartSessionLabel:[1,"waiting-start-session-label"],hideQrModalDescription:[4,"hide-qr-modal-description"],open:[32],getSessionData:[64]}],[1,"gataca-ssibuttonws",{buttonText:[1,"button-text"],successCallback:[16],errorCallback:[16],qrRole:[1,"qr-role"],callbackServer:[1,"callback-server"],socketEndpoint:[1,"socket-endpoint"],sessionTimeout:[2,"session-timeout"],wsOnOpen:[16],wsOnMessage:[16],autostart:[4],autorefresh:[4],v2:[4,"v-2"],qrModalTitle:[1,"qr-modal-title"],qrModalDescription:[1,"qr-modal-description"],hideBrandTitle:[4,"hide-brand-title"],dynamicLink:[4,"dynamic-link"],open:[32],getSessionData:[64]}]]],["p-b834ef88",[[1,"gataca-autoqr",{configId:[1,"config-id"],configRepository:[1,"config-repository"],successCallback:[16],errorCallback:[16],checkStatus:[16],createSession:[16],wsOnOpen:[16],wsOnMessage:[16],config:[32],loading:[32],getSessionData:[64]}]]]],e)));
@@ -1 +1 @@
1
- export { R as RESULT_STATUS, b as base64UrlEncode, c as checkMobile } from './utils-05ba6c9f.js';
1
+ export{R as RESULT_STATUS,b as base64UrlEncode,c as checkMobile}from"./p-b8ba109f.js";
@@ -0,0 +1 @@
1
+ function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r;const n=t((function(t){self,t.exports=(()=>{var t={192:(t,r)=>{var n,i,o=function(){var t=function(t,r){var n=t,i=a[r],o=null,e=0,f=null,g=[],p={},m=function(t,r){o=function(t){for(var r=new Array(t),n=0;n<t;n+=1){r[n]=new Array(t);for(var i=0;i<t;i+=1)r[n][i]=null}return r}(e=4*n+17),M(0,0),M(e-7,0),M(0,e-7),x(),b(),k(t,r),n>=7&&S(t),null==f&&(f=A(n,i,g)),z(f,r)},M=function(t,r){for(var n=-1;n<=7;n+=1)if(!(t+n<=-1||e<=t+n))for(var i=-1;i<=7;i+=1)r+i<=-1||e<=r+i||(o[t+n][r+i]=0<=n&&n<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=i&&i<=4)},b=function(){for(var t=8;t<e-8;t+=1)null==o[t][6]&&(o[t][6]=t%2==0);for(var r=8;r<e-8;r+=1)null==o[6][r]&&(o[6][r]=r%2==0)},x=function(){for(var t=u.getPatternPosition(n),r=0;r<t.length;r+=1)for(var i=0;i<t.length;i+=1){var e=t[r],a=t[i];if(null==o[e][a])for(var f=-2;f<=2;f+=1)for(var c=-2;c<=2;c+=1)o[e+f][a+c]=-2==f||2==f||-2==c||2==c||0==f&&0==c}},S=function(t){for(var r=u.getBCHTypeNumber(n),i=0;i<18;i+=1){var a=!t&&1==(r>>i&1);o[Math.floor(i/3)][i%3+e-8-3]=a}for(i=0;i<18;i+=1)a=!t&&1==(r>>i&1),o[i%3+e-8-3][Math.floor(i/3)]=a},k=function(t,r){for(var n=u.getBCHTypeInfo(i<<3|r),a=0;a<15;a+=1){var f=!t&&1==(n>>a&1);a<6?o[a][8]=f:a<8?o[a+1][8]=f:o[e-15+a][8]=f}for(a=0;a<15;a+=1)f=!t&&1==(n>>a&1),a<8?o[8][e-a-1]=f:a<9?o[8][15-a-1+1]=f:o[8][15-a-1]=f;o[e-8][8]=!t},z=function(t,r){for(var n=-1,i=e-1,a=7,f=0,c=u.getMaskFunction(r),s=e-1;s>0;s-=2)for(6==s&&(s-=1);;){for(var h=0;h<2;h+=1)if(null==o[i][s-h]){var v=!1;f<t.length&&(v=1==(t[f]>>>a&1)),c(i,s-h)&&(v=!v),o[i][s-h]=v,-1==(a-=1)&&(f+=1,a=7)}if((i+=n)<0||e<=i){i-=n,n=-n;break}}},A=function(t,r,n){for(var i=s.getRSBlocks(t,r),o=h(),e=0;e<n.length;e+=1){var a=n[e];o.put(a.getMode(),4),o.put(a.getLength(),u.getLengthInBits(a.getMode(),t)),a.write(o)}var f=0;for(e=0;e<i.length;e+=1)f+=i[e].dataCount;if(o.getLengthInBits()>8*f)throw"code length overflow. ("+o.getLengthInBits()+">"+8*f+")";for(o.getLengthInBits()+4<=8*f&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*f||(o.put(236,8),o.getLengthInBits()>=8*f));)o.put(17,8);return function(t,r){for(var n=0,i=0,o=0,e=new Array(r.length),a=new Array(r.length),f=0;f<r.length;f+=1){var s=r[f].dataCount,h=r[f].totalCount-s;i=Math.max(i,s),o=Math.max(o,h),e[f]=new Array(s);for(var v=0;v<e[f].length;v+=1)e[f][v]=255&t.getBuffer()[v+n];n+=s;var d=u.getErrorCorrectPolynomial(h),l=c(e[f],d.getLength()-1).mod(d);for(a[f]=new Array(d.getLength()-1),v=0;v<a[f].length;v+=1){var w=v+l.getLength()-a[f].length;a[f][v]=w>=0?l.getAt(w):0}}var g=0;for(v=0;v<r.length;v+=1)g+=r[v].totalCount;var p=new Array(g),y=0;for(v=0;v<i;v+=1)for(f=0;f<r.length;f+=1)v<e[f].length&&(p[y]=e[f][v],y+=1);for(v=0;v<o;v+=1)for(f=0;f<r.length;f+=1)v<a[f].length&&(p[y]=a[f][v],y+=1);return p}(o,i)};p.addData=function(t,r){var n=null;switch(r=r||"Byte"){case"Numeric":n=v(t);break;case"Alphanumeric":n=d(t);break;case"Byte":n=l(t);break;case"Kanji":n=w(t);break;default:throw"mode:"+r}g.push(n),f=null},p.isDark=function(t,r){if(t<0||e<=t||r<0||e<=r)throw t+","+r;return o[t][r]},p.getModuleCount=function(){return e},p.make=function(){if(n<1){for(var t=1;t<40;t++){for(var r=s.getRSBlocks(t,i),o=h(),e=0;e<g.length;e++){var a=g[e];o.put(a.getMode(),4),o.put(a.getLength(),u.getLengthInBits(a.getMode(),t)),a.write(o)}var f=0;for(e=0;e<r.length;e++)f+=r[e].dataCount;if(o.getLengthInBits()<=8*f)break}n=t}m(!1,function(){for(var t=0,r=0,n=0;n<8;n+=1){m(!0,n);var i=u.getLostPoint(p);(0==n||t>i)&&(t=i,r=n)}return r}())},p.createTableTag=function(t,r){t=t||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(r=void 0===r?4*t:r)+"px;",n+='">',n+="<tbody>";for(var i=0;i<p.getModuleCount();i+=1){n+="<tr>";for(var o=0;o<p.getModuleCount();o+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+t+"px;",n+=" height: "+t+"px;",n+=" background-color: ",n+=p.isDark(i,o)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return(n+="</tbody>")+"</table>"},p.createSvgTag=function(t,r,n,i){var o={};"object"==typeof arguments[0]&&(t=(o=arguments[0]).cellSize,r=o.margin,n=o.alt,i=o.title),t=t||2,r=void 0===r?4*t:r,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,(i="string"==typeof i?{text:i}:i||{}).text=i.text||null,i.id=i.text?i.id||"qrcode-title":null;var e,a,u,f,c=p.getModuleCount()*t+2*r,s="";for(f="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",s+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',s+=o.scalable?"":' width="'+c+'px" height="'+c+'px"',s+=' viewBox="0 0 '+c+" "+c+'" ',s+=' preserveAspectRatio="xMinYMin meet"',s+=i.text||n.text?' role="img" aria-labelledby="'+O([i.id,n.id].join(" ").trim())+'"':"",s+=">",s+=i.text?'<title id="'+O(i.id)+'">'+O(i.text)+"</title>":"",s+=n.text?'<description id="'+O(n.id)+'">'+O(n.text)+"</description>":"",s+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',s+='<path d="',a=0;a<p.getModuleCount();a+=1)for(u=a*t+r,e=0;e<p.getModuleCount();e+=1)p.isDark(a,e)&&(s+="M"+(e*t+r)+","+u+f);return(s+='" stroke="transparent" fill="black"/>')+"</svg>"},p.createDataURL=function(t,r){t=t||2,r=void 0===r?4*t:r;var n=p.getModuleCount()*t+2*r,i=r,o=n-r;return y(n,n,(function(r,n){if(i<=r&&r<o&&i<=n&&n<o){var e=Math.floor((r-i)/t),a=Math.floor((n-i)/t);return p.isDark(a,e)?0:1}return 1}))},p.createImgTag=function(t,r,n){t=t||2,r=void 0===r?4*t:r;var i=p.getModuleCount()*t+2*r,o="";return o+="<img",o+=' src="',o+=p.createDataURL(t,r),o+='"',o+=' width="',o+=i,o+='"',o+=' height="',o+=i,o+='"',n&&(o+=' alt="',o+=O(n),o+='"'),o+"/>"};var O=function(t){for(var r="",n=0;n<t.length;n+=1){var i=t.charAt(n);switch(i){case"<":r+="&lt;";break;case">":r+="&gt;";break;case"&":r+="&amp;";break;case'"':r+="&quot;";break;default:r+=i}}return r};return p.createASCII=function(t,r){if((t=t||1)<2)return function(t){t=void 0===t?2:t;var r,n,i,o,e,a=1*p.getModuleCount()+2*t,u=t,f=a-t,c={"██":"█","█ ":"▀"," █":"▄"," ":" "},s={"██":"▀","█ ":"▀"," █":" "," ":" "},h="";for(r=0;r<a;r+=2){for(i=Math.floor((r-u)/1),o=Math.floor((r+1-u)/1),n=0;n<a;n+=1)e="█",u<=n&&n<f&&u<=r&&r<f&&p.isDark(i,Math.floor((n-u)/1))&&(e=" "),u<=n&&n<f&&u<=r+1&&r+1<f&&p.isDark(o,Math.floor((n-u)/1))?e+=" ":e+="█",h+=t<1&&r+1>=f?s[e]:c[e];h+="\n"}return a%2&&t>0?h.substring(0,h.length-a-1)+Array(a+1).join("▀"):h.substring(0,h.length-1)}(r);t-=1,r=void 0===r?2*t:r;var n,i,o,e,a=p.getModuleCount()*t+2*r,u=r,f=a-r,c=Array(t+1).join("██"),s=Array(t+1).join(" "),h="",v="";for(n=0;n<a;n+=1){for(o=Math.floor((n-u)/t),v="",i=0;i<a;i+=1)e=1,u<=i&&i<f&&u<=n&&n<f&&p.isDark(o,Math.floor((i-u)/t))&&(e=0),v+=e?c:s;for(o=0;o<t;o+=1)h+=v+"\n"}return h.substring(0,h.length-1)},p.renderTo2dContext=function(t,r){r=r||2;for(var n=p.getModuleCount(),i=0;i<n;i++)for(var o=0;o<n;o++)t.fillStyle=p.isDark(i,o)?"black":"white",t.fillRect(i*r,o*r,r,r)},p};t.stringToBytes=(t.stringToBytesFuncs={default:function(t){for(var r=[],n=0;n<t.length;n+=1){var i=t.charCodeAt(n);r.push(255&i)}return r}}).default,t.createStringToBytes=function(t,r){var n=function(){for(var n=p(t),i=function(){var t=n.read();if(-1==t)throw"eof";return t},o=0,e={};;){var a=n.read();if(-1==a)break;var u=i(),f=i()<<8|i();e[String.fromCharCode(a<<8|u)]=f,o+=1}if(o!=r)throw o+" != "+r;return e}(),i="?".charCodeAt(0);return function(t){for(var r=[],o=0;o<t.length;o+=1){var e=t.charCodeAt(o);if(e<128)r.push(e);else{var a=n[t.charAt(o)];"number"==typeof a?(255&a)==a?r.push(a):(r.push(a>>>8),r.push(255&a)):r.push(i)}}return r}};var r,n,i,o,e,a={L:1,M:0,Q:3,H:2},u=(r=[[],[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]],n=1335,i=7973,e=function(t){for(var r=0;0!=t;)r+=1,t>>>=1;return r},(o={}).getBCHTypeInfo=function(t){for(var r=t<<10;e(r)-e(n)>=0;)r^=n<<e(r)-e(n);return 21522^(t<<10|r)},o.getBCHTypeNumber=function(t){for(var r=t<<12;e(r)-e(i)>=0;)r^=i<<e(r)-e(i);return t<<12|r},o.getPatternPosition=function(t){return r[t-1]},o.getMaskFunction=function(t){switch(t){case 0:return function(t,r){return(t+r)%2==0};case 1:return function(t){return t%2==0};case 2:return function(t,r){return r%3==0};case 3:return function(t,r){return(t+r)%3==0};case 4:return function(t,r){return(Math.floor(t/2)+Math.floor(r/3))%2==0};case 5:return function(t,r){return t*r%2+t*r%3==0};case 6:return function(t,r){return(t*r%2+t*r%3)%2==0};case 7:return function(t,r){return(t*r%3+(t+r)%2)%2==0};default:throw"bad maskPattern:"+t}},o.getErrorCorrectPolynomial=function(t){for(var r=c([1],0),n=0;n<t;n+=1)r=r.multiply(c([1,f.gexp(n)],0));return r},o.getLengthInBits=function(t,r){if(1<=r&&r<10)switch(t){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+t}else if(r<27)switch(t){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+t}else{if(!(r<41))throw"type:"+r;switch(t){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+t}}},o.getLostPoint=function(t){for(var r=t.getModuleCount(),n=0,i=0;i<r;i+=1)for(var o=0;o<r;o+=1){for(var e=0,a=t.isDark(i,o),u=-1;u<=1;u+=1)if(!(i+u<0||r<=i+u))for(var f=-1;f<=1;f+=1)o+f<0||r<=o+f||0==u&&0==f||a==t.isDark(i+u,o+f)&&(e+=1);e>5&&(n+=3+e-5)}for(i=0;i<r-1;i+=1)for(o=0;o<r-1;o+=1){var c=0;t.isDark(i,o)&&(c+=1),t.isDark(i+1,o)&&(c+=1),t.isDark(i,o+1)&&(c+=1),t.isDark(i+1,o+1)&&(c+=1),0!=c&&4!=c||(n+=3)}for(i=0;i<r;i+=1)for(o=0;o<r-6;o+=1)t.isDark(i,o)&&!t.isDark(i,o+1)&&t.isDark(i,o+2)&&t.isDark(i,o+3)&&t.isDark(i,o+4)&&!t.isDark(i,o+5)&&t.isDark(i,o+6)&&(n+=40);for(o=0;o<r;o+=1)for(i=0;i<r-6;i+=1)t.isDark(i,o)&&!t.isDark(i+1,o)&&t.isDark(i+2,o)&&t.isDark(i+3,o)&&t.isDark(i+4,o)&&!t.isDark(i+5,o)&&t.isDark(i+6,o)&&(n+=40);var s=0;for(o=0;o<r;o+=1)for(i=0;i<r;i+=1)t.isDark(i,o)&&(s+=1);return n+Math.abs(100*s/r/r-50)/5*10},o),f=function(){for(var t=new Array(256),r=new Array(256),n=0;n<8;n+=1)t[n]=1<<n;for(n=8;n<256;n+=1)t[n]=t[n-4]^t[n-5]^t[n-6]^t[n-8];for(n=0;n<255;n+=1)r[t[n]]=n;return{glog:function(t){if(t<1)throw"glog("+t+")";return r[t]},gexp:function(r){for(;r<0;)r+=255;for(;r>=256;)r-=255;return t[r]}}}();function c(t,r){if(void 0===t.length)throw t.length+"/"+r;var n=function(){for(var n=0;n<t.length&&0==t[n];)n+=1;for(var i=new Array(t.length-n+r),o=0;o<t.length-n;o+=1)i[o]=t[o+n];return i}(),i={getAt:function(t){return n[t]},getLength:function(){return n.length},multiply:function(t){for(var r=new Array(i.getLength()+t.getLength()-1),n=0;n<i.getLength();n+=1)for(var o=0;o<t.getLength();o+=1)r[n+o]^=f.gexp(f.glog(i.getAt(n))+f.glog(t.getAt(o)));return c(r,0)},mod:function(t){if(i.getLength()-t.getLength()<0)return i;for(var r=f.glog(i.getAt(0))-f.glog(t.getAt(0)),n=new Array(i.getLength()),o=0;o<i.getLength();o+=1)n[o]=i.getAt(o);for(o=0;o<t.getLength();o+=1)n[o]^=f.gexp(f.glog(t.getAt(o))+r);return c(n,0).mod(t)}};return i}var s=function(){var t=[[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,r){var n={};return n.totalCount=t,n.dataCount=r,n};return{getRSBlocks:function(n,i){var o=function(r,n){switch(n){case a.L:return t[4*(r-1)+0];case a.M:return t[4*(r-1)+1];case a.Q:return t[4*(r-1)+2];case a.H:return t[4*(r-1)+3];default:return}}(n,i);if(void 0===o)throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+i;for(var e=o.length/3,u=[],f=0;f<e;f+=1)for(var c=o[3*f+0],s=o[3*f+1],h=o[3*f+2],v=0;v<c;v+=1)u.push(r(s,h));return u}}}(),h=function(){var t=[],r=0,n={getBuffer:function(){return t},getAt:function(r){var n=Math.floor(r/8);return 1==(t[n]>>>7-r%8&1)},put:function(t,r){for(var i=0;i<r;i+=1)n.putBit(1==(t>>>r-i-1&1))},getLengthInBits:function(){return r},putBit:function(n){var i=Math.floor(r/8);t.length<=i&&t.push(0),n&&(t[i]|=128>>>r%8),r+=1}};return n},v=function(t){var r=t,n={getMode:function(){return 1},getLength:function(){return r.length},write:function(t){for(var n=r,o=0;o+2<n.length;)t.put(i(n.substring(o,o+3)),10),o+=3;o<n.length&&(n.length-o==1?t.put(i(n.substring(o,o+1)),4):n.length-o==2&&t.put(i(n.substring(o,o+2)),7))}},i=function(t){for(var r=0,n=0;n<t.length;n+=1)r=10*r+o(t.charAt(n));return r},o=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+t};return n},d=function(t){var r=t,n={getMode:function(){return 2},getLength:function(){return r.length},write:function(t){for(var n=r,o=0;o+1<n.length;)t.put(45*i(n.charAt(o))+i(n.charAt(o+1)),11),o+=2;o<n.length&&t.put(i(n.charAt(o)),6)}},i=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 n},l=function(r){var n=t.stringToBytes(r);return{getMode:function(){return 4},getLength:function(){return n.length},write:function(t){for(var r=0;r<n.length;r+=1)t.put(n[r],8)}}},w=function(r){var n=t.stringToBytesFuncs.SJIS;if(!n)throw"sjis not supported.";!function(){var t=n("友");if(2!=t.length||38726!=(t[0]<<8|t[1]))throw"sjis not supported."}();var i=n(r);return{getMode:function(){return 8},getLength:function(){return~~(i.length/2)},write:function(t){for(var r=i,n=0;n+1<r.length;){var o=(255&r[n])<<8|255&r[n+1];if(33088<=o&&o<=40956)o-=33088;else{if(!(57408<=o&&o<=60351))throw"illegal char at "+(n+1)+"/"+o;o-=49472}t.put(o=192*(o>>>8&255)+(255&o),13),n+=2}if(n<r.length)throw"illegal char at "+(n+1)}}},g=function(){var t=[],r={writeByte:function(r){t.push(255&r)},writeShort:function(t){r.writeByte(t),r.writeByte(t>>>8)},writeBytes:function(t,n,i){n=n||0,i=i||t.length;for(var o=0;o<i;o+=1)r.writeByte(t[o+n])},writeString:function(t){for(var n=0;n<t.length;n+=1)r.writeByte(t.charCodeAt(n))},toByteArray:function(){return t},toString:function(){var r="";r+="[";for(var n=0;n<t.length;n+=1)n>0&&(r+=","),r+=t[n];return r+"]"}};return r},p=function(t){var r=t,n=0,i=0,o=0,e={read:function(){for(;o<8;){if(n>=r.length){if(0==o)return-1;throw"unexpected end of file./"+o}var t=r.charAt(n);if(n+=1,"="==t)return o=0,-1;t.match(/^\s$/)||(i=i<<6|a(t.charCodeAt(0)),o+=6)}var e=i>>>o-8&255;return o-=8,e}},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 e},y=function(t,r,n){for(var i=function(t,r){var n=t,i=r,o=new Array(t*r),e={setPixel:function(t,r,i){o[r*n+t]=i},write:function(t){t.writeString("GIF87a"),t.writeShort(n),t.writeShort(i),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(i),t.writeByte(0);var r=a(2);t.writeByte(2);for(var o=0;r.length-o>255;)t.writeByte(255),t.writeBytes(r,o,255),o+=255;t.writeByte(r.length-o),t.writeBytes(r,o,r.length-o),t.writeByte(0),t.writeString(";")}},a=function(t){for(var r=1<<t,n=1+(1<<t),i=t+1,e=u(),a=0;a<r;a+=1)e.add(String.fromCharCode(a));e.add(String.fromCharCode(r)),e.add(String.fromCharCode(n));var f,c,s,h=g(),v=(f=h,c=0,s=0,{write:function(t,r){if(t>>>r!=0)throw"length over";for(;c+r>=8;)f.writeByte(255&(t<<c|s)),r-=8-c,t>>>=8-c,s=0,c=0;s|=t<<c,c+=r},flush:function(){c>0&&f.writeByte(s)}});v.write(r,i);var d=0,l=String.fromCharCode(o[d]);for(d+=1;d<o.length;){var w=String.fromCharCode(o[d]);d+=1,e.contains(l+w)?l+=w:(v.write(e.indexOf(l),i),e.size()<4095&&(e.size()==1<<i&&(i+=1),e.add(l+w)),l=w)}return v.write(e.indexOf(l),i),v.write(n,i),v.flush(),h.toByteArray()},u=function(){var t={},r=0,n={add:function(i){if(n.contains(i))throw"dup key:"+i;t[i]=r,r+=1},size:function(){return r},indexOf:function(r){return t[r]},contains:function(r){return void 0!==t[r]}};return n};return e}(t,r),o=0;o<r;o+=1)for(var e=0;e<t;e+=1)i.setPixel(e,o,n(e,o));var a=g();i.write(a);for(var u=function(){var t=0,r=0,n=0,i="",o={},e=function(t){i+=String.fromCharCode(a(63&t))},a=function(t){if(t<0);else{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};return o.writeByte=function(i){for(t=t<<8|255&i,r+=8,n+=1;r>=6;)e(t>>>r-6),r-=6},o.flush=function(){if(r>0&&(e(t<<6-r),t=0,r=0),n%3!=0)for(var o=3-n%3,a=0;a<o;a+=1)i+="="},o.toString=function(){return i},o}(),f=a.toByteArray(),c=0;c<f.length;c+=1)u.writeByte(f[c]);return u.flush(),"data:image/gif;base64,"+u};return t}();o.stringToBytesFuncs["UTF-8"]=function(t){return function(t){for(var r=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);i<128?r.push(i):i<2048?r.push(192|i>>6,128|63&i):i<55296||i>=57344?r.push(224|i>>12,128|i>>6&63,128|63&i):(n++,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),r.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i))}return r}(t)},void 0===(i="function"==typeof(n=function(){return o})?n.apply(r,[]):n)||(t.exports=i)},676:(t,r,n)=>{n.d(r,{default:()=>P});var i=function(){return(i=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},o=function(){for(var t=0,r=0,n=arguments.length;r<n;r++)t+=arguments[r].length;var i=Array(t),o=0;for(r=0;r<n;r++)for(var e=arguments[r],a=0,u=e.length;a<u;a++,o++)i[o]=e[a];return i},e=function(t){return!!t&&"object"==typeof t&&!Array.isArray(t)};function a(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!r.length)return t;var u=r.shift();return void 0!==u&&e(t)&&e(u)?(t=i({},t),Object.keys(u).forEach((function(r){var n=t[r],i=u[r];t[r]=Array.isArray(n)&&Array.isArray(i)?i:e(n)&&e(i)?a(Object.assign({},n),i):i})),a.apply(void 0,o([t],r))):t}function u(t,r){var n=document.createElement("a");n.download=r,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function f(t){return r=this,void 0,i=function(){return function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}}(this,(function(){return[2,new Promise((function(r){var n=new XMLHttpRequest;n.onload=function(){var t=new FileReader;t.onloadend=function(){r(t.result)},t.readAsDataURL(n.response)},n.open("GET",t),n.responseType="blob",n.send()}))]}))},new((n=void 0)||(n=Promise))((function(t,o){function e(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i.throw(t))}catch(t){o(t)}}function u(r){var i;r.done?t(r.value):(i=r.value,i instanceof n?i:new n((function(t){t(i)}))).then(e,a)}u((i=i.apply(r,[])).next())}));var r,n,i}const c={L:.07,M:.15,Q:.25,H:.3};var s=function(){return(s=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const h=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){var o;switch(this._type){case"dots":o=this._drawDot;break;case"classy":o=this._drawClassy;break;case"classy-rounded":o=this._drawClassyRounded;break;case"rounded":o=this._drawRounded;break;case"extra-rounded":o=this._drawExtraRounded;break;case"square":default:o=this._drawSquare}o.call(this,{x:t,y:r,size:n,getNeighbor:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),r._element.setAttribute("cx",String(i+n/2)),r._element.setAttribute("cy",String(o+n/2)),r._element.setAttribute("r",String(n/2))}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),r._element.setAttribute("x",String(i)),r._element.setAttribute("y",String(o)),r._element.setAttribute("width",String(n)),r._element.setAttribute("height",String(n))}}))},t.prototype._basicSideRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, 0 "+-n)}}))},t.prototype._basicCornerRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},t.prototype._basicCornerExtraRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"a "+n+" "+n+", 0, 0, 0, "+-n+" "+-n)}}))},t.prototype._basicCornersRounded=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(s(s({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("d","M "+i+" "+o+"v "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+n/2+" "+n/2+"h "+n/2+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:0})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:0})},t.prototype._drawRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0,c=e+a+u+f;if(0!==c)if(c>2||e&&a||u&&f)this._basicSquare({x:r,y:n,size:i,rotation:0});else{if(2===c){var s=0;return e&&u?s=Math.PI/2:u&&a?s=Math.PI:a&&f&&(s=-Math.PI/2),void this._basicCornerRounded({x:r,y:n,size:i,rotation:s})}if(1===c)return s=0,u?s=Math.PI/2:a?s=Math.PI:f&&(s=-Math.PI/2),void this._basicSideRounded({x:r,y:n,size:i,rotation:s})}else this._basicDot({x:r,y:n,size:i,rotation:0})},t.prototype._drawExtraRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0,c=e+a+u+f;if(0!==c)if(c>2||e&&a||u&&f)this._basicSquare({x:r,y:n,size:i,rotation:0});else{if(2===c){var s=0;return e&&u?s=Math.PI/2:u&&a?s=Math.PI:a&&f&&(s=-Math.PI/2),void this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:s})}if(1===c)return s=0,u?s=Math.PI/2:a?s=Math.PI:f&&(s=-Math.PI/2),void this._basicSideRounded({x:r,y:n,size:i,rotation:s})}else this._basicDot({x:r,y:n,size:i,rotation:0})},t.prototype._drawClassy=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0;0!==e+a+u+f?e||u?a||f?this._basicSquare({x:r,y:n,size:i,rotation:0}):this._basicCornerRounded({x:r,y:n,size:i,rotation:Math.PI/2}):this._basicCornerRounded({x:r,y:n,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:r,y:n,size:i,rotation:Math.PI/2})},t.prototype._drawClassyRounded=function(t){var r=t.x,n=t.y,i=t.size,o=t.getNeighbor,e=o?+o(-1,0):0,a=o?+o(1,0):0,u=o?+o(0,-1):0,f=o?+o(0,1):0;0!==e+a+u+f?e||u?a||f?this._basicSquare({x:r,y:n,size:i,rotation:0}):this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:r,y:n,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:r,y:n,size:i,rotation:Math.PI/2})},t}();var v=function(){return(v=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const d=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){var o;switch(this._type){case"square":o=this._drawSquare;break;case"extra-rounded":o=this._drawExtraRounded;break;case"dot":default:o=this._drawDot}o.call(this,{x:t,y:r,size:n,rotation:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y,e=n/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+(i+n/2)+" "+o+"a "+n/2+" "+n/2+" 0 1 0 0.1 0zm 0 "+e+"a "+(n/2-e)+" "+(n/2-e)+" 0 1 1 -0.1 0Z")}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y,e=n/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+i+" "+o+"v "+n+"h "+n+"v "+-n+"zM "+(i+e)+" "+(o+e)+"h "+(n-2*e)+"v "+(n-2*e)+"h "+(2*e-n)+"z")}}))},t.prototype._basicExtraRounded=function(t){var r=this,n=t.x,i=t.y,o=t.size/7;this._rotateFigure(v(v({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","path"),r._element.setAttribute("clip-rule","evenodd"),r._element.setAttribute("d","M "+n+" "+(i+2.5*o)+"v "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*o+"h "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*-o+"v "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*-o+"h "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*o+"M "+(n+2.5*o)+" "+(i+o)+"h "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*o+"v "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*o+"h "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*-o+"v "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*-o)}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawExtraRounded=function(t){this._basicExtraRounded({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t}();var l=function(){return(l=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};const w=function(){function t(t){var r=t.type;this._svg=t.svg,this._type=r}return t.prototype.draw=function(t,r,n,i){var o;switch(this._type){case"square":o=this._drawSquare;break;case"dot":default:o=this._drawDot}o.call(this,{x:t,y:r,size:n,rotation:i})},t.prototype._rotateFigure=function(t){var r,n=t.size,i=t.rotation,o=void 0===i?0:i,e=t.x+n/2,a=t.y+n/2;(0,t.draw)(),null===(r=this._element)||void 0===r||r.setAttribute("transform","rotate("+180*o/Math.PI+","+e+","+a+")")},t.prototype._basicDot=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(l(l({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),r._element.setAttribute("cx",String(i+n/2)),r._element.setAttribute("cy",String(o+n/2)),r._element.setAttribute("r",String(n/2))}}))},t.prototype._basicSquare=function(t){var r=this,n=t.size,i=t.x,o=t.y;this._rotateFigure(l(l({},t),{draw:function(){r._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),r._element.setAttribute("x",String(i)),r._element.setAttribute("y",String(o)),r._element.setAttribute("width",String(n)),r._element.setAttribute("height",String(n))}}))},t.prototype._drawDot=function(t){this._basicDot({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t.prototype._drawSquare=function(t){this._basicSquare({x:t.x,y:t.y,size:t.size,rotation:t.rotation})},t}(),g="circle";var p=function(t,r,n,i){return new(n||(n=Promise))((function(o,e){function a(t){try{f(i.next(t))}catch(t){e(t)}}function u(t){try{f(i.throw(t))}catch(t){e(t)}}function f(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,u)}f((i=i.apply(t,r||[])).next())}))},y=function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}},m=[[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]],M=[[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]];const b=function(){function t(t){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(t.width)),this._element.setAttribute("height",String(t.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._options=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),t.prototype.getElement=function(){return this._element},t.prototype.drawQR=function(t){return p(this,void 0,void 0,(function(){var r,n,i,o,e,a,u,f=this;return y(this,(function(s){switch(s.label){case 0:return r=t.getModuleCount(),n=Math.min(this._options.width,this._options.height)-2*this._options.margin,i=this._options.shape===g?n/Math.sqrt(2):n,o=Math.floor(i/r),e={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=t,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(s.sent(),!this._image)return[2];a=this._options,u=Math.floor(a.imageOptions.imageSize*c[a.qrOptions.errorCorrectionLevel]*r*r),e=function(t){var r=t.originalHeight,n=t.originalWidth,i=t.maxHiddenDots,o=t.maxHiddenAxisDots,e=t.dotSize,a={x:0,y:0},u={x:0,y:0};if(r<=0||n<=0||i<=0||e<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var f=r/n;return a.x=Math.floor(Math.sqrt(i/f)),a.x<=0&&(a.x=1),o&&o<a.x&&(a.x=o),a.x%2==0&&a.x--,u.x=a.x*e,a.y=1+2*Math.ceil((a.x*f-1)/2),u.y=Math.round(u.x*f),(a.y*a.x>i||o&&o<a.y)&&(o&&o<a.y?(a.y=o,a.y%2==0&&a.x--):a.y-=2,u.y=a.y*e,a.x=1+2*Math.ceil((a.y/f-1)/2),u.x=Math.round(u.y/f)),{height:u.y,width:u.x,hideYDots:a.y,hideXDots:a.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:u,maxHiddenAxisDots:r-14,dotSize:o}),s.label=2;case 2:return this.drawBackground(),this.drawDots((function(t,n){var i,o,a,u,c,s;return!(f._options.imageOptions.hideBackgroundDots&&t>=(r-e.hideXDots)/2&&t<(r+e.hideXDots)/2&&n>=(r-e.hideYDots)/2&&n<(r+e.hideYDots)/2||(null===(i=m[t])||void 0===i?void 0:i[n])||(null===(o=m[t-r+7])||void 0===o?void 0:o[n])||(null===(a=m[t])||void 0===a?void 0:a[n-r+7])||(null===(u=M[t])||void 0===u?void 0:u[n])||(null===(c=M[t-r+7])||void 0===c?void 0:c[n])||(null===(s=M[t])||void 0===s?void 0:s[n-r+7]))})),this.drawCorners(),this._options.image?[4,this.drawImage({width:e.width,height:e.height,count:r,dotSize:o})]:[3,4];case 3:s.sent(),s.label=4;case 4:return[2]}}))}))},t.prototype.drawBackground=function(){var t,r,n,i=this._options;if(this._element){var o=null===(t=i.backgroundOptions)||void 0===t?void 0:t.gradient,e=null===(r=i.backgroundOptions)||void 0===r?void 0:r.color;if((o||e)&&this._createColor({options:o,color:e,additionalRotation:0,x:0,y:0,height:i.height,width:i.width,name:"background-color"}),null===(n=i.backgroundOptions)||void 0===n?void 0:n.round){var a=Math.min(i.width,i.height),u=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),u.setAttribute("x",String((i.width-a)/2)),u.setAttribute("y",String((i.height-a)/2)),u.setAttribute("width",String(a)),u.setAttribute("height",String(a)),u.setAttribute("rx",String(a/2*i.backgroundOptions.round)),this._backgroundClipPath.appendChild(u)}}},t.prototype.drawDots=function(t){var r,n,i=this;if(!this._qr)throw"QR code is not defined";var o=this._options,e=this._qr.getModuleCount();if(e>o.width||e>o.height)throw"The canvas is too small.";var a=Math.min(o.width,o.height)-2*o.margin,u=o.shape===g?a/Math.sqrt(2):a,f=Math.floor(u/e),c=Math.floor((o.width-e*f)/2),s=Math.floor((o.height-e*f)/2),v=new h({svg:this._element,type:o.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(r=o.dotsOptions)||void 0===r?void 0:r.gradient,color:o.dotsOptions.color,additionalRotation:0,x:0,y:0,height:o.height,width:o.width,name:"dot-color"});for(var d=function(r){for(var o=function(o){return t&&!t(r,o)?"continue":(null===(n=l._qr)||void 0===n?void 0:n.isDark(r,o))?(v.draw(c+r*f,s+o*f,f,(function(n,a){return!(r+n<0||o+a<0||r+n>=e||o+a>=e)&&!(t&&!t(r+n,o+a))&&!!i._qr&&i._qr.isDark(r+n,o+a)})),void(v._element&&l._dotsClipPath&&l._dotsClipPath.appendChild(v._element))):"continue"},a=0;a<e;a++)o(a)},l=this,w=0;w<e;w++)d(w);if(o.shape===g){var p=Math.floor((a/f-e)/2),y=e+2*p,m=c-p*f,M=s-p*f,b=[],x=Math.floor(y/2);for(w=0;w<y;w++){b[w]=[];for(var S=0;S<y;S++)b[w][S]=w>=p-1&&w<=y-p&&S>=p-1&&S<=y-p||Math.sqrt((w-x)*(w-x)+(S-x)*(S-x))>x?0:this._qr.isDark(S-2*p<0?S:S>=e?S-2*p:S-p,w-2*p<0?w:w>=e?w-2*p:w-p)?1:0}var k=function(t){for(var r=function(r){if(!b[t][r])return"continue";v.draw(m+t*f,M+r*f,f,(function(n,i){var o;return!!(null===(o=b[t+n])||void 0===o?void 0:o[r+i])})),v._element&&z._dotsClipPath&&z._dotsClipPath.appendChild(v._element)},n=0;n<y;n++)r(n)},z=this;for(w=0;w<y;w++)k(w)}},t.prototype.drawCorners=function(){var t=this;if(!this._qr)throw"QR code is not defined";var r=this._options;if(!this._element)throw"Element code is not defined";var n=this._qr.getModuleCount(),i=Math.min(r.width,r.height)-2*r.margin,o=r.shape===g?i/Math.sqrt(2):i,e=Math.floor(o/n),a=7*e,u=3*e,f=Math.floor((r.width-n*e)/2),c=Math.floor((r.height-n*e)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((function(i){var o,s,v,l,g,p,y,b,x,S,k,z,A=i[0],O=i[1],j=i[2],q=f+A*e*(n-7),B=c+O*e*(n-7),L=t._dotsClipPath,R=t._dotsClipPath;if(((null===(o=r.cornersSquareOptions)||void 0===o?void 0:o.gradient)||(null===(s=r.cornersSquareOptions)||void 0===s?void 0:s.color))&&((L=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+A+"-"+O),t._defs.appendChild(L),t._cornersSquareClipPath=t._cornersDotClipPath=R=L,t._createColor({options:null===(v=r.cornersSquareOptions)||void 0===v?void 0:v.gradient,color:null===(l=r.cornersSquareOptions)||void 0===l?void 0:l.color,additionalRotation:j,x:q,y:B,height:a,width:a,name:"corners-square-color-"+A+"-"+O})),null===(g=r.cornersSquareOptions)||void 0===g?void 0:g.type){var P=new d({svg:t._element,type:r.cornersSquareOptions.type});P.draw(q,B,a,j),P._element&&L&&L.appendChild(P._element)}else for(var D=new h({svg:t._element,type:r.dotsOptions.type}),N=function(t){for(var r=function(r){if(!(null===(p=m[t])||void 0===p?void 0:p[r]))return"continue";D.draw(q+t*e,B+r*e,e,(function(n,i){var o;return!!(null===(o=m[t+n])||void 0===o?void 0:o[r+i])})),D._element&&L&&L.appendChild(D._element)},n=0;n<m[t].length;n++)r(n)},Q=0;Q<m.length;Q++)N(Q);if(((null===(y=r.cornersDotOptions)||void 0===y?void 0:y.gradient)||(null===(b=r.cornersDotOptions)||void 0===b?void 0:b.color))&&((R=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+A+"-"+O),t._defs.appendChild(R),t._cornersDotClipPath=R,t._createColor({options:null===(x=r.cornersDotOptions)||void 0===x?void 0:x.gradient,color:null===(S=r.cornersDotOptions)||void 0===S?void 0:S.color,additionalRotation:j,x:q+2*e,y:B+2*e,height:u,width:u,name:"corners-dot-color-"+A+"-"+O})),null===(k=r.cornersDotOptions)||void 0===k?void 0:k.type){var E=new w({svg:t._element,type:r.cornersDotOptions.type});E.draw(q+2*e,B+2*e,u,j),E._element&&R&&R.appendChild(E._element)}else{D=new h({svg:t._element,type:r.dotsOptions.type});var G=function(t){for(var r=function(r){if(!(null===(z=M[t])||void 0===z?void 0:z[r]))return"continue";D.draw(q+t*e,B+r*e,e,(function(n,i){var o;return!!(null===(o=M[t+n])||void 0===o?void 0:o[r+i])})),D._element&&R&&R.appendChild(D._element)},n=0;n<M[t].length;n++)r(n)};for(Q=0;Q<M.length;Q++)G(Q)}}))},t.prototype.loadImage=function(){var t=this;return new Promise((function(r,n){var i=t._options,o=new Image;if(!i.image)return n("Image is not defined");"string"==typeof i.imageOptions.crossOrigin&&(o.crossOrigin=i.imageOptions.crossOrigin),t._image=o,o.onload=function(){r()},o.src=i.image}))},t.prototype.drawImage=function(t){var r=t.width,n=t.height,i=t.count,o=t.dotSize;return p(this,void 0,void 0,(function(){var t,e,a,u,c,s,h,v,d;return y(this,(function(l){switch(l.label){case 0:return t=this._options,e=Math.floor((t.width-i*o)/2),a=Math.floor((t.height-i*o)/2),u=e+t.imageOptions.margin+(i*o-r)/2,c=a+t.imageOptions.margin+(i*o-n)/2,s=r-2*t.imageOptions.margin,h=n-2*t.imageOptions.margin,(v=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(u)),v.setAttribute("y",String(c)),v.setAttribute("width",s+"px"),v.setAttribute("height",h+"px"),[4,f(t.image||"")];case 1:return d=l.sent(),v.setAttribute("href",d||""),this._element.appendChild(v),[2]}}))}))},t.prototype._createColor=function(t){var r=t.options,n=t.color,i=t.additionalRotation,o=t.x,e=t.y,a=t.height,u=t.width,f=t.name,c=u>a?u:a,s=document.createElementNS("http://www.w3.org/2000/svg","rect");if(s.setAttribute("x",String(o)),s.setAttribute("y",String(e)),s.setAttribute("height",String(a)),s.setAttribute("width",String(u)),s.setAttribute("clip-path","url('#clip-path-"+f+"')"),r){var h;if("radial"===r.type)(h=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",f),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("fx",String(o+u/2)),h.setAttribute("fy",String(e+a/2)),h.setAttribute("cx",String(o+u/2)),h.setAttribute("cy",String(e+a/2)),h.setAttribute("r",String(c/2));else{var v=((r.rotation||0)+i)%(2*Math.PI),d=(v+2*Math.PI)%(2*Math.PI),l=o+u/2,w=e+a/2,g=o+u/2,p=e+a/2;d>=0&&d<=.25*Math.PI||d>1.75*Math.PI&&d<=2*Math.PI?(l-=u/2,w-=a/2*Math.tan(v),g+=u/2,p+=a/2*Math.tan(v)):d>.25*Math.PI&&d<=.75*Math.PI?(w-=a/2,l-=u/2/Math.tan(v),p+=a/2,g+=u/2/Math.tan(v)):d>.75*Math.PI&&d<=1.25*Math.PI?(l+=u/2,w+=a/2*Math.tan(v),g-=u/2,p-=a/2*Math.tan(v)):d>1.25*Math.PI&&d<=1.75*Math.PI&&(w+=a/2,l+=u/2/Math.tan(v),p-=a/2,g-=u/2/Math.tan(v)),(h=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",f),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("x1",String(Math.round(l))),h.setAttribute("y1",String(Math.round(w))),h.setAttribute("x2",String(Math.round(g))),h.setAttribute("y2",String(Math.round(p)))}r.colorStops.forEach((function(t){var r=t.offset,n=t.color,i=document.createElementNS("http://www.w3.org/2000/svg","stop");i.setAttribute("offset",100*r+"%"),i.setAttribute("stop-color",n),h.appendChild(i)})),s.setAttribute("fill","url('#"+f+"')"),this._defs.appendChild(h)}else n&&s.setAttribute("fill",n);this._element.appendChild(s)},t}(),x="canvas";for(var S={},k=0;k<=40;k++)S[k]=k;const z={type:x,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:S[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(t){for(var r,n=1,i=arguments.length;n<i;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};function O(t){var r=A({},t);if(!r.colorStops||!r.colorStops.length)throw"Field 'colorStops' is required in gradient";return r.rotation=r.rotation?Number(r.rotation):0,r.colorStops=r.colorStops.map((function(t){return A(A({},t),{offset:Number(t.offset)})})),r}function j(t){var r=A({},t);return r.width=Number(r.width),r.height=Number(r.height),r.margin=Number(r.margin),r.imageOptions=A(A({},r.imageOptions),{hideBackgroundDots:Boolean(r.imageOptions.hideBackgroundDots),imageSize:Number(r.imageOptions.imageSize),margin:Number(r.imageOptions.margin)}),r.margin>Math.min(r.width,r.height)&&(r.margin=Math.min(r.width,r.height)),r.dotsOptions=A({},r.dotsOptions),r.dotsOptions.gradient&&(r.dotsOptions.gradient=O(r.dotsOptions.gradient)),r.cornersSquareOptions&&(r.cornersSquareOptions=A({},r.cornersSquareOptions),r.cornersSquareOptions.gradient&&(r.cornersSquareOptions.gradient=O(r.cornersSquareOptions.gradient))),r.cornersDotOptions&&(r.cornersDotOptions=A({},r.cornersDotOptions),r.cornersDotOptions.gradient&&(r.cornersDotOptions.gradient=O(r.cornersDotOptions.gradient))),r.backgroundOptions&&(r.backgroundOptions=A({},r.backgroundOptions),r.backgroundOptions.gradient&&(r.backgroundOptions.gradient=O(r.backgroundOptions.gradient))),r}var q=n(192),B=n.n(q),L=function(t,r,n,i){return new(n||(n=Promise))((function(o,e){function a(t){try{f(i.next(t))}catch(t){e(t)}}function u(t){try{f(i.throw(t))}catch(t){e(t)}}function f(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,u)}f((i=i.apply(t,r||[])).next())}))},R=function(t,r){var n,i,o,e,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(u){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&e[0]?i.return:e[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,e[1])).done)return o;switch(i=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(t,a)}catch(t){e=[6,t],i=0}finally{n=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,u])}}};const P=function(){function t(t){this._options=t?j(a(z,t)):z,this.update()}return t._clearContainer=function(t){t&&(t.innerHTML="")},t.prototype._setupSvg=function(){var t=this;if(this._qr){var r=new b(this._options);this._svg=r.getElement(),this._svgDrawingPromise=r.drawQR(this._qr).then((function(){var n;t._svg&&(null===(n=t._extension)||void 0===n||n.call(t,r.getElement(),t._options))}))}},t.prototype._setupCanvas=function(){var t,r=this;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=null===(t=this._svgDrawingPromise)||void 0===t?void 0:t.then((function(){if(r._svg){var t=r._svg,n=(new XMLSerializer).serializeToString(t),i="data:image/svg+xml;base64,"+btoa(n),o=new Image;return new Promise((function(t){o.onload=function(){var n,i;null===(i=null===(n=r._canvas)||void 0===n?void 0:n.getContext("2d"))||void 0===i||i.drawImage(o,0,0),t()},o.src=i}))}})))},t.prototype._getElement=function(t){return void 0===t&&(t="png"),L(this,void 0,void 0,(function(){return R(this,(function(r){switch(r.label){case 0:if(!this._qr)throw"QR code is empty";return"svg"!==t.toLowerCase()?[3,2]:(this._svg&&this._svgDrawingPromise||this._setupSvg(),[4,this._svgDrawingPromise]);case 1:return r.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return r.sent(),[2,this._canvas]}}))}))},t.prototype.update=function(r){t._clearContainer(this._container),this._options=r?j(a(this._options,r)):this._options,this._options.data&&(this._qr=B()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(t){switch(!0){case/^[0-9]*$/.test(t):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(t):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===x?this._setupCanvas():this._setupSvg(),this.append(this._container))},t.prototype.append=function(t){if(t){if("function"!=typeof t.appendChild)throw"Container should be a single DOM node";this._options.type===x?this._canvas&&t.appendChild(this._canvas):this._svg&&t.appendChild(this._svg),this._container=t}},t.prototype.applyExtension=function(t){if(!t)throw"Extension function should be defined.";this._extension=t,this.update()},t.prototype.deleteExtension=function(){this._extension=void 0,this.update()},t.prototype.getRawData=function(t){return void 0===t&&(t="png"),L(this,void 0,void 0,(function(){var r,n,i;return R(this,(function(o){switch(o.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getElement(t)];case 1:return(r=o.sent())?"svg"===t.toLowerCase()?(n=new XMLSerializer,i=n.serializeToString(r),[2,new Blob(['<?xml version="1.0" standalone="no"?>\r\n'+i],{type:"image/svg+xml"})]):[2,new Promise((function(n){return r.toBlob(n,"image/"+t,1)}))]:[2,null]}}))}))},t.prototype.download=function(t){return L(this,void 0,void 0,(function(){var r,n,i,o,e;return R(this,(function(a){switch(a.label){case 0:if(!this._qr)throw"QR code is empty";return r="png",n="qr","string"==typeof t?(r=t,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof t&&null!==t&&(t.name&&(n=t.name),t.extension&&(r=t.extension)),[4,this._getElement(r)];case 1:return(i=a.sent())?("svg"===r.toLowerCase()?(o=new XMLSerializer,e='<?xml version="1.0" standalone="no"?>\r\n'+(e=o.serializeToString(i)),u("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e),n+".svg")):u(i.toDataURL("image/"+r),n+"."+r),[2]):[2]}}))}))},t}()}},r={};function n(i){if(r[i])return r[i].exports;var o=r[i]={exports:{}};return t[i](o,o.exports,n),o.exports}return n.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return n.d(r,{a:r}),r},n.d=(t,r)=>{for(var i in r)n.o(r,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},n.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),n(676)})().default}(r={path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),r.exports));export{n as Q}
@@ -0,0 +1 @@
1
+ import{r as t,h as i,c as e}from"./p-a5648391.js";import{l as s,g as n,a as o,b as a}from"./p-6adc6933.js";import{Q as r}from"./p-0be4566d.js";import{R as l,c as p,b as h}from"./p-b8ba109f.js";const d=class{constructor(i){t(this,i),this.qrData=void 0,this.size=256,this.logoSize=0,this.logoSrc=void 0,this.qrColor="#1E1E20",this.rounded=!0}componentDidLoad(){new r({data:this.qrData,width:this.size,height:this.size,image:this.logoSize>0?this.logoSrc||s:void 0,margin:10,type:"svg",dotsOptions:{color:this.qrColor,type:this.rounded?"dots":"square"},cornersSquareOptions:{type:this.rounded?"extra-rounded":"square"},cornersDotOptions:{type:this.rounded?"dot":"square"},imageOptions:{margin:2,imageSize:this.logoSize}}).append(this.qr)}render(){return i("div",{ref:t=>{this.qr=t}})}},c={connect:"scan",certify:"credential"},g=class{constructor(i){t(this,i),this.gatacaLoginCompleted=e(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=e(this,"gatacaLoginFailed",7),this.checkStatus=void 0,this.createSession=void 0,this.successCallback=void 0,this.errorCallback=void 0,this.qrRole=void 0,this.callbackServer=void 0,this.autostart=!0,this.autorefresh=!1,this.v2=!1,this.qrModalTitle="Quick Access",this.modalTitleColor="#4745B7",this.qrModalDescription="Sign up or sign in by scanning the QR Code with the Gataca Wallet",this.hideBrandTitle=!1,this.logoSize=0,this.logoSrc=s,this.qrCodeExpiredLabel="QR Code expired",this.credentialsNotValidatedLabel="User credentials not validated",this.clickInsideBoxLabel="Click inside the box to",this.refreshQrLabel="Refresh QR Code",this.scanQrLabel="Scan QR Code",this.userNotScanInTimeErrorLabel="User did not scan the QR in the allowed time",this.credsNotValidatedErrorLabel="Provided user credentials couldn't be validated",this.failedLoginErrorLabel="No successful login",this.successLoginLabel="Successful Connection!",this.byBrandLabel="by Gataca",this.waitingStartSessionLabel="waiting to start a session",this.hideQrModalDescription=!1,this.sessionTimeout=300,this.pollingFrequency=3,this.dynamicLink=!0,this.sessionId=void 0,this.authenticationRequest=void 0,this.sessionData=void 0,this.result=l.NOT_STARTED}disconnectedCallback(){this.stop()}async componentDidLoad(){this.autostart&&await this.display()}async display(){await this.getSessionId(),this.result=l.ONGOING,this.poll().then((t=>{this.result=l.SUCCESS,this.sessionData=t,this.gatacaLoginCompleted.emit(t),this.successCallback(t)})).catch((t=>{this.clean();let i=t===l.EXPIRED;if(i&&this.autorefresh)this.display();else if(t!==l.NOT_STARTED){let e=i?new Error(this.userNotScanInTimeErrorLabel):new Error(this.credsNotValidatedErrorLabel);this.result=t,this.gatacaLoginFailed.emit(e),this.errorCallback(e)}})),p()&&this.dynamicLink&&(window.location.href=this.getLink())}async stop(){this.clean(),this.result===l.ONGOING&&(this.result=l.NOT_STARTED)}clean(){this.sessionData=void 0,this.sessionId=void 0}async getSessionData(){return this.sessionData?Promise.resolve(this.sessionData):Promise.reject(new Error(this.failedLoginErrorLabel))}async getSessionId(){if(this.sessionId)return this.sessionId;let{sessionId:t,authenticationRequest:i}=await this.createSession();return this.sessionId=t,this.authenticationRequest=i,this.sessionId}getLink(){if(this.v2)return this.authenticationRequest;let t="https://gataca.page.link/"+c[this.qrRole]+"?";return t+="connect"===this.qrRole?"session="+this.sessionId:"process="+this.sessionId,t+="&callback="+h(encodeURIComponent(this.callbackServer)),t=encodeURIComponent(t),this.dynamicLink?"https://gataca.page.link/?apn=com.gatacaapp&ibi=com.gataca.wallet&link="+t:t}async poll(){let t=(new Date).getTime()+1e3*(this.sessionTimeout||300),i=1e3*(this.pollingFrequency||3),e=this,s=async function(n,o){let{result:a,data:r}=await(async t=>{if(t.result===l.NOT_STARTED)return{result:l.NOT_STARTED};let i=await t.getSessionId();return t.checkStatus(i)})(e);switch(a){case l.SUCCESS:n(r);break;case l.ONGOING:e.sessionTimeout>0&&(new Date).getTime()<t?setTimeout(s,i,n,o):o(l.EXPIRED);break;default:o(a)}};return new Promise(s)}renderQRSection(){switch(this.result){case l.NOT_STARTED:return this.renderRetryButton();case l.ONGOING:return this.renderQR(this.getLink(),300,!0);case l.EXPIRED:return this.renderRetryButton(this.qrCodeExpiredLabel);case l.FAILED:return this.renderRetryButton(this.credentialsNotValidatedLabel);case l.SUCCESS:return this.renderSuccess()}}renderSuccess(){return i("div",{class:"success"},i("img",{src:n,height:52,width:52}),i("p",{class:"successMsg"},this.successLoginLabel))}renderRetryButton(t){return i("div",{class:"reload"},i("div",{id:"notify",onClick:()=>this.display()},i("img",{src:o,height:24,width:24}),i("p",{class:"qrDescription"},this.clickInsideBoxLabel," "),t?i("p",{class:"qrDescription bold"},this.refreshQrLabel):i("p",{class:"qrDescription bold"},this.scanQrLabel,"e"),t&&i("div",{class:"alert"},i("img",{src:a,height:24,width:24}),i("p",null,t))),i("div",{id:"qrwait"},this.renderQR(this.waitingStartSessionLabel,250)))}renderQR(t,e,s){return i("gataca-qrdisplay",{qrData:t,rounded:!0,size:e,"logo-size":s?.33:0,"logo-src":this.logoSrc})}render(){return i("div",{class:"popUpContainer"},i("div",{class:"modal-window is-visible",onClick:t=>{t.stopPropagation()}},i("div",{class:"modal-window__content"},i("div",{class:"qrTitleContainer"},i("p",{class:"qrTitle",style:{color:this.modalTitleColor||"#1e1e20"}},this.qrModalTitle),!this.hideBrandTitle&&i("p",{class:"qrBrand"},this.byBrandLabel," ",i("span",null,i("img",{src:s}))),this.result!==l.SUCCESS&&!this.hideQrModalDescription&&i("p",{class:"qrDescription"},this.qrModalDescription)),i("div",{class:"qrSection"},this.renderQRSection()))))}};g.style='@import url("https://fonts.googleapis.com/css2?family=Ubuntu:wght@100;300;400;500;600;700&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .modal-window{position:relative;border-radius:6px;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;width:300px;padding:1px;background-color:white;min-height:350px;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window p{font-family:"Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px;margin-top:10px;letter-spacing:1px;color:#1e1e20}.popUpContainer .modal-window .qrTitleContainer{padding:14px 24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-weight:400;font-size:14px;line-height:16.5px;padding-top:12px;padding-bottom:5px;color:#A1A1A1}.popUpContainer .modal-window .bold{font-weight:600}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .reload{height:252px;width:252px;border:1px dashed #A1A1A1;border-radius:12px;position:relative;margin:24px;display:flex;justify-content:center;align-items:center}.popUpContainer #qrwait{display:flex;justify-content:center}.popUpContainer #qrwait,.popUpContainer #notify{width:100%;height:100%;top:0;left:0;border-radius:20px}.popUpContainer #notify{z-index:10;background-color:gray;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;align-self:center;display:flex;flex-direction:column;padding:24px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;background:rgba(255, 255, 255, 0.9);}.popUpContainer .notify-text{font-family:"Work Sans";font-style:normal;font-weight:400;font-size:14px;line-height:16px;text-align:center;font-feature-settings:"salt" on;color:#8B8B8B;flex:none;order:1;align-self:stretch;flex-grow:0}.popUpContainer .alert{display:flex;flex-direction:row;align-items:center;justify-content:start;width:252px;position:absolute;bottom:0;background:#FFE5E5;border-radius:12px}.popUpContainer .alert img{margin:12px}.popUpContainer .alert p{font-weight:400;font-size:14px;line-height:16px;color:black}.popUpContainer .success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.popUpContainer .success .successMsg{line-height:23.5px;color:var(--neutral-1000, #1E1E20);text-align:center;font-family:"Ubuntu", "Work Sans", "Helvetica Neue", sans-serif;font-size:20px;font-style:normal;font-weight:700;line-height:24px;}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}';export{g as gataca_qr,d as gataca_qrdisplay}
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as e}from"./p-a5648391.js";import{g as s,a as n,b as o,l as a}from"./p-6adc6933.js";import"./p-0be4566d.js";import{R as r,c as p,b as l}from"./p-b8ba109f.js";const d={connect:"scan",certify:"credential"},c=class{constructor(e){i(this,e),this.gatacaLoginCompleted=t(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=t(this,"gatacaLoginFailed",7),this.successCallback=void 0,this.errorCallback=void 0,this.qrRole=void 0,this.callbackServer=void 0,this.socketEndpoint=void 0,this.sessionTimeout=300,this.wsOnOpen=void 0,this.wsOnMessage=void 0,this.autostart=!0,this.autorefresh=!1,this.v2=!1,this.qrModalTitle="Quick Access",this.qrModalDescription="Sign up or sign in by scanning the QR Code with the Gataca Wallet",this.hideBrandTitle=!1,this.dynamicLink=!0,this.sessionId=void 0,this.authenticationRequest=void 0,this.sessionData=void 0,this.result=r.NOT_STARTED}disconnectedCallback(){this.stop()}async componentDidLoad(){this.autostart&&await this.display()}async display(){let i=new WebSocket(this.socketEndpoint);setTimeout((()=>{this.socket.close(1e3,"")}),1e3*this.sessionTimeout),this.socket=i,i.onopen=()=>{this.wsOnOpen&&this.wsOnOpen(this.socket)},i.onmessage=i=>{if(this.wsOnMessage)this.wsOnMessage(this.socket,i);else{let t=JSON.parse(i.data);t.sessionId&&this.handleWSResponse(t)}},i.onerror=()=>{let t=new Error("Error connecting with server");this.result=r.FAILED,this.gatacaLoginFailed.emit(t),this.errorCallback(t),i.close(1e3,"")},i.onclose=()=>{if(this.result===r.ONGOING&&(this.result=r.EXPIRED),this.result===r.EXPIRED)if(this.autorefresh)this.display();else{let i=new Error("User did not scan the QR in the alloted time");this.gatacaLoginFailed.emit(i),this.errorCallback(i)}},p()&&this.dynamicLink&&(window.location.href=this.getLink())}sessionMsgReceived(i){this.handleWSResponse(i.detail)}handleWSResponse(i){switch(this.result=i.result,i.result){case r.ONGOING:this.sessionId=i.sessionId,this.authenticationRequest=i.authenticationRequest;break;case r.SUCCESS:this.sessionData=i.authenticatedUserData,this.gatacaLoginCompleted.emit(i.authenticatedUserData),this.successCallback(i.authenticatedUserData),this.socket.close(1e3,"");break;case r.FAILED:this.socket.close();let t=new Error("Provided user credentials couldn't be validated");this.gatacaLoginFailed.emit(t),this.errorCallback(t);break;case r.EXPIRED:if(this.socket.close(),this.autorefresh)this.display();else{let i=new Error("User did not scan the QR in the alloted time");this.gatacaLoginFailed.emit(i),this.errorCallback(i)}}}async stop(){this.sessionData=void 0,this.sessionId=void 0,this.socket.close(1e3,"Client stopped the connection")}async getSessionData(){return this.sessionData?Promise.resolve(this.sessionData):Promise.reject(new Error("No successful login"))}getLink(){if(this.v2&&"connect"==this.qrRole)return this.authenticationRequest;let i="https://gataca.page.link/"+d[this.qrRole]+"?";return i+="connect"===this.qrRole?"session="+this.sessionId:"process="+this.sessionId,i+="&callback="+l(encodeURIComponent(this.callbackServer)),i=encodeURIComponent(i),this.dynamicLink?"https://gataca.page.link/?apn=com.gatacaapp&ibi=com.gataca.wallet&link="+i:i}renderQRSection(){switch(this.result){case r.NOT_STARTED:return this.renderRetryButton();case r.ONGOING:return this.renderQR(this.getLink(),300,!0);case r.EXPIRED:return this.renderRetryButton("QR Code expired");case r.FAILED:return this.renderRetryButton("User credentials not validated");case r.SUCCESS:return this.renderSuccess()}}renderSuccess(){return e("div",{class:"success"},e("img",{src:s,height:52,width:52}),e("p",{class:"successMsg"},"Successful Connection!"))}renderRetryButton(i){return e("div",{class:"reload"},e("div",{id:"notify",onClick:()=>this.display()},e("img",{src:n,height:24,width:24}),e("p",{class:"qrDescription"},"Click inside the box to "),e("p",{class:"qrDescription bold"},i?"Refresh QR Code":"Scan QR Code"),i&&e("div",{class:"alert"},e("img",{src:o,height:24,width:24}),e("p",null,i))),e("div",{id:"qrwait"},this.renderQR("waiting to start a session",250)))}renderQR(i,t,s){return e("gataca-qrdisplay",{qrData:i,rounded:!0,size:t,"logo-size":s?.33:0})}render(){return e("div",{class:"popUpContainer"},e("div",{class:"modal-window is-visible",onClick:i=>{i.stopPropagation()}},e("div",{class:"modal-window__content"},e("div",{class:"qrTitleContainer"},e("p",{class:"qrTitle"},this.qrModalTitle),!this.hideBrandTitle&&e("p",{class:"qrBrand"},"by Gataca"," ",e("span",null,e("img",{src:a}))),this.result!==r.SUCCESS&&e("p",{class:"qrDescription"},this.qrModalDescription)),e("div",{class:"qrSection"},this.renderQRSection()))))}};c.style='@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.brandSection{padding-top:5px;display:flex;align-items:center}.brandSection .gatacaImgSmall{height:13px;width:13px;margin:0;margin-right:10px}.popUpContainer .modal-window{position:relative;border-radius:6px;color:rgba(24, 27, 94, 0.8);box-shadow:0px 3px 10px rgba(48, 48, 48, 0.1);display:flex;flex-direction:column;justify-content:space-between;align-items:center;display:flex;z-index:1001;width:300px;min-height:408px;padding:1px;background-color:white;border-radius:12px;-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;visibility:hidden;opacity:0}.popUpContainer .modal-window__content{width:100%;height:100%;text-align:left}.popUpContainer .modal-window p{font-family:"Work Sans", "Helvetica Neue", sans-serif;font-weight:normal;font-size:12px;letter-spacing:1px;color:#1e1e20}.popUpContainer .modal-window .qrTitleContainer{padding:14px 24px;padding-bottom:0px}.popUpContainer .modal-window .qrTitle{font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .modal-window .qrDescription{font-weight:400;font-size:14px;line-height:16.5px;padding-top:12px;padding-bottom:5px;color:#A1A1A1}.popUpContainer .modal-window .bold{font-weight:600}.popUpContainer .modal-window .qrBrand{margin-top:4px;font-size:14px;font-weight:400;line-height:16.5px;display:flex;align-items:center}.popUpContainer .modal-window .qrBrand img{margin-left:5px;height:12px}.popUpContainer .modal-window .qr-section{width:252px;height:252px}.popUpContainer .reload{height:252px;width:252px;border:1px dashed #A1A1A1;border-radius:12px;position:relative;margin:24px;display:flex;justify-content:center;align-items:center}.popUpContainer #qrwait{display:flex;justify-content:center}.popUpContainer #qrwait,.popUpContainer #notify{width:100%;height:100%;top:0;left:0;border-radius:20px}.popUpContainer #notify{z-index:10;background-color:gray;position:absolute;justify-self:center;justify-items:center;justify-content:center;align-items:center;align-content:center;align-self:center;display:flex;flex-direction:column;padding:24px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;background:rgba(255, 255, 255, 0.9);}.popUpContainer .notify-text{font-family:"Work Sans";font-style:normal;font-weight:400;font-size:14px;line-height:16px;text-align:center;font-feature-settings:"salt" on;color:#8B8B8B;flex:none;order:1;align-self:stretch;flex-grow:0}.popUpContainer .alert{display:flex;flex-direction:row;align-items:center;justify-content:start;width:252px;position:absolute;bottom:0;background:#FFE5E5;border-radius:12px}.popUpContainer .alert img{margin:12px}.popUpContainer .alert p{font-weight:400;font-size:14px;line-height:16px;color:black}.popUpContainer .success{display:flex;height:300px;flex-direction:column;justify-content:center;align-items:center;padding:0px}.popUpContainer .success .successMsg{margin-top:20px;font-size:20px;font-weight:600;line-height:23.5px}.popUpContainer .is-visible{opacity:1;visibility:visible}.is-transparent{opacity:0}';export{c as gataca_qrws}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as a}from"./p-a5648391.js";import"./p-0be4566d.js";const e=class{constructor(e){t(this,e),this.gatacaLoginCompleted=i(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=i(this,"gatacaLoginFailed",7),this.buttonText="Easy login",this.checkStatus=void 0,this.createSession=void 0,this.successCallback=void 0,this.errorCallback=void 0,this.qrRole=void 0,this.callbackServer=void 0,this.sessionTimeout=void 0,this.pollingFrequency=void 0,this.autorefresh=!1,this.v2=!1,this.qrModalTitle="Quick Access",this.modalTitleColor="#4745B7",this.qrModalDescription="Sign up or sign in by scanning the QR Code with the Gataca Wallet",this.hideBrandTitle=!1,this.dynamicLink=!0,this.logoSize=0,this.logoSrc=void 0,this.qrCodeExpiredLabel="QR Code expired",this.credentialsNotValidatedLabel="User credentials not validated",this.clickInsideBoxLabel="Click inside the box to",this.refreshQrLabel="Refresh QR Code",this.scanQrLabel="Scan QR Code",this.userNotScanInTimeErrorLabel="User did not scan the QR in the allowed time",this.credsNotValidatedErrorLabel="Provided user credentials couldn't be validated",this.failedLoginErrorLabel="No successful login",this.successLoginLabel="Successful Connection!",this.byBrandLabel="by Gataca",this.waitingStartSessionLabel="waiting to start a session",this.hideQrModalDescription=!1,this.open=!1,this.qr=a("gataca-qr",{checkStatus:this.checkStatus,createSession:this.createSession,successCallback:this.successCallback,errorCallback:this.errorCallback,qrRole:this.qrRole,callbackServer:this.callbackServer,sessionTimeout:this.sessionTimeout,pollingFrequency:this.pollingFrequency,autostart:!0,autorefresh:this.autorefresh,v2:this.v2,qrModalTitle:this.qrModalTitle,qrModalDescription:this.qrModalDescription,hideBrandTitle:this.hideBrandTitle,dynamicLink:this.dynamicLink,logoSize:this.logoSize,logoSrc:this.logoSrc,modalTitleColor:this.modalTitleColor,qrCodeExpiredLabel:this.qrCodeExpiredLabel,credentialsNotValidatedLabel:this.credentialsNotValidatedLabel,clickInsideBoxLabel:this.clickInsideBoxLabel,refreshQrLabel:this.refreshQrLabel,scanQrLabel:this.scanQrLabel,userNotScanInTimeErrorLabel:this.userNotScanInTimeErrorLabel,credsNotValidatedErrorLabel:this.credsNotValidatedErrorLabel,failedLoginErrorLabel:this.failedLoginErrorLabel,successLoginLabel:this.successLoginLabel,byBrandLabel:this.byBrandLabel,waitingStartSessionLabel:this.waitingStartSessionLabel,hideQrModalDescription:this.hideQrModalDescription})}async getSessionData(){return this.qr.getSessionData()}renderModal(){return this.qr}renderButton(){return a("div",{class:"gatacaButtonWrapper"},a("button",{class:"gatacaButton",onClick:()=>{this.open=!this.open,this.open?this.qr.display():this.qr.stop()}},a("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAYAAACN1PRVAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHvSURBVHgB3ZZPTttAFMbfe3YjL7qYLopcpZXSG7Q3CDfIsqrSJpyg5QQtJ2h7glgUdVs4AeEE5AYEQSDAgtnw357Hm0hAQDaeIRFCfFKyeKPxzzPzvc+DUKCZN80GEv1ABgWOQgSdGbOwv7u0nDueV4zjTzUIKhuAZna4vdQFR828azbI0K/TI/qodaLvjlP+tLDGDCs+IKv9Lbsi7kcv0w9541Q0EREPYcoieEQ9KiyECRXHzbpBUOcnYTfPFOOaaGVx9WsLiDrSIp0iU0wFNgIx/AQyc9I/OmOjy+Y8aBvHQcDUYebewc6/Xtk8J5htcg5efEPGhk0JtqkyBjo7DuZcnuO2sqCyKv8rUDmfTS9IBURqBAL+I6CkzBjOMOs22TLY21n8fl17KzXR3uDvb/CQk0GEdfvN07QvpnAOaGfYaRT25JzU6+rnG2tTpcWAy+Cp0m3U/URLms8HWfg/rn6RFaGSs9KQkZMpvGBWNs2Vandt46ac6YNBuc0fDLMaOU5DFybQ8039p/KJ4bq4rwPewtqoM/1gsCm/NfBXvWjgHhhuDAeLyd3qVSifHQULeZkou9EqemLhmUmav8qrZ4GEMGA7ivzjKvfeqGptFV2YdWPMPHHq0cCh3DdpVdLl/XCY9J1gVvbCiWa6N+JLocPFjCsx9cAAAAAASUVORK5CYII=",class:"buttonImg",alt:this.buttonText}),a("span",null,this.buttonText)))}render(){return a("div",{class:"buttonContainer"},this.renderButton(),this.open&&this.renderModal())}};e.style='@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.buttonContainer{display:inline-block;text-align:right;padding:10px;position:relative}.gatacaButtonWrapper{margin:8px}.gatacaButtonWrapper .gatacaButton{display:flex;min-width:100px;padding:8px 8px;background-color:white;font-size:12px;font-family:"Work Sans", sans-serif;letter-spacing:1px;font-weight:2;justify-content:space-between;align-items:center;border-radius:6px;border:1px solid rgba(24, 27, 94, 0.5);color:rgba(24, 27, 94, 0.8);box-shadow:0px 1px 3px rgba(48, 48, 48, 0.15);cursor:pointer}.gatacaButtonWrapper .gatacaButton>span{margin-right:10px}.gatacaButtonWrapper .gatacaButton:hover{box-shadow:0px 2px 8px rgba(48, 48, 48, 0.1)}.gatacaButtonWrapper .buttonText{text-align:right;font-size:8px;color:rgba(24, 27, 94, 0.5);font-family:"Helvetica Neue", sans-serif;letter-spacing:1px;padding-right:8px;font-weight:1}.gatacaButtonWrapper .buttonImg{height:25px;width:25px;margin:0;margin-right:20px}';const s=class{constructor(e){t(this,e),this.gatacaLoginCompleted=i(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=i(this,"gatacaLoginFailed",7),this.buttonText="Easy login",this.successCallback=void 0,this.errorCallback=void 0,this.qrRole=void 0,this.callbackServer=void 0,this.socketEndpoint=void 0,this.sessionTimeout=void 0,this.wsOnOpen=void 0,this.wsOnMessage=void 0,this.autostart=!0,this.autorefresh=!1,this.v2=!1,this.qrModalTitle="Quick Access",this.qrModalDescription="Sign up or sign in by scanning the QR Code with the Gataca Wallet",this.hideBrandTitle=!1,this.dynamicLink=!0,this.open=!1,this.qr=a("gataca-qrws",{wsOnMessage:this.wsOnMessage,wsOnOpen:this.wsOnOpen,successCallback:this.successCallback,errorCallback:this.errorCallback,qrRole:this.qrRole,callbackServer:this.callbackServer,sessionTimeout:this.sessionTimeout,socketEndpoint:this.socketEndpoint,autostart:!0,autorefresh:this.autorefresh,v2:this.v2,qrModalTitle:this.qrModalTitle,qrModalDescription:this.qrModalDescription,hideBrandTitle:this.hideBrandTitle,dynamicLink:this.dynamicLink})}async getSessionData(){return this.qr.getSessionData()}renderModal(){return this.qr}renderButton(){return a("div",{class:"gatacaButtonWrapper"},a("button",{class:"gatacaButton",onClick:()=>{this.open=!this.open,this.open?this.qr.display():this.qr.stop()}},a("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAYAAACN1PRVAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHvSURBVHgB3ZZPTttAFMbfe3YjL7qYLopcpZXSG7Q3CDfIsqrSJpyg5QQtJ2h7glgUdVs4AeEE5AYEQSDAgtnw357Hm0hAQDaeIRFCfFKyeKPxzzPzvc+DUKCZN80GEv1ABgWOQgSdGbOwv7u0nDueV4zjTzUIKhuAZna4vdQFR828azbI0K/TI/qodaLvjlP+tLDGDCs+IKv9Lbsi7kcv0w9541Q0EREPYcoieEQ9KiyECRXHzbpBUOcnYTfPFOOaaGVx9WsLiDrSIp0iU0wFNgIx/AQyc9I/OmOjy+Y8aBvHQcDUYebewc6/Xtk8J5htcg5efEPGhk0JtqkyBjo7DuZcnuO2sqCyKv8rUDmfTS9IBURqBAL+I6CkzBjOMOs22TLY21n8fl17KzXR3uDvb/CQk0GEdfvN07QvpnAOaGfYaRT25JzU6+rnG2tTpcWAy+Cp0m3U/URLms8HWfg/rn6RFaGSs9KQkZMpvGBWNs2Vandt46ac6YNBuc0fDLMaOU5DFybQ8039p/KJ4bq4rwPewtqoM/1gsCm/NfBXvWjgHhhuDAeLyd3qVSifHQULeZkou9EqemLhmUmav8qrZ4GEMGA7ivzjKvfeqGptFV2YdWPMPHHq0cCh3DdpVdLl/XCY9J1gVvbCiWa6N+JLocPFjCsx9cAAAAAASUVORK5CYII=",class:"buttonImg",alt:this.buttonText}),a("span",null,this.buttonText)))}render(){return a("div",{class:"buttonContainer"},this.renderButton(),this.open&&this.renderModal())}};s.style='@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.buttonContainer{display:inline-block;text-align:right;padding:10px;position:relative}.gatacaButtonWrapper{margin:8px}.gatacaButtonWrapper .gatacaButton{display:flex;min-width:100px;padding:8px 8px;background-color:white;font-size:12px;font-family:"Work Sans", sans-serif;letter-spacing:1px;font-weight:2;justify-content:space-between;align-items:center;border-radius:6px;border:1px solid rgba(24, 27, 94, 0.5);color:rgba(24, 27, 94, 0.8);box-shadow:0px 1px 3px rgba(48, 48, 48, 0.15);cursor:pointer}.gatacaButtonWrapper .gatacaButton>span{margin-right:10px}.gatacaButtonWrapper .gatacaButton:hover{box-shadow:0px 2px 8px rgba(48, 48, 48, 0.1)}.gatacaButtonWrapper .buttonText{text-align:right;font-size:8px;color:rgba(24, 27, 94, 0.5);font-family:"Helvetica Neue", sans-serif;letter-spacing:1px;padding-right:8px;font-weight:1}.gatacaButtonWrapper .buttonImg{height:25px;width:25px;margin:0;margin-right:20px}';export{e as gataca_ssibutton,s as gataca_ssibuttonws}
@@ -0,0 +1 @@
1
+ const M="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwLjI5MDggMy44NjAyTDEuODIwNzUgMTguMDAwMkMxLjY0NjEyIDE4LjMwMjYgMS41NTM3MiAxOC42NDU1IDEuNTUyNzQgMTguOTk0N0MxLjU1MTc2IDE5LjM0MzkgMS42NDIyNCAxOS42ODczIDEuODE1MTggMTkuOTkwN0MxLjk4ODEyIDIwLjI5NDEgMi4yMzc0OCAyMC41NDcgMi41Mzg0NiAyMC43MjQxQzIuODM5NDQgMjAuOTAxMiAzLjE4MTU1IDIwLjk5NjQgMy41MzA3NSAyMS4wMDAySDIwLjQ3MDhDMjAuODIgMjAuOTk2NCAyMS4xNjIxIDIwLjkwMTIgMjEuNDYzIDIwLjcyNDFDMjEuNzY0IDIwLjU0NyAyMi4wMTM0IDIwLjI5NDEgMjIuMTg2MyAxOS45OTA3QzIyLjM1OTMgMTkuNjg3MyAyMi40NDk3IDE5LjM0MzkgMjIuNDQ4OCAxOC45OTQ3QzIyLjQ0NzggMTguNjQ1NSAyMi4zNTU0IDE4LjMwMjYgMjIuMTgwOCAxOC4wMDAyTDEzLjcxMDggMy44NjAyQzEzLjUzMjUgMy41NjYzMSAxMy4yODE1IDMuMzIzMzIgMTIuOTgxOSAzLjE1NDY5QzEyLjY4MjQgMi45ODYwNSAxMi4zNDQ1IDIuODk3NDYgMTIuMDAwOCAyLjg5NzQ2QzExLjY1NyAyLjg5NzQ2IDExLjMxOTEgMi45ODYwNSAxMS4wMTk2IDMuMTU0NjlDMTAuNzIgMy4zMjMzMiAxMC40NjkgMy41NjYzMSAxMC4yOTA4IDMuODYwMlYzLjg2MDJaIiBzdHJva2U9IiNDRDJCMzEiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMiA5VjEzIiBzdHJva2U9IiNDRDJCMzEiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMiAxN0gxMi4wMSIgc3Ryb2tlPSIjQ0QyQjMxIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K",j="data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjUyIiBoZWlnaHQ9IjUzIiB2aWV3Qm94PSIwIDAgNTIgNTMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjI2IiBjeT0iMjYuNjcxOSIgcj0iMjYiIGZpbGw9IiMzRDlBNTAiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zOC41MiAxNy43NDk1QzM5LjU4MDUgMTguODA5OSAzOS41ODA1IDIwLjUyOTMgMzguNTIgMjEuNTg5OEwyMy41ODQ2IDM2LjUyNTFDMjIuNTI0MiAzNy41ODU2IDIwLjgwNDggMzcuNTg1NiAxOS43NDQzIDM2LjUyNTFMMTIuOTU1NSAyOS43MzYzQzExLjg5NSAyOC42NzU5IDExLjg5NSAyNi45NTY1IDEyLjk1NTUgMjUuODk2QzE0LjAxNiAyNC44MzU1IDE1LjczNTQgMjQuODM1NSAxNi43OTU4IDI1Ljg5NkwyMS42NjQ1IDMwLjc2NDdMMzQuNjc5NyAxNy43NDk1QzM1Ljc0MDIgMTYuNjg5IDM3LjQ1OTUgMTYuNjg5IDM4LjUyIDE3Ljc0OTVaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K",N="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIzIDRWMTBIMTciIHN0cm9rZT0iIzhCOEI4QiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTIwLjQ4OTkgMTVDMTkuODM5OSAxNi44Mzk5IDE4LjYwOTQgMTguNDE4NyAxNi45ODQgMTkuNDk4NUMxNS4zNTg2IDIwLjU3ODMgMTMuNDI2MyAyMS4xMDA2IDExLjQ3ODMgMjAuOTg2NkM5LjUzMDI2IDIwLjg3MjYgNy42NzIwMyAyMC4xMjg2IDYuMTgzNjMgMTguODY2N0M0LjY5NTI0IDE3LjYwNDcgMy42NTczIDE1Ljg5MzIgMy4yMjYyNSAxMy45OTAxQzIuNzk1MTkgMTIuMDg2OSAyLjk5NDM2IDEwLjA5NTIgMy43OTM3NCA4LjMxNTA4QzQuNTkzMTMgNi41MzQ5NiA1Ljk0OTQyIDUuMDYyODggNy42NTgyMyA0LjEyMDY1QzkuMzY3MDUgMy4xNzg0MyAxMS4zMzU4IDIuODE3MTEgMTMuMjY3OCAzLjA5MTE2QzE1LjE5OTkgMy4zNjUyIDE2Ljk5MDUgNC4yNTk3NSAxOC4zNjk5IDUuNjQwMDFMMjIuOTk5OSAxMCIgc3Ryb2tlPSIjOEI4QjhCIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K",L="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjUuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA2MzUuMyA1OTcuNDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDYzNS4zIDU5Ny40NzsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM0NzQ1Qjc7fQo8L3N0eWxlPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik02MDUuNzksMzIzLjQxYy0yNy45Ny00MS45Ny03My40NC03MS4yOC0xMjUuOTktNzcuNDljOS4xNS0yMS4zMywxNC4yMy00NC44MywxNC4yMy02OS41MQoJCWMwLTEwLjE3LTAuODctMjAuMTQtMi41My0yOS44NUM0NzcuMzMsNjMuMzUsNDA0Ljg5LDAsMzE3LjY0LDBjLTk3LjQyLDAtMTc2LjM4LDc4Ljk3LTE3Ni4zOCwxNzYuMzkKCQljMCwyNC42OSw1LjA4LDQ4LjE5LDE0LjI0LDY5LjUyQzY3LjkzLDI1Ni4yNCwwLDMzMC43MSwwLDQyMS4wN2MwLDQwLjM5LDEzLjU5LDc3LjYxLDM2LjQzLDEwNy4zNQoJCWMzMi4yNSw0MS45OCw4Mi45NCw2OS4wNSwxMzkuOTYsNjkuMDZjNTIuOTYsMCwxMDAuNDctMjMuMzQsMTMyLjgtNjAuM2MyLjk1LTMuMzcsNS43OC02Ljg2LDguNDctMTAuNDUKCQljNS45MSw3Ljg4LDEyLjQ4LDE1LjIzLDE5LjYsMjIuMDJjNS42LDUuMzQsMTEuNTQsMTAuMzQsMTcuODEsMTQuOTFjMTAuMTIsNy4zOCwyMS4wNSwxMy43MSwzMi42MywxOC44NAoJCWMyMS43OCw5LjYzLDQ1Ljg4LDE0Ljk5LDcxLjIyLDE0Ljk5YzIuNTEsMCw1LTAuMDcsNy40OC0wLjE3YzkzLjk1LTMuOTIsMTY4LjktODEuMzEsMTY4LjktMTc2LjIyCgkJQzYzNS4zLDM4NC45NSw2MjQuNDMsMzUxLjM3LDYwNS43OSwzMjMuNDF6IE0yMjUuNzQsMTIzLjMzYzI5LjMxLTUwLjc2LDk0LjIxLTY4LjE2LDE0NC45Ny0zOC44NQoJCWM0My41OCwyNS4xNiw2Mi41Niw3Ni41Nyw0OC41MSwxMjIuNzNjLTIuMzEsNy42MS01LjUyLDE1LjA3LTkuNjcsMjIuMjVjLTkuMjcsMTYuMDYtMjIuMTEsMjguNzgtMzYuOTQsMzcuNzQKCQljLTEuMjIsMC43NC0yLjQ2LDEuNDYtMy43MSwyLjE1Yy0xMS45NCw2LjU3LTI1LjA0LDEwLjc3LTM4LjUzLDEyLjQxYy0yMS44NCwyLjY2LTQ0LjY4LTEuNDItNjUuMjUtMTMuMTQKCQljLTAuNDctMC4yNy0wLjkzLTAuNTQtMS40LTAuODFDMjEzLjY0LDIzOC4yNywxOTYuNiwxNzMuODEsMjI1Ljc0LDEyMy4zM3ogTTU1Mi40OSw0NzEuMTVjLTEyLjIzLDIyLjgxLTMxLjQ3LDM5LjI2LTUzLjU1LDQ4LjIzCgkJYy0zMC4xNywxMi4yNi02NC40MSw5LjIzLTkyLjYyLTcuMDRsLTE1LjIxLTguNzhsLTQ3LjE3LTI3LjIybC02MC4yMi0zNC43NmwtMi44Ny0xLjY2bC04Mi4zMi00Ny41MWwtNTcuMTIsNDcuOTNsMTA0Ljk1LDYwLjU4CgkJYy0zMy4yNCwyOS4xNS04Mi42MiwzNS40Mi0xMjMuMDQsMTIuMDljLTEzLjQyLTcuNzUtMjQuNS0xNy45OC0zMy4wMS0yOS43OWMtMjMuNjgtMzIuODUtMjcuMzktNzcuODUtNS44My0xMTUuMgoJCWMyOS4yLTUwLjU4LDkzLjc0LTY4LjAzLDE0NC40Mi0zOS4xNmMwLjQ3LDAuMjcsMC45MywwLjU0LDEuNCwwLjgxYzEuMjMsMC43LDIuNDcsMS4zOSwzLjcyLDIuMDdsMjEuODEsMTIuNTlsMzUuOCwyMC42NwoJCWw1OS44MiwzNC41M2wzLjE2LDEuODNsOTMuNzksNTQuMTNsNTcuMDQtNDcuODZsMC4wNS0wLjA5bC0xMTUuODYtNjYuODdjNC41LTMuODgsOS4yOS03LjM1LDE0LjMxLTEwLjM4CgkJYzEuMjMtMC43NCwyLjQ2LTEuNDYsMy43Mi0yLjE1YzMxLjU2LTE3LjM3LDcxLjE4LTE4LjI0LDEwNC42MSwxLjIxYzE2Ljg5LDkuODIsMzAuMDksMjMuNzMsMzkuMDYsMzkuNzgKCQlDNTY4LjQ1LDM5OS43Niw1NzAuMTIsNDM4LjI2LDU1Mi40OSw0NzEuMTV6Ii8+CjwvZz4KPC9zdmc+Cg==";export{N as a,M as b,j as g,L as l}
@@ -0,0 +1,2 @@
1
+ let e,t,n=!1;const l={},s=e=>"object"==(e=typeof e)||"function"===e,o=(e,t,...n)=>{let l=null,o=!1,r=!1;const i=[],u=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!s(l))&&(l+=""),o&&r?i[i.length-1].t+=l:i.push(o?c(null,l):l),r=o)};if(u(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const a=c(e,null);return a.l=t,i.length>0&&(a.o=i),a},c=(e,t)=>({i:0,u:e,t,h:null,o:null,l:null}),r={},i=(e,t,n)=>{const l=(e=>U(e).$)(e);return{emit:e=>u(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},u=(e,t,n)=>{const l=J.ce(t,n);return e.dispatchEvent(l),l},a=new WeakMap,f=e=>"sc-"+e.m,d=(e,t,n,l,o,c)=>{if(n!==l){let r=H(e,t),i=t.toLowerCase();if("class"===t){const t=e.classList,s=y(n),o=y(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("ref"===t)l&&l(e);else if(r||"o"!==t[0]||"n"!==t[1]){const i=s(l);if((r||i&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const s=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&c||o)&&!i&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):H(G,i)?i.slice(2):i[2]+t.slice(3),n&&J.rel(e,t,n,!1),l&&J.ael(e,t,l,!1)}},h=/\s/,y=e=>e?e.split(h):[],$=(e,t,n,s)=>{const o=11===t.h.nodeType&&t.h.host?t.h.host:t.h,c=e&&e.l||l,r=t.l||l;for(s in c)s in r||d(o,s,c[s],void 0,n,t.i);for(s in r)d(o,s,c[s],r[s],n,t.i)},m=(t,n,l)=>{const s=n.o[l];let o,c,r=0;if(null!==s.t)o=s.h=I.createTextNode(s.t);else if(o=s.h=I.createElement(s.u),$(null,s,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),s.o)for(r=0;r<s.o.length;++r)c=m(t,s,r),c&&o.appendChild(c);return o},p=(e,n,l,s,o,c)=>{let r,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);o<=c;++o)s[o]&&(r=m(null,l,o),r&&(s[o].h=r,i.insertBefore(r,n)))},b=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.h,g(l),s.remove())},w=(e,t)=>e.u===t.u,S=(e,t)=>{const n=t.h=e.h,l=e.o,s=t.o,o=t.t;null===o?($(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,c=0,r=t.length-1,i=t[0],u=t[r],a=l.length-1,f=l[0],d=l[a];for(;o<=r&&c<=a;)null==i?i=t[++o]:null==u?u=t[--r]:null==f?f=l[++c]:null==d?d=l[--a]:w(i,f)?(S(i,f),i=t[++o],f=l[++c]):w(u,d)?(S(u,d),u=t[--r],d=l[--a]):w(i,d)?(S(i,d),e.insertBefore(i.h,u.h.nextSibling),i=t[++o],d=l[--a]):w(u,f)?(S(u,f),e.insertBefore(u.h,i.h),u=t[--r],f=l[++c]):(s=m(t&&t[c],n,c),f=l[++c],s&&i.h.parentNode.insertBefore(s,i.h));o>r?p(e,null==l[a+1]?null:l[a+1].h,n,l,c,a):c>a&&b(t,o,r)})(n,l,t,s):null!==s?(null!==e.t&&(n.textContent=""),p(n,null,t,s,0,s.length-1)):null!==l&&b(l,0,l.length-1)):e.t!==o&&(n.data=o)},g=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(g)},j=(e,t)=>{t&&!e.p&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.p=t)))},v=(e,t)=>{if(e.i|=16,!(4&e.i))return j(e,e.S),le((()=>M(e,t)));e.i|=512},M=(e,t)=>{const n=e.g;return t&&(e.i|=256,e.j&&(e.j.map((([e,t])=>x(n,e,t))),e.j=null)),E(void 0,(()=>k(e,n,t)))},k=async(e,t,n)=>{const l=e.$,s=l["s-rc"];n&&(e=>{const t=e.v,n=e.$,l=t.i,s=((e,t)=>{let n=f(t);const l=B.get(n);if(e=11===e.nodeType?e:I,l)if("string"==typeof l){let t,s=a.get(e=e.head||e);s||a.set(e,s=new Set),s.has(n)||(t=I.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);C(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>O(e);0===t.length?n():(Promise.all(t).then(n),e.i|=4,t.length=0)}},C=(n,l)=>{try{l=l.render(),n.i&=-17,n.i|=2,((n,l)=>{const s=n.$,i=n.M||c(null,null),u=(e=>e&&e.u===r)(l)?l:o(null,null,l);t=s.tagName,u.u=null,u.i|=4,n.M=u,u.h=i.h=s.shadowRoot||s,e=s["s-sc"],S(i,u)})(n,l)}catch(e){V(e,n.$)}return null},O=e=>{const t=e.$,n=e.g,l=e.S;64&e.i||(e.i|=64,L(t),x(n,"componentDidLoad"),e.k(t),l||P()),e.C(t),e.p&&(e.p(),e.p=void 0),512&e.i&&ne((()=>v(e,!1))),e.i&=-517},P=()=>{L(I.documentElement),ne((()=>u(G,"appload",{detail:{namespace:"gatacaqr"}})))},x=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){V(e)}},E=(e,t)=>e&&e.then?e.then(t):t(),L=e=>e.classList.add("hydrated"),N=(e,t,n)=>{if(t.O){const l=Object.entries(t.O),o=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(o,e,{get(){return((e,t)=>U(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=U(e),c=o.P.get(t),r=o.i,i=o.g;n=((e,t)=>null==e||s(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.O[t][0]),8&r&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n)||(o.P.set(t,n),i&&2==(18&r)&&v(o,!1))})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,e,{value(...t){const n=U(this);return n.L.then((()=>n.g[e](...t)))}})})),1&n){const t=new Map;o.attributeChangedCallback=function(e,n,l){J.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(o.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},T=(e,t={})=>{const n=[],l=t.exclude||[],s=G.customElements,o=I.head,c=o.querySelector("meta[charset]"),r=I.createElement("style"),i=[];let u,a=!0;Object.assign(J,t),J.N=new URL(t.resourcesUrl||"./",I.baseURI).href,e.map((e=>{e[1].map((t=>{const o={i:t[0],m:t[1],O:t[2],T:t[3]};o.O=t[2],o.T=t[3];const c=o.m,r=class extends HTMLElement{constructor(e){super(e),D(e=this,o),1&o.i&&e.attachShadow({mode:"open"})}connectedCallback(){u&&(clearTimeout(u),u=null),a?i.push(this):J.jmp((()=>(e=>{if(0==(1&J.i)){const t=U(e),n=t.v,l=()=>{};if(1&t.i)q(e,t,n.T);else{t.i|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){j(t,t.S=n);break}}n.O&&Object.entries(n.O).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.i)){{if(t.i|=32,(s=z(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(N(s,n,2),s.isProxied=!0);const e=()=>{};t.i|=8;try{new s(t)}catch(e){V(e)}t.i&=-9,e()}if(s.style){let e=s.style;const t=f(n);if(!B.has(t)){const l=()=>{};((e,t,n)=>{let l=B.get(e);Q&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,B.set(e,l)})(t,e,!!(1&n.i)),l()}}}const o=t.S,c=()=>v(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(0,t,n)}l()}})(this)))}disconnectedCallback(){J.jmp((()=>(()=>{if(0==(1&J.i)){const e=U(this),t=e.g;e.q&&(e.q.map((e=>e())),e.q=void 0),x(t,"disconnectedCallback")}})()))}componentOnReady(){return U(this).A}};o.F=e[0],l.includes(c)||s.get(c)||(n.push(c),s.define(c,N(r,o,1)))}))})),r.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles",""),o.insertBefore(r,c?c.nextSibling:o.firstChild),a=!1,i.length?i.map((e=>e.connectedCallback())):J.jmp((()=>u=setTimeout(P,30)))},q=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=e,c=A(t,s),r=F(n);J.ael(o,l,c,r),(t.q=t.q||[]).push((()=>J.rel(o,l,c,r)))}))},A=(e,t)=>n=>{try{256&e.i?e.g[t](n):(e.j=e.j||[]).push([t,n])}catch(e){V(e)}},F=e=>0!=(2&e),R=new WeakMap,U=e=>R.get(e),W=(e,t)=>R.set(t.g=e,t),D=(e,t)=>{const n={i:0,$:e,v:t,P:new Map};return n.L=new Promise((e=>n.C=e)),n.A=new Promise((e=>n.k=e)),e["s-p"]=[],e["s-rc"]=[],q(e,n,t.T),R.set(e,n)},H=(e,t)=>t in e,V=(e,t)=>(0,console.error)(e,t),_=new Map,z=e=>{const t=e.m.replace(/-/g,"_"),n=e.F,l=_.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(_.set(n,e),e[t])),V)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},B=new Map,G="undefined"!=typeof window?window:{},I=G.document||{head:{}},J={i:0,N:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},K=e=>Promise.resolve(e),Q=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),X=[],Y=[],Z=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&J.i?ne(te):J.raf(te))},ee=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){V(e)}e.length=0},te=()=>{ee(X),ee(Y),(n=X.length>0)&&J.raf(te)},ne=e=>K().then(e),le=Z(Y,!0);export{T as b,i as c,o as h,K as p,W as r}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s}from"./p-a5648391.js";const e=t=>{if(t)return new Function("return "+t)()},a=class{constructor(s){t(this,s),this.gatacaLoginCompleted=i(this,"gatacaLoginCompleted",7),this.gatacaLoginFailed=i(this,"gatacaLoginFailed",7),this.configId=void 0,this.configRepository="https://studio.gataca.io/api/v1/qrconfigs",this.successCallback=void 0,this.errorCallback=void 0,this.checkStatus=void 0,this.createSession=void 0,this.wsOnOpen=void 0,this.wsOnMessage=void 0,this.config=void 0,this.loading=void 0,this.loading=!0,fetch(this.configRepository+"/"+this.configId,{method:"GET",headers:{"Content-Type":"application/json"}}).then((t=>{t.json().then((t=>{t=(t=>{var i,s,a,o,r,n;return t.errorCallback=e(null===(i=t.errorCallback)||void 0===i?void 0:i.toString()),t.successCallback=e(null===(s=t.successCallback)||void 0===s?void 0:s.toString()),t.wsOnMessage=e(null===(a=t.wsOnMessage)||void 0===a?void 0:a.toString()),t.wsOnOpen=e(null===(o=t.wsOnOpen)||void 0===o?void 0:o.toString()),t.checkStatus=e(null===(r=t.checkStatus)||void 0===r?void 0:r.toString()),t.createSession=e(null===(n=t.createSession)||void 0===n?void 0:n.toString()),t})(t),this.config=t,this.loading=!1})).catch((t=>{console.log("Cannot retrieve selected config",t),this.loading=!1}))})).catch((t=>{console.log("Cannot retrieve selected config",t),this.loading=!1}))}async getSessionData(){return this.qr.getSessionData()}selectQR(){this.qr=this.config.useButton?this.config.useWs?s("gataca-ssibuttonws",{buttonText:this.config.buttonText,wsOnMessage:this.wsOnMessage||this.config.wsOnMessage,wsOnOpen:this.wsOnOpen||this.config.wsOnOpen,successCallback:this.successCallback||this.config.successCallback,errorCallback:this.errorCallback||this.config.errorCallback,qrRole:this.config.qrRole,callbackServer:this.config.callbackServer,sessionTimeout:this.config.sessionTimeout,socketEndpoint:this.config.socketEndpoint,autostart:!0,autorefresh:this.config.autorefresh,v2:this.config.v2,qrModalTitle:this.config.qrModalTitle,qrModalDescription:this.config.qrModalDescription,hideBrandTitle:this.config.hideBrandTitle,dynamicLink:this.config.dynamicLink}):s("gataca-ssibutton",{buttonText:this.config.buttonText,checkStatus:this.checkStatus||this.config.checkStatus,createSession:this.createSession||this.config.createSession,successCallback:this.successCallback||this.config.successCallback,errorCallback:this.errorCallback||this.config.errorCallback,qrRole:this.config.qrRole,callbackServer:this.config.callbackServer,sessionTimeout:this.config.sessionTimeout,pollingFrequency:this.config.pollingFrequency,autorefresh:this.config.autorefresh,v2:this.config.v2,qrModalTitle:this.config.qrModalTitle,qrModalDescription:this.config.qrModalDescription,hideBrandTitle:this.config.hideBrandTitle,dynamicLink:this.config.dynamicLink}):this.config.useWs?s("gataca-qrws",{wsOnMessage:this.wsOnMessage||this.config.wsOnMessage,wsOnOpen:this.wsOnOpen||this.config.wsOnOpen,successCallback:this.successCallback||this.config.successCallback,errorCallback:this.errorCallback||this.config.errorCallback,qrRole:this.config.qrRole,callbackServer:this.config.callbackServer,sessionTimeout:this.config.sessionTimeout,socketEndpoint:this.config.socketEndpoint,autostart:this.config.autostart,autorefresh:this.config.autorefresh,v2:this.config.v2,qrModalTitle:this.config.qrModalTitle,qrModalDescription:this.config.qrModalDescription,hideBrandTitle:this.config.hideBrandTitle,dynamicLink:this.config.dynamicLink}):s("gataca-qr",{checkStatus:this.checkStatus||this.config.checkStatus,createSession:this.createSession||this.config.createSession,successCallback:this.successCallback||this.config.successCallback,errorCallback:this.errorCallback||this.config.errorCallback,qrRole:this.config.qrRole,callbackServer:this.config.callbackServer,sessionTimeout:this.config.sessionTimeout,pollingFrequency:this.config.pollingFrequency,autostart:this.config.autostart,autorefresh:this.config.autorefresh,v2:this.config.v2,qrModalTitle:this.config.qrModalTitle,qrModalDescription:this.config.qrModalDescription,hideBrandTitle:this.config.hideBrandTitle,dynamicLink:this.config.dynamicLink})}render(){return this.loading?s("div",null,"Loading..."):this.config?(this.selectQR(),this.qr):s("div",null,"Error loading your config...")}};a.style='@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400&display=swap"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}.img-fluid{height:auto;max-width:50%}img{margin-left:auto;margin-right:auto}.buttonContainer{display:inline-block;text-align:right;padding:10px;position:relative}.gatacaButtonWrapper{margin:8px}.gatacaButtonWrapper .gatacaButton{display:flex;min-width:100px;padding:8px 8px;background-color:white;font-size:12px;font-family:"Work Sans", sans-serif;letter-spacing:1px;font-weight:2;justify-content:space-between;align-items:center;border-radius:6px;border:1px solid rgba(24, 27, 94, 0.5);color:rgba(24, 27, 94, 0.8);box-shadow:0px 1px 3px rgba(48, 48, 48, 0.15);cursor:pointer}.gatacaButtonWrapper .gatacaButton>span{margin-right:10px}.gatacaButtonWrapper .gatacaButton:hover{box-shadow:0px 2px 8px rgba(48, 48, 48, 0.1)}.gatacaButtonWrapper .buttonText{text-align:right;font-size:8px;color:rgba(24, 27, 94, 0.5);font-family:"Helvetica Neue", sans-serif;letter-spacing:1px;padding-right:8px;font-weight:1}.gatacaButtonWrapper .buttonImg{height:25px;width:25px;margin:0;margin-right:20px}';export{a as gataca_autoqr}