!function(t){var e={};function r(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(o,n,function(e){return t[e]}.bind(null,n));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=3)}([function(t,e,r){self,t.exports=(()=>{var t={192:(t,e)=>{var r,o,n=function(){var t=function(t,e){var r=t,o=a[e],n=null,i=0,c=null,y=[],v={},w=function(t,e){n=function(t){for(var e=new Array(t),r=0;r=7&&_(t),null==c&&(c=k(r,o,y)),M(c,e)},m=function(t,e){for(var r=-1;r<=7;r+=1)if(!(t+r<=-1||i<=t+r))for(var o=-1;o<=7;o+=1)e+o<=-1||i<=e+o||(n[t+r][e+o]=0<=r&&r<=6&&(0==o||6==o)||0<=o&&o<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=o&&o<=4)},x=function(){for(var t=8;t>o&1);n[Math.floor(o/3)][o%3+i-8-3]=a}for(o=0;o<18;o+=1)a=!t&&1==(e>>o&1),n[o%3+i-8-3][Math.floor(o/3)]=a},S=function(t,e){for(var r=o<<3|e,a=s.getBCHTypeInfo(r),c=0;c<15;c+=1){var u=!t&&1==(a>>c&1);c<6?n[c][8]=u:c<8?n[c+1][8]=u:n[i-15+c][8]=u}for(c=0;c<15;c+=1)u=!t&&1==(a>>c&1),c<8?n[8][i-c-1]=u:c<9?n[8][15-c-1+1]=u:n[8][15-c-1]=u;n[i-8][8]=!t},M=function(t,e){for(var r=-1,o=i-1,a=7,c=0,u=s.getMaskFunction(e),l=i-1;l>0;l-=2)for(6==l&&(l-=1);;){for(var d=0;d<2;d+=1)if(null==n[o][l-d]){var f=!1;c>>a&1)),u(o,l-d)&&(f=!f),n[o][l-d]=f,-1==(a-=1)&&(c+=1,a=7)}if((o+=r)<0||i<=o){o-=r,r=-r;break}}},k=function(t,e,r){for(var o=l.getRSBlocks(t,e),n=d(),i=0;i8*c)throw"code length overflow. ("+n.getLengthInBits()+">"+8*c+")";for(n.getLengthInBits()+4<=8*c&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(!1);for(;!(n.getLengthInBits()>=8*c||(n.put(236,8),n.getLengthInBits()>=8*c));)n.put(17,8);return function(t,e){for(var r=0,o=0,n=0,i=new Array(e.length),a=new Array(e.length),c=0;c=0?g.getAt(p):0}}var y=0;for(f=0;fo)&&(t=o,e=r)}return e}())},v.createTableTag=function(t,e){t=t||2;var r="";r+='',r+="";for(var o=0;o";for(var n=0;n';r+=""}return(r+="")+"
"},v.createSvgTag=function(t,e,r,o){var n={};"object"==typeof arguments[0]&&(t=(n=arguments[0]).cellSize,e=n.margin,r=n.alt,o=n.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,(o="string"==typeof o?{text:o}:o||{}).text=o.text||null,o.id=o.text?o.id||"qrcode-title":null;var i,a,s,c,u=v.getModuleCount()*t+2*e,l="";for(c="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",l+=''+C(o.text)+"":"",l+=r.text?''+C(r.text)+"":"",l+='',l+='"},v.createDataURL=function(t,e){t=t||2,e=void 0===e?4*t:e;var r=v.getModuleCount()*t+2*e,o=e,n=r-e;return b(r,r,(function(e,r){if(o<=e&&e"};var C=function(t){for(var e="",r=0;r":e+=">";break;case"&":e+="&";break;case'"':e+=""";break;default:e+=o}}return e};return v.createASCII=function(t,e){if((t=t||1)<2)return function(t){t=void 0===t?2:t;var e,r,o,n,i,a=1*v.getModuleCount()+2*t,s=t,c=a-t,u={"██":"█","█ ":"▀"," █":"▄"," ":" "},l={"██":"▀","█ ":"▀"," █":" "," ":" "},d="";for(e=0;e=c?l[i]:u[i];d+="\n"}return a%2&&t>0?d.substring(0,d.length-a-1)+Array(a+1).join("▀"):d.substring(0,d.length-1)}(e);t-=1,e=void 0===e?2*t:e;var r,o,n,i,a=v.getModuleCount()*t+2*e,s=e,c=a-e,u=Array(t+1).join("██"),l=Array(t+1).join(" "),d="",f="";for(r=0;r>>8),e.push(255&a)):e.push(o)}}return e}};var e,r,o,n,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,o=7973,i=function(t){for(var e=0;0!=t;)e+=1,t>>>=1;return e},(n={}).getBCHTypeInfo=function(t){for(var e=t<<10;i(e)-i(r)>=0;)e^=r<=0;)e^=o<5&&(r+=3+i-5)}for(o=0;o=256;)e-=255;return t[e]}}}();function u(t,e){if(void 0===t.length)throw t.length+"/"+e;var r=function(){for(var r=0;r>>7-e%8&1)},put:function(t,e){for(var o=0;o>>e-o-1&1))},getLengthInBits:function(){return e},putBit:function(r){var o=Math.floor(e/8);t.length<=o&&t.push(0),r&&(t[o]|=128>>>e%8),e+=1}};return r},f=function(t){var e=t,r={getMode:function(){return 1},getLength:function(t){return e.length},write:function(t){for(var r=e,n=0;n+2>>8&255)+(255&n),t.put(n,13),r+=2}if(r>>8)},writeBytes:function(t,r,o){r=r||0,o=o||t.length;for(var n=0;n0&&(e+=","),e+=t[r];return e+"]"}};return e},v=function(t){var e=t,r=0,o=0,n=0,i={read:function(){for(;n<8;){if(r>=e.length){if(0==n)return-1;throw"unexpected end of file./"+n}var t=e.charAt(r);if(r+=1,"="==t)return n=0,-1;t.match(/^\s$/)||(o=o<<6|a(t.charCodeAt(0)),n+=6)}var i=o>>>n-8&255;return n-=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},b=function(t,e,r){for(var o=function(t,e){var r=t,o=e,n=new Array(t*e),i={setPixel:function(t,e,o){n[e*r+t]=o},write:function(t){t.writeString("GIF87a"),t.writeShort(r),t.writeShort(o),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(","),t.writeShort(0),t.writeShort(0),t.writeShort(r),t.writeShort(o),t.writeByte(0);var e=a(2);t.writeByte(2);for(var n=0;e.length-n>255;)t.writeByte(255),t.writeBytes(e,n,255),n+=255;t.writeByte(e.length-n),t.writeBytes(e,n,e.length-n),t.writeByte(0),t.writeString(";")}},a=function(t){for(var e=1<>>e!=0)throw"length over";for(;u+e>=8;)c.writeByte(255&(t<>>=8-u,l=0,u=0;l|=t<0&&c.writeByte(l)}});f.write(e,o);var h=0,g=String.fromCharCode(n[h]);for(h+=1;h=6;)i(t>>>e-6),e-=6},n.flush=function(){if(e>0&&(i(t<<6-e),t=0,e=0),r%3!=0)for(var n=3-r%3,a=0;a>6,128|63&o):o<55296||o>=57344?e.push(224|o>>12,128|o>>6&63,128|63&o):(r++,o=65536+((1023&o)<<10|1023&t.charCodeAt(r)),e.push(240|o>>18,128|o>>12&63,128|o>>6&63,128|63&o))}return e}(t)},void 0===(o="function"==typeof(r=function(){return n})?r.apply(e,[]):r)||(t.exports=o)},151:(t,e,r)=>{"use strict";r.d(e,{default:()=>M});var o=function(){return(o=Object.assign||function(t){for(var e,r=1,o=arguments.length;r2||a&&s||c&&u)this._basicSquare({x:e,y:r,size:o,context:n,rotation:0});else{if(2===l){var d=0;return a&&c?d=Math.PI/2:c&&s?d=Math.PI:s&&u&&(d=-Math.PI/2),void this._basicCornerRounded({x:e,y:r,size:o,context:n,rotation:d})}if(1===l)return d=0,c?d=Math.PI/2:s?d=Math.PI:u&&(d=-Math.PI/2),void this._basicSideRounded({x:e,y:r,size:o,context:n,rotation:d})}else this._basicDot({x:e,y:r,size:o,context:n,rotation:0})},t.prototype._drawExtraRounded=function(t){var e=t.x,r=t.y,o=t.size,n=t.context,i=t.getNeighbor,a=+i(-1,0),s=+i(1,0),c=+i(0,-1),u=+i(0,1),l=a+s+c+u;if(0!==l)if(l>2||a&&s||c&&u)this._basicSquare({x:e,y:r,size:o,context:n,rotation:0});else{if(2===l){var d=0;return a&&c?d=Math.PI/2:c&&s?d=Math.PI:s&&u&&(d=-Math.PI/2),void this._basicCornerExtraRounded({x:e,y:r,size:o,context:n,rotation:d})}if(1===l)return d=0,c?d=Math.PI/2:s?d=Math.PI:u&&(d=-Math.PI/2),void this._basicSideRounded({x:e,y:r,size:o,context:n,rotation:d})}else this._basicDot({x:e,y:r,size:o,context:n,rotation:0})},t.prototype._drawClassy=function(t){var e=t.x,r=t.y,o=t.size,n=t.context,i=t.getNeighbor,a=+i(-1,0),s=+i(1,0),c=+i(0,-1),u=+i(0,1);0!==a+s+c+u?a||c?s||u?this._basicSquare({x:e,y:r,size:o,context:n,rotation:0}):this._basicCornerRounded({x:e,y:r,size:o,context:n,rotation:Math.PI/2}):this._basicCornerRounded({x:e,y:r,size:o,context:n,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:r,size:o,context:n,rotation:Math.PI/2})},t.prototype._drawClassyRounded=function(t){var e=t.x,r=t.y,o=t.size,n=t.context,i=t.getNeighbor,a=+i(-1,0),s=+i(1,0),c=+i(0,-1),u=+i(0,1);0!==a+s+c+u?a||c?s||u?this._basicSquare({x:e,y:r,size:o,context:n,rotation:0}):this._basicCornerExtraRounded({x:e,y:r,size:o,context:n,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:e,y:r,size:o,context:n,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:r,size:o,context:n,rotation:Math.PI/2})},t}();var l=function(){return(l=Object.assign||function(t){for(var e,r=1,o=arguments.length;r0&&n[n.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]o||n&&n=(e-n.hideXDots)/2&&t<(e+n.hideXDots)/2&&r>=(e-n.hideYDots)/2&&r<(e+n.hideYDots)/2||(null===(o=g[t])||void 0===o?void 0:o[r])||(null===(i=g[t-e+7])||void 0===i?void 0:i[r])||(null===(a=g[t])||void 0===a?void 0:a[r-e+7])||(null===(s=p[t])||void 0===s?void 0:s[r])||(null===(c=p[t-e+7])||void 0===c?void 0:c[r])||(null===(u=p[t])||void 0===u?void 0:u[r-e+7]))})),this.drawCorners(),this._options.image&&this.drawImage({width:n.width,height:n.height,count:e,dotSize:o}),[2]}}))},new((r=void 0)||(r=Promise))((function(t,n){function i(t){try{s(o.next(t))}catch(t){n(t)}}function a(t){try{s(o.throw(t))}catch(t){n(t)}}function s(e){var o;e.done?t(e.value):(o=e.value,o instanceof r?o:new r((function(t){t(o)}))).then(i,a)}s((o=o.apply(e,[])).next())}));var e,r,o},t.prototype.drawBackground=function(){var t=this.context,e=this._options;if(t){if(e.backgroundOptions.gradient){var r=e.backgroundOptions.gradient,o=this._createGradient({context:t,options:r,additionalRotation:0,x:0,y:0,size:this._canvas.width>this._canvas.height?this._canvas.width:this._canvas.height});r.colorStops.forEach((function(t){var e=t.offset,r=t.color;o.addColorStop(e,r)})),t.fillStyle=o}else e.backgroundOptions.color&&(t.fillStyle=e.backgroundOptions.color);t.fillRect(0,0,this._canvas.width,this._canvas.height)}},t.prototype.drawDots=function(t){var e=this;if(!this._qr)throw"QR code is not defined";var r=this.context;if(!r)throw"QR code is not defined";var o=this._options,n=this._qr.getModuleCount();if(n>o.width||n>o.height)throw"The canvas is too small.";var i=Math.min(o.width,o.height)-2*o.margin,a=Math.floor(i/n),s=Math.floor((o.width-n*a)/2),c=Math.floor((o.height-n*a)/2),l=new u({context:r,type:o.dotsOptions.type});r.beginPath();for(var d=function(r){for(var o=function(o){return t&&!t(r,o)?"continue":f._qr.isDark(r,o)?void l.draw(s+r*a,c+o*a,a,(function(i,a){return!(r+i<0||o+a<0||r+i>=n||o+a>=n)&&!(t&&!t(r+i,o+a))&&!!e._qr&&e._qr.isDark(r+i,o+a)})):"continue"},i=0;i=0&&u<=.25*Math.PI||u>1.75*Math.PI&&u<=2*Math.PI?(l-=s/2,d-=s/2*Math.tan(c),f+=s/2,h+=s/2*Math.tan(c)):u>.25*Math.PI&&u<=.75*Math.PI?(d-=s/2,l-=s/2/Math.tan(c),h+=s/2,f+=s/2/Math.tan(c)):u>.75*Math.PI&&u<=1.25*Math.PI?(l+=s/2,d+=s/2*Math.tan(c),f-=s/2,h-=s/2*Math.tan(c)):u>1.25*Math.PI&&u<=1.75*Math.PI&&(d+=s/2,l+=s/2/Math.tan(c),h-=s/2,f-=s/2/Math.tan(c)),e=r.createLinearGradient(Math.round(l),Math.round(d),Math.round(f),Math.round(h))}return e},t}();for(var v={},b=0;b<=40;b++)v[b]=b;const w={width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:v[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{color:"#fff"}};var m=function(){return(m=Object.assign||function(t){for(var e,r=1,o=arguments.length;rMath.min(e.width,e.height)&&(e.margin=Math.min(e.width,e.height)),e.dotsOptions=m({},e.dotsOptions),e.dotsOptions.gradient&&(e.dotsOptions.gradient=x(e.dotsOptions.gradient)),e.cornersSquareOptions&&(e.cornersSquareOptions=m({},e.cornersSquareOptions),e.cornersSquareOptions.gradient&&(e.cornersSquareOptions.gradient=x(e.cornersSquareOptions.gradient))),e.cornersDotOptions&&(e.cornersDotOptions=m({},e.cornersDotOptions),e.cornersDotOptions.gradient&&(e.cornersDotOptions.gradient=x(e.cornersDotOptions.gradient))),e.backgroundOptions&&(e.backgroundOptions=m({},e.backgroundOptions),e.backgroundOptions.gradient&&(e.backgroundOptions.gradient=x(e.backgroundOptions.gradient))),e}var _=r(192),S=r.n(_);const M=function(){function t(t){this._options=t?O(a(w,t)):w,this.update()}return t._clearContainer=function(t){t&&(t.innerHTML="")},t.prototype.update=function(e){t._clearContainer(this._container),this._options=e?O(a(this._options,e)):this._options,this._options.data&&(this._qr=S()(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._canvas=new y(this._options),this._drawingPromise=this._canvas.drawQR(this._qr),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._canvas&&t.appendChild(this._canvas.getCanvas()),this._container=t}},t.prototype.download=function(t){var e=this;this._drawingPromise&&this._drawingPromise.then((function(){if(e._canvas){var r="png",o="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&&(o=t.name),t.extension&&(r=t.extension)),function(t,e){var r=document.createElement("a");r.download=e,r.href=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}(e._canvas.getCanvas().toDataURL("image/"+r),o+"."+r)}}))},t}()}},e={};function r(o){if(e[o])return e[o].exports;var n=e[o]={exports:{}};return t[o](n,n.exports,r),n.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 o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r(151)})().default},function(t,e,r){t.exports=r.p+"10cc19bd484118dbcd0a7886a38ceddc.png"},function(t,e,r){},function(t,e,r){"use strict";r.r(e);var o=r(0),n=r.n(o);r(2);var i=r(1),a=r.n(i);const s=document.getElementById("form"),c=document.getElementById("qr-description"),u=new class{constructor({root:t}={}){t&&this.init({root:t})}init({root:t}){const e=t.querySelectorAll(`[${this._getNodeKey()}]`);e.forEach(t=>{this._setNodeListener(t)}),this.nodes=this._buildNodes(e)}getState(){return this._buildState(this.nodes)}setState(t){const e=function t(e){const r=Object.keys(e),o={};return r.forEach(r=>{const n=e[r];if("object"==typeof n&&null!==n&&n.constructor==={}.constructor){const n=t(e[r]);Object.keys(n).forEach(t=>{o[`${r}.${t}`]=n[t]})}else o[r]=n}),o}(t);Object.keys(e).forEach(t=>{this._setNodeState(this.nodes[t],e[t]),this._getUpdateListener()({field:t,data:e[t]})})}onStateUpdate(t){this.listener=t}_getUpdateListener(){return this.listener}_getNodeState(t){return t[this._getNodeStateKey(t)]}_setNodeState(t,e){t[this._getNodeStateKey(t)]=e}_getNodeKey(){return"node"}_getNodeStateKey(t){return t.getAttribute("node-data-field")||"value"}_getChangeEventKey(t){return t.getAttribute("node-change-event")||"onchange"}_buildState(t){const e=Object.keys(t),r={};return e.forEach(e=>{r[e]=this._getNodeState(t[e])}),function t(e){const r=Object.keys(e),o={};return r.forEach(r=>{const n=r.split("."),i=e[r],a=n.shift(),s=n.join(".");if(s.length){const e=o[a]||{};e[s]=i,o[a]=t(e)}else o[a]=i}),o}(r)}_buildNodes(t){const e={};return t.forEach(t=>{const r=t.getAttribute(this._getNodeKey());e[r]=t}),e}_setNodeListener(t){const e=this._getChangeEventKey(t);t[e]=()=>{this._getUpdateListener()({field:t.getAttribute(this._getNodeKey()),data:this._getNodeState(t)})}}}({root:s}),l=u.getState();delete l.dotsOptions.gradient;const d=new n.a({...l,image:a.a});function f(t,e){let r,o;h(t)>h(e)?(r=e,o=t):(r=t,o=e),c.style["background-image"]=`linear-gradient(90deg, #000 0%, ${r} 50%, ${o} 100%)`}function h(t){return parseInt(t.substring(1,3),16)+parseInt(t.substring(3,5),16)+parseInt(t.substring(5,6),16)}f(l.dotsOptions.color,l.backgroundOptions.color),u.onStateUpdate(({field:t,data:e})=>{const{image:r,imageUrl:o,dotsOptionsHelper:n,cornersSquareOptionsHelper:i,cornersDotOptionsHelper:a,backgroundOptionsHelper:s,...c}=u.getState();if(f(c.dotsOptions.color,c.backgroundOptions.color),"image"===t&&(e&&e[0]?function(t,e){let r=new FileReader;r.onload=t=>{e(t.target.result)},r.readAsDataURL(t)}(e[0],t=>{d.update({image:t})}):d.update({image:null})),"dotsOptionsHelper.colorType.gradient"===t&&e){const t=document.getElementsByClassName("dotsOptionsHelper.colorType.gradient"),e=document.getElementsByClassName("dotsOptionsHelper.colorType.single");return Array.from(t).forEach(t=>{t.style.visibility="visible",t.style.height="auto"}),Array.from(e).forEach(t=>{t.style.visibility="hidden",t.style.height="0"}),void d.update({dotsOptions:{color:void 0,gradient:{type:n.gradient.linear?"linear":"radial",rotation:n.gradient.rotation/180*Math.PI,colorStops:[{offset:0,color:n.gradient.color1},{offset:1,color:n.gradient.color2}]}}})}if("dotsOptionsHelper.colorType.single"===t&&e){const t=document.getElementsByClassName("dotsOptionsHelper.colorType.single"),e=document.getElementsByClassName("dotsOptionsHelper.colorType.gradient");return Array.from(t).forEach(t=>{t.style.visibility="visible",t.style.height="auto"}),Array.from(e).forEach(t=>{t.style.visibility="hidden",t.style.height="0"}),void d.update({dotsOptions:{color:c.dotsOptions.color,gradient:null}})}if("dotsOptionsHelper.gradient.linear"===t&&e)d.update({dotsOptions:{gradient:{type:"linear"}}});else if("dotsOptionsHelper.gradient.radial"===t&&e)d.update({dotsOptions:{gradient:{type:"radial"}}});else if("dotsOptionsHelper.gradient.color1"!==t)if("dotsOptionsHelper.gradient.color2"!==t)if("dotsOptionsHelper.gradient.rotation"!==t){if("cornersSquareOptionsHelper.colorType.gradient"===t&&e){const t=document.getElementsByClassName("cornersSquareOptionsHelper.colorType.gradient"),e=document.getElementsByClassName("cornersSquareOptionsHelper.colorType.single");return Array.from(t).forEach(t=>{t.style.visibility="visible",t.style.height="auto"}),Array.from(e).forEach(t=>{t.style.visibility="hidden",t.style.height="0"}),void d.update({cornersSquareOptions:{color:void 0,gradient:{type:i.gradient.linear?"linear":"radial",rotation:i.gradient.rotation/180*Math.PI,colorStops:[{offset:0,color:i.gradient.color1},{offset:1,color:i.gradient.color2}]}}})}if("cornersSquareOptionsHelper.colorType.single"===t&&e){const t=document.getElementsByClassName("cornersSquareOptionsHelper.colorType.single"),e=document.getElementsByClassName("cornersSquareOptionsHelper.colorType.gradient");return Array.from(t).forEach(t=>{t.style.visibility="visible",t.style.height="auto"}),Array.from(e).forEach(t=>{t.style.visibility="hidden",t.style.height="0"}),void d.update({cornersSquareOptions:{color:c.cornersSquareOptions.color,gradient:null}})}if("cornersSquareOptionsHelper.gradient.linear"===t&&e)d.update({cornersSquareOptions:{gradient:{type:"linear"}}});else if("cornersSquareOptionsHelper.gradient.radial"===t&&e)d.update({cornersSquareOptions:{gradient:{type:"radial"}}});else if("cornersSquareOptionsHelper.gradient.color1"!==t)if("cornersSquareOptionsHelper.gradient.color2"!==t)if("cornersSquareOptionsHelper.gradient.rotation"!==t){if("cornersDotOptionsHelper.colorType.gradient"===t&&e){const t=document.getElementsByClassName("cornersDotOptionsHelper.colorType.gradient"),e=document.getElementsByClassName("cornersDotOptionsHelper.colorType.single");return Array.from(t).forEach(t=>{t.style.visibility="visible",t.style.height="auto"}),Array.from(e).forEach(t=>{t.style.visibility="hidden",t.style.height="0"}),void d.update({cornersDotOptions:{color:void 0,gradient:{type:a.gradient.linear?"linear":"radial",rotation:a.gradient.rotation/180*Math.PI,colorStops:[{offset:0,color:a.gradient.color1},{offset:1,color:a.gradient.color2}]}}})}if("cornersDotOptionsHelper.colorType.single"===t&&e){const t=document.getElementsByClassName("cornersDotOptionsHelper.colorType.single"),e=document.getElementsByClassName("cornersDotOptionsHelper.colorType.gradient");return Array.from(t).forEach(t=>{t.style.visibility="visible",t.style.height="auto"}),Array.from(e).forEach(t=>{t.style.visibility="hidden",t.style.height="0"}),void d.update({cornersDotOptions:{color:c.cornersDotOptions.color,gradient:null}})}if("cornersDotOptionsHelper.gradient.linear"===t&&e)d.update({cornersDotOptions:{gradient:{type:"linear"}}});else if("cornersDotOptionsHelper.gradient.radial"===t&&e)d.update({cornersDotOptions:{gradient:{type:"radial"}}});else if("cornersDotOptionsHelper.gradient.color1"!==t)if("cornersDotOptionsHelper.gradient.color2"!==t)if("cornersDotOptionsHelper.gradient.rotation"!==t){if("backgroundOptionsHelper.colorType.gradient"===t&&e){const t=document.getElementsByClassName("backgroundOptionsHelper.colorType.gradient"),e=document.getElementsByClassName("backgroundOptionsHelper.colorType.single");return Array.from(t).forEach(t=>{t.style.visibility="visible",t.style.height="auto"}),Array.from(e).forEach(t=>{t.style.visibility="hidden",t.style.height="0"}),void d.update({backgroundOptions:{color:void 0,gradient:{type:s.gradient.linear?"linear":"radial",rotation:s.gradient.rotation/180*Math.PI,colorStops:[{offset:0,color:s.gradient.color1},{offset:1,color:s.gradient.color2}]}}})}if("backgroundOptionsHelper.colorType.single"===t&&e){const t=document.getElementsByClassName("backgroundOptionsHelper.colorType.single"),e=document.getElementsByClassName("backgroundOptionsHelper.colorType.gradient");return Array.from(t).forEach(t=>{t.style.visibility="visible",t.style.height="auto"}),Array.from(e).forEach(t=>{t.style.visibility="hidden",t.style.height="0"}),void d.update({backgroundOptions:{color:c.backgroundOptions.color,gradient:null}})}"backgroundOptionsHelper.gradient.linear"===t&&e?d.update({backgroundOptions:{gradient:{type:"linear"}}}):"backgroundOptionsHelper.gradient.radial"===t&&e?d.update({backgroundOptions:{gradient:{type:"radial"}}}):"backgroundOptionsHelper.gradient.color1"!==t?"backgroundOptionsHelper.gradient.color2"!==t?"backgroundOptionsHelper.gradient.rotation"!==t?d.update(c):d.update({backgroundOptions:{gradient:{rotation:s.gradient.rotation/180*Math.PI}}}):d.update({backgroundOptions:{gradient:{colorStops:[{offset:0,color:s.gradient.color1},{offset:1,color:e}]}}}):d.update({backgroundOptions:{gradient:{colorStops:[{offset:0,color:e},{offset:1,color:s.gradient.color2}]}}})}else d.update({cornersDotOptions:{gradient:{rotation:a.gradient.rotation/180*Math.PI}}});else d.update({cornersDotOptions:{gradient:{colorStops:[{offset:0,color:a.gradient.color1},{offset:1,color:e}]}}});else d.update({cornersDotOptions:{gradient:{colorStops:[{offset:0,color:e},{offset:1,color:a.gradient.color2}]}}})}else d.update({cornersSquareOptions:{gradient:{rotation:i.gradient.rotation/180*Math.PI}}});else d.update({cornersSquareOptions:{gradient:{colorStops:[{offset:0,color:i.gradient.color1},{offset:1,color:e}]}}});else d.update({cornersSquareOptions:{gradient:{colorStops:[{offset:0,color:e},{offset:1,color:i.gradient.color2}]}}})}else d.update({dotsOptions:{gradient:{rotation:n.gradient.rotation/180*Math.PI}}});else d.update({dotsOptions:{gradient:{colorStops:[{offset:0,color:n.gradient.color1},{offset:1,color:e}]}}});else d.update({dotsOptions:{gradient:{colorStops:[{offset:0,color:e},{offset:1,color:n.gradient.color2}]}}})});const g=document.getElementById("qr-code-generated");d.append(g),document.getElementById("button-cancel").onclick=()=>{u.setState({image:(new DataTransfer).files})},document.getElementById("button-clear-corners-square-color").onclick=()=>{const t=u.getState();u.setState({cornersSquareOptions:{color:t.dotsOptions.color}})},document.getElementById("button-clear-corners-dot-color").onclick=()=>{const t=u.getState();u.setState({cornersDotOptions:{color:t.dotsOptions.color}})},document.getElementById("qr-download").onclick=()=>{const t=document.getElementById("qr-extension").value;d.download({extension:t,name:"qr-code"})},document.getElementById("export-options").addEventListener("click",(function(){const t="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(d._options));this.setAttribute("href",t),this.setAttribute("download","options.json")}));let p=document.getElementsByClassName("accordion");for(let t=0;t