From da56024b62b1ed14818e701f7e07f87b211a49c5 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 16 Nov 2023 09:59:20 +0100 Subject: [PATCH] aggiunto zxing compo --- EgwCoreLib.BlazorTest/Pages/Test.razor | 32 +- .../wwwroot/lib/zxing/zxing.min.js | 1 + EgwCoreLib.Razor/BarcodeReader.razor | 34 ++ EgwCoreLib.Razor/BarcodeReader.razor.cs | 260 ++++++++++++++ EgwCoreLib.Razor/BarcodeReader.razor.js | 317 ++++++++++++++++++ .../wwwroot/lib/zxing/zxing.min.js | 1 + EgwCoreLib.Utils/ZXingOptions.cs | 189 +++++++++++ 7 files changed, 833 insertions(+), 1 deletion(-) create mode 100644 EgwCoreLib.BlazorTest/wwwroot/lib/zxing/zxing.min.js create mode 100644 EgwCoreLib.Razor/BarcodeReader.razor create mode 100644 EgwCoreLib.Razor/BarcodeReader.razor.cs create mode 100644 EgwCoreLib.Razor/BarcodeReader.razor.js create mode 100644 EgwCoreLib.Razor/wwwroot/lib/zxing/zxing.min.js create mode 100644 EgwCoreLib.Utils/ZXingOptions.cs diff --git a/EgwCoreLib.BlazorTest/Pages/Test.razor b/EgwCoreLib.BlazorTest/Pages/Test.razor index b7e1984..ba6d185 100644 --- a/EgwCoreLib.BlazorTest/Pages/Test.razor +++ b/EgwCoreLib.BlazorTest/Pages/Test.razor @@ -91,11 +91,41 @@ + + + +
+ @*
*@ +
+ + + +
+ + +
+
+ +
+
+
+ @code { private int currentCount = 0; + protected BarcodeReader barcodeReaderCustom { get; set; } = null!; protected Random rnd = new Random(); - + protected async Task ScanDoneHandler(string value) + { + await Task.Delay(1); + } private void IncrementCount() { currentCount++; diff --git a/EgwCoreLib.BlazorTest/wwwroot/lib/zxing/zxing.min.js b/EgwCoreLib.BlazorTest/wwwroot/lib/zxing/zxing.min.js new file mode 100644 index 0000000..4f5b4ae --- /dev/null +++ b/EgwCoreLib.BlazorTest/wwwroot/lib/zxing/zxing.min.js @@ -0,0 +1 @@ +!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 i, a = r(6), u = (o(s, i = a.default), s.getNotFoundInstance = function () { return new s }, s); function s() { return null !== i && i.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 i, a = r(6), u = (o(s, i = a.default), s); function s() { return null !== i && i.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 i, a = r(6), u = (o(s, i = a.default), s.getFormatInstance = function () { return new s }, s); function s() { return null !== i && i.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(21), o = (i.prototype.enableDecoding = function (t) { return this.encoding = t, this }, i.prototype.append = function (t) { return "string" == typeof t ? this.value += t.toString() : this.encoding ? this.value += n.default.decode(new Uint8Array([t]), this.encoding) : this.value += String.fromCharCode(t), this }, i.prototype.length = function () { return this.value.length }, i.prototype.charAt = function (t) { return this.value.charAt(t) }, i.prototype.deleteCharAt = function (t) { this.value = this.value.substr(0, t) + this.value.substring(t + 1) }, i.prototype.setCharAt = function (t, e) { this.value = this.value.substr(0, t) + e + this.value.substr(t + 1) }, i.prototype.substring = function (t, e) { return this.value.substring(t, e) }, i.prototype.setLengthToZerfacingModeo = function () { this.value = "" }, i.prototype.toString = function () { return this.value }, i.prototype.insert = function (t, e) { this.value = this.value.substr(0, t) + e + this.value.substr(t + e.length) }, i); function i(t) { void 0 === t && (t = ""), this.value = t } e.default = o }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var n = r(10), o = r(59), i = (a.prototype.getX = function () { return this.x }, a.prototype.getY = function () { return this.y }, a.prototype.equals = function (t) { if (t instanceof a) { var e = t; return this.x === e.x && this.y === e.y } return !1 }, a.prototype.hashCode = function () { return 31 * o.default.floatToIntBits(this.x) + o.default.floatToIntBits(this.y) }, a.prototype.toString = function () { return "(" + this.x + "," + this.y + ")" }, a.orderBestPatterns = function (t) { var e, r, n, o = this.distance(t[0], t[1]), i = this.distance(t[1], t[2]), a = this.distance(t[0], t[2]); if (n = o <= i && a <= i ? (r = t[0], e = t[1], t[2]) : i <= a && o <= a ? (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 }, a.distance = function (t, e) { return n.default.distance(t.x, t.y, e.x, e.y) }, a.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) }, a); function a(t, e) { this.x = t, this.y = e } e.default = i }, 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 i, a = r(94), u = (o(s, i = a.CustomError), s); function s(t) { void 0 === t && (t = void 0); var e = i.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"; 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"; Object.defineProperty(e, "__esModule", { value: !0 }); var n = r(7), o = (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 Array(e.length + t.length); n.default.arraycopy(e, 0, r, 0, e.length), n.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, o, i, a) { void 0 === r && (r = null == e ? 0 : 8 * e.length), void 0 === a && (a = n.default.currentTimeMillis()), this.text = t, this.rawBytes = e, this.numBits = r, this.resultPoints = o, this.format = i, this.timestamp = a, this.text = t, this.rawBytes = e, this.numBits = null == r ? null == e ? 0 : 8 * e.length : r, this.resultPoints = o, this.format = i, this.resultMetadata = null, this.timestamp = null == a ? n.default.currentTimeMillis() : a } e.default = o }, 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, i = e - n; return Math.sqrt(o * o + i * i) }, 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"; 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 i, a = r(6), u = (o(s, i = a.default), s.getChecksumInstance = function () { return new s }, s); function s() { return null !== i && i.apply(this, arguments) || this } e.default = u }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var n = r(15), o = r(7), i = r(17), a = r(4), 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 i = t[o], a = 0; a < r; a++)i[a] && n.set(a, 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, i = 0, a = -1, s = 0, l = 0; l < t.length;)if ("\n" === t.charAt(l) || "\r" === t.charAt(l)) { if (i < o) { if (-1 === a) a = o - i; else if (o - i !== a) throw new u.default("row lengths do not match"); i = o, s++ } l++ } else if (t.substring(l, l + e.length) === e) l += e.length, n[o] = !0, o++; else { if (t.substring(l, l + r.length) !== r) throw new u.default("illegal character encountered: " + t.substring(l)); l += r.length, n[o] = !1, o++ } if (i < o) { if (-1 === a) a = o - i; else if (o - i !== a) throw new u.default("row lengths do not match"); s++ } for (var d = new f(a, s), c = 0; c < o; c++)n[c] && d.set(Math.floor(c % a), Math.floor(c / a)); return d }, 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, i = 0, a = this.height; i < a; i++)for (var s = i * r, f = t.getRow(i, e).getBitArray(), l = 0; l < r; l++)o[s + l] ^= f[l] }, 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, i = e + n; if (i > this.height || o > this.width) throw new u.default("The region must fit inside the matrix"); for (var a = this.rowSize, s = this.bits, f = e; f < i; f++)for (var l = f * a, d = t; d < o; d++)s[l + Math.floor(d / 32)] |= 1 << (31 & d) & 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, i = t * r, a = 0; a < r; a++)e.setBulk(32 * a, o[i + a]); 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), i = 0, a = Math.floor((e + 1) / 2); i < a; i++)r = this.getRow(i, r), o = this.getRow(e - 1 - i, o), r.reverse(), o.reverse(), this.setRow(i, o), this.setRow(e - 1 - i, r) }, f.prototype.getEnclosingRectangle = function () { for (var t = this.width, e = this.height, r = this.rowSize, n = this.bits, o = t, i = e, a = -1, u = -1, s = 0; s < e; s++)for (var f = 0; f < r; f++) { var l = n[s * r + f]; if (0 !== l) { if (s < i && (i = s), u < s && (u = s), 32 * f < o) { for (var d = 0; 0 == (l << 31 - d & 4294967295);)d++; 32 * f + d < o && (o = 32 * f + d) } if (a < 32 * f + 31) { for (d = 31; l >>> d == 0;)d--; a < 32 * f + d && (a = 32 * f + d) } } } return a < o || u < i ? null : Int32Array.from([o, i, a - o + 1, u - i + 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, i = e[r], a = 0; 0 == (i << 31 - a & 4294967295);)a++; return o += a, 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), i = e[r], a = 31; i >>> a == 0;)a--; return o += a, 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 && i.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) + i.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 a.default; n.append(r); for (var o = 0, i = this.height; o < i; 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(15), o = r(8), i = r(14), a = r(5), 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(i.default.ORIENTATION) && (f += s.get(i.default.ORIENTATION) % 360), n.putMetadata(i.default.ORIENTATION, f); var l = n.getResultPoints(); if (null !== l) for (var d = r.getHeight(), c = 0; c < l.length; c++)l[c] = new a.default(d - l[c].getY() - 1, l[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(), l = new n.default(s), d = e && !0 === e.get(o.default.TRY_HARDER), c = Math.max(1, f >> (d ? 8 : 5)); r = d ? f : 15; for (var h = Math.trunc(f / 2), p = 0; p < r; p++) { var _ = Math.trunc((p + 1) / 2), g = h + c * (0 == (1 & p) ? _ : -_); if (g < 0 || f <= g) break; try { l = t.getBlackRow(g, l) } catch (t) { continue } for (var v = function (t) { if (1 === t && (l.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 = w.decodeRow(g, l, e); if (1 === t) { n.putMetadata(i.default.ORIENTATION, 180); var u = n.getResultPoints(); null !== u && (u[0] = new a.default(s - u[0].getX() - 1, u[0].getY()), u[1] = new a.default(s - u[1].getX() - 1, u[1].getY())) } return { value: n } } catch (t) { } }, w = this, y = 0; y < 2; y++) { var A = v(y); if ("object" == typeof A) return A.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 i = t.getSize(); if (i <= e) throw new u.default; for (var a = !t.get(e), s = 0, f = e; f < i;) { if (t.get(f) !== a) r[s]++; else { if (++s === n) break; r[s] = 1, a = !a } f++ } if (s !== n && (s !== n - 1 || f !== i)) 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, i = 0, a = 0; a < n; a++)o += t[a], i += e[a]; if (o < i) return Number.POSITIVE_INFINITY; var u = o / i; r *= u; for (var s = 0, f = 0; f < n; f++) { var l = t[f], d = e[f] * u, c = d < l ? l - d : d - l; if (r < c) return Number.POSITIVE_INFINITY; s += c } return s / o }, f); function f() { } e.default = s }, 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 = r(7), o = r(16), i = r(17), a = 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), i = r[n]; i &= ~((1 << (31 & t)) - 1); for (var a = r.length; 0 === i;) { if (++n === a) return e; i = r[n] } var u = 32 * n + o.default.numberOfTrailingZeros(i); 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), i = ~r[n]; i &= ~((1 << (31 & t)) - 1); for (var a = r.length; 0 === i;) { if (++n === a) return e; i = ~r[n] } var u = 32 * n + o.default.numberOfTrailingZeros(i); 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 a.default; if (e !== t) { e--; for (var r = Math.floor(t / 32), n = Math.floor(e / 32), o = this.bits, i = r; i <= n; i++) { var u = (2 << (i < n ? 31 : 31 & e)) - (1 << (r < i ? 0 : 31 & t)); o[i] |= 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 a.default; if (e === t) return !0; e--; for (var n = Math.floor(t / 32), o = Math.floor(e / 32), i = this.bits, u = n; u <= o; u++) { var s = (2 << (u < o ? 31 : 31 & e)) - (1 << (n < u ? 0 : 31 & t)) & 4294967295; if ((i[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 a.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 a.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 i = 0, a = 0; a < 8; a++)this.get(t) && (i |= 1 << 7 - a), t++; e[r + o] = i } }, 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 i = n[o]; i = (i = (i = (i = (i = i >> 1 & 1431655765 | (1431655765 & i) << 1) >> 2 & 858993459 | (858993459 & i) << 2) >> 4 & 252645135 | (252645135 & i) << 4) >> 8 & 16711935 | (16711935 & i) << 8) >> 16 & 65535 | (65535 & i) << 16, t[e - o] = i } if (this.size !== 32 * r) { var a = 32 * r - this.size, u = t[0] >>> a; for (o = 1; o < r; o++) { var s = t[o]; u |= s << 32 - a, t[o - 1] = u, u = s >>> a } 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 && i.default.equals(this.bits, e.bits) }, s.prototype.hashCode = function () { return 31 * this.size + i.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 = (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.parseInt = function (t, e) { return void 0 === e && (e = void 0), parseInt(t, e) }, o.MIN_VALUE_32_BITS = -2147483648, o.MAX_VALUE = Number.MAX_SAFE_INTEGER, o); function o() { } e.default = n }, function (t, e, r) { "use strict"; var n = this && this.__values || function (t) { var e = "function" == typeof Symbol && t[Symbol.iterator], r = 0; return e ? e.call(t) : { next: function () { return t && r >= t.length && (t = void 0), { value: t && t[r++], done: !t } } } }; Object.defineProperty(e, "__esModule", { value: !0 }); var o = r(7), i = r(1), a = r(95), u = (s.fill = function (t, e) { for (var r = 0, n = t.length; r < n; r++)t[r] = e }, s.fillWithin = function (t, e, r, n) { s.rangeCheck(t.length, e, r); for (var o = e; o < r; o++)t[o] = n }, s.rangeCheck = function (t, e, r) { if (r < e) throw new i.default("fromIndex(" + e + ") > toIndex(" + r + ")"); if (e < 0) throw new a.default(e); if (t < r) throw new a.default(r) }, s.asList = function () { for (var t = [], e = 0; e < arguments.length; e++)t[e] = arguments[e]; return t }, s.create = function (t, e, r) { return Array.from({ length: t }).map(function (t) { return Array.from({ length: e }).fill(r) }) }, s.createInt32Array = function (t, e, r) { return Array.from({ length: t }).map(function (t) { return Int32Array.from({ length: e }).fill(r) }) }, s.equals = function (t, e) { if (!t) return !1; if (!e) return !1; if (!t.length) return !1; if (!e.length) return !1; if (t.length !== e.length) return !1; for (var r = 0, n = t.length; r < n; r++)if (t[r] !== e[r]) return !1; return !0 }, s.hashCode = function (t) { var e, r; if (null === t) return 0; var o = 1; try { for (var i = n(t), a = i.next(); !a.done; a = i.next())o = 31 * o + a.value } catch (t) { e = { error: t } } finally { try { a && !a.done && (r = i.return) && r.call(i) } finally { if (e) throw e.error } } return o }, s.fillUint8Array = function (t, e) { for (var r = 0; r !== t.length; r++)t[r] = e }, s.copyOf = function (t, e) { return t.slice(0, e) }, s.copyOfUint8Array = function (t, e) { if (t.length <= e) { var r = new Uint8Array(e); return r.set(t), r } return t.slice(0, e) }, s.copyOfRange = function (t, e, r) { var n = r - e, i = new Int32Array(n); return o.default.arraycopy(t, e, i, 0, n), i }, s.binarySearch = function (t, e, r) { void 0 === r && (r = s.numberComparator); for (var n = 0, o = t.length - 1; n <= o;) { var i = o + n >> 1, a = r(e, t[i]); if (0 < a) n = 1 + i; else { if (!(a < 0)) return i; o = i - 1 } } return -n - 1 }, s.numberComparator = function (t, e) { return t - e }, s); function s() { } 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 i, a = r(6), u = (o(s, i = a.default), s); function s() { return null !== i && i.apply(this, arguments) || this } e.default = u }, function (t, e, r) { "use strict"; var n = this && this.__values || function (t) { var e = "function" == typeof Symbol && t[Symbol.iterator], r = 0; return e ? e.call(t) : { next: function () { return t && r >= t.length && (t = void 0), { value: t && t[r++], done: !t } } } }; Object.defineProperty(e, "__esModule", { value: !0 }); var o = r(17), i = r(10), a = (u.prototype.PDF417Common = function () { }, u.getBitCountSum = function (t) { return i.default.sum(t) }, u.toIntArray = function (t) { var e, r; if (null == t || !t.length) return u.EMPTY_INT_ARRAY; var o = new Int32Array(t.length), i = 0; try { for (var a = n(t), s = a.next(); !s.done; s = a.next()) { var f = s.value; o[i++] = f } } catch (t) { e = { error: t } } finally { try { s && !s.done && (r = a.return) && r.call(a) } finally { if (e) throw e.error } } return o }, u.getCodeword = function (t) { var e = o.default.binarySearch(u.SYMBOL_TABLE, 262143 & t); return e < 0 ? -1 : (u.CODEWORD_TABLE[e] - 1) % u.NUMBER_OF_CODEWORDS }, u.MAX_CODEWORDS_IN_BARCODE = (u.NUMBER_OF_CODEWORDS = 929) - 1, u.MIN_ROWS_IN_BARCODE = 3, u.MAX_ROWS_IN_BARCODE = 90, u.MODULES_IN_CODEWORD = 17, u.MODULES_IN_STOP_PATTERN = 18, u.BARS_IN_MODULE = 8, u.EMPTY_INT_ARRAY = new Int32Array([]), u.SYMBOL_TABLE = Int32Array.from([66142, 66170, 66206, 66236, 66290, 66292, 66350, 66382, 66396, 66454, 66470, 66476, 66594, 66600, 66614, 66626, 66628, 66632, 66640, 66654, 66662, 66668, 66682, 66690, 66718, 66720, 66748, 66758, 66776, 66798, 66802, 66804, 66820, 66824, 66832, 66846, 66848, 66876, 66880, 66936, 66950, 66956, 66968, 66992, 67006, 67022, 67036, 67042, 67044, 67048, 67062, 67118, 67150, 67164, 67214, 67228, 67256, 67294, 67322, 67350, 67366, 67372, 67398, 67404, 67416, 67438, 67474, 67476, 67490, 67492, 67496, 67510, 67618, 67624, 67650, 67656, 67664, 67678, 67686, 67692, 67706, 67714, 67716, 67728, 67742, 67744, 67772, 67782, 67788, 67800, 67822, 67826, 67828, 67842, 67848, 67870, 67872, 67900, 67904, 67960, 67974, 67992, 68016, 68030, 68046, 68060, 68066, 68068, 68072, 68086, 68104, 68112, 68126, 68128, 68156, 68160, 68216, 68336, 68358, 68364, 68376, 68400, 68414, 68448, 68476, 68494, 68508, 68536, 68546, 68548, 68552, 68560, 68574, 68582, 68588, 68654, 68686, 68700, 68706, 68708, 68712, 68726, 68750, 68764, 68792, 68802, 68804, 68808, 68816, 68830, 68838, 68844, 68858, 68878, 68892, 68920, 68976, 68990, 68994, 68996, 69e3, 69008, 69022, 69024, 69052, 69062, 69068, 69080, 69102, 69106, 69108, 69142, 69158, 69164, 69190, 69208, 69230, 69254, 69260, 69272, 69296, 69310, 69326, 69340, 69386, 69394, 69396, 69410, 69416, 69430, 69442, 69444, 69448, 69456, 69470, 69478, 69484, 69554, 69556, 69666, 69672, 69698, 69704, 69712, 69726, 69754, 69762, 69764, 69776, 69790, 69792, 69820, 69830, 69836, 69848, 69870, 69874, 69876, 69890, 69918, 69920, 69948, 69952, 70008, 70022, 70040, 70064, 70078, 70094, 70108, 70114, 70116, 70120, 70134, 70152, 70174, 70176, 70264, 70384, 70412, 70448, 70462, 70496, 70524, 70542, 70556, 70584, 70594, 70600, 70608, 70622, 70630, 70636, 70664, 70672, 70686, 70688, 70716, 70720, 70776, 70896, 71136, 71180, 71192, 71216, 71230, 71264, 71292, 71360, 71416, 71452, 71480, 71536, 71550, 71554, 71556, 71560, 71568, 71582, 71584, 71612, 71622, 71628, 71640, 71662, 71726, 71732, 71758, 71772, 71778, 71780, 71784, 71798, 71822, 71836, 71864, 71874, 71880, 71888, 71902, 71910, 71916, 71930, 71950, 71964, 71992, 72048, 72062, 72066, 72068, 72080, 72094, 72096, 72124, 72134, 72140, 72152, 72174, 72178, 72180, 72206, 72220, 72248, 72304, 72318, 72416, 72444, 72456, 72464, 72478, 72480, 72508, 72512, 72568, 72588, 72600, 72624, 72638, 72654, 72668, 72674, 72676, 72680, 72694, 72726, 72742, 72748, 72774, 72780, 72792, 72814, 72838, 72856, 72880, 72894, 72910, 72924, 72930, 72932, 72936, 72950, 72966, 72972, 72984, 73008, 73022, 73056, 73084, 73102, 73116, 73144, 73156, 73160, 73168, 73182, 73190, 73196, 73210, 73226, 73234, 73236, 73250, 73252, 73256, 73270, 73282, 73284, 73296, 73310, 73318, 73324, 73346, 73348, 73352, 73360, 73374, 73376, 73404, 73414, 73420, 73432, 73454, 73498, 73518, 73522, 73524, 73550, 73564, 73570, 73572, 73576, 73590, 73800, 73822, 73858, 73860, 73872, 73886, 73888, 73916, 73944, 73970, 73972, 73992, 74014, 74016, 74044, 74048, 74104, 74118, 74136, 74160, 74174, 74210, 74212, 74216, 74230, 74244, 74256, 74270, 74272, 74360, 74480, 74502, 74508, 74544, 74558, 74592, 74620, 74638, 74652, 74680, 74690, 74696, 74704, 74726, 74732, 74782, 74784, 74812, 74992, 75232, 75288, 75326, 75360, 75388, 75456, 75512, 75576, 75632, 75646, 75650, 75652, 75664, 75678, 75680, 75708, 75718, 75724, 75736, 75758, 75808, 75836, 75840, 75896, 76016, 76256, 76736, 76824, 76848, 76862, 76896, 76924, 76992, 77048, 77296, 77340, 77368, 77424, 77438, 77536, 77564, 77572, 77576, 77584, 77600, 77628, 77632, 77688, 77702, 77708, 77720, 77744, 77758, 77774, 77788, 77870, 77902, 77916, 77922, 77928, 77966, 77980, 78008, 78018, 78024, 78032, 78046, 78060, 78074, 78094, 78136, 78192, 78206, 78210, 78212, 78224, 78238, 78240, 78268, 78278, 78284, 78296, 78322, 78324, 78350, 78364, 78448, 78462, 78560, 78588, 78600, 78622, 78624, 78652, 78656, 78712, 78726, 78744, 78768, 78782, 78798, 78812, 78818, 78820, 78824, 78838, 78862, 78876, 78904, 78960, 78974, 79072, 79100, 79296, 79352, 79368, 79376, 79390, 79392, 79420, 79424, 79480, 79600, 79628, 79640, 79664, 79678, 79712, 79740, 79772, 79800, 79810, 79812, 79816, 79824, 79838, 79846, 79852, 79894, 79910, 79916, 79942, 79948, 79960, 79982, 79988, 80006, 80024, 80048, 80062, 80078, 80092, 80098, 80100, 80104, 80134, 80140, 80176, 80190, 80224, 80252, 80270, 80284, 80312, 80328, 80336, 80350, 80358, 80364, 80378, 80390, 80396, 80408, 80432, 80446, 80480, 80508, 80576, 80632, 80654, 80668, 80696, 80752, 80766, 80776, 80784, 80798, 80800, 80828, 80844, 80856, 80878, 80882, 80884, 80914, 80916, 80930, 80932, 80936, 80950, 80962, 80968, 80976, 80990, 80998, 81004, 81026, 81028, 81040, 81054, 81056, 81084, 81094, 81100, 81112, 81134, 81154, 81156, 81160, 81168, 81182, 81184, 81212, 81216, 81272, 81286, 81292, 81304, 81328, 81342, 81358, 81372, 81380, 81384, 81398, 81434, 81454, 81458, 81460, 81486, 81500, 81506, 81508, 81512, 81526, 81550, 81564, 81592, 81602, 81604, 81608, 81616, 81630, 81638, 81644, 81702, 81708, 81722, 81734, 81740, 81752, 81774, 81778, 81780, 82050, 82078, 82080, 82108, 82180, 82184, 82192, 82206, 82208, 82236, 82240, 82296, 82316, 82328, 82352, 82366, 82402, 82404, 82408, 82440, 82448, 82462, 82464, 82492, 82496, 82552, 82672, 82694, 82700, 82712, 82736, 82750, 82784, 82812, 82830, 82882, 82884, 82888, 82896, 82918, 82924, 82952, 82960, 82974, 82976, 83004, 83008, 83064, 83184, 83424, 83468, 83480, 83504, 83518, 83552, 83580, 83648, 83704, 83740, 83768, 83824, 83838, 83842, 83844, 83848, 83856, 83872, 83900, 83910, 83916, 83928, 83950, 83984, 84e3, 84028, 84032, 84088, 84208, 84448, 84928, 85040, 85054, 85088, 85116, 85184, 85240, 85488, 85560, 85616, 85630, 85728, 85756, 85764, 85768, 85776, 85790, 85792, 85820, 85824, 85880, 85894, 85900, 85912, 85936, 85966, 85980, 86048, 86080, 86136, 86256, 86496, 86976, 88160, 88188, 88256, 88312, 88560, 89056, 89200, 89214, 89312, 89340, 89536, 89592, 89608, 89616, 89632, 89664, 89720, 89840, 89868, 89880, 89904, 89952, 89980, 89998, 90012, 90040, 90190, 90204, 90254, 90268, 90296, 90306, 90308, 90312, 90334, 90382, 90396, 90424, 90480, 90494, 90500, 90504, 90512, 90526, 90528, 90556, 90566, 90572, 90584, 90610, 90612, 90638, 90652, 90680, 90736, 90750, 90848, 90876, 90884, 90888, 90896, 90910, 90912, 90940, 90944, 91e3, 91014, 91020, 91032, 91056, 91070, 91086, 91100, 91106, 91108, 91112, 91126, 91150, 91164, 91192, 91248, 91262, 91360, 91388, 91584, 91640, 91664, 91678, 91680, 91708, 91712, 91768, 91888, 91928, 91952, 91966, 92e3, 92028, 92046, 92060, 92088, 92098, 92100, 92104, 92112, 92126, 92134, 92140, 92188, 92216, 92272, 92384, 92412, 92608, 92664, 93168, 93200, 93214, 93216, 93244, 93248, 93304, 93424, 93664, 93720, 93744, 93758, 93792, 93820, 93888, 93944, 93980, 94008, 94064, 94078, 94084, 94088, 94096, 94110, 94112, 94140, 94150, 94156, 94168, 94246, 94252, 94278, 94284, 94296, 94318, 94342, 94348, 94360, 94384, 94398, 94414, 94428, 94440, 94470, 94476, 94488, 94512, 94526, 94560, 94588, 94606, 94620, 94648, 94658, 94660, 94664, 94672, 94686, 94694, 94700, 94714, 94726, 94732, 94744, 94768, 94782, 94816, 94844, 94912, 94968, 94990, 95004, 95032, 95088, 95102, 95112, 95120, 95134, 95136, 95164, 95180, 95192, 95214, 95218, 95220, 95244, 95256, 95280, 95294, 95328, 95356, 95424, 95480, 95728, 95758, 95772, 95800, 95856, 95870, 95968, 95996, 96008, 96016, 96030, 96032, 96060, 96064, 96120, 96152, 96176, 96190, 96220, 96226, 96228, 96232, 96290, 96292, 96296, 96310, 96322, 96324, 96328, 96336, 96350, 96358, 96364, 96386, 96388, 96392, 96400, 96414, 96416, 96444, 96454, 96460, 96472, 96494, 96498, 96500, 96514, 96516, 96520, 96528, 96542, 96544, 96572, 96576, 96632, 96646, 96652, 96664, 96688, 96702, 96718, 96732, 96738, 96740, 96744, 96758, 96772, 96776, 96784, 96798, 96800, 96828, 96832, 96888, 97008, 97030, 97036, 97048, 97072, 97086, 97120, 97148, 97166, 97180, 97208, 97220, 97224, 97232, 97246, 97254, 97260, 97326, 97330, 97332, 97358, 97372, 97378, 97380, 97384, 97398, 97422, 97436, 97464, 97474, 97476, 97480, 97488, 97502, 97510, 97516, 97550, 97564, 97592, 97648, 97666, 97668, 97672, 97680, 97694, 97696, 97724, 97734, 97740, 97752, 97774, 97830, 97836, 97850, 97862, 97868, 97880, 97902, 97906, 97908, 97926, 97932, 97944, 97968, 97998, 98012, 98018, 98020, 98024, 98038, 98618, 98674, 98676, 98838, 98854, 98874, 98892, 98904, 98926, 98930, 98932, 98968, 99006, 99042, 99044, 99048, 99062, 99166, 99194, 99246, 99286, 99350, 99366, 99372, 99386, 99398, 99416, 99438, 99442, 99444, 99462, 99504, 99518, 99534, 99548, 99554, 99556, 99560, 99574, 99590, 99596, 99608, 99632, 99646, 99680, 99708, 99726, 99740, 99768, 99778, 99780, 99784, 99792, 99806, 99814, 99820, 99834, 99858, 99860, 99874, 99880, 99894, 99906, 99920, 99934, 99962, 99970, 99972, 99976, 99984, 99998, 1e5, 100028, 100038, 100044, 100056, 100078, 100082, 100084, 100142, 100174, 100188, 100246, 100262, 100268, 100306, 100308, 100390, 100396, 100410, 100422, 100428, 100440, 100462, 100466, 100468, 100486, 100504, 100528, 100542, 100558, 100572, 100578, 100580, 100584, 100598, 100620, 100656, 100670, 100704, 100732, 100750, 100792, 100802, 100808, 100816, 100830, 100838, 100844, 100858, 100888, 100912, 100926, 100960, 100988, 101056, 101112, 101148, 101176, 101232, 101246, 101250, 101252, 101256, 101264, 101278, 101280, 101308, 101318, 101324, 101336, 101358, 101362, 101364, 101410, 101412, 101416, 101430, 101442, 101448, 101456, 101470, 101478, 101498, 101506, 101508, 101520, 101534, 101536, 101564, 101580, 101618, 101620, 101636, 101640, 101648, 101662, 101664, 101692, 101696, 101752, 101766, 101784, 101838, 101858, 101860, 101864, 101934, 101938, 101940, 101966, 101980, 101986, 101988, 101992, 102030, 102044, 102072, 102082, 102084, 102088, 102096, 102138, 102166, 102182, 102188, 102214, 102220, 102232, 102254, 102282, 102290, 102292, 102306, 102308, 102312, 102326, 102444, 102458, 102470, 102476, 102488, 102514, 102516, 102534, 102552, 102576, 102590, 102606, 102620, 102626, 102632, 102646, 102662, 102668, 102704, 102718, 102752, 102780, 102798, 102812, 102840, 102850, 102856, 102864, 102878, 102886, 102892, 102906, 102936, 102974, 103008, 103036, 103104, 103160, 103224, 103280, 103294, 103298, 103300, 103312, 103326, 103328, 103356, 103366, 103372, 103384, 103406, 103410, 103412, 103472, 103486, 103520, 103548, 103616, 103672, 103920, 103992, 104048, 104062, 104160, 104188, 104194, 104196, 104200, 104208, 104224, 104252, 104256, 104312, 104326, 104332, 104344, 104368, 104382, 104398, 104412, 104418, 104420, 104424, 104482, 104484, 104514, 104520, 104528, 104542, 104550, 104570, 104578, 104580, 104592, 104606, 104608, 104636, 104652, 104690, 104692, 104706, 104712, 104734, 104736, 104764, 104768, 104824, 104838, 104856, 104910, 104930, 104932, 104936, 104968, 104976, 104990, 104992, 105020, 105024, 105080, 105200, 105240, 105278, 105312, 105372, 105410, 105412, 105416, 105424, 105446, 105518, 105524, 105550, 105564, 105570, 105572, 105576, 105614, 105628, 105656, 105666, 105672, 105680, 105702, 105722, 105742, 105756, 105784, 105840, 105854, 105858, 105860, 105864, 105872, 105888, 105932, 105970, 105972, 106006, 106022, 106028, 106054, 106060, 106072, 106100, 106118, 106124, 106136, 106160, 106174, 106190, 106210, 106212, 106216, 106250, 106258, 106260, 106274, 106276, 106280, 106306, 106308, 106312, 106320, 106334, 106348, 106394, 106414, 106418, 106420, 106566, 106572, 106610, 106612, 106630, 106636, 106648, 106672, 106686, 106722, 106724, 106728, 106742, 106758, 106764, 106776, 106800, 106814, 106848, 106876, 106894, 106908, 106936, 106946, 106948, 106952, 106960, 106974, 106982, 106988, 107032, 107056, 107070, 107104, 107132, 107200, 107256, 107292, 107320, 107376, 107390, 107394, 107396, 107400, 107408, 107422, 107424, 107452, 107462, 107468, 107480, 107502, 107506, 107508, 107544, 107568, 107582, 107616, 107644, 107712, 107768, 108016, 108060, 108088, 108144, 108158, 108256, 108284, 108290, 108292, 108296, 108304, 108318, 108320, 108348, 108352, 108408, 108422, 108428, 108440, 108464, 108478, 108494, 108508, 108514, 108516, 108520, 108592, 108640, 108668, 108736, 108792, 109040, 109536, 109680, 109694, 109792, 109820, 110016, 110072, 110084, 110088, 110096, 110112, 110140, 110144, 110200, 110320, 110342, 110348, 110360, 110384, 110398, 110432, 110460, 110478, 110492, 110520, 110532, 110536, 110544, 110558, 110658, 110686, 110714, 110722, 110724, 110728, 110736, 110750, 110752, 110780, 110796, 110834, 110836, 110850, 110852, 110856, 110864, 110878, 110880, 110908, 110912, 110968, 110982, 111e3, 111054, 111074, 111076, 111080, 111108, 111112, 111120, 111134, 111136, 111164, 111168, 111224, 111344, 111372, 111422, 111456, 111516, 111554, 111556, 111560, 111568, 111590, 111632, 111646, 111648, 111676, 111680, 111736, 111856, 112096, 112152, 112224, 112252, 112320, 112440, 112514, 112516, 112520, 112528, 112542, 112544, 112588, 112686, 112718, 112732, 112782, 112796, 112824, 112834, 112836, 112840, 112848, 112870, 112890, 112910, 112924, 112952, 113008, 113022, 113026, 113028, 113032, 113040, 113054, 113056, 113100, 113138, 113140, 113166, 113180, 113208, 113264, 113278, 113376, 113404, 113416, 113424, 113440, 113468, 113472, 113560, 113614, 113634, 113636, 113640, 113686, 113702, 113708, 113734, 113740, 113752, 113778, 113780, 113798, 113804, 113816, 113840, 113854, 113870, 113890, 113892, 113896, 113926, 113932, 113944, 113968, 113982, 114016, 114044, 114076, 114114, 114116, 114120, 114128, 114150, 114170, 114194, 114196, 114210, 114212, 114216, 114242, 114244, 114248, 114256, 114270, 114278, 114306, 114308, 114312, 114320, 114334, 114336, 114364, 114380, 114420, 114458, 114478, 114482, 114484, 114510, 114524, 114530, 114532, 114536, 114842, 114866, 114868, 114970, 114994, 114996, 115042, 115044, 115048, 115062, 115130, 115226, 115250, 115252, 115278, 115292, 115298, 115300, 115304, 115318, 115342, 115394, 115396, 115400, 115408, 115422, 115430, 115436, 115450, 115478, 115494, 115514, 115526, 115532, 115570, 115572, 115738, 115758, 115762, 115764, 115790, 115804, 115810, 115812, 115816, 115830, 115854, 115868, 115896, 115906, 115912, 115920, 115934, 115942, 115948, 115962, 115996, 116024, 116080, 116094, 116098, 116100, 116104, 116112, 116126, 116128, 116156, 116166, 116172, 116184, 116206, 116210, 116212, 116246, 116262, 116268, 116282, 116294, 116300, 116312, 116334, 116338, 116340, 116358, 116364, 116376, 116400, 116414, 116430, 116444, 116450, 116452, 116456, 116498, 116500, 116514, 116520, 116534, 116546, 116548, 116552, 116560, 116574, 116582, 116588, 116602, 116654, 116694, 116714, 116762, 116782, 116786, 116788, 116814, 116828, 116834, 116836, 116840, 116854, 116878, 116892, 116920, 116930, 116936, 116944, 116958, 116966, 116972, 116986, 117006, 117048, 117104, 117118, 117122, 117124, 117136, 117150, 117152, 117180, 117190, 117196, 117208, 117230, 117234, 117236, 117304, 117360, 117374, 117472, 117500, 117506, 117508, 117512, 117520, 117536, 117564, 117568, 117624, 117638, 117644, 117656, 117680, 117694, 117710, 117724, 117730, 117732, 117736, 117750, 117782, 117798, 117804, 117818, 117830, 117848, 117874, 117876, 117894, 117936, 117950, 117966, 117986, 117988, 117992, 118022, 118028, 118040, 118064, 118078, 118112, 118140, 118172, 118210, 118212, 118216, 118224, 118238, 118246, 118266, 118306, 118312, 118338, 118352, 118366, 118374, 118394, 118402, 118404, 118408, 118416, 118430, 118432, 118460, 118476, 118514, 118516, 118574, 118578, 118580, 118606, 118620, 118626, 118628, 118632, 118678, 118694, 118700, 118730, 118738, 118740, 118830, 118834, 118836, 118862, 118876, 118882, 118884, 118888, 118902, 118926, 118940, 118968, 118978, 118980, 118984, 118992, 119006, 119014, 119020, 119034, 119068, 119096, 119152, 119166, 119170, 119172, 119176, 119184, 119198, 119200, 119228, 119238, 119244, 119256, 119278, 119282, 119284, 119324, 119352, 119408, 119422, 119520, 119548, 119554, 119556, 119560, 119568, 119582, 119584, 119612, 119616, 119672, 119686, 119692, 119704, 119728, 119742, 119758, 119772, 119778, 119780, 119784, 119798, 119920, 119934, 120032, 120060, 120256, 120312, 120324, 120328, 120336, 120352, 120384, 120440, 120560, 120582, 120588, 120600, 120624, 120638, 120672, 120700, 120718, 120732, 120760, 120770, 120772, 120776, 120784, 120798, 120806, 120812, 120870, 120876, 120890, 120902, 120908, 120920, 120946, 120948, 120966, 120972, 120984, 121008, 121022, 121038, 121058, 121060, 121064, 121078, 121100, 121112, 121136, 121150, 121184, 121212, 121244, 121282, 121284, 121288, 121296, 121318, 121338, 121356, 121368, 121392, 121406, 121440, 121468, 121536, 121592, 121656, 121730, 121732, 121736, 121744, 121758, 121760, 121804, 121842, 121844, 121890, 121922, 121924, 121928, 121936, 121950, 121958, 121978, 121986, 121988, 121992, 122e3, 122014, 122016, 122044, 122060, 122098, 122100, 122116, 122120, 122128, 122142, 122144, 122172, 122176, 122232, 122246, 122264, 122318, 122338, 122340, 122344, 122414, 122418, 122420, 122446, 122460, 122466, 122468, 122472, 122510, 122524, 122552, 122562, 122564, 122568, 122576, 122598, 122618, 122646, 122662, 122668, 122694, 122700, 122712, 122738, 122740, 122762, 122770, 122772, 122786, 122788, 122792, 123018, 123026, 123028, 123042, 123044, 123048, 123062, 123098, 123146, 123154, 123156, 123170, 123172, 123176, 123190, 123202, 123204, 123208, 123216, 123238, 123244, 123258, 123290, 123314, 123316, 123402, 123410, 123412, 123426, 123428, 123432, 123446, 123458, 123464, 123472, 123486, 123494, 123500, 123514, 123522, 123524, 123528, 123536, 123552, 123580, 123590, 123596, 123608, 123630, 123634, 123636, 123674, 123698, 123700, 123740, 123746, 123748, 123752, 123834, 123914, 123922, 123924, 123938, 123944, 123958, 123970, 123976, 123984, 123998, 124006, 124012, 124026, 124034, 124036, 124048, 124062, 124064, 124092, 124102, 124108, 124120, 124142, 124146, 124148, 124162, 124164, 124168, 124176, 124190, 124192, 124220, 124224, 124280, 124294, 124300, 124312, 124336, 124350, 124366, 124380, 124386, 124388, 124392, 124406, 124442, 124462, 124466, 124468, 124494, 124508, 124514, 124520, 124558, 124572, 124600, 124610, 124612, 124616, 124624, 124646, 124666, 124694, 124710, 124716, 124730, 124742, 124748, 124760, 124786, 124788, 124818, 124820, 124834, 124836, 124840, 124854, 124946, 124948, 124962, 124964, 124968, 124982, 124994, 124996, 125e3, 125008, 125022, 125030, 125036, 125050, 125058, 125060, 125064, 125072, 125086, 125088, 125116, 125126, 125132, 125144, 125166, 125170, 125172, 125186, 125188, 125192, 125200, 125216, 125244, 125248, 125304, 125318, 125324, 125336, 125360, 125374, 125390, 125404, 125410, 125412, 125416, 125430, 125444, 125448, 125456, 125472, 125504, 125560, 125680, 125702, 125708, 125720, 125744, 125758, 125792, 125820, 125838, 125852, 125880, 125890, 125892, 125896, 125904, 125918, 125926, 125932, 125978, 125998, 126002, 126004, 126030, 126044, 126050, 126052, 126056, 126094, 126108, 126136, 126146, 126148, 126152, 126160, 126182, 126202, 126222, 126236, 126264, 126320, 126334, 126338, 126340, 126344, 126352, 126366, 126368, 126412, 126450, 126452, 126486, 126502, 126508, 126522, 126534, 126540, 126552, 126574, 126578, 126580, 126598, 126604, 126616, 126640, 126654, 126670, 126684, 126690, 126692, 126696, 126738, 126754, 126756, 126760, 126774, 126786, 126788, 126792, 126800, 126814, 126822, 126828, 126842, 126894, 126898, 126900, 126934, 127126, 127142, 127148, 127162, 127178, 127186, 127188, 127254, 127270, 127276, 127290, 127302, 127308, 127320, 127342, 127346, 127348, 127370, 127378, 127380, 127394, 127396, 127400, 127450, 127510, 127526, 127532, 127546, 127558, 127576, 127598, 127602, 127604, 127622, 127628, 127640, 127664, 127678, 127694, 127708, 127714, 127716, 127720, 127734, 127754, 127762, 127764, 127778, 127784, 127810, 127812, 127816, 127824, 127838, 127846, 127866, 127898, 127918, 127922, 127924, 128022, 128038, 128044, 128058, 128070, 128076, 128088, 128110, 128114, 128116, 128134, 128140, 128152, 128176, 128190, 128206, 128220, 128226, 128228, 128232, 128246, 128262, 128268, 128280, 128304, 128318, 128352, 128380, 128398, 128412, 128440, 128450, 128452, 128456, 128464, 128478, 128486, 128492, 128506, 128522, 128530, 128532, 128546, 128548, 128552, 128566, 128578, 128580, 128584, 128592, 128606, 128614, 128634, 128642, 128644, 128648, 128656, 128670, 128672, 128700, 128716, 128754, 128756, 128794, 128814, 128818, 128820, 128846, 128860, 128866, 128868, 128872, 128886, 128918, 128934, 128940, 128954, 128978, 128980, 129178, 129198, 129202, 129204, 129238, 129258, 129306, 129326, 129330, 129332, 129358, 129372, 129378, 129380, 129384, 129398, 129430, 129446, 129452, 129466, 129482, 129490, 129492, 129562, 129582, 129586, 129588, 129614, 129628, 129634, 129636, 129640, 129654, 129678, 129692, 129720, 129730, 129732, 129736, 129744, 129758, 129766, 129772, 129814, 129830, 129836, 129850, 129862, 129868, 129880, 129902, 129906, 129908, 129930, 129938, 129940, 129954, 129956, 129960, 129974, 130010]), u.CODEWORD_TABLE = Int32Array.from([2627, 1819, 2622, 2621, 1813, 1812, 2729, 2724, 2723, 2779, 2774, 2773, 902, 896, 908, 868, 865, 861, 859, 2511, 873, 871, 1780, 835, 2493, 825, 2491, 842, 837, 844, 1764, 1762, 811, 810, 809, 2483, 807, 2482, 806, 2480, 815, 814, 813, 812, 2484, 817, 816, 1745, 1744, 1742, 1746, 2655, 2637, 2635, 2626, 2625, 2623, 2628, 1820, 2752, 2739, 2737, 2728, 2727, 2725, 2730, 2785, 2783, 2778, 2777, 2775, 2780, 787, 781, 747, 739, 736, 2413, 754, 752, 1719, 692, 689, 681, 2371, 678, 2369, 700, 697, 694, 703, 1688, 1686, 642, 638, 2343, 631, 2341, 627, 2338, 651, 646, 643, 2345, 654, 652, 1652, 1650, 1647, 1654, 601, 599, 2322, 596, 2321, 594, 2319, 2317, 611, 610, 608, 606, 2324, 603, 2323, 615, 614, 612, 1617, 1616, 1614, 1612, 616, 1619, 1618, 2575, 2538, 2536, 905, 901, 898, 909, 2509, 2507, 2504, 870, 867, 864, 860, 2512, 875, 872, 1781, 2490, 2489, 2487, 2485, 1748, 836, 834, 832, 830, 2494, 827, 2492, 843, 841, 839, 845, 1765, 1763, 2701, 2676, 2674, 2653, 2648, 2656, 2634, 2633, 2631, 2629, 1821, 2638, 2636, 2770, 2763, 2761, 2750, 2745, 2753, 2736, 2735, 2733, 2731, 1848, 2740, 2738, 2786, 2784, 591, 588, 576, 569, 566, 2296, 1590, 537, 534, 526, 2276, 522, 2274, 545, 542, 539, 548, 1572, 1570, 481, 2245, 466, 2242, 462, 2239, 492, 485, 482, 2249, 496, 494, 1534, 1531, 1528, 1538, 413, 2196, 406, 2191, 2188, 425, 419, 2202, 415, 2199, 432, 430, 427, 1472, 1467, 1464, 433, 1476, 1474, 368, 367, 2160, 365, 2159, 362, 2157, 2155, 2152, 378, 377, 375, 2166, 372, 2165, 369, 2162, 383, 381, 379, 2168, 1419, 1418, 1416, 1414, 385, 1411, 384, 1423, 1422, 1420, 1424, 2461, 802, 2441, 2439, 790, 786, 783, 794, 2409, 2406, 2403, 750, 742, 738, 2414, 756, 753, 1720, 2367, 2365, 2362, 2359, 1663, 693, 691, 684, 2373, 680, 2370, 702, 699, 696, 704, 1690, 1687, 2337, 2336, 2334, 2332, 1624, 2329, 1622, 640, 637, 2344, 634, 2342, 630, 2340, 650, 648, 645, 2346, 655, 653, 1653, 1651, 1649, 1655, 2612, 2597, 2595, 2571, 2568, 2565, 2576, 2534, 2529, 2526, 1787, 2540, 2537, 907, 904, 900, 910, 2503, 2502, 2500, 2498, 1768, 2495, 1767, 2510, 2508, 2506, 869, 866, 863, 2513, 876, 874, 1782, 2720, 2713, 2711, 2697, 2694, 2691, 2702, 2672, 2670, 2664, 1828, 2678, 2675, 2647, 2646, 2644, 2642, 1823, 2639, 1822, 2654, 2652, 2650, 2657, 2771, 1855, 2765, 2762, 1850, 1849, 2751, 2749, 2747, 2754, 353, 2148, 344, 342, 336, 2142, 332, 2140, 345, 1375, 1373, 306, 2130, 299, 2128, 295, 2125, 319, 314, 311, 2132, 1354, 1352, 1349, 1356, 262, 257, 2101, 253, 2096, 2093, 274, 273, 267, 2107, 263, 2104, 280, 278, 275, 1316, 1311, 1308, 1320, 1318, 2052, 202, 2050, 2044, 2040, 219, 2063, 212, 2060, 208, 2055, 224, 221, 2066, 1260, 1258, 1252, 231, 1248, 229, 1266, 1264, 1261, 1268, 155, 1998, 153, 1996, 1994, 1991, 1988, 165, 164, 2007, 162, 2006, 159, 2003, 2e3, 172, 171, 169, 2012, 166, 2010, 1186, 1184, 1182, 1179, 175, 1176, 173, 1192, 1191, 1189, 1187, 176, 1194, 1193, 2313, 2307, 2305, 592, 589, 2294, 2292, 2289, 578, 572, 568, 2297, 580, 1591, 2272, 2267, 2264, 1547, 538, 536, 529, 2278, 525, 2275, 547, 544, 541, 1574, 1571, 2237, 2235, 2229, 1493, 2225, 1489, 478, 2247, 470, 2244, 465, 2241, 493, 488, 484, 2250, 498, 495, 1536, 1533, 1530, 1539, 2187, 2186, 2184, 2182, 1432, 2179, 1430, 2176, 1427, 414, 412, 2197, 409, 2195, 405, 2193, 2190, 426, 424, 421, 2203, 418, 2201, 431, 429, 1473, 1471, 1469, 1466, 434, 1477, 1475, 2478, 2472, 2470, 2459, 2457, 2454, 2462, 803, 2437, 2432, 2429, 1726, 2443, 2440, 792, 789, 785, 2401, 2399, 2393, 1702, 2389, 1699, 2411, 2408, 2405, 745, 741, 2415, 758, 755, 1721, 2358, 2357, 2355, 2353, 1661, 2350, 1660, 2347, 1657, 2368, 2366, 2364, 2361, 1666, 690, 687, 2374, 683, 2372, 701, 698, 705, 1691, 1689, 2619, 2617, 2610, 2608, 2605, 2613, 2593, 2588, 2585, 1803, 2599, 2596, 2563, 2561, 2555, 1797, 2551, 1795, 2573, 2570, 2567, 2577, 2525, 2524, 2522, 2520, 1786, 2517, 1785, 2514, 1783, 2535, 2533, 2531, 2528, 1788, 2541, 2539, 906, 903, 911, 2721, 1844, 2715, 2712, 1838, 1836, 2699, 2696, 2693, 2703, 1827, 1826, 1824, 2673, 2671, 2669, 2666, 1829, 2679, 2677, 1858, 1857, 2772, 1854, 1853, 1851, 1856, 2766, 2764, 143, 1987, 139, 1986, 135, 133, 131, 1984, 128, 1983, 125, 1981, 138, 137, 136, 1985, 1133, 1132, 1130, 112, 110, 1974, 107, 1973, 104, 1971, 1969, 122, 121, 119, 117, 1977, 114, 1976, 124, 1115, 1114, 1112, 1110, 1117, 1116, 84, 83, 1953, 81, 1952, 78, 1950, 1948, 1945, 94, 93, 91, 1959, 88, 1958, 85, 1955, 99, 97, 95, 1961, 1086, 1085, 1083, 1081, 1078, 100, 1090, 1089, 1087, 1091, 49, 47, 1917, 44, 1915, 1913, 1910, 1907, 59, 1926, 56, 1925, 53, 1922, 1919, 66, 64, 1931, 61, 1929, 1042, 1040, 1038, 71, 1035, 70, 1032, 68, 1048, 1047, 1045, 1043, 1050, 1049, 12, 10, 1869, 1867, 1864, 1861, 21, 1880, 19, 1877, 1874, 1871, 28, 1888, 25, 1886, 22, 1883, 982, 980, 977, 974, 32, 30, 991, 989, 987, 984, 34, 995, 994, 992, 2151, 2150, 2147, 2146, 2144, 356, 355, 354, 2149, 2139, 2138, 2136, 2134, 1359, 343, 341, 338, 2143, 335, 2141, 348, 347, 346, 1376, 1374, 2124, 2123, 2121, 2119, 1326, 2116, 1324, 310, 308, 305, 2131, 302, 2129, 298, 2127, 320, 318, 316, 313, 2133, 322, 321, 1355, 1353, 1351, 1357, 2092, 2091, 2089, 2087, 1276, 2084, 1274, 2081, 1271, 259, 2102, 256, 2100, 252, 2098, 2095, 272, 269, 2108, 266, 2106, 281, 279, 277, 1317, 1315, 1313, 1310, 282, 1321, 1319, 2039, 2037, 2035, 2032, 1203, 2029, 1200, 1197, 207, 2053, 205, 2051, 201, 2049, 2046, 2043, 220, 218, 2064, 215, 2062, 211, 2059, 228, 226, 223, 2069, 1259, 1257, 1254, 232, 1251, 230, 1267, 1265, 1263, 2316, 2315, 2312, 2311, 2309, 2314, 2304, 2303, 2301, 2299, 1593, 2308, 2306, 590, 2288, 2287, 2285, 2283, 1578, 2280, 1577, 2295, 2293, 2291, 579, 577, 574, 571, 2298, 582, 581, 1592, 2263, 2262, 2260, 2258, 1545, 2255, 1544, 2252, 1541, 2273, 2271, 2269, 2266, 1550, 535, 532, 2279, 528, 2277, 546, 543, 549, 1575, 1573, 2224, 2222, 2220, 1486, 2217, 1485, 2214, 1482, 1479, 2238, 2236, 2234, 2231, 1496, 2228, 1492, 480, 477, 2248, 473, 2246, 469, 2243, 490, 487, 2251, 497, 1537, 1535, 1532, 2477, 2476, 2474, 2479, 2469, 2468, 2466, 2464, 1730, 2473, 2471, 2453, 2452, 2450, 2448, 1729, 2445, 1728, 2460, 2458, 2456, 2463, 805, 804, 2428, 2427, 2425, 2423, 1725, 2420, 1724, 2417, 1722, 2438, 2436, 2434, 2431, 1727, 2444, 2442, 793, 791, 788, 795, 2388, 2386, 2384, 1697, 2381, 1696, 2378, 1694, 1692, 2402, 2400, 2398, 2395, 1703, 2392, 1701, 2412, 2410, 2407, 751, 748, 744, 2416, 759, 757, 1807, 2620, 2618, 1806, 1805, 2611, 2609, 2607, 2614, 1802, 1801, 1799, 2594, 2592, 2590, 2587, 1804, 2600, 2598, 1794, 1793, 1791, 1789, 2564, 2562, 2560, 2557, 1798, 2554, 1796, 2574, 2572, 2569, 2578, 1847, 1846, 2722, 1843, 1842, 1840, 1845, 2716, 2714, 1835, 1834, 1832, 1830, 1839, 1837, 2700, 2698, 2695, 2704, 1817, 1811, 1810, 897, 862, 1777, 829, 826, 838, 1760, 1758, 808, 2481, 1741, 1740, 1738, 1743, 2624, 1818, 2726, 2776, 782, 740, 737, 1715, 686, 679, 695, 1682, 1680, 639, 628, 2339, 647, 644, 1645, 1643, 1640, 1648, 602, 600, 597, 595, 2320, 593, 2318, 609, 607, 604, 1611, 1610, 1608, 1606, 613, 1615, 1613, 2328, 926, 924, 892, 886, 899, 857, 850, 2505, 1778, 824, 823, 821, 819, 2488, 818, 2486, 833, 831, 828, 840, 1761, 1759, 2649, 2632, 2630, 2746, 2734, 2732, 2782, 2781, 570, 567, 1587, 531, 527, 523, 540, 1566, 1564, 476, 467, 463, 2240, 486, 483, 1524, 1521, 1518, 1529, 411, 403, 2192, 399, 2189, 423, 416, 1462, 1457, 1454, 428, 1468, 1465, 2210, 366, 363, 2158, 360, 2156, 357, 2153, 376, 373, 370, 2163, 1410, 1409, 1407, 1405, 382, 1402, 380, 1417, 1415, 1412, 1421, 2175, 2174, 777, 774, 771, 784, 732, 725, 722, 2404, 743, 1716, 676, 674, 668, 2363, 665, 2360, 685, 1684, 1681, 626, 624, 622, 2335, 620, 2333, 617, 2330, 641, 635, 649, 1646, 1644, 1642, 2566, 928, 925, 2530, 2527, 894, 891, 888, 2501, 2499, 2496, 858, 856, 854, 851, 1779, 2692, 2668, 2665, 2645, 2643, 2640, 2651, 2768, 2759, 2757, 2744, 2743, 2741, 2748, 352, 1382, 340, 337, 333, 1371, 1369, 307, 300, 296, 2126, 315, 312, 1347, 1342, 1350, 261, 258, 250, 2097, 246, 2094, 271, 268, 264, 1306, 1301, 1298, 276, 1312, 1309, 2115, 203, 2048, 195, 2045, 191, 2041, 213, 209, 2056, 1246, 1244, 1238, 225, 1234, 222, 1256, 1253, 1249, 1262, 2080, 2079, 154, 1997, 150, 1995, 147, 1992, 1989, 163, 160, 2004, 156, 2001, 1175, 1174, 1172, 1170, 1167, 170, 1164, 167, 1185, 1183, 1180, 1177, 174, 1190, 1188, 2025, 2024, 2022, 587, 586, 564, 559, 556, 2290, 573, 1588, 520, 518, 512, 2268, 508, 2265, 530, 1568, 1565, 461, 457, 2233, 450, 2230, 446, 2226, 479, 471, 489, 1526, 1523, 1520, 397, 395, 2185, 392, 2183, 389, 2180, 2177, 410, 2194, 402, 422, 1463, 1461, 1459, 1456, 1470, 2455, 799, 2433, 2430, 779, 776, 773, 2397, 2394, 2390, 734, 728, 724, 746, 1717, 2356, 2354, 2351, 2348, 1658, 677, 675, 673, 670, 667, 688, 1685, 1683, 2606, 2589, 2586, 2559, 2556, 2552, 927, 2523, 2521, 2518, 2515, 1784, 2532, 895, 893, 890, 2718, 2709, 2707, 2689, 2687, 2684, 2663, 2662, 2660, 2658, 1825, 2667, 2769, 1852, 2760, 2758, 142, 141, 1139, 1138, 134, 132, 129, 126, 1982, 1129, 1128, 1126, 1131, 113, 111, 108, 105, 1972, 101, 1970, 120, 118, 115, 1109, 1108, 1106, 1104, 123, 1113, 1111, 82, 79, 1951, 75, 1949, 72, 1946, 92, 89, 86, 1956, 1077, 1076, 1074, 1072, 98, 1069, 96, 1084, 1082, 1079, 1088, 1968, 1967, 48, 45, 1916, 42, 1914, 39, 1911, 1908, 60, 57, 54, 1923, 50, 1920, 1031, 1030, 1028, 1026, 67, 1023, 65, 1020, 62, 1041, 1039, 1036, 1033, 69, 1046, 1044, 1944, 1943, 1941, 11, 9, 1868, 7, 1865, 1862, 1859, 20, 1878, 16, 1875, 13, 1872, 970, 968, 966, 963, 29, 960, 26, 23, 983, 981, 978, 975, 33, 971, 31, 990, 988, 985, 1906, 1904, 1902, 993, 351, 2145, 1383, 331, 330, 328, 326, 2137, 323, 2135, 339, 1372, 1370, 294, 293, 291, 289, 2122, 286, 2120, 283, 2117, 309, 303, 317, 1348, 1346, 1344, 245, 244, 242, 2090, 239, 2088, 236, 2085, 2082, 260, 2099, 249, 270, 1307, 1305, 1303, 1300, 1314, 189, 2038, 186, 2036, 183, 2033, 2030, 2026, 206, 198, 2047, 194, 216, 1247, 1245, 1243, 1240, 227, 1237, 1255, 2310, 2302, 2300, 2286, 2284, 2281, 565, 563, 561, 558, 575, 1589, 2261, 2259, 2256, 2253, 1542, 521, 519, 517, 514, 2270, 511, 533, 1569, 1567, 2223, 2221, 2218, 2215, 1483, 2211, 1480, 459, 456, 453, 2232, 449, 474, 491, 1527, 1525, 1522, 2475, 2467, 2465, 2451, 2449, 2446, 801, 800, 2426, 2424, 2421, 2418, 1723, 2435, 780, 778, 775, 2387, 2385, 2382, 2379, 1695, 2375, 1693, 2396, 735, 733, 730, 727, 749, 1718, 2616, 2615, 2604, 2603, 2601, 2584, 2583, 2581, 2579, 1800, 2591, 2550, 2549, 2547, 2545, 1792, 2542, 1790, 2558, 929, 2719, 1841, 2710, 2708, 1833, 1831, 2690, 2688, 2686, 1815, 1809, 1808, 1774, 1756, 1754, 1737, 1736, 1734, 1739, 1816, 1711, 1676, 1674, 633, 629, 1638, 1636, 1633, 1641, 598, 1605, 1604, 1602, 1600, 605, 1609, 1607, 2327, 887, 853, 1775, 822, 820, 1757, 1755, 1584, 524, 1560, 1558, 468, 464, 1514, 1511, 1508, 1519, 408, 404, 400, 1452, 1447, 1444, 417, 1458, 1455, 2208, 364, 361, 358, 2154, 1401, 1400, 1398, 1396, 374, 1393, 371, 1408, 1406, 1403, 1413, 2173, 2172, 772, 726, 723, 1712, 672, 669, 666, 682, 1678, 1675, 625, 623, 621, 618, 2331, 636, 632, 1639, 1637, 1635, 920, 918, 884, 880, 889, 849, 848, 847, 846, 2497, 855, 852, 1776, 2641, 2742, 2787, 1380, 334, 1367, 1365, 301, 297, 1340, 1338, 1335, 1343, 255, 251, 247, 1296, 1291, 1288, 265, 1302, 1299, 2113, 204, 196, 192, 2042, 1232, 1230, 1224, 214, 1220, 210, 1242, 1239, 1235, 1250, 2077, 2075, 151, 148, 1993, 144, 1990, 1163, 1162, 1160, 1158, 1155, 161, 1152, 157, 1173, 1171, 1168, 1165, 168, 1181, 1178, 2021, 2020, 2018, 2023, 585, 560, 557, 1585, 516, 509, 1562, 1559, 458, 447, 2227, 472, 1516, 1513, 1510, 398, 396, 393, 390, 2181, 386, 2178, 407, 1453, 1451, 1449, 1446, 420, 1460, 2209, 769, 764, 720, 712, 2391, 729, 1713, 664, 663, 661, 659, 2352, 656, 2349, 671, 1679, 1677, 2553, 922, 919, 2519, 2516, 885, 883, 881, 2685, 2661, 2659, 2767, 2756, 2755, 140, 1137, 1136, 130, 127, 1125, 1124, 1122, 1127, 109, 106, 102, 1103, 1102, 1100, 1098, 116, 1107, 1105, 1980, 80, 76, 73, 1947, 1068, 1067, 1065, 1063, 90, 1060, 87, 1075, 1073, 1070, 1080, 1966, 1965, 46, 43, 40, 1912, 36, 1909, 1019, 1018, 1016, 1014, 58, 1011, 55, 1008, 51, 1029, 1027, 1024, 1021, 63, 1037, 1034, 1940, 1939, 1937, 1942, 8, 1866, 4, 1863, 1, 1860, 956, 954, 952, 949, 946, 17, 14, 969, 967, 964, 961, 27, 957, 24, 979, 976, 972, 1901, 1900, 1898, 1896, 986, 1905, 1903, 350, 349, 1381, 329, 327, 324, 1368, 1366, 292, 290, 287, 284, 2118, 304, 1341, 1339, 1337, 1345, 243, 240, 237, 2086, 233, 2083, 254, 1297, 1295, 1293, 1290, 1304, 2114, 190, 187, 184, 2034, 180, 2031, 177, 2027, 199, 1233, 1231, 1229, 1226, 217, 1223, 1241, 2078, 2076, 584, 555, 554, 552, 550, 2282, 562, 1586, 507, 506, 504, 502, 2257, 499, 2254, 515, 1563, 1561, 445, 443, 441, 2219, 438, 2216, 435, 2212, 460, 454, 475, 1517, 1515, 1512, 2447, 798, 797, 2422, 2419, 770, 768, 766, 2383, 2380, 2376, 721, 719, 717, 714, 731, 1714, 2602, 2582, 2580, 2548, 2546, 2543, 923, 921, 2717, 2706, 2705, 2683, 2682, 2680, 1771, 1752, 1750, 1733, 1732, 1731, 1735, 1814, 1707, 1670, 1668, 1631, 1629, 1626, 1634, 1599, 1598, 1596, 1594, 1603, 1601, 2326, 1772, 1753, 1751, 1581, 1554, 1552, 1504, 1501, 1498, 1509, 1442, 1437, 1434, 401, 1448, 1445, 2206, 1392, 1391, 1389, 1387, 1384, 359, 1399, 1397, 1394, 1404, 2171, 2170, 1708, 1672, 1669, 619, 1632, 1630, 1628, 1773, 1378, 1363, 1361, 1333, 1328, 1336, 1286, 1281, 1278, 248, 1292, 1289, 2111, 1218, 1216, 1210, 197, 1206, 193, 1228, 1225, 1221, 1236, 2073, 2071, 1151, 1150, 1148, 1146, 152, 1143, 149, 1140, 145, 1161, 1159, 1156, 1153, 158, 1169, 1166, 2017, 2016, 2014, 2019, 1582, 510, 1556, 1553, 452, 448, 1506, 1500, 394, 391, 387, 1443, 1441, 1439, 1436, 1450, 2207, 765, 716, 713, 1709, 662, 660, 657, 1673, 1671, 916, 914, 879, 878, 877, 882, 1135, 1134, 1121, 1120, 1118, 1123, 1097, 1096, 1094, 1092, 103, 1101, 1099, 1979, 1059, 1058, 1056, 1054, 77, 1051, 74, 1066, 1064, 1061, 1071, 1964, 1963, 1007, 1006, 1004, 1002, 999, 41, 996, 37, 1017, 1015, 1012, 1009, 52, 1025, 1022, 1936, 1935, 1933, 1938, 942, 940, 938, 935, 932, 5, 2, 955, 953, 950, 947, 18, 943, 15, 965, 962, 958, 1895, 1894, 1892, 1890, 973, 1899, 1897, 1379, 325, 1364, 1362, 288, 285, 1334, 1332, 1330, 241, 238, 234, 1287, 1285, 1283, 1280, 1294, 2112, 188, 185, 181, 178, 2028, 1219, 1217, 1215, 1212, 200, 1209, 1227, 2074, 2072, 583, 553, 551, 1583, 505, 503, 500, 513, 1557, 1555, 444, 442, 439, 436, 2213, 455, 451, 1507, 1505, 1502, 796, 763, 762, 760, 767, 711, 710, 708, 706, 2377, 718, 715, 1710, 2544, 917, 915, 2681, 1627, 1597, 1595, 2325, 1769, 1749, 1747, 1499, 1438, 1435, 2204, 1390, 1388, 1385, 1395, 2169, 2167, 1704, 1665, 1662, 1625, 1623, 1620, 1770, 1329, 1282, 1279, 2109, 1214, 1207, 1222, 2068, 2065, 1149, 1147, 1144, 1141, 146, 1157, 1154, 2013, 2011, 2008, 2015, 1579, 1549, 1546, 1495, 1487, 1433, 1431, 1428, 1425, 388, 1440, 2205, 1705, 658, 1667, 1664, 1119, 1095, 1093, 1978, 1057, 1055, 1052, 1062, 1962, 1960, 1005, 1003, 1e3, 997, 38, 1013, 1010, 1932, 1930, 1927, 1934, 941, 939, 936, 933, 6, 930, 3, 951, 948, 944, 1889, 1887, 1884, 1881, 959, 1893, 1891, 35, 1377, 1360, 1358, 1327, 1325, 1322, 1331, 1277, 1275, 1272, 1269, 235, 1284, 2110, 1205, 1204, 1201, 1198, 182, 1195, 179, 1213, 2070, 2067, 1580, 501, 1551, 1548, 440, 437, 1497, 1494, 1490, 1503, 761, 709, 707, 1706, 913, 912, 2198, 1386, 2164, 2161, 1621, 1766, 2103, 1208, 2058, 2054, 1145, 1142, 2005, 2002, 1999, 2009, 1488, 1429, 1426, 2200, 1698, 1659, 1656, 1975, 1053, 1957, 1954, 1001, 998, 1924, 1921, 1918, 1928, 937, 934, 931, 1879, 1876, 1873, 1870, 945, 1885, 1882, 1323, 1273, 1270, 2105, 1202, 1199, 1196, 1211, 2061, 2057, 1576, 1543, 1540, 1484, 1481, 1478, 1491, 1700]), u); function u() { } e.default = a }, function (t, e, r) { "use strict"; var n = this && this.__awaiter || function (t, e, r, n) { return new (r = r || Promise)(function (o, i) { function a(t) { try { s(n.next(t)) } catch (t) { i(t) } } function u(t) { try { s(n.throw(t)) } catch (t) { i(t) } } function s(t) { t.done ? o(t.value) : new r(function (e) { e(t.value) }).then(a, u) } s((n = n.apply(t, e || [])).next()) }) }, o = this && this.__generator || function (t, e) { var r, n, o, i, a = { label: 0, sent: function () { if (1 & o[0]) throw o[1]; return o[1] }, trys: [], ops: [] }; return i = { next: u(0), throw: u(1), return: u(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function () { return this }), i; function u(i) { return function (u) { return function (i) { if (r) throw new TypeError("Generator is already executing."); for (; a;)try { if (r = 1, n && (o = 2 & i[0] ? n.return : i[0] ? n.throw || ((o = n.return) && o.call(n), 0) : n.next) && !(o = o.call(n, i[1])).done) return o; switch (n = 0, o && (i = [2 & i[0], o.value]), i[0]) { case 0: case 1: o = i; break; case 4: return a.label++, { value: i[1], done: !1 }; case 5: a.label++, n = i[1], i = [0]; continue; case 7: i = a.ops.pop(), a.trys.pop(); continue; default: if (!(o = 0 < (o = a.trys).length && o[o.length - 1]) && (6 === i[0] || 2 === i[0])) { a = 0; continue } if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) { a.label = i[1]; break } if (6 === i[0] && a.label < o[1]) { a.label = o[1], o = i; break } if (o && a.label < o[2]) { a.label = o[2], a.ops.push(i); break } o[2] && a.ops.pop(), a.trys.pop(); continue }i = e.call(t, a) } catch (t) { i = [6, t], n = 0 } finally { r = o = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, u]) } } }, i = this && this.__values || function (t) { var e = "function" == typeof Symbol && t[Symbol.iterator], r = 0; return e ? e.call(t) : { next: function () { return t && r >= t.length && (t = void 0), { value: t && t[r++], done: !t } } } }; Object.defineProperty(e, "__esModule", { value: !0 }); var a = r(32), u = r(52), s = r(11), f = r(53), l = r(2), d = r(0), c = r(56), h = r(57), p = (Object.defineProperty(_.prototype, "hasNavigator", { get: function () { return "undefined" != typeof navigator }, enumerable: !0, configurable: !0 }), Object.defineProperty(_.prototype, "isMediaDevicesSuported", { get: function () { return this.hasNavigator && !!navigator.mediaDevices }, enumerable: !0, configurable: !0 }), Object.defineProperty(_.prototype, "canEnumerateDevices", { get: function () { return !(!this.isMediaDevicesSuported || !navigator.mediaDevices.enumerateDevices) }, enumerable: !0, configurable: !0 }), Object.defineProperty(_.prototype, "timeBetweenDecodingAttempts", { get: function () { return this._timeBetweenDecodingAttempts }, set: function (t) { this._timeBetweenDecodingAttempts = t < 0 ? 0 : t }, enumerable: !0, configurable: !0 }), Object.defineProperty(_.prototype, "hints", { get: function () { return this._hints }, set: function (t) { this._hints = t || null }, enumerable: !0, configurable: !0 }), _.prototype.listVideoInputDevices = function () { return n(this, void 0, void 0, function () { var t, e, r, n, a, u, s, f, l, d, c, h; 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: r = o.sent(), n = []; try { for (a = i(r), u = a.next(); !u.done; u = a.next())s = u.value, "videoinput" === (f = "video" === s.kind ? "videoinput" : s.kind) && (l = s.deviceId || s.id, d = s.label || "Video device " + (n.length + 1), c = s.groupId, h = { deviceId: l, label: d, kind: f, groupId: c }, n.push(h)) } catch (o) { t = { error: o } } finally { try { u && !u.done && (e = a.return) && e.call(a) } finally { if (t) throw t.error } } return [2, n] } }) }) }, _.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 h.VideoInputDevice(t.deviceId, t.label) })] } }) }) }, _.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] } }) }) }, _.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()] } }) }) }, _.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", focusMode: "continuous", } }, [4, this.decodeOnceFromConstraints(r, e)]; case 1: return [2, n.sent()] } }) }) }, _.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()] } }) }) }, _.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()] } }) }) }, _.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()] } }) }) }, _.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", focusMode: "continuous", }},[4,this.decodeFromConstraints(n,e,r)];case 1:return[2,o.sent()]}})})},_.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()]}})})},_.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()]}})})},_.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},_.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},_.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]}})})},_.prototype.playVideoOnLoadAsync=function(t){var e=this;return new Promise(function(r,n){return e.playVideoOnLoad(t,function(){return r()})})},_.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)},_.prototype.isVideoPlaying=function(t){return 0=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o,i,a=r(2);(i=o=e.CharacterSetValueIdentifiers||(e.CharacterSetValueIdentifiers={}))[i.Cp437=0]="Cp437",i[i.ISO8859_1=1]="ISO8859_1",i[i.ISO8859_2=2]="ISO8859_2",i[i.ISO8859_3=3]="ISO8859_3",i[i.ISO8859_4=4]="ISO8859_4",i[i.ISO8859_5=5]="ISO8859_5",i[i.ISO8859_6=6]="ISO8859_6",i[i.ISO8859_7=7]="ISO8859_7",i[i.ISO8859_8=8]="ISO8859_8",i[i.ISO8859_9=9]="ISO8859_9",i[i.ISO8859_10=10]="ISO8859_10",i[i.ISO8859_11=11]="ISO8859_11",i[i.ISO8859_13=12]="ISO8859_13",i[i.ISO8859_14=13]="ISO8859_14",i[i.ISO8859_15=14]="ISO8859_15",i[i.ISO8859_16=15]="ISO8859_16",i[i.SJIS=16]="SJIS",i[i.Cp1250=17]="Cp1250",i[i.Cp1251=18]="Cp1251",i[i.Cp1252=19]="Cp1252",i[i.Cp1256=20]="Cp1256",i[i.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",i[i.UTF8=22]="UTF8",i[i.ASCII=23]="ASCII",i[i.Big5=24]="Big5",i[i.GB18030=25]="GB18030",i[i.EUC_KR=26]="EUC_KR";var u=(s.prototype.getValueIdentifier=function(){return this.valueIdentifier},s.prototype.getName=function(){return this.name},s.prototype.getValue=function(){return this.values[0]},s.getCharacterSetECIByValue=function(t){if(t<0||900<=t)throw new a.default("incorect value");var e=s.VALUES_TO_ECI.get(t);if(void 0===e)throw new a.default("incorect value");return e},s.getCharacterSetECIByName=function(t){var e=s.NAME_TO_ECI.get(t);if(void 0===e)throw new a.default("incorect value");return e},s.prototype.equals=function(t){if(!(t instanceof s))return!1;var e=t;return this.getName()===e.getName()},s.VALUE_IDENTIFIER_TO_ECI=new Map,s.VALUES_TO_ECI=new Map,s.NAME_TO_ECI=new Map,s.Cp437=new s(o.Cp437,Int32Array.from([0,2]),"Cp437"),s.ISO8859_1=new s(o.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),s.ISO8859_2=new s(o.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),s.ISO8859_3=new s(o.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),s.ISO8859_4=new s(o.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),s.ISO8859_5=new s(o.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),s.ISO8859_6=new s(o.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),s.ISO8859_7=new s(o.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),s.ISO8859_8=new s(o.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),s.ISO8859_9=new s(o.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),s.ISO8859_10=new s(o.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),s.ISO8859_11=new s(o.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),s.ISO8859_13=new s(o.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),s.ISO8859_14=new s(o.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),s.ISO8859_15=new s(o.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),s.ISO8859_16=new s(o.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),s.SJIS=new s(o.SJIS,20,"SJIS","Shift_JIS"),s.Cp1250=new s(o.Cp1250,21,"Cp1250","windows-1250"),s.Cp1251=new s(o.Cp1251,22,"Cp1251","windows-1251"),s.Cp1252=new s(o.Cp1252,23,"Cp1252","windows-1252"),s.Cp1256=new s(o.Cp1256,24,"Cp1256","windows-1256"),s.UnicodeBigUnmarked=new s(o.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),s.UTF8=new s(o.UTF8,26,"UTF8","UTF-8"),s.ASCII=new s(o.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),s.Big5=new s(o.Big5,28,"Big5"),s.GB18030=new s(o.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),s.EUC_KR=new s(o.EUC_KR,30,"EUC_KR","EUC-KR"),s);function s(t,e,r){for(var o,i,a=[],u=3;ur.length){var a=e;e=r,r=a}var s=new Int32Array(r.length),f=r.length-e.length;o.default.arraycopy(r,0,s,0,f);for(var l=f;l=t.getDegree()&&!n.isZero();){var u=n.getDegree()-t.getDegree(),s=e.multiply(n.getCoefficient(n.getDegree()),a),f=t.multiplyByMonomial(u,s),l=e.buildMonomial(u,s);r=r.addOrSubtract(l),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=s.FOR_BITS.size)throw new a.default;return s.FOR_BITS.get(t)},s.FOR_BITS=new Map,s.FOR_VALUE=new Map,s.L=new s(n.L,"L",1),s.M=new s(n.M,"M",0),s.Q=new s(n.Q,"Q",3),s.H=new s(n.H,"H",2),s);function s(t,e,r){this.value=t,this.stringValue=e,this.bits=r,s.FOR_BITS.set(r,this),s.FOR_VALUE.set(t,this)}e.default=u},function(t,e,r){"use strict";var n,o;Object.defineProperty(e,"__esModule",{value:!0}),(o=n=n||{})[o.ERROR_CORRECTION=0]="ERROR_CORRECTION",o[o.CHARACTER_SET=1]="CHARACTER_SET",o[o.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",o[o.MIN_SIZE=3]="MIN_SIZE",o[o.MAX_SIZE=4]="MAX_SIZE",o[o.MARGIN=5]="MARGIN",o[o.PDF417_COMPACT=6]="PDF417_COMPACT",o[o.PDF417_COMPACTION=7]="PDF417_COMPACTION",o[o.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",o[o.AZTEC_LAYERS=9]="AZTEC_LAYERS",o[o.QR_VERSION=10]="QR_VERSION",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 i,a=r(87),u=(o(s,i=a.default),s.prototype.encodeCompressedGtin=function(t,e){t.append("(01)");var r=t.length();t.append("9"),this.encodeCompressedGtinWithoutAI(t,e,r)},s.prototype.encodeCompressedGtinWithoutAI=function(t,e,r){for(var n=0;n<4;++n){var o=this.getGeneralDecoder().extractNumericValueFromBitArray(e+10*n,10);o/100==0&&t.append("0"),o/10==0&&t.append("0"),t.append(o)}s.appendCheckDigit(t,r)},s.appendCheckDigit=function(t,e){for(var r=0,n=0;n<13;n++){var o=t.charAt(n+e).charCodeAt(0)-"0".charCodeAt(0);r+=0==(1&n)?3*o:o}10==(r=10-r%10)&&(r=0),t.append(r)},s.GTIN_SIZE=40,s);function s(t){return i.call(this,t)||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 i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.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 i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.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 i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.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 i,a=r(3),u=r(58),s=r(60),f=r(61),l=r(8),d=r(65),c=r(97),h=r(0),p=r(13),_=(o(g,i=p.default),g.prototype.decodeRow=function(t,e,r){for(var n=0;n=(r/2|0);){var d=u,c=f;if(f=l,(u=s).isZero())throw new i.default("r_{i-1} was zero");s=d;for(var h=o.getZero(),p=u.getCoefficient(u.getDegree()),_=o.inverse(p);s.getDegree()>=u.getDegree()&&!s.isZero();){var g=s.getDegree()-u.getDegree(),v=o.multiply(s.getCoefficient(s.getDegree()),_);h=h.addOrSubtract(o.buildMonomial(g,v)),s=s.addOrSubtract(u.multiplyByMonomial(g,v))}if(l=h.multiply(f).addOrSubtract(c),s.getDegree()>=u.getDegree())throw new a.default("Division algorithm failed to reduce polynomial?")}var w=l.getCoefficient(0);if(0===w)throw new i.default("sigmaTilde(0) was zero");var y=o.inverse(w);return[l.multiplyScalar(y),s.multiplyScalar(y)]},s.prototype.findErrorLocations=function(t){var e=t.getDegree();if(1===e)return Int32Array.from([t.getCoefficient(1)]);for(var r=new Int32Array(e),n=0,o=this.field,a=1;athis.available())throw new n.default(""+t);var e=0,r=this.bitOffset,o=this.byteOffset,i=this.bytes;if(0>8-u<<(f=a-u);e=(i[o]&s)>>f,t-=u,8===(r+=u)&&(r=0,o++)}if(0>(f=8-t)<>f,r+=t)}return this.bitOffset=r,this.byteOffset=o,e},i.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},i);function i(t){this.bytes=t,this.byteOffset=0,this.bitOffset=0}e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(8),o=r(22),i=r(21),a=(u.guessEncoding=function(t,e){if(null!=e&&void 0!==e.get(n.default.CHARACTER_SET))return e.get(n.default.CHARACTER_SET).toString();for(var r=t.length,o=!0,i=!0,a=!0,s=0,f=0,l=0,d=0,c=0,h=0,p=0,_=0,g=0,v=0,w=0,y=3=t.getWidth())throw new d.default;var f=Math.round((s-a+1)/n),l=Math.round((i-o+1)/n);if(f<=0||l<=0)throw new d.default;if(l!==f)throw new d.default;var c=Math.floor(n/2);o+=c;var h=(a+=c)+Math.floor((f-1)*n)-s;if(0=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(12),i=r(74),a=r(112),u=r(113),s=r(2),f=r(1),l=(d.prototype.getVersionNumber=function(){return this.versionNumber},d.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},d.prototype.getTotalCodewords=function(){return this.totalCodewords},d.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},d.prototype.getECBlocksForLevel=function(t){return this.ecBlocks[t.getValue()]},d.getProvisionalVersionForDimension=function(t){if(t%4!=1)throw new s.default;try{return this.getVersionForNumber((t-17)/4)}catch(t){throw new s.default}},d.getVersionForNumber=function(t){if(t<1||40=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(30),i=r(15),a=r(22),u=r(25),s=r(83),f=r(76),l=r(46),d=r(84),c=r(145),h=r(49),p=r(146),_=r(21),g=r(147),v=r(50),w=(y.calculateMaskPenalty=function(t){return d.default.applyMaskPenaltyRule1(t)+d.default.applyMaskPenaltyRule2(t)+d.default.applyMaskPenaltyRule3(t)+d.default.applyMaskPenaltyRule4(t)},y.encode=function(t,e,r){void 0===r&&(r=null);var n=y.DEFAULT_BYTE_MODE_ENCODING,u=null!==r&&void 0!==r.get(o.default.CHARACTER_SET);u&&(n=r.get(o.default.CHARACTER_SET).toString());var s=this.chooseMode(t,n),d=new i.default;if(s===f.default.BYTE&&(u||y.DEFAULT_BYTE_MODE_ENCODING!==n)){var _=a.default.getCharacterSetECIByName(n);void 0!==_&&this.appendECI(_,d)}this.appendModeInfo(s,d);var g,w=new i.default;if(this.appendBytes(t,s,w,n),null!==r&&void 0!==r.get(o.default.QR_VERSION)){var A=Number.parseInt(r.get(o.default.QR_VERSION).toString(),10);g=l.default.getVersionForNumber(A);var E=this.calculateBitsNeeded(s,d,w,g);if(!this.willFit(E,g,e))throw new v.default("Data too big for requested version")}else g=this.recommendVersion(e,s,d,w);var C=new i.default;C.appendBitArray(d);var m=s===f.default.BYTE?w.getSizeInBytes():t.length;this.appendLengthInfo(m,g,s,C),C.appendBitArray(w);var I=g.getECBlocksForLevel(e),S=g.getTotalCodewords()-I.getTotalECCodewords();this.terminateBits(S,C);var O=this.interleaveWithECBytes(C,g.getTotalCodewords(),S,I.getNumBlocks()),T=new h.default;T.setECLevel(e),T.setMode(s),T.setVersion(g);var R=g.getDimensionForVersion(),b=new c.default(R,R),N=this.chooseMaskPattern(O,e,g,b);return T.setMaskPattern(N),p.default.buildMatrix(O,e,g,N,b),T.setMatrix(b),T},y.recommendVersion=function(t,e,r,n){var o=this.calculateBitsNeeded(e,r,n,l.default.getVersionForNumber(1)),i=this.chooseVersion(o,t),a=this.calculateBitsNeeded(e,r,n,i);return this.chooseVersion(a,t)},y.calculateBitsNeeded=function(t,e,r,n){return e.getSize()+t.getCharacterCountBits(n)+r.getSize()},y.getAlphanumericCode=function(t){return tr)throw new v.default("data bits cannot fit in the QR Code"+e.getSize()+" > "+r);for(var n=0;n<4&&e.getSize()>8)+(255&u);e.appendBits(s,13)}},y.appendECI=function(t,e){e.appendBits(f.default.ECI.getBits(),4),e.appendBits(t.getValue(),8)},y.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),y.DEFAULT_BYTE_MODE_ENCODING=a.default.UTF8.getName(),y);function y(){}e.default=w},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(4),o=(i.prototype.getMode=function(){return this.mode},i.prototype.getECLevel=function(){return this.ecLevel},i.prototype.getVersion=function(){return this.version},i.prototype.getMaskPattern=function(){return this.maskPattern},i.prototype.getMatrix=function(){return this.matrix},i.prototype.toString=function(){var t=new n.default;return t.append("<<\n"),t.append(" mode: "),t.append(this.mode?this.mode.toString():"null"),t.append("\n ecLevel: "),t.append(this.ecLevel?this.ecLevel.toString():"null"),t.append("\n version: "),t.append(this.version?this.version.toString():"null"),t.append("\n maskPattern: "),t.append(this.maskPattern.toString()),this.matrix?(t.append("\n matrix:\n"),t.append(this.matrix.toString())):t.append("\n matrix: null\n"),t.append(">>\n"),t.toString()},i.prototype.setMode=function(t){this.mode=t},i.prototype.setECLevel=function(t){this.ecLevel=t},i.prototype.setVersion=function(t){this.version=t},i.prototype.setMaskPattern=function(t){this.maskPattern=t},i.prototype.setMatrix=function(t){this.matrix=t},i.isValidMaskPattern=function(t){return 0<=t&&t>f.BLOCK_SIZE_POWER;0!=(e&f.BLOCK_SIZE_MASK)&&o++;var a=r>>f.BLOCK_SIZE_POWER;0!=(r&f.BLOCK_SIZE_MASK)&&a++;var s=f.calculateBlackPoints(n,o,a,e,r),l=new u.default(e,r);f.calculateThresholdForBlock(n,o,a,e,r,s,l),this.matrix=l}else this.matrix=i.prototype.getBlackMatrix.call(this);return this.matrix},f.prototype.createBinarizer=function(t){return new f(t)},f.calculateThresholdForBlock=function(t,e,r,n,o,i,a){for(var u=o-f.BLOCK_SIZE,s=n-f.BLOCK_SIZE,l=0;l>2*f.BLOCK_SIZE_POWER;if(_-p<=f.MIN_DYNAMIC_RANGE&&(A=p/2,0>d.LUMINANCE_SHIFT]++;var s=d.estimateBlackPoint(i);if(n<3)for(a=0;a>d.LUMINANCE_SHIFT]++;var c=d.estimateBlackPoint(o),h=t.getMatrix();for(i=0;io&&(o=t[n=i]),t[i]>r&&(r=t[i]);var a=0,u=0;for(i=0;i>10,n[i]=u}return n},l.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new s.default("Requested row is outside the image: "+t);var r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(11),f=r(2),l=r(0),d=r(13),c=r(9),h=r(5),p=(o(_,a=d.default),_.prototype.decodeRow=function(t,e,r){var n,o,a,f,d=this.counters;d.fill(0),this.decodeRowResult="";var p,g,v=_.findAsteriskPattern(e,d),w=e.getNextSet(v[1]),y=e.getSize();do{_.recordPattern(e,w,d);var A=_.toNarrowWidePattern(d);if(A<0)throw new l.default;p=_.patternToChar(A),this.decodeRowResult+=p,g=w;try{for(var E=i(d),C=E.next();!C.done;C=E.next())w+=C.value}catch(t){n={error:t}}finally{try{C&&!C.done&&(o=E.return)&&o.call(E)}finally{if(n)throw n.error}}w=e.getNextSet(w)}while("*"!==p);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var m,I=0;try{for(var S=i(d),O=S.next();!O.done;O=S.next())I+=O.value}catch(t){a={error:t}}finally{try{O&&!O.done&&(f=S.return)&&f.call(S)}finally{if(a)throw a.error}}if(w!==y&&2*(w-g-I)=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(62),s=r(96),f=r(9),l=r(8),d=r(0),c=r(4),h=r(3),p=r(5),_=r(63),g=r(36),v=r(10),w=r(64),y=r(7),A=r(13),E=(o(C,a=u.default),C.prototype.decodeRow=function(t,e,r){var n,o,a,u,s=this.decodePair(e,!1,t,r);C.addOrTally(this.possibleLeftPairs,s),e.reverse();var f=this.decodePair(e,!0,t,r);C.addOrTally(this.possibleRightPairs,f),e.reverse();try{for(var l=i(this.possibleLeftPairs),c=l.next();!c.done;c=l.next()){var h=c.value;if(1=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(13),s=r(0),f=r(10),l=(o(d,a=u.default),d.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},d.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},d.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},d.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},d.prototype.getOddCounts=function(){return this.oddCounts},d.prototype.getEvenCounts=function(){return this.evenCounts},d.prototype.parseFinderValue=function(t,e){for(var r=0;rn&&(n=e[o],r=o);t[r]++},d.decrement=function(t,e){for(var r=0,n=e[0],o=1;o=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=(i.prototype.RSSUtils=function(){},i.getRSSvalue=function(t,e,r){var o,a,u=0;try{for(var s=n(t),f=s.next();!f.done;f=s.next())u+=f.value}catch(t){o={error:t}}finally{try{f&&!f.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}for(var l=0,d=0,c=t.length,h=0;h=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(8),f=r(9),l=r(5),d=r(13),c=r(4),h=r(7),p=r(2),_=r(0),g=(o(v,a=d.default),v.prototype.decodeRow=function(t,e,r){var n,o,a=this.decodeStart(e),d=this.decodeEnd(e),h=new c.default;v.decodeMiddle(e,a[1],d[0],h);var _=h.toString(),g=null;null!=r&&(g=r.get(s.default.ALLOWED_LENGTHS)),null==g&&(g=v.DEFAULT_ALLOWED_LENGTHS);var w=_.length,y=!1,A=0;try{for(var E=i(g),C=E.next();!C.done;C=E.next()){var m=C.value;if(w===m){y=!0;break}A=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(67),f=r(0),l=(o(d,a=s.default),d.prototype.decodeMiddle=function(t,e,r){var n,o,a,u,f=this.decodeMiddleCounters;f[0]=0,f[1]=0,f[2]=0,f[3]=0;for(var l=t.getSize(),c=e[1],h=0,p=0;p<6&&c=e.getSize()||!e.isRange(C,m,!1))throw new h.default;var I=w.toString();if(I.length<8)throw new p.default;if(!v.checkChecksum(I))throw new _.default;var S=(n[1]+n[0])/2,O=(A[1]+A[0])/2,T=this.getBarcodeFormat(),R=[new l.default(S,t),new l.default(O,t)],b=new s.default(I,null,0,R,T,(new Date).getTime()),N=0;try{var M=d.default.decodeRow(t,e,A[1]);b.putMetadata(f.default.UPC_EAN_EXTENSION,M.getText()),b.putAllMetadata(M.getResultMetadata()),b.addResultPoints(M.getResultPoints()),N=M.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 T===a.default.EAN_13||a.default.UPC_A,b},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=this.height||this.rightInit>=this.width)throw new i.default}e.default=a},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(8),i=r(3),a=r(45),u=r(35),s=r(37),f=r(0),l=r(77),d=r(82),c=(h.prototype.decode=function(t,e){return this.setHints(e),this.decodeInternal(t)},h.prototype.decodeWithState=function(t){return null!==this.readers&&void 0!==this.readers||this.setHints(null),this.decodeInternal(t)},h.prototype.setHints=function(t){var e=null!=(this.hints=t)&&void 0!==t.get(o.default.TRY_HARDER),r=null==t?null:t.get(o.default.POSSIBLE_FORMATS),n=new Array;if(null!=r){var f=r.some(function(t){return t===i.default.UPC_A||t===i.default.UPC_E||t===i.default.EAN_13||t===i.default.EAN_8||t===i.default.CODABAR||t===i.default.CODE_39||t===i.default.CODE_93||t===i.default.CODE_128||t===i.default.ITF||t===i.default.RSS_14||t===i.default.RSS_EXPANDED});f&&!e&&n.push(new u.default(t)),r.includes(i.default.QR_CODE)&&n.push(new a.default),r.includes(i.default.DATA_MATRIX)&&n.push(new s.default),r.includes(i.default.PDF_417)&&n.push(new l.default),f&&e&&n.push(new u.default(t))}0===n.length&&(e||n.push(new u.default(t)),n.push(new a.default),n.push(new s.default),n.push(new l.default),e&&n.push(new u.default(t))),this.readers=n},h.prototype.reset=function(){var t,e;if(null!==this.readers)try{for(var r=n(this.readers),o=r.next();!o.done;o=r.next())o.value.reset()}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},h.prototype.decodeInternal=function(t){var e,r;if(null===this.readers)throw new d.default("No readers where selected, nothing can be read.");try{for(var o=n(this.readers),i=o.next();!i.done;i=o.next()){var a=i.value;try{return a.decode(t,this.hints)}catch(t){if(t instanceof d.default)continue}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}throw new f.default("No MultiFormat Readers were able to detect the code.")},h);function h(){}e.default=c},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(29),i=r(16),a=(u.numBitsDiffering=function(t,e){return i.default.bitCount(t^e)},u.decodeFormatInformation=function(t,e){var r=u.doDecodeFormatInformation(t,e);return null!==r?r:u.doDecodeFormatInformation(t^u.FORMAT_INFO_MASK_QR,e^u.FORMAT_INFO_MASK_QR)},u.doDecodeFormatInformation=function(t,e){var r,o,i=Number.MAX_SAFE_INTEGER,a=0;try{for(var s=n(u.FORMAT_INFO_DECODE_LOOKUP),f=s.next();!f.done;f=s.next()){var l=f.value,d=l[0];if(d===t||d===e)return new u(l[1]);var c=u.numBitsDiffering(t,d);c>3&3),this.dataMask=7&t}e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.isMirrored=function(){return this.mirrored},o.prototype.applyMirroredCorrection=function(t){if(this.mirrored&&null!==t&&!(t.length<3)){var e=t[0];t[0]=t[2],t[2]=e}},o);function o(t){this.mirrored=t}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,o,i=r(1);(o=n=e.ModeValues||(e.ModeValues={}))[o.TERMINATOR=0]="TERMINATOR",o[o.NUMERIC=1]="NUMERIC",o[o.ALPHANUMERIC=2]="ALPHANUMERIC",o[o.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",o[o.BYTE=4]="BYTE",o[o.ECI=5]="ECI",o[o.KANJI=6]="KANJI",o[o.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",o[o.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",o[o.HANZI=9]="HANZI";var a=(u.forBits=function(t){var e=u.FOR_BITS.get(t);if(void 0===e)throw new i.default;return e},u.prototype.getCharacterCountBits=function(t){var e,r=t.getVersionNumber();return e=r<=9?0:r<=26?1:2,this.characterCountBitsForVersions[e]},u.prototype.getValue=function(){return this.value},u.prototype.getBits=function(){return this.bits},u.prototype.equals=function(t){if(!(t instanceof u))return!1;var e=t;return this.value===e.value},u.prototype.toString=function(){return this.stringValue},u.FOR_BITS=new Map,u.FOR_VALUE=new Map,u.TERMINATOR=new u(n.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),u.NUMERIC=new u(n.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),u.ALPHANUMERIC=new u(n.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),u.STRUCTURED_APPEND=new u(n.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),u.BYTE=new u(n.BYTE,"BYTE",Int32Array.from([8,16,16]),4),u.ECI=new u(n.ECI,"ECI",Int32Array.from([0,0,0]),7),u.KANJI=new u(n.KANJI,"KANJI",Int32Array.from([8,10,12]),8),u.FNC1_FIRST_POSITION=new u(n.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),u.FNC1_SECOND_POSITION=new u(n.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),u.HANZI=new u(n.HANZI,"HANZI",Int32Array.from([8,10,12]),13),u);function u(t,e,r,n){this.value=t,this.stringValue=e,this.characterCountBitsForVersions=r,this.bits=n,u.FOR_BITS.set(n,this),u.FOR_VALUE.set(t,this)}e.default=a},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(3),i=r(11),a=r(2),u=r(0),s=r(9),f=r(19),l=r(16),d=r(14),c=r(123),h=r(125),p=(_.prototype.decode=function(t,e){void 0===e&&(e=null);var r=_.decode(t,e,!1);if(null==r||0===r.length||null==r[0])throw u.default.getNotFoundInstance();return r[0]},_.prototype.decodeMultiple=function(t,e){void 0===e&&(e=null);try{return _.decode(t,e,!0)}catch(t){if(t instanceof a.default||t instanceof i.default)throw u.default.getNotFoundInstance();throw t}},_.decode=function(t,e,r){var i,a,u=new Array,f=c.default.detectMultiple(t,e,r);try{for(var l=n(f.getPoints()),p=l.next();!p.done;p=l.next()){var g=p.value,v=h.default.decode(f.getBits(),g[4],g[5],g[6],g[7],_.getMinCodewordWidth(g),_.getMaxCodewordWidth(g)),w=new s.default(v.getText(),v.getRawBytes(),void 0,g,o.default.PDF_417);w.putMetadata(d.default.ERROR_CORRECTION_LEVEL,v.getECLevel());var y=v.getOther();null!=y&&w.putMetadata(d.default.PDF417_EXTRA_METADATA,y),u.push(w)}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}return u.map(function(t){return t})},_.getMaxWidth=function(t,e){return null==t||null==e?0:Math.trunc(Math.abs(t.getX()-e.getX()))},_.getMinWidth=function(t,e){return null==t||null==e?l.default.MAX_VALUE:Math.trunc(Math.abs(t.getX()-e.getX()))},_.getMaxCodewordWidth=function(t){return Math.floor(Math.max(Math.max(_.getMaxWidth(t[0],t[4]),_.getMaxWidth(t[6],t[2])*f.default.MODULES_IN_CODEWORD/f.default.MODULES_IN_STOP_PATTERN),Math.max(_.getMaxWidth(t[1],t[5]),_.getMaxWidth(t[7],t[3])*f.default.MODULES_IN_CODEWORD/f.default.MODULES_IN_STOP_PATTERN)))},_.getMinCodewordWidth=function(t){return Math.floor(Math.min(Math.min(_.getMinWidth(t[0],t[4]),_.getMinWidth(t[6],t[2])*f.default.MODULES_IN_CODEWORD/f.default.MODULES_IN_STOP_PATTERN),Math.min(_.getMinWidth(t[1],t[5]),_.getMinWidth(t[7],t[3])*f.default.MODULES_IN_CODEWORD/f.default.MODULES_IN_STOP_PATTERN)))},_.prototype.reset=function(){},_);function _(){}e.default=p},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(1),i=r(7),a=r(4),u=(s.prototype.getCoefficients=function(){return this.coefficients},s.prototype.getDegree=function(){return this.coefficients.length-1},s.prototype.isZero=function(){return 0===this.coefficients[0]},s.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},s.prototype.evaluateAt=function(t){var e,r;if(0===t)return this.getCoefficient(0);if(1===t){var o=0;try{for(var i=n(this.coefficients),a=i.next();!a.done;a=i.next()){var u=a.value;o=this.field.add(o,u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return o}for(var s=this.coefficients[0],f=this.coefficients.length,l=1;lr.length){var n=e;e=r,r=n}var a=new Int32Array(r.length),u=r.length-e.length;i.default.arraycopy(r,0,a,0,u);for(var f=u;f=this.image.getHeight()&&(h=this.image.getHeight()-1);var p=new o.default(c.getX(),h);r?i=p:s=p}return new a(this.image,n,i,u,s)},a.prototype.getMinX=function(){return this.minX},a.prototype.getMaxX=function(){return this.maxX},a.prototype.getMinY=function(){return this.minY},a.prototype.getMaxY=function(){return this.maxY},a.prototype.getTopLeft=function(){return this.topLeft},a.prototype.getTopRight=function(){return this.topRight},a.prototype.getBottomLeft=function(){return this.bottomLeft},a.prototype.getBottomRight=function(){return this.bottomRight},a);function a(t,e,r,n,o){t instanceof a?this.constructor_2(t):this.constructor_1(t,e,r,n,o)}e.default=i},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(47),i=r(79),a=(u.prototype.getCodewordNearby=function(t){var e=this.getCodeword(t);if(null!=e)return e;for(var r=1;r=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0a?(a=n(),(u=[]).push(r())):n()===a&&u.push(r())}var e,r,a=-1,u=new Array;try{for(var s=n(this.values.entries()),f=s.next();!f.done;f=s.next()){var l=o(f.value,2);t(l[0],l[1])}}catch(t){e={error:t}}finally{try{f&&!f.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return i.default.toIntArray(u)},u.prototype.getConfidence=function(t){return this.values.get(t)},u);function u(){this.values=new Map}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 i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(27),o=r(7),i=r(1),a=(u.prototype.buildGenerator=function(t){var e=this.cachedGenerators;if(t>=e.length)for(var r=e[e.length-1],o=this.field,i=e.length;i<=t;i++){var a=r.multiply(new n.default(o,Int32Array.from([1,o.exp(i-1+o.getGeneratorBase())])));e.push(a),r=a}return e[t]},u.prototype.encode=function(t,e){if(0===e)throw new i.default("No error correction bytes");var r=t.length-e;if(r<=0)throw new i.default("No data bytes provided");var a=this.buildGenerator(e),u=new Int32Array(r);o.default.arraycopy(t,0,u,0,r);for(var s=new n.default(this.field,u),f=(s=s.multiplyByMonomial(e,1)).divide(a)[1].getCoefficients(),l=e-f.length,d=0;dthis.information.getSize())return t+4<=this.information.getSize();for(var e=t;ethis.information.getSize()){var e=this.extractNumericValueFromBitArray(t,4);return 0==e?new u.default(this.information.getSize(),u.default.FNC1,u.default.FNC1):new u.default(this.information.getSize(),e-1,u.default.FNC1)}var r=this.extractNumericValueFromBitArray(t,7),n=(r-8)/11,o=(r-8)%11;return new u.default(t+7,n,o)},c.prototype.extractNumericValueFromBitArray=function(t,e){return c.extractNumericValueFromBitArray(this.information,t,e)},c.extractNumericValueFromBitArray=function(t,e,r){for(var n=0,o=0;othis.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(5<=e&&e<16)return!0;if(t+7>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,7);if(64<=r&&r<116)return!0;if(t+8>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(t,8);return 232<=n&&n<253},c.prototype.decodeIsoIec646=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15==e)return new a.default(t+5,a.default.FNC1);if(5<=e&&e<15)return new a.default(t+5,"0"+(e-5));var r,o=this.extractNumericValueFromBitArray(t,7);if(64<=o&&o<90)return new a.default(t+7,""+(o+1));if(90<=o&&o<116)return new a.default(t+7,""+(o+7));switch(this.extractNumericValueFromBitArray(t,8)){case 232:r="!";break;case 233:r='"';break;case 234:r="%";break;case 235:r="&";break;case 236:r="'";break;case 237:r="(";break;case 238:r=")";break;case 239:r="*";break;case 240:r="+";break;case 241:r=",";break;case 242:r="-";break;case 243:r=".";break;case 244:r="/";break;case 245:r=":";break;case 246:r=";";break;case 247:r="<";break;case 248:r="=";break;case 249:r=">";break;case 250:r="?";break;case 251:r="_";break;case 252:r=" ";break;default:throw new n.default}return new a.default(t+8,r)},c.prototype.isStillAlpha=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(5<=e&&e<16)return!0;if(t+6>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,6);return 16<=r&&r<63},c.prototype.decodeAlphanumeric=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15==e)return new a.default(t+5,a.default.FNC1);if(5<=e&&e<15)return new a.default(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,6);if(32<=n&&n<58)return new a.default(t+6,""+(n+33));switch(n){case 58:r="*";break;case 59:r=",";break;case 60:r="-";break;case 61:r=".";break;case 62:r="/";break;default:throw new o.default("Decoding invalid alphanumeric value: "+n)}return new a.default(t+6,r)},c.prototype.isAlphaTo646ToAlphaLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<5&&e+tthis.information.getSize())return!1;for(var e=t;ethis.information.getSize())return!1;for(var e=0;e<4&&e+t=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(8),f=r(13),l=r(66),d=r(101),c=r(0),h=(o(p,a=f.default),p.prototype.decodeRow=function(t,e,r){var n,o;try{for(var a=i(this.readers),u=a.next();!u.done;u=a.next()){var s=u.value;try{return s.decodeRow(t,e,r)}catch(t){}}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}throw new c.default},p.prototype.reset=function(){var t,e;try{for(var r=i(this.readers),n=r.next();!n.done;n=r.next())n.value.reset()}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},p);function p(t){var e=a.call(this)||this,r=null==t?null:t.get(s.default.POSSIBLE_FORMATS),n=[];return null!=r&&(-1=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(3),i=r(26),a=r(9),u=r(5),s=r(14),f=r(0),l=(d.prototype.decodeRow=function(t,e,r){var n=this.decodeRowStringBuffer,i=this.decodeMiddle(e,r,n),s=n.toString(),f=d.parseExtensionString(s),l=[new u.default((r[0]+r[1])/2,t),new u.default(i,t)],c=new a.default(s,null,0,l,o.default.UPC_EAN_EXTENSION,(new Date).getTime());return null!=f&&c.putAllMetadata(f),c},d.prototype.decodeMiddle=function(t,e,r){var o,a,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var s=t.getSize(),l=e[1],c=0,h=0;h<5&&l=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(3),i=r(26),a=r(9),u=r(5),s=r(14),f=r(0),l=(d.prototype.decodeRow=function(t,e,r){var n=this.decodeRowStringBuffer,i=this.decodeMiddle(e,r,n),s=n.toString(),f=d.parseExtensionString(s),l=[new u.default((r[0]+r[1])/2,t),new u.default(i,t)],c=new a.default(s,null,0,l,o.default.UPC_EAN_EXTENSION,(new Date).getTime());return null!=f&&c.putAllMetadata(f),c},d.prototype.decodeMiddle=function(t,e,r){var o,a,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var s=t.getSize(),l=e[1],d=0,c=0;c<2&&l=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(67),f=(o(l,a=s.default),l.prototype.decodeMiddle=function(t,e,r){var n,o,a,u,f=this.decodeMiddleCounters;f[0]=0,f[1]=0,f[2]=0,f[3]=0;for(var l=t.getSize(),d=e[1],c=0;c<4&&d=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(38),i=r(25),a=r(104),u=r(106),s=r(107),f=r(11),l=(d.prototype.decode=function(t){var e,r,o=new a.default(t),i=o.getVersion(),f=o.readCodewords(),l=u.default.getDataBlocks(f,i),d=0;try{for(var c=n(l),h=c.next();!h.done;h=c.next())d+=h.value.getNumDataCodewords()}catch(t){e={error:t}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}for(var p=new Uint8Array(d),_=l.length,g=0;g<_;g++){var v=l[g],w=v.getCodewords(),y=v.getNumDataCodewords();this.correctErrors(w,y);for(var A=0;A=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(2),i=(a.prototype.getECCodewords=function(){return this.ecCodewords},a.prototype.getECBlocks=function(){return this.ecBlocks},a);function a(t,e,r){this.ecCodewords=t,this.ecBlocks=[e],r&&this.ecBlocks.push(r)}e.ECBlocks=i;var u=(s.prototype.getCount=function(){return this.count},s.prototype.getDataCodewords=function(){return this.dataCodewords},s);function s(t,e){this.count=t,this.dataCodewords=e}e.ECB=u;var f=(l.prototype.getVersionNumber=function(){return this.versionNumber},l.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},l.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},l.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},l.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},l.prototype.getTotalCodewords=function(){return this.totalCodewords},l.prototype.getECBlocks=function(){return this.ecBlocks},l.getVersionForDimensions=function(t,e){var r,i;if(0!=(1&t)||0!=(1&e))throw new o.default;try{for(var a=n(l.VERSIONS),u=a.next();!u.done;u=a.next()){var s=u.value;if(s.symbolSizeRows===t&&s.symbolSizeColumns===e)return s}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}throw new o.default},l.prototype.toString=function(){return""+this.versionNumber},l.buildVersions=function(){return[new l(1,10,10,8,8,new i(5,new u(1,3))),new l(2,12,12,10,10,new i(7,new u(1,5))),new l(3,14,14,12,12,new i(10,new u(1,8))),new l(4,16,16,14,14,new i(12,new u(1,12))),new l(5,18,18,16,16,new i(14,new u(1,18))),new l(6,20,20,18,18,new i(18,new u(1,22))),new l(7,22,22,20,20,new i(20,new u(1,30))),new l(8,24,24,22,22,new i(24,new u(1,36))),new l(9,26,26,24,24,new i(28,new u(1,44))),new l(10,32,32,14,14,new i(36,new u(1,62))),new l(11,36,36,16,16,new i(42,new u(1,86))),new l(12,40,40,18,18,new i(48,new u(1,114))),new l(13,44,44,20,20,new i(56,new u(1,144))),new l(14,48,48,22,22,new i(68,new u(1,174))),new l(15,52,52,24,24,new i(42,new u(2,102))),new l(16,64,64,14,14,new i(56,new u(2,140))),new l(17,72,72,16,16,new i(36,new u(4,92))),new l(18,80,80,18,18,new i(48,new u(4,114))),new l(19,88,88,20,20,new i(56,new u(4,144))),new l(20,96,96,22,22,new i(68,new u(4,174))),new l(21,104,104,24,24,new i(56,new u(6,136))),new l(22,120,120,18,18,new i(68,new u(6,175))),new l(23,132,132,20,20,new i(62,new u(8,163))),new l(24,144,144,22,22,new i(62,new u(8,156),new u(2,155))),new l(25,8,18,6,16,new i(7,new u(1,5))),new l(26,8,32,6,14,new i(11,new u(1,10))),new l(27,12,26,10,24,new i(14,new u(1,16))),new l(28,12,36,10,16,new i(18,new u(1,22))),new l(29,16,36,14,16,new i(24,new u(1,32))),new l(30,16,48,14,22,new i(28,new u(1,49)))]},l.VERSIONS=l.buildVersions(),l);function l(t,e,r,o,i,a){var u,s;this.versionNumber=t,this.symbolSizeRows=e,this.symbolSizeColumns=r,this.dataRegionSizeRows=o,this.dataRegionSizeColumns=i;var f=0,l=(this.ecBlocks=a).getECCodewords(),d=a.getECBlocks();try{for(var c=n(d),h=c.next();!h.done;h=c.next()){var p=h.value;f+=p.getCount()*(p.getDataCodewords()+l)}}catch(t){u={error:t}}finally{try{h&&!h.done&&(s=c.return)&&s.call(c)}finally{if(u)throw u.error}}this.totalCodewords=f}e.default=f},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(1),i=(a.getDataBlocks=function(t,e){var r,i,u,s,f=e.getECBlocks(),l=0,d=f.getECBlocks();try{for(var c=n(d),h=c.next();!h.done;h=c.next())l+=(w=h.value).getCount()}catch(t){r={error:t}}finally{try{h&&!h.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}var p=new Array(l),_=0;try{for(var g=n(d),v=g.next();!v.done;v=g.next())for(var w=v.value,y=0;y05"),r.insert(0,"");break;case 237:e.append("[)>06"),r.insert(0,"");break;case 238:return n.ANSIX12_ENCODE;case 239:return n.TEXT_ENCODE;case 240:return n.EDIFACT_ENCODE;case 241:break;default:if(254!==i||0!==t.available())throw new l.default}}while(0");break;case 3:e.append(" ");break;default:if(i<14)e.append(String.fromCharCode(i+44));else{if(!(i<40))throw new l.default;e.append(String.fromCharCode(i+51))}}}}while(0","?","@","[","\\","]","^","_"],h.TEXT_BASIC_SET_CHARS=["*","*","*"," ","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"],h.TEXT_SHIFT2_SET_CHARS=h.C40_SHIFT2_SET_CHARS,h.TEXT_SHIFT3_SET_CHARS=["`","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","{","|","}","~",String.fromCharCode(127)],h);function h(){}e.default=c},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0Math.abs(o-r);if(a){var u=r;r=n,n=u,u=o,o=i,i=u}for(var s=Math.abs(o-r),f=Math.abs(i-n),l=-s/2,d=n=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(12),i=r(25),a=r(38),u=r(111),s=r(75),f=r(115),l=r(116),d=r(11),c=(h.prototype.decodeBooleanArray=function(t,e){return this.decodeBitMatrix(o.default.parseFromBooleanArray(t),e)},h.prototype.decodeBitMatrix=function(t,e){var r=new u.default(t),n=null;try{return this.decodeBitMatrixParser(r,e)}catch(t){n=t}try{r.remask(),r.setMirror(!0),r.readVersion(),r.readFormatInformation(),r.mirror();var o=this.decodeBitMatrixParser(r,e);return o.setOther(new s.default(!0)),o}catch(t){if(null!==n)throw n;throw t}},h.prototype.decodeBitMatrixParser=function(t,e){var r,o,i,a,u=t.readVersion(),s=t.readFormatInformation().getErrorCorrectionLevel(),d=t.readCodewords(),c=f.default.getDataBlocks(d,u,s),h=0;try{for(var p=n(c),_=p.next();!_.done;_=p.next())h+=(A=_.value).getNumDataCodewords()}catch(t){r={error:t}}finally{try{_&&!_.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}var g=new Uint8Array(h),v=0;try{for(var w=n(c),y=w.next();!y.done;y=w.next()){var A,E=(A=y.value).getCodewords(),C=A.getNumDataCodewords();this.correctErrors(E,C);for(var m=0;m=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=(i.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},i.prototype.getNumBlocks=function(){var t,e,r=0,o=this.ecBlocks;try{for(var i=n(o),a=i.next();!a.done;a=i.next())r+=a.value.getCount()}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return r},i.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},i.prototype.getECBlocks=function(){return this.ecBlocks},i);function i(t){for(var e=[],r=1;r=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(1),i=(a.getDataBlocks=function(t,e,r){var i,u,s,f;if(t.length!==e.getTotalCodewords())throw new o.default;var l=e.getECBlocksForLevel(r),d=0,c=l.getECBlocks();try{for(var h=n(c),p=h.next();!p.done;p=h.next())d+=(y=p.value).getCount()}catch(t){i={error:t}}finally{try{p&&!p.done&&(u=h.return)&&u.call(h)}finally{if(i)throw i.error}}var _=new Array(d),g=0;try{for(var v=n(c),w=v.next();!w.done;w=v.next())for(var y=w.value,A=0;At.available())throw new l.default;for(var n=new Uint8Array(2*r),o=0;0>8&255,n[o+1]=255&u,o+=2,r--}try{e.append(f.default.decode(n,a.default.GB2312))}catch(t){throw new l.default(t)}},c.decodeKanjiSegment=function(t,e,r){if(13*r>t.available())throw new l.default;for(var n=new Uint8Array(2*r),o=0;0>8,n[o+1]=u,o+=2,r--}try{e.append(f.default.decode(n,a.default.SHIFT_JIS))}catch(t){throw new l.default(t)}},c.decodeByteSegment=function(t,e,r,n,o,i){if(8*r>t.available())throw new l.default;for(var u,s=new Uint8Array(r),d=0;d=c.ALPHANUMERIC_CHARS.length)throw new l.default;return c.ALPHANUMERIC_CHARS[t]},c.decodeAlphanumericSegment=function(t,e,r,n){for(var o=e.length();1=this.image.getWidth()&&(i=(this.image.getWidth()-1-t)/(a-t),a=this.image.getWidth()-1);var u=Math.floor(e-(n-e)*i);return i=1,u<0?(i=e/(e-u),u=0):u>=this.image.getHeight()&&(i=(this.image.getHeight()-1-e)/(u-e),u=this.image.getHeight()-1),a=Math.floor(t+(a-t)*i),(o+=this.sizeOfBlackWhiteBlackRun(t,e,a,u))-1},p.prototype.sizeOfBlackWhiteBlackRun=function(t,e,r,n){var o=Math.abs(n-e)>Math.abs(r-t);if(o){var i=t;t=e,e=i,i=r,r=n,n=i}for(var a=Math.abs(r-t),u=Math.abs(n-e),f=-a/2,l=t=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(8),i=r(5),a=r(119),u=r(120),s=r(0),f=(l.prototype.getImage=function(){return this.image},l.prototype.getPossibleCenters=function(){return this.possibleCenters},l.prototype.find=function(t){var e=null!=t&&void 0!==t.get(o.default.TRY_HARDER),r=null!=t&&void 0!==t.get(o.default.PURE_BARCODE),n=this.image,a=n.getHeight(),s=n.getWidth(),f=Math.floor(3*a/(4*l.MAX_MODULES));(fc[2]&&(h+=g-c[2]-f,_=s-1)}c[p=0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0}else c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,p=3;else c[++p]++;else c[p]++;l.foundPatternCross(c)&&!0===this.handlePossibleCenter(c,h,s,r)&&(f=c[0],this.hasSkipped&&(d=this.haveMultiplyConfirmedCenters()))}var v=this.selectBestPatterns();return i.default.orderBestPatterns(v),new u.default(v)},l.centerFromEnd=function(t,e){return e-t[4]-t[3]-t[2]/2},l.foundPatternCross=function(t){for(var e=0,r=0;r<5;r++){var n=t[r];if(0===n)return!1;e+=n}if(e<7)return!1;var o=e/7,i=o/2;return Math.abs(o-t[0])r)return!1;for(;i<=t&&i<=e&&a.get(e-i,t-i)&&o[0]<=r;)o[0]++,i++;if(o[0]>r)return!1;var u=a.getHeight(),s=a.getWidth();for(i=1;t+i=r)return!1;for(;t+i=r)return!1;var f=o[0]+o[1]+o[2]+o[3]+o[4];return Math.abs(f-n)<2*n&&l.foundPatternCross(o)},l.prototype.crossCheckVertical=function(t,e,r,n){for(var o=this.image,i=o.getHeight(),a=this.getCrossCheckStateCount(),u=t;0<=u&&o.get(e,u);)a[2]++,u--;if(u<0)return NaN;for(;0<=u&&!o.get(e,u)&&a[1]<=r;)a[1]++,u--;if(u<0||a[1]>r)return NaN;for(;0<=u&&o.get(e,u)&&a[0]<=r;)a[0]++,u--;if(a[0]>r)return NaN;for(u=t+1;u=r)return NaN;for(;u=r)return NaN;var s=a[0]+a[1]+a[2]+a[3]+a[4];return 5*Math.abs(s-n)>=2*n?NaN:l.foundPatternCross(a)?l.centerFromEnd(a,u):NaN},l.prototype.crossCheckHorizontal=function(t,e,r,n){for(var o=this.image,i=o.getWidth(),a=this.getCrossCheckStateCount(),u=t;0<=u&&o.get(u,e);)a[2]++,u--;if(u<0)return NaN;for(;0<=u&&!o.get(u,e)&&a[1]<=r;)a[1]++,u--;if(u<0||a[1]>r)return NaN;for(;0<=u&&o.get(u,e)&&a[0]<=r;)a[0]++,u--;if(a[0]>r)return NaN;for(u=t+1;u=r)return NaN;for(;u=r)return NaN;var s=a[0]+a[1]+a[2]+a[3]+a[4];return 5*Math.abs(s-n)>=n?NaN:l.foundPatternCross(a)?l.centerFromEnd(a,u):NaN},l.prototype.handlePossibleCenter=function(t,e,r,n){var o=t[0]+t[1]+t[2]+t[3]+t[4],i=l.centerFromEnd(t,r),u=this.crossCheckVertical(e,Math.floor(i),t[2],o);if(isNaN(u)||(i=this.crossCheckHorizontal(Math.floor(i),Math.floor(u),t[2],o),isNaN(i)||n&&!this.crossCheckDiagonal(Math.floor(u),Math.floor(i),t[2],o)))return!1;for(var s=o/7,f=!1,d=this.possibleCenters,c=0,h=d.length;c=l.CENTER_QUORUM){if(null!=r)return this.hasSkipped=!0,Math.floor((Math.abs(r.getX()-a.getX())-Math.abs(r.getY()-a.getY()))/2);r=a}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return 0},l.prototype.haveMultiplyConfirmedCenters=function(){var t,e,r,o,i=0,a=0,u=this.possibleCenters.length;try{for(var s=n(this.possibleCenters),f=s.next();!f.done;f=s.next())(_=f.value).getCount()>=l.CENTER_QUORUM&&(i++,a+=_.getEstimatedModuleSize())}catch(e){t={error:e}}finally{try{f&&!f.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}if(i<3)return!1;var d=a/u,c=0;try{for(var h=n(this.possibleCenters),p=h.next();!p.done;p=h.next()){var _=p.value;c+=Math.abs(_.getEstimatedModuleSize()-d)}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}return c<=.05*a},l.prototype.selectBestPatterns=function(){var t,e,r,o,i=this.possibleCenters.length;if(i<3)throw new s.default;var a,u=this.possibleCenters;if(3_&&(u.splice(g,1),g--)}}if(3=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(122),i=r(0),a=(u.prototype.find=function(){for(var t=this.startX,e=this.height,r=t+this.width,n=this.startY+e/2,o=new Int32Array(3),a=this.image,u=0;u=r)return!1;return!0},u.prototype.crossCheckVertical=function(t,e,r,n){var o=this.image,i=o.getHeight(),a=this.crossCheckStateCount;a[0]=0,a[1]=0,a[2]=0;for(var s=t;0<=s&&o.get(e,s)&&a[1]<=r;)a[1]++,s--;if(s<0||a[1]>r)return NaN;for(;0<=s&&!o.get(e,s)&&a[0]<=r;)a[0]++,s--;if(a[0]>r)return NaN;for(s=t+1;sr)return NaN;for(;sr)return NaN;var f=a[0]+a[1]+a[2];return 5*Math.abs(f-n)>=2*n?NaN:this.foundPatternCross(a)?u.centerFromEnd(a,s):NaN},u.prototype.handlePossibleCenter=function(t,e,r){var i,a,s=t[0]+t[1]+t[2],f=u.centerFromEnd(t,r),l=this.crossCheckVertical(e,f,2*t[1],s);if(!isNaN(l)){var d=(t[0]+t[1]+t[2])/3;try{for(var c=n(this.possibleCenters),h=c.next();!h.done;h=c.next()){var p=h.value;if(p.aboutEquals(d,l,f))return p.combineEstimate(l,f,d)}}catch(t){i={error:t}}finally{try{h&&!h.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}var _=new o.default(f,l,d);this.possibleCenters.push(_),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(_)}return null},u);function u(t,e,r,n,o,i,a){this.image=t,this.startX=e,this.startY=r,this.width=n,this.height=o,this.moduleSize=i,this.resultPointCallback=a,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}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 i,a=r(5),u=(o(s,i=a.default),s.prototype.aboutEquals=function(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){var n=Math.abs(t-this.estimatedModuleSize);return n<=1||n<=this.estimatedModuleSize}return!1},s.prototype.combineEstimate=function(t,e,r){return new s((this.getX()+e)/2,(this.getY()+t)/2,(this.estimatedModuleSize+r)/2)},s);function s(t,e,r){var n=i.call(this,t,e)||this;return n.estimatedModuleSize=r,n}e.default=u},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(5),i=r(7),a=r(17),u=r(124),s=(f.detectMultiple=function(t,e,r){var n=t.getBlackMatrix(),o=f.detect(r,n);return o.length||((n=n.clone()).rotate180(),o=f.detect(r,n)),new u.default(n,o)},f.detect=function(t,e){for(var r,o,i=new Array,a=0,u=0,s=!1;a=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(11),i=r(2),a=r(0),u=r(10),s=r(19),f=r(126),l=r(79),d=r(129),c=r(131),h=r(80),p=r(132),_=r(81),g=r(133),v=r(134),w=r(47),y=(A.decode=function(t,e,r,n,o,i,u){for(var s,f=new l.default(t,e,r,n,o),c=null,p=null,_=!0;;_=!1){if(null!=e&&(c=A.getRowIndicatorColumn(t,f,e,!0,i,u)),null!=n&&(p=A.getRowIndicatorColumn(t,f,n,!1,i,u)),null==(s=A.merge(c,p)))throw a.default.getNotFoundInstance();var g=s.getBoundingBox();if(!_||null==g||!(g.getMinY()f.getMaxY()))break;f=g}s.setBoundingBox(f);var v=s.getBarcodeColumnCount()+1;s.setDetectionResultColumn(0,c),s.setDetectionResultColumn(v,p);for(var w=null!=c,y=1;y<=v;y++){var E=w?y:v-y;if(void 0===s.getDetectionResultColumn(E)){var C=void 0;C=0===E||E===v?new d.default(f,0===E):new h.default(f),s.setDetectionResultColumn(E,C);for(var m=-1,I=m,S=f.getMinY();S<=f.getMaxY();S++){if((m=A.getStartColumn(s,E,S,w))<0||m>f.getMaxX()){if(-1===I)continue;m=I}var O=A.detectCodeword(t,f.getMinX(),f.getMaxX(),w,m,S,i,u);null!=O&&(C.setCodeword(S,O),I=m,i=Math.min(i,O.getWidth()),u=Math.max(u,O.getWidth()))}}}return A.createDecoderResult(s)},A.merge=function(t,e){if(null==t&&null==e)return null;var r=A.getBarcodeMetadata(t,e);if(null==r)return null;var n=l.default.merge(A.adjustBoundingBox(t),A.adjustBoundingBox(e));return new c.default(r,n)},A.adjustBoundingBox=function(t){var e,r;if(null==t)return null;var o=t.getRowHeights();if(null==o)return null;var i=A.getMax(o),a=0;try{for(var u=n(o),s=u.next();!s.done;s=u.next()){var f=s.value;if(a+=i-f,0=e.getMinY();l+=s){var c=A.detectCodeword(t,0,t.getWidth(),n,f,l,o,i);null!=c&&(a.setCodeword(l,c),f=n?c.getStartX():c.getEndX())}return a},A.adjustCodewordCount=function(t,e){var r=e[0][1],n=r.getValue(),o=t.getBarcodeColumnCount()*t.getBarcodeRowCount()-A.getNumberOfECCodeWords(t.getBarcodeECLevel());if(0===n.length){if(o<1||o>s.default.MAX_CODEWORDS_IN_BARCODE)throw a.default.getNotFoundInstance();r.setValue(o)}else n[0]!==o&&r.setValue(o)},A.createDecoderResult=function(t){var e=A.createBarcodeMatrix(t);A.adjustCodewordCount(t,e);for(var r=new Array,n=new Int32Array(t.getBarcodeRowCount()*t.getBarcodeColumnCount()),o=[],i=new Array,a=0;a=a.length)continue;a[v][f].setValue(g.getValue())}}}}catch(t){o={error:t}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}f++}}catch(t){e={error:t}}finally{try{d&&!d.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}return a},A.isValidBarcodeColumn=function(t,e){return 0<=e&&e<=t.getBarcodeColumnCount()+1},A.getStartColumn=function(t,e,r,o){var i,a,u=o?1:-1,s=null;if(A.isValidBarcodeColumn(t,e-u)&&(s=t.getDetectionResultColumn(e-u).getCodeword(r)),null!=s)return o?s.getEndX():s.getStartX();if(null!=(s=t.getDetectionResultColumn(e).getCodewordNearby(r)))return o?s.getStartX():s.getEndX();if(A.isValidBarcodeColumn(t,e-u)&&(s=t.getDetectionResultColumn(e-u).getCodewordNearby(r)),null!=s)return o?s.getEndX():s.getStartX();for(var f=0;A.isValidBarcodeColumn(t,e-u);){e-=u;try{for(var l=n(t.getDetectionResultColumn(e).getCodewords()),d=l.next();!d.done;d=l.next()){var c=d.value;if(null!=c)return(o?c.getEndX():c.getStartX())+u*f*(c.getEndX()-c.getStartX())}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}f++}return o?t.getBoundingBox().getMinX():t.getBoundingBox().getMaxX()},A.detectCodeword=function(t,e,r,n,o,i,a,f){o=A.adjustCodewordStartColumn(t,e,r,n,o,i);var l,d=A.getModuleBitCount(t,e,r,n,o,i);if(null==d)return null;var c=u.default.sum(d);if(n)l=o+c;else{for(var h=0;hA.CODEWORD_SKEW_SIZE)return o;a+=u}u=-u,n=!n}return a},A.checkCodewordSkew=function(t,e,r){return e-A.CODEWORD_SKEW_SIZE<=t&&t<=r+A.CODEWORD_SKEW_SIZE},A.decodeCodewords=function(t,e,r){if(0===t.length)throw i.default.getFormatInstance();var n=1<r/2+A.MAX_ERRORS||r<0||A.MAX_EC_CODEWORDSt.length)throw i.default.getFormatInstance();if(0===r){if(!(e>=1;return e},A.getCodewordBucketNumber=function(t){return t instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(t):this.getCodewordBucketNumber_number(t)},A.getCodewordBucketNumber_number=function(t){return A.getCodewordBucketNumber(A.getBitCountForCodeword(t))},A.getCodewordBucketNumber_Int32Array=function(t){return(t[0]-t[2]+t[4]-t[6]+9)%9},A.toString=function(t){for(var e=new w.default,r=0;r=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(11),i=r(78),a=r(127),u=(s.prototype.decode=function(t,e,r){for(var a,u,s=new i.default(this.field,t),f=new Int32Array(e),l=!1,d=e;0=Math.round(r/2);){var f=i,l=u;if(u=s,(i=a).isZero())throw o.default.getChecksumInstance();a=f;for(var d=this.field.getZero(),c=i.getCoefficient(i.getDegree()),h=this.field.inverse(c);a.getDegree()>=i.getDegree()&&!a.isZero();){var p=a.getDegree()-i.getDegree(),_=this.field.multiply(a.getCoefficient(a.getDegree()),h);d=d.add(this.field.buildMonomial(p,_)),a=a.subtract(i.multiplyByMonomial(p,_))}s=d.multiply(u).subtract(l).negative()}var g=s.getCoefficient(0);if(0===g)throw o.default.getChecksumInstance();var v=this.field.inverse(g);return[s.multiply(v),a.multiply(v)]},s.prototype.findErrorLocations=function(t){for(var e=t.getDegree(),r=new Int32Array(e),n=0,i=1;i=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(19),s=r(130),f=r(80),l=r(81),d=(o(c,a=f.default),c.prototype.setRowNumbers=function(){var t,e;try{for(var r=i(this.getCodewords()),n=r.next();!n.done;n=r.next()){var o=n.value;null!=o&&o.setRowNumberAsRowIndicatorColumn()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},c.prototype.adjustCompleteIndicatorColumnRowNumbers=function(t){var e=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(e,t);for(var r=this.getBoundingBox(),n=this._isLeft?r.getTopLeft():r.getTopRight(),o=this._isLeft?r.getBottomLeft():r.getBottomRight(),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.imageRowToCodewordIndex(Math.trunc(o.getY())),u=-1,s=1,f=0,l=i;l=t.getRowCount()||l=n.length)continue;n[s]++}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return n},c.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(t){for(var e=this.getBoundingBox(),r=this._isLeft?e.getTopLeft():e.getTopRight(),n=this._isLeft?e.getBottomLeft():e.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(r.getY())),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.getCodewords(),u=-1,s=1,f=0,l=o;l=t.getRowCount()?a[l]=null:(u=d.getRowNumber(),f=1)}},c.prototype.getBarcodeMetadata=function(){var t,e,r=this.getCodewords(),n=new l.default,o=new l.default,a=new l.default,f=new l.default;try{for(var d=i(r),c=d.next();!c.done;c=d.next()){var h=c.value;if(null!=h){h.setRowNumberAsRowIndicatorColumn();var p=h.getValue()%30,_=h.getRowNumber();switch(this._isLeft||(_+=2),_%3){case 0:o.setValue(3*p+1);break;case 1:f.setValue(p/3),a.setValue(p%3);break;case 2:n.setValue(1+p)}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=d.return)&&e.call(d)}finally{if(t)throw t.error}}if(0===n.getValue().length||0===o.getValue().length||0===a.getValue().length||0===f.getValue().length||n.getValue()[0]<1||o.getValue()[0]+a.getValue()[0]u.default.MAX_ROWS_IN_BARCODE)return null;var g=new s.default(n.getValue()[0],o.getValue()[0],a.getValue()[0],f.getValue()[0]);return this.removeIncorrectCodewords(r,g),g},c.prototype.removeIncorrectCodewords=function(t,e){for(var r=0;re.getRowCount())t[r]=null;else switch(this._isLeft||(i+=2),i%3){case 0:3*o+1!==e.getRowCountUpperPart()&&(t[r]=null);break;case 1:Math.trunc(o/3)===e.getErrorCorrectionLevel()&&o%3===e.getRowCountLowerPart()||(t[r]=null);break;case 2:1+o!==e.getColumnCount()&&(t[r]=null)}}}},c.prototype.isLeft=function(){return this._isLeft},c.prototype.toString=function(){return"IsLeft: "+this._isLeft+"\n"+a.prototype.toString.call(this)},c);function c(t,e){var r=a.call(this,t)||this;return r._isLeft=e,r}e.default=d},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getColumnCount=function(){return this.columnCount},o.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},o.prototype.getRowCount=function(){return this.rowCount},o.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},o.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},o);function o(t,e,r,n){this.columnCount=t,this.errorCorrectionLevel=n,this.rowCountUpperPart=e,this.rowCountLowerPart=r,this.rowCount=e+r}e.default=n},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(19),i=r(47),a=(u.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);for(var t,e=o.default.MAX_CODEWORDS_IN_BARCODE;t=e,0<(e=this.adjustRowNumbersAndGetCount())&&e>=1;r=1&e,u.RATIOS_TABLE[t]||(u.RATIOS_TABLE[t]=new Array(o.default.BARS_IN_MODULE)),u.RATIOS_TABLE[t][o.default.BARS_IN_MODULE-n-1]=Math.fround(i/o.default.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},u.getDecodedValue=function(t){var e=u.getDecodedCodewordValue(u.sampleBitCounts(t));return-1!==e?e:u.getClosestDecodedValue(t)},u.sampleBitCounts=function(t){for(var e=n.default.sum(t),r=new Int32Array(o.default.BARS_IN_MODULE),i=0,a=0,u=0;ut[0])throw a.default.getFormatInstance();for(var n=new Int32Array(y.NUMBER_OF_SEQUENCE_CODEWORDS),o=0;o>v(8*(5-d))));a=u=0}}n===e[0]&&l>v(8*(5-d))));a=u=0}}}return o.append(_.default.decode(i.toByteArray(),r)),n},y.numericCompaction=function(t,e,r){for(var n=0,o=!1,i=new Int32Array(y.MAX_NUMERIC_CODEWORDS);e@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",y.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",y.EXP900=g()?function(){var t=[];t[0]=v(1);var e=v(900);t[1]=e;for(var r=2;r<16;r++)t[r]=t[r-1]*e;return t}():[],y.NUMBER_OF_SEQUENCE_CODEWORDS=2,y);function y(){}e.default=w}).call(this,r(135))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getSegmentIndex=function(){return this.segmentIndex},o.prototype.setSegmentIndex=function(t){this.segmentIndex=t},o.prototype.getFileId=function(){return this.fileId},o.prototype.setFileId=function(t){this.fileId=t},o.prototype.getOptionalData=function(){return this.optionalData},o.prototype.setOptionalData=function(t){this.optionalData=t},o.prototype.isLastSegment=function(){return this.lastSegment},o.prototype.setLastSegment=function(t){this.lastSegment=t},o.prototype.getSegmentCount=function(){return this.segmentCount},o.prototype.setSegmentCount=function(t){this.segmentCount=t},o.prototype.getSender=function(){return this.sender||null},o.prototype.setSender=function(t){this.sender=t},o.prototype.getAddressee=function(){return this.addressee||null},o.prototype.setAddressee=function(t){this.addressee=t},o.prototype.getFileName=function(){return this.fileName},o.prototype.setFileName=function(t){this.fileName=t},o.prototype.getFileSize=function(){return this.fileSize},o.prototype.setFileSize=function(t){this.fileSize=t},o.prototype.getChecksum=function(){return this.checksum},o.prototype.setChecksum=function(t){this.checksum=t},o.prototype.getTimestamp=function(){return this.timestamp},o.prototype.setTimestamp=function(t){this.timestamp=t},o);function o(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.parseLong=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},o);function o(){}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 i,a=r(17),u=r(139),s=r(16),f=r(1),l=r(141),d=r(7),c=r(33),h=(o(p,i=u.default),p.prototype.ensureCapacity=function(t){0t.length||r<0||0t.length||r<0||e+r>t.length||e+r<0)throw new n.default;if(0!==r)for(var i=0;i=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(17),i=r(4),a=(u.prototype.getHeight=function(){return this.height},u.prototype.getWidth=function(){return this.width},u.prototype.get=function(t,e){return this.bytes[e][t]},u.prototype.getArray=function(){return this.bytes},u.prototype.setNumber=function(t,e,r){this.bytes[e][t]=r},u.prototype.setBoolean=function(t,e,r){this.bytes[e][t]=r?1:0},u.prototype.clear=function(t){var e,r;try{for(var i=n(this.bytes),a=i.next();!a.done;a=i.next()){var u=a.value;o.default.fill(u,t)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}},u.prototype.equals=function(t){if(!(t instanceof u))return!1;var e=t;if(this.width!==e.width)return!1;if(this.height!==e.height)return!1;for(var r=0,n=this.height;r=r;)t^=e<=this.getHeight())throw new f.default("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length=this.getHeight())throw new f.default("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length>16&255,_=h>>7&510,g=255&h;d[c]=(p+_+g)/4&255}s.luminances=d}else s.luminances=t;if(void 0===n&&(s.dataWidth=e),void 0===o&&(s.dataHeight=r),void 0===a&&(s.left=0),void 0===u&&(s.top=0),s.left+e>s.dataWidth||s.top+r>s.dataHeight)throw new f.default("Crop rectangle does not fit within image data.");return s}e.default=l},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)}),i=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(0),f=r(9),l=r(10),d=r(62),c=r(36),h=r(63),p=r(64),_=r(152),g=r(165),v=r(166),w=r(167),y=r(7),A=(o(E,a=d.default),E.prototype.decodeRow=function(t,e,r){this.pairs.length=0,this.startFromEven=!1;try{return E.constructResult(this.decodeRow2pairs(t,e))}catch(t){console.log(t)}return this.pairs.length=0,this.startFromEven=!0,E.constructResult(this.decodeRow2pairs(t,e))},E.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},E.prototype.decodeRow2pairs=function(t,e){for(var r,n=!1;!n;)try{this.pairs.push(this.retrieveNextPair(e,this.pairs,t))}catch(t){if(!this.pairs.length)throw new t;n=!0}if(this.checkChecksum())return this.pairs;if(r=!!this.rows.length,this.storeRow(t,!1),r){var o=this.checkRowsBoolean(!1);if(null!=o)return o;if(null!=(o=this.checkRowsBoolean(!0)))return o}throw new s.default},E.prototype.checkRowsBoolean=function(t){if(25a.length)){for(var u=!0,s=0;st){o=i.isEquivalent(this.pairs);break}n=i.isEquivalent(this.pairs),r++}o||n||E.isPartialRow(this.pairs,this.rows)||(this.rows.push(r,new v.default(this.pairs,t,e)),this.removePartialRows(this.pairs,this.rows))},E.prototype.removePartialRows=function(t,e){var r,n,o,a,u,s;try{for(var f=i(e),l=f.next();!l.done;l=f.next()){var d=l.value;if(d.getPairs().length!==t.length)try{for(var c=i(d.getPairs()),h=c.next();!h.done;h=c.next()){var p=h.value;try{for(var _=i(t),v=_.next();!v.done;v=_.next()){var w=v.value;if(g.default.equals(p,w))break}}catch(t){u={error:t}}finally{try{v&&!v.done&&(s=_.return)&&s.call(_)}finally{if(u)throw u.error}}}}catch(t){o={error:t}}finally{try{h&&!h.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}}}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}},E.isPartialRow=function(t,e){var r,n,o,a,u,s;try{for(var f=i(e),l=f.next();!l.done;l=f.next()){var d=l.value,c=!0;try{for(var h=i(t),p=h.next();!p.done;p=h.next()){var _=p.value,g=!1;try{for(var v=i(d.getPairs()),w=v.next();!w.done;w=v.next()){var y=w.value;if(_.equals(y)){g=!0;break}}}catch(t){u={error:t}}finally{try{w&&!w.done&&(s=v.return)&&s.call(v)}finally{if(u)throw u.error}}if(!g){c=!1;break}}}catch(t){o={error:t}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}if(c)return!0}}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}return!1},E.prototype.getRows=function(){return this.rows},E.constructResult=function(t){var e=w.default.buildBitArray(t),r=_.createDecoder(e).parseInformation(),n=t[0].getFinderPattern().getResultPoints(),o=t[t.length-1].getFinderPattern().getResultPoints(),i=[n[0],n[1],o[0],o[1]];return new f.default(r,null,null,i,u.default.RSS_EXPANDED,null)},E.prototype.checkChecksum=function(){var t=this.pairs.get(0),e=t.getLeftChar(),r=t.getRightChar();if(null==r)return!1;for(var n=r.getChecksumPortion(),o=2,i=1;i=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(0),i=(a.parseFieldsInGeneralPurpose=function(t){var e,r,i,u,s,f,l,d;if(!t)return null;if(t.length<2)throw new o.default;var c=t.substring(0,2);try{for(var h=n(a.TWO_DIGIT_DATA_LENGTH),p=h.next();!p.done;p=h.next())if((m=p.value)[0]===c)return m[1]===a.VARIABLE_LENGTH?a.processVariableAI(2,m[2],t):a.processFixedAI(2,m[1],t)}catch(t){e={error:t}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(e)throw e.error}}if(t.length<3)throw new o.default;var _=t.substring(0,3);try{for(var g=n(a.THREE_DIGIT_DATA_LENGTH),v=g.next();!v.done;v=g.next())if((m=v.value)[0]===_)return m[1]===a.VARIABLE_LENGTH?a.processVariableAI(3,m[2],t):a.processFixedAI(3,m[1],t)}catch(t){i={error:t}}finally{try{v&&!v.done&&(u=g.return)&&u.call(g)}finally{if(i)throw i.error}}try{for(var w=n(a.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),y=w.next();!y.done;y=w.next())if((m=y.value)[0]===_)return m[1]===a.VARIABLE_LENGTH?a.processVariableAI(4,m[2],t):a.processFixedAI(4,m[1],t)}catch(t){s={error:t}}finally{try{y&&!y.done&&(f=w.return)&&f.call(w)}finally{if(s)throw s.error}}if(t.length<4)throw new o.default;var A=t.substring(0,4);try{for(var E=n(a.FOUR_DIGIT_DATA_LENGTH),C=E.next();!C.done;C=E.next()){var m;if((m=C.value)[0]===A)return m[1]===a.VARIABLE_LENGTH?a.processVariableAI(4,m[2],t):a.processFixedAI(4,m[1],t)}}catch(t){l={error:t}}finally{try{C&&!C.done&&(d=E.return)&&d.call(E)}finally{if(l)throw l.error}}throw new o.default},a.processFixedAI=function(t,e,r){if(r.length + +
+} diff --git a/EgwCoreLib.Razor/BarcodeReader.razor.cs b/EgwCoreLib.Razor/BarcodeReader.razor.cs new file mode 100644 index 0000000..b7b4ece --- /dev/null +++ b/EgwCoreLib.Razor/BarcodeReader.razor.cs @@ -0,0 +1,260 @@ +using Microsoft.AspNetCore.Components; +using Microsoft.JSInterop; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using EgwCoreLib.Utils; +using ZXingBlazor.Components; + +namespace EgwCoreLib.Razor +{ + public partial class BarcodeReader : IAsyncDisposable + { + + [Inject] + [NotNull] + private IJSRuntime? JS { get; set; } + + private IJSObjectReference? module; + + private DotNetObjectReference? Instance { get; set; } + + [NotNull] + private StorageService? Storage { get; set; } + + /// + /// Scan button title + /// + [Parameter] + public string ScanBtnTitle { get; set; } = "扫码"; + + /// + /// Reset button title + /// + [Parameter] + public string ResetBtnTitle { get; set; } = "复位"; + + /// + /// Close button title + /// + [Parameter] + public string CloseBtnTitle { get; set; } = "关闭"; + + /// + /// Select device button title + /// + [Parameter] + public string SelectDeviceBtnTitle { get; set; } = "选择设备"; + + /// + /// Scan result callback method + /// + [Parameter] + public EventCallback ScanResult { get; set; } + + /// + /// Close scan code callback method + /// + [Parameter] + public EventCallback Close { get; set; } + + /// + /// Error callback method + /// + [Parameter] + public Func? OnError { get; set; } + + /// + /// Use builtin Div + /// + [Parameter] public bool UseBuiltinDiv { get; set; } = true; + + /// + /// Decode only Pdf417 format + /// + [Parameter] + public bool Pdf417Only { get; set; } + + /// + /// Decode Once or Decode Continuously, default is Once + /// + [Parameter] + public bool Decodeonce { get; set; } = true; + + /// + /// Decode All Formats, performance is poor, you can set options.formats to customize specify the encoding formats. The default is false + /// + [Parameter] + public bool DecodeAllFormats { get; set; } + + /// + /// ZXingOptions + /// + [Parameter] + public ZXingOptions? Options { get; set; } + + /// + /// + /// + public ElementReference Element { get; set; } + + /// + /// Device ID + /// + [Parameter] + public string? DeviceID { get; set; } + + /// + /// Save the last used device ID to be called automatically next time + /// + [Parameter] + public bool SaveDeviceID { get; set; } = true; + + // To prevent making JavaScript interop calls during prerendering + protected override async Task OnAfterRenderAsync(bool firstRender) + { + try + { + if (!firstRender) return; + Storage = new StorageService(JS); + module = await JS.InvokeAsync("import", "./_content/EgwCoreLib.Razor/BarcodeReader.razor.js" + "?v=" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version); + Instance = DotNetObjectReference.Create(this); + if (Options == null) + { + Options = new ZXingOptions() + { + Pdf417 = Pdf417Only, + Decodeonce = Decodeonce, + DecodeAllFormats = DecodeAllFormats, + //TRY_HARDER = true + }; + } + try + { + if (SaveDeviceID) DeviceID = await Storage.GetValue("CamsDeviceID", DeviceID); + } + catch (Exception) + { + + } + await module.InvokeVoidAsync("init", Instance, Element, Element.Id, Options, DeviceID); + } + catch (Exception e) + { + if (OnError != null) await OnError.Invoke(e.Message); + } + + } + + public async Task Start() + { + await module!.InvokeVoidAsync("start", Element.Id); + } + + public async Task Stop() + { + await module!.InvokeVoidAsync("stop", Element.Id); + } + + public async Task Reload() + { + await module!.InvokeVoidAsync("reload", Element.Id); + } + + [JSInvokable] + public async Task GetResult(string val) => await ScanResult.InvokeAsync(val); + + [JSInvokable] + public async Task CloseScan() => await Close.InvokeAsync(); + + [JSInvokable] + public async Task GetError(string err) + { + if (OnError != null) await OnError.Invoke(err); + } + + async ValueTask IAsyncDisposable.DisposeAsync() + { + await module!.InvokeVoidAsync("destroy", Element.Id); + Instance?.Dispose(); + if (module is not null) + { + await module.DisposeAsync(); + } + } + + /// + /// 选择摄像头回调方法 + /// + /// + /// + [JSInvokable] + public async Task SelectDeviceID(string deviceID, string deviceName) + { + try + { + if (SaveDeviceID) + { + await Storage.SetValue("CamsDeviceID", deviceID); + await Storage.SetValue("CamsDeviceName", deviceName); + } + } + catch + { + } + } + + #region StorageService + private class StorageService + { + private readonly IJSRuntime JSRuntime; + + public StorageService(IJSRuntime jsRuntime) + { + JSRuntime = jsRuntime; + } + + public async Task SetValue(string key, TValue value) + { + await JSRuntime.InvokeVoidAsync("eval", $"localStorage.setItem('{key}', '{value}')"); + } + + public async Task GetValue(string key, TValue? def) + { + try + { + var cValue = await JSRuntime.InvokeAsync("eval", $"localStorage.getItem('{key}');"); + return cValue ?? def; + } + catch + { + var cValue = await JSRuntime.InvokeAsync("eval", $"localStorage.getItem('{key}');"); + if (cValue == null) + return def; + + var newValue = GetValueI(cValue); + return newValue ?? def; + + } + } + + public static T? GetValueI(string value) + { + TypeConverter converter = TypeDescriptor.GetConverter(typeof(T)); + if (converter != null) + { + return (T?)converter.ConvertFrom(value); + } + return default; + //return (T)Convert.ChangeType(value, typeof(T)); + } + + public async Task RemoveValue(string key) + { + await JSRuntime.InvokeVoidAsync("eval", $"localStorage.removeItem('{key}')"); + } + + + } + #endregion + } +} diff --git a/EgwCoreLib.Razor/BarcodeReader.razor.js b/EgwCoreLib.Razor/BarcodeReader.razor.js new file mode 100644 index 0000000..e9f3b8f --- /dev/null +++ b/EgwCoreLib.Razor/BarcodeReader.razor.js @@ -0,0 +1,317 @@ +import './lib/zxing/zxing.min.js'; +let codeReader = null; +let id = null; +let supportsVibrate = false; +let opt = null; +let inst = null; +let selectedDeviceId = null; +let deviceID = null; +let element = null; +let debug = false; +export function vibrate() { + if (supportsVibrate) navigator.vibrate(1000); +} +export function init(instance, ele, elementid, options, deviceid) { + console.log('init' + elementid); + inst = instance; + opt = options; + id = elementid; + deviceID = deviceid; + element = ele; + debug = options.debug; + supportsVibrate = "vibrate" in navigator; + let startButton = element.querySelector("[data-action=startButton]"); + let resetButton = element.querySelector("[data-action=resetButton]"); + let closeButton = element.querySelector("[data-action=closeButton]"); + + if (startButton) startButton.addEventListener('click', () => { + start(elementid); + }) + + if (resetButton) resetButton.addEventListener('click', () => { + stop(elementid); + if (debug) console.log('Reset.') + }) + + if (closeButton) closeButton.addEventListener('click', () => { + stop(elementid); + if (debug) console.log('closeButton.') + instance.invokeMethodAsync("CloseScan"); + }) + + load(elementid); +} + +export function reload(elementid) { + load(elementid); +} + +function genHints(opt) { + const hints = new Map(); + if (opt.TRY_HARDER) { + hints.set(ZXing.DecodeHintType.TRY_HARDER, opt.TRY_HARDER); + } + if (opt.ASSUME_CODE_39_CHECK_DIGIT) { + hints.set(ZXing.DecodeHintType.ASSUME_CODE_39_CHECK_DIGIT, opt.ASSUME_CODE_39_CHECK_DIGIT); + } + if (opt.ASSUME_GS1) { + hints.set(ZXing.DecodeHintType.ASSUME_GS1, opt.ASSUME_GS1); + } + if (opt.CHARACTER_SET) { + hints.set(ZXing.DecodeHintType.CHARACTER_SET, opt.CHARACTER_SET); + } + if (opt.OTHER) { + hints.set(ZXing.DecodeHintType.OTHER, opt.OTHER); + } + if (opt.PURE_BARCODE) { + hints.set(ZXing.DecodeHintType.PURE_BARCODE, opt.PURE_BARCODE); + } + if (opt.RETURN_CODABAR_START_END) { + hints.set(ZXing.DecodeHintType.RETURN_CODABAR_START_END, opt.RETURN_CODABAR_START_END); + } + if (opt.TRY_HARDER) { + hints.set(ZXing.DecodeHintType.TRY_HARDER, opt.TRY_HARDER); + } + return hints; +} + +export function load(elementid) { + if (id == elementid) { + + const sourceSelect = element.querySelector("[data-action=sourceSelect]"); + const sourceSelectPanel = element.querySelector("[data-action=sourceSelectPanel]"); + const hints = genHints(opt); + + if (opt.pdf417) { + codeReader = new ZXing.BrowserPDF417Reader(hints); + if (debug) console.log('ZXing code PDF417 reader initialized') + } else if (opt.decodeAllFormats) { + const formats = opt.formats; + hints.set(ZXing.DecodeHintType.POSSIBLE_FORMATS, formats); + codeReader = new ZXing.BrowserMultiFormatReader(hints) + if (debug) console.log('ZXing code reader initialized with all formats') + } else { + codeReader = new ZXing.BrowserMultiFormatReader(hints) + if (debug) console.log('ZXing code reader initialized') + } + codeReader.timeBetweenDecodingAttempts = opt.timeBetweenDecodingAttempts; + + if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { + navigator.mediaDevices + .getUserMedia({ audio: false, video: true }) + .then(() => { + + codeReader.listVideoInputDevices() + .then((videoInputDevices) => { + if (deviceID != null) { + selectedDeviceId = deviceID + } else if (videoInputDevices.length > 1) { + selectedDeviceId = videoInputDevices[1].deviceId + } else { + selectedDeviceId = videoInputDevices[0].deviceId + } + if (debug) console.log('videoInputDevices:' + videoInputDevices.length); + if (videoInputDevices.length > 1) { + sourceSelect.innerHTML = ''; + videoInputDevices.forEach((device) => { + const sourceOption = document.createElement('option'); + if (device.label === '') { + sourceOption.text = 'Camera' + (sourceSelect.length + 1); + } else { + sourceOption.text = device.label + } + sourceOption.value = device.deviceId + if (selectedDeviceId != null && device.deviceId == selectedDeviceId) { + sourceOption.selected = true + } + sourceSelect.appendChild(sourceOption) + }) + + sourceSelect.onchange = () => { + selectedDeviceId = sourceSelect.value; + inst.invokeMethodAsync('SelectDeviceID', selectedDeviceId, sourceSelect.options[sourceSelect.selectedIndex].text); + codeReader.reset(); + start(elementid); + } + + sourceSelectPanel.style.display = 'block' + } + + start(elementid); + + }) + .catch((err) => { + console.log(err) + inst.invokeMethodAsync("GetError", err + ''); + }) + + }) + .catch((err) => { + console.error(`An error occurred: ${err}`); + inst.invokeMethodAsync('GetError', `An error occurred: ${err}`); + }); + + } + } +} + +export function start(elementid) { + if (undefined !== codeReader && null !== codeReader && id == elementid) { + if (opt.decodeonce) { + codeReader.decodeOnceFromVideoDevice(selectedDeviceId, 'video').then((result) => { + if (debug) console.log(result) + vibrate(); + if (debug) console.log('autostop'); + codeReader.reset(); + return inst.invokeMethodAsync("GetResult", result.text); + }).catch((err) => { + if (err && !(err instanceof ZXing.NotFoundException)) { + console.log(err) + inst.invokeMethodAsync("GetError", err + ''); + } + }) + } else { + codeReader.decodeFromVideoDevice(selectedDeviceId, 'video', (result, err) => { + if (result) { + if (debug) console.log(result) + vibrate(); + if (debug) console.log('None-stop'); + inst.invokeMethodAsync("GetResult", result.text); + } + if (err && !(err instanceof ZXing.NotFoundException)) { + console.log(err) + inst.invokeMethodAsync("GetError", err + ''); + } + }) + } + + var x = `decodeContinuously`; + if (opt.decodeonce) x = `decodeOnce`; + if (debug) console.log(`Started ` + x + ` decode from camera with id ${selectedDeviceId}`) + if (debug) console.log(id, 'start'); + } +} + +export function stop(elementid) { + if (undefined !== codeReader && null !== codeReader && id == elementid) { + codeReader.reset(); + if (debug) console.log(id, 'stop'); + } +} + +export function QRCodeSvg(instance, input, element, tobase64, size = 300) { + const codeWriter = new ZXing.BrowserQRCodeSvgWriter() + + if (debug) console.log('ZXing code writer initialized') + + if (tobase64) { + const elementTemp = document.createElement('elementTemp'); + codeWriter.writeToDom(elementTemp, input, size, size) + let svgElement = elementTemp.firstChild + const svgData = (new XMLSerializer()).serializeToString(svgElement) + //const blob = new Blob([svgData]) + instance.invokeMethodAsync("GetQRCode", svgData); + } else { + codeWriter.writeToDom(element.querySelector("[data-action=result]"), input, size, size) + } +} + +export function DecodeFormImage(instance, element, options, data) { + var codeReaderImage = null; + const hints = genHints(options); + if (options.pdf417) { + codeReaderImage = new ZXing.BrowserPDF417Reader(hints); + if (debug) console.log('ZXing code PDF417 reader initialized') + } else if (options.decodeAllFormats) { + const formats = options.formats; + hints.set(ZXing.DecodeHintType.POSSIBLE_FORMATS, formats); + codeReaderImage = new ZXing.BrowserMultiFormatReader(hints) + if (debug) console.log('ZXing code reader initialized with all formats') + } else { + codeReaderImage = new ZXing.BrowserMultiFormatReader(hints) + if (debug) console.log('ZXing code reader initialized') + } + if (debug) console.log('ZXing code reader initialized') + + if (data != null) { + codeReaderImage.decodeFromImageUrl(data).then(result => { + if (result) { + vibrate(); + if (debug) console.log(result.text); + instance.invokeMethodAsync('GetResult', result.text) + } + }).catch((err) => { + if (err) { + console.log(err) + instance.invokeMethodAsync('GetError', err.message) + } + }) + + } + else { + const resetFile = () => { + let file = element.querySelector('[type="file"]') + if (file) { + file.removeEventListener('change', scanImageHandler) + file.remove() + } + file = document.createElement('input') + file.setAttribute('type', 'file') + file.setAttribute('hidden', 'true') + file.setAttribute('accept', 'image/*') + //file.setAttribute('capture', 'true') + element.append(file) + file.addEventListener('change', scanImageHandler) + codeReaderImage.file = file + return file + } + + const scanImageHandler = () => { + const files = codeReaderImage.file.files + if (files.length === 0) { + return + } + + + const reader = new FileReader() + reader.onloadend = e => { + + codeReaderImage.decodeFromImageUrl(e.target.result).then(result => { + if (result) { + vibrate(); + if (debug) console.log(result.text); + instance.invokeMethodAsync('GetResult', result.text) + } else { + instance.invokeMethodAsync('GetError', "no valid barcode detected") + } + }).catch((err) => { + if (err) { + console.log(err) + instance.invokeMethodAsync('GetError', err.message) + } + }) + } + reader.readAsDataURL(files[0]) + } + + let file = resetFile() + file.click() + + } + +} + +export function destroy(elementid) { + if (undefined !== codeReader && null !== codeReader && id == elementid) { + codeReader.reset(); + codeReader = null; + //id = null; + id = null; + opt = null; + inst = null; + selectedDeviceId = null; + deviceID = null; + element = null; + if (debug) console.log(id, 'destroy'); + } +} \ No newline at end of file diff --git a/EgwCoreLib.Razor/wwwroot/lib/zxing/zxing.min.js b/EgwCoreLib.Razor/wwwroot/lib/zxing/zxing.min.js new file mode 100644 index 0000000..4f5b4ae --- /dev/null +++ b/EgwCoreLib.Razor/wwwroot/lib/zxing/zxing.min.js @@ -0,0 +1 @@ +!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 i, a = r(6), u = (o(s, i = a.default), s.getNotFoundInstance = function () { return new s }, s); function s() { return null !== i && i.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 i, a = r(6), u = (o(s, i = a.default), s); function s() { return null !== i && i.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 i, a = r(6), u = (o(s, i = a.default), s.getFormatInstance = function () { return new s }, s); function s() { return null !== i && i.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(21), o = (i.prototype.enableDecoding = function (t) { return this.encoding = t, this }, i.prototype.append = function (t) { return "string" == typeof t ? this.value += t.toString() : this.encoding ? this.value += n.default.decode(new Uint8Array([t]), this.encoding) : this.value += String.fromCharCode(t), this }, i.prototype.length = function () { return this.value.length }, i.prototype.charAt = function (t) { return this.value.charAt(t) }, i.prototype.deleteCharAt = function (t) { this.value = this.value.substr(0, t) + this.value.substring(t + 1) }, i.prototype.setCharAt = function (t, e) { this.value = this.value.substr(0, t) + e + this.value.substr(t + 1) }, i.prototype.substring = function (t, e) { return this.value.substring(t, e) }, i.prototype.setLengthToZerfacingModeo = function () { this.value = "" }, i.prototype.toString = function () { return this.value }, i.prototype.insert = function (t, e) { this.value = this.value.substr(0, t) + e + this.value.substr(t + e.length) }, i); function i(t) { void 0 === t && (t = ""), this.value = t } e.default = o }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var n = r(10), o = r(59), i = (a.prototype.getX = function () { return this.x }, a.prototype.getY = function () { return this.y }, a.prototype.equals = function (t) { if (t instanceof a) { var e = t; return this.x === e.x && this.y === e.y } return !1 }, a.prototype.hashCode = function () { return 31 * o.default.floatToIntBits(this.x) + o.default.floatToIntBits(this.y) }, a.prototype.toString = function () { return "(" + this.x + "," + this.y + ")" }, a.orderBestPatterns = function (t) { var e, r, n, o = this.distance(t[0], t[1]), i = this.distance(t[1], t[2]), a = this.distance(t[0], t[2]); if (n = o <= i && a <= i ? (r = t[0], e = t[1], t[2]) : i <= a && o <= a ? (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 }, a.distance = function (t, e) { return n.default.distance(t.x, t.y, e.x, e.y) }, a.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) }, a); function a(t, e) { this.x = t, this.y = e } e.default = i }, 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 i, a = r(94), u = (o(s, i = a.CustomError), s); function s(t) { void 0 === t && (t = void 0); var e = i.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"; 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"; Object.defineProperty(e, "__esModule", { value: !0 }); var n = r(7), o = (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 Array(e.length + t.length); n.default.arraycopy(e, 0, r, 0, e.length), n.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, o, i, a) { void 0 === r && (r = null == e ? 0 : 8 * e.length), void 0 === a && (a = n.default.currentTimeMillis()), this.text = t, this.rawBytes = e, this.numBits = r, this.resultPoints = o, this.format = i, this.timestamp = a, this.text = t, this.rawBytes = e, this.numBits = null == r ? null == e ? 0 : 8 * e.length : r, this.resultPoints = o, this.format = i, this.resultMetadata = null, this.timestamp = null == a ? n.default.currentTimeMillis() : a } e.default = o }, 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, i = e - n; return Math.sqrt(o * o + i * i) }, 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"; 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 i, a = r(6), u = (o(s, i = a.default), s.getChecksumInstance = function () { return new s }, s); function s() { return null !== i && i.apply(this, arguments) || this } e.default = u }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var n = r(15), o = r(7), i = r(17), a = r(4), 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 i = t[o], a = 0; a < r; a++)i[a] && n.set(a, 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, i = 0, a = -1, s = 0, l = 0; l < t.length;)if ("\n" === t.charAt(l) || "\r" === t.charAt(l)) { if (i < o) { if (-1 === a) a = o - i; else if (o - i !== a) throw new u.default("row lengths do not match"); i = o, s++ } l++ } else if (t.substring(l, l + e.length) === e) l += e.length, n[o] = !0, o++; else { if (t.substring(l, l + r.length) !== r) throw new u.default("illegal character encountered: " + t.substring(l)); l += r.length, n[o] = !1, o++ } if (i < o) { if (-1 === a) a = o - i; else if (o - i !== a) throw new u.default("row lengths do not match"); s++ } for (var d = new f(a, s), c = 0; c < o; c++)n[c] && d.set(Math.floor(c % a), Math.floor(c / a)); return d }, 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, i = 0, a = this.height; i < a; i++)for (var s = i * r, f = t.getRow(i, e).getBitArray(), l = 0; l < r; l++)o[s + l] ^= f[l] }, 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, i = e + n; if (i > this.height || o > this.width) throw new u.default("The region must fit inside the matrix"); for (var a = this.rowSize, s = this.bits, f = e; f < i; f++)for (var l = f * a, d = t; d < o; d++)s[l + Math.floor(d / 32)] |= 1 << (31 & d) & 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, i = t * r, a = 0; a < r; a++)e.setBulk(32 * a, o[i + a]); 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), i = 0, a = Math.floor((e + 1) / 2); i < a; i++)r = this.getRow(i, r), o = this.getRow(e - 1 - i, o), r.reverse(), o.reverse(), this.setRow(i, o), this.setRow(e - 1 - i, r) }, f.prototype.getEnclosingRectangle = function () { for (var t = this.width, e = this.height, r = this.rowSize, n = this.bits, o = t, i = e, a = -1, u = -1, s = 0; s < e; s++)for (var f = 0; f < r; f++) { var l = n[s * r + f]; if (0 !== l) { if (s < i && (i = s), u < s && (u = s), 32 * f < o) { for (var d = 0; 0 == (l << 31 - d & 4294967295);)d++; 32 * f + d < o && (o = 32 * f + d) } if (a < 32 * f + 31) { for (d = 31; l >>> d == 0;)d--; a < 32 * f + d && (a = 32 * f + d) } } } return a < o || u < i ? null : Int32Array.from([o, i, a - o + 1, u - i + 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, i = e[r], a = 0; 0 == (i << 31 - a & 4294967295);)a++; return o += a, 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), i = e[r], a = 31; i >>> a == 0;)a--; return o += a, 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 && i.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) + i.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 a.default; n.append(r); for (var o = 0, i = this.height; o < i; 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(15), o = r(8), i = r(14), a = r(5), 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(i.default.ORIENTATION) && (f += s.get(i.default.ORIENTATION) % 360), n.putMetadata(i.default.ORIENTATION, f); var l = n.getResultPoints(); if (null !== l) for (var d = r.getHeight(), c = 0; c < l.length; c++)l[c] = new a.default(d - l[c].getY() - 1, l[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(), l = new n.default(s), d = e && !0 === e.get(o.default.TRY_HARDER), c = Math.max(1, f >> (d ? 8 : 5)); r = d ? f : 15; for (var h = Math.trunc(f / 2), p = 0; p < r; p++) { var _ = Math.trunc((p + 1) / 2), g = h + c * (0 == (1 & p) ? _ : -_); if (g < 0 || f <= g) break; try { l = t.getBlackRow(g, l) } catch (t) { continue } for (var v = function (t) { if (1 === t && (l.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 = w.decodeRow(g, l, e); if (1 === t) { n.putMetadata(i.default.ORIENTATION, 180); var u = n.getResultPoints(); null !== u && (u[0] = new a.default(s - u[0].getX() - 1, u[0].getY()), u[1] = new a.default(s - u[1].getX() - 1, u[1].getY())) } return { value: n } } catch (t) { } }, w = this, y = 0; y < 2; y++) { var A = v(y); if ("object" == typeof A) return A.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 i = t.getSize(); if (i <= e) throw new u.default; for (var a = !t.get(e), s = 0, f = e; f < i;) { if (t.get(f) !== a) r[s]++; else { if (++s === n) break; r[s] = 1, a = !a } f++ } if (s !== n && (s !== n - 1 || f !== i)) 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, i = 0, a = 0; a < n; a++)o += t[a], i += e[a]; if (o < i) return Number.POSITIVE_INFINITY; var u = o / i; r *= u; for (var s = 0, f = 0; f < n; f++) { var l = t[f], d = e[f] * u, c = d < l ? l - d : d - l; if (r < c) return Number.POSITIVE_INFINITY; s += c } return s / o }, f); function f() { } e.default = s }, 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 = r(7), o = r(16), i = r(17), a = 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), i = r[n]; i &= ~((1 << (31 & t)) - 1); for (var a = r.length; 0 === i;) { if (++n === a) return e; i = r[n] } var u = 32 * n + o.default.numberOfTrailingZeros(i); 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), i = ~r[n]; i &= ~((1 << (31 & t)) - 1); for (var a = r.length; 0 === i;) { if (++n === a) return e; i = ~r[n] } var u = 32 * n + o.default.numberOfTrailingZeros(i); 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 a.default; if (e !== t) { e--; for (var r = Math.floor(t / 32), n = Math.floor(e / 32), o = this.bits, i = r; i <= n; i++) { var u = (2 << (i < n ? 31 : 31 & e)) - (1 << (r < i ? 0 : 31 & t)); o[i] |= 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 a.default; if (e === t) return !0; e--; for (var n = Math.floor(t / 32), o = Math.floor(e / 32), i = this.bits, u = n; u <= o; u++) { var s = (2 << (u < o ? 31 : 31 & e)) - (1 << (n < u ? 0 : 31 & t)) & 4294967295; if ((i[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 a.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 a.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 i = 0, a = 0; a < 8; a++)this.get(t) && (i |= 1 << 7 - a), t++; e[r + o] = i } }, 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 i = n[o]; i = (i = (i = (i = (i = i >> 1 & 1431655765 | (1431655765 & i) << 1) >> 2 & 858993459 | (858993459 & i) << 2) >> 4 & 252645135 | (252645135 & i) << 4) >> 8 & 16711935 | (16711935 & i) << 8) >> 16 & 65535 | (65535 & i) << 16, t[e - o] = i } if (this.size !== 32 * r) { var a = 32 * r - this.size, u = t[0] >>> a; for (o = 1; o < r; o++) { var s = t[o]; u |= s << 32 - a, t[o - 1] = u, u = s >>> a } 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 && i.default.equals(this.bits, e.bits) }, s.prototype.hashCode = function () { return 31 * this.size + i.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 = (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.parseInt = function (t, e) { return void 0 === e && (e = void 0), parseInt(t, e) }, o.MIN_VALUE_32_BITS = -2147483648, o.MAX_VALUE = Number.MAX_SAFE_INTEGER, o); function o() { } e.default = n }, function (t, e, r) { "use strict"; var n = this && this.__values || function (t) { var e = "function" == typeof Symbol && t[Symbol.iterator], r = 0; return e ? e.call(t) : { next: function () { return t && r >= t.length && (t = void 0), { value: t && t[r++], done: !t } } } }; Object.defineProperty(e, "__esModule", { value: !0 }); var o = r(7), i = r(1), a = r(95), u = (s.fill = function (t, e) { for (var r = 0, n = t.length; r < n; r++)t[r] = e }, s.fillWithin = function (t, e, r, n) { s.rangeCheck(t.length, e, r); for (var o = e; o < r; o++)t[o] = n }, s.rangeCheck = function (t, e, r) { if (r < e) throw new i.default("fromIndex(" + e + ") > toIndex(" + r + ")"); if (e < 0) throw new a.default(e); if (t < r) throw new a.default(r) }, s.asList = function () { for (var t = [], e = 0; e < arguments.length; e++)t[e] = arguments[e]; return t }, s.create = function (t, e, r) { return Array.from({ length: t }).map(function (t) { return Array.from({ length: e }).fill(r) }) }, s.createInt32Array = function (t, e, r) { return Array.from({ length: t }).map(function (t) { return Int32Array.from({ length: e }).fill(r) }) }, s.equals = function (t, e) { if (!t) return !1; if (!e) return !1; if (!t.length) return !1; if (!e.length) return !1; if (t.length !== e.length) return !1; for (var r = 0, n = t.length; r < n; r++)if (t[r] !== e[r]) return !1; return !0 }, s.hashCode = function (t) { var e, r; if (null === t) return 0; var o = 1; try { for (var i = n(t), a = i.next(); !a.done; a = i.next())o = 31 * o + a.value } catch (t) { e = { error: t } } finally { try { a && !a.done && (r = i.return) && r.call(i) } finally { if (e) throw e.error } } return o }, s.fillUint8Array = function (t, e) { for (var r = 0; r !== t.length; r++)t[r] = e }, s.copyOf = function (t, e) { return t.slice(0, e) }, s.copyOfUint8Array = function (t, e) { if (t.length <= e) { var r = new Uint8Array(e); return r.set(t), r } return t.slice(0, e) }, s.copyOfRange = function (t, e, r) { var n = r - e, i = new Int32Array(n); return o.default.arraycopy(t, e, i, 0, n), i }, s.binarySearch = function (t, e, r) { void 0 === r && (r = s.numberComparator); for (var n = 0, o = t.length - 1; n <= o;) { var i = o + n >> 1, a = r(e, t[i]); if (0 < a) n = 1 + i; else { if (!(a < 0)) return i; o = i - 1 } } return -n - 1 }, s.numberComparator = function (t, e) { return t - e }, s); function s() { } 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 i, a = r(6), u = (o(s, i = a.default), s); function s() { return null !== i && i.apply(this, arguments) || this } e.default = u }, function (t, e, r) { "use strict"; var n = this && this.__values || function (t) { var e = "function" == typeof Symbol && t[Symbol.iterator], r = 0; return e ? e.call(t) : { next: function () { return t && r >= t.length && (t = void 0), { value: t && t[r++], done: !t } } } }; Object.defineProperty(e, "__esModule", { value: !0 }); var o = r(17), i = r(10), a = (u.prototype.PDF417Common = function () { }, u.getBitCountSum = function (t) { return i.default.sum(t) }, u.toIntArray = function (t) { var e, r; if (null == t || !t.length) return u.EMPTY_INT_ARRAY; var o = new Int32Array(t.length), i = 0; try { for (var a = n(t), s = a.next(); !s.done; s = a.next()) { var f = s.value; o[i++] = f } } catch (t) { e = { error: t } } finally { try { s && !s.done && (r = a.return) && r.call(a) } finally { if (e) throw e.error } } return o }, u.getCodeword = function (t) { var e = o.default.binarySearch(u.SYMBOL_TABLE, 262143 & t); return e < 0 ? -1 : (u.CODEWORD_TABLE[e] - 1) % u.NUMBER_OF_CODEWORDS }, u.MAX_CODEWORDS_IN_BARCODE = (u.NUMBER_OF_CODEWORDS = 929) - 1, u.MIN_ROWS_IN_BARCODE = 3, u.MAX_ROWS_IN_BARCODE = 90, u.MODULES_IN_CODEWORD = 17, u.MODULES_IN_STOP_PATTERN = 18, u.BARS_IN_MODULE = 8, u.EMPTY_INT_ARRAY = new Int32Array([]), u.SYMBOL_TABLE = Int32Array.from([66142, 66170, 66206, 66236, 66290, 66292, 66350, 66382, 66396, 66454, 66470, 66476, 66594, 66600, 66614, 66626, 66628, 66632, 66640, 66654, 66662, 66668, 66682, 66690, 66718, 66720, 66748, 66758, 66776, 66798, 66802, 66804, 66820, 66824, 66832, 66846, 66848, 66876, 66880, 66936, 66950, 66956, 66968, 66992, 67006, 67022, 67036, 67042, 67044, 67048, 67062, 67118, 67150, 67164, 67214, 67228, 67256, 67294, 67322, 67350, 67366, 67372, 67398, 67404, 67416, 67438, 67474, 67476, 67490, 67492, 67496, 67510, 67618, 67624, 67650, 67656, 67664, 67678, 67686, 67692, 67706, 67714, 67716, 67728, 67742, 67744, 67772, 67782, 67788, 67800, 67822, 67826, 67828, 67842, 67848, 67870, 67872, 67900, 67904, 67960, 67974, 67992, 68016, 68030, 68046, 68060, 68066, 68068, 68072, 68086, 68104, 68112, 68126, 68128, 68156, 68160, 68216, 68336, 68358, 68364, 68376, 68400, 68414, 68448, 68476, 68494, 68508, 68536, 68546, 68548, 68552, 68560, 68574, 68582, 68588, 68654, 68686, 68700, 68706, 68708, 68712, 68726, 68750, 68764, 68792, 68802, 68804, 68808, 68816, 68830, 68838, 68844, 68858, 68878, 68892, 68920, 68976, 68990, 68994, 68996, 69e3, 69008, 69022, 69024, 69052, 69062, 69068, 69080, 69102, 69106, 69108, 69142, 69158, 69164, 69190, 69208, 69230, 69254, 69260, 69272, 69296, 69310, 69326, 69340, 69386, 69394, 69396, 69410, 69416, 69430, 69442, 69444, 69448, 69456, 69470, 69478, 69484, 69554, 69556, 69666, 69672, 69698, 69704, 69712, 69726, 69754, 69762, 69764, 69776, 69790, 69792, 69820, 69830, 69836, 69848, 69870, 69874, 69876, 69890, 69918, 69920, 69948, 69952, 70008, 70022, 70040, 70064, 70078, 70094, 70108, 70114, 70116, 70120, 70134, 70152, 70174, 70176, 70264, 70384, 70412, 70448, 70462, 70496, 70524, 70542, 70556, 70584, 70594, 70600, 70608, 70622, 70630, 70636, 70664, 70672, 70686, 70688, 70716, 70720, 70776, 70896, 71136, 71180, 71192, 71216, 71230, 71264, 71292, 71360, 71416, 71452, 71480, 71536, 71550, 71554, 71556, 71560, 71568, 71582, 71584, 71612, 71622, 71628, 71640, 71662, 71726, 71732, 71758, 71772, 71778, 71780, 71784, 71798, 71822, 71836, 71864, 71874, 71880, 71888, 71902, 71910, 71916, 71930, 71950, 71964, 71992, 72048, 72062, 72066, 72068, 72080, 72094, 72096, 72124, 72134, 72140, 72152, 72174, 72178, 72180, 72206, 72220, 72248, 72304, 72318, 72416, 72444, 72456, 72464, 72478, 72480, 72508, 72512, 72568, 72588, 72600, 72624, 72638, 72654, 72668, 72674, 72676, 72680, 72694, 72726, 72742, 72748, 72774, 72780, 72792, 72814, 72838, 72856, 72880, 72894, 72910, 72924, 72930, 72932, 72936, 72950, 72966, 72972, 72984, 73008, 73022, 73056, 73084, 73102, 73116, 73144, 73156, 73160, 73168, 73182, 73190, 73196, 73210, 73226, 73234, 73236, 73250, 73252, 73256, 73270, 73282, 73284, 73296, 73310, 73318, 73324, 73346, 73348, 73352, 73360, 73374, 73376, 73404, 73414, 73420, 73432, 73454, 73498, 73518, 73522, 73524, 73550, 73564, 73570, 73572, 73576, 73590, 73800, 73822, 73858, 73860, 73872, 73886, 73888, 73916, 73944, 73970, 73972, 73992, 74014, 74016, 74044, 74048, 74104, 74118, 74136, 74160, 74174, 74210, 74212, 74216, 74230, 74244, 74256, 74270, 74272, 74360, 74480, 74502, 74508, 74544, 74558, 74592, 74620, 74638, 74652, 74680, 74690, 74696, 74704, 74726, 74732, 74782, 74784, 74812, 74992, 75232, 75288, 75326, 75360, 75388, 75456, 75512, 75576, 75632, 75646, 75650, 75652, 75664, 75678, 75680, 75708, 75718, 75724, 75736, 75758, 75808, 75836, 75840, 75896, 76016, 76256, 76736, 76824, 76848, 76862, 76896, 76924, 76992, 77048, 77296, 77340, 77368, 77424, 77438, 77536, 77564, 77572, 77576, 77584, 77600, 77628, 77632, 77688, 77702, 77708, 77720, 77744, 77758, 77774, 77788, 77870, 77902, 77916, 77922, 77928, 77966, 77980, 78008, 78018, 78024, 78032, 78046, 78060, 78074, 78094, 78136, 78192, 78206, 78210, 78212, 78224, 78238, 78240, 78268, 78278, 78284, 78296, 78322, 78324, 78350, 78364, 78448, 78462, 78560, 78588, 78600, 78622, 78624, 78652, 78656, 78712, 78726, 78744, 78768, 78782, 78798, 78812, 78818, 78820, 78824, 78838, 78862, 78876, 78904, 78960, 78974, 79072, 79100, 79296, 79352, 79368, 79376, 79390, 79392, 79420, 79424, 79480, 79600, 79628, 79640, 79664, 79678, 79712, 79740, 79772, 79800, 79810, 79812, 79816, 79824, 79838, 79846, 79852, 79894, 79910, 79916, 79942, 79948, 79960, 79982, 79988, 80006, 80024, 80048, 80062, 80078, 80092, 80098, 80100, 80104, 80134, 80140, 80176, 80190, 80224, 80252, 80270, 80284, 80312, 80328, 80336, 80350, 80358, 80364, 80378, 80390, 80396, 80408, 80432, 80446, 80480, 80508, 80576, 80632, 80654, 80668, 80696, 80752, 80766, 80776, 80784, 80798, 80800, 80828, 80844, 80856, 80878, 80882, 80884, 80914, 80916, 80930, 80932, 80936, 80950, 80962, 80968, 80976, 80990, 80998, 81004, 81026, 81028, 81040, 81054, 81056, 81084, 81094, 81100, 81112, 81134, 81154, 81156, 81160, 81168, 81182, 81184, 81212, 81216, 81272, 81286, 81292, 81304, 81328, 81342, 81358, 81372, 81380, 81384, 81398, 81434, 81454, 81458, 81460, 81486, 81500, 81506, 81508, 81512, 81526, 81550, 81564, 81592, 81602, 81604, 81608, 81616, 81630, 81638, 81644, 81702, 81708, 81722, 81734, 81740, 81752, 81774, 81778, 81780, 82050, 82078, 82080, 82108, 82180, 82184, 82192, 82206, 82208, 82236, 82240, 82296, 82316, 82328, 82352, 82366, 82402, 82404, 82408, 82440, 82448, 82462, 82464, 82492, 82496, 82552, 82672, 82694, 82700, 82712, 82736, 82750, 82784, 82812, 82830, 82882, 82884, 82888, 82896, 82918, 82924, 82952, 82960, 82974, 82976, 83004, 83008, 83064, 83184, 83424, 83468, 83480, 83504, 83518, 83552, 83580, 83648, 83704, 83740, 83768, 83824, 83838, 83842, 83844, 83848, 83856, 83872, 83900, 83910, 83916, 83928, 83950, 83984, 84e3, 84028, 84032, 84088, 84208, 84448, 84928, 85040, 85054, 85088, 85116, 85184, 85240, 85488, 85560, 85616, 85630, 85728, 85756, 85764, 85768, 85776, 85790, 85792, 85820, 85824, 85880, 85894, 85900, 85912, 85936, 85966, 85980, 86048, 86080, 86136, 86256, 86496, 86976, 88160, 88188, 88256, 88312, 88560, 89056, 89200, 89214, 89312, 89340, 89536, 89592, 89608, 89616, 89632, 89664, 89720, 89840, 89868, 89880, 89904, 89952, 89980, 89998, 90012, 90040, 90190, 90204, 90254, 90268, 90296, 90306, 90308, 90312, 90334, 90382, 90396, 90424, 90480, 90494, 90500, 90504, 90512, 90526, 90528, 90556, 90566, 90572, 90584, 90610, 90612, 90638, 90652, 90680, 90736, 90750, 90848, 90876, 90884, 90888, 90896, 90910, 90912, 90940, 90944, 91e3, 91014, 91020, 91032, 91056, 91070, 91086, 91100, 91106, 91108, 91112, 91126, 91150, 91164, 91192, 91248, 91262, 91360, 91388, 91584, 91640, 91664, 91678, 91680, 91708, 91712, 91768, 91888, 91928, 91952, 91966, 92e3, 92028, 92046, 92060, 92088, 92098, 92100, 92104, 92112, 92126, 92134, 92140, 92188, 92216, 92272, 92384, 92412, 92608, 92664, 93168, 93200, 93214, 93216, 93244, 93248, 93304, 93424, 93664, 93720, 93744, 93758, 93792, 93820, 93888, 93944, 93980, 94008, 94064, 94078, 94084, 94088, 94096, 94110, 94112, 94140, 94150, 94156, 94168, 94246, 94252, 94278, 94284, 94296, 94318, 94342, 94348, 94360, 94384, 94398, 94414, 94428, 94440, 94470, 94476, 94488, 94512, 94526, 94560, 94588, 94606, 94620, 94648, 94658, 94660, 94664, 94672, 94686, 94694, 94700, 94714, 94726, 94732, 94744, 94768, 94782, 94816, 94844, 94912, 94968, 94990, 95004, 95032, 95088, 95102, 95112, 95120, 95134, 95136, 95164, 95180, 95192, 95214, 95218, 95220, 95244, 95256, 95280, 95294, 95328, 95356, 95424, 95480, 95728, 95758, 95772, 95800, 95856, 95870, 95968, 95996, 96008, 96016, 96030, 96032, 96060, 96064, 96120, 96152, 96176, 96190, 96220, 96226, 96228, 96232, 96290, 96292, 96296, 96310, 96322, 96324, 96328, 96336, 96350, 96358, 96364, 96386, 96388, 96392, 96400, 96414, 96416, 96444, 96454, 96460, 96472, 96494, 96498, 96500, 96514, 96516, 96520, 96528, 96542, 96544, 96572, 96576, 96632, 96646, 96652, 96664, 96688, 96702, 96718, 96732, 96738, 96740, 96744, 96758, 96772, 96776, 96784, 96798, 96800, 96828, 96832, 96888, 97008, 97030, 97036, 97048, 97072, 97086, 97120, 97148, 97166, 97180, 97208, 97220, 97224, 97232, 97246, 97254, 97260, 97326, 97330, 97332, 97358, 97372, 97378, 97380, 97384, 97398, 97422, 97436, 97464, 97474, 97476, 97480, 97488, 97502, 97510, 97516, 97550, 97564, 97592, 97648, 97666, 97668, 97672, 97680, 97694, 97696, 97724, 97734, 97740, 97752, 97774, 97830, 97836, 97850, 97862, 97868, 97880, 97902, 97906, 97908, 97926, 97932, 97944, 97968, 97998, 98012, 98018, 98020, 98024, 98038, 98618, 98674, 98676, 98838, 98854, 98874, 98892, 98904, 98926, 98930, 98932, 98968, 99006, 99042, 99044, 99048, 99062, 99166, 99194, 99246, 99286, 99350, 99366, 99372, 99386, 99398, 99416, 99438, 99442, 99444, 99462, 99504, 99518, 99534, 99548, 99554, 99556, 99560, 99574, 99590, 99596, 99608, 99632, 99646, 99680, 99708, 99726, 99740, 99768, 99778, 99780, 99784, 99792, 99806, 99814, 99820, 99834, 99858, 99860, 99874, 99880, 99894, 99906, 99920, 99934, 99962, 99970, 99972, 99976, 99984, 99998, 1e5, 100028, 100038, 100044, 100056, 100078, 100082, 100084, 100142, 100174, 100188, 100246, 100262, 100268, 100306, 100308, 100390, 100396, 100410, 100422, 100428, 100440, 100462, 100466, 100468, 100486, 100504, 100528, 100542, 100558, 100572, 100578, 100580, 100584, 100598, 100620, 100656, 100670, 100704, 100732, 100750, 100792, 100802, 100808, 100816, 100830, 100838, 100844, 100858, 100888, 100912, 100926, 100960, 100988, 101056, 101112, 101148, 101176, 101232, 101246, 101250, 101252, 101256, 101264, 101278, 101280, 101308, 101318, 101324, 101336, 101358, 101362, 101364, 101410, 101412, 101416, 101430, 101442, 101448, 101456, 101470, 101478, 101498, 101506, 101508, 101520, 101534, 101536, 101564, 101580, 101618, 101620, 101636, 101640, 101648, 101662, 101664, 101692, 101696, 101752, 101766, 101784, 101838, 101858, 101860, 101864, 101934, 101938, 101940, 101966, 101980, 101986, 101988, 101992, 102030, 102044, 102072, 102082, 102084, 102088, 102096, 102138, 102166, 102182, 102188, 102214, 102220, 102232, 102254, 102282, 102290, 102292, 102306, 102308, 102312, 102326, 102444, 102458, 102470, 102476, 102488, 102514, 102516, 102534, 102552, 102576, 102590, 102606, 102620, 102626, 102632, 102646, 102662, 102668, 102704, 102718, 102752, 102780, 102798, 102812, 102840, 102850, 102856, 102864, 102878, 102886, 102892, 102906, 102936, 102974, 103008, 103036, 103104, 103160, 103224, 103280, 103294, 103298, 103300, 103312, 103326, 103328, 103356, 103366, 103372, 103384, 103406, 103410, 103412, 103472, 103486, 103520, 103548, 103616, 103672, 103920, 103992, 104048, 104062, 104160, 104188, 104194, 104196, 104200, 104208, 104224, 104252, 104256, 104312, 104326, 104332, 104344, 104368, 104382, 104398, 104412, 104418, 104420, 104424, 104482, 104484, 104514, 104520, 104528, 104542, 104550, 104570, 104578, 104580, 104592, 104606, 104608, 104636, 104652, 104690, 104692, 104706, 104712, 104734, 104736, 104764, 104768, 104824, 104838, 104856, 104910, 104930, 104932, 104936, 104968, 104976, 104990, 104992, 105020, 105024, 105080, 105200, 105240, 105278, 105312, 105372, 105410, 105412, 105416, 105424, 105446, 105518, 105524, 105550, 105564, 105570, 105572, 105576, 105614, 105628, 105656, 105666, 105672, 105680, 105702, 105722, 105742, 105756, 105784, 105840, 105854, 105858, 105860, 105864, 105872, 105888, 105932, 105970, 105972, 106006, 106022, 106028, 106054, 106060, 106072, 106100, 106118, 106124, 106136, 106160, 106174, 106190, 106210, 106212, 106216, 106250, 106258, 106260, 106274, 106276, 106280, 106306, 106308, 106312, 106320, 106334, 106348, 106394, 106414, 106418, 106420, 106566, 106572, 106610, 106612, 106630, 106636, 106648, 106672, 106686, 106722, 106724, 106728, 106742, 106758, 106764, 106776, 106800, 106814, 106848, 106876, 106894, 106908, 106936, 106946, 106948, 106952, 106960, 106974, 106982, 106988, 107032, 107056, 107070, 107104, 107132, 107200, 107256, 107292, 107320, 107376, 107390, 107394, 107396, 107400, 107408, 107422, 107424, 107452, 107462, 107468, 107480, 107502, 107506, 107508, 107544, 107568, 107582, 107616, 107644, 107712, 107768, 108016, 108060, 108088, 108144, 108158, 108256, 108284, 108290, 108292, 108296, 108304, 108318, 108320, 108348, 108352, 108408, 108422, 108428, 108440, 108464, 108478, 108494, 108508, 108514, 108516, 108520, 108592, 108640, 108668, 108736, 108792, 109040, 109536, 109680, 109694, 109792, 109820, 110016, 110072, 110084, 110088, 110096, 110112, 110140, 110144, 110200, 110320, 110342, 110348, 110360, 110384, 110398, 110432, 110460, 110478, 110492, 110520, 110532, 110536, 110544, 110558, 110658, 110686, 110714, 110722, 110724, 110728, 110736, 110750, 110752, 110780, 110796, 110834, 110836, 110850, 110852, 110856, 110864, 110878, 110880, 110908, 110912, 110968, 110982, 111e3, 111054, 111074, 111076, 111080, 111108, 111112, 111120, 111134, 111136, 111164, 111168, 111224, 111344, 111372, 111422, 111456, 111516, 111554, 111556, 111560, 111568, 111590, 111632, 111646, 111648, 111676, 111680, 111736, 111856, 112096, 112152, 112224, 112252, 112320, 112440, 112514, 112516, 112520, 112528, 112542, 112544, 112588, 112686, 112718, 112732, 112782, 112796, 112824, 112834, 112836, 112840, 112848, 112870, 112890, 112910, 112924, 112952, 113008, 113022, 113026, 113028, 113032, 113040, 113054, 113056, 113100, 113138, 113140, 113166, 113180, 113208, 113264, 113278, 113376, 113404, 113416, 113424, 113440, 113468, 113472, 113560, 113614, 113634, 113636, 113640, 113686, 113702, 113708, 113734, 113740, 113752, 113778, 113780, 113798, 113804, 113816, 113840, 113854, 113870, 113890, 113892, 113896, 113926, 113932, 113944, 113968, 113982, 114016, 114044, 114076, 114114, 114116, 114120, 114128, 114150, 114170, 114194, 114196, 114210, 114212, 114216, 114242, 114244, 114248, 114256, 114270, 114278, 114306, 114308, 114312, 114320, 114334, 114336, 114364, 114380, 114420, 114458, 114478, 114482, 114484, 114510, 114524, 114530, 114532, 114536, 114842, 114866, 114868, 114970, 114994, 114996, 115042, 115044, 115048, 115062, 115130, 115226, 115250, 115252, 115278, 115292, 115298, 115300, 115304, 115318, 115342, 115394, 115396, 115400, 115408, 115422, 115430, 115436, 115450, 115478, 115494, 115514, 115526, 115532, 115570, 115572, 115738, 115758, 115762, 115764, 115790, 115804, 115810, 115812, 115816, 115830, 115854, 115868, 115896, 115906, 115912, 115920, 115934, 115942, 115948, 115962, 115996, 116024, 116080, 116094, 116098, 116100, 116104, 116112, 116126, 116128, 116156, 116166, 116172, 116184, 116206, 116210, 116212, 116246, 116262, 116268, 116282, 116294, 116300, 116312, 116334, 116338, 116340, 116358, 116364, 116376, 116400, 116414, 116430, 116444, 116450, 116452, 116456, 116498, 116500, 116514, 116520, 116534, 116546, 116548, 116552, 116560, 116574, 116582, 116588, 116602, 116654, 116694, 116714, 116762, 116782, 116786, 116788, 116814, 116828, 116834, 116836, 116840, 116854, 116878, 116892, 116920, 116930, 116936, 116944, 116958, 116966, 116972, 116986, 117006, 117048, 117104, 117118, 117122, 117124, 117136, 117150, 117152, 117180, 117190, 117196, 117208, 117230, 117234, 117236, 117304, 117360, 117374, 117472, 117500, 117506, 117508, 117512, 117520, 117536, 117564, 117568, 117624, 117638, 117644, 117656, 117680, 117694, 117710, 117724, 117730, 117732, 117736, 117750, 117782, 117798, 117804, 117818, 117830, 117848, 117874, 117876, 117894, 117936, 117950, 117966, 117986, 117988, 117992, 118022, 118028, 118040, 118064, 118078, 118112, 118140, 118172, 118210, 118212, 118216, 118224, 118238, 118246, 118266, 118306, 118312, 118338, 118352, 118366, 118374, 118394, 118402, 118404, 118408, 118416, 118430, 118432, 118460, 118476, 118514, 118516, 118574, 118578, 118580, 118606, 118620, 118626, 118628, 118632, 118678, 118694, 118700, 118730, 118738, 118740, 118830, 118834, 118836, 118862, 118876, 118882, 118884, 118888, 118902, 118926, 118940, 118968, 118978, 118980, 118984, 118992, 119006, 119014, 119020, 119034, 119068, 119096, 119152, 119166, 119170, 119172, 119176, 119184, 119198, 119200, 119228, 119238, 119244, 119256, 119278, 119282, 119284, 119324, 119352, 119408, 119422, 119520, 119548, 119554, 119556, 119560, 119568, 119582, 119584, 119612, 119616, 119672, 119686, 119692, 119704, 119728, 119742, 119758, 119772, 119778, 119780, 119784, 119798, 119920, 119934, 120032, 120060, 120256, 120312, 120324, 120328, 120336, 120352, 120384, 120440, 120560, 120582, 120588, 120600, 120624, 120638, 120672, 120700, 120718, 120732, 120760, 120770, 120772, 120776, 120784, 120798, 120806, 120812, 120870, 120876, 120890, 120902, 120908, 120920, 120946, 120948, 120966, 120972, 120984, 121008, 121022, 121038, 121058, 121060, 121064, 121078, 121100, 121112, 121136, 121150, 121184, 121212, 121244, 121282, 121284, 121288, 121296, 121318, 121338, 121356, 121368, 121392, 121406, 121440, 121468, 121536, 121592, 121656, 121730, 121732, 121736, 121744, 121758, 121760, 121804, 121842, 121844, 121890, 121922, 121924, 121928, 121936, 121950, 121958, 121978, 121986, 121988, 121992, 122e3, 122014, 122016, 122044, 122060, 122098, 122100, 122116, 122120, 122128, 122142, 122144, 122172, 122176, 122232, 122246, 122264, 122318, 122338, 122340, 122344, 122414, 122418, 122420, 122446, 122460, 122466, 122468, 122472, 122510, 122524, 122552, 122562, 122564, 122568, 122576, 122598, 122618, 122646, 122662, 122668, 122694, 122700, 122712, 122738, 122740, 122762, 122770, 122772, 122786, 122788, 122792, 123018, 123026, 123028, 123042, 123044, 123048, 123062, 123098, 123146, 123154, 123156, 123170, 123172, 123176, 123190, 123202, 123204, 123208, 123216, 123238, 123244, 123258, 123290, 123314, 123316, 123402, 123410, 123412, 123426, 123428, 123432, 123446, 123458, 123464, 123472, 123486, 123494, 123500, 123514, 123522, 123524, 123528, 123536, 123552, 123580, 123590, 123596, 123608, 123630, 123634, 123636, 123674, 123698, 123700, 123740, 123746, 123748, 123752, 123834, 123914, 123922, 123924, 123938, 123944, 123958, 123970, 123976, 123984, 123998, 124006, 124012, 124026, 124034, 124036, 124048, 124062, 124064, 124092, 124102, 124108, 124120, 124142, 124146, 124148, 124162, 124164, 124168, 124176, 124190, 124192, 124220, 124224, 124280, 124294, 124300, 124312, 124336, 124350, 124366, 124380, 124386, 124388, 124392, 124406, 124442, 124462, 124466, 124468, 124494, 124508, 124514, 124520, 124558, 124572, 124600, 124610, 124612, 124616, 124624, 124646, 124666, 124694, 124710, 124716, 124730, 124742, 124748, 124760, 124786, 124788, 124818, 124820, 124834, 124836, 124840, 124854, 124946, 124948, 124962, 124964, 124968, 124982, 124994, 124996, 125e3, 125008, 125022, 125030, 125036, 125050, 125058, 125060, 125064, 125072, 125086, 125088, 125116, 125126, 125132, 125144, 125166, 125170, 125172, 125186, 125188, 125192, 125200, 125216, 125244, 125248, 125304, 125318, 125324, 125336, 125360, 125374, 125390, 125404, 125410, 125412, 125416, 125430, 125444, 125448, 125456, 125472, 125504, 125560, 125680, 125702, 125708, 125720, 125744, 125758, 125792, 125820, 125838, 125852, 125880, 125890, 125892, 125896, 125904, 125918, 125926, 125932, 125978, 125998, 126002, 126004, 126030, 126044, 126050, 126052, 126056, 126094, 126108, 126136, 126146, 126148, 126152, 126160, 126182, 126202, 126222, 126236, 126264, 126320, 126334, 126338, 126340, 126344, 126352, 126366, 126368, 126412, 126450, 126452, 126486, 126502, 126508, 126522, 126534, 126540, 126552, 126574, 126578, 126580, 126598, 126604, 126616, 126640, 126654, 126670, 126684, 126690, 126692, 126696, 126738, 126754, 126756, 126760, 126774, 126786, 126788, 126792, 126800, 126814, 126822, 126828, 126842, 126894, 126898, 126900, 126934, 127126, 127142, 127148, 127162, 127178, 127186, 127188, 127254, 127270, 127276, 127290, 127302, 127308, 127320, 127342, 127346, 127348, 127370, 127378, 127380, 127394, 127396, 127400, 127450, 127510, 127526, 127532, 127546, 127558, 127576, 127598, 127602, 127604, 127622, 127628, 127640, 127664, 127678, 127694, 127708, 127714, 127716, 127720, 127734, 127754, 127762, 127764, 127778, 127784, 127810, 127812, 127816, 127824, 127838, 127846, 127866, 127898, 127918, 127922, 127924, 128022, 128038, 128044, 128058, 128070, 128076, 128088, 128110, 128114, 128116, 128134, 128140, 128152, 128176, 128190, 128206, 128220, 128226, 128228, 128232, 128246, 128262, 128268, 128280, 128304, 128318, 128352, 128380, 128398, 128412, 128440, 128450, 128452, 128456, 128464, 128478, 128486, 128492, 128506, 128522, 128530, 128532, 128546, 128548, 128552, 128566, 128578, 128580, 128584, 128592, 128606, 128614, 128634, 128642, 128644, 128648, 128656, 128670, 128672, 128700, 128716, 128754, 128756, 128794, 128814, 128818, 128820, 128846, 128860, 128866, 128868, 128872, 128886, 128918, 128934, 128940, 128954, 128978, 128980, 129178, 129198, 129202, 129204, 129238, 129258, 129306, 129326, 129330, 129332, 129358, 129372, 129378, 129380, 129384, 129398, 129430, 129446, 129452, 129466, 129482, 129490, 129492, 129562, 129582, 129586, 129588, 129614, 129628, 129634, 129636, 129640, 129654, 129678, 129692, 129720, 129730, 129732, 129736, 129744, 129758, 129766, 129772, 129814, 129830, 129836, 129850, 129862, 129868, 129880, 129902, 129906, 129908, 129930, 129938, 129940, 129954, 129956, 129960, 129974, 130010]), u.CODEWORD_TABLE = Int32Array.from([2627, 1819, 2622, 2621, 1813, 1812, 2729, 2724, 2723, 2779, 2774, 2773, 902, 896, 908, 868, 865, 861, 859, 2511, 873, 871, 1780, 835, 2493, 825, 2491, 842, 837, 844, 1764, 1762, 811, 810, 809, 2483, 807, 2482, 806, 2480, 815, 814, 813, 812, 2484, 817, 816, 1745, 1744, 1742, 1746, 2655, 2637, 2635, 2626, 2625, 2623, 2628, 1820, 2752, 2739, 2737, 2728, 2727, 2725, 2730, 2785, 2783, 2778, 2777, 2775, 2780, 787, 781, 747, 739, 736, 2413, 754, 752, 1719, 692, 689, 681, 2371, 678, 2369, 700, 697, 694, 703, 1688, 1686, 642, 638, 2343, 631, 2341, 627, 2338, 651, 646, 643, 2345, 654, 652, 1652, 1650, 1647, 1654, 601, 599, 2322, 596, 2321, 594, 2319, 2317, 611, 610, 608, 606, 2324, 603, 2323, 615, 614, 612, 1617, 1616, 1614, 1612, 616, 1619, 1618, 2575, 2538, 2536, 905, 901, 898, 909, 2509, 2507, 2504, 870, 867, 864, 860, 2512, 875, 872, 1781, 2490, 2489, 2487, 2485, 1748, 836, 834, 832, 830, 2494, 827, 2492, 843, 841, 839, 845, 1765, 1763, 2701, 2676, 2674, 2653, 2648, 2656, 2634, 2633, 2631, 2629, 1821, 2638, 2636, 2770, 2763, 2761, 2750, 2745, 2753, 2736, 2735, 2733, 2731, 1848, 2740, 2738, 2786, 2784, 591, 588, 576, 569, 566, 2296, 1590, 537, 534, 526, 2276, 522, 2274, 545, 542, 539, 548, 1572, 1570, 481, 2245, 466, 2242, 462, 2239, 492, 485, 482, 2249, 496, 494, 1534, 1531, 1528, 1538, 413, 2196, 406, 2191, 2188, 425, 419, 2202, 415, 2199, 432, 430, 427, 1472, 1467, 1464, 433, 1476, 1474, 368, 367, 2160, 365, 2159, 362, 2157, 2155, 2152, 378, 377, 375, 2166, 372, 2165, 369, 2162, 383, 381, 379, 2168, 1419, 1418, 1416, 1414, 385, 1411, 384, 1423, 1422, 1420, 1424, 2461, 802, 2441, 2439, 790, 786, 783, 794, 2409, 2406, 2403, 750, 742, 738, 2414, 756, 753, 1720, 2367, 2365, 2362, 2359, 1663, 693, 691, 684, 2373, 680, 2370, 702, 699, 696, 704, 1690, 1687, 2337, 2336, 2334, 2332, 1624, 2329, 1622, 640, 637, 2344, 634, 2342, 630, 2340, 650, 648, 645, 2346, 655, 653, 1653, 1651, 1649, 1655, 2612, 2597, 2595, 2571, 2568, 2565, 2576, 2534, 2529, 2526, 1787, 2540, 2537, 907, 904, 900, 910, 2503, 2502, 2500, 2498, 1768, 2495, 1767, 2510, 2508, 2506, 869, 866, 863, 2513, 876, 874, 1782, 2720, 2713, 2711, 2697, 2694, 2691, 2702, 2672, 2670, 2664, 1828, 2678, 2675, 2647, 2646, 2644, 2642, 1823, 2639, 1822, 2654, 2652, 2650, 2657, 2771, 1855, 2765, 2762, 1850, 1849, 2751, 2749, 2747, 2754, 353, 2148, 344, 342, 336, 2142, 332, 2140, 345, 1375, 1373, 306, 2130, 299, 2128, 295, 2125, 319, 314, 311, 2132, 1354, 1352, 1349, 1356, 262, 257, 2101, 253, 2096, 2093, 274, 273, 267, 2107, 263, 2104, 280, 278, 275, 1316, 1311, 1308, 1320, 1318, 2052, 202, 2050, 2044, 2040, 219, 2063, 212, 2060, 208, 2055, 224, 221, 2066, 1260, 1258, 1252, 231, 1248, 229, 1266, 1264, 1261, 1268, 155, 1998, 153, 1996, 1994, 1991, 1988, 165, 164, 2007, 162, 2006, 159, 2003, 2e3, 172, 171, 169, 2012, 166, 2010, 1186, 1184, 1182, 1179, 175, 1176, 173, 1192, 1191, 1189, 1187, 176, 1194, 1193, 2313, 2307, 2305, 592, 589, 2294, 2292, 2289, 578, 572, 568, 2297, 580, 1591, 2272, 2267, 2264, 1547, 538, 536, 529, 2278, 525, 2275, 547, 544, 541, 1574, 1571, 2237, 2235, 2229, 1493, 2225, 1489, 478, 2247, 470, 2244, 465, 2241, 493, 488, 484, 2250, 498, 495, 1536, 1533, 1530, 1539, 2187, 2186, 2184, 2182, 1432, 2179, 1430, 2176, 1427, 414, 412, 2197, 409, 2195, 405, 2193, 2190, 426, 424, 421, 2203, 418, 2201, 431, 429, 1473, 1471, 1469, 1466, 434, 1477, 1475, 2478, 2472, 2470, 2459, 2457, 2454, 2462, 803, 2437, 2432, 2429, 1726, 2443, 2440, 792, 789, 785, 2401, 2399, 2393, 1702, 2389, 1699, 2411, 2408, 2405, 745, 741, 2415, 758, 755, 1721, 2358, 2357, 2355, 2353, 1661, 2350, 1660, 2347, 1657, 2368, 2366, 2364, 2361, 1666, 690, 687, 2374, 683, 2372, 701, 698, 705, 1691, 1689, 2619, 2617, 2610, 2608, 2605, 2613, 2593, 2588, 2585, 1803, 2599, 2596, 2563, 2561, 2555, 1797, 2551, 1795, 2573, 2570, 2567, 2577, 2525, 2524, 2522, 2520, 1786, 2517, 1785, 2514, 1783, 2535, 2533, 2531, 2528, 1788, 2541, 2539, 906, 903, 911, 2721, 1844, 2715, 2712, 1838, 1836, 2699, 2696, 2693, 2703, 1827, 1826, 1824, 2673, 2671, 2669, 2666, 1829, 2679, 2677, 1858, 1857, 2772, 1854, 1853, 1851, 1856, 2766, 2764, 143, 1987, 139, 1986, 135, 133, 131, 1984, 128, 1983, 125, 1981, 138, 137, 136, 1985, 1133, 1132, 1130, 112, 110, 1974, 107, 1973, 104, 1971, 1969, 122, 121, 119, 117, 1977, 114, 1976, 124, 1115, 1114, 1112, 1110, 1117, 1116, 84, 83, 1953, 81, 1952, 78, 1950, 1948, 1945, 94, 93, 91, 1959, 88, 1958, 85, 1955, 99, 97, 95, 1961, 1086, 1085, 1083, 1081, 1078, 100, 1090, 1089, 1087, 1091, 49, 47, 1917, 44, 1915, 1913, 1910, 1907, 59, 1926, 56, 1925, 53, 1922, 1919, 66, 64, 1931, 61, 1929, 1042, 1040, 1038, 71, 1035, 70, 1032, 68, 1048, 1047, 1045, 1043, 1050, 1049, 12, 10, 1869, 1867, 1864, 1861, 21, 1880, 19, 1877, 1874, 1871, 28, 1888, 25, 1886, 22, 1883, 982, 980, 977, 974, 32, 30, 991, 989, 987, 984, 34, 995, 994, 992, 2151, 2150, 2147, 2146, 2144, 356, 355, 354, 2149, 2139, 2138, 2136, 2134, 1359, 343, 341, 338, 2143, 335, 2141, 348, 347, 346, 1376, 1374, 2124, 2123, 2121, 2119, 1326, 2116, 1324, 310, 308, 305, 2131, 302, 2129, 298, 2127, 320, 318, 316, 313, 2133, 322, 321, 1355, 1353, 1351, 1357, 2092, 2091, 2089, 2087, 1276, 2084, 1274, 2081, 1271, 259, 2102, 256, 2100, 252, 2098, 2095, 272, 269, 2108, 266, 2106, 281, 279, 277, 1317, 1315, 1313, 1310, 282, 1321, 1319, 2039, 2037, 2035, 2032, 1203, 2029, 1200, 1197, 207, 2053, 205, 2051, 201, 2049, 2046, 2043, 220, 218, 2064, 215, 2062, 211, 2059, 228, 226, 223, 2069, 1259, 1257, 1254, 232, 1251, 230, 1267, 1265, 1263, 2316, 2315, 2312, 2311, 2309, 2314, 2304, 2303, 2301, 2299, 1593, 2308, 2306, 590, 2288, 2287, 2285, 2283, 1578, 2280, 1577, 2295, 2293, 2291, 579, 577, 574, 571, 2298, 582, 581, 1592, 2263, 2262, 2260, 2258, 1545, 2255, 1544, 2252, 1541, 2273, 2271, 2269, 2266, 1550, 535, 532, 2279, 528, 2277, 546, 543, 549, 1575, 1573, 2224, 2222, 2220, 1486, 2217, 1485, 2214, 1482, 1479, 2238, 2236, 2234, 2231, 1496, 2228, 1492, 480, 477, 2248, 473, 2246, 469, 2243, 490, 487, 2251, 497, 1537, 1535, 1532, 2477, 2476, 2474, 2479, 2469, 2468, 2466, 2464, 1730, 2473, 2471, 2453, 2452, 2450, 2448, 1729, 2445, 1728, 2460, 2458, 2456, 2463, 805, 804, 2428, 2427, 2425, 2423, 1725, 2420, 1724, 2417, 1722, 2438, 2436, 2434, 2431, 1727, 2444, 2442, 793, 791, 788, 795, 2388, 2386, 2384, 1697, 2381, 1696, 2378, 1694, 1692, 2402, 2400, 2398, 2395, 1703, 2392, 1701, 2412, 2410, 2407, 751, 748, 744, 2416, 759, 757, 1807, 2620, 2618, 1806, 1805, 2611, 2609, 2607, 2614, 1802, 1801, 1799, 2594, 2592, 2590, 2587, 1804, 2600, 2598, 1794, 1793, 1791, 1789, 2564, 2562, 2560, 2557, 1798, 2554, 1796, 2574, 2572, 2569, 2578, 1847, 1846, 2722, 1843, 1842, 1840, 1845, 2716, 2714, 1835, 1834, 1832, 1830, 1839, 1837, 2700, 2698, 2695, 2704, 1817, 1811, 1810, 897, 862, 1777, 829, 826, 838, 1760, 1758, 808, 2481, 1741, 1740, 1738, 1743, 2624, 1818, 2726, 2776, 782, 740, 737, 1715, 686, 679, 695, 1682, 1680, 639, 628, 2339, 647, 644, 1645, 1643, 1640, 1648, 602, 600, 597, 595, 2320, 593, 2318, 609, 607, 604, 1611, 1610, 1608, 1606, 613, 1615, 1613, 2328, 926, 924, 892, 886, 899, 857, 850, 2505, 1778, 824, 823, 821, 819, 2488, 818, 2486, 833, 831, 828, 840, 1761, 1759, 2649, 2632, 2630, 2746, 2734, 2732, 2782, 2781, 570, 567, 1587, 531, 527, 523, 540, 1566, 1564, 476, 467, 463, 2240, 486, 483, 1524, 1521, 1518, 1529, 411, 403, 2192, 399, 2189, 423, 416, 1462, 1457, 1454, 428, 1468, 1465, 2210, 366, 363, 2158, 360, 2156, 357, 2153, 376, 373, 370, 2163, 1410, 1409, 1407, 1405, 382, 1402, 380, 1417, 1415, 1412, 1421, 2175, 2174, 777, 774, 771, 784, 732, 725, 722, 2404, 743, 1716, 676, 674, 668, 2363, 665, 2360, 685, 1684, 1681, 626, 624, 622, 2335, 620, 2333, 617, 2330, 641, 635, 649, 1646, 1644, 1642, 2566, 928, 925, 2530, 2527, 894, 891, 888, 2501, 2499, 2496, 858, 856, 854, 851, 1779, 2692, 2668, 2665, 2645, 2643, 2640, 2651, 2768, 2759, 2757, 2744, 2743, 2741, 2748, 352, 1382, 340, 337, 333, 1371, 1369, 307, 300, 296, 2126, 315, 312, 1347, 1342, 1350, 261, 258, 250, 2097, 246, 2094, 271, 268, 264, 1306, 1301, 1298, 276, 1312, 1309, 2115, 203, 2048, 195, 2045, 191, 2041, 213, 209, 2056, 1246, 1244, 1238, 225, 1234, 222, 1256, 1253, 1249, 1262, 2080, 2079, 154, 1997, 150, 1995, 147, 1992, 1989, 163, 160, 2004, 156, 2001, 1175, 1174, 1172, 1170, 1167, 170, 1164, 167, 1185, 1183, 1180, 1177, 174, 1190, 1188, 2025, 2024, 2022, 587, 586, 564, 559, 556, 2290, 573, 1588, 520, 518, 512, 2268, 508, 2265, 530, 1568, 1565, 461, 457, 2233, 450, 2230, 446, 2226, 479, 471, 489, 1526, 1523, 1520, 397, 395, 2185, 392, 2183, 389, 2180, 2177, 410, 2194, 402, 422, 1463, 1461, 1459, 1456, 1470, 2455, 799, 2433, 2430, 779, 776, 773, 2397, 2394, 2390, 734, 728, 724, 746, 1717, 2356, 2354, 2351, 2348, 1658, 677, 675, 673, 670, 667, 688, 1685, 1683, 2606, 2589, 2586, 2559, 2556, 2552, 927, 2523, 2521, 2518, 2515, 1784, 2532, 895, 893, 890, 2718, 2709, 2707, 2689, 2687, 2684, 2663, 2662, 2660, 2658, 1825, 2667, 2769, 1852, 2760, 2758, 142, 141, 1139, 1138, 134, 132, 129, 126, 1982, 1129, 1128, 1126, 1131, 113, 111, 108, 105, 1972, 101, 1970, 120, 118, 115, 1109, 1108, 1106, 1104, 123, 1113, 1111, 82, 79, 1951, 75, 1949, 72, 1946, 92, 89, 86, 1956, 1077, 1076, 1074, 1072, 98, 1069, 96, 1084, 1082, 1079, 1088, 1968, 1967, 48, 45, 1916, 42, 1914, 39, 1911, 1908, 60, 57, 54, 1923, 50, 1920, 1031, 1030, 1028, 1026, 67, 1023, 65, 1020, 62, 1041, 1039, 1036, 1033, 69, 1046, 1044, 1944, 1943, 1941, 11, 9, 1868, 7, 1865, 1862, 1859, 20, 1878, 16, 1875, 13, 1872, 970, 968, 966, 963, 29, 960, 26, 23, 983, 981, 978, 975, 33, 971, 31, 990, 988, 985, 1906, 1904, 1902, 993, 351, 2145, 1383, 331, 330, 328, 326, 2137, 323, 2135, 339, 1372, 1370, 294, 293, 291, 289, 2122, 286, 2120, 283, 2117, 309, 303, 317, 1348, 1346, 1344, 245, 244, 242, 2090, 239, 2088, 236, 2085, 2082, 260, 2099, 249, 270, 1307, 1305, 1303, 1300, 1314, 189, 2038, 186, 2036, 183, 2033, 2030, 2026, 206, 198, 2047, 194, 216, 1247, 1245, 1243, 1240, 227, 1237, 1255, 2310, 2302, 2300, 2286, 2284, 2281, 565, 563, 561, 558, 575, 1589, 2261, 2259, 2256, 2253, 1542, 521, 519, 517, 514, 2270, 511, 533, 1569, 1567, 2223, 2221, 2218, 2215, 1483, 2211, 1480, 459, 456, 453, 2232, 449, 474, 491, 1527, 1525, 1522, 2475, 2467, 2465, 2451, 2449, 2446, 801, 800, 2426, 2424, 2421, 2418, 1723, 2435, 780, 778, 775, 2387, 2385, 2382, 2379, 1695, 2375, 1693, 2396, 735, 733, 730, 727, 749, 1718, 2616, 2615, 2604, 2603, 2601, 2584, 2583, 2581, 2579, 1800, 2591, 2550, 2549, 2547, 2545, 1792, 2542, 1790, 2558, 929, 2719, 1841, 2710, 2708, 1833, 1831, 2690, 2688, 2686, 1815, 1809, 1808, 1774, 1756, 1754, 1737, 1736, 1734, 1739, 1816, 1711, 1676, 1674, 633, 629, 1638, 1636, 1633, 1641, 598, 1605, 1604, 1602, 1600, 605, 1609, 1607, 2327, 887, 853, 1775, 822, 820, 1757, 1755, 1584, 524, 1560, 1558, 468, 464, 1514, 1511, 1508, 1519, 408, 404, 400, 1452, 1447, 1444, 417, 1458, 1455, 2208, 364, 361, 358, 2154, 1401, 1400, 1398, 1396, 374, 1393, 371, 1408, 1406, 1403, 1413, 2173, 2172, 772, 726, 723, 1712, 672, 669, 666, 682, 1678, 1675, 625, 623, 621, 618, 2331, 636, 632, 1639, 1637, 1635, 920, 918, 884, 880, 889, 849, 848, 847, 846, 2497, 855, 852, 1776, 2641, 2742, 2787, 1380, 334, 1367, 1365, 301, 297, 1340, 1338, 1335, 1343, 255, 251, 247, 1296, 1291, 1288, 265, 1302, 1299, 2113, 204, 196, 192, 2042, 1232, 1230, 1224, 214, 1220, 210, 1242, 1239, 1235, 1250, 2077, 2075, 151, 148, 1993, 144, 1990, 1163, 1162, 1160, 1158, 1155, 161, 1152, 157, 1173, 1171, 1168, 1165, 168, 1181, 1178, 2021, 2020, 2018, 2023, 585, 560, 557, 1585, 516, 509, 1562, 1559, 458, 447, 2227, 472, 1516, 1513, 1510, 398, 396, 393, 390, 2181, 386, 2178, 407, 1453, 1451, 1449, 1446, 420, 1460, 2209, 769, 764, 720, 712, 2391, 729, 1713, 664, 663, 661, 659, 2352, 656, 2349, 671, 1679, 1677, 2553, 922, 919, 2519, 2516, 885, 883, 881, 2685, 2661, 2659, 2767, 2756, 2755, 140, 1137, 1136, 130, 127, 1125, 1124, 1122, 1127, 109, 106, 102, 1103, 1102, 1100, 1098, 116, 1107, 1105, 1980, 80, 76, 73, 1947, 1068, 1067, 1065, 1063, 90, 1060, 87, 1075, 1073, 1070, 1080, 1966, 1965, 46, 43, 40, 1912, 36, 1909, 1019, 1018, 1016, 1014, 58, 1011, 55, 1008, 51, 1029, 1027, 1024, 1021, 63, 1037, 1034, 1940, 1939, 1937, 1942, 8, 1866, 4, 1863, 1, 1860, 956, 954, 952, 949, 946, 17, 14, 969, 967, 964, 961, 27, 957, 24, 979, 976, 972, 1901, 1900, 1898, 1896, 986, 1905, 1903, 350, 349, 1381, 329, 327, 324, 1368, 1366, 292, 290, 287, 284, 2118, 304, 1341, 1339, 1337, 1345, 243, 240, 237, 2086, 233, 2083, 254, 1297, 1295, 1293, 1290, 1304, 2114, 190, 187, 184, 2034, 180, 2031, 177, 2027, 199, 1233, 1231, 1229, 1226, 217, 1223, 1241, 2078, 2076, 584, 555, 554, 552, 550, 2282, 562, 1586, 507, 506, 504, 502, 2257, 499, 2254, 515, 1563, 1561, 445, 443, 441, 2219, 438, 2216, 435, 2212, 460, 454, 475, 1517, 1515, 1512, 2447, 798, 797, 2422, 2419, 770, 768, 766, 2383, 2380, 2376, 721, 719, 717, 714, 731, 1714, 2602, 2582, 2580, 2548, 2546, 2543, 923, 921, 2717, 2706, 2705, 2683, 2682, 2680, 1771, 1752, 1750, 1733, 1732, 1731, 1735, 1814, 1707, 1670, 1668, 1631, 1629, 1626, 1634, 1599, 1598, 1596, 1594, 1603, 1601, 2326, 1772, 1753, 1751, 1581, 1554, 1552, 1504, 1501, 1498, 1509, 1442, 1437, 1434, 401, 1448, 1445, 2206, 1392, 1391, 1389, 1387, 1384, 359, 1399, 1397, 1394, 1404, 2171, 2170, 1708, 1672, 1669, 619, 1632, 1630, 1628, 1773, 1378, 1363, 1361, 1333, 1328, 1336, 1286, 1281, 1278, 248, 1292, 1289, 2111, 1218, 1216, 1210, 197, 1206, 193, 1228, 1225, 1221, 1236, 2073, 2071, 1151, 1150, 1148, 1146, 152, 1143, 149, 1140, 145, 1161, 1159, 1156, 1153, 158, 1169, 1166, 2017, 2016, 2014, 2019, 1582, 510, 1556, 1553, 452, 448, 1506, 1500, 394, 391, 387, 1443, 1441, 1439, 1436, 1450, 2207, 765, 716, 713, 1709, 662, 660, 657, 1673, 1671, 916, 914, 879, 878, 877, 882, 1135, 1134, 1121, 1120, 1118, 1123, 1097, 1096, 1094, 1092, 103, 1101, 1099, 1979, 1059, 1058, 1056, 1054, 77, 1051, 74, 1066, 1064, 1061, 1071, 1964, 1963, 1007, 1006, 1004, 1002, 999, 41, 996, 37, 1017, 1015, 1012, 1009, 52, 1025, 1022, 1936, 1935, 1933, 1938, 942, 940, 938, 935, 932, 5, 2, 955, 953, 950, 947, 18, 943, 15, 965, 962, 958, 1895, 1894, 1892, 1890, 973, 1899, 1897, 1379, 325, 1364, 1362, 288, 285, 1334, 1332, 1330, 241, 238, 234, 1287, 1285, 1283, 1280, 1294, 2112, 188, 185, 181, 178, 2028, 1219, 1217, 1215, 1212, 200, 1209, 1227, 2074, 2072, 583, 553, 551, 1583, 505, 503, 500, 513, 1557, 1555, 444, 442, 439, 436, 2213, 455, 451, 1507, 1505, 1502, 796, 763, 762, 760, 767, 711, 710, 708, 706, 2377, 718, 715, 1710, 2544, 917, 915, 2681, 1627, 1597, 1595, 2325, 1769, 1749, 1747, 1499, 1438, 1435, 2204, 1390, 1388, 1385, 1395, 2169, 2167, 1704, 1665, 1662, 1625, 1623, 1620, 1770, 1329, 1282, 1279, 2109, 1214, 1207, 1222, 2068, 2065, 1149, 1147, 1144, 1141, 146, 1157, 1154, 2013, 2011, 2008, 2015, 1579, 1549, 1546, 1495, 1487, 1433, 1431, 1428, 1425, 388, 1440, 2205, 1705, 658, 1667, 1664, 1119, 1095, 1093, 1978, 1057, 1055, 1052, 1062, 1962, 1960, 1005, 1003, 1e3, 997, 38, 1013, 1010, 1932, 1930, 1927, 1934, 941, 939, 936, 933, 6, 930, 3, 951, 948, 944, 1889, 1887, 1884, 1881, 959, 1893, 1891, 35, 1377, 1360, 1358, 1327, 1325, 1322, 1331, 1277, 1275, 1272, 1269, 235, 1284, 2110, 1205, 1204, 1201, 1198, 182, 1195, 179, 1213, 2070, 2067, 1580, 501, 1551, 1548, 440, 437, 1497, 1494, 1490, 1503, 761, 709, 707, 1706, 913, 912, 2198, 1386, 2164, 2161, 1621, 1766, 2103, 1208, 2058, 2054, 1145, 1142, 2005, 2002, 1999, 2009, 1488, 1429, 1426, 2200, 1698, 1659, 1656, 1975, 1053, 1957, 1954, 1001, 998, 1924, 1921, 1918, 1928, 937, 934, 931, 1879, 1876, 1873, 1870, 945, 1885, 1882, 1323, 1273, 1270, 2105, 1202, 1199, 1196, 1211, 2061, 2057, 1576, 1543, 1540, 1484, 1481, 1478, 1491, 1700]), u); function u() { } e.default = a }, function (t, e, r) { "use strict"; var n = this && this.__awaiter || function (t, e, r, n) { return new (r = r || Promise)(function (o, i) { function a(t) { try { s(n.next(t)) } catch (t) { i(t) } } function u(t) { try { s(n.throw(t)) } catch (t) { i(t) } } function s(t) { t.done ? o(t.value) : new r(function (e) { e(t.value) }).then(a, u) } s((n = n.apply(t, e || [])).next()) }) }, o = this && this.__generator || function (t, e) { var r, n, o, i, a = { label: 0, sent: function () { if (1 & o[0]) throw o[1]; return o[1] }, trys: [], ops: [] }; return i = { next: u(0), throw: u(1), return: u(2) }, "function" == typeof Symbol && (i[Symbol.iterator] = function () { return this }), i; function u(i) { return function (u) { return function (i) { if (r) throw new TypeError("Generator is already executing."); for (; a;)try { if (r = 1, n && (o = 2 & i[0] ? n.return : i[0] ? n.throw || ((o = n.return) && o.call(n), 0) : n.next) && !(o = o.call(n, i[1])).done) return o; switch (n = 0, o && (i = [2 & i[0], o.value]), i[0]) { case 0: case 1: o = i; break; case 4: return a.label++, { value: i[1], done: !1 }; case 5: a.label++, n = i[1], i = [0]; continue; case 7: i = a.ops.pop(), a.trys.pop(); continue; default: if (!(o = 0 < (o = a.trys).length && o[o.length - 1]) && (6 === i[0] || 2 === i[0])) { a = 0; continue } if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) { a.label = i[1]; break } if (6 === i[0] && a.label < o[1]) { a.label = o[1], o = i; break } if (o && a.label < o[2]) { a.label = o[2], a.ops.push(i); break } o[2] && a.ops.pop(), a.trys.pop(); continue }i = e.call(t, a) } catch (t) { i = [6, t], n = 0 } finally { r = o = 0 } if (5 & i[0]) throw i[1]; return { value: i[0] ? i[1] : void 0, done: !0 } }([i, u]) } } }, i = this && this.__values || function (t) { var e = "function" == typeof Symbol && t[Symbol.iterator], r = 0; return e ? e.call(t) : { next: function () { return t && r >= t.length && (t = void 0), { value: t && t[r++], done: !t } } } }; Object.defineProperty(e, "__esModule", { value: !0 }); var a = r(32), u = r(52), s = r(11), f = r(53), l = r(2), d = r(0), c = r(56), h = r(57), p = (Object.defineProperty(_.prototype, "hasNavigator", { get: function () { return "undefined" != typeof navigator }, enumerable: !0, configurable: !0 }), Object.defineProperty(_.prototype, "isMediaDevicesSuported", { get: function () { return this.hasNavigator && !!navigator.mediaDevices }, enumerable: !0, configurable: !0 }), Object.defineProperty(_.prototype, "canEnumerateDevices", { get: function () { return !(!this.isMediaDevicesSuported || !navigator.mediaDevices.enumerateDevices) }, enumerable: !0, configurable: !0 }), Object.defineProperty(_.prototype, "timeBetweenDecodingAttempts", { get: function () { return this._timeBetweenDecodingAttempts }, set: function (t) { this._timeBetweenDecodingAttempts = t < 0 ? 0 : t }, enumerable: !0, configurable: !0 }), Object.defineProperty(_.prototype, "hints", { get: function () { return this._hints }, set: function (t) { this._hints = t || null }, enumerable: !0, configurable: !0 }), _.prototype.listVideoInputDevices = function () { return n(this, void 0, void 0, function () { var t, e, r, n, a, u, s, f, l, d, c, h; 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: r = o.sent(), n = []; try { for (a = i(r), u = a.next(); !u.done; u = a.next())s = u.value, "videoinput" === (f = "video" === s.kind ? "videoinput" : s.kind) && (l = s.deviceId || s.id, d = s.label || "Video device " + (n.length + 1), c = s.groupId, h = { deviceId: l, label: d, kind: f, groupId: c }, n.push(h)) } catch (o) { t = { error: o } } finally { try { u && !u.done && (e = a.return) && e.call(a) } finally { if (t) throw t.error } } return [2, n] } }) }) }, _.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 h.VideoInputDevice(t.deviceId, t.label) })] } }) }) }, _.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] } }) }) }, _.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()] } }) }) }, _.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", focusMode: "continuous", } }, [4, this.decodeOnceFromConstraints(r, e)]; case 1: return [2, n.sent()] } }) }) }, _.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()] } }) }) }, _.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()] } }) }) }, _.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()] } }) }) }, _.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", focusMode: "continuous", }},[4,this.decodeFromConstraints(n,e,r)];case 1:return[2,o.sent()]}})})},_.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()]}})})},_.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()]}})})},_.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},_.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},_.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]}})})},_.prototype.playVideoOnLoadAsync=function(t){var e=this;return new Promise(function(r,n){return e.playVideoOnLoad(t,function(){return r()})})},_.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)},_.prototype.isVideoPlaying=function(t){return 0=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o,i,a=r(2);(i=o=e.CharacterSetValueIdentifiers||(e.CharacterSetValueIdentifiers={}))[i.Cp437=0]="Cp437",i[i.ISO8859_1=1]="ISO8859_1",i[i.ISO8859_2=2]="ISO8859_2",i[i.ISO8859_3=3]="ISO8859_3",i[i.ISO8859_4=4]="ISO8859_4",i[i.ISO8859_5=5]="ISO8859_5",i[i.ISO8859_6=6]="ISO8859_6",i[i.ISO8859_7=7]="ISO8859_7",i[i.ISO8859_8=8]="ISO8859_8",i[i.ISO8859_9=9]="ISO8859_9",i[i.ISO8859_10=10]="ISO8859_10",i[i.ISO8859_11=11]="ISO8859_11",i[i.ISO8859_13=12]="ISO8859_13",i[i.ISO8859_14=13]="ISO8859_14",i[i.ISO8859_15=14]="ISO8859_15",i[i.ISO8859_16=15]="ISO8859_16",i[i.SJIS=16]="SJIS",i[i.Cp1250=17]="Cp1250",i[i.Cp1251=18]="Cp1251",i[i.Cp1252=19]="Cp1252",i[i.Cp1256=20]="Cp1256",i[i.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",i[i.UTF8=22]="UTF8",i[i.ASCII=23]="ASCII",i[i.Big5=24]="Big5",i[i.GB18030=25]="GB18030",i[i.EUC_KR=26]="EUC_KR";var u=(s.prototype.getValueIdentifier=function(){return this.valueIdentifier},s.prototype.getName=function(){return this.name},s.prototype.getValue=function(){return this.values[0]},s.getCharacterSetECIByValue=function(t){if(t<0||900<=t)throw new a.default("incorect value");var e=s.VALUES_TO_ECI.get(t);if(void 0===e)throw new a.default("incorect value");return e},s.getCharacterSetECIByName=function(t){var e=s.NAME_TO_ECI.get(t);if(void 0===e)throw new a.default("incorect value");return e},s.prototype.equals=function(t){if(!(t instanceof s))return!1;var e=t;return this.getName()===e.getName()},s.VALUE_IDENTIFIER_TO_ECI=new Map,s.VALUES_TO_ECI=new Map,s.NAME_TO_ECI=new Map,s.Cp437=new s(o.Cp437,Int32Array.from([0,2]),"Cp437"),s.ISO8859_1=new s(o.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),s.ISO8859_2=new s(o.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),s.ISO8859_3=new s(o.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),s.ISO8859_4=new s(o.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),s.ISO8859_5=new s(o.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),s.ISO8859_6=new s(o.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),s.ISO8859_7=new s(o.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),s.ISO8859_8=new s(o.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),s.ISO8859_9=new s(o.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),s.ISO8859_10=new s(o.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),s.ISO8859_11=new s(o.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),s.ISO8859_13=new s(o.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),s.ISO8859_14=new s(o.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),s.ISO8859_15=new s(o.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),s.ISO8859_16=new s(o.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),s.SJIS=new s(o.SJIS,20,"SJIS","Shift_JIS"),s.Cp1250=new s(o.Cp1250,21,"Cp1250","windows-1250"),s.Cp1251=new s(o.Cp1251,22,"Cp1251","windows-1251"),s.Cp1252=new s(o.Cp1252,23,"Cp1252","windows-1252"),s.Cp1256=new s(o.Cp1256,24,"Cp1256","windows-1256"),s.UnicodeBigUnmarked=new s(o.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),s.UTF8=new s(o.UTF8,26,"UTF8","UTF-8"),s.ASCII=new s(o.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),s.Big5=new s(o.Big5,28,"Big5"),s.GB18030=new s(o.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),s.EUC_KR=new s(o.EUC_KR,30,"EUC_KR","EUC-KR"),s);function s(t,e,r){for(var o,i,a=[],u=3;ur.length){var a=e;e=r,r=a}var s=new Int32Array(r.length),f=r.length-e.length;o.default.arraycopy(r,0,s,0,f);for(var l=f;l=t.getDegree()&&!n.isZero();){var u=n.getDegree()-t.getDegree(),s=e.multiply(n.getCoefficient(n.getDegree()),a),f=t.multiplyByMonomial(u,s),l=e.buildMonomial(u,s);r=r.addOrSubtract(l),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=s.FOR_BITS.size)throw new a.default;return s.FOR_BITS.get(t)},s.FOR_BITS=new Map,s.FOR_VALUE=new Map,s.L=new s(n.L,"L",1),s.M=new s(n.M,"M",0),s.Q=new s(n.Q,"Q",3),s.H=new s(n.H,"H",2),s);function s(t,e,r){this.value=t,this.stringValue=e,this.bits=r,s.FOR_BITS.set(r,this),s.FOR_VALUE.set(t,this)}e.default=u},function(t,e,r){"use strict";var n,o;Object.defineProperty(e,"__esModule",{value:!0}),(o=n=n||{})[o.ERROR_CORRECTION=0]="ERROR_CORRECTION",o[o.CHARACTER_SET=1]="CHARACTER_SET",o[o.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",o[o.MIN_SIZE=3]="MIN_SIZE",o[o.MAX_SIZE=4]="MAX_SIZE",o[o.MARGIN=5]="MARGIN",o[o.PDF417_COMPACT=6]="PDF417_COMPACT",o[o.PDF417_COMPACTION=7]="PDF417_COMPACTION",o[o.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",o[o.AZTEC_LAYERS=9]="AZTEC_LAYERS",o[o.QR_VERSION=10]="QR_VERSION",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 i,a=r(87),u=(o(s,i=a.default),s.prototype.encodeCompressedGtin=function(t,e){t.append("(01)");var r=t.length();t.append("9"),this.encodeCompressedGtinWithoutAI(t,e,r)},s.prototype.encodeCompressedGtinWithoutAI=function(t,e,r){for(var n=0;n<4;++n){var o=this.getGeneralDecoder().extractNumericValueFromBitArray(e+10*n,10);o/100==0&&t.append("0"),o/10==0&&t.append("0"),t.append(o)}s.appendCheckDigit(t,r)},s.appendCheckDigit=function(t,e){for(var r=0,n=0;n<13;n++){var o=t.charAt(n+e).charCodeAt(0)-"0".charCodeAt(0);r+=0==(1&n)?3*o:o}10==(r=10-r%10)&&(r=0),t.append(r)},s.GTIN_SIZE=40,s);function s(t){return i.call(this,t)||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 i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.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 i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.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 i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.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 i,a=r(3),u=r(58),s=r(60),f=r(61),l=r(8),d=r(65),c=r(97),h=r(0),p=r(13),_=(o(g,i=p.default),g.prototype.decodeRow=function(t,e,r){for(var n=0;n=(r/2|0);){var d=u,c=f;if(f=l,(u=s).isZero())throw new i.default("r_{i-1} was zero");s=d;for(var h=o.getZero(),p=u.getCoefficient(u.getDegree()),_=o.inverse(p);s.getDegree()>=u.getDegree()&&!s.isZero();){var g=s.getDegree()-u.getDegree(),v=o.multiply(s.getCoefficient(s.getDegree()),_);h=h.addOrSubtract(o.buildMonomial(g,v)),s=s.addOrSubtract(u.multiplyByMonomial(g,v))}if(l=h.multiply(f).addOrSubtract(c),s.getDegree()>=u.getDegree())throw new a.default("Division algorithm failed to reduce polynomial?")}var w=l.getCoefficient(0);if(0===w)throw new i.default("sigmaTilde(0) was zero");var y=o.inverse(w);return[l.multiplyScalar(y),s.multiplyScalar(y)]},s.prototype.findErrorLocations=function(t){var e=t.getDegree();if(1===e)return Int32Array.from([t.getCoefficient(1)]);for(var r=new Int32Array(e),n=0,o=this.field,a=1;athis.available())throw new n.default(""+t);var e=0,r=this.bitOffset,o=this.byteOffset,i=this.bytes;if(0>8-u<<(f=a-u);e=(i[o]&s)>>f,t-=u,8===(r+=u)&&(r=0,o++)}if(0>(f=8-t)<>f,r+=t)}return this.bitOffset=r,this.byteOffset=o,e},i.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},i);function i(t){this.bytes=t,this.byteOffset=0,this.bitOffset=0}e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(8),o=r(22),i=r(21),a=(u.guessEncoding=function(t,e){if(null!=e&&void 0!==e.get(n.default.CHARACTER_SET))return e.get(n.default.CHARACTER_SET).toString();for(var r=t.length,o=!0,i=!0,a=!0,s=0,f=0,l=0,d=0,c=0,h=0,p=0,_=0,g=0,v=0,w=0,y=3=t.getWidth())throw new d.default;var f=Math.round((s-a+1)/n),l=Math.round((i-o+1)/n);if(f<=0||l<=0)throw new d.default;if(l!==f)throw new d.default;var c=Math.floor(n/2);o+=c;var h=(a+=c)+Math.floor((f-1)*n)-s;if(0=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(12),i=r(74),a=r(112),u=r(113),s=r(2),f=r(1),l=(d.prototype.getVersionNumber=function(){return this.versionNumber},d.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},d.prototype.getTotalCodewords=function(){return this.totalCodewords},d.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},d.prototype.getECBlocksForLevel=function(t){return this.ecBlocks[t.getValue()]},d.getProvisionalVersionForDimension=function(t){if(t%4!=1)throw new s.default;try{return this.getVersionForNumber((t-17)/4)}catch(t){throw new s.default}},d.getVersionForNumber=function(t){if(t<1||40=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(30),i=r(15),a=r(22),u=r(25),s=r(83),f=r(76),l=r(46),d=r(84),c=r(145),h=r(49),p=r(146),_=r(21),g=r(147),v=r(50),w=(y.calculateMaskPenalty=function(t){return d.default.applyMaskPenaltyRule1(t)+d.default.applyMaskPenaltyRule2(t)+d.default.applyMaskPenaltyRule3(t)+d.default.applyMaskPenaltyRule4(t)},y.encode=function(t,e,r){void 0===r&&(r=null);var n=y.DEFAULT_BYTE_MODE_ENCODING,u=null!==r&&void 0!==r.get(o.default.CHARACTER_SET);u&&(n=r.get(o.default.CHARACTER_SET).toString());var s=this.chooseMode(t,n),d=new i.default;if(s===f.default.BYTE&&(u||y.DEFAULT_BYTE_MODE_ENCODING!==n)){var _=a.default.getCharacterSetECIByName(n);void 0!==_&&this.appendECI(_,d)}this.appendModeInfo(s,d);var g,w=new i.default;if(this.appendBytes(t,s,w,n),null!==r&&void 0!==r.get(o.default.QR_VERSION)){var A=Number.parseInt(r.get(o.default.QR_VERSION).toString(),10);g=l.default.getVersionForNumber(A);var E=this.calculateBitsNeeded(s,d,w,g);if(!this.willFit(E,g,e))throw new v.default("Data too big for requested version")}else g=this.recommendVersion(e,s,d,w);var C=new i.default;C.appendBitArray(d);var m=s===f.default.BYTE?w.getSizeInBytes():t.length;this.appendLengthInfo(m,g,s,C),C.appendBitArray(w);var I=g.getECBlocksForLevel(e),S=g.getTotalCodewords()-I.getTotalECCodewords();this.terminateBits(S,C);var O=this.interleaveWithECBytes(C,g.getTotalCodewords(),S,I.getNumBlocks()),T=new h.default;T.setECLevel(e),T.setMode(s),T.setVersion(g);var R=g.getDimensionForVersion(),b=new c.default(R,R),N=this.chooseMaskPattern(O,e,g,b);return T.setMaskPattern(N),p.default.buildMatrix(O,e,g,N,b),T.setMatrix(b),T},y.recommendVersion=function(t,e,r,n){var o=this.calculateBitsNeeded(e,r,n,l.default.getVersionForNumber(1)),i=this.chooseVersion(o,t),a=this.calculateBitsNeeded(e,r,n,i);return this.chooseVersion(a,t)},y.calculateBitsNeeded=function(t,e,r,n){return e.getSize()+t.getCharacterCountBits(n)+r.getSize()},y.getAlphanumericCode=function(t){return tr)throw new v.default("data bits cannot fit in the QR Code"+e.getSize()+" > "+r);for(var n=0;n<4&&e.getSize()>8)+(255&u);e.appendBits(s,13)}},y.appendECI=function(t,e){e.appendBits(f.default.ECI.getBits(),4),e.appendBits(t.getValue(),8)},y.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),y.DEFAULT_BYTE_MODE_ENCODING=a.default.UTF8.getName(),y);function y(){}e.default=w},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(4),o=(i.prototype.getMode=function(){return this.mode},i.prototype.getECLevel=function(){return this.ecLevel},i.prototype.getVersion=function(){return this.version},i.prototype.getMaskPattern=function(){return this.maskPattern},i.prototype.getMatrix=function(){return this.matrix},i.prototype.toString=function(){var t=new n.default;return t.append("<<\n"),t.append(" mode: "),t.append(this.mode?this.mode.toString():"null"),t.append("\n ecLevel: "),t.append(this.ecLevel?this.ecLevel.toString():"null"),t.append("\n version: "),t.append(this.version?this.version.toString():"null"),t.append("\n maskPattern: "),t.append(this.maskPattern.toString()),this.matrix?(t.append("\n matrix:\n"),t.append(this.matrix.toString())):t.append("\n matrix: null\n"),t.append(">>\n"),t.toString()},i.prototype.setMode=function(t){this.mode=t},i.prototype.setECLevel=function(t){this.ecLevel=t},i.prototype.setVersion=function(t){this.version=t},i.prototype.setMaskPattern=function(t){this.maskPattern=t},i.prototype.setMatrix=function(t){this.matrix=t},i.isValidMaskPattern=function(t){return 0<=t&&t>f.BLOCK_SIZE_POWER;0!=(e&f.BLOCK_SIZE_MASK)&&o++;var a=r>>f.BLOCK_SIZE_POWER;0!=(r&f.BLOCK_SIZE_MASK)&&a++;var s=f.calculateBlackPoints(n,o,a,e,r),l=new u.default(e,r);f.calculateThresholdForBlock(n,o,a,e,r,s,l),this.matrix=l}else this.matrix=i.prototype.getBlackMatrix.call(this);return this.matrix},f.prototype.createBinarizer=function(t){return new f(t)},f.calculateThresholdForBlock=function(t,e,r,n,o,i,a){for(var u=o-f.BLOCK_SIZE,s=n-f.BLOCK_SIZE,l=0;l>2*f.BLOCK_SIZE_POWER;if(_-p<=f.MIN_DYNAMIC_RANGE&&(A=p/2,0>d.LUMINANCE_SHIFT]++;var s=d.estimateBlackPoint(i);if(n<3)for(a=0;a>d.LUMINANCE_SHIFT]++;var c=d.estimateBlackPoint(o),h=t.getMatrix();for(i=0;io&&(o=t[n=i]),t[i]>r&&(r=t[i]);var a=0,u=0;for(i=0;i>10,n[i]=u}return n},l.prototype.getRow=function(t,e){if(t<0||t>=this.getHeight())throw new s.default("Requested row is outside the image: "+t);var r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.length=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(11),f=r(2),l=r(0),d=r(13),c=r(9),h=r(5),p=(o(_,a=d.default),_.prototype.decodeRow=function(t,e,r){var n,o,a,f,d=this.counters;d.fill(0),this.decodeRowResult="";var p,g,v=_.findAsteriskPattern(e,d),w=e.getNextSet(v[1]),y=e.getSize();do{_.recordPattern(e,w,d);var A=_.toNarrowWidePattern(d);if(A<0)throw new l.default;p=_.patternToChar(A),this.decodeRowResult+=p,g=w;try{for(var E=i(d),C=E.next();!C.done;C=E.next())w+=C.value}catch(t){n={error:t}}finally{try{C&&!C.done&&(o=E.return)&&o.call(E)}finally{if(n)throw n.error}}w=e.getNextSet(w)}while("*"!==p);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var m,I=0;try{for(var S=i(d),O=S.next();!O.done;O=S.next())I+=O.value}catch(t){a={error:t}}finally{try{O&&!O.done&&(f=S.return)&&f.call(S)}finally{if(a)throw a.error}}if(w!==y&&2*(w-g-I)=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(62),s=r(96),f=r(9),l=r(8),d=r(0),c=r(4),h=r(3),p=r(5),_=r(63),g=r(36),v=r(10),w=r(64),y=r(7),A=r(13),E=(o(C,a=u.default),C.prototype.decodeRow=function(t,e,r){var n,o,a,u,s=this.decodePair(e,!1,t,r);C.addOrTally(this.possibleLeftPairs,s),e.reverse();var f=this.decodePair(e,!0,t,r);C.addOrTally(this.possibleRightPairs,f),e.reverse();try{for(var l=i(this.possibleLeftPairs),c=l.next();!c.done;c=l.next()){var h=c.value;if(1=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(13),s=r(0),f=r(10),l=(o(d,a=u.default),d.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},d.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},d.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},d.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},d.prototype.getOddCounts=function(){return this.oddCounts},d.prototype.getEvenCounts=function(){return this.evenCounts},d.prototype.parseFinderValue=function(t,e){for(var r=0;rn&&(n=e[o],r=o);t[r]++},d.decrement=function(t,e){for(var r=0,n=e[0],o=1;o=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=(i.prototype.RSSUtils=function(){},i.getRSSvalue=function(t,e,r){var o,a,u=0;try{for(var s=n(t),f=s.next();!f.done;f=s.next())u+=f.value}catch(t){o={error:t}}finally{try{f&&!f.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}for(var l=0,d=0,c=t.length,h=0;h=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(8),f=r(9),l=r(5),d=r(13),c=r(4),h=r(7),p=r(2),_=r(0),g=(o(v,a=d.default),v.prototype.decodeRow=function(t,e,r){var n,o,a=this.decodeStart(e),d=this.decodeEnd(e),h=new c.default;v.decodeMiddle(e,a[1],d[0],h);var _=h.toString(),g=null;null!=r&&(g=r.get(s.default.ALLOWED_LENGTHS)),null==g&&(g=v.DEFAULT_ALLOWED_LENGTHS);var w=_.length,y=!1,A=0;try{for(var E=i(g),C=E.next();!C.done;C=E.next()){var m=C.value;if(w===m){y=!0;break}A=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(67),f=r(0),l=(o(d,a=s.default),d.prototype.decodeMiddle=function(t,e,r){var n,o,a,u,f=this.decodeMiddleCounters;f[0]=0,f[1]=0,f[2]=0,f[3]=0;for(var l=t.getSize(),c=e[1],h=0,p=0;p<6&&c=e.getSize()||!e.isRange(C,m,!1))throw new h.default;var I=w.toString();if(I.length<8)throw new p.default;if(!v.checkChecksum(I))throw new _.default;var S=(n[1]+n[0])/2,O=(A[1]+A[0])/2,T=this.getBarcodeFormat(),R=[new l.default(S,t),new l.default(O,t)],b=new s.default(I,null,0,R,T,(new Date).getTime()),N=0;try{var M=d.default.decodeRow(t,e,A[1]);b.putMetadata(f.default.UPC_EAN_EXTENSION,M.getText()),b.putAllMetadata(M.getResultMetadata()),b.addResultPoints(M.getResultPoints()),N=M.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 T===a.default.EAN_13||a.default.UPC_A,b},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=this.height||this.rightInit>=this.width)throw new i.default}e.default=a},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(8),i=r(3),a=r(45),u=r(35),s=r(37),f=r(0),l=r(77),d=r(82),c=(h.prototype.decode=function(t,e){return this.setHints(e),this.decodeInternal(t)},h.prototype.decodeWithState=function(t){return null!==this.readers&&void 0!==this.readers||this.setHints(null),this.decodeInternal(t)},h.prototype.setHints=function(t){var e=null!=(this.hints=t)&&void 0!==t.get(o.default.TRY_HARDER),r=null==t?null:t.get(o.default.POSSIBLE_FORMATS),n=new Array;if(null!=r){var f=r.some(function(t){return t===i.default.UPC_A||t===i.default.UPC_E||t===i.default.EAN_13||t===i.default.EAN_8||t===i.default.CODABAR||t===i.default.CODE_39||t===i.default.CODE_93||t===i.default.CODE_128||t===i.default.ITF||t===i.default.RSS_14||t===i.default.RSS_EXPANDED});f&&!e&&n.push(new u.default(t)),r.includes(i.default.QR_CODE)&&n.push(new a.default),r.includes(i.default.DATA_MATRIX)&&n.push(new s.default),r.includes(i.default.PDF_417)&&n.push(new l.default),f&&e&&n.push(new u.default(t))}0===n.length&&(e||n.push(new u.default(t)),n.push(new a.default),n.push(new s.default),n.push(new l.default),e&&n.push(new u.default(t))),this.readers=n},h.prototype.reset=function(){var t,e;if(null!==this.readers)try{for(var r=n(this.readers),o=r.next();!o.done;o=r.next())o.value.reset()}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},h.prototype.decodeInternal=function(t){var e,r;if(null===this.readers)throw new d.default("No readers where selected, nothing can be read.");try{for(var o=n(this.readers),i=o.next();!i.done;i=o.next()){var a=i.value;try{return a.decode(t,this.hints)}catch(t){if(t instanceof d.default)continue}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}throw new f.default("No MultiFormat Readers were able to detect the code.")},h);function h(){}e.default=c},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(29),i=r(16),a=(u.numBitsDiffering=function(t,e){return i.default.bitCount(t^e)},u.decodeFormatInformation=function(t,e){var r=u.doDecodeFormatInformation(t,e);return null!==r?r:u.doDecodeFormatInformation(t^u.FORMAT_INFO_MASK_QR,e^u.FORMAT_INFO_MASK_QR)},u.doDecodeFormatInformation=function(t,e){var r,o,i=Number.MAX_SAFE_INTEGER,a=0;try{for(var s=n(u.FORMAT_INFO_DECODE_LOOKUP),f=s.next();!f.done;f=s.next()){var l=f.value,d=l[0];if(d===t||d===e)return new u(l[1]);var c=u.numBitsDiffering(t,d);c>3&3),this.dataMask=7&t}e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.isMirrored=function(){return this.mirrored},o.prototype.applyMirroredCorrection=function(t){if(this.mirrored&&null!==t&&!(t.length<3)){var e=t[0];t[0]=t[2],t[2]=e}},o);function o(t){this.mirrored=t}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,o,i=r(1);(o=n=e.ModeValues||(e.ModeValues={}))[o.TERMINATOR=0]="TERMINATOR",o[o.NUMERIC=1]="NUMERIC",o[o.ALPHANUMERIC=2]="ALPHANUMERIC",o[o.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",o[o.BYTE=4]="BYTE",o[o.ECI=5]="ECI",o[o.KANJI=6]="KANJI",o[o.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",o[o.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",o[o.HANZI=9]="HANZI";var a=(u.forBits=function(t){var e=u.FOR_BITS.get(t);if(void 0===e)throw new i.default;return e},u.prototype.getCharacterCountBits=function(t){var e,r=t.getVersionNumber();return e=r<=9?0:r<=26?1:2,this.characterCountBitsForVersions[e]},u.prototype.getValue=function(){return this.value},u.prototype.getBits=function(){return this.bits},u.prototype.equals=function(t){if(!(t instanceof u))return!1;var e=t;return this.value===e.value},u.prototype.toString=function(){return this.stringValue},u.FOR_BITS=new Map,u.FOR_VALUE=new Map,u.TERMINATOR=new u(n.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),u.NUMERIC=new u(n.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),u.ALPHANUMERIC=new u(n.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),u.STRUCTURED_APPEND=new u(n.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),u.BYTE=new u(n.BYTE,"BYTE",Int32Array.from([8,16,16]),4),u.ECI=new u(n.ECI,"ECI",Int32Array.from([0,0,0]),7),u.KANJI=new u(n.KANJI,"KANJI",Int32Array.from([8,10,12]),8),u.FNC1_FIRST_POSITION=new u(n.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),u.FNC1_SECOND_POSITION=new u(n.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),u.HANZI=new u(n.HANZI,"HANZI",Int32Array.from([8,10,12]),13),u);function u(t,e,r,n){this.value=t,this.stringValue=e,this.characterCountBitsForVersions=r,this.bits=n,u.FOR_BITS.set(n,this),u.FOR_VALUE.set(t,this)}e.default=a},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(3),i=r(11),a=r(2),u=r(0),s=r(9),f=r(19),l=r(16),d=r(14),c=r(123),h=r(125),p=(_.prototype.decode=function(t,e){void 0===e&&(e=null);var r=_.decode(t,e,!1);if(null==r||0===r.length||null==r[0])throw u.default.getNotFoundInstance();return r[0]},_.prototype.decodeMultiple=function(t,e){void 0===e&&(e=null);try{return _.decode(t,e,!0)}catch(t){if(t instanceof a.default||t instanceof i.default)throw u.default.getNotFoundInstance();throw t}},_.decode=function(t,e,r){var i,a,u=new Array,f=c.default.detectMultiple(t,e,r);try{for(var l=n(f.getPoints()),p=l.next();!p.done;p=l.next()){var g=p.value,v=h.default.decode(f.getBits(),g[4],g[5],g[6],g[7],_.getMinCodewordWidth(g),_.getMaxCodewordWidth(g)),w=new s.default(v.getText(),v.getRawBytes(),void 0,g,o.default.PDF_417);w.putMetadata(d.default.ERROR_CORRECTION_LEVEL,v.getECLevel());var y=v.getOther();null!=y&&w.putMetadata(d.default.PDF417_EXTRA_METADATA,y),u.push(w)}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}return u.map(function(t){return t})},_.getMaxWidth=function(t,e){return null==t||null==e?0:Math.trunc(Math.abs(t.getX()-e.getX()))},_.getMinWidth=function(t,e){return null==t||null==e?l.default.MAX_VALUE:Math.trunc(Math.abs(t.getX()-e.getX()))},_.getMaxCodewordWidth=function(t){return Math.floor(Math.max(Math.max(_.getMaxWidth(t[0],t[4]),_.getMaxWidth(t[6],t[2])*f.default.MODULES_IN_CODEWORD/f.default.MODULES_IN_STOP_PATTERN),Math.max(_.getMaxWidth(t[1],t[5]),_.getMaxWidth(t[7],t[3])*f.default.MODULES_IN_CODEWORD/f.default.MODULES_IN_STOP_PATTERN)))},_.getMinCodewordWidth=function(t){return Math.floor(Math.min(Math.min(_.getMinWidth(t[0],t[4]),_.getMinWidth(t[6],t[2])*f.default.MODULES_IN_CODEWORD/f.default.MODULES_IN_STOP_PATTERN),Math.min(_.getMinWidth(t[1],t[5]),_.getMinWidth(t[7],t[3])*f.default.MODULES_IN_CODEWORD/f.default.MODULES_IN_STOP_PATTERN)))},_.prototype.reset=function(){},_);function _(){}e.default=p},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(1),i=r(7),a=r(4),u=(s.prototype.getCoefficients=function(){return this.coefficients},s.prototype.getDegree=function(){return this.coefficients.length-1},s.prototype.isZero=function(){return 0===this.coefficients[0]},s.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},s.prototype.evaluateAt=function(t){var e,r;if(0===t)return this.getCoefficient(0);if(1===t){var o=0;try{for(var i=n(this.coefficients),a=i.next();!a.done;a=i.next()){var u=a.value;o=this.field.add(o,u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return o}for(var s=this.coefficients[0],f=this.coefficients.length,l=1;lr.length){var n=e;e=r,r=n}var a=new Int32Array(r.length),u=r.length-e.length;i.default.arraycopy(r,0,a,0,u);for(var f=u;f=this.image.getHeight()&&(h=this.image.getHeight()-1);var p=new o.default(c.getX(),h);r?i=p:s=p}return new a(this.image,n,i,u,s)},a.prototype.getMinX=function(){return this.minX},a.prototype.getMaxX=function(){return this.maxX},a.prototype.getMinY=function(){return this.minY},a.prototype.getMaxY=function(){return this.maxY},a.prototype.getTopLeft=function(){return this.topLeft},a.prototype.getTopRight=function(){return this.topRight},a.prototype.getBottomLeft=function(){return this.bottomLeft},a.prototype.getBottomRight=function(){return this.bottomRight},a);function a(t,e,r,n,o){t instanceof a?this.constructor_2(t):this.constructor_1(t,e,r,n,o)}e.default=i},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(47),i=r(79),a=(u.prototype.getCodewordNearby=function(t){var e=this.getCodeword(t);if(null!=e)return e;for(var r=1;r=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0a?(a=n(),(u=[]).push(r())):n()===a&&u.push(r())}var e,r,a=-1,u=new Array;try{for(var s=n(this.values.entries()),f=s.next();!f.done;f=s.next()){var l=o(f.value,2);t(l[0],l[1])}}catch(t){e={error:t}}finally{try{f&&!f.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return i.default.toIntArray(u)},u.prototype.getConfidence=function(t){return this.values.get(t)},u);function u(){this.values=new Map}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 i,a=r(6),u=(o(s,i=a.default),s);function s(){return null!==i&&i.apply(this,arguments)||this}e.default=u},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(27),o=r(7),i=r(1),a=(u.prototype.buildGenerator=function(t){var e=this.cachedGenerators;if(t>=e.length)for(var r=e[e.length-1],o=this.field,i=e.length;i<=t;i++){var a=r.multiply(new n.default(o,Int32Array.from([1,o.exp(i-1+o.getGeneratorBase())])));e.push(a),r=a}return e[t]},u.prototype.encode=function(t,e){if(0===e)throw new i.default("No error correction bytes");var r=t.length-e;if(r<=0)throw new i.default("No data bytes provided");var a=this.buildGenerator(e),u=new Int32Array(r);o.default.arraycopy(t,0,u,0,r);for(var s=new n.default(this.field,u),f=(s=s.multiplyByMonomial(e,1)).divide(a)[1].getCoefficients(),l=e-f.length,d=0;dthis.information.getSize())return t+4<=this.information.getSize();for(var e=t;ethis.information.getSize()){var e=this.extractNumericValueFromBitArray(t,4);return 0==e?new u.default(this.information.getSize(),u.default.FNC1,u.default.FNC1):new u.default(this.information.getSize(),e-1,u.default.FNC1)}var r=this.extractNumericValueFromBitArray(t,7),n=(r-8)/11,o=(r-8)%11;return new u.default(t+7,n,o)},c.prototype.extractNumericValueFromBitArray=function(t,e){return c.extractNumericValueFromBitArray(this.information,t,e)},c.extractNumericValueFromBitArray=function(t,e,r){for(var n=0,o=0;othis.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(5<=e&&e<16)return!0;if(t+7>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,7);if(64<=r&&r<116)return!0;if(t+8>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(t,8);return 232<=n&&n<253},c.prototype.decodeIsoIec646=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15==e)return new a.default(t+5,a.default.FNC1);if(5<=e&&e<15)return new a.default(t+5,"0"+(e-5));var r,o=this.extractNumericValueFromBitArray(t,7);if(64<=o&&o<90)return new a.default(t+7,""+(o+1));if(90<=o&&o<116)return new a.default(t+7,""+(o+7));switch(this.extractNumericValueFromBitArray(t,8)){case 232:r="!";break;case 233:r='"';break;case 234:r="%";break;case 235:r="&";break;case 236:r="'";break;case 237:r="(";break;case 238:r=")";break;case 239:r="*";break;case 240:r="+";break;case 241:r=",";break;case 242:r="-";break;case 243:r=".";break;case 244:r="/";break;case 245:r=":";break;case 246:r=";";break;case 247:r="<";break;case 248:r="=";break;case 249:r=">";break;case 250:r="?";break;case 251:r="_";break;case 252:r=" ";break;default:throw new n.default}return new a.default(t+8,r)},c.prototype.isStillAlpha=function(t){if(t+5>this.information.getSize())return!1;var e=this.extractNumericValueFromBitArray(t,5);if(5<=e&&e<16)return!0;if(t+6>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(t,6);return 16<=r&&r<63},c.prototype.decodeAlphanumeric=function(t){var e=this.extractNumericValueFromBitArray(t,5);if(15==e)return new a.default(t+5,a.default.FNC1);if(5<=e&&e<15)return new a.default(t+5,"0"+(e-5));var r,n=this.extractNumericValueFromBitArray(t,6);if(32<=n&&n<58)return new a.default(t+6,""+(n+33));switch(n){case 58:r="*";break;case 59:r=",";break;case 60:r="-";break;case 61:r=".";break;case 62:r="/";break;default:throw new o.default("Decoding invalid alphanumeric value: "+n)}return new a.default(t+6,r)},c.prototype.isAlphaTo646ToAlphaLatch=function(t){if(t+1>this.information.getSize())return!1;for(var e=0;e<5&&e+tthis.information.getSize())return!1;for(var e=t;ethis.information.getSize())return!1;for(var e=0;e<4&&e+t=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(8),f=r(13),l=r(66),d=r(101),c=r(0),h=(o(p,a=f.default),p.prototype.decodeRow=function(t,e,r){var n,o;try{for(var a=i(this.readers),u=a.next();!u.done;u=a.next()){var s=u.value;try{return s.decodeRow(t,e,r)}catch(t){}}}catch(t){n={error:t}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}throw new c.default},p.prototype.reset=function(){var t,e;try{for(var r=i(this.readers),n=r.next();!n.done;n=r.next())n.value.reset()}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},p);function p(t){var e=a.call(this)||this,r=null==t?null:t.get(s.default.POSSIBLE_FORMATS),n=[];return null!=r&&(-1=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(3),i=r(26),a=r(9),u=r(5),s=r(14),f=r(0),l=(d.prototype.decodeRow=function(t,e,r){var n=this.decodeRowStringBuffer,i=this.decodeMiddle(e,r,n),s=n.toString(),f=d.parseExtensionString(s),l=[new u.default((r[0]+r[1])/2,t),new u.default(i,t)],c=new a.default(s,null,0,l,o.default.UPC_EAN_EXTENSION,(new Date).getTime());return null!=f&&c.putAllMetadata(f),c},d.prototype.decodeMiddle=function(t,e,r){var o,a,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var s=t.getSize(),l=e[1],c=0,h=0;h<5&&l=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(3),i=r(26),a=r(9),u=r(5),s=r(14),f=r(0),l=(d.prototype.decodeRow=function(t,e,r){var n=this.decodeRowStringBuffer,i=this.decodeMiddle(e,r,n),s=n.toString(),f=d.parseExtensionString(s),l=[new u.default((r[0]+r[1])/2,t),new u.default(i,t)],c=new a.default(s,null,0,l,o.default.UPC_EAN_EXTENSION,(new Date).getTime());return null!=f&&c.putAllMetadata(f),c},d.prototype.decodeMiddle=function(t,e,r){var o,a,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var s=t.getSize(),l=e[1],d=0,c=0;c<2&&l=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(67),f=(o(l,a=s.default),l.prototype.decodeMiddle=function(t,e,r){var n,o,a,u,f=this.decodeMiddleCounters;f[0]=0,f[1]=0,f[2]=0,f[3]=0;for(var l=t.getSize(),d=e[1],c=0;c<4&&d=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(38),i=r(25),a=r(104),u=r(106),s=r(107),f=r(11),l=(d.prototype.decode=function(t){var e,r,o=new a.default(t),i=o.getVersion(),f=o.readCodewords(),l=u.default.getDataBlocks(f,i),d=0;try{for(var c=n(l),h=c.next();!h.done;h=c.next())d+=h.value.getNumDataCodewords()}catch(t){e={error:t}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}for(var p=new Uint8Array(d),_=l.length,g=0;g<_;g++){var v=l[g],w=v.getCodewords(),y=v.getNumDataCodewords();this.correctErrors(w,y);for(var A=0;A=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(2),i=(a.prototype.getECCodewords=function(){return this.ecCodewords},a.prototype.getECBlocks=function(){return this.ecBlocks},a);function a(t,e,r){this.ecCodewords=t,this.ecBlocks=[e],r&&this.ecBlocks.push(r)}e.ECBlocks=i;var u=(s.prototype.getCount=function(){return this.count},s.prototype.getDataCodewords=function(){return this.dataCodewords},s);function s(t,e){this.count=t,this.dataCodewords=e}e.ECB=u;var f=(l.prototype.getVersionNumber=function(){return this.versionNumber},l.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},l.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},l.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},l.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},l.prototype.getTotalCodewords=function(){return this.totalCodewords},l.prototype.getECBlocks=function(){return this.ecBlocks},l.getVersionForDimensions=function(t,e){var r,i;if(0!=(1&t)||0!=(1&e))throw new o.default;try{for(var a=n(l.VERSIONS),u=a.next();!u.done;u=a.next()){var s=u.value;if(s.symbolSizeRows===t&&s.symbolSizeColumns===e)return s}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}throw new o.default},l.prototype.toString=function(){return""+this.versionNumber},l.buildVersions=function(){return[new l(1,10,10,8,8,new i(5,new u(1,3))),new l(2,12,12,10,10,new i(7,new u(1,5))),new l(3,14,14,12,12,new i(10,new u(1,8))),new l(4,16,16,14,14,new i(12,new u(1,12))),new l(5,18,18,16,16,new i(14,new u(1,18))),new l(6,20,20,18,18,new i(18,new u(1,22))),new l(7,22,22,20,20,new i(20,new u(1,30))),new l(8,24,24,22,22,new i(24,new u(1,36))),new l(9,26,26,24,24,new i(28,new u(1,44))),new l(10,32,32,14,14,new i(36,new u(1,62))),new l(11,36,36,16,16,new i(42,new u(1,86))),new l(12,40,40,18,18,new i(48,new u(1,114))),new l(13,44,44,20,20,new i(56,new u(1,144))),new l(14,48,48,22,22,new i(68,new u(1,174))),new l(15,52,52,24,24,new i(42,new u(2,102))),new l(16,64,64,14,14,new i(56,new u(2,140))),new l(17,72,72,16,16,new i(36,new u(4,92))),new l(18,80,80,18,18,new i(48,new u(4,114))),new l(19,88,88,20,20,new i(56,new u(4,144))),new l(20,96,96,22,22,new i(68,new u(4,174))),new l(21,104,104,24,24,new i(56,new u(6,136))),new l(22,120,120,18,18,new i(68,new u(6,175))),new l(23,132,132,20,20,new i(62,new u(8,163))),new l(24,144,144,22,22,new i(62,new u(8,156),new u(2,155))),new l(25,8,18,6,16,new i(7,new u(1,5))),new l(26,8,32,6,14,new i(11,new u(1,10))),new l(27,12,26,10,24,new i(14,new u(1,16))),new l(28,12,36,10,16,new i(18,new u(1,22))),new l(29,16,36,14,16,new i(24,new u(1,32))),new l(30,16,48,14,22,new i(28,new u(1,49)))]},l.VERSIONS=l.buildVersions(),l);function l(t,e,r,o,i,a){var u,s;this.versionNumber=t,this.symbolSizeRows=e,this.symbolSizeColumns=r,this.dataRegionSizeRows=o,this.dataRegionSizeColumns=i;var f=0,l=(this.ecBlocks=a).getECCodewords(),d=a.getECBlocks();try{for(var c=n(d),h=c.next();!h.done;h=c.next()){var p=h.value;f+=p.getCount()*(p.getDataCodewords()+l)}}catch(t){u={error:t}}finally{try{h&&!h.done&&(s=c.return)&&s.call(c)}finally{if(u)throw u.error}}this.totalCodewords=f}e.default=f},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(1),i=(a.getDataBlocks=function(t,e){var r,i,u,s,f=e.getECBlocks(),l=0,d=f.getECBlocks();try{for(var c=n(d),h=c.next();!h.done;h=c.next())l+=(w=h.value).getCount()}catch(t){r={error:t}}finally{try{h&&!h.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}var p=new Array(l),_=0;try{for(var g=n(d),v=g.next();!v.done;v=g.next())for(var w=v.value,y=0;y05"),r.insert(0,"");break;case 237:e.append("[)>06"),r.insert(0,"");break;case 238:return n.ANSIX12_ENCODE;case 239:return n.TEXT_ENCODE;case 240:return n.EDIFACT_ENCODE;case 241:break;default:if(254!==i||0!==t.available())throw new l.default}}while(0");break;case 3:e.append(" ");break;default:if(i<14)e.append(String.fromCharCode(i+44));else{if(!(i<40))throw new l.default;e.append(String.fromCharCode(i+51))}}}}while(0","?","@","[","\\","]","^","_"],h.TEXT_BASIC_SET_CHARS=["*","*","*"," ","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"],h.TEXT_SHIFT2_SET_CHARS=h.C40_SHIFT2_SET_CHARS,h.TEXT_SHIFT3_SET_CHARS=["`","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","{","|","}","~",String.fromCharCode(127)],h);function h(){}e.default=c},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||0Math.abs(o-r);if(a){var u=r;r=n,n=u,u=o,o=i,i=u}for(var s=Math.abs(o-r),f=Math.abs(i-n),l=-s/2,d=n=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(12),i=r(25),a=r(38),u=r(111),s=r(75),f=r(115),l=r(116),d=r(11),c=(h.prototype.decodeBooleanArray=function(t,e){return this.decodeBitMatrix(o.default.parseFromBooleanArray(t),e)},h.prototype.decodeBitMatrix=function(t,e){var r=new u.default(t),n=null;try{return this.decodeBitMatrixParser(r,e)}catch(t){n=t}try{r.remask(),r.setMirror(!0),r.readVersion(),r.readFormatInformation(),r.mirror();var o=this.decodeBitMatrixParser(r,e);return o.setOther(new s.default(!0)),o}catch(t){if(null!==n)throw n;throw t}},h.prototype.decodeBitMatrixParser=function(t,e){var r,o,i,a,u=t.readVersion(),s=t.readFormatInformation().getErrorCorrectionLevel(),d=t.readCodewords(),c=f.default.getDataBlocks(d,u,s),h=0;try{for(var p=n(c),_=p.next();!_.done;_=p.next())h+=(A=_.value).getNumDataCodewords()}catch(t){r={error:t}}finally{try{_&&!_.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}var g=new Uint8Array(h),v=0;try{for(var w=n(c),y=w.next();!y.done;y=w.next()){var A,E=(A=y.value).getCodewords(),C=A.getNumDataCodewords();this.correctErrors(E,C);for(var m=0;m=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=(i.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},i.prototype.getNumBlocks=function(){var t,e,r=0,o=this.ecBlocks;try{for(var i=n(o),a=i.next();!a.done;a=i.next())r+=a.value.getCount()}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return r},i.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},i.prototype.getECBlocks=function(){return this.ecBlocks},i);function i(t){for(var e=[],r=1;r=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(1),i=(a.getDataBlocks=function(t,e,r){var i,u,s,f;if(t.length!==e.getTotalCodewords())throw new o.default;var l=e.getECBlocksForLevel(r),d=0,c=l.getECBlocks();try{for(var h=n(c),p=h.next();!p.done;p=h.next())d+=(y=p.value).getCount()}catch(t){i={error:t}}finally{try{p&&!p.done&&(u=h.return)&&u.call(h)}finally{if(i)throw i.error}}var _=new Array(d),g=0;try{for(var v=n(c),w=v.next();!w.done;w=v.next())for(var y=w.value,A=0;At.available())throw new l.default;for(var n=new Uint8Array(2*r),o=0;0>8&255,n[o+1]=255&u,o+=2,r--}try{e.append(f.default.decode(n,a.default.GB2312))}catch(t){throw new l.default(t)}},c.decodeKanjiSegment=function(t,e,r){if(13*r>t.available())throw new l.default;for(var n=new Uint8Array(2*r),o=0;0>8,n[o+1]=u,o+=2,r--}try{e.append(f.default.decode(n,a.default.SHIFT_JIS))}catch(t){throw new l.default(t)}},c.decodeByteSegment=function(t,e,r,n,o,i){if(8*r>t.available())throw new l.default;for(var u,s=new Uint8Array(r),d=0;d=c.ALPHANUMERIC_CHARS.length)throw new l.default;return c.ALPHANUMERIC_CHARS[t]},c.decodeAlphanumericSegment=function(t,e,r,n){for(var o=e.length();1=this.image.getWidth()&&(i=(this.image.getWidth()-1-t)/(a-t),a=this.image.getWidth()-1);var u=Math.floor(e-(n-e)*i);return i=1,u<0?(i=e/(e-u),u=0):u>=this.image.getHeight()&&(i=(this.image.getHeight()-1-e)/(u-e),u=this.image.getHeight()-1),a=Math.floor(t+(a-t)*i),(o+=this.sizeOfBlackWhiteBlackRun(t,e,a,u))-1},p.prototype.sizeOfBlackWhiteBlackRun=function(t,e,r,n){var o=Math.abs(n-e)>Math.abs(r-t);if(o){var i=t;t=e,e=i,i=r,r=n,n=i}for(var a=Math.abs(r-t),u=Math.abs(n-e),f=-a/2,l=t=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(8),i=r(5),a=r(119),u=r(120),s=r(0),f=(l.prototype.getImage=function(){return this.image},l.prototype.getPossibleCenters=function(){return this.possibleCenters},l.prototype.find=function(t){var e=null!=t&&void 0!==t.get(o.default.TRY_HARDER),r=null!=t&&void 0!==t.get(o.default.PURE_BARCODE),n=this.image,a=n.getHeight(),s=n.getWidth(),f=Math.floor(3*a/(4*l.MAX_MODULES));(fc[2]&&(h+=g-c[2]-f,_=s-1)}c[p=0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0}else c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,p=3;else c[++p]++;else c[p]++;l.foundPatternCross(c)&&!0===this.handlePossibleCenter(c,h,s,r)&&(f=c[0],this.hasSkipped&&(d=this.haveMultiplyConfirmedCenters()))}var v=this.selectBestPatterns();return i.default.orderBestPatterns(v),new u.default(v)},l.centerFromEnd=function(t,e){return e-t[4]-t[3]-t[2]/2},l.foundPatternCross=function(t){for(var e=0,r=0;r<5;r++){var n=t[r];if(0===n)return!1;e+=n}if(e<7)return!1;var o=e/7,i=o/2;return Math.abs(o-t[0])r)return!1;for(;i<=t&&i<=e&&a.get(e-i,t-i)&&o[0]<=r;)o[0]++,i++;if(o[0]>r)return!1;var u=a.getHeight(),s=a.getWidth();for(i=1;t+i=r)return!1;for(;t+i=r)return!1;var f=o[0]+o[1]+o[2]+o[3]+o[4];return Math.abs(f-n)<2*n&&l.foundPatternCross(o)},l.prototype.crossCheckVertical=function(t,e,r,n){for(var o=this.image,i=o.getHeight(),a=this.getCrossCheckStateCount(),u=t;0<=u&&o.get(e,u);)a[2]++,u--;if(u<0)return NaN;for(;0<=u&&!o.get(e,u)&&a[1]<=r;)a[1]++,u--;if(u<0||a[1]>r)return NaN;for(;0<=u&&o.get(e,u)&&a[0]<=r;)a[0]++,u--;if(a[0]>r)return NaN;for(u=t+1;u=r)return NaN;for(;u=r)return NaN;var s=a[0]+a[1]+a[2]+a[3]+a[4];return 5*Math.abs(s-n)>=2*n?NaN:l.foundPatternCross(a)?l.centerFromEnd(a,u):NaN},l.prototype.crossCheckHorizontal=function(t,e,r,n){for(var o=this.image,i=o.getWidth(),a=this.getCrossCheckStateCount(),u=t;0<=u&&o.get(u,e);)a[2]++,u--;if(u<0)return NaN;for(;0<=u&&!o.get(u,e)&&a[1]<=r;)a[1]++,u--;if(u<0||a[1]>r)return NaN;for(;0<=u&&o.get(u,e)&&a[0]<=r;)a[0]++,u--;if(a[0]>r)return NaN;for(u=t+1;u=r)return NaN;for(;u=r)return NaN;var s=a[0]+a[1]+a[2]+a[3]+a[4];return 5*Math.abs(s-n)>=n?NaN:l.foundPatternCross(a)?l.centerFromEnd(a,u):NaN},l.prototype.handlePossibleCenter=function(t,e,r,n){var o=t[0]+t[1]+t[2]+t[3]+t[4],i=l.centerFromEnd(t,r),u=this.crossCheckVertical(e,Math.floor(i),t[2],o);if(isNaN(u)||(i=this.crossCheckHorizontal(Math.floor(i),Math.floor(u),t[2],o),isNaN(i)||n&&!this.crossCheckDiagonal(Math.floor(u),Math.floor(i),t[2],o)))return!1;for(var s=o/7,f=!1,d=this.possibleCenters,c=0,h=d.length;c=l.CENTER_QUORUM){if(null!=r)return this.hasSkipped=!0,Math.floor((Math.abs(r.getX()-a.getX())-Math.abs(r.getY()-a.getY()))/2);r=a}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return 0},l.prototype.haveMultiplyConfirmedCenters=function(){var t,e,r,o,i=0,a=0,u=this.possibleCenters.length;try{for(var s=n(this.possibleCenters),f=s.next();!f.done;f=s.next())(_=f.value).getCount()>=l.CENTER_QUORUM&&(i++,a+=_.getEstimatedModuleSize())}catch(e){t={error:e}}finally{try{f&&!f.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}if(i<3)return!1;var d=a/u,c=0;try{for(var h=n(this.possibleCenters),p=h.next();!p.done;p=h.next()){var _=p.value;c+=Math.abs(_.getEstimatedModuleSize()-d)}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}return c<=.05*a},l.prototype.selectBestPatterns=function(){var t,e,r,o,i=this.possibleCenters.length;if(i<3)throw new s.default;var a,u=this.possibleCenters;if(3_&&(u.splice(g,1),g--)}}if(3=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(122),i=r(0),a=(u.prototype.find=function(){for(var t=this.startX,e=this.height,r=t+this.width,n=this.startY+e/2,o=new Int32Array(3),a=this.image,u=0;u=r)return!1;return!0},u.prototype.crossCheckVertical=function(t,e,r,n){var o=this.image,i=o.getHeight(),a=this.crossCheckStateCount;a[0]=0,a[1]=0,a[2]=0;for(var s=t;0<=s&&o.get(e,s)&&a[1]<=r;)a[1]++,s--;if(s<0||a[1]>r)return NaN;for(;0<=s&&!o.get(e,s)&&a[0]<=r;)a[0]++,s--;if(a[0]>r)return NaN;for(s=t+1;sr)return NaN;for(;sr)return NaN;var f=a[0]+a[1]+a[2];return 5*Math.abs(f-n)>=2*n?NaN:this.foundPatternCross(a)?u.centerFromEnd(a,s):NaN},u.prototype.handlePossibleCenter=function(t,e,r){var i,a,s=t[0]+t[1]+t[2],f=u.centerFromEnd(t,r),l=this.crossCheckVertical(e,f,2*t[1],s);if(!isNaN(l)){var d=(t[0]+t[1]+t[2])/3;try{for(var c=n(this.possibleCenters),h=c.next();!h.done;h=c.next()){var p=h.value;if(p.aboutEquals(d,l,f))return p.combineEstimate(l,f,d)}}catch(t){i={error:t}}finally{try{h&&!h.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}var _=new o.default(f,l,d);this.possibleCenters.push(_),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(_)}return null},u);function u(t,e,r,n,o,i,a){this.image=t,this.startX=e,this.startY=r,this.width=n,this.height=o,this.moduleSize=i,this.resultPointCallback=a,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}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 i,a=r(5),u=(o(s,i=a.default),s.prototype.aboutEquals=function(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){var n=Math.abs(t-this.estimatedModuleSize);return n<=1||n<=this.estimatedModuleSize}return!1},s.prototype.combineEstimate=function(t,e,r){return new s((this.getX()+e)/2,(this.getY()+t)/2,(this.estimatedModuleSize+r)/2)},s);function s(t,e,r){var n=i.call(this,t,e)||this;return n.estimatedModuleSize=r,n}e.default=u},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(5),i=r(7),a=r(17),u=r(124),s=(f.detectMultiple=function(t,e,r){var n=t.getBlackMatrix(),o=f.detect(r,n);return o.length||((n=n.clone()).rotate180(),o=f.detect(r,n)),new u.default(n,o)},f.detect=function(t,e){for(var r,o,i=new Array,a=0,u=0,s=!1;a=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(11),i=r(2),a=r(0),u=r(10),s=r(19),f=r(126),l=r(79),d=r(129),c=r(131),h=r(80),p=r(132),_=r(81),g=r(133),v=r(134),w=r(47),y=(A.decode=function(t,e,r,n,o,i,u){for(var s,f=new l.default(t,e,r,n,o),c=null,p=null,_=!0;;_=!1){if(null!=e&&(c=A.getRowIndicatorColumn(t,f,e,!0,i,u)),null!=n&&(p=A.getRowIndicatorColumn(t,f,n,!1,i,u)),null==(s=A.merge(c,p)))throw a.default.getNotFoundInstance();var g=s.getBoundingBox();if(!_||null==g||!(g.getMinY()f.getMaxY()))break;f=g}s.setBoundingBox(f);var v=s.getBarcodeColumnCount()+1;s.setDetectionResultColumn(0,c),s.setDetectionResultColumn(v,p);for(var w=null!=c,y=1;y<=v;y++){var E=w?y:v-y;if(void 0===s.getDetectionResultColumn(E)){var C=void 0;C=0===E||E===v?new d.default(f,0===E):new h.default(f),s.setDetectionResultColumn(E,C);for(var m=-1,I=m,S=f.getMinY();S<=f.getMaxY();S++){if((m=A.getStartColumn(s,E,S,w))<0||m>f.getMaxX()){if(-1===I)continue;m=I}var O=A.detectCodeword(t,f.getMinX(),f.getMaxX(),w,m,S,i,u);null!=O&&(C.setCodeword(S,O),I=m,i=Math.min(i,O.getWidth()),u=Math.max(u,O.getWidth()))}}}return A.createDecoderResult(s)},A.merge=function(t,e){if(null==t&&null==e)return null;var r=A.getBarcodeMetadata(t,e);if(null==r)return null;var n=l.default.merge(A.adjustBoundingBox(t),A.adjustBoundingBox(e));return new c.default(r,n)},A.adjustBoundingBox=function(t){var e,r;if(null==t)return null;var o=t.getRowHeights();if(null==o)return null;var i=A.getMax(o),a=0;try{for(var u=n(o),s=u.next();!s.done;s=u.next()){var f=s.value;if(a+=i-f,0=e.getMinY();l+=s){var c=A.detectCodeword(t,0,t.getWidth(),n,f,l,o,i);null!=c&&(a.setCodeword(l,c),f=n?c.getStartX():c.getEndX())}return a},A.adjustCodewordCount=function(t,e){var r=e[0][1],n=r.getValue(),o=t.getBarcodeColumnCount()*t.getBarcodeRowCount()-A.getNumberOfECCodeWords(t.getBarcodeECLevel());if(0===n.length){if(o<1||o>s.default.MAX_CODEWORDS_IN_BARCODE)throw a.default.getNotFoundInstance();r.setValue(o)}else n[0]!==o&&r.setValue(o)},A.createDecoderResult=function(t){var e=A.createBarcodeMatrix(t);A.adjustCodewordCount(t,e);for(var r=new Array,n=new Int32Array(t.getBarcodeRowCount()*t.getBarcodeColumnCount()),o=[],i=new Array,a=0;a=a.length)continue;a[v][f].setValue(g.getValue())}}}}catch(t){o={error:t}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}f++}}catch(t){e={error:t}}finally{try{d&&!d.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}return a},A.isValidBarcodeColumn=function(t,e){return 0<=e&&e<=t.getBarcodeColumnCount()+1},A.getStartColumn=function(t,e,r,o){var i,a,u=o?1:-1,s=null;if(A.isValidBarcodeColumn(t,e-u)&&(s=t.getDetectionResultColumn(e-u).getCodeword(r)),null!=s)return o?s.getEndX():s.getStartX();if(null!=(s=t.getDetectionResultColumn(e).getCodewordNearby(r)))return o?s.getStartX():s.getEndX();if(A.isValidBarcodeColumn(t,e-u)&&(s=t.getDetectionResultColumn(e-u).getCodewordNearby(r)),null!=s)return o?s.getEndX():s.getStartX();for(var f=0;A.isValidBarcodeColumn(t,e-u);){e-=u;try{for(var l=n(t.getDetectionResultColumn(e).getCodewords()),d=l.next();!d.done;d=l.next()){var c=d.value;if(null!=c)return(o?c.getEndX():c.getStartX())+u*f*(c.getEndX()-c.getStartX())}}catch(t){i={error:t}}finally{try{d&&!d.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}f++}return o?t.getBoundingBox().getMinX():t.getBoundingBox().getMaxX()},A.detectCodeword=function(t,e,r,n,o,i,a,f){o=A.adjustCodewordStartColumn(t,e,r,n,o,i);var l,d=A.getModuleBitCount(t,e,r,n,o,i);if(null==d)return null;var c=u.default.sum(d);if(n)l=o+c;else{for(var h=0;hA.CODEWORD_SKEW_SIZE)return o;a+=u}u=-u,n=!n}return a},A.checkCodewordSkew=function(t,e,r){return e-A.CODEWORD_SKEW_SIZE<=t&&t<=r+A.CODEWORD_SKEW_SIZE},A.decodeCodewords=function(t,e,r){if(0===t.length)throw i.default.getFormatInstance();var n=1<r/2+A.MAX_ERRORS||r<0||A.MAX_EC_CODEWORDSt.length)throw i.default.getFormatInstance();if(0===r){if(!(e>=1;return e},A.getCodewordBucketNumber=function(t){return t instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(t):this.getCodewordBucketNumber_number(t)},A.getCodewordBucketNumber_number=function(t){return A.getCodewordBucketNumber(A.getBitCountForCodeword(t))},A.getCodewordBucketNumber_Int32Array=function(t){return(t[0]-t[2]+t[4]-t[6]+9)%9},A.toString=function(t){for(var e=new w.default,r=0;r=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(11),i=r(78),a=r(127),u=(s.prototype.decode=function(t,e,r){for(var a,u,s=new i.default(this.field,t),f=new Int32Array(e),l=!1,d=e;0=Math.round(r/2);){var f=i,l=u;if(u=s,(i=a).isZero())throw o.default.getChecksumInstance();a=f;for(var d=this.field.getZero(),c=i.getCoefficient(i.getDegree()),h=this.field.inverse(c);a.getDegree()>=i.getDegree()&&!a.isZero();){var p=a.getDegree()-i.getDegree(),_=this.field.multiply(a.getCoefficient(a.getDegree()),h);d=d.add(this.field.buildMonomial(p,_)),a=a.subtract(i.multiplyByMonomial(p,_))}s=d.multiply(u).subtract(l).negative()}var g=s.getCoefficient(0);if(0===g)throw o.default.getChecksumInstance();var v=this.field.inverse(g);return[s.multiply(v),a.multiply(v)]},s.prototype.findErrorLocations=function(t){for(var e=t.getDegree(),r=new Int32Array(e),n=0,i=1;i=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(19),s=r(130),f=r(80),l=r(81),d=(o(c,a=f.default),c.prototype.setRowNumbers=function(){var t,e;try{for(var r=i(this.getCodewords()),n=r.next();!n.done;n=r.next()){var o=n.value;null!=o&&o.setRowNumberAsRowIndicatorColumn()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},c.prototype.adjustCompleteIndicatorColumnRowNumbers=function(t){var e=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(e,t);for(var r=this.getBoundingBox(),n=this._isLeft?r.getTopLeft():r.getTopRight(),o=this._isLeft?r.getBottomLeft():r.getBottomRight(),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.imageRowToCodewordIndex(Math.trunc(o.getY())),u=-1,s=1,f=0,l=i;l=t.getRowCount()||l=n.length)continue;n[s]++}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return n},c.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(t){for(var e=this.getBoundingBox(),r=this._isLeft?e.getTopLeft():e.getTopRight(),n=this._isLeft?e.getBottomLeft():e.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(r.getY())),i=this.imageRowToCodewordIndex(Math.trunc(n.getY())),a=this.getCodewords(),u=-1,s=1,f=0,l=o;l=t.getRowCount()?a[l]=null:(u=d.getRowNumber(),f=1)}},c.prototype.getBarcodeMetadata=function(){var t,e,r=this.getCodewords(),n=new l.default,o=new l.default,a=new l.default,f=new l.default;try{for(var d=i(r),c=d.next();!c.done;c=d.next()){var h=c.value;if(null!=h){h.setRowNumberAsRowIndicatorColumn();var p=h.getValue()%30,_=h.getRowNumber();switch(this._isLeft||(_+=2),_%3){case 0:o.setValue(3*p+1);break;case 1:f.setValue(p/3),a.setValue(p%3);break;case 2:n.setValue(1+p)}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=d.return)&&e.call(d)}finally{if(t)throw t.error}}if(0===n.getValue().length||0===o.getValue().length||0===a.getValue().length||0===f.getValue().length||n.getValue()[0]<1||o.getValue()[0]+a.getValue()[0]u.default.MAX_ROWS_IN_BARCODE)return null;var g=new s.default(n.getValue()[0],o.getValue()[0],a.getValue()[0],f.getValue()[0]);return this.removeIncorrectCodewords(r,g),g},c.prototype.removeIncorrectCodewords=function(t,e){for(var r=0;re.getRowCount())t[r]=null;else switch(this._isLeft||(i+=2),i%3){case 0:3*o+1!==e.getRowCountUpperPart()&&(t[r]=null);break;case 1:Math.trunc(o/3)===e.getErrorCorrectionLevel()&&o%3===e.getRowCountLowerPart()||(t[r]=null);break;case 2:1+o!==e.getColumnCount()&&(t[r]=null)}}}},c.prototype.isLeft=function(){return this._isLeft},c.prototype.toString=function(){return"IsLeft: "+this._isLeft+"\n"+a.prototype.toString.call(this)},c);function c(t,e){var r=a.call(this,t)||this;return r._isLeft=e,r}e.default=d},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getColumnCount=function(){return this.columnCount},o.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},o.prototype.getRowCount=function(){return this.rowCount},o.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},o.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},o);function o(t,e,r,n){this.columnCount=t,this.errorCorrectionLevel=n,this.rowCountUpperPart=e,this.rowCountLowerPart=r,this.rowCount=e+r}e.default=n},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(19),i=r(47),a=(u.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);for(var t,e=o.default.MAX_CODEWORDS_IN_BARCODE;t=e,0<(e=this.adjustRowNumbersAndGetCount())&&e>=1;r=1&e,u.RATIOS_TABLE[t]||(u.RATIOS_TABLE[t]=new Array(o.default.BARS_IN_MODULE)),u.RATIOS_TABLE[t][o.default.BARS_IN_MODULE-n-1]=Math.fround(i/o.default.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},u.getDecodedValue=function(t){var e=u.getDecodedCodewordValue(u.sampleBitCounts(t));return-1!==e?e:u.getClosestDecodedValue(t)},u.sampleBitCounts=function(t){for(var e=n.default.sum(t),r=new Int32Array(o.default.BARS_IN_MODULE),i=0,a=0,u=0;ut[0])throw a.default.getFormatInstance();for(var n=new Int32Array(y.NUMBER_OF_SEQUENCE_CODEWORDS),o=0;o>v(8*(5-d))));a=u=0}}n===e[0]&&l>v(8*(5-d))));a=u=0}}}return o.append(_.default.decode(i.toByteArray(),r)),n},y.numericCompaction=function(t,e,r){for(var n=0,o=!1,i=new Int32Array(y.MAX_NUMERIC_CODEWORDS);e@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",y.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",y.EXP900=g()?function(){var t=[];t[0]=v(1);var e=v(900);t[1]=e;for(var r=2;r<16;r++)t[r]=t[r-1]*e;return t}():[],y.NUMBER_OF_SEQUENCE_CODEWORDS=2,y);function y(){}e.default=w}).call(this,r(135))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.prototype.getSegmentIndex=function(){return this.segmentIndex},o.prototype.setSegmentIndex=function(t){this.segmentIndex=t},o.prototype.getFileId=function(){return this.fileId},o.prototype.setFileId=function(t){this.fileId=t},o.prototype.getOptionalData=function(){return this.optionalData},o.prototype.setOptionalData=function(t){this.optionalData=t},o.prototype.isLastSegment=function(){return this.lastSegment},o.prototype.setLastSegment=function(t){this.lastSegment=t},o.prototype.getSegmentCount=function(){return this.segmentCount},o.prototype.setSegmentCount=function(t){this.segmentCount=t},o.prototype.getSender=function(){return this.sender||null},o.prototype.setSender=function(t){this.sender=t},o.prototype.getAddressee=function(){return this.addressee||null},o.prototype.setAddressee=function(t){this.addressee=t},o.prototype.getFileName=function(){return this.fileName},o.prototype.setFileName=function(t){this.fileName=t},o.prototype.getFileSize=function(){return this.fileSize},o.prototype.setFileSize=function(t){this.fileSize=t},o.prototype.getChecksum=function(){return this.checksum},o.prototype.setChecksum=function(t){this.checksum=t},o.prototype.getTimestamp=function(){return this.timestamp},o.prototype.setTimestamp=function(t){this.timestamp=t},o);function o(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(o.parseLong=function(t,e){return void 0===e&&(e=void 0),parseInt(t,e)},o);function o(){}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 i,a=r(17),u=r(139),s=r(16),f=r(1),l=r(141),d=r(7),c=r(33),h=(o(p,i=u.default),p.prototype.ensureCapacity=function(t){0t.length||r<0||0t.length||r<0||e+r>t.length||e+r<0)throw new n.default;if(0!==r)for(var i=0;i=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(17),i=r(4),a=(u.prototype.getHeight=function(){return this.height},u.prototype.getWidth=function(){return this.width},u.prototype.get=function(t,e){return this.bytes[e][t]},u.prototype.getArray=function(){return this.bytes},u.prototype.setNumber=function(t,e,r){this.bytes[e][t]=r},u.prototype.setBoolean=function(t,e,r){this.bytes[e][t]=r?1:0},u.prototype.clear=function(t){var e,r;try{for(var i=n(this.bytes),a=i.next();!a.done;a=i.next()){var u=a.value;o.default.fill(u,t)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}},u.prototype.equals=function(t){if(!(t instanceof u))return!1;var e=t;if(this.width!==e.width)return!1;if(this.height!==e.height)return!1;for(var r=0,n=this.height;r=r;)t^=e<=this.getHeight())throw new f.default("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length=this.getHeight())throw new f.default("Requested row is outside the image: "+t);var r=this.getWidth();(null==e||e.length>16&255,_=h>>7&510,g=255&h;d[c]=(p+_+g)/4&255}s.luminances=d}else s.luminances=t;if(void 0===n&&(s.dataWidth=e),void 0===o&&(s.dataHeight=r),void 0===a&&(s.left=0),void 0===u&&(s.top=0),s.left+e>s.dataWidth||s.top+r>s.dataHeight)throw new f.default("Crop rectangle does not fit within image data.");return s}e.default=l},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)}),i=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(3),s=r(0),f=r(9),l=r(10),d=r(62),c=r(36),h=r(63),p=r(64),_=r(152),g=r(165),v=r(166),w=r(167),y=r(7),A=(o(E,a=d.default),E.prototype.decodeRow=function(t,e,r){this.pairs.length=0,this.startFromEven=!1;try{return E.constructResult(this.decodeRow2pairs(t,e))}catch(t){console.log(t)}return this.pairs.length=0,this.startFromEven=!0,E.constructResult(this.decodeRow2pairs(t,e))},E.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},E.prototype.decodeRow2pairs=function(t,e){for(var r,n=!1;!n;)try{this.pairs.push(this.retrieveNextPair(e,this.pairs,t))}catch(t){if(!this.pairs.length)throw new t;n=!0}if(this.checkChecksum())return this.pairs;if(r=!!this.rows.length,this.storeRow(t,!1),r){var o=this.checkRowsBoolean(!1);if(null!=o)return o;if(null!=(o=this.checkRowsBoolean(!0)))return o}throw new s.default},E.prototype.checkRowsBoolean=function(t){if(25a.length)){for(var u=!0,s=0;st){o=i.isEquivalent(this.pairs);break}n=i.isEquivalent(this.pairs),r++}o||n||E.isPartialRow(this.pairs,this.rows)||(this.rows.push(r,new v.default(this.pairs,t,e)),this.removePartialRows(this.pairs,this.rows))},E.prototype.removePartialRows=function(t,e){var r,n,o,a,u,s;try{for(var f=i(e),l=f.next();!l.done;l=f.next()){var d=l.value;if(d.getPairs().length!==t.length)try{for(var c=i(d.getPairs()),h=c.next();!h.done;h=c.next()){var p=h.value;try{for(var _=i(t),v=_.next();!v.done;v=_.next()){var w=v.value;if(g.default.equals(p,w))break}}catch(t){u={error:t}}finally{try{v&&!v.done&&(s=_.return)&&s.call(_)}finally{if(u)throw u.error}}}}catch(t){o={error:t}}finally{try{h&&!h.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}}}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}},E.isPartialRow=function(t,e){var r,n,o,a,u,s;try{for(var f=i(e),l=f.next();!l.done;l=f.next()){var d=l.value,c=!0;try{for(var h=i(t),p=h.next();!p.done;p=h.next()){var _=p.value,g=!1;try{for(var v=i(d.getPairs()),w=v.next();!w.done;w=v.next()){var y=w.value;if(_.equals(y)){g=!0;break}}}catch(t){u={error:t}}finally{try{w&&!w.done&&(s=v.return)&&s.call(v)}finally{if(u)throw u.error}}if(!g){c=!1;break}}}catch(t){o={error:t}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}if(c)return!0}}catch(t){r={error:t}}finally{try{l&&!l.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}return!1},E.prototype.getRows=function(){return this.rows},E.constructResult=function(t){var e=w.default.buildBitArray(t),r=_.createDecoder(e).parseInformation(),n=t[0].getFinderPattern().getResultPoints(),o=t[t.length-1].getFinderPattern().getResultPoints(),i=[n[0],n[1],o[0],o[1]];return new f.default(r,null,null,i,u.default.RSS_EXPANDED,null)},E.prototype.checkChecksum=function(){var t=this.pairs.get(0),e=t.getLeftChar(),r=t.getRightChar();if(null==r)return!1;for(var n=r.getChecksumPortion(),o=2,i=1;i=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(0),i=(a.parseFieldsInGeneralPurpose=function(t){var e,r,i,u,s,f,l,d;if(!t)return null;if(t.length<2)throw new o.default;var c=t.substring(0,2);try{for(var h=n(a.TWO_DIGIT_DATA_LENGTH),p=h.next();!p.done;p=h.next())if((m=p.value)[0]===c)return m[1]===a.VARIABLE_LENGTH?a.processVariableAI(2,m[2],t):a.processFixedAI(2,m[1],t)}catch(t){e={error:t}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(e)throw e.error}}if(t.length<3)throw new o.default;var _=t.substring(0,3);try{for(var g=n(a.THREE_DIGIT_DATA_LENGTH),v=g.next();!v.done;v=g.next())if((m=v.value)[0]===_)return m[1]===a.VARIABLE_LENGTH?a.processVariableAI(3,m[2],t):a.processFixedAI(3,m[1],t)}catch(t){i={error:t}}finally{try{v&&!v.done&&(u=g.return)&&u.call(g)}finally{if(i)throw i.error}}try{for(var w=n(a.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),y=w.next();!y.done;y=w.next())if((m=y.value)[0]===_)return m[1]===a.VARIABLE_LENGTH?a.processVariableAI(4,m[2],t):a.processFixedAI(4,m[1],t)}catch(t){s={error:t}}finally{try{y&&!y.done&&(f=w.return)&&f.call(w)}finally{if(s)throw s.error}}if(t.length<4)throw new o.default;var A=t.substring(0,4);try{for(var E=n(a.FOUR_DIGIT_DATA_LENGTH),C=E.next();!C.done;C=E.next()){var m;if((m=C.value)[0]===A)return m[1]===a.VARIABLE_LENGTH?a.processVariableAI(4,m[2],t):a.processFixedAI(4,m[1],t)}}catch(t){l={error:t}}finally{try{C&&!C.done&&(d=E.return)&&d.call(E)}finally{if(l)throw l.error}}throw new o.default},a.processFixedAI=function(t,e,r){if(r.length +/// ZXing 选项类 +/// +/// https://zxing.github.io/zxing/apidocs/com/google/zxing/DecodeHintType.htm +public class ZXingOptions +{ + /// + /// 只解码 Pdf417 格式 / decode only Pdf417 format + /// + public bool Pdf417 { get; set; } + + /// + /// 单次|连续解码,默认单次 / Decode Once or Decode Continuously, default is Once + /// + public bool Decodeonce { get; set; } = true; + + /// + /// Time Between Decoding Attempts + /// + public int TimeBetweenDecodingAttempts { get; set; } = 10; + + /// + /// 解码所有编码形式,性能较差, 开启后可用 options.formats 指定编码形式.默认为 false | Decodde All Formats, performance is poor, you can set options.formats to customize specify the encoding formats. The default is false + /// + public bool DecodeAllFormats { get; set; } + + /// + /// 已知图像是几种可能的格式之一。 + /// + public List formats { get; set; } = new List() { + BarcodeFormat.AZTEC , + BarcodeFormat.CODABAR, + BarcodeFormat.CODE_39, + BarcodeFormat.CODE_93, + BarcodeFormat.CODE_128, + BarcodeFormat.DATA_MATRIX, + BarcodeFormat.EAN_8, + BarcodeFormat.EAN_13, + BarcodeFormat.ITF, + BarcodeFormat.MAXICODE, + BarcodeFormat.PDF_417, + BarcodeFormat.QR_CODE, + BarcodeFormat.RSS_14, + BarcodeFormat.RSS_EXPANDED, + BarcodeFormat.UPC_A, + BarcodeFormat.UPC_E, + BarcodeFormat.UPC_EAN_EXTENSION, + }; + + public bool Debug { get; set; } + + ///// + ///// 如果为 true,尝试解码为倒置图像。所有配置的解码器都被简单地用倒置图像第二次调用 + ///// + //[JsonPropertyName("ALSO_INVERTED")] + //public bool ALSO_INVERTED { get; set; } + + /// + /// EAN 或 UPC 条形码允许的扩展长度, 默认为 2. + /// + [JsonPropertyName("ALLOWED_EAN_EXTENSIONS")] + public int[]? ALLOWED_EAN_EXTENSIONS { get; set; } //= new int[] { 2 }; + + /// + /// 允许的编码数据长度——拒绝任何其他长度 + /// + [JsonPropertyName("ALLOWED_LENGTHS")] + public int[]? ALLOWED_LENGTHS { get; set; } + + /// + /// 假设 Code 39 代码使用校验位。 + /// + [JsonPropertyName("ASSUME_CODE_39_CHECK_DIGIT")] + public bool? ASSUME_CODE_39_CHECK_DIGIT { get; set; } + + /// + /// 假设条形码正在作为 GS1 条形码进行处理,并根据需要修改行为 + /// + [JsonPropertyName("ASSUME_GS1")] + public bool? ASSUME_GS1 { get; set; } + + /// + /// 指定解码时使用的字符编码(如果适用) + /// + [JsonPropertyName("CHARACTER_SET")] + public string? CHARACTER_SET { get; set; } + + ///// + ///// ResultPoint 当发现可能的情况时,需要通过回调通知调用者, 映射到一个ResultPointCallback + ///// + //public object NEED_RESULT_POINT_CALLBACK { get; set; } + + /// + /// 未指定的、特定于应用程序的提示。 + /// + [JsonPropertyName("OTHER")] + public object? OTHER { get; set; } + + /// + /// 图像是条形码的纯单色图像。 + /// + [JsonPropertyName("PURE_BARCODE")] + public bool? PURE_BARCODE { get; set; } + + /// + /// 如果为 true,则返回 Codabar 条形码中的开始和结束数字,而不是剥离它们 + /// 如果为 true,则返回 Codabar 条形码中的开始和结束数字,而不是剥离它们。它们是字母,而其余的是数字。默认情况下,它们会被剥离,但这会导致它们不会被剥离 + /// + [JsonPropertyName("RETURN_CODABAR_START_END")] + public bool? RETURN_CODABAR_START_END { get; set; } + + /// + /// 花更多的时间尝试寻找条形码;优化准确性,而不是速度 + /// + [JsonPropertyName("TRY_HARDER")] + public bool? TRY_HARDER { get; set; } +} + + +/** + * Enumerates barcode formats known to this package. Please keep alphabetized. + * + * @author Sean Owen + */ +public enum BarcodeFormat +{ + + /** Aztec 2D barcode format. */ + AZTEC, + + /** CODABAR 1D format. */ + CODABAR, + + /** Code 39 1D format. */ + CODE_39, + + /** Code 93 1D format. */ + CODE_93, + + /** Code 128 1D format. */ + CODE_128, + + /** Data Matrix 2D barcode format. */ + DATA_MATRIX, + + /** EAN-8 1D format. */ + EAN_8, + + /** EAN-13 1D format. */ + EAN_13, + + /** ITF (Interleaved Two of Five) 1D format. */ + ITF, + + /** MaxiCode 2D barcode format. */ + MAXICODE, + + /** PDF417 format. */ + PDF_417, + + /** QR Code 2D barcode format. */ + QR_CODE, + + /** RSS 14 */ + RSS_14, + + /** RSS EXPANDED */ + RSS_EXPANDED, + + /** UPC-A 1D format. */ + UPC_A, + + /** UPC-E 1D format. */ + UPC_E, + + /** UPC/EAN extension format. Not a stand-alone format. */ + UPC_EAN_EXTENSION + +}