@sythos/js_barcode_universal 1.5.6 → 1.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.md +1 -1
- package/README.md +55 -35
- package/bundle/sythos-barcode.esm.js +618 -465
- package/bundle/sythos-barcode.js +618 -465
- package/package.json +90 -24
- package/src/index.d.ts +363 -0
- package/src/index.js +286 -133
- package/src/{aztec → js/aztec}/decoder.js +0 -1
- package/src/{aztec → js/aztec}/detector.js +0 -1
- package/src/{aztec → js/aztec}/encoder.js +0 -1
- package/src/{aztec → js/aztec}/high-level.js +0 -1
- package/src/{aztec → js/aztec}/index.js +0 -1
- package/src/{aztec → js/aztec}/tables.js +0 -1
- package/src/{aztecrune → js/aztecrune}/decoder.js +0 -1
- package/src/{aztecrune → js/aztecrune}/detector.js +0 -1
- package/src/{aztecrune → js/aztecrune}/encoder.js +0 -1
- package/src/{aztecrune → js/aztecrune}/index.js +0 -1
- package/src/{aztecrune → js/aztecrune}/tables.js +0 -1
- package/src/{compactpdf417 → js/compactpdf417}/decoder.js +0 -1
- package/src/{compactpdf417 → js/compactpdf417}/detector.js +0 -1
- package/src/{compactpdf417 → js/compactpdf417}/encoder.js +0 -1
- package/src/{compactpdf417 → js/compactpdf417}/index.js +0 -5
- package/src/{compactpdf417 → js/compactpdf417}/tables.js +0 -1
- package/src/{core → js/core}/bit-buffer.js +0 -1
- package/src/{core → js/core}/bit-matrix.js +0 -1
- package/src/{core → js/core}/errors.js +0 -1
- package/src/{core → js/core}/galois-field.js +0 -1
- package/src/{core → js/core}/index.js +0 -1
- package/src/{core → js/core}/reed-solomon.js +0 -1
- package/src/{databar → js/databar}/codec.js +0 -1
- package/src/{databar → js/databar}/decoder.js +0 -1
- package/src/{databar → js/databar}/encoder.js +0 -1
- package/src/{databar → js/databar}/gs1.js +0 -1
- package/src/{databar → js/databar}/index.js +0 -1
- package/src/{databar → js/databar}/patterns.js +0 -1
- package/src/{databar → js/databar}/tables.js +0 -1
- package/src/{datamatrix → js/datamatrix}/decoder.js +0 -1
- package/src/{datamatrix → js/datamatrix}/detector.js +0 -1
- package/src/{datamatrix → js/datamatrix}/encoder.js +0 -1
- package/src/{datamatrix → js/datamatrix}/index.js +0 -1
- package/src/{datamatrix → js/datamatrix}/tables.js +0 -1
- package/src/{frameqr → js/frameqr}/decoder.js +15 -16
- package/src/{frameqr → js/frameqr}/detector.js +2 -3
- package/src/{frameqr → js/frameqr}/encoder.js +7 -8
- package/src/{frameqr → js/frameqr}/index.js +0 -1
- package/src/{frameqr → js/frameqr}/tables.js +10 -11
- package/src/{image → js/image}/binarizer.js +0 -1
- package/src/{image → js/image}/grid-sampler.js +0 -1
- package/src/js/image/index.js +40 -0
- package/src/{image → js/image}/luminance.js +0 -1
- package/src/{image → js/image}/perspective.js +0 -1
- package/src/{micropdf417 → js/micropdf417}/compaction.js +0 -1
- package/src/{micropdf417 → js/micropdf417}/decoder.js +0 -1
- package/src/{micropdf417 → js/micropdf417}/detector.js +0 -1
- package/src/{micropdf417 → js/micropdf417}/encoder.js +0 -1
- package/src/{micropdf417 → js/micropdf417}/error-correction.js +0 -1
- package/src/{micropdf417 → js/micropdf417}/index.js +0 -1
- package/src/{micropdf417 → js/micropdf417}/tables.js +0 -1
- package/src/{microqr → js/microqr}/decoder.js +0 -1
- package/src/{microqr → js/microqr}/detector.js +0 -1
- package/src/{microqr → js/microqr}/encoder.js +0 -1
- package/src/js/microqr/index.js +36 -0
- package/src/{microqr → js/microqr}/tables.js +0 -1
- package/src/{oned → js/oned}/addons.js +0 -1
- package/src/{oned → js/oned}/index.js +0 -1
- package/src/{oned → js/oned}/patterns.js +0 -1
- package/src/{oned → js/oned}/reader.js +0 -1
- package/src/{oned → js/oned}/writers.js +0 -1
- package/src/{pdf417 → js/pdf417}/compaction.js +0 -1
- package/src/{pdf417 → js/pdf417}/decoder.js +0 -1
- package/src/{pdf417 → js/pdf417}/detector.js +0 -1
- package/src/{pdf417 → js/pdf417}/encoder.js +0 -1
- package/src/{pdf417 → js/pdf417}/error-correction.js +0 -1
- package/src/js/pdf417/index.js +6 -0
- package/src/{pdf417 → js/pdf417}/tables.js +0 -1
- package/src/{qr → js/qr}/decoder.js +0 -1
- package/src/{qr → js/qr}/detector.js +0 -1
- package/src/{qr → js/qr}/encoder.js +0 -1
- package/src/js/qr/index.js +44 -0
- package/src/{qr → js/qr}/tables.js +0 -1
- package/src/{render → js/render}/image-data.js +0 -1
- package/src/{render → js/render}/index.js +0 -1
- package/src/{render → js/render}/options.js +0 -1
- package/src/{render → js/render}/png.js +0 -1
- package/src/{render → js/render}/svg.js +0 -1
- package/src/{render → js/render}/webgl.js +0 -1
- package/src/{render → js/render}/webgpu.js +0 -1
- package/src/{rmqr → js/rmqr}/decoder.js +0 -1
- package/src/{rmqr → js/rmqr}/detector.js +0 -1
- package/src/{rmqr → js/rmqr}/encoder.js +0 -1
- package/src/{rmqr → js/rmqr}/index.js +0 -1
- package/src/{rmqr → js/rmqr}/tables.js +0 -1
- package/src/ts/aztec/decoder.d.ts +57 -0
- package/src/ts/aztec/detector.d.ts +62 -0
- package/src/ts/aztec/encoder.d.ts +94 -0
- package/src/ts/aztec/high-level.d.ts +89 -0
- package/src/ts/aztec/index.d.ts +35 -0
- package/src/ts/aztec/tables.d.ts +144 -0
- package/src/ts/aztecrune/decoder.d.ts +56 -0
- package/src/ts/aztecrune/detector.d.ts +53 -0
- package/src/ts/aztecrune/encoder.d.ts +51 -0
- package/src/ts/aztecrune/index.d.ts +35 -0
- package/src/ts/aztecrune/tables.d.ts +75 -0
- package/src/ts/bundle/sythos-barcode.d.ts +31 -0
- package/src/ts/bundle/sythos-barcode.esm.d.ts +31 -0
- package/src/ts/compactpdf417/decoder.d.ts +64 -0
- package/src/ts/compactpdf417/detector.d.ts +48 -0
- package/src/ts/compactpdf417/encoder.d.ts +49 -0
- package/src/ts/compactpdf417/index.d.ts +8 -0
- package/src/ts/compactpdf417/tables.d.ts +84 -0
- package/src/ts/core/bit-buffer.d.ts +78 -0
- package/src/ts/core/bit-matrix.d.ts +129 -0
- package/src/ts/core/errors.d.ts +57 -0
- package/src/ts/core/galois-field.d.ts +141 -0
- package/src/ts/core/index.d.ts +40 -0
- package/src/ts/core/reed-solomon.d.ts +65 -0
- package/src/ts/databar/codec.d.ts +78 -0
- package/src/ts/databar/decoder.d.ts +55 -0
- package/src/ts/databar/encoder.d.ts +34 -0
- package/src/ts/databar/gs1.d.ts +48 -0
- package/src/ts/databar/index.d.ts +37 -0
- package/src/ts/databar/patterns.d.ts +46 -0
- package/src/ts/databar/tables.d.ts +119 -0
- package/src/ts/datamatrix/decoder.d.ts +57 -0
- package/src/ts/datamatrix/detector.d.ts +59 -0
- package/src/ts/datamatrix/encoder.d.ts +36 -0
- package/src/ts/datamatrix/index.d.ts +35 -0
- package/src/ts/datamatrix/tables.d.ts +88 -0
- package/src/ts/frameqr/decoder.d.ts +64 -0
- package/src/ts/frameqr/detector.d.ts +96 -0
- package/src/ts/frameqr/encoder.d.ts +73 -0
- package/src/ts/frameqr/index.d.ts +34 -0
- package/src/ts/frameqr/tables.d.ts +123 -0
- package/src/ts/image/binarizer.d.ts +85 -0
- package/src/ts/image/grid-sampler.d.ts +82 -0
- package/src/{image/index.js → ts/image/index.d.ts} +0 -2
- package/src/ts/image/luminance.d.ts +112 -0
- package/src/ts/image/perspective.d.ts +111 -0
- package/src/ts/index.d.ts +363 -0
- package/src/ts/micropdf417/compaction.d.ts +38 -0
- package/src/ts/micropdf417/decoder.d.ts +57 -0
- package/src/ts/micropdf417/detector.d.ts +95 -0
- package/src/ts/micropdf417/encoder.d.ts +34 -0
- package/src/ts/micropdf417/error-correction.d.ts +38 -0
- package/src/ts/micropdf417/index.d.ts +36 -0
- package/src/ts/micropdf417/tables.d.ts +73 -0
- package/src/ts/microqr/decoder.d.ts +49 -0
- package/src/ts/microqr/detector.d.ts +96 -0
- package/src/ts/microqr/encoder.d.ts +33 -0
- package/src/{microqr/index.js → ts/microqr/index.d.ts} +0 -2
- package/src/ts/microqr/tables.d.ts +107 -0
- package/src/ts/oned/addons.d.ts +181 -0
- package/src/ts/oned/index.d.ts +55 -0
- package/src/ts/oned/patterns.d.ts +259 -0
- package/src/ts/oned/reader.d.ts +129 -0
- package/src/ts/oned/writers.d.ts +218 -0
- package/src/ts/pdf417/compaction.d.ts +59 -0
- package/src/ts/pdf417/decoder.d.ts +48 -0
- package/src/ts/pdf417/detector.d.ts +73 -0
- package/src/ts/pdf417/encoder.d.ts +32 -0
- package/src/ts/pdf417/error-correction.d.ts +34 -0
- package/src/{pdf417/index.js → ts/pdf417/index.d.ts} +0 -1
- package/src/ts/pdf417/tables.d.ts +53 -0
- package/src/ts/qr/decoder.d.ts +79 -0
- package/src/ts/qr/detector.d.ts +93 -0
- package/src/ts/qr/encoder.d.ts +166 -0
- package/src/{qr/index.js → ts/qr/index.d.ts} +0 -2
- package/src/ts/qr/tables.d.ts +291 -0
- package/src/ts/render/image-data.d.ts +58 -0
- package/src/ts/render/index.d.ts +110 -0
- package/src/ts/render/options.d.ts +98 -0
- package/src/ts/render/png.d.ts +58 -0
- package/src/ts/render/svg.d.ts +46 -0
- package/src/ts/render/webgl.d.ts +45 -0
- package/src/ts/render/webgpu.d.ts +51 -0
- package/src/ts/rmqr/decoder.d.ts +42 -0
- package/src/ts/rmqr/detector.d.ts +81 -0
- package/src/ts/rmqr/encoder.d.ts +45 -0
- package/src/ts/rmqr/index.d.ts +34 -0
- package/src/ts/rmqr/tables.d.ts +89 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Sythos Barcode Suite v1.5.
|
|
2
|
+
* Sythos Barcode Suite v1.5.8
|
|
3
3
|
*
|
|
4
4
|
* MIT License
|
|
5
5
|
*
|
|
@@ -41,7 +41,7 @@ function __require(id) {
|
|
|
41
41
|
return exports;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
__modules["core/bit-matrix.js"] = function (__require, __exports) {
|
|
44
|
+
__modules["js/core/bit-matrix.js"] = function (__require, __exports) {
|
|
45
45
|
/**
|
|
46
46
|
* A 2D bit grid — the common currency of this library.
|
|
47
47
|
*
|
|
@@ -256,7 +256,7 @@ class BitMatrix {
|
|
|
256
256
|
__exports.BitMatrix = BitMatrix;
|
|
257
257
|
};
|
|
258
258
|
|
|
259
|
-
__modules["core/errors.js"] = function (__require, __exports) {
|
|
259
|
+
__modules["js/core/errors.js"] = function (__require, __exports) {
|
|
260
260
|
/**
|
|
261
261
|
* Error types.
|
|
262
262
|
*
|
|
@@ -296,7 +296,7 @@ __exports.FormatError = FormatError;
|
|
|
296
296
|
__exports.ChecksumError = ChecksumError;
|
|
297
297
|
};
|
|
298
298
|
|
|
299
|
-
__modules["image/luminance.js"] = function (__require, __exports) {
|
|
299
|
+
__modules["js/image/luminance.js"] = function (__require, __exports) {
|
|
300
300
|
/**
|
|
301
301
|
* Greyscale conversion — the boundary between "an image" and "our problem".
|
|
302
302
|
*
|
|
@@ -308,7 +308,7 @@ __modules["image/luminance.js"] = function (__require, __exports) {
|
|
|
308
308
|
*
|
|
309
309
|
* @module image/luminance
|
|
310
310
|
*/
|
|
311
|
-
const { NotFoundError } = __require("core/errors.js");
|
|
311
|
+
const { NotFoundError } = __require("js/core/errors.js");
|
|
312
312
|
|
|
313
313
|
/**
|
|
314
314
|
* @typedef {object} ImageLike
|
|
@@ -465,7 +465,7 @@ class LuminanceSource {
|
|
|
465
465
|
__exports.LuminanceSource = LuminanceSource;
|
|
466
466
|
};
|
|
467
467
|
|
|
468
|
-
__modules["image/binarizer.js"] = function (__require, __exports) {
|
|
468
|
+
__modules["js/image/binarizer.js"] = function (__require, __exports) {
|
|
469
469
|
/**
|
|
470
470
|
* Greyscale to black-and-white.
|
|
471
471
|
*
|
|
@@ -484,8 +484,8 @@ __modules["image/binarizer.js"] = function (__require, __exports) {
|
|
|
484
484
|
*
|
|
485
485
|
* @module image/binarizer
|
|
486
486
|
*/
|
|
487
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
488
|
-
const { NotFoundError } = __require("core/errors.js");
|
|
487
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
488
|
+
const { NotFoundError } = __require("js/core/errors.js");
|
|
489
489
|
|
|
490
490
|
/** Side of a block, in pixels. */
|
|
491
491
|
const BLOCK = 8;
|
|
@@ -711,7 +711,7 @@ __exports.binarizeHybrid = binarizeHybrid;
|
|
|
711
711
|
__exports.binarize = binarize;
|
|
712
712
|
};
|
|
713
713
|
|
|
714
|
-
__modules["oned/patterns.js"] = function (__require, __exports) {
|
|
714
|
+
__modules["js/oned/patterns.js"] = function (__require, __exports) {
|
|
715
715
|
/**
|
|
716
716
|
* Pattern tables for the linear symbologies.
|
|
717
717
|
*
|
|
@@ -1101,7 +1101,7 @@ __exports.MSI_STOP = MSI_STOP;
|
|
|
1101
1101
|
__exports.validateTables = validateTables;
|
|
1102
1102
|
};
|
|
1103
1103
|
|
|
1104
|
-
__modules["oned/writers.js"] = function (__require, __exports) {
|
|
1104
|
+
__modules["js/oned/writers.js"] = function (__require, __exports) {
|
|
1105
1105
|
/**
|
|
1106
1106
|
* Linear barcode writers.
|
|
1107
1107
|
*
|
|
@@ -1112,9 +1112,9 @@ __modules["oned/writers.js"] = function (__require, __exports) {
|
|
|
1112
1112
|
*
|
|
1113
1113
|
* @module oned/writers
|
|
1114
1114
|
*/
|
|
1115
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
1116
|
-
const { EncodeError } = __require("core/errors.js");
|
|
1117
|
-
const { EAN_L, EAN_G, EAN_R, EAN13_PARITY, UPCE_PARITY, EAN_START_END, EAN_MIDDLE, UPCE_END, CODE39, CODE39_CHECK_SET, CODE39_EXTENDED, CODE93, CODE93_VALUES, CODE93_START_STOP, CODE128, CODE128_START_B, CODE128_START_C, CODE128_STOP, CODE128_FNC1, CODE128_CODE_A, CODE128_CODE_B, CODE128_CODE_C, ITF, CODABAR, CODABAR_START_STOP, CODE11, CODE11_START_STOP, MSI_BIT, MSI_START, MSI_STOP } = __require("oned/patterns.js");
|
|
1115
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
1116
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
1117
|
+
const { EAN_L, EAN_G, EAN_R, EAN13_PARITY, UPCE_PARITY, EAN_START_END, EAN_MIDDLE, UPCE_END, CODE39, CODE39_CHECK_SET, CODE39_EXTENDED, CODE93, CODE93_VALUES, CODE93_START_STOP, CODE128, CODE128_START_B, CODE128_START_C, CODE128_STOP, CODE128_FNC1, CODE128_CODE_A, CODE128_CODE_B, CODE128_CODE_C, ITF, CODABAR, CODABAR_START_STOP, CODE11, CODE11_START_STOP, MSI_BIT, MSI_START, MSI_STOP } = __require("js/oned/patterns.js");
|
|
1118
1118
|
|
|
1119
1119
|
/* ------------------------------------------------------------------ *
|
|
1120
1120
|
* Shared helpers
|
|
@@ -1827,7 +1827,7 @@ __exports.encodeMSI = encodeMSI;
|
|
|
1827
1827
|
__exports.encodePharmacode = encodePharmacode;
|
|
1828
1828
|
};
|
|
1829
1829
|
|
|
1830
|
-
__modules["oned/addons.js"] = function (__require, __exports) {
|
|
1830
|
+
__modules["js/oned/addons.js"] = function (__require, __exports) {
|
|
1831
1831
|
/**
|
|
1832
1832
|
* UPC/EAN two- and five-digit supplements.
|
|
1833
1833
|
*
|
|
@@ -1843,10 +1843,10 @@ __modules["oned/addons.js"] = function (__require, __exports) {
|
|
|
1843
1843
|
*
|
|
1844
1844
|
* @module oned/addons
|
|
1845
1845
|
*/
|
|
1846
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
1847
|
-
const { EncodeError, FormatError } = __require("core/errors.js");
|
|
1848
|
-
const { EAN_L, EAN_G } = __require("oned/patterns.js");
|
|
1849
|
-
const { encodeEAN13, encodeEAN8, encodeUPCA, encodeUPCE } = __require("oned/writers.js");
|
|
1846
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
1847
|
+
const { EncodeError, FormatError } = __require("js/core/errors.js");
|
|
1848
|
+
const { EAN_L, EAN_G } = __require("js/oned/patterns.js");
|
|
1849
|
+
const { encodeEAN13, encodeEAN8, encodeUPCA, encodeUPCE } = __require("js/oned/writers.js");
|
|
1850
1850
|
|
|
1851
1851
|
/** EAN-2 parity rows, indexed by the two-digit value modulo four. */
|
|
1852
1852
|
const EAN2_PARITY = Object.freeze([
|
|
@@ -2234,7 +2234,7 @@ __exports.encodeUPCAWithAddon = encodeUPCAWithAddon;
|
|
|
2234
2234
|
__exports.encodeUPCEWithAddon = encodeUPCEWithAddon;
|
|
2235
2235
|
};
|
|
2236
2236
|
|
|
2237
|
-
__modules["databar/tables.js"] = function (__require, __exports) {
|
|
2237
|
+
__modules["js/databar/tables.js"] = function (__require, __exports) {
|
|
2238
2238
|
/**
|
|
2239
2239
|
* Static GS1 DataBar facts used by the GTIN compaction codec.
|
|
2240
2240
|
*
|
|
@@ -2344,7 +2344,7 @@ __exports.dataBar14GroupFor = dataBar14GroupFor;
|
|
|
2344
2344
|
__exports.validateDataBarTables = validateDataBarTables;
|
|
2345
2345
|
};
|
|
2346
2346
|
|
|
2347
|
-
__modules["databar/codec.js"] = function (__require, __exports) {
|
|
2347
|
+
__modules["js/databar/codec.js"] = function (__require, __exports) {
|
|
2348
2348
|
/**
|
|
2349
2349
|
* GTIN validation and numeric compaction for GS1 DataBar GTIN-only symbols.
|
|
2350
2350
|
*
|
|
@@ -2354,7 +2354,7 @@ __modules["databar/codec.js"] = function (__require, __exports) {
|
|
|
2354
2354
|
*
|
|
2355
2355
|
* @module databar/codec
|
|
2356
2356
|
*/
|
|
2357
|
-
const { DATABAR14_INSIDE_RADIX, DATABAR14_PAIR_RADIX, DATABAR14_SYMBOL_LIMIT, DATABAR_LIMITED_DATA_LIMIT, DATABAR_LIMITED_LINKAGE_OFFSET, DATABAR_LIMITED_PAIR_RADIX } = __require("databar/tables.js");
|
|
2357
|
+
const { DATABAR14_INSIDE_RADIX, DATABAR14_PAIR_RADIX, DATABAR14_SYMBOL_LIMIT, DATABAR_LIMITED_DATA_LIMIT, DATABAR_LIMITED_LINKAGE_OFFSET, DATABAR_LIMITED_PAIR_RADIX } = __require("js/databar/tables.js");
|
|
2358
2358
|
|
|
2359
2359
|
const GTIN_LENGTHS = new Set([8, 12, 13, 14]);
|
|
2360
2360
|
|
|
@@ -2499,9 +2499,9 @@ __exports.decodeDataBarLimitedGTIN = decodeDataBarLimitedGTIN;
|
|
|
2499
2499
|
__exports.dataBarGtinTransmission = dataBarGtinTransmission;
|
|
2500
2500
|
};
|
|
2501
2501
|
|
|
2502
|
-
__modules["databar/patterns.js"] = function (__require, __exports) {
|
|
2502
|
+
__modules["js/databar/patterns.js"] = function (__require, __exports) {
|
|
2503
2503
|
/** Mathematical width construction for GS1 DataBar characters. @module databar/patterns */
|
|
2504
|
-
const { dataBar14GroupFor } = __require("databar/tables.js");
|
|
2504
|
+
const { dataBar14GroupFor } = __require("js/databar/tables.js");
|
|
2505
2505
|
|
|
2506
2506
|
function combinations(n, r) {
|
|
2507
2507
|
if (n < r || r < 0) return 0;
|
|
@@ -2620,12 +2620,12 @@ __exports.DATABAR14_FINDERS = DATABAR14_FINDERS;
|
|
|
2620
2620
|
__exports.DATABAR14_CHECKSUM_WEIGHTS = DATABAR14_CHECKSUM_WEIGHTS;
|
|
2621
2621
|
};
|
|
2622
2622
|
|
|
2623
|
-
__modules["databar/decoder.js"] = function (__require, __exports) {
|
|
2623
|
+
__modules["js/databar/decoder.js"] = function (__require, __exports) {
|
|
2624
2624
|
/** Clean-matrix decoder for GS1 DataBar Omnidirectional and Truncated. @module databar/decoder */
|
|
2625
|
-
const { ChecksumError, FormatError } = __require("core/errors.js");
|
|
2626
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
2627
|
-
const { decodeDataBar14GTIN } = __require("databar/codec.js");
|
|
2628
|
-
const { DATABAR14_CHECKSUM_WEIGHTS, DATABAR14_FINDERS, dataBar14ValueForWidths } = __require("databar/patterns.js");
|
|
2625
|
+
const { ChecksumError, FormatError } = __require("js/core/errors.js");
|
|
2626
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
2627
|
+
const { decodeDataBar14GTIN } = __require("js/databar/codec.js");
|
|
2628
|
+
const { DATABAR14_CHECKSUM_WEIGHTS, DATABAR14_FINDERS, dataBar14ValueForWidths } = __require("js/databar/patterns.js");
|
|
2629
2629
|
|
|
2630
2630
|
function sampledRuns(matrix) {
|
|
2631
2631
|
if (!matrix || !Number.isInteger(matrix.width) || !Number.isInteger(matrix.height)) {
|
|
@@ -2806,7 +2806,7 @@ __exports.decodeDataBar14 = decodeDataBar14;
|
|
|
2806
2806
|
__exports.decodeDataBar14Scanline = decodeDataBar14Scanline;
|
|
2807
2807
|
};
|
|
2808
2808
|
|
|
2809
|
-
__modules["oned/reader.js"] = function (__require, __exports) {
|
|
2809
|
+
__modules["js/oned/reader.js"] = function (__require, __exports) {
|
|
2810
2810
|
/**
|
|
2811
2811
|
* Linear barcode reading.
|
|
2812
2812
|
*
|
|
@@ -2826,11 +2826,11 @@ __modules["oned/reader.js"] = function (__require, __exports) {
|
|
|
2826
2826
|
*
|
|
2827
2827
|
* @module oned/reader
|
|
2828
2828
|
*/
|
|
2829
|
-
const { NotFoundError } = __require("core/errors.js");
|
|
2830
|
-
const { EAN_L, EAN_G, EAN_R, EAN13_PARITY, UPCE_PARITY, CODE39, CODE39_CHECK_SET, CODE93, CODE93_VALUES, CODE128, CODE128_START_A, CODE128_START_B, CODE128_START_C, CODE128_STOP, CODE128_FNC1, CODE128_CODE_A, CODE128_CODE_B, CODE128_CODE_C, CODE128_SHIFT, ITF, CODABAR, CODABAR_START_STOP, CODE11, CODE11_START_STOP, MSI_START, MSI_STOP, MSI_BIT } = __require("oned/patterns.js");
|
|
2831
|
-
const { ean13CheckDigit, upceToUpcaBody } = __require("oned/writers.js");
|
|
2832
|
-
const { EAN2_PARITY, EAN5_PARITY, EAN_ADDON_START, EAN_ADDON_SEPARATOR, ean5Checksum } = __require("oned/addons.js");
|
|
2833
|
-
const { decodeDataBar14Scanline } = __require("databar/decoder.js");
|
|
2829
|
+
const { NotFoundError } = __require("js/core/errors.js");
|
|
2830
|
+
const { EAN_L, EAN_G, EAN_R, EAN13_PARITY, UPCE_PARITY, CODE39, CODE39_CHECK_SET, CODE93, CODE93_VALUES, CODE128, CODE128_START_A, CODE128_START_B, CODE128_START_C, CODE128_STOP, CODE128_FNC1, CODE128_CODE_A, CODE128_CODE_B, CODE128_CODE_C, CODE128_SHIFT, ITF, CODABAR, CODABAR_START_STOP, CODE11, CODE11_START_STOP, MSI_START, MSI_STOP, MSI_BIT } = __require("js/oned/patterns.js");
|
|
2831
|
+
const { ean13CheckDigit, upceToUpcaBody } = __require("js/oned/writers.js");
|
|
2832
|
+
const { EAN2_PARITY, EAN5_PARITY, EAN_ADDON_START, EAN_ADDON_SEPARATOR, ean5Checksum } = __require("js/oned/addons.js");
|
|
2833
|
+
const { decodeDataBar14Scanline } = __require("js/databar/decoder.js");
|
|
2834
2834
|
|
|
2835
2835
|
/* ------------------------------------------------------------------ *
|
|
2836
2836
|
* Pattern matching primitives
|
|
@@ -4138,18 +4138,18 @@ __exports.decodeOneD = decodeOneD;
|
|
|
4138
4138
|
__exports.decodeOneDStrict = decodeOneDStrict;
|
|
4139
4139
|
};
|
|
4140
4140
|
|
|
4141
|
-
__modules["oned/index.js"] = function (__require, __exports) {
|
|
4141
|
+
__modules["js/oned/index.js"] = function (__require, __exports) {
|
|
4142
4142
|
/**
|
|
4143
4143
|
* Linear symbologies.
|
|
4144
4144
|
*
|
|
4145
4145
|
* @module oned
|
|
4146
4146
|
*/
|
|
4147
|
-
const __reexport0 = __require("oned/writers.js"); __exports.encodeEAN13 = __reexport0.encodeEAN13; __exports.encodeEAN8 = __reexport0.encodeEAN8; __exports.encodeUPCA = __reexport0.encodeUPCA; __exports.encodeUPCE = __reexport0.encodeUPCE; __exports.encodeISBN = __reexport0.encodeISBN; __exports.encodeCode39 = __reexport0.encodeCode39; __exports.encodeCode93 = __reexport0.encodeCode93; __exports.encodeCode128 = __reexport0.encodeCode128; __exports.encodeITF = __reexport0.encodeITF; __exports.encodeITF14 = __reexport0.encodeITF14; __exports.encodeCodabar = __reexport0.encodeCodabar; __exports.encodeCode11 = __reexport0.encodeCode11; __exports.encodeMSI = __reexport0.encodeMSI; __exports.encodePharmacode = __reexport0.encodePharmacode; __exports.ean13CheckDigit = __reexport0.ean13CheckDigit;
|
|
4148
|
-
const __reexport1 = __require("oned/addons.js"); __exports.EAN2_PARITY = __reexport1.EAN2_PARITY; __exports.EAN5_PARITY = __reexport1.EAN5_PARITY; __exports.EAN2_WIDTH = __reexport1.EAN2_WIDTH; __exports.EAN5_WIDTH = __reexport1.EAN5_WIDTH; __exports.EAN_ADDON_START = __reexport1.EAN_ADDON_START; __exports.EAN_ADDON_SEPARATOR = __reexport1.EAN_ADDON_SEPARATOR; __exports.ean2Parity = __reexport1.ean2Parity; __exports.ean5Checksum = __reexport1.ean5Checksum; __exports.ean5CheckDigit = __reexport1.ean5CheckDigit; __exports.ean5Parity = __reexport1.ean5Parity; __exports.encodeEAN2 = __reexport1.encodeEAN2; __exports.encodeEAN5 = __reexport1.encodeEAN5; __exports.encodeEANAddon = __reexport1.encodeEANAddon; __exports.encodeEANAddOn = __reexport1.encodeEANAddOn; __exports.decodeEAN2 = __reexport1.decodeEAN2; __exports.decodeEAN5 = __reexport1.decodeEAN5; __exports.decodeEANAddon = __reexport1.decodeEANAddon; __exports.decodeEANAddOn = __reexport1.decodeEANAddOn; __exports.composeEANAddon = __reexport1.composeEANAddon; __exports.encodeEAN13WithAddon = __reexport1.encodeEAN13WithAddon; __exports.encodeEAN8WithAddon = __reexport1.encodeEAN8WithAddon; __exports.encodeUPCAWithAddon = __reexport1.encodeUPCAWithAddon; __exports.encodeUPCEWithAddon = __reexport1.encodeUPCEWithAddon;
|
|
4149
|
-
const __reexport2 = __require("oned/reader.js"); __exports.decodeOneD = __reexport2.decodeOneD; __exports.decodeOneDStrict = __reexport2.decodeOneDStrict; __exports.decodeCode11 = __reexport2.decodeCode11; __exports.decodeMSI = __reexport2.decodeMSI; __exports.patternVariance = __reexport2.patternVariance; __exports.recordPattern = __reexport2.recordPattern; __exports.toNarrowWidePattern = __reexport2.toNarrowWidePattern;
|
|
4150
|
-
const __reexport3 = __require("oned/patterns.js"); __exports.validateTables = __reexport3.validateTables;
|
|
4151
|
-
const { encodeEAN13, encodeEAN8, encodeUPCA, encodeUPCE, encodeISBN, encodeCode39, encodeCode93, encodeCode128, encodeITF, encodeITF14, encodeCodabar, encodeCode11, encodeMSI, encodePharmacode } = __require("oned/writers.js");
|
|
4152
|
-
const { encodeEAN2, encodeEAN5 } = __require("oned/addons.js");
|
|
4147
|
+
const __reexport0 = __require("js/oned/writers.js"); __exports.encodeEAN13 = __reexport0.encodeEAN13; __exports.encodeEAN8 = __reexport0.encodeEAN8; __exports.encodeUPCA = __reexport0.encodeUPCA; __exports.encodeUPCE = __reexport0.encodeUPCE; __exports.encodeISBN = __reexport0.encodeISBN; __exports.encodeCode39 = __reexport0.encodeCode39; __exports.encodeCode93 = __reexport0.encodeCode93; __exports.encodeCode128 = __reexport0.encodeCode128; __exports.encodeITF = __reexport0.encodeITF; __exports.encodeITF14 = __reexport0.encodeITF14; __exports.encodeCodabar = __reexport0.encodeCodabar; __exports.encodeCode11 = __reexport0.encodeCode11; __exports.encodeMSI = __reexport0.encodeMSI; __exports.encodePharmacode = __reexport0.encodePharmacode; __exports.ean13CheckDigit = __reexport0.ean13CheckDigit;
|
|
4148
|
+
const __reexport1 = __require("js/oned/addons.js"); __exports.EAN2_PARITY = __reexport1.EAN2_PARITY; __exports.EAN5_PARITY = __reexport1.EAN5_PARITY; __exports.EAN2_WIDTH = __reexport1.EAN2_WIDTH; __exports.EAN5_WIDTH = __reexport1.EAN5_WIDTH; __exports.EAN_ADDON_START = __reexport1.EAN_ADDON_START; __exports.EAN_ADDON_SEPARATOR = __reexport1.EAN_ADDON_SEPARATOR; __exports.ean2Parity = __reexport1.ean2Parity; __exports.ean5Checksum = __reexport1.ean5Checksum; __exports.ean5CheckDigit = __reexport1.ean5CheckDigit; __exports.ean5Parity = __reexport1.ean5Parity; __exports.encodeEAN2 = __reexport1.encodeEAN2; __exports.encodeEAN5 = __reexport1.encodeEAN5; __exports.encodeEANAddon = __reexport1.encodeEANAddon; __exports.encodeEANAddOn = __reexport1.encodeEANAddOn; __exports.decodeEAN2 = __reexport1.decodeEAN2; __exports.decodeEAN5 = __reexport1.decodeEAN5; __exports.decodeEANAddon = __reexport1.decodeEANAddon; __exports.decodeEANAddOn = __reexport1.decodeEANAddOn; __exports.composeEANAddon = __reexport1.composeEANAddon; __exports.encodeEAN13WithAddon = __reexport1.encodeEAN13WithAddon; __exports.encodeEAN8WithAddon = __reexport1.encodeEAN8WithAddon; __exports.encodeUPCAWithAddon = __reexport1.encodeUPCAWithAddon; __exports.encodeUPCEWithAddon = __reexport1.encodeUPCEWithAddon;
|
|
4149
|
+
const __reexport2 = __require("js/oned/reader.js"); __exports.decodeOneD = __reexport2.decodeOneD; __exports.decodeOneDStrict = __reexport2.decodeOneDStrict; __exports.decodeCode11 = __reexport2.decodeCode11; __exports.decodeMSI = __reexport2.decodeMSI; __exports.patternVariance = __reexport2.patternVariance; __exports.recordPattern = __reexport2.recordPattern; __exports.toNarrowWidePattern = __reexport2.toNarrowWidePattern;
|
|
4150
|
+
const __reexport3 = __require("js/oned/patterns.js"); __exports.validateTables = __reexport3.validateTables;
|
|
4151
|
+
const { encodeEAN13, encodeEAN8, encodeUPCA, encodeUPCE, encodeISBN, encodeCode39, encodeCode93, encodeCode128, encodeITF, encodeITF14, encodeCodabar, encodeCode11, encodeMSI, encodePharmacode } = __require("js/oned/writers.js");
|
|
4152
|
+
const { encodeEAN2, encodeEAN5 } = __require("js/oned/addons.js");
|
|
4153
4153
|
|
|
4154
4154
|
/**
|
|
4155
4155
|
* Writers by format id, for the top-level `encode()` dispatcher.
|
|
@@ -4190,7 +4190,7 @@ const ONED_FORMATS = {
|
|
|
4190
4190
|
__exports.ONED_FORMATS = ONED_FORMATS;
|
|
4191
4191
|
};
|
|
4192
4192
|
|
|
4193
|
-
__modules["core/galois-field.js"] = function (__require, __exports) {
|
|
4193
|
+
__modules["js/core/galois-field.js"] = function (__require, __exports) {
|
|
4194
4194
|
/**
|
|
4195
4195
|
* Finite field arithmetic.
|
|
4196
4196
|
*
|
|
@@ -4379,7 +4379,7 @@ __exports.GF1024 = GF1024;
|
|
|
4379
4379
|
__exports.GF4096 = GF4096;
|
|
4380
4380
|
};
|
|
4381
4381
|
|
|
4382
|
-
__modules["core/reed-solomon.js"] = function (__require, __exports) {
|
|
4382
|
+
__modules["js/core/reed-solomon.js"] = function (__require, __exports) {
|
|
4383
4383
|
/**
|
|
4384
4384
|
* Reed-Solomon encoding and decoding over an arbitrary finite field.
|
|
4385
4385
|
*
|
|
@@ -4400,7 +4400,7 @@ __modules["core/reed-solomon.js"] = function (__require, __exports) {
|
|
|
4400
4400
|
*
|
|
4401
4401
|
* @module core/reed-solomon
|
|
4402
4402
|
*/
|
|
4403
|
-
const { ChecksumError } = __require("core/errors.js");
|
|
4403
|
+
const { ChecksumError } = __require("js/core/errors.js");
|
|
4404
4404
|
|
|
4405
4405
|
/**
|
|
4406
4406
|
* Build the generator polynomial for `eccLen` parity symbols.
|
|
@@ -4682,7 +4682,7 @@ __exports.rsEncode = rsEncode;
|
|
|
4682
4682
|
__exports.rsDecode = rsDecode;
|
|
4683
4683
|
};
|
|
4684
4684
|
|
|
4685
|
-
__modules["datamatrix/tables.js"] = function (__require, __exports) {
|
|
4685
|
+
__modules["js/datamatrix/tables.js"] = function (__require, __exports) {
|
|
4686
4686
|
/**
|
|
4687
4687
|
* Data Matrix ECC 200 symbol parameters.
|
|
4688
4688
|
*
|
|
@@ -4784,13 +4784,13 @@ __exports.validateDataMatrixTables = validateDataMatrixTables;
|
|
|
4784
4784
|
__exports.validateTables = validateTables;
|
|
4785
4785
|
};
|
|
4786
4786
|
|
|
4787
|
-
__modules["datamatrix/encoder.js"] = function (__require, __exports) {
|
|
4787
|
+
__modules["js/datamatrix/encoder.js"] = function (__require, __exports) {
|
|
4788
4788
|
/** Data Matrix ECC 200 encoder: ASCII/Base256, RS interleaving and Annex F placement. */
|
|
4789
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
4790
|
-
const { EncodeError } = __require("core/errors.js");
|
|
4791
|
-
const { GF256_DM } = __require("core/galois-field.js");
|
|
4792
|
-
const { rsEncode } = __require("core/reed-solomon.js");
|
|
4793
|
-
const { symbolForDataCodewords } = __require("datamatrix/tables.js");
|
|
4789
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
4790
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
4791
|
+
const { GF256_DM } = __require("js/core/galois-field.js");
|
|
4792
|
+
const { rsEncode } = __require("js/core/reed-solomon.js");
|
|
4793
|
+
const { symbolForDataCodewords } = __require("js/datamatrix/tables.js");
|
|
4794
4794
|
|
|
4795
4795
|
function asciiCodewords(text) {
|
|
4796
4796
|
const out = [];
|
|
@@ -4951,7 +4951,7 @@ __exports.encodeDataMatrix = encodeDataMatrix;
|
|
|
4951
4951
|
__exports.encodeDataMatrixCodewords = encodeDataMatrixCodewords;
|
|
4952
4952
|
};
|
|
4953
4953
|
|
|
4954
|
-
__modules["datamatrix/decoder.js"] = function (__require, __exports) {
|
|
4954
|
+
__modules["js/datamatrix/decoder.js"] = function (__require, __exports) {
|
|
4955
4955
|
/**
|
|
4956
4956
|
* Data Matrix ECC 200 decoder for an already sampled symbol.
|
|
4957
4957
|
*
|
|
@@ -4964,10 +4964,10 @@ __modules["datamatrix/decoder.js"] = function (__require, __exports) {
|
|
|
4964
4964
|
*
|
|
4965
4965
|
* @module datamatrix/decoder
|
|
4966
4966
|
*/
|
|
4967
|
-
const { ChecksumError, FormatError } = __require("core/errors.js");
|
|
4968
|
-
const { GF256_DM } = __require("core/galois-field.js");
|
|
4969
|
-
const { rsDecode } = __require("core/reed-solomon.js");
|
|
4970
|
-
const { SYMBOLS } = __require("datamatrix/tables.js");
|
|
4967
|
+
const { ChecksumError, FormatError } = __require("js/core/errors.js");
|
|
4968
|
+
const { GF256_DM } = __require("js/core/galois-field.js");
|
|
4969
|
+
const { rsDecode } = __require("js/core/reed-solomon.js");
|
|
4970
|
+
const { SYMBOLS } = __require("js/datamatrix/tables.js");
|
|
4971
4971
|
|
|
4972
4972
|
const CW_PAD = 129;
|
|
4973
4973
|
const CW_BASE256 = 231;
|
|
@@ -5186,7 +5186,7 @@ __exports.ChecksumError = ChecksumError;
|
|
|
5186
5186
|
__exports.decodeDataMatrix = decodeDataMatrix;
|
|
5187
5187
|
};
|
|
5188
5188
|
|
|
5189
|
-
__modules["image/perspective.js"] = function (__require, __exports) {
|
|
5189
|
+
__modules["js/image/perspective.js"] = function (__require, __exports) {
|
|
5190
5190
|
/**
|
|
5191
5191
|
* Projective (perspective) transforms.
|
|
5192
5192
|
*
|
|
@@ -5355,7 +5355,7 @@ class PerspectiveTransform {
|
|
|
5355
5355
|
__exports.PerspectiveTransform = PerspectiveTransform;
|
|
5356
5356
|
};
|
|
5357
5357
|
|
|
5358
|
-
__modules["image/grid-sampler.js"] = function (__require, __exports) {
|
|
5358
|
+
__modules["js/image/grid-sampler.js"] = function (__require, __exports) {
|
|
5359
5359
|
/**
|
|
5360
5360
|
* Resample a distorted symbol in the image into an upright module grid.
|
|
5361
5361
|
*
|
|
@@ -5366,9 +5366,9 @@ __modules["image/grid-sampler.js"] = function (__require, __exports) {
|
|
|
5366
5366
|
*
|
|
5367
5367
|
* @module image/grid-sampler
|
|
5368
5368
|
*/
|
|
5369
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
5370
|
-
const { NotFoundError } = __require("core/errors.js");
|
|
5371
|
-
const { PerspectiveTransform } = __require("image/perspective.js");
|
|
5369
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
5370
|
+
const { NotFoundError } = __require("js/core/errors.js");
|
|
5371
|
+
const { PerspectiveTransform } = __require("js/image/perspective.js");
|
|
5372
5372
|
|
|
5373
5373
|
/**
|
|
5374
5374
|
* Sample a `dimension` x `dimension` grid (or `width` x `height`).
|
|
@@ -5495,7 +5495,7 @@ __exports.sampleGridVoting = sampleGridVoting;
|
|
|
5495
5495
|
__exports.sampleQuad = sampleQuad;
|
|
5496
5496
|
};
|
|
5497
5497
|
|
|
5498
|
-
__modules["datamatrix/detector.js"] = function (__require, __exports) {
|
|
5498
|
+
__modules["js/datamatrix/detector.js"] = function (__require, __exports) {
|
|
5499
5499
|
/**
|
|
5500
5500
|
* Data Matrix ECC 200 detection in a binarized image.
|
|
5501
5501
|
*
|
|
@@ -5512,10 +5512,10 @@ __modules["datamatrix/detector.js"] = function (__require, __exports) {
|
|
|
5512
5512
|
*
|
|
5513
5513
|
* @module datamatrix/detector
|
|
5514
5514
|
*/
|
|
5515
|
-
const { NotFoundError } = __require("core/errors.js");
|
|
5516
|
-
const { sampleGrid, sampleQuad } = __require("image/grid-sampler.js");
|
|
5517
|
-
const { PerspectiveTransform } = __require("image/perspective.js");
|
|
5518
|
-
const { decodeDataMatrix } = __require("datamatrix/decoder.js");
|
|
5515
|
+
const { NotFoundError } = __require("js/core/errors.js");
|
|
5516
|
+
const { sampleGrid, sampleQuad } = __require("js/image/grid-sampler.js");
|
|
5517
|
+
const { PerspectiveTransform } = __require("js/image/perspective.js");
|
|
5518
|
+
const { decodeDataMatrix } = __require("js/datamatrix/decoder.js");
|
|
5519
5519
|
|
|
5520
5520
|
// ECC 200 dimensions. DMRE is deliberately not included: it uses a separate
|
|
5521
5521
|
// size table and is not part of the original ECC 200 family implemented here.
|
|
@@ -5695,17 +5695,17 @@ __exports.detectDataMatrix = detectDataMatrix;
|
|
|
5695
5695
|
__exports.detectAndDecodeDataMatrix = detectAndDecodeDataMatrix;
|
|
5696
5696
|
};
|
|
5697
5697
|
|
|
5698
|
-
__modules["datamatrix/index.js"] = function (__require, __exports) {
|
|
5698
|
+
__modules["js/datamatrix/index.js"] = function (__require, __exports) {
|
|
5699
5699
|
/** Data Matrix ECC 200 entry points. @module datamatrix */
|
|
5700
|
-
const __reexport0 = __require("datamatrix/encoder.js"); __exports.encodeDataMatrix = __reexport0.encodeDataMatrix; __exports.encodeDataMatrixCodewords = __reexport0.encodeDataMatrixCodewords;
|
|
5701
|
-
const __reexport1 = __require("datamatrix/decoder.js"); __exports.decodeDataMatrix = __reexport1.decodeDataMatrix;
|
|
5702
|
-
const __reexport2 = __require("datamatrix/detector.js"); __exports.detectDataMatrix = __reexport2.detectDataMatrix; __exports.detectAndDecodeDataMatrix = __reexport2.detectAndDecodeDataMatrix;
|
|
5703
|
-
const __reexport3 = __require("datamatrix/tables.js"); __exports.DATAMATRIX_SYMBOLS = __reexport3.DATAMATRIX_SYMBOLS; __exports.SYMBOLS = __reexport3.SYMBOLS; __exports.symbolForDataCodewords = __reexport3.symbolForDataCodewords; __exports.validateDataMatrixTables = __reexport3.validateDataMatrixTables; __exports.validateTables = __reexport3.validateTables;
|
|
5700
|
+
const __reexport0 = __require("js/datamatrix/encoder.js"); __exports.encodeDataMatrix = __reexport0.encodeDataMatrix; __exports.encodeDataMatrixCodewords = __reexport0.encodeDataMatrixCodewords;
|
|
5701
|
+
const __reexport1 = __require("js/datamatrix/decoder.js"); __exports.decodeDataMatrix = __reexport1.decodeDataMatrix;
|
|
5702
|
+
const __reexport2 = __require("js/datamatrix/detector.js"); __exports.detectDataMatrix = __reexport2.detectDataMatrix; __exports.detectAndDecodeDataMatrix = __reexport2.detectAndDecodeDataMatrix;
|
|
5703
|
+
const __reexport3 = __require("js/datamatrix/tables.js"); __exports.DATAMATRIX_SYMBOLS = __reexport3.DATAMATRIX_SYMBOLS; __exports.SYMBOLS = __reexport3.SYMBOLS; __exports.symbolForDataCodewords = __reexport3.symbolForDataCodewords; __exports.validateDataMatrixTables = __reexport3.validateDataMatrixTables; __exports.validateTables = __reexport3.validateTables;
|
|
5704
5704
|
|
|
5705
5705
|
|
|
5706
5706
|
};
|
|
5707
5707
|
|
|
5708
|
-
__modules["core/bit-buffer.js"] = function (__require, __exports) {
|
|
5708
|
+
__modules["js/core/bit-buffer.js"] = function (__require, __exports) {
|
|
5709
5709
|
/**
|
|
5710
5710
|
* Bit-level writing and reading, MSB-first.
|
|
5711
5711
|
*
|
|
@@ -5716,7 +5716,7 @@ __modules["core/bit-buffer.js"] = function (__require, __exports) {
|
|
|
5716
5716
|
*
|
|
5717
5717
|
* @module core/bit-buffer
|
|
5718
5718
|
*/
|
|
5719
|
-
const { FormatError } = __require("core/errors.js");
|
|
5719
|
+
const { FormatError } = __require("js/core/errors.js");
|
|
5720
5720
|
|
|
5721
5721
|
/** Growable MSB-first bit writer. */
|
|
5722
5722
|
class BitWriter {
|
|
@@ -5854,7 +5854,7 @@ __exports.BitWriter = BitWriter;
|
|
|
5854
5854
|
__exports.BitReader = BitReader;
|
|
5855
5855
|
};
|
|
5856
5856
|
|
|
5857
|
-
__modules["qr/tables.js"] = function (__require, __exports) {
|
|
5857
|
+
__modules["js/qr/tables.js"] = function (__require, __exports) {
|
|
5858
5858
|
/**
|
|
5859
5859
|
* QR Code structural tables.
|
|
5860
5860
|
*
|
|
@@ -5884,7 +5884,7 @@ __modules["qr/tables.js"] = function (__require, __exports) {
|
|
|
5884
5884
|
*
|
|
5885
5885
|
* @module qr/tables
|
|
5886
5886
|
*/
|
|
5887
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
5887
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
5888
5888
|
|
|
5889
5889
|
/** Error correction levels, weakest to strongest. */
|
|
5890
5890
|
const ECC_LEVELS = ['L', 'M', 'Q', 'H'];
|
|
@@ -6585,7 +6585,7 @@ __exports.dataBitCapacity = dataBitCapacity;
|
|
|
6585
6585
|
__exports.validateTables = validateTables;
|
|
6586
6586
|
};
|
|
6587
6587
|
|
|
6588
|
-
__modules["qr/encoder.js"] = function (__require, __exports) {
|
|
6588
|
+
__modules["js/qr/encoder.js"] = function (__require, __exports) {
|
|
6589
6589
|
/**
|
|
6590
6590
|
* QR Code encoder.
|
|
6591
6591
|
*
|
|
@@ -6609,12 +6609,12 @@ __modules["qr/encoder.js"] = function (__require, __exports) {
|
|
|
6609
6609
|
*
|
|
6610
6610
|
* @module qr/encoder
|
|
6611
6611
|
*/
|
|
6612
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
6613
|
-
const { BitWriter } = __require("core/bit-buffer.js");
|
|
6614
|
-
const { EncodeError } = __require("core/errors.js");
|
|
6615
|
-
const { GF256_QR } = __require("core/galois-field.js");
|
|
6616
|
-
const { rsEncode } = __require("core/reed-solomon.js");
|
|
6617
|
-
const { ECC_LEVELS, ECC_LEVEL_BITS, MAX_VERSION, MIN_VERSION, MODE, VERSION_INFO_MIN, alignmentCentres, blockLayout, countBits, dataBitCapacity, dataModuleOrder, formatInfoPositions, maskBit, versionSize } = __require("qr/tables.js");
|
|
6612
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
6613
|
+
const { BitWriter } = __require("js/core/bit-buffer.js");
|
|
6614
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
6615
|
+
const { GF256_QR } = __require("js/core/galois-field.js");
|
|
6616
|
+
const { rsEncode } = __require("js/core/reed-solomon.js");
|
|
6617
|
+
const { ECC_LEVELS, ECC_LEVEL_BITS, MAX_VERSION, MIN_VERSION, MODE, VERSION_INFO_MIN, alignmentCentres, blockLayout, countBits, dataBitCapacity, dataModuleOrder, formatInfoPositions, maskBit, versionSize } = __require("js/qr/tables.js");
|
|
6618
6618
|
|
|
6619
6619
|
/** Alphanumeric mode character set; a character's index is its encoded value. */
|
|
6620
6620
|
const ALPHANUMERIC_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:';
|
|
@@ -7508,7 +7508,7 @@ __exports.maskPenalty = maskPenalty;
|
|
|
7508
7508
|
__exports.encodeQR = encodeQR;
|
|
7509
7509
|
};
|
|
7510
7510
|
|
|
7511
|
-
__modules["qr/decoder.js"] = function (__require, __exports) {
|
|
7511
|
+
__modules["js/qr/decoder.js"] = function (__require, __exports) {
|
|
7512
7512
|
/**
|
|
7513
7513
|
* QR Code decoder.
|
|
7514
7514
|
*
|
|
@@ -7525,12 +7525,12 @@ __modules["qr/decoder.js"] = function (__require, __exports) {
|
|
|
7525
7525
|
*
|
|
7526
7526
|
* @module qr/decoder
|
|
7527
7527
|
*/
|
|
7528
|
-
const { BitReader } = __require("core/bit-buffer.js");
|
|
7529
|
-
const { ChecksumError, FormatError } = __require("core/errors.js");
|
|
7530
|
-
const { GF256_QR } = __require("core/galois-field.js");
|
|
7531
|
-
const { rsDecode } = __require("core/reed-solomon.js");
|
|
7532
|
-
const { ECC_LEVELS, MAX_VERSION, MIN_VERSION, MODE, VERSION_INFO_MIN, blockLayout, countBits, dataModuleOrder, formatInfoPositions, maskBit, versionSize } = __require("qr/tables.js");
|
|
7533
|
-
const { ALPHANUMERIC_CHARS, formatInfoBits, versionInfoBits } = __require("qr/encoder.js");
|
|
7528
|
+
const { BitReader } = __require("js/core/bit-buffer.js");
|
|
7529
|
+
const { ChecksumError, FormatError } = __require("js/core/errors.js");
|
|
7530
|
+
const { GF256_QR } = __require("js/core/galois-field.js");
|
|
7531
|
+
const { rsDecode } = __require("js/core/reed-solomon.js");
|
|
7532
|
+
const { ECC_LEVELS, MAX_VERSION, MIN_VERSION, MODE, VERSION_INFO_MIN, blockLayout, countBits, dataModuleOrder, formatInfoPositions, maskBit, versionSize } = __require("js/qr/tables.js");
|
|
7533
|
+
const { ALPHANUMERIC_CHARS, formatInfoBits, versionInfoBits } = __require("js/qr/encoder.js");
|
|
7534
7534
|
|
|
7535
7535
|
/**
|
|
7536
7536
|
* Maximum bit errors tolerated when matching a BCH field.
|
|
@@ -8044,7 +8044,7 @@ __exports.ChecksumError = ChecksumError;
|
|
|
8044
8044
|
__exports.decodeQR = decodeQR;
|
|
8045
8045
|
};
|
|
8046
8046
|
|
|
8047
|
-
__modules["qr/detector.js"] = function (__require, __exports) {
|
|
8047
|
+
__modules["js/qr/detector.js"] = function (__require, __exports) {
|
|
8048
8048
|
/**
|
|
8049
8049
|
* QR Code detection — finding symbols in a binarized image.
|
|
8050
8050
|
*
|
|
@@ -8067,10 +8067,10 @@ __modules["qr/detector.js"] = function (__require, __exports) {
|
|
|
8067
8067
|
*
|
|
8068
8068
|
* @module qr/detector
|
|
8069
8069
|
*/
|
|
8070
|
-
const { NotFoundError } = __require("core/errors.js");
|
|
8071
|
-
const { PerspectiveTransform } = __require("image/perspective.js");
|
|
8072
|
-
const { sampleQuad } = __require("image/grid-sampler.js");
|
|
8073
|
-
const { decodeQR } = __require("qr/decoder.js");
|
|
8070
|
+
const { NotFoundError } = __require("js/core/errors.js");
|
|
8071
|
+
const { PerspectiveTransform } = __require("js/image/perspective.js");
|
|
8072
|
+
const { sampleQuad } = __require("js/image/grid-sampler.js");
|
|
8073
|
+
const { decodeQR } = __require("js/qr/decoder.js");
|
|
8074
8074
|
|
|
8075
8075
|
/** Finder pattern run ratios, centre run first in the array's own order. */
|
|
8076
8076
|
const FINDER_RATIOS = [1, 1, 3, 1, 1];
|
|
@@ -8649,7 +8649,7 @@ __exports.detectQR = detectQR;
|
|
|
8649
8649
|
__exports.detectAndDecodeQR = detectAndDecodeQR;
|
|
8650
8650
|
};
|
|
8651
8651
|
|
|
8652
|
-
__modules["qr/index.js"] = function (__require, __exports) {
|
|
8652
|
+
__modules["js/qr/index.js"] = function (__require, __exports) {
|
|
8653
8653
|
/**
|
|
8654
8654
|
* QR Code, re-exported.
|
|
8655
8655
|
*
|
|
@@ -8659,15 +8659,15 @@ __modules["qr/index.js"] = function (__require, __exports) {
|
|
|
8659
8659
|
*
|
|
8660
8660
|
* @module qr
|
|
8661
8661
|
*/
|
|
8662
|
-
const __reexport0 = __require("qr/encoder.js"); __exports.encodeQR = __reexport0.encodeQR;
|
|
8663
|
-
const __reexport1 = __require("qr/decoder.js"); __exports.decodeQR = __reexport1.decodeQR;
|
|
8664
|
-
const __reexport2 = __require("qr/detector.js"); __exports.detectQR = __reexport2.detectQR; __exports.detectAndDecodeQR = __reexport2.detectAndDecodeQR;
|
|
8665
|
-
const __reexport3 = __require("qr/tables.js"); __exports.validateTables = __reexport3.validateTables;
|
|
8662
|
+
const __reexport0 = __require("js/qr/encoder.js"); __exports.encodeQR = __reexport0.encodeQR;
|
|
8663
|
+
const __reexport1 = __require("js/qr/decoder.js"); __exports.decodeQR = __reexport1.decodeQR;
|
|
8664
|
+
const __reexport2 = __require("js/qr/detector.js"); __exports.detectQR = __reexport2.detectQR; __exports.detectAndDecodeQR = __reexport2.detectAndDecodeQR;
|
|
8665
|
+
const __reexport3 = __require("js/qr/tables.js"); __exports.validateTables = __reexport3.validateTables;
|
|
8666
8666
|
|
|
8667
8667
|
|
|
8668
8668
|
};
|
|
8669
8669
|
|
|
8670
|
-
__modules["aztec/high-level.js"] = function (__require, __exports) {
|
|
8670
|
+
__modules["js/aztec/high-level.js"] = function (__require, __exports) {
|
|
8671
8671
|
/**
|
|
8672
8672
|
* Aztec high-level stream writer.
|
|
8673
8673
|
*
|
|
@@ -8684,8 +8684,8 @@ __modules["aztec/high-level.js"] = function (__require, __exports) {
|
|
|
8684
8684
|
*
|
|
8685
8685
|
* @module aztec/high-level
|
|
8686
8686
|
*/
|
|
8687
|
-
const { BitWriter } = __require("core/bit-buffer.js");
|
|
8688
|
-
const { EncodeError } = __require("core/errors.js");
|
|
8687
|
+
const { BitWriter } = __require("js/core/bit-buffer.js");
|
|
8688
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
8689
8689
|
|
|
8690
8690
|
/** Aztec high-level table identifiers, exposed for decoder/API symmetry. */
|
|
8691
8691
|
const HIGH_LEVEL_MODE = Object.freeze({
|
|
@@ -8856,7 +8856,7 @@ __exports.writeBinaryShift = writeBinaryShift;
|
|
|
8856
8856
|
__exports.encodeHighLevel = encodeHighLevel;
|
|
8857
8857
|
};
|
|
8858
8858
|
|
|
8859
|
-
__modules["aztec/tables.js"] = function (__require, __exports) {
|
|
8859
|
+
__modules["js/aztec/tables.js"] = function (__require, __exports) {
|
|
8860
8860
|
/**
|
|
8861
8861
|
* Aztec Code layer geometry and Reed-Solomon parameters.
|
|
8862
8862
|
*
|
|
@@ -8870,7 +8870,7 @@ __modules["aztec/tables.js"] = function (__require, __exports) {
|
|
|
8870
8870
|
*
|
|
8871
8871
|
* @module aztec/tables
|
|
8872
8872
|
*/
|
|
8873
|
-
const { GF16, GF64, GF256_AZTEC, GF1024, GF4096 } = __require("core/galois-field.js");
|
|
8873
|
+
const { GF16, GF64, GF256_AZTEC, GF1024, GF4096 } = __require("js/core/galois-field.js");
|
|
8874
8874
|
|
|
8875
8875
|
/** Reed-Solomon generator base defined for Aztec parameter and data fields. */
|
|
8876
8876
|
const AZTEC_RS_GENERATOR_BASE = 1;
|
|
@@ -9053,7 +9053,7 @@ __exports.selectAztecLayer = selectAztecLayer;
|
|
|
9053
9053
|
__exports.validateAztecTables = validateAztecTables;
|
|
9054
9054
|
};
|
|
9055
9055
|
|
|
9056
|
-
__modules["aztec/encoder.js"] = function (__require, __exports) {
|
|
9056
|
+
__modules["js/aztec/encoder.js"] = function (__require, __exports) {
|
|
9057
9057
|
/**
|
|
9058
9058
|
* Aztec encoder: high-level bits, bit stuffing, Reed-Solomon and matrix layout.
|
|
9059
9059
|
*
|
|
@@ -9065,12 +9065,12 @@ __modules["aztec/encoder.js"] = function (__require, __exports) {
|
|
|
9065
9065
|
*
|
|
9066
9066
|
* @module aztec/encoder
|
|
9067
9067
|
*/
|
|
9068
|
-
const { BitWriter } = __require("core/bit-buffer.js");
|
|
9069
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
9070
|
-
const { EncodeError } = __require("core/errors.js");
|
|
9071
|
-
const { rsEncode } = __require("core/reed-solomon.js");
|
|
9072
|
-
const { encodeHighLevel } = __require("aztec/high-level.js");
|
|
9073
|
-
const { AZTEC_COMPACT_LAYERS, AZTEC_FULL_LAYERS, aztecLayer, eccCodewordsFor, fieldForLayers, fieldForWordSize, wordSizeForLayers } = __require("aztec/tables.js");
|
|
9068
|
+
const { BitWriter } = __require("js/core/bit-buffer.js");
|
|
9069
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
9070
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
9071
|
+
const { rsEncode } = __require("js/core/reed-solomon.js");
|
|
9072
|
+
const { encodeHighLevel } = __require("js/aztec/high-level.js");
|
|
9073
|
+
const { AZTEC_COMPACT_LAYERS, AZTEC_FULL_LAYERS, aztecLayer, eccCodewordsFor, fieldForLayers, fieldForWordSize, wordSizeForLayers } = __require("js/aztec/tables.js");
|
|
9074
9074
|
|
|
9075
9075
|
/** @param {BitWriter} bits @param {number} at @returns {boolean} */
|
|
9076
9076
|
function bitAt(bits, at) {
|
|
@@ -9288,7 +9288,7 @@ __exports.buildAztecMatrix = buildAztecMatrix;
|
|
|
9288
9288
|
__exports.encodeAztec = encodeAztec;
|
|
9289
9289
|
};
|
|
9290
9290
|
|
|
9291
|
-
__modules["aztec/decoder.js"] = function (__require, __exports) {
|
|
9291
|
+
__modules["js/aztec/decoder.js"] = function (__require, __exports) {
|
|
9292
9292
|
/**
|
|
9293
9293
|
* Decoder for a sampled Aztec symbol.
|
|
9294
9294
|
*
|
|
@@ -9305,9 +9305,9 @@ __modules["aztec/decoder.js"] = function (__require, __exports) {
|
|
|
9305
9305
|
*
|
|
9306
9306
|
* @module aztec/decoder
|
|
9307
9307
|
*/
|
|
9308
|
-
const { FormatError } = __require("core/errors.js");
|
|
9309
|
-
const { rsDecode } = __require("core/reed-solomon.js");
|
|
9310
|
-
const { aztecLayer: aztecSymbolForLayers, wordSizeForLayers: aztecWordSizeForLayers, fieldForLayers: aztecFieldForLayers, fieldForWordSize, aztecSymbolSize: aztecMatrixSize } = __require("aztec/tables.js");
|
|
9308
|
+
const { FormatError } = __require("js/core/errors.js");
|
|
9309
|
+
const { rsDecode } = __require("js/core/reed-solomon.js");
|
|
9310
|
+
const { aztecLayer: aztecSymbolForLayers, wordSizeForLayers: aztecWordSizeForLayers, fieldForLayers: aztecFieldForLayers, fieldForWordSize, aztecSymbolSize: aztecMatrixSize } = __require("js/aztec/tables.js");
|
|
9311
9311
|
|
|
9312
9312
|
const UPPER = ['CTRL_PS', ' ', ...'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'CTRL_LL', 'CTRL_ML', 'CTRL_DL', 'CTRL_BS'];
|
|
9313
9313
|
const LOWER = ['CTRL_PS', ' ', ...'abcdefghijklmnopqrstuvwxyz', 'CTRL_US', 'CTRL_ML', 'CTRL_DL', 'CTRL_BS'];
|
|
@@ -9574,7 +9574,7 @@ __exports.decodeHighLevelBits = decodeHighLevelBits;
|
|
|
9574
9574
|
__exports.decodeAztec = decodeAztec;
|
|
9575
9575
|
};
|
|
9576
9576
|
|
|
9577
|
-
__modules["aztec/detector.js"] = function (__require, __exports) {
|
|
9577
|
+
__modules["js/aztec/detector.js"] = function (__require, __exports) {
|
|
9578
9578
|
/**
|
|
9579
9579
|
* Aztec image detection.
|
|
9580
9580
|
*
|
|
@@ -9594,9 +9594,9 @@ __modules["aztec/detector.js"] = function (__require, __exports) {
|
|
|
9594
9594
|
*
|
|
9595
9595
|
* @module aztec/detector
|
|
9596
9596
|
*/
|
|
9597
|
-
const { NotFoundError } = __require("core/errors.js");
|
|
9598
|
-
const { sampleQuad } = __require("image/grid-sampler.js");
|
|
9599
|
-
const { decodeAztec } = __require("aztec/decoder.js");
|
|
9597
|
+
const { NotFoundError } = __require("js/core/errors.js");
|
|
9598
|
+
const { sampleQuad } = __require("js/image/grid-sampler.js");
|
|
9599
|
+
const { decodeAztec } = __require("js/aztec/decoder.js");
|
|
9600
9600
|
|
|
9601
9601
|
/** @typedef {{x:number, y:number}} Point */
|
|
9602
9602
|
/** @typedef {{corners: Point[], dimension: number, compact: boolean, moduleSize: number, matrix: import('../core/bit-matrix.js').BitMatrix}} Detection */
|
|
@@ -9773,19 +9773,19 @@ __exports.detectAztec = detectAztec;
|
|
|
9773
9773
|
__exports.detectAndDecodeAztec = detectAndDecodeAztec;
|
|
9774
9774
|
};
|
|
9775
9775
|
|
|
9776
|
-
__modules["aztec/index.js"] = function (__require, __exports) {
|
|
9776
|
+
__modules["js/aztec/index.js"] = function (__require, __exports) {
|
|
9777
9777
|
/** Aztec Code entry points. @module aztec */
|
|
9778
|
-
const __reexport0 = __require("aztec/encoder.js"); __exports.encodeAztec = __reexport0.encodeAztec;
|
|
9779
|
-
const __reexport1 = __require("aztec/decoder.js"); __exports.decodeAztec = __reexport1.decodeAztec;
|
|
9780
|
-
const __reexport2 = __require("aztec/detector.js"); __exports.detectAztec = __reexport2.detectAztec; __exports.detectAndDecodeAztec = __reexport2.detectAndDecodeAztec;
|
|
9781
|
-
const __reexport3 = __require("aztec/tables.js"); __exports.AZTEC_COMPACT_LAYERS = __reexport3.AZTEC_COMPACT_LAYERS; __exports.AZTEC_FULL_LAYERS = __reexport3.AZTEC_FULL_LAYERS; __exports.AZTEC_LAYERS = __reexport3.AZTEC_LAYERS; __exports.AZTEC_DEFAULT_ECC_PERCENT = __reexport3.AZTEC_DEFAULT_ECC_PERCENT; __exports.AZTEC_RS_GENERATOR_BASE = __reexport3.AZTEC_RS_GENERATOR_BASE; __exports.aztecLayer = __reexport3.aztecLayer; __exports.aztecSymbolSize = __reexport3.aztecSymbolSize; __exports.validateAztecTables = __reexport3.validateAztecTables;
|
|
9778
|
+
const __reexport0 = __require("js/aztec/encoder.js"); __exports.encodeAztec = __reexport0.encodeAztec;
|
|
9779
|
+
const __reexport1 = __require("js/aztec/decoder.js"); __exports.decodeAztec = __reexport1.decodeAztec;
|
|
9780
|
+
const __reexport2 = __require("js/aztec/detector.js"); __exports.detectAztec = __reexport2.detectAztec; __exports.detectAndDecodeAztec = __reexport2.detectAndDecodeAztec;
|
|
9781
|
+
const __reexport3 = __require("js/aztec/tables.js"); __exports.AZTEC_COMPACT_LAYERS = __reexport3.AZTEC_COMPACT_LAYERS; __exports.AZTEC_FULL_LAYERS = __reexport3.AZTEC_FULL_LAYERS; __exports.AZTEC_LAYERS = __reexport3.AZTEC_LAYERS; __exports.AZTEC_DEFAULT_ECC_PERCENT = __reexport3.AZTEC_DEFAULT_ECC_PERCENT; __exports.AZTEC_RS_GENERATOR_BASE = __reexport3.AZTEC_RS_GENERATOR_BASE; __exports.aztecLayer = __reexport3.aztecLayer; __exports.aztecSymbolSize = __reexport3.aztecSymbolSize; __exports.validateAztecTables = __reexport3.validateAztecTables;
|
|
9782
9782
|
|
|
9783
9783
|
|
|
9784
9784
|
};
|
|
9785
9785
|
|
|
9786
|
-
__modules["pdf417/compaction.js"] = function (__require, __exports) {
|
|
9786
|
+
__modules["js/pdf417/compaction.js"] = function (__require, __exports) {
|
|
9787
9787
|
/** PDF417 high-level text, byte and numeric compaction. @module pdf417/compaction */
|
|
9788
|
-
const { EncodeError, FormatError } = __require("core/errors.js");
|
|
9788
|
+
const { EncodeError, FormatError } = __require("js/core/errors.js");
|
|
9789
9789
|
|
|
9790
9790
|
const ALPHA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ ';
|
|
9791
9791
|
const LOWER = 'abcdefghijklmnopqrstuvwxyz ';
|
|
@@ -10060,10 +10060,10 @@ __exports.decodePdf417CompactionDetailed = decodePdf417CompactionDetailed;
|
|
|
10060
10060
|
__exports.decodePdf417Compaction = decodePdf417Compaction;
|
|
10061
10061
|
};
|
|
10062
10062
|
|
|
10063
|
-
__modules["pdf417/error-correction.js"] = function (__require, __exports) {
|
|
10064
|
-
const { EncodeError } = __require("core/errors.js");
|
|
10065
|
-
const { GF929 } = __require("core/galois-field.js");
|
|
10066
|
-
const { rsDecode, rsEncode } = __require("core/reed-solomon.js");
|
|
10063
|
+
__modules["js/pdf417/error-correction.js"] = function (__require, __exports) {
|
|
10064
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
10065
|
+
const { GF929 } = __require("js/core/galois-field.js");
|
|
10066
|
+
const { rsDecode, rsEncode } = __require("js/core/reed-solomon.js");
|
|
10067
10067
|
function pdf417EccLength(level) {
|
|
10068
10068
|
if (!Number.isInteger(level) || level < 0 || level > 8) throw new EncodeError('PDF417: error correction level must be in 0..8');
|
|
10069
10069
|
return 1 << (level + 1);
|
|
@@ -10082,7 +10082,7 @@ __exports.pdf417ErrorCorrection = pdf417ErrorCorrection;
|
|
|
10082
10082
|
__exports.pdf417CorrectErrors = pdf417CorrectErrors;
|
|
10083
10083
|
};
|
|
10084
10084
|
|
|
10085
|
-
__modules["pdf417/tables.js"] = function (__require, __exports) {
|
|
10085
|
+
__modules["js/pdf417/tables.js"] = function (__require, __exports) {
|
|
10086
10086
|
/** PDF417 symbol-character pattern table. @module pdf417/tables */
|
|
10087
10087
|
const PDF417_CLUSTER_NUMBERS = Object.freeze([0, 3, 6]);
|
|
10088
10088
|
const PDF417_CODEWORDS_PER_CLUSTER = 929;
|
|
@@ -10378,12 +10378,12 @@ __exports.pdf417PatternForCodeword = pdf417PatternForCodeword;
|
|
|
10378
10378
|
__exports.pdf417CodewordForPattern = pdf417CodewordForPattern;
|
|
10379
10379
|
};
|
|
10380
10380
|
|
|
10381
|
-
__modules["pdf417/encoder.js"] = function (__require, __exports) {
|
|
10382
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
10383
|
-
const { EncodeError } = __require("core/errors.js");
|
|
10384
|
-
const { compactPdf417 } = __require("pdf417/compaction.js");
|
|
10385
|
-
const { pdf417ErrorCorrection, pdf417EccLength } = __require("pdf417/error-correction.js");
|
|
10386
|
-
const { pdf417PatternForCodeword } = __require("pdf417/tables.js");
|
|
10381
|
+
__modules["js/pdf417/encoder.js"] = function (__require, __exports) {
|
|
10382
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
10383
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
10384
|
+
const { compactPdf417 } = __require("js/pdf417/compaction.js");
|
|
10385
|
+
const { pdf417ErrorCorrection, pdf417EccLength } = __require("js/pdf417/error-correction.js");
|
|
10386
|
+
const { pdf417PatternForCodeword } = __require("js/pdf417/tables.js");
|
|
10387
10387
|
|
|
10388
10388
|
const START = '81111113';
|
|
10389
10389
|
const STOP = '711311121';
|
|
@@ -10443,11 +10443,11 @@ function encodePDF417(value, options = {}) {
|
|
|
10443
10443
|
__exports.encodePDF417 = encodePDF417;
|
|
10444
10444
|
};
|
|
10445
10445
|
|
|
10446
|
-
__modules["pdf417/decoder.js"] = function (__require, __exports) {
|
|
10447
|
-
const { FormatError } = __require("core/errors.js");
|
|
10448
|
-
const { decodePdf417CompactionDetailed } = __require("pdf417/compaction.js");
|
|
10449
|
-
const { pdf417CorrectErrors, pdf417EccLength } = __require("pdf417/error-correction.js");
|
|
10450
|
-
const { pdf417CodewordForPattern } = __require("pdf417/tables.js");
|
|
10446
|
+
__modules["js/pdf417/decoder.js"] = function (__require, __exports) {
|
|
10447
|
+
const { FormatError } = __require("js/core/errors.js");
|
|
10448
|
+
const { decodePdf417CompactionDetailed } = __require("js/pdf417/compaction.js");
|
|
10449
|
+
const { pdf417CorrectErrors, pdf417EccLength } = __require("js/pdf417/error-correction.js");
|
|
10450
|
+
const { pdf417CodewordForPattern } = __require("js/pdf417/tables.js");
|
|
10451
10451
|
|
|
10452
10452
|
const START = '11111111010101000';
|
|
10453
10453
|
const STOP = '111111101000101001';
|
|
@@ -10492,11 +10492,11 @@ function decodePDF417(matrix, options = {}) {
|
|
|
10492
10492
|
__exports.decodePDF417 = decodePDF417;
|
|
10493
10493
|
};
|
|
10494
10494
|
|
|
10495
|
-
__modules["pdf417/detector.js"] = function (__require, __exports) {
|
|
10496
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
10497
|
-
const { sampleGrid, sampleGridVoting } = __require("image/grid-sampler.js");
|
|
10498
|
-
const { PerspectiveTransform } = __require("image/perspective.js");
|
|
10499
|
-
const { decodePDF417 } = __require("pdf417/decoder.js");
|
|
10495
|
+
__modules["js/pdf417/detector.js"] = function (__require, __exports) {
|
|
10496
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
10497
|
+
const { sampleGrid, sampleGridVoting } = __require("js/image/grid-sampler.js");
|
|
10498
|
+
const { PerspectiveTransform } = __require("js/image/perspective.js");
|
|
10499
|
+
const { decodePDF417 } = __require("js/pdf417/decoder.js");
|
|
10500
10500
|
|
|
10501
10501
|
const START_PATTERN = [8, 1, 1, 1, 1, 1, 1, 3];
|
|
10502
10502
|
const STOP_PATTERN = [7, 1, 1, 3, 1, 1, 1, 2, 1];
|
|
@@ -10935,18 +10935,18 @@ __exports.detectPDF417 = detectPDF417;
|
|
|
10935
10935
|
__exports.detectAndDecodePDF417 = detectAndDecodePDF417;
|
|
10936
10936
|
};
|
|
10937
10937
|
|
|
10938
|
-
__modules["pdf417/index.js"] = function (__require, __exports) {
|
|
10939
|
-
const __reexport0 = __require("pdf417/compaction.js"); __exports.compactPdf417 = __reexport0.compactPdf417; __exports.compactPdf417Text = __reexport0.compactPdf417Text; __exports.compactPdf417Bytes = __reexport0.compactPdf417Bytes; __exports.compactPdf417Numeric = __reexport0.compactPdf417Numeric; __exports.decodePdf417Compaction = __reexport0.decodePdf417Compaction; __exports.decodePdf417CompactionDetailed = __reexport0.decodePdf417CompactionDetailed;
|
|
10940
|
-
const __reexport1 = __require("pdf417/encoder.js"); __exports.encodePDF417 = __reexport1.encodePDF417;
|
|
10941
|
-
const __reexport2 = __require("pdf417/decoder.js"); __exports.decodePDF417 = __reexport2.decodePDF417;
|
|
10942
|
-
const __reexport3 = __require("pdf417/detector.js"); __exports.detectPDF417 = __reexport3.detectPDF417; __exports.detectAndDecodePDF417 = __reexport3.detectAndDecodePDF417;
|
|
10943
|
-
const __reexport4 = __require("pdf417/error-correction.js"); __exports.pdf417EccLength = __reexport4.pdf417EccLength; __exports.pdf417ErrorCorrection = __reexport4.pdf417ErrorCorrection; __exports.pdf417CorrectErrors = __reexport4.pdf417CorrectErrors;
|
|
10944
|
-
const __reexport5 = __require("pdf417/tables.js"); __exports.PDF417_PATTERN_TABLE = __reexport5.PDF417_PATTERN_TABLE; __exports.PDF417_CLUSTER_NUMBERS = __reexport5.PDF417_CLUSTER_NUMBERS; __exports.pdf417PatternForCodeword = __reexport5.pdf417PatternForCodeword; __exports.pdf417CodewordForPattern = __reexport5.pdf417CodewordForPattern;
|
|
10938
|
+
__modules["js/pdf417/index.js"] = function (__require, __exports) {
|
|
10939
|
+
const __reexport0 = __require("js/pdf417/compaction.js"); __exports.compactPdf417 = __reexport0.compactPdf417; __exports.compactPdf417Text = __reexport0.compactPdf417Text; __exports.compactPdf417Bytes = __reexport0.compactPdf417Bytes; __exports.compactPdf417Numeric = __reexport0.compactPdf417Numeric; __exports.decodePdf417Compaction = __reexport0.decodePdf417Compaction; __exports.decodePdf417CompactionDetailed = __reexport0.decodePdf417CompactionDetailed;
|
|
10940
|
+
const __reexport1 = __require("js/pdf417/encoder.js"); __exports.encodePDF417 = __reexport1.encodePDF417;
|
|
10941
|
+
const __reexport2 = __require("js/pdf417/decoder.js"); __exports.decodePDF417 = __reexport2.decodePDF417;
|
|
10942
|
+
const __reexport3 = __require("js/pdf417/detector.js"); __exports.detectPDF417 = __reexport3.detectPDF417; __exports.detectAndDecodePDF417 = __reexport3.detectAndDecodePDF417;
|
|
10943
|
+
const __reexport4 = __require("js/pdf417/error-correction.js"); __exports.pdf417EccLength = __reexport4.pdf417EccLength; __exports.pdf417ErrorCorrection = __reexport4.pdf417ErrorCorrection; __exports.pdf417CorrectErrors = __reexport4.pdf417CorrectErrors;
|
|
10944
|
+
const __reexport5 = __require("js/pdf417/tables.js"); __exports.PDF417_PATTERN_TABLE = __reexport5.PDF417_PATTERN_TABLE; __exports.PDF417_CLUSTER_NUMBERS = __reexport5.PDF417_CLUSTER_NUMBERS; __exports.pdf417PatternForCodeword = __reexport5.pdf417PatternForCodeword; __exports.pdf417CodewordForPattern = __reexport5.pdf417CodewordForPattern;
|
|
10945
10945
|
|
|
10946
10946
|
|
|
10947
10947
|
};
|
|
10948
10948
|
|
|
10949
|
-
__modules["micropdf417/tables.js"] = function (__require, __exports) {
|
|
10949
|
+
__modules["js/micropdf417/tables.js"] = function (__require, __exports) {
|
|
10950
10950
|
/**
|
|
10951
10951
|
* MicroPDF417 format facts and Row Address Pattern (RAP) helpers.
|
|
10952
10952
|
*
|
|
@@ -11111,11 +11111,11 @@ __exports.microPdf417RowAddress = microPdf417RowAddress;
|
|
|
11111
11111
|
__exports.validateMicroPdf417Tables = validateMicroPdf417Tables;
|
|
11112
11112
|
};
|
|
11113
11113
|
|
|
11114
|
-
__modules["micropdf417/error-correction.js"] = function (__require, __exports) {
|
|
11114
|
+
__modules["js/micropdf417/error-correction.js"] = function (__require, __exports) {
|
|
11115
11115
|
/** MicroPDF417 error correction over the existing GF(929) core. @module micropdf417/error-correction */
|
|
11116
|
-
const { EncodeError } = __require("core/errors.js");
|
|
11117
|
-
const { GF929 } = __require("core/galois-field.js");
|
|
11118
|
-
const { generatorPoly, rsDecode, rsEncode } = __require("core/reed-solomon.js");
|
|
11116
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
11117
|
+
const { GF929 } = __require("js/core/galois-field.js");
|
|
11118
|
+
const { generatorPoly, rsDecode, rsEncode } = __require("js/core/reed-solomon.js");
|
|
11119
11119
|
|
|
11120
11120
|
function eccLength(entry) {
|
|
11121
11121
|
if (!entry || !Number.isInteger(entry.eccCodewords)) throw new EncodeError('MicroPDF417: a variant with an ECC length is required');
|
|
@@ -11143,10 +11143,10 @@ __exports.microPdf417ErrorCorrection = microPdf417ErrorCorrection;
|
|
|
11143
11143
|
__exports.microPdf417CorrectErrors = microPdf417CorrectErrors;
|
|
11144
11144
|
};
|
|
11145
11145
|
|
|
11146
|
-
__modules["micropdf417/compaction.js"] = function (__require, __exports) {
|
|
11146
|
+
__modules["js/micropdf417/compaction.js"] = function (__require, __exports) {
|
|
11147
11147
|
/** MicroPDF417 high-level compaction adapter. @module micropdf417/compaction */
|
|
11148
|
-
const { EncodeError } = __require("core/errors.js");
|
|
11149
|
-
const { compactPdf417Bytes, compactPdf417Numeric, compactPdf417Text } = __require("pdf417/compaction.js");
|
|
11148
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
11149
|
+
const { compactPdf417Bytes, compactPdf417Numeric, compactPdf417Text } = __require("js/pdf417/compaction.js");
|
|
11150
11150
|
|
|
11151
11151
|
function byteLength(value) {
|
|
11152
11152
|
if (value instanceof Uint8Array) return value.byteLength;
|
|
@@ -11229,14 +11229,14 @@ function compactMicroPDF417(value, options = {}) {
|
|
|
11229
11229
|
__exports.compactMicroPDF417 = compactMicroPDF417;
|
|
11230
11230
|
};
|
|
11231
11231
|
|
|
11232
|
-
__modules["micropdf417/encoder.js"] = function (__require, __exports) {
|
|
11232
|
+
__modules["js/micropdf417/encoder.js"] = function (__require, __exports) {
|
|
11233
11233
|
/** MicroPDF417 encoder. @module micropdf417/encoder */
|
|
11234
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
11235
|
-
const { EncodeError } = __require("core/errors.js");
|
|
11236
|
-
const { pdf417PatternForCodeword } = __require("pdf417/tables.js");
|
|
11237
|
-
const { compactMicroPDF417 } = __require("micropdf417/compaction.js");
|
|
11238
|
-
const { microPdf417ErrorCorrection } = __require("micropdf417/error-correction.js");
|
|
11239
|
-
const { MICROPDF417_VARIANTS, microPdf417RapSequence, microPdf417RowAddress, microPdf417VariantByNumber, microPdf417VariantForCapacity } = __require("micropdf417/tables.js");
|
|
11234
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
11235
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
11236
|
+
const { pdf417PatternForCodeword } = __require("js/pdf417/tables.js");
|
|
11237
|
+
const { compactMicroPDF417 } = __require("js/micropdf417/compaction.js");
|
|
11238
|
+
const { microPdf417ErrorCorrection } = __require("js/micropdf417/error-correction.js");
|
|
11239
|
+
const { MICROPDF417_VARIANTS, microPdf417RapSequence, microPdf417RowAddress, microPdf417VariantByNumber, microPdf417VariantForCapacity } = __require("js/micropdf417/tables.js");
|
|
11240
11240
|
|
|
11241
11241
|
function appendWidths(matrix, y, x, sequence, height) {
|
|
11242
11242
|
let dark = true;
|
|
@@ -11406,7 +11406,7 @@ function encodeMicroPDF417(value, options = {}) {
|
|
|
11406
11406
|
__exports.encodeMicroPDF417 = encodeMicroPDF417;
|
|
11407
11407
|
};
|
|
11408
11408
|
|
|
11409
|
-
__modules["micropdf417/decoder.js"] = function (__require, __exports) {
|
|
11409
|
+
__modules["js/micropdf417/decoder.js"] = function (__require, __exports) {
|
|
11410
11410
|
/**
|
|
11411
11411
|
* Direct-module MicroPDF417 decoder.
|
|
11412
11412
|
*
|
|
@@ -11417,11 +11417,11 @@ __modules["micropdf417/decoder.js"] = function (__require, __exports) {
|
|
|
11417
11417
|
*
|
|
11418
11418
|
* @module micropdf417/decoder
|
|
11419
11419
|
*/
|
|
11420
|
-
const { FormatError } = __require("core/errors.js");
|
|
11421
|
-
const { decodePdf417CompactionDetailed } = __require("pdf417/compaction.js");
|
|
11422
|
-
const { pdf417CodewordForPattern } = __require("pdf417/tables.js");
|
|
11423
|
-
const { microPdf417CorrectErrors } = __require("micropdf417/error-correction.js");
|
|
11424
|
-
const { MICROPDF417_VARIANTS, microPdf417RapSequence, microPdf417RowAddress, microPdf417VariantByNumber } = __require("micropdf417/tables.js");
|
|
11420
|
+
const { FormatError } = __require("js/core/errors.js");
|
|
11421
|
+
const { decodePdf417CompactionDetailed } = __require("js/pdf417/compaction.js");
|
|
11422
|
+
const { pdf417CodewordForPattern } = __require("js/pdf417/tables.js");
|
|
11423
|
+
const { microPdf417CorrectErrors } = __require("js/micropdf417/error-correction.js");
|
|
11424
|
+
const { MICROPDF417_VARIANTS, microPdf417RapSequence, microPdf417RowAddress, microPdf417VariantByNumber } = __require("js/micropdf417/tables.js");
|
|
11425
11425
|
|
|
11426
11426
|
function symbolWidth(columns) {
|
|
11427
11427
|
return 21 + columns * 17 + (columns > 2 ? 10 : 0);
|
|
@@ -11558,7 +11558,7 @@ function decodeMicroPDF417(matrix, options = {}) {
|
|
|
11558
11558
|
__exports.decodeMicroPDF417 = decodeMicroPDF417;
|
|
11559
11559
|
};
|
|
11560
11560
|
|
|
11561
|
-
__modules["micropdf417/detector.js"] = function (__require, __exports) {
|
|
11561
|
+
__modules["js/micropdf417/detector.js"] = function (__require, __exports) {
|
|
11562
11562
|
/**
|
|
11563
11563
|
* Axis-aligned MicroPDF417 raster detection.
|
|
11564
11564
|
*
|
|
@@ -11573,8 +11573,8 @@ __modules["micropdf417/detector.js"] = function (__require, __exports) {
|
|
|
11573
11573
|
*
|
|
11574
11574
|
* @module micropdf417/detector
|
|
11575
11575
|
*/
|
|
11576
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
11577
|
-
const { decodeMicroPDF417 } = __require("micropdf417/decoder.js");
|
|
11576
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
11577
|
+
const { decodeMicroPDF417 } = __require("js/micropdf417/decoder.js");
|
|
11578
11578
|
|
|
11579
11579
|
/** @typedef {{x:number, y:number}} Point */
|
|
11580
11580
|
|
|
@@ -11682,18 +11682,18 @@ __exports.detectMicroPDF417 = detectMicroPDF417;
|
|
|
11682
11682
|
__exports.detectAndDecodeMicroPDF417 = detectAndDecodeMicroPDF417;
|
|
11683
11683
|
};
|
|
11684
11684
|
|
|
11685
|
-
__modules["micropdf417/index.js"] = function (__require, __exports) {
|
|
11686
|
-
const __reexport0 = __require("micropdf417/tables.js"); __exports.MICROPDF417_VARIANTS = __reexport0.MICROPDF417_VARIANTS; __exports.microPdf417NextRap = __reexport0.microPdf417NextRap; __exports.microPdf417VariantByNumber = __reexport0.microPdf417VariantByNumber; __exports.microPdf417VariantForCapacity = __reexport0.microPdf417VariantForCapacity; __exports.microPdf417RapSequence = __reexport0.microPdf417RapSequence; __exports.microPdf417RowAddress = __reexport0.microPdf417RowAddress; __exports.validateMicroPdf417Tables = __reexport0.validateMicroPdf417Tables;
|
|
11687
|
-
const __reexport1 = __require("micropdf417/error-correction.js"); __exports.microPdf417EccLength = __reexport1.microPdf417EccLength; __exports.microPdf417Generator = __reexport1.microPdf417Generator; __exports.microPdf417ErrorCorrection = __reexport1.microPdf417ErrorCorrection; __exports.microPdf417CorrectErrors = __reexport1.microPdf417CorrectErrors;
|
|
11688
|
-
const __reexport2 = __require("micropdf417/compaction.js"); __exports.compactMicroPDF417 = __reexport2.compactMicroPDF417;
|
|
11689
|
-
const __reexport3 = __require("micropdf417/encoder.js"); __exports.encodeMicroPDF417 = __reexport3.encodeMicroPDF417;
|
|
11690
|
-
const __reexport4 = __require("micropdf417/decoder.js"); __exports.decodeMicroPDF417 = __reexport4.decodeMicroPDF417;
|
|
11691
|
-
const __reexport5 = __require("micropdf417/detector.js"); __exports.detectMicroPDF417 = __reexport5.detectMicroPDF417; __exports.detectAndDecodeMicroPDF417 = __reexport5.detectAndDecodeMicroPDF417;
|
|
11685
|
+
__modules["js/micropdf417/index.js"] = function (__require, __exports) {
|
|
11686
|
+
const __reexport0 = __require("js/micropdf417/tables.js"); __exports.MICROPDF417_VARIANTS = __reexport0.MICROPDF417_VARIANTS; __exports.microPdf417NextRap = __reexport0.microPdf417NextRap; __exports.microPdf417VariantByNumber = __reexport0.microPdf417VariantByNumber; __exports.microPdf417VariantForCapacity = __reexport0.microPdf417VariantForCapacity; __exports.microPdf417RapSequence = __reexport0.microPdf417RapSequence; __exports.microPdf417RowAddress = __reexport0.microPdf417RowAddress; __exports.validateMicroPdf417Tables = __reexport0.validateMicroPdf417Tables;
|
|
11687
|
+
const __reexport1 = __require("js/micropdf417/error-correction.js"); __exports.microPdf417EccLength = __reexport1.microPdf417EccLength; __exports.microPdf417Generator = __reexport1.microPdf417Generator; __exports.microPdf417ErrorCorrection = __reexport1.microPdf417ErrorCorrection; __exports.microPdf417CorrectErrors = __reexport1.microPdf417CorrectErrors;
|
|
11688
|
+
const __reexport2 = __require("js/micropdf417/compaction.js"); __exports.compactMicroPDF417 = __reexport2.compactMicroPDF417;
|
|
11689
|
+
const __reexport3 = __require("js/micropdf417/encoder.js"); __exports.encodeMicroPDF417 = __reexport3.encodeMicroPDF417;
|
|
11690
|
+
const __reexport4 = __require("js/micropdf417/decoder.js"); __exports.decodeMicroPDF417 = __reexport4.decodeMicroPDF417;
|
|
11691
|
+
const __reexport5 = __require("js/micropdf417/detector.js"); __exports.detectMicroPDF417 = __reexport5.detectMicroPDF417; __exports.detectAndDecodeMicroPDF417 = __reexport5.detectAndDecodeMicroPDF417;
|
|
11692
11692
|
|
|
11693
11693
|
|
|
11694
11694
|
};
|
|
11695
11695
|
|
|
11696
|
-
__modules["microqr/tables.js"] = function (__require, __exports) {
|
|
11696
|
+
__modules["js/microqr/tables.js"] = function (__require, __exports) {
|
|
11697
11697
|
/**
|
|
11698
11698
|
* Micro QR Code structural facts and geometry.
|
|
11699
11699
|
*
|
|
@@ -11705,7 +11705,7 @@ __modules["microqr/tables.js"] = function (__require, __exports) {
|
|
|
11705
11705
|
*
|
|
11706
11706
|
* @module microqr/tables
|
|
11707
11707
|
*/
|
|
11708
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
11708
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
11709
11709
|
|
|
11710
11710
|
/** Numeric version identifiers used by the encoder selection loop. */
|
|
11711
11711
|
const MICROQR_VERSIONS = Object.freeze([1, 2, 3, 4]);
|
|
@@ -12001,13 +12001,13 @@ __exports.microQrMaskBit = microQrMaskBit;
|
|
|
12001
12001
|
__exports.validateMicroQrTables = validateMicroQrTables;
|
|
12002
12002
|
};
|
|
12003
12003
|
|
|
12004
|
-
__modules["microqr/encoder.js"] = function (__require, __exports) {
|
|
12005
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
12006
|
-
const { BitWriter } = __require("core/bit-buffer.js");
|
|
12007
|
-
const { EncodeError } = __require("core/errors.js");
|
|
12008
|
-
const { GF256_QR } = __require("core/galois-field.js");
|
|
12009
|
-
const { rsEncode } = __require("core/reed-solomon.js");
|
|
12010
|
-
const { MICROQR_VERSIONS, microQrBlockLayout, microQrDataModuleOrder, microQrFormatInfo, microQrFormatInfoPositions, microQrMaskBit, microQrSymbolNumber, microQrVersionSize } = __require("microqr/tables.js");
|
|
12004
|
+
__modules["js/microqr/encoder.js"] = function (__require, __exports) {
|
|
12005
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
12006
|
+
const { BitWriter } = __require("js/core/bit-buffer.js");
|
|
12007
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
12008
|
+
const { GF256_QR } = __require("js/core/galois-field.js");
|
|
12009
|
+
const { rsEncode } = __require("js/core/reed-solomon.js");
|
|
12010
|
+
const { MICROQR_VERSIONS, microQrBlockLayout, microQrDataModuleOrder, microQrFormatInfo, microQrFormatInfoPositions, microQrMaskBit, microQrSymbolNumber, microQrVersionSize } = __require("js/microqr/tables.js");
|
|
12011
12011
|
const MICROQR_ALPHANUMERIC = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:';
|
|
12012
12012
|
const MODE = { numeric: 0, alphanumeric: 1, byte: 2, kanji: 3 };
|
|
12013
12013
|
const MODE_MIN_VERSION = { numeric: 1, alphanumeric: 2, byte: 3, kanji: 3 };
|
|
@@ -12240,16 +12240,16 @@ __exports.MICROQR_ALPHANUMERIC = MICROQR_ALPHANUMERIC;
|
|
|
12240
12240
|
__exports.encodeMicroQR = encodeMicroQR;
|
|
12241
12241
|
};
|
|
12242
12242
|
|
|
12243
|
-
__modules["microqr/decoder.js"] = function (__require, __exports) {
|
|
12243
|
+
__modules["js/microqr/decoder.js"] = function (__require, __exports) {
|
|
12244
12244
|
/**
|
|
12245
12245
|
* Micro QR decoder for an already sampled M1-M4 module matrix.
|
|
12246
12246
|
*
|
|
12247
12247
|
* @module microqr/decoder
|
|
12248
12248
|
*/
|
|
12249
|
-
const { ChecksumError, FormatError } = __require("core/errors.js");
|
|
12250
|
-
const { GF256_QR } = __require("core/galois-field.js");
|
|
12251
|
-
const { rsDecode } = __require("core/reed-solomon.js");
|
|
12252
|
-
const { microQrBlockLayout, microQrDataModuleOrder, microQrDecodeFormatInfo, microQrFormatInfoPositions, microQrMaskBit } = __require("microqr/tables.js");
|
|
12249
|
+
const { ChecksumError, FormatError } = __require("js/core/errors.js");
|
|
12250
|
+
const { GF256_QR } = __require("js/core/galois-field.js");
|
|
12251
|
+
const { rsDecode } = __require("js/core/reed-solomon.js");
|
|
12252
|
+
const { microQrBlockLayout, microQrDataModuleOrder, microQrDecodeFormatInfo, microQrFormatInfoPositions, microQrMaskBit } = __require("js/microqr/tables.js");
|
|
12253
12253
|
|
|
12254
12254
|
const ALPHANUMERIC = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:';
|
|
12255
12255
|
const MODE_NAMES = ['numeric', 'alphanumeric', 'byte', 'kanji'];
|
|
@@ -12452,7 +12452,7 @@ __exports.ChecksumError = ChecksumError; __exports.FormatError = FormatError;
|
|
|
12452
12452
|
__exports.decodeMicroQR = decodeMicroQR;
|
|
12453
12453
|
};
|
|
12454
12454
|
|
|
12455
|
-
__modules["microqr/detector.js"] = function (__require, __exports) {
|
|
12455
|
+
__modules["js/microqr/detector.js"] = function (__require, __exports) {
|
|
12456
12456
|
/**
|
|
12457
12457
|
* Micro QR detection in binarized rasters.
|
|
12458
12458
|
*
|
|
@@ -12469,10 +12469,10 @@ __modules["microqr/detector.js"] = function (__require, __exports) {
|
|
|
12469
12469
|
*
|
|
12470
12470
|
* @module microqr/detector
|
|
12471
12471
|
*/
|
|
12472
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
12473
|
-
const { NotFoundError } = __require("core/errors.js");
|
|
12474
|
-
const { sampleQuad } = __require("image/grid-sampler.js");
|
|
12475
|
-
const { decodeMicroQR } = __require("microqr/decoder.js");
|
|
12472
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
12473
|
+
const { NotFoundError } = __require("js/core/errors.js");
|
|
12474
|
+
const { sampleQuad } = __require("js/image/grid-sampler.js");
|
|
12475
|
+
const { decodeMicroQR } = __require("js/microqr/decoder.js");
|
|
12476
12476
|
|
|
12477
12477
|
/** Legal Micro QR side lengths (M1 through M4). */
|
|
12478
12478
|
const DIMENSIONS = [11, 13, 15, 17];
|
|
@@ -12782,18 +12782,18 @@ __exports.detectMicroQR = detectMicroQR;
|
|
|
12782
12782
|
__exports.detectAndDecodeMicroQR = detectAndDecodeMicroQR;
|
|
12783
12783
|
};
|
|
12784
12784
|
|
|
12785
|
-
__modules["microqr/index.js"] = function (__require, __exports) {
|
|
12785
|
+
__modules["js/microqr/index.js"] = function (__require, __exports) {
|
|
12786
12786
|
/** Micro QR Code M1-M4 public module surface. @module microqr */
|
|
12787
|
-
const __reexport0 = __require("microqr/encoder.js"); __exports.encodeMicroQR = __reexport0.encodeMicroQR;
|
|
12788
|
-
const __reexport1 = __require("microqr/decoder.js"); __exports.decodeMicroQR = __reexport1.decodeMicroQR;
|
|
12789
|
-
const __reexport2 = __require("microqr/detector.js"); __exports.detectMicroQR = __reexport2.detectMicroQR; __exports.detectAndDecodeMicroQR = __reexport2.detectAndDecodeMicroQR;
|
|
12790
|
-
const __reexport3 = __require("microqr/tables.js"); __exports.validateMicroQrTables = __reexport3.validateMicroQrTables;
|
|
12787
|
+
const __reexport0 = __require("js/microqr/encoder.js"); __exports.encodeMicroQR = __reexport0.encodeMicroQR;
|
|
12788
|
+
const __reexport1 = __require("js/microqr/decoder.js"); __exports.decodeMicroQR = __reexport1.decodeMicroQR;
|
|
12789
|
+
const __reexport2 = __require("js/microqr/detector.js"); __exports.detectMicroQR = __reexport2.detectMicroQR; __exports.detectAndDecodeMicroQR = __reexport2.detectAndDecodeMicroQR;
|
|
12790
|
+
const __reexport3 = __require("js/microqr/tables.js"); __exports.validateMicroQrTables = __reexport3.validateMicroQrTables;
|
|
12791
12791
|
|
|
12792
12792
|
|
|
12793
12793
|
};
|
|
12794
12794
|
|
|
12795
|
-
__modules["rmqr/tables.js"] = function (__require, __exports) {
|
|
12796
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
12795
|
+
__modules["js/rmqr/tables.js"] = function (__require, __exports) {
|
|
12796
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
12797
12797
|
|
|
12798
12798
|
/** The 32 rMQR dimensions in ISO/IEC 23941 order (width, height). */
|
|
12799
12799
|
const RMQR_SIZES = Object.freeze([
|
|
@@ -12929,13 +12929,13 @@ __exports.dataBitCapacity = dataBitCapacity;
|
|
|
12929
12929
|
__exports.validateTables = validateTables;
|
|
12930
12930
|
};
|
|
12931
12931
|
|
|
12932
|
-
__modules["rmqr/encoder.js"] = function (__require, __exports) {
|
|
12933
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
12934
|
-
const { BitWriter } = __require("core/bit-buffer.js");
|
|
12935
|
-
const { EncodeError } = __require("core/errors.js");
|
|
12936
|
-
const { GF256_QR } = __require("core/galois-field.js");
|
|
12937
|
-
const { rsEncode } = __require("core/reed-solomon.js");
|
|
12938
|
-
const { FORMAT_MASK_FINDER, FORMAT_MASK_SUB, dataBitCapacity, dataModuleOrder, formatBits, functionModules, maskBit, versionForSize, versionInfo } = __require("rmqr/tables.js");
|
|
12932
|
+
__modules["js/rmqr/encoder.js"] = function (__require, __exports) {
|
|
12933
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
12934
|
+
const { BitWriter } = __require("js/core/bit-buffer.js");
|
|
12935
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
12936
|
+
const { GF256_QR } = __require("js/core/galois-field.js");
|
|
12937
|
+
const { rsEncode } = __require("js/core/reed-solomon.js");
|
|
12938
|
+
const { FORMAT_MASK_FINDER, FORMAT_MASK_SUB, dataBitCapacity, dataModuleOrder, formatBits, functionModules, maskBit, versionForSize, versionInfo } = __require("js/rmqr/tables.js");
|
|
12939
12939
|
const ALPHANUMERIC_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:';
|
|
12940
12940
|
const MODE = Object.freeze({ TERMINATOR: 0, NUMERIC: 1, ALPHANUMERIC: 2, BYTE: 3, KANJI: 4, FNC1: 5, FNC1_SECOND: 6, ECI: 7 });
|
|
12941
12941
|
|
|
@@ -13072,13 +13072,13 @@ __exports.ALPHANUMERIC_CHARS = ALPHANUMERIC_CHARS;
|
|
|
13072
13072
|
__exports.encodeRMQR = encodeRMQR;
|
|
13073
13073
|
};
|
|
13074
13074
|
|
|
13075
|
-
__modules["rmqr/decoder.js"] = function (__require, __exports) {
|
|
13076
|
-
const { BitReader } = __require("core/bit-buffer.js");
|
|
13077
|
-
const { ChecksumError, FormatError } = __require("core/errors.js");
|
|
13078
|
-
const { GF256_QR } = __require("core/galois-field.js");
|
|
13079
|
-
const { rsDecode } = __require("core/reed-solomon.js");
|
|
13080
|
-
const { FORMAT_MASK_FINDER, FORMAT_MASK_SUB, dataModuleOrder, functionModules, maskBit, versionForSize, versionInfo, formatBits } = __require("rmqr/tables.js");
|
|
13081
|
-
const { ALPHANUMERIC_CHARS, MODE } = __require("rmqr/encoder.js");
|
|
13075
|
+
__modules["js/rmqr/decoder.js"] = function (__require, __exports) {
|
|
13076
|
+
const { BitReader } = __require("js/core/bit-buffer.js");
|
|
13077
|
+
const { ChecksumError, FormatError } = __require("js/core/errors.js");
|
|
13078
|
+
const { GF256_QR } = __require("js/core/galois-field.js");
|
|
13079
|
+
const { rsDecode } = __require("js/core/reed-solomon.js");
|
|
13080
|
+
const { FORMAT_MASK_FINDER, FORMAT_MASK_SUB, dataModuleOrder, functionModules, maskBit, versionForSize, versionInfo, formatBits } = __require("js/rmqr/tables.js");
|
|
13081
|
+
const { ALPHANUMERIC_CHARS, MODE } = __require("js/rmqr/encoder.js");
|
|
13082
13082
|
|
|
13083
13083
|
function hamming(a, b) { let v = a ^ b, n = 0; while (v) { v &= v - 1; n++; } return n; }
|
|
13084
13084
|
function readFormat(matrix, v) {
|
|
@@ -13144,11 +13144,11 @@ __exports.ChecksumError = ChecksumError;
|
|
|
13144
13144
|
__exports.decodeRMQR = decodeRMQR;
|
|
13145
13145
|
};
|
|
13146
13146
|
|
|
13147
|
-
__modules["rmqr/detector.js"] = function (__require, __exports) {
|
|
13148
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
13149
|
-
const { NotFoundError } = __require("core/errors.js");
|
|
13150
|
-
const { decodeRMQR } = __require("rmqr/decoder.js");
|
|
13151
|
-
const { versionForSize } = __require("rmqr/tables.js");
|
|
13147
|
+
__modules["js/rmqr/detector.js"] = function (__require, __exports) {
|
|
13148
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
13149
|
+
const { NotFoundError } = __require("js/core/errors.js");
|
|
13150
|
+
const { decodeRMQR } = __require("js/rmqr/decoder.js");
|
|
13151
|
+
const { versionForSize } = __require("js/rmqr/tables.js");
|
|
13152
13152
|
|
|
13153
13153
|
function rotate90(source) {
|
|
13154
13154
|
const out = new BitMatrix(source.height, source.width);
|
|
@@ -13210,16 +13210,16 @@ __exports.detectRMQR = detectRMQR;
|
|
|
13210
13210
|
__exports.detectAndDecodeRMQR = detectAndDecodeRMQR;
|
|
13211
13211
|
};
|
|
13212
13212
|
|
|
13213
|
-
__modules["rmqr/index.js"] = function (__require, __exports) {
|
|
13214
|
-
const __reexport0 = __require("rmqr/encoder.js"); __exports.encodeRMQR = __reexport0.encodeRMQR; __exports.ALPHANUMERIC_CHARS = __reexport0.ALPHANUMERIC_CHARS;
|
|
13215
|
-
const __reexport1 = __require("rmqr/decoder.js"); __exports.decodeRMQR = __reexport1.decodeRMQR;
|
|
13216
|
-
const __reexport2 = __require("rmqr/detector.js"); __exports.detectRMQR = __reexport2.detectRMQR; __exports.detectAndDecodeRMQR = __reexport2.detectAndDecodeRMQR;
|
|
13217
|
-
const __reexport3 = __require("rmqr/tables.js"); __exports.RMQR_SIZES = __reexport3.RMQR_SIZES; __exports.versionInfo = __reexport3.versionInfo; __exports.versionForSize = __reexport3.versionForSize; __exports.alignmentCoordinates = __reexport3.alignmentCoordinates; __exports.dataModuleOrder = __reexport3.dataModuleOrder; __exports.functionModules = __reexport3.functionModules; __exports.dataBitCapacity = __reexport3.dataBitCapacity; __exports.formatBits = __reexport3.formatBits; __exports.maskBit = __reexport3.maskBit; __exports.validateTables = __reexport3.validateTables;
|
|
13213
|
+
__modules["js/rmqr/index.js"] = function (__require, __exports) {
|
|
13214
|
+
const __reexport0 = __require("js/rmqr/encoder.js"); __exports.encodeRMQR = __reexport0.encodeRMQR; __exports.ALPHANUMERIC_CHARS = __reexport0.ALPHANUMERIC_CHARS;
|
|
13215
|
+
const __reexport1 = __require("js/rmqr/decoder.js"); __exports.decodeRMQR = __reexport1.decodeRMQR;
|
|
13216
|
+
const __reexport2 = __require("js/rmqr/detector.js"); __exports.detectRMQR = __reexport2.detectRMQR; __exports.detectAndDecodeRMQR = __reexport2.detectAndDecodeRMQR;
|
|
13217
|
+
const __reexport3 = __require("js/rmqr/tables.js"); __exports.RMQR_SIZES = __reexport3.RMQR_SIZES; __exports.versionInfo = __reexport3.versionInfo; __exports.versionForSize = __reexport3.versionForSize; __exports.alignmentCoordinates = __reexport3.alignmentCoordinates; __exports.dataModuleOrder = __reexport3.dataModuleOrder; __exports.functionModules = __reexport3.functionModules; __exports.dataBitCapacity = __reexport3.dataBitCapacity; __exports.formatBits = __reexport3.formatBits; __exports.maskBit = __reexport3.maskBit; __exports.validateTables = __reexport3.validateTables;
|
|
13218
13218
|
|
|
13219
13219
|
|
|
13220
13220
|
};
|
|
13221
13221
|
|
|
13222
|
-
__modules["frameqr/tables.js"] = function (__require, __exports) {
|
|
13222
|
+
__modules["js/frameqr/tables.js"] = function (__require, __exports) {
|
|
13223
13223
|
/**
|
|
13224
13224
|
* Structural contract for the Sythos Canvas QR profile.
|
|
13225
13225
|
*
|
|
@@ -13239,7 +13239,7 @@ __modules["frameqr/tables.js"] = function (__require, __exports) {
|
|
|
13239
13239
|
*
|
|
13240
13240
|
* @module frameqr/tables
|
|
13241
13241
|
*/
|
|
13242
|
-
const { blockLayout, dataModuleOrder, reservedModules, versionSize } = __require("qr/tables.js");
|
|
13242
|
+
const { blockLayout, dataModuleOrder, reservedModules, versionSize } = __require("js/qr/tables.js");
|
|
13243
13243
|
|
|
13244
13244
|
/** Public identity and compatibility boundary of the implementable profile. */
|
|
13245
13245
|
const FRAMEQR_PROFILE = Object.freeze({
|
|
@@ -13464,7 +13464,7 @@ __exports.validateCanvasSpec = validateCanvasSpec;
|
|
|
13464
13464
|
__exports.validateFrameQrTables = validateFrameQrTables;
|
|
13465
13465
|
};
|
|
13466
13466
|
|
|
13467
|
-
__modules["frameqr/encoder.js"] = function (__require, __exports) {
|
|
13467
|
+
__modules["js/frameqr/encoder.js"] = function (__require, __exports) {
|
|
13468
13468
|
/**
|
|
13469
13469
|
* Sythos Canvas QR profile encoder.
|
|
13470
13470
|
*
|
|
@@ -13475,9 +13475,9 @@ __modules["frameqr/encoder.js"] = function (__require, __exports) {
|
|
|
13475
13475
|
*
|
|
13476
13476
|
* @module frameqr/encoder
|
|
13477
13477
|
*/
|
|
13478
|
-
const { EncodeError } = __require("core/errors.js");
|
|
13479
|
-
const { encodeQR } = __require("qr/encoder.js");
|
|
13480
|
-
const { FRAMEQR_PROFILE, canvasModules, normalizeCanvasSpec, validateCanvasSpec } = __require("frameqr/tables.js");
|
|
13478
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
13479
|
+
const { encodeQR } = __require("js/qr/encoder.js");
|
|
13480
|
+
const { FRAMEQR_PROFILE, canvasModules, normalizeCanvasSpec, validateCanvasSpec } = __require("js/frameqr/tables.js");
|
|
13481
13481
|
|
|
13482
13482
|
/**
|
|
13483
13483
|
* @typedef {object} FrameQrEncodeOptions
|
|
@@ -13589,7 +13589,7 @@ function encodeFrameQR(text, options = {}) {
|
|
|
13589
13589
|
__exports.encodeFrameQR = encodeFrameQR;
|
|
13590
13590
|
};
|
|
13591
13591
|
|
|
13592
|
-
__modules["frameqr/decoder.js"] = function (__require, __exports) {
|
|
13592
|
+
__modules["js/frameqr/decoder.js"] = function (__require, __exports) {
|
|
13593
13593
|
/**
|
|
13594
13594
|
* Decoder for the Sythos Canvas QR profile.
|
|
13595
13595
|
*
|
|
@@ -13604,9 +13604,9 @@ __modules["frameqr/decoder.js"] = function (__require, __exports) {
|
|
|
13604
13604
|
*
|
|
13605
13605
|
* @module frameqr/decoder
|
|
13606
13606
|
*/
|
|
13607
|
-
const { FormatError } = __require("core/errors.js");
|
|
13608
|
-
const { decodeQR } = __require("qr/decoder.js");
|
|
13609
|
-
const { FRAMEQR_PROFILE, normalizeCanvasSpec, validateCanvasSpec, analyzeCanvasDamage } = __require("frameqr/tables.js");
|
|
13607
|
+
const { FormatError } = __require("js/core/errors.js");
|
|
13608
|
+
const { decodeQR } = __require("js/qr/decoder.js");
|
|
13609
|
+
const { FRAMEQR_PROFILE, normalizeCanvasSpec, validateCanvasSpec, analyzeCanvasDamage } = __require("js/frameqr/tables.js");
|
|
13610
13610
|
|
|
13611
13611
|
/** @param {unknown} value @returns {boolean} */
|
|
13612
13612
|
function isObject(value) {
|
|
@@ -13796,7 +13796,7 @@ __exports.isExpectedProfile = isExpectedProfile;
|
|
|
13796
13796
|
__exports.decodeFrameQR = decodeFrameQR;
|
|
13797
13797
|
};
|
|
13798
13798
|
|
|
13799
|
-
__modules["frameqr/detector.js"] = function (__require, __exports) {
|
|
13799
|
+
__modules["js/frameqr/detector.js"] = function (__require, __exports) {
|
|
13800
13800
|
/**
|
|
13801
13801
|
* Detector for the non-certified Sythos Canvas QR profile.
|
|
13802
13802
|
*
|
|
@@ -13814,11 +13814,11 @@ __modules["frameqr/detector.js"] = function (__require, __exports) {
|
|
|
13814
13814
|
*
|
|
13815
13815
|
* @module frameqr/detector
|
|
13816
13816
|
*/
|
|
13817
|
-
const { NotFoundError } = __require("core/errors.js");
|
|
13818
|
-
const { sampleQuad } = __require("image/grid-sampler.js");
|
|
13819
|
-
const { detectQR } = __require("qr/detector.js");
|
|
13820
|
-
const { decodeFrameQR } = __require("frameqr/decoder.js");
|
|
13821
|
-
const { FRAMEQR_PROFILE, canvasModules, normalizeCanvasSpec } = __require("frameqr/tables.js");
|
|
13817
|
+
const { NotFoundError } = __require("js/core/errors.js");
|
|
13818
|
+
const { sampleQuad } = __require("js/image/grid-sampler.js");
|
|
13819
|
+
const { detectQR } = __require("js/qr/detector.js");
|
|
13820
|
+
const { decodeFrameQR } = __require("js/frameqr/decoder.js");
|
|
13821
|
+
const { FRAMEQR_PROFILE, canvasModules, normalizeCanvasSpec } = __require("js/frameqr/tables.js");
|
|
13822
13822
|
|
|
13823
13823
|
/** @typedef {{x:number, y:number}} Point */
|
|
13824
13824
|
|
|
@@ -13959,16 +13959,16 @@ __exports.detectFrameQR = detectFrameQR;
|
|
|
13959
13959
|
__exports.detectAndDecodeFrameQR = detectAndDecodeFrameQR;
|
|
13960
13960
|
};
|
|
13961
13961
|
|
|
13962
|
-
__modules["frameqr/index.js"] = function (__require, __exports) {
|
|
13963
|
-
const __reexport0 = __require("frameqr/encoder.js"); __exports.encodeFrameQR = __reexport0.encodeFrameQR;
|
|
13964
|
-
const __reexport1 = __require("frameqr/decoder.js"); __exports.decodeFrameQR = __reexport1.decodeFrameQR;
|
|
13965
|
-
const __reexport2 = __require("frameqr/detector.js"); __exports.detectFrameQR = __reexport2.detectFrameQR; __exports.detectAndDecodeFrameQR = __reexport2.detectAndDecodeFrameQR;
|
|
13966
|
-
const __reexport3 = __require("frameqr/tables.js"); __exports.FRAMEQR_PROFILE = __reexport3.FRAMEQR_PROFILE; __exports.FRAMEQR_CANVAS_SHAPES = __reexport3.FRAMEQR_CANVAS_SHAPES; __exports.canvasModules = __reexport3.canvasModules; __exports.normalizeCanvasSpec = __reexport3.normalizeCanvasSpec; __exports.analyzeCanvasDamage = __reexport3.analyzeCanvasDamage; __exports.validateCanvasSpec = __reexport3.validateCanvasSpec; __exports.validateFrameQrTables = __reexport3.validateFrameQrTables;
|
|
13962
|
+
__modules["js/frameqr/index.js"] = function (__require, __exports) {
|
|
13963
|
+
const __reexport0 = __require("js/frameqr/encoder.js"); __exports.encodeFrameQR = __reexport0.encodeFrameQR;
|
|
13964
|
+
const __reexport1 = __require("js/frameqr/decoder.js"); __exports.decodeFrameQR = __reexport1.decodeFrameQR;
|
|
13965
|
+
const __reexport2 = __require("js/frameqr/detector.js"); __exports.detectFrameQR = __reexport2.detectFrameQR; __exports.detectAndDecodeFrameQR = __reexport2.detectAndDecodeFrameQR;
|
|
13966
|
+
const __reexport3 = __require("js/frameqr/tables.js"); __exports.FRAMEQR_PROFILE = __reexport3.FRAMEQR_PROFILE; __exports.FRAMEQR_CANVAS_SHAPES = __reexport3.FRAMEQR_CANVAS_SHAPES; __exports.canvasModules = __reexport3.canvasModules; __exports.normalizeCanvasSpec = __reexport3.normalizeCanvasSpec; __exports.analyzeCanvasDamage = __reexport3.analyzeCanvasDamage; __exports.validateCanvasSpec = __reexport3.validateCanvasSpec; __exports.validateFrameQrTables = __reexport3.validateFrameQrTables;
|
|
13967
13967
|
|
|
13968
13968
|
|
|
13969
13969
|
};
|
|
13970
13970
|
|
|
13971
|
-
__modules["aztecrune/tables.js"] = function (__require, __exports) {
|
|
13971
|
+
__modules["js/aztecrune/tables.js"] = function (__require, __exports) {
|
|
13972
13972
|
/**
|
|
13973
13973
|
* Aztec Rune geometry.
|
|
13974
13974
|
*
|
|
@@ -13983,8 +13983,8 @@ __modules["aztecrune/tables.js"] = function (__require, __exports) {
|
|
|
13983
13983
|
*
|
|
13984
13984
|
* @module aztecrune/tables
|
|
13985
13985
|
*/
|
|
13986
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
13987
|
-
const { fieldForWordSize } = __require("aztec/tables.js");
|
|
13986
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
13987
|
+
const { fieldForWordSize } = __require("js/aztec/tables.js");
|
|
13988
13988
|
const AZTEC_RUNE_SIZE = 11;
|
|
13989
13989
|
const AZTEC_RUNE_DATA_BITS = 8;
|
|
13990
13990
|
const AZTEC_RUNE_WORD_SIZE = 4;
|
|
@@ -14090,7 +14090,7 @@ __exports.aztecRuneField = aztecRuneField;
|
|
|
14090
14090
|
__exports.validateAztecRuneTables = validateAztecRuneTables;
|
|
14091
14091
|
};
|
|
14092
14092
|
|
|
14093
|
-
__modules["aztecrune/encoder.js"] = function (__require, __exports) {
|
|
14093
|
+
__modules["js/aztecrune/encoder.js"] = function (__require, __exports) {
|
|
14094
14094
|
/**
|
|
14095
14095
|
* Aztec Rune encoder.
|
|
14096
14096
|
*
|
|
@@ -14100,10 +14100,10 @@ __modules["aztecrune/encoder.js"] = function (__require, __exports) {
|
|
|
14100
14100
|
*
|
|
14101
14101
|
* @module aztecrune/encoder
|
|
14102
14102
|
*/
|
|
14103
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
14104
|
-
const { EncodeError } = __require("core/errors.js");
|
|
14105
|
-
const { rsEncode } = __require("core/reed-solomon.js");
|
|
14106
|
-
const { AZTEC_RUNE_DATA_POSITIONS, AZTEC_RUNE_ECC_CODEWORDS, AZTEC_RUNE_MASK, AZTEC_RUNE_SIZE, aztecRuneField, buildAztecRuneStructure } = __require("aztecrune/tables.js");
|
|
14103
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
14104
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
14105
|
+
const { rsEncode } = __require("js/core/reed-solomon.js");
|
|
14106
|
+
const { AZTEC_RUNE_DATA_POSITIONS, AZTEC_RUNE_ECC_CODEWORDS, AZTEC_RUNE_MASK, AZTEC_RUNE_SIZE, aztecRuneField, buildAztecRuneStructure } = __require("js/aztecrune/tables.js");
|
|
14107
14107
|
|
|
14108
14108
|
/** @param {unknown} value @returns {number} */
|
|
14109
14109
|
function normalizeAztecRuneValue(value) {
|
|
@@ -14178,7 +14178,7 @@ __exports.normalizeAztecRuneValue = normalizeAztecRuneValue;
|
|
|
14178
14178
|
__exports.encodeAztecRune = encodeAztecRune;
|
|
14179
14179
|
};
|
|
14180
14180
|
|
|
14181
|
-
__modules["aztecrune/decoder.js"] = function (__require, __exports) {
|
|
14181
|
+
__modules["js/aztecrune/decoder.js"] = function (__require, __exports) {
|
|
14182
14182
|
/**
|
|
14183
14183
|
* Aztec Rune decoder.
|
|
14184
14184
|
*
|
|
@@ -14190,9 +14190,9 @@ __modules["aztecrune/decoder.js"] = function (__require, __exports) {
|
|
|
14190
14190
|
*
|
|
14191
14191
|
* @module aztecrune/decoder
|
|
14192
14192
|
*/
|
|
14193
|
-
const { FormatError } = __require("core/errors.js");
|
|
14194
|
-
const { rsDecode } = __require("core/reed-solomon.js");
|
|
14195
|
-
const { AZTEC_RUNE_DATA_CODEWORDS, AZTEC_RUNE_DATA_POSITIONS, AZTEC_RUNE_ECC_CODEWORDS, AZTEC_RUNE_MASK, AZTEC_RUNE_SIZE, aztecRuneField, aztecRuneStructuralValue } = __require("aztecrune/tables.js");
|
|
14193
|
+
const { FormatError } = __require("js/core/errors.js");
|
|
14194
|
+
const { rsDecode } = __require("js/core/reed-solomon.js");
|
|
14195
|
+
const { AZTEC_RUNE_DATA_CODEWORDS, AZTEC_RUNE_DATA_POSITIONS, AZTEC_RUNE_ECC_CODEWORDS, AZTEC_RUNE_MASK, AZTEC_RUNE_SIZE, aztecRuneField, aztecRuneStructuralValue } = __require("js/aztecrune/tables.js");
|
|
14196
14196
|
|
|
14197
14197
|
/** @param {import('../core/bit-matrix.js').BitMatrix} source @param {number} turns */
|
|
14198
14198
|
function rotateClockwise(source, turns) {
|
|
@@ -14298,7 +14298,7 @@ __exports.readCodewords = readCodewords; __exports.structureMatches = structureM
|
|
|
14298
14298
|
__exports.decodeAztecRune = decodeAztecRune;
|
|
14299
14299
|
};
|
|
14300
14300
|
|
|
14301
|
-
__modules["aztecrune/detector.js"] = function (__require, __exports) {
|
|
14301
|
+
__modules["js/aztecrune/detector.js"] = function (__require, __exports) {
|
|
14302
14302
|
/**
|
|
14303
14303
|
* Detector for Aztec Rune symbols.
|
|
14304
14304
|
*
|
|
@@ -14310,10 +14310,10 @@ __modules["aztecrune/detector.js"] = function (__require, __exports) {
|
|
|
14310
14310
|
*
|
|
14311
14311
|
* @module aztecrune/detector
|
|
14312
14312
|
*/
|
|
14313
|
-
const { NotFoundError } = __require("core/errors.js");
|
|
14314
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
14315
|
-
const { decodeAztecRune } = __require("aztecrune/decoder.js");
|
|
14316
|
-
const { AZTEC_RUNE_SIZE } = __require("aztecrune/tables.js");
|
|
14313
|
+
const { NotFoundError } = __require("js/core/errors.js");
|
|
14314
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
14315
|
+
const { decodeAztecRune } = __require("js/aztecrune/decoder.js");
|
|
14316
|
+
const { AZTEC_RUNE_SIZE } = __require("js/aztecrune/tables.js");
|
|
14317
14317
|
|
|
14318
14318
|
/** @typedef {{x:number,y:number}} Point */
|
|
14319
14319
|
|
|
@@ -14439,17 +14439,17 @@ __exports.detectAztecRune = detectAztecRune;
|
|
|
14439
14439
|
__exports.detectAndDecodeAztecRune = detectAndDecodeAztecRune;
|
|
14440
14440
|
};
|
|
14441
14441
|
|
|
14442
|
-
__modules["aztecrune/index.js"] = function (__require, __exports) {
|
|
14442
|
+
__modules["js/aztecrune/index.js"] = function (__require, __exports) {
|
|
14443
14443
|
/** Aztec Rune entry points. @module aztecrune */
|
|
14444
|
-
const __reexport0 = __require("aztecrune/encoder.js"); __exports.encodeAztecRune = __reexport0.encodeAztecRune; __exports.normalizeAztecRuneValue = __reexport0.normalizeAztecRuneValue;
|
|
14445
|
-
const __reexport1 = __require("aztecrune/decoder.js"); __exports.decodeAztecRune = __reexport1.decodeAztecRune;
|
|
14446
|
-
const __reexport2 = __require("aztecrune/detector.js"); __exports.detectAztecRune = __reexport2.detectAztecRune; __exports.detectAndDecodeAztecRune = __reexport2.detectAndDecodeAztecRune;
|
|
14447
|
-
const __reexport3 = __require("aztecrune/tables.js"); __exports.AZTEC_RUNE_SIZE = __reexport3.AZTEC_RUNE_SIZE; __exports.AZTEC_RUNE_DATA_BITS = __reexport3.AZTEC_RUNE_DATA_BITS; __exports.AZTEC_RUNE_WORD_SIZE = __reexport3.AZTEC_RUNE_WORD_SIZE; __exports.AZTEC_RUNE_DATA_CODEWORDS = __reexport3.AZTEC_RUNE_DATA_CODEWORDS; __exports.AZTEC_RUNE_ECC_CODEWORDS = __reexport3.AZTEC_RUNE_ECC_CODEWORDS; __exports.AZTEC_RUNE_TOTAL_CODEWORDS = __reexport3.AZTEC_RUNE_TOTAL_CODEWORDS; __exports.AZTEC_RUNE_MASK = __reexport3.AZTEC_RUNE_MASK; __exports.AZTEC_RUNE_DATA_POSITIONS = __reexport3.AZTEC_RUNE_DATA_POSITIONS; __exports.aztecRuneStructuralValue = __reexport3.aztecRuneStructuralValue; __exports.buildAztecRuneStructure = __reexport3.buildAztecRuneStructure; __exports.aztecRuneField = __reexport3.aztecRuneField; __exports.validateAztecRuneTables = __reexport3.validateAztecRuneTables;
|
|
14444
|
+
const __reexport0 = __require("js/aztecrune/encoder.js"); __exports.encodeAztecRune = __reexport0.encodeAztecRune; __exports.normalizeAztecRuneValue = __reexport0.normalizeAztecRuneValue;
|
|
14445
|
+
const __reexport1 = __require("js/aztecrune/decoder.js"); __exports.decodeAztecRune = __reexport1.decodeAztecRune;
|
|
14446
|
+
const __reexport2 = __require("js/aztecrune/detector.js"); __exports.detectAztecRune = __reexport2.detectAztecRune; __exports.detectAndDecodeAztecRune = __reexport2.detectAndDecodeAztecRune;
|
|
14447
|
+
const __reexport3 = __require("js/aztecrune/tables.js"); __exports.AZTEC_RUNE_SIZE = __reexport3.AZTEC_RUNE_SIZE; __exports.AZTEC_RUNE_DATA_BITS = __reexport3.AZTEC_RUNE_DATA_BITS; __exports.AZTEC_RUNE_WORD_SIZE = __reexport3.AZTEC_RUNE_WORD_SIZE; __exports.AZTEC_RUNE_DATA_CODEWORDS = __reexport3.AZTEC_RUNE_DATA_CODEWORDS; __exports.AZTEC_RUNE_ECC_CODEWORDS = __reexport3.AZTEC_RUNE_ECC_CODEWORDS; __exports.AZTEC_RUNE_TOTAL_CODEWORDS = __reexport3.AZTEC_RUNE_TOTAL_CODEWORDS; __exports.AZTEC_RUNE_MASK = __reexport3.AZTEC_RUNE_MASK; __exports.AZTEC_RUNE_DATA_POSITIONS = __reexport3.AZTEC_RUNE_DATA_POSITIONS; __exports.aztecRuneStructuralValue = __reexport3.aztecRuneStructuralValue; __exports.buildAztecRuneStructure = __reexport3.buildAztecRuneStructure; __exports.aztecRuneField = __reexport3.aztecRuneField; __exports.validateAztecRuneTables = __reexport3.validateAztecRuneTables;
|
|
14448
14448
|
|
|
14449
14449
|
|
|
14450
14450
|
};
|
|
14451
14451
|
|
|
14452
|
-
__modules["compactpdf417/tables.js"] = function (__require, __exports) {
|
|
14452
|
+
__modules["js/compactpdf417/tables.js"] = function (__require, __exports) {
|
|
14453
14453
|
/**
|
|
14454
14454
|
* Compact (truncated) PDF417 layout.
|
|
14455
14455
|
*
|
|
@@ -14462,7 +14462,7 @@ __modules["compactpdf417/tables.js"] = function (__require, __exports) {
|
|
|
14462
14462
|
*
|
|
14463
14463
|
* @module compactpdf417/tables
|
|
14464
14464
|
*/
|
|
14465
|
-
const { EncodeError } = __require("core/errors.js");
|
|
14465
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
14466
14466
|
|
|
14467
14467
|
/** PDF417 start pattern, in module widths. */
|
|
14468
14468
|
const COMPACT_PDF417_START = '81111113';
|
|
@@ -14605,14 +14605,14 @@ __exports.compactPdf417MatchingLevels = compactPdf417MatchingLevels;
|
|
|
14605
14605
|
__exports.validateCompactPdf417Tables = validateCompactPdf417Tables;
|
|
14606
14606
|
};
|
|
14607
14607
|
|
|
14608
|
-
__modules["compactpdf417/encoder.js"] = function (__require, __exports) {
|
|
14608
|
+
__modules["js/compactpdf417/encoder.js"] = function (__require, __exports) {
|
|
14609
14609
|
/** Compact PDF417 (truncated PDF417) encoder. @module compactpdf417/encoder */
|
|
14610
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
14611
|
-
const { EncodeError } = __require("core/errors.js");
|
|
14612
|
-
const { compactPdf417 } = __require("pdf417/compaction.js");
|
|
14613
|
-
const { pdf417ErrorCorrection, pdf417EccLength } = __require("pdf417/error-correction.js");
|
|
14614
|
-
const { pdf417PatternForCodeword } = __require("pdf417/tables.js");
|
|
14615
|
-
const { COMPACT_PDF417_START, compactPdf417Indicators, compactPdf417Width, validateCompactPdf417Options } = __require("compactpdf417/tables.js");
|
|
14610
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
14611
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
14612
|
+
const { compactPdf417 } = __require("js/pdf417/compaction.js");
|
|
14613
|
+
const { pdf417ErrorCorrection, pdf417EccLength } = __require("js/pdf417/error-correction.js");
|
|
14614
|
+
const { pdf417PatternForCodeword } = __require("js/pdf417/tables.js");
|
|
14615
|
+
const { COMPACT_PDF417_START, compactPdf417Indicators, compactPdf417Width, validateCompactPdf417Options } = __require("js/compactpdf417/tables.js");
|
|
14616
14616
|
|
|
14617
14617
|
function appendWidths(matrix, y, x, sequence, height) {
|
|
14618
14618
|
let dark = true;
|
|
@@ -14713,13 +14713,13 @@ __exports.compactPdf417Dimensions = dimensions;
|
|
|
14713
14713
|
__exports.encodeCompactPDF417 = encodeCompactPDF417;
|
|
14714
14714
|
};
|
|
14715
14715
|
|
|
14716
|
-
__modules["compactpdf417/decoder.js"] = function (__require, __exports) {
|
|
14716
|
+
__modules["js/compactpdf417/decoder.js"] = function (__require, __exports) {
|
|
14717
14717
|
/** Compact PDF417 decoder. @module compactpdf417/decoder */
|
|
14718
|
-
const { FormatError } = __require("core/errors.js");
|
|
14719
|
-
const { decodePdf417CompactionDetailed } = __require("pdf417/compaction.js");
|
|
14720
|
-
const { pdf417CorrectErrors, pdf417EccLength } = __require("pdf417/error-correction.js");
|
|
14721
|
-
const { pdf417CodewordForPattern } = __require("pdf417/tables.js");
|
|
14722
|
-
const { COMPACT_PDF417_START_BITS, compactPdf417Geometry, compactPdf417Indicators, compactPdf417MatchingLevels } = __require("compactpdf417/tables.js");
|
|
14718
|
+
const { FormatError } = __require("js/core/errors.js");
|
|
14719
|
+
const { decodePdf417CompactionDetailed } = __require("js/pdf417/compaction.js");
|
|
14720
|
+
const { pdf417CorrectErrors, pdf417EccLength } = __require("js/pdf417/error-correction.js");
|
|
14721
|
+
const { pdf417CodewordForPattern } = __require("js/pdf417/tables.js");
|
|
14722
|
+
const { COMPACT_PDF417_START_BITS, compactPdf417Geometry, compactPdf417Indicators, compactPdf417MatchingLevels } = __require("js/compactpdf417/tables.js");
|
|
14723
14723
|
|
|
14724
14724
|
function bits(matrix, y, x, width) {
|
|
14725
14725
|
let value = 0;
|
|
@@ -14810,11 +14810,11 @@ function decodeCompactPDF417(matrix, options = {}) {
|
|
|
14810
14810
|
__exports.decodeCompactPDF417 = decodeCompactPDF417;
|
|
14811
14811
|
};
|
|
14812
14812
|
|
|
14813
|
-
__modules["compactpdf417/detector.js"] = function (__require, __exports) {
|
|
14813
|
+
__modules["js/compactpdf417/detector.js"] = function (__require, __exports) {
|
|
14814
14814
|
/** Compact PDF417 detector for clean, integer-scaled rasters. @module compactpdf417/detector */
|
|
14815
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
14816
|
-
const { compactPdf417Width } = __require("compactpdf417/tables.js");
|
|
14817
|
-
const { decodeCompactPDF417 } = __require("compactpdf417/decoder.js");
|
|
14815
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
14816
|
+
const { compactPdf417Width } = __require("js/compactpdf417/tables.js");
|
|
14817
|
+
const { decodeCompactPDF417 } = __require("js/compactpdf417/decoder.js");
|
|
14818
14818
|
|
|
14819
14819
|
function rotateClockwise(source) {
|
|
14820
14820
|
const out = new BitMatrix(source.height, source.width);
|
|
@@ -14923,19 +14923,19 @@ __exports.detectCompactPDF417 = detectCompactPDF417;
|
|
|
14923
14923
|
__exports.detectAndDecodeCompactPDF417 = detectAndDecodeCompactPDF417;
|
|
14924
14924
|
};
|
|
14925
14925
|
|
|
14926
|
-
__modules["compactpdf417/index.js"] = function (__require, __exports) {
|
|
14926
|
+
__modules["js/compactpdf417/index.js"] = function (__require, __exports) {
|
|
14927
14927
|
/* Compact PDF417 public module exports. */
|
|
14928
|
-
const __reexport0 = __require("compactpdf417/tables.js"); __exports.COMPACT_PDF417_START = __reexport0.COMPACT_PDF417_START; __exports.COMPACT_PDF417_START_BITS = __reexport0.COMPACT_PDF417_START_BITS; __exports.COMPACT_PDF417_STOP_MODULES = __reexport0.COMPACT_PDF417_STOP_MODULES; __exports.COMPACT_PDF417_LIMITS = __reexport0.COMPACT_PDF417_LIMITS; __exports.compactPdf417Width = __reexport0.compactPdf417Width; __exports.compactPdf417Geometry = __reexport0.compactPdf417Geometry; __exports.compactPdf417Indicators = __reexport0.compactPdf417Indicators; __exports.compactPdf417MatchingLevels = __reexport0.compactPdf417MatchingLevels; __exports.validateCompactPdf417Options = __reexport0.validateCompactPdf417Options; __exports.validateCompactPdf417Tables = __reexport0.validateCompactPdf417Tables;
|
|
14929
|
-
const __reexport1 = __require("compactpdf417/encoder.js"); __exports.encodeCompactPDF417 = __reexport1.encodeCompactPDF417; __exports.compactPdf417Dimensions = __reexport1.compactPdf417Dimensions;
|
|
14930
|
-
const __reexport2 = __require("compactpdf417/decoder.js"); __exports.decodeCompactPDF417 = __reexport2.decodeCompactPDF417;
|
|
14931
|
-
const __reexport3 = __require("compactpdf417/detector.js"); __exports.detectCompactPDF417 = __reexport3.detectCompactPDF417; __exports.detectAndDecodeCompactPDF417 = __reexport3.detectAndDecodeCompactPDF417;
|
|
14928
|
+
const __reexport0 = __require("js/compactpdf417/tables.js"); __exports.COMPACT_PDF417_START = __reexport0.COMPACT_PDF417_START; __exports.COMPACT_PDF417_START_BITS = __reexport0.COMPACT_PDF417_START_BITS; __exports.COMPACT_PDF417_STOP_MODULES = __reexport0.COMPACT_PDF417_STOP_MODULES; __exports.COMPACT_PDF417_LIMITS = __reexport0.COMPACT_PDF417_LIMITS; __exports.compactPdf417Width = __reexport0.compactPdf417Width; __exports.compactPdf417Geometry = __reexport0.compactPdf417Geometry; __exports.compactPdf417Indicators = __reexport0.compactPdf417Indicators; __exports.compactPdf417MatchingLevels = __reexport0.compactPdf417MatchingLevels; __exports.validateCompactPdf417Options = __reexport0.validateCompactPdf417Options; __exports.validateCompactPdf417Tables = __reexport0.validateCompactPdf417Tables;
|
|
14929
|
+
const __reexport1 = __require("js/compactpdf417/encoder.js"); __exports.encodeCompactPDF417 = __reexport1.encodeCompactPDF417; __exports.compactPdf417Dimensions = __reexport1.compactPdf417Dimensions;
|
|
14930
|
+
const __reexport2 = __require("js/compactpdf417/decoder.js"); __exports.decodeCompactPDF417 = __reexport2.decodeCompactPDF417;
|
|
14931
|
+
const __reexport3 = __require("js/compactpdf417/detector.js"); __exports.detectCompactPDF417 = __reexport3.detectCompactPDF417; __exports.detectAndDecodeCompactPDF417 = __reexport3.detectAndDecodeCompactPDF417;
|
|
14932
14932
|
|
|
14933
14933
|
|
|
14934
14934
|
};
|
|
14935
14935
|
|
|
14936
|
-
__modules["databar/gs1.js"] = function (__require, __exports) {
|
|
14936
|
+
__modules["js/databar/gs1.js"] = function (__require, __exports) {
|
|
14937
14937
|
/** GS1 element-string codec used by GS1 DataBar Expanded. @module databar/gs1 */
|
|
14938
|
-
const { EncodeError, FormatError } = __require("core/errors.js");
|
|
14938
|
+
const { EncodeError, FormatError } = __require("js/core/errors.js");
|
|
14939
14939
|
const GS1_SEPARATOR = '\x1d';
|
|
14940
14940
|
|
|
14941
14941
|
const EXACT = new Map([
|
|
@@ -15083,12 +15083,12 @@ __exports.decodeGS1ElementString = decodeGS1ElementString;
|
|
|
15083
15083
|
__exports.formatGS1Elements = formatGS1Elements;
|
|
15084
15084
|
};
|
|
15085
15085
|
|
|
15086
|
-
__modules["databar/encoder.js"] = function (__require, __exports) {
|
|
15086
|
+
__modules["js/databar/encoder.js"] = function (__require, __exports) {
|
|
15087
15087
|
/** GS1 DataBar Omnidirectional and Truncated encoder. @module databar/encoder */
|
|
15088
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
15089
|
-
const { EncodeError } = __require("core/errors.js");
|
|
15090
|
-
const { encodeDataBar14GTIN } = __require("databar/codec.js");
|
|
15091
|
-
const { DATABAR14_CHECKSUM_WEIGHTS, DATABAR14_FINDERS, dataBar14CharacterWidths } = __require("databar/patterns.js");
|
|
15088
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
15089
|
+
const { EncodeError } = __require("js/core/errors.js");
|
|
15090
|
+
const { encodeDataBar14GTIN } = __require("js/databar/codec.js");
|
|
15091
|
+
const { DATABAR14_CHECKSUM_WEIGHTS, DATABAR14_FINDERS, dataBar14CharacterWidths } = __require("js/databar/patterns.js");
|
|
15092
15092
|
|
|
15093
15093
|
function finderIndexes(characters) {
|
|
15094
15094
|
const widths = characters.map((value, index) =>
|
|
@@ -15149,25 +15149,25 @@ function encodeDataBar14(value, options = {}) {
|
|
|
15149
15149
|
__exports.encodeDataBar14 = encodeDataBar14;
|
|
15150
15150
|
};
|
|
15151
15151
|
|
|
15152
|
-
__modules["databar/index.js"] = function (__require, __exports) {
|
|
15152
|
+
__modules["js/databar/index.js"] = function (__require, __exports) {
|
|
15153
15153
|
/** Verified GS1 DataBar data-layer primitives. @module databar */
|
|
15154
|
-
const __reexport0 = __require("databar/codec.js"); __exports.dataBarGtinTransmission = __reexport0.dataBarGtinTransmission; __exports.decodeDataBar14GTIN = __reexport0.decodeDataBar14GTIN; __exports.decodeDataBarLimitedGTIN = __reexport0.decodeDataBarLimitedGTIN; __exports.encodeDataBar14GTIN = __reexport0.encodeDataBar14GTIN; __exports.encodeDataBarLimitedGTIN = __reexport0.encodeDataBarLimitedGTIN; __exports.gtinCheckDigit = __reexport0.gtinCheckDigit; __exports.makeGTIN14 = __reexport0.makeGTIN14; __exports.normalizeGTIN = __reexport0.normalizeGTIN;
|
|
15155
|
-
const __reexport1 = __require("databar/gs1.js"); __exports.GS1_SEPARATOR = __reexport1.GS1_SEPARATOR; __exports.decodeGS1ElementString = __reexport1.decodeGS1ElementString; __exports.encodeGS1ElementString = __reexport1.encodeGS1ElementString; __exports.formatGS1Elements = __reexport1.formatGS1Elements; __exports.gs1AIInfo = __reexport1.gs1AIInfo; __exports.parseGS1ElementString = __reexport1.parseGS1ElementString;
|
|
15156
|
-
const __reexport2 = __require("databar/tables.js"); __exports.DATABAR14_VARIANTS = __reexport2.DATABAR14_VARIANTS; __exports.DATABAR_LIMITED_VARIANT = __reexport2.DATABAR_LIMITED_VARIANT; __exports.dataBar14GroupFor = __reexport2.dataBar14GroupFor; __exports.validateDataBarTables = __reexport2.validateDataBarTables;
|
|
15157
|
-
const __reexport3 = __require("databar/encoder.js"); __exports.encodeDataBar14 = __reexport3.encodeDataBar14;
|
|
15158
|
-
const __reexport4 = __require("databar/decoder.js"); __exports.decodeDataBar14 = __reexport4.decodeDataBar14; __exports.decodeDataBar14Scanline = __reexport4.decodeDataBar14Scanline;
|
|
15159
|
-
const __reexport5 = __require("databar/patterns.js"); __exports.DATABAR14_CHECKSUM_WEIGHTS = __reexport5.DATABAR14_CHECKSUM_WEIGHTS; __exports.DATABAR14_FINDERS = __reexport5.DATABAR14_FINDERS; __exports.dataBar14CharacterWidths = __reexport5.dataBar14CharacterWidths; __exports.dataBar14ValueForWidths = __reexport5.dataBar14ValueForWidths; __exports.dataBarWidths = __reexport5.dataBarWidths;
|
|
15154
|
+
const __reexport0 = __require("js/databar/codec.js"); __exports.dataBarGtinTransmission = __reexport0.dataBarGtinTransmission; __exports.decodeDataBar14GTIN = __reexport0.decodeDataBar14GTIN; __exports.decodeDataBarLimitedGTIN = __reexport0.decodeDataBarLimitedGTIN; __exports.encodeDataBar14GTIN = __reexport0.encodeDataBar14GTIN; __exports.encodeDataBarLimitedGTIN = __reexport0.encodeDataBarLimitedGTIN; __exports.gtinCheckDigit = __reexport0.gtinCheckDigit; __exports.makeGTIN14 = __reexport0.makeGTIN14; __exports.normalizeGTIN = __reexport0.normalizeGTIN;
|
|
15155
|
+
const __reexport1 = __require("js/databar/gs1.js"); __exports.GS1_SEPARATOR = __reexport1.GS1_SEPARATOR; __exports.decodeGS1ElementString = __reexport1.decodeGS1ElementString; __exports.encodeGS1ElementString = __reexport1.encodeGS1ElementString; __exports.formatGS1Elements = __reexport1.formatGS1Elements; __exports.gs1AIInfo = __reexport1.gs1AIInfo; __exports.parseGS1ElementString = __reexport1.parseGS1ElementString;
|
|
15156
|
+
const __reexport2 = __require("js/databar/tables.js"); __exports.DATABAR14_VARIANTS = __reexport2.DATABAR14_VARIANTS; __exports.DATABAR_LIMITED_VARIANT = __reexport2.DATABAR_LIMITED_VARIANT; __exports.dataBar14GroupFor = __reexport2.dataBar14GroupFor; __exports.validateDataBarTables = __reexport2.validateDataBarTables;
|
|
15157
|
+
const __reexport3 = __require("js/databar/encoder.js"); __exports.encodeDataBar14 = __reexport3.encodeDataBar14;
|
|
15158
|
+
const __reexport4 = __require("js/databar/decoder.js"); __exports.decodeDataBar14 = __reexport4.decodeDataBar14; __exports.decodeDataBar14Scanline = __reexport4.decodeDataBar14Scanline;
|
|
15159
|
+
const __reexport5 = __require("js/databar/patterns.js"); __exports.DATABAR14_CHECKSUM_WEIGHTS = __reexport5.DATABAR14_CHECKSUM_WEIGHTS; __exports.DATABAR14_FINDERS = __reexport5.DATABAR14_FINDERS; __exports.dataBar14CharacterWidths = __reexport5.dataBar14CharacterWidths; __exports.dataBar14ValueForWidths = __reexport5.dataBar14ValueForWidths; __exports.dataBarWidths = __reexport5.dataBarWidths;
|
|
15160
15160
|
|
|
15161
15161
|
|
|
15162
15162
|
};
|
|
15163
15163
|
|
|
15164
|
-
__modules["render/options.js"] = function (__require, __exports) {
|
|
15164
|
+
__modules["js/render/options.js"] = function (__require, __exports) {
|
|
15165
15165
|
/**
|
|
15166
15166
|
* Shared render options, normalised once so every backend agrees.
|
|
15167
15167
|
*
|
|
15168
15168
|
* @module render/options
|
|
15169
15169
|
*/
|
|
15170
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
15170
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
15171
15171
|
|
|
15172
15172
|
/**
|
|
15173
15173
|
* @typedef {object} RenderOptions
|
|
@@ -15296,7 +15296,7 @@ __exports.normalizeOptions = normalizeOptions;
|
|
|
15296
15296
|
__exports.parseColor = parseColor;
|
|
15297
15297
|
};
|
|
15298
15298
|
|
|
15299
|
-
__modules["render/svg.js"] = function (__require, __exports) {
|
|
15299
|
+
__modules["js/render/svg.js"] = function (__require, __exports) {
|
|
15300
15300
|
/**
|
|
15301
15301
|
* SVG output.
|
|
15302
15302
|
*
|
|
@@ -15307,7 +15307,7 @@ __modules["render/svg.js"] = function (__require, __exports) {
|
|
|
15307
15307
|
*
|
|
15308
15308
|
* @module render/svg
|
|
15309
15309
|
*/
|
|
15310
|
-
const { normalizeOptions } = __require("render/options.js");
|
|
15310
|
+
const { normalizeOptions } = __require("js/render/options.js");
|
|
15311
15311
|
|
|
15312
15312
|
/**
|
|
15313
15313
|
* @param {string} value
|
|
@@ -15391,13 +15391,13 @@ __exports.toSVG = toSVG;
|
|
|
15391
15391
|
__exports.toSVGDataURI = toSVGDataURI;
|
|
15392
15392
|
};
|
|
15393
15393
|
|
|
15394
|
-
__modules["render/image-data.js"] = function (__require, __exports) {
|
|
15394
|
+
__modules["js/render/image-data.js"] = function (__require, __exports) {
|
|
15395
15395
|
/**
|
|
15396
15396
|
* Raster output as ImageData, and 2D-canvas drawing.
|
|
15397
15397
|
*
|
|
15398
15398
|
* @module render/image-data
|
|
15399
15399
|
*/
|
|
15400
|
-
const { normalizeOptions, parseColor } = __require("render/options.js");
|
|
15400
|
+
const { normalizeOptions, parseColor } = __require("js/render/options.js");
|
|
15401
15401
|
|
|
15402
15402
|
/**
|
|
15403
15403
|
* Render to an `ImageData`-shaped object.
|
|
@@ -15491,7 +15491,7 @@ __exports.toImageData = toImageData;
|
|
|
15491
15491
|
__exports.toCanvas = toCanvas;
|
|
15492
15492
|
};
|
|
15493
15493
|
|
|
15494
|
-
__modules["render/png.js"] = function (__require, __exports) {
|
|
15494
|
+
__modules["js/render/png.js"] = function (__require, __exports) {
|
|
15495
15495
|
/**
|
|
15496
15496
|
* PNG output, with no dependencies and no compression library of our own.
|
|
15497
15497
|
*
|
|
@@ -15512,7 +15512,7 @@ __modules["render/png.js"] = function (__require, __exports) {
|
|
|
15512
15512
|
*
|
|
15513
15513
|
* @module render/png
|
|
15514
15514
|
*/
|
|
15515
|
-
const { normalizeOptions, parseColor } = __require("render/options.js");
|
|
15515
|
+
const { normalizeOptions, parseColor } = __require("js/render/options.js");
|
|
15516
15516
|
|
|
15517
15517
|
/* ------------------------------------------------------------------ *
|
|
15518
15518
|
* Checksums
|
|
@@ -15762,7 +15762,7 @@ __exports.toPNG = toPNG;
|
|
|
15762
15762
|
__exports.toPNGDataURI = toPNGDataURI;
|
|
15763
15763
|
};
|
|
15764
15764
|
|
|
15765
|
-
__modules["render/webgl.js"] = function (__require, __exports) {
|
|
15765
|
+
__modules["js/render/webgl.js"] = function (__require, __exports) {
|
|
15766
15766
|
/**
|
|
15767
15767
|
* WebGL2 drawing.
|
|
15768
15768
|
*
|
|
@@ -15777,7 +15777,7 @@ __modules["render/webgl.js"] = function (__require, __exports) {
|
|
|
15777
15777
|
*
|
|
15778
15778
|
* @module render/webgl
|
|
15779
15779
|
*/
|
|
15780
|
-
const { normalizeOptions, parseColor } = __require("render/options.js");
|
|
15780
|
+
const { normalizeOptions, parseColor } = __require("js/render/options.js");
|
|
15781
15781
|
|
|
15782
15782
|
const VERTEX_SHADER = `#version 300 es
|
|
15783
15783
|
// A single oversized triangle covers the viewport with no vertex buffer:
|
|
@@ -15943,7 +15943,7 @@ __exports.isWebGL2Available = isWebGL2Available;
|
|
|
15943
15943
|
__exports.renderToCanvasWebGL = renderToCanvasWebGL;
|
|
15944
15944
|
};
|
|
15945
15945
|
|
|
15946
|
-
__modules["render/webgpu.js"] = function (__require, __exports) {
|
|
15946
|
+
__modules["js/render/webgpu.js"] = function (__require, __exports) {
|
|
15947
15947
|
/**
|
|
15948
15948
|
* WebGPU drawing.
|
|
15949
15949
|
*
|
|
@@ -15961,7 +15961,7 @@ __modules["render/webgpu.js"] = function (__require, __exports) {
|
|
|
15961
15961
|
*
|
|
15962
15962
|
* @module render/webgpu
|
|
15963
15963
|
*/
|
|
15964
|
-
const { normalizeOptions, parseColor } = __require("render/options.js");
|
|
15964
|
+
const { normalizeOptions, parseColor } = __require("js/render/options.js");
|
|
15965
15965
|
|
|
15966
15966
|
/**
|
|
15967
15967
|
* Vertex and fragment stages in one module, mirroring the WebGL2 pair.
|
|
@@ -16287,7 +16287,7 @@ __exports.isWebGPUAvailable = isWebGPUAvailable;
|
|
|
16287
16287
|
__exports.renderToCanvasWebGPU = renderToCanvasWebGPU;
|
|
16288
16288
|
};
|
|
16289
16289
|
|
|
16290
|
-
__modules["render/index.js"] = function (__require, __exports) {
|
|
16290
|
+
__modules["js/render/index.js"] = function (__require, __exports) {
|
|
16291
16291
|
/**
|
|
16292
16292
|
* Output backends.
|
|
16293
16293
|
*
|
|
@@ -16317,15 +16317,15 @@ __modules["render/index.js"] = function (__require, __exports) {
|
|
|
16317
16317
|
*
|
|
16318
16318
|
* @module render
|
|
16319
16319
|
*/
|
|
16320
|
-
const __reexport0 = __require("render/svg.js"); __exports.toSVG = __reexport0.toSVG; __exports.toSVGDataURI = __reexport0.toSVGDataURI;
|
|
16321
|
-
const __reexport1 = __require("render/image-data.js"); __exports.toImageData = __reexport1.toImageData; __exports.toCanvas = __reexport1.toCanvas;
|
|
16322
|
-
const __reexport2 = __require("render/png.js"); __exports.toPNG = __reexport2.toPNG; __exports.toPNGDataURI = __reexport2.toPNGDataURI; __exports.deflateStored = __reexport2.deflateStored;
|
|
16323
|
-
const __reexport3 = __require("render/webgl.js"); __exports.isWebGL2Available = __reexport3.isWebGL2Available; __exports.renderToCanvasWebGL = __reexport3.renderToCanvasWebGL;
|
|
16324
|
-
const __reexport4 = __require("render/webgpu.js"); __exports.isWebGPUAvailable = __reexport4.isWebGPUAvailable; __exports.renderToCanvasWebGPU = __reexport4.renderToCanvasWebGPU;
|
|
16325
|
-
const __reexport5 = __require("render/options.js"); __exports.normalizeOptions = __reexport5.normalizeOptions; __exports.parseColor = __reexport5.parseColor;
|
|
16326
|
-
const { toCanvas } = __require("render/image-data.js");
|
|
16327
|
-
const { isWebGL2Available, renderToCanvasWebGL } = __require("render/webgl.js");
|
|
16328
|
-
const { isWebGPUAvailable, renderToCanvasWebGPU } = __require("render/webgpu.js");
|
|
16320
|
+
const __reexport0 = __require("js/render/svg.js"); __exports.toSVG = __reexport0.toSVG; __exports.toSVGDataURI = __reexport0.toSVGDataURI;
|
|
16321
|
+
const __reexport1 = __require("js/render/image-data.js"); __exports.toImageData = __reexport1.toImageData; __exports.toCanvas = __reexport1.toCanvas;
|
|
16322
|
+
const __reexport2 = __require("js/render/png.js"); __exports.toPNG = __reexport2.toPNG; __exports.toPNGDataURI = __reexport2.toPNGDataURI; __exports.deflateStored = __reexport2.deflateStored;
|
|
16323
|
+
const __reexport3 = __require("js/render/webgl.js"); __exports.isWebGL2Available = __reexport3.isWebGL2Available; __exports.renderToCanvasWebGL = __reexport3.renderToCanvasWebGL;
|
|
16324
|
+
const __reexport4 = __require("js/render/webgpu.js"); __exports.isWebGPUAvailable = __reexport4.isWebGPUAvailable; __exports.renderToCanvasWebGPU = __reexport4.renderToCanvasWebGPU;
|
|
16325
|
+
const __reexport5 = __require("js/render/options.js"); __exports.normalizeOptions = __reexport5.normalizeOptions; __exports.parseColor = __reexport5.parseColor;
|
|
16326
|
+
const { toCanvas } = __require("js/render/image-data.js");
|
|
16327
|
+
const { isWebGL2Available, renderToCanvasWebGL } = __require("js/render/webgl.js");
|
|
16328
|
+
const { isWebGPUAvailable, renderToCanvasWebGPU } = __require("js/render/webgpu.js");
|
|
16329
16329
|
|
|
16330
16330
|
/**
|
|
16331
16331
|
* Draw into a canvas using the best backend available.
|
|
@@ -16408,46 +16408,46 @@ __modules["index.js"] = function (__require, __exports) {
|
|
|
16408
16408
|
*
|
|
16409
16409
|
* @module @sythos/js_barcode_universal
|
|
16410
16410
|
*/
|
|
16411
|
-
const { BitMatrix } = __require("core/bit-matrix.js");
|
|
16412
|
-
const { EncodeError, NotFoundError } = __require("core/errors.js");
|
|
16413
|
-
const { LuminanceSource } = __require("image/luminance.js");
|
|
16414
|
-
const { binarize } = __require("image/binarizer.js");
|
|
16415
|
-
const { ONED_FORMATS } = __require("oned/index.js");
|
|
16416
|
-
const { decodeOneD } = __require("oned/reader.js");
|
|
16417
|
-
const datamatrix = __require("datamatrix/index.js");
|
|
16418
|
-
const qr = __require("qr/index.js");
|
|
16419
|
-
const aztec = __require("aztec/index.js");
|
|
16420
|
-
const pdf417 = __require("pdf417/index.js");
|
|
16421
|
-
const micropdf417 = __require("micropdf417/index.js");
|
|
16422
|
-
const microqr = __require("microqr/index.js");
|
|
16423
|
-
const rmqr = __require("rmqr/index.js");
|
|
16424
|
-
const frameqr = __require("frameqr/index.js");
|
|
16425
|
-
const aztecRune = __require("aztecrune/index.js");
|
|
16426
|
-
const compactPdf417 = __require("compactpdf417/index.js");
|
|
16427
|
-
const databar = __require("databar/index.js");
|
|
16411
|
+
const { BitMatrix } = __require("js/core/bit-matrix.js");
|
|
16412
|
+
const { EncodeError, NotFoundError } = __require("js/core/errors.js");
|
|
16413
|
+
const { LuminanceSource } = __require("js/image/luminance.js");
|
|
16414
|
+
const { binarize } = __require("js/image/binarizer.js");
|
|
16415
|
+
const { ONED_FORMATS } = __require("js/oned/index.js");
|
|
16416
|
+
const { decodeOneD } = __require("js/oned/reader.js");
|
|
16417
|
+
const datamatrix = __require("js/datamatrix/index.js");
|
|
16418
|
+
const qr = __require("js/qr/index.js");
|
|
16419
|
+
const aztec = __require("js/aztec/index.js");
|
|
16420
|
+
const pdf417 = __require("js/pdf417/index.js");
|
|
16421
|
+
const micropdf417 = __require("js/micropdf417/index.js");
|
|
16422
|
+
const microqr = __require("js/microqr/index.js");
|
|
16423
|
+
const rmqr = __require("js/rmqr/index.js");
|
|
16424
|
+
const frameqr = __require("js/frameqr/index.js");
|
|
16425
|
+
const aztecRune = __require("js/aztecrune/index.js");
|
|
16426
|
+
const compactPdf417 = __require("js/compactpdf417/index.js");
|
|
16427
|
+
const databar = __require("js/databar/index.js");
|
|
16428
16428
|
__exports.BitMatrix = BitMatrix;
|
|
16429
|
-
const __reexport0 = __require("core/errors.js"); __exports.BarcodeError = __reexport0.BarcodeError; __exports.EncodeError = __reexport0.EncodeError; __exports.NotFoundError = __reexport0.NotFoundError; __exports.FormatError = __reexport0.FormatError; __exports.ChecksumError = __reexport0.ChecksumError;
|
|
16430
|
-
const __reexport1 = __require("image/luminance.js"); __exports.LuminanceSource = __reexport1.LuminanceSource;
|
|
16431
|
-
const __reexport2 = __require("image/binarizer.js"); __exports.binarize = __reexport2.binarize; __exports.binarizeGlobal = __reexport2.binarizeGlobal; __exports.binarizeHybrid = __reexport2.binarizeHybrid;
|
|
16432
|
-
Object.assign(__exports, __require("oned/index.js"));
|
|
16433
|
-
const __reexport3 = __require("render/svg.js"); __exports.toSVG = __reexport3.toSVG; __exports.toSVGDataURI = __reexport3.toSVGDataURI;
|
|
16434
|
-
const __reexport4 = __require("render/image-data.js"); __exports.toImageData = __reexport4.toImageData; __exports.toCanvas = __reexport4.toCanvas;
|
|
16435
|
-
const __reexport5 = __require("render/png.js"); __exports.toPNG = __reexport5.toPNG; __exports.toPNGDataURI = __reexport5.toPNGDataURI;
|
|
16436
|
-
const __reexport6 = __require("render/index.js"); __exports.renderToCanvasAuto = __reexport6.renderToCanvasAuto; __exports.isWebGL2Available = __reexport6.isWebGL2Available;
|
|
16437
|
-
const __reexport7 = __require("render/index.js"); __exports.renderToCanvasAutoAsync = __reexport7.renderToCanvasAutoAsync; __exports.isWebGPUAvailable = __reexport7.isWebGPUAvailable;
|
|
16438
|
-
const __reexport8 = __require("qr/index.js"); __exports.encodeQR = __reexport8.encodeQR; __exports.decodeQR = __reexport8.decodeQR; __exports.detectQR = __reexport8.detectQR; __exports.detectAndDecodeQR = __reexport8.detectAndDecodeQR;
|
|
16439
|
-
const __reexport9 = __require("datamatrix/index.js"); __exports.encodeDataMatrix = __reexport9.encodeDataMatrix; __exports.decodeDataMatrix = __reexport9.decodeDataMatrix; __exports.detectDataMatrix = __reexport9.detectDataMatrix; __exports.detectAndDecodeDataMatrix = __reexport9.detectAndDecodeDataMatrix;
|
|
16440
|
-
const __reexport10 = __require("aztec/index.js"); __exports.encodeAztec = __reexport10.encodeAztec; __exports.decodeAztec = __reexport10.decodeAztec; __exports.detectAztec = __reexport10.detectAztec; __exports.detectAndDecodeAztec = __reexport10.detectAndDecodeAztec;
|
|
16441
|
-
Object.assign(__exports, __require("aztecrune/index.js"));
|
|
16442
|
-
const __reexport11 = __require("pdf417/index.js"); __exports.encodePDF417 = __reexport11.encodePDF417; __exports.decodePDF417 = __reexport11.decodePDF417; __exports.detectPDF417 = __reexport11.detectPDF417; __exports.detectAndDecodePDF417 = __reexport11.detectAndDecodePDF417;
|
|
16443
|
-
Object.assign(__exports, __require("compactpdf417/index.js"));
|
|
16429
|
+
const __reexport0 = __require("js/core/errors.js"); __exports.BarcodeError = __reexport0.BarcodeError; __exports.EncodeError = __reexport0.EncodeError; __exports.NotFoundError = __reexport0.NotFoundError; __exports.FormatError = __reexport0.FormatError; __exports.ChecksumError = __reexport0.ChecksumError;
|
|
16430
|
+
const __reexport1 = __require("js/image/luminance.js"); __exports.LuminanceSource = __reexport1.LuminanceSource;
|
|
16431
|
+
const __reexport2 = __require("js/image/binarizer.js"); __exports.binarize = __reexport2.binarize; __exports.binarizeGlobal = __reexport2.binarizeGlobal; __exports.binarizeHybrid = __reexport2.binarizeHybrid;
|
|
16432
|
+
Object.assign(__exports, __require("js/oned/index.js"));
|
|
16433
|
+
const __reexport3 = __require("js/render/svg.js"); __exports.toSVG = __reexport3.toSVG; __exports.toSVGDataURI = __reexport3.toSVGDataURI;
|
|
16434
|
+
const __reexport4 = __require("js/render/image-data.js"); __exports.toImageData = __reexport4.toImageData; __exports.toCanvas = __reexport4.toCanvas;
|
|
16435
|
+
const __reexport5 = __require("js/render/png.js"); __exports.toPNG = __reexport5.toPNG; __exports.toPNGDataURI = __reexport5.toPNGDataURI;
|
|
16436
|
+
const __reexport6 = __require("js/render/index.js"); __exports.renderToCanvasAuto = __reexport6.renderToCanvasAuto; __exports.isWebGL2Available = __reexport6.isWebGL2Available;
|
|
16437
|
+
const __reexport7 = __require("js/render/index.js"); __exports.renderToCanvasAutoAsync = __reexport7.renderToCanvasAutoAsync; __exports.isWebGPUAvailable = __reexport7.isWebGPUAvailable;
|
|
16438
|
+
const __reexport8 = __require("js/qr/index.js"); __exports.encodeQR = __reexport8.encodeQR; __exports.decodeQR = __reexport8.decodeQR; __exports.detectQR = __reexport8.detectQR; __exports.detectAndDecodeQR = __reexport8.detectAndDecodeQR;
|
|
16439
|
+
const __reexport9 = __require("js/datamatrix/index.js"); __exports.encodeDataMatrix = __reexport9.encodeDataMatrix; __exports.decodeDataMatrix = __reexport9.decodeDataMatrix; __exports.detectDataMatrix = __reexport9.detectDataMatrix; __exports.detectAndDecodeDataMatrix = __reexport9.detectAndDecodeDataMatrix;
|
|
16440
|
+
const __reexport10 = __require("js/aztec/index.js"); __exports.encodeAztec = __reexport10.encodeAztec; __exports.decodeAztec = __reexport10.decodeAztec; __exports.detectAztec = __reexport10.detectAztec; __exports.detectAndDecodeAztec = __reexport10.detectAndDecodeAztec;
|
|
16441
|
+
Object.assign(__exports, __require("js/aztecrune/index.js"));
|
|
16442
|
+
const __reexport11 = __require("js/pdf417/index.js"); __exports.encodePDF417 = __reexport11.encodePDF417; __exports.decodePDF417 = __reexport11.decodePDF417; __exports.detectPDF417 = __reexport11.detectPDF417; __exports.detectAndDecodePDF417 = __reexport11.detectAndDecodePDF417;
|
|
16443
|
+
Object.assign(__exports, __require("js/compactpdf417/index.js"));
|
|
16444
16444
|
// DataBar exports include both the verified GTIN/data layer and the
|
|
16445
16445
|
// Omnidirectional/Truncated physical image path.
|
|
16446
|
-
Object.assign(__exports, __require("databar/index.js"));
|
|
16447
|
-
const __reexport12 = __require("micropdf417/index.js"); __exports.encodeMicroPDF417 = __reexport12.encodeMicroPDF417; __exports.decodeMicroPDF417 = __reexport12.decodeMicroPDF417; __exports.detectMicroPDF417 = __reexport12.detectMicroPDF417; __exports.detectAndDecodeMicroPDF417 = __reexport12.detectAndDecodeMicroPDF417;
|
|
16448
|
-
const __reexport13 = __require("microqr/index.js"); __exports.encodeMicroQR = __reexport13.encodeMicroQR; __exports.decodeMicroQR = __reexport13.decodeMicroQR; __exports.detectMicroQR = __reexport13.detectMicroQR; __exports.detectAndDecodeMicroQR = __reexport13.detectAndDecodeMicroQR;
|
|
16449
|
-
const __reexport14 = __require("rmqr/index.js"); __exports.encodeRMQR = __reexport14.encodeRMQR; __exports.decodeRMQR = __reexport14.decodeRMQR; __exports.detectRMQR = __reexport14.detectRMQR; __exports.detectAndDecodeRMQR = __reexport14.detectAndDecodeRMQR;
|
|
16450
|
-
const __reexport15 = __require("frameqr/index.js"); __exports.encodeFrameQR = __reexport15.encodeFrameQR; __exports.decodeFrameQR = __reexport15.decodeFrameQR; __exports.detectFrameQR = __reexport15.detectFrameQR; __exports.detectAndDecodeFrameQR = __reexport15.detectAndDecodeFrameQR;
|
|
16446
|
+
Object.assign(__exports, __require("js/databar/index.js"));
|
|
16447
|
+
const __reexport12 = __require("js/micropdf417/index.js"); __exports.encodeMicroPDF417 = __reexport12.encodeMicroPDF417; __exports.decodeMicroPDF417 = __reexport12.decodeMicroPDF417; __exports.detectMicroPDF417 = __reexport12.detectMicroPDF417; __exports.detectAndDecodeMicroPDF417 = __reexport12.detectAndDecodeMicroPDF417;
|
|
16448
|
+
const __reexport13 = __require("js/microqr/index.js"); __exports.encodeMicroQR = __reexport13.encodeMicroQR; __exports.decodeMicroQR = __reexport13.decodeMicroQR; __exports.detectMicroQR = __reexport13.detectMicroQR; __exports.detectAndDecodeMicroQR = __reexport13.detectAndDecodeMicroQR;
|
|
16449
|
+
const __reexport14 = __require("js/rmqr/index.js"); __exports.encodeRMQR = __reexport14.encodeRMQR; __exports.decodeRMQR = __reexport14.decodeRMQR; __exports.detectRMQR = __reexport14.detectRMQR; __exports.detectAndDecodeRMQR = __reexport14.detectAndDecodeRMQR;
|
|
16450
|
+
const __reexport15 = __require("js/frameqr/index.js"); __exports.encodeFrameQR = __reexport15.encodeFrameQR; __exports.decodeFrameQR = __reexport15.decodeFrameQR; __exports.detectFrameQR = __reexport15.detectFrameQR; __exports.detectAndDecodeFrameQR = __reexport15.detectAndDecodeFrameQR;
|
|
16451
16451
|
|
|
16452
16452
|
/**
|
|
16453
16453
|
* @typedef {object} FormatInfo
|
|
@@ -16703,7 +16703,7 @@ function encode(text, options = {}) {
|
|
|
16703
16703
|
* @property {{format:'ean2'|'ean5', text:string, parity:string, checksum?:number}} [addon] Attached EAN/UPC supplement.
|
|
16704
16704
|
* @property {number} [confidence] Camera-profile confidence from 0 to 1.
|
|
16705
16705
|
* @property {{x:number,y:number,width:number,height:number}} [bounds] Camera-profile bounds in the scanned orientation.
|
|
16706
|
-
* @property {0|90|180|270} [rotation] Camera-profile orientation in degrees.
|
|
16706
|
+
* @property {0|45|90|135|180|225|270|315} [rotation] Camera-profile orientation in degrees.
|
|
16707
16707
|
* @property {{quietZone:boolean,checksum:boolean|null,rows:number|null,consistency:number|null}} [quality] Camera-profile validation evidence.
|
|
16708
16708
|
* @property {boolean} [gs1] Whether the physical symbol is classified as GS1.
|
|
16709
16709
|
* @property {string} [symbologyIdentifier] GS1 symbology identifier.
|
|
@@ -16725,7 +16725,7 @@ function encode(text, options = {}) {
|
|
|
16725
16725
|
* @param {string[]} [options.formats] Restrict to these format ids.
|
|
16726
16726
|
* @param {boolean} [options.tryHarder] Retry inverted and rotated. Default true.
|
|
16727
16727
|
* @param {'global'|'hybrid'|'auto'} [options.binarizer]
|
|
16728
|
-
* @param {'camera'} [options.profile] Opt-in strict camera profile for validated
|
|
16728
|
+
* @param {'camera'} [options.profile] Opt-in strict camera profile for validated reads.
|
|
16729
16729
|
* @param {object} [options.frameqr] Sythos Canvas QR detector options when
|
|
16730
16730
|
* the profile marker is not preserved through image rendering.
|
|
16731
16731
|
* @returns {DecodeResult[]}
|
|
@@ -16745,6 +16745,8 @@ function decode(image, options = {}) {
|
|
|
16745
16745
|
const wantFrameQR = !want || want.has('frameqr') || want.has('frame-qr') || want.has('canvas-qr');
|
|
16746
16746
|
const oneDAliases = new Set(['gs1databar14', 'databar', 'gs1-databar14']);
|
|
16747
16747
|
const wantOneD = !want || [...want].some((f) => f in ONED_FORMATS || oneDAliases.has(f));
|
|
16748
|
+
const wantTwoD = wantQR || wantDataMatrix || wantAztec || wantAztecRune || wantPDF417
|
|
16749
|
+
|| wantCompactPDF417 || wantMicroPDF417 || wantMicroQR || wantRMQR || wantFrameQR;
|
|
16748
16750
|
|
|
16749
16751
|
const source = LuminanceSource.fromImageData(image);
|
|
16750
16752
|
const results = [];
|
|
@@ -16756,114 +16758,151 @@ function decode(image, options = {}) {
|
|
|
16756
16758
|
for (const pass of passes) {
|
|
16757
16759
|
const bits = binarize(pass, binarizer);
|
|
16758
16760
|
|
|
16759
|
-
|
|
16760
|
-
|
|
16761
|
-
|
|
16762
|
-
|
|
16761
|
+
// Keep all two-dimensional detector calls in one helper so camera-only
|
|
16762
|
+
// orientation retries use exactly the same validation path as the native
|
|
16763
|
+
// orientation. Arbitrary-angle retries remain opt-in to the camera
|
|
16764
|
+
// profile because resampling is intentionally not part of ordinary decode.
|
|
16765
|
+
const readTwoD = (candidateBits, cameraRotation = 0, candidateSource = pass) => {
|
|
16766
|
+
const before = results.length;
|
|
16767
|
+
const add = (found, format) => {
|
|
16768
|
+
if (!found) return;
|
|
16769
|
+
const publicFound = { ...found, format };
|
|
16770
|
+
if (profile === 'camera' && cameraRotation !== 0) publicFound.rotation = cameraRotation;
|
|
16771
|
+
results.push(publicFound);
|
|
16772
|
+
};
|
|
16773
|
+
|
|
16774
|
+
if (wantQR && qrCanDecode) {
|
|
16775
|
+
try {
|
|
16776
|
+
for (const found of qr.detectAndDecodeQR(candidateBits)) add(found, 'qr');
|
|
16777
|
+
} catch {
|
|
16778
|
+
/* no QR in this pass */
|
|
16763
16779
|
}
|
|
16764
|
-
} catch {
|
|
16765
|
-
/* no QR in this pass */
|
|
16766
16780
|
}
|
|
16767
|
-
}
|
|
16768
16781
|
|
|
16769
|
-
|
|
16770
|
-
|
|
16771
|
-
|
|
16772
|
-
|
|
16773
|
-
|
|
16774
|
-
|
|
16782
|
+
if (wantDataMatrix && dataMatrixCanDecode) {
|
|
16783
|
+
// Hybrid thresholding can erase the interior of very large, perfectly
|
|
16784
|
+
// uniform modules. In auto mode keep the local-threshold attempt, then
|
|
16785
|
+
// retry Data Matrix once with the global threshold before giving up.
|
|
16786
|
+
const dataMatrixBits = binarizer === 'auto'
|
|
16787
|
+
? [candidateBits, binarize(candidateSource, 'global')]
|
|
16788
|
+
: [candidateBits];
|
|
16789
|
+
for (const thresholdBits of dataMatrixBits) {
|
|
16790
|
+
try {
|
|
16791
|
+
const found = datamatrix.detectAndDecodeDataMatrix(thresholdBits);
|
|
16792
|
+
if (found) { add(found, 'datamatrix'); break; }
|
|
16793
|
+
} catch {
|
|
16794
|
+
/* no Data Matrix with this threshold */
|
|
16795
|
+
}
|
|
16796
|
+
}
|
|
16797
|
+
}
|
|
16798
|
+
|
|
16799
|
+
if (wantAztec && aztecCanDecode) {
|
|
16800
|
+
// The central bull's-eye is a small, high-contrast target. Hybrid
|
|
16801
|
+
// thresholding can flatten it on clean rendered symbols, so mirror the
|
|
16802
|
+
// Data Matrix global fallback in auto mode.
|
|
16803
|
+
const aztecBits = binarizer === 'auto'
|
|
16804
|
+
? [candidateBits, binarize(candidateSource, 'global')]
|
|
16805
|
+
: [candidateBits];
|
|
16806
|
+
for (const thresholdBits of aztecBits) {
|
|
16807
|
+
try {
|
|
16808
|
+
const found = aztec.detectAndDecodeAztec(thresholdBits);
|
|
16809
|
+
if (found) { add(found, 'aztec'); break; }
|
|
16810
|
+
} catch {
|
|
16811
|
+
/* no Aztec code with this threshold */
|
|
16812
|
+
}
|
|
16813
|
+
}
|
|
16814
|
+
}
|
|
16815
|
+
|
|
16816
|
+
if (wantAztecRune && aztecRuneCanDecode) {
|
|
16775
16817
|
try {
|
|
16776
|
-
const found =
|
|
16777
|
-
if (found)
|
|
16818
|
+
const found = aztecRune.detectAndDecodeAztecRune(candidateBits);
|
|
16819
|
+
if (found) add(found, 'aztecrune');
|
|
16778
16820
|
} catch {
|
|
16779
|
-
/* no
|
|
16821
|
+
/* no Aztec Rune in this pass */
|
|
16780
16822
|
}
|
|
16781
16823
|
}
|
|
16782
|
-
}
|
|
16783
16824
|
|
|
16784
|
-
|
|
16785
|
-
// The central bull's-eye is a small, high-contrast target. Hybrid
|
|
16786
|
-
// thresholding can flatten it on clean rendered symbols, so mirror the
|
|
16787
|
-
// Data Matrix global fallback in auto mode.
|
|
16788
|
-
const aztecBits = binarizer === 'auto' ? [bits, binarize(pass, 'global')] : [bits];
|
|
16789
|
-
for (const candidateBits of aztecBits) {
|
|
16825
|
+
if (wantPDF417 && pdf417CanDecode) {
|
|
16790
16826
|
try {
|
|
16791
|
-
const found =
|
|
16792
|
-
if (found)
|
|
16827
|
+
const found = pdf417.detectAndDecodePDF417(candidateBits);
|
|
16828
|
+
if (found) add(found, 'pdf417');
|
|
16793
16829
|
} catch {
|
|
16794
|
-
/* no
|
|
16830
|
+
/* no PDF417 in this pass */
|
|
16795
16831
|
}
|
|
16796
16832
|
}
|
|
16797
|
-
}
|
|
16798
16833
|
|
|
16799
|
-
|
|
16800
|
-
|
|
16801
|
-
|
|
16802
|
-
|
|
16803
|
-
|
|
16804
|
-
|
|
16834
|
+
if (wantCompactPDF417 && compactPdf417CanDecode) {
|
|
16835
|
+
try {
|
|
16836
|
+
const found = compactPdf417.detectAndDecodeCompactPDF417(candidateBits);
|
|
16837
|
+
if (found) add(found, 'compactpdf417');
|
|
16838
|
+
} catch {
|
|
16839
|
+
/* no Compact PDF417 in this pass */
|
|
16840
|
+
}
|
|
16805
16841
|
}
|
|
16806
|
-
}
|
|
16807
16842
|
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
|
|
16811
|
-
|
|
16812
|
-
|
|
16813
|
-
|
|
16843
|
+
if (wantMicroPDF417 && microPdf417CanDecode) {
|
|
16844
|
+
// MicroPDF417 detection measures runs across the whole raster. Hybrid
|
|
16845
|
+
// thresholding can alter uniform modules near local-window boundaries,
|
|
16846
|
+
// so retry the global threshold in auto mode as for the other 2D codes.
|
|
16847
|
+
const microPdf417Bits = binarizer === 'auto'
|
|
16848
|
+
? [candidateBits, binarize(candidateSource, 'global')]
|
|
16849
|
+
: [candidateBits];
|
|
16850
|
+
for (const thresholdBits of microPdf417Bits) {
|
|
16851
|
+
try {
|
|
16852
|
+
const found = micropdf417.detectAndDecodeMicroPDF417(thresholdBits);
|
|
16853
|
+
if (found) { add(found, 'micropdf417'); break; }
|
|
16854
|
+
} catch {
|
|
16855
|
+
/* no MicroPDF417 with this threshold */
|
|
16856
|
+
}
|
|
16857
|
+
}
|
|
16814
16858
|
}
|
|
16815
|
-
}
|
|
16816
16859
|
|
|
16817
|
-
|
|
16818
|
-
|
|
16819
|
-
|
|
16820
|
-
|
|
16821
|
-
|
|
16822
|
-
|
|
16860
|
+
if (wantMicroQR && microQrCanDecode) {
|
|
16861
|
+
try {
|
|
16862
|
+
for (const found of microqr.detectAndDecodeMicroQR(candidateBits)) add(found, 'microqr');
|
|
16863
|
+
} catch {
|
|
16864
|
+
/* no Micro QR in this pass */
|
|
16865
|
+
}
|
|
16823
16866
|
}
|
|
16824
|
-
}
|
|
16825
16867
|
|
|
16826
|
-
|
|
16827
|
-
// MicroPDF417 detection measures runs across the whole raster. Hybrid
|
|
16828
|
-
// thresholding can alter uniform modules near local-window boundaries,
|
|
16829
|
-
// so retry the global threshold in auto mode as for the other 2D codes.
|
|
16830
|
-
const microPdf417Bits = binarizer === 'auto' ? [bits, binarize(pass, 'global')] : [bits];
|
|
16831
|
-
for (const candidateBits of microPdf417Bits) {
|
|
16868
|
+
if (wantRMQR && rmqrCanDecode) {
|
|
16832
16869
|
try {
|
|
16833
|
-
const found =
|
|
16834
|
-
if (found)
|
|
16870
|
+
const found = rmqr.detectAndDecodeRMQR(candidateBits);
|
|
16871
|
+
if (found) add(found, 'rmqr');
|
|
16835
16872
|
} catch {
|
|
16836
|
-
/* no
|
|
16873
|
+
/* no rMQR in this pass */
|
|
16837
16874
|
}
|
|
16838
16875
|
}
|
|
16839
|
-
}
|
|
16840
16876
|
|
|
16841
|
-
|
|
16842
|
-
|
|
16843
|
-
|
|
16844
|
-
|
|
16877
|
+
if (wantFrameQR && frameQrCanDecode) {
|
|
16878
|
+
try {
|
|
16879
|
+
for (const found of frameqr.detectAndDecodeFrameQR(candidateBits, options.frameqr ?? {})) add(found, 'frameqr');
|
|
16880
|
+
} catch {
|
|
16881
|
+
/* no Sythos Canvas QR profile in this pass */
|
|
16845
16882
|
}
|
|
16846
|
-
} catch {
|
|
16847
|
-
/* no Micro QR in this pass */
|
|
16848
16883
|
}
|
|
16849
|
-
}
|
|
16850
16884
|
|
|
16851
|
-
|
|
16852
|
-
|
|
16853
|
-
const found = rmqr.detectAndDecodeRMQR(bits);
|
|
16854
|
-
if (found) results.push({ ...found, format: 'rmqr' });
|
|
16855
|
-
} catch {
|
|
16856
|
-
/* no rMQR in this pass */
|
|
16857
|
-
}
|
|
16858
|
-
}
|
|
16885
|
+
return results.length > before;
|
|
16886
|
+
};
|
|
16859
16887
|
|
|
16860
|
-
|
|
16861
|
-
|
|
16862
|
-
|
|
16863
|
-
|
|
16864
|
-
|
|
16865
|
-
|
|
16866
|
-
|
|
16888
|
+
const twoDFound = readTwoD(bits);
|
|
16889
|
+
if (profile === 'camera' && wantTwoD && !twoDFound) {
|
|
16890
|
+
// Normalize a camera frame through the full eight-angle set only after
|
|
16891
|
+
// the native orientation has failed. This preserves the fast path while
|
|
16892
|
+
// limiting resampling to frames that need it.
|
|
16893
|
+
const cameraRotations = [45, 90, 135, 180, 225, 270, 315];
|
|
16894
|
+
for (const rotation of cameraRotations) {
|
|
16895
|
+
const inverse = (360 - rotation) % 360;
|
|
16896
|
+
const orientedSource = inverse % 90 === 0
|
|
16897
|
+
? inverse === 0
|
|
16898
|
+
? pass
|
|
16899
|
+
: inverse === 90
|
|
16900
|
+
? pass.rotate90()
|
|
16901
|
+
: inverse === 180
|
|
16902
|
+
? rotateLuminanceSourceByDegrees(pass, 180)
|
|
16903
|
+
: pass.rotate90().rotate90().rotate90()
|
|
16904
|
+
: rotateLuminanceSourceByDegrees(pass, inverse);
|
|
16905
|
+
if (readTwoD(binarize(orientedSource, binarizer), rotation, orientedSource)) break;
|
|
16867
16906
|
}
|
|
16868
16907
|
}
|
|
16869
16908
|
|
|
@@ -16872,18 +16911,33 @@ function decode(image, options = {}) {
|
|
|
16872
16911
|
? [...want].filter((f) => f in ONED_FORMATS || oneDAliases.has(f))
|
|
16873
16912
|
: null;
|
|
16874
16913
|
const oneDPasses = [{ bits, rotation: 0 }];
|
|
16875
|
-
// A linear symbol rotated
|
|
16876
|
-
// The strict camera profile adds
|
|
16877
|
-
// only when the native orientation found no validated 1D
|
|
16914
|
+
// A linear symbol rotated away from the horizontal has no usable
|
|
16915
|
+
// horizontal scanline. The strict camera profile adds normalized
|
|
16916
|
+
// orientations only when the native orientation found no validated 1D
|
|
16917
|
+
// result. Keep the two quarter-turns first: they are the established
|
|
16918
|
+
// path and avoid paying for diagonal resampling on the common case.
|
|
16878
16919
|
const readOneD = (candidateBits, rotation) => decodeOneD(candidateBits, {
|
|
16879
16920
|
...options, formats: oneDFormats, tryHarder, profile, cameraRotation: rotation,
|
|
16880
16921
|
});
|
|
16881
16922
|
let oneDResults = readOneD(bits, 0);
|
|
16882
16923
|
if (profile === 'camera' && oneDResults.length === 0) {
|
|
16883
|
-
|
|
16884
|
-
|
|
16885
|
-
|
|
16886
|
-
|
|
16924
|
+
// `rotation` describes the supplied raster, clockwise from the
|
|
16925
|
+
// canonical horizontal orientation. To normalize it, apply the
|
|
16926
|
+
// inverse rotation. Include 180 explicitly so the full eight-angle
|
|
16927
|
+
// set still works when tryHarder is disabled (the normal reversed-row
|
|
16928
|
+
// pass also handles it without a second raster transform).
|
|
16929
|
+
const cameraRotations = [90, 270, 180, 45, 135, 225, 315];
|
|
16930
|
+
for (const rotation of cameraRotations) {
|
|
16931
|
+
const inverse = (360 - rotation) % 360;
|
|
16932
|
+
const oriented = inverse % 90 === 0
|
|
16933
|
+
? inverse === 0
|
|
16934
|
+
? bits.clone()
|
|
16935
|
+
: inverse === 180
|
|
16936
|
+
? (() => { const copy = bits.clone(); copy.rotate180(); return copy; })()
|
|
16937
|
+
: rotateBitMatrix90(bits, inverse === 90)
|
|
16938
|
+
: rotateBitMatrixByDegrees(bits, inverse);
|
|
16939
|
+
oneDPasses.push({ bits: oriented, rotation });
|
|
16940
|
+
}
|
|
16887
16941
|
for (let i = 1; i < oneDPasses.length && oneDResults.length === 0; i++) {
|
|
16888
16942
|
oneDResults = readOneD(oneDPasses[i].bits, oneDPasses[i].rotation);
|
|
16889
16943
|
}
|
|
@@ -16973,6 +17027,105 @@ function rotateBitMatrix90(matrix, clockwise) {
|
|
|
16973
17027
|
return rotated;
|
|
16974
17028
|
}
|
|
16975
17029
|
|
|
17030
|
+
/**
|
|
17031
|
+
* Rotate a binarized raster by an arbitrary clockwise angle without changing
|
|
17032
|
+
* the source matrix. This is intentionally used only by the strict camera
|
|
17033
|
+
* profile: arbitrary-angle resampling is useful for linear symbols, but is
|
|
17034
|
+
* too permissive to become a default retry for every detector.
|
|
17035
|
+
*
|
|
17036
|
+
* @param {BitMatrix} matrix
|
|
17037
|
+
* @param {number} degrees Clockwise angle, normally one of 45/135/225/315.
|
|
17038
|
+
* @returns {BitMatrix}
|
|
17039
|
+
*/
|
|
17040
|
+
function rotateBitMatrixByDegrees(matrix, degrees) {
|
|
17041
|
+
const angle = ((degrees % 360) + 360) % 360;
|
|
17042
|
+
if (angle === 0) return matrix.clone();
|
|
17043
|
+
if (angle === 90) return rotateBitMatrix90(matrix, true);
|
|
17044
|
+
if (angle === 180) {
|
|
17045
|
+
const rotated = matrix.clone();
|
|
17046
|
+
rotated.rotate180();
|
|
17047
|
+
return rotated;
|
|
17048
|
+
}
|
|
17049
|
+
if (angle === 270) return rotateBitMatrix90(matrix, false);
|
|
17050
|
+
|
|
17051
|
+
const radians = angle * Math.PI / 180;
|
|
17052
|
+
const sin = Math.sin(radians);
|
|
17053
|
+
const cos = Math.cos(radians);
|
|
17054
|
+
const width = Math.ceil(Math.abs(matrix.width * cos) + Math.abs(matrix.height * sin));
|
|
17055
|
+
const height = Math.ceil(Math.abs(matrix.width * sin) + Math.abs(matrix.height * cos));
|
|
17056
|
+
const rotated = new BitMatrix(width, height);
|
|
17057
|
+
const sourceCenterX = (matrix.width - 1) / 2;
|
|
17058
|
+
const sourceCenterY = (matrix.height - 1) / 2;
|
|
17059
|
+
const destinationCenterX = (width - 1) / 2;
|
|
17060
|
+
const destinationCenterY = (height - 1) / 2;
|
|
17061
|
+
|
|
17062
|
+
// Inverse-map destination pixels into the source. Sampling the already
|
|
17063
|
+
// binarized raster keeps the operation deterministic and leaves the caller's
|
|
17064
|
+
// original image and threshold result untouched.
|
|
17065
|
+
for (let y = 0; y < height; y++) {
|
|
17066
|
+
const dy = y - destinationCenterY;
|
|
17067
|
+
for (let x = 0; x < width; x++) {
|
|
17068
|
+
const dx = x - destinationCenterX;
|
|
17069
|
+
const sourceX = Math.round(cos * dx + sin * dy + sourceCenterX);
|
|
17070
|
+
const sourceY = Math.round(-sin * dx + cos * dy + sourceCenterY);
|
|
17071
|
+
if (sourceX >= 0 && sourceX < matrix.width && sourceY >= 0 && sourceY < matrix.height &&
|
|
17072
|
+
matrix.get(sourceX, sourceY)) {
|
|
17073
|
+
rotated.set(x, y);
|
|
17074
|
+
}
|
|
17075
|
+
}
|
|
17076
|
+
}
|
|
17077
|
+
return rotated;
|
|
17078
|
+
}
|
|
17079
|
+
|
|
17080
|
+
/**
|
|
17081
|
+
* Rotate the greyscale source before thresholding. Resampling luminance rather
|
|
17082
|
+
* than an already-binarized matrix preserves module contrast at diagonal
|
|
17083
|
+
* orientations and gives the format-specific detectors the same input quality
|
|
17084
|
+
* as the native camera frame.
|
|
17085
|
+
*
|
|
17086
|
+
* @param {LuminanceSource} source
|
|
17087
|
+
* @param {number} degrees Clockwise angle.
|
|
17088
|
+
* @returns {LuminanceSource}
|
|
17089
|
+
*/
|
|
17090
|
+
function rotateLuminanceSourceByDegrees(source, degrees) {
|
|
17091
|
+
const angle = ((degrees % 360) + 360) % 360;
|
|
17092
|
+
if (angle === 0) return source;
|
|
17093
|
+
if (angle === 90) return source.rotate90();
|
|
17094
|
+
if (angle === 180) return source.rotate90().rotate90();
|
|
17095
|
+
if (angle === 270) return source.rotate90().rotate90().rotate90();
|
|
17096
|
+
|
|
17097
|
+
const radians = angle * Math.PI / 180;
|
|
17098
|
+
const sin = Math.sin(radians);
|
|
17099
|
+
const cos = Math.cos(radians);
|
|
17100
|
+
const width = Math.ceil(Math.abs(source.width * cos) + Math.abs(source.height * sin));
|
|
17101
|
+
const height = Math.ceil(Math.abs(source.width * sin) + Math.abs(source.height * cos));
|
|
17102
|
+
const rotated = new Uint8Array(width * height);
|
|
17103
|
+
rotated.fill(255);
|
|
17104
|
+
const sourceCenterX = (source.width - 1) / 2;
|
|
17105
|
+
const sourceCenterY = (source.height - 1) / 2;
|
|
17106
|
+
const destinationCenterX = (width - 1) / 2;
|
|
17107
|
+
const destinationCenterY = (height - 1) / 2;
|
|
17108
|
+
|
|
17109
|
+
for (let y = 0; y < height; y++) {
|
|
17110
|
+
const dy = y - destinationCenterY;
|
|
17111
|
+
for (let x = 0; x < width; x++) {
|
|
17112
|
+
const dx = x - destinationCenterX;
|
|
17113
|
+
const sourceX = cos * dx + sin * dy + sourceCenterX;
|
|
17114
|
+
const sourceY = -sin * dx + cos * dy + sourceCenterY;
|
|
17115
|
+
if (sourceX >= 0 && sourceX < source.width && sourceY >= 0 && sourceY < source.height) {
|
|
17116
|
+
const left = Math.floor(sourceX), top = Math.floor(sourceY);
|
|
17117
|
+
const right = Math.min(source.width - 1, left + 1);
|
|
17118
|
+
const bottom = Math.min(source.height - 1, top + 1);
|
|
17119
|
+
const fx = sourceX - left, fy = sourceY - top;
|
|
17120
|
+
const topValue = source.get(left, top) * (1 - fx) + source.get(right, top) * fx;
|
|
17121
|
+
const bottomValue = source.get(left, bottom) * (1 - fx) + source.get(right, bottom) * fx;
|
|
17122
|
+
rotated[y * width + x] = Math.round(topValue * (1 - fy) + bottomValue * fy);
|
|
17123
|
+
}
|
|
17124
|
+
}
|
|
17125
|
+
}
|
|
17126
|
+
return LuminanceSource.fromGrey(rotated, width, height);
|
|
17127
|
+
}
|
|
17128
|
+
|
|
16976
17129
|
/**
|
|
16977
17130
|
* Decode, or throw if nothing is found.
|
|
16978
17131
|
*
|
|
@@ -16987,7 +17140,7 @@ function decodeStrict(image, options) {
|
|
|
16987
17140
|
}
|
|
16988
17141
|
|
|
16989
17142
|
/** Library version, matching package.json. */
|
|
16990
|
-
const VERSION = '1.5.
|
|
17143
|
+
const VERSION = '1.5.8';
|
|
16991
17144
|
|
|
16992
17145
|
__exports.listFormats = listFormats;
|
|
16993
17146
|
__exports.encode = encode;
|