angular-weblineindia-qrcode-scanner-dg
Version:
An AngularJS based Barcode / QRCode scanner component.
1 lines • 209 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("ZXing",[],e):"object"==typeof exports?exports.ZXing=e():t.ZXing=e()}(window,function(){return r={},t.m=e=[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var a,i=r(6),u=(o(s,a=i.default),s);function s(){return null!==a&&a.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var a,i=r(6),u=(o(s,a=i.default),s);function s(){return null!==a&&a.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";var n,o;Object.defineProperty(e,"__esModule",{value:!0}),(o=n=n||{})[o.AZTEC=0]="AZTEC",o[o.CODABAR=1]="CODABAR",o[o.CODE_39=2]="CODE_39",o[o.CODE_93=3]="CODE_93",o[o.CODE_128=4]="CODE_128",o[o.DATA_MATRIX=5]="DATA_MATRIX",o[o.EAN_8=6]="EAN_8",o[o.EAN_13=7]="EAN_13",o[o.ITF=8]="ITF",o[o.MAXICODE=9]="MAXICODE",o[o.PDF_417=10]="PDF_417",o[o.QR_CODE=11]="QR_CODE",o[o.RSS_14=12]="RSS_14",o[o.RSS_EXPANDED=13]="RSS_EXPANDED",o[o.UPC_A=14]="UPC_A",o[o.UPC_E=15]="UPC_E",o[o.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION",e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(14),o=r(74),a=(i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.equals=function(t){if(t instanceof i){var e=t;return this.x===e.x&&this.y===e.y}return!1},i.prototype.hashCode=function(){return 31*o.default.floatToIntBits(this.x)+o.default.floatToIntBits(this.y)},i.prototype.toString=function(){return"("+this.x+","+this.y+")"},i.orderBestPatterns=function(t){var e,r,n,o=this.distance(t[0],t[1]),a=this.distance(t[1],t[2]),i=this.distance(t[0],t[2]);if(n=o<=a&&i<=a?(r=t[0],e=t[1],t[2]):a<=i&&o<=i?(r=t[1],e=t[0],t[2]):(r=t[2],e=t[0],t[1]),this.crossProductZ(e,r,n)<0){var u=e;e=n,n=u}t[0]=e,t[1]=r,t[2]=n},i.distance=function(t,e){return n.default.distance(t.x,t.y,e.x,e.y)},i.crossProductZ=function(t,e,r){var n=e.x,o=e.y;return(r.x-n)*(t.y-o)-(r.y-o)*(t.x-n)},i);function i(t,e){this.x=t,this.y=e}e.default=a},function(t,e,r){"use strict";var n,o;Object.defineProperty(e,"__esModule",{value:!0}),(o=n=n||{})[o.OTHER=0]="OTHER",o[o.PURE_BARCODE=1]="PURE_BARCODE",o[o.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",o[o.TRY_HARDER=3]="TRY_HARDER",o[o.CHARACTER_SET=4]="CHARACTER_SET",o[o.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",o[o.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",o[o.ASSUME_GS1=7]="ASSUME_GS1",o[o.RETURN_CODABAR_START_END=8]="RETURN_CODABAR_START_END",o[o.NEED_RESULT_POINT_CALLBACK=9]="NEED_RESULT_POINT_CALLBACK",o[o.ALLOWED_EAN_EXTENSIONS=10]="ALLOWED_EAN_EXTENSIONS",e.default=n},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var a,i=r(6),u=(o(s,a=i.default),s);function s(){return null!==a&&a.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var a,i=r(73),u=(o(s,a=i.CustomError),s);function s(t){void 0===t&&(t=void 0);var e=a.call(this,t)||this;return e.message=t,e}e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.arraycopy=function(t,e,r,n,o){for(;o--;)r[n++]=t[e++]},o.currentTimeMillis=function(){return Date.now()},o);function o(){}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(15),o=r(7),a=r(28),i=r(11),u=r(1),s=(f.parseFromBooleanArray=function(t){for(var e=t.length,r=t[0].length,n=new f(r,e),o=0;o<e;o++)for(var a=t[o],i=0;i<r;i++)a[i]&&n.set(i,o);return n},f.parseFromString=function(t,e,r){if(null===t)throw new u.default("stringRepresentation cannot be null");for(var n=new Array(t.length),o=0,a=0,i=-1,s=0,d=0;d<t.length;)if("\n"===t.charAt(d)||"\r"===t.charAt(d)){if(a<o){if(-1===i)i=o-a;else if(o-a!==i)throw new u.default("row lengths do not match");a=o,s++}d++}else if(t.substring(d,d+e.length)===e)d+=e.length,n[o]=!0,o++;else{if(t.substring(d,d+r.length)!==r)throw new u.default("illegal character encountered: "+t.substring(d));d+=r.length,n[o]=!1,o++}if(a<o){if(-1===i)i=o-a;else if(o-a!==i)throw new u.default("row lengths do not match");s++}for(var l=new f(i,s),c=0;c<o;c++)n[c]&&l.set(Math.floor(c%i),Math.floor(c/i));return l},f.prototype.get=function(t,e){var r=e*this.rowSize+Math.floor(t/32);return 0!=(this.bits[r]>>>(31&t)&1)},f.prototype.set=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]|=1<<(31&t)&4294967295},f.prototype.unset=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]&=~(1<<(31&t)&4294967295)},f.prototype.flip=function(t,e){var r=e*this.rowSize+Math.floor(t/32);this.bits[r]^=1<<(31&t)&4294967295},f.prototype.xor=function(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new u.default("input matrix dimensions do not match");for(var e=new n.default(Math.floor(this.width/32)+1),r=this.rowSize,o=this.bits,a=0,i=this.height;a<i;a++)for(var s=a*r,f=t.getRow(a,e).getBitArray(),d=0;d<r;d++)o[s+d]^=f[d]},f.prototype.clear=function(){for(var t=this.bits,e=t.length,r=0;r<e;r++)t[r]=0},f.prototype.setRegion=function(t,e,r,n){if(e<0||t<0)throw new u.default("Left and top must be nonnegative");if(n<1||r<1)throw new u.default("Height and width must be at least 1");var o=t+r,a=e+n;if(a>this.height||o>this.width)throw new u.default("The region must fit inside the matrix");for(var i=this.rowSize,s=this.bits,f=e;f<a;f++)for(var d=f*i,l=t;l<o;l++)s[d+Math.floor(l/32)]|=1<<(31&l)&4294967295},f.prototype.getRow=function(t,e){null==e||e.getSize()<this.width?e=new n.default(this.width):e.clear();for(var r=this.rowSize,o=this.bits,a=t*r,i=0;i<r;i++)e.setBulk(32*i,o[a+i]);return e},f.prototype.setRow=function(t,e){o.default.arraycopy(e.getBitArray(),0,this.bits,t*this.rowSize,this.rowSize)},f.prototype.rotate180=function(){for(var t=this.getWidth(),e=this.getHeight(),r=new n.default(t),o=new n.default(t),a=0,i=Math.floor((e+1)/2);a<i;a++)r=this.getRow(a,r),o=this.getRow(e-1-a,o),r.reverse(),o.reverse(),this.setRow(a,o),this.setRow(e-1-a,r)},f.prototype.getEnclosingRectangle=function(){for(var t=this.width,e=this.height,r=this.rowSize,n=this.bits,o=t,a=e,i=-1,u=-1,s=0;s<e;s++)for(var f=0;f<r;f++){var d=n[s*r+f];if(0!==d){if(s<a&&(a=s),u<s&&(u=s),32*f<o){for(var l=0;0==(d<<31-l&4294967295);)l++;32*f+l<o&&(o=32*f+l)}if(i<32*f+31){for(l=31;d>>>l==0;)l--;i<32*f+l&&(i=32*f+l)}}}return i<o||u<a?null:Int32Array.from([o,a,i-o+1,u-a+1])},f.prototype.getTopLeftOnBit=function(){for(var t=this.rowSize,e=this.bits,r=0;r<e.length&&0===e[r];)r++;if(r===e.length)return null;for(var n=r/t,o=r%t*32,a=e[r],i=0;0==(a<<31-i&4294967295);)i++;return o+=i,Int32Array.from([o,n])},f.prototype.getBottomRightOnBit=function(){for(var t=this.rowSize,e=this.bits,r=e.length-1;0<=r&&0===e[r];)r--;if(r<0)return null;for(var n=Math.floor(r/t),o=32*Math.floor(r%t),a=e[r],i=31;a>>>i==0;)i--;return o+=i,Int32Array.from([o,n])},f.prototype.getWidth=function(){return this.width},f.prototype.getHeight=function(){return this.height},f.prototype.getRowSize=function(){return this.rowSize},f.prototype.equals=function(t){if(!(t instanceof f))return!1;var e=t;return this.width===e.width&&this.height===e.height&&this.rowSize===e.rowSize&&a.default.equals(this.bits,e.bits)},f.prototype.hashCode=function(){var t=this.width;return 31*(t=31*(t=31*(t=31*t+this.width)+this.height)+this.rowSize)+a.default.hashCode(this.bits)},f.prototype.toString=function(t,e,r){return void 0===t&&(t="x"),void 0===e&&(e=" "),void 0===r&&(r="\n"),this.buildToString(t,e,r)},f.prototype.buildToString=function(t,e,r){var n=new i.default;n.append(r);for(var o=0,a=this.height;o<a;o++){for(var u=0,s=this.width;u<s;u++)n.append(this.get(u,o)?t:e);n.append(r)}return n.toString()},f.prototype.clone=function(){return new f(this.width,this.height,this.rowSize,this.bits.slice())},f);function f(t,e,r,n){if(this.width=t,this.height=e,this.rowSize=r,this.bits=n,null==e&&(e=t),this.height=e,t<1||e<1)throw new u.default("Both dimensions must be greater than 0");null==r&&(r=Math.floor((t+31)/32)),this.rowSize=r,null==n&&(this.bits=new Int32Array(this.rowSize*this.height))}e.default=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(3),o=r(7),a=(i.prototype.getText=function(){return this.text},i.prototype.getRawBytes=function(){return this.rawBytes},i.prototype.getNumBits=function(){return this.numBits},i.prototype.getResultPoints=function(){return this.resultPoints},i.prototype.getBarcodeFormat=function(){return this.format},i.prototype.getResultMetadata=function(){return this.resultMetadata},i.prototype.putMetadata=function(t,e){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(t,e)},i.prototype.putAllMetadata=function(t){null!==t&&(null===this.resultMetadata?this.resultMetadata=t:this.resultMetadata=new Map(t))},i.prototype.addResultPoints=function(t){var e=this.resultPoints;if(null===e)this.resultPoints=t;else if(null!==t&&0<t.length){var r=new n.default[e.length+t.length];o.default.arraycopy(e,0,r,0,e.length),o.default.arraycopy(t,0,r,e.length,t.length),this.resultPoints=r}},i.prototype.getTimestamp=function(){return this.timestamp},i.prototype.toString=function(){return this.text},i);function i(t,e,r,n,a,i){this.text=t,this.rawBytes=e,this.numBits=r,this.resultPoints=n,this.format=a,this.timestamp=i,this.text=t,this.rawBytes=e,this.numBits=null==r?null==e?0:8*e.length:r,this.resultPoints=n,this.format=a,this.resultMetadata=null,this.timestamp=null==i?o.default.currentTimeMillis():i}e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(15),o=r(4),a=r(13),i=r(3),u=r(0),s=(f.prototype.decode=function(t,e){try{return this.doDecode(t,e)}catch(h){if(e&&!0===e.get(o.default.TRY_HARDER)&&t.isRotateSupported()){var r=t.rotateCounterClockwise(),n=this.doDecode(r,e),s=n.getResultMetadata(),f=270;null!==s&&!0===s.get(a.default.ORIENTATION)&&(f+=s.get(a.default.ORIENTATION)%360),n.putMetadata(a.default.ORIENTATION,f);var d=n.getResultPoints();if(null!==d)for(var l=r.getHeight(),c=0;c<d.length;c++)d[c]=new i.default(l-d[c].getY()-1,d[c].getX());return n}throw new u.default}},f.prototype.reset=function(){},f.prototype.doDecode=function(t,e){var r,s=t.getWidth(),f=t.getHeight(),d=new n.default(s),l=e&&!0===e.get(o.default.TRY_HARDER),c=Math.max(1,f>>(l?8:5));r=l?f:15;for(var h=Math.trunc(f/2),p=0;p<r;p++){var w=Math.trunc((p+1)/2),g=h+c*(0==(1&p)?w:-w);if(g<0||f<=g)break;try{d=t.getBlackRow(g,d)}catch(t){continue}for(var v=function(t){if(1===t&&(d.reverse(),e&&!0===e.get(o.default.NEED_RESULT_POINT_CALLBACK))){var r=new Map;e.forEach(function(t,e){return r.set(e,t)}),r.delete(o.default.NEED_RESULT_POINT_CALLBACK),e=r}try{var n=_.decodeRow(g,d,e);if(1===t){n.putMetadata(a.default.ORIENTATION,180);var u=n.getResultPoints();null!==u&&(u[0]=new i.default(s-u[0].getX()-1,u[0].getY()),u[1]=new i.default(s-u[1].getX()-1,u[1].getY()))}return{value:n}}catch(t){}},_=this,y=0;y<2;y++){var C=v(y);if("object"==typeof C)return C.value}}throw new u.default},f.recordPattern=function(t,e,r){for(var n=r.length,o=0;o<n;o++)r[o]=0;var a=t.getSize();if(a<=e)throw new u.default;for(var i=!t.get(e),s=0,f=e;f<a;){if(t.get(f)!==i)r[s]++;else{if(++s===n)break;r[s]=1,i=!i}f++}if(s!==n&&(s!==n-1||f!==a))throw new u.default},f.recordPatternInReverse=function(t,e,r){for(var n=r.length,o=t.get(e);0<e&&0<=n;)t.get(--e)!==o&&(n--,o=!o);if(0<=n)throw new u.default;f.recordPattern(t,e+1,r)},f.patternMatchVariance=function(t,e,r){for(var n=t.length,o=0,a=0,i=0;i<n;i++)o+=t[i],a+=e[i];if(o<a)return Number.POSITIVE_INFINITY;var u=o/a;r*=u;for(var s=0,f=0;f<n;f++){var d=t[f],l=e[f]*u,c=l<d?d-l:l-d;if(r<c)return Number.POSITIVE_INFINITY;s+=c}return s/o},f);function f(){}e.default=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.append=function(t){return this.value+="string"==typeof t?t.toString():String.fromCharCode(t),this},o.prototype.length=function(){return this.value.length},o.prototype.charAt=function(t){return this.value.charAt(t)},o.prototype.deleteCharAt=function(t){this.value=this.value.substr(0,t)+this.value.substring(t+1)},o.prototype.setCharAt=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+1)},o.prototype.toString=function(){return this.value},o.prototype.insert=function(t,e){this.value=this.value.substr(0,t)+e+this.value.substr(t+e.length)},o);function o(t){void 0===t&&(t=""),this.value=t}e.default=n},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var a,i=r(6),u=(o(s,a=i.default),s);function s(){return null!==a&&a.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";var n,o;Object.defineProperty(e,"__esModule",{value:!0}),(o=n=n||{})[o.OTHER=0]="OTHER",o[o.ORIENTATION=1]="ORIENTATION",o[o.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",o[o.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",o[o.ISSUE_NUMBER=4]="ISSUE_NUMBER",o[o.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",o[o.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",o[o.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",o[o.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",o[o.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",o[o.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY",e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.MathUtils=function(){},o.round=function(t){return NaN===t?0:t<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t+(t<0?-.5:.5)|0},o.distance=function(t,e,r,n){var o=t-r,a=e-n;return Math.sqrt(o*o+a*a)},o.sum=function(t){for(var e=0,r=0,n=t.length;r!==n;r++)e+=t[r];return e},o);function o(){}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7),o=r(23),a=r(28),i=r(1),u=(s.prototype.getSize=function(){return this.size},s.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},s.prototype.ensureCapacity=function(t){if(t>32*this.bits.length){var e=s.makeArray(t);n.default.arraycopy(this.bits,0,e,0,this.bits.length),this.bits=e}},s.prototype.get=function(t){return 0!=(this.bits[Math.floor(t/32)]&1<<(31&t))},s.prototype.set=function(t){this.bits[Math.floor(t/32)]|=1<<(31&t)},s.prototype.flip=function(t){this.bits[Math.floor(t/32)]^=1<<(31&t)},s.prototype.getNextSet=function(t){var e=this.size;if(e<=t)return e;var r=this.bits,n=Math.floor(t/32),a=r[n];a&=~((1<<(31&t))-1);for(var i=r.length;0===a;){if(++n===i)return e;a=r[n]}var u=32*n+o.default.numberOfTrailingZeros(a);return e<u?e:u},s.prototype.getNextUnset=function(t){var e=this.size;if(e<=t)return e;var r=this.bits,n=Math.floor(t/32),a=~r[n];a&=~((1<<(31&t))-1);for(var i=r.length;0===a;){if(++n===i)return e;a=~r[n]}var u=32*n+o.default.numberOfTrailingZeros(a);return e<u?e:u},s.prototype.setBulk=function(t,e){this.bits[Math.floor(t/32)]=e},s.prototype.setRange=function(t,e){if(e<t||t<0||e>this.size)throw new i.default;if(e!==t){e--;for(var r=Math.floor(t/32),n=Math.floor(e/32),o=this.bits,a=r;a<=n;a++){var u=(2<<(a<n?31:31&e))-(1<<(r<a?0:31&t));o[a]|=u}}},s.prototype.clear=function(){for(var t=this.bits.length,e=this.bits,r=0;r<t;r++)e[r]=0},s.prototype.isRange=function(t,e,r){if(e<t||t<0||e>this.size)throw new i.default;if(e===t)return!0;e--;for(var n=Math.floor(t/32),o=Math.floor(e/32),a=this.bits,u=n;u<=o;u++){var s=(2<<(u<o?31:31&e))-(1<<(n<u?0:31&t))&4294967295;if((a[u]&s)!=(r?s:0))return!1}return!0},s.prototype.appendBit=function(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++},s.prototype.appendBits=function(t,e){if(e<0||32<e)throw new i.default("Num bits must be between 0 and 32");this.ensureCapacity(this.size+e),this.appendBit;for(var r=e;0<r;r--)this.appendBit(1==(t>>r-1&1))},s.prototype.appendBitArray=function(t){var e=t.size;this.ensureCapacity(this.size+e),this.appendBit;for(var r=0;r<e;r++)this.appendBit(t.get(r))},s.prototype.xor=function(t){if(this.size!==t.size)throw new i.default("Sizes don't match");for(var e=this.bits,r=0,n=e.length;r<n;r++)e[r]^=t.bits[r]},s.prototype.toBytes=function(t,e,r,n){for(var o=0;o<n;o++){for(var a=0,i=0;i<8;i++)this.get(t)&&(a|=1<<7-i),t++;e[r+o]=a}},s.prototype.getBitArray=function(){return this.bits},s.prototype.reverse=function(){for(var t=new Int32Array(this.bits.length),e=Math.floor((this.size-1)/32),r=e+1,n=this.bits,o=0;o<r;o++){var a=n[o];a=(a=(a=(a=(a=a>>1&1431655765|(1431655765&a)<<1)>>2&858993459|(858993459&a)<<2)>>4&252645135|(252645135&a)<<4)>>8&16711935|(16711935&a)<<8)>>16&65535|(65535&a)<<16,t[e-o]=a}if(this.size!==32*r){var i=32*r-this.size,u=t[0]>>>i;for(o=1;o<r;o++){var s=t[o];u|=s<<32-i,t[o-1]=u,u=s>>>i}t[r-1]=u}this.bits=t},s.makeArray=function(t){return new Int32Array(Math.floor((t+31)/32))},s.prototype.equals=function(t){if(!(t instanceof s))return!1;var e=t;return this.size===e.size&&a.default.equals(this.bits,e.bits)},s.prototype.hashCode=function(){return 31*this.size+a.default.hashCode(this.bits)},s.prototype.toString=function(){for(var t="",e=0,r=this.size;e<r;e++)0==(7&e)&&(t+=" "),t+=this.get(e)?"X":".";return t},s.prototype.clone=function(){return new s(this.size,this.bits.slice())},s);function s(t,e){void 0===t?(this.size=0,this.bits=new Int32Array(1)):(this.size=t,this.bits=null==e?s.makeArray(t):e)}e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(24),o=r(23),a=r(1),i=r(57),u=(s.prototype.getZero=function(){return this.zero},s.prototype.getOne=function(){return this.one},s.prototype.buildMonomial=function(t,e){if(t<0)throw new a.default;if(0===e)return this.zero;var r=new Int32Array(t+1);return r[0]=e,new n.default(this,r)},s.addOrSubtract=function(t,e){return t^e},s.prototype.exp=function(t){return this.expTable[t]},s.prototype.log=function(t){if(0===t)throw new a.default;return this.logTable[t]},s.prototype.inverse=function(t){if(0===t)throw new i.default;return this.expTable[this.size-this.logTable[t]-1]},s.prototype.multiply=function(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.size-1)]},s.prototype.getSize=function(){return this.size},s.prototype.getGeneratorBase=function(){return this.generatorBase},s.prototype.toString=function(){return"GF(0x"+o.default.toHexString(this.primitive)+","+this.size+")"},s.prototype.equals=function(t){return t===this},s.AZTEC_DATA_12=new s(4201,4096,1),s.AZTEC_DATA_10=new s(1033,1024,1),s.AZTEC_DATA_6=new s(67,64,1),s.AZTEC_PARAM=new s(19,16,1),s.QR_CODE_FIELD_256=new s(285,256,0),s.DATA_MATRIX_FIELD_256=new s(301,256,1),s.AZTEC_DATA_8=s.DATA_MATRIX_FIELD_256,s.MAXICODE_FIELD_64=s.AZTEC_DATA_6,s);function s(t,e,r){this.primitive=t,this.size=e,this.generatorBase=r;for(var o=new Int32Array(e),a=1,i=0;i<e;i++)o[i]=a,e<=(a*=2)&&(a^=t,a&=e-1);this.expTable=o;var u=new Int32Array(e);for(i=0;i<e-1;i++)u[o[i]]=i;this.logTable=u,this.zero=new n.default(this,Int32Array.from([0])),this.one=new n.default(this,Int32Array.from([1]))}e.default=u},function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r=r||Promise)(function(o,a){function i(t){try{s(n.next(t))}catch(t){a(t)}}function u(t){try{s(n.throw(t))}catch(t){a(t)}}function s(t){t.done?o(t.value):new r(function(e){e(t.value)}).then(i,u)}s((n=n.apply(t,e||[])).next())})},o=this&&this.__generator||function(t,e){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=0<(o=i.trys).length&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=r(27),i=r(45),u=r(12),s=r(46),f=r(5),d=r(0),l=r(49),c=r(50),h=(Object.defineProperty(p.prototype,"hasNavigator",{get:function(){return"undefined"!=typeof navigator},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"canEnumerateDevices",{get:function(){return!(!this.isMediaDevicesSuported||!navigator.mediaDevices.enumerateDevices)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(t){this._timeBetweenDecodingAttempts=t<0?0:t},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"hints",{get:function(){return this._hints},set:function(t){this._hints=t||null},enumerable:!0,configurable:!0}),p.prototype.listVideoInputDevices=function(){return n(this,void 0,void 0,function(){var t,e,r,n,a,i,u,s,f,d;return o(this,function(o){switch(o.label){case 0:if(!this.hasNavigator)throw new Error("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:for(t=o.sent(),e=[],r=0,n=t;r<n.length;r++)a=n[r],"videoinput"===(i="video"===a.kind?"videoinput":a.kind)&&(u=a.deviceId||a.id,s=a.label||"Video device "+(e.length+1),f=a.groupId,d={deviceId:u,label:s,kind:i,groupId:f},e.push(d));return[2,e]}})})},p.prototype.getVideoInputDevices=function(){return n(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return[4,this.listVideoInputDevices()];case 1:return[2,t.sent().map(function(t){return new c.VideoInputDevice(t.deviceId,t.label)})]}})})},p.prototype.findDeviceById=function(t){return n(this,void 0,void 0,function(){var e;return o(this,function(r){switch(r.label){case 0:return[4,this.listVideoInputDevices()];case 1:return(e=r.sent())?[2,e.find(function(e){return e.deviceId===t})]:[2,null]}})})},p.prototype.decodeFromInputVideoDevice=function(t,e){return n(this,void 0,void 0,function(){return o(this,function(r){switch(r.label){case 0:return[4,this.decodeOnceFromVideoDevice(t,e)];case 1:return[2,r.sent()]}})})},p.prototype.decodeOnceFromVideoDevice=function(t,e){return n(this,void 0,void 0,function(){var r;return o(this,function(n){switch(n.label){case 0:return this.reset(),r={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,e)];case 1:return[2,n.sent()]}})})},p.prototype.decodeOnceFromConstraints=function(t,e){return n(this,void 0,void 0,function(){var r;return o(this,function(n){switch(n.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return r=n.sent(),[4,this.decodeOnceFromStream(r,e)];case 2:return[2,n.sent()]}})})},p.prototype.decodeOnceFromStream=function(t,e){return n(this,void 0,void 0,function(){var r;return o(this,function(n){switch(n.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return r=n.sent(),[4,this.decodeOnce(r)];case 2:return[2,n.sent()]}})})},p.prototype.decodeFromInputVideoDeviceContinuously=function(t,e,r){return n(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return[4,this.decodeFromVideoDevice(t,e,r)];case 1:return[2,n.sent()]}})})},p.prototype.decodeFromVideoDevice=function(t,e,r){return n(this,void 0,void 0,function(){var n;return o(this,function(o){switch(o.label){case 0:return n={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(n,e,r)];case 1:return[2,o.sent()]}})})},p.prototype.decodeFromConstraints=function(t,e,r){return n(this,void 0,void 0,function(){var n;return o(this,function(o){switch(o.label){case 0:return[4,navigator.mediaDevices.getUserMedia(t)];case 1:return n=o.sent(),[4,this.decodeFromStream(n,e,r)];case 2:return[2,o.sent()]}})})},p.prototype.decodeFromStream=function(t,e,r){return n(this,void 0,void 0,function(){var n;return o(this,function(o){switch(o.label){case 0:return this.reset(),[4,this.attachStreamToVideo(t,e)];case 1:return n=o.sent(),[4,this.decodeContinuously(n,r)];case 2:return[2,o.sent()]}})})},p.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},p.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},p.prototype.attachStreamToVideo=function(t,e){return n(this,void 0,void 0,function(){var r;return o(this,function(n){switch(n.label){case 0:return r=this.prepareVideoElement(e),this.addVideoSource(r,t),this.videoElement=r,this.stream=t,[4,this.playVideoOnLoadAsync(r)];case 1:return n.sent(),[2,r]}})})},p.prototype.playVideoOnLoadAsync=function(t){var e=this;return new Promise(function(r,n){return e.playVideoOnLoad(t,function(){return r()})})},p.prototype.playVideoOnLoad=function(t,e){var r=this;this.videoEndedListener=function(){return r.stopStreams()},this.videoCanPlayListener=function(){return r.tryPlayVideo(t)},t.addEventListener("ended",this.videoEndedListener),t.addEventListener("canplay",this.videoCanPlayListener),t.addEventListener("playing",e),this.tryPlayVideo(t)},p.prototype.isVideoPlaying=function(t){return 0<t.currentTime&&!t.paused&&!t.ended&&2<t.readyState},p.prototype.tryPlayVideo=function(t){return n(this,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:if(this.isVideoPlaying(t))return console.warn("Trying to play video that is already playing."),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,t.play()];case 2:return e.sent(),[3,4];case 3:return e.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}})})},p.prototype.getMediaElement=function(t,e){var r=document.getElementById(t);if(!r)throw new a.default("element with id '"+t+"' not found");if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new a.default("element with id '"+t+"' must be an "+e+" element");return r},p.prototype.decodeFromImage=function(t,e){if(!t&&!e)throw new a.default("either imageElement with a src set or an url must be provided");return e&&!t?this.decodeFromImageUrl(e):this.decodeFromImageElement(t)},p.prototype.decodeFromVideo=function(t,e){if(!t&&!e)throw new a.default("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrl(e):this.decodeFromVideoElement(t)},p.prototype.decodeFromVideoContinuously=function(t,e,r){if(void 0===t&&void 0===e)throw new a.default("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrlContinuously(e,r):this.decodeFromVideoElementContinuously(t,r)},p.prototype.decodeFromImageElement=function(t){if(!t)throw new a.default("An image element must be provided.");this.reset();var e=this.prepareImageElement(t);return this.imageElement=e,this.isImageLoaded(e)?this.decodeOnce(e,!1,!0):this._decodeOnLoadImage(e)},p.prototype.decodeFromVideoElement=function(t){var e=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideo(e)},p.prototype.decodeFromVideoElementContinuously=function(t,e){var r=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideoContinuously(r,e)},p.prototype._decodeFromVideoElementSetup=function(t){if(!t)throw new a.default("A video element must be provided.");this.reset();var e=this.prepareVideoElement(t);return this.videoElement=e},p.prototype.decodeFromImageUrl=function(t){if(!t)throw new a.default("An URL must be provided.");this.reset();var e=this.prepareImageElement();this.imageElement=e;var r=this._decodeOnLoadImage(e);return e.src=t,r},p.prototype.decodeFromVideoUrl=function(t){if(!t)throw new a.default("An URL must be provided.");this.reset();var e=this.prepareVideoElement(),r=this.decodeFromVideoElement(e);return e.src=t,r},p.prototype.decodeFromVideoUrlContinuously=function(t,e){if(!t)throw new a.default("An URL must be provided.");this.reset();var r=this.prepareVideoElement(),n=this.decodeFromVideoElementContinuously(r,e);return r.src=t,n},p.prototype._decodeOnLoadImage=function(t){var e=this;return new Promise(function(r,n){e.imageLoadedListener=function(){return e.decodeOnce(t,!1,!0).then(r,n)},t.addEventListener("load",e.imageLoadedListener)})},p.prototype._decodeOnLoadVideo=function(t){return n(this,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return e.sent(),[4,this.decodeOnce(t)];case 2:return[2,e.sent()]}})})},p.prototype._decodeOnLoadVideoContinuously=function(t,e){return n(this,void 0,void 0,function(){return o(this,function(r){switch(r.label){case 0:return[4,this.playVideoOnLoadAsync(t)];case 1:return r.sent(),this.decodeContinuously(t,e),[2]}})})},p.prototype.isImageLoaded=function(t){return!!t.complete&&0!==t.naturalWidth},p.prototype.prepareImageElement=function(t){var e;return void 0===t&&((e=document.createElement("img")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"img")),t instanceof HTMLImageElement&&(e=t),e},p.prototype.prepareVideoElement=function(t){var e;return t||"undefined"==typeof document||((e=document.createElement("video")).width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"video")),t instanceof HTMLVideoElement&&(e=t),e.setAttribute("autoplay","true"),e.setAttribute("muted","true"),e.setAttribute("playsinline","true"),e},p.prototype.decodeOnce=function(t,e,r){var n=this;void 0===e&&(e=!0),void 0===r&&(r=!0),this._stopAsyncDecode=!1;var o=function(a,i){if(n._stopAsyncDecode)return i(new d.default("Video stream has ended before any code could be detected.")),void(n._stopAsyncDecode=void 0);try{var s=n.decode(t);a(s)}catch(s){var l=e&&s instanceof d.default,c=s instanceof u.default||s instanceof f.default;if(l||c&&r)return setTimeout(function(){return o(a,i)},n._timeBetweenDecodingAttempts);i(s)}};return new Promise(function(t,e){return o(t,e)})},p.prototype.decodeContinuously=function(t,e){var r=this;this._stopContinuousDecode=!1;var n=function(){if(r._stopContinuousDecode)r._stopContinuousDecode=void 0;else try{var o=r.decode(t);e(o,null),setTimeout(function(){return n()},r.timeBetweenScansMillis)}catch(o){e(null,o);var a=o instanceof u.default||o instanceof f.default,i=o instanceof d.default;(a||i)&&setTimeout(function(){return n()},r._timeBetweenDecodingAttempts)}};n()},p.prototype.decode=function(t){var e=this.createBinaryBitmap(t);return this.decodeBitmap(e)},p.prototype.createBinaryBitmap=function(t){var e=this.getCaptureCanvasContext(t);this.drawImageOnCanvas(e,t);var r=this.getCaptureCanvas(t),n=new l.HTMLCanvasElementLuminanceSource(r),o=new s.default(n);return new i.default(o)},p.prototype.getCaptureCanvasContext=function(t){if(!this.captureCanvasContext){var e=this.getCaptureCanvas(t).getContext("2d");this.captureCanvasContext=e}return this.captureCanvasContext},p.prototype.getCaptureCanvas=function(t){if(!this.captureCanvas){var e=this.createCaptureCanvas(t);this.captureCanvas=e}return this.captureCanvas},p.prototype.drawImageOnCanvas=function(t,e){t.drawImage(e,0,0)},p.prototype.decodeBitmap=function(t){return this.reader.decode(t,this._hints)},p.prototype.createCaptureCanvas=function(t){if("undefined"==typeof document)return this._destroyCaptureCanvas(),null;var e,r,n=document.createElement("canvas");return void 0!==t&&(t instanceof HTMLVideoElement?(e=t.videoWidth,r=t.videoHeight):t instanceof HTMLImageElement&&(e=t.naturalWidth||t.width,r=t.naturalHeight||t.height)),n.style.width=e+"px",n.style.height=r+"px",n.width=e,n.height=r,n},p.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach(function(t){return t.stop()}),this.stream=void 0),!1===this._stopAsyncDecode&&this.stopAsyncDecode(),!1===this._stopContinuousDecode&&this.stopContinuousDecode()},p.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},p.prototype._destroyVideoElement=function(){this.videoElement&&(void 0!==this.videoEndedListener&&this.videoElement.removeEventListener("ended",this.videoEndedListener),void 0!==this.videoPlayingEventListener&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),void 0!==this.videoCanPlayListener&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},p.prototype._destroyImageElement=function(){this.imageElement&&(void 0!==this.imageLoadedListener&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)},p.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},p.prototype.addVideoSource=function(t,e){try{t.srcObject=e}catch(r){t.src=URL.createObjectURL(e)}},p.prototype.cleanVideoSource=function(t){try{t.srcObject=null}catch(e){t.src=""}this.videoElement.removeAttribute("src")},p);function p(t,e,r){void 0===e&&(e=500),this.reader=t,this.timeBetweenScansMillis=e,this._hints=r,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}e.BrowserCodeReader=h},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var a,i=r(19),u=(o(s,a=i.default),s.prototype.getRow=function(t,e){for(var r=this.delegate.getRow(t,e),n=this.getWidth(),o=0;o<n;o++)r[o]=255-(255&r[o]);return r},s.prototype.getMatrix=function(){for(var t=this.delegate.getMatrix(),e=this.getWidth()*this.getHeight(),r=new Uint8ClampedArray(e),n=0;n<e;n++)r[n]=255-(255&t[n]);return r},s.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},s.prototype.crop=function(t,e,r,n){return new s(this.delegate.crop(t,e,r,n))},s.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},s.prototype.invert=function(){return this.delegate},s.prototype.rotateCounterClockwise=function(){return new s(this.delegate.rotateCounterClockwise())},s.prototype.rotateCounterClockwise45=function(){return new s(this.delegate.rotateCounterClockwise45())},s);function s(t){var e=a.call(this,t.getWidth(),t.getHeight())||this;return e.delegate=t,e}e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(11),o=r(29),a=(i.prototype.getWidth=function(){return this.width},i.prototype.getHeight=function(){return this.height},i.prototype.isCropSupported=function(){return!1},i.prototype.crop=function(t,e,r,n){throw new o.default("This luminance source does not support cropping.")},i.prototype.isRotateSupported=function(){return!1},i.prototype.rotateCounterClockwise=function(){throw new o.default("This luminance source does not support rotation by 90 degrees.")},i.prototype.rotateCounterClockwise45=function(){throw new o.default("This luminance source does not support rotation by 45 degrees.")},i.prototype.toString=function(){for(var t=new Uint8ClampedArray(this.width),e=new n.default,r=0;r<this.height;r++){for(var o=this.getRow(r,t),a=0;a<this.width;a++){var i,u=255&o[a];i=u<64?"#":u<128?"+":u<192?".":" ",e.append(i)}e.append("\n")}return e.toString()},i);function i(t,e){this.width=t,this.height=e}e.default=a},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var a,i=r(2),u=r(4),s=r(9),f=r(13),d=r(3),l=r(10),c=r(80),h=r(0),p=r(5),w=r(12),g=(o(v,a=l.default),v.findStartGuardPattern=function(t){for(var e=!1,r=null,n=0,o=[0,0,0];!e;){var a=(r=v.findGuardPattern(t,n,!(o=[0,0,0]),this.START_END_PATTERN,o))[0],i=a-((n=r[1])-a);0<=i&&(e=t.isRange(i,a,!1))}return r},v.prototype.decodeRow=function(t,e,r){var n=v.findStartGuardPattern(e),o=null==r?null:r.get(u.default.NEED_RESULT_POINT_CALLBACK);if(null!=o){var a=new d.default((n[0]+n[1])/2,t);o.foundPossibleResultPoint(a)}var l=this.decodeMiddle(e,n,this.decodeRowStringBuffer),g=l.rowOffset,_=l.resultString;if(null!=o){var y=new d.default(g,t);o.foundPossibleResultPoint(y)}var C=v.decodeEnd(e,g);if(null!=o){var A=new d.default((C[0]+C[1])/2,t);o.foundPossibleResultPoint(A)}var m=C[1],E=m+(m-C[0]);if(E>=e.getSize()||!e.isRange(m,E,!1))throw new h.default;var S=_.toString();if(S.length<8)throw new p.default;if(!v.checkChecksum(S))throw new w.default;var I=(n[1]+n[0])/2,O=(C[1]+C[0])/2,b=this.getBarcodeFormat(),T=[new d.default(I,t),new d.default(O,t)],M=new s.default(S,null,0,T,b,(new Date).getTime()),N=0;try{var R=c.default.decodeRow(t,e,C[1]);M.putMetadata(f.default.UPC_EAN_EXTENSION,R.getText()),M.putAllMetadata(R.getResultMetadata()),M.addResultPoints(R.getResultPoints()),N=R.getText().length}catch(t){}var P=null==r?null:r.get(u.default.ALLOWED_EAN_EXTENSIONS);if(null!=P){var D=!1;for(var B in P)if(N.toString()===B){D=!0;break}if(!D)throw new h.default}return b===i.default.EAN_13||i.default.UPC_A,M},v.checkChecksum=function(t){return v.checkStandardUPCEANChecksum(t)},v.checkStandardUPCEANChecksum=function(t){var e=t.length;if(0===e)return!1;var r=parseInt(t.charAt(e-1),10);return v.getStandardUPCEANChecksum(t.substring(0,e-1))===r},v.getStandardUPCEANChecksum=function(t){for(var e=t.length,r=0,n=e-1;0<=n;n-=2){if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||9<o)throw new p.default;r+=o}for(r*=3,n=e-2;0<=n;n-=2){var o;if((o=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0))<0||9<o)throw new p.default;r+=o}return(1e3-r)%10},v.decodeEnd=function(t,e){return v.findGuardPattern(t,e,!1,v.START_END_PATTERN,new Array(v.START_END_PATTERN.length).fill(0))},v.findGuardPattern=function(t,e,r,n,o){for(var a=t.getSize(),i=0,u=e=r?t.getNextUnset(e):t.getNextSet(e),s=n.length,f=r,d=e;d<a;d++)if(t.get(d)!==f)o[i]++;else{if(i===s-1){if(l.default.patternMatchVariance(o,n,v.MAX_INDIVIDUAL_VARIANCE)<v.MAX_AVG_VARIANCE)return[u,d];u+=o[0]+o[1];for(var c=o.slice(2,o.length),p=0;p<i-1;p++)o[p]=c[p];o[i-1]=0,o[i]=0,i--}else i++;o[i]=1,f=!f}throw new h.default},v.decodeDigit=function(t,e,r,n){this.recordPattern(t,r,e);for(var o=this.MAX_AVG_VARIANCE,a=-1,i=n.length,u=0;u<i;u++){var s=n[u],f=l.default.patternMatchVariance(e,s,v.MAX_INDIVIDUAL_VARIANCE);f<o&&(o=f,a=u)}if(0<=a)return a;throw new h.default},v.MAX_AVG_VARIANCE=.48,v.MAX_INDIVIDUAL_VARIANCE=.7,v.START_END_PATTERN=[1,1,1],v.MIDDLE_PATTERN=[1,1,1,1,1],v.END_PATTERN=[1,1,1,1,1,1],v.L_PATTERNS=[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],v);function v(){var t=a.call(this)||this;t.decodeRowStringBuffer="",t.decodeRowStringBuffer="",v.L_AND_G_PATTERNS=v.L_PATTERNS.map(function(t){return t.slice()});for(var e=10;e<20;e++){for(var r=v.L_PATTERNS[e-10],n=new Array(r.length),o=0;o<r.length;o++)n[o]=r[r.length-o-1];v.L_AND_G_PATTERNS[e]=n}return t}e.default=g},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var a,i=r(6),u=(o(s,a=i.default),s);function s(){return null!==a&&a.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,o,a=r(5);(o=n=e.CharacterSetValueIdentifiers||(e.CharacterSetValueIdentifiers={}))[o.Cp437=0]="Cp437",o[o.ISO8859_1=1]="ISO8859_1",o[o.ISO8859_2=2]="ISO8859_2",o[o.ISO8859_3=3]="ISO8859_3",o[o.ISO8859_4=4]="ISO8859_4",o[o.ISO8859_5=5]="ISO8859_5",o[o.ISO8859_6=6]="ISO8859_6",o[o.ISO8859_7=7]="ISO8859_7",o[o.ISO8859_8=8]="ISO8859_8",o[o.ISO8859_9=9]="ISO8859_9",o[o.ISO8859_10=10]="ISO8859_10",o[o.ISO8859_11=11]="ISO8859_11",o[o.ISO8859_13=12]="ISO8859_13",o[o.ISO8859_14=13]="ISO8859_14",o[o.ISO8859_15=14]="ISO8859_15",o[o.ISO8859_16=15]="ISO8859_16",o[o.SJIS=16]="SJIS",o[o.Cp1250=17]="Cp1250",o[o.Cp1251=18]="Cp1251",o[o.Cp1252=19]="Cp1252",o[o.Cp1256=20]="Cp1256",o[o.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",o[o.UTF8=22]="UTF8",o[o.ASCII=23]="ASCII",o[o.Big5=24]="Big5",o[o.GB18030=25]="GB18030",o[o.EUC_KR=26]="EUC_KR";var i=(u.prototype.getValueIdentifier=function(){return this.valueIdentifier},u.prototype.getName=function(){return this.name},u.prototype.getValue=function(){return this.values[0]},u.getCharacterSetECIByValue=function(t){if(t<0||900<=t)throw new a.default("incorect value");var e=u.VALUES_TO_ECI.get(t);if(void 0===e)throw new a.default("incorect value");return e},u.getCharacterSetECIByName=function(t){var e=u.NAME_TO_ECI.get(t);if(void 0===e)throw new a.default("incorect value");return e},u.prototype.equals=function(t){if(!(t instanceof u))return!1;var e=t;return this.getName()===e.getName()},u.VALUE_IDENTIFIER_TO_ECI=new Map,u.VALUES_TO_ECI=new Map,u.NAME_TO_ECI=new Map,u.Cp437=new u(n.Cp437,Int32Array.from([0,2]),"Cp437"),u.ISO8859_1=new u(n.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),u.ISO8859_2=new u(n.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),u.ISO8859_3=new u(n.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),u.ISO8859_4=new u(n.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),u.ISO8859_5=new u(n.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),u.ISO8859_6=new u(n.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),u.ISO8859_7=new u(n.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),u.ISO8859_8=new u(n.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),u.ISO8859_9=new u(n.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),u.ISO8859_10=new u(n.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),u.ISO8859_11=new u(n.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),u.ISO8859_13=new u(n.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),u.ISO8859_14=new u(n.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),u.ISO8859_15=new u(n.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),u.ISO8859_16=new u(n.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),u.SJIS=new u(n.SJIS,20,"SJIS","Shift_JIS"),u.Cp1250=new u(n.Cp1250,21,"Cp1250","windows-1250"),u.Cp1251=new u(n.Cp1251,22,"Cp1251","windows-1251"),u.Cp1252=new u(n.Cp1252,23,"Cp1252","windows-1252"),u.Cp1256=new u(n.Cp1256,24,"Cp1256","windows-1256"),u.UnicodeBigUnmarked=new u(n.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),u.UTF8=new u(n.UTF8,26,"UTF8","UTF-8"),u.ASCII=new u(n.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),u.Big5=new u(n.Big5,28,"Big5"),u.GB18030=new u(n.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),u.EUC_KR=new u(n.EUC_KR,30,"EUC_KR","EUC-KR"),u);function u(t,e,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];this.valueIdentifier=t,this.name=r,this.values="number"==typeof e?Int32Array.from([e]):e,this.otherEncodingNames=n,u.VALUE_IDENTIFIER_TO_ECI.set(t,this),u.NAME_TO_ECI.set(r,this);for(var a=this.values,i=0,s=a.length;i!==s;i++){var f=a[i];u.VALUES_TO_ECI.set(f,this)}for(var d=0,l=n;d<l.length;d++){var c=l[d];u.NAME_TO_ECI.set(c,this)}}e.default=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.numberOfTrailingZeros=function(t){var e;if(0===t)return 32;var r=31;return 0!=(e=t<<16)&&(r-=16,t=e),0!=(e=t<<8)&&(r-=8,t=e),0!=(e=t<<4)&&(r-=4,t=e),0!=(e=t<<2)&&(r-=2,t=e),r-(t<<1>>>31)},o.numberOfLeadingZeros=function(t){if(0===t)return 32;var e=1;return t>>>16==0&&(e+=16,t<<=16),t>>>24==0&&(e+=8,t<<=8),t>>>28==0&&(e+=4,t<<=4),t>>>30==0&&(e+=2,t<<=2),e-(t>>>31)},o.toHexString=function(t){return t.toString(16)},o.bitCount=function(t){return t=(t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135,63&(t+=t>>>8)+(t>>>16)},o.MIN_VALUE_32_BITS=-2147483648,o);function o(){}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(16),o=r(7),a=r(1),i=(u.prototype.getCoefficients=function(){return this.coefficients},u.prototype.getDegree=function(){return this.coefficients.length-1},u.prototype.isZero=function(){return 0===this.coefficients[0]},u.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},u.prototype.evaluateAt=function(t){if(0===t)return this.getCoefficient(0);var e,r=this.coefficients;if(1===t){for(var o=e=0,a=r.length;o!==a;o++){var i=r[o];e=n.default.addOrSubtract(e,i)}return e}e=r[0];var u=r.length,s=this.field;for(o=1;o<u;o++)e=n.default.addOrSubtract(s.multiply(t,e),r[o]);return e},u.prototype.addOrSubtract=function(t){if(!this.field.equals(t.field))throw new a.default("GenericGFPolys do not have same GenericGF field");if(this.isZero())return t;if(t.isZero())return this;var e=this.coefficients,r=t.coefficients;if(e.length>r.length){var i=e;e=r,r=i}var s=new Int32Array(r.length),f=r.length-e.length;o.default.arraycopy(r,0,s,0,f);for(var d=f;d<r.length;d++)s[d]=n.default.addOrSubtract(e[d-f],r[d]);return new u(this.field,s)},u.prototype.multiply=function(t){if(!this.field.equals(t.field))throw new a.default("GenericGFPolys do not have same GenericGF field");if(this.isZero()||t.isZero())return this.field.getZero();for(var e=this.coefficients,r=e.length,o=t.coefficients,i=o.length,s=new Int32Array(r+i-1),f=this.field,d=0;d<r;d++)for(var l=e[d],c=0;c<i;c++)s[d+c]=n.default.addOrSubtract(s[d+c],f.multiply(l,o[c]));return new u(f,s)},u.prototype.multiplyScalar=function(t){if(0===t)return this.field.getZero();if(1===t)return this;for(var e=this.coefficients.length,r=this.field,n=new Int32Array(e),o=this.coefficients,a=0;a<e;a++)n[a]=r.multiply(o[a],t);return new u(r,n)},u.prototype.multiplyByMonomial=function(t,e){if(t<0)throw new a.default;if(0===e)return this.field.getZero();for(var r=this.coefficients,n=r.length,o=new Int32Array(n+t),i=this.field,s=0;s<n;s++)o[s]=i.multiply(r[s],e);return new u(i,o)},u.prototype.divide=function(t){if(!this.field.equals(t.field))throw new a.default("GenericGFPolys do not have same GenericGF field");if(t.isZero())throw new a.default("Divide by 0");for(var e=this.field,r=e.getZero(),n=this,o=t.getCoefficient(t.getDegree()),i=e.inverse(o);n.getDegree()>=t.getDegree()&&!n.isZero();){var u=n.getDegree()-t.getDegree(),s=e.multiply(n.getCoefficient(n.getDegree()),i),f=t.multiplyByMonomial(u,s),d=e.buildMonomial(u,s);r=r.addOrSubtract(d),n=n.addOrSubtract(f)}return[r,n]},u.prototype.toString=function(){for(var t="",e=this.getDegree();0<=e;e--){var r=this.getCoefficient(e);if(0!==r){if(r<0?(t+=" - ",r=-r):0<t.length&&(t+=" + "),0===e||1!==r){var n=this.field.log(r);0===n?t+="1":1===n?t+="a":(t+="a^",t+=n)}0!==e&&(1===e?t+="x":(t+="x^",t+=e))}}return t},u);function u(t,e){if(0===e.length)throw new a.default;this.field=t;var r=e.length;if(1<r&&0===e[0]){for(var n=1;n<r&&0===e[n];)n++;n===r?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(r-n),o.default.arraycopy(e,n,this.coefficients,0,this.coefficients.length))}else this.coefficients=e}e.default=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,o,a=r(27),i=r(1);(o=n=e.ErrorCorrectionLevelValues||(e.ErrorCorrectionLevelValues={}))[o.L=0]="L",o[o.M=1]="M",o[o.Q=2]="Q",o[o.H=3]="H";var u=(s.prototype.getValue=function(){return this.value},s.prototype.getBits=