!function(e){var o={};function r(t){if(o[t])return o[t].exports;var c=o[t]={i:t,l:!1,exports:{}};return e[t].call(c.exports,c,c.exports,r),c.l=!0,c.exports}r.m=e,r.c=o,r.d=function(e,o,t){r.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,o){if(1&o&&(e=r(e)),8&o)return e;if(4&o&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&o&&"string"!=typeof e)for(var c in e)r.d(t,c,function(o){return e[o]}.bind(null,c));return t},r.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(o,"a",o),o},r.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},r.p="/",r(r.s=0)}([function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var t=r(1).__importDefault(r(2)),c="dontInvert",s={red:77,green:150,blue:29,useIntegerApproximation:!0};self.onmessage=function(e){var o=e.data.type,r=e.data.data;switch(o){case"decode":!function(e){var o=e.data,r=e.width,n=e.height,l=t.default(o,r,n,{inversionAttempts:c,greyScaleWeights:s});self.postMessage({type:"qrResult",data:l?l.data:null},void 0)}(r);break;case"grayscaleWeights":!function(e){s.red=e.red,s.green=e.green,s.blue=e.blue,s.useIntegerApproximation=e.useIntegerApproximation}(r);break;case"inversionMode":!function(e){switch(e){case"original":c="dontInvert";break;case"invert":case"both":c="attemptBoth";break;default:throw new Error("Invalid inversion mode")}}(r);break;case"close":self.close()}}},function(e,o,r){"use strict";r.r(o),r.d(o,"__extends",(function(){return c})),r.d(o,"__assign",(function(){return s})),r.d(o,"__rest",(function(){return n})),r.d(o,"__decorate",(function(){return l})),r.d(o,"__param",(function(){return a})),r.d(o,"__metadata",(function(){return d})),r.d(o,"__awaiter",(function(){return i})),r.d(o,"__generator",(function(){return B})),r.d(o,"__createBinding",(function(){return k})),r.d(o,"__exportStar",(function(){return u})),r.d(o,"__values",(function(){return f})),r.d(o,"__read",(function(){return m})),r.d(o,"__spread",(function(){return C})),r.d(o,"__spreadArrays",(function(){return w})),r.d(o,"__spreadArray",(function(){return P})),r.d(o,"__await",(function(){return h})),r.d(o,"__asyncGenerator",(function(){return y})),r.d(o,"__asyncDelegator",(function(){return b})),r.d(o,"__asyncValues",(function(){return p})),r.d(o,"__makeTemplateObject",(function(){return v})),r.d(o,"__importStar",(function(){return x})),r.d(o,"__importDefault",(function(){return M})),r.d(o,"__classPrivateFieldGet",(function(){return L})),r.d(o,"__classPrivateFieldSet",(function(){return _}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])})(e,o)};function c(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var o,r=1,t=arguments.length;r<t;r++)for(var c in o=arguments[r])Object.prototype.hasOwnProperty.call(o,c)&&(e[c]=o[c]);return e}).apply(this,arguments)};function n(e,o){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var c=0;for(t=Object.getOwnPropertySymbols(e);c<t.length;c++)o.indexOf(t[c])<0&&Object.prototype.propertyIsEnumerable.call(e,t[c])&&(r[t[c]]=e[t[c]])}return r}function l(e,o,r,t){var c,s=arguments.length,n=s<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,r):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,r,t);else for(var l=e.length-1;l>=0;l--)(c=e[l])&&(n=(s<3?c(n):s>3?c(o,r,n):c(o,r))||n);return s>3&&n&&Object.defineProperty(o,r,n),n}function a(e,o){return function(r,t){o(r,t,e)}}function d(e,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,o)}function i(e,o,r,t){return new(r||(r=Promise))((function(c,s){function n(e){try{a(t.next(e))}catch(e){s(e)}}function l(e){try{a(t.throw(e))}catch(e){s(e)}}function a(e){var o;e.done?c(e.value):(o=e.value,o instanceof r?o:new r((function(e){e(o)}))).then(n,l)}a((t=t.apply(e,o||[])).next())}))}function B(e,o){var r,t,c,s,n={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return s={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function l(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,t&&(c=2&s[0]?t.return:s[0]?t.throw||((c=t.return)&&c.call(t),0):t.next)&&!(c=c.call(t,s[1])).done)return c;switch(t=0,c&&(s=[2&s[0],c.value]),s[0]){case 0:case 1:c=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,t=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(!(c=(c=n.trys).length>0&&c[c.length-1])&&(6===s[0]||2===s[0])){n=0;continue}if(3===s[0]&&(!c||s[1]>c[0]&&s[1]<c[3])){n.label=s[1];break}if(6===s[0]&&n.label<c[1]){n.label=c[1],c=s;break}if(c&&n.label<c[2]){n.label=c[2],n.ops.push(s);break}c[2]&&n.ops.pop(),n.trys.pop();continue}s=o.call(e,n)}catch(e){s=[6,e],t=0}finally{r=c=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}var k=Object.create?function(e,o,r,t){void 0===t&&(t=r),Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[r]}})}:function(e,o,r,t){void 0===t&&(t=r),e[t]=o[r]};function u(e,o){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(o,r)||k(o,e,r)}function f(e){var o="function"==typeof Symbol&&Symbol.iterator,r=o&&e[o],t=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,o){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var t,c,s=r.call(e),n=[];try{for(;(void 0===o||o-- >0)&&!(t=s.next()).done;)n.push(t.value)}catch(e){c={error:e}}finally{try{t&&!t.done&&(r=s.return)&&r.call(s)}finally{if(c)throw c.error}}return n}function C(){for(var e=[],o=0;o<arguments.length;o++)e=e.concat(m(arguments[o]));return e}function w(){for(var e=0,o=0,r=arguments.length;o<r;o++)e+=arguments[o].length;var t=Array(e),c=0;for(o=0;o<r;o++)for(var s=arguments[o],n=0,l=s.length;n<l;n++,c++)t[c]=s[n];return t}function P(e,o,r){if(r||2===arguments.length)for(var t,c=0,s=o.length;c<s;c++)!t&&c in o||(t||(t=Array.prototype.slice.call(o,0,c)),t[c]=o[c]);return e.concat(t||Array.prototype.slice.call(o))}function h(e){return this instanceof h?(this.v=e,this):new h(e)}function y(e,o,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,c=r.apply(e,o||[]),s=[];return t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t;function n(e){c[e]&&(t[e]=function(o){return new Promise((function(r,t){s.push([e,o,r,t])>1||l(e,o)}))})}function l(e,o){try{(r=c[e](o)).value instanceof h?Promise.resolve(r.value.v).then(a,d):i(s[0][2],r)}catch(e){i(s[0][3],e)}var r}function a(e){l("next",e)}function d(e){l("throw",e)}function i(e,o){e(o),s.shift(),s.length&&l(s[0][0],s[0][1])}}function b(e){var o,r;return o={},t("next"),t("throw",(function(e){throw e})),t("return"),o[Symbol.iterator]=function(){return this},o;function t(t,c){o[t]=e[t]?function(o){return(r=!r)?{value:h(e[t](o)),done:"return"===t}:c?c(o):o}:c}}function p(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,r=e[Symbol.asyncIterator];return r?r.call(e):(e=f(e),o={},t("next"),t("throw"),t("return"),o[Symbol.asyncIterator]=function(){return this},o);function t(r){o[r]=e[r]&&function(o){return new Promise((function(t,c){(function(e,o,r,t){Promise.resolve(t).then((function(o){e({value:o,done:r})}),o)})(t,c,(o=e[r](o)).done,o.value)}))}}}function v(e,o){return Object.defineProperty?Object.defineProperty(e,"raw",{value:o}):e.raw=o,e}var g=Object.create?function(e,o){Object.defineProperty(e,"default",{enumerable:!0,value:o})}:function(e,o){e.default=o};function x(e){if(e&&e.__esModule)return e;var o={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&k(o,e,r);return g(o,e),o}function M(e){return e&&e.__esModule?e:{default:e}}function L(e,o,r,t){if("a"===r&&!t)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof o?e!==o||!t:!o.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?t:"a"===r?t.call(e):t?t.value:o.get(e)}function _(e,o,r,t,c){if("m"===t)throw new TypeError("Private method is not writable");if("a"===t&&!c)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof o?e!==o||!c:!o.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===t?c.call(e,r):c?c.value=r:o.set(e,r),r}},function(e,o,r){"use strict";r.r(o);class t{static createEmpty(e,o){return new t(new Uint8ClampedArray(e*o),e)}constructor(e,o){this.width=o,this.height=e.length/o,this.data=e}get(e,o){return!(e<0||e>=this.width||o<0||o>=this.height)&&!!this.data[o*this.width+e]}set(e,o,r){this.data[o*this.width+e]=r?1:0}setRegion(e,o,r,t,c){for(let s=o;s<o+t;s++)for(let o=e;o<e+r;o++)this.set(o,s,!!c)}}function c(e,o,r){return e<o?o:e>r?r:e}class s{constructor(e,o,r){this.width=e;const t=e*o;if(r&&r.length!==t)throw new Error("Wrong buffer size");this.data=r||new Uint8ClampedArray(t)}get(e,o){return this.data[o*this.width+e]}set(e,o,r){this.data[o*this.width+e]=r}}class n{constructor(e){this.byteOffset=0,this.bitOffset=0,this.bytes=e}readBits(e){if(e<1||e>32||e>this.available())throw new Error("Cannot read "+e.toString()+" bits");let o=0;if(this.bitOffset>0){const r=8-this.bitOffset,t=e<r?e:r,c=r-t,s=255>>8-t<<c;o=(this.bytes[this.byteOffset]&s)>>c,e-=t,this.bitOffset+=t,8===this.bitOffset&&(this.bitOffset=0,this.byteOffset++)}if(e>0){for(;e>=8;)o=o<<8|255&this.bytes[this.byteOffset],this.byteOffset++,e-=8;if(e>0){const r=8-e,t=255>>r<<r;o=o<<e|(this.bytes[this.byteOffset]&t)>>r,this.bitOffset+=e}}return o}available(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset}}var l,a;function d(e,o){const r=[];let t="";const c=[10,12,14][o];let s=e.readBits(c);for(;s>=3;){const o=e.readBits(10);if(o>=1e3)throw new Error("Invalid numeric value above 999");const c=Math.floor(o/100),n=Math.floor(o/10)%10,l=o%10;r.push(48+c,48+n,48+l),t+=c.toString()+n.toString()+l.toString(),s-=3}if(2===s){const o=e.readBits(7);if(o>=100)throw new Error("Invalid numeric value above 99");const c=Math.floor(o/10),s=o%10;r.push(48+c,48+s),t+=c.toString()+s.toString()}else if(1===s){const o=e.readBits(4);if(o>=10)throw new Error("Invalid numeric value above 9");r.push(48+o),t+=o.toString()}return{bytes:r,text:t}}!function(e){e.Numeric="numeric",e.Alphanumeric="alphanumeric",e.Byte="byte",e.Kanji="kanji",e.ECI="eci"}(l||(l={})),function(e){e[e.Terminator=0]="Terminator",e[e.Numeric=1]="Numeric",e[e.Alphanumeric=2]="Alphanumeric",e[e.Byte=4]="Byte",e[e.Kanji=8]="Kanji",e[e.ECI=7]="ECI"}(a||(a={}));const i=["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 B(e,o){const r=[];let t="";const c=[9,11,13][o];let s=e.readBits(c);for(;s>=2;){const o=e.readBits(11),c=Math.floor(o/45),n=o%45;r.push(i[c].charCodeAt(0),i[n].charCodeAt(0)),t+=i[c]+i[n],s-=2}if(1===s){const o=e.readBits(6);r.push(i[o].charCodeAt(0)),t+=i[o]}return{bytes:r,text:t}}function k(e,o){const r=[];let t="";const c=[8,16,16][o],s=e.readBits(c);for(let o=0;o<s;o++){const o=e.readBits(8);r.push(o)}try{t+=decodeURIComponent(r.map(e=>`%${("0"+e.toString(16)).substr(-2)}`).join(""))}catch(e){}return{bytes:r,text:t}}function u(e,o){const r=[],t=[8,10,12][o],c=e.readBits(t);for(let o=0;o<c;o++){const o=e.readBits(13);let t=Math.floor(o/192)<<8|o%192;t+=t<7936?33088:49472,r.push(t>>8,255&t)}return{bytes:r,text:new TextDecoder("shift-jis").decode(Uint8Array.from(r))}}class f{constructor(e,o){if(0===o.length)throw new Error("No coefficients.");this.field=e;const r=o.length;if(r>1&&0===o[0]){let t=1;for(;t<r&&0===o[t];)t++;if(t===r)this.coefficients=e.zero.coefficients;else{this.coefficients=new Uint8ClampedArray(r-t);for(let e=0;e<this.coefficients.length;e++)this.coefficients[e]=o[t+e]}}else this.coefficients=o}degree(){return this.coefficients.length-1}isZero(){return 0===this.coefficients[0]}getCoefficient(e){return this.coefficients[this.coefficients.length-1-e]}addOrSubtract(e){if(this.isZero())return e;if(e.isZero())return this;let o=this.coefficients,r=e.coefficients;o.length>r.length&&([o,r]=[r,o]);const t=new Uint8ClampedArray(r.length),c=r.length-o.length;for(let e=0;e<c;e++)t[e]=r[e];for(let e=c;e<r.length;e++)t[e]=m(o[e-c],r[e]);return new f(this.field,t)}multiply(e){if(0===e)return this.field.zero;if(1===e)return this;const o=this.coefficients.length,r=new Uint8ClampedArray(o);for(let t=0;t<o;t++)r[t]=this.field.multiply(this.coefficients[t],e);return new f(this.field,r)}multiplyPoly(e){if(this.isZero()||e.isZero())return this.field.zero;const o=this.coefficients,r=o.length,t=e.coefficients,c=t.length,s=new Uint8ClampedArray(r+c-1);for(let e=0;e<r;e++){const r=o[e];for(let o=0;o<c;o++)s[e+o]=m(s[e+o],this.field.multiply(r,t[o]))}return new f(this.field,s)}multiplyByMonomial(e,o){if(e<0)throw new Error("Invalid degree less than 0");if(0===o)return this.field.zero;const r=this.coefficients.length,t=new Uint8ClampedArray(r+e);for(let e=0;e<r;e++)t[e]=this.field.multiply(this.coefficients[e],o);return new f(this.field,t)}evaluateAt(e){let o=0;if(0===e)return this.getCoefficient(0);const r=this.coefficients.length;if(1===e)return this.coefficients.forEach(e=>{o=m(o,e)}),o;o=this.coefficients[0];for(let t=1;t<r;t++)o=m(this.field.multiply(e,o),this.coefficients[t]);return o}}function m(e,o){return e^o}class C{constructor(e,o,r){this.primitive=e,this.size=o,this.generatorBase=r,this.expTable=new Array(this.size),this.logTable=new Array(this.size);let t=1;for(let e=0;e<this.size;e++)this.expTable[e]=t,t*=2,t>=this.size&&(t=(t^this.primitive)&this.size-1);for(let e=0;e<this.size-1;e++)this.logTable[this.expTable[e]]=e;this.zero=new f(this,Uint8ClampedArray.from([0])),this.one=new f(this,Uint8ClampedArray.from([1]))}multiply(e,o){return 0===e||0===o?0:this.expTable[(this.logTable[e]+this.logTable[o])%(this.size-1)]}inverse(e){if(0===e)throw new Error("Can't invert 0");return this.expTable[this.size-this.logTable[e]-1]}buildMonomial(e,o){if(e<0)throw new Error("Invalid monomial degree less than 0");if(0===o)return this.zero;const r=new Uint8ClampedArray(e+1);return r[0]=o,new f(this,r)}log(e){if(0===e)throw new Error("Can't take log(0)");return this.logTable[e]}exp(e){return this.expTable[e]}}function w(e,o){const r=new Uint8ClampedArray(e.length);r.set(e);const t=new C(285,256,0),c=new f(t,r),s=new Uint8ClampedArray(o);let n=!1;for(let e=0;e<o;e++){const o=c.evaluateAt(t.exp(e+t.generatorBase));s[s.length-1-e]=o,0!==o&&(n=!0)}if(!n)return r;const l=new f(t,s),a=function(e,o,r,t){o.degree()<r.degree()&&([o,r]=[r,o]);let c=o,s=r,n=e.zero,l=e.one;for(;s.degree()>=t/2;){const o=c,r=n;if(c=s,n=l,c.isZero())return null;s=o;let t=e.zero;const a=c.getCoefficient(c.degree()),d=e.inverse(a);for(;s.degree()>=c.degree()&&!s.isZero();){const o=s.degree()-c.degree(),r=e.multiply(s.getCoefficient(s.degree()),d);t=t.addOrSubtract(e.buildMonomial(o,r)),s=s.addOrSubtract(c.multiplyByMonomial(o,r))}if(l=t.multiplyPoly(n).addOrSubtract(r),s.degree()>=c.degree())return null}const a=l.getCoefficient(0);if(0===a)return null;const d=e.inverse(a);return[l.multiply(d),s.multiply(d)]}(t,t.buildMonomial(o,1),l,o);if(null===a)return null;const d=function(e,o){const r=o.degree();if(1===r)return[o.getCoefficient(1)];const t=new Array(r);let c=0;for(let s=1;s<e.size&&c<r;s++)0===o.evaluateAt(s)&&(t[c]=e.inverse(s),c++);return c!==r?null:t}(t,a[0]);if(null==d)return null;const i=function(e,o,r){const t=r.length,c=new Array(t);for(let s=0;s<t;s++){const n=e.inverse(r[s]);let l=1;for(let o=0;o<t;o++)s!==o&&(l=e.multiply(l,m(1,e.multiply(r[o],n))));c[s]=e.multiply(o.evaluateAt(n),e.inverse(l)),0!==e.generatorBase&&(c[s]=e.multiply(c[s],n))}return c}(t,a[1],d);for(let e=0;e<d.length;e++){const o=r.length-1-t.log(d[e]);if(o<0)return null;r[o]=m(r[o],i[e])}return r}const P=[{infoBits:null,versionNumber:1,alignmentPatternCenters:[],errorCorrectionLevels:[{ecCodewordsPerBlock:7,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:13,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:13}]},{ecCodewordsPerBlock:17,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:2,alignmentPatternCenters:[6,18],errorCorrectionLevels:[{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:34}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:28}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]}]},{infoBits:null,versionNumber:3,alignmentPatternCenters:[6,22],errorCorrectionLevels:[{ecCodewordsPerBlock:15,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:55}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:13}]}]},{infoBits:null,versionNumber:4,alignmentPatternCenters:[6,26],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:80}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:32}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:5,alignmentPatternCenters:[6,30],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:43}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:11},{numBlocks:2,dataCodewordsPerBlock:12}]}]},{infoBits:null,versionNumber:6,alignmentPatternCenters:[6,34],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:27}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:31892,versionNumber:7,alignmentPatternCenters:[6,22,38],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:78}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:31}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:13},{numBlocks:1,dataCodewordsPerBlock:14}]}]},{infoBits:34236,versionNumber:8,alignmentPatternCenters:[6,24,42],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:97}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:38},{numBlocks:2,dataCodewordsPerBlock:39}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:18},{numBlocks:2,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:14},{numBlocks:2,dataCodewordsPerBlock:15}]}]},{infoBits:39577,versionNumber:9,alignmentPatternCenters:[6,26,46],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:12},{numBlocks:4,dataCodewordsPerBlock:13}]}]},{infoBits:42195,versionNumber:10,alignmentPatternCenters:[6,28,50],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68},{numBlocks:2,dataCodewordsPerBlock:69}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:43},{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]}]},{infoBits:48118,versionNumber:11,alignmentPatternCenters:[6,30,54],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:81}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:50},{numBlocks:4,dataCodewordsPerBlock:51}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:22},{numBlocks:4,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:12},{numBlocks:8,dataCodewordsPerBlock:13}]}]},{infoBits:51042,versionNumber:12,alignmentPatternCenters:[6,32,58],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:92},{numBlocks:2,dataCodewordsPerBlock:93}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:20},{numBlocks:6,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:55367,versionNumber:13,alignmentPatternCenters:[6,34,62],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:37},{numBlocks:1,dataCodewordsPerBlock:38}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:20},{numBlocks:4,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:11},{numBlocks:4,dataCodewordsPerBlock:12}]}]},{infoBits:58893,versionNumber:14,alignmentPatternCenters:[6,26,46,66],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:40},{numBlocks:5,dataCodewordsPerBlock:41}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:16},{numBlocks:5,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:5,dataCodewordsPerBlock:13}]}]},{infoBits:63784,versionNumber:15,alignmentPatternCenters:[6,26,48,70],errorCorrectionLevels:[{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:87},{numBlocks:1,dataCodewordsPerBlock:88}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:41},{numBlocks:5,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:7,dataCodewordsPerBlock:13}]}]},{infoBits:68472,versionNumber:16,alignmentPatternCenters:[6,26,50,74],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:98},{numBlocks:1,dataCodewordsPerBlock:99}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:70749,versionNumber:17,alignmentPatternCenters:[6,30,54,78],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:1,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22},{numBlocks:15,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:17,dataCodewordsPerBlock:15}]}]},{infoBits:76311,versionNumber:18,alignmentPatternCenters:[6,30,56,82],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:120},{numBlocks:1,dataCodewordsPerBlock:121}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:43},{numBlocks:4,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:1,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:19,dataCodewordsPerBlock:15}]}]},{infoBits:79154,versionNumber:19,alignmentPatternCenters:[6,30,58,86],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:113},{numBlocks:4,dataCodewordsPerBlock:114}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:44},{numBlocks:11,dataCodewordsPerBlock:45}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:21},{numBlocks:4,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:13},{numBlocks:16,dataCodewordsPerBlock:14}]}]},{infoBits:84390,versionNumber:20,alignmentPatternCenters:[6,34,62,90],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:41},{numBlocks:13,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:5,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:15},{numBlocks:10,dataCodewordsPerBlock:16}]}]},{infoBits:87683,versionNumber:21,alignmentPatternCenters:[6,28,50,72,94],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:116},{numBlocks:4,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:16},{numBlocks:6,dataCodewordsPerBlock:17}]}]},{infoBits:92361,versionNumber:22,alignmentPatternCenters:[6,26,50,74,98],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:111},{numBlocks:7,dataCodewordsPerBlock:112}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:13}]}]},{infoBits:96236,versionNumber:23,alignmentPatternCenters:[6,30,54,74,102],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:121},{numBlocks:5,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:47},{numBlocks:14,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:16,dataCodewordsPerBlock:15},{numBlocks:14,dataCodewordsPerBlock:16}]}]},{infoBits:102084,versionNumber:24,alignmentPatternCenters:[6,28,54,80,106],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:45},{numBlocks:14,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:30,dataCodewordsPerBlock:16},{numBlocks:2,dataCodewordsPerBlock:17}]}]},{infoBits:102881,versionNumber:25,alignmentPatternCenters:[6,32,58,84,110],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:106},{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:47},{numBlocks:13,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:110507,versionNumber:26,alignmentPatternCenters:[6,30,58,86,114],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:114},{numBlocks:2,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:46},{numBlocks:4,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:28,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:33,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]}]},{infoBits:110734,versionNumber:27,alignmentPatternCenters:[6,34,62,90,118],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:23},{numBlocks:26,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:117786,versionNumber:28,alignmentPatternCenters:[6,26,50,74,98,122],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:117},{numBlocks:10,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:45},{numBlocks:23,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:24},{numBlocks:31,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:31,dataCodewordsPerBlock:16}]}]},{infoBits:119615,versionNumber:29,alignmentPatternCenters:[6,30,54,78,102,126],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:116},{numBlocks:7,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:21,dataCodewordsPerBlock:45},{numBlocks:7,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:23},{numBlocks:37,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:26,dataCodewordsPerBlock:16}]}]},{infoBits:126325,versionNumber:30,alignmentPatternCenters:[6,26,52,78,104,130],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:115},{numBlocks:10,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:47},{numBlocks:10,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:25,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:25,dataCodewordsPerBlock:16}]}]},{infoBits:127568,versionNumber:31,alignmentPatternCenters:[6,30,56,82,108,134],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:3,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:46},{numBlocks:29,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:24},{numBlocks:1,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:133589,versionNumber:32,alignmentPatternCenters:[6,34,60,86,112,138],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:24},{numBlocks:35,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:35,dataCodewordsPerBlock:16}]}]},{infoBits:136944,versionNumber:33,alignmentPatternCenters:[6,30,58,86,114,142],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:21,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:24},{numBlocks:19,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:141498,versionNumber:34,alignmentPatternCenters:[6,34,62,90,118,146],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:6,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:44,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:59,dataCodewordsPerBlock:16},{numBlocks:1,dataCodewordsPerBlock:17}]}]},{infoBits:145311,versionNumber:35,alignmentPatternCenters:[6,30,54,78,102,126,150],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:121},{numBlocks:7,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:47},{numBlocks:26,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:39,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:41,dataCodewordsPerBlock:16}]}]},{infoBits:150283,versionNumber:36,alignmentPatternCenters:[6,24,50,76,102,128,154],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:121},{numBlocks:14,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:47},{numBlocks:34,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:46,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:64,dataCodewordsPerBlock:16}]}]},{infoBits:152622,versionNumber:37,alignmentPatternCenters:[6,28,54,80,106,132,158],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:46},{numBlocks:14,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:49,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:24,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:158308,versionNumber:38,alignmentPatternCenters:[6,32,58,84,110,136,162],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:122},{numBlocks:18,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:46},{numBlocks:32,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:48,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:15},{numBlocks:32,dataCodewordsPerBlock:16}]}]},{infoBits:161089,versionNumber:39,alignmentPatternCenters:[6,26,54,82,110,138,166],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:40,dataCodewordsPerBlock:47},{numBlocks:7,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:43,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:15},{numBlocks:67,dataCodewordsPerBlock:16}]}]},{infoBits:167017,versionNumber:40,alignmentPatternCenters:[6,30,58,86,114,142,170],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:118},{numBlocks:6,dataCodewordsPerBlock:119}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:18,dataCodewordsPerBlock:47},{numBlocks:31,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:24},{numBlocks:34,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:15},{numBlocks:61,dataCodewordsPerBlock:16}]}]}];function h(e,o){let r=e^o,t=0;for(;r;)t++,r&=r-1;return t}function y(e,o){return o<<1|e}const b=[{bits:21522,formatInfo:{errorCorrectionLevel:1,dataMask:0}},{bits:20773,formatInfo:{errorCorrectionLevel:1,dataMask:1}},{bits:24188,formatInfo:{errorCorrectionLevel:1,dataMask:2}},{bits:23371,formatInfo:{errorCorrectionLevel:1,dataMask:3}},{bits:17913,formatInfo:{errorCorrectionLevel:1,dataMask:4}},{bits:16590,formatInfo:{errorCorrectionLevel:1,dataMask:5}},{bits:20375,formatInfo:{errorCorrectionLevel:1,dataMask:6}},{bits:19104,formatInfo:{errorCorrectionLevel:1,dataMask:7}},{bits:30660,formatInfo:{errorCorrectionLevel:0,dataMask:0}},{bits:29427,formatInfo:{errorCorrectionLevel:0,dataMask:1}},{bits:32170,formatInfo:{errorCorrectionLevel:0,dataMask:2}},{bits:30877,formatInfo:{errorCorrectionLevel:0,dataMask:3}},{bits:26159,formatInfo:{errorCorrectionLevel:0,dataMask:4}},{bits:25368,formatInfo:{errorCorrectionLevel:0,dataMask:5}},{bits:27713,formatInfo:{errorCorrectionLevel:0,dataMask:6}},{bits:26998,formatInfo:{errorCorrectionLevel:0,dataMask:7}},{bits:5769,formatInfo:{errorCorrectionLevel:3,dataMask:0}},{bits:5054,formatInfo:{errorCorrectionLevel:3,dataMask:1}},{bits:7399,formatInfo:{errorCorrectionLevel:3,dataMask:2}},{bits:6608,formatInfo:{errorCorrectionLevel:3,dataMask:3}},{bits:1890,formatInfo:{errorCorrectionLevel:3,dataMask:4}},{bits:597,formatInfo:{errorCorrectionLevel:3,dataMask:5}},{bits:3340,formatInfo:{errorCorrectionLevel:3,dataMask:6}},{bits:2107,formatInfo:{errorCorrectionLevel:3,dataMask:7}},{bits:13663,formatInfo:{errorCorrectionLevel:2,dataMask:0}},{bits:12392,formatInfo:{errorCorrectionLevel:2,dataMask:1}},{bits:16177,formatInfo:{errorCorrectionLevel:2,dataMask:2}},{bits:14854,formatInfo:{errorCorrectionLevel:2,dataMask:3}},{bits:9396,formatInfo:{errorCorrectionLevel:2,dataMask:4}},{bits:8579,formatInfo:{errorCorrectionLevel:2,dataMask:5}},{bits:11994,formatInfo:{errorCorrectionLevel:2,dataMask:6}},{bits:11245,formatInfo:{errorCorrectionLevel:2,dataMask:7}}],p=[e=>(e.y+e.x)%2==0,e=>e.y%2==0,e=>e.x%3==0,e=>(e.y+e.x)%3==0,e=>(Math.floor(e.y/2)+Math.floor(e.x/3))%2==0,e=>e.x*e.y%2+e.x*e.y%3==0,e=>(e.y*e.x%2+e.y*e.x%3)%2==0,e=>((e.y+e.x)%2+e.y*e.x%3)%2==0];function v(e,o,r){const c=p[r.dataMask],s=e.height,n=function(e){const o=17+4*e.versionNumber,r=t.createEmpty(o,o);r.setRegion(0,0,9,9,!0),r.setRegion(o-8,0,8,9,!0),r.setRegion(0,o-8,9,8,!0);for(const t of e.alignmentPatternCenters)for(const c of e.alignmentPatternCenters)6===t&&6===c||6===t&&c===o-7||t===o-7&&6===c||r.setRegion(t-2,c-2,5,5,!0);return r.setRegion(6,9,1,o-17,!0),r.setRegion(9,6,o-17,1,!0),e.versionNumber>6&&(r.setRegion(o-11,0,3,6,!0),r.setRegion(0,o-11,6,3,!0)),r}(o),l=[];let a=0,d=0,i=!0;for(let o=s-1;o>0;o-=2){6===o&&o--;for(let r=0;r<s;r++){const t=i?s-1-r:r;for(let r=0;r<2;r++){const s=o-r;if(!n.get(s,t)){d++;let o=e.get(s,t);c({y:t,x:s})&&(o=!o),a=y(o,a),8===d&&(l.push(a),d=0,a=0)}}}i=!i}return l}function g(e){const o=function(e){const o=e.height,r=Math.floor((o-17)/4);if(r<=6)return P[r-1];let t=0;for(let r=5;r>=0;r--)for(let c=o-9;c>=o-11;c--)t=y(e.get(c,r),t);let c=0;for(let r=5;r>=0;r--)for(let t=o-9;t>=o-11;t--)c=y(e.get(r,t),c);let s,n=1/0;for(const e of P){if(e.infoBits===t||e.infoBits===c)return e;let o=h(t,e.infoBits);o<n&&(s=e,n=o),o=h(c,e.infoBits),o<n&&(s=e,n=o)}return n<=3?s:void 0}(e);if(!o)return null;const r=function(e){let o=0;for(let r=0;r<=8;r++)6!==r&&(o=y(e.get(r,8),o));for(let r=7;r>=0;r--)6!==r&&(o=y(e.get(8,r),o));const r=e.height;let t=0;for(let o=r-1;o>=r-7;o--)t=y(e.get(8,o),t);for(let o=r-8;o<r;o++)t=y(e.get(o,8),t);let c=1/0,s=null;for(const{bits:e,formatInfo:r}of b){if(e===o||e===t)return r;let n=h(o,e);n<c&&(s=r,c=n),o!==t&&(n=h(t,e),n<c&&(s=r,c=n))}return c<=3?s:null}(e);if(!r)return null;const t=function(e,o,r){const t=o.errorCorrectionLevels[r],c=[];let s=0;if(t.ecBlocks.forEach(e=>{for(let o=0;o<e.numBlocks;o++)c.push({numDataCodewords:e.dataCodewordsPerBlock,codewords:[]}),s+=e.dataCodewordsPerBlock+t.ecCodewordsPerBlock}),e.length<s)return null;e=e.slice(0,s);const n=t.ecBlocks[0].dataCodewordsPerBlock;for(let o=0;o<n;o++)for(const o of c)o.codewords.push(e.shift());if(t.ecBlocks.length>1){const o=t.ecBlocks[0].numBlocks,r=t.ecBlocks[1].numBlocks;for(let t=0;t<r;t++)c[o+t].codewords.push(e.shift())}for(;e.length>0;)for(const o of c)o.codewords.push(e.shift());return c}(v(e,o,r),o,r.errorCorrectionLevel);if(!t)return null;const c=t.reduce((e,o)=>e+o.numDataCodewords,0),s=new Uint8ClampedArray(c);let i=0;for(const e of t){const o=w(e.codewords,e.codewords.length-e.numDataCodewords);if(!o)return null;for(let r=0;r<e.numDataCodewords;r++)s[i++]=o[r]}try{return function(e,o){const r=new n(e),t=o<=9?0:o<=26?1:2,c={text:"",bytes:[],chunks:[]};for(;r.available()>=4;){const e=r.readBits(4);if(e===a.Terminator)return c;if(e===a.ECI)0===r.readBits(1)?c.chunks.push({type:l.ECI,assignmentNumber:r.readBits(7)}):0===r.readBits(1)?c.chunks.push({type:l.ECI,assignmentNumber:r.readBits(14)}):0===r.readBits(1)?c.chunks.push({type:l.ECI,assignmentNumber:r.readBits(21)}):c.chunks.push({type:l.ECI,assignmentNumber:-1});else if(e===a.Numeric){const e=d(r,t);c.text+=e.text,c.bytes.push(...e.bytes),c.chunks.push({type:l.Numeric,text:e.text})}else if(e===a.Alphanumeric){const e=B(r,t);c.text+=e.text,c.bytes.push(...e.bytes),c.chunks.push({type:l.Alphanumeric,text:e.text})}else if(e===a.Byte){const e=k(r,t);c.text+=e.text,c.bytes.push(...e.bytes),c.chunks.push({type:l.Byte,bytes:e.bytes,text:e.text})}else if(e===a.Kanji){const e=u(r,t);c.text+=e.text,c.bytes.push(...e.bytes),c.chunks.push({type:l.Kanji,bytes:e.bytes,text:e.text})}}if(0===r.available()||0===r.readBits(r.available()))return c}(s,o.versionNumber)}catch(e){return null}}function x(e,o,r,t){const c=e.x-o.x+r.x-t.x,s=e.y-o.y+r.y-t.y;if(0===c&&0===s)return{a11:o.x-e.x,a12:o.y-e.y,a13:0,a21:r.x-o.x,a22:r.y-o.y,a23:0,a31:e.x,a32:e.y,a33:1};{const n=o.x-r.x,l=t.x-r.x,a=o.y-r.y,d=t.y-r.y,i=n*d-l*a,B=(c*d-l*s)/i,k=(n*s-c*a)/i;return{a11:o.x-e.x+B*o.x,a12:o.y-e.y+B*o.y,a13:B,a21:t.x-e.x+k*t.x,a22:t.y-e.y+k*t.y,a23:k,a31:e.x,a32:e.y,a33:1}}}function M(e,o){const r=function(e,o,r,t){const c=x(e,o,r,t);return{a11:c.a22*c.a33-c.a23*c.a32,a12:c.a13*c.a32-c.a12*c.a33,a13:c.a12*c.a23-c.a13*c.a22,a21:c.a23*c.a31-c.a21*c.a33,a22:c.a11*c.a33-c.a13*c.a31,a23:c.a13*c.a21-c.a11*c.a23,a31:c.a21*c.a32-c.a22*c.a31,a32:c.a12*c.a31-c.a11*c.a32,a33:c.a11*c.a22-c.a12*c.a21}}({x:3.5,y:3.5},{x:o.dimension-3.5,y:3.5},{x:o.dimension-6.5,y:o.dimension-6.5},{x:3.5,y:o.dimension-3.5}),c=x(o.topLeft,o.topRight,o.alignmentPattern,o.bottomLeft),s=(l=r,{a11:(n=c).a11*l.a11+n.a21*l.a12+n.a31*l.a13,a12:n.a12*l.a11+n.a22*l.a12+n.a32*l.a13,a13:n.a13*l.a11+n.a23*l.a12+n.a33*l.a13,a21:n.a11*l.a21+n.a21*l.a22+n.a31*l.a23,a22:n.a12*l.a21+n.a22*l.a22+n.a32*l.a23,a23:n.a13*l.a21+n.a23*l.a22+n.a33*l.a23,a31:n.a11*l.a31+n.a21*l.a32+n.a31*l.a33,a32:n.a12*l.a31+n.a22*l.a32+n.a32*l.a33,a33:n.a13*l.a31+n.a23*l.a32+n.a33*l.a33});var n,l;const a=t.createEmpty(o.dimension,o.dimension),d=(e,o)=>{const r=s.a13*e+s.a23*o+s.a33;return{x:(s.a11*e+s.a21*o+s.a31)/r,y:(s.a12*e+s.a22*o+s.a32)/r}};for(let r=0;r<o.dimension;r++)for(let t=0;t<o.dimension;t++){const o=d(t+.5,r+.5);a.set(t,r,e.get(Math.floor(o.x),Math.floor(o.y)))}return{matrix:a,mappingFunction:d}}const L=(e,o)=>Math.sqrt(Math.pow(o.x-e.x,2)+Math.pow(o.y-e.y,2));function _(e){return e.reduce((e,o)=>e+o)}function I(e,o,r,t){const c=[{x:Math.floor(e.x),y:Math.floor(e.y)}],s=Math.abs(o.y-e.y)>Math.abs(o.x-e.x);let n,l,a,d;s?(n=Math.floor(e.y),l=Math.floor(e.x),a=Math.floor(o.y),d=Math.floor(o.x)):(n=Math.floor(e.x),l=Math.floor(e.y),a=Math.floor(o.x),d=Math.floor(o.y));const i=Math.abs(a-n),B=Math.abs(d-l);let k=Math.floor(-i/2);const u=n<a?1:-1,f=l<d?1:-1;let m=!0;for(let e=n,o=l;e!==a+u;e+=u){const n=s?o:e,l=s?e:o;if(r.get(n,l)!==m&&(m=!m,c.push({x:n,y:l}),c.length===t+1))break;if(k+=B,k>0){if(o===d)break;o+=f,k-=i}}const C=[];for(let e=0;e<t;e++)c[e]&&c[e+1]?C.push(L(c[e],c[e+1])):C.push(0);return C}function O(e,o,r,t){const c=o.y-e.y,s=o.x-e.x,n=I(e,o,r,Math.ceil(t/2)),l=I(e,{x:e.x-s,y:e.y-c},r,Math.ceil(t/2)),a=n.shift()+l.shift()-1;return l.concat(a).concat(...n)}function A(e,o){const r=_(e)/_(o);let t=0;return o.forEach((o,c)=>{t+=Math.pow(e[c]-o*r,2)}),{averageSize:r,error:t}}function N(e,o,r){try{const t=O(e,{x:-1,y:e.y},r,o.length),c=O(e,{x:e.x,y:-1},r,o.length),s=O(e,{x:Math.max(0,e.x-e.y)-1,y:Math.max(0,e.y-e.x)-1},r,o.length),n=O(e,{x:Math.min(r.width,e.x+e.y)+1,y:Math.min(r.height,e.y+e.x)+1},r,o.length),l=A(t,o),a=A(c,o),d=A(s,o),i=A(n,o),B=Math.sqrt(l.error*l.error+a.error*a.error+d.error*d.error+i.error*i.error),k=(l.averageSize+a.averageSize+d.averageSize+i.averageSize)/4;return B+(Math.pow(l.averageSize-k,2)+Math.pow(a.averageSize-k,2)+Math.pow(d.averageSize-k,2)+Math.pow(i.averageSize-k,2))/k}catch(e){return 1/0}}function S(e){const o=[];let r=[];const t=[];let c=[];for(let s=0;s<=e.height;s++){let n=0,l=!1,a=[0,0,0,0,0];for(let o=-1;o<=e.width;o++){const t=e.get(o,s);if(t===l)n++;else{a=[a[1],a[2],a[3],a[4],n],n=1,l=t;const e=_(a)/7,d=Math.abs(a[0]-e)<e&&Math.abs(a[1]-e)<e&&Math.abs(a[2]-3*e)<3*e&&Math.abs(a[3]-e)<e&&Math.abs(a[4]-e)<e&&!t,i=_(a.slice(-3))/3,B=Math.abs(a[2]-i)<i&&Math.abs(a[3]-i)<i&&Math.abs(a[4]-i)<i&&t;if(d){const e=o-a[3]-a[4],t=e-a[2],c={startX:t,endX:e,y:s},n=r.filter(o=>t>=o.bottom.startX&&t<=o.bottom.endX||e>=o.bottom.startX&&t<=o.bottom.endX||t<=o.bottom.startX&&e>=o.bottom.endX&&a[2]/(o.bottom.endX-o.bottom.startX)<1.5&&a[2]/(o.bottom.endX-o.bottom.startX)>.5);n.length>0?n[0].bottom=c:r.push({top:c,bottom:c})}if(B){const e=o-a[4],r=e-a[3],t={startX:r,y:s,endX:e},n=c.filter(o=>r>=o.bottom.startX&&r<=o.bottom.endX||e>=o.bottom.startX&&r<=o.bottom.endX||r<=o.bottom.startX&&e>=o.bottom.endX&&a[2]/(o.bottom.endX-o.bottom.startX)<1.5&&a[2]/(o.bottom.endX-o.bottom.startX)>.5);n.length>0?n[0].bottom=t:c.push({top:t,bottom:t})}}}o.push(...r.filter(e=>e.bottom.y!==s&&e.bottom.y-e.top.y>=2)),r=r.filter(e=>e.bottom.y===s),t.push(...c.filter(e=>e.bottom.y!==s)),c=c.filter(e=>e.bottom.y===s)}o.push(...r.filter(e=>e.bottom.y-e.top.y>=2)),t.push(...c);const s=o.filter(e=>e.bottom.y-e.top.y>=2).map(o=>{const r=(o.top.startX+o.top.endX+o.bottom.startX+o.bottom.endX)/4,t=(o.top.y+o.bottom.y+1)/2;if(!e.get(Math.round(r),Math.round(t)))return;const c=[o.top.endX-o.top.startX,o.bottom.endX-o.bottom.startX,o.bottom.y-o.top.y+1],s=_(c)/c.length;return{score:N({x:Math.round(r),y:Math.round(t)},[1,1,3,1,1],e),x:r,y:t,size:s}}).filter(e=>!!e).sort((e,o)=>e.score-o.score).map((e,o,r)=>{if(o>4)return null;const t=r.filter((e,r)=>o!==r).map(o=>({x:o.x,y:o.y,score:o.score+Math.pow(o.size-e.size,2)/e.size,size:o.size})).sort((e,o)=>e.score-o.score);if(t.length<2)return null;const c=e.score+t[0].score+t[1].score;return{points:[e].concat(t.slice(0,2)),score:c}}).filter(e=>!!e).sort((e,o)=>e.score-o.score);if(0===s.length)return null;const{topRight:n,topLeft:l,bottomLeft:a}=function(e,o,r){const t=L(e,o),c=L(o,r),s=L(e,r);let n,l,a;return[n,l,a]=c>=t&&c>=s?[o,e,r]:s>=c&&s>=t?[e,o,r]:[e,r,o],(a.x-l.x)*(n.y-l.y)-(a.y-l.y)*(n.x-l.x)<0&&([n,a]=[a,n]),{bottomLeft:n,topLeft:l,topRight:a}}(s[0].points[0],s[0].points[1],s[0].points[2]);let d,i;try{({dimension:d,moduleSize:i}=function(e,o,r,t){const c=(_(O(e,r,t,5))/7+_(O(e,o,t,5))/7+_(O(r,e,t,5))/7+_(O(o,e,t,5))/7)/4;if(c<1)throw new Error("Invalid module size");const s=Math.round(L(e,o)/c),n=Math.round(L(e,r)/c);let l=Math.floor((s+n)/2)+7;switch(l%4){case 0:l++;break;case 2:l--}return{dimension:l,moduleSize:c}}(l,n,a,e))}catch(e){return null}const B=n.x-l.x+a.x,k=n.y-l.y+a.y,u=(L(l,a)+L(l,n))/2/i,f=1-3/u,m={x:l.x+f*(B-l.x),y:l.y+f*(k-l.y)},C=t.map(o=>{const r=(o.top.startX+o.top.endX+o.bottom.startX+o.bottom.endX)/4,t=(o.top.y+o.bottom.y+1)/2;if(!e.get(Math.floor(r),Math.floor(t)))return;const c=[o.top.endX-o.top.startX,o.bottom.endX-o.bottom.startX,o.bottom.y-o.top.y+1];_(c);return{x:r,y:t,score:N({x:Math.floor(r),y:Math.floor(t)},[1,1,1],e)+L({x:r,y:t},m)}}).filter(e=>!!e).sort((e,o)=>e.score-o.score),w=u>=15&&C.length?C[0]:m;return{alignmentPattern:{x:w.x,y:w.y},bottomLeft:{x:a.x,y:a.y},dimension:d,topLeft:{x:l.x,y:l.y},topRight:{x:n.x,y:n.y}}}function j(e){const o=S(e);if(!o)return null;const r=M(e,o),t=function(e){if(null==e)return null;const o=g(e);if(o)return o;for(let o=0;o<e.width;o++)for(let r=o+1;r<e.height;r++)e.get(o,r)!==e.get(r,o)&&(e.set(o,r,!e.get(o,r)),e.set(r,o,!e.get(r,o)));return g(e)}(r.matrix);return t?{binaryData:t.bytes,data:t.text,chunks:t.chunks,location:{topRightCorner:r.mappingFunction(o.dimension,0),topLeftCorner:r.mappingFunction(0,0),bottomRightCorner:r.mappingFunction(o.dimension,o.dimension),bottomLeftCorner:r.mappingFunction(0,o.dimension),topRightFinderPattern:o.topRight,topLeftFinderPattern:o.topLeft,bottomLeftFinderPattern:o.bottomLeft,bottomRightAlignmentPattern:o.alignmentPattern}}:null}const E={inversionAttempts:"attemptBoth",greyScaleWeights:{red:.2126,green:.7152,blue:.0722,useIntegerApproximation:!1},canOverwriteImage:!0};function z(e,o){Object.keys(o).forEach(r=>{e[r]=o[r]})}function X(e,o,r,n={}){const l=Object.create(null);z(l,E),z(l,n);const a="attemptBoth"===l.inversionAttempts||"invertFirst"===l.inversionAttempts,d="onlyInvert"===l.inversionAttempts||"invertFirst"===l.inversionAttempts,{binarized:i,inverted:B}=function(e,o,r,n,l,a){const d=o*r;if(e.length!==4*d)throw new Error("Malformed data passed to binarizer.");let i,B=0;a&&(i=new Uint8ClampedArray(e.buffer,B,d),B+=d);const k=new s(o,r,i);if(l.useIntegerApproximation)for(let t=0;t<r;t++)for(let r=0;r<o;r++){const c=4*(t*o+r),s=e[c],n=e[c+1],a=e[c+2];k.set(r,t,l.red*s+l.green*n+l.blue*a+128>>8)}else for(let t=0;t<r;t++)for(let r=0;r<o;r++){const c=4*(t*o+r),s=e[c],n=e[c+1],a=e[c+2];k.set(r,t,l.red*s+l.green*n+l.blue*a)}const u=Math.ceil(o/8),f=Math.ceil(r/8),m=u*f;let C;a&&(C=new Uint8ClampedArray(e.buffer,B,m),B+=m);const w=new s(u,f,C);for(let e=0;e<f;e++)for(let o=0;o<u;o++){let r=1/0,t=0;for(let c=0;c<8;c++)for(let s=0;s<8;s++){const n=k.get(8*o+s,8*e+c);r=Math.min(r,n),t=Math.max(t,n)}let c=(r+t)/2;const s=1.1;if(c=Math.min(255,c*s),t-r<=24&&(c=r/2,e>0&&o>0)){const t=(w.get(o,e-1)+2*w.get(o-1,e)+w.get(o-1,e-1))/4;r<t&&(c=t)}w.set(o,e,c)}let P;if(a){const r=new Uint8ClampedArray(e.buffer,B,d);B+=d,P=new t(r,o)}else P=t.createEmpty(o,r);let h=null;if(n)if(a){const r=new Uint8ClampedArray(e.buffer,B,d);h=new t(r,o)}else h=t.createEmpty(o,r);for(let e=0;e<f;e++)for(let o=0;o<u;o++){const r=c(o,2,u-3),t=c(e,2,f-3);let s=0;for(let e=-2;e<=2;e++)for(let o=-2;o<=2;o++)s+=w.get(r+e,t+o);const l=s/25;for(let r=0;r<8;r++)for(let t=0;t<8;t++){const c=8*o+r,s=8*e+t,a=k.get(c,s);P.set(c,s,a<=l),n&&h.set(c,s,!(a<=l))}}return n?{binarized:P,inverted:h}:{binarized:P}}(e,o,r,a,l.greyScaleWeights,l.canOverwriteImage);let k=j(d?B:i);return k||"attemptBoth"!==l.inversionAttempts&&"invertFirst"!==l.inversionAttempts||(k=j(d?i:B)),k}X.default=X,o.default=X}]);
//# sourceMappingURL=f15f7cb7caa6deeb49e4.worker.js.map