/** * QRcode-with-logos is a tool for creating a QRcode with a logo in your object. * Version: 1.0.3 * Link: https://unpkg.com/qrcode-with-logos@1.0.3/dist/qrcode-with-logos.umd.min.js */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.QrCodeWithLogo=e():t.QrCodeWithLogo=e()}(window,function(){return n={},o.m=r=[function(t,e){var r,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||40>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');r=t},e.isKanjiModeEnabled=function(){return void 0!==r},e.toSJIS=function(t){return r(t)}},function(t,r,e){var n=e(8),o=e(9);r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!n.isValid(e))throw new Error("Invalid version: "+e);return 1<=e&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},r.getBestModeForData=function(t){return o.testNumeric(t)?r.NUMERIC:o.testAlphanumeric(t)?r.ALPHANUMERIC:o.testKanji(t)?r.KANJI:r.BYTE},r.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},r.isValid=function(t){return t&&t.bit&&t.ccBits},r.from=function(t,e){if(r.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return e}}},function(t,e,r){"use strict";var a=r(4);var n=(u.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}())?2147483647:1073741823;function u(t,e,r){return u.TYPED_ARRAY_SUPPORT||this instanceof u?"number"==typeof t?f(this,t):function(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer)return function(t,e,r,n){if(r<0||e.byteLength>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function c(t){return u.isBuffer(t)?t.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!=typeof t&&(t=""+t),0===t.length?0:h(t).length)}function l(t,e,r,n){return function(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}(h(e,t.length-r),t,r,n)}u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),u.prototype.write=function(t,e,r){void 0===e||void 0===r&&"string"==typeof e?(r=this.length,e=0):isFinite(e)&&(e|=0,isFinite(r)?r|=0:r=void 0);var n=this.length-e;if((void 0===r||nthis.length)throw new RangeError("Attempt to write outside buffer bounds");return l(this,t,e,r)},u.prototype.slice=function(t,e){var r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):r=t.length&&(e=t.length),e=e||0,0=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(t=t||0))for(a=e;a>24&255,g:t>>16&255,b:t>>8&255,a:255&t,hex:"#"+e.slice(0,6).join("")}}g.getOptions=function(t){(t=t||{}).color||(t.color={});var e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&21<=t.width?t.width:void 0,n=t.scale||4;return{width:r,scale:r?4:n,margin:e,color:{dark:o(t.color.dark||"#000000ff"),light:o(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},g.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},g.getImageWidth=function(t,e){var r=g.getScale(t,e);return Math.floor((t+2*e.margin)*r)},g.qrToImageData=function(t,e,r){for(var n=e.modules.size,o=e.modules.data,i=g.getScale(n,r),a=Math.floor((n+2*r.margin)*i),u=r.margin*i,s=[r.color.light,r.color.dark],f=0;fa[0]&&e[1]>a&1),a<6?t.set(a,8,n,!0):a<8?t.set(a+1,8,n,!0):t.set(o-15+a,8,n,!0),a<8?t.set(8,o-a-1,n,!0):a<9?t.set(8,15-a-1+1,n,!0):t.set(8,15-a-1,n,!0);t.set(o-8,8,1,!0)}function y(e,t,r){var n=new a;r.forEach(function(t){n.put(t.mode.bit,4),n.put(t.getLength(),g.getCharCountIndicator(t.mode,e)),t.write(n)});r=8*(R.getSymbolTotalCodewords(e)-P.getTotalCodewordsCount(e,t));for(n.getLengthInBits()+4<=r&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(0);for(var o=(r-n.getLengthInBits())/8,i=0;i>u&1),t.set(r,n,o,!0),t.set(n,r,o,!0)}(t,e),function(t,e){for(var r=t.size,n=-1,o=r-1,i=7,a=0,u=r-1;0>>i&1)),t.set(o,u-f,s),-1===--i&&(a++,i=7));if((o+=n)<0||r<=o){o-=n,n=-n;break}}}(t,a),isNaN(n)&&(n=h.getBestMask(t,v.bind(null,t,r))),h.applyMask(n,t),v(t,r,n),{modules:t,version:e,errorCorrectionLevel:r,maskPattern:n,segments:o}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");var r,n,o=i.M;return void 0!==e&&(o=i.from(e.errorCorrectionLevel,i.M),r=c.from(e.version),n=h.from(e.maskPattern),e.toSJISFunc&&R.setToSJISFunction(e.toSJISFunc)),w(t,r,o,n)}},function(t,e){function r(){this.buffer=[],this.length=0}r.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var r=0;r>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=r},function(t,e,r){var n=r(2);function o(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=n.alloc(t*t),this.reservedBit=n.alloc(t*t)}o.prototype.set=function(t,e,r,n){e=t*this.size+e;this.data[e]=r,n&&(this.reservedBit[e]=!0)},o.prototype.get=function(t,e){return this.data[t*this.size+e]},o.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r},o.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=o},function(t,a,e){var i=e(0).getSymbolSize;a.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,t=i(t),r=145===t?26:2*Math.ceil((t-13)/(2*e-2)),n=[t-7],o=1;o * @license MIT */ var u=x(26),i=x(27),a=x(28);function r(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function g(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return I(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return S(t).length;default:if(n)return I(t).length;e=(""+e).toLowerCase(),n=!0}}function e(t,e,r){var n,o,i,a=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t=t||"utf8";;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0);(!r||r<0||n=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,o);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(o?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(t,e,r):v(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,o){var i=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a/=i=2,u/=2,r/=2}function s(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}if(o)for(var f=-1,h=r;h>8,n=n%256,o.push(n),o.push(r);return o}(e,t.length-r),t,r,n)}function m(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o>>10&1023|55296),h=56320|1023&h),n.push(h),o+=c}return function(t){var e=t.length;if(e<=b)return String.fromCharCode.apply(String,t);var r="",n=0;for(;ne&&(t+=" ... ")),""},c.prototype.compare=function(t,e,r,n,o){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(o<=n&&r<=e)return 0;if(o<=n)return-1;if(r<=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),u=Math.min(i,a),s=this.slice(n,o),f=t.slice(e,r),h=0;hthis.length)throw new RangeError("Attempt to write outside buffer bounds");n=n||"utf8";for(var i,a,u,s=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var o=t.length-r;if((!n||o<(n=Number(n)))&&(n=o),(o=e.length)%2!=0)throw new TypeError("Invalid hex string");o/2t.length)throw new RangeError("Index out of range")}function R(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o>>8*(n?o:1-o)}function P(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o>>8*(n?o:3-o)&255}function _(t,e,r,n){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,o){return o||_(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function T(t,e,r,n,o){return o||_(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){var r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):r>>8):R(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):P(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,r,n){t=+t,e|=0,n||A(this,t,e,r,(n=Math.pow(2,8*r-1))-1,-n);var o=0,i=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){t=+t,e|=0,n||A(this,t,e,r,(n=Math.pow(2,8*r-1))-1,-n);var o=r-1,i=1,a=0;for(this[e+o]=255&t;0<=--o&&(i*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/i>>0)-a&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):P(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return T(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return T(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(r=r||0,n||0===n||(n=this.length),e>=t.length&&(e=t.length),e=e||0,0=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(t=t||0))for(u=e;u>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function S(t){return u.toByteArray(function(t){var e;if((t=((e=t).trim?e.trim():e.replace(/^\s+|\s+$/g,"")).replace(C,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function M(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}}).call(this,x(25))},function(t,e){var r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";e.byteLength=function(t){var e=h(t),t=e[0],e=e[1];return 3*(t+e)/4-e},e.toByteArray=function(t){var e,r,n=h(t),o=n[0],n=n[1],i=new f(function(t,e){return 3*(t+e)/4-e}(o,n)),a=0,u=0>16&255,i[a++]=e>>8&255,i[a++]=255&e;2===n&&(e=s[t.charCodeAt(r)]<<2|s[t.charCodeAt(r+1)]>>4,i[a++]=255&e);1===n&&(e=s[t.charCodeAt(r)]<<10|s[t.charCodeAt(r+1)]<<4|s[t.charCodeAt(r+2)]>>2,i[a++]=e>>8&255,i[a++]=255&e);return i},e.fromByteArray=function(t){for(var e,r=t.length,n=r%3,o=[],i=0,a=r-n;i>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}(n));return o.join("")}(t,i,a>2]+u[e<<4&63]+"==")):2==n&&(e=(t[r-2]<<8)+t[r-1],o.push(u[e>>10]+u[e>>4&63]+u[e<<2&63]+"="));return o.join("")};for(var u=[],s=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=n.length;o */ e.read=function(t,e,r,n,o){var i,a,u=8*o-n-1,s=(1<>1,h=-7,c=r?o-1:0,l=r?-1:1,r=t[e+c];for(c+=l,i=r&(1<<-h)-1,r>>=-h,h+=u;0>=-h,h+=n;0>1,c=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:i-1,g=n?1:-1,i=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(n=Math.pow(2,-a))<1&&(a--,n*=2),2<=(e+=1<=a+h?c/n:c*Math.pow(2,1-h))*n&&(a++,n/=2),f<=a+h?(u=0,a=f):1<=a+h?(u=(e*n-1)*Math.pow(2,o),a+=h):(u=e*Math.pow(2,h-1)*Math.pow(2,o),a=0));8<=o;t[r+l]=255&u,l+=g,u/=256,o-=8);for(a=a<>>8&255)+(255&r),t.put(r,13)}},t.exports=i},function(t,e,r){"use strict";var g={single_source_shortest_paths:function(t,e,r){var n={},o={};o[e]=0;var i,a,u,s,f,h,c,l=g.PriorityQueue.make();for(l.push(e,0);!l.empty();)for(u in a=(i=l.pop()).value,s=i.cost,f=t[a]||{})f.hasOwnProperty(u)&&(h=s+f[u],c=o[u],(void 0===o[u]||h':"",o="',e='viewBox="0 0 '+e+" "+e+'"',o=''+t+o+"\n";return"function"==typeof r&&r(null,o),o}},function(t,e,r){"use strict";e.__esModule=!0,e.drawLogo=void 0;var p=r(3);e.drawLogo=function(t){var e=t.canvas,r=t.logo;if(!r)return Promise.resolve();if(""===r)return Promise.resolve();var n=e.width;p.isString(r)&&(r={src:r});var o=r.logoSize,i=void 0===o?.15:o,a=r.borderColor,u=void 0===a?"#ffffff":a,s=r.bgColor,t=void 0===s?u||"#ffffff":s,o=r.borderSize,a=void 0===o?.05:o,u=r.crossOrigin,s=r.borderRadius,o=void 0===s?8:s,s=r.logoRadius,f=void 0===s?0:s,s="string"==typeof r?r:r.src,h=n*i,c=n*(1-i)/2,r=n*(i+a),a=n*(1-i-a)/2,l=e.getContext("2d");d(l)(a,a,r,r,o),l.fillStyle=t,l.fill();var g=new Image;g.setAttribute("crossOrigin",u||"anonymous"),g.src=s;return new Promise(function(r){g.onload=function(){var t,e;f?(t=g,(e=document.createElement("canvas")).width=c+h,e.height=c+h,e.getContext("2d").drawImage(t,c,c,h,h),d(l)(c,c,h,h,f),l.fillStyle=l.createPattern(e,"no-repeat"),l.fill()):(e=g,l.drawImage(e,c,c,h,h)),r()}})};var d=function(a){return function(t,e,r,n,o){var i=Math.min(r,n);return i/2a[0]&&e[1]