@frames.js/debugger
Version:
Debug your Frames.js applications
1 lines • 762 kB
JavaScript
exports.id=2657,exports.ids=[2657],exports.modules={2608:e=>{"use strict";var t={single_source_shortest_paths:function(e,r,n){var o,i,a,s,l,c,u,d={},f={};f[r]=0;var h=t.PriorityQueue.make();for(h.push(r,0);!h.empty();)for(a in i=(o=h.pop()).value,s=o.cost,l=e[i]||{})l.hasOwnProperty(a)&&(c=s+l[a],u=f[a],(void 0===f[a]||u>c)&&(f[a]=c,h.push(a,c),d[a]=i));if(void 0!==n&&void 0===f[n])throw Error(["Could not find a path from ",r," to ",n,"."].join(""));return d},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],n=t;n;)r.push(n),e[n],n=e[n];return r.reverse(),r},find_path:function(e,r,n){var o=t.single_source_shortest_paths(e,r,n);return t.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(e){var r,n=t.PriorityQueue,o={};for(r in e=e||{},n)n.hasOwnProperty(r)&&(o[r]=n[r]);return o.queue=[],o.sorter=e.sorter||n.default_sorter,o},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){this.queue.push({value:e,cost:t}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},40342:e=>{"use strict";e.exports=function(e){for(var t=[],r=e.length,n=0;n<r;n++){var o=e.charCodeAt(n);if(o>=55296&&o<=56319&&r>n+1){var i=e.charCodeAt(n+1);i>=56320&&i<=57343&&(o=(o-55296)*1024+i-56320+65536,n+=1)}if(o<128){t.push(o);continue}if(o<2048){t.push(o>>6|192),t.push(63&o|128);continue}if(o<55296||o>=57344&&o<65536){t.push(o>>12|224),t.push(o>>6&63|128),t.push(63&o|128);continue}if(o>=65536&&o<=1114111){t.push(o>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(63&o|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer}},36017:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function i(e,t,n,i,a){if("function"!=typeof n)throw TypeError("The listener must be a function");var s=new o(n,i||e,a),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,a=Array(i);o<i;o++)a[o]=n[o].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,o,i,a){var s=r?r+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,o),!0;case 5:return u.fn.call(u.context,t,n,o,i),!0;case 6:return u.fn.call(u.context,t,n,o,i,a),!0}for(c=1,l=Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,h=u.length;for(c=0;c<h;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,o);break;default:if(!l)for(f=1,l=Array(d-1);f<d;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,r){return i(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return i(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,o){var i=r?r+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn!==t||o&&!s.once||n&&s.context!==n||a(this,i);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||n&&s[l].context!==n)&&c.push(s[l]);c.length?this._events[i]=1===c.length?c[0]:c:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s},70113:(e,t,r)=>{"use strict";let n=r(13374),o=[function(){},function(e,t,r,n){if(n===t.length)throw Error("Ran out of data");let o=t[n];e[r]=o,e[r+1]=o,e[r+2]=o,e[r+3]=255},function(e,t,r,n){if(n+1>=t.length)throw Error("Ran out of data");let o=t[n];e[r]=o,e[r+1]=o,e[r+2]=o,e[r+3]=t[n+1]},function(e,t,r,n){if(n+2>=t.length)throw Error("Ran out of data");e[r]=t[n],e[r+1]=t[n+1],e[r+2]=t[n+2],e[r+3]=255},function(e,t,r,n){if(n+3>=t.length)throw Error("Ran out of data");e[r]=t[n],e[r+1]=t[n+1],e[r+2]=t[n+2],e[r+3]=t[n+3]}],i=[function(){},function(e,t,r,n){let o=t[0];e[r]=o,e[r+1]=o,e[r+2]=o,e[r+3]=n},function(e,t,r){let n=t[0];e[r]=n,e[r+1]=n,e[r+2]=n,e[r+3]=t[1]},function(e,t,r,n){e[r]=t[0],e[r+1]=t[1],e[r+2]=t[2],e[r+3]=n},function(e,t,r){e[r]=t[0],e[r+1]=t[1],e[r+2]=t[2],e[r+3]=t[3]}];t.dataToBitMap=function(e,t){let r,a,s,l,c=t.width,u=t.height,d=t.depth,f=t.bpp,h=t.interlace;if(8!==d){let t,n;t=[],n=0,r={get:function(r){for(;t.length<r;)!function(){let r,o,i,a;if(n===e.length)throw Error("Ran out of data");let s=e[n];switch(n++,d){default:throw Error("unrecognised depth");case 16:i=e[n],n++,t.push((s<<8)+i);break;case 4:i=15&s,a=s>>4,t.push(a,i);break;case 2:r=3&s,o=s>>2&3,i=s>>4&3,a=s>>6&3,t.push(a,i,o,r);break;case 1:r=s>>4&1,o=s>>5&1,i=s>>6&1,a=s>>7&1,t.push(a,i,o,r,s>>3&1,s>>2&1,s>>1&1,1&s)}}();let o=t.slice(0,r);return t=t.slice(r),o},resetAfterLine:function(){t.length=0},end:function(){if(n!==e.length)throw Error("extra data found")}}}a=d<=8?Buffer.alloc(c*u*4):new Uint16Array(c*u*4);let p=Math.pow(2,d)-1,m=0;if(h)s=n.getImagePasses(c,u),l=n.getInterlaceIterator(c,u);else{let e=0;l=function(){let t=e;return e+=4,t},s=[{width:c,height:u}]}for(let t=0;t<s.length;t++)8===d?m=function(e,t,r,n,i,a){let s=e.width,l=e.height,c=e.index;for(let e=0;e<l;e++)for(let l=0;l<s;l++){let s=r(l,e,c);o[n](t,i,s,a),a+=n}return a}(s[t],a,l,f,e,m):function(e,t,r,n,o,a){let s=e.width,l=e.height,c=e.index;for(let e=0;e<l;e++){for(let l=0;l<s;l++){let s=o.get(n),u=r(l,e,c);i[n](t,s,u,a)}o.resetAfterLine()}}(s[t],a,l,f,r,p);if(8===d){if(m!==e.length)throw Error("extra data found")}else r.end();return a}},30930:(e,t,r)=>{"use strict";let n=r(12414);e.exports=function(e,t,r,o){let i=-1!==[n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(o.colorType);if(o.colorType===o.inputColorType){let t;let r=(t=new ArrayBuffer(2),new DataView(t).setInt16(0,256,!0),256!==new Int16Array(t)[0]);if(8===o.bitDepth||16===o.bitDepth&&r)return e}let a=16!==o.bitDepth?e:new Uint16Array(e.buffer),s=255,l=n.COLORTYPE_TO_BPP_MAP[o.inputColorType];4!==l||o.inputHasAlpha||(l=3);let c=n.COLORTYPE_TO_BPP_MAP[o.colorType];16===o.bitDepth&&(s=65535,c*=2);let u=Buffer.alloc(t*r*c),d=0,f=0,h=o.bgColor||{};void 0===h.red&&(h.red=s),void 0===h.green&&(h.green=s),void 0===h.blue&&(h.blue=s);for(let e=0;e<r;e++)for(let e=0;e<t;e++){let e=function(){let e,t,r;let l=s;switch(o.inputColorType){case n.COLORTYPE_COLOR_ALPHA:l=a[d+3],e=a[d],t=a[d+1],r=a[d+2];break;case n.COLORTYPE_COLOR:e=a[d],t=a[d+1],r=a[d+2];break;case n.COLORTYPE_ALPHA:l=a[d+1],t=e=a[d],r=e;break;case n.COLORTYPE_GRAYSCALE:t=e=a[d],r=e;break;default:throw Error("input color type:"+o.inputColorType+" is not supported at present")}return o.inputHasAlpha&&!i&&(l/=s,e=Math.min(Math.max(Math.round((1-l)*h.red+l*e),0),s),t=Math.min(Math.max(Math.round((1-l)*h.green+l*t),0),s),r=Math.min(Math.max(Math.round((1-l)*h.blue+l*r),0),s)),{red:e,green:t,blue:r,alpha:l}}(a,d);switch(o.colorType){case n.COLORTYPE_COLOR_ALPHA:case n.COLORTYPE_COLOR:8===o.bitDepth?(u[f]=e.red,u[f+1]=e.green,u[f+2]=e.blue,i&&(u[f+3]=e.alpha)):(u.writeUInt16BE(e.red,f),u.writeUInt16BE(e.green,f+2),u.writeUInt16BE(e.blue,f+4),i&&u.writeUInt16BE(e.alpha,f+6));break;case n.COLORTYPE_ALPHA:case n.COLORTYPE_GRAYSCALE:{let t=(e.red+e.green+e.blue)/3;8===o.bitDepth?(u[f]=t,i&&(u[f+1]=e.alpha)):(u.writeUInt16BE(t,f),i&&u.writeUInt16BE(e.alpha,f+2));break}default:throw Error("unrecognised color Type "+o.colorType)}d+=l,f+=c}return u}},30022:(e,t,r)=>{"use strict";let n=r(73837),o=r(12781),i=e.exports=function(){o.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};n.inherits(i,o),i.prototype.read=function(e,t){this._reads.push({length:Math.abs(e),allowLess:e<0,func:t}),process.nextTick((function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}).bind(this))},i.prototype.write=function(e,t){let r;return this.writable?(r=Buffer.isBuffer(e)?e:Buffer.from(e,t||this._encoding),this._buffers.push(r),this._buffered+=r.length,this._process(),this._reads&&0===this._reads.length&&(this._paused=!0),this.writable&&!this._paused):(this.emit("error",Error("Stream not writable")),!1)},i.prototype.end=function(e,t){e&&this.write(e,t),this.writable=!1,this._buffers&&(0===this._buffers.length?this._end():(this._buffers.push(null),this._process()))},i.prototype.destroySoon=i.prototype.end,i.prototype._end=function(){this._reads.length>0&&this.emit("error",Error("Unexpected end of input")),this.destroy()},i.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))},i.prototype._processReadAllowingLess=function(e){this._reads.shift();let t=this._buffers[0];t.length>e.length?(this._buffered-=e.length,this._buffers[0]=t.slice(e.length),e.func.call(this,t.slice(0,e.length))):(this._buffered-=t.length,this._buffers.shift(),e.func.call(this,t))},i.prototype._processRead=function(e){this._reads.shift();let t=0,r=0,n=Buffer.alloc(e.length);for(;t<e.length;){let o=this._buffers[r++],i=Math.min(o.length,e.length-t);o.copy(n,t,0,i),t+=i,i!==o.length&&(this._buffers[--r]=o.slice(i))}r>0&&this._buffers.splice(0,r),this._buffered-=e.length,e.func.call(this,n)},i.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let e=this._reads[0];if(e.allowLess)this._processReadAllowingLess(e);else if(this._buffered>=e.length)this._processRead(e);else break}this._buffers&&!this.writable&&this._end()}catch(e){this.emit("error",e)}}},12414:e=>{"use strict";e.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}},28859:e=>{"use strict";let t=[];!function(){for(let e=0;e<256;e++){let r=e;for(let e=0;e<8;e++)1&r?r=3988292384^r>>>1:r>>>=1;t[e]=r}}();let r=e.exports=function(){this._crc=-1};r.prototype.write=function(e){for(let r=0;r<e.length;r++)this._crc=t[(this._crc^e[r])&255]^this._crc>>>8;return!0},r.prototype.crc32=function(){return -1^this._crc},r.crc32=function(e){let r=-1;for(let n=0;n<e.length;n++)r=t[(r^e[n])&255]^r>>>8;return -1^r}},79888:(e,t,r)=>{"use strict";let n=r(97870),o={0:function(e,t,r,n,o){for(let i=0;i<r;i++)n[o+i]=e[t+i]},1:function(e,t,r,n,o,i){for(let a=0;a<r;a++){let r=a>=i?e[t+a-i]:0,s=e[t+a]-r;n[o+a]=s}},2:function(e,t,r,n,o){for(let i=0;i<r;i++){let a=t>0?e[t+i-r]:0,s=e[t+i]-a;n[o+i]=s}},3:function(e,t,r,n,o,i){for(let a=0;a<r;a++){let s=a>=i?e[t+a-i]:0,l=t>0?e[t+a-r]:0,c=e[t+a]-(s+l>>1);n[o+a]=c}},4:function(e,t,r,o,i,a){for(let s=0;s<r;s++){let l=s>=a?e[t+s-a]:0,c=t>0?e[t+s-r]:0,u=t>0&&s>=a?e[t+s-(r+a)]:0,d=e[t+s]-n(l,c,u);o[i+s]=d}}},i={0:function(e,t,r){let n=0,o=t+r;for(let r=t;r<o;r++)n+=Math.abs(e[r]);return n},1:function(e,t,r,n){let o=0;for(let i=0;i<r;i++){let r=i>=n?e[t+i-n]:0;o+=Math.abs(e[t+i]-r)}return o},2:function(e,t,r){let n=0,o=t+r;for(let i=t;i<o;i++){let o=t>0?e[i-r]:0;n+=Math.abs(e[i]-o)}return n},3:function(e,t,r,n){let o=0;for(let i=0;i<r;i++){let a=i>=n?e[t+i-n]:0,s=t>0?e[t+i-r]:0;o+=Math.abs(e[t+i]-(a+s>>1))}return o},4:function(e,t,r,o){let i=0;for(let a=0;a<r;a++){let s=a>=o?e[t+a-o]:0,l=t>0?e[t+a-r]:0,c=t>0&&a>=o?e[t+a-(r+o)]:0;i+=Math.abs(e[t+a]-n(s,l,c))}return i}};e.exports=function(e,t,r,n,a){let s;if("filterType"in n&&-1!==n.filterType){if("number"==typeof n.filterType)s=[n.filterType];else throw Error("unrecognised filter types")}else s=[0,1,2,3,4];16===n.bitDepth&&(a*=2);let l=t*a,c=0,u=0,d=Buffer.alloc((l+1)*r),f=s[0];for(let t=0;t<r;t++){if(s.length>1){let t=1/0;for(let r=0;r<s.length;r++){let n=i[s[r]](e,u,l,a);n<t&&(f=s[r],t=n)}}d[c]=f,c++,o[f](e,u,l,d,c,a),c+=l,u+=l}return d}},65854:(e,t,r)=>{"use strict";let n=r(73837),o=r(30022),i=r(75506),a=e.exports=function(e){o.call(this);let t=[],r=this;this._filter=new i(e,{read:this.read.bind(this),write:function(e){t.push(e)},complete:function(){r.emit("complete",Buffer.concat(t))}}),this._filter.start()};n.inherits(a,o)},52959:(e,t,r)=>{"use strict";let n=r(6659),o=r(75506);t.process=function(e,t){let r=[],i=new n(e);return new o(t,{read:i.read.bind(i),write:function(e){r.push(e)},complete:function(){}}).start(),i.process(),Buffer.concat(r)}},75506:(e,t,r)=>{"use strict";let n=r(13374),o=r(97870);function i(e,t,r){let n=e*t;return 8!==r&&(n=Math.ceil(n/(8/r))),n}let a=e.exports=function(e,t){let r=e.width,o=e.height,a=e.interlace,s=e.bpp,l=e.depth;if(this.read=t.read,this.write=t.write,this.complete=t.complete,this._imageIndex=0,this._images=[],a){let e=n.getImagePasses(r,o);for(let t=0;t<e.length;t++)this._images.push({byteWidth:i(e[t].width,s,l),height:e[t].height,lineIndex:0})}else this._images.push({byteWidth:i(r,s,l),height:o,lineIndex:0});8===l?this._xComparison=s:16===l?this._xComparison=2*s:this._xComparison=1};a.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))},a.prototype._unFilterType1=function(e,t,r){let n=this._xComparison,o=n-1;for(let i=0;i<r;i++){let r=e[1+i],a=i>o?t[i-n]:0;t[i]=r+a}},a.prototype._unFilterType2=function(e,t,r){let n=this._lastLine;for(let o=0;o<r;o++){let r=e[1+o],i=n?n[o]:0;t[o]=r+i}},a.prototype._unFilterType3=function(e,t,r){let n=this._xComparison,o=n-1,i=this._lastLine;for(let a=0;a<r;a++){let r=e[1+a],s=i?i[a]:0,l=Math.floor(((a>o?t[a-n]:0)+s)/2);t[a]=r+l}},a.prototype._unFilterType4=function(e,t,r){let n=this._xComparison,i=n-1,a=this._lastLine;for(let s=0;s<r;s++){let r=e[1+s],l=a?a[s]:0,c=o(s>i?t[s-n]:0,l,s>i&&a?a[s-n]:0);t[s]=r+c}},a.prototype._reverseFilterLine=function(e){let t,r=e[0],n=this._images[this._imageIndex],o=n.byteWidth;if(0===r)t=e.slice(1,o+1);else switch(t=Buffer.alloc(o),r){case 1:this._unFilterType1(e,t,o);break;case 2:this._unFilterType2(e,t,o);break;case 3:this._unFilterType3(e,t,o);break;case 4:this._unFilterType4(e,t,o);break;default:throw Error("Unrecognised filter type - "+r)}this.write(t),n.lineIndex++,n.lineIndex>=n.height?(this._lastLine=null,this._imageIndex++,n=this._images[this._imageIndex]):this._lastLine=t,n?this.read(n.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}},2757:e=>{"use strict";e.exports=function(e,t){let r=t.depth,n=t.width,o=t.height,i=t.colorType,a=t.transColor,s=t.palette,l=e;return 3===i?function(e,t,r,n,o){let i=0;for(let a=0;a<n;a++)for(let n=0;n<r;n++){let r=o[e[i]];if(!r)throw Error("index "+e[i]+" not in palette");for(let e=0;e<4;e++)t[i+e]=r[e];i+=4}}(e,l,n,o,s):(a&&function(e,t,r,n,o){let i=0;for(let a=0;a<n;a++)for(let n=0;n<r;n++){let r=!1;if(1===o.length?o[0]===e[i]&&(r=!0):o[0]===e[i]&&o[1]===e[i+1]&&o[2]===e[i+2]&&(r=!0),r)for(let e=0;e<4;e++)t[i+e]=0;i+=4}}(e,l,n,o,a),8!==r&&(16===r&&(l=Buffer.alloc(n*o*4)),function(e,t,r,n,o){let i=Math.pow(2,o)-1,a=0;for(let o=0;o<n;o++)for(let n=0;n<r;n++){for(let r=0;r<4;r++)t[a+r]=Math.floor(255*e[a+r]/i+.5);a+=4}}(e,l,n,o,r))),l}},13374:(e,t)=>{"use strict";let r=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];t.getImagePasses=function(e,t){let n=[],o=e%8,i=t%8,a=(e-o)/8,s=(t-i)/8;for(let e=0;e<r.length;e++){let t=r[e],l=a*t.x.length,c=s*t.y.length;for(let e=0;e<t.x.length;e++)if(t.x[e]<o)l++;else break;for(let e=0;e<t.y.length;e++)if(t.y[e]<i)c++;else break;l>0&&c>0&&n.push({width:l,height:c,index:e})}return n},t.getInterlaceIterator=function(e){return function(t,n,o){let i=t%r[o].x.length,a=(t-i)/r[o].x.length*8+r[o].x[i],s=n%r[o].y.length;return 4*a+((n-s)/r[o].y.length*8+r[o].y[s])*e*4}}},82195:(e,t,r)=>{"use strict";let n=r(73837),o=r(12781),i=r(12414),a=r(55959),s=e.exports=function(e){o.call(this),this._packer=new a(e||{}),this._deflate=this._packer.createDeflate(),this.readable=!0};n.inherits(s,o),s.prototype.pack=function(e,t,r,n){this.emit("data",Buffer.from(i.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(t,r)),n&&this.emit("data",this._packer.packGAMA(n));let o=this._packer.filterData(e,t,r);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",(function(e){this.emit("data",this._packer.packIDAT(e))}).bind(this)),this._deflate.on("end",(function(){this.emit("data",this._packer.packIEND()),this.emit("end")}).bind(this)),this._deflate.end(o)}},12070:(e,t,r)=>{"use strict";let n=!0,o=r(59796);o.deflateSync||(n=!1);let i=r(12414),a=r(55959);e.exports=function(e,t){if(!n)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let r=new a(t||{}),s=[];s.push(Buffer.from(i.PNG_SIGNATURE)),s.push(r.packIHDR(e.width,e.height)),e.gamma&&s.push(r.packGAMA(e.gamma));let l=r.filterData(e.data,e.width,e.height),c=o.deflateSync(l,r.getDeflateOptions());if(l=null,!c||!c.length)throw Error("bad png - invalid compressed data response");return s.push(r.packIDAT(c)),s.push(r.packIEND()),Buffer.concat(s)}},55959:(e,t,r)=>{"use strict";let n=r(12414),o=r(28859),i=r(30930),a=r(79888),s=r(59796),l=e.exports=function(e){if(this._options=e,e.deflateChunkSize=e.deflateChunkSize||32768,e.deflateLevel=null!=e.deflateLevel?e.deflateLevel:9,e.deflateStrategy=null!=e.deflateStrategy?e.deflateStrategy:3,e.inputHasAlpha=null==e.inputHasAlpha||e.inputHasAlpha,e.deflateFactory=e.deflateFactory||s.createDeflate,e.bitDepth=e.bitDepth||8,e.colorType="number"==typeof e.colorType?e.colorType:n.COLORTYPE_COLOR_ALPHA,e.inputColorType="number"==typeof e.inputColorType?e.inputColorType:n.COLORTYPE_COLOR_ALPHA,-1===[n.COLORTYPE_GRAYSCALE,n.COLORTYPE_COLOR,n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(e.colorType))throw Error("option color type:"+e.colorType+" is not supported at present");if(-1===[n.COLORTYPE_GRAYSCALE,n.COLORTYPE_COLOR,n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(e.inputColorType))throw Error("option input color type:"+e.inputColorType+" is not supported at present");if(8!==e.bitDepth&&16!==e.bitDepth)throw Error("option bit depth:"+e.bitDepth+" is not supported at present")};l.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},l.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},l.prototype.filterData=function(e,t,r){let o=i(e,t,r,this._options),s=n.COLORTYPE_TO_BPP_MAP[this._options.colorType];return a(o,t,r,this._options,s)},l.prototype._packChunk=function(e,t){let r=t?t.length:0,n=Buffer.alloc(r+12);return n.writeUInt32BE(r,0),n.writeUInt32BE(e,4),t&&t.copy(n,8),n.writeInt32BE(o.crc32(n.slice(4,n.length-4)),n.length-4),n},l.prototype.packGAMA=function(e){let t=Buffer.alloc(4);return t.writeUInt32BE(Math.floor(e*n.GAMMA_DIVISION),0),this._packChunk(n.TYPE_gAMA,t)},l.prototype.packIHDR=function(e,t){let r=Buffer.alloc(13);return r.writeUInt32BE(e,0),r.writeUInt32BE(t,4),r[8]=this._options.bitDepth,r[9]=this._options.colorType,r[10]=0,r[11]=0,r[12]=0,this._packChunk(n.TYPE_IHDR,r)},l.prototype.packIDAT=function(e){return this._packChunk(n.TYPE_IDAT,e)},l.prototype.packIEND=function(){return this._packChunk(n.TYPE_IEND,null)}},97870:e=>{"use strict";e.exports=function(e,t,r){let n=e+t-r,o=Math.abs(n-e),i=Math.abs(n-t),a=Math.abs(n-r);return o<=i&&o<=a?e:i<=a?t:r}},45757:(e,t,r)=>{"use strict";let n=r(73837),o=r(59796),i=r(30022),a=r(65854),s=r(75635),l=r(70113),c=r(2757),u=e.exports=function(e){i.call(this),this._parser=new s(e,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=e,this.writable=!0,this._parser.start()};n.inherits(u,i),u.prototype._handleError=function(e){this.emit("error",e),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0},u.prototype._inflateData=function(e){if(!this._inflate){if(this._bitmapInfo.interlace)this._inflate=o.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let e=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,t=Math.max(e,o.Z_MIN_CHUNK);this._inflate=o.createInflate({chunkSize:t});let r=e,n=this.emit.bind(this,"error");this._inflate.on("error",function(e){r&&n(e)}),this._filter.on("complete",this._complete.bind(this));let i=this._filter.write.bind(this._filter);this._inflate.on("data",function(e){r&&(e.length>r&&(e=e.slice(0,r)),r-=e.length,i(e))}),this._inflate.on("end",this._filter.end.bind(this._filter))}}this._inflate.write(e)},u.prototype._handleMetaData=function(e){this._metaData=e,this._bitmapInfo=Object.create(e),this._filter=new a(this._bitmapInfo)},u.prototype._handleTransColor=function(e){this._bitmapInfo.transColor=e},u.prototype._handlePalette=function(e){this._bitmapInfo.palette=e},u.prototype._simpleTransparency=function(){this._metaData.alpha=!0},u.prototype._headersFinished=function(){this.emit("metadata",this._metaData)},u.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))},u.prototype._complete=function(e){let t;if(!this.errord){try{let r=l.dataToBitMap(e,this._bitmapInfo);t=c(r,this._bitmapInfo),r=null}catch(e){this._handleError(e);return}this.emit("parsed",t)}}},91598:(e,t,r)=>{"use strict";let n=!0,o=r(59796),i=r(19018);o.deflateSync||(n=!1);let a=r(6659),s=r(52959),l=r(75635),c=r(70113),u=r(2757);e.exports=function(e,t){let r,d,f,h;if(!n)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let p=[],m=new a(e);if(new l(t,{read:m.read.bind(m),error:function(e){r=e},metadata:function(e){d=e},gamma:function(e){f=e},palette:function(e){d.palette=e},transColor:function(e){d.transColor=e},inflateData:function(e){p.push(e)},simpleTransparency:function(){d.alpha=!0}}).start(),m.process(),r)throw r;let g=Buffer.concat(p);if(p.length=0,d.interlace)h=o.inflateSync(g);else{let e=((d.width*d.bpp*d.depth+7>>3)+1)*d.height;h=i(g,{chunkSize:e,maxLength:e})}if(g=null,!h||!h.length)throw Error("bad png - invalid inflate data response");let b=s.process(h,d);g=null;let y=c.dataToBitMap(b,d);b=null;let v=u(y,d);return d.data=v,d.gamma=f||0,d}},75635:(e,t,r)=>{"use strict";let n=r(12414),o=r(28859),i=e.exports=function(e,t){this._options=e,e.checkCRC=!1!==e.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[n.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[n.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[n.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[n.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[n.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[n.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=t.read,this.error=t.error,this.metadata=t.metadata,this.gamma=t.gamma,this.transColor=t.transColor,this.palette=t.palette,this.parsed=t.parsed,this.inflateData=t.inflateData,this.finished=t.finished,this.simpleTransparency=t.simpleTransparency,this.headersFinished=t.headersFinished||function(){}};i.prototype.start=function(){this.read(n.PNG_SIGNATURE.length,this._parseSignature.bind(this))},i.prototype._parseSignature=function(e){let t=n.PNG_SIGNATURE;for(let r=0;r<t.length;r++)if(e[r]!==t[r]){this.error(Error("Invalid file signature"));return}this.read(8,this._parseChunkBegin.bind(this))},i.prototype._parseChunkBegin=function(e){let t=e.readUInt32BE(0),r=e.readUInt32BE(4),i="";for(let t=4;t<8;t++)i+=String.fromCharCode(e[t]);let a=!!(32&e[4]);if(!this._hasIHDR&&r!==n.TYPE_IHDR){this.error(Error("Expected IHDR on beggining"));return}if(this._crc=new o,this._crc.write(Buffer.from(i)),this._chunks[r])return this._chunks[r](t);if(!a){this.error(Error("Unsupported critical chunk type "+i));return}this.read(t+4,this._skipChunk.bind(this))},i.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))},i.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))},i.prototype._parseChunkEnd=function(e){let t=e.readInt32BE(0),r=this._crc.crc32();if(this._options.checkCRC&&r!==t){this.error(Error("Crc error - "+t+" - "+r));return}this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))},i.prototype._handleIHDR=function(e){this.read(e,this._parseIHDR.bind(this))},i.prototype._parseIHDR=function(e){this._crc.write(e);let t=e.readUInt32BE(0),r=e.readUInt32BE(4),o=e[8],i=e[9],a=e[10],s=e[11],l=e[12];if(8!==o&&4!==o&&2!==o&&1!==o&&16!==o){this.error(Error("Unsupported bit depth "+o));return}if(!(i in n.COLORTYPE_TO_BPP_MAP)){this.error(Error("Unsupported color type"));return}if(0!==a){this.error(Error("Unsupported compression method"));return}if(0!==s){this.error(Error("Unsupported filter method"));return}if(0!==l&&1!==l){this.error(Error("Unsupported interlace method"));return}this._colorType=i;let c=n.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:t,height:r,depth:o,interlace:!!l,palette:!!(i&n.COLORTYPE_PALETTE),color:!!(i&n.COLORTYPE_COLOR),alpha:!!(i&n.COLORTYPE_ALPHA),bpp:c,colorType:i}),this._handleChunkEnd()},i.prototype._handlePLTE=function(e){this.read(e,this._parsePLTE.bind(this))},i.prototype._parsePLTE=function(e){this._crc.write(e);let t=Math.floor(e.length/3);for(let r=0;r<t;r++)this._palette.push([e[3*r],e[3*r+1],e[3*r+2],255]);this.palette(this._palette),this._handleChunkEnd()},i.prototype._handleTRNS=function(e){this.simpleTransparency(),this.read(e,this._parseTRNS.bind(this))},i.prototype._parseTRNS=function(e){if(this._crc.write(e),this._colorType===n.COLORTYPE_PALETTE_COLOR){if(0===this._palette.length){this.error(Error("Transparency chunk must be after palette"));return}if(e.length>this._palette.length){this.error(Error("More transparent colors than palette size"));return}for(let t=0;t<e.length;t++)this._palette[t][3]=e[t];this.palette(this._palette)}this._colorType===n.COLORTYPE_GRAYSCALE&&this.transColor([e.readUInt16BE(0)]),this._colorType===n.COLORTYPE_COLOR&&this.transColor([e.readUInt16BE(0),e.readUInt16BE(2),e.readUInt16BE(4)]),this._handleChunkEnd()},i.prototype._handleGAMA=function(e){this.read(e,this._parseGAMA.bind(this))},i.prototype._parseGAMA=function(e){this._crc.write(e),this.gamma(e.readUInt32BE(0)/n.GAMMA_DIVISION),this._handleChunkEnd()},i.prototype._handleIDAT=function(e){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-e,this._parseIDAT.bind(this,e))},i.prototype._parseIDAT=function(e,t){if(this._crc.write(t),this._colorType===n.COLORTYPE_PALETTE_COLOR&&0===this._palette.length)throw Error("Expected palette not found");this.inflateData(t);let r=e-t.length;r>0?this._handleIDAT(r):this._handleChunkEnd()},i.prototype._handleIEND=function(e){this.read(e,this._parseIEND.bind(this))},i.prototype._parseIEND=function(e){this._crc.write(e),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}},7394:(e,t,r)=>{"use strict";let n=r(91598),o=r(12070);t.read=function(e,t){return n(e,t||{})},t.write=function(e,t){return o(e,t)}},21570:(e,t,r)=>{"use strict";let n=r(73837),o=r(12781),i=r(45757),a=r(82195),s=r(7394),l=t.y=function(e){o.call(this),e=e||{},this.width=0|e.width,this.height=0|e.height,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,e.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new i(e),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",(function(e){this.data=e,this.emit("parsed",e)}).bind(this)),this._packer=new a(e),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};n.inherits(l,o),l.sync=s,l.prototype.pack=function(){return this.data&&this.data.length?process.nextTick((function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}).bind(this)):this.emit("error","No data provided"),this},l.prototype.parse=function(e,t){if(t){let e,r;e=(function(e){this.removeListener("error",r),this.data=e,t(null,this)}).bind(this),r=(function(r){this.removeListener("parsed",e),t(r,null)}).bind(this),this.once("parsed",e),this.once("error",r)}return this.end(e),this},l.prototype.write=function(e){return this._parser.write(e),!0},l.prototype.end=function(e){this._parser.end(e)},l.prototype._metadata=function(e){this.width=e.width,this.height=e.height,this.emit("metadata",e)},l.prototype._gamma=function(e){this.gamma=e},l.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},l.bitblt=function(e,t,r,n,o,i,a,s){if(n|=0,o|=0,i|=0,a|=0,s|=0,(r|=0)>e.width||n>e.height||r+o>e.width||n+i>e.height)throw Error("bitblt reading outside image");if(a>t.width||s>t.height||a+o>t.width||s+i>t.height)throw Error("bitblt writing outside image");for(let l=0;l<i;l++)e.data.copy(t.data,(s+l)*t.width+a<<2,(n+l)*e.width+r<<2,(n+l)*e.width+r+o<<2)},l.prototype.bitblt=function(e,t,r,n,o,i,a){return l.bitblt(this,e,t,r,n,o,i,a),this},l.adjustGamma=function(e){if(e.gamma){for(let t=0;t<e.height;t++)for(let r=0;r<e.width;r++){let n=e.width*t+r<<2;for(let t=0;t<3;t++){let r=e.data[n+t]/255;r=Math.pow(r,1/2.2/e.gamma),e.data[n+t]=Math.round(255*r)}}e.gamma=0}},l.prototype.adjustGamma=function(){l.adjustGamma(this)}},19018:(e,t,r)=>{"use strict";let n=r(39491).ok,o=r(59796),i=r(73837),a=r(14300).kMaxLength;function s(e){if(!(this instanceof s))return new s(e);e&&e.chunkSize<o.Z_MIN_CHUNK&&(e.chunkSize=o.Z_MIN_CHUNK),o.Inflate.call(this,e),this._offset=void 0===this._offset?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,e&&null!=e.maxLength&&(this._maxLength=e.maxLength)}function l(e,t){t&&process.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function c(e,t){return function(e,t){if("string"==typeof t&&(t=Buffer.from(t)),!(t instanceof Buffer))throw TypeError("Not a string or buffer");let r=e._finishFlushFlag;return null==r&&(r=o.Z_FINISH),e._processChunk(t,r)}(new s(t),e)}s.prototype._processChunk=function(e,t,r){let i,s;if("function"==typeof r)return o.Inflate._processChunk.call(this,e,t,r);let c=this,u=e&&e.length,d=this._chunkSize-this._offset,f=this._maxLength,h=0,p=[],m=0;this.on("error",function(e){i=e}),n(this._handle,"zlib binding closed");do s=(s=this._handle.writeSync(t,e,h,u,this._buffer,this._offset,d))||this._writeState;while(!this._hadError&&function(e,t){if(c._hadError)return;let r=d-t;if(n(r>=0,"have should not go down"),r>0){let e=c._buffer.slice(c._offset,c._offset+r);if(c._offset+=r,e.length>f&&(e=e.slice(0,f)),p.push(e),m+=e.length,0==(f-=e.length))return!1}return(0===t||c._offset>=c._chunkSize)&&(d=c._chunkSize,c._offset=0,c._buffer=Buffer.allocUnsafe(c._chunkSize)),0===t&&(h+=u-e,u=e,!0)}(s[0],s[1]));if(this._hadError)throw i;if(m>=a)throw l(this),RangeError("Cannot create final Buffer. It would be larger than 0x"+a.toString(16)+" bytes");let g=Buffer.concat(p,m);return l(this),g},i.inherits(s,o.Inflate),e.exports=t=c,t.Inflate=s,t.createInflate=function(e){return new s(e)},t.inflateSync=c},6659:e=>{"use strict";let t=e.exports=function(e){this._buffer=e,this._reads=[]};t.prototype.read=function(e,t){this._reads.push({length:Math.abs(e),allowLess:e<0,func:t})},t.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let e=this._reads[0];if(this._buffer.length&&(this._buffer.length>=e.length||e.allowLess)){this._reads.shift();let t=this._buffer;this._buffer=t.slice(e.length),e.func.call(this,t.slice(0,e.length))}else break}return this._reads.length>0?Error("There are some read requests waitng on finished stream"):this._buffer.length>0?Error("unrecognised content at end of stream"):void 0}},48432:(e,t,r)=>{let n=r(94480),o=r(17913),i=r(30450),a=r(2058);function s(e,t,r,i,a){let s=[].slice.call(arguments,1),l=s.length,c="function"==typeof s[l-1];if(!c&&!n())throw Error("Callback required as last argument");if(c){if(l<2)throw Error("Too few arguments provided");2===l?(a=r,r=t,t=i=void 0):3===l&&(t.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=r,r=t,t=void 0))}else{if(l<1)throw Error("Too few arguments provided");return 1===l?(r=t,t=i=void 0):2!==l||t.getContext||(i=r,r=t,t=void 0),new Promise(function(n,a){try{let a=o.create(r,i);n(e(a,t,i))}catch(e){a(e)}})}try{let n=o.create(r,i);a(null,e(n,t,i))}catch(e){a(e)}}o.create,t.toCanvas=s.bind(null,i.render),s.bind(null,i.renderToDataURL),s.bind(null,function(e,t,r){return a.render(e,r)})},94480:e=>{e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},67185:(e,t,r)=>{let n=r(80790).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];let t=Math.floor(e/7)+2,r=n(e),o=145===r?26:2*Math.ceil((r-13)/(2*t-2)),i=[r-7];for(let e=1;e<t-1;e++)i[e]=i[e-1]-o;return i.push(6),i.reverse()},t.getPositions=function(e){let r=[],n=t.getRowColCoords(e),o=n.length;for(let e=0;e<o;e++)for(let t=0;t<o;t++)(0!==e||0!==t)&&(0!==e||t!==o-1)&&(e!==o-1||0!==t)&&r.push([n[e],n[t]]);return r}},88850:(e,t,r)=>{let n=r(74658),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=45*o.indexOf(this.data[t]);r+=o.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(o.indexOf(this.data[t]),6)},e.exports=i},77375:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){return(this.buffer[Math.floor(e/8)]>>>7-e%8&1)==1},put:function(e,t){for(let r=0;r<t;r++)this.putBit((e>>>t-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},19442:e=>{function t(e){if(!e||e<1)throw Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,r,n){let o=e*this.size+t;this.data[o]=r,n&&(this.reservedBit[o]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},81856:(e,t,r)=>{let n=r(40342),o=r(74658);function i(e){this.mode=o.BYTE,"string"==typeof e&&(e=n(e)),this.data=new Uint8Array(e)}i.getBitsLength=function(e){return 8*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){for(let t=0,r=this.data.length;t<r;t++)e.put(this.data[t],8)},e.exports=i},77870:(e,t,r)=>{let n=r(67713),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case n.L:return o[(e-1)*4+0];case n.M:return o[(e-1)*4+1];case n.Q:return o[(e-1)*4+2];case n.H:return o[(e-1)*4+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case n.L:return i[(e-1)*4+0];case n.M:return i[(e-1)*4+1];case n.Q:return i[(e-1)*4+2];case n.H:return i[(e-1)*4+3];default:return}}},67713:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw Error("Unknown EC Level: "+e)}}(e)}catch(e){return r}}},10133:(e,t,r)=>{let n=r(80790).getSymbolSize;t.getPositions=function(e){let t=n(e);return[[0,0],[t-7,0],[0,t-7]]}},19668:(e,t,r)=>{let n=r(80790),o=n.getBCHDigit(1335);t.getEncodedBits=function(e,t){let r=e.bit<<3|t,i=r<<10;for(;n.getBCHDigit(i)-o>=0;)i^=1335<<n.getBCHDigit(i)-o;return(r<<10|i)^21522}},88133:(e,t)=>{let r=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let t=0;t<255;t++)r[t]=e,n[e]=t,256&(e<<=1)&&(e^=285);for(let e=255;e<512;e++)r[e]=r[e-255]})(),t.log=function(e){if(e<1)throw Error("log("+e+")");return n[e]},t.exp=function(e){return r[e]},t.mul=function(e,t){return 0===e||0===t?0:r[n[e]+n[t]]}},35964:(e,t,r)=>{let n=r(74658),o=r(80790);function i(e){this.mode=n.KANJI,this.data=e}i.getBitsLength=function(e){return 13*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let r=o.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r=(r>>>8&255)*192+(255&r),e.put(r,13)}},e.exports=i},60218:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};let r={N1:3,N2:3,N3:40,N4:10};t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){let t=e.size,n=0,o=0,i=0,a=null,s=null;for(let l=0;l<t;l++){o=i=0,a=s=null;for(let c=0;c<t;c++){let t=e.get(l,c);t===a?o++:(o>=5&&(n+=r.N1+(o-5)),a=t,o=1),(t=e.get(c,l))===s?i++:(i>=5&&(n+=r.N1+(i-5)),s=t,i=1)}o>=5&&(n+=r.N1+(o-5)),i>=5&&(n+=r.N1+(i-5))}return n},t.getPenaltyN2=function(e){let t=e.size,n=0;for(let r=0;r<t-1;r++)for(let o=0;o<t-1;o++){let t=e.get(r,o)+e.get(r,o+1)+e.get(r+1,o)+e.get(r+1,o+1);(4===t||0===t)&&n++}return n*r.N2},t.getPenaltyN3=function(e){let t=e.size,n=0,o=0,i=0;for(let r=0;r<t;r++){o=i=0;for(let a=0;a<t;a++)o=o<<1&2047|e.get(r,a),a>=10&&(1488===o||93===o)&&n++,i=i<<1&2047|e.get(a,r),a>=10&&(1488===i||93===i)&&n++}return n*r.N3},t.getPenaltyN4=function(e){let t=0,n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/n/5)-10)*r.N4},t.applyMask=function(e,r){let n=r.size;for(let o=0;o<n;o++)for(let i=0;i<n;i++)r.isReserved(i,o)||r.xor(i,o,function(e,r,n){switch(e){case t.Patterns.PATTERN000:return(r+n)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return n%3==0;case t.Patterns.PATTERN011:return(r+n)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(n/3))%2==0;case t.Patterns.PATTERN101:return r*n%2+r*n%3==0;case t.Patterns.PATTERN110:return(r*n%2+r*n%3)%2==0;case t.Patterns.PATTERN111:return(r*n%3+(r+n)%2)%2==0;default:throw Error("bad maskPattern:"+e)}}(e,i,o))},t.getBestMask=function(e,r){let n=Object.keys(t.Patterns).length,o=0,i=1/0;for(let a=0;a<n;a++){r(a),t.applyMask(a,e);let n=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(a,e),n<i&&(i=n,o=a)}return o}},74658:(e,t,r)=>{let n=r(35683),o=r(17459);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw Error("Invalid mode: "+e);if(!n.isValid(t))throw Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return o.testNumeric(e)?t.NUMERIC:o.testAlphanumeric(e)?t.ALPHANUMERIC:o.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw Error("Unknown mode: "+e)}}(e)}catch(e){return r}}},55699:(e,t,r)=>{let n=r(74658);function o(e){this.mode=n.NUMERIC,this.data=e.toString()}o.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t,r;for(t=0;t+3<=this.data.length;t+=3)r=parseInt(this.data.substr(t,3),10),e.put(r,10);let n=this.data.length-t;n>0&&(r=parseInt(this.data.substr(t),10),e.put(r,3*n+1))},e.exports=o},22373:(e,t,r)=>{let n=r(88133);t.mul=function(e,t){let r=new Uint8Array(e.length+t.length-1);for(let o=0;o<e.length;o++)for(let i=0;i<t.length;i++)r[o+i]^=n.mul(e[o],t[i]);return r},t.mod=function(e,t){let r=new Uint8Array(e);for(;r.length-t.length>=0;){let e=r[0];for(let o=0;o<t.length;o++)r[o]^=n.mul(t[o],e);let o=0;for(;o<r.length&&0===r[o];)o++;r=r.slice(o)}return r},t.generateECPolynomial=function(e){let r=new Uint8Array([1]);for(let o=0;o<e;o++)r=t.mul(r,new Uint8Array([1,n.exp(o)]));return r}},17913:(e,t,r)=>{let n=r(80790),o=r(67713),i=r(77375),a=r(19442),s=r(67185),l=r(10133),c=r(60218),u=r(77870),d=r(94909),f=r(78784),h=r(19668),p=r(74658),m=r(7607);function g(e,t,r){let n,o;let i=e.size,a=h.getEncodedBits(t,r);for(n=0;n<15;n++)o=(a>>n&1)==1,n<6?e.set(n,8,o,!0):n<8?e.set(n+1,8,o,!0):e.set(i-15+n,8,o,!0),n<8?e.set(8,i-n-1,o,!0):n<9?e.set(8,15-n-1+1,o,!0):e.set(8,15-n-1,o,!0);e.set(i-8,8,1,!0)}t.create=function(e,t){let r,h;if(void 0===e||""===e)throw Error("No input text");let b=o.M;return void 0!==t&&(b=o.from(t.errorCorrectionLevel,o.M),r=f.from(t.version),h=c.from(t.maskPattern),t.toSJISFunc&&n.setToSJISFunction(t.toSJISFunc)),function(e,t,r,o){let h;if(Array.isArray(e))h=m.fromArray(e);else if("string"==typeof e){let n=t;if(!n){let t=m.rawSplit(e);n=f.getBestVersionForData(t,r)}h=m.fromString(e,n||40)}else throw Error("Invalid data");let b=f.getBestVersionForData(h,r);if(!b)throw Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<b)throw Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+b+".\n")}else t=b;let y=function(e,t,r){let o=new i;r.forEach(function(t){o.put(t.mode.bit,4),o.put(t.getLength(),p.getCharCountIndicator(t.mode,e)),t.write(o)});let a=(n.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t))*8;for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);let s=(a-o.getLengthInBits())/8;for(let e=0;e<s;e++)o.put(e%2?17:236,8);return function(e,t,r){let o,i;let a=n.getSymbolTotalCodewords(t),s=a-u.getTotalCodewordsCount(t,r),l=u.getBlocksCount(t,r),c=a%l,f=l-c,h=Math.floor(a/l),p=Math.floor(s/l),m=p+1,g=h-p,b=new d(g),y=0,v=Array(l),w=Array(l),C=0,E=new Uint8Array(e.buffer);for(let e=0;e<l;e++){let t=e<f?p:m;v[e]=E.slice(y,y+t),w[e]=b.encode(v[e]),y+=t,C=Math.max(C,t)}let x=new Uint8Array(a),A=0;for(o=0;o<C;o++)for(i=0;i<l;i++)o<v[i].length&&(x[A++]=v[i][o]);for(o=0;o<g;o++)for(i=0;i<l;i++)x[A++]=w[i][o];return x}(o,e,t)}(t,r,h),v=new a(n.getSymbolSize(t));return function(e,t){let r=e.size,n=l.getPositions(t);for(let t=0;t<n.length;t++){let o=n[t][0],i=n[t][1];for(let t=-1;t<=7;t++)if(!(o+t<=-1)&&!(r<=o+t))for(let n=-1;n<=7;n++)i+n<=-1||r<=i+n||(t>=0&&t<=6&&(0===n||6===n)||n>=0&&n<=6&&(0===t||6===t)||t>=2&&t<=4&&n>=2&&n<=4?e.set(o+t,i+n,!0,!0):e.set(o+t,i+n,!1,!0))}}(v,t),function(e){let t=e.size;for(let r=8;r<t-8;r++){let t=r%2==0;e.set(r,6,t,!0),e.set(6,r,t,!0)}}(v),function(e,t){let r=s.getPositions(t);for(let t=0;t<r.length;t++){let n=r[t][0],o=r[t][1];for(let t=-2;t<=2;t++)for(let r=-2;r<=2;r++)-2===t||2===t||-2===r||2===r||0===t&&0===r?e.set(n+t,o+r,!0,!0):e.set(n+t,o+r,!1,!0)}}(v,t),g(v,r,0),t>=7&&function(e,t){let r,n,o;let i=e.size,a=f.getEncodedBits(t);for(let t=0;t<18;t++)r=Math.floor(t/3),n=t%3+i-8-3,o=(a>>t&1)==1,e.set(r,n,o,!0),e.set(n,r,o,!0)}(v,t),function(e,t){let r=e.size,n=-1,o=r-1,i=7,a=0;for(let s=r-1;s>0;s-=2)for(6===s&&s--;;){for(let r=0;r<2;r++)if(!e.isReserved(o,s-r)){let n=!1;a<t.length&&(n=(t[a]>>>i&1)==1),e.set(o,s-r,n),-1==--i&&(a++,i=7)}if((o+=n)<0||r<=o){o-=n,n=-n;break}}}(v,y),isNaN(o)&&(o=c.getBestMask(v,g.bind(null,v,r))),c.applyMask(o,v),g(v,r,o),{modules:v,version:t,errorCorrectionLevel:r,maskPattern:o,segments:h}}(e,r,b,h)}},94909:(e,t,r)=>{let n=r(22373);function o(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},o.prototype.encode=function(e){if(!this.genPoly)throw Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),o=this.degree-r.length;if(o>0){let e=new Uint8Array(this.degree);return e.set(r,o),e}return r},e.exports=o},17459:(e,t)=>{let r="[0-9]+",n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",o="(?:(?![A-Z0-9 $%*+\\-./:]|"+(n=n.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=RegExp(n,"g"),t.BYTE_KANJI=RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=RegExp(o,"g"),t.NUMERIC=RegExp(r,"g"),t.ALPHANUMERIC=RegExp("[A-Z $%*+\\-./:]+","g");let i=RegExp("^"+n+"$"),a=RegExp("^"+r+"$"),s=RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return i.test(e)},t.testNumeric=function(e){return a.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},7607:(e,t,r)=>{let n=r(74658),o=r(55699),i=r(88850),a=r(81856),s=r(35964),l=r(17459),c=r(80790),u=r(2608);function d(e){return unescape(encodeURIComponent(e)).length}function f(e,t,r){let n;let o=[];for(;null!==(n=e.exec(r));)o.push({data:n[0],index:n.index,mode:t,length:n[0].length});return o}function h(e){let t,r;let o=f(l.NUMERIC,n.NUMERIC,e),i=f(l.ALPHANUMERIC,n.ALPHANUMERIC,e);return c.isKanjiModeEnabled()?(t=f(l.BYTE,n.BYTE,e),r=f(l.KANJI,n.KANJI,e)):(t=f(l.BYTE_KANJI,n.BYTE,e),r=[]),o.concat(i,t,r).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function p(e,t){switch(t){case n.NUMERIC:return o.getBitsLength(e);case n.ALPHANUMERIC:return i.getBitsLength(e);case n.KANJI:return s.getBitsLength(e);case n.BYTE:return a.getBitsLength(e)}}function m(e,t){let r;let l=n.getBestModeForData(e);if((r=n.from(t,l))!==n.BYTE&&r.bit<l.bit)throw Error('"'+e+'" cannot be encoded with mode '+n.toString(r)+".\n Suggested mode is: "+n.toString(l));switch(r!==n.KANJI||c.isKanjiModeEnabled()||(r=n.BYTE),r){case n.NUMERIC:return new o(e);case n.ALPHANUMERIC:return new i(e);case n.KANJI:return new s(e);case n.BYTE:return new a(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e},[])},t.fromString=function(e,r){let o=function(e,t){let r={},o={start:{}},i=["start"];for(let a=0;a<e.length;a++){let s=e[a],l=[];for(let e=0;e<s.length;e++){let c=s[e],u=""+a+e;l.push(u),r[u]={node:c,lastCount:0},o[u]={};for(let e=0;e<i.length;e++){let a=i[e];r[a]&&r[a].node.mode===c.mod